[Libreoffice-commits] core.git: 3 commits - include/sfx2 sfx2/inc sfx2/source

Kohei Yoshida kohei.yoshida at collabora.com
Sun Nov 23 10:23:28 PST 2014


 include/sfx2/frame.hxx            |    4 -
 include/sfx2/module.hxx           |    3 -
 sfx2/inc/arrdecl.hxx              |    6 --
 sfx2/source/appl/appdata.cxx      |    1 
 sfx2/source/appl/childwinimpl.cxx |   40 +++++++++++++++++
 sfx2/source/appl/childwinimpl.hxx |   61 ---------------------------
 sfx2/source/appl/module.cxx       |   34 +++++++++++++++
 sfx2/source/inc/appdata.hxx       |    2 
 sfx2/source/inc/childwinimpl.hxx  |   85 ++++++++++++++++++++++++++++++++++++++
 sfx2/source/view/frame.cxx        |    1 
 10 files changed, 164 insertions(+), 73 deletions(-)

New commits:
commit 1e37a5519501627490597dba4640b43e6e32e1a4
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun Nov 23 12:23:48 2014 -0500

    Forward-declare SfxFrameArr_Impl in sfx2/frame.hxx.
    
    Change-Id: I49f0a16655114bf212ffec957bc6560075115e5c

diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 9548468..ecf87e4 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -76,9 +76,7 @@ class Rectangle;
 class SfxRequest;
 class SfxUnoControllerItem;
 class SystemWindow;
-
-class SfxFrame;
-typedef ::std::vector<SfxFrame*> SfxFrameArr_Impl;
+class SfxFrameArr_Impl;
 
 typedef ::std::vector<OUString> TargetList;
 
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
index a5bcbe6..837f909 100644
--- a/sfx2/inc/arrdecl.hxx
+++ b/sfx2/inc/arrdecl.hxx
@@ -21,9 +21,6 @@
 
 #include <vector>
 
-class SfxFrame;
-typedef ::std::vector<SfxFrame*> SfxFrameArr_Impl;
-
 class SfxFilter;
 typedef ::std::vector< SfxFilter* > SfxFilterList_Impl;
 
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index c07c94c..88bfb1c 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -43,6 +43,7 @@
 #include "objshimp.hxx"
 #include "imestatuswindow.hxx"
 #include "appbaslib.hxx"
+#include <childwinimpl.hxx>
 
 #include <basic/basicmanagerrepository.hxx>
 #include <basic/basmgr.hxx>
diff --git a/sfx2/source/appl/childwinimpl.cxx b/sfx2/source/appl/childwinimpl.cxx
index acdc15f..9b64734 100644
--- a/sfx2/source/appl/childwinimpl.cxx
+++ b/sfx2/source/appl/childwinimpl.cxx
@@ -74,4 +74,44 @@ SfxChildWinFactArr_Impl::const_iterator SfxChildWinFactArr_Impl::begin() const
     return maData.begin();
 }
 
+SfxFrameArr_Impl::iterator SfxFrameArr_Impl::begin()
+{
+    return maData.begin();
+}
+
+SfxFrameArr_Impl::iterator SfxFrameArr_Impl::end()
+{
+    return maData.end();
+}
+
+SfxFrame* SfxFrameArr_Impl::front()
+{
+    return maData.front();
+}
+
+void SfxFrameArr_Impl::erase( iterator it )
+{
+    maData.erase(it);
+}
+
+SfxFrame* SfxFrameArr_Impl::operator[] ( size_t i )
+{
+    return maData[i];
+}
+
+void SfxFrameArr_Impl::push_back( SfxFrame* p )
+{
+    maData.push_back(p);
+}
+
+size_t SfxFrameArr_Impl::size() const
+{
+    return maData.size();
+}
+
+bool SfxFrameArr_Impl::empty() const
+{
+    return maData.empty();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index c300040..65e0402 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -45,7 +45,7 @@ class SfxStatusDispatcher;
 class SfxDdeTriggerTopic_Impl;
 class SfxDocumentTemplates;
 class SfxFrame;
-typedef ::std::vector<SfxFrame*> SfxFrameArr_Impl;
+class SfxFrameArr_Impl;
 class SvtSaveOptions;
 class SvtHelpOptions;
 class ResMgr;
diff --git a/sfx2/source/inc/childwinimpl.hxx b/sfx2/source/inc/childwinimpl.hxx
index 8b414e7..8a78dfc 100644
--- a/sfx2/source/inc/childwinimpl.hxx
+++ b/sfx2/source/inc/childwinimpl.hxx
@@ -24,6 +24,8 @@
 
 #include <boost/ptr_container/ptr_vector.hpp>
 
+class SfxFrame;
+
 class SfxChildWinContextArr_Impl
 {
     typedef boost::ptr_vector<SfxChildWinContextFactory> DataType;
@@ -55,6 +57,28 @@ public:
     const_iterator begin() const;
 };
 
+class SfxFrameArr_Impl
+{
+    typedef std::vector<SfxFrame*> DataType;
+    DataType maData;
+
+public:
+    typedef DataType::iterator iterator;
+
+    iterator begin();
+    iterator end();
+
+    SfxFrame* front();
+
+    void erase( iterator it );
+
+    SfxFrame* operator[] ( size_t i );
+
+    void push_back( SfxFrame* p );
+    size_t size() const;
+    bool empty() const;
+};
+
 #endif
 
 
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index d3c2996..4c9744a 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -60,6 +60,7 @@
 #include <sfx2/msgpool.hxx>
 #include "objshimp.hxx"
 #include <sfx2/ipclient.hxx>
+#include <childwinimpl.hxx>
 
 #ifdef DBG_UTIL
 #include <sfx2/frmhtmlw.hxx>
commit 8d007c83ea064baebf6a77ca9ad1418c66892249
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun Nov 23 12:00:45 2014 -0500

    Move this header into source/inc.
    
    Change-Id: I9127aaea3330b5c972ae7b3bf09912bc306d0f3c

diff --git a/sfx2/source/appl/childwinimpl.hxx b/sfx2/source/inc/childwinimpl.hxx
similarity index 100%
rename from sfx2/source/appl/childwinimpl.hxx
rename to sfx2/source/inc/childwinimpl.hxx
commit 8da8927a0198f41fc3bcd6d512e3b570d4b8803f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun Nov 23 11:30:07 2014 -0500

    Forward-declare SfxModuleArr_Impl in sfx2/module.hxx.
    
    This is only used within sfx2.
    
    Change-Id: I40d850bcf82ba39dc7cf7d1a5b70c90add4e75c0

diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index a04b8af..7e0e037 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -28,7 +28,6 @@
 #include <sal/types.h>
 #include <tools/fldunit.hxx>
 #include <com/sun/star/uno/Reference.hxx>
-#include <vector>
 
 class ImageList;
 
@@ -37,7 +36,7 @@ class SfxObjectFactory;
 class ModalDialog;
 class SfxObjectFactory;
 class SfxModule;
-typedef ::std::vector<SfxModule*> SfxModuleArr_Impl;
+class SfxModuleArr_Impl;
 class SfxModule_Impl;
 class SfxSlotPool;
 struct SfxChildWinContextFactory;
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
index 31cd354..a5bcbe6 100644
--- a/sfx2/inc/arrdecl.hxx
+++ b/sfx2/inc/arrdecl.hxx
@@ -21,9 +21,6 @@
 
 #include <vector>
 
-class SfxModule;
-typedef ::std::vector<SfxModule*> SfxModuleArr_Impl;
-
 class SfxFrame;
 typedef ::std::vector<SfxFrame*> SfxFrameArr_Impl;
 
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 71c06b4..00dde74 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -44,6 +44,40 @@
 #include "childwinimpl.hxx"
 #include <ctrlfactoryimpl.hxx>
 
+class SfxModuleArr_Impl
+{
+    typedef ::std::vector<SfxModule*> DataType;
+    DataType maData;
+public:
+
+    typedef DataType::iterator iterator;
+
+    iterator begin()
+    {
+        return maData.begin();
+    }
+
+    void erase( iterator it )
+    {
+        maData.erase(it);
+    }
+
+    SfxModule* operator[] ( size_t i )
+    {
+        return maData[i];
+    }
+
+    void push_back( SfxModule* p )
+    {
+        maData.push_back(p);
+    }
+
+    size_t size() const
+    {
+        return maData.size();
+    }
+};
+
 static SfxModuleArr_Impl* pModules=0;
 
 class SfxModule_Impl


More information about the Libreoffice-commits mailing list