[Libreoffice-commits] .: binfilter/bf_xmloff

Joseph Powers jpowers at kemper.freedesktop.org
Wed Jan 12 22:13:35 PST 2011


 binfilter/bf_xmloff/source/style/impastpl.hxx        |    7 +------
 binfilter/bf_xmloff/source/style/xmloff_impastp1.cxx |   19 ++-----------------
 binfilter/bf_xmloff/source/style/xmloff_impastp4.cxx |   13 -------------
 3 files changed, 3 insertions(+), 36 deletions(-)

New commits:
commit c3f1fe64897de1818b8df43a88e0b584e54e7e50
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Wed Jan 12 22:13:30 2011 -0800

    Remove DECLARE_LIST( SvXMLAutoStylePoolCache_Impl, OUStringPtr )
    
    Actually, we only add items and remove items and never use items... so I'm
    just deleting it.

diff --git a/binfilter/bf_xmloff/source/style/impastpl.hxx b/binfilter/bf_xmloff/source/style/impastpl.hxx
index 8dd04c1..e604297 100644
--- a/binfilter/bf_xmloff/source/style/impastpl.hxx
+++ b/binfilter/bf_xmloff/source/style/impastpl.hxx
@@ -56,13 +56,9 @@ class SvXMLExport;
 // Implementationclass for stylefamily-information
 //
 
-typedef ::rtl::OUString *OUStringPtr;
-DECLARE_LIST( SvXMLAutoStylePoolCache_Impl, OUStringPtr )
-
 class XMLFamilyData_Impl
 {
 public:
-    SvXMLAutoStylePoolCache_Impl		*pCache;
     sal_uInt32							mnFamily;
     ::rtl::OUString						maStrFamilyName;
     UniReference < SvXMLExportPropertyMapper >	mxMapper;
@@ -81,8 +77,7 @@ public:
 
     XMLFamilyData_Impl( sal_Int32 nFamily ) :
         mnFamily( nFamily ), mpParentList( NULL ),
-        mpNameList( NULL ), mnCount( 0 ), mnName( 0 ),
-        pCache( 0 )
+        mpNameList( NULL ), mnCount( 0 ), mnName( 0 )
     {}
     ~XMLFamilyData_Impl();
 
diff --git a/binfilter/bf_xmloff/source/style/xmloff_impastp1.cxx b/binfilter/bf_xmloff/source/style/xmloff_impastp1.cxx
index d22aab4..f085c09 100644
--- a/binfilter/bf_xmloff/source/style/xmloff_impastp1.cxx
+++ b/binfilter/bf_xmloff/source/style/xmloff_impastp1.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -49,8 +49,7 @@ XMLFamilyData_Impl::XMLFamilyData_Impl(
         const OUString& rStrPrefix,
         sal_Bool bAsFam )
     : mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), maStrPrefix( rStrPrefix ),
-      mnCount( 0 ), mnName( 0 ), bAsFamily( bAsFam ),
-      pCache( 0 )
+      mnCount( 0 ), mnName( 0 ), bAsFamily( bAsFam )
 {
     mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 );
     mpNameList   = new SvXMLAutoStylePoolNamesP_Impl( 5, 5 );
@@ -60,13 +59,6 @@ XMLFamilyData_Impl::~XMLFamilyData_Impl()
 {
     if( mpParentList ) delete mpParentList;
     if( mpNameList ) delete mpNameList;
-    DBG_ASSERT( !pCache || !pCache->Count(),
-                "auto style pool cache is not empty!" );
-    if( pCache )
-    {
-        while( pCache->Count() )
-            delete pCache->Remove( 0UL );
-    }
 }
 
 void XMLFamilyData_Impl::ClearEntries()
@@ -74,13 +66,6 @@ void XMLFamilyData_Impl::ClearEntries()
     if( mpParentList )
         delete mpParentList;
     mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 );
-    DBG_ASSERT( !pCache || !pCache->Count(),
-                "auto style pool cache is not empty!" );
-    if( pCache )
-    {
-        while( pCache->Count() )
-            delete pCache->Remove( 0UL );
-    }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/binfilter/bf_xmloff/source/style/xmloff_impastp4.cxx b/binfilter/bf_xmloff/source/style/xmloff_impastp4.cxx
index efa5e3e..409d8b3 100644
--- a/binfilter/bf_xmloff/source/style/xmloff_impastp4.cxx
+++ b/binfilter/bf_xmloff/source/style/xmloff_impastp4.cxx
@@ -113,10 +113,6 @@ void SvXMLAutoStylePoolP_Impl::RegisterName( sal_Int32 nFamily, const OUString&
 // if not added, yet.
 //
 
-/*OUString SvXMLAutoStylePoolP_Impl::Add( sal_Int32 nFamily,
-                                         const OUString& rParent,
-                                        const vector< XMLPropertyState >& rProperties,
-                                        sal_Bool bCache )*/
 sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily,
                 const OUString& rParent,
                 const ::std::vector< XMLPropertyState >& rProperties,
@@ -154,15 +150,6 @@ sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily,
             pFamily->mnCount++;
             bRet = sal_True;
         }
-
-        if( bCache )
-        {
-            if( !pFamily->pCache )
-                pFamily->pCache = new SvXMLAutoStylePoolCache_Impl( 256, 256 );
-            if( pFamily->pCache->Count() < MAX_CACHE_SIZE )
-                pFamily->pCache->Insert( new OUString( rName ),
-                                         pFamily->pCache->Count() );
-        }
     }
 
     return bRet;


More information about the Libreoffice-commits mailing list