diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-03 04:10:23 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-04-09 14:34:00 +0200 |
commit | 25f2654ace00ce328d0a9546033d290f39d16a7c (patch) | |
tree | 3f9db7d86039654abdde97332b6a4f454e6e19f9 | |
parent | 8d56cc95c1b61106ad3d156ca9485499051377f2 (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.
Conflicts:
sc/source/ui/inc/condformatuno.hxx
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 bab142585da7..e6a25e920cb3 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_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 sal_Int32 createByRange(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, diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 0b959f1c2dbf..fd0b75c63b95 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -328,13 +328,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); |