summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-15 17:33:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-16 09:56:57 +0100
commit28852149cbd7df2e9f11243b3fe25ad09d8816bd (patch)
tree719162f45d3ff15944283c391eb60807cefd9d55 /svx
parent2d120265135748f286992ec1300fd016eb3ee878 (diff)
don't bother hyphenating while fuzzing
Change-Id: I6b590998ed68d11681063b0c0f4655f501735794 Reviewed-on: https://gerrit.libreoffice.org/47919 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unoshtxt.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 1a36a3ece2a1..f0047d0aeb83 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -49,6 +49,7 @@
#include <svx/svdotable.hxx>
#include <cell.hxx>
#include <svx/sdrpaintwindow.hxx>
+#include <unotools/configmgr.hxx>
// SvxTextEditSourceImpl
@@ -579,15 +580,18 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
const_cast<EditEngine*>(&(mpOutliner->GetEditEngine()))->EnableUndo( false );
}
- if ( !m_xLinguServiceManager.is() )
+ if (!utl::ConfigManager::IsFuzzing())
{
- css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- m_xLinguServiceManager.set(css::linguistic2::LinguServiceManager::create(xContext));
- }
+ if ( !m_xLinguServiceManager.is() )
+ {
+ css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ m_xLinguServiceManager.set(css::linguistic2::LinguServiceManager::create(xContext));
+ }
- css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator( m_xLinguServiceManager->getHyphenator(), css::uno::UNO_QUERY );
- if( xHyphenator.is() )
- mpOutliner->SetHyphenator( xHyphenator );
+ css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator( m_xLinguServiceManager->getHyphenator(), css::uno::UNO_QUERY );
+ if( xHyphenator.is() )
+ mpOutliner->SetHyphenator( xHyphenator );
+ }
}