Update ooo320-m1
[ooovba.git] / sc / source / filter / excel / xltoolbar.hxx
blobdeef46c18801ae0248ff3247cc04a1e660677558
1 #ifndef _XLTOOLBAR_HXX
2 #define _XLTOOLBAR_HXX
4 #include <svx/mstoolbar.hxx>
6 namespace css = ::com::sun::star;
8 class CTBWrapper;
9 // hmm I don't normally use these packed structures
10 // but.. hey always good to do something different
11 class TBCCmd : public TBBase
13 public:
14 TBCCmd() : cmdID(0), A(0), B(0), cmdType(0), C(0), reserved3(0) {}
15 sal_uInt16 cmdID;
16 sal_uInt16 A:1;
17 sal_uInt16 B:1;
18 sal_uInt16 cmdType:5;
19 sal_uInt16 C:1;
20 sal_uInt16 reserved3:8;
21 bool Read( SvStream* pS );
22 void Print(FILE* fp);
25 class TBC : public TBBase
27 TBCHeader tbch;
28 boost::shared_ptr<TBCCmd> tbcCmd; // optional
29 boost::shared_ptr<TBCData> tbcd;
30 public:
31 TBC();
32 ~TBC(){}
33 void Print( FILE* );
34 bool Read(SvStream *pS);
35 bool ImportToolBarControl( CTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
38 class CTB : public TBBase
40 sal_uInt16 nViews;
41 TB tb;
42 std::vector<TBVisualData> rVisualData;
43 sal_uInt32 ectbid;
44 std::vector< TBC > rTBC;
45 bool ImportCustomToolBar_Impl( CTBWrapper&, CustomToolBarImportHelper& );
46 public:
47 CTB();
48 CTB(sal_uInt16);
49 ~CTB(){}
50 void Print( FILE* );
51 bool Read(SvStream *pS);
52 bool IsMenuToolbar();
53 bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& );
54 bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
55 rtl::OUString GetName() { return tb.getName().getString(); }
60 class CTBS : public TBBase
62 public:
63 sal_uInt8 bSignature;
64 sal_uInt8 bVersion;
65 sal_uInt16 reserved1;
66 sal_uInt16 reserved2;
67 sal_uInt16 reserved3;
68 sal_uInt16 ctb;
69 sal_uInt16 ctbViews;
70 sal_uInt16 ictbView;
71 CTBS(const CTBS&);
72 CTBS& operator = ( const CTBS&);
73 CTBS();
74 ~CTBS(){}
75 void Print( FILE* );
76 bool Read(SvStream *pS);
79 class CTBWrapper : public TBBase
81 CTBS ctbSet;
83 std::vector< CTB > rCTB;
85 public:
86 CTBWrapper();
87 ~CTBWrapper();
88 bool Read(SvStream *pS);
89 void Print( FILE* );
90 bool ImportCustomToolBar( SfxObjectShell& rDocSh );
91 CTB* GetCustomizationData( const rtl::OUString& name );
95 #endif //_XLTOOLBAR_HXX