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

convert SolverInteger dialog to .ui

Change-Id: Iec4b0d041ec0389630d21572d6c5658639d85b17
üst d05918d4
......@@ -86,6 +86,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/insertcells \
sc/uiconfig/scalc/ui/insertname \
sc/uiconfig/scalc/ui/insertsheet \
sc/uiconfig/scalc/ui/integerdialog \
sc/uiconfig/scalc/ui/leftfooterdialog \
sc/uiconfig/scalc/ui/leftheaderdialog \
sc/uiconfig/scalc/ui/namerangesdialog \
......
......@@ -170,7 +170,6 @@
#define HID_SC_SOLVEROPTIONS "SC_HID_SC_SOLVEROPTIONS"
#define HID_SC_SOLVEROPTIONS_LB "SC_HID_SC_SOLVEROPTIONS_LB"
#define HID_SC_SOLVER_INTEGER "SC_HID_SC_SOLVER_INTEGER"
#define HID_SC_SOLVER_DOUBLE "SC_HID_SC_SOLVER_DOUBLE"
#define HID_SC_SOLVER_PROGRESS "SC_HID_SC_SOLVER_PROGRESS"
#define HID_SC_SOLVER_NOSOLUTION "SC_HID_SC_SOLVER_NOSOLUTION"
......
......@@ -1090,7 +1090,6 @@
#define RID_SCDLG_DPSHOWDETAIL (SC_DIALOGS_START + 137)
#define RID_SCDLG_SOLVEROPTIONS (SC_DIALOGS_START + 139)
#define RID_SCDLG_SOLVER_INTEGER (SC_DIALOGS_START + 140)
#define RID_SCDLG_SOLVER_DOUBLE (SC_DIALOGS_START + 141)
#define RID_SCDLG_SOLVER_PROGRESS (SC_DIALOGS_START + 142)
#define RID_SCDLG_SOLVER_NOSOLUTION (SC_DIALOGS_START + 143)
......
......@@ -20,12 +20,12 @@
#ifndef SC_SOLVEROPTIONS_HXX
#define SC_SOLVEROPTIONS_HXX
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/field.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
#include <svx/checklbx.hxx>
#include <com/sun/star/uno/Sequence.hxx>
......@@ -77,11 +77,8 @@ public:
class ScSolverIntegerDialog : public ModalDialog
{
FixedText maFtName;
NumericField maNfValue;
FixedLine maFlButtons;
OKButton maBtnOk;
CancelButton maBtnCancel;
VclFrame* m_pFrame;
NumericField* m_pNfValue;
public:
ScSolverIntegerDialog( Window * pParent );
......
......@@ -401,15 +401,12 @@ IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsSelHdl)
//------------------------------------------------------------------
ScSolverIntegerDialog::ScSolverIntegerDialog( Window * pParent )
: ModalDialog( pParent, ScResId( RID_SCDLG_SOLVER_INTEGER ) ),
maFtName ( this, ScResId( FT_OPTIONNAME ) ),
maNfValue ( this, ScResId( NF_VALUE ) ),
maFlButtons ( this, ScResId( FL_BUTTONS ) ),
maBtnOk ( this, ScResId( BTN_OK ) ),
maBtnCancel ( this, ScResId( BTN_CANCEL ) )
ScSolverIntegerDialog::ScSolverIntegerDialog(Window * pParent)
: ModalDialog( pParent, "IntegerDialog",
"modules/scalc/ui/integerdialog.ui" )
{
FreeResource();
get(m_pFrame, "frame");
get(m_pNfValue, "value");
}
ScSolverIntegerDialog::~ScSolverIntegerDialog()
......@@ -418,17 +415,17 @@ ScSolverIntegerDialog::~ScSolverIntegerDialog()
void ScSolverIntegerDialog::SetOptionName( const OUString& rName )
{
maFtName.SetText( rName );
m_pFrame->set_label(rName);
}
void ScSolverIntegerDialog::SetValue( sal_Int32 nValue )
{
maNfValue.SetValue( nValue );
m_pNfValue->SetValue( nValue );
}
sal_Int32 ScSolverIntegerDialog::GetValue() const
{
sal_Int64 nValue = maNfValue.GetValue();
sal_Int64 nValue = m_pNfValue->GetValue();
if ( nValue < SAL_MIN_INT32 )
return SAL_MIN_INT32;
if ( nValue > SAL_MAX_INT32 )
......
......@@ -89,56 +89,6 @@ ModalDialog RID_SCDLG_SOLVEROPTIONS
Text [ en-US ] = "Options" ;
};
ModalDialog RID_SCDLG_SOLVER_INTEGER
{
OutputSize = TRUE ;
HelpId = HID_SC_SOLVER_INTEGER ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 118 , 76 ) ;
Moveable = TRUE ;
FixedText FT_OPTIONNAME
{
Pos = MAP_APPFONT ( 6 , 8 ) ;
Size = MAP_APPFONT ( 106 , 16 ) ;
WordBreak = TRUE ;
// text is dynamic
};
NumericField NF_VALUE
{
HelpID = "sc:NumericField:RID_SCDLG_SOLVER_INTEGER:NF_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 27 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
TabStop = TRUE ;
Spin = TRUE ;
SpinSize = 1 ;
Repeat = TRUE ;
Minimum = -2147483648 ;
Maximum = 2147483647 ;
First = 0 ;
Last = 100 ;
};
FixedLine FL_BUTTONS
{
Pos = MAP_APPFONT ( 0 , 45 ) ;
Size = MAP_APPFONT ( 118 , 8 ) ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 6 , 56 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 62 , 56 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
Text [ en-US ] = "Edit Setting" ;
};
ModalDialog RID_SCDLG_SOLVER_DOUBLE
{
OutputSize = TRUE ;
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">2147483647</property>
<property name="value">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkDialog" id="IntegerDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Edit Setting</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">start</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="secondary">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkSpinButton" id="value">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="invisible_char"></property>
<property name="adjustment">adjustment1</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
</action-widgets>
</object>
</interface>
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