diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-06 23:34:38 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-06 23:38:38 +0100 |
commit | e48d47469508dee55ae6abcb3988222b5612e1e9 (patch) | |
tree | eb6fd25a5003f470fbdc33572d38eaa6f7a6cad1 /sc | |
parent | 129e7572849852eb223f6b13bad48b727955af7e (diff) |
fix some memory leaks in sc
Change-Id: I1e3b9a55561f941346cb9f553f960dc2bafbb1b6
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/scdetect.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 5913788f986a..439e5e6d0bbf 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 = *new TwoStringErrorInfo( + nReturn = 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 = *new StringErrorInfo( SCERR_IMPORT_FORMAT_ROWCOL, sErr, + nReturn = StringErrorInfo( SCERR_IMPORT_FORMAT_ROWCOL, sErr, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); } } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index f91007050774..37e5e642c66e 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2293,7 +2293,7 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) aImExport.SetStreamPath( rMed.GetName() ); bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SOT_FORMATSTR_ID_HTML ); if ( bRet && aImExport.GetNonConvertibleChars().Len() ) - SetError( *new StringErrorInfo( + SetError( StringErrorInfo( SCWARN_EXPORT_NONCONVERTIBLE_CHARS, aImExport.GetNonConvertibleChars(), ERRCODE_BUTTON_OK | ERRCODE_MSG_INFO ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 2bfbcb061fc6..af33ea2945fa 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -1156,12 +1156,12 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e } String sPosition( ScAddress( nDocCol, nDocRow, nTab).GetColRowString()); String sEncoding( SvxTextEncodingTable().GetTextString( eCharSet)); - nErr = *new TwoStringErrorInfo( (bEncErr ? SCERR_EXPORT_ENCODING : + nErr = TwoStringErrorInfo( (bEncErr ? SCERR_EXPORT_ENCODING : SCERR_EXPORT_FIELDWIDTH), sPosition, sEncoding, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR); } else if ( !aException.Message.isEmpty() ) - nErr = *new StringErrorInfo( (SCERR_EXPORT_SQLEXCEPTION), aException.Message, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR); + nErr = StringErrorInfo( (SCERR_EXPORT_SQLEXCEPTION), aException.Message, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR); else nErr = SCERR_EXPORT_DATA; } diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index c9d892ffd2d7..9ef418e162ad 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -930,7 +930,7 @@ OUString ScFilterDetect::impl_getStaticImplementationName() /* Helper for registry */ UNOREFERENCE< UNOXINTERFACE > SAL_CALL ScFilterDetect::impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION ) { - return UNOREFERENCE< UNOXINTERFACE >( *new ScFilterDetect( xServiceManager ) ); + return UNOREFERENCE< UNOXINTERFACE >( ScFilterDetect( xServiceManager ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |