diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-26 13:53:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-04 16:57:55 +0200 |
commit | b3c76dee6d44d07eae404b8d7341e6c88e6c4429 (patch) | |
tree | c747dd5bddf94c3b4312c7b1861a5087e76e71d6 /xmloff/source | |
parent | eb68bf18f2d859486c4a737abb2536a6afe45411 (diff) |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new ::create methods
Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/core/xmluconv.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport4.cxx | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index b8fc35dea068..197cdf369835 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -43,11 +43,14 @@ #include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/text/DefaultNumberingProvider.hpp> +#include <com/sun/star/text/XDefaultNumberingProvider.hpp> #include <com/sun/star/text/XNumberingTypeInfo.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/i18n/XCharacterClassification.hpp> #include <com/sun/star/i18n/UnicodeType.hpp> #include <basegfx/vector/b3dvector.hxx> +#include <comphelper/componentcontext.hxx> #include <sax/tools/converter.hxx> @@ -95,10 +98,10 @@ void SvXMLUnitConverter::Impl::createNumTypeInfo() const { if (m_xServiceFactory.is()) { + Reference<XComponentContext> xContext( comphelper::ComponentContext(m_xServiceFactory).getUNOContext() ); + Reference<XDefaultNumberingProvider> xDefNum = DefaultNumberingProvider::create(xContext); const_cast<Impl*>(this)->m_xNumTypeInfo = - Reference < XNumberingTypeInfo > ( - m_xServiceFactory->createInstance( - OUString("com.sun.star.text.DefaultNumberingProvider" ) ), UNO_QUERY ); + Reference<XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY); } } diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index bd1ae98c4640..aa4701d36993 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/graphic/GraphicProvider.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> @@ -69,6 +70,7 @@ #include "xmloff/xmlnmspe.hxx" #include "XMLBase64Export.hxx" +#include <comphelper/componentcontext.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -1220,7 +1222,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape xPictureStream.set( xPictureStorage->openStreamElement( sPictureName, ::embed::ElementModes::READWRITE ), UNO_QUERY_THROW ); } - Reference< graphic::XGraphicProvider > xProvider( xSM->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicProvider" ) ) ), UNO_QUERY_THROW ); + Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(comphelper::ComponentContext(xSM).getUNOContext()) ); Sequence< beans::PropertyValue > aArgs( 2 ); aArgs[ 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ); aArgs[ 0 ].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "image/x-vclgraphic" ) ); |