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,\
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 \
......
......@@ -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;
}; }; }; };
......
......@@ -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");
......
......@@ -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();
......
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