summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-09 06:29:21 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-09 06:33:19 +0200
commit937cee757ea243a18ea03b4d3e8662524a8ff090 (patch)
treefb57f7406f37dc3722003d5e5009881d06a91ef4 /sc
parent025559813580370ffdf0de0a8844eed4cbe0ab1c (diff)
make the dialog actually do something useful again
Change-Id: I440b38442f69bd50286fee8ce3ee1b289b45775d
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx13
-rw-r--r--sc/source/ui/inc/condformatdlg.hxx2
2 files changed, 14 insertions, 1 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 6ffba85a4e76..332139e89495 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -47,6 +47,8 @@
#include "colorscale.hxx"
#include "colorformat.hxx"
#include "reffact.hxx"
+#include "docsh.hxx"
+#include "docfunc.hxx"
#include "condformatdlgentry.hxx"
#include "globstr.hrc"
@@ -306,6 +308,7 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p
maCondFormList( this, ScResId( CTRL_LIST ), pDoc, pFormat, rRange, rPos, eType ),
maPos(rPos),
mpDoc(pDoc),
+ mpFormat(pFormat),
meType(eType)
{
rtl::OUStringBuffer aTitle( GetText() );
@@ -410,13 +413,21 @@ sal_Bool ScCondFormatDlg::Close()
IMPL_LINK_NOARG( ScCondFormatDlg, OkBtnHdl )
{
- Close();
+ ScConditionalFormat* pFormat = GetConditionalFormat();
+ SfxObjectShell* pObjectShell = mpDoc->GetDocumentShell();
+ sal_Int32 nKey = 0;
+ if(mpFormat)
+ nKey = mpFormat->GetKey();
+
+ static_cast<ScDocShell*>(pObjectShell)->GetDocFunc().ReplaceConditionalFormat(nKey, pFormat, maPos.Tab(), pFormat->GetRange());
+ Close();
return 0;
}
IMPL_LINK_NOARG( ScCondFormatDlg, CancelBtnHdl )
{
+
Close();
return 0;
diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx
index c17910751f0a..e91574bde89a 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -112,6 +112,8 @@ private:
ScAddress maPos;
ScDocument* mpDoc;
+ const ScConditionalFormat* mpFormat;
+
condformat::dialog::ScCondFormatDialogType meType;
DECL_LINK( EdRangeModifyHdl, Edit* );