1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 #ifndef INCLUDED_SC_SOURCE_FILTER_EXCEL_XLTOOLBAR_HXX
10 #define INCLUDED_SC_SOURCE_FILTER_EXCEL_XLTOOLBAR_HXX
12 #include <filter/msfilter/mstoolbar.hxx>
15 // hmm I don't normally use these packed structures
16 // but.. hey always good to do something different
17 class TBCCmd
: public TBBase
20 TBCCmd() : cmdID(0), A(false), B(false), cmdType(0), C(false), reserved3(0)
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
;
34 class ScTBC
: public TBBase
37 std::shared_ptr
<TBCCmd
> tbcCmd
; // optional
38 std::shared_ptr
<TBCData
> tbcd
;
42 #if OSL_DEBUG_LEVEL > 1
43 virtual void Print( FILE* ) SAL_OVERRIDE
;
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
53 std::vector
<TBVisualData
> rVisualData
;
55 std::vector
< ScTBC
> rTBC
;
56 bool ImportCustomToolBar_Impl( ScCTBWrapper
&, CustomToolBarImportHelper
& );
60 #if OSL_DEBUG_LEVEL > 1
61 virtual void Print( FILE* ) SAL_OVERRIDE
;
63 bool Read(SvStream
&rS
) SAL_OVERRIDE
;
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
83 CTBS
& operator = ( const CTBS
&);
86 #if OSL_DEBUG_LEVEL > 1
87 virtual void Print( FILE* ) SAL_OVERRIDE
;
89 bool Read(SvStream
&rS
) SAL_OVERRIDE
;
92 class ScCTBWrapper
: public TBBase
96 std::vector
< ScCTB
> rCTB
;
100 virtual ~ScCTBWrapper();
101 bool Read(SvStream
&rS
) SAL_OVERRIDE
;
102 #if OSL_DEBUG_LEVEL > 1
103 virtual void Print( FILE* ) SAL_OVERRIDE
;
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: */