diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2014-12-08 17:28:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-07 13:14:02 +0000 |
commit | 28b61d7a2839aebc7458312d312dc6cdb03a8b3f (patch) | |
tree | a6db32a102d180a3c206a1bb554f6c35bacd7a52 /sw/inc | |
parent | 2021275f8fc33d9917d5fef58959a95da1dc7e6f (diff) |
fdo#75757 remove inheritance to std::vector
Conflicts:
sw/source/core/doc/docnew.cxx
Change-Id: I4ba20e689b77e75bea75e5a60f50ff40577183e8
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/doc.hxx | 18 | ||||
-rw-r--r-- | sw/inc/pagedesc.hxx | 2 |
2 files changed, 7 insertions, 13 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index bcc89eaa79ed..6efdfd49fe7d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -237,13 +237,7 @@ namespace sfx2 { class LinkManager; } -// PageDescriptor-interface, Array because of inlines. -class SwPageDescs : public std::vector<SwPageDesc*> -{ -public: - // the destructor will free all objects still in the vector - ~SwPageDescs(); -}; +typedef boost::ptr_vector<SwPageDesc> SwPageDescs; // forward declaration void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem ); @@ -953,9 +947,9 @@ public: // PageDescriptor interface. sal_uInt16 GetPageDescCnt() const { return maPageDescs.size(); } - 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) const; + 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); /** Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFmtId, -HlpId can be prevented. */ @@ -1680,9 +1674,9 @@ public: private: // Copies master header to left / first one, if necessary - used by ChgPageDesc(). - void CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, SwPageDesc *pDesc, bool bLeft, bool bFirst); + void CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, SwPageDesc &pDesc, bool bLeft, bool bFirst); // Copies master footer to left / first one, if necessary - used by ChgPageDesc(). - void CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, SwPageDesc *pDesc, bool bLeft, bool bFirst); + void CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, SwPageDesc &pDesc, bool bLeft, bool bFirst); }; diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index b556e9bd0f7d..c4af0522f660 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -162,7 +162,7 @@ protected: public: OUString GetName() const { return aDescName; } - bool HasName( const OUString& rThisName ) { return aDescName == rThisName; } + bool HasName( const OUString& rThisName ) const { return aDescName == rThisName; } void SetName( const OUString& rNewName ) { aDescName = rNewName; } bool GetLandscape() const { return bLandscape; } |