[Libreoffice-commits] core.git: include/sfx2 sfx2/Library_sfx.mk sfx2/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Nov 21 19:58:55 PST 2014


 include/sfx2/app.hxx           |    7 --
 sfx2/Library_sfx.mk            |    1 
 sfx2/source/appl/appinit.cxx   |    1 
 sfx2/source/appl/appquit.cxx   |    1 
 sfx2/source/appl/shellimpl.cxx |  127 +++++++++++++++++++++++++++++++++++++++++
 sfx2/source/doc/objxtor.cxx    |    1 
 sfx2/source/inc/shellimpl.hxx  |   96 ++++++++++++++++++++++++++++++
 sfx2/source/view/viewfrm.cxx   |    1 
 sfx2/source/view/viewsh.cxx    |    1 
 9 files changed, 232 insertions(+), 4 deletions(-)

New commits:
commit e59ae45fec5e65bea1bb5770d79a3f027e6adcf6
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Nov 21 22:57:41 2014 -0500

    Forward declare all the std::vector based impl container classes.
    
    Now #include <vector> is a goner...
    
    Change-Id: Ia2da27bae5fadfa3f6f633e55fcedce405281b67

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 85a1acd..3673761 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -36,7 +36,6 @@
 #include <vcl/svapp.hxx>
 
 #include <sfx2/shell.hxx>
-#include <vector>
 
 class Timer;
 class WorkWindow;
@@ -61,15 +60,15 @@ class SfxMedium;
 class SfxMenuCtrlFactArr_Impl;
 class SfxNewFileDialog;
 class SfxObjectShell;
-typedef ::std::vector<SfxObjectShell*> SfxObjectShellArr_Impl;
+class SfxObjectShellArr_Impl;
 class SfxProgress;
 class SfxSlotPool;
 class SfxStbCtrlFactArr_Impl;
 class SfxTbxCtrlFactArr_Impl;
 class SfxViewFrame;
-typedef ::std::vector<SfxViewFrame*> SfxViewFrameArr_Impl;
+class SfxViewFrameArr_Impl;
 class SfxViewShell;
-typedef ::std::vector<SfxViewShell*> SfxViewShellArr_Impl;
+class SfxViewShellArr_Impl;
 class StarBASIC;
 class SfxWorkWindow;
 class SfxFilterMatcher;
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 0fc03c2..0a1100e 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -117,6 +117,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/appl/openuriexternally \
     sfx2/source/appl/sfxhelp \
     sfx2/source/appl/sfxpicklist \
+    sfx2/source/appl/shellimpl \
     sfx2/source/appl/shutdownicon \
     sfx2/source/appl/workwin \
     sfx2/source/appl/xpackcreator \
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 6238f5d..77067dd 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -68,6 +68,7 @@
 #include "helper.hxx"
 #include "sfxpicklist.hxx"
 #include <ctrlfactoryimpl.hxx>
+#include <shellimpl.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index fb1771f0..2367e51a 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -55,6 +55,7 @@
 #include "appbaslib.hxx"
 #include "childwinimpl.hxx"
 #include <ctrlfactoryimpl.hxx>
+#include <shellimpl.hxx>
 #include <basic/basicmanagerrepository.hxx>
 #include <svtools/svtresid.hxx>
 
