[Libreoffice-commits] core.git: 8 commits - officecfg/registry sc/AllLangResTarget_sc.mk sc/inc sc/Library_sc.mk sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk

Tomaž Vajngerl quikee at gmail.com
Fri Jul 19 08:00:07 PDT 2013


 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   21 
 sc/AllLangResTarget_sc.mk                                         |    2 
 sc/Library_sc.mk                                                  |    2 
 sc/UIConfig_scalc.mk                                              |    2 
 sc/inc/globstr.hrc                                                |   19 
 sc/inc/sc.hrc                                                     |    2 
 sc/sdi/cellsh.sdi                                                 |    4 
 sc/sdi/scalc.sdi                                                  |   46 
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx    |  277 +++++
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src    |   83 +
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx    |  108 -
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src    |   11 
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx                 |  347 ++++++
 sc/source/ui/StatisticsDialogs/SamplingDialog.src                 |   19 
 sc/source/ui/app/scdll.cxx                                        |    2 
 sc/source/ui/inc/DescriptiveStatisticsDialog.hxx                  |   78 +
 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx                  |   12 
 sc/source/ui/inc/SamplingDialog.hxx                               |   89 +
 sc/source/ui/inc/reffact.hxx                                      |    2 
 sc/source/ui/view/cellsh.cxx                                      |    2 
 sc/source/ui/view/cellsh1.cxx                                     |   21 
 sc/source/ui/view/reffact.cxx                                     |   79 -
 sc/source/ui/view/tabvwsh.cxx                                     |    2 
 sc/source/ui/view/tabvwshc.cxx                                    |   16 
 sc/uiconfig/scalc/menubar/menubar.xml                             |    6 
 sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui               |  188 +++
 sc/uiconfig/scalc/ui/randomnumbergenerator.ui                     |  542 ++++------
 sc/uiconfig/scalc/ui/samplingdialog.ui                            |  346 ++++++
 28 files changed, 1899 insertions(+), 429 deletions(-)

New commits:
commit 1bf191e88ead2a0e998045eae10326dd9cb0f9ef
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Fri Jul 19 16:51:05 2013 +0200

    GUI improvements for RNG, sampling and desc. statistics dialogs.
    
    Change-Id: Ie34267d180015ae10d536d302ab4d206548de761

diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 31b3a1f..a37d2ed 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 e480112..841f3fc 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 2f7d1b8..03063de 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 dcd54ce..e1e7f2a 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 3aa0f64..2dcf43a 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>
commit ceefeb680b30908487388e4e4f9b3aa36d173a75
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Thu Jul 18 22:32:22 2013 +0200

    Cleanup of RNG, Sampling and Descriptive Statistics Dialogs
    
    Change-Id: I659b4bed483fc06fa5777236d6ebec22f6c7f391

diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index b2df789..31b3a1f 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -29,10 +29,9 @@
 
 #include "DescriptiveStatisticsDialog.hxx"
 
-#define ABS_DREF3D SCA_VALID | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_TAB_3D
-
 namespace
 {
+
 struct StatisticCalculation {
     const sal_Int16 aCalculationNameId;
     const char*     aFormula;
@@ -59,29 +58,31 @@ static const StatisticCalculation lclCalcDefinitions[] =
 }
 
 ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog(
-        SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScViewData* pViewData ) :
-    ScAnyRefDlg     ( pB, pCW, pParent, "DescriptiveStatisticsDialog", "modules/scalc/ui/descriptivestatisticsdialog.ui" ),
+                    SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
+                    Window* pParent, ScViewData* pViewData ) :
+    ScAnyRefDlg     ( pSfxBindings, pChildWindow, pParent,
+                      "DescriptiveStatisticsDialog", "modules/scalc/ui/descriptivestatisticsdialog.ui" ),
     mViewData       ( pViewData ),
     mDocument       ( pViewData->GetDocument() ),
     mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
     mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ),
     mDialogLostFocus( false )
 {
-    get(mpInputRangeLabel, "input-range-label");
-    get(mpInputRangeEdit, "input-range-edit");
-    mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
+    get(mpInputRangeLabel,  "input-range-label");
+    get(mpInputRangeEdit,   "input-range-edit");
     get(mpInputRangeButton, "input-range-button");
+    mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
     mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
 
-    get(mpOutputRangeLabel, "output-range-label");
-    get(mpOutputRangeEdit, "output-range-edit");
-    mpOutputRangeEdit->SetReferences(this, mpOutputRangeLabel);
+    get(mpOutputRangeLabel,  "output-range-label");
+    get(mpOutputRangeEdit,   "output-range-edit");
     get(mpOutputRangeButton, "output-range-button");
+    mpOutputRangeEdit->SetReferences(this, mpOutputRangeLabel);
     mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
 
     get(mpButtonOk,     "ok");
     get(mpButtonApply,  "apply");
-    get(mpButtonCancel, "cancel");
+    get(mpButtonClose,  "close");
 
     Init();
     GetRangeFromSelection();
@@ -90,7 +91,7 @@ ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog(
 void ScDescriptiveStatisticsDialog::Init()
 {
     mpButtonOk->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, OkClicked ) );
-    mpButtonCancel->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, CancelClicked ) );
+    mpButtonClose->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, CloseClicked ) );
     mpButtonApply->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, ApplyClicked ) );
     mpButtonOk->Enable(false);
     mpButtonApply->Enable(false);
@@ -114,7 +115,7 @@ void ScDescriptiveStatisticsDialog::GetRangeFromSelection()
 {
     OUString aCurrentString;
     mViewData->GetSimpleArea(mInputRange);
-    mInputRange.Format(aCurrentString, ABS_DREF3D, mDocument, mAddressDetails);
+    mInputRange.Format(aCurrentString, SCR_ABS_3D, mDocument, mAddressDetails);
     mpInputRangeEdit->SetText(aCurrentString);
 }
 
@@ -153,7 +154,7 @@ void ScDescriptiveStatisticsDialog::SetReference( const ScRange& rReferenceRange
         if ( mpActiveEdit == mpInputRangeEdit )
         {
             mInputRange = rReferenceRange;
-            mInputRange.Format( aReferenceString, ABS_DREF3D, pDocument, mAddressDetails );
+            mInputRange.Format( aReferenceString, SCR_ABS_3D, pDocument, mAddressDetails );
             mpInputRangeEdit->SetRefString( aReferenceString );
         }
         else if ( mpActiveEdit == mpOutputRangeEdit )
@@ -235,7 +236,7 @@ void ScDescriptiveStatisticsDialog::ApplyCalculationsFormulas( )
 IMPL_LINK( ScDescriptiveStatisticsDialog, OkClicked, PushButton*, /*pButton*/ )
 {
     ApplyClicked(NULL);
-    CancelClicked(NULL);
+    CloseClicked(NULL);
     return 0;
 }
 
@@ -246,7 +247,7 @@ IMPL_LINK( ScDescriptiveStatisticsDialog, ApplyClicked, PushButton*, /*pButton*/
     return 0;
 }
 
-IMPL_LINK( ScDescriptiveStatisticsDialog, CancelClicked, PushButton*, /*pButton*/ )
+IMPL_LINK( ScDescriptiveStatisticsDialog, CloseClicked, PushButton*, /*pButton*/ )
 {
     Close();
     return 0;
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
index af44357..035dab7 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
@@ -6,15 +6,6 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
 #include "globstr.hrc"
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 06e02f5..779252e 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -38,8 +38,6 @@
 
 #include "RandomNumberGeneratorDialog.hxx"
 
-#define ABS_DREF3D SCA_VALID | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_TAB_3D
-
 namespace
 {
 
@@ -58,33 +56,35 @@ static const sal_Int64 DIGITS      = 4;
 }
 
 ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
-        SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScViewData* pViewData ) :
-    ScAnyRefDlg     ( pB, pCW, pParent, "RandomNumberGeneratorDialog", "modules/scalc/ui/randomnumbergenerator.ui" ),
+                    SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
+                    Window* pParent, ScViewData* pViewData ) :
+    ScAnyRefDlg     ( pSfxBindings, pChildWindow, pParent,
+                      "RandomNumberGeneratorDialog", "modules/scalc/ui/randomnumbergenerator.ui" ),
     mViewData       ( pViewData ),
     mDocument       ( pViewData->GetDocument() ),
     mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
     mDialogLostFocus( false )
 {
-    get(mpInputRangeText, "cell-range-label");
-    get(mpInputRangeEdit, "cell-range-edit");
-    mpInputRangeEdit->SetReferences(this, mpInputRangeText);
+    get(mpInputRangeText,   "cell-range-label");
+    get(mpInputRangeEdit,   "cell-range-edit");
     get(mpInputRangeButton, "cell-range-button");
+    mpInputRangeEdit->SetReferences(this, mpInputRangeText);
     mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
 
-    get(mpButtonOk,     "ok");
-    get(mpButtonApply,  "apply");
-    get(mpButtonCancel, "cancel");
-
     get(mpParameter1Value, "parameter1-spin");
     get(mpParameter1Text,  "parameter1-label");
     get(mpParameter2Value, "parameter2-spin");
     get(mpParameter2Text,  "parameter2-label");
 
     get(mpEnableSeed, "enable-seed-check");
-    get(mpSeed, "seed-spin");
+    get(mpSeed,       "seed-spin");
 
     get(mpDistributionCombo, "distribution-combo");
 
+    get(mpButtonOk,     "ok");
+    get(mpButtonApply,  "apply");
+    get(mpButtonClose, "close");
+
     Init();
     GetRangeFromSelection();
 }
@@ -92,7 +92,7 @@ ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
 void ScRandomNumberGeneratorDialog::Init()
 {
     mpButtonOk->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, OkClicked ) );
-    mpButtonCancel->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, CancelClicked ) );
+    mpButtonClose->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, CloseClicked ) );
     mpButtonApply->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, ApplyClicked ) );
 
     Link aLink = LINK( this, ScRandomNumberGeneratorDialog, GetFocusHandler );
@@ -118,7 +118,7 @@ void ScRandomNumberGeneratorDialog::GetRangeFromSelection()
 {
     OUString aCurrentString;
     mViewData->GetSimpleArea(mInputRange);
-    mInputRange.Format( aCurrentString, ABS_DREF3D, mDocument, mAddressDetails );
+    mInputRange.Format( aCurrentString, SCR_ABS_3D, mDocument, mAddressDetails );
     mpInputRangeEdit->SetText( aCurrentString );
 }
 
@@ -155,7 +155,7 @@ void ScRandomNumberGeneratorDialog::SetReference( const ScRange& rReferenceRange
         mInputRange = rReferenceRange;
 
         String aReferenceString;
-        mInputRange.Format( aReferenceString, ABS_DREF3D, pDocument, mAddressDetails );
+        mInputRange.Format( aReferenceString, SCR_ABS_3D, pDocument, mAddressDetails );
         mpInputRangeEdit->SetRefString( aReferenceString );
     }
 }
@@ -289,8 +289,8 @@ void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG randomGenerator, OUStrin
 
 IMPL_LINK( ScRandomNumberGeneratorDialog, OkClicked, PushButton*, /*pButton*/ )
 {
-    SelectGeneratorAndGenerateNumbers();
-    Close();
+    ApplyClicked(NULL);
+    CloseClicked(NULL);
     return 0;
 }
 
@@ -301,7 +301,7 @@ IMPL_LINK( ScRandomNumberGeneratorDialog, ApplyClicked, PushButton*, /*pButton*/
     return 0;
 }
 
-IMPL_LINK( ScRandomNumberGeneratorDialog, CancelClicked, PushButton*, /*pButton*/ )
+IMPL_LINK( ScRandomNumberGeneratorDialog, CloseClicked, PushButton*, /*pButton*/ )
 {
     Close();
     return 0;
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src
index b30ae23..afd8891 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src
@@ -6,15 +6,6 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
 #include "globstr.hrc"
@@ -89,7 +80,7 @@ String STR_RNG_PARAMETER_STANDARD_PROBABILITY
 };
 String STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS
 {
-    Text [ en-US ] = "Number Of Trials";
+    Text [ en-US ] = "Number of Trials";
 };
 String STR_RNG_PARAMETER_STANDARD_NU_VALUE
 {
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index d78d901..e480112 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -28,31 +28,27 @@
 
 #include "SamplingDialog.hxx"
 
-#define ABS_DREF3D SCA_VALID | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_TAB_3D
-
-namespace
-{
-}
-
 ScSamplingDialog::ScSamplingDialog(
-        SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScViewData* pViewData ) :
-    ScAnyRefDlg     ( pB, pCW, pParent, "SamplingDialog", "modules/scalc/ui/samplingdialog.ui" ),
+                    SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
+                    Window* pParent, ScViewData* pViewData ) :
+    ScAnyRefDlg     ( pSfxBindings, pChildWindow, pParent,
+                      "SamplingDialog", "modules/scalc/ui/samplingdialog.ui" ),
     mViewData       ( pViewData ),
     mDocument       ( pViewData->GetDocument() ),
     mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
     mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ),
     mDialogLostFocus( false )
 {
-    get(mpInputRangeLabel, "input-range-label");
-    get(mpInputRangeEdit, "input-range-edit");
-    mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
+    get(mpInputRangeLabel,  "input-range-label");
+    get(mpInputRangeEdit,   "input-range-edit");
     get(mpInputRangeButton, "input-range-button");
+    mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
     mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
 
-    get(mpOutputRangeLabel, "output-range-label");
-    get(mpOutputRangeEdit, "output-range-edit");
-    mpOutputRangeEdit->SetReferences(this, mpOutputRangeLabel);
+    get(mpOutputRangeLabel,  "output-range-label");
+    get(mpOutputRangeEdit,   "output-range-edit");
     get(mpOutputRangeButton, "output-range-button");
+    mpOutputRangeEdit->SetReferences(this, mpOutputRangeLabel);
     mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
 
     get(mpSampleSize, "sample-size-spin");
@@ -63,7 +59,7 @@ ScSamplingDialog::ScSamplingDialog(
 
     get(mpButtonOk,     "ok");
     get(mpButtonApply,  "apply");
-    get(mpButtonCancel, "cancel");
+    get(mpButtonClose,  "close");
 
     Init();
     GetRangeFromSelection();
@@ -72,7 +68,7 @@ ScSamplingDialog::ScSamplingDialog(
 void ScSamplingDialog::Init()
 {
     mpButtonOk->SetClickHdl( LINK( this, ScSamplingDialog, OkClicked ) );
-    mpButtonCancel->SetClickHdl( LINK( this, ScSamplingDialog, CancelClicked ) );
+    mpButtonClose->SetClickHdl( LINK( this, ScSamplingDialog, CloseClicked ) );
     mpButtonApply->SetClickHdl( LINK( this, ScSamplingDialog, ApplyClicked ) );
     mpButtonOk->Enable(false);
     mpButtonApply->Enable(false);
@@ -107,7 +103,7 @@ void ScSamplingDialog::GetRangeFromSelection()
 {
     OUString aCurrentString;
     mViewData->GetSimpleArea(mInputRange);
-    mInputRange.Format(aCurrentString, ABS_DREF3D, mDocument, mAddressDetails);
+    mInputRange.Format(aCurrentString, SCR_ABS_3D, mDocument, mAddressDetails);
     mpInputRangeEdit->SetText(aCurrentString);
 }
 
@@ -146,7 +142,7 @@ void ScSamplingDialog::SetReference( const ScRange& rReferenceRange, ScDocument*
         if ( mpActiveEdit == mpInputRangeEdit )
         {
             mInputRange = rReferenceRange;
-            mInputRange.Format( aReferenceString, ABS_DREF3D, pDocument, mAddressDetails );
+            mInputRange.Format( aReferenceString, SCR_ABS_3D, pDocument, mAddressDetails );
             mpInputRangeEdit->SetRefString( aReferenceString );
         }
         else if ( mpActiveEdit == mpOutputRangeEdit )
@@ -166,18 +162,12 @@ void ScSamplingDialog::SetReference( const ScRange& rReferenceRange, ScDocument*
             // Enable OK, Cancel if output range is set
             mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
             mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
-
         }
     }
 }
 
-void ScSamplingDialog::PerformSampling()
+ScRange ScSamplingDialog::PerformPeriodicSampling(ScDocShell* pDocShell)
 {
-    OUString aUndo(ScResId(STR_SAMPLING_UNDO_NAME));
-    ScDocShell* pDocShell = mViewData->GetDocShell();
-    svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
-    pUndoManager->EnterListAction( aUndo, aUndo );
-
     ScAddress aStart = mInputRange.aStart;
     ScAddress aEnd   = mInputRange.aEnd;
 
@@ -185,86 +175,114 @@ void ScSamplingDialog::PerformSampling()
     SCCOL outCol = mOutputAddress.Col();
     SCROW outRow = mOutputAddress.Row();
 
-    if (mpRandomMethodRadio->IsChecked())
-    {
-        TimeValue now;
-        osl_getSystemTime(&now);
-        boost::mt19937 seed(now.Nanosec);
-        boost::uniform_01<boost::mt19937> rng(seed);
+    sal_Int64 aPeriod = mpPeriod->GetValue();
 
-        SCROW inRow;
-
-        sal_Int64 aSampleSize = mpSampleSize->GetValue();
-
-        for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++)
+    for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++)
+    {
+        outCol = mOutputAddress.Col();
+        for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
         {
-            outCol = mOutputAddress.Col();
-            for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
+            sal_Int64 i = 0;
+            outRow = mOutputAddress.Row();
+            for (SCROW inRow = aStart.Row(); inRow <= aEnd.Row(); inRow++)
             {
-                SCROW aPopulationSize = (aEnd.Row() - aStart.Row()) + 1;
-
-                outRow = mOutputAddress.Row();
-                inRow  = aStart.Row();
-
-                double aRandomValue;
-
-                while ((outRow - mOutputAddress.Row()) < aSampleSize)
+                if (i % aPeriod == aPeriod - 1 ) // Sample the last of period
                 {
-                    aRandomValue = rng();
-
-                    if ( (aPopulationSize - (inRow - aStart.Row())) * aRandomValue >= aSampleSize - (outRow - mOutputAddress.Row()) )
-                    {
-                        inRow++;
-                    }
-                    else
-                    {
-                        double aValue = mDocument->GetValue( ScAddress(inCol, inRow, inTab) );
-                        pDocShell->GetDocFunc().SetValueCell(ScAddress(outCol, outRow, outTab), aValue, true);
-                        inRow++;
-                        outRow++;
-                    }
+                    double aValue = mDocument->GetValue(ScAddress(inCol, inRow, inTab));
+                    pDocShell->GetDocFunc().SetValueCell(ScAddress(outCol, outRow, outTab), aValue, true);
+                    outRow++;
                 }
-                outCol++;
+                i++;
             }
-            outTab++;
+            outCol++;
         }
+        outTab++;
     }
-    else if (mpPeriodicMethodRadio->IsChecked())
-    {
-        sal_Int64 aPeriod = mpPeriod->GetValue();
 
-        for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++)
+    return ScRange(mOutputAddress, ScAddress(outTab, outRow, outTab) );
+}
+
+ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell)
+{
+    ScAddress aStart = mInputRange.aStart;
+    ScAddress aEnd   = mInputRange.aEnd;
+
+    SCTAB outTab = mOutputAddress.Tab();
+    SCCOL outCol = mOutputAddress.Col();
+    SCROW outRow = mOutputAddress.Row();
+
+    TimeValue now;
+    osl_getSystemTime(&now);
+    boost::mt19937 seed(now.Nanosec);
+    boost::uniform_01<boost::mt19937> rng(seed);
+
+    SCROW inRow;
+
+    sal_Int64 aSampleSize = mpSampleSize->GetValue();
+
+    for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++)
+    {
+        outCol = mOutputAddress.Col();
+        for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
         {
-            outCol = mOutputAddress.Col();
-            for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
+            SCROW aPopulationSize = (aEnd.Row() - aStart.Row()) + 1;
+
+            outRow = mOutputAddress.Row();
+            inRow  = aStart.Row();
+
+            double aRandomValue;
+
+            while ((outRow - mOutputAddress.Row()) < aSampleSize)
             {
-                sal_Int64 i = 0;
-                outRow = mOutputAddress.Row();
-                for (SCROW inRow = aStart.Row(); inRow <= aEnd.Row(); inRow++)
+                aRandomValue = rng();
+
+                if ( (aPopulationSize - (inRow - aStart.Row())) * aRandomValue >= aSampleSize - (outRow - mOutputAddress.Row()) )
+                {
+                    inRow++;
+                }
+                else
                 {
-                    if (i % aPeriod == aPeriod - 1 ) // Sample the last of period
-                    {
-                        double aValue = mDocument->GetValue(ScAddress(inCol, inRow, inTab));
-                        pDocShell->GetDocFunc().SetValueCell(ScAddress(outCol, outRow, outTab), aValue, true);
-                        outRow++;
-                    }
-                    i++;
+                    double aValue = mDocument->GetValue( ScAddress(inCol, inRow, inTab) );
+                    pDocShell->GetDocFunc().SetValueCell(ScAddress(outCol, outRow, outTab), aValue, true);
+                    inRow++;
+                    outRow++;
                 }
-                outCol++;
             }
-            outTab++;
+            outCol++;
         }
+        outTab++;
+    }
+
+    return ScRange(mOutputAddress, ScAddress(outTab, outRow, outTab) );
+}
+
+void ScSamplingDialog::PerformSampling()
+{
+    OUString aUndo(ScResId(STR_SAMPLING_UNDO_NAME));
+    ScDocShell* pDocShell = mViewData->GetDocShell();
+    svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
+
+    ScRange aModifiedRange;
+
+    pUndoManager->EnterListAction( aUndo, aUndo );
+
+    if (mpRandomMethodRadio->IsChecked())
+    {
+        aModifiedRange = PerformRandomSampling(pDocShell);
+    }
+    else if (mpPeriodicMethodRadio->IsChecked())
+    {
+        aModifiedRange = PerformPeriodicSampling(pDocShell);
     }
 
-    ScRange aOutputRange(mOutputAddress, ScAddress(outTab, outRow, outTab) );
     pUndoManager->LeaveListAction();
-    pDocShell->PostPaint( aOutputRange, PAINT_GRID );
+    pDocShell->PostPaint(aModifiedRange, PAINT_GRID);
 }
 
 IMPL_LINK( ScSamplingDialog, OkClicked, PushButton*, /*pButton*/ )
 {
-    PerformSampling();
-    Close();
+    ApplyClicked(NULL);
+    CloseClicked(NULL);
     return 0;
 }
 
