Kaydet (Commit) 28d0e255 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

tdf#94429, tdf#92198, tdf#95233: STYLE in conditional formatting

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
üst 34177135
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "postit.hxx" #include "postit.hxx"
#include "tokenarray.hxx" #include "tokenarray.hxx"
#include "globalnames.hxx" #include "globalnames.hxx"
#include "stlsheet.hxx"
#include <com/sun/star/sheet/DataPilotFieldFilter.hpp> #include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
...@@ -2386,10 +2387,21 @@ void ScInterpreter::ScStyle() ...@@ -2386,10 +2387,21 @@ void ScInterpreter::ScStyle()
if (pShell) if (pShell)
{ {
// notify object shell directly! // 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); if (bNotify)
ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 ); {
pShell->Broadcast( aHint ); ScRange aRange(aPos);
ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 );
pShell->Broadcast( aHint );
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment