diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-21 22:57:41 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-21 22:58:48 -0500 |
commit | e59ae45fec5e65bea1bb5770d79a3f027e6adcf6 (patch) | |
tree | 5dd3b598c9208dcb380a815364a0cd8a5c8a8eaf /sfx2 | |
parent | 483cff5e661aa40c8fd16d62eeb68cc29872eb4b (diff) |
Forward declare all the std::vector based impl container classes.
Now #include <vector> is a goner...
Change-Id: Ia2da27bae5fadfa3f6f633e55fcedce405281b67
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/Library_sfx.mk | 1 | ||||
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/appl/appquit.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/appl/shellimpl.cxx | 127 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/inc/shellimpl.hxx | 96 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 1 |
8 files changed, 229 insertions, 0 deletions
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 0fc03c2271c2..0a1100e1f51a 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 6238f5da1e2b..77067dd119d1 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 fb1771f033de..2367e51ac17a 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 000000000000..84ed3de3f57d --- /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 2f72cadfc9d4..dd38c8f407f4 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 000000000000..622dafa5fc82 --- /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 82e0e94bd36a..79387be96631 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 f2f6f1357230..a5f04e05458b 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; |