diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-08-26 17:20:39 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-08-26 17:20:39 +0100 |
commit | 74881f6a87c260fa32bd3ba5489c6ce6f5b9caf0 (patch) | |
tree | 5ac2002086fc69c33d1eed4dbc3ac109c1d35cd6 /xmloff | |
parent | eb9531f9c01b5e3a823103c41bbb34905847b0bf (diff) |
export the source storage to import filter, to mirror TargetStorage for export
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/xmloff/xmlimp.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index 69cbe1fe310d..498aed4e52ae 100644 --- a/xmloff/inc/xmloff/xmlimp.hxx +++ b/xmloff/inc/xmloff/xmlimp.hxx @@ -32,6 +32,7 @@ #include "sal/config.h" #include "xmloff/dllapi.h" #include "sal/types.h" +#include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> #include <com/sun/star/xml/sax/SAXException.hpp> @@ -326,6 +327,10 @@ public: GetStreamForEmbeddedObjectURLFromBase64(); ::rtl::OUString ResolveEmbeddedObjectURLFromBase64(); + // get source storage we're importing from (if available) + ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > + GetSourceStorage(); + void AddStyleDisplayName( sal_uInt16 nFamily, const ::rtl::OUString& rName, const ::rtl::OUString& rDisplayName ); diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index a70a43fcb71a..803290a7280b 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -193,6 +193,8 @@ public: const uno::Reference< uno::XComponentContext > mxComponentContext; + uno::Reference< embed::XStorage > mxSourceStorage; + std::auto_ptr< xmloff::RDFaImportHelper > mpRDFaHelper; SvXMLImport_Impl() : @@ -995,6 +997,10 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= (mpImpl->mbTextDocInOOoFileFormat); } + + sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("SourceStorage" ) ); + if( xPropertySetInfo->hasPropertyByName(sPropName) ) + mxImportInfo->getPropertyValue(sPropName) >>= mpImpl->mxSourceStorage; } } } @@ -1317,6 +1323,11 @@ Reference< XOutputStream > SvXMLImport::GetStreamForGraphicObjectURLFromBase64() return sRet; } +Reference< embed::XStorage > SvXMLImport::GetSourceStorage() +{ + return mpImpl->mxSourceStorage; +} + Reference < XOutputStream > SvXMLImport::GetStreamForEmbeddedObjectURLFromBase64() { |