[Libreoffice-commits] .: sw/source

August Sodora augsod at kemper.freedesktop.org
Fri Jan 13 20:02:13 PST 2012


 sw/source/filter/html/htmlfly.cxx |    7 +++----
 sw/source/filter/html/wrthtml.cxx |    4 ++--
 sw/source/filter/html/wrthtml.hxx |    2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 900e35045fee950f3f7d10f9fe863d0f51854699
Author: August Sodora <augsod at gmail.com>
Date:   Fri Jan 13 23:01:33 2012 -0500

    SvStringsDtor->std::vector

diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 46dc171..7742f20 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -885,11 +885,11 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
         do
         {
             bFound = sal_False;
-            for( sal_uInt16 i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
+            for(size_t i = 0; i < rHTMLWrt.aImgMapNames.size(); ++i)
             {
                 // TODO: Unicode: Comparison is case insensitive for ASCII
                 // characters only now!
-                if( aIMapName.EqualsIgnoreCaseAscii(*rHTMLWrt.aImgMapNames[i]) )
+                if( aIMapName.EqualsIgnoreCaseAscii(rHTMLWrt.aImgMapNames[i]) )
                 {
                     bFound = sal_True;
                     break;
@@ -944,8 +944,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
             }
         }
 
-        rHTMLWrt.aImgMapNames.Insert( new String(aIMapName),
-                                          rHTMLWrt.aImgMapNames.Count() );
+        rHTMLWrt.aImgMapNames.push_back(aIMapName);
 
         rtl::OString aIndMap, aIndArea;
         const sal_Char *pLF = 0, *pIndArea = 0, *pIndMap = 0;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 40d26c6..32c2611 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -392,8 +392,8 @@ sal_uLong SwHTMLWriter::WriteStream()
     if( aTxtCollInfos.Count() )
         aTxtCollInfos.DeleteAndDestroy( sal_uInt16(0), aTxtCollInfos.Count() );
 
-    if( aImgMapNames.Count() )
-        aImgMapNames.DeleteAndDestroy( sal_uInt16(0), aImgMapNames.Count() );
+    if(!aImgMapNames.empty())
+        aImgMapNames.clear();
 
     aImplicitMarks.clear();
 
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 71082c7..4ceb9b5 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -224,7 +224,7 @@ public:
     static const sal_Char sNewLine[];   // \015\012
 #endif
 
-    SvStringsDtor aImgMapNames;     // geschriebene Image Maps
+    std::vector<String> aImgMapNames;     // geschriebene Image Maps
     std::set<String> aImplicitMarks;// implizite Stprungmarken
     std::set<String> aNumRuleNames;// Names of exported num rules
     std::set<String> aScriptParaStyles;// script dependent para styles


More information about the Libreoffice-commits mailing list