@@ -275,7 +293,7 @@ IMPL_LINK( ScSamplingDialog, ApplyClicked, PushButton*, /*pButton*/ )
     return 0;
 }
 
-IMPL_LINK( ScSamplingDialog, CancelClicked, PushButton*, /*pButton*/ )
+IMPL_LINK( ScSamplingDialog, CloseClicked, PushButton*, /*pButton*/ )
 {
     Close();
     return 0;
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.src b/sc/source/ui/StatisticsDialogs/SamplingDialog.src
index e7eef3a..ddd007a2 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.src
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.src
@@ -6,15 +6,6 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
 #include "globstr.hrc"
diff --git a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
index edf08b6..c375d27 100644
--- a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
+++ b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
@@ -44,7 +44,7 @@ private:
 
     PushButton*         mpButtonApply;
     OKButton*           mpButtonOk;
-    CancelButton*       mpButtonCancel;
+    CloseButton*        mpButtonClose;
 
     //
     formula::RefEdit*   mpActiveEdit;
@@ -66,7 +66,7 @@ private:
     void ApplyCalculationsFormulas();
 
     DECL_LINK( OkClicked,        PushButton* );
-    DECL_LINK( CancelClicked,    PushButton* );
+    DECL_LINK( CloseClicked,     PushButton* );
     DECL_LINK( ApplyClicked,     PushButton* );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index cb438c8..377f8dc 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -47,7 +47,7 @@ private:
     CheckBox*           mpEnableSeed;
     PushButton*         mpButtonApply;
     OKButton*           mpButtonOk;
-    CancelButton*       mpButtonCancel;
+    CloseButton*        mpButtonClose;
 
     // Data
     ScViewData*         mViewData;
@@ -67,7 +67,7 @@ private:
     void SelectGeneratorAndGenerateNumbers();
 
     DECL_LINK( OkClicked,        PushButton* );
-    DECL_LINK( CancelClicked,    PushButton* );
+    DECL_LINK( CloseClicked,     PushButton* );
     DECL_LINK( ApplyClicked,     PushButton* );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx
index c573905..02f07cd 100644
--- a/sc/source/ui/inc/SamplingDialog.hxx
+++ b/sc/source/ui/inc/SamplingDialog.hxx
@@ -50,7 +50,7 @@ private:
 
     PushButton*         mpButtonApply;
     OKButton*           mpButtonOk;
-    CancelButton*       mpButtonCancel;
+    CloseButton*        mpButtonClose;
 
     //
     formula::RefEdit*   mpActiveEdit;
@@ -71,8 +71,11 @@ private:
     void GetRangeFromSelection();
     void PerformSampling();
 
+    ScRange PerformRandomSampling(ScDocShell* pDocShell);
+    ScRange PerformPeriodicSampling(ScDocShell* pDocShell);
+
     DECL_LINK( OkClicked,        PushButton* );
-    DECL_LINK( CancelClicked,    PushButton* );
+    DECL_LINK( CloseClicked,     PushButton* );
     DECL_LINK( ApplyClicked,     PushButton* );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
diff --git a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
index b6040b4..2f7d1b8 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 gtk+ 3.0 -->
   <!-- interface-requires LibreOffice 1.0 -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="DescriptiveStatisticsDialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
@@ -49,8 +49,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkButton" id="close">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -164,15 +164,6 @@
                 <property name="height">1</property>
               </packing>
             </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -185,7 +176,7 @@
     <action-widgets>
       <action-widget response="0">apply</action-widget>
       <action-widget response="0">ok</action-widget>
-      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">close</action-widget>
     </action-widgets>
   </object>
 </interface>
diff --git a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
index e4a14b3..dcd54ce 100644
--- a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
+++ b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
@@ -49,8 +49,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkButton" id="close">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -307,7 +307,7 @@
     <action-widgets>
       <action-widget response="0">apply</action-widget>
       <action-widget response="0">ok</action-widget>
-      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">close</action-widget>
     </action-widgets>
   </object>
   <object class="GtkListStore" id="distribution-liststore">
diff --git a/sc/uiconfig/scalc/ui/samplingdialog.ui b/sc/uiconfig/scalc/ui/samplingdialog.ui
index cd6bd21..3aa0f64 100644
--- a/sc/uiconfig/scalc/ui/samplingdialog.ui
+++ b/sc/uiconfig/scalc/ui/samplingdialog.ui
@@ -9,6 +9,11 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
+  <object class="GtkAdjustment" id="sample-size-adjustment">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkDialog" id="SamplingDialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
@@ -56,8 +61,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkButton" id="close">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -325,12 +330,7 @@
     <action-widgets>
       <action-widget response="0">apply</action-widget>
       <action-widget response="0">ok</action-widget>
-      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">close</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="sample-size-adjustment">
-    <property name="upper">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
 </interface>
commit fa20e0dd67c1da8fe8653f163e0fc6743934e7ae
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Thu Jul 18 21:44:54 2013 +0200

    fdo#66477 Add descriptive statistics calculation to Calc.
    
    New menu entry in "Data>>Statistics>>Descriptive Statistics..." to
    quickly calculate basic statistics for a row of data. These are
    Mean, Standard Error, Mode, Median, Variance, Standard Deviation,
    Kurtosis, Skewness, Range, Minimum, Maximum, Sum and Count.
    
    Change-Id: I7c4a75adf7731f42f9c7f8e741ff1b5fa245c1c8

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index d6e2e17..fb8ed57 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -645,6 +645,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:DescriptiveStatisticsDialog" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Descriptive Statistics...</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:EditHeaderAndFooter" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">~Headers & Footers...</value>
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 4de23aa..7f6095e 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
     sc/source/ui/sidebar/CellAppearancePropertyPanel.src \
     sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src \
     sc/source/ui/StatisticsDialogs/SamplingDialog.src \
+    sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src \
     sc/source/core/src/compiler.src \
 ))
 
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 76382dd..c192566 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -475,6 +475,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 	sc/source/ui/sidebar/ScPanelFactory \
 	sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog \
 	sc/source/ui/StatisticsDialogs/SamplingDialog \
+	sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog \
 	sc/source/ui/undo/areasave \
 	sc/source/ui/undo/refundo \
 	sc/source/ui/undo/target \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index a740f25..f14e8dc 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -67,6 +67,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/definename \
 	sc/uiconfig/scalc/ui/deletecells \
 	sc/uiconfig/scalc/ui/deletecontents \
+	sc/uiconfig/scalc/ui/descriptivestatisticsdialog \
 	sc/uiconfig/scalc/ui/externaldata \
 	sc/uiconfig/scalc/ui/footerdialog \
 	sc/uiconfig/scalc/ui/formatcellsdialog \
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 458e775..7a7cf0a 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -704,7 +704,24 @@
 #define STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS 571
 #define STR_RNG_PARAMETER_STANDARD_NU_VALUE         572
 
-#define STR_SAMPLING_UNDO_NAME                      573
+#define STR_SAMPLING_UNDO_NAME  573
+
+#define SID_CALC_MEAN           574
+#define SID_CALC_STD_ERROR      575
+#define SID_CALC_MODE           576
+#define SID_CALC_MEDIAN         577
+#define SID_CALC_VARIANCE       578
+#define SID_CALC_STD_DEVIATION  579
+#define SID_CALC_KURTOSIS       580
+#define SID_CALC_SKEWNESS       581
+#define SID_CALC_RANGE          582
+#define SID_CALC_MIN            583
+#define SID_CALC_MAX            584
+#define SID_CALC_SUM            585
+#define SID_CALC_COUNT          586
+
+#define STR_DESCRIPTIVE_STATISTICS_UNDO_NAME  587
+
 
 #endif
 
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 35e6d05..d075e04 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -254,6 +254,7 @@
 
 #define SID_OPENDLG_RANDOM_NUMBER_GENERATOR (SC_MESSAGE_START + 70)
 #define SID_SAMPLING_DIALOG                 (SC_MESSAGE_START + 71)
