summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-09 09:27:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-09 11:27:56 +0100
commit8f32509ee51a4985d17b65d6c6540081471951e7 (patch)
tree136fa6632f2c285702cb1911d900b32e8dd16919
parent46a07f2042a812fc552e26736183c7d06fe6aa35 (diff)
no longer have to worry about intra-module compatibility
in 'the next minor update' Change-Id: I1faffbbdf6d3bb538737568931d9053c4ec6bd11 Reviewed-on: https://gerrit.libreoffice.org/84731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/vcl/edit.hxx5
-rw-r--r--vcl/source/control/edit.cxx19
2 files changed, 10 insertions, 14 deletions
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 5958f124ae51..3d4d8a790aa4 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -87,6 +87,7 @@ private:
Link<Edit&,bool> maActivateHdl;
std::unique_ptr<VclBuilder> mpUIBuilder;
+ css::uno::Reference<css::i18n::XBreakIterator> mxBreakIterator;
css::uno::Reference<css::i18n::XExtendedInputSequenceChecker> mxISC;
SAL_DLLPRIVATE bool ImplTruncateToMaxLen( OUString&, sal_Int32 nSelectionLen ) const;
@@ -113,8 +114,8 @@ private:
SAL_DLLPRIVATE void ImplCopy(css::uno::Reference<css::datatransfer::clipboard::XClipboard> const & rxClipboard);
SAL_DLLPRIVATE void ImplPaste(css::uno::Reference<css::datatransfer::clipboard::XClipboard> const & rxClipboard);
SAL_DLLPRIVATE long ImplGetTextYPosition() const;
- SAL_DLLPRIVATE css::uno::Reference<css::i18n::XExtendedInputSequenceChecker > const & ImplGetInputSequenceChecker();
- SAL_DLLPRIVATE static css::uno::Reference<css::i18n::XBreakIterator > ImplGetBreakIterator();
+ SAL_DLLPRIVATE css::uno::Reference<css::i18n::XExtendedInputSequenceChecker> const& ImplGetInputSequenceChecker();
+ SAL_DLLPRIVATE css::uno::Reference<css::i18n::XBreakIterator> const& ImplGetBreakIterator();
SAL_DLLPRIVATE void filterText();
protected:
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 6eb9e991a38b..0bd6273670e3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -739,22 +739,17 @@ OUString Edit::ImplGetValidString( const OUString& rString )
return aValidString;
}
-uno::Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator()
+uno::Reference <i18n::XBreakIterator> const& Edit::ImplGetBreakIterator()
{
- //!! 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< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- return i18n::BreakIterator::create(xContext);
+ if (!mxBreakIterator)
+ mxBreakIterator = i18n::BreakIterator::create(::comphelper::getProcessComponentContext());
+ return mxBreakIterator;
}
-uno::Reference < i18n::XExtendedInputSequenceChecker > const & Edit::ImplGetInputSequenceChecker()
+uno::Reference <i18n::XExtendedInputSequenceChecker> const& Edit::ImplGetInputSequenceChecker()
{
- if ( !mxISC.is() )
- {
- mxISC = i18n::InputSequenceChecker::create(
- ::comphelper::getProcessComponentContext() );
- }
+ if (!mxISC.is())
+ mxISC = i18n::InputSequenceChecker::create(::comphelper::getProcessComponentContext());
return mxISC;
}