xref: /aoo41x/main/sc/source/ui/vba/vbapalette.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_VBAPALETTE_HXX
29 #define SC_VBAPALETTE_HXX
30 
31 #include <vbahelper/vbahelper.hxx>
32 
33 namespace com { namespace sun { namespace star {
34     namespace container { class XIndexAccess; }
35     namespace frame { class XModel; }
36 } } }
37 
38 class SfxObjectShell;
39 
40 class ScVbaPalette
41 {
42 private:
43 	SfxObjectShell* m_pShell;
44 public:
45 	ScVbaPalette( SfxObjectShell* pShell = 0 ) : m_pShell( pShell ) {}
46 	ScVbaPalette( const css::uno::Reference< css::frame::XModel >& rxModel );
47 	// if no palette available e.g. because the document doesn't have a
48 	// palette defined then a default palette will be returned.
49 	css::uno::Reference< css::container::XIndexAccess > getPalette() const;
50 	static css::uno::Reference< css::container::XIndexAccess > getDefaultPalette();
51 };
52 
53 #endif //SC_VBAPALETTE_HXX
54 
55