diff options
Diffstat (limited to 'xmloff/source/text/txtparae.cxx')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 1df1e2dc0d78..86c4ecb0eab9 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3339,6 +3339,21 @@ void XMLTextParagraphExport::_exportTextGraphic( const Reference < XPropertySet > & rPropSet, const Reference < XPropertySetInfo > & rPropSetInfo ) { + // skip objects anchored at page in master documents, + // if they are imported from the subdocuments + TextContentAnchorType eAnchor; + rPropSet->getPropertyValue(u"AnchorType"_ustr) >>= eAnchor; + if( TextContentAnchorType_AT_PAGE == eAnchor ) + { + Reference<XServiceInfo> xServiceInfo(GetExport().GetModel(), UNO_QUERY); + if( xServiceInfo->supportsService(u"com.sun.star.text.GlobalDocument"_ustr) ) + { + Reference<XNamed> xNamed( rPropSet, UNO_QUERY ); + if( xNamed.is() && xNamed->getName().indexOf(" (file://") > -1 ) + return; + } + } + OUString sStyle; if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) ) { |