Kaydet (Commit) d93543f4 authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert i18n::IndexEntrySupplier to new style

Change-Id: I673de5bea83f8c6d993757cbd5ae996d2b8e9e84
üst 8d83827d
...@@ -181,6 +181,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\ ...@@ -181,6 +181,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
BreakIterator \ BreakIterator \
CharacterClassification \ CharacterClassification \
Collator \ Collator \
IndexEntrySupplier \
InputSequenceChecker \ InputSequenceChecker \
LocaleCalendar \ LocaleCalendar \
LocaleData \ LocaleData \
...@@ -915,7 +916,6 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/grap ...@@ -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,\ $(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\
ChapterCollator \ ChapterCollator \
IndexEntrySupplier \
)) ))
$(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\ $(eval $(call gb_ZipUnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\
ImageMap \ ImageMap \
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef __com_sun_star_i18n_IndexEntrySupplier_idl__ #ifndef __com_sun_star_i18n_IndexEntrySupplier_idl__
#define __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> #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.idl>
...@@ -28,12 +27,7 @@ module com { module sun { module star { module i18n { ...@@ -28,12 +27,7 @@ module com { module sun { module star { module i18n {
/// Supplier for creating index entries in a "table of alphabetical index" /// Supplier for creating index entries in a "table of alphabetical index"
published service IndexEntrySupplier published service IndexEntrySupplier : XExtendedIndexEntrySupplier;
{
interface com::sun::star::i18n::XIndexEntrySupplier;
[optional] interface com::sun::star::i18n::XExtendedIndexEntrySupplier;
};
}; }; }; }; }; }; }; };
......
...@@ -19,36 +19,23 @@ ...@@ -19,36 +19,23 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp> #include <com/sun/star/i18n/IndexEntrySupplier.hpp>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <tools/string.hxx> #include <tools/string.hxx>
#include <toxwrap.hxx> #include <toxwrap.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star; using namespace ::com::sun::star;
IndexEntrySupplierWrapper::IndexEntrySupplierWrapper() IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
{ {
uno::Reference< uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
lang::XMultiServiceFactory > rxMSF =
::comphelper::getProcessServiceFactory();
try { try {
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xI = xIES = i18n::IndexEntrySupplier::create(xContext);
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;
}
} }
catch (const ::com::sun::star::uno::Exception& catch (const uno::Exception& e)
#if OSL_DEBUG_LEVEL > 0
e
#endif
)
{ {
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
rtl::OStringBuffer aMsg("IndexEntrySupplierWrapper: Caught exception\n"); rtl::OStringBuffer aMsg("IndexEntrySupplierWrapper: Caught exception\n");
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/IndexEntrySupplier.hpp>
#include <svl/stritem.hxx> #include <svl/stritem.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx> #include <sfx2/dispatch.hxx>
...@@ -125,12 +126,9 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, sal_Bool bNewDlg, ...@@ -125,12 +126,9 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, sal_Bool bNewDlg,
if (SvtCJKOptions().IsCJKFontEnabled()) if (SvtCJKOptions().IsCJKFontEnabled())
{ {
uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); uno::Reference< uno::XComponentContext > xContext = getProcessComponentContext();
xExtendedIndexEntrySupplier = xExtendedIndexEntrySupplier = i18n::IndexEntrySupplier::create(xContext);
uno::Reference< i18n::XExtendedIndexEntrySupplier > (
xMSF->createInstance( "com.sun.star.i18n.IndexEntrySupplier"),
uno::UNO_QUERY );
m_pPhoneticFT0->Show(); m_pPhoneticFT0->Show();
m_pPhoneticED0->Show(); m_pPhoneticED0->Show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment