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

weld ScPrintAreasDlg

Change-Id: I1e1d31551b623453a1bade9c932ef1c9e1060f35
Reviewed-on: https://gerrit.libreoffice.org/70600
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst ab862e06
......@@ -159,6 +159,16 @@ public:
return pLabelWidget;
}
void SaveValue()
{
xEntry->save_value();
}
bool IsValueChangedFromSaved() const
{
return xEntry->get_value_changed_from_saved();
}
void SetGetFocusHdl(const Link<WeldRefEdit&,void>& rLink) { maGetFocusHdl = rLink; }
void SetLoseFocusHdl(const Link<WeldRefEdit&,void>& rLink) { maLoseFocusHdl = rLink; }
void SetModifyHdl(const Link<WeldRefEdit&,void>& rLink) { maModifyHdl = rLink; }
......
......@@ -28,12 +28,11 @@ class ScDocument;
class ScViewData;
class SfxStringItem;
class ScPrintAreasDlg : public ScAnyRefDlg
class ScPrintAreasDlg : public ScAnyRefDlgController
{
public:
ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent );
virtual ~ScPrintAreasDlg() override;
virtual void dispose() override;
ScPrintAreasDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent);
virtual ~ScPrintAreasDlg() override;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
virtual void AddRefEntry() override;
......@@ -41,41 +40,52 @@ public:
virtual bool IsTableLocked() const override;
virtual void SetActive() override;
virtual void Deactivate() override;
virtual bool Close() override;
virtual void Close() override;
private:
VclPtr<ListBox> pLbPrintArea;
VclPtr<formula::RefEdit> pEdPrintArea;
VclPtr<formula::RefButton> pRbPrintArea;
VclPtr<ListBox> pLbRepeatRow;
VclPtr<formula::RefEdit> pEdRepeatRow;
VclPtr<formula::RefButton> pRbRepeatRow;
VclPtr<ListBox> pLbRepeatCol;
VclPtr<formula::RefEdit> pEdRepeatCol;
VclPtr<formula::RefButton> pRbRepeatCol;
VclPtr<OKButton> pBtnOk;
VclPtr<CancelButton> pBtnCancel;
bool bDlgLostFocus;
VclPtr<formula::RefEdit> pRefInputEdit;
ScDocument* pDoc;
ScViewData* pViewData;
SCTAB nCurTab;
formula::WeldRefEdit* m_pRefInputEdit;
std::unique_ptr<weld::ComboBox> m_xLbPrintArea;
std::unique_ptr<formula::WeldRefEdit> m_xEdPrintArea;
std::unique_ptr<formula::WeldRefButton> m_xRbPrintArea;
std::unique_ptr<weld::ComboBox> m_xLbRepeatRow;
std::unique_ptr<formula::WeldRefEdit> m_xEdRepeatRow;
std::unique_ptr<formula::WeldRefButton> m_xRbRepeatRow;
std::unique_ptr<weld::ComboBox> m_xLbRepeatCol;
std::unique_ptr<formula::WeldRefEdit> m_xEdRepeatCol;
std::unique_ptr<formula::WeldRefButton> m_xRbRepeatCol;
std::unique_ptr<weld::Button> m_xBtnOk;
std::unique_ptr<weld::Button> m_xBtnCancel;
std::unique_ptr<weld::Frame> m_xPrintFrame;
std::unique_ptr<weld::Frame> m_xRowFrame;
std::unique_ptr<weld::Frame> m_xColFrame;
std::unique_ptr<weld::Label> m_xPrintFrameFT;
std::unique_ptr<weld::Label> m_xRowFrameFT;
std::unique_ptr<weld::Label> m_xColFrameFT;
void Impl_Reset();
bool Impl_CheckRefStrings();
void Impl_FillLists();
bool Impl_GetItem( const Edit* pEd, SfxStringItem& rItem );
bool Impl_GetItem( const formula::WeldRefEdit* pEd, SfxStringItem& rItem );
// Handler:
DECL_LINK( Impl_SelectHdl, ListBox&, void );
DECL_LINK( Impl_ModifyHdl, Edit&, void );
DECL_LINK( Impl_BtnHdl, Button*, void );
DECL_LINK( Impl_GetFocusHdl, Control&, void );
DECL_LINK( Impl_SelectHdl, weld::ComboBox&, void );
DECL_LINK( Impl_ModifyHdl, formula::WeldRefEdit&, void );
DECL_LINK( Impl_BtnHdl, weld::Button&, void );
DECL_LINK( Impl_GetEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( Impl_LoseEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( Impl_LoseButtonFocusHdl, formula::WeldRefButton&, void );
DECL_LINK( Impl_GetFocusHdl, weld::Widget&, void );
};
#endif
......
......@@ -55,7 +55,7 @@ DECL_WRAPPER_WITHID(ScFilterDlgWrapper)
DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper)
DECL_WRAPPER_WITHID(ScConsolidateDlgWrapper)
DECL_WRAPPER_WITHID(ScPrintAreasDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScPrintAreasDlgWrapper)
DECL_WRAPPER_WITHID(ScColRowNameRangesDlgWrapper)
DECL_WRAPPER_WITHID(ScFormulaDlgWrapper)
DECL_WRAPPER_WITHID(ScHighlightChgDlgWrapper)
......
......@@ -43,7 +43,7 @@ SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER )
SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
SFX_IMPL_CHILDWINDOW_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
SFX_IMPL_MODELESSDIALOG_WITHID(ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE )
SFX_IMPL_MODELESSDIALOG_WITHID(ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
SFX_IMPL_CHILDWINDOW_WITHID(ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
SFX_IMPL_MODELESSDIALOG_WITHID(ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES )
SFX_IMPL_MODELESSDIALOG_WITHID(ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
SFX_IMPL_MODELESSDIALOG_WITHID(ScAcceptChgDlgWrapper, FID_CHG_ACCEPT )
......@@ -145,7 +145,7 @@ IMPL_CHILD_CTOR( ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES )
IMPL_CHILD_CTOR( ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE )
IMPL_CHILD_CTOR( ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
IMPL_CONTROLLER_CHILD_CTOR( ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
IMPL_CHILD_CTOR( ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
......
......@@ -288,12 +288,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
}
break;
case SID_OPENDLG_EDIT_PRINTAREA:
{
pResult = VclPtr<ScPrintAreasDlg>::Create( pB, pCW, pParent );
}
break;
case SID_OPENDLG_FUNCTION:
{
// dialog checks, what is in the cell
......@@ -495,6 +489,9 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
xResult.reset(new ScDbNameDlg(pB, pCW, pParent, &GetViewData()));
break;
}
case SID_OPENDLG_EDIT_PRINTAREA:
xResult.reset(new ScPrintAreasDlg(pB, pCW, pParent));
break;
}
if (xResult)
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkDialog" id="PrintAreasDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="printareasdialog|PrintAreasDialog">Edit Print Ranges</property>
<property name="resizable">False</property>
<property name="default_width">0</property>
<property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="internal-box1">
<property name="can_focus">False</property>
......@@ -100,7 +104,7 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="foruilo-RefButton" id="rbprintarea">
<object class="GtkButton" id="rbprintarea">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
......@@ -114,10 +118,11 @@
</packing>
</child>
<child>
<object class="foruilo-RefEdit" id="edprintarea">
<object class="GtkEntry" id="edprintarea">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="width_chars">50</property>
</object>
<packing>
......@@ -184,10 +189,11 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="foruilo-RefEdit" id="edrepeatrow">
<object class="GtkEntry" id="edrepeatrow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="width_chars">50</property>
</object>
<packing>
......@@ -196,7 +202,7 @@
</packing>
</child>
<child>
<object class="foruilo-RefButton" id="rbrepeatrow">
<object class="GtkButton" id="rbrepeatrow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
......@@ -266,10 +272,11 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="foruilo-RefEdit" id="edrepeatcol">
<object class="GtkEntry" id="edrepeatcol">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="width_chars">50</property>
</object>
<packing>
......@@ -278,7 +285,7 @@
</packing>
</child>
<child>
<object class="foruilo-RefButton" id="rbrepeatcol">
<object class="GtkButton" id="rbrepeatcol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
......
......@@ -169,9 +169,12 @@ sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkLabel[@id='dbarea'] orphan-label
sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui://GtkLabel[@id='label6'] orphan-label
sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui://foruilo-RefEdit[@id='destination-edit'] no-labelled-by
sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui://foruilo-RefEdit[@id='source-edit'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://foruilo-RefEdit[@id='edprintarea'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://foruilo-RefEdit[@id='edrepeatrow'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://foruilo-RefEdit[@id='edrepeatcol'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://GtkEntry[@id='edprintarea'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://GtkEntry[@id='edrepeatrow'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://GtkEntry[@id='edrepeatcol'] no-labelled-by
sc/uiconfig/scalc/ui/printareasdialog.ui://GtkButton[@id='rbprintarea'] button-no-label
sc/uiconfig/scalc/ui/printareasdialog.ui://GtkButton[@id='rbrepeatrow'] button-no-label
sc/uiconfig/scalc/ui/printareasdialog.ui://GtkButton[@id='rbrepeatcol'] button-no-label
sc/uiconfig/scalc/ui/protectsheetdlg.ui://GtkLabel[@id='protected'] orphan-label
sc/uiconfig/scalc/ui/protectsheetdlg.ui://GtkLabel[@id='unprotected'] orphan-label
sc/uiconfig/scalc/ui/protectsheetdlg.ui://GtkLabel[@id='insert-columns'] 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