diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-25 15:32:29 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-25 15:54:19 -0400 |
commit | 52a36fb30aef51fc1cecde4cf2ac9c43a5c88c09 (patch) | |
tree | 828a3cdff2947b9eb129a49a18cac1fe284a3b3a /xmloff | |
parent | 690f7ff8839c66c29f71f681b9e78cc51923c6b6 (diff) |
pImplize XMLPropertyHandlerFactory.
Change-Id: Iff524c9065e9374b39db998e3860704555130995
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/animationexport.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/style/prhdlfac.cxx | 27 |
3 files changed, 23 insertions, 6 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index bf1c5b13b664..11ed567aa65a 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -63,6 +63,7 @@ #include <xmloff/xmlement.hxx> #include <xmloff/nmspmap.hxx> #include <xmloff/shapeexport.hxx> +#include <xmloff/xmlprhdl.hxx> #include "animations.hxx" #include <xmloff/animationexport.hxx> diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index e242ed01825a..66f379005f96 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -61,6 +61,7 @@ #include <xmloff/xmluconv.hxx> #include <osl/mutex.hxx> #include <xmloff/nmspmap.hxx> +#include <xmloff/xmlprhdl.hxx> #include "anim.hxx" #include "facreg.hxx" diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index 2829fe6a5152..b60119da7164 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -17,15 +17,17 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <xmloff/prhdlfac.hxx> + #include <com/sun/star/drawing/ColorMode.hpp> #include <com/sun/star/text/HorizontalAdjust.hpp> #include <com/sun/star/text/WritingMode2.hpp> #include <tools/debug.hxx> -#include <xmloff/prhdlfac.hxx> #include <xmloff/xmltypes.hxx> #include <xmloff/xmltoken.hxx> +#include <xmloff/xmlprhdl.hxx> #include "xmlbahdl.hxx" #include <xmloff/NamedBoolPropertyHdl.hxx> #include <xmloff/XMLConstantsPropertyHandler.hxx> @@ -52,6 +54,8 @@ #include "XMLRectangleMembersHandler.hxx" #include "DrawAspectHdl.hxx" +#include <map> + using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -94,11 +98,22 @@ static SvXMLEnumMapEntry const aXML_WritingDirection_Enum[] = { XML_TOKEN_INVALID, 0 } }; -// Dtor +typedef std::map<sal_Int32, const XMLPropertyHandler*> CacheMap; + +struct XMLPropertyHandlerFactory::Impl +{ + mutable CacheMap maHandlerCache; +}; + +XMLPropertyHandlerFactory::XMLPropertyHandlerFactory() : + mpImpl(new Impl) {} + XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory() { - for( CacheMap::iterator pPos = maHandlerCache.begin(); pPos != maHandlerCache.end(); ++pPos ) + for( CacheMap::iterator pPos = mpImpl->maHandlerCache.begin(); pPos != mpImpl->maHandlerCache.end(); ++pPos ) delete pPos->second; + + delete mpImpl; } // Interface @@ -114,15 +129,15 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nTyp { const XMLPropertyHandler* pRet = NULL; - if( maHandlerCache.find( nType ) != maHandlerCache.end() ) - pRet = maHandlerCache.find( nType )->second; + if( mpImpl->maHandlerCache.find( nType ) != mpImpl->maHandlerCache.end() ) + pRet = mpImpl->maHandlerCache.find( nType )->second; return pRet; } void XMLPropertyHandlerFactory::PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const { - maHandlerCache[nType] = pHdl; + mpImpl->maHandlerCache[nType] = pHdl; } const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32 nType ) const |