diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-16 14:52:26 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-16 21:31:44 -0400 |
commit | e4f55865078e887a34d7b127b75d01ae374968de (patch) | |
tree | dd11b78684f6f66fafcdc1a40d6ba5d8fbd719c1 /xmloff | |
parent | ef60854f7d28a325ddb2f938c2d9fe15e48777b4 (diff) |
This cache data member is never used. Remove it.
Change-Id: I03d55ce8cfe175a75ed22639a06ac22c8783ccd7
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/impastp1.cxx | 21 | ||||
-rw-r--r-- | xmloff/source/style/impastp4.cxx | 20 | ||||
-rw-r--r-- | xmloff/source/style/impastpl.hxx | 16 | ||||
-rw-r--r-- | xmloff/source/style/xmlaustp.cxx | 2 |
4 files changed, 15 insertions, 44 deletions
diff --git a/xmloff/source/style/impastp1.cxx b/xmloff/source/style/impastp1.cxx index 49e8e018b885..2e6f2ce879e5 100644 --- a/xmloff/source/style/impastp1.cxx +++ b/xmloff/source/style/impastp1.cxx @@ -28,9 +28,9 @@ XMLFamilyData_Impl::XMLFamilyData_Impl( const OUString& rStrName, const UniReference < SvXMLExportPropertyMapper > &rMapper, const OUString& rStrPrefix, - sal_Bool bAsFam ) - : pCache( 0 ), mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), - mnCount( 0 ), mnName( 0 ), maStrPrefix( rStrPrefix ), bAsFamily( bAsFam ) + sal_Bool bAsFam ) : + mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), + mnCount( 0 ), mnName( 0 ), maStrPrefix( rStrPrefix ), bAsFamily( bAsFam ) { mpParentList = new SvXMLAutoStylePoolParentsP_Impl; @@ -41,27 +41,12 @@ XMLFamilyData_Impl::~XMLFamilyData_Impl() { delete mpParentList; delete mpNameList; - DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" ); - if( pCache ) - { - for ( size_t i = 0, n = pCache->size(); i < n; ++i ) - delete (*pCache)[ i ]; - pCache->clear(); - delete pCache; - } } void XMLFamilyData_Impl::ClearEntries() { delete mpParentList; mpParentList = new SvXMLAutoStylePoolParentsP_Impl; - DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" ); - if( pCache ) - { - for ( size_t i = 0, n = pCache->size(); i < n; ++i ) - delete (*pCache)[ i ]; - pCache->clear(); - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx index 0edfb0a5aa75..c8f3798bd3e8 100644 --- a/xmloff/source/style/impastp4.cxx +++ b/xmloff/source/style/impastp4.cxx @@ -148,13 +148,11 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames( // Adds a array of XMLPropertyState ( vector< XMLPropertyState > ) to list // if not added, yet. -sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily, - const OUString& rParent, - const ::std::vector< XMLPropertyState >& rProperties, - sal_Bool bCache, - bool bDontSeek ) +bool SvXMLAutoStylePoolP_Impl::Add( + OUString& rName, sal_Int32 nFamily, const OUString& rParent, + const ::std::vector< XMLPropertyState >& rProperties, bool bDontSeek ) { - sal_Bool bRet(sal_False); + bool bRet = false; XMLFamilyData_Impl aTemporary( nFamily ); FamilyListType::iterator aFind = maFamilyList.find(aTemporary); @@ -183,15 +181,7 @@ sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily, if( pParent->Add( rFamily, rProperties, rName, bDontSeek ) ) { rFamily.mnCount++; - bRet = sal_True; - } - - if( bCache ) - { - if( !rFamily.pCache ) - rFamily.pCache = new SvXMLAutoStylePoolCache_Impl(); - if( rFamily.pCache->size() < MAX_CACHE_SIZE ) - rFamily.pCache->push_back( new OUString( rName ) ); + bRet = true; } } diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx index 140cc43e21c5..84bfdfb781c9 100644 --- a/xmloff/source/style/impastpl.hxx +++ b/xmloff/source/style/impastpl.hxx @@ -42,13 +42,9 @@ class SvXMLExport; // Implementationclass for stylefamily-information -typedef OUString* OUStringPtr; -typedef ::std::vector< OUStringPtr > SvXMLAutoStylePoolCache_Impl; - class XMLFamilyData_Impl { public: - SvXMLAutoStylePoolCache_Impl *pCache; sal_uInt32 mnFamily; OUString maStrFamilyName; UniReference < SvXMLExportPropertyMapper > mxMapper; @@ -66,7 +62,6 @@ public: const OUString& rStrPrefix, sal_Bool bAsFamily = sal_True ); XMLFamilyData_Impl( sal_Int32 nFamily ) : - pCache( 0 ), mnFamily( nFamily ), mpParentList( NULL ), mpNameList( NULL ), mnCount( 0 ), mnName( 0 ), bAsFamily( false ) @@ -174,11 +169,12 @@ public: com::sun::star::uno::Sequence<sal_Int32>& aFamilies, com::sun::star::uno::Sequence<OUString>& aNames ); - sal_Bool Add( OUString& rName, sal_Int32 nFamily, - const OUString& rParent, - const ::std::vector< XMLPropertyState >& rProperties, - sal_Bool bCache = sal_False, - bool bDontSeek = false ); + bool Add( + OUString& rName, sal_Int32 nFamily, + const OUString& rParent, + const ::std::vector< XMLPropertyState >& rProperties, + bool bDontSeek = false ); + sal_Bool AddNamed( const OUString& rName, sal_Int32 nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties ); diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index ef4718b309a9..1baaff8393ec 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -346,7 +346,7 @@ OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily, const vector< XMLPropertyState >& rProperties, bool bDontSeek ) { OUString sName; - pImpl->Add(sName, nFamily, rParent, rProperties, sal_False, bDontSeek ); + pImpl->Add(sName, nFamily, rParent, rProperties, bDontSeek); return sName; } |