diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-10 16:29:47 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-10 16:34:45 +0200 |
commit | 28d0e255e231639c4d79f6dedbe972d6daeae7f0 (patch) | |
tree | a91fb5df8ad7969eaf7cbbf54ace12450b892053 | |
parent | 34177135a31d3efe0a6746f85ed5a5d0524b4581 (diff) |
This is only a quick ugly hack and not a real fix. Basically we need to
prevent either using STYLE with more than one parameter in conditional
formatting functions or forbid the usage of STYLE completely.
In some way the usage of STYLE in conditional formatting means that our
current conditional formatting is not yet perfect. STYLE inside of a
conditional format is just insane from an evaluation perspective.
Change-Id: Ia1cc8c8cc8f00c8d4a055b1c2d128de3e1f8e4fa
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 2a481d18a1b9..18fd2bbd35da 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -45,6 +45,7 @@ #include "postit.hxx" #include "tokenarray.hxx" #include "globalnames.hxx" +#include "stlsheet.hxx" #include <com/sun/star/sheet/DataPilotFieldFilter.hpp> @@ -2386,10 +2387,21 @@ void ScInterpreter::ScStyle() if (pShell) { // notify object shell directly! + bool bNotify = true; + if (aStyle2.isEmpty()) + { + const ScStyleSheet* pStyle = pDok->GetStyle(aPos.Col(), aPos.Row(), aPos.Tab()); + + if (pStyle && pStyle->GetName() == aStyle1) + bNotify = false; + } - ScRange aRange(aPos); - ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 ); - pShell->Broadcast( aHint ); + if (bNotify) + { + ScRange aRange(aPos); + ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 ); + pShell->Broadcast( aHint ); + } } } |