Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


---
 vcl/source/gdi/cvtsvm.cxx |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)


diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 7d9ec4d..bb5628f 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -29,7 +29,6 @@
 
 #include <algorithm>
 #include <string.h>
-#include <tools/stack.hxx>
 #include <tools/debug.hxx>
 #include <tools/stream.hxx>
 #include <vcl/virdev.hxx>
@@ -530,7 +529,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
     }
 
     LineInfo            aLineInfo( LINE_NONE, 0 );
-    Stack               aLIStack;
+    ::std::stack< LineInfo* > aLIStack;
     VirtualDevice       aFontVDev;
     rtl_TextEncoding    eActualCharSet = osl_getThreadTextEncoding();
     sal_Bool                bFatLine = sal_False;
@@ -1145,7 +1144,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
 
                 case( GDI_PUSH_ACTION ):
                 {
-                    aLIStack.Push( new LineInfo( aLineInfo ) );
+                    aLIStack.push( new LineInfo( aLineInfo ) );
                     rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
 
                     // #106172# Track font relevant data in shadow VDev
@@ -1156,7 +1155,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                 case( GDI_POP_ACTION ):
                 {
 
-                    LineInfo* pLineInfo = (LineInfo*) aLIStack.Pop();
+                    LineInfo* pLineInfo = aLIStack.top();
+                    aLIStack.pop();
 
                     // restore line info
                     if( pLineInfo )
@@ -1353,11 +1353,14 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                     rIStm.SeekRel( nActionSize - 4L );
                 break;
             }
-                }
+        }
 
-        // cleanup push-pop stack if neccessary
-        for( void* pLineInfo = aLIStack.Pop(); pLineInfo; pLineInfo = aLIStack.Pop() )
-            delete (LineInfo*) pLineInfo;
+    // cleanup push-pop stack if neccessary
+    while( !aLIStack.empty() )
+    {
+        delete aLIStack.top();
+        aLIStack.pop();
+    }
 
     rIStm.SetNumberFormatInt( nOldFormat );
 }


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.