fdo#46808, convert i18n::InputSequenceChecker to new-style

Change-Id: I29678d74ae3c6dc38d3d09e2cf4a0d4f28f789a1
This commit is contained in:
Noel Grandin 2013-02-11 09:21:50 +02:00
parent 98fa4be442
commit e2ab5539a4
8 changed files with 15 additions and 42 deletions

View File

@ -63,6 +63,7 @@
#include <vcl/metric.hxx>
#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/InputSequenceChecker.hpp>
#include <com/sun/star/text/CharacterCompressionType.hpp>
#include <vcl/pdfextoutdevdata.hxx>
#include <i18npool/mslangid.hxx>
@ -4344,13 +4345,8 @@ Reference < i18n::XExtendedInputSequenceChecker > ImpEditEngine::ImplGetInputSeq
{
if ( !xISC.is() )
{
Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference < XInterface > xI = xMSF->createInstance( OUString( "com.sun.star.i18n.InputSequenceChecker" ) );
if ( xI.is() )
{
Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XExtendedInputSequenceChecker >*)0) );
x >>= xISC;
}
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
xISC = i18n::InputSequenceChecker::create( xContext );
}
return xISC;
}

View File

@ -123,8 +123,7 @@ InputSequenceCheckerImpl::getInputSequenceChecker(sal_Char* rLanguage) throw (Ru
m_xContext);
if ( xI.is() ) {
Reference< XExtendedInputSequenceChecker > xISC;
xI->queryInterface( getCppuType((const Reference< XExtendedInputSequenceChecker>*)0) ) >>= xISC;
Reference< XExtendedInputSequenceChecker > xISC( xI, uno::UNO_QUERY );
if (xISC.is()) {
lookupTable.push_back(cachedItem = new lookupTableItem(rLanguage, xISC));
return cachedItem->xISC;

View File

@ -170,6 +170,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
BreakIterator \
CharacterClassification \
Collator \
InputSequenceChecker \
LocaleCalendar \
LocaleData \
NativeNumberSupplier \
@ -893,7 +894,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/graphic
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\
ChapterCollator \
IndexEntrySupplier \
InputSequenceChecker \
OrdinalSuffix \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\

View File

@ -30,12 +30,7 @@ module com { module sun { module star { module i18n {
@since OOo 1.1.2
*/
published service InputSequenceChecker
{
interface com::sun::star::i18n::XInputSequenceChecker;
[optional] interface com::sun::star::i18n::XExtendedInputSequenceChecker;
};
published service InputSequenceChecker : XExtendedInputSequenceChecker;
}; }; }; };

Binary file not shown.

View File

@ -19,22 +19,15 @@
#include <checkit.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/InputSequenceChecker.hpp>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::i18n;
SwCheckIt::SwCheckIt()
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference < XInterface > xI = xMSF->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.InputSequenceChecker")) );
if ( xI.is() )
{
Any x = xI->queryInterface( ::getCppuType((const Reference< XExtendedInputSequenceChecker >*)0) );
x >>= xCheck;
}
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
xCheck = InputSequenceChecker::create(xContext);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -49,7 +49,7 @@
#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
#include <com/sun/star/i18n/InputSequenceChecker.hpp>
#include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@ -854,13 +854,8 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenc
uno::Reference < i18n::XExtendedInputSequenceChecker > xISC;
// if ( !xISC.is() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
uno::Reference < XInterface > xI = xMSF->createInstance( OUString("com.sun.star.i18n.InputSequenceChecker") );
if ( xI.is() )
{
Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XExtendedInputSequenceChecker >*)0) );
x >>= xISC;
}
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
xISC = i18n::InputSequenceChecker::create(xContext);
}
return xISC;
}

View File

@ -38,7 +38,7 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
#include <com/sun/star/i18n/InputSequenceChecker.hpp>
#include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
@ -637,13 +637,8 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque
uno::Reference < i18n::XExtendedInputSequenceChecker > xISC;
// if ( !xISC.is() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
uno::Reference< uno::XInterface > xI = xMSF->createInstance( OUString( "com.sun.star.i18n.InputSequenceChecker" ) );
if ( xI.is() )
{
Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XExtendedInputSequenceChecker >*)0) );
x >>= xISC;
}
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
xISC = i18n::InputSequenceChecker::create(xContext);
}
return xISC;
}