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 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAINTERIOR_HXX
20 #define INCLUDED_SC_SOURCE_UI_VBA_VBAINTERIOR_HXX
22 #include <ooo/vba/excel/XInterior.hpp>
23 #include <com/sun/star/uno/XComponentContext.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/container/XIndexAccess.hpp>
26 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/script/XInvocation.hpp>
29 #include <vbahelper/vbahelperinterface.hxx>
31 #include <tools/color.hxx>
35 typedef InheritedHelperInterfaceImpl1
< ov::excel::XInterior
> ScVbaInterior_BASE
;
37 class ScVbaInterior
: public ScVbaInterior_BASE
39 css::uno::Reference
< css::beans::XPropertySet
> m_xProps
;
44 css::uno::Reference
< css::container::XIndexAccess
> getPalette();
45 css::uno::Reference
< css::container::XNameContainer
> GetAttributeContainer();
46 static css::uno::Any
SetAttributeData( sal_Int32 nValue
);
47 static sal_Int32
GetAttributeData( css::uno::Any aValue
);
50 static Color
GetPatternColor( const Color
& rPattColor
, const Color
& rBackColor
, sal_uInt32 nXclPattern
);
51 static Color
GetMixedColor( const Color
& rFore
, const Color
& rBack
, sal_uInt8 nTrans
);
52 static sal_uInt8
GetMixedColorComp( sal_uInt8 nFore
, sal_uInt8 nBack
, sal_uInt8 nTrans
);
53 css::uno::Any
GetIndexColor( const sal_Int32
& nColorIndex
);
54 sal_Int32
GetColorIndex( const sal_Int32 nColor
);
55 css::uno::Any
GetUserDefinedAttributes( const OUString
& sName
);
56 void SetUserDefinedAttributes( const OUString
& sName
, const css::uno::Any
& aValue
);
59 ScVbaInterior( const css::uno::Reference
< ov::XHelperInterface
>& xParent
, const css::uno::Reference
< css::uno::XComponentContext
>& xContext
,
60 const css::uno::Reference
< css::beans::XPropertySet
>& xProps
, ScDocument
* pScDoc
= NULL
) throw ( css::lang::IllegalArgumentException
);
62 virtual ~ScVbaInterior(){}
64 virtual css::uno::Any SAL_CALL
getColor() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual void SAL_CALL
setColor( const css::uno::Any
& _color
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual css::uno::Any SAL_CALL
getColorIndex() throw ( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 virtual void SAL_CALL
setColorIndex( const css::uno::Any
& _colorindex
) throw ( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
69 virtual css::uno::Any SAL_CALL
getPattern() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 virtual void SAL_CALL
setPattern( const css::uno::Any
& _pattern
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
71 virtual css::uno::Any SAL_CALL
getPatternColor() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
72 virtual void SAL_CALL
setPatternColor( const css::uno::Any
& _patterncolor
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
73 virtual css::uno::Any SAL_CALL
getPatternColorIndex() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
74 virtual void SAL_CALL
setPatternColorIndex( const css::uno::Any
& _patterncolorindex
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 virtual OUString
getServiceImplName() SAL_OVERRIDE
;
77 virtual css::uno::Sequence
<OUString
> getServiceNames() SAL_OVERRIDE
;
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */