Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 : : *
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/
9 : : *
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.
14 : : *
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.
19 : : *
20 : : * Contributor(s):
21 : : * Noel Power <noel.power@novell.com>
22 : : *
23 : : * For minor contributions see the git repository.
24 : : *
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.
30 : : */
31 : : #ifndef _XLTOOLBAR_HXX
32 : : #define _XLTOOLBAR_HXX
33 : :
34 : : #include <filter/msfilter/mstoolbar.hxx>
35 : :
36 : : namespace css = ::com::sun::star;
37 : :
38 : : class CTBWrapper;
39 : : // hmm I don't normally use these packed structures
40 : : // but.. hey always good to do something different
41 [ # # ]: 0 : class TBCCmd : public TBBase
42 : : {
43 : : public:
44 : 0 : TBCCmd() : cmdID(0), A(0), B(0), cmdType(0), C(0), reserved3(0) {}
45 : : sal_uInt16 cmdID;
46 : : sal_uInt16 A:1;
47 : : sal_uInt16 B:1;
48 : : sal_uInt16 cmdType:5;
49 : : sal_uInt16 C:1;
50 : : sal_uInt16 reserved3:8;
51 : : bool Read( SvStream& rS );
52 : : void Print(FILE* fp);
53 : : };
54 : :
55 [ # # ][ # # ]: 0 : class TBC : public TBBase
[ # # ]
56 : : {
57 : : TBCHeader tbch;
58 : : boost::shared_ptr<TBCCmd> tbcCmd; // optional
59 : : boost::shared_ptr<TBCData> tbcd;
60 : : public:
61 : : TBC();
62 [ # # ][ # # ]: 0 : ~TBC(){}
[ # # ][ # # ]
63 : : void Print( FILE* );
64 : : bool Read(SvStream &rS);
65 : : bool ImportToolBarControl( CTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
66 : : };
67 : :
68 [ # # ][ # # ]: 0 : class CTB : public TBBase
[ # # ]
69 : : {
70 : : sal_uInt16 nViews;
71 : : TB tb;
72 : : std::vector<TBVisualData> rVisualData;
73 : : sal_uInt32 ectbid;
74 : : std::vector< TBC > rTBC;
75 : : bool ImportCustomToolBar_Impl( CTBWrapper&, CustomToolBarImportHelper& );
76 : : public:
77 : : CTB();
78 : : CTB(sal_uInt16);
79 [ # # ]: 0 : ~CTB(){}
80 : : void Print( FILE* );
81 : : bool Read(SvStream &rS);
82 : : bool IsMenuToolbar();
83 : : bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& );
84 : : bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
85 : 0 : rtl::OUString GetName() { return tb.getName().getString(); }
86 : :
87 : :
88 : : };
89 : :
90 : : class CTBS : public TBBase
91 : : {
92 : : public:
93 : : sal_uInt8 bSignature;
94 : : sal_uInt8 bVersion;
95 : : sal_uInt16 reserved1;
96 : : sal_uInt16 reserved2;
97 : : sal_uInt16 reserved3;
98 : : sal_uInt16 ctb;
99 : : sal_uInt16 ctbViews;
100 : : sal_uInt16 ictbView;
101 : : CTBS(const CTBS&);
102 : : CTBS& operator = ( const CTBS&);
103 : : CTBS();
104 [ - + ]: 13 : ~CTBS(){}
105 : : void Print( FILE* );
106 : : bool Read(SvStream &rS);
107 : : };
108 : :
109 : : class CTBWrapper : public TBBase
110 : : {
111 : : CTBS ctbSet;
112 : :
113 : : std::vector< CTB > rCTB;
114 : :
115 : : public:
116 : : CTBWrapper();
117 : : ~CTBWrapper();
118 : : bool Read(SvStream &rS);
119 : : void Print( FILE* );
120 : : bool ImportCustomToolBar( SfxObjectShell& rDocSh );
121 : : CTB* GetCustomizationData( const rtl::OUString& name );
122 : : };
123 : :
124 : :
125 : : #endif //_XLTOOLBAR_HXX
126 : :
127 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|