[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2022-02-10 Thread Heiko Tietze (via logerrit)
 sc/inc/strings.hrc|2 ++
 sc/qa/uitest/sort/tdf105301.py|   14 +++---
 sc/qa/uitest/sort/tdf49531.py |2 +-
 sc/qa/uitest/sort/tdf57465.py |2 +-
 sc/source/ui/dbgui/sortkeydlg.cxx |1 +
 sc/source/ui/dbgui/tpsort.cxx |   13 +
 sc/source/ui/inc/sortkeydlg.hxx   |1 +
 sc/uiconfig/scalc/ui/sortkey.ui   |   20 
 8 files changed, 34 insertions(+), 21 deletions(-)

New commits:
commit 35b9e7f90ca3751d474efff7745582b4bff3e2df
Author: Heiko Tietze 
AuthorDate: Wed Feb 2 14:49:14 2022 +0100
Commit: Eike Rathke 
CommitDate: Fri Feb 11 00:09:29 2022 +0100

Resolves tdf#140290 - Make sort keys accessible

Inline string is plain now in favor of the caption
Column/Row before the dopdown control

Change-Id: I7f012d38c360113b7207f19fa32437d28d90d049
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129366
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Eike Rathke 

diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 9a461a40d4ff..dd55baba8563 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -51,6 +51,8 @@
 #define SCSTR_COLUMNNC_("SCSTR_COLUMN", 
"Column %1")
 // "%1 is replaced to row number, such as 'Row 1'"
 #define SCSTR_ROW   NC_("SCSTR_ROW", "Row %1")
+#define SCSTR_COLUMN_NAME   NC_("SCSTR_COLUMN_NAME", 
"Column")
+#define SCSTR_ROW_NAME  NC_("SCSTR_ROW_NAME", 
"Row")
 #define SCSTR_TABLE NC_("SCSTR_TABLE", "Sheet")
 #define SCSTR_NAME  NC_("SCSTR_NAME", "Name")
 #define SCSTR_APDTABLE  NC_("SCSTR_APDTABLE", 
"Append Sheet")
diff --git a/sc/qa/uitest/sort/tdf105301.py b/sc/qa/uitest/sort/tdf105301.py
index da8730368023..ab4889d89e18 100644
--- a/sc/qa/uitest/sort/tdf105301.py
+++ b/sc/qa/uitest/sort/tdf105301.py
@@ -23,15 +23,15 @@ class tdf105301(UITestCase):
 with self.ui_test.execute_dialog_through_command(".uno:DataSort") 
as xDialog:
 xTabs = xDialog.getChild("tabcontrol")
 select_pos(xTabs, "0")
-self.assertEqual("Column B", 
get_state_as_dict(xDialog.getChild("sortlb"))['DisplayText'])
-self.assertEqual("Column C", 
get_state_as_dict(xDialog.getChild("sortlb2"))['DisplayText'])
-self.assertEqual("Column D", 
get_state_as_dict(xDialog.getChild("sortlb3"))['DisplayText'])
+self.assertEqual("B", 
get_state_as_dict(xDialog.getChild("sortlb"))['DisplayText'])
+self.assertEqual("C", 
get_state_as_dict(xDialog.getChild("sortlb2"))['DisplayText'])
+self.assertEqual("D", 
get_state_as_dict(xDialog.getChild("sortlb3"))['DisplayText'])
 
 # Without the fix in place, this test would have failed with
-# AssertionError: 'Column E' != '- undefined -'
-self.assertEqual("Column E", 
get_state_as_dict(xDialog.getChild("sortlb4"))['DisplayText'])
-self.assertEqual("Column F", 
get_state_as_dict(xDialog.getChild("sortlb5"))['DisplayText'])
-self.assertEqual("Column G", 
get_state_as_dict(xDialog.getChild("sortlb6"))['DisplayText'])
+# AssertionError: 'E' != '- undefined -'
+self.assertEqual("E", 
get_state_as_dict(xDialog.getChild("sortlb4"))['DisplayText'])
+self.assertEqual("F", 
get_state_as_dict(xDialog.getChild("sortlb5"))['DisplayText'])
+self.assertEqual("G", 
get_state_as_dict(xDialog.getChild("sortlb6"))['DisplayText'])
 
 # tdf#51828: Without the fix in place, this test would have 
failed here
 self.assertEqual("- undefined -", 
get_state_as_dict(xDialog.getChild("sortlb7"))['DisplayText'])
diff --git a/sc/qa/uitest/sort/tdf49531.py b/sc/qa/uitest/sort/tdf49531.py
index c84b67cb040a..08f94cd1a275 100644
--- a/sc/qa/uitest/sort/tdf49531.py
+++ b/sc/qa/uitest/sort/tdf49531.py
@@ -41,7 +41,7 @@ class tdf49531(UITestCase):
 select_pos(xTabs, "0")
 xSortKey1 = xDialog.getChild("sortlb")
 xAsc = xDialog.getChild("up")
-select_by_text(xSortKey1, "Column B")
+select_by_text(xSortKey1, "B")
 xAsc.executeAction("CLICK", tuple())
 #Verify
 self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
0).getString(), "x")
diff --git a/sc/qa/uitest/sort/tdf57465.py b/sc/qa/uitest/sort/tdf57465.py
index 85be19d5e9b0..eefb3fdd4be8 100644
--- a/sc/qa/uitest/sort/tdf57465.py
+++ b/sc/qa/uitest/sort/tdf57465.py
@@ -34,7 +34,7 @@ class tdf57465(UITestCase):
 
 select_pos(xTabs, "0")
 
-self.assertEqual("Row 1", 
get_state_as_dict(xDialog.getChild("sortlb"))['DisplayText'])
+self.assertEqual("1", 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2021-12-08 Thread Caolán McNamara (via logerrit)
 sc/inc/strings.hrc|1 
 sc/qa/uitest/autofilter2/tdf141559.py |4 
 sc/source/ui/cctrl/checklistmenu.cxx  |  152 +++---
 sc/source/ui/inc/checklistmenu.hxx|   19 ++-
 sc/source/ui/inc/gridwin.hxx  |1 
 sc/source/ui/view/gridwin.cxx |  135 +-
 sc/uiconfig/scalc/ui/filtersubdropdown.ui |  151 -
 7 files changed, 346 insertions(+), 117 deletions(-)

New commits:
commit 8d3107f16d32fd0b582a0a5557691296791327f3
Author: Caolán McNamara 
AuthorDate: Tue Dec 7 09:40:35 2021 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 8 10:58:41 2021 +0100

tdf#146018 merge autofilter color dropdowns into a single dropdown

Change-Id: Ie900ed2ebade82198928b3dc2e90ab7aa7f0edd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126475
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 0cdbf7f1e540..006f1aadf85a 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -35,6 +35,7 @@
 #define SCSTR_TOP10FILTER   NC_("SCSTR_TOP10FILTER", 
"Top 10")
 #define SCSTR_FILTER_EMPTY  NC_("SCSTR_FILTER_EMPTY", 
"Empty")
 #define SCSTR_FILTER_NOTEMPTY   
NC_("SCSTR_FILTER_NOTEMPTY", "Not Empty")
+#define SCSTR_FILTER_COLOR  NC_("SCSTR_FILTER_COLOR", 
"Color Filter")
 #define SCSTR_FILTER_TEXT_COLOR 
NC_("SCSTR_FILTER_TEXT_COLOR", "Text Color")
 #define SCSTR_FILTER_BACKGROUND_COLOR   
NC_("SCSTR_FILTER_BACKGROUND_COLOR", "Background Color")
 // This must match the translation of the same strings of 
standardfilterdialog|cond
diff --git a/sc/qa/uitest/autofilter2/tdf141559.py 
b/sc/qa/uitest/autofilter2/tdf141559.py
index 376720a2bd82..8ea7dbe6f3ee 100644
--- a/sc/qa/uitest/autofilter2/tdf141559.py
+++ b/sc/qa/uitest/autofilter2/tdf141559.py
@@ -37,7 +37,7 @@ class tdf141559(UITestCase):
 
 # check last item: 'Standard Filter...' (new menu item 'Clear 
Filter' is optional)
 nLastIdx = int(get_state_as_dict(xMenu)['Children']) - 1
-self.assertEqual(10, nLastIdx)
+self.assertEqual(8, nLastIdx)
 self.assertEqual('Standard Filter...', 
get_state_as_dict(xMenu.getChild(str(nLastIdx)))['Text'])
 
 xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
@@ -71,7 +71,7 @@ class tdf141559(UITestCase):
 
 # check last item: 'Clear Filter'
 nLastIdx = int(get_state_as_dict(xMenu)['Children']) - 1
-self.assertEqual(11, nLastIdx)
+self.assertEqual(9, nLastIdx)
 self.assertEqual('Clear Filter', 
get_state_as_dict(xMenu.getChild(str(nLastIdx)))['Text'])
 
 xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 83544df61145..a27fb53c09a4 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -179,12 +179,12 @@ void ScCheckListMenuControl::CreateDropDown()
  DrawSymbolFlags::NONE);
 }
 
-ScListSubMenuControl* ScCheckListMenuControl::addSubMenuItem(const OUString& 
rText, bool bEnabled, bool bCheckList)
+ScListSubMenuControl* ScCheckListMenuControl::addSubMenuItem(const OUString& 
rText, bool bEnabled, bool bColorMenu)
 {
 MenuItemData aItem;
 aItem.mbEnabled = bEnabled;
 
-aItem.mxSubMenuWin.reset(new ScListSubMenuControl(mxMenu.get(), *this, 
bCheckList, mpNotifier));
+aItem.mxSubMenuWin.reset(new ScListSubMenuControl(mxMenu.get(), *this, 
bColorMenu, mpNotifier));
 maMenuItems.emplace_back(std::move(aItem));
 
 mxMenu->show();
@@ -1437,24 +1437,46 @@ int 
ScCheckListMenuControl::IncreaseWindowWidthToFitText(int nMaxTextWidth)
 return mnCheckWidthReq + nBorder;
 }
 
-ScListSubMenuControl::ScListSubMenuControl(weld::Widget* pParent, 
ScCheckListMenuControl& rParentControl, bool bCheckList, 
vcl::ILibreOfficeKitNotifier* pNotifier)
+ScListSubMenuControl::ScListSubMenuControl(weld::Widget* pParent, 
ScCheckListMenuControl& rParentControl, bool bColorMenu, 
vcl::ILibreOfficeKitNotifier* pNotifier)
 : mxBuilder(Application::CreateBuilder(pParent, 
"modules/scalc/ui/filtersubdropdown.ui"))
 , mxPopover(mxBuilder->weld_popover("FilterSubDropDown"))
 , mxContainer(mxBuilder->weld_container("container"))
 , mxMenu(mxBuilder->weld_tree_view("menu"))
+, mxBackColorMenu(mxBuilder->weld_tree_view("background"))
+, mxTextColorMenu(mxBuilder->weld_tree_view("textcolor"))
 , mxScratchIter(mxMenu->make_iterator())
 , mrParentControl(rParentControl)
 , mpNotifier(pNotifier)
+, mnBackColorMenuPrefHeight(-1)
+, mnTextColorMenuPrefHeight(-1)
+, mbColorMenu(bColorMenu)
 {
-if (bCheckList)
+mxMenu->hide();
+

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig sc/UIConfig_scalc.mk svx/source

2021-07-20 Thread Daniel Arato (NISZ) (via logerrit)
 sc/UIConfig_scalc.mk|4 
 sc/inc/scres.hrc|8 
 sc/qa/uitest/calc_tests9/tdf142763.py   |   69 +++
 sc/source/ui/attrdlg/scdlgfact.cxx  |   12 +
 sc/source/ui/inc/hfedtdlg.hxx   |   42 
 sc/source/ui/inc/scuitphfedit.hxx   |   14 +
 sc/source/ui/pagedlg/hfedtdlg.cxx   |   90 +-
 sc/source/ui/pagedlg/scuitphfedit.cxx   |   26 ++
 sc/source/ui/pagedlg/tphf.cxx   |   28 ++-
 sc/uiconfig/scalc/ui/footerdialog.ui|   46 +
 sc/uiconfig/scalc/ui/headerdialog.ui|   46 +
 sc/uiconfig/scalc/ui/sharedfirstfooterdialog.ui |  209 
 sc/uiconfig/scalc/ui/sharedfirstheaderdialog.ui |  209 
 sc/uiconfig/scalc/ui/sharedleftfooterdialog.ui  |  205 +++
 sc/uiconfig/scalc/ui/sharedleftheaderdialog.ui  |  205 +++
 svx/source/dialog/hdft.cxx  |   16 -
 16 files changed, 1202 insertions(+), 27 deletions(-)

New commits:
commit 6128e2d55f0d0c68d3c7f6fb69539ec800637947
Author: Daniel Arato (NISZ) 
AuthorDate: Wed Jun 16 10:39:29 2021 +0200
Commit: László Németh 
CommitDate: Tue Jul 20 16:19:37 2021 +0200

tdf#142763 sc UI: add first page header/footer options

Add checkbox "Same content on first page" checkbox
(similar to the existing "Same content on left and right
pages) to the Page Style dialog window, on the Header
and Footer panes.

Follow-up to commit 19fa853ce12136b5c14e0c5a0aa906c296b75388
(tdf#121715 XLSX: support custom first page header/footer)
and commit 52beb3907dd3c7e6ae112e263def1005272cecd8
(tdf#142764 sc: import "Same content on first/left page").

Note: to set different header or footer on the first page
of the spreadsheet, disable "Same content on first page"
on Format->Page Style...->Header (or Footer), and choose
the "Edit..." button.

Change-Id: I3348fde216424b8d2c662956eab27cbe5880fc1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117316
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index e19172e49bd3..c7ddfa38f88f 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -217,6 +217,10 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/selectsource \
sc/uiconfig/scalc/ui/sheetprintpage \
sc/uiconfig/scalc/ui/sharedocumentdlg \
+   sc/uiconfig/scalc/ui/sharedfirstfooterdialog \
+   sc/uiconfig/scalc/ui/sharedfirstheaderdialog \
+   sc/uiconfig/scalc/ui/sharedleftfooterdialog \
+   sc/uiconfig/scalc/ui/sharedleftheaderdialog \
sc/uiconfig/scalc/ui/sharedfooterdialog \
sc/uiconfig/scalc/ui/sharedheaderdialog \
sc/uiconfig/scalc/ui/sharedwarningdialog \
diff --git a/sc/inc/scres.hrc b/sc/inc/scres.hrc
index 57ac75843530..8089d41258f0 100644
--- a/sc/inc/scres.hrc
+++ b/sc/inc/scres.hrc
@@ -39,8 +39,12 @@
 #define RID_SCDLG_HFEDIT_RIGHTHEADER(SC_DIALOGS_START + 65)
 #define RID_SCDLG_HFEDIT_LEFTFOOTER (SC_DIALOGS_START + 66)
 #define RID_SCDLG_HFEDIT_RIGHTFOOTER(SC_DIALOGS_START + 67)
-#define RID_SCDLG_HFEDIT_HEADER (SC_DIALOGS_START + 68)
-#define RID_SCDLG_HFEDIT_FOOTER (SC_DIALOGS_START + 69)
+#define RID_SCDLG_HFEDIT_SHAREDFIRSTHEADER (SC_DIALOGS_START + 68)
+#define RID_SCDLG_HFEDIT_SHAREDLEFTHEADER  (SC_DIALOGS_START + 69)
+#define RID_SCDLG_HFEDIT_SHAREDFIRSTFOOTER (SC_DIALOGS_START + 70)
+#define RID_SCDLG_HFEDIT_SHAREDLEFTFOOTER  (SC_DIALOGS_START + 71)
+#define RID_SCDLG_HFEDIT_HEADER (SC_DIALOGS_START + 72)
+#define RID_SCDLG_HFEDIT_FOOTER (SC_DIALOGS_START + 73)
 
 #define WID_CONDFRMT_REF(SC_DIALOGS_START + 163)
 
diff --git a/sc/qa/uitest/calc_tests9/tdf142763.py 
b/sc/qa/uitest/calc_tests9/tdf142763.py
new file mode 100644
index ..5808dd1df624
--- /dev/null
+++ b/sc/qa/uitest/calc_tests9/tdf142763.py
@@ -0,0 +1,69 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, 
select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import get_cell_by_position
+import time
+
+class Tdf142763(UITestCase):
+
+def test_tdf142763_header(self):
+with self.ui_test.create_doc_in_start_center("calc"):
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig sc/UIConfig_scalc.mk

2019-05-12 Thread Caolán McNamara (via logerrit)
 sc/UIConfig_scalc.mk |1 
 sc/inc/scabstdlg.hxx |3 
 sc/qa/unit/screenshots/screenshots.cxx   |2 
 sc/source/ui/attrdlg/scdlgfact.cxx   |   10 
 sc/source/ui/attrdlg/scdlgfact.hxx   |   12 -
 sc/source/ui/inc/datafdlg.hxx|   49 ++--
 sc/source/ui/inc/viewfunc.hxx|   19 +
 sc/source/ui/miscdlgs/datafdlg.cxx   |  176 +++-
 sc/source/ui/vba/vbaworksheet.cxx|2 
 sc/source/ui/view/cellsh2.cxx|2 
 sc/source/ui/view/viewfun3.cxx   |6 
 sc/uiconfig/scalc/ui/dataform.ui |  326 ---
 sc/uiconfig/scalc/ui/dataformfragment.ui |   21 +
 13 files changed, 337 insertions(+), 292 deletions(-)

New commits:
commit 85d2e68d5c8b1c8351d5062cdf4b32189e6c8254
Author: Caolán McNamara 
AuthorDate: Sun May 12 18:38:15 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 12 22:19:09 2019 +0200

weld ScDataFormDlg

Change-Id: I656a11f5f9c55913cede710cf48543384132129d
Reviewed-on: https://gerrit.libreoffice.org/72199
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index a091655403b4..a4a8276c7004 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -110,6 +110,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/datafielddialog \
sc/uiconfig/scalc/ui/datafieldoptionsdialog \
sc/uiconfig/scalc/ui/dataform \
+   sc/uiconfig/scalc/ui/dataformfragment \
sc/uiconfig/scalc/ui/datastreams \
sc/uiconfig/scalc/ui/dataprovider \
sc/uiconfig/scalc/ui/dataproviderdlg \
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index afada832cfa0..02cf139e4e34 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -423,8 +423,7 @@ public:
 virtual VclPtr 
CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) = 0 ;
 
 //for dataform
-virtual VclPtr CreateScDataFormDlg(vcl::Window* 
pParent,
-ScTabViewShell* pTabViewShell) = 0;
+virtual VclPtr CreateScDataFormDlg(weld::Window* 
pParent, ScTabViewShell* pTabViewShell) = 0;
 
 virtual VclPtr 
CreateScDeleteContentsDlg(weld::Window* pParent) = 0;
 virtual VclPtr 
CreateScFillSeriesDlg(weld::Window*pParent,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 8845bc3b54f2..402db2452590 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -217,7 +217,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 {
 FIXME: looks butt-ugly w/ empty file, move it elsewhere, where
 we actually have some data
-pReturnDialog = 
mpFact->CreateScDataFormDlg(mpViewShell->GetDialogParent(), mpViewShell);
+pReturnDialog = 
mpFact->CreateScDataFormDlg(mpViewShell->GetFrameWeld(), mpViewShell);
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index a2b4e4c2b02f..f957e9f9af1e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -113,7 +113,10 @@ short AbstractScDeleteCellDlg_Impl::Execute()
 }
 
 //for dataform
-IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl);
+short AbstractScDataFormDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractScDeleteContentsDlg_Impl::Execute()
 {
@@ -797,11 +800,10 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScDeleteCell
 return 
VclPtr::Create(std::make_unique(pParent,
 bDisallowCellMove));
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataFormDlg(vcl::Window* pParent,
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataFormDlg(weld::Window* pParent,
 ScTabViewShell* pTabViewShell)
 {
-VclPtr pDlg = VclPtr::Create(pParent, 
pTabViewShell);
-return VclPtr::Create(pDlg);
+return 
VclPtr::Create(std::make_unique(pParent,
 pTabViewShell));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(weld::Window* pParent)
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index dcf1566d60c9..e087ad7dade6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -204,7 +204,14 @@ public:
 //for dataform
 class AbstractScDataFormDlg_Impl : public AbstractScDataFormDlg
 {
-DECL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl,ScDataFormDlg);
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractScDataFormDlg_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
+{
+}
+virtual short Execute() override;
+
 };
 
 class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg
@@ -612,8 +619,7 @@ public:
 virtual VclPtr 
CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove ) override;
 
 //for dataform
-virtual VclPtr 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2019-02-02 Thread Libreoffice Gerrit user
 sc/inc/scabstdlg.hxx  |2 
 sc/qa/unit/screenshots/screenshots.cxx|2 
 sc/source/ui/attrdlg/scdlgfact.cxx|   16 ---
 sc/source/ui/attrdlg/scdlgfact.hxx|   11 -
 sc/source/ui/dbgui/textimportoptions.cxx  |   64 +++---
 sc/source/ui/inc/textimportoptions.hxx|   28 +
 sc/source/ui/unoobj/filtuno.cxx   |2 
 sc/source/ui/view/viewfun5.cxx|3 -
 sc/uiconfig/scalc/ui/textimportoptions.ui |   21 ++---
 9 files changed, 74 insertions(+), 75 deletions(-)

New commits:
commit c744995d7acbfd1ba06eb61c8f00d119a59d3cbf
Author: Caolán McNamara 
AuthorDate: Sat Feb 2 16:19:16 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 2 18:20:06 2019 +0100

weld ScTextImportOptionsDlg

Change-Id: If558a805e48bc7cfa57e729143588a533060a65b
Reviewed-on: https://gerrit.libreoffice.org/67291
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index fa82d4550da9..8c1153fcabc1 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -398,7 +398,7 @@ public:
 SvStream* 
pInStream,
 
ScImportAsciiCall eCall) = 0;
 
-virtual VclPtr 
CreateScTextImportOptionsDlg() = 0;
+virtual VclPtr 
CreateScTextImportOptionsDlg(weld::Window* pParent) = 0;
 
 virtual VclPtr 
CreateScAutoFormatDlg(vcl::Window* pParent,
 ScAutoFormat* 
pAutoFormat,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 8f212bbda1e8..a036b693702c 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -209,7 +209,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 
 case 10: // "modules/scalc/ui/textimportoptions.ui"
 {
-pReturnDialog = mpFact->CreateScTextImportOptionsDlg();
+pReturnDialog = 
mpFact->CreateScTextImportOptionsDlg(mpViewShell->GetFrameWeld());
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 161297ab80d2..12599e6f6ca4 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -198,7 +198,12 @@ short AbstractScTabBgColorDlg_Impl::Execute()
 }
 
 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
+
+short AbstractScTextImportOptionsDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(ScAbstractTabDialog_Impl);
 
 AbstractScLinkedAreaDlg_Impl::~AbstractScLinkedAreaDlg_Impl()
@@ -684,12 +689,12 @@ void AbstractScImportOptionsDlg_Impl::SaveImportOptions() 
const
 
 LanguageType AbstractScTextImportOptionsDlg_Impl::GetLanguageType() const
 {
-return pDlg->getLanguageType();
+return m_xDlg->getLanguageType();
 }
 
 bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const
 {
-return pDlg->isDateConversionSet();
+return m_xDlg->isDateConversionSet();
 }
 
 short ScAbstractTabController_Impl::Execute()
@@ -737,10 +742,9 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScImportAsc
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg()
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(weld::Window* 
pParent)
 {
-VclPtr pDlg = 
VclPtr::Create(nullptr);
-return VclPtr::Create(pDlg);
+return 
VclPtr::Create(std::make_unique(pParent));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(vcl::Window* pParent,
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 8413310703f8..1519074fa28e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -505,7 +505,14 @@ class AbstractScImportOptionsDlg_Impl : public 
AbstractScImportOptionsDlg
 
 class AbstractScTextImportOptionsDlg_Impl : public 
AbstractScTextImportOptionsDlg
 {
-DECL_ABSTDLG_BASE( AbstractScTextImportOptionsDlg_Impl, 
ScTextImportOptionsDlg)
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit 
AbstractScTextImportOptionsDlg_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
+{
+}
+virtual short Execute() override;
 virtual LanguageType GetLanguageType() const override;
 virtual bool IsDateConversionSet() const override;
 };
@@ -552,7 +559,7 @@ public:
 SvStream* 
pInStream,
 
ScImportAsciiCall eCall) override;
 
-virtual VclPtr 
CreateScTextImportOptionsDlg() override;
+virtual VclPtr 
CreateScTextImportOptionsDlg(weld::Window* pParent) 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-07-05 Thread Markus Mohrhard
 sc/inc/datamapper.hxx  |2 
 sc/qa/unit/dataproviders_test.cxx  |6 +-
 sc/source/filter/xml/xmlmappingi.cxx   |   14 ++---
 sc/source/ui/dataprovider/dataprovider.cxx |6 +-
 sc/source/ui/inc/dataproviderdlg.hxx   |5 +-
 sc/source/ui/miscdlgs/dataproviderdlg.cxx  |   23 -
 sc/source/ui/view/cellsh2.cxx  |4 -
 sc/uiconfig/scalc/ui/dataproviderdlg.ui|   68 ++---
 8 files changed, 98 insertions(+), 30 deletions(-)

New commits:
commit 3f66d987ce3a46eb836f2c11bbaf360bd6195e27
Author: Markus Mohrhard 
Date:   Thu Feb 8 22:49:55 2018 +0100

add a selection for the DB range to Dataprovider dlg

Change-Id: I02c63b46e21cd8d04e6b515e2cbbee08743d5657
Reviewed-on: https://gerrit.libreoffice.org/49459
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/sc/inc/datamapper.hxx b/sc/inc/datamapper.hxx
index 75b04440153e..1d7e710051c0 100644
--- a/sc/inc/datamapper.hxx
+++ b/sc/inc/datamapper.hxx
@@ -89,7 +89,7 @@ public:
 const OUString& getID() const;
 double getUpdateFrequency() const;
 OUString getDBName() const;
-void setDBData(const ScDBData* pDBData);
+void setDBData(const OUString& rDBName);
 ScDBDataManager* getDBManager();
 
 void refresh(ScDocument* pDoc, bool bDeterministic = false);
diff --git a/sc/qa/unit/dataproviders_test.cxx 
b/sc/qa/unit/dataproviders_test.cxx
index d0df69c96d5c..1960fa59eecf 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -50,7 +50,7 @@ void ScDataProvidersTest::testCSVImport()
 OUString aFileURL;
 createFileURL("test1.", "csv", aFileURL);
 sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", 
m_pDoc);
-aDataSource.setDBData(pDBData);
+aDataSource.setDBData(pDBData->GetName());
 
 
 m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource);
@@ -78,7 +78,7 @@ void ScDataProvidersTest::testDataLargerThanDB()
 OUString aFileURL;
 createFileURL("test1.", "csv", aFileURL);
 sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", 
m_pDoc);
-aDataSource.setDBData(pDBData);
+aDataSource.setDBData(pDBData->GetName());
 
 
 m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource);
