summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorSascha Ballach <sab@openoffice.org>2001-11-26 06:58:54 +0000
committerSascha Ballach <sab@openoffice.org>2001-11-26 06:58:54 +0000
commit372e3e266f2968a299b391175881375dd1923eef (patch)
tree52719fc10b87b6ad31b67c62602c645023a996d6 /xmloff
parent2692263be9897e581d2dc9a432a6bbcb5e1e46be (diff)
#95130#; catch the SAXInvalidCharacterException in StartElement and Characters and set a warning in the ErrorHandler instead of a Error
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index ee7e08eb0074..a0f8561d73d6 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexp.cxx,v $
*
- * $Revision: 1.93 $
+ * $Revision: 1.94 $
*
- * last change: $Author: dvo $ $Date: 2001-10-30 15:59:24 $
+ * last change: $Author: sab $ $Date: 2001-11-26 07:58:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,6 +87,9 @@
#ifndef _COM_SUN_STAR_DOCUMENT_XBINARYSTREAMRESOLVER_HPP_
#include <com/sun/star/document/XBinaryStreamResolver.hpp>
#endif
+#ifndef _COM_SUN_STAR_XML_SAX_SAXINVALIDCHARACTEREXCEPTION_HPP_
+#include <com/sun/star/xml/sax/SAXInvalidCharacterException.hpp>
+#endif
#ifndef _XMLOFF_ATTRLIST_HXX
#include "attrlist.hxx"
@@ -1632,6 +1635,12 @@ void SvXMLExport::StartElement(const OUString& rName,
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( rName, GetXAttrList() );
}
+ catch ( SAXInvalidCharacterException& e )
+ {
+ Sequence<OUString> aPars(1);
+ aPars[0] = rName;
+ SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL );
+ }
catch ( SAXException& e )
{
Sequence<OUString> aPars(1);
@@ -1651,6 +1660,12 @@ void SvXMLExport::Characters(const ::rtl::OUString& rChars)
{
xHandler->characters(rChars);
}
+ catch ( SAXInvalidCharacterException& e )
+ {
+ Sequence<OUString> aPars(1);
+ aPars[0] = rChars;
+ SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL );
+ }
catch ( SAXException& e )
{
Sequence<OUString> aPars(1);