summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-11-21 23:44:48 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-11-21 23:51:14 -0500
commit6e385ffadd4842f28a51a1a490ea910cbee6ff4a (patch)
treed9f3f784700ec882c5f23373896401175f9974d0
parenta08705e9346d95dcd5fb80e2cf6695091a04f883 (diff)
Forward declare SfxFoundCacheArr_Impl and SfxFoundCache_Impl in bindings.hxx.
And remove #include <boost/ptr_container/ptr_vector.hpp> from here. Change-Id: I7624444b60ee19f0b5b19e7a7aab0210ddf90d7c
-rw-r--r--include/sfx2/bindings.hxx20
-rw-r--r--sfx2/source/control/bindings.cxx42
2 files changed, 44 insertions, 18 deletions
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 2fbe66d23369..ad31b6a16ead 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -29,7 +29,6 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
#include <vector>
-#include <boost/ptr_container/ptr_vector.hpp>
// some other includes
@@ -53,6 +52,8 @@ class SfxBindings_Impl;
class Timer;
class SfxWorkWindow;
class SfxUnoControllerItem;
+struct SfxFoundCache_Impl;
+class SfxFoundCacheArr_Impl;
typedef std::vector<SfxUnoControllerItem*> SfxUnoControllerArr_Impl;
@@ -97,23 +98,6 @@ enum SfxPopupAction
SFX_POPUP_SHOW
};
-struct SfxFoundCache_Impl
-{
- sal_uInt16 nSlotId; // the Slot-Id
- sal_uInt16 nWhichId; // If available: Which-Id, else: nSlotId
- const SfxSlot* pSlot; // Pointer to <Master-Slot>
- SfxStateCache* pCache; // Pointer to StatusCache, if possible NULL
-
- SfxFoundCache_Impl(sal_uInt16 nS, sal_uInt16 nW, const SfxSlot *pS, SfxStateCache *pC ):
- nSlotId(nS),
- nWhichId(nW),
- pSlot(pS),
- pCache(pC)
- {}
-};
-
-typedef boost::ptr_vector<SfxFoundCache_Impl> SfxFoundCacheArr_Impl;
-
class SFX2_DLLPUBLIC SfxBindings: public SfxBroadcaster
/* [Description]
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 1b51608a6236..db5ff606d31b 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -66,6 +66,7 @@
#include <com/sun/star/frame/XModuleManager.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -83,7 +84,48 @@ typedef boost::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
typedef std::vector<SfxStateCache*> SfxStateCacheArr_Impl;
+struct SfxFoundCache_Impl
+{
+ sal_uInt16 nSlotId; // the Slot-Id
+ sal_uInt16 nWhichId; // If available: Which-Id, else: nSlotId
+ const SfxSlot* pSlot; // Pointer to <Master-Slot>
+ SfxStateCache* pCache; // Pointer to StatusCache, if possible NULL
+
+ SfxFoundCache_Impl(sal_uInt16 nS, sal_uInt16 nW, const SfxSlot *pS, SfxStateCache *pC ):
+ nSlotId(nS),
+ nWhichId(nW),
+ pSlot(pS),
+ pCache(pC)
+ {}
+};
+
+class SfxFoundCacheArr_Impl
+{
+ typedef boost::ptr_vector<SfxFoundCache_Impl> DataType;
+ DataType maData;
+
+public:
+
+ SfxFoundCache_Impl& operator[] ( size_t i )
+ {
+ return maData[i];
+ }
+ const SfxFoundCache_Impl& operator[] ( size_t i ) const
+ {
+ return maData[i];
+ }
+
+ size_t size() const
+ {
+ return maData.size();
+ }
+
+ void push_back( SfxFoundCache_Impl* p )
+ {
+ maData.push_back(p);
+ }
+};
class SfxAsyncExec_Impl
{