Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / sc / source / filter / excel / xltoolbar.hxx
blob41b10028f016fefc224fef58fabad3065e6056ad
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
13 * License.
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.
20 * Contributor(s):
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>
36 class ScCTBWrapper;
37 // hmm I don't normally use these packed structures
38 // but.. hey always good to do something different
39 class TBCCmd : public TBBase
41 public:
42 TBCCmd() : cmdID(0), A(0), B(0), cmdType(0), C(0), reserved3(0) {}
43 sal_uInt16 cmdID;
44 sal_uInt16 A:1;
45 sal_uInt16 B:1;
46 sal_uInt16 cmdType:5;
47 sal_uInt16 C:1;
48 sal_uInt16 reserved3:8;
49 bool Read( SvStream& rS );
50 void Print(FILE* fp);
53 class ScTBC : public TBBase
55 TBCHeader tbch;
56 boost::shared_ptr<TBCCmd> tbcCmd; // optional
57 boost::shared_ptr<TBCData> tbcd;
58 public:
59 ScTBC();
60 ~ScTBC(){}
61 void Print( FILE* );
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
68 sal_uInt16 nViews;
69 TB tb;
70 std::vector<TBVisualData> rVisualData;
71 sal_uInt32 ectbid;
72 std::vector< ScTBC > rTBC;
73 bool ImportCustomToolBar_Impl( ScCTBWrapper&, CustomToolBarImportHelper& );
74 public:
75 ScCTB(sal_uInt16);
76 ~ScCTB(){}
77 void Print( FILE* );
78 bool Read(SvStream &rS);
79 bool IsMenuToolbar();
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
89 public:
90 sal_uInt8 bSignature;
91 sal_uInt8 bVersion;
92 sal_uInt16 reserved1;
93 sal_uInt16 reserved2;
94 sal_uInt16 reserved3;
95 sal_uInt16 ctb;
96 sal_uInt16 ctbViews;
97 sal_uInt16 ictbView;
98 CTBS(const CTBS&);
99 CTBS& operator = ( const CTBS&);
100 CTBS();
101 ~CTBS(){}
102 void Print( FILE* );
103 bool Read(SvStream &rS);
106 class ScCTBWrapper : public TBBase
108 CTBS ctbSet;
110 std::vector< ScCTB > rCTB;
112 public:
113 ScCTBWrapper();
114 ~ScCTBWrapper();
115 bool Read(SvStream &rS);
116 void Print( FILE* );
117 bool ImportCustomToolBar( SfxObjectShell& rDocSh );
118 ScCTB* GetCustomizationData( const rtl::OUString& name );
122 #endif //_XLTOOLBAR_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */