From 5932906656a9291b38811970cd933f05dd54eaac Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 10 Aug 2014 00:06:13 +0900 Subject: fdo#75757: remove inheritance to std::vector ... for PaneStyleContainer and ViewStyleContainer. Change-Id: I6a6e2b1733266f54a94a49ab491cf854eb5df492 Reviewed-on: https://gerrit.libreoffice.org/10847 Reviewed-by: David Tardon Tested-by: David Tardon --- sdext/source/presenter/PresenterTheme.cxx | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx index a60209b08d50..fc59c18ec30b 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -142,8 +142,11 @@ public: typedef ::boost::shared_ptr SharedPaneStyle; -class PaneStyleContainer : vector +class PaneStyleContainer { +private: + ::std::vector mStyles; + public: void Read ( ReadContext& rReadContext, @@ -179,8 +182,11 @@ public: typedef ::boost::shared_ptr SharedViewStyle; -class ViewStyleContainer : vector +class ViewStyleContainer { +private: + ::std::vector mStyles; + public: void Read ( ReadContext& rReadContext, @@ -882,8 +888,8 @@ void PaneStyleContainer::ProcessPaneStyle( if (rValues[1] >>= sParentStyleName) { // Find parent style. - PaneStyleContainer::const_iterator iStyle; - for (iStyle=begin(); iStyle!=end(); ++iStyle) + ::std::vector::const_iterator iStyle; + for (iStyle=mStyles.begin(); iStyle!=mStyles.end(); ++iStyle) if ((*iStyle)->msStyleName.equals(sParentStyleName)) { pStyle->mpParentStyle = *iStyle; @@ -919,13 +925,13 @@ void PaneStyleContainer::ProcessPaneStyle( rReadContext.mxPresenterHelper)); } - push_back(pStyle); + mStyles.push_back(pStyle); } SharedPaneStyle PaneStyleContainer::GetPaneStyle (const OUString& rsStyleName) const { - const_iterator iEnd (end()); - for (const_iterator iStyle=begin(); iStyle!=iEnd; ++iStyle) + ::std::vector::const_iterator iEnd (mStyles.end()); + for (::std::vector::const_iterator iStyle=mStyles.begin(); iStyle!=iEnd; ++iStyle) if ((*iStyle)->msStyleName == rsStyleName) return *iStyle; return SharedPaneStyle(); @@ -1008,8 +1014,8 @@ void ViewStyleContainer::ProcessViewStyle( >>= sParentStyleName) { // Find parent style. - ViewStyleContainer::const_iterator iStyle; - for (iStyle=begin(); iStyle!=end(); ++iStyle) + ::std::vector::const_iterator iStyle; + for (iStyle=mStyles.begin(); iStyle!=mStyles.end(); ++iStyle) if ((*iStyle)->msStyleName.equals(sParentStyleName)) { pStyle->mpParentStyle = *iStyle; @@ -1039,13 +1045,13 @@ void ViewStyleContainer::ProcessViewStyle( if (pBackground.get() != NULL && pBackground->GetNormalBitmap().is()) pStyle->mpBackground = pBackground; - push_back(pStyle); + mStyles.push_back(pStyle); } SharedViewStyle ViewStyleContainer::GetViewStyle (const OUString& rsStyleName) const { - const_iterator iEnd (end()); - for (const_iterator iStyle=begin(); iStyle!=iEnd; ++iStyle) + ::std::vector::const_iterator iEnd (mStyles.end()); + for (::std::vector::const_iterator iStyle=mStyles.begin(); iStyle!=iEnd; ++iStyle) if ((*iStyle)->msStyleName == rsStyleName) return *iStyle; return SharedViewStyle(); -- cgit