writerfilter: let ImportFilter only assume that DomainMapper is a Stream

Change-Id: I2e0db194357657df81d8cd94f42cdfbd2c3a2664
This commit is contained in:
Miklos Vajna
2014-12-12 09:04:08 +01:00
parent eb14f3d4e4
commit c953690b9a
2 changed files with 14 additions and 6 deletions

View File

@@ -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 )
{

View File

@@ -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 ));