summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-04-23 12:43:54 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-04-26 18:19:32 +0200
commit45f20a893a457a40604207382611afd2f8e4b635 (patch)
tree0604a60593c9b9037c8a8e8e3cd3573070dc394b /xmlscript
parente87ea03a0d595ed478f281a723a6889228babeb2 (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 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx1
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx6
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx1
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx7
4 files changed, 4 insertions, 11 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 9c0e71610112..fec77d042c9c 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
-#include <com/sun/star/document/XGraphicObjectResolver.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <o3tl/any.hxx>
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index b4174a5da6ac..ae6340cd9848 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -63,7 +63,7 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
-#include <com/sun/star/document/GraphicObjectResolver.hpp>
+#include <com/sun/star/document/GraphicStorageHandler.hpp>
#include <com/sun/star/document/XGraphicStorageHandler.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
@@ -731,10 +731,8 @@ void ElementDescriptor::readImageOrGraphicAttr(OUString const & rAttrName)
if ( xDocStorage.is() )
{
Reference<XComponentContext> xContext = ::comphelper::getProcessComponentContext();
- uno::Reference<document::XGraphicObjectResolver> xGraphicResolver;
- xGraphicResolver.set(document::GraphicObjectResolver::createWithStorage(xContext, xDocStorage->getDocumentStorage()));
uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
- xGraphicStorageHandler.set(xGraphicResolver, uno::UNO_QUERY);
+ xGraphicStorageHandler.set(document::GraphicStorageHandler::createWithStorage(xContext, xDocStorage->getDocumentStorage()));
if (xGraphicStorageHandler.is())
{
sURL = xGraphicStorageHandler->saveGraphic(xGraphic);
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 5b1996259a9c..d78e9a55579e 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
-#include <com/sun/star/document/XGraphicObjectResolver.hpp>
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <sal/log.hxx>
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index c8c7442b20b8..b2c55a45ef35 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -53,7 +53,6 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include <com/sun/star/document/XGraphicObjectResolver.hpp>
#include <com/sun/star/document/XGraphicStorageHandler.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
@@ -853,16 +852,14 @@ bool ImportContext::importGraphicOrImageProperty(
uno::Reference<graphic::XGraphic> xGraphic;
- uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
+ uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
if ( xDocStorage.is() )
{
uno::Sequence< Any > aArgs( 1 );
aArgs[ 0 ] <<= xDocStorage->getDocumentStorage();
- xGraphicResolver.set(
+ xGraphicStorageHandler.set(
_pImport->getComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.Svx.GraphicImportHelper" , aArgs, _pImport->getComponentContext() ),
UNO_QUERY );
- uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
- xGraphicStorageHandler.set(xGraphicResolver, uno::UNO_QUERY);
if (xGraphicStorageHandler.is())
{
try