incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1352098 - /incubator/ooo/trunk/main/sfx2/source/doc/objcont.cxx
Date Wed, 20 Jun 2012 13:40:55 GMT
Author: alg
Date: Wed Jun 20 13:40:55 2012
New Revision: 1352098

URL: http://svn.apache.org/viewvc?rev=1352098&view=rev
Log:
#120038# Fixed memory leak, Patch by: Chao Huang, Review by: alg

Modified:
    incubator/ooo/trunk/main/sfx2/source/doc/objcont.cxx

Modified: incubator/ooo/trunk/main/sfx2/source/doc/objcont.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/doc/objcont.cxx?rev=1352098&r1=1352097&r2=1352098&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/source/doc/objcont.cxx (original)
+++ incubator/ooo/trunk/main/sfx2/source/doc/objcont.cxx Wed Jun 20 13:40:55 2012
@@ -166,10 +166,12 @@ SfxObjectShell::CreatePreviewMetaFile_Im
     pFile->Record( &aDevice );
 
     LanguageType eLang;
-    SvtCTLOptions*  pCTLOptions = new SvtCTLOptions;
-    if ( SvtCTLOptions::NUMERALS_HINDI == pCTLOptions->GetCTLTextNumerals() )
+    // #120038# use local incarnation, so deletion cannot be forgotten
+    const SvtCTLOptions aCTLOptions;
+
+    if ( SvtCTLOptions::NUMERALS_HINDI == aCTLOptions.GetCTLTextNumerals() )
         eLang = LANGUAGE_ARABIC_SAUDI_ARABIA;
-    else if ( SvtCTLOptions::NUMERALS_ARABIC == pCTLOptions->GetCTLTextNumerals() )
+    else if ( SvtCTLOptions::NUMERALS_ARABIC == aCTLOptions.GetCTLTextNumerals() )
         eLang = LANGUAGE_ENGLISH;
     else
         eLang = (LanguageType) Application::GetSettings().GetLanguage();



Mime
View raw message