Author: hdu
Date: Fri Aug 2 07:59:30 2013
New Revision: 1509576
URL: http://svn.apache.org/r1509576
Log:
#i122885# handle SmartTag related exceptions gracefully
and support diagnostics by providing exception details to stderr
Modified:
openoffice/trunk/main/sw/source/core/layout/layact.cxx
Modified: openoffice/trunk/main/sw/source/core/layout/layact.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/layact.cxx?rev=1509576&r1=1509575&r2=1509576&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/layact.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/layact.cxx Fri Aug 2 07:59:30
2013
@@ -2218,12 +2218,17 @@ sal_Bool SwLayIdle::_DoIdleJob( const Sw
}
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;