Kaydet (Commit) bd72163f authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Miklos Vajna

Watermark: auto size in the RTF

When Watermark size is set to Auto in the MSO,
the saved value is equal 1pt. Before this patch
in this case Watermark was invisible due to small size.

Change-Id: Ia2028a6547cf98dd31031305bcc5375625b83fe0
Reviewed-on: https://gerrit.libreoffice.org/38883Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 5d391c47
This diff is collapsed.
...@@ -2896,6 +2896,16 @@ DECLARE_RTFIMPORT_TEST(testImportHeaderFooter, "tdf108055.rtf") ...@@ -2896,6 +2896,16 @@ DECLARE_RTFIMPORT_TEST(testImportHeaderFooter, "tdf108055.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("Footer uneven"), aActual); CPPUNIT_ASSERT_EQUAL(OUString("Footer uneven"), aActual);
} }
DECLARE_RTFIMPORT_TEST(testWatermark, "watermark.rtf")
{
Size aExpectedSize(14965, 7482);
uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
awt::Size aActualSize(xShape->getSize());
CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Width()), aActualSize.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Height()), aActualSize.Height);
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -919,6 +919,8 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap ...@@ -919,6 +919,8 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
it->Value <<= aPropertyValues; it->Value <<= aPropertyValues;
xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(comphelper::containerToSequence(aGeomPropVec))); xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(comphelper::containerToSequence(aGeomPropVec)));
xPropertySet->setPropertyValue("TextAutoGrowHeight", uno::makeAny(false));
xPropertySet->setPropertyValue("TextAutoGrowWidth", uno::makeAny(false));
} }
if (!boost::logic::indeterminate(obRelFlipV) && xPropertySet.is()) if (!boost::logic::indeterminate(obRelFlipV) && xPropertySet.is())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment