[Libreoffice-commits] .: 2 commits - binfilter/bf_xmloff unoxml/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jan 18 04:10:40 PST 2011
binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx | 10 +++-------
unoxml/source/dom/documentbuilder.cxx | 8 ++++----
2 files changed, 7 insertions(+), 11 deletions(-)
New commits:
commit e7473329c8d79ba3988aa07172290beedcaaf325
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 18 12:10:32 2011 +0000
free ctxt *after* taking lastError details
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index bcce353..9e052c3 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -314,13 +314,13 @@ namespace DOM
} // extern "C"
- void throwEx(xmlParserCtxtPtr ctxt) {
- OUString msg = make_error_message(ctxt);
- xmlFreeParserCtxt(ctxt);
+ void throwEx(xmlParserCtxtPtr ctxt)
+ {
com::sun::star::xml::sax::SAXParseException saxex;
- saxex.Message = msg;
+ saxex.Message = make_error_message(ctxt);
saxex.LineNumber = static_cast<sal_Int32>(ctxt->lastError.line);
saxex.ColumnNumber = static_cast<sal_Int32>(ctxt->lastError.int2);
+ xmlFreeParserCtxt(ctxt);
throw saxex;
}
commit 8071b4269a690a64dd17e77a0358239a9c36ca60
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 18 10:59:43 2011 +0000
Use the foolproof checked macro for this
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
index ec498d7..6dbf0e7 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
@@ -2836,22 +2836,18 @@ void XMLMacroFieldImportContext::PrepareField(
Sequence<PropertyValue> aValues;
pEvents->GetEventSequence( sOnClick, aValues );
- const PropertyValue* pValues = aValues.getConstArray();
sal_Int32 nLength = aValues.getLength();
for( sal_Int32 i = 0; i < nLength; i++ )
{
- if ( aValues[i].Name.equalsAsciiL( "ScriptType",
- sizeof("ScriptType")-1 ) )
+ if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ScriptType")) )
{
// ignore ScriptType
}
- else if ( aValues[i].Name.equalsAsciiL( "Library",
- sizeof("Library")-1 ) )
+ else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Library")) )
{
aValues[i].Value >>= sLibraryName;
}
- else if ( aValues[i].Name.equalsAsciiL( "MacroName",
- sizeof("MacroName")-1 ) )
+ else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MacroName")) )
{
aValues[i].Value >>= sMacroName;
}
More information about the Libreoffice-commits
mailing list