[Libreoffice-commits] core.git: 2 commits - helpcontent2 sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk
Caolán McNamara
caolanm at redhat.com
Thu Oct 24 06:12:54 PDT 2013
helpcontent2 | 2
sc/UIConfig_scalc.mk | 1
sc/inc/helpids.h | 1
sc/inc/sc.hrc | 1
sc/source/ui/inc/solveroptions.hxx | 9 --
sc/source/ui/miscdlgs/solveroptions.cxx | 25 ++-----
sc/source/ui/src/solveroptions.src | 43 ------------
sc/uiconfig/scalc/ui/doubledialog.ui | 106 ++++++++++++++++++++++++++++++++
8 files changed, 117 insertions(+), 71 deletions(-)
New commits:
commit 57ebd448497ec357aa348f5df90a52e8d58b4bb6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 24 14:09:30 2013 +0100
convert SolverDouble dialog to .ui
Change-Id: I996038a45495a5b6a63622ac0d290ac4fbc0bedd
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 29893fe..6ec6ee4 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecontents \
sc/uiconfig/scalc/ui/descriptivestatisticsdialog \
+ sc/uiconfig/scalc/ui/doubledialog \
sc/uiconfig/scalc/ui/erroralerttabpage \
sc/uiconfig/scalc/ui/externaldata \
sc/uiconfig/scalc/ui/filldlg \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 126eba6..f772fc7 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -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_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"
#define HID_SC_SOLVER_SUCCESS "SC_HID_SC_SOLVER_SUCCESS"
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index a8ad8eb..89f3898 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1090,7 +1090,6 @@
#define RID_SCDLG_DPSHOWDETAIL (SC_DIALOGS_START + 137)
#define RID_SCDLG_SOLVEROPTIONS (SC_DIALOGS_START + 139)
-#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)
#define RID_SCDLG_SOLVER_SUCCESS (SC_DIALOGS_START + 144)
diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx
index 9dbde59..5ce5ec7 100644
--- a/sc/source/ui/inc/solveroptions.hxx
+++ b/sc/source/ui/inc/solveroptions.hxx
@@ -82,7 +82,6 @@ class ScSolverIntegerDialog : public ModalDialog
public:
ScSolverIntegerDialog( Window * pParent );
- ~ScSolverIntegerDialog();
void SetOptionName( const OUString& rName );
void SetValue( sal_Int32 nValue );
@@ -91,15 +90,11 @@ public:
class ScSolverValueDialog : public ModalDialog
{
- FixedText maFtName;
- Edit maEdValue;
- FixedLine maFlButtons;
- OKButton maBtnOk;
- CancelButton maBtnCancel;
+ VclFrame* m_pFrame;
+ Edit* m_pEdValue;
public:
ScSolverValueDialog( Window * pParent );
- ~ScSolverValueDialog();
void SetOptionName( const OUString& rName );
void SetValue( double fValue );
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 479f3a4..256f334 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -409,10 +409,6 @@ ScSolverIntegerDialog::ScSolverIntegerDialog(Window * pParent)
get(m_pNfValue, "value");
}
-ScSolverIntegerDialog::~ScSolverIntegerDialog()
-{
-}
-
void ScSolverIntegerDialog::SetOptionName( const OUString& rName )
{
m_pFrame->set_label(rName);
@@ -436,35 +432,28 @@ sal_Int32 ScSolverIntegerDialog::GetValue() const
//------------------------------------------------------------------
ScSolverValueDialog::ScSolverValueDialog( Window * pParent )
- : ModalDialog( pParent, ScResId( RID_SCDLG_SOLVER_DOUBLE ) ),
- maFtName ( this, ScResId( FT_OPTIONNAME ) ),
- maEdValue ( this, ScResId( ED_VALUE ) ),
- maFlButtons ( this, ScResId( FL_BUTTONS ) ),
- maBtnOk ( this, ScResId( BTN_OK ) ),
- maBtnCancel ( this, ScResId( BTN_CANCEL ) )
-{
- FreeResource();
-}
-
-ScSolverValueDialog::~ScSolverValueDialog()
+ : ModalDialog( pParent, "DoubleDialog",
+ "modules/scalc/ui/doubledialog.ui" )
{
+ get(m_pFrame, "frame");
+ get(m_pEdValue, "value");
}
void ScSolverValueDialog::SetOptionName( const OUString& rName )
{
- maFtName.SetText( rName );
+ m_pFrame->set_label(rName);
}
void ScSolverValueDialog::SetValue( double fValue )
{
- maEdValue.SetText( rtl::math::doubleToUString( fValue,
+ m_pEdValue->SetText( rtl::math::doubleToUString( fValue,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true ) );
}
double ScSolverValueDialog::GetValue() const
{
- OUString aInput = maEdValue.GetText();
+ OUString aInput = m_pEdValue->GetText();
const LocaleDataWrapper* pLocaleData = ScGlobal::GetpLocaleData();
rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
diff --git a/sc/source/ui/src/solveroptions.src b/sc/source/ui/src/solveroptions.src
index 8f7bb13..ae825a4 100644
--- a/sc/source/ui/src/solveroptions.src
+++ b/sc/source/ui/src/solveroptions.src
@@ -89,47 +89,4 @@ ModalDialog RID_SCDLG_SOLVEROPTIONS
Text [ en-US ] = "Options" ;
};
-ModalDialog RID_SCDLG_SOLVER_DOUBLE
-{
- OutputSize = TRUE ;
- HelpId = HID_SC_SOLVER_DOUBLE ;
- 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
- };
- Edit ED_VALUE
- {
- HelpID = "sc:Edit:RID_SCDLG_SOLVER_DOUBLE:ED_VALUE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 27 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- };
- 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" ;
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/doubledialog.ui b/sc/uiconfig/scalc/ui/doubledialog.ui
new file mode 100644
index 0000000..39ac15e
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/doubledialog.ui
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="DoubleDialog">
+ <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="GtkEntry" 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>
+ </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>
commit f61e82eb3b46a6ff7312dfc8ebacee73658f23ad
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 24 14:12:15 2013 +0100
Updated core
Project: help 91f8b3cb54e752a174ee10be4e528c7dcd4fb55e
diff --git a/helpcontent2 b/helpcontent2
index 4327d90..91f8b3c 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 4327d90e23cba2f2829a4d2bf0ed449fbeb92cdb
+Subproject commit 91f8b3cb54e752a174ee10be4e528c7dcd4fb55e
More information about the Libreoffice-commits
mailing list