summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlwrap.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-08 12:59:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-08 13:08:29 +0100
commit371727c78fdfd80b4d4ec33dc2129da96c38e777 (patch)
treeb0d3b3399706b800fbc9ec2f1a65352ab388a117 /sc/source/filter/xml/xmlwrap.cxx
parent28f5f06d7099f0d634ac3e7f48c993e7c1116c1d (diff)
DynamicErrorInfo objects must be allocated on the heap
cf. "delete pInfo;" in ErrorHandler::HandleError_Impl (tools/source/ref/errinf.cxx). This reverts the remaining (non UNO related) changes from e48d47469508dee55ae6abcb3988222b5612e1e9 "fix some memory leaks in sc" and 5ea7e74c29f7279b6c31d38185ace576f68f4fb2 "fix some memory leaks in sd" that had not already been reverted. Whether any of these instantiations are really leaked (i.e., never deleted again in calls to ErrorHandler::HandleError_Impl) is unclear to me, but that would need to be fixed in a different way. Change-Id: I6d9e7a2f6fce6d6a4d5d390c09a5a12f593028a6
Diffstat (limited to 'sc/source/filter/xml/xmlwrap.cxx')
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 439e5e6d0bbf..5913788f986a 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -219,7 +219,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
if( !sDocName.isEmpty() )
{
- nReturn = TwoStringErrorInfo(
+ nReturn = *new TwoStringErrorInfo(
(bMustBeSuccessfull ? SCERR_IMPORT_FILE_ROWCOL
: SCWARN_IMPORT_FILE_ROWCOL),
sDocName, sErr,
@@ -228,7 +228,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
else
{
OSL_ENSURE( bMustBeSuccessfull, "Warnings are not supported" );
- nReturn = StringErrorInfo( SCERR_IMPORT_FORMAT_ROWCOL, sErr,
+ nReturn = *new StringErrorInfo( SCERR_IMPORT_FORMAT_ROWCOL, sErr,
ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR );
}
}