diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-09 11:34:45 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-09 13:01:26 -0400 |
commit | 746f8a08f55fe9597cbab63342ee3c91254f148b (patch) | |
tree | 72d5f0809fbeb55d161d31270a553be7d979aa68 /sfx2/source/bastyp | |
parent | aa6e3a1d252ac7e86a6338f366b3127b1ea7dcf8 (diff) |
Make the member mutable to avoid ugly casting.
Change-Id: I28fd84b89a8d443e502d2c0e76f38cf006a57d4a
Diffstat (limited to 'sfx2/source/bastyp')
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index ff9d51ca88ac..53e3c2601034 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -248,10 +248,10 @@ class SfxFilterMatcher_Impl { public: OUString aName; - SfxFilterList_Impl* pList; // is created on demand + mutable SfxFilterList_Impl* pList; // is created on demand void InitForIterating() const; - void Update(); + void Update() const; SfxFilterMatcher_Impl(const OUString &rName) : aName(rName) , pList(0) @@ -321,7 +321,7 @@ SfxFilterMatcher::~SfxFilterMatcher() aImplArr.clear(); } -void SfxFilterMatcher_Impl::Update() +void SfxFilterMatcher_Impl::Update() const { if ( pList ) { @@ -348,13 +348,13 @@ void SfxFilterMatcher_Impl::InitForIterating() const if ( !aName.isEmpty() ) { // matcher of factory: use only filters of that document type - ((SfxFilterMatcher_Impl*)this)->pList = new SfxFilterList_Impl; - ((SfxFilterMatcher_Impl*)this)->Update(); + pList = new SfxFilterList_Impl; + Update(); } else { // global matcher: use global filter array - ((SfxFilterMatcher_Impl*)this)->pList = pFilterArr; + pList = pFilterArr; } } |