Compare commits

...

8 Commits

3 changed files with 30 additions and 17 deletions

View File

@ -1068,25 +1068,28 @@ public:
{
case ODRAW::rtLineTo:
{
if (valuePointer + 1 > m_arPoints.size())
for (_UINT16 j = 0; j < m_arSegments[i].m_nCount; j++)
{
break;
if (valuePointer + 1 > m_arPoints.size())
{
break;
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[0].x);
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[0].y);
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[0].x);
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[0].y);
++valuePointer;
}
else
{
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].y );
++valuePointer;
}
else
{
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].y );
++valuePointer;
++valuePointer;
}
}
}break;
case ODRAW::rtCurveTo:

View File

@ -5088,7 +5088,14 @@ bool DocxConverter::convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer
oox_table_pr->m_oTblW->m_oW->GetValue() > 0 )
{
if ( oox_table_pr->m_oTblW->m_oW->IsPercent() == false)
odt_context->table_context()->set_default_column_width(oox_table_pr->m_oTblW->m_oW->GetValue() / 20.);
{
const double PtPerCm = 72 / 2.54;
const double TwPerPt = 20.0;
const double TwPerCm = PtPerCm * TwPerPt;
const double WidthCm = oox_table_pr->m_oTblW->m_oW->GetValue() / TwPerCm;
odt_context->table_context()->set_default_column_width(WidthCm);
table_properties->content_.style_width_ = odf_types::length(WidthCm, odf_types::length::cm);
}
}
else if ( oox_table_pr->m_oTblW->m_oType->GetValue() == SimpleTypes::tblwidthAuto &&
oox_table_pr->m_oTblW->m_oW->GetValue() == 0 )

View File

@ -227,7 +227,10 @@ void odf_table_context::end_table()
style_table_properties * table_props = style_->content_.add_get_style_table_properties();
if (table_props)
{
table_props->content_.style_width_ = length(length(impl_->current_table().table_width,length::pt).get_value_unit(length::cm),length::cm);
if( !table_props->content_.style_width_ )
{
table_props->content_.style_width_ = length(length(impl_->current_table().table_width,length::pt).get_value_unit(length::cm),length::cm);
}
}
}
}