summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-07-19 16:51:05 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-07-19 16:57:39 +0200
commit1bf191e88ead2a0e998045eae10326dd9cb0f9ef (patch)
treece12f0a8f303e9a6f26648b9722a5daec5071ad2 /sc
parentceefeb680b30908487388e4e4f9b3aa36d173a75 (diff)
GUI improvements for RNG, sampling and desc. statistics dialogs.
Change-Id: Ie34267d180015ae10d536d302ab4d206548de761
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/SamplingDialog.cxx2
-rw-r--r--sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui8
-rw-r--r--sc/uiconfig/scalc/ui/randomnumbergenerator.ui125
-rw-r--r--sc/uiconfig/scalc/ui/samplingdialog.ui12
5 files changed, 88 insertions, 63 deletions
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 31b3a1fbb8e6..a37d2edf6f23 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -174,7 +174,7 @@ void ScDescriptiveStatisticsDialog::SetReference( const ScRange& rReferenceRange
void ScDescriptiveStatisticsDialog::ApplyCalculationsFormulas( )
{
- OUString aUndo(ScResId(STR_DESCRIPTIVE_STATISTICS_UNDO_NAME));
+ OUString aUndo(SC_RESSTR(STR_DESCRIPTIVE_STATISTICS_UNDO_NAME));
ScDocShell* pDocShell = mViewData->GetDocShell();
svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
pUndoManager->EnterListAction( aUndo, aUndo );
@@ -196,7 +196,7 @@ void ScDescriptiveStatisticsDialog::ApplyCalculationsFormulas( )
for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != NULL; i++)
{
aAddress = ScAddress(outCol, outRow, outTab);
- OUString aCalculationName(ScResId(lclCalcDefinitions[i].aCalculationNameId));
+ OUString aCalculationName(SC_RESSTR(lclCalcDefinitions[i].aCalculationNameId));
pDocShell->GetDocFunc().SetStringCell(aAddress, aCalculationName, true);
outRow++;
}
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index e480112c7f25..841f3fc51663 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -258,7 +258,7 @@ ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell)
void ScSamplingDialog::PerformSampling()
{
- OUString aUndo(ScResId(STR_SAMPLING_UNDO_NAME));
+ OUString aUndo(SC_RESSTR(STR_SAMPLING_UNDO_NAME));
ScDocShell* pDocShell = mViewData->GetDocShell();
svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
diff --git a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
index 2f7d1b8bfc6a..03063de5d814 100644
--- a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
+++ b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <!-- interface-requires LibreOffice 1.0 -->
<!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="DescriptiveStatisticsDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -53,6 +53,8 @@
<property name="label">gtk-close</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>
@@ -82,6 +84,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Input Range</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">input-range-edit</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -126,6 +130,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Output Range</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">output-range-edit</property>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
index dcd54ce5eda1..e1e7f2ac9152 100644
--- a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
+++ b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
@@ -2,6 +2,63 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkListStore" id="distribution-liststore">
+ <columns>
+ <!-- column-name value -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Uniform</col>
+ <col id="1">0</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Uniform Integer</col>
+ <col id="1">8</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Normal</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Cauchy</col>
+ <col id="1">2</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Bernoulli</col>
+ <col id="1">3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Binomial</col>
+ <col id="1">4</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Chi Squared</col>
+ <col id="1">5</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Geometric</col>
+ <col id="1">6</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Negative Binomial</col>
+ <col id="1">7</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkAdjustment" id="parameter1-adjustment">
+ <property name="upper">100</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="parameter2-adjustment">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkDialog" id="RandomNumberGeneratorDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
@@ -53,6 +110,8 @@
<property name="label">gtk-close</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>
@@ -97,6 +156,7 @@
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="invisible_char">•</property>
+ <property name="width_chars">30</property>
<property name="invisible_char_set">True</property>
</object>
<packing>
@@ -168,6 +228,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Seed</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">seed-spin</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -181,7 +243,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
- <property name="shadow_type">out</property>
+ <property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
@@ -203,6 +265,8 @@
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">...</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">parameter1-spin</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -218,6 +282,8 @@
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">...</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">parameter2-spin</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -310,61 +376,4 @@
<action-widget response="0">close</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="distribution-liststore">
- <columns>
- <!-- column-name value -->
- <column type="gchararray"/>
- <!-- column-name id -->
- <column type="gint"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Uniform</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes">Uniform Integer</col>
- <col id="1">8</col>
- </row>
- <row>
- <col id="0" translatable="yes">Normal</col>
- <col id="1">1</col>
- </row>
- <row>
- <col id="0" translatable="yes">Cauchy</col>
- <col id="1">2</col>
- </row>
- <row>
- <col id="0" translatable="yes">Bernoulli</col>
- <col id="1">3</col>
- </row>
- <row>
- <col id="0" translatable="yes">Binomial</col>
- <col id="1">4</col>
- </row>
- <row>
- <col id="0" translatable="yes">Chi Squared</col>
- <col id="1">5</col>
- </row>
- <row>
- <col id="0" translatable="yes">Geometric</col>
- <col id="1">6</col>
- </row>
- <row>
- <col id="0" translatable="yes">Negative Binomial</col>
- <col id="1">7</col>
- </row>
- </data>
- </object>
- <object class="GtkAdjustment" id="parameter1-adjustment">
- <property name="upper">100</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="parameter2-adjustment">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
</interface>
diff --git a/sc/uiconfig/scalc/ui/samplingdialog.ui b/sc/uiconfig/scalc/ui/samplingdialog.ui
index 3aa0f64518d1..2dcf43a59d7f 100644
--- a/sc/uiconfig/scalc/ui/samplingdialog.ui
+++ b/sc/uiconfig/scalc/ui/samplingdialog.ui
@@ -65,6 +65,8 @@
<property name="label">gtk-close</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>
@@ -94,6 +96,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Input Range</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">input-range-edit</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -138,6 +142,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Output Range</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">output-range-edit</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -181,7 +187,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
+ <property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
@@ -221,7 +227,9 @@
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Sample SIze</property>
+ <property name="use_underline">True</property>
<property name="justify">center</property>
+ <property name="mnemonic_widget">sample-size-spin</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -288,6 +296,8 @@
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Period</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">period-spin</property>
</object>
<packing>
<property name="left_attach">0</property>