1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * Version: MPL 1.1 / GPLv3+ / LGPLv3+
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License or as specified alternatively below. You may obtain a copy of
8 * the License at http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Initial Developer of the Original Code is
16 * Noel Power <noel.power@novell.com>
17 * Portions created by the Initial Developer are Copyright (C) 2010 the
18 * Initial Developer. All Rights Reserved.
21 * Noel Power <noel.power@novell.com>
23 * For minor contributions see the git repository.
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
27 * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
28 * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
29 * instead of those above.
31 #ifndef _XLTOOLBAR_HXX
32 #define _XLTOOLBAR_HXX
34 #include <filter/msfilter/mstoolbar.hxx>
37 // hmm I don't normally use these packed structures
38 // but.. hey always good to do something different
39 class TBCCmd
: public TBBase
42 TBCCmd() : cmdID(0), A(0), B(0), cmdType(0), C(0), reserved3(0) {}
48 sal_uInt16 reserved3
:8;
49 bool Read( SvStream
& rS
);
53 class ScTBC
: public TBBase
56 boost::shared_ptr
<TBCCmd
> tbcCmd
; // optional
57 boost::shared_ptr
<TBCData
> tbcd
;
62 bool Read(SvStream
&rS
);
63 bool ImportToolBarControl( ScCTBWrapper
&, const com::sun::star::uno::Reference
< com::sun::star::container::XIndexContainer
>& toolbarcontainer
, CustomToolBarImportHelper
& helper
, bool bIsMenuBar
);
66 class ScCTB
: public TBBase
70 std::vector
<TBVisualData
> rVisualData
;
72 std::vector
< ScTBC
> rTBC
;
73 bool ImportCustomToolBar_Impl( ScCTBWrapper
&, CustomToolBarImportHelper
& );
78 bool Read(SvStream
&rS
);
80 bool ImportCustomToolBar( ScCTBWrapper
&, CustomToolBarImportHelper
& );
81 bool ImportMenuTB( ScCTBWrapper
&, const css::uno::Reference
< css::container::XIndexContainer
>&, CustomToolBarImportHelper
& );
82 rtl::OUString
GetName() { return tb
.getName().getString(); }
87 class CTBS
: public TBBase
99 CTBS
& operator = ( const CTBS
&);
103 bool Read(SvStream
&rS
);
106 class ScCTBWrapper
: public TBBase
110 std::vector
< ScCTB
> rCTB
;
115 bool Read(SvStream
&rS
);
117 bool ImportCustomToolBar( SfxObjectShell
& rDocSh
);
118 ScCTB
* GetCustomizationData( const rtl::OUString
& name
);
122 #endif //_XLTOOLBAR_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */