Kaydet (Commit) 937cee75 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

make the dialog actually do something useful again

Change-Id: I440b38442f69bd50286fee8ce3ee1b289b45775d
üst 02555981
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
#include "colorscale.hxx" #include "colorscale.hxx"
#include "colorformat.hxx" #include "colorformat.hxx"
#include "reffact.hxx" #include "reffact.hxx"
#include "docsh.hxx"
#include "docfunc.hxx"
#include "condformatdlgentry.hxx" #include "condformatdlgentry.hxx"
#include "globstr.hrc" #include "globstr.hrc"
...@@ -306,6 +308,7 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p ...@@ -306,6 +308,7 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p
maCondFormList( this, ScResId( CTRL_LIST ), pDoc, pFormat, rRange, rPos, eType ), maCondFormList( this, ScResId( CTRL_LIST ), pDoc, pFormat, rRange, rPos, eType ),
maPos(rPos), maPos(rPos),
mpDoc(pDoc), mpDoc(pDoc),
mpFormat(pFormat),
meType(eType) meType(eType)
{ {
rtl::OUStringBuffer aTitle( GetText() ); rtl::OUStringBuffer aTitle( GetText() );
...@@ -410,13 +413,21 @@ sal_Bool ScCondFormatDlg::Close() ...@@ -410,13 +413,21 @@ sal_Bool ScCondFormatDlg::Close()
IMPL_LINK_NOARG( ScCondFormatDlg, OkBtnHdl ) 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; return 0;
} }
IMPL_LINK_NOARG( ScCondFormatDlg, CancelBtnHdl ) IMPL_LINK_NOARG( ScCondFormatDlg, CancelBtnHdl )
{ {
Close(); Close();
return 0; return 0;
......
...@@ -112,6 +112,8 @@ private: ...@@ -112,6 +112,8 @@ private:
ScAddress maPos; ScAddress maPos;
ScDocument* mpDoc; ScDocument* mpDoc;
const ScConditionalFormat* mpFormat;
condformat::dialog::ScCondFormatDialogType meType; condformat::dialog::ScCondFormatDialogType meType;
DECL_LINK( EdRangeModifyHdl, Edit* ); DECL_LINK( EdRangeModifyHdl, Edit* );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment