Kaydet (Commit) a1a8fda4 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ScTabOpDlg

Change-Id: I515c756451539527faff59b67e0a8d1ee64c1347
Reviewed-on: https://gerrit.libreoffice.org/70686
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 88d46ba3
...@@ -50,7 +50,7 @@ DECL_WRAPPER_WITHID_CONTROLLER(ScSolverDlgWrapper) ...@@ -50,7 +50,7 @@ DECL_WRAPPER_WITHID_CONTROLLER(ScSolverDlgWrapper)
DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper) DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper) DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
DECL_WRAPPER_WITHID(ScPivotLayoutWrapper) DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
DECL_WRAPPER_WITHID(ScTabOpDlgWrapper) DECL_WRAPPER_WITHID_CONTROLLER(ScTabOpDlgWrapper)
DECL_WRAPPER_WITHID(ScFilterDlgWrapper) DECL_WRAPPER_WITHID(ScFilterDlgWrapper)
DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper) DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper) DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper)
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX #ifndef INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
#define INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX #define INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
#include <vcl/fixed.hxx>
#include <address.hxx> #include <address.hxx>
#include "anyrefdg.hxx" #include "anyrefdg.hxx"
...@@ -35,37 +34,21 @@ enum ScTabOpErr ...@@ -35,37 +34,21 @@ enum ScTabOpErr
TABOPERR_NOROWFORMULA TABOPERR_NOROWFORMULA
}; };
class ScTabOpDlg : public ScAnyRefDlg class ScTabOpDlg : public ScAnyRefDlgController
{ {
public: public:
ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScTabOpDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
ScDocument* pDocument, ScDocument* pDocument,
const ScRefAddress& rCursorPos ); const ScRefAddress& rCursorPos);
virtual ~ScTabOpDlg() override; virtual ~ScTabOpDlg() override;
virtual void dispose() override;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
virtual bool IsRefInputMode() const override { return true; } virtual bool IsRefInputMode() const override { return true; }
virtual void SetActive() override; virtual void SetActive() override;
virtual bool Close() override; virtual void Close() override;
private: private:
VclPtr<FixedText> m_pFtFormulaRange;
VclPtr<formula::RefEdit> m_pEdFormulaRange;
VclPtr<formula::RefButton> m_pRBFormulaRange;
VclPtr<FixedText> m_pFtRowCell;
VclPtr<formula::RefEdit> m_pEdRowCell;
VclPtr<formula::RefButton> m_pRBRowCell;
VclPtr<FixedText> m_pFtColCell;
VclPtr<formula::RefEdit> m_pEdColCell;
VclPtr<formula::RefButton> m_pRBColCell;
VclPtr<OKButton> m_pBtnOk;
VclPtr<CancelButton> m_pBtnCancel;
ScRefAddress theFormulaCell; ScRefAddress theFormulaCell;
ScRefAddress theFormulaEnd; ScRefAddress theFormulaEnd;
ScRefAddress theRowCell; ScRefAddress theRowCell;
...@@ -73,7 +56,6 @@ private: ...@@ -73,7 +56,6 @@ private:
ScDocument* const pDoc; ScDocument* const pDoc;
const SCTAB nCurTab; const SCTAB nCurTab;
VclPtr<formula::RefEdit> pEdActive;
bool bDlgLostFocus; bool bDlgLostFocus;
const OUString errMsgNoFormula; const OUString errMsgNoFormula;
const OUString errMsgNoColRow; const OUString errMsgNoColRow;
...@@ -82,12 +64,31 @@ private: ...@@ -82,12 +64,31 @@ private:
const OUString errMsgNoColFormula; const OUString errMsgNoColFormula;
const OUString errMsgNoRowFormula; const OUString errMsgNoRowFormula;
formula::WeldRefEdit* m_pEdActive;
std::unique_ptr<weld::Label> m_xFtFormulaRange;
std::unique_ptr<formula::WeldRefEdit> m_xEdFormulaRange;
std::unique_ptr<formula::WeldRefButton> m_xRBFormulaRange;
std::unique_ptr<weld::Label> m_xFtRowCell;
std::unique_ptr<formula::WeldRefEdit> m_xEdRowCell;
std::unique_ptr<formula::WeldRefButton> m_xRBRowCell;
std::unique_ptr<weld::Label> m_xFtColCell;
std::unique_ptr<formula::WeldRefEdit> m_xEdColCell;
std::unique_ptr<formula::WeldRefButton> m_xRBColCell;
std::unique_ptr<weld::Button> m_xBtnOk;
std::unique_ptr<weld::Button> m_xBtnCancel;
void Init(); void Init();
void RaiseError( ScTabOpErr eError ); void RaiseError( ScTabOpErr eError );
DECL_LINK( BtnHdl, Button*, void ); DECL_LINK( BtnHdl, weld::Button&, void );
DECL_LINK( GetFocusHdl, Control&, void ); DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( LoseFocusHdl, Control&, void ); DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( GetButtonFocusHdl, formula::WeldRefButton&, void );
DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void );
}; };
#endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX #endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
......
...@@ -38,7 +38,7 @@ SFX_IMPL_CHILDWINDOW_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE ) ...@@ -38,7 +38,7 @@ SFX_IMPL_CHILDWINDOW_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER ) SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
SFX_IMPL_MODELESSDIALOG_WITHID(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE) SFX_IMPL_MODELESSDIALOG_WITHID(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE ) SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
SFX_IMPL_MODELESSDIALOG_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP ) SFX_IMPL_CHILDWINDOW_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER ) SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER )
SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER ) SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
SFX_IMPL_CHILDWINDOW_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME ) SFX_IMPL_CHILDWINDOW_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
...@@ -133,7 +133,7 @@ IMPL_CHILD_CTOR( ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE) ...@@ -133,7 +133,7 @@ IMPL_CHILD_CTOR( ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
IMPL_CHILD_CTOR( ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE ) IMPL_CHILD_CTOR( ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
IMPL_CHILD_CTOR( ScTabOpDlgWrapper, SID_OPENDLG_TABOP ) IMPL_CONTROLLER_CHILD_CTOR( ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
IMPL_CHILD_CTOR( ScFilterDlgWrapper, SID_FILTER ) IMPL_CHILD_CTOR( ScFilterDlgWrapper, SID_FILTER )
......
...@@ -238,17 +238,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( ...@@ -238,17 +238,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
} }
break; break;
case SID_OPENDLG_TABOP:
{
ScViewData& rViewData = GetViewData();
ScRefAddress aCurPos ( rViewData.GetCurX(),
rViewData.GetCurY(),
rViewData.GetTabNo());
pResult = VclPtr<ScTabOpDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos );
}
break;
case SID_OPENDLG_OPTSOLVER: case SID_OPENDLG_OPTSOLVER:
{ {
ScViewData& rViewData = GetViewData(); ScViewData& rViewData = GetViewData();
...@@ -488,6 +477,16 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont ...@@ -488,6 +477,16 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
xResult.reset(new ScSolverDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos)); xResult.reset(new ScSolverDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
break; break;
} }
case SID_OPENDLG_TABOP:
{
ScViewData& rViewData = GetViewData();
ScRefAddress aCurPos ( rViewData.GetCurX(),
rViewData.GetCurY(),
rViewData.GetTabNo());
xResult.reset(new ScTabOpDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
break;
}
} }
if (xResult) if (xResult)
......
...@@ -147,6 +147,9 @@ sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkLabel[@id='interval-label'] orp ...@@ -147,6 +147,9 @@ sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkLabel[@id='interval-label'] orp
sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkSpinButton[@id='interval-spin'] no-labelled-by sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkSpinButton[@id='interval-spin'] no-labelled-by
sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkButton[@id='input-range-button'] button-no-label sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkButton[@id='input-range-button'] button-no-label
sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkButton[@id='output-range-button'] button-no-label sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkButton[@id='output-range-button'] button-no-label
sc/uiconfig/scalc/ui/multipleoperationsdialog.ui://GtkButton[@id='formulasref'] button-no-label
sc/uiconfig/scalc/ui/multipleoperationsdialog.ui://GtkButton[@id='rowref'] button-no-label
sc/uiconfig/scalc/ui/multipleoperationsdialog.ui://GtkButton[@id='colref'] button-no-label
sc/uiconfig/scalc/ui/nosolutiondialog.ui://GtkLabel[@id='label1'] orphan-label sc/uiconfig/scalc/ui/nosolutiondialog.ui://GtkLabel[@id='label1'] orphan-label
sc/uiconfig/scalc/ui/nosolutiondialog.ui://GtkLabel[@id='error'] orphan-label sc/uiconfig/scalc/ui/nosolutiondialog.ui://GtkLabel[@id='error'] orphan-label
sc/uiconfig/scalc/ui/numbertransformationentry.ui:GtkGrid[@id='grid']/GtkBox/GtkLabel orphan-label sc/uiconfig/scalc/ui/numbertransformationentry.ui:GtkGrid[@id='grid']/GtkBox/GtkLabel orphan-label
......
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