https://bugs.documentfoundation.org/show_bug.cgi?id=106132

--- Comment #12 from Justin L <jl...@mail.com> ---
(In reply to Justin L from comment #11)
> My guess is that some default spacing values for frames/textboxes are not
> being reset to zero during the conversion.
void Shape::setDefaults(bool bHeight)
{
    maDefaultShapeProperties.setProperty(PROP_TextLeftDistance, static_cast<
sal_Int32 >( 250 ));
    maDefaultShapeProperties.setProperty(PROP_TextUpperDistance, static_cast<
sal_Int32 >( 125 ));
    maDefaultShapeProperties.setProperty(PROP_TextRightDistance, static_cast<
sal_Int32 >( 250 ));
    maDefaultShapeProperties.setProperty(PROP_TextLowerDistance, static_cast<
sal_Int32 >( 125 ));
}

Potential fix for the .docx documents (except that it isn't focused on this
particular bug and likely would cause lots of regressions) is:
+++ b/oox/source/drawingml/shape.cxx
@@ -899,6 +899,12 @@ Reference< XShape > const & Shape::createAndInsert(
else if (mbTextBox)
{
  aShapeProps.setProperty(PROP_TextBox, true);
+//clear default border spacing values
+aShapeProps.setProperty(PROP_TextLeftDistance,  static_cast< sal_Int32 >( 0
));
+aShapeProps.setProperty(PROP_TextUpperDistance, static_cast< sal_Int32 >( 0
));
+aShapeProps.setProperty(PROP_TextRightDistance, static_cast< sal_Int32 >( 0
));
+aShapeProps.setProperty(PROP_TextLowerDistance, static_cast< sal_Int32 >( 0
));
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to