include/sfx2/childwin.hxx | 20 +++--------------- sfx2/Library_sfx.mk | 1 sfx2/source/appl/appchild.cxx | 1 sfx2/source/appl/childwin.cxx | 14 ++++++++++++ sfx2/source/appl/childwinimpl.cxx | 42 ++++++++++++++++++++++++++++++++++++++ sfx2/source/appl/childwinimpl.hxx | 42 ++++++++++++++++++++++++++++++++++++++ sfx2/source/inc/splitwin.hxx | 2 + 7 files changed, 106 insertions(+), 16 deletions(-)
New commits: commit 3b3348b262eb34e15b666ba38a41fe9076942941 Author: Kohei Yoshida <[email protected]> Date: Thu Nov 20 22:11:32 2014 -0500 Remove ptr_vector header exposure from sfx2/childwin.hxx public header. Change-Id: I4060c8987a0da387d02f8468229854612a230db3 diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 683ebd5..81b78f8 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -27,7 +27,6 @@ #include <sfx2/shell.hxx> #include <sfx2/chalign.hxx> -#include <boost/ptr_container/ptr_vector.hpp> class SfxWorkWindow; class SfxModule; @@ -92,7 +91,7 @@ struct SfxChildWinContextFactory {} }; -typedef boost::ptr_vector<SfxChildWinContextFactory> SfxChildWinContextArr_Impl; +class SfxChildWinContextArr_Impl; struct SFX2_DLLPUBLIC SfxChildWinFactory { diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index ae85eaa..d98e511 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -99,6 +99,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/appl/appserv \ sfx2/source/appl/appuno \ sfx2/source/appl/childwin \ + sfx2/source/appl/childwinimpl \ sfx2/source/appl/fileobj \ sfx2/source/appl/fwkhelper \ sfx2/source/appl/helpdispatch \ diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx index a0add3e..c273034 100644 --- a/sfx2/source/appl/appchild.cxx +++ b/sfx2/source/appl/appchild.cxx @@ -24,6 +24,7 @@ #include <sfx2/app.hxx> #include "appdata.hxx" #include "workwin.hxx" +#include "childwinimpl.hxx" #include <sfx2/childwin.hxx> #include <sfx2/templdlg.hxx> #include <sfx2/request.hxx> diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index d4821d2..1cf3fee 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -37,6 +37,7 @@ #include <sfx2/dockwin.hxx> #include <sfx2/dispatch.hxx> #include "workwin.hxx" +#include "childwinimpl.hxx" static const sal_uInt16 nVersion = 2; diff --git a/sfx2/source/appl/childwinimpl.cxx b/sfx2/source/appl/childwinimpl.cxx new file mode 100644 index 0000000..5022fa5 --- /dev/null +++ b/sfx2/source/appl/childwinimpl.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 "childwinimpl.hxx" + +size_t SfxChildWinContextArr_Impl::size() const +{ + return maData.size(); +} + +const SfxChildWinContextFactory& SfxChildWinContextArr_Impl::operator []( size_t i ) const +{ + return maData[i]; +} + +SfxChildWinContextFactory& SfxChildWinContextArr_Impl::operator []( size_t i ) +{ + return maData[i]; +} + +void SfxChildWinContextArr_Impl::push_back( SfxChildWinContextFactory* p ) +{ + maData.push_back(p); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/childwinimpl.hxx b/sfx2/source/appl/childwinimpl.hxx new file mode 100644 index 0000000..5095de4 --- /dev/null +++ b/sfx2/source/appl/childwinimpl.hxx @@ -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 . + */ + +#ifndef INCLUDED_SFX2_CHILDWINIMPL_HXX +#define INCLUDED_SFX2_CHILDWINIMPL_HXX + +#include <sfx2/childwin.hxx> + +#include <boost/ptr_container/ptr_vector.hpp> + +class SfxChildWinContextArr_Impl +{ + typedef boost::ptr_vector<SfxChildWinContextFactory> DataType; + DataType maData; + +public: + size_t size() const; + const SfxChildWinContextFactory& operator []( size_t i ) const; + SfxChildWinContextFactory& operator []( size_t i ); + void push_back( SfxChildWinContextFactory* p ); +}; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx index 05bbd61..9e7efb2 100644 --- a/sfx2/source/inc/splitwin.hxx +++ b/sfx2/source/inc/splitwin.hxx @@ -22,6 +22,8 @@ #include <vcl/splitwin.hxx> #include <sfx2/childwin.hxx> +#include <boost/ptr_container/ptr_vector.hpp> + class SfxWorkWindow; class SfxDockingWindow; class SfxEmptySplitWin_Impl; commit 5314ece79ef8abd7d48b9e030d0a73ffac782da1 Author: Kohei Yoshida <[email protected]> Date: Thu Nov 20 21:52:46 2014 -0500 Make the ctor and dtor bodies non-inline. Change-Id: Ie36e3dfa808aec96c080f981a5ad9f09a0720c2c diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 4fe4c00..683ebd5 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -94,7 +94,7 @@ struct SfxChildWinContextFactory typedef boost::ptr_vector<SfxChildWinContextFactory> SfxChildWinContextArr_Impl; -struct SfxChildWinFactory +struct SFX2_DLLPUBLIC SfxChildWinFactory { SfxChildWinCtor pCtor; // Factory method sal_uInt16 nId; // ChildWindow-Id ( SlotId ) @@ -102,19 +102,8 @@ struct SfxChildWinFactory sal_uInt16 nPos; // Position in UI SfxChildWinContextArr_Impl *pArr; // Array for Contexts - SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, - sal_uInt16 n ) - : pCtor(pTheCtor) - , nId( nID ) - , nPos(n) - , pArr( NULL ) - {} - - ~SfxChildWinFactory() - { - delete pArr; - } - + SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, sal_uInt16 n ); + ~SfxChildWinFactory(); }; class FloatingWindow; diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 66d2bb3..d4821d2 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -40,6 +40,19 @@ static const sal_uInt16 nVersion = 2; +SfxChildWinFactory::SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, + sal_uInt16 n ) + : pCtor(pTheCtor) + , nId( nID ) + , nPos(n) + , pArr( NULL ) +{} + +SfxChildWinFactory::~SfxChildWinFactory() +{ + delete pArr; +} + struct SfxChildWindow_Impl { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
