svx/source/unodraw/unoshtxt.cxx |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit 28852149cbd7df2e9f11243b3fe25ad09d8816bd
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Jan 15 17:33:54 2018 +0000

    don't bother hyphenating while fuzzing
    
    Change-Id: I6b590998ed68d11681063b0c0f4655f501735794
    Reviewed-on: https://gerrit.libreoffice.org/47919
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

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 );
+            }
         }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to