[Libreoffice-commits] .: 2 commits - sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Sun Jun 24 15:50:30 PDT 2012
sc/source/core/data/column3.cxx | 3 +++
sc/source/ui/condformat/condformatdlg.cxx | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+)
New commits:
commit d4e2a95a2f7376c36c1241f91a55021fc856c758
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Jun 25 00:45:32 2012 +0200
if no new cell exists, create hidden broadcaster cell, fdo#51368
Change-Id: I61b96a0e164269ef85778cba7865d6488ebac79d
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 401f5ec..23dd104 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1395,6 +1395,9 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
SvtBroadcaster* pBC = pOldCell->ReleaseBroadcaster();
if (pNewCell || pBC)
{
+ if(!pNewCell)
+ pNewCell = new ScNoteCell();
+
if (pBC)
{
pNewCell->TakeBroadcaster(pBC);
commit adc4c53082c2fa1634897bd279afd6b5ba2e16da
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun Jun 24 22:11:41 2012 +0200
only show dialog elements if entry is not collapsed
Change-Id: Id85e7b2360c2630c894ce7e4e9ee505810cefe76
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 75a955f..f0f677c 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -459,6 +459,10 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType )
maCondText.append(getExpression(maLbCondType.GetSelectEntryPos()));
maFtCondition.SetText(maCondText.makeStringAndClear());
maFtCondition.Show();
+ maLbType.Hide();
+ HideCondElements();
+ HideColorScaleElements();
+ HideDataBarElements();
}
break;
default:
@@ -466,6 +470,7 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType )
maLbType.Show();
maFtCondition.SetText(rtl::OUString(""));
maFtCondition.Hide();
+ maLbType.Show();
break;
}
}
@@ -609,6 +614,21 @@ void ScCondFrmtEntry::SetFormulaType()
void ScCondFrmtEntry::Select()
{
SetControlForeground(Color(COL_RED));
+ switch(meType)
+ {
+ case CONDITION:
+ SetCondType();
+ break;
+ case COLORSCALE:
+ SetColorScaleType();
+ break;
+ case DATABAR:
+ SetDataBarType();
+ break;
+ case FORMULA:
+ SetFormulaType();
+ break;
+ }
SwitchToType(meType);
mbActive = true;
SetHeight();
@@ -1045,6 +1065,10 @@ IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl )
{
ScCondFrmtEntry* pNewEntry = new ScCondFrmtEntry(this, mpDoc);
maEntries.push_back( pNewEntry );
+ for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
+ {
+ itr->Deselect();
+ }
pNewEntry->Select();
RecalcAll();
return 0;
More information about the Libreoffice-commits
mailing list