diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2003-04-08 14:40:45 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2003-04-08 14:40:45 +0000 |
commit | e26bb476dbb3578170f5ed1ac7eb7dd918f62589 (patch) | |
tree | 9b20dd9772e5b76d866ea1b9e609e9f67f777890 | |
parent | d58fe88f3568b46f42af098131b08973bafab6d6 (diff) |
INTEGRATION: CWS draw8 (1.5.54); FILE MERGED
2003/03/12 15:39:26 sj 1.5.54.2: #108172# removing assertion if exporting text
2003/03/12 14:54:18 sj 1.5.54.1: #i12113# catching exceptions if exporting invalid characters
-rw-r--r-- | extensions/source/svg/svgaction.cxx | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx index b9b8c6784f93..83d69ca2cfa5 100644 --- a/extensions/source/svg/svgaction.cxx +++ b/extensions/source/svg/svgaction.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svgaction.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: ka $ $Date: 2002-07-26 11:05:57 $ + * last change: $Author: rt $ $Date: 2003-04-08 15:40:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -925,8 +925,18 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y(), mbDoublePoints ) ); { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, TRUE, TRUE ); - mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); + try + { + try + { + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, TRUE, TRUE ); + mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); + } + catch( ::com::sun::star::xml::sax::SAXException& ) + { + // string seems to contain invalid characters + } + } } } else @@ -935,8 +945,15 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aPt.X(), mbDoublePoints ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y(), mbDoublePoints ) ); - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); - mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); + try + { + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); + mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); + } + catch( ::com::sun::star::xml::sax::SAXException& ) + { + // string seems to contain invalid characters + } } #ifndef _SVG_USE_NATIVE_TEXTDECORATION @@ -1456,14 +1473,19 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_MASKSCALEPART_ACTION ): case( META_WALLPAPER_ACTION ): case( META_TEXTLINE_ACTION ): + case( META_LAYOUTMODE_ACTION ): { // !!! >>> we don't want to support these actions } break; - default: - DBG_ERROR( "SVGActionWriter::ImplWriteActions: unsupported MetaAction #" ); +#ifdef DBG_UTIL + default : + ByteString aDbgOut( "SVGActionWriter::ImplWriteActions: unsupported MetaAction #" ); + aDbgOut.Append( ByteString::CreateFromInt32( nType ) ); + DBG_ERROR( aDbgOut.GetBuffer() ); break; +#endif } } |