summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-12 09:04:08 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-12 09:04:42 +0100
commitc953690b9adaf632f830dbf67e078ea00747894d (patch)
tree76f818e8a18f15e17889849fcf85f165697e7601
parenteb14f3d4e4da72ba19e28eb9ee796c04ab3b8d84 (diff)
writerfilter: let ImportFilter only assume that DomainMapper is a Stream
Change-Id: I2e0db194357657df81d8cd94f42cdfbd2c3a2664
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx14
-rw-r--r--writerfilter/source/filter/ImportFilter.cxx6
2 files changed, 14 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 28f43fb09c57..4e06ded2b9e0 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -169,6 +169,20 @@ DomainMapper::~DomainMapper()
// Apply the document settings after everything else
m_pImpl->GetSettingsTable()->ApplyProperties( m_pImpl->GetTextDocument( ) );
+
+ // Grab-bag handling
+ comphelper::SequenceAsHashMap aProperties;
+ // Add the saved w:themeFontLang setting
+ aProperties["ThemeFontLangProps"] = uno::makeAny(GetThemeFontLangProperties());
+ // Add the saved compat settings
+ aProperties["CompatSettings"] = uno::makeAny(GetCompatSettings());
+ uno::Reference<beans::XPropertySet> xDocProps(m_pImpl->GetTextDocument(), uno::UNO_QUERY);
+ if (xDocProps.is())
+ {
+ comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue("InteropGrabBag"));
+ aGrabBag.update(aProperties);
+ xDocProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList()));
+ }
}
catch( const uno::Exception& rEx )
{
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index eb8801fabbd9..93ed71f9bed0 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -121,9 +121,6 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
aGrabBagProperties["OOXActiveX"] = uno::makeAny( pDocument->getActiveXDomList() );
aGrabBagProperties["OOXActiveXBin"] = uno::makeAny( pDocument->getActiveXBinList() );
- // Adding the saved w:themeFontLang setting
- aGrabBagProperties["ThemeFontLangProps"] = uno::makeAny( aDomainMapper->GetThemeFontLangProperties() );
-
// Adding the saved Glossary Documnet DOM to the document's grab bag
aGrabBagProperties["OOXGlossary"] = uno::makeAny( pDocument->getGlossaryDocDom() );
aGrabBagProperties["OOXGlossaryDom"] = uno::makeAny( pDocument->getGlossaryDomList() );
@@ -131,9 +128,6 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
// Adding the saved embedding document to document's grab bag
aGrabBagProperties["OOXEmbeddings"] = uno::makeAny( pDocument->getEmbeddingsList() );
- // Adding the saved compat settings
- aGrabBagProperties["CompatSettings"] = uno::makeAny( aDomainMapper->GetCompatSettings() );
-
putPropertiesToDocumentGrabBag( aGrabBagProperties );
writerfilter::ooxml::OOXMLStream::Pointer_t pVBAProjectStream(writerfilter::ooxml::OOXMLDocumentFactory::createStream( pDocStream, writerfilter::ooxml::OOXMLStream::VBAPROJECT ));