[Libreoffice-commits] core.git: sdext/source

Takeshi Abe tabe at fixedpoint.jp
Sat Aug 9 08:25:28 PDT 2014


 sdext/source/presenter/PresenterTheme.cxx |   30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 5932906656a9291b38811970cd933f05dd54eaac
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Aug 10 00:06:13 2014 +0900

    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 <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index a60209b..fc59c18 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -142,8 +142,11 @@ public:
 
 typedef ::boost::shared_ptr<PaneStyle> SharedPaneStyle;
 
-class PaneStyleContainer : vector<SharedPaneStyle>
+class PaneStyleContainer
 {
+private:
+    ::std::vector<SharedPaneStyle> mStyles;
+
 public:
     void Read (
         ReadContext& rReadContext,
@@ -179,8 +182,11 @@ public:
 
 typedef ::boost::shared_ptr<ViewStyle> SharedViewStyle;
 
-class ViewStyleContainer : vector<SharedViewStyle>
+class ViewStyleContainer
 {
+private:
+    ::std::vector<SharedViewStyle> 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<SharedPaneStyle>::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<SharedPaneStyle>::const_iterator iEnd (mStyles.end());
+    for (::std::vector<SharedPaneStyle>::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<SharedViewStyle>::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<SharedViewStyle>::const_iterator iEnd (mStyles.end());
+    for (::std::vector<SharedViewStyle>::const_iterator iStyle=mStyles.begin(); iStyle!=iEnd; ++iStyle)
         if ((*iStyle)->msStyleName == rsStyleName)
             return *iStyle;
     return SharedViewStyle();


More information about the Libreoffice-commits mailing list