diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /sc/source/ui/vba/vbainterior.hxx | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | sc/source/ui/vba/vbainterior.hxx | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx new file mode 100644 index 000000000..c06675ee2 --- /dev/null +++ b/sc/source/ui/vba/vbainterior.hxx @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAINTERIOR_HXX +#define INCLUDED_SC_SOURCE_UI_VBA_VBAINTERIOR_HXX + +#include <ooo/vba/excel/XInterior.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/container/XNameContainer.hpp> + +#include <vbahelper/vbahelperinterface.hxx> + +#include <tools/color.hxx> + +class ScDocument; + +typedef InheritedHelperInterfaceWeakImpl< ov::excel::XInterior > ScVbaInterior_BASE; + +class ScVbaInterior final : public ScVbaInterior_BASE +{ + css::uno::Reference< css::beans::XPropertySet > m_xProps; + ScDocument* m_pScDoc; + Color m_aPattColor; + sal_Int32 m_nPattern; + + css::uno::Reference< css::container::XIndexAccess > getPalette() const; + css::uno::Reference< css::container::XNameContainer > GetAttributeContainer(); + static css::uno::Any SetAttributeData( sal_Int32 nValue ); + static sal_Int32 GetAttributeData( css::uno::Any const & aValue ); + Color GetBackColor(); + static Color GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern ); + static Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans ); + static sal_uInt8 GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans ); + css::uno::Any GetIndexColor( sal_Int32 nColorIndex ); + sal_Int32 GetColorIndex( const sal_Int32 nColor ); + css::uno::Any GetUserDefinedAttributes( const OUString& sName ); + void SetUserDefinedAttributes( const OUString& sName, const css::uno::Any& aValue ); + void SetMixedColor(); + +public: + /// @throws css::lang::IllegalArgumentException + ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, + const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = nullptr); + + virtual css::uno::Any SAL_CALL getColor() override ; + virtual void SAL_CALL setColor( const css::uno::Any& _color ) override ; + + virtual css::uno::Any SAL_CALL getColorIndex() override; + virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) override; + virtual css::uno::Any SAL_CALL getPattern() override; + virtual void SAL_CALL setPattern( const css::uno::Any& _pattern ) override; + virtual css::uno::Any SAL_CALL getPatternColor() override; + virtual void SAL_CALL setPatternColor( const css::uno::Any& _patterncolor ) override; + virtual css::uno::Any SAL_CALL getPatternColorIndex() override; + virtual void SAL_CALL setPatternColorIndex( const css::uno::Any& _patterncolorindex ) override; + css::uno::Any SAL_CALL getThemeColor() override; + void SAL_CALL setThemeColor(const css::uno::Any& rAny) override; + css::uno::Any SAL_CALL getTintAndShade() override; + void SAL_CALL setTintAndShade(const css::uno::Any& rAny) override; + css::uno::Any SAL_CALL getPatternTintAndShade() override; + void SAL_CALL setPatternTintAndShade(const css::uno::Any& rAny) override; + //XHelperInterface + virtual OUString getServiceImplName() override; + virtual css::uno::Sequence<OUString> getServiceNames() override; +}; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |