diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-02-27 03:16:35 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-04-09 11:39:17 +0200 |
commit | 653712fa57223382bd6c7acc7296e02accfe8fd8 (patch) | |
tree | ff435ba1ea657105c1486df9b4653065e39064b6 | |
parent | 315b8b63a481922670f1e01482777c359087128c (diff) |
add implementation for new conditional formatting
Change-Id: I4c283ec8a1f5b51c0274d9c520cd653be7f75aa2
Conflicts:
sc/Library_sc.mk
Author: Markus Mohrhard <markus.mohrhard@collabora.co.uk>
-rw-r--r-- | offapi/com/sun/star/sheet/ConditionalFormat.idl | 2 | ||||
-rw-r--r-- | sc/Library_sc.mk | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatuno.hxx | 353 | ||||
-rw-r--r-- | sc/source/ui/unoobj/condformatuno.cxx | 434 |
4 files changed, 789 insertions, 1 deletions
diff --git a/offapi/com/sun/star/sheet/ConditionalFormat.idl b/offapi/com/sun/star/sheet/ConditionalFormat.idl index d168da36e2f6..953d3cff2ba1 100644 --- a/offapi/com/sun/star/sheet/ConditionalFormat.idl +++ b/offapi/com/sun/star/sheet/ConditionalFormat.idl @@ -35,7 +35,7 @@ service ConditionalFormat /** represents the range for the conditional format All ranges have to be in the same sheet. */ - [property] XSheetCellRanges range; + [property] XSheetCellRanges Range; [property] long ID; }; diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 2583937b46e0..3eb1fbe9090d 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -481,6 +481,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/unoobj/cellvaluebinding \ sc/source/ui/unoobj/chart2uno \ sc/source/ui/unoobj/chartuno \ + sc/source/ui/unoobj/condformatuno \ sc/source/ui/unoobj/confuno \ sc/source/ui/unoobj/convuno \ sc/source/ui/unoobj/cursuno \ diff --git a/sc/source/ui/inc/condformatuno.hxx b/sc/source/ui/inc/condformatuno.hxx new file mode 100644 index 000000000000..4d83fc94f000 --- /dev/null +++ b/sc/source/ui/inc/condformatuno.hxx @@ -0,0 +1,353 @@ +/* -*- 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/. + */ + +#ifndef _SC_CONDFORMATUNO_HXX_ +#define _SC_CONDFORMATUNO_HXX_ + +#include "address.hxx" + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/sheet/XConditionalFormats.hpp> +#include <com/sun/star/sheet/XConditionalFormat.hpp> +#include <com/sun/star/sheet/XConditionEntry.hpp> + +#include <cppuhelper/weak.hxx> +#include <svl/itemprop.hxx> + +class ScDocument; +class ScConditionalFormatList; +class ScConditionalFormat; +class ScIconSetFormat; +class ScDataBarFormat; +class ScColorScale; + +using namespace com::sun::star; + +namespace com { namespace sun { namespace star { + +namespace sheet { + +class XSheetCellRanges; + +} + +} } } + +class ScCondFormatsObj : public com::sun::star::sheet::XConditionalFormats, + public cppu::OWeakObject +{ +public: + ScCondFormatsObj(ScDocument* pDoc, SCTAB nTab); + + virtual ~ScCondFormatsObj(); + + // XConditionalFormats + virtual SAL_CALL sal_Int32 addByRange( const uno::Reference< sheet::XConditionalFormat >& xCondFormat, + const uno::Reference<sheet::XSheetCellRanges>& xRanges) + throw(::com::sun::star::uno::RuntimeException, + std::exception) SAL_OVERRIDE; + + virtual SAL_CALL void removeByID( const sal_Int32 nID ) + throw(::com::sun::star::uno::RuntimeException, + std::exception) SAL_OVERRIDE; + + virtual SAL_CALL uno::Sequence< uno::Reference< sheet::XConditionalFormat > > getConditionalFormats() + throw(::com::sun::star::uno::RuntimeException, + std::exception) SAL_OVERRIDE; + + virtual SAL_CALL sal_Int32 getLength() + throw(::com::sun::star::uno::RuntimeException, + std::exception) SAL_OVERRIDE; + +private: + ScConditionalFormatList* mpFormatList; +}; + +class ScCondFormatObj : public com::sun::star::sheet::XConditionalFormat, + public com::sun::star::beans::XPropertySet, + public cppu::OWeakObject +{ +public: + ScCondFormatObj(ScDocument* pDoc, ScConditionalFormat* pList); + + virtual ~ScCondFormatObj(); + + // XConditionalFormat + virtual SAL_CALL void addEntry(const uno::Reference<sheet::XConditionEntry>& xEntry) + throw(::com::sun::star::uno::RuntimeException, + std::exception) SAL_OVERRIDE; + + virtual SAL_CALL void removeByIndex(const sal_Int32 nIndex) + throw(::com::sun::star::uno::RuntimeException, + std::exception) SAL_OVERRIDE; + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + SAL_CALL getPropertySetInfo() + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, + const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const OUString& PropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + +private: + ScConditionalFormat* mpFormat; + SfxItemPropertySet maPropSet; +}; + +class ScConditionEntryObj : public com::sun::star::beans::XPropertySet, + public com::sun::star::sheet::XConditionEntry, + public cppu::OWeakObject +{ +public: + + virtual ~ScConditionEntryObj(); + + // XConditionEntry + virtual SAL_CALL sal_Int32 getType() + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + SAL_CALL getPropertySetInfo() + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, + const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const OUString& PropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + +private: + SfxItemPropertySet maPropSet; +}; + +class ScColorScaleFormatObj : public com::sun::star::beans::XPropertySet, + public cppu::OWeakObject +{ +public: + + virtual ~ScColorScaleFormatObj(); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + SAL_CALL getPropertySetInfo() + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, + const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const OUString& PropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + +private: + ScColorScale* pColorScale; + SfxItemPropertySet maPropSet; +}; + +class ScDataBarFormatObj : public com::sun::star::beans::XPropertySet, + public cppu::OWeakObject +{ +public: + virtual ~ScDataBarFormatObj(); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + SAL_CALL getPropertySetInfo() + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, + const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const OUString& PropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + +private: + ScDataBarFormat* pDataBar; + SfxItemPropertySet maPropSet; +}; + +class ScIconSetFormatObj : public com::sun::star::beans::XPropertySet, + public cppu::OWeakObject +{ +public: + virtual ~ScIconSetFormatObj(); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + SAL_CALL getPropertySetInfo() + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, + const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const OUString& PropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + +private: + + ScIconSetFormat* pIconSet; + SfxItemPropertySet maPropSet; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx new file mode 100644 index 000000000000..af7496f65224 --- /dev/null +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -0,0 +1,434 @@ +/* -*- 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/. + */ + +#include "condformatuno.hxx" + +#include "document.hxx" +#include "conditio.hxx" +#include "colorscale.hxx" + +#include <vcl/svapp.hxx> +#include <rt/ustring.hxx> + +namespace { + +const SfxItemPropertyMapEntry* getCondFormatPropset() +{ + static const SfxItemPropertyMapEntry aCondFormatPropertyMap_Impl[] = + { + {OUString("ID"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0}, + {OUString("Range"), 0, cppu::UnoType<sheet::XSheetCellRanges>::get(), 0, 0}, + {OUString(), 0, css::uno::Type(), 0, 0} + }; + return aCondFormatPropertyMap_Impl; +} + +} + +ScCondFormatsObj::ScCondFormatsObj(ScDocument* pDoc, SCTAB nTab): + mpFormatList(pDoc->GetCondFormList(nTab)) +{ +} + +sal_Int32 ScCondFormatsObj::addByRange(const uno::Reference< sheet::XConditionalFormat >& xCondFormat, + const uno::Reference< sheet::XSheetCellRanges >& xRanges) + throw(uno::RuntimeException, std::exception) +{ + + return 0; +} + +void ScCondFormatsObj::removeByID(const sal_Int32 nID) + throw(uno::RuntimeException, std::exception) +{ +} + +uno::Sequence<uno::Reference<sheet::XConditionalFormat> > ScCondFormatsObj::getConditionalFormats() + throw(uno::RuntimeException, std::exception) +{ + return uno::Sequence<uno::Reference<sheet::XConditionalFormat> >(); +} + +sal_Int32 ScCondFormatsObj::getLength() + throw(uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + return mpFormatList->size();; +} + +ScCondFormatObj::ScCondFormatObj(ScDocument* pDoc, ScConditionalFormat* pFormat): + mpFormat(pFormat), + maPropSet(getCondFormatPropset()) +{ +} + +void ScCondFormatObj::addEntry(const uno::Reference<sheet::XConditionEntry>& xEntry) + throw(uno::RuntimeException, std::exception) +{ +} + +void ScCondFormatObj::removeByIndex(const sal_Int32 nIndex) + throw(uno::RuntimeException, std::exception) +{ +} + +uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCondFormatObj::getPropertySetInfo() + throw(uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + static uno::Reference<beans::XPropertySetInfo> aRef( + new SfxItemPropertySetInfo( maPropSet.getPropertyMap())); + return aRef; +} + +void SAL_CALL ScCondFormatObj::setPropertyValue( + const OUString& aPropertyName, const uno::Any& aValue ) + throw(beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); +} + +uno::Any SAL_CALL ScCondFormatObj::getPropertyValue( const OUString& aPropertyName ) + throw(beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); + + uno::Any aAny; + // GetOnePropertyValue( pEntry, aAny ); + return aAny; +} + +void SAL_CALL ScCondFormatObj::addPropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScCondFormatObj::removePropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScCondFormatObj::addVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScCondFormatObj::removeVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +uno::Reference<beans::XPropertySetInfo> SAL_CALL ScConditionEntryObj::getPropertySetInfo() + throw(uno::RuntimeException, std::exception) +{ + static uno::Reference<beans::XPropertySetInfo> aRef( + new SfxItemPropertySetInfo( maPropSet.getPropertyMap() )); + return aRef; +} + +void SAL_CALL ScConditionEntryObj::setPropertyValue( + const OUString& aPropertyName, const uno::Any& aValue ) + throw(beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); +} + +uno::Any SAL_CALL ScConditionEntryObj::getPropertyValue( const OUString& aPropertyName ) + throw(beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); + + uno::Any aAny; + // GetOnePropertyValue( pEntry, aAny ); + return aAny; +} + +void SAL_CALL ScConditionEntryObj::addPropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScConditionEntryObj::removePropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScConditionEntryObj::addVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScConditionEntryObj::removeVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +uno::Reference<beans::XPropertySetInfo> SAL_CALL ScColorScaleFormatObj::getPropertySetInfo() + throw(uno::RuntimeException, std::exception) +{ + static uno::Reference<beans::XPropertySetInfo> aRef( + new SfxItemPropertySetInfo( maPropSet.getPropertyMap() )); + return aRef; +} + +void SAL_CALL ScColorScaleFormatObj::setPropertyValue( + const OUString& aPropertyName, const uno::Any& aValue ) + throw(beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); +} + +uno::Any SAL_CALL ScColorScaleFormatObj::getPropertyValue( const OUString& aPropertyName ) + throw(beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); + + uno::Any aAny; + // GetOnePropertyValue( pEntry, aAny ); + return aAny; +} + +void SAL_CALL ScColorScaleFormatObj::addPropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScColorScaleFormatObj::removePropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScColorScaleFormatObj::addVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScColorScaleFormatObj::removeVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDataBarFormatObj::getPropertySetInfo() + throw(uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + static uno::Reference<beans::XPropertySetInfo> aRef( + new SfxItemPropertySetInfo( maPropSet.getPropertyMap() )); + return aRef; +} + +void SAL_CALL ScDataBarFormatObj::setPropertyValue( + const OUString& aPropertyName, const uno::Any& aValue ) + throw(beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); +} + +uno::Any SAL_CALL ScDataBarFormatObj::getPropertyValue( const OUString& aPropertyName ) + throw(beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); + + uno::Any aAny; + // GetOnePropertyValue( pEntry, aAny ); + return aAny; +} + +void SAL_CALL ScDataBarFormatObj::addPropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScDataBarFormatObj::removePropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScDataBarFormatObj::addVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScDataBarFormatObj::removeVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +uno::Reference<beans::XPropertySetInfo> SAL_CALL ScIconSetFormatObj::getPropertySetInfo() + throw(uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + static uno::Reference<beans::XPropertySetInfo> aRef( + new SfxItemPropertySetInfo( maPropSet.getPropertyMap() )); + return aRef; +} + +void SAL_CALL ScIconSetFormatObj::setPropertyValue( + const OUString& aPropertyName, const uno::Any& aValue ) + throw(beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); +} + +uno::Any SAL_CALL ScIconSetFormatObj::getPropertyValue( const OUString& aPropertyName ) + throw(beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException, std::exception) +{ + SolarMutexGuard aGuard; + + const SfxItemPropertyMap& rPropertyMap = GetItemPropertyMap(); // from derived class + const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( aPropertyName ); + if ( !pEntry ) + throw beans::UnknownPropertyException(); + + uno::Any aAny; + // GetOnePropertyValue( pEntry, aAny ); + return aAny; +} + +void SAL_CALL ScIconSetFormatObj::addPropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScIconSetFormatObj::removePropertyChangeListener( const OUString& /* aPropertyName */, + const uno::Reference<beans::XPropertyChangeListener>& /* aListener */) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScIconSetFormatObj::addVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +void SAL_CALL ScIconSetFormatObj::removeVetoableChangeListener( const OUString&, + const uno::Reference<beans::XVetoableChangeListener>&) + throw(beans::UnknownPropertyException, + lang::WrappedTargetException, uno::RuntimeException, std::exception) +{ + SAL_WARN("sc", "not implemented"); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |