summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-25 20:56:28 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-25 21:06:37 +0100
commite9b337456513cf1324a4f3a137ebb3491c2b1c79 (patch)
tree04532f85c60564d04cc3da0349b1f2059f13d5c6
parent51c8bb3242ad1e8e1a5906c4af2ba94c0252b36e (diff)
one more fix for fdo#58686
Change-Id: I02e29441fa5d9573cb179dfde2357416102ff341
-rw-r--r--sc/source/ui/view/cellsh1.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 3940c0cd58ee..91054f121d7b 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1788,6 +1788,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
boost::scoped_ptr<ScCondFormatDlg> pCondFormatDlg;
if(bContainsCondFormat)
{
+ bool bContainsExistingCondFormat = false;
ScConditionalFormatList* pList = pDoc->GetCondFormList(aPos.Tab());
for (std::vector<sal_uInt32>::const_iterator itr = rCondFormats.begin(), itrEnd = rCondFormats.end();
itr != itrEnd; ++itr)
@@ -1797,6 +1798,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if(!pCondFormat)
continue;
+ bContainsExistingCondFormat = true;
const ScRangeList& rCondFormatRange = pCondFormat->GetRange();
if(rCondFormatRange == aRangeList)
{
@@ -1809,7 +1811,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// if not found a conditional format ask whether we should edit one of the existing
// or should create a new overlapping conditional format
- if(!pCondFormatDlg)
+ if(!pCondFormatDlg && bContainsExistingCondFormat)
{
QueryBox aBox( pTabViewShell->GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS) );