26#include <com/sun/star/beans/XPropertySet.hpp>
27#include <com/sun/star/container/XIndexAccess.hpp>
28#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
35#define EXC_PALETTE_EGA_COLORS_LIGHT \
36 Color(0x000000), Color(0xFFFFFF), Color(0xFF0000), Color(0x00FF00), Color(0x0000FF), Color(0xFFFF00), Color(0xFF00FF), Color(0x00FFFF)
38#define EXC_PALETTE_EGA_COLORS_DARK \
39 Color(0x800000), Color(0x008000), Color(0x000080), Color(0x808000), Color(0x800080), Color(0x008080), Color(0xC0C0C0), Color(0x808080)
62 virtual ::sal_Int32 SAL_CALL getCount()
override
67 virtual uno::Any SAL_CALL getByIndex( ::sal_Int32
Index )
override
70 throw lang::IndexOutOfBoundsException();
75 virtual uno::Type SAL_CALL getElementType()
override
77 return ::cppu::UnoType<sal_Int32>::get();
79 virtual sal_Bool SAL_CALL hasElements()
override
93uno::Reference< container::XIndexAccess >
96 return new DefaultPalette();
99uno::Reference< container::XIndexAccess >
102 uno::Reference< container::XIndexAccess > xIndex;
103 uno::Reference< beans::XPropertySet > xProps;
105 throw uno::RuntimeException(
"Can't extract palette, no doc shell" );
109 xIndex.set( xProps->getPropertyValue(
"ColorPalette"), uno::UNO_QUERY );
111 return new DefaultPalette();
css::uno::Reference< css::container::XIndexAccess > getPalette() const
SfxObjectShell * m_pShell
ScVbaPalette(SfxObjectShell *pShell)
static css::uno::Reference< css::container::XIndexAccess > getDefaultPalette()
css::uno::Reference< css::frame::XModel3 > GetModel() const
#define SAL_N_ELEMENTS(arr)
ScDocShell * getDocShell(const css::uno::Reference< css::frame::XModel > &xModel)
const Color spnDefColorTable8[]
#define EXC_PALETTE_EGA_COLORS_LIGHT
Standard EGA colors, bright.
#define EXC_PALETTE_EGA_COLORS_DARK
Standard EGA colors), dark.
::cppu::WeakImplHelper< container::XIndexAccess > XIndexAccess_BASE