diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-12-25 20:56:28 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-12-25 21:07:09 +0100 |
commit | a06a44c3b342648139e7fa0ff850a4176df60538 (patch) | |
tree | 3dca44eac775dc1765b9aa63649481105ed28db2 | |
parent | c29098917a1118d4b435df2b5f542adc8505e123 (diff) |
one more fix for fdo#58686
Change-Id: I02e29441fa5d9573cb179dfde2357416102ff341
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index a8056614bb04..ec105f351d8f 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1786,6 +1786,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) @@ -1795,6 +1796,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if(!pCondFormat) continue; + bContainsExistingCondFormat = true; const ScRangeList& rCondFormatRange = pCondFormat->GetRange(); if(rCondFormatRange == aRangeList) { @@ -1807,7 +1809,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) ); |