include/sfx2/app.hxx | 3 -- include/sfx2/mnuitem.hxx | 1 sfx2/Library_sfx.mk | 1 sfx2/source/appl/appinit.cxx | 1 sfx2/source/appl/appquit.cxx | 1 sfx2/source/appl/appreg.cxx | 1 sfx2/source/appl/module.cxx | 1 sfx2/source/control/ctrlfactoryimpl.cxx | 42 +++++++++++++++++++++++++++++++ sfx2/source/inc/ctrlfactoryimpl.hxx | 43 ++++++++++++++++++++++++++++++++ sfx2/source/menu/mnuitem.cxx | 1 10 files changed, 93 insertions(+), 2 deletions(-)
New commits: commit c2d11710716f3ec5696f3402951be0d7539fe376 Author: Kohei Yoshida <[email protected]> Date: Fri Nov 21 20:45:47 2014 -0500 Forward declare SfxMenuCtrlFactArr_Impl in sfx2/app.hxx public header. Change-Id: Iaf287912a52eb8785c687a13536fc170094425c7 diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index d0a0459..a9bff02 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -35,7 +35,6 @@ // header file because in former times SfxApplication was derived from it #include <vcl/svapp.hxx> -#include <sfx2/mnuitem.hxx> #include <sfx2/shell.hxx> #include <sfx2/stbitem.hxx> #include <sfx2/tbxctrl.hxx> @@ -62,7 +61,7 @@ class SfxEventConfiguration; class SfxEventHint; class SfxItemSet; class SfxMedium; -typedef boost::ptr_vector<SfxMenuCtrlFactory> SfxMenuCtrlFactArr_Impl; +class SfxMenuCtrlFactArr_Impl; class SfxNewFileDialog; class SfxObjectShell; typedef ::std::vector<SfxObjectShell*> SfxObjectShellArr_Impl; diff --git a/include/sfx2/mnuitem.hxx b/include/sfx2/mnuitem.hxx index ff0816e..0ddfe02 100644 --- a/include/sfx2/mnuitem.hxx +++ b/include/sfx2/mnuitem.hxx @@ -25,6 +25,7 @@ #include <sal/config.h> #include <sfx2/ctrlitem.hxx> #include <sfx2/dllapi.h> +#include <tools/link.hxx> class SfxVirtualMenu; class SfxBindings; diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 00c8781..0fc03c2 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -134,6 +134,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/config/evntconf \ sfx2/source/control/bindings \ sfx2/source/control/ctrlitem \ + sfx2/source/control/ctrlfactoryimpl \ sfx2/source/control/dispatch \ sfx2/source/control/itemdel \ sfx2/source/control/minfitem \ diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index a2d5d48..6238f5d 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -67,6 +67,7 @@ #include <sfx2/fcontnr.hxx> #include "helper.hxx" #include "sfxpicklist.hxx" +#include <ctrlfactoryimpl.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 b601bfa..fb1771f0 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -54,6 +54,7 @@ #include <sfx2/docfac.hxx> #include "appbaslib.hxx" #include "childwinimpl.hxx" +#include <ctrlfactoryimpl.hxx> #include <basic/basicmanagerrepository.hxx> #include <svtools/svtresid.hxx> diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx index e9c1e6e..923016d 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -34,6 +34,7 @@ #include "partwnd.hxx" #include <sfx2/sfxsids.hrc> #include "recfloat.hxx" +#include <ctrlfactoryimpl.hxx> #include <sfx2/objsh.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/objface.hxx> diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 974276b..71c06b4 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -42,6 +42,7 @@ #define SfxModule #include "sfxslots.hxx" #include "childwinimpl.hxx" +#include <ctrlfactoryimpl.hxx> static SfxModuleArr_Impl* pModules=0; diff --git a/sfx2/source/control/ctrlfactoryimpl.cxx b/sfx2/source/control/ctrlfactoryimpl.cxx new file mode 100644 index 0000000..3e5fbf5 --- /dev/null +++ b/sfx2/source/control/ctrlfactoryimpl.cxx @@ -0,0 +1,42 @@ +/* -*- 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 <ctrlfactoryimpl.hxx> + +const SfxMenuCtrlFactory& SfxMenuCtrlFactArr_Impl::operator []( size_t i ) const +{ + return maData[i]; +} + +SfxMenuCtrlFactory& SfxMenuCtrlFactArr_Impl::operator []( size_t i ) +{ + return maData[i]; +} + +void SfxMenuCtrlFactArr_Impl::push_back( SfxMenuCtrlFactory* p ) +{ + maData.push_back(p); +} + +size_t SfxMenuCtrlFactArr_Impl::size() const +{ + return maData.size(); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/ctrlfactoryimpl.hxx b/sfx2/source/inc/ctrlfactoryimpl.hxx new file mode 100644 index 0000000..a40f275 --- /dev/null +++ b/sfx2/source/inc/ctrlfactoryimpl.hxx @@ -0,0 +1,43 @@ +/* -*- 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_CTRLFACTORYIMPL_HXX +#define INCLUDED_SFX2_CTRLFACTORYIMPL_HXX + +#include <sfx2/mnuitem.hxx> + +#include <boost/ptr_container/ptr_vector.hpp> + +class SfxMenuCtrlFactArr_Impl +{ + typedef boost::ptr_vector<SfxMenuCtrlFactory> DataType; + DataType maData; + +public: + const SfxMenuCtrlFactory& operator []( size_t i ) const; + SfxMenuCtrlFactory& operator []( size_t i ); + + void push_back( SfxMenuCtrlFactory* p ); + + size_t size() const; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 8db0e1e..49fe481 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -48,6 +48,7 @@ #include <sfx2/dispatch.hxx> #include "sfxtypes.hxx" #include "virtmenu.hxx" +#include <ctrlfactoryimpl.hxx> #include <sfx2/mnuitem.hxx> #include <sfx2/tbxctrl.hxx> #include <sfx2/module.hxx> _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
