From 50223ea6e212b60b7d33839c2753c5601fb50f95 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 31 Mar 2016 15:05:48 +0200 Subject: tdf#98987 sw: add AddVerticalFrameOffsets compat mode The situation is the following: we have a text frame, with at least two anchored objects: one is wrapped not-wrap-through, the other is. In case the non-wrap-though one shifts the text content of the text frame right or down, then layout may or may not want to re-consider what is the top left corner of the text frame for anchoring purposes. Regarding the x position, sw layout repositioned the anchor point depending on the AddFrameOffsets compat mode: it's enabled for documents imported from Word, disabled otherwise. Regarding the y position, no repositioning was done, however the bugdoc shows that Word does the same repositioning on the vertical axis as well. Add a new AddVerticalFrameOffsets compat mode that enables vertical repositioning as well, and enable that mode for documents imported from DOCX. Change-Id: Idc5cad7d86662008a92ff3bf5fbb3806aa2c7b07 Reviewed-on: https://gerrit.libreoffice.org/23702 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- writerfilter/source/filter/WriterFilter.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'writerfilter/source') diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index f3c370c85369..65cd9b3ae429 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -276,6 +276,7 @@ void WriterFilter::setTargetDocument(const uno::Reference< lang::XComponent >& x uno::Reference< beans::XPropertySet > xSettings(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); xSettings->setPropertyValue("AddFrameOffsets", uno::makeAny(sal_True)); + xSettings->setPropertyValue("AddVerticalFrameOffsets", uno::makeAny(sal_True)); xSettings->setPropertyValue("UseOldNumbering", uno::makeAny(sal_False)); xSettings->setPropertyValue("IgnoreFirstLineIndentInNumbering", uno::makeAny(sal_False)); xSettings->setPropertyValue("DoNotResetParaAttrsForNumFont", uno::makeAny(sal_False)); -- cgit v1.2.3