summaryrefslogtreecommitdiff
path: root/sw/inc/doc.hxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-07-22 13:01:36 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-03-03 10:28:37 +0000
commit82d573e8bf97193c032ca9631d33fa39bbd12638 (patch)
tree0d51ff471945047122a1499e182c274570a74ee2 /sw/inc/doc.hxx
parent4bdbea5447f36beb9cc33df173a89a49a9918290 (diff)
Drop local FindPageDesc implementations
There are quite some places, which manually walk the vector of SwPageDesc to find the named item. Replace all of them and also drop the duplicated and unused GetPageDesc function. Additionally adds a ContainsPageDesc function, which checks the vector for the SwPageDesc pointer. Change-Id: I7ade35b78d8208dc00ee56a8f83c3ebadaebb8af Reviewed-on: https://gerrit.libreoffice.org/14508 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/doc.hxx')
-rw-r--r--sw/inc/doc.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index b9b55515ccd5..d0b3fbc5ac2e 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -948,6 +948,9 @@ public:
const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return maPageDescs[i]; }
SwPageDesc& GetPageDesc( sal_uInt16 i ) { return maPageDescs[i]; }
SwPageDesc* FindPageDesc(const OUString& rName, sal_uInt16* pPos = NULL);
+ SwPageDesc* FindPageDesc(const OUString& rName, sal_uInt16* pPos = NULL) const;
+ // Just searches the pointer in the maPageDescs vector!
+ bool ContainsPageDesc(const SwPageDesc *pDesc, sal_uInt16* pPos = NULL);
/** Copy the complete PageDesc - beyond document and "deep"!
Optionally copying of PoolFmtId, -HlpId can be prevented. */
@@ -965,7 +968,6 @@ public:
{ CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); }
// For Reader
- SwPageDesc * GetPageDesc( const OUString & rName );
void ChgPageDesc( const OUString & rName, const SwPageDesc& );
void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
void DelPageDesc( const OUString & rName, bool bBroadcast = false);