diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-04-23 12:43:54 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-04-26 18:19:32 +0200 |
commit | 45f20a893a457a40604207382611afd2f8e4b635 (patch) | |
tree | 0604a60593c9b9037c8a8e8e3cd3573070dc394b /include/xmloff | |
parent | e87ea03a0d595ed478f281a723a6889228babeb2 (diff) |
[API CHANGE] deprecate XGraphicObjectResolver
XGraphicObjectResolver was used to get the GraphicObject URL from
an storage (package) URL. This isn't possible anymore in LO 6.1
since creating GraphicObject from uniqueID was removed for its
lifecycle issues. XGraphicObjectResolver is now deprecated and
when the "resolveGraphicObjectURL" is called, it throws a
RuntimeExeption.
In places where XGraphicObjectResolver was used, we now use the
XGraphicStorageHandler as the alternative. Both share a common
implementation so previously we could cast one to the other at
any time. Now only XGraphicStorageHandler is used.
GraphicObjectResolver was removed and replaced by the alternative
GraphicStorageHandler for instance creation - where needed.
Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84
Reviewed-on: https://gerrit.libreoffice.org/53279
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/xmloff')
-rw-r--r-- | include/xmloff/xmlexp.hxx | 17 | ||||
-rw-r--r-- | include/xmloff/xmlimp.hxx | 18 |
2 files changed, 20 insertions, 15 deletions
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index a40d47edf9e6..eeedd1bc09fa 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -46,7 +46,7 @@ #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XExporter.hpp> -#include <com/sun/star/document/XGraphicObjectResolver.hpp> +#include <com/sun/star/document/XGraphicStorageHandler.hpp> #include <com/sun/star/document/XEmbeddedObjectResolver.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -128,7 +128,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper< css::uno::Reference< css::xml::sax::XDocumentHandler > mxHandler; // the handlers css::uno::Reference< css::xml::sax::XExtendedDocumentHandler > mxExtHandler; css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier; - css::uno::Reference< css::document::XGraphicObjectResolver > mxGraphicResolver; + css::uno::Reference< css::document::XGraphicStorageHandler > mxGraphicStorageHandler; css::uno::Reference< css::document::XEmbeddedObjectResolver > mxEmbeddedResolver; css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator; css::uno::Reference< css::beans::XPropertySet > mxExportInfo; @@ -256,8 +256,11 @@ protected: const css::uno::Reference< css::document::XEmbeddedObjectResolver >& GetEmbeddedResolver() const { return mxEmbeddedResolver; } inline void SetEmbeddedResolver( css::uno::Reference< css::document::XEmbeddedObjectResolver > const & _xEmbeddedResolver ); - const css::uno::Reference< css::document::XGraphicObjectResolver >& GetGraphicResolver() const { return mxGraphicResolver; } - void SetGraphicResolver( css::uno::Reference< css::document::XGraphicObjectResolver > const & _xGraphicResolver ); + const css::uno::Reference<css::document::XGraphicStorageHandler> & GetGraphicStorageHandler() const + { + return mxGraphicStorageHandler; + } + void SetGraphicStorageHandler(css::uno::Reference<css::document::XGraphicStorageHandler> const & rxGraphicStorageHandler); void SetDocHandler( const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler ); @@ -625,10 +628,10 @@ inline void SvXMLExport::SetEmbeddedResolver( mxEmbeddedResolver = _xEmbeddedResolver; } -inline void SvXMLExport::SetGraphicResolver( - css::uno::Reference< css::document::XGraphicObjectResolver > const & _xGraphicResolver ) +inline void SvXMLExport::SetGraphicStorageHandler( + css::uno::Reference<css::document::XGraphicStorageHandler> const & rxGraphicStorageHandler) { - mxGraphicResolver = _xGraphicResolver; + mxGraphicStorageHandler = rxGraphicStorageHandler; } // Helper class to export an element. diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 77b620a3f1df..5ac6e5c2091e 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -42,7 +42,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/document/XFilter.hpp> -#include <com/sun/star/document/XGraphicObjectResolver.hpp> +#include <com/sun/star/document/XGraphicStorageHandler.hpp> #include <com/sun/star/document/XEmbeddedObjectResolver.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -177,7 +177,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< css::uno::Reference< css::xml::sax::XLocator > mxLocator; css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier; - css::uno::Reference< css::document::XGraphicObjectResolver > mxGraphicResolver; + css::uno::Reference< css::document::XGraphicStorageHandler > mxGraphicStorageHandler; css::uno::Reference< css::document::XEmbeddedObjectResolver > mxEmbeddedResolver; css::uno::Reference< css::beans::XPropertySet > mxImportInfo; @@ -271,9 +271,11 @@ protected: const css::uno::Reference< css::document::XEmbeddedObjectResolver >& GetEmbeddedResolver() const { return mxEmbeddedResolver; } inline void SetEmbeddedResolver( css::uno::Reference< css::document::XEmbeddedObjectResolver > const & _xEmbeddedResolver ); - const css::uno::Reference< css::document::XGraphicObjectResolver >& GetGraphicResolver() const { return mxGraphicResolver; } - void SetGraphicResolver( css::uno::Reference< css::document::XGraphicObjectResolver > const & _xGraphicResolver ); - + const css::uno::Reference<css::document::XGraphicStorageHandler> & GetGraphicStorageHandler() const + { + return mxGraphicStorageHandler; + } + void SetGraphicStorageHandler(css::uno::Reference<css::document::XGraphicStorageHandler> const & rxGraphicStorageHandler); void CreateNumberFormatsSupplier_(); void CreateDataStylesImport_(); @@ -617,10 +619,10 @@ inline void SvXMLImport::SetEmbeddedResolver( mxEmbeddedResolver = _xEmbeddedResolver; } -inline void SvXMLImport::SetGraphicResolver( - css::uno::Reference< css::document::XGraphicObjectResolver > const & _xGraphicResolver ) +inline void SvXMLImport::SetGraphicStorageHandler( + css::uno::Reference<css::document::XGraphicStorageHandler> const & rxGraphicStorageHandler) { - mxGraphicResolver = _xGraphicResolver; + mxGraphicStorageHandler = rxGraphicStorageHandler; } inline css::uno::Reference< css::util::XNumberFormatsSupplier > & SvXMLImport::GetNumberFormatsSupplier() |