[Libreoffice-commits] core.git: xmloff/source

Takeshi Abe tabe at fixedpoint.jp
Thu Aug 7 07:28:38 PDT 2014


 xmloff/source/table/XMLTableExport.cxx |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 248437e4fd0cbc0cc18c802a202c290644176faf
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Aug 7 23:16:16 2014 +0900

    fdo#75757: remove inheritance to std::map
    
    Change-Id: I2fd0b43c62c331d866d697c94dd57d17f903111b
    Reviewed-on: https://gerrit.libreoffice.org/10810
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 7c5631d..a102b79 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -87,21 +87,24 @@ const XMLPropertyMapEntry* getRowPropertiesMap()
     return &aXMLRowProperties[0];
 }
 
-class StringStatisticHelper : public std::map< OUString, sal_Int32 >
+class StringStatisticHelper
 {
+private:
+    std::map< OUString, sal_Int32 > mStats;
+
 public:
     void add( const OUString& rStyleName );
-    void clear() { std::map< OUString, sal_Int32 >::clear(); }
+    void clear() { mStats.clear(); }
 
     sal_Int32 getModeString( /* out */ OUString& rModeString );
 };
 
 void StringStatisticHelper::add( const OUString& rStyleName )
 {
-    std::map< OUString, sal_Int32 >::iterator iter( find( rStyleName ) );
-    if( iter == end() )
+    std::map< OUString, sal_Int32 >::iterator iter( mStats.find( rStyleName ) );
+    if( iter == mStats.end() )
     {
-        (*this)[rStyleName] = 1;
+        mStats[rStyleName] = 1;
     }
     else
     {
@@ -112,8 +115,8 @@ void StringStatisticHelper::add( const OUString& rStyleName )
 sal_Int32 StringStatisticHelper::getModeString( OUString& rStyleName )
 {
     sal_Int32 nMax = 0;
-    const std::map< OUString, sal_Int32 >::const_iterator aEnd( end() );
-    for( std::map< OUString, sal_Int32 >::iterator iter( begin() );
+    const std::map< OUString, sal_Int32 >::const_iterator aEnd( mStats.end() );
+    for( std::map< OUString, sal_Int32 >::iterator iter( mStats.begin() );
         iter != aEnd; ++iter)
     {
         if( (*iter).second > nMax )


More information about the Libreoffice-commits mailing list