diff --git a/sfx2/source/appl/shellimpl.cxx b/sfx2/source/appl/shellimpl.cxx
new file mode 100644
index 0000000..84ed3de
--- /dev/null
+++ b/sfx2/source/appl/shellimpl.cxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <shellimpl.hxx>
+
+SfxObjectShellArr_Impl::iterator SfxObjectShellArr_Impl::begin()
+{
+    return maData.begin();
+}
+
+SfxObjectShellArr_Impl::iterator SfxObjectShellArr_Impl::end()
+{
+    return maData.end();
+}
+
+const SfxObjectShell* SfxObjectShellArr_Impl::operator[] ( size_t i ) const
+{
+    return maData[i];
+}
+
+SfxObjectShell* SfxObjectShellArr_Impl::operator[] ( size_t i )
+{
+    return maData[i];
+}
+
+void SfxObjectShellArr_Impl::erase( iterator it )
+{
+    maData.erase(it);
+}
+
+void SfxObjectShellArr_Impl::push_back( SfxObjectShell* p )
+{
+    maData.push_back(p);
+}
+
+size_t SfxObjectShellArr_Impl::size() const
+{
+    return maData.size();
+}
+
+SfxViewFrameArr_Impl::iterator SfxViewFrameArr_Impl::begin()
+{
+    return maData.begin();
+}
+
+SfxViewFrameArr_Impl::iterator SfxViewFrameArr_Impl::end()
+{
+    return maData.end();
+}
+
+const SfxViewFrame* SfxViewFrameArr_Impl::operator[] ( size_t i ) const
+{
+    return maData[i];
+}
+
+SfxViewFrame* SfxViewFrameArr_Impl::operator[] ( size_t i )
+{
+    return maData[i];
+}
+
+void SfxViewFrameArr_Impl::erase( iterator it )
+{
+    maData.erase(it);
+}
+
+void SfxViewFrameArr_Impl::push_back( SfxViewFrame* p )
+{
+    maData.push_back(p);
+}
+
+size_t SfxViewFrameArr_Impl::size() const
+{
+    return maData.size();
+}
+
+SfxViewShellArr_Impl::iterator SfxViewShellArr_Impl::begin()
+{
+    return maData.begin();
+}
+
+SfxViewShellArr_Impl::iterator SfxViewShellArr_Impl::end()
+{
+    return maData.end();
+}
+
+const SfxViewShell* SfxViewShellArr_Impl::operator[] ( size_t i ) const
+{
+    return maData[i];
+}
+
+SfxViewShell* SfxViewShellArr_Impl::operator[] ( size_t i )
+{
+    return maData[i];
+}
+
+void SfxViewShellArr_Impl::erase( iterator it )
+{
+    maData.erase(it);
+}
+
+void SfxViewShellArr_Impl::push_back( SfxViewShell* p )
+{
+    maData.push_back(p);
+}
+
+size_t SfxViewShellArr_Impl::size() const
+{
+    return maData.size();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 2f72cad..dd38c8f 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -95,6 +95,7 @@
 #include <sfx2/msg.hxx>
 #include "appbaslib.hxx"
 #include <sfx2/sfxbasemodel.hxx>
+#include <shellimpl.hxx>
 
 #include <basic/basicmanagerrepository.hxx>
 
diff --git a/sfx2/source/inc/shellimpl.hxx b/sfx2/source/inc/shellimpl.hxx
new file mode 100644
index 0000000..622dafa
--- /dev/null
+++ b/sfx2/source/inc/shellimpl.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SFX2_SHELLIMPL_HXX
+#define INCLUDED_SFX2_SHELLIMPL_HXX
+
+#include <cstdlib>
+#include <vector>
+
+class SfxObjectShell;
+class SfxViewFrame;
+class SfxViewShell;
+
+class SfxObjectShellArr_Impl
+{
+    typedef std::vector<SfxObjectShell*> DataType;
+    DataType maData;
+
+public:
+    typedef DataType::iterator iterator;
+
+    iterator begin();
+    iterator end();
+
+    const SfxObjectShell* operator[] ( size_t i ) const;
+    SfxObjectShell* operator[] ( size_t i );
+
+    void erase( iterator it );
+
+    void push_back( SfxObjectShell* p );
+
+    size_t size() const;
+};
+
+class SfxViewFrameArr_Impl
+{
+    typedef std::vector<SfxViewFrame*> DataType;
+    DataType maData;
+
+public:
+
+    typedef DataType::iterator iterator;
+    iterator begin();
+    iterator end();
+
+    const SfxViewFrame* operator[] ( size_t i ) const;
+    SfxViewFrame* operator[] ( size_t i );
+
+    void erase( iterator it );
+
+    void push_back( SfxViewFrame* p );
+
+    size_t size() const;
+};
+
+class SfxViewShellArr_Impl
+{
+    typedef std::vector<SfxViewShell*> DataType;
+    DataType maData;
+
+public:
+
+    typedef DataType::iterator iterator;
+
+    iterator begin();
+    iterator end();
+
+    const SfxViewShell* operator[] ( size_t i ) const;
+    SfxViewShell* operator[] ( size_t i );
+
+    void erase( iterator it );
+
+    void push_back( SfxViewShell* p );
+
+    size_t size() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 82e0e94..79387be 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -89,6 +89,7 @@
 #include <svtools/svtools.hrc>
 #include <svtools/svtresid.hxx>
 #include <framework/framelistanalyzer.hxx>
+#include <shellimpl.hxx>
 
 #include <boost/optional.hpp>
 
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f2f6f13..a5f04e0 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -80,6 +80,7 @@
 #include <sfx2/objface.hxx>
 #include <sfx2/docfilt.hxx>
 #include "openuriexternally.hxx"
+#include <shellimpl.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;


More information about the Libreoffice-commits mailing list