diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-03 04:10:23 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-03 17:44:23 +0200 |
commit | be8e63cdded81446810dce46c98518b0a6b52711 (patch) | |
tree | 1fe5869a412e9b06d5832d864ddb71d6cf19a25b | |
parent | 4c4a9767f7fb0c7891f1dd96cbe38a9c35e46083 (diff) |
rename UNO API method for cond format
My first idea does not work that well as it introduces some nasty
problems with the lifecycle. THe new approach will only allow to use
cond format objects of the same document.
Change-Id: I276c3750ef24cdee6d63162c678ec839d4845b08
-rw-r--r-- | offapi/com/sun/star/sheet/XConditionalFormats.idl | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatuno.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/condformatuno.cxx | 6 |
3 files changed, 4 insertions, 10 deletions
diff --git a/offapi/com/sun/star/sheet/XConditionalFormats.idl b/offapi/com/sun/star/sheet/XConditionalFormats.idl index 6641d0865742..7230fe5f2af5 100644 --- a/offapi/com/sun/star/sheet/XConditionalFormats.idl +++ b/offapi/com/sun/star/sheet/XConditionalFormats.idl @@ -22,7 +22,7 @@ interface XConditionalFormats : com::sun::star::uno::XInterface * adds a conditional format to the existing list * returns the id of the inserted conditional format */ - long addByRange( [in] com::sun::star::sheet::XConditionalFormat conditionalFormat, [in] com::sun::star::sheet::XSheetCellRanges range); + long createByRange( [in] com::sun::star::sheet::XSheetCellRanges range); void removeByID( [in] long ID); diff --git a/sc/source/ui/inc/condformatuno.hxx b/sc/source/ui/inc/condformatuno.hxx index 322c64299b09..b5839e4e41ea 100644 --- a/sc/source/ui/inc/condformatuno.hxx +++ b/sc/source/ui/inc/condformatuno.hxx @@ -62,10 +62,8 @@ public: static ScCondFormatsObj* getImplementation( uno::Reference< com::sun::star::sheet::XConditionalFormats > xCondFormat ); // XConditionalFormats - virtual sal_Int32 SAL_CALL 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_Int32 SAL_CALL createByRange(const uno::Reference<sheet::XSheetCellRanges>& xRanges) + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL removeByID( const sal_Int32 nID ) throw(::com::sun::star::uno::RuntimeException, diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 3d12b9752630..ce46c429edc1 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -332,13 +332,9 @@ void ScCondFormatsObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) } } -sal_Int32 ScCondFormatsObj::addByRange(const uno::Reference< sheet::XConditionalFormat >& xCondFormat, - const uno::Reference< sheet::XSheetCellRanges >& /*xRanges*/) +sal_Int32 ScCondFormatsObj::createByRange(const uno::Reference< sheet::XSheetCellRanges >& /*xRanges*/) throw(uno::RuntimeException, std::exception) { - if (!xCondFormat.is()) - return 0; - SolarMutexGuard aGuard; /* ScCondFormatObj* pFormatObj = ScCondFormatObj::getImplementation(xCondFormat); |