From c0f865c9b5a34b272c9e0b22d18969554265914a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 15 Oct 2012 15:20:48 +0200 Subject: fdo#46808, use service constructor for i18n::BreakIterator Note that I found a pre-existing bug in linguistic/source/gciterator.cxx but I was not able to fix it, because doing so appears to expose bugs elsewhere! Change-Id: I17fb9108d98a98d0ae13fe5a8e043d2db5b27a6a --- sdext/source/pdfimport/tree/drawtreevisiting.cxx | 9 +++------ sdext/source/presenter/PresenterTextView.cxx | 7 ++----- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 33d8db9d2a23..4333dabab350 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -29,7 +29,7 @@ #include "basegfx/polygon/b2dpolypolygontools.hxx" #include "basegfx/range/b2drange.hxx" -#include "com/sun/star/i18n/XBreakIterator.hpp" +#include "com/sun/star/i18n/BreakIterator.hpp" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "comphelper/processfactory.hxx" #include "com/sun/star/i18n/ScriptType.hpp" @@ -46,15 +46,12 @@ using namespace ::com::sun::star::uno; namespace pdfi { -const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& DrawXmlOptimizer::GetBreakIterator() +const Reference< XBreakIterator >& DrawXmlOptimizer::GetBreakIterator() { if ( !mxBreakIter.is() ) { Reference< XComponentContext > xContext( this->m_rProcessor.m_xContext, uno::UNO_SET_THROW ); - Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString("com.sun.star.i18n.BreakIterator"), xContext); - - mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY ); + mxBreakIter = BreakIterator::create(xContext); } return mxBreakIter; } diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 4277b554b301..6599f4fbfa81 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -90,11 +91,7 @@ PresenterTextView::PresenterTextView ( return; // Create the break iterator that we use to break text into lines. - mxBreakIterator = Reference( - xFactory->createInstanceWithContext( - A2S("com.sun.star.i18n.BreakIterator"), - rxContext), - UNO_QUERY_THROW); + mxBreakIterator = i18n::BreakIterator::create(rxContext); // Create the script type detector that is used to split paragraphs into // portions of the same text direction. -- cgit From 10f4e767f004dc464a244618fc611bc700c6cb74 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 23 Oct 2012 18:58:35 +0200 Subject: gbuild: let ExtensionTarget expect manifest below META-INF Change-Id: Ia07d3fd856578ab6976c02f8a0ec96273db19a2c --- sdext/source/minimizer/META-INF/manifest.xml | 31 ++++++++++++++++++++++++++ sdext/source/minimizer/manifest.xml | 31 -------------------------- sdext/source/pdfimport/META-INF/manifest.xml | 31 ++++++++++++++++++++++++++ sdext/source/pdfimport/manifest.xml | 31 -------------------------- sdext/source/presenter/META-INF/manifest.xml | 33 ++++++++++++++++++++++++++++ sdext/source/presenter/manifest.xml | 33 ---------------------------- 6 files changed, 95 insertions(+), 95 deletions(-) create mode 100644 sdext/source/minimizer/META-INF/manifest.xml delete mode 100644 sdext/source/minimizer/manifest.xml create mode 100644 sdext/source/pdfimport/META-INF/manifest.xml delete mode 100644 sdext/source/pdfimport/manifest.xml create mode 100644 sdext/source/presenter/META-INF/manifest.xml delete mode 100644 sdext/source/presenter/manifest.xml (limited to 'sdext') diff --git a/sdext/source/minimizer/META-INF/manifest.xml b/sdext/source/minimizer/META-INF/manifest.xml new file mode 100644 index 000000000000..a70fe27e848c --- /dev/null +++ b/sdext/source/minimizer/META-INF/manifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/sdext/source/minimizer/manifest.xml b/sdext/source/minimizer/manifest.xml deleted file mode 100644 index a70fe27e848c..000000000000 --- a/sdext/source/minimizer/manifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - diff --git a/sdext/source/pdfimport/META-INF/manifest.xml b/sdext/source/pdfimport/META-INF/manifest.xml new file mode 100644 index 000000000000..2c23a785a584 --- /dev/null +++ b/sdext/source/pdfimport/META-INF/manifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/sdext/source/pdfimport/manifest.xml b/sdext/source/pdfimport/manifest.xml deleted file mode 100644 index 2c23a785a584..000000000000 --- a/sdext/source/pdfimport/manifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - diff --git a/sdext/source/presenter/META-INF/manifest.xml b/sdext/source/presenter/META-INF/manifest.xml new file mode 100644 index 000000000000..a25f22fdf81a --- /dev/null +++ b/sdext/source/presenter/META-INF/manifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/sdext/source/presenter/manifest.xml b/sdext/source/presenter/manifest.xml deleted file mode 100644 index a25f22fdf81a..000000000000 --- a/sdext/source/presenter/manifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - -- cgit From cffdb8d6804105bc840a407a10890af556e586c9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 23 Oct 2012 22:26:34 +0200 Subject: gbuild: fix XcuMergeTarget build breakage: Introduce gb_XcuFile_for_extension function to use the right file depending on WITH_LANG setting. Change-Id: Ibe4fc4e28fe445fc9391b68d370039528eab7ed8 --- sdext/Extension_minimizer.mk | 4 ++-- sdext/Extension_presenter.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sdext') diff --git a/sdext/Extension_minimizer.mk b/sdext/Extension_minimizer.mk index 17142fccf66b..8b56ab887dad 100644 --- a/sdext/Extension_minimizer.mk +++ b/sdext/Extension_minimizer.mk @@ -43,10 +43,10 @@ $(eval $(call gb_Extension_add_files,presentation-minimizer,bitmaps,\ $(eval $(call gb_Extension_add_file,presentation-minimizer,registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs,$(call gb_XcsTarget_get_target,sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs))) $(eval $(call gb_Extension_add_files,presentation-minimizer,registry/data/org/openoffice/Office,\ - $(call gb_XcuMergeTarget_get_target,sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu) \ + $(call gb_XcuFile_for_extension,sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu) \ $(call gb_XcuDataTarget_get_target,sdext/source/minimizer/registry/data/org/openoffice/Office/ProtocolHandler.xcu) \ )) -$(eval $(call gb_Extension_add_file,presentation-minimizer,registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu,$(call gb_XcuMergeTarget_get_target,sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu))) +$(eval $(call gb_Extension_add_file,presentation-minimizer,registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu,$(call gb_XcuFile_for_extension,sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu))) # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sdext/Extension_presenter.mk b/sdext/Extension_presenter.mk index bdd584f0cc12..dd70aa67e4eb 100644 --- a/sdext/Extension_presenter.mk +++ b/sdext/Extension_presenter.mk @@ -130,7 +130,7 @@ $(eval $(call gb_Extension_add_files,presenter-screen,bitmaps,\ $(eval $(call gb_Extension_add_file,presenter-screen,registry/schema/org/openoffice/Office/extension/PresenterScreen.xcs,$(call gb_XcsTarget_get_target,sdext/source/presenter/registry/schema/org/openoffice/Office/extension/PresenterScreen.xcs))) -$(eval $(call gb_Extension_add_file,presenter-screen,registry/data/org/openoffice/Office/extension/PresenterScreen.xcu,$(call gb_XcuMergeTarget_get_target,sdext/source/presenter/registry/data/org/openoffice/Office/extension/PresenterScreen.xcu))) +$(eval $(call gb_Extension_add_file,presenter-screen,registry/data/org/openoffice/Office/extension/PresenterScreen.xcu,$(call gb_XcuFile_for_extension,sdext/source/presenter/registry/data/org/openoffice/Office/extension/PresenterScreen.xcu))) $(eval $(call gb_Extension_add_files,presenter-screen,registry/data/org/openoffice/Office,\ $(call gb_XcuDataTarget_get_target,sdext/source/presenter/registry/data/org/openoffice/Office/Jobs.xcu) \ -- cgit From 33a0f8ce656c8c5bb9c3c3deaa10c182e262b374 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 17 Oct 2012 10:52:52 +0200 Subject: fdo#46808, Adapt awt::Toolkit UNO service to new style Create a merged XToolkit2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Also mark sub-interfaces as non-optional. Change-Id: I278d0288e92be277033013302267cf93f7d70480 --- sdext/source/minimizer/unodialog.cxx | 3 ++- sdext/source/presenter/PresenterSlideShowView.cxx | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx index c39e90106ed0..bb28f1127638 100644 --- a/sdext/source/minimizer/unodialog.cxx +++ b/sdext/source/minimizer/unodialog.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -97,7 +98,7 @@ Reference< XWindowPeer > UnoDialog::createWindowPeer( Reference< XWindowPeer > x throw ( Exception ) { mxDialogWindow->setVisible( sal_False ); - Reference< XToolkit > xToolkit( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), mxMSF ), UNO_QUERY_THROW ); + Reference< XToolkit > xToolkit( Toolkit::create( mxMSF ), UNO_QUERY_THROW ); if ( !xParentPeer.is() ) xParentPeer = xToolkit->getDesktopWindow(); mxReschedule = Reference< XReschedule >( xToolkit, UNO_QUERY ); diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index ba820ebefe41..2201a1edca2f 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -25,6 +25,7 @@ #include "PresenterPaneContainer.hxx" #include #include +#include #include #include #include @@ -834,11 +835,7 @@ Reference PresenterSlideShowView::CreateViewWindow ( if ( ! xFactory.is()) return xViewWindow; - Reference xToolkit ( - xFactory->createInstanceWithContext( - OUString("com.sun.star.awt.Toolkit"), - mxComponentContext), - UNO_QUERY_THROW); + Reference xToolkit = awt::Toolkit::create(mxComponentContext); awt::WindowDescriptor aWindowDescriptor ( awt::WindowClass_CONTAINER, OUString(), -- cgit From bf176d11892d6ebe949c3c73841800f3a0c8a0d6 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Wed, 31 Oct 2012 12:07:17 +0100 Subject: fix build with system poppler-0.21.0 UTF8.h is split and renamed to UTF.h Change-Id: I3c0c271324f79189aa2d10b9f159d2cb5743eb64 --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sdext') diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index e6bc7610d431..77a9aa6ba840 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -34,7 +34,11 @@ #pragma warning(push, 1) #endif +#if POPPLER_CHECK_VERSION(0, 21, 0) +#include "UTF.h" +#else #include "UTF8.h" +#endif #if defined __SUNPRO_CC #pragma enable_warn -- cgit From 0ac9a10d312dc8f12a74720ce211823ce4addf7b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 30 Oct 2012 14:02:56 +0200 Subject: fdo#46808, Deprecate configuration::ConfigurationProvider old-style service ...in favor of existing new-style configuration::theDefaultProvider singleton. Theoretically, ConfigurationProvider instances can be created with specific Locale and EnableAsync arguments, but this is hardly used in practice, and thus effectively all uses of the ConfigurationProvider service use the theDefaultProvider instance, anyway. theDefaultProvider is restricted to the XMultiServiceFactory interface, while ConfigurationProvider also makes available XComponent. However, dispose must not be called manually on theDefaultProvider singleton anyway, and calls to add-/removeEventListener are so few (and in dubious code that should better be cleaned up) that requiring an explicit queryInterface does not really hurt there. This commit originated as a patch by Noel Grandin to "Adapt configuration::ConfigurationProvider UNO service to new style [by creating] a merged XConfigurationProvider interface for this service to implement." It was then modified by Stephan Bergmann by deprecating ConfigurationProvider instead of adding XConfigurationProvider and by replacing calls to ConfigurationProvider::create with calls to theDefaultProvider::get. Change-Id: I9c16700afe0faff1ef6f20338a66bd7a9af990bd --- sdext/source/minimizer/configurationaccess.cxx | 49 +++++++++------------- .../presenter/PresenterConfigurationAccess.cxx | 11 ++--- 2 files changed, 24 insertions(+), 36 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index d55cc63a8935..e0ba19b8f708 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -21,6 +21,7 @@ #include "configurationaccess.hxx" #include #include +#include #include #include #include @@ -33,13 +34,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -static const OUString& GetConfigurationProviderServiceName (void) -{ - static const OUString sConfigurationProviderServiceName ( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider")); - return sConfigurationProviderServiceName; -} static const OUString& GetPathToConfigurationRoot (void) { static const OUString sPathToConfigurationRoot ( @@ -328,28 +322,25 @@ Reference< XInterface > ConfigurationAccess::OpenConfiguration( bool bReadOnly ) Reference< XInterface > xRoot; try { - Reference< lang::XMultiServiceFactory > xProvider( mxMSF->getServiceManager()->createInstanceWithContext( GetConfigurationProviderServiceName(), mxMSF ), UNO_QUERY ); - if ( xProvider.is() ) - { - Sequence< Any > aCreationArguments( 2 ); - aCreationArguments[0] = makeAny( PropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ), 0, - makeAny( GetPathToConfigurationRoot() ), - PropertyState_DIRECT_VALUE ) ); - aCreationArguments[1] = makeAny(beans::PropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "lazywrite" ) ), 0, makeAny( true ), - PropertyState_DIRECT_VALUE ) ); - OUString sAccessService; - if ( bReadOnly ) - sAccessService = OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationAccess" ) ); - else - sAccessService = OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationUpdateAccess" ) ); - - xRoot = xProvider->createInstanceWithArguments( - sAccessService, aCreationArguments ); - } + Reference< lang::XMultiServiceFactory > xProvider = configuration::theDefaultProvider::get( mxMSF ); + Sequence< Any > aCreationArguments( 2 ); + aCreationArguments[0] = makeAny( PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ), 0, + makeAny( GetPathToConfigurationRoot() ), + PropertyState_DIRECT_VALUE ) ); + aCreationArguments[1] = makeAny(beans::PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "lazywrite" ) ), 0, makeAny( true ), + PropertyState_DIRECT_VALUE ) ); + OUString sAccessService; + if ( bReadOnly ) + sAccessService = OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" ) ); + else + sAccessService = OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationUpdateAccess" ) ); + + xRoot = xProvider->createInstanceWithArguments( + sAccessService, aCreationArguments ); } catch (const Exception&) { diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx index e321b71215a5..2ae90dc1085a 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.cxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include using namespace ::com::sun::star; @@ -44,8 +45,7 @@ PresenterConfigurationAccess::PresenterConfigurationAccess ( { try { - Reference xFactory (rxContext->getServiceManager()); - if (xFactory.is()) + if (rxContext.is()) { Sequence aCreationArguments(3); aCreationArguments[0] = makeAny(beans::PropertyValue( @@ -70,11 +70,8 @@ PresenterConfigurationAccess::PresenterConfigurationAccess ( else sAccessService = A2S("com.sun.star.configuration.ConfigurationUpdateAccess"); - Reference xProvider ( - xFactory->createInstanceWithContext( - A2S("com.sun.star.configuration.ConfigurationProvider"), - rxContext), - UNO_QUERY_THROW); + Reference xProvider = + configuration::theDefaultProvider::get( rxContext ); mxRoot = xProvider->createInstanceWithArguments( sAccessService, aCreationArguments); maNode <<= mxRoot; -- cgit From bb6a12caede53029ecb99810f2f58daae4e11af7 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 31 Oct 2012 18:00:18 +0100 Subject: fix sdext build with poppler >= 0.19.x Change-Id: I655e8e15c7f7a8c292b3a1820ee48c29e847d05a --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 +++- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 77a9aa6ba840..7adc48718d28 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -489,7 +489,9 @@ void PDFOutDev::endPage() printf("endPage\n"); } -#if POPPLER_CHECK_VERSION(0, 17, 0) +#if POPPLER_CHECK_VERSION(0, 19, 0) +void PDFOutDev::processLink(AnnotLink *link) +#elif POPPLER_CHECK_VERSION(0, 17, 0) void PDFOutDev::processLink(AnnotLink *link, Catalog *) #else void PDFOutDev::processLink(Link* link, Catalog*) diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index 0a19b9a34b97..e5e48fc8a1a0 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -189,10 +189,12 @@ namespace pdfi // virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy); // virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy); - #if POPPLER_CHECK_VERSION(0, 17, 0) - virtual void processLink(AnnotLink *link, Catalog *catalog); - #else //----- link borders + #if POPPLER_CHECK_VERSION(0, 19, 0) + virtual void processLink(AnnotLink *link); + #elif POPPLER_CHECK_VERSION(0, 17, 0) + virtual void processLink(AnnotLink *link, Catalog *catalog); + #else virtual void processLink(Link *link, Catalog *catalog); #endif -- cgit From f09e4ae2737acb4b3e309e7342162439904939a1 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 27 Oct 2012 16:57:10 +0200 Subject: add missing deps on sal headers Change-Id: I815ef8abaf4cd998e7b91fbadad56ddf0a7087ba --- sdext/Executable_xpdfimport.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sdext') diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk index 566baf76f1ee..f333ef9d6bce 100644 --- a/sdext/Executable_xpdfimport.mk +++ b/sdext/Executable_xpdfimport.mk @@ -27,6 +27,11 @@ $(eval $(call gb_Executable_Executable,xpdfimport)) +$(eval $(call gb_Executable_use_packages,xpdfimport,\ + sal_generated \ + sal_inc \ +)) + $(eval $(call gb_Executable_use_externals,xpdfimport,\ poppler \ zlib \ -- cgit From 0666e43c45876199ddc71e378554878cca6f0539 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 2 Nov 2012 15:13:28 +0200 Subject: fdo#46808, use service constructor for i18n::CharacterClassification Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76 --- sdext/source/pdfimport/tree/drawtreevisiting.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 4333dabab350..4a8e6a9d985f 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -30,6 +30,7 @@ #include "basegfx/range/b2drange.hxx" #include "com/sun/star/i18n/BreakIterator.hpp" +#include "com/sun/star/i18n/CharacterClassification.hpp" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "comphelper/processfactory.hxx" #include "com/sun/star/i18n/ScriptType.hpp" @@ -56,14 +57,12 @@ const Reference< XBreakIterator >& DrawXmlOptimizer::GetBreakIterator() return mxBreakIter; } -const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification >& DrawXmlEmitter::GetCharacterClassification() +const Reference< XCharacterClassification >& DrawXmlEmitter::GetCharacterClassification() { if ( !mxCharClass.is() ) { Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW ); - Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString("com.sun.star.i18n.CharacterClassification"), xContext); - mxCharClass = uno::Reference< i18n::XCharacterClassification >( xInterface, uno::UNO_QUERY ); + mxCharClass = CharacterClassification::create(xContext); } return mxCharClass; } -- cgit From 26364f4fd346c36f2c3ba4c2228d62de845fe13e Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sat, 10 Nov 2012 10:48:15 +0100 Subject: deduplicate OString std::basic_ostream operators I wanted to add one, based on OUString one, and Stephan on IRC agreed it's a good idea. Then it turned out we already had it in sal unit tests, sdext and unodevtools as well. Get rid of all these, and have a single implementation in string.hxx, so it can be used everywhere. Change-Id: Ibb820f20a138d055fd87036253c627fb862a31fe --- sdext/source/pdfimport/test/tests.cxx | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index a452ba0b4828..547561916352 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -72,16 +72,6 @@ using namespace ::pdfparse; using namespace ::pdfi; using namespace ::com::sun::star; -namespace rtl -{ - template< typename charT, typename traits > std::basic_ostream & - operator <<( - std::basic_ostream & stream, rtl::OString const & string) - { - return stream << string.getStr(); - } -} - namespace { -- cgit