diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-19 15:43:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-20 07:32:49 +0200 |
commit | d93543f495b71ddc0536b86a4cc3fb1410418b61 (patch) | |
tree | c4af295eb1e1b7f724ce09f11561aedb1128972f | |
parent | 8d83827d94266a08e999047151d6cd691acc6e46 (diff) |
fdo#46808, Convert i18n::IndexEntrySupplier to new style
Change-Id: I673de5bea83f8c6d993757cbd5ae996d2b8e9e84
-rw-r--r-- | offapi/UnoApi_offapi.mk | 2 | ||||
-rw-r--r-- | offapi/com/sun/star/i18n/IndexEntrySupplier.idl | 8 | ||||
-rw-r--r-- | offapi/type_reference/types.rdb | bin | 7439872 -> 7439872 bytes | |||
-rw-r--r-- | sw/source/core/tox/toxhlp.cxx | 23 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 8 |
5 files changed, 10 insertions, 31 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index a88e7d70da13..4e2d13383509 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -181,6 +181,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\ BreakIterator \ CharacterClassification \ Collator \ + IndexEntrySupplier \ InputSequenceChecker \ LocaleCalendar \ LocaleData \ @@ -915,7 +916,6 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/grap )) $(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\ ChapterCollator \ - IndexEntrySupplier \ )) $(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\ ImageMap \ diff --git a/offapi/com/sun/star/i18n/IndexEntrySupplier.idl b/offapi/com/sun/star/i18n/IndexEntrySupplier.idl index 7b4b1c5f7e60..fa7814f6ddc5 100644 --- a/offapi/com/sun/star/i18n/IndexEntrySupplier.idl +++ b/offapi/com/sun/star/i18n/IndexEntrySupplier.idl @@ -20,7 +20,6 @@ #ifndef __com_sun_star_i18n_IndexEntrySupplier_idl__ #define __com_sun_star_i18n_IndexEntrySupplier_idl__ -#include <com/sun/star/i18n/XIndexEntrySupplier.idl> #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.idl> @@ -28,12 +27,7 @@ module com { module sun { module star { module i18n { /// Supplier for creating index entries in a "table of alphabetical index" -published service IndexEntrySupplier -{ - interface com::sun::star::i18n::XIndexEntrySupplier; - - [optional] interface com::sun::star::i18n::XExtendedIndexEntrySupplier; -}; +published service IndexEntrySupplier : XExtendedIndexEntrySupplier; }; }; }; }; diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb Binary files differindex d98aaadb41d3..fd52d36ff322 100644 --- a/offapi/type_reference/types.rdb +++ b/offapi/type_reference/types.rdb diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx index 226c63e9d67d..5dfc8dc37860 100644 --- a/sw/source/core/tox/toxhlp.cxx +++ b/sw/source/core/tox/toxhlp.cxx @@ -19,36 +19,23 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/processfactory.hxx> -#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp> +#include <com/sun/star/i18n/IndexEntrySupplier.hpp> #include <rtl/strbuf.hxx> #include <tools/string.hxx> #include <toxwrap.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; IndexEntrySupplierWrapper::IndexEntrySupplierWrapper() { - uno::Reference< - lang::XMultiServiceFactory > rxMSF = - ::comphelper::getProcessServiceFactory(); + uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); try { - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xI = - rxMSF->createInstance( ::rtl::OUString( - "com.sun.star.i18n.IndexEntrySupplier") ); - if( xI.is() ) - { - ::com::sun::star::uno::Any x = xI->queryInterface( ::getCppuType( - (const uno::Reference< i18n::XExtendedIndexEntrySupplier>*)0) ); - x >>= xIES; - } + xIES = i18n::IndexEntrySupplier::create(xContext); } - catch (const ::com::sun::star::uno::Exception& -#if OSL_DEBUG_LEVEL > 0 - e -#endif - ) + catch (const uno::Exception& e) { #if OSL_DEBUG_LEVEL > 0 rtl::OStringBuffer aMsg("IndexEntrySupplierWrapper: Caught exception\n"); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 9bfe57e6ec64..d8661ced23d5 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> +#include <com/sun/star/i18n/IndexEntrySupplier.hpp> #include <svl/stritem.hxx> #include <vcl/msgbox.hxx> #include <sfx2/dispatch.hxx> @@ -125,12 +126,9 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, sal_Bool bNewDlg, if (SvtCJKOptions().IsCJKFontEnabled()) { - uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); + uno::Reference< uno::XComponentContext > xContext = getProcessComponentContext(); - xExtendedIndexEntrySupplier = - uno::Reference< i18n::XExtendedIndexEntrySupplier > ( - xMSF->createInstance( "com.sun.star.i18n.IndexEntrySupplier"), - uno::UNO_QUERY ); + xExtendedIndexEntrySupplier = i18n::IndexEntrySupplier::create(xContext); m_pPhoneticFT0->Show(); m_pPhoneticED0->Show(); |