+#define SID_DESCRIPTIVE_STATISTICS_DIALOG   (SC_MESSAGE_START + 72)
 
 // functions
 
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index bf98c94..07fce83 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -149,6 +149,7 @@ interface CellSelection
     FID_FILL_AUTO       [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
     SID_OPENDLG_RANDOM_NUMBER_GENERATOR [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
     SID_SAMPLING_DIALOG                 [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
+    SID_DESCRIPTIVE_STATISTICS_DIALOG   [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
     SID_MARKDATAAREA    [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
     SID_MARKARRAYFORMULA [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
     SID_SETINPUTMODE    [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 5e7fcbd..7ac69ac 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -2990,6 +2990,30 @@ SfxVoidItem SamplingDialog SID_SAMPLING_DIALOG
     GroupId = GID_OPTIONS;
 ]
 
+SfxVoidItem DescriptiveStatisticsDialog SID_DESCRIPTIVE_STATISTICS_DIALOG
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = TRUE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = TRUE,
+    GroupId = GID_OPTIONS;
+]
+
 //--------------------------------------------------------------------------
 SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
 ()
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
new file mode 100644
index 0000000..b2df789
--- /dev/null
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -0,0 +1,276 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <sfx2/dispatch.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/undo.hxx>
+
+#include "formulacell.hxx"
+#include "rangelst.hxx"
+#include "scitems.hxx"
+#include "docsh.hxx"
+#include "document.hxx"
+#include "uiitems.hxx"
+#include "reffact.hxx"
+#include "scresid.hxx"
+#include "random.hxx"
+#include "docfunc.hxx"
+#include "globstr.hrc"
+#include "sc.hrc"
+
+#include <boost/random.hpp>
+
+#include "DescriptiveStatisticsDialog.hxx"
+
+#define ABS_DREF3D SCA_VALID | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_TAB_3D
+
+namespace
+{
+struct StatisticCalculation {
+    const sal_Int16 aCalculationNameId;
+    const char*     aFormula;
+};
+
+static const StatisticCalculation lclCalcDefinitions[] =
+{
+    { SID_CALC_MEAN,           "=AVERAGE(%RANGE%)" },
+    { SID_CALC_STD_ERROR,      "=SQRT(VAR(%RANGE%)/COUNT(%RANGE%))"},
+    { SID_CALC_MODE,           "=MODE(%RANGE%)"},
+    { SID_CALC_MEDIAN,         "=MEDIAN(%RANGE%)"},
+    { SID_CALC_VARIANCE,       "=VAR(%RANGE%)"},
+    { SID_CALC_STD_DEVIATION,  "=STDEV(%RANGE%)"},
+    { SID_CALC_KURTOSIS,       "=KURT(%RANGE%)"},
+    { SID_CALC_SKEWNESS,       "=SKEW(%RANGE%)"},
+    { SID_CALC_RANGE,          "=MAX(%RANGE%)-MIN(%RANGE%)"},
+    { SID_CALC_MIN,            "=MIN(%RANGE%)"},
+    { SID_CALC_MAX,            "=MAX(%RANGE%)"},
+    { SID_CALC_SUM,            "=SUM(%RANGE%)"},
+    { SID_CALC_COUNT,          "=COUNT(%RANGE%)" },
+    { 0,                       NULL }
+};
+
+}
+
+ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog(
+        SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScViewData* pViewData ) :
+    ScAnyRefDlg     ( pB, pCW, pParent, "DescriptiveStatisticsDialog", "modules/scalc/ui/descriptivestatisticsdialog.ui" ),
+    mViewData       ( pViewData ),
+    mDocument       ( pViewData->GetDocument() ),
+    mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
+    mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ),
+    mDialogLostFocus( false )
+{
+    get(mpInputRangeLabel, "input-range-label");
+    get(mpInputRangeEdit, "input-range-edit");
+    mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
+    get(mpInputRangeButton, "input-range-button");
+    mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
+
+    get(mpOutputRangeLabel, "output-range-label");
+    get(mpOutputRangeEdit, "output-range-edit");
+    mpOutputRangeEdit->SetReferences(this, mpOutputRangeLabel);
+    get(mpOutputRangeButton, "output-range-button");
+    mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
+
+    get(mpButtonOk,     "ok");
+    get(mpButtonApply,  "apply");
+    get(mpButtonCancel, "cancel");
+
+    Init();
+    GetRangeFromSelection();
+}
+
+void ScDescriptiveStatisticsDialog::Init()
+{
+    mpButtonOk->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, OkClicked ) );
+    mpButtonCancel->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, CancelClicked ) );
+    mpButtonApply->SetClickHdl( LINK( this, ScDescriptiveStatisticsDialog, ApplyClicked ) );
+    mpButtonOk->Enable(false);
+    mpButtonApply->Enable(false);
+
+    Link aLink = LINK( this, ScDescriptiveStatisticsDialog, GetFocusHandler );
+    mpInputRangeEdit->SetGetFocusHdl( aLink );
+    mpInputRangeButton->SetGetFocusHdl( aLink );
+    mpOutputRangeEdit->SetGetFocusHdl( aLink );
+    mpOutputRangeButton->SetGetFocusHdl( aLink );
+
+    aLink = LINK( this, ScDescriptiveStatisticsDialog, LoseFocusHandler );
+    mpInputRangeEdit->SetLoseFocusHdl( aLink );
+    mpInputRangeButton->SetLoseFocusHdl( aLink );
+    mpOutputRangeEdit->SetLoseFocusHdl( aLink );
+    mpOutputRangeButton->SetLoseFocusHdl( aLink );
+
+    mpOutputRangeEdit->GrabFocus();
+}
+
+void ScDescriptiveStatisticsDialog::GetRangeFromSelection()
+{
+    OUString aCurrentString;
+    mViewData->GetSimpleArea(mInputRange);
+    mInputRange.Format(aCurrentString, ABS_DREF3D, mDocument, mAddressDetails);
+    mpInputRangeEdit->SetText(aCurrentString);
+}
+
+ScDescriptiveStatisticsDialog::~ScDescriptiveStatisticsDialog()
+{}
+
+void ScDescriptiveStatisticsDialog::SetActive()
+{
+    if ( mDialogLostFocus )
+    {
+        mDialogLostFocus = false;
+        if( mpActiveEdit )
+            mpActiveEdit->GrabFocus();
+    }
+    else
+    {
+        GrabFocus();
+    }
+    RefInputDone();
+}
+
+sal_Bool ScDescriptiveStatisticsDialog::Close()
+{
+    return DoClose( ScDescriptiveStatisticsDialogWrapper::GetChildWindowId() );
+}
+
+void ScDescriptiveStatisticsDialog::SetReference( const ScRange& rReferenceRange, ScDocument* pDocument )
+{
+    if ( mpActiveEdit )
+    {
+        if ( rReferenceRange.aStart != rReferenceRange.aEnd )
+            RefInputStart( mpActiveEdit );
+
+        String aReferenceString;
+
+        if ( mpActiveEdit == mpInputRangeEdit )
+        {
+            mInputRange = rReferenceRange;
+            mInputRange.Format( aReferenceString, ABS_DREF3D, pDocument, mAddressDetails );
+            mpInputRangeEdit->SetRefString( aReferenceString );
+        }
+        else if ( mpActiveEdit == mpOutputRangeEdit )
+        {
+            mOutputAddress = rReferenceRange.aStart;
+
+            sal_uInt16 nFormat = ( mOutputAddress.Tab() == mCurrentAddress.Tab() ) ? SCA_ABS : SCA_ABS_3D;
+            mOutputAddress.Format( aReferenceString, nFormat, pDocument, pDocument->GetAddressConvention() );
+            mpOutputRangeEdit->SetRefString( aReferenceString );
+
+            // Enable OK, Cancel if output range is set
+            mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
+            mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
+        }
+    }
+}
+
+void ScDescriptiveStatisticsDialog::ApplyCalculationsFormulas( )
+{
+    OUString aUndo(ScResId(STR_DESCRIPTIVE_STATISTICS_UNDO_NAME));
+    ScDocShell* pDocShell = mViewData->GetDocShell();
+    svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
+    pUndoManager->EnterListAction( aUndo, aUndo );
+
+    ScAddress aStart = mInputRange.aStart;
+    ScAddress aEnd   = mInputRange.aEnd;
+
+    SCTAB outTab = mOutputAddress.Tab();
+    SCCOL outCol = mOutputAddress.Col();
+    SCROW outRow = mOutputAddress.Row();
+
+    OUString aReferenceString;
+    ScAddress aAddress;
+
+    for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++)
+    {
+        outCol = mOutputAddress.Col();
+
+        for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != NULL; i++)
+        {
+            aAddress = ScAddress(outCol, outRow, outTab);
+            OUString aCalculationName(ScResId(lclCalcDefinitions[i].aCalculationNameId));
+            pDocShell->GetDocFunc().SetStringCell(aAddress, aCalculationName, true);
+            outRow++;
+        }
+        outCol++;
+
+        for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
+        {
+            outRow = mOutputAddress.Row();
+            ScRange aColumnRange (
+                ScAddress(inCol, mInputRange.aStart.Row(), inTab),
+                ScAddress(inCol, mInputRange.aEnd.Row(), inTab)
+            );
+
+            aColumnRange.Format( aReferenceString, SCR_ABS, mDocument, mAddressDetails );
+            OUString sRange("%RANGE%");
+            OUString aFormulaString;
+            OUString aFormulaTemplate;
+
+            for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != NULL; i++)
+            {
+                aAddress = ScAddress(outCol, outRow, outTab);
+                aFormulaTemplate = OUString::createFromAscii(lclCalcDefinitions[i].aFormula);
+                aFormulaString = aFormulaTemplate.replaceAll(sRange, aReferenceString);
+                pDocShell->GetDocFunc().SetFormulaCell(aAddress, new ScFormulaCell(mDocument, aAddress, aFormulaString), true);
+                outRow++;
+            }
+            outCol++;
+        }
+        outTab++;
+    }
+
+    ScRange aOutputRange(mOutputAddress, ScAddress(outTab, outRow, outTab) );
+    pUndoManager->LeaveListAction();
+    pDocShell->PostPaint( aOutputRange, PAINT_GRID );
+}
+
+IMPL_LINK( ScDescriptiveStatisticsDialog, OkClicked, PushButton*, /*pButton*/ )
+{
+    ApplyClicked(NULL);
+    CancelClicked(NULL);
+    return 0;
+}
+
+
+IMPL_LINK( ScDescriptiveStatisticsDialog, ApplyClicked, PushButton*, /*pButton*/ )
+{
+    ApplyCalculationsFormulas();
+    return 0;
+}
+
+IMPL_LINK( ScDescriptiveStatisticsDialog, CancelClicked, PushButton*, /*pButton*/ )
+{
+    Close();
+    return 0;
+}
+
+IMPL_LINK( ScDescriptiveStatisticsDialog, GetFocusHandler, Control*, pCtrl )
+{
+    mpActiveEdit = NULL;
+
+    if(      (pCtrl == (Control*) mpInputRangeEdit)  || (pCtrl == (Control*) mpInputRangeButton) )
+        mpActiveEdit = mpInputRangeEdit;
+    else if( (pCtrl == (Control*) mpOutputRangeEdit) || (pCtrl == (Control*) mpOutputRangeButton) )
+        mpActiveEdit = mpOutputRangeEdit;
+
+    if( mpActiveEdit )
+        mpActiveEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
+
+    return 0;
+}
+
+IMPL_LINK_NOARG(ScDescriptiveStatisticsDialog, LoseFocusHandler)
+{
+    mDialogLostFocus = !IsActive();
+    return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
new file mode 100644
index 0000000..af44357
--- /dev/null
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "globstr.hrc"
+
+String STR_DESCRIPTIVE_STATISTICS_UNDO_NAME
+{
+    Text [ en-US ] = "Descriptive Statistics";
+};
+
+String SID_CALC_MEAN
+{
+    Text [ en-US ] = "Mean";
+};
+
+String SID_CALC_STD_ERROR
+{
+    Text [ en-US ] = "Standard Error";
+};
+
+String SID_CALC_MODE
+{
+    Text [ en-US ] = "Mode";
+};
+
+String SID_CALC_MEDIAN
+{
+    Text [ en-US ] = "Median";
+};
+
+String SID_CALC_VARIANCE
+{
+    Text [ en-US ] = "Variance";
+};
+
+String SID_CALC_STD_DEVIATION
+{
+    Text [ en-US ] = "Standard Deviation";
+};
+
+String SID_CALC_KURTOSIS
+{
+    Text [ en-US ] = "Kurtosis";
+};
+
+String SID_CALC_SKEWNESS
+{
+    Text [ en-US ] = "Skewness";
+};
+
+String SID_CALC_RANGE
+{
+    Text [ en-US ] = "Range";
+};
+
+String SID_CALC_MIN
+{
+    Text [ en-US ] = "Minimum";
+};
+
+String SID_CALC_MAX
+{
+    Text [ en-US ] = "Maximum";
+};
+
+String SID_CALC_SUM
+{
+    Text [ en-US ] = "Sum";
+};
+
+String SID_CALC_COUNT
+{
+    Text [ en-US ] = "Count";
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 60da884..02ef88b 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -269,6 +269,7 @@ void ScDLL::Init()
 
     ScRandomNumberGeneratorDialogWrapper::RegisterChildWindow(false, pMod);
     ScSamplingDialogWrapper             ::RegisterChildWindow(false, pMod);
+    ScDescriptiveStatisticsDialogWrapper::RegisterChildWindow(false, pMod);
 
     // First docking Window for Calc
     ScFunctionChildWindow       ::RegisterChildWindow(false, pMod);
diff --git a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
new file mode 100644
index 0000000..edf08b6
--- /dev/null
+++ b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef DESCRIPTIVE_STATISTICS_DIALOG_HXX
+#define DESCRIPTIVE_STATISTICS_DIALOG_HXX
+
+#include "global.hxx"
+#include "address.hxx"
+#include "anyrefdg.hxx"
+
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+#include <vcl/lstbox.hxx>
+
+class ScDescriptiveStatisticsDialog : public ScAnyRefDlg
+{
+public:
+    ScDescriptiveStatisticsDialog(
+        SfxBindings* pB, SfxChildWindow* pCW,
+        Window* pParent, ScViewData* pViewData );
+
+    virtual ~ScDescriptiveStatisticsDialog();
+
+    virtual void        SetReference( const ScRange& rRef, ScDocument* pDoc );
+    virtual void        SetActive();
+    virtual sal_Bool    Close();
+
+private:
+    // Widgets
+    FixedText*          mpInputRangeLabel;
+    formula::RefEdit*   mpInputRangeEdit;
+    formula::RefButton* mpInputRangeButton;
+
+    FixedText*          mpOutputRangeLabel;
+    formula::RefEdit*   mpOutputRangeEdit;
+    formula::RefButton* mpOutputRangeButton;
+
+    PushButton*         mpButtonApply;
+    OKButton*           mpButtonOk;
+    CancelButton*       mpButtonCancel;
+
+    //
+    formula::RefEdit*   mpActiveEdit;
+
+    // Data
+    ScViewData*         mViewData;
+    ScDocument*         mDocument;
+
+    ScRange             mInputRange;
+    ScAddress::Details  mAddressDetails;
+    ScAddress           mOutputAddress;
+
+    ScAddress           mCurrentAddress;
+
+    bool                mDialogLostFocus;
+
+    void Init();
+    void GetRangeFromSelection();
+    void ApplyCalculationsFormulas();
+
+    DECL_LINK( OkClicked,        PushButton* );
+    DECL_LINK( CancelClicked,    PushButton* );
+    DECL_LINK( ApplyClicked,     PushButton* );
+    DECL_LINK( GetFocusHandler,  Control* );
+    DECL_LINK( LoseFocusHandler, void* );
+};
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 7c1e7d0..b0490f3 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -52,6 +52,7 @@ DECL_WRAPPER_WITHID(ScHighlightChgDlgWrapper)
 
 DECL_WRAPPER_WITHID(ScRandomNumberGeneratorDialogWrapper)
 DECL_WRAPPER_WITHID(ScSamplingDialogWrapper)
+DECL_WRAPPER_WITHID(ScDescriptiveStatisticsDialogWrapper)
 
 class ScAcceptChgDlgWrapper: public SfxChildWindow
 {
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 4897639..8a24814 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -173,6 +173,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             case FID_FILL_SERIES:       // fill block
             case SID_OPENDLG_RANDOM_NUMBER_GENERATOR:
             case SID_SAMPLING_DIALOG:
+            case SID_DESCRIPTIVE_STATISTICS_DIALOG:
             case SID_OPENDLG_TABOP:     // multiple-cell operations, are at least 2 cells marked?
                 if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP)
                     bDisable = sal_True;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 15953b3..829269b 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -921,6 +921,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
             }
             break;
+        case SID_DESCRIPTIVE_STATISTICS_DIALOG:
+            {
+                sal_uInt16 nId  = ScDescriptiveStatisticsDialogWrapper::GetChildWindowId();
+                SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
+                SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+
+                pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+            }
+            break;
+
         //
         //  disposal (Outlines)
         //  SID_AUTO_OUTLINE, SID_OUTLINE_DELETEALL in Execute (in docsh.idl)
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 65adb74..7de5b00 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -53,6 +53,8 @@ SFX_IMPL_MODELESSDIALOG_WITHID(ScSimpleRefDlgWrapper, WID_SIMPLE_REF )
 
 SFX_IMPL_MODELESSDIALOG_WITHID(ScRandomNumberGeneratorDialogWrapper, SID_OPENDLG_RANDOM_NUMBER_GENERATOR )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScSamplingDialogWrapper, SID_SAMPLING_DIALOG )
+SFX_IMPL_MODELESSDIALOG_WITHID(ScDescriptiveStatisticsDialogWrapper, SID_DESCRIPTIVE_STATISTICS_DIALOG )
+
 
 SFX_IMPL_CHILDWINDOW_WITHID(ScValidityRefChildWin, SID_VALIDITY_REFERENCE)
 
@@ -132,6 +134,9 @@ IMPL_CHILD_CTOR( ScRandomNumberGeneratorDialogWrapper, SID_OPENDLG_RANDOM_NUMBER
 
 IMPL_CHILD_CTOR( ScSamplingDialogWrapper, SID_SAMPLING_DIALOG )
 
+IMPL_CHILD_CTOR( ScDescriptiveStatisticsDialogWrapper, SID_DESCRIPTIVE_STATISTICS_DIALOG )
+
+
 //-------------------------------------------------------------------------
 // ScSimpleRefDlgWrapper
 //-------------------------------------------------------------------------
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 699a29d..79e9d3a 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -83,6 +83,7 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
 
     SFX_CHILDWINDOW_REGISTRATION(ScRandomNumberGeneratorDialogWrapper::GetChildWindowId());
     SFX_CHILDWINDOW_REGISTRATION(ScSamplingDialogWrapper::GetChildWindowId());
+    SFX_CHILDWINDOW_REGISTRATION(ScDescriptiveStatisticsDialogWrapper::GetChildWindowId());
 }
 
 SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 0b169bf..ded42d1 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -63,6 +63,7 @@
 
 #include "RandomNumberGeneratorDialog.hxx"
 #include "SamplingDialog.hxx"
+#include "DescriptiveStatisticsDialog.hxx"
 
 //------------------------------------------------------------------
 
@@ -328,6 +329,13 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
         }
         break;
 
+        case SID_DESCRIPTIVE_STATISTICS_DIALOG:
+        {
+            ScViewData*  pViewData  = GetViewData();
+            pResult = new ScDescriptiveStatisticsDialog( pB, pCW, pParent, pViewData );
+        }
+        break;
+
         case SID_OPENDLG_OPTSOLVER:
         {
             ScViewData* pViewData = GetViewData();
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index a40fab3..90412ea 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -477,6 +477,7 @@
             <menu:menu menu:id=".uno:StatisticsMenu">
                 <menu:menupopup>
                     <menu:menuitem menu:id=".uno:SamplingDialog"/>
+                    <menu:menuitem menu:id=".uno:DescriptiveStatisticsDialog"/>
                 </menu:menupopup>
             </menu:menu>
         </menu:menupopup>
diff --git a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
new file mode 100644
index 0000000..b6040b4
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- 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>
+    <property name="title" translatable="yes">Descriptive Statistics</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">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="apply">
+                <property name="label">gtk-apply</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>
+              </packing>
+            </child>
+            <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">1</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">2</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="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">12</property>
+            <child>
+              <object class="GtkLabel" id="input-range-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Input Range</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="foruilo-RefEdit" id="input-range-edit">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <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>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="foruilo-RefButton" id="input-range-button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="output-range-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Output Range</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="foruilo-RefEdit" id="output-range-edit">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <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>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="foruilo-RefButton" id="output-range-button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </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">apply</action-widget>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit c7005a1b5b89392b82e20f952814fa6d5bc5b06e
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Wed Jul 17 18:30:35 2013 +0200

    Add "Statistics" submenu in "Data" for statistics analysis tools
    
    Change-Id: I36b65da3a5fda8046b6588cb82e6e41a8fc51e9b

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 1be53ec..d6e2e17 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -632,6 +632,11 @@
           <value xml:lang="en-US">R~andom Number...</value>
         </prop>
       </node>
+      <node oor:name=".uno:StatisticsMenu" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Statistics</value>
+        </prop>
+      </node>
       <node oor:name=".uno:SamplingDialog" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">~Sampling...</value>
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 44286d9..a40fab3 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -474,7 +474,11 @@
                     <menu:menuitem menu:id=".uno:DeletePivotTable"/>
                 </menu:menupopup>
             </menu:menu>
-            <menu:menuitem menu:id=".uno:SamplingDialog"/>
+            <menu:menu menu:id=".uno:StatisticsMenu">
+                <menu:menupopup>
+                    <menu:menuitem menu:id=".uno:SamplingDialog"/>
+                </menu:menupopup>
+            </menu:menu>
         </menu:menupopup>
     </menu:menu>
     <menu:menu menu:id=".uno:WindowList">
commit 58ae71c6e859a27103aa4720da7f1a6dc2823156
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Wed Jul 17 18:05:41 2013 +0200

    Cleanup RandomNumberGeneratorDialog .ui
    
    Change-Id: Ibb501e7b49fa0de6ad280d893433a1a0a22065ca

diff --git a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
index 3967197..e4a14b3 100644
--- a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
+++ b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
@@ -5,6 +5,7 @@
   <object class="GtkDialog" id="RandomNumberGeneratorDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
+    <property name="title" translatable="yes">Random Number Generator</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
@@ -70,265 +71,229 @@
           </packing>
         </child>
         <child>
-          <object class="GtkFrame" id="frame1">
+          <object class="GtkGrid" id="grid1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">12</property>
             <child>
-              <object class="GtkAlignment" id="alignment1">
+              <object class="GtkLabel" id="cell-range-label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="top_padding">6</property>
-                <property name="left_padding">12</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Cell Range</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="foruilo-RefEdit" id="cell-range-edit">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="valign">center</property>
+                <property name="hexpand">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="foruilo-RefButton" id="cell-range-button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="distribution-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Distribution</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBox" id="distribution-combo">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="model">distribution-liststore</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="seed-spin">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">3</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="seed-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Seed</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">out</property>
                 <child>
-                  <object class="GtkGrid" id="grid1">
+                  <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
+                    <property name="top_padding">6</property>
+                    <property name="bottom_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <property name="right_padding">12</property>
                     <child>
-                      <object class="GtkLabel" id="cell-range-label">
+                      <object class="GtkGrid" id="grid2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Cell Range</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">cell-range-edit</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="foruilo-RefEdit" id="cell-range-edit">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="valign">center</property>
-                        <property name="hexpand">True</property>
-                        <property name="invisible_char">•</property>
-                        <property name="invisible_char_set">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="foruilo-RefButton" id="cell-range-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="receives_default">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="distribution-label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Distribution</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">distribution-combo</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="distribution-combo">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="model">distribution-liststore</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
-                        <property name="width">2</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" id="seed-spin">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="invisible_char">•</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">3</property>
-                        <property name="width">2</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="seed-label">
-                        <property name="visible">True</property>
-                        <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>
-                        <property name="top_attach">3</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkFrame" id="frame2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">none</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
                         <child>
-                          <object class="GtkAlignment" id="alignment2">
+                          <object class="GtkLabel" id="parameter1-label">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="top_padding">6</property>
-                            <property name="bottom_padding">6</property>
-                            <property name="left_padding">12</property>
-                            <property name="right_padding">12</property>
-                            <child>
-                              <object class="GtkGrid" id="grid2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="row_spacing">6</property>
-                                <property name="column_spacing">12</property>
-                                <child>
-                                  <object class="GtkLabel" id="parameter1-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <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>
-                                    <property name="top_attach">0</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="parameter2-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <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>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkSpinButton" id="parameter1-spin">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list