diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-01-08 12:59:15 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-01-08 13:08:29 +0100 |
commit | 371727c78fdfd80b4d4ec33dc2129da96c38e777 (patch) | |
tree | b0d3b3399706b800fbc9ec2f1a65352ab388a117 /sd | |
parent | 28f5f06d7099f0d634ac3e7f48c993e7c1116c1d (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 'sd')
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 285af4395616..4020a628889e 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -282,7 +282,7 @@ sal_Int32 ReadThroughComponent( if( rStreamName.Len() ) { - return TwoStringErrorInfo( + return *new TwoStringErrorInfo( (bMustBeSuccessfull ? ERR_FORMAT_FILE_ROWCOL : WARN_FORMAT_FILE_ROWCOL), rStreamName, sErr, @@ -291,7 +291,7 @@ sal_Int32 ReadThroughComponent( else { DBG_ASSERT( bMustBeSuccessfull, "Warnings are not supported" ); - return StringErrorInfo( ERR_FORMAT_ROWCOL, sErr, + return *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); } } |