<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN, DOCX: Frame (text box) around image cuts into image and caption"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=106132#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN, DOCX: Frame (text box) around image cuts into image and caption"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=106132">bug 106132</a>
from <span class="vcard"><a class="email" href="mailto:jluth@mail.com" title="Justin L <jluth@mail.com>"> <span class="fn">Justin L</span></a>
</span></b>
<pre>(In reply to Justin L from <a href="show_bug.cgi?id=106132#c11">comment #11</a>)
<span class="quote">> My guess is that some default spacing values for frames/textboxes are not
> being reset to zero during the conversion.</span >
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
));
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>