[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

Herbert Dürr hdu at apache.org
Fri Aug 2 01:12:10 PDT 2013


 sw/source/core/layout/layact.cxx |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 7334341e5986b7685866a836195fd6d189293cab
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Aug 2 07:59:30 2013 +0000

    #i122885# handle SmartTag related exceptions gracefully
    
    and support diagnostics by providing exception details to stderr

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 84dc484..83cf9a7 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2218,12 +2218,17 @@ sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
             }
             case SMART_TAGS : // SMARTTAGS
             {
-                const SwRect aRepaint( ((SwTxtFrm*)pCnt)->SmartTagScan( pCntntNode, nTxtPos ) );
-                bPageValid = bPageValid && !pTxtNode->IsSmartTagDirty();
-                if( !bPageValid )
-                    bAllValid = sal_False;
-                if ( aRepaint.HasArea() )
-                    pImp->GetShell()->InvalidateWindows( aRepaint );
+                try {
+                    const SwRect aRepaint( ((SwTxtFrm*)pCnt)->SmartTagScan( pCntntNode, nTxtPos ) );
+                    bPageValid = bPageValid && !pTxtNode->IsSmartTagDirty();
+                    if( !bPageValid )
+                        bAllValid = sal_False;
+                    if ( aRepaint.HasArea() )
+                        pImp->GetShell()->InvalidateWindows( aRepaint );
+                } catch( const ::com::sun::star::uno::RuntimeException& e) {
+                    // #i122885# handle smarttag problems gracefully and provide diagnostics
+                    fprintf( stderr, "SMART_TAGS Exception: %s\n", rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+                }
                 if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
                     return sal_True;
                 break;


More information about the Libreoffice-commits mailing list