@@ -107,7 +107,7 @@ void ScDataProvidersTest::testHTMLImport()
 createFileURL("test1.", "html", aFileURL);
 sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.html", 
m_pDoc);
 aDataSource.setID("//table");
-aDataSource.setDBData(pDBData);
+aDataSource.setDBData(pDBData->GetName());
 
 
 m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource);
diff --git a/sc/source/filter/xml/xmlmappingi.cxx 
b/sc/source/filter/xml/xmlmappingi.cxx
index c40734afc177..c2f8b4004213 100644
--- a/sc/source/filter/xml/xmlmappingi.cxx
+++ b/sc/source/filter/xml/xmlmappingi.cxx
@@ -105,15 +105,11 @@ ScXMLMappingContext::ScXMLMappingContext( ScXMLImport& 
rImport,
 if (!aProvider.isEmpty())
 {
 ScDocument* pDoc = GetScImport().GetDocument();
-ScDBData* pDBData = 
pDoc->GetDBCollection()->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aDBName));
-if (pDBData)
-{
-auto& rDataMapper = pDoc->GetExternalDataMapper();
-sc::ExternalDataSource aSource(aURL, aProvider, pDoc);
-aSource.setID(aID);
-aSource.setDBData(pDBData);
-rDataMapper.insertDataSource(aSource);
-}
+auto& rDataMapper = pDoc->GetExternalDataMapper();
+sc::ExternalDataSource aSource(aURL, aProvider, pDoc);
+aSource.setID(aID);
+aSource.setDBData(aDBName);
+rDataMapper.insertDataSource(aSource);
 }
 }
 
diff --git a/sc/source/ui/dataprovider/dataprovider.cxx 
b/sc/source/ui/dataprovider/dataprovider.cxx
index 161aaf502fa9..22a3be99475e 100644
--- a/sc/source/ui/dataprovider/dataprovider.cxx
+++ b/sc/source/ui/dataprovider/dataprovider.cxx
@@ -111,15 +111,15 @@ OUString ExternalDataSource::getDBName() const
 return OUString();
 }
 
-void ExternalDataSource::setDBData(const ScDBData* pDBData)
+void ExternalDataSource::setDBData(const OUString& rDBName)
 {
 if (!mpDBDataManager)
 {
-mpDBDataManager.reset(new ScDBDataManager(pDBData->GetName(), false, 
mpDoc));
+mpDBDataManager.reset(new ScDBDataManager(rDBName, false, mpDoc));
 }
 else
 {
-mpDBDataManager->SetDatabase(pDBData->GetName());
+mpDBDataManager->SetDatabase(rDBName);
 }
 }
 
diff --git a/sc/source/ui/inc/dataproviderdlg.hxx 
b/sc/source/ui/inc/dataproviderdlg.hxx
index a56f4f612b45..5b5c444d13d8 100644
--- a/sc/source/ui/inc/dataproviderdlg.hxx
+++ b/sc/source/ui/inc/dataproviderdlg.hxx
@@ -36,6 +36,7 @@ private:
 VclPtr mpList;
 VclPtr mpBar;
 VclPtr mpDataProviderCtrl;
+VclPtr mpDBRanges;
 
 ScDBData* pDBData;
 
@@ -47,7 +48,7 @@ private:
 
 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-07-02 Thread Dennis Francis
 sc/inc/strings.hrc|   23 
 sc/qa/uitest/statistics/data/regression.ods   |binary
 sc/qa/uitest/statistics/regression.py |  314 
 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx   |  707 
--
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx|   28 
 sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx |6 
 sc/source/ui/inc/RegressionDialog.hxx |   49 
 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx  |2 
 sc/source/ui/inc/TableFillingAndNavigationTools.hxx   |2 
 sc/uiconfig/scalc/ui/regressiondialog.ui  |  156 +-
 10 files changed, 882 insertions(+), 405 deletions(-)

New commits:
commit b7a02f2bb66b990289eb7f4dc80069d1545179a4
Author: Dennis Francis 
Date:   Mon Jun 25 23:42:26 2018 +0530

tdf#109042 : Add support for multivariate regression...

to regression tool. This means we now support more than
one X variable(independent variable). One caveat is that
all X variable observations needs to be present adjacent
to each other in the same table. For example if data is
grouped by columns, a valid organization of X variables
look like :-

  X Variables >

  AB   C ...

  XVar1XVar2   XVar3 ... XVarN   |
  0.1  0.450.32  ... Observations
  0.34 0.230.54  ... |
  0.23 0.560.90  ... |
  0.32 0.110.78  ... V

This patch also makes our regression tool output to have
similar structure to what Excel and Gnumeric does. This
means more statistical measures are added including
confidence intervals for all parmeter estimates.

We already have support for Logarithmic and Power regression
in addition to plain Linear regression. This patch's
multivariate support extends to all of these types of
regressions.

Earlier all regression statistics were computed separately
from scratch, which mostly compute the same regression
multiple times. This would slow things down if the
data-set being analysed is big. This is not true anymore
as we use LINEST() formula. LINEST() formula provides all
the necessary statistics needed in regression analysis, so
here it is called just once and its output components are
referenced to compute other statistics(derived).

Following are the UI changes for the regression dialog box :-

1. Changed the regression-type selectors from check-boxes
   to radio-buttons. So only one type of regression can
   be done at a time. This is because the output of a single
   regression type itself shows a lot of information and
   if do all types of regression, it is hard to read and
   interpret especially for bigger data-sets with lots of
   X variables.

2. Allow the variable's ranges to have label in them, via
   a checkbox. If labels are provided, they are used to
   annotate the variable specific statistics and the user
   can easily identify the stats corresponding to each
   variable.

3. More robust input validity checks, with error messages
   at the bottom of the dialog to let the user know which
   of their entry is invalid.

4. User can enter the confidence level (default = 95%)
   for computing the confidence intervals of each estimate.

5. Make residual computations optional via a check-box,
   as this involves writing a table with all X's and Y
   with predicted Y and residual for each observation.
   If the data-set is big, or the user just care about
   the estimates and confidence intervals, they can
   avoid this.

Finally the patch includes a uitest that tests all
3 types of regressions with a small dataset. The ground
truths for the tests were obtained by running
regression tool in Gnumeric.

Change-Id: I9762b716eae14b9fbd16e2c7228edf9e1930dc93
Reviewed-on: https://gerrit.libreoffice.org/56809
Tested-by: Jenkins
Reviewed-by: Michael Meeks 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 470f06161690..a91f295e1591 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -218,6 +218,7 @@
 #define STR_EXPONENTIAL_SMOOTHING_UNDO_NAME 
NC_("STR_EXPONENTIAL_SMOOTHING_UNDO_NAME", "Exponential Smoothing")
 /* AnalysisOfVarianceDialog */
 #define STR_ANALYSIS_OF_VARIANCE_UNDO_NAME  
NC_("STR_ANALYSIS_OF_VARIANCE_UNDO_NAME", "Analysis of Variance")
+#define STR_LABEL_ANOVA NC_("STR_LABEL_ANOVA", 
"Analysis of Variance (ANOVA)")
 #define STR_ANOVA_SINGLE_FACTOR_LABEL   
NC_("STR_ANOVA_SINGLE_FACTOR_LABEL", "ANOVA - Single Factor")
 #define 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-05-20 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx |2 -
 sc/qa/unit/screenshots/screenshots.cxx   |2 -
 sc/source/ui/attrdlg/scdlgfact.cxx   |   13 +---
 sc/source/ui/attrdlg/scdlgfact.hxx   |   10 +-
 sc/source/ui/dbgui/dapidata.cxx  |   49 ---
 sc/source/ui/inc/dapidata.hxx|   18 ---
 sc/source/ui/view/cellsh1.cxx|9 +
 sc/uiconfig/scalc/ui/selectdatasource.ui |   26 ++--
 8 files changed, 57 insertions(+), 72 deletions(-)

New commits:
commit 7b4a3cefdd1137ce2e42616b2fb1dcf77d01db7b
Author: Caolán McNamara 
Date:   Sat May 19 21:21:11 2018 +0100

weld ScDataPilotDatabaseDlg

Change-Id: Ie8e9914bb8042e33a2ab2a1e07bb0203a54d5422
Reviewed-on: https://gerrit.libreoffice.org/54584
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 7032ab97c8c7..b1b33b94b162 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -414,7 +414,7 @@ public:
 
 virtual VclPtr 
CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const 
ScConditionalFormatList* pFormatList ) = 0;
 
-virtual VclPtr 
CreateScDataPilotDatabaseDlg(vcl::Window* pParent) = 0;
+virtual VclPtr 
CreateScDataPilotDatabaseDlg(weld::Window* pParent) = 0;
 
 virtual VclPtr 
CreateScDataPilotSourceTypeDlg(weld::Window* pParent,
 bool bEnableExternal) = 0;
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 5438f738db7b..59a10ef21dd9 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -178,7 +178,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 
 case 4: // "modules/scalc/ui/selectdatasource.ui"
 {
-pReturnDialog = 
mpFact->CreateScDataPilotDatabaseDlg(mpViewShell->GetDialogParent());
+pReturnDialog = 
mpFact->CreateScDataPilotDatabaseDlg(mpViewShell->GetFrameWeld());
 break;
 }
 case 5: // "modules/scalc/ui/selectsource.ui"
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index dfedd10a54a2..2d00bc0ed0a7 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -84,7 +84,11 @@ short AbstractScColRowLabelDlg_Impl::Execute()
 }
 
 IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl);
+
+short AbstractScDataPilotDatabaseDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractScDataPilotSourceTypeDlg_Impl::Execute()
 {
@@ -255,7 +259,7 @@ bool AbstractScColRowLabelDlg_Impl::IsRow()
 
 void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc 
)
 {
-pDlg->GetValues(rDesc);
+m_xDlg->GetValues(rDesc);
 }
 
 bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const
@@ -719,10 +723,9 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScCon
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(vcl::Window* pParent)
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(weld::Window* 
pParent)
 {
-VclPtr pDlg = 
VclPtr::Create( pParent );
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
ScDataPilotDatabaseDlg(pParent));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg(
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index a27a52ab26d7..50f206cb5ac6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -142,7 +142,13 @@ class AbstractScCondFormatManagerDlg_Impl : public 
AbstractScCondFormatManagerDl
 
 class AbstractScDataPilotDatabaseDlg_Impl  :public 
AbstractScDataPilotDatabaseDlg
 {
-DECL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl, 
ScDataPilotDatabaseDlg)
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractScDataPilotDatabaseDlg_Impl(ScDataPilotDatabaseDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
 virtual voidGetValues( ScImportSourceDesc& rDesc ) override;
 };
 
@@ -526,7 +532,7 @@ public:
 
 virtual VclPtr 
CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const 
ScConditionalFormatList* pFormatList ) override;
 
-virtual VclPtr 
CreateScDataPilotDatabaseDlg(vcl::Window* pParent) override;
+virtual VclPtr 
CreateScDataPilotDatabaseDlg(weld::Window* pParent) override;
 
 virtual VclPtr 
CreateScDataPilotSourceTypeDlg(weld::Window* pParent,
 bool bEnableExternal) override;
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 4e6e36e5eee8..b75b19609916 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -42,15 +42,13 @@ using 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-05-19 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx   |2 -
 sc/qa/unit/screenshots/screenshots.cxx |2 -
 sc/source/ui/attrdlg/scdlgfact.cxx |   19 +--
 sc/source/ui/attrdlg/scdlgfact.hxx |   10 ++--
 sc/source/ui/docshell/docsh4.cxx   |2 -
 sc/source/ui/inc/corodlg.hxx   |   35 +
 sc/uiconfig/scalc/ui/changesourcedialog.ui |8 +-
 7 files changed, 41 insertions(+), 37 deletions(-)

New commits:
commit f9d21be4607f191a769e05e1880d3ddb34060bd2
Author: Caolán McNamara 
Date:   Sat May 19 17:01:53 2018 +0100

weld ScColRowLabelDlg

Change-Id: If706a86b4aa55f2678b3ad9a96e81679eca0faea
Reviewed-on: https://gerrit.libreoffice.org/54566
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 1815e2680802..f5b299c8dde8 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -406,7 +406,7 @@ public:
 ScAutoFormat* 
pAutoFormat,
 const 
ScAutoFormatData* pSelFormatData,
 ScViewData 
*pViewData) = 0;
-virtual VclPtr CreateScColRowLabelDlg 
(vcl::Window* pParent,
+virtual VclPtr CreateScColRowLabelDlg 
(weld::Window* pParent,
 bool bCol,
 bool bRow) = 0;
 
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 08965de0af80..5438f738db7b 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -172,7 +172,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 
 case 3: // "modules/scalc/ui/changesourcedialog.ui"
 {
-pReturnDialog = 
mpFact->CreateScColRowLabelDlg(mpViewShell->GetDialogParent(), true, false);
+pReturnDialog = 
mpFact->CreateScColRowLabelDlg(mpViewShell->GetFrameWeld(), true, false);
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index d0d098d1fb45..89179fed4b6e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -77,7 +77,12 @@
 
 IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl);
+
+short AbstractScColRowLabelDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl);
 
@@ -231,12 +236,12 @@ OUString AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
 
 bool  AbstractScColRowLabelDlg_Impl::IsCol()
 {
-return  pDlg->IsCol();
+return m_xDlg->IsCol();
 }
 
 bool AbstractScColRowLabelDlg_Impl::IsRow()
 {
-return pDlg->IsRow();
+return m_xDlg->IsRow();
 }
 
 void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc 
)
@@ -688,12 +693,10 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScAutoFormat
 return VclPtr::Create(pDlg);
 }
 
-VclPtr  
ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(vcl::Window* pParent,
-bool bCol ,
-bool bRow)
+VclPtr  
ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent,
+bool bCol, 
bool bRow)
 {
-VclPtr pDlg = VclPtr::Create( pParent, 
bCol,bRow );
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
ScColRowLabelDlg(pParent, bCol, bRow));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( vcl::Window* pParent, 
const OUString& rExtendText, const OUString& rCurrentText )
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index a62239af8a87..184eaddb11c0 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -116,7 +116,13 @@ class AbstractScAutoFormatDlg_Impl : public 
AbstractScAutoFormatDlg
 
 class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg
 {
-DECL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl,ScColRowLabelDlg)
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractScColRowLabelDlg_Impl(ScColRowLabelDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
 virtual bool IsCol() override;
 virtual bool IsRow() override;
 };
@@ -498,7 +504,7 @@ public:
 ScAutoFormat* 
pAutoFormat,
 const 
ScAutoFormatData* 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-05-18 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx  |6 -
 sc/qa/unit/screenshots/screenshots.cxx|2 
 sc/source/ui/attrdlg/scdlgfact.cxx|   44 ++--
 sc/source/ui/attrdlg/scdlgfact.hxx|   22 --
 sc/source/ui/dbgui/dapitype.cxx   |  108 +++---
 sc/source/ui/inc/dapitype.hxx |   41 ---
 sc/source/ui/view/cellsh1.cxx |4 -
 sc/uiconfig/scalc/ui/dapiservicedialog.ui |   49 -
 sc/uiconfig/scalc/ui/selectsource.ui  |   13 ++-
 9 files changed, 132 insertions(+), 157 deletions(-)

New commits:
commit 74c8bc3c7db2bdc5811f0c9ea535a73ddaf6f3ad
Author: Caolán McNamara 
Date:   Fri May 18 11:17:40 2018 +0100

weld ScDataPilotSourceTypeDlg and ScDataPilotServiceDlg

Change-Id: I03ef6f1994e8e1a801e4515586a6a73d3748f13b
Reviewed-on: https://gerrit.libreoffice.org/54528
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index aaba06323367..979876d88c77 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -416,11 +416,11 @@ public:
 
 virtual VclPtr 
CreateScDataPilotDatabaseDlg(vcl::Window* pParent) = 0;
 
-virtual VclPtr 
CreateScDataPilotSourceTypeDlg(vcl::Window* pParent,
+virtual VclPtr 
CreateScDataPilotSourceTypeDlg(weld::Window* pParent,
 bool bEnableExternal) = 0;
 
-virtual VclPtr CreateScDataPilotServiceDlg( 
vcl::Window* pParent,
-const 
std::vector& rServices ) = 0;
+virtual VclPtr 
CreateScDataPilotServiceDlg(weld::Window* pParent,
+  
const std::vector& rServices) = 0;
 
 virtual VclPtr 
CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) = 0 ;
 
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index f3ddbbdbeeec..08965de0af80 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -183,7 +183,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 }
 case 5: // "modules/scalc/ui/selectsource.ui"
 {
-pReturnDialog = 
mpFact->CreateScDataPilotSourceTypeDlg(mpViewShell->GetDialogParent(), true);
+pReturnDialog = 
mpFact->CreateScDataPilotSourceTypeDlg(mpViewShell->GetFrameWeld(), true);
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index a810883911bf..b5a434272149 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -80,8 +80,16 @@ IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl);
+
+short AbstractScDataPilotSourceTypeDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
+short AbstractScDataPilotServiceDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractScDeleteCellDlg_Impl::Execute()
 {
@@ -235,52 +243,52 @@ void AbstractScDataPilotDatabaseDlg_Impl::GetValues( 
ScImportSourceDesc& rDesc )
 
 bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const
 {
-return pDlg->IsDatabase();
+return m_xDlg->IsDatabase();
 }
 
 bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const
 {
-return pDlg->IsExternal();
+return m_xDlg->IsExternal();
 }
 
 bool AbstractScDataPilotSourceTypeDlg_Impl::IsNamedRange() const
 {
-return pDlg->IsNamedRange();
+return m_xDlg->IsNamedRange();
 }
 
 OUString AbstractScDataPilotSourceTypeDlg_Impl::GetSelectedNamedRange() const
 {
-return pDlg->GetSelectedNamedRange();
+return m_xDlg->GetSelectedNamedRange();
 }
 
 void AbstractScDataPilotSourceTypeDlg_Impl::AppendNamedRange(const OUString& 
rName)
 {
-pDlg->AppendNamedRange(rName);
+m_xDlg->AppendNamedRange(rName);
 }
 
 OUString AbstractScDataPilotServiceDlg_Impl::GetServiceName() const
 {
-return pDlg->GetServiceName();
+return m_xDlg->GetServiceName();
 }
 
 OUString AbstractScDataPilotServiceDlg_Impl::GetParSource() const
 {
-return pDlg->GetParSource();
+return m_xDlg->GetParSource();
 }
 
 OUString AbstractScDataPilotServiceDlg_Impl::GetParName() const
 {
-return pDlg->GetParName();
+return m_xDlg->GetParName();
 }
 
 OUString AbstractScDataPilotServiceDlg_Impl::GetParUser() const
 {
-return pDlg->GetParUser();
+return m_xDlg->GetParUser();
 }
 
 OUString AbstractScDataPilotServiceDlg_Impl::GetParPass() const
 {
-return pDlg->GetParPass();
+return m_xDlg->GetParPass();
 }
 
 DelCellCmd 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig sw/uiconfig

2018-05-18 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx  |2 
 sc/qa/unit/screenshots/screenshots.cxx|2 
 sc/source/ui/attrdlg/scdlgfact.cxx|   25 +--
 sc/source/ui/attrdlg/scdlgfact.hxx|   10 +
 sc/source/ui/inc/instbdlg.hxx |   65 +++-
 sc/source/ui/miscdlgs/instbdlg.cxx|  235 ++
 sc/source/ui/view/tabvwshf.cxx|2 
 sc/uiconfig/scalc/ui/insertsheet.ui   |   70 +---
 sw/uiconfig/swriter/ui/autoformattable.ui |1 
 9 files changed, 206 insertions(+), 206 deletions(-)

New commits:
commit a0c15b39cb30736e04564420f55c50fefb51e41a
Author: Caolán McNamara 
Date:   Fri May 18 09:09:30 2018 +0100

weld ScInsertTableDlg

Change-Id: Ia3e00ccdc89aaf7b5546a0b346d174814fcea97d
Reviewed-on: https://gerrit.libreoffice.org/54518
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index cbdc8ea312f5..aaba06323367 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -447,7 +447,7 @@ public:
 virtual VclPtr 
CreateScInsertContentsDlg(weld::Window* pParent,
   
const OUString* pStrTitle = nullptr) = 0;
 
-virtual VclPtr 
CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
+virtual VclPtr 
CreateScInsertTableDlg(weld::Window* pParent, ScViewData& rViewData,
 SCTAB nTabCount, bool bFromFile) = 0;
 
 virtual VclPtr CreateScSelEntryDlg ( vcl::Window* 
pParent,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 70d75047cbda..f3ddbbdbeeec 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -153,7 +153,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 SCTAB nTabSelCount = rViewData.GetMarkData().GetSelectCount();
 
 pReturnDialog = mpFact->CreateScInsertTableDlg(
-mpViewShell->GetDialogParent(), rViewData, nTabSelCount, 
false);
+mpViewShell->GetFrameWeld(), rViewData, nTabSelCount, false);
 
 break;
 }
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 82f096e5b5bc..a810883911bf 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -116,7 +116,11 @@ short AbstractScInsertContentsDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl);
+short AbstractScInsertTableDlg_Impl::Execute()
+{
+return m_xDlg->execute();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl);
 
 short AbstractScMetricInputDlg_Impl::Execute()
@@ -396,37 +400,37 @@ InsCellCmd  
AbstractScInsertContentsDlg_Impl::GetMoveMode()
 
 bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
 {
-return pDlg->GetTablesFromFile();
+return m_xDlg->GetTablesFromFile();
 }
 
 bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
 {
-return pDlg->GetTablesAsLink();
+return m_xDlg->GetTablesAsLink();
 }
 
 const OUString*  AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
 {
-return pDlg->GetFirstTable( pN );
+return m_xDlg->GetFirstTable( pN );
 }
 
 ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables()
 {
-return pDlg->GetDocShellTables();
+return m_xDlg->GetDocShellTables();
 }
 
 bool AbstractScInsertTableDlg_Impl::IsTableBefore()
 {
-return pDlg->IsTableBefore();
+return m_xDlg->IsTableBefore();
 }
 
 sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
 {
-return pDlg->GetTableCount();
+return m_xDlg->GetTableCount();
 }
 
 const OUString* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
 {
-return pDlg->GetNextTable( pN );
+return m_xDlg->GetNextTable( pN );
 }
 
 OUString AbstractScSelEntryDlg_Impl::GetSelectedEntry() const
@@ -761,11 +765,10 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScInsert
 return VclPtr::Create(new 
ScInsertContentsDlg(pParent, InsertDeleteFlags::NONE, pStrTitle));
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(vcl::Window* pParent, 
ScViewData& rViewData,
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(weld::Window* pParent, 
ScViewData& rViewData,
 SCTAB nTabCount, bool bFromFile)
 {
-VclPtr pDlg = VclPtr::Create( pParent, 
rViewData,nTabCount, bFromFile );
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
ScInsertTableDlg(pParent, rViewData,nTabCount, bFromFile));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( vcl::Window* pParent,
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 4f3d55907e81..998bf0926eba 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -257,7 +257,13 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-05-17 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx   |4 
 sc/qa/unit/screenshots/screenshots.cxx |2 
 sc/source/ui/attrdlg/scdlgfact.cxx |   33 +--
 sc/source/ui/attrdlg/scdlgfact.hxx |   12 -
 sc/source/ui/inc/inscodlg.hxx  |   70 +++
 sc/source/ui/miscdlgs/inscodlg.cxx |  321 ++---
 sc/source/ui/view/cellsh1.cxx  |6 
 sc/uiconfig/scalc/ui/pastespecial.ui   |   34 +--
 8 files changed, 229 insertions(+), 253 deletions(-)

New commits:
commit 88afd50a8a8252585dfa63e5470fd1f840682884
Author: Caolán McNamara 
Date:   Wed May 16 16:49:31 2018 +0100

weld ScInsertContentsDlg

Change-Id: I432048f086e4aa49ebac6a6cdafd1e11c3832ab0
Reviewed-on: https://gerrit.libreoffice.org/54445
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 88af9b1ccb4c..cbdc8ea312f5 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -444,8 +444,8 @@ public:
 virtual VclPtr 
CreateScInsertCellDlg(weld::Window* pParent,
  bool 
bDisallowCellMove) = 0;
 
-virtual VclPtr CreateScInsertContentsDlg( 
vcl::Window*pParent,
-const 
OUString* pStrTitle = nullptr ) = 0;
+virtual VclPtr 
CreateScInsertContentsDlg(weld::Window* pParent,
+  
const OUString* pStrTitle = nullptr) = 0;
 
 virtual VclPtr 
CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
 SCTAB nTabCount, bool bFromFile) = 0;
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index b1aadf398899..70d75047cbda 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -166,7 +166,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 
 case 2: // "modules/scalc/ui/pastespecial.ui"
 {
-pReturnDialog = 
mpFact->CreateScInsertContentsDlg(mpViewShell->GetDialogParent());
+pReturnDialog = 
mpFact->CreateScInsertContentsDlg(mpViewShell->GetFrameWeld());
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index d00b2d76f0a0..82f096e5b5bc 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -111,7 +111,11 @@ short AbstractScInsertCellDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl);
+short AbstractScInsertContentsDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl);
 
@@ -342,52 +346,52 @@ InsCellCmd  AbstractScInsertCellDlg_Impl::GetInsCellCmd() 
const
 
 InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() 
const
 {
-return pDlg->GetInsContentsCmdBits();
+return m_xDlg->GetInsContentsCmdBits();
 }
 
 ScPasteFunc  AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
 {
-return pDlg->GetFormulaCmdBits();
+return m_xDlg->GetFormulaCmdBits();
 }
 
 boolAbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
 {
-return pDlg->IsSkipEmptyCells();
+return m_xDlg->IsSkipEmptyCells();
 }
 
 boolAbstractScInsertContentsDlg_Impl::IsLink() const
 {
-return pDlg->IsLink();
+return m_xDlg->IsLink();
 }
 
 voidAbstractScInsertContentsDlg_Impl::SetFillMode( bool bSet )
 {
-pDlg->SetFillMode( bSet );
+m_xDlg->SetFillMode( bSet );
 }
 
 voidAbstractScInsertContentsDlg_Impl::SetOtherDoc( bool bSet )
 {
-pDlg->SetOtherDoc( bSet );
+m_xDlg->SetOtherDoc( bSet );
 }
 
 boolAbstractScInsertContentsDlg_Impl::IsTranspose() const
 {
-return pDlg->IsTranspose();
+return m_xDlg->IsTranspose();
 }
 
 voidAbstractScInsertContentsDlg_Impl::SetChangeTrack( bool bSet )
 {
-pDlg->SetChangeTrack( bSet );
+m_xDlg->SetChangeTrack( bSet );
 }
 
 voidAbstractScInsertContentsDlg_Impl::SetCellShiftDisabled( 
CellShiftDisabledFlags nDisable )
 {
-pDlg->SetCellShiftDisabled( nDisable );
+m_xDlg->SetCellShiftDisabled( nDisable );
 }
 
 InsCellCmd  AbstractScInsertContentsDlg_Impl::GetMoveMode()
 {
-return pDlg->GetMoveMode();
+return m_xDlg->GetMoveMode();
 }
 
 bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
@@ -751,11 +755,10 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScInsertCell
 return VclPtr::Create(new 
ScInsertCellDlg(pParent, bDisallowCellMove));
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( vcl::Window*  
pParent,
-   
 const OUString* pStrTitle )
+VclPtr 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-04-13 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx   |2 
 sc/qa/unit/screenshots/screenshots.cxx |2 
 sc/source/ui/attrdlg/scdlgfact.cxx |   16 ++--
 sc/source/ui/attrdlg/scdlgfact.hxx |   10 ++
 sc/source/ui/inc/delcodlg.hxx  |   35 -
 sc/source/ui/miscdlgs/delcodlg.cxx |  120 ++---
 sc/source/ui/view/cellsh1.cxx  |2 
 sc/uiconfig/scalc/ui/deletecontents.ui |8 +-
 8 files changed, 95 insertions(+), 100 deletions(-)

New commits:
commit a2f6b01f41720876ed038a25ea92d381528618ad
Author: Caolán McNamara 
Date:   Fri Apr 13 14:24:59 2018 +0100

weld ScDeleteContentsDlg

Change-Id: Ibd3723fc615d97a4747a41e881dbad6829929c0c
Reviewed-on: https://gerrit.libreoffice.org/52833
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index c2d8d757127c..3821a8f8f907 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -429,7 +429,7 @@ public:
 virtual VclPtr CreateScDataFormDlg(vcl::Window* 
pParent,
 ScTabViewShell* pTabViewShell) = 0;
 
-virtual VclPtr 
CreateScDeleteContentsDlg(vcl::Window* pParent) = 0;
+virtual VclPtr 
CreateScDeleteContentsDlg(weld::Window* pParent) = 0;
 virtual VclPtr CreateScFillSeriesDlg( 
vcl::Window*pParent,
 ScDocument& 
rDocument,
 FillDir 
eFillDir,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 3822be9358e4..d7d6a45e9231 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -191,7 +191,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 
 case 6: // "modules/scalc/ui/deletecontents.ui"
 {
-pReturnDialog = 
mpFact->CreateScDeleteContentsDlg(mpViewShell->GetDialogParent());
+pReturnDialog = 
mpFact->CreateScDeleteContentsDlg(mpViewShell->GetFrameWeld());
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 51cce4e6b8dd..4a7925f2a33c 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -90,7 +90,12 @@ short AbstractScDeleteCellDlg_Impl::Execute()
 
 //for dataform
 IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl);
+
+short AbstractScDeleteContentsDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl);
 
@@ -257,12 +262,12 @@ DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() 
const
 
 void AbstractScDeleteContentsDlg_Impl::DisableObjects()
 {
-pDlg->DisableObjects();
+m_xDlg->DisableObjects();
 }
 
 InsertDeleteFlags AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() 
const
 {
-return pDlg->GetDelContentsCmdBits();
+return m_xDlg->GetDelContentsCmdBits();
 }
 
 FillDir AbstractScFillSeriesDlg_Impl::GetFillDir() const
@@ -702,10 +707,9 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataFormDlg(
 return VclPtr::Create(pDlg);
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(vcl::Window* pParent)
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(weld::Window* pParent)
 {
-VclPtr pDlg = 
VclPtr::Create(pParent, InsertDeleteFlags::NONE);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
ScDeleteContentsDlg(pParent, InsertDeleteFlags::NONE));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( vcl::Window*   pParent,
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 5ecd16122d38..3c056db5a36b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -180,7 +180,13 @@ class AbstractScDataFormDlg_Impl : public 
AbstractScDataFormDlg
 
 class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg
 {
-DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractScDeleteContentsDlg_Impl(ScDeleteContentsDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short   Execute() override;
 virtual voidDisableObjects() override;
 virtual InsertDeleteFlags GetDelContentsCmdBits() const override;
 };
@@ -453,7 +459,7 @@ public:
 virtual VclPtr CreateScDataFormDlg(vcl::Window* 
pParent,
 ScTabViewShell* pTabViewShell) override;
 
-virtual VclPtr 
CreateScDeleteContentsDlg(vcl::Window* pParent) override;
+virtual VclPtr 
CreateScDeleteContentsDlg(weld::Window* pParent) override;
 
 virtual VclPtr CreateScFillSeriesDlg( 
vcl::Window*pParent,

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-04-13 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx  |2 -
 sc/qa/unit/screenshots/screenshots.cxx|2 -
 sc/source/ui/attrdlg/scdlgfact.cxx|   14 +++
 sc/source/ui/attrdlg/scdlgfact.hxx|   10 ++-
 sc/source/ui/inc/namecrea.hxx |   17 +
 sc/source/ui/miscdlgs/namecrea.cxx|   38 +++---
 sc/source/ui/view/cellsh1.cxx |2 -
 sc/uiconfig/scalc/ui/createnamesdialog.ui |   10 ++-
 8 files changed, 49 insertions(+), 46 deletions(-)

New commits:
commit 57f2882ae218e3500cc2f28ee27db7be606316d3
Author: Caolán McNamara 
Date:   Fri Apr 13 14:00:33 2018 +0100

weld ScNameCreateDlg

Change-Id: I8b75647a419020504adc2cdff7c6d046ef043491
Reviewed-on: https://gerrit.libreoffice.org/52830
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index f624f343029d..c2d8d757127c 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -468,7 +468,7 @@ public:
 virtual VclPtr CreateScMoveTableDlg(vcl::Window * 
pParent,
 const OUString& rDefault) = 0;
 
-virtual VclPtr CreateScNameCreateDlg(vcl::Window 
* pParent,
+virtual VclPtr CreateScNameCreateDlg(weld::Window 
* pParent,
 CreateNameFlags nFlags) = 0;
 
 virtual VclPtr CreateScNamePasteDlg ( vcl::Window 
* pParent, ScDocShell* pShell ) = 0;
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 6268c9f94cda..3822be9358e4 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -198,7 +198,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 case 7: // "modules/scalc/ui/createnamesdialog.ui"
 {
 pReturnDialog = mpFact->CreateScNameCreateDlg(
-mpViewShell->GetDialogParent(),
+mpViewShell->GetFrameWeld(),
 CreateNameFlags::Left | CreateNameFlags::Top);
 // just fake some flags
 break;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 37da3f4d980d..51cce4e6b8dd 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -104,7 +104,12 @@ IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScMetricInputDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScMoveTableDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScNameCreateDlg_Impl);
+
+short AbstractScNameCreateDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScNamePasteDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScPivotFilterDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDPFunctionDlg_Impl);
@@ -494,7 +499,7 @@ voidAbstractScMoveTableDlg_Impl::EnableRenameTable(bool 
bFlag)
 
 CreateNameFlags AbstractScNameCreateDlg_Impl::GetFlags() const
 {
-return pDlg->GetFlags();
+return m_xDlg->GetFlags();
 }
 
 std::vector AbstractScNamePasteDlg_Impl::GetSelectedNames() const
@@ -777,10 +782,9 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScMoveTableDl
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(vcl::Window * pParent, 
CreateNameFlags nFlags)
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, 
CreateNameFlags nFlags)
 {
-VclPtr pDlg = VclPtr::Create( pParent, 
nFlags );
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
ScNameCreateDlg(pParent, nFlags));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( vcl::Window * pParent, 
ScDocShell* pShell )
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 46982a8a2b67..5ecd16122d38 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -290,7 +290,13 @@ class AbstractScMoveTableDlg_Impl : public 
AbstractScMoveTableDlg
 
 class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg
 {
-DECL_ABSTDLG_BASE( AbstractScNameCreateDlg_Impl, ScNameCreateDlg)
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractScNameCreateDlg_Impl(ScNameCreateDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short   Execute() override;
 virtual CreateNameFlags GetFlags() const override;
 };
 
@@ -487,7 +493,7 @@ public:
 virtual VclPtr CreateScMoveTableDlg(vcl::Window * 
pParent,
 const OUString& rDefault) override;
 
-virtual VclPtr CreateScNameCreateDlg(vcl::Window 
* pParent,
+virtual VclPtr CreateScNameCreateDlg(weld::Window 
* pParent,
 CreateNameFlags nFlags) override;
 
 virtual VclPtr CreateScNamePasteDlg ( vcl::Window 
* pParent, ScDocShell* pShell ) override;
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2018-04-13 Thread Caolán McNamara
 sc/inc/scabstdlg.hxx   |2 
 sc/qa/unit/screenshots/screenshots.cxx |2 
 sc/source/ui/attrdlg/scdlgfact.cxx |   14 --
 sc/source/ui/attrdlg/scdlgfact.hxx |   10 +++-
 sc/source/ui/inc/delcldlg.hxx  |   17 +++-
 sc/source/ui/miscdlgs/delcldlg.cxx |   68 -
 sc/source/ui/view/cellsh1.cxx  |2 
 sc/uiconfig/scalc/ui/deletecells.ui|   18 +---
 8 files changed, 74 insertions(+), 59 deletions(-)

New commits:
commit 1f5c0cf78d1dcc7420e93ae7c24d838931aba88d
Author: Caolán McNamara 
Date:   Fri Apr 13 13:46:51 2018 +0100

weld ScDeleteCellDlg

Change-Id: Ie85c51c019f892f647c2a13f67f47080ffa414b1
Reviewed-on: https://gerrit.libreoffice.org/52829
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index d970cac36827..f624f343029d 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -423,7 +423,7 @@ public:
 virtual VclPtr CreateScDataPilotServiceDlg( 
vcl::Window* pParent,
 const 
std::vector& rServices ) = 0;
 
-virtual VclPtr CreateScDeleteCellDlg(vcl::Window* 
pParent, bool bDisallowCellMove) = 0 ;
+virtual VclPtr 
CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) = 0 ;
 
 //for dataform
 virtual VclPtr CreateScDataFormDlg(vcl::Window* 
pParent,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 3735ea54b123..6268c9f94cda 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -162,7 +162,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 
 case 1: // "modules/scalc/ui/deletecells.ui"
 {
-pReturnDialog = 
mpFact->CreateScDeleteCellDlg(mpViewShell->GetDialogParent(), false);
+pReturnDialog = 
mpFact->CreateScDeleteCellDlg(mpViewShell->GetFrameWeld(), false);
 break;
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 2c7c7eb2ebba..37da3f4d980d 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -82,7 +82,12 @@ IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl);
+
+short AbstractScDeleteCellDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 //for dataform
 IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl);
@@ -242,7 +247,7 @@ OUString AbstractScDataPilotServiceDlg_Impl::GetParPass() 
const
 
 DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const
 {
-return pDlg->GetDelCellCmd();
+return m_xDlg->GetDelCellCmd();
 }
 
 void AbstractScDeleteContentsDlg_Impl::DisableObjects()
@@ -679,11 +684,10 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScData
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(vcl::Window* pParent,
+VclPtr 
ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(weld::Window* pParent,
 bool bDisallowCellMove)
 {
-VclPtr pDlg = VclPtr::Create(pParent, 
bDisallowCellMove);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
ScDeleteCellDlg(pParent, bDisallowCellMove));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScDataFormDlg(vcl::Window* pParent,
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 1f2bcee38bce..46982a8a2b67 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -162,7 +162,13 @@ class AbstractScDataPilotServiceDlg_Impl : public 
AbstractScDataPilotServiceDlg
 
 class AbstractScDeleteCellDlg_Impl : public AbstractScDeleteCellDlg
 {
-DECL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl,ScDeleteCellDlg)
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractScDeleteCellDlg_Impl(ScDeleteCellDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short   Execute() override;
 virtual DelCellCmd GetDelCellCmd() const override;
 };
 
@@ -435,7 +441,7 @@ public:
 
 virtual VclPtr CreateScDataPilotServiceDlg( 
vcl::Window* pParent,
 const 
std::vector& rServices ) override;
-virtual VclPtr CreateScDeleteCellDlg(vcl::Window* 
pParent, bool bDisallowCellMove ) override;
+virtual VclPtr 
CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove ) override;
 
 //for dataform
 virtual VclPtr CreateScDataFormDlg(vcl::Window* 
pParent,
diff --git a/sc/source/ui/inc/delcldlg.hxx 

[Libreoffice-commits] core.git: sc/inc sc/qa sc/source sc/uiconfig

2015-05-30 Thread Benjamin Ni
 sc/inc/column.hxx  |1 
 sc/inc/dociter.hxx |   18 ++
 sc/inc/document.hxx|4 ++
 sc/inc/table.hxx   |1 
 sc/qa/unit/ucalc.cxx   |   12 ++
 sc/source/core/data/dociter.cxx|   52 +
 sc/source/core/data/document.cxx   |   15 
 sc/source/ui/docshell/tpstat.cxx   |2 +
 sc/source/ui/inc/tpstat.hxx|1 
 sc/source/ui/view/cellsh2.cxx  |   18 +-
 sc/uiconfig/scalc/ui/statisticsinfopage.ui |   32 +
 11 files changed, 155 insertions(+), 1 deletion(-)

New commits:
commit 51262ef0d11d9aef246001d8a9b1c1d8753023bd
Author: Benjamin Ni benjaminn...@hotmail.com
Date:   Wed May 27 09:00:45 2015 +0100

Implemented formula group count statistic

Change-Id: I8b9c11fdd4b6e4343b467f1e5b1d1e96f1dd3140
Reviewed-on: https://gerrit.libreoffice.org/15927
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 9d96793..d5e6625 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -145,6 +145,7 @@ friend class ScValueIterator;
 friend class ScHorizontalValueIterator;
 friend class ScDBQueryDataIterator;
 friend class ScQueryCellIterator;
+friend class ScFormulaGroupIterator;
 friend class ScCellIterator;
 friend class ScHorizontalCellIterator;
 friend class ScHorizontalAttrIterator;
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 5b32930..49a782e 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SC_INC_DOCITER_HXX
 
 #include address.hxx
+#include formulagroup.hxx
 #include tools/solar.h
 #include global.hxx
 #include scdllapi.h
@@ -184,6 +185,23 @@ public:
 boolGetNext(Value rValue);
 };
 
+class ScFormulaGroupIterator
+{
+private:
+ScDocument* mpDoc;
+SCTAB mnTab;
+SCCOL mnCol;
+bool mbNullCol;
+size_t mnIndex;
+std::vectorsc::FormulaGroupEntry maEntries;
+
+public:
+ScFormulaGroupIterator( ScDocument* pDoc );
+
+sc::FormulaGroupEntry* first();
+sc::FormulaGroupEntry* next();
+};
+
 /**
  * Walk through all cells in an area. For SubTotal and Aggregate depending on 
mnSubTotalFlags.
  **/
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 7ea90f1..79ea555 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -231,10 +231,12 @@ struct ScDocStat
 OUString  aDocName;
 SCTAB   nTableCount;
 sal_uLong   nCellCount;
+sal_uLong   nFormulaCount;
 sal_uInt16  nPageCount;
 ScDocStat()
 : nTableCount(0)
 , nCellCount(0)
+, nFormulaCount(0)
 , nPageCount(0)
 {
 }
@@ -251,6 +253,7 @@ class ScDocument
 friend class ScValueIterator;
 friend class ScHorizontalValueIterator;
 friend class ScDBQueryDataIterator;
+friend class ScFormulaGroupIterator;
 friend class ScCellIterator;
 friend class ScQueryCellIterator;
 friend class ScHorizontalCellIterator;
@@ -465,6 +468,7 @@ public:
 bool  IsUsingEmbededFonts() { return mbUseEmbedFonts; }
 void  SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = 
bUse; }
 SC_DLLPUBLIC sal_uLong  GetCellCount() const;   // all cells
+SC_DLLPUBLIC sal_uLong  GetFormulaGroupCount() const;   // all 
cells
 sal_uLong   GetCodeCount() const;   // RPN-Code in formulas
 DECL_LINK( GetUserDefinedColor, sal_uInt16 * );
 // number 
formatter
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 7454188..8bbf7df 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -209,6 +209,7 @@ friend class ScDocument;// for FillInfo
 friend class ScValueIterator;
 friend class ScHorizontalValueIterator;
 friend class ScDBQueryDataIterator;
+friend class ScFormulaGroupIterator;
 friend class ScCellIterator;
 friend class ScQueryCellIterator;
 friend class ScHorizontalCellIterator;
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 494b535..dcc8cc1 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -767,6 +767,18 @@ void Test::testDocStatistics()
 m_pDoc-SetString(ScAddress(1,1,1), Test);
 CPPUNIT_ASSERT_EQUAL(static_castsal_uLong(3), m_pDoc-GetCellCount());
 
+CPPUNIT_ASSERT_EQUAL(static_castsal_uLong(0), 
m_pDoc-GetFormulaGroupCount());
+m_pDoc-SetString(ScAddress(3,0,1), =A1);
+CPPUNIT_ASSERT_EQUAL(static_castsal_uLong(1), 
m_pDoc-GetFormulaGroupCount());
+m_pDoc-SetString(ScAddress(3,1,1), =A2);
+m_pDoc-SetString(ScAddress(3,2,1), =A3);
+CPPUNIT_ASSERT_EQUAL(static_castsal_uLong(1), 
m_pDoc-GetFormulaGroupCount());
+m_pDoc-SetString(ScAddress(3,3,1), =A5);
+m_pDoc-SetString(ScAddress(3,4,1), =A6);
+