summaryrefslogtreecommitdiff
path: root/vcl/source/control/edit.cxx
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 /vcl/source/control/edit.cxx
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>
Diffstat (limited to 'vcl/source/control/edit.cxx')
-rw-r--r--vcl/source/control/edit.cxx19
1 files changed, 7 insertions, 12 deletions
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;
}