Kaydet (Commit) 76f5ce40 authored tarafından Matúš Kukan's avatar Matúš Kukan

more similar handling of InputSequenceChecker as in other places

Change-Id: Ia6efc0eda03dac87c73e720d08f320ce3fc6ce4a
üst 5d0638af
......@@ -86,6 +86,8 @@ private:
Link maUpdateDataHdl;
Link maAutocompleteHdl;
css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > mxISC;
DECL_DLLPRIVATE_LINK( ImplUpdateDataHdl, void* );
SAL_DLLPRIVATE bool ImplTruncateToMaxLen( OUString&, sal_Int32 nSelectionLen ) const;
......@@ -112,7 +114,7 @@ private:
SAL_DLLPRIVATE void ImplCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard );
SAL_DLLPRIVATE void ImplPaste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard );
SAL_DLLPRIVATE long ImplGetTextYPosition() const;
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > ImplGetInputSequenceChecker() const;
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > ImplGetInputSequenceChecker();
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > ImplGetBreakIterator() const;
protected:
......
......@@ -104,6 +104,7 @@ private:
::com::sun::star::lang::Locale maLocale;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIterator;
css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > mxISC;
Rectangle maInvalidRect;
Range maInvalidRange;
......@@ -159,7 +160,7 @@ protected:
// gets not exported. First and seconf parameter swapped to have a different signatur.
SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, sal_Bool bOverwrite = sal_False, sal_Bool bIsUserInput = sal_False );
// some other new functions needed that must not be exported to remain compatible
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > GetInputSequenceChecker() const;
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > GetInputSequenceChecker();
SAL_DLLPRIVATE sal_Bool IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const;
// broadcast or adjust selections
......
......@@ -834,18 +834,14 @@ uno::Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const
}
// -----------------------------------------------------------------------
uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker() const
uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker()
{
//!! since we don't want to become incompatible in the next minor update
//!! where this code will get integrated into, xISC will be a local
//!! variable instead of a class member!
uno::Reference < i18n::XExtendedInputSequenceChecker > xISC;
// if ( !xISC.is() )
if ( !mxISC.is() )
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
xISC = i18n::InputSequenceChecker::create(xContext);
mxISC = i18n::InputSequenceChecker::create(
::comphelper::getProcessComponentContext() );
}
return xISC;
return mxISC;
}
// -----------------------------------------------------------------------
......
......@@ -628,15 +628,14 @@ void TextEngine::ImpRemoveParagraph( sal_uLong nPara )
ImpParagraphRemoved( nPara );
}
uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSequenceChecker() const
uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSequenceChecker()
{
uno::Reference < i18n::XExtendedInputSequenceChecker > xISC;
// if ( !xISC.is() )
if ( !mxISC.is() )
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
xISC = i18n::InputSequenceChecker::create(xContext);
mxISC = i18n::InputSequenceChecker::create(
::comphelper::getProcessComponentContext() );
}
return xISC;
return mxISC;
}
sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
......
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