diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-17 11:15:49 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-18 12:09:18 +0200 |
commit | e8d8e9eb7c82744c69d6c25fab9bf318caafa59a (patch) | |
tree | 2699b42b043de5cc79cc1ea5b26cdbb25de9b41c /sc | |
parent | a87676e32e0dce6bcc8f3cbe0c50f75555f28f3c (diff) |
fix the number detection in data bar dialog
Change-Id: I6da7b2087114b7eb274f0a62dd531dd136ad507a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/scabstdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/condformat/colorformat.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/colorformat.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 8 |
8 files changed, 19 insertions, 15 deletions
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 496ab89cec59..921773ae2eb4 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -362,7 +362,7 @@ public: virtual AbstractScCondFormatDlg* CreateScCondFormatDlg (Window* pParent, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rList, const ScAddress& rPos, int nId ) = 0; //add for ScCondFormatDlg - virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent ,int nId ) = 0; //add for ScDataBarSettingsDlg + virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent, ScDocument* pDoc, int nId ) = 0; //add for ScDataBarSettingsDlg virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ) = 0; //add for ScDataPilotDatabaseDlg diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index ee142d37c70e..01c3b0839bf5 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -794,13 +794,13 @@ AbstractScCondFormatDlg* ScAbstractDialogFactory_Impl::CreateScCondFormatDlg(Win return NULL; } -AbstractScDataBarSettingsDlg* ScAbstractDialogFactory_Impl::CreateScDataBarSetttingsDlg(Window* pParent, int nId) +AbstractScDataBarSettingsDlg* ScAbstractDialogFactory_Impl::CreateScDataBarSetttingsDlg(Window* pParent, ScDocument* pDoc, int nId) { ScDataBarSettingsDlg* pDlg = NULL; switch( nId ) { case RID_SCDLG_DATABAR: - pDlg = new ScDataBarSettingsDlg( pParent ); + pDlg = new ScDataBarSettingsDlg( pParent, pDoc ); break; default: break; diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 8667db490d75..5fb36e1d09ba 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -432,7 +432,7 @@ public: virtual AbstractScCondFormatDlg* CreateScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange, const ScAddress& rPos, int nId ); //add for ScDataBarSettingsDlg - virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent ,int nId ); //add for ScDataBarSettingsDlg + virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent, ScDocument* pDoc, int nId ); //add for ScDataBarSettingsDlg virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ); //add for ScDataPilotDatabaseDlg diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index d8d15a96b9c8..7093bb10ccf2 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -30,12 +30,13 @@ #include "colorscale.hxx" #include "colorformat.hrc" +#include "document.hxx" #include <svx/xtable.hxx> #include <svx/drawitem.hxx> #include <vcl/msgbox.hxx> -ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow): +ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, ScDocument* pDoc): ModalDialog( pWindow, ScResId( RID_SCDLG_DATABAR ) ), maBtnOk( this, ScResId( BTN_OK ) ), maBtnCancel( this, ScResId( BTN_CANCEL ) ), @@ -55,7 +56,8 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow): maLbTypeMax( this, ScResId( LB_TYPE ) ), maLbAxisPos( this, ScResId( LB_AXIS_POSITION ) ), maEdMin( this, ScResId( ED_MIN ) ), - maEdMax( this, ScResId( ED_MAX ) ) + maEdMax( this, ScResId( ED_MAX ) ), + mpNumberFormatter( pDoc->GetFormatTable() ) { Init(); FreeResource(); @@ -127,7 +129,7 @@ void SetValue( ScColorScaleEntry* pEntry, Edit& aEdit) } -ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarFormatData& rData): +ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarFormatData& rData, ScDocument* pDoc): ModalDialog( pWindow, ScResId( RID_SCDLG_DATABAR ) ), maBtnOk( this, ScResId( BTN_OK ) ), maBtnCancel( this, ScResId( BTN_CANCEL ) ), @@ -148,7 +150,8 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarForma maLbAxisPos( this, ScResId( LB_AXIS_POSITION ) ), maEdMin( this, ScResId( ED_MIN ) ), maEdMax( this, ScResId( ED_MAX ) ), - maStrWarnSameValue( SC_RESSTR( STR_WARN_SAME_VALUE ) ) + maStrWarnSameValue( SC_RESSTR( STR_WARN_SAME_VALUE ) ), + mpNumberFormatter( pDoc->GetFormatTable() ) { Init(); FreeResource(); diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index aa834ae66404..75a955f3b29a 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -894,7 +894,7 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, OptionBtnHdl ) { SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), maLbDataBarMinType, maEdDataBarMin, mpDoc, maPos); SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), maLbDataBarMaxType, maEdDataBarMax, mpDoc, maPos); - ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this, *mpDataBarData); + ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this, *mpDataBarData, mpDoc); if( pDlg->Execute() == RET_OK) { mpDataBarData.reset(pDlg->GetData()); diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx index c78321f6087d..0811c4c71df3 100644 --- a/sc/source/ui/inc/colorformat.hxx +++ b/sc/source/ui/inc/colorformat.hxx @@ -72,8 +72,8 @@ private: void Init(); public: - ScDataBarSettingsDlg(Window* pParent); - ScDataBarSettingsDlg(Window* pParent, const ScDataBarFormatData& rData); + ScDataBarSettingsDlg(Window* pParent, ScDocument* pDoc); + ScDataBarSettingsDlg(Window* pParent, const ScDataBarFormatData& rData, ScDocument* pDoc); ScDataBarFormatData* GetData(); }; diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index d7fb6998a2f1..d7b10e19a22b 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -123,7 +123,6 @@ private: ScDocument* mpDoc; ScAddress maPos; - SvNumberFormatter* mpNumberFormatter; DECL_LINK( TypeListHdl, void*); DECL_LINK( ColFormatTypeHdl, void*); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index c0a59a95c4d8..ca84b2bf0ae5 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2058,7 +2058,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScRangeList aRangeList; ScViewData* pData = GetViewData(); pData->GetMarkData().FillRangeListWithMarks(&aRangeList, false); - ScDocument* pDoc = GetViewData()->GetDocument(); + ScDocument* pDoc = pData->GetDocument(); ScAddress aPos(pData->GetCurX(), pData->GetCurY(), pData->GetTabNo()); AbstractScCondFormatDlg* pDlg = NULL; @@ -2089,7 +2089,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DATABAR ); + ScDocument* pDoc = GetViewData()->GetDocument(); + AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), pDoc, RID_SCDLG_DATABAR ); OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->Execute(); delete pDlg; @@ -2101,7 +2102,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DATABAR ); + ScDocument* pDoc = GetViewData()->GetDocument(); + AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), pDoc, RID_SCDLG_DATABAR ); OSL_ENSURE(pDlg, "Dialog create fail!"); if(pDlg->Execute() == RET_OK) { |