summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-14 15:51:25 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-14 16:04:15 +0100
commitd05b67a7b9448c67c3a923ecb33dac74b52dd192 (patch)
tree66b6657f7238b6c086f230b256705efdd54b809b /writerfilter
parenta83517bd1b99c170e7d3b2fd59af3e85d983c756 (diff)
RTF import: anchor drawing objects at-character by default
Change-Id: I292ab1a6f12a9372b1cfdd4e8e59fbae57c6ceca
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index f5935f6c076f..4eef7ea5d0b9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <rtl/tencinfo.h>
#include <svl/lngmisc.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -4611,6 +4612,9 @@ int RTFDocumentImpl::popState()
uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY);
bool bTextFrame = xServiceInfo->supportsService("com.sun.star.text.TextFrame");
+ // The default is certainly not inline, but then what Word supports is just at-character.
+ xPropertySet->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
+
if (bTextFrame)
{
xPropertySet->setPropertyValue("HoriOrientPosition", uno::makeAny((sal_Int32)rDrawing.nLeft));