diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf91687.doc | bin | 0 -> 23552 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf91687.doc b/sw/qa/extras/ww8export/data/tdf91687.doc Binary files differnew file mode 100644 index 000000000000..d1c1e0a0c381 --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf91687.doc diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index 1f9082fd1ff6..6aba024fcb15 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -101,6 +101,16 @@ DECLARE_WW8EXPORT_TEST(testTdf108072, "tdf108072.doc") CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTableRows->getByIndex(0), "IsSplitAllowed")); } +DECLARE_WW8EXPORT_TEST(testTdf91687, "tdf91687.doc") +{ + // Exported Watermarks were resized + uno::Reference<drawing::XShape> xWatermark = getShape(1); + uno::Reference<beans::XPropertySet> xWatermarkProperties(xWatermark, uno::UNO_QUERY); + + CPPUNIT_ASSERT_EQUAL((sal_Int32)5172, xWatermark->getSize().Height); + CPPUNIT_ASSERT_EQUAL((sal_Int32)18105, xWatermark->getSize().Width); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 9fc44252d0d6..2e94c500cbde 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -759,7 +759,12 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const OSL_ENSURE(pObj, "wo ist das SDR-Object?"); if (pObj) { - aRect = pObj->GetSnapRect(); + aRect = pObj->GetLogicRect(); + + // We have to export original size with padding + const SfxItemSet& rSet = pObj->GetMergedItemSet(); + const SdrMetricItem* pItem = static_cast<const SdrMetricItem*>(rSet.GetItem(SDRATTR_TEXT_UPPERDIST)); + aRect.SetSize(Size(aRect.GetWidth(), aRect.GetHeight() + pItem->GetValue())); } } |