LibreOffice Module sc (master) 1
vbainterior.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <ooo/vba/excel/XInterior.hpp>
22#include <com/sun/star/uno/XComponentContext.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/container/XIndexAccess.hpp>
25#include <com/sun/star/container/XNameContainer.hpp>
26
28
29#include <tools/color.hxx>
30
31class ScDocument;
32
34
36{
37 css::uno::Reference< css::beans::XPropertySet > m_xProps;
40 sal_Int32 m_nPattern;
41
42 css::uno::Reference< css::container::XIndexAccess > getPalette() const;
43 css::uno::Reference< css::container::XNameContainer > GetAttributeContainer();
44 static css::uno::Any SetAttributeData( sal_Int32 nValue );
45 static sal_Int32 GetAttributeData( css::uno::Any const & aValue );
47 static Color GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern );
48 static Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans );
49 static sal_uInt8 GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans );
50 css::uno::Any GetIndexColor( sal_Int32 nColorIndex );
51 sal_Int32 GetColorIndex( const sal_Int32 nColor );
52 css::uno::Any GetUserDefinedAttributes( const OUString& sName );
53 void SetUserDefinedAttributes( const OUString& sName, const css::uno::Any& aValue );
54 void SetMixedColor();
55
56public:
58 ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
59 css::uno::Reference< css::beans::XPropertySet > xProps, ScDocument* pScDoc = nullptr);
60
61 virtual css::uno::Any SAL_CALL getColor() override ;
62 virtual void SAL_CALL setColor( const css::uno::Any& _color ) override ;
63
64 virtual css::uno::Any SAL_CALL getColorIndex() override;
65 virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) override;
66 virtual css::uno::Any SAL_CALL getPattern() override;
67 virtual void SAL_CALL setPattern( const css::uno::Any& _pattern ) override;
68 virtual css::uno::Any SAL_CALL getPatternColor() override;
69 virtual void SAL_CALL setPatternColor( const css::uno::Any& _patterncolor ) override;
70 virtual css::uno::Any SAL_CALL getPatternColorIndex() override;
71 virtual void SAL_CALL setPatternColorIndex( const css::uno::Any& _patterncolorindex ) override;
72 css::uno::Any SAL_CALL getThemeColor() override;
73 void SAL_CALL setThemeColor(const css::uno::Any& rAny) override;
74 css::uno::Any SAL_CALL getTintAndShade() override;
75 void SAL_CALL setTintAndShade(const css::uno::Any& rAny) override;
76 css::uno::Any SAL_CALL getPatternTintAndShade() override;
77 void SAL_CALL setPatternTintAndShade(const css::uno::Any& rAny) override;
78 //XHelperInterface
79 virtual OUString getServiceImplName() override;
80 virtual css::uno::Sequence<OUString> getServiceNames() override;
81};
82
83/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL setColorIndex(const css::uno::Any &_colorindex) override
sal_Int32 GetColorIndex(const sal_Int32 nColor)
Color GetBackColor()
static css::uno::Any SetAttributeData(sal_Int32 nValue)
css::uno::Reference< css::container::XIndexAccess > getPalette() const
Color m_aPattColor
Definition: vbainterior.hxx:39
virtual css::uno::Any SAL_CALL getPatternColorIndex() override
ScDocument * m_pScDoc
Definition: vbainterior.hxx:38
sal_Int32 m_nPattern
Definition: vbainterior.hxx:40
css::uno::Any GetIndexColor(sal_Int32 nColorIndex)
static sal_uInt8 GetMixedColorComp(sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans)
virtual css::uno::Any SAL_CALL getPatternColor() override
void SetMixedColor()
Definition: vbainterior.cxx:95
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual css::uno::Any SAL_CALL getPattern() override
void SAL_CALL setTintAndShade(const css::uno::Any &rAny) override
virtual void SAL_CALL setPattern(const css::uno::Any &_pattern) override
ScVbaInterior(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::beans::XPropertySet > xProps, ScDocument *pScDoc=nullptr)
Definition: vbainterior.cxx:68
static sal_Int32 GetAttributeData(css::uno::Any const &aValue)
css::uno::Reference< css::beans::XPropertySet > m_xProps
Definition: vbainterior.hxx:37
virtual OUString getServiceImplName() override
virtual void SAL_CALL setColor(const css::uno::Any &_color) override
Definition: vbainterior.cxx:84
void SetUserDefinedAttributes(const OUString &sName, const css::uno::Any &aValue)
virtual css::uno::Any SAL_CALL getColorIndex() override
virtual void SAL_CALL setPatternColorIndex(const css::uno::Any &_patterncolorindex) override
css::uno::Any SAL_CALL getThemeColor() override
static Color GetPatternColor(const Color &rPattColor, const Color &rBackColor, sal_uInt32 nXclPattern)
static Color GetMixedColor(const Color &rFore, const Color &rBack, sal_uInt8 nTrans)
virtual void SAL_CALL setPatternColor(const css::uno::Any &_patterncolor) override
void SAL_CALL setThemeColor(const css::uno::Any &rAny) override
css::uno::Any SAL_CALL getTintAndShade() override
css::uno::Reference< css::container::XNameContainer > GetAttributeContainer()
css::uno::Any GetUserDefinedAttributes(const OUString &sName)
css::uno::Any SAL_CALL getPatternTintAndShade() override
void SAL_CALL setPatternTintAndShade(const css::uno::Any &rAny) override
virtual css::uno::Any SAL_CALL getColor() override
Definition: vbainterior.cxx:78
unsigned char sal_uInt8
InheritedHelperInterfaceWeakImpl< ov::excel::XInterior > ScVbaInterior_BASE
Definition: vbainterior.hxx:31