sc/source/ui/view/tabvwshc.cxx | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-)
New commits: commit 4026e1824de8ff9b5d006ae6eba491f91bc4e599 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Fri Nov 30 22:19:45 2012 +0100 prevent uncloseable cond format dlg diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 152a940..289e605 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -204,30 +204,31 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( } const ScConditionalFormat* pCondFormat = pDoc->GetCondFormat(aPos.Col(), aPos.Row(), aPos.Tab()); + condformat::dialog::ScCondFormatDialogType eType = condformat::dialog::NONE; + switch(nSlotId) + { + case SID_OPENDLG_CONDFRMT: + eType = condformat::dialog::CONDITION; + break; + case SID_OPENDLG_COLORSCALE: + eType = condformat::dialog::COLORSCALE; + break; + case SID_OPENDLG_DATABAR: + eType = condformat::dialog::DATABAR; + break; + default: + break; + } + if(pCondFormat) { const ScRangeList& rCondFormatRange = pCondFormat->GetRange(); if(rCondFormatRange == aRangeList) - pResult = new ScCondFormatDlg( pB, pCW, pParent, pDoc, pCondFormat, rCondFormatRange, aPos, condformat::dialog::NONE ); + pResult = new ScCondFormatDlg( pB, pCW, pParent, pDoc, pCondFormat, rCondFormatRange, aPos, eType ); } if(!pResult) { - condformat::dialog::ScCondFormatDialogType eType = condformat::dialog::NONE; - switch(nSlotId) - { - case SID_OPENDLG_CONDFRMT: - eType = condformat::dialog::CONDITION; - break; - case SID_OPENDLG_COLORSCALE: - eType = condformat::dialog::COLORSCALE; - break; - case SID_OPENDLG_DATABAR: - eType = condformat::dialog::DATABAR; - break; - default: - break; - } pResult = new ScCondFormatDlg( pB, pCW, pParent, pDoc, NULL, aRangeList, aRangeList.GetTopLeftCorner(), eType ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits