fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / excel / xltoolbar.hxx
blob3a9658ce6027c9e3cc40a97bc17ca911e4a4657b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9 #ifndef INCLUDED_SC_SOURCE_FILTER_EXCEL_XLTOOLBAR_HXX
10 #define INCLUDED_SC_SOURCE_FILTER_EXCEL_XLTOOLBAR_HXX
12 #include <filter/msfilter/mstoolbar.hxx>
14 class ScCTBWrapper;
15 // hmm I don't normally use these packed structures
16 // but.. hey always good to do something different
17 class TBCCmd : public TBBase
19 public:
20 TBCCmd() : cmdID(0), A(false), B(false), cmdType(0), C(false), reserved3(0)
22 sal_uInt16 cmdID;
23 bool A:1;
24 bool B:1;
25 sal_uInt16 cmdType:5;
26 bool C:1;
27 sal_uInt16 reserved3:8;
28 bool Read( SvStream& rS ) SAL_OVERRIDE;
29 #if OSL_DEBUG_LEVEL > 1
30 virtual void Print(FILE* fp) SAL_OVERRIDE;
31 #endif
34 class ScTBC : public TBBase
36 TBCHeader tbch;
37 std::shared_ptr<TBCCmd> tbcCmd; // optional
38 std::shared_ptr<TBCData> tbcd;
39 public:
40 ScTBC();
41 virtual ~ScTBC(){}
42 #if OSL_DEBUG_LEVEL > 1
43 virtual void Print( FILE* ) SAL_OVERRIDE;
44 #endif
45 bool Read(SvStream &rS) SAL_OVERRIDE;
46 bool ImportToolBarControl( ScCTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
49 class ScCTB : public TBBase
51 sal_uInt16 nViews;
52 TB tb;
53 std::vector<TBVisualData> rVisualData;
54 sal_uInt32 ectbid;
55 std::vector< ScTBC > rTBC;
56 bool ImportCustomToolBar_Impl( ScCTBWrapper&, CustomToolBarImportHelper& );
57 public:
58 ScCTB(sal_uInt16);
59 virtual ~ScCTB(){}
60 #if OSL_DEBUG_LEVEL > 1
61 virtual void Print( FILE* ) SAL_OVERRIDE;
62 #endif
63 bool Read(SvStream &rS) SAL_OVERRIDE;
64 bool IsMenuToolbar();
65 bool ImportCustomToolBar( ScCTBWrapper&, CustomToolBarImportHelper& );
66 bool ImportMenuTB( ScCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
67 OUString GetName() { return tb.getName().getString(); }
71 class CTBS : public TBBase
73 public:
74 sal_uInt8 bSignature;
75 sal_uInt8 bVersion;
76 sal_uInt16 reserved1;
77 sal_uInt16 reserved2;
78 sal_uInt16 reserved3;
79 sal_uInt16 ctb;
80 sal_uInt16 ctbViews;
81 sal_uInt16 ictbView;
82 CTBS(const CTBS&);
83 CTBS& operator = ( const CTBS&);
84 CTBS();
85 virtual ~CTBS(){}
86 #if OSL_DEBUG_LEVEL > 1
87 virtual void Print( FILE* ) SAL_OVERRIDE;
88 #endif
89 bool Read(SvStream &rS) SAL_OVERRIDE;
92 class ScCTBWrapper : public TBBase
94 CTBS ctbSet;
96 std::vector< ScCTB > rCTB;
98 public:
99 ScCTBWrapper();
100 virtual ~ScCTBWrapper();
101 bool Read(SvStream &rS) SAL_OVERRIDE;
102 #if OSL_DEBUG_LEVEL > 1
103 virtual void Print( FILE* ) SAL_OVERRIDE;
104 #endif
105 bool ImportCustomToolBar( SfxObjectShell& rDocSh );
106 ScCTB* GetCustomizationData( const OUString& name );
109 #endif // INCLUDED_SC_SOURCE_FILTER_EXCEL_XLTOOLBAR_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */