summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-09-12 15:36:34 +0900
committerDavid Tardon <dtardon@redhat.com>2014-09-16 10:35:28 +0000
commit474db92a1ab4dd1265b01c6247eeb5570acf7608 (patch)
tree5a9d1d3e7eb2ae86f0e22afc3b2b91bae3bf6155
parenta00b92fa20da1820987f654a2ea9a1f830355738 (diff)
fdo#75757: remove inheritance to std::vector
from RecentlyUsedMasterPages::MasterPageList. Change-Id: Ifeb62d141a6394c7bd79a047a4904c372a8ebe66 Reviewed-on: https://gerrit.libreoffice.org/11413 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx28
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx28
2 files changed, 27 insertions, 29 deletions
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 1ce37806298f..591b578b867b 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -59,38 +59,10 @@ static const OUString& GetPathToSetNode (void)
return sPathToSetNode;
}
-class Descriptor
-{
-public:
- OUString msURL;
- OUString msName;
- ::sd::sidebar::MasterPageContainer::Token maToken;
- Descriptor (::sd::sidebar::MasterPageContainer::Token aToken,
- const OUString& rsURL, const OUString& rsName)
- : msURL(rsURL),
- msName(rsName),
- maToken(aToken)
- {}
- class TokenComparator
- { public:
- TokenComparator(::sd::sidebar::MasterPageContainer::Token aToken)
- : maToken(aToken) {}
- bool operator () (const Descriptor& rDescriptor)
- { return maToken==rDescriptor.maToken; }
- private: ::sd::sidebar::MasterPageContainer::Token maToken;
- };
-};
-
} // end of anonymous namespace
namespace sd { namespace sidebar {
-class RecentlyUsedMasterPages::MasterPageList : public ::std::vector<Descriptor>
-{
-public:
- MasterPageList (void) {}
-};
-
RecentlyUsedMasterPages* RecentlyUsedMasterPages::mpInstance = NULL;
RecentlyUsedMasterPages& RecentlyUsedMasterPages::Instance (void)
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
index 8be36cb1239f..aba7fe38dae4 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
@@ -53,6 +53,32 @@ public:
MasterPageContainer::Token GetTokenForIndex (sal_uInt32 nIndex) const;
private:
+ class Descriptor
+ {
+ public:
+ OUString msURL;
+ OUString msName;
+ ::sd::sidebar::MasterPageContainer::Token maToken;
+ Descriptor (::sd::sidebar::MasterPageContainer::Token aToken,
+ const OUString& rsURL, const OUString& rsName)
+ : msURL(rsURL),
+ msName(rsName),
+ maToken(aToken)
+ {}
+
+ class TokenComparator
+ {
+ public:
+ TokenComparator(::sd::sidebar::MasterPageContainer::Token aToken)
+ : maToken(aToken) {}
+ bool operator () (const Descriptor& rDescriptor)
+ { return maToken==rDescriptor.maToken; }
+
+ private:
+ ::sd::sidebar::MasterPageContainer::Token maToken;
+ };
+ };
+
/** The single instance of this class. It is created on demand when
Instance() is called for the first time.
*/
@@ -60,7 +86,7 @@ private:
::std::vector<Link> maListeners;
- class MasterPageList;
+ typedef ::std::vector<Descriptor> MasterPageList;
::std::auto_ptr<MasterPageList> mpMasterPages;
unsigned long int mnMaxListSize;
::boost::shared_ptr<MasterPageContainer> mpContainer;