diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-09 15:32:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-28 08:22:53 +0200 |
commit | 49cf14a3ca8dceed39baead918b1ddaaab5f4ab3 (patch) | |
tree | ee1ea9363933db10c96e373b091ac7952ae9dfc0 /xmlscript | |
parent | 4b37df18a18b61521e5fcbf358c6bc85639abdfc (diff) |
fdo#46808, Adapt document::GraphicObjectResolver UNO service to new style
The services already existed, it just did not have an IDL file
Change-Id: I245f78c165dbfde11a981efd7033c5c282f4e8ad
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index b0004ed8bcd3..3ac5fa163589 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -55,7 +55,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/XGraphicObjectResolver.hpp> +#include <com/sun/star/document/GraphicObjectResolver.hpp> #include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> @@ -700,14 +700,10 @@ void ElementDescriptor::readImageURLAttr( OUString const & rPropName, OUString c Reference< document::XStorageBasedDocument > xDocStorage( _xDocument, UNO_QUERY ); if ( xDocStorage.is() ) { - uno::Sequence< Any > aArgs( 1 ); - aArgs[ 0 ] <<= xDocStorage->getDocumentStorage(); - - ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); - uno::Reference< document::XGraphicObjectResolver > xGraphicResolver; - aContext.createComponentWithArguments( "com.sun.star.comp.Svx.GraphicExportHelper" , aArgs, xGraphicResolver ); - if ( xGraphicResolver.is() ) - sURL = xGraphicResolver->resolveGraphicObjectURL( sURL ); + Reference<XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + uno::Reference< document::XGraphicObjectResolver > xGraphicResolver = + document::GraphicObjectResolver::createWithStorage( xContext, xDocStorage->getDocumentStorage() ); + sURL = xGraphicResolver->resolveGraphicObjectURL( sURL ); } } if ( !sURL.isEmpty() ) |