[Libreoffice-commits] .: 3 commits - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 9 19:48:27 PDT 2012
sc/source/ui/condformat/condformatdlg.cxx | 52 +++++++++++++++++++-----------
1 file changed, 33 insertions(+), 19 deletions(-)
New commits:
commit c20486fbffaa2d5ff20dad668c0f28b2c5f20e39
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Oct 10 03:39:39 2012 +0200
prevent flickering when clicking at an entry
Change-Id: I87786c70348d40d4e0a3012425f5ead2a82920c6
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 041faec..f23bf21 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -301,6 +301,9 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl )
IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry )
{
+ if(pEntry->IsSelected())
+ return 0;
+
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
itr->SetInactive();
commit ad7d278372a05fc2c64f80d80c3638c367a78cde
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Oct 10 03:35:33 2012 +0200
little clean-up for the color format case
Change-Id: I8e42a2494e9f7761ca55beb465c3f20d2b057060
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index b6b6ea4..041faec 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -53,9 +53,6 @@
#include "globstr.hrc"
-#include <cassert>
-#include <iostream>
-
ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocument* pDoc, const ScConditionalFormat* pFormat,
const ScRangeList& rRanges, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType):
Control(pParent, rResId),
@@ -191,35 +188,33 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox)
break;
}
if(itr == maEntries.end())
- return 0;;
+ return 0;
sal_Int32 nPos = pBox->GetSelectEntryPos();
switch(nPos)
{
case 0:
- if(itr->GetType() != condformat::entry::COLORSCALE2)
- {
- maEntries.replace( itr, new ScColorScale2FrmtEntry( this, mpDoc, maPos ) );
- static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
- }
+ if(itr->GetType() == condformat::entry::COLORSCALE2)
+ return 0;
+
+ maEntries.replace( itr, new ScColorScale2FrmtEntry( this, mpDoc, maPos ) );
break;
case 1:
- if(itr->GetType() != condformat::entry::COLORSCALE3)
- {
- maEntries.replace( itr, new ScColorScale3FrmtEntry( this, mpDoc, maPos ) );
- static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
- }
+ if(itr->GetType() == condformat::entry::COLORSCALE3)
+ return 0;
+
+ maEntries.replace( itr, new ScColorScale3FrmtEntry( this, mpDoc, maPos ) );
break;
case 2:
- if(itr->GetType() != condformat::entry::DATABAR)
- {
- maEntries.replace( itr, new ScDataBarFrmtEntry( this, mpDoc, maPos ) );
- static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
- }
+ if(itr->GetType() == condformat::entry::DATABAR)
+ return 0;
+
+ maEntries.replace( itr, new ScDataBarFrmtEntry( this, mpDoc, maPos ) );
break;
default:
break;
}
+ static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
itr->SetActive();
RecalcAll();
return 0;
commit 0b5a7d25c7314d69cfa54da16111bde6805e3335
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Oct 10 03:33:01 2012 +0200
prevent overwriting the entry if the same has been selected
Change-Id: If15ad07c3813dfe8d8c9460060771b0c5bae5b5e
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 21093fe..b6b6ea4 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -240,16 +240,32 @@ IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox*, pBox)
switch(nPos)
{
case 0:
+ switch(itr->GetType())
+ {
+ case condformat::entry::FORMULA:
+ case condformat::entry::CONDITION:
+ break;
+ case condformat::entry::COLORSCALE2:
+ case condformat::entry::COLORSCALE3:
+ case condformat::entry::DATABAR:
+ return 0;
+ }
maEntries.replace( itr, new ScColorScale3FrmtEntry(this, mpDoc, maPos));
static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
itr->SetActive();
break;
case 1:
+ if(itr->GetType() == condformat::entry::CONDITION)
+ return 0;
+
maEntries.replace( itr, new ScConditionFrmtEntry(this, mpDoc, maPos));
static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
itr->SetActive();
break;
case 2:
+ if(itr->GetType() == condformat::entry::FORMULA)
+ return 0;
+
maEntries.replace( itr, new ScFormulaFrmtEntry(this, mpDoc, maPos));
static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
itr->SetActive();
More information about the Libreoffice-commits
mailing list