Also the width and height properties should have dimensions when
stored in the property string (i.e. "table-width:5.0in"). Use
functions defined in ut_units.h to do the conversion.
Simon
On Thu, Jun 7, 2012 at 9:49 PM, Hubert Figuière <hfiguiere@teaser.fr> wrote:
>
> On 03/06/12 08:16 AM, cvs@abisource.com wrote:
>
>> Modified: abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatTable.cpp
>> ===================================================================
>> --- abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatTable.cpp 2012-06-03 15:13:00 UTC (rev 31328)
>> +++ abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatTable.cpp 2012-06-03 15:16:27 UTC (rev 31329)
>> @@ -587,6 +587,29 @@
>> m_bSettingsChanged = true;
>> }
>>
>> +void AP_Dialog_FormatTable::setWidth(UT_uint32 width)
>> +{
>> + m_width = width;
>> +
>> + UT_String s_width = UT_String_sprintf("%02d", m_width);
>> +
>> + m_vecProps.addOrReplaceProp("table-width", s_width.c_str());
>> +
>> + m_bSettingsChanged = true;
>> +
>> +}
>> +
>> +void AP_Dialog_FormatTable::setHeight(UT_uint32 height)
>> +{
>> + m_height = height;
>> +
>> + UT_String s_height = UT_String_sprintf("%02d", m_height);
>> +
>> + m_vecProps.addOrReplaceProp("table-height", s_height.c_str());
>> +
>> + m_bSettingsChanged = true;
>> +}
>> +
>
> Here and in the commit after (almost the same code), please do NOT use
> UT_String. Use std::string instead. There is a UT_std_string_sprintf()
> in ut_std_string.h for that exact reason,
>
>
> Thanks,
>
> Hub
Received on Fri Jun 8 15:57:15 2012
This archive was generated by hypermail 2.1.8 : Fri Jun 08 2012 - 15:57:15 CEST