[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2022-05-03 Thread Heiko Tietze (via logerrit)
 sc/source/ui/dialogs/SparklineDialog.cxx |  133 ++--
 sc/source/ui/inc/SparklineDialog.hxx |   10 
 sc/uiconfig/scalc/ui/sparklinedialog.ui  | 1027 +++
 solenv/sanitizers/ui/modules/scalc.suppr |2 
 4 files changed, 460 insertions(+), 712 deletions(-)

New commits:
commit 0ba1d661430effda61d8a6fadff9527dc9562698
Author: Heiko Tietze 
AuthorDate: Fri Apr 29 14:17:46 2022 +0200
Commit: Roman Kuznetsov 
CommitDate: Tue May 3 23:38:06 2022 +0200

Resolves tdf#148568 - Rework the Sparklines dialog

* controls rearranged and variables renamed
* radiobuttons changed into comboboxes

Change-Id: Ifda426b5fa9596c2b23c335165785c0cb341433f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133636
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov 

diff --git a/sc/source/ui/dialogs/SparklineDialog.cxx 
b/sc/source/ui/dialogs/SparklineDialog.cxx
index 0c5be765ef3c..f27e0eb4a4a5 100644
--- a/sc/source/ui/dialogs/SparklineDialog.cxx
+++ b/sc/source/ui/dialogs/SparklineDialog.cxx
@@ -30,47 +30,43 @@ SparklineDialog::SparklineDialog(SfxBindings* pBindings, 
SfxChildWindow* pChildW
 , mbDialogLostFocus(false)
 , mxButtonOk(m_xBuilder->weld_button("ok"))
 , mxButtonCancel(m_xBuilder->weld_button("cancel"))
-, mxFrameData(m_xBuilder->weld_frame("frame-data"))
-, mxInputRangeLabel(m_xBuilder->weld_label("cell-range-label"))
-, mxInputRangeEdit(new 
formula::RefEdit(m_xBuilder->weld_entry("cell-range-edit")))
-, mxInputRangeButton(new 
formula::RefButton(m_xBuilder->weld_button("cell-range-button")))
-, mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
-, mxOutputRangeEdit(new 
formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
-, mxOutputRangeButton(new 
formula::RefButton(m_xBuilder->weld_button("output-range-button")))
-, mxColorSeries(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-series"),
+, mxFrameData(m_xBuilder->weld_frame("frmData"))
+, mxInputRangeLabel(m_xBuilder->weld_label("lbInputRange"))
+, mxInputRangeEdit(new 
formula::RefEdit(m_xBuilder->weld_entry("edInputRange")))
+, mxInputRangeButton(new 
formula::RefButton(m_xBuilder->weld_button("btnInputRange")))
+, mxOutputRangeLabel(m_xBuilder->weld_label("lbOutputRange"))
+, mxOutputRangeEdit(new 
formula::RefEdit(m_xBuilder->weld_entry("edOutputRange")))
+, mxOutputRangeButton(new 
formula::RefButton(m_xBuilder->weld_button("btnOutputRange")))
+, mxColorSeries(new ColorListBox(m_xBuilder->weld_menu_button("colSeries"),
  [pWindow] { return pWindow; }))
-, mxColorNegative(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-negative"),
+, mxColorNegative(new 
ColorListBox(m_xBuilder->weld_menu_button("colNegative"),
[pWindow] { return pWindow; }))
-, mxColorMarker(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-marker"),
+, mxColorMarker(new ColorListBox(m_xBuilder->weld_menu_button("colMarker"),
  [pWindow] { return pWindow; }))
-, mxColorHigh(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-high"),
-   [pWindow] { return pWindow; }))
-, mxColorLow(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-low"),
-  [pWindow] { return pWindow; }))
-, mxColorFirst(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-first"),
-[pWindow] { return pWindow; }))
-, mxColorLast(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-last"),
-   [pWindow] { return pWindow; }))
-, mxCheckButtonNegative(m_xBuilder->weld_check_button("check-negative"))
-, mxCheckButtonMarker(m_xBuilder->weld_check_button("check-marker"))
-, mxCheckButtonHigh(m_xBuilder->weld_check_button("check-high"))
-, mxCheckButtonLow(m_xBuilder->weld_check_button("check-low"))
-, mxCheckButtonFirst(m_xBuilder->weld_check_button("check-first"))
-, mxCheckButtonLast(m_xBuilder->weld_check_button("check-last"))
-, mxSpinLineWidth(m_xBuilder->weld_spin_button("spin-line-width"))
-, mxRadioLine(m_xBuilder->weld_radio_button("line-radiobutton"))
-, mxRadioColumn(m_xBuilder->weld_radio_button("column-radiobutton"))
-, mxRadioStacked(m_xBuilder->weld_radio_button("stacked-radiobutton"))
-, 
mxCheckDisplayXAxis(m_xBuilder->weld_check_button("check-display-x-axis"))
-, 
mxCheckDisplayHidden(m_xBuilder->weld_check_button("check-display-hidden"))
-, mxCheckRightToLeft(m_xBuilder->weld_check_button("check-right-to-left"))
-, 
mxRadioDisplayEmptyGap(m_xBuilder->weld_radio_button("display-empty-radiobutton-gap"))
-, 
mxRadioDisplayEmptyZero(m_xBuilder->weld_radio_button("display-empty-radiobutton-zero"))
-, 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2021-09-16 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/ui/dbgui/filtdlg.cxx   |  243 ++-
 sc/source/ui/inc/filtdlg.hxx |   10 
 sc/uiconfig/scalc/ui/standardfilterdialog.ui |  428 ---
 solenv/sanitizers/ui/modules/scalc.suppr |5 
 4 files changed, 560 insertions(+), 126 deletions(-)

New commits:
commit d9dd003f63a781e63bfbe380ea737e080c21881f
Author: Samuel Mehrbrodt 
AuthorDate: Thu Sep 9 09:33:49 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Sep 16 16:21:19 2021 +0200

tdf#143103 Support Color Filter in "Standard Filter" dialog

Change-Id: Ie8ffc928315b742d5b445d5fdda62cb9c2aabc0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122089
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index ef093efcb326..06df4ae300f2 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -34,10 +34,14 @@
 #include 
 
 #include 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -56,6 +60,8 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
 , aStrEmpty(ScResId(SCSTR_FILTER_EMPTY))
 , aStrNotEmpty(ScResId(SCSTR_FILTER_NOTEMPTY))
 , aStrColumn(ScResId(SCSTR_COLUMN))
+, aStrTextColor(ScResId(SCSTR_FILTER_TEXT_COLOR))
+, aStrBackgroundColor(ScResId(SCSTR_FILTER_BACKGROUND_COLOR))
 , nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY))
 , theQueryData(static_cast(rArgSet.Get(nWhichQuery)).GetQueryData())
 , pViewData(nullptr)
@@ -66,21 +72,25 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
 , m_xLbField1(m_xBuilder->weld_combo_box("field1"))
 , m_xLbCond1(m_xBuilder->weld_combo_box("cond1"))
 , m_xEdVal1(m_xBuilder->weld_combo_box("val1"))
+, m_xLbColor1(m_xBuilder->weld_combo_box("color1"))
 , m_xBtnRemove1(m_xBuilder->weld_button("remove1"))
 , m_xLbConnect2(m_xBuilder->weld_combo_box("connect2"))
 , m_xLbField2(m_xBuilder->weld_combo_box("field2"))
 , m_xLbCond2(m_xBuilder->weld_combo_box("cond2"))
 , m_xEdVal2(m_xBuilder->weld_combo_box("val2"))
+, m_xLbColor2(m_xBuilder->weld_combo_box("color2"))
 , m_xBtnRemove2(m_xBuilder->weld_button("remove2"))
 , m_xLbConnect3(m_xBuilder->weld_combo_box("connect3"))
 , m_xLbField3(m_xBuilder->weld_combo_box("field3"))
 , m_xLbCond3(m_xBuilder->weld_combo_box("cond3"))
 , m_xEdVal3(m_xBuilder->weld_combo_box("val3"))
+, m_xLbColor3(m_xBuilder->weld_combo_box("color3"))
 , m_xBtnRemove3(m_xBuilder->weld_button("remove3"))
 , m_xLbConnect4(m_xBuilder->weld_combo_box("connect4"))
 , m_xLbField4(m_xBuilder->weld_combo_box("field4"))
 , m_xLbCond4(m_xBuilder->weld_combo_box("cond4"))
 , m_xEdVal4(m_xBuilder->weld_combo_box("val4"))
+, m_xLbColor4(m_xBuilder->weld_combo_box("color4"))
 , m_xBtnRemove4(m_xBuilder->weld_button("remove4"))
 , m_xContents(m_xBuilder->weld_widget("grid"))
 , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar", true))
@@ -122,6 +132,33 @@ ScFilterDlg::~ScFilterDlg()
 pTimer.reset();
 }
 
+namespace {
+VirtualDevice* lcl_getColorImage(const Color )
+{
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+Size aImageSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
+
+VclPtrInstance xDevice;
+xDevice->SetOutputSize(aImageSize);
+const tools::Rectangle aRect(Point(0, 0), aImageSize);
+if (rColor == COL_NONE_COLOR)
+{
+const Color aW(COL_WHITE);
+const Color aG(0xef, 0xef, 0xef);
+xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), 8, aW, aG);
+xDevice->SetFillColor();
+}
+else
+{
+xDevice->SetFillColor(rColor);
+}
+
+xDevice->DrawRect(aRect);
+
+return xDevice.get();
+}
+}
+
 void ScFilterDlg::Init( const SfxItemSet& rArgSet )
 {
 const ScQueryItem& rQueryItem = static_cast(
@@ -157,6 +194,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
 m_xLbCond3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
 m_xLbCond4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
 
+m_xLbColor1->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+m_xLbColor2->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+m_xLbColor3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+m_xLbColor4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+
 m_xBtnRemove1->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) );
 m_xBtnRemove2->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) );
 m_xBtnRemove3->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) );
@@ -187,6 +229,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
 maConnLbArr.push_back(m_xLbConnect2.get());
 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers svtools/source vcl/unx

2019-12-30 Thread Caolán McNamara (via logerrit)
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx |  293 +---
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx |   52 ++--
 sc/uiconfig/scalc/ui/sidebaralignment.ui|  122 +
 solenv/sanitizers/ui/modules/scalc.suppr|4 
 svtools/source/uno/generictoolboxcontroller.cxx |6 
 vcl/unx/gtk3/gtk3gtkinst.cxx|4 
 6 files changed, 219 insertions(+), 262 deletions(-)

New commits:
commit c3b58a0de7b7dd08695fbc9ad96c573ea1305357
Author: Caolán McNamara 
AuthorDate: Sun Dec 22 17:47:19 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 30 10:39:21 2019 +0100

weld AlignmentPropertyPanel

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

diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index e54e8bc1b16b..20e6fc76de0c 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -42,34 +42,39 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
 vcl::Window* pParent,
 const css::uno::Reference& rxFrame,
 SfxBindings* pBindings)
-: PanelLayout(pParent, "AlignmentPropertyPanel", 
"modules/scalc/ui/sidebaralignment.ui", rxFrame),
-  maAlignHorControl(SID_H_ALIGNCELL, *pBindings, *this),
-  maLeftIndentControl(SID_ATTR_ALIGN_INDENT, *pBindings, *this),
-  maMergeCellControl(FID_MERGE_TOGGLE, *pBindings, *this),
-  maWrapTextControl(SID_ATTR_ALIGN_LINEBREAK, *pBindings, *this),
-  maAngleControl(SID_ATTR_ALIGN_DEGREES, *pBindings, *this),
-  maVrtStackControl(SID_ATTR_ALIGN_STACKED, *pBindings, *this),
-  maRefEdgeControl(SID_ATTR_ALIGN_LOCKPOS, *pBindings, *this),
-  mbMultiDisable(false),
-  maContext(),
-  mpBindings(pBindings)
+: PanelLayout(pParent, "AlignmentPropertyPanel", 
"modules/scalc/ui/sidebaralignment.ui", rxFrame, true)
+, mxFTLeftIndent(m_xBuilder->weld_label("leftindentlabel"))
+, mxMFLeftIndent(m_xBuilder->weld_metric_spin_button("leftindent", 
FieldUnit::POINT))
+, mxCBXWrapText(m_xBuilder->weld_check_button("wraptext"))
+, mxCBXMergeCell(m_xBuilder->weld_check_button("mergecells"))
+, mxFtRotate(m_xBuilder->weld_label("orientationlabel"))
+, mxMtrAngle(m_xBuilder->weld_metric_spin_button("orientationdegrees", 
FieldUnit::DEGREE))
+, mxRefEdgeBottom(m_xBuilder->weld_radio_button("bottom"))
+, mxRefEdgeTop(m_xBuilder->weld_radio_button("top"))
+, mxRefEdgeStd(m_xBuilder->weld_radio_button("standard"))
+, mxCBStacked(m_xBuilder->weld_check_button("stacked"))
+, mxTextOrientBox(m_xBuilder->weld_widget("textorientbox"))
+, mxHorizontalAlign(m_xBuilder->weld_toolbar("horizontalalignment"))
+, mxHorizontalAlignDispatch(new ToolbarUnoDispatcher(*mxHorizontalAlign, 
rxFrame))
+, mxVertAlign(m_xBuilder->weld_toolbar("verticalalignment"))
+, mxVertAlignDispatch(new ToolbarUnoDispatcher(*mxVertAlign, rxFrame))
+, mxWriteDirection(m_xBuilder->weld_toolbar("writedirection"))
+, mxWriteDirectionDispatch(new ToolbarUnoDispatcher(*mxWriteDirection, 
rxFrame))
+, mxIndentButtons(m_xBuilder->weld_toolbar("indentbuttons"))
+, mxIndentButtonsDispatch(new ToolbarUnoDispatcher(*mxIndentButtons, 
rxFrame))
+, maAlignHorControl(SID_H_ALIGNCELL, *pBindings, *this)
+, maLeftIndentControl(SID_ATTR_ALIGN_INDENT, *pBindings, *this)
+, maMergeCellControl(FID_MERGE_TOGGLE, *pBindings, *this)
+, maWrapTextControl(SID_ATTR_ALIGN_LINEBREAK, *pBindings, *this)
+, maAngleControl(SID_ATTR_ALIGN_DEGREES, *pBindings, *this)
+, maVrtStackControl(SID_ATTR_ALIGN_STACKED, *pBindings, *this)
+, maRefEdgeControl(SID_ATTR_ALIGN_LOCKPOS, *pBindings, *this)
+, mbMultiDisable(false)
+, mbSettingToggles(false)
+, maContext()
+, mpBindings(pBindings)
 {
-get(mpFTLeftIndent, "leftindentlabel");
-get(mpMFLeftIndent, "leftindent");
-get(mpCBXWrapText, "wraptext");
-get(mpCBXMergeCell, "mergecells");
-get(mpFtRotate, "orientationlabel");
-get(mpMtrAngle, "orientationdegrees");
-get(mpRefEdgeBottom, "bottom");
-get(mpRefEdgeTop, "top");
-get(mpRefEdgeStd, "standard");
-get(mpCBStacked, "stacked");
-get(mpTextOrientBox , "textorientbox");
-
 Initialize();
-
-mpFTLeftIndent->SetBackground(Wallpaper());
-mpFtRotate->SetBackground(Wallpaper());
 }
 
 AlignmentPropertyPanel::~AlignmentPropertyPanel()
@@ -79,17 +84,26 @@ AlignmentPropertyPanel::~AlignmentPropertyPanel()
 
 void AlignmentPropertyPanel::dispose()
 {
-mpFTLeftIndent.clear();
-mpMFLeftIndent.clear();
-mpCBXWrapText.clear();
-mpCBXMergeCell.clear();
-mpFtRotate.clear();
-mpMtrAngle.clear();
-mpCBStacked.clear();
-mpRefEdgeBottom.clear();
-mpRefEdgeTop.clear();
-

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-12-20 Thread Caolán McNamara (via logerrit)
 sc/source/ui/formdlg/dwfunctr.cxx|  115 +--
 sc/source/ui/inc/dwfunctr.hxx|   17 ++--
 sc/uiconfig/scalc/ui/functionpanel.ui|   86 ++-
 solenv/sanitizers/ui/modules/scalc.suppr |4 -
 4 files changed, 127 insertions(+), 95 deletions(-)

New commits:
commit ddd1d219beb74f55eefbccc3ab8a8883dd0b4b69
Author: Caolán McNamara 
AuthorDate: Fri Dec 20 13:21:13 2019 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 20 18:02:40 2019 +0100

weld ScFunctionWin

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

diff --git a/sc/source/ui/formdlg/dwfunctr.cxx 
b/sc/source/ui/formdlg/dwfunctr.cxx
index f62eb242de05..dd7be33c9070 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -46,38 +46,31 @@
 #/
 
 ScFunctionWin::ScFunctionWin(vcl::Window* pParent, const 
css::uno::Reference )
-: PanelLayout(pParent, "FunctionPanel", 
"modules/scalc/ui/functionpanel.ui", rFrame)
+: PanelLayout(pParent, "FunctionPanel", 
"modules/scalc/ui/functionpanel.ui", rFrame, true)
+, xCatBox(m_xBuilder->weld_combo_box("category"))
+, xFuncList(m_xBuilder->weld_tree_view("funclist"))
+, xInsertButton(m_xBuilder->weld_button("insert"))
+, xFiFuncDesc(m_xBuilder->weld_label("funcdesc"))
 , xConfigListener(new 
comphelper::ConfigurationListener("/org.openoffice.Office.Calc/Formula/Syntax"))
 , 
xConfigChange(std::make_unique(xConfigListener, 
this))
 , pFuncDesc(nullptr)
 {
-get(aCatBox, "category");
-get(aFuncList, "funclist");
-aFuncList->set_height_request(10 * aFuncList->GetTextHeight());
-get(aInsertButton, "insert");
-get(aFiFuncDesc, "funcdesc");
+xFuncList->set_size_request(-1, xFuncList->get_height_rows(10));
 
 InitLRUList();
 
-aFiFuncDesc->SetUpdateMode(true);
 nArgs=0;
-aCatBox->SetDropDownLineCount(9);
-vcl::Font aFont=aFiFuncDesc->GetFont();
-aFont.SetColor(COL_BLACK);
-aFiFuncDesc->SetFont(aFont);
-aFiFuncDesc->SetBackground( GetBackground() );   //! never transparent?
-aFiFuncDesc->set_height_request(5 * aFiFuncDesc->GetTextHeight());
+xFiFuncDesc->set_size_request(-1, 5 * xFiFuncDesc->get_text_height());
 
-Link aLink=LINK( this, ScFunctionWin, SelHdl);
-aCatBox->SetSelectHdl(aLink);
-aFuncList->SetSelectHdl(aLink);
+xCatBox->connect_changed(LINK( this, ScFunctionWin, SelComboHdl));
+xFuncList->connect_changed(LINK( this, ScFunctionWin, SelTreeHdl));
 
-aFuncList->SetDoubleClickHdl(LINK( this, ScFunctionWin, SetSelectionHdl));
-aInsertButton->SetClickHdl(LINK( this, ScFunctionWin, 
SetSelectionClickHdl));
+xFuncList->connect_row_activated(LINK( this, ScFunctionWin, 
SetRowActivatedHdl));
+xInsertButton->connect_clicked(LINK( this, ScFunctionWin, 
SetSelectionClickHdl));
 
-aCatBox->SelectEntryPos(0);
+xCatBox->set_active(0);
 
-SelHdl(*aCatBox);
+SelComboHdl(*xCatBox);
 }
 
 /*
@@ -107,10 +100,10 @@ void ScFunctionWin::dispose()
 xConfigListener->dispose();
 xConfigListener.clear();
 }
-aCatBox.clear();
-aFuncList.clear();
-aInsertButton.clear();
-aFiFuncDesc.clear();
+xCatBox.reset();
+xFuncList.reset();
+xInsertButton.reset();
+xFiFuncDesc.reset();
 PanelLayout::dispose();
 }
 
@@ -133,9 +126,9 @@ void ScFunctionWin::InitLRUList()
 ScFunctionMgr* pFuncMgr = ScGlobal::GetStarCalcFunctionMgr();
 pFuncMgr->fillLastRecentlyUsedFunctions(aLRUList);
 
-sal_Int32  nSelPos   = aCatBox->GetSelectedEntryPos();
+sal_Int32 nSelPos  = xCatBox->get_active();
 
-if(nSelPos == 0)
+if (nSelPos == 0)
 UpdateFunctionList();
 }
 
@@ -178,25 +171,20 @@ void ScFunctionWin::UpdateLRUList()
 
 void ScFunctionWin::SetDescription()
 {
-aFiFuncDesc->SetText( EMPTY_OUSTRING );
+xFiFuncDesc->set_label(EMPTY_OUSTRING);
 const ScFuncDesc* pDesc =
- static_cast(aFuncList->GetEntryData(
-aFuncList->GetSelectedEntryPos() ));
+ reinterpret_cast(xFuncList->get_selected_id().toInt64());
 if (pDesc)
 {
 pDesc->initArgumentInfo();  // full argument info is needed
 
-OUStringBuffer aBuf(aFuncList->GetSelectedEntry());
+OUStringBuffer aBuf(xFuncList->get_selected_text());
 aBuf.append(":\n\n");
 aBuf.append(pDesc->GetParamList());
 aBuf.append("\n\n");
 aBuf.append(*pDesc->mxFuncDesc);
 
-aFiFuncDesc->SetText(aBuf.makeStringAndClear());
-aFiFuncDesc->StateChanged(StateChangedType::Text);
-aFiFuncDesc->Invalidate();
-aFiFuncDesc->Update();
-
+

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-17 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/sfiltdlg.cxx  |  262 +++
 sc/source/ui/inc/filtdlg.hxx |   65 +++---
 sc/source/ui/inc/reffact.hxx |2 
 sc/source/ui/view/reffact.cxx|4 
 sc/source/ui/view/tabvwshc.cxx   |   57 ++---
 sc/uiconfig/scalc/ui/advancedfilterdialog.ui |   23 +-
 solenv/sanitizers/ui/modules/scalc.suppr |4 
 7 files changed, 194 insertions(+), 223 deletions(-)

New commits:
commit 73482f5e8742cc9fce32de1fc660059aae2a9583
Author: Caolán McNamara 
AuthorDate: Tue Apr 16 15:44:33 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Apr 17 08:58:11 2019 +0200

weld ScSpecialFilterDlg

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

diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 919632c577fd..8438dcf2f563 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -51,44 +51,45 @@ namespace
 
 //  class ScSpecialFilterDialog
 
-ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, 
vcl::Window* pParent,
+ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, 
weld::Window* pParent,
 const SfxItemSet&   rArgSet )
 
-:   ScAnyRefDlg ( pB, pCW, pParent, "AdvancedFilterDialog", 
"modules/scalc/ui/advancedfilterdialog.ui" ),
-
-aStrUndefined   ( ScResId(SCSTR_UNDEFINED) ),
-nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ),
-theQueryData( static_cast(
-   rArgSet.Get( nWhichQuery )).GetQueryData() ),
-pViewData   ( nullptr ),
-pDoc( nullptr ),
-pRefInputEdit   ( nullptr ),
-bRefInputMode   ( false )
+: ScAnyRefDlgController(pB, pCW, pParent, 
"modules/scalc/ui/advancedfilterdialog.ui", "AdvancedFilterDialog")
+, aStrUndefined   ( ScResId(SCSTR_UNDEFINED) )
+, nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) )
+, theQueryData( static_cast(
+   rArgSet.Get( nWhichQuery )).GetQueryData() )
+, pViewData(nullptr)
+, pDoc(nullptr)
+, bRefInputMode(false)
+, m_pRefInputEdit(nullptr)
+, m_xLbFilterArea(m_xBuilder->weld_combo_box("lbfilterarea"))
+, m_xEdFilterArea(new 
formula::WeldRefEdit(m_xBuilder->weld_entry("edfilterarea")))
+, m_xRbFilterArea(new 
formula::WeldRefButton(m_xBuilder->weld_button("rbfilterarea")))
+, m_xExpander(m_xBuilder->weld_expander("more"))
+, m_xBtnCase(m_xBuilder->weld_check_button("case"))
+, m_xBtnRegExp(m_xBuilder->weld_check_button("regexp"))
+, m_xBtnHeader(m_xBuilder->weld_check_button("header"))
+, m_xBtnUnique(m_xBuilder->weld_check_button("unique"))
+, m_xBtnCopyResult(m_xBuilder->weld_check_button("copyresult"))
+, m_xLbCopyArea(m_xBuilder->weld_combo_box("lbcopyarea"))
+, m_xEdCopyArea(new 
formula::WeldRefEdit(m_xBuilder->weld_entry("edcopyarea")))
+, m_xRbCopyArea(new 
formula::WeldRefButton(m_xBuilder->weld_button("rbcopyarea")))
+, m_xBtnDestPers(m_xBuilder->weld_check_button("destpers"))
+, m_xFtDbAreaLabel(m_xBuilder->weld_label("dbarealabel"))
+, m_xFtDbArea(m_xBuilder->weld_label("dbarea"))
+, m_xBtnOk(m_xBuilder->weld_button("ok"))
+, m_xBtnCancel(m_xBuilder->weld_button("cancel"))
+, m_xFilterFrame(m_xBuilder->weld_frame("filterframe"))
+, m_xFilterLabel(m_xFilterFrame->weld_label_widget())
 {
-get(pLbFilterArea,"lbfilterarea");
-get(pEdFilterArea,"edfilterarea");
-pEdFilterArea->SetReferences(this, 
get("filterframe")->get_label_widget());
-get(pRbFilterArea,"rbfilterarea");
-pRbFilterArea->SetReferences(this, pEdFilterArea);
-get(pBtnCase,"case");
-get(pBtnRegExp,"regexp");
-get(pBtnHeader,"header");
-get(pBtnUnique,"unique");
-get(pBtnCopyResult,"copyresult");
-get(pLbCopyArea,"lbcopyarea");
-get(pEdCopyArea,"edcopyarea");
-pEdCopyArea->SetReferences(this, pBtnCopyResult);
-get(pRbCopyArea,"rbcopyarea");
-pRbCopyArea->SetReferences(this, pEdCopyArea);
-get(pBtnDestPers,"destpers");
-get(pFtDbAreaLabel,"dbarealabel");
-get(pFtDbArea,"dbarea");
-get(pBtnOk,"ok");
-get(pBtnCancel,"cancel");
-get(pExpander,"more");
+m_xEdFilterArea->SetReferences(this, m_xFilterLabel.get());
+m_xRbFilterArea->SetReferences(this, m_xEdFilterArea.get());
+m_xEdCopyArea->SetReferences(this, m_xFtDbAreaLabel.get());
+m_xRbCopyArea->SetReferences(this, m_xEdCopyArea.get());
 
 Init( rArgSet );
-pEdFilterArea->GrabFocus();
+m_xEdFilterArea->GrabFocus();
 
 // hack: control of RefInput
 pIdle.reset( new Idle("Special Filter Dialog") );
@@ -100,16 +101,6 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-13 Thread Caolán McNamara (via logerrit)
 sc/source/ui/inc/reffact.hxx |2 
 sc/source/ui/inc/tabopdlg.hxx|   55 ++---
 sc/source/ui/miscdlgs/tabopdlg.cxx   |  235 +++
 sc/source/ui/view/reffact.cxx|4 
 sc/source/ui/view/tabvwshc.cxx   |   21 --
 sc/uiconfig/scalc/ui/multipleoperationsdialog.ui |  143 +++--
 solenv/sanitizers/ui/modules/scalc.suppr |3 
 7 files changed, 236 insertions(+), 227 deletions(-)

New commits:
commit a1a8fda4205581046b021120cae4b7b7e46ef14a
Author: Caolán McNamara 
AuthorDate: Fri Apr 12 20:09:27 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Apr 13 15:06:09 2019 +0200

weld ScTabOpDlg

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

diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 8fa24b6f4fe2..c8ab3bc47651 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -50,7 +50,7 @@ DECL_WRAPPER_WITHID_CONTROLLER(ScSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
 DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
-DECL_WRAPPER_WITHID(ScTabOpDlgWrapper)
+DECL_WRAPPER_WITHID_CONTROLLER(ScTabOpDlgWrapper)
 DECL_WRAPPER_WITHID(ScFilterDlgWrapper)
 DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper)
 DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper)
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index c02ef2881378..a9e6ebf41a99 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
 #define INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
 
-#include 
 #include 
 #include "anyrefdg.hxx"
 
@@ -35,37 +34,21 @@ enum ScTabOpErr
 TABOPERR_NOROWFORMULA
 };
 
-class ScTabOpDlg : public ScAnyRefDlg
+class ScTabOpDlg : public ScAnyRefDlgController
 {
 public:
-ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, 
vcl::Window* pParent,
-ScDocument* pDocument,
-const ScRefAddress& rCursorPos );
-virtual ~ScTabOpDlg() override;
-virtual voiddispose() override;
+ScTabOpDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
+   ScDocument* pDocument,
+   const ScRefAddress& rCursorPos);
+virtual ~ScTabOpDlg() override;
 
 virtual voidSetReference( const ScRange& rRef, ScDocument* pDoc ) 
override;
 virtual boolIsRefInputMode() const override { return true; }
 virtual voidSetActive() override;
 
-virtual boolClose() override;
+virtual voidClose() override;
 
 private:
-VclPtr m_pFtFormulaRange;
-VclPtr m_pEdFormulaRange;
-VclPtr m_pRBFormulaRange;
-
-VclPtr m_pFtRowCell;
-VclPtr m_pEdRowCell;
-VclPtr m_pRBRowCell;
-
-VclPtr m_pFtColCell;
-VclPtr m_pEdColCell;
-VclPtr m_pRBColCell;
-
-VclPtr   m_pBtnOk;
-VclPtr   m_pBtnCancel;
-
 ScRefAddresstheFormulaCell;
 ScRefAddresstheFormulaEnd;
 ScRefAddresstheRowCell;
@@ -73,7 +56,6 @@ private:
 
 ScDocument* const pDoc;
 const SCTAB nCurTab;
-VclPtr   pEdActive;
 boolbDlgLostFocus;
 const OUString  errMsgNoFormula;
 const OUString  errMsgNoColRow;
@@ -82,12 +64,31 @@ private:
 const OUString  errMsgNoColFormula;
 const OUString  errMsgNoRowFormula;
 
+formula::WeldRefEdit* m_pEdActive;
+std::unique_ptr m_xFtFormulaRange;
+std::unique_ptr m_xEdFormulaRange;
+std::unique_ptr m_xRBFormulaRange;
+
+std::unique_ptr m_xFtRowCell;
+std::unique_ptr m_xEdRowCell;
+std::unique_ptr m_xRBRowCell;
+
+std::unique_ptr m_xFtColCell;
+std::unique_ptr m_xEdColCell;
+std::unique_ptr m_xRBColCell;
+
+std::unique_ptr m_xBtnOk;
+std::unique_ptr m_xBtnCancel;
+
 voidInit();
 voidRaiseError( ScTabOpErr eError );
 
-DECL_LINK( BtnHdl, Button*, void );
-DECL_LINK( GetFocusHdl, Control&, void );
-DECL_LINK( LoseFocusHdl, Control&, void );
+DECL_LINK( BtnHdl, weld::Button&, void );
+DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void );
+DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void );
+DECL_LINK( GetButtonFocusHdl, formula::WeldRefButton&, void );
+DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void );
+
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx 
b/sc/source/ui/miscdlgs/tabopdlg.cxx
index 46e0d1803a5c..740ee4611718 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -32,16 +32,14 @@
 
 //  class ScTabOpDlg
 
-ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/inc/reffact.hxx |2 
 sc/source/ui/inc/solvrdlg.hxx|   53 
 sc/source/ui/miscdlgs/solvrdlg.cxx   |  191 ---
 sc/source/ui/view/reffact.cxx|4 
 sc/source/ui/view/tabvwshc.cxx   |   19 +--
 sc/uiconfig/scalc/ui/goalseekdlg.ui  |   38 +++---
 solenv/sanitizers/ui/modules/scalc.suppr |2 
 7 files changed, 165 insertions(+), 144 deletions(-)

New commits:
commit 73e7db91ba006dc9333767de18df2c5057376183
Author: Caolán McNamara 
AuthorDate: Fri Apr 12 11:47:05 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 12 14:54:00 2019 +0200

weld ScSolverDlg

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

diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index ce462942f5de..8fa24b6f4fe2 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -46,7 +46,7 @@
 
 DECL_WRAPPER_WITHID_CONTROLLER(ScNameDlgWrapper)
 DECL_WRAPPER_WITHID_CONTROLLER(ScNameDefDlgWrapper)
-DECL_WRAPPER_WITHID(ScSolverDlgWrapper)
+DECL_WRAPPER_WITHID_CONTROLLER(ScSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
 DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index 29883c0a2ccc..173ced735a6a 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -33,54 +33,59 @@ enum ScSolverErr
 SOLVERR_INVALID_TARGETVALUE
 };
 
-class ScSolverDlg : public ScAnyRefDlg
+class ScSolverDlg : public ScAnyRefDlgController
 {
 public:
-ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, 
vcl::Window* pParent,
- ScDocument* pDocument,
- const ScAddress& aCursorPos );
-virtual ~ScSolverDlg() override;
-virtual voiddispose() override;
+ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
+ ScDocument* pDocument,
+ const ScAddress& aCursorPos );
+virtual ~ScSolverDlg() override;
 
 virtual voidSetReference( const ScRange& rRef, ScDocument* pDoc ) 
override;
 virtual boolIsRefInputMode() const override;
 virtual voidSetActive() override;
-virtual boolClose() override;
+virtual voidClose() override;
 
 private:
-VclPtr  m_pFtFormulaCell;
-VclPtr   m_pEdFormulaCell;
-VclPtr m_pRBFormulaCell;
-
-VclPtr   m_pEdTargetVal;
-
-VclPtr  m_pFtVariableCell;
-VclPtr   m_pEdVariableCell;
-VclPtr m_pRBVariableCell;
-
-VclPtr   m_pBtnOk;
-VclPtr   m_pBtnCancel;
-
 ScAddress   theFormulaCell;
 ScAddress   theVariableCell;
 OUStringtheTargetValStr;
 
 ScDocument* pDoc;
 const SCTAB nCurTab;
-VclPtr   pEdActive;
 boolbDlgLostFocus;
 const OUString  errMsgInvalidVar;
 const OUString  errMsgInvalidForm;
 const OUString  errMsgNoFormula;
 const OUString  errMsgInvalidVal;
 
+formula::WeldRefEdit* m_pEdActive;
+
+std::unique_ptr m_xFtFormulaCell;
+std::unique_ptr m_xEdFormulaCell;
+std::unique_ptr m_xRBFormulaCell;
+
+std::unique_ptr m_xEdTargetVal;
+
+std::unique_ptr m_xFtVariableCell;
+std::unique_ptr m_xEdVariableCell;
+std::unique_ptr m_xRBVariableCell;
+
+std::unique_ptr m_xBtnOk;
+std::unique_ptr m_xBtnCancel;
+
 voidInit();
 boolCheckTargetValue( const OUString& rStrVal );
 voidRaiseError( ScSolverErr eError );
 
-DECL_LINK( BtnHdl, Button*, void );
-DECL_LINK( GetFocusHdl, Control&, void );
-DECL_LINK( LoseFocusHdl, Control&, void );
+DECL_LINK( BtnHdl, weld::Button&, void );
+DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void );
+DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void );
+
+DECL_LINK( GetButtonFocusHdl, formula::WeldRefButton&, void );
+DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void );
+
+DECL_LINK( GetFocusHdl, weld::Widget&, void );
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_INC_SOLVRDLG_HXX
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx 
b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 6bc2fff92818..55cfb6626dc0 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -42,86 +42,75 @@ namespace
 }
 }
 
-ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* 
pParent,
+ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* 
pParent,
   ScDocument* pDocument,
   const ScAddress& aCursorPos )
 
-: ScAnyRefDlg(pB, pCW, pParent, "GoalSeekDialog", 
"modules/scalc/ui/goalseekdlg.ui")
+: 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |  315 
--
 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx   |   65 +-
 sc/source/ui/inc/reffact.hxx   |2 
 sc/source/ui/view/tabvwshc.cxx |9 
 sc/uiconfig/scalc/ui/randomnumbergenerator.ui  |   86 +-
 solenv/sanitizers/ui/modules/scalc.suppr   |1 
 6 files changed, 213 insertions(+), 265 deletions(-)

New commits:
commit a683074cc9fd6d3c74477b4228584a159206dada
Author: Caolán McNamara 
AuthorDate: Thu Apr 11 11:12:21 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 15:31:02 2019 +0200

weld ScRandomNumberGeneratorDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx 
b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index b105e8b29115..6821743fef99 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -44,35 +44,31 @@ const sal_Int64 DIGITS  = 4;
 
 ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
 SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData ) :
-ScAnyRefDlg ( pSfxBindings, pChildWindow, pParent,
-  "RandomNumberGeneratorDialog", 
"modules/scalc/ui/randomnumbergenerator.ui" ),
-mpViewData   ( pViewData ),
-mpDoc( pViewData->GetDocument() ),
-mbDialogLostFocus( false )
+weld::Window* pParent, ScViewData* pViewData)
+: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent,
+  "modules/scalc/ui/randomnumbergenerator.ui",
+  "RandomNumberGeneratorDialog")
+, mpViewData(pViewData)
+, mpDoc(pViewData->GetDocument())
+, mbDialogLostFocus(false)
+, mxInputRangeText(m_xBuilder->weld_label("cell-range-label"))
+, mxInputRangeEdit(new 
formula::WeldRefEdit(m_xBuilder->weld_entry("cell-range-edit")))
+, mxInputRangeButton(new 
formula::WeldRefButton(m_xBuilder->weld_button("cell-range-button")))
+, mxDistributionCombo(m_xBuilder->weld_combo_box("distribution-combo"))
+, mxParameter1Text(m_xBuilder->weld_label("parameter1-label"))
+, mxParameter1Value(m_xBuilder->weld_spin_button("parameter1-spin"))
+, mxParameter2Text(m_xBuilder->weld_label("parameter2-label"))
+, mxParameter2Value(m_xBuilder->weld_spin_button("parameter2-spin"))
+, mxSeed(m_xBuilder->weld_spin_button("seed-spin"))
+, mxEnableSeed(m_xBuilder->weld_check_button("enable-seed-check"))
+, mxDecimalPlaces(m_xBuilder->weld_spin_button("decimal-places-spin"))
+, mxEnableRounding(m_xBuilder->weld_check_button("enable-rounding-check"))
+, mxButtonApply(m_xBuilder->weld_button("apply"))
+, mxButtonOk(m_xBuilder->weld_button("ok"))
+, mxButtonClose(m_xBuilder->weld_button("close"))
 {
-get(mpInputRangeText,   "cell-range-label");
-get(mpInputRangeEdit,   "cell-range-edit");
-get(mpInputRangeButton, "cell-range-button");
-mpInputRangeEdit->SetReferences(this, mpInputRangeText);
-mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
-
-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(mpEnableRounding, "enable-rounding-check");
-get(mpDecimalPlaces,  "decimal-places-spin");
-
-get(mpDistributionCombo, "distribution-combo");
-
-get(mpButtonOk, "ok");
-get(mpButtonApply,  "apply");
-get(mpButtonClose,  "close");
+mxInputRangeEdit->SetReferences(this, mxInputRangeText.get());
+mxInputRangeButton->SetReferences(this, mxInputRangeEdit.get());
 
 Init();
 GetRangeFromSelection();
@@ -80,61 +76,38 @@ 
ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
 
 ScRandomNumberGeneratorDialog::~ScRandomNumberGeneratorDialog()
 {
-disposeOnce();
-}
-
-void ScRandomNumberGeneratorDialog::dispose()
-{
-mpInputRangeText.clear();
-mpInputRangeEdit.clear();
-mpInputRangeButton.clear();
-mpDistributionCombo.clear();
-mpParameter1Text.clear();
-mpParameter1Value.clear();
-mpParameter2Text.clear();
-mpParameter2Value.clear();
-mpSeed.clear();
-mpEnableSeed.clear();
-mpDecimalPlaces.clear();
-mpEnableRounding.clear();
-mpButtonApply.clear();
-mpButtonOk.clear();
-mpButtonClose.clear();
-ScAnyRefDlg::dispose();
 }
 
 void ScRandomNumberGeneratorDialog::Init()
 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/inc/namedefdlg.hxx  |   49 
 sc/source/ui/inc/reffact.hxx |2 
 sc/source/ui/inc/tabvwsh.hxx |3 
 sc/source/ui/namedlg/namedefdlg.cxx  |  173 +--
 sc/source/ui/namedlg/namedlg.cxx |2 
 sc/source/ui/view/reffact.cxx|4 
 sc/source/ui/view/tabvwshc.cxx   |   62 +--
 sc/uiconfig/scalc/ui/definename.ui   |   25 ++--
 solenv/sanitizers/ui/modules/scalc.suppr |1 
 9 files changed, 153 insertions(+), 168 deletions(-)

New commits:
commit e9f2e6526c68045380b64e7579b07c6064be9c58
Author: Caolán McNamara 
AuthorDate: Thu Apr 11 09:42:46 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 13:15:56 2019 +0200

weld ScNameDefDlg

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

diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index aa971727884c..aa9861cd278f 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -22,25 +22,9 @@ class ScDocument;
 class ScDocShell;
 class ScViewData;
 
-class ScNameDefDlg : public ScAnyRefDlg
+class ScNameDefDlg : public ScAnyRefDlgController
 {
 private:
-VclPtr m_pEdName;
-
-VclPtr m_pEdRange;
-VclPtr m_pRbRange;
-
-VclPtr m_pLbScope;
-
-VclPtr m_pBtnRowHeader;
-VclPtr m_pBtnColHeader;
-VclPtr m_pBtnPrintArea;
-VclPtr m_pBtnCriteria;
-
-VclPtr m_pBtnAdd;
-VclPtr m_pBtnCancel;
-VclPtr m_pFtInfo;
-
 bool const mbUndo; //if true we need to add an undo action after creating 
a range name
 ScDocument* mpDoc;
 ScDocShell* mpDocShell;
@@ -58,33 +42,50 @@ private:
 
 std::map maRangeMap;
 
+std::unique_ptr m_xEdName;
+
+std::unique_ptr m_xEdRange;
+std::unique_ptr m_xRbRange;
+
+std::unique_ptr m_xLbScope;
+
+std::unique_ptr m_xBtnRowHeader;
+std::unique_ptr m_xBtnColHeader;
+std::unique_ptr m_xBtnPrintArea;
+std::unique_ptr m_xBtnCriteria;
+
+std::unique_ptr m_xBtnAdd;
+std::unique_ptr m_xBtnCancel;
+std::unique_ptr m_xFtInfo;
+std::unique_ptr m_xExpander;
+std::unique_ptr m_xFtRange;
+
 void CancelPushed();
 void AddPushed();
 
 bool IsNameValid();
 bool IsFormulaValid();
 
-DECL_LINK( CancelBtnHdl, Button*, void );
-DECL_LINK( AddBtnHdl, Button*, void );
-DECL_LINK( NameModifyHdl, Edit&, void );
-DECL_LINK( AssignGetFocusHdl, Control&, void );
+DECL_LINK( CancelBtnHdl, weld::Button&, void );
+DECL_LINK( AddBtnHdl, weld::Button&, void );
+DECL_LINK( NameModifyHdl, weld::Entry&, void );
+DECL_LINK( AssignGetFocusHdl, formula::WeldRefEdit&, void );
 
 protected:
 virtual voidRefInputDone( bool bForced = false ) override;
 
 public:
-ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
+ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
 const ScViewData* pViewData, const std::map& aRangeMap,
 const ScAddress& aCursorPos, const bool bUndo);
 
 virtual ~ScNameDefDlg() override;
-virtual voiddispose() override;
 
 virtual voidSetReference( const ScRange& rRef, ScDocument* pDoc ) 
override;
 virtual boolIsRefInputMode() const override;
 
 virtual voidSetActive() override;
-virtual boolClose() override;
+virtual voidClose() override;
 
 void GetNewData( OUString& rName, OUString& rScope );
 };
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index e6bf12c0feec..f41d5331b066 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -45,7 +45,7 @@
 };
 
 DECL_WRAPPER_WITHID_CONTROLLER(ScNameDlgWrapper)
-DECL_WRAPPER_WITHID(ScNameDefDlgWrapper)
+DECL_WRAPPER_WITHID_CONTROLLER(ScNameDefDlgWrapper)
 DECL_WRAPPER_WITHID(ScSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 4a2a142befef..266d816a78af 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -378,8 +378,7 @@ public:
 const   OUString DoAutoSum(bool& rRangeFinder, bool& rSubTotal);
 
 // ugly hack to call Define Names from Manage Names
-voidSwitchBetweenRefDialogs(SfxModelessDialog* pDialog);
-voidSwitchBetweenRefDialogControllers(SfxModelessDialogController* 
pDialog);
+voidSwitchBetweenRefDialogs(SfxModelessDialogController* pDialog);
 // #i123629#
 boolGetForceFocusOnCurCell() const { return bForceFocusOnCurCell; }
 void SetForceFocusOnCurCell(bool bFlag) { bForceFocusOnCurCell=bFlag; }
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx 
b/sc/source/ui/namedlg/namedefdlg.cxx
index 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx |   67 ++-
 sc/source/ui/inc/FourierAnalysisDialog.hxx   |   21 ++--
 sc/source/ui/inc/reffact.hxx |2 
 sc/source/ui/view/tabvwshc.cxx   |   11 +-
 sc/uiconfig/scalc/ui/fourieranalysisdialog.ui|   14 ++-
 solenv/sanitizers/ui/modules/scalc.suppr |2 
 6 files changed, 57 insertions(+), 60 deletions(-)

New commits:
commit 849f575abb2521aa3ca628346b5de7efd2bd2c17
Author: Caolán McNamara 
AuthorDate: Wed Apr 10 12:31:14 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 09:57:14 2019 +0200

weld ScFourierAnalysisDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx 
b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index 7ccabfcb0ed5..d41cb9b61674 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -26,11 +26,11 @@
 #include 
 
 ScFourierAnalysisDialog::ScFourierAnalysisDialog(SfxBindings* pSfxBindings,
- SfxChildWindow* pChildWindow, 
vcl::Window* pParent,
- ScViewData* pViewData)
-: ScStatisticsInputOutputDialog(pSfxBindings, pChildWindow, pParent, 
pViewData,
-"FourierAnalysisDialog",
-
"modules/scalc/ui/fourieranalysisdialog.ui")
+ SfxChildWindow* pChildWindow,
+ weld::Window* pParent, 
ScViewData* pViewData)
+: ScStatisticsInputOutputDialogController(pSfxBindings, pChildWindow, 
pParent, pViewData,
+  
"modules/scalc/ui/fourieranalysisdialog.ui",
+  "FourierAnalysisDialog")
 , maLabelAddr(ScAddress::INITIALIZE_INVALID)
 , maActualInputRange(ScAddress::INITIALIZE_INVALID)
 , mnLen(0)
@@ -40,32 +40,22 @@ 
ScFourierAnalysisDialog::ScFourierAnalysisDialog(SfxBindings* pSfxBindings,
 , mbWithLabels(false)
 , mbInverse(false)
 , mbPolar(false)
+, mxWithLabelsCheckBox(m_xBuilder->weld_check_button("withlabels-check"))
+, mxInverseCheckBox(m_xBuilder->weld_check_button("inverse-check"))
+, mxPolarCheckBox(m_xBuilder->weld_check_button("polar-check"))
+, mxMinMagnitudeField(m_xBuilder->weld_spin_button("minmagnitude-spin"))
+, mxErrorMessage(m_xBuilder->weld_label("error-message"))
 {
-SetText(ScResId(STR_FOURIER_ANALYSIS));
-get(mpWithLabelsCheckBox, "withlabels-check");
-get(mpInverseCheckBox, "inverse-check");
-get(mpPolarCheckBox, "polar-check");
-get(mpMinMagnitudeField, "minmagnitude-spin");
-get(mpErrorMessage, "error-message");
-
-mpWithLabelsCheckBox->SetToggleHdl(LINK(this, ScFourierAnalysisDialog, 
CheckBoxHdl));
-}
-
-ScFourierAnalysisDialog::~ScFourierAnalysisDialog() { disposeOnce(); }
+m_xDialog->set_title(ScResId(STR_FOURIER_ANALYSIS));
 
-bool ScFourierAnalysisDialog::Close()
-{
-return DoClose(ScFourierAnalysisDialogWrapper::GetChildWindowId());
+mxWithLabelsCheckBox->connect_toggled(LINK(this, ScFourierAnalysisDialog, 
CheckBoxHdl));
 }
 
-void ScFourierAnalysisDialog::dispose()
+ScFourierAnalysisDialog::~ScFourierAnalysisDialog() {}
+
+void ScFourierAnalysisDialog::Close()
 {
-mpWithLabelsCheckBox.disposeAndClear();
-mpInverseCheckBox.disposeAndClear();
-mpPolarCheckBox.disposeAndClear();
-mpMinMagnitudeField.disposeAndClear();
-mpErrorMessage.disposeAndClear();
-ScStatisticsInputOutputDialog::dispose();
+DoClose(ScFourierAnalysisDialogWrapper::GetChildWindowId());
 }
 
 const char* ScFourierAnalysisDialog::GetUndoNameId() { return 
STR_FOURIER_ANALYSIS; }
@@ -120,20 +110,20 @@ bool ScFourierAnalysisDialog::InputRangesValid()
 {
 if (!mInputRange.IsValid())
 {
-mpErrorMessage->SetText(ScResId(STR_MESSAGE_INVALID_INPUT_RANGE));
+mxErrorMessage->set_label(ScResId(STR_MESSAGE_INVALID_INPUT_RANGE));
 return false;
 }
 
 if (!mOutputAddress.IsValid())
 {
-mpErrorMessage->SetText(ScResId(STR_MESSAGE_INVALID_OUTPUT_ADDR));
+mxErrorMessage->set_label(ScResId(STR_MESSAGE_INVALID_OUTPUT_ADDR));
 return false;
 }
 
 mInputRange.PutInOrder();
 
 mbGroupedByColumn = mGroupedBy == BY_COLUMN;
-mbWithLabels = mpWithLabelsCheckBox->IsChecked();
+mbWithLabels = mxWithLabelsCheckBox->get_active();
 
 mbUse3DAddresses = mInputRange.aStart.Tab() != mOutputAddress.Tab();
 
@@ -147,13 +137,13 @@ bool ScFourierAnalysisDialog::InputRangesValid()
 {
 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx |   22 -
 sc/source/ui/inc/ExponentialSmoothingDialog.hxx   |9 
 sc/source/ui/inc/reffact.hxx  |2 
 sc/source/ui/view/tabvwshc.cxx|   11 
 sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui|  146 +-
 solenv/sanitizers/ui/modules/scalc.suppr  |2 
 6 files changed, 97 insertions(+), 95 deletions(-)

New commits:
commit ab2906c593c280c95de7f1984b4e0eea7b52b768
Author: Caolán McNamara 
AuthorDate: Wed Apr 10 10:32:56 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 09:54:12 2019 +0200

weld ScExponentialSmoothingDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx 
b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index b2ab5b48f438..3a94e7c5de72 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -18,28 +18,22 @@
 
 ScExponentialSmoothingDialog::ScExponentialSmoothingDialog(
 SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData ) :
-ScStatisticsInputOutputDialog(
+weld::Window* pParent, ScViewData* pViewData )
+: ScStatisticsInputOutputDialogController(
 pSfxBindings, pChildWindow, pParent, pViewData,
-"ExponentialSmoothingDialog", 
"modules/scalc/ui/exponentialsmoothingdialog.ui" )
+"modules/scalc/ui/exponentialsmoothingdialog.ui",
+"ExponentialSmoothingDialog")
+, mxSmoothingFactor(m_xBuilder->weld_spin_button("smoothing-factor-spin"))
 {
-get(mpSmoothingFactor, "smoothing-factor-spin");
 }
 
 ScExponentialSmoothingDialog::~ScExponentialSmoothingDialog()
 {
-disposeOnce();
 }
 
-void ScExponentialSmoothingDialog::dispose()
+void ScExponentialSmoothingDialog::Close()
 {
-mpSmoothingFactor.clear();
-ScStatisticsInputOutputDialog::dispose();
-}
-
-bool ScExponentialSmoothingDialog::Close()
-{
-return DoClose( ScExponentialSmoothingDialogWrapper::GetChildWindowId() );
+DoClose( ScExponentialSmoothingDialogWrapper::GetChildWindowId() );
 }
 
 const char* ScExponentialSmoothingDialog::GetUndoNameId()
@@ -54,7 +48,7 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* 
pDocShell)
 FormulaTemplate aTemplate(mDocument);
 
 // Smoothing factor
-double aSmoothingFactor = mpSmoothingFactor->GetValue() / 100.0;
+double aSmoothingFactor = mxSmoothingFactor->get_value() / 100.0;
 
 // Alpha
 output.writeBoldString(ScResId(STR_LABEL_ALPHA));
diff --git a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx 
b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
index ae2b255df918..f8fad4fa95cf 100644
--- a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
+++ b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
@@ -16,20 +16,19 @@
 
 #include "StatisticsInputOutputDialog.hxx"
 
-class ScExponentialSmoothingDialog : public ScStatisticsInputOutputDialog
+class ScExponentialSmoothingDialog : public 
ScStatisticsInputOutputDialogController
 {
 private:
-VclPtr mpSmoothingFactor;
+std::unique_ptr mxSmoothingFactor;
 
 public:
 ScExponentialSmoothingDialog(
 SfxBindings* pB, SfxChildWindow* pCW,
-vcl::Window* pParent, ScViewData* pViewData );
+weld::Window* pParent, ScViewData* pViewData );
 
 virtual ~ScExponentialSmoothingDialog() override;
-virtual void dispose() override;
 
-virtual bool Close() override;
+virtual void Close() override;
 
 protected:
 virtual const char* GetUndoNameId() override;
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index fe9070e61771..eb4923dc7903 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -93,7 +93,7 @@ private:
 };
 
 class ScExponentialSmoothingDialogWrapper :
-public ChildWindowWrapper
+public ChildControllerWrapper
 {
 private:
 ScExponentialSmoothingDialogWrapper() = delete;
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 818a1f610b28..5052ab24ec55 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -330,12 +330,6 @@ VclPtr ScTabViewShell::CreateRefDialog(
 }
 break;
 
-case SID_EXPONENTIAL_SMOOTHING_DIALOG:
-{
-pResult = VclPtr::Create( pB, pCW, 
pParent, () );
-}
-break;
-
 case SID_MOVING_AVERAGE_DIALOG:
 {
 pResult = VclPtr::Create( pB, pCW, pParent, 
() );
@@ -534,6 +528,11 @@ std::unique_ptr 
ScTabViewShell::CreateRefDialogCont
 xResult.reset(new 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx |   66 +---
 sc/source/ui/inc/AnalysisOfVarianceDialog.hxx   |   19 +--
 sc/source/ui/inc/reffact.hxx|2 
 sc/source/ui/view/tabvwshc.cxx  |   11 --
 sc/uiconfig/scalc/ui/analysisofvariancedialog.ui|   32 +++--
 sc/uiconfig/scalc/ui/correlationdialog.ui   |4 
 sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui |2 
 sc/uiconfig/scalc/ui/samplingdialog.ui  |4 
 solenv/sanitizers/ui/modules/scalc.suppr|2 
 9 files changed, 75 insertions(+), 67 deletions(-)

New commits:
commit a5a0d6050b05362a39424ae9f44627fb3c604b8a
Author: Caolán McNamara 
AuthorDate: Wed Apr 10 10:15:20 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 09:53:25 2019 +0200

weld ScAnalysisOfVarianceDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx 
b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index b8284c6f885d..0dc391a17e2f 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -67,10 +67,10 @@ OUString lclCreateMultiParameterFormula(
 return aResult.makeStringAndClear();
 }
 
-void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, 
ScStatisticsInputOutputDialog::GroupedBy aGroupedBy)
+void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, 
ScStatisticsInputOutputDialogController::GroupedBy aGroupedBy)
 {
 std::unique_ptr pIterator;
-if (aGroupedBy == ScStatisticsInputOutputDialog::BY_COLUMN)
+if (aGroupedBy == ScStatisticsInputOutputDialogController::BY_COLUMN)
 pIterator.reset(new DataRangeByColumnIterator(rInputRange));
 else
 pIterator.reset(new DataRangeByRowIterator(rInputRange));
@@ -86,43 +86,33 @@ void lclMakeSubRangesList(ScRangeList& rRangeList, const 
ScRange& rInputRange, S
 
 ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog(
 SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData ) :
-ScStatisticsInputOutputDialog(
+weld::Window* pParent, ScViewData* pViewData )
+: ScStatisticsInputOutputDialogController(
 pSfxBindings, pChildWindow, pParent, pViewData,
-"AnalysisOfVarianceDialog", 
"modules/scalc/ui/analysisofvariancedialog.ui" ),
-meFactor(SINGLE_FACTOR)
+"modules/scalc/ui/analysisofvariancedialog.ui",
+"AnalysisOfVarianceDialog")
+, meFactor(SINGLE_FACTOR)
+, mxAlphaField(m_xBuilder->weld_spin_button("alpha-spin"))
+, mxSingleFactorRadio(m_xBuilder->weld_radio_button("radio-single-factor"))
+, mxTwoFactorRadio(m_xBuilder->weld_radio_button("radio-two-factor"))
+, 
mxRowsPerSampleField(m_xBuilder->weld_spin_button("rows-per-sample-spin"))
 {
-get(mpAlphaField, "alpha-spin");
-get(mpSingleFactorRadio,  "radio-single-factor");
-get(mpTwoFactorRadio, "radio-two-factor");
-get(mpRowsPerSampleField, "rows-per-sample-spin");
+mxSingleFactorRadio->connect_toggled( LINK( this, 
ScAnalysisOfVarianceDialog, FactorChanged ) );
+mxTwoFactorRadio->connect_toggled( LINK( this, ScAnalysisOfVarianceDialog, 
FactorChanged ) );
 
-mpSingleFactorRadio->SetToggleHdl( LINK( this, ScAnalysisOfVarianceDialog, 
FactorChanged ) );
-mpTwoFactorRadio->SetToggleHdl( LINK( this, ScAnalysisOfVarianceDialog, 
FactorChanged ) );
-
-mpSingleFactorRadio->Check();
-mpTwoFactorRadio->Check(false);
+mxSingleFactorRadio->set_active(true);
+mxTwoFactorRadio->set_active(false);
 
 FactorChanged();
 }
 
 ScAnalysisOfVarianceDialog::~ScAnalysisOfVarianceDialog()
 {
-disposeOnce();
-}
-
-void ScAnalysisOfVarianceDialog::dispose()
-{
-mpAlphaField.clear();
-mpSingleFactorRadio.clear();
-mpTwoFactorRadio.clear();
-mpRowsPerSampleField.clear();
-ScStatisticsInputOutputDialog::dispose();
 }
 
-bool ScAnalysisOfVarianceDialog::Close()
+void ScAnalysisOfVarianceDialog::Close()
 {
-return DoClose( ScAnalysisOfVarianceDialogWrapper::GetChildWindowId() );
+DoClose( ScAnalysisOfVarianceDialogWrapper::GetChildWindowId() );
 }
 
 const char* ScAnalysisOfVarianceDialog::GetUndoNameId()
@@ -130,25 +120,25 @@ const char* ScAnalysisOfVarianceDialog::GetUndoNameId()
 return STR_ANALYSIS_OF_VARIANCE_UNDO_NAME;
 }
 
-IMPL_LINK_NOARG( ScAnalysisOfVarianceDialog, FactorChanged, RadioButton&, void 
)
+IMPL_LINK_NOARG( ScAnalysisOfVarianceDialog, FactorChanged, 
weld::ToggleButton&, void )
 {
 FactorChanged();
 }
 
 void 

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx |   10 -
 sc/source/ui/inc/CovarianceDialog.hxx   |6 
 sc/source/ui/inc/reffact.hxx|2 
 sc/source/ui/view/tabvwshc.cxx  |   11 -
 sc/uiconfig/scalc/ui/covariancedialog.ui|  140 ++--
 solenv/sanitizers/ui/modules/scalc.suppr|2 
 6 files changed, 90 insertions(+), 81 deletions(-)

New commits:
commit 364880e744398bf4e95eb9176819a870c1852e03
Author: Caolán McNamara 
AuthorDate: Wed Apr 10 10:23:49 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 09:53:46 2019 +0200

weld ScCovarianceDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx 
b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index d5243745278b..522297cc731d 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -15,10 +15,10 @@
 
 ScCovarianceDialog::ScCovarianceDialog(
 SfxBindings* pSfxBindings, SfxChildWindow* 
pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData ) :
-ScMatrixComparisonGenerator(
+weld::Window* pParent, ScViewData* pViewData ) :
+ScMatrixComparisonGeneratorController(
 pSfxBindings, pChildWindow, pParent, pViewData,
-"CovarianceDialog", "modules/scalc/ui/covariancedialog.ui" )
+"modules/scalc/ui/covariancedialog.ui", "CovarianceDialog")
 {}
 
 const char* ScCovarianceDialog::GetUndoNameId()
@@ -26,9 +26,9 @@ const char* ScCovarianceDialog::GetUndoNameId()
 return STR_COVARIANCE_UNDO_NAME;
 }
 
-bool ScCovarianceDialog::Close()
+void ScCovarianceDialog::Close()
 {
-return DoClose( ScCovarianceDialogWrapper::GetChildWindowId() );
+DoClose( ScCovarianceDialogWrapper::GetChildWindowId() );
 }
 
 const OUString ScCovarianceDialog::getLabel()
diff --git a/sc/source/ui/inc/CovarianceDialog.hxx 
b/sc/source/ui/inc/CovarianceDialog.hxx
index 3bd5a9e2657b..99052c51b644 100644
--- a/sc/source/ui/inc/CovarianceDialog.hxx
+++ b/sc/source/ui/inc/CovarianceDialog.hxx
@@ -13,14 +13,14 @@
 
 #include "MatrixComparisonGenerator.hxx"
 
-class ScCovarianceDialog : public ScMatrixComparisonGenerator
+class ScCovarianceDialog : public ScMatrixComparisonGeneratorController
 {
 public:
 ScCovarianceDialog(
 SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData);
+weld::Window* pParent, ScViewData* pViewData);
 
-virtual bool Close() override;
+virtual void Close() override;
 
 protected:
 virtual const OUString getLabel() override;
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index b1dda37d1249..fe9070e61771 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -86,7 +86,7 @@ private:
 };
 
 class ScCovarianceDialogWrapper :
-public ChildWindowWrapper
+public ChildControllerWrapper
 {
 private:
 ScCovarianceDialogWrapper() = delete;
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 379bf2ad3f1f..818a1f610b28 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -330,12 +330,6 @@ VclPtr ScTabViewShell::CreateRefDialog(
 }
 break;
 
-case SID_COVARIANCE_DIALOG:
-{
-pResult = VclPtr::Create( pB, pCW, pParent, 
() );
-}
-break;
-
 case SID_EXPONENTIAL_SMOOTHING_DIALOG:
 {
 pResult = VclPtr::Create( pB, pCW, 
pParent, () );
@@ -535,6 +529,11 @@ std::unique_ptr 
ScTabViewShell::CreateRefDialogCont
 xResult.reset(new ScAnalysisOfVarianceDialog(pB, pCW, pParent, 
()));
 }
 break;
+case SID_COVARIANCE_DIALOG:
+{
+xResult.reset(new ScCovarianceDialog(pB, pCW, pParent, 
()));
+}
+break;
 }
 
 if (xResult)
diff --git a/sc/uiconfig/scalc/ui/covariancedialog.ui 
b/sc/uiconfig/scalc/ui/covariancedialog.ui
index f8a92854221b..07a766a13dd4 100644
--- a/sc/uiconfig/scalc/ui/covariancedialog.ui
+++ b/sc/uiconfig/scalc/ui/covariancedialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -8,12 +8,76 @@
 6
 Covariance
 False
+0
+0
 dialog
+
+  
+
 
   
 False
 vertical
 12
+
+  
+False
+end
+
+  
+gtk-ok
+True
+True
+True
+True
+True
+True
+  
+  
+False
+True
+0
+  
+
+
+

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx |   11 
 sc/source/ui/inc/DescriptiveStatisticsDialog.hxx   |6 
 sc/source/ui/inc/reffact.hxx   |2 
 sc/source/ui/view/tabvwshc.cxx |   11 
 sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui|  139 
+-
 solenv/sanitizers/ui/modules/scalc.suppr   |2 
 6 files changed, 89 insertions(+), 82 deletions(-)

New commits:
commit 48af979d264fff14352b2c69db137332fcfdb25e
Author: Caolán McNamara 
AuthorDate: Wed Apr 10 09:56:19 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 09:52:30 2019 +0200

weld ScDescriptiveStatisticsDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx 
b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 3e55faced5d9..aabb3ae06c88 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -48,18 +48,19 @@ static const StatisticCalculation lclCalcDefinitions[] =
 
 ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog(
 SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData ) :
-ScStatisticsInputOutputDialog(
+weld::Window* pParent, ScViewData* pViewData ) :
+ScStatisticsInputOutputDialogController(
 pSfxBindings, pChildWindow, pParent, pViewData,
-"DescriptiveStatisticsDialog", 
"modules/scalc/ui/descriptivestatisticsdialog.ui" )
+"modules/scalc/ui/descriptivestatisticsdialog.ui",
+"DescriptiveStatisticsDialog")
 {}
 
 ScDescriptiveStatisticsDialog::~ScDescriptiveStatisticsDialog()
 {}
 
-bool ScDescriptiveStatisticsDialog::Close()
+void ScDescriptiveStatisticsDialog::Close()
 {
-return DoClose( ScDescriptiveStatisticsDialogWrapper::GetChildWindowId() );
+DoClose( ScDescriptiveStatisticsDialogWrapper::GetChildWindowId() );
 }
 
 const char* ScDescriptiveStatisticsDialog::GetUndoNameId()
diff --git a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx 
b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
index bbdc727b06e4..0ffe831163bc 100644
--- a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
+++ b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
@@ -13,16 +13,16 @@
 
 #include "StatisticsInputOutputDialog.hxx"
 
-class ScDescriptiveStatisticsDialog : public ScStatisticsInputOutputDialog
+class ScDescriptiveStatisticsDialog : public 
ScStatisticsInputOutputDialogController
 {
 public:
 ScDescriptiveStatisticsDialog(
 SfxBindings* pB, SfxChildWindow* pCW,
-vcl::Window* pParent, ScViewData* pViewData );
+weld::Window* pParent, ScViewData* pViewData );
 
 virtual ~ScDescriptiveStatisticsDialog() override;
 
-virtual bool Close() override;
+virtual void Close() override;
 
 protected:
 virtual const char* GetUndoNameId() override;
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index a19ef1686d1b..c8ce5507bc08 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -51,7 +51,7 @@ DECL_WRAPPER_WITHID(ScHighlightChgDlgWrapper)
 DECL_WRAPPER_WITHID(ScCondFormatDlgWrapper)
 
 class ScDescriptiveStatisticsDialogWrapper :
-public ChildWindowWrapper
+public ChildControllerWrapper
 {
 private:
 ScDescriptiveStatisticsDialogWrapper() = delete;
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 6f3a947e7dce..545a9dc4974f 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -330,12 +330,6 @@ VclPtr ScTabViewShell::CreateRefDialog(
 }
 break;
 
-case SID_DESCRIPTIVE_STATISTICS_DIALOG:
-{
-pResult = VclPtr::Create( pB, pCW, 
pParent, () );
-}
-break;
-
 case SID_ANALYSIS_OF_VARIANCE_DIALOG:
 {
 pResult = VclPtr::Create( pB, pCW, 
pParent, () );
@@ -537,6 +531,11 @@ std::unique_ptr 
ScTabViewShell::CreateRefDialogCont
 xResult.reset(new ScSamplingDialog(pB, pCW, pParent, 
()));
 }
 break;
+case SID_DESCRIPTIVE_STATISTICS_DIALOG:
+{
+xResult.reset(new ScDescriptiveStatisticsDialog(pB, pCW, pParent, 
()));
+}
+break;
 }
 
 if (xResult)
diff --git a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui 
b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
index a4c5bbea3413..4086f5a7cdb7 100644
--- a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
+++ b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
@@ -1,19 +1,82 @@
 
-
+
 
   
-  
   
 False
 6

[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

2019-04-11 Thread Caolán McNamara (via logerrit)
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx |  305 ++
 sc/source/ui/inc/SamplingDialog.hxx   |   65 ++--
 sc/source/ui/inc/reffact.hxx  |2 
 sc/source/ui/view/tabvwshc.cxx|   11 
 sc/uiconfig/scalc/ui/samplingdialog.ui|   14 -
 solenv/sanitizers/ui/modules/scalc.suppr  |2 
 6 files changed, 197 insertions(+), 202 deletions(-)

New commits:
commit ab181504329e33a31ad23c887d817519374c9797
Author: Caolán McNamara 
AuthorDate: Wed Apr 10 09:05:57 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 11 09:52:11 2019 +0200

weld ScSamplingDialog

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

diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx 
b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 277485f6b492..59fbb194df9f 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -19,43 +19,39 @@
 #include 
 #include 
 
-ScSamplingDialog::ScSamplingDialog(
-SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
-vcl::Window* pParent, ScViewData* pViewData ) :
-ScAnyRefDlg ( pSfxBindings, pChildWindow, pParent,
-  "SamplingDialog", "modules/scalc/ui/samplingdialog.ui" ),
-mpActiveEdit( nullptr  ),
-mViewData   ( pViewData ),
-mDocument   ( pViewData->GetDocument() ),
-mInputRange ( ScAddress::INITIALIZE_INVALID ),
-mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
-mOutputAddress  ( ScAddress::INITIALIZE_INVALID ),
-mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), 
pViewData->GetTabNo() ),
-mnLastSampleSizeValue(1),
-mnLastPeriodValue(1),
-mDialogLostFocus( false )
+ScSamplingDialog::ScSamplingDialog(SfxBindings* pSfxBindings, SfxChildWindow* 
pChildWindow,
+   weld::Window* pParent, ScViewData* 
pViewData)
+: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent,
+  "modules/scalc/ui/samplingdialog.ui", 
"SamplingDialog")
+, mpActiveEdit(nullptr)
+, mViewData(pViewData)
+, mDocument(pViewData->GetDocument())
+, mInputRange(ScAddress::INITIALIZE_INVALID)
+, mAddressDetails(mDocument->GetAddressConvention(), 0, 0)
+, mOutputAddress(ScAddress::INITIALIZE_INVALID)
+, mCurrentAddress(pViewData->GetCurX(), pViewData->GetCurY(), 
pViewData->GetTabNo())
+, mnLastSampleSizeValue(1)
+, mnLastPeriodValue(1)
+, mDialogLostFocus(false)
+, mxInputRangeLabel(m_xBuilder->weld_label("input-range-label"))
+, mxInputRangeEdit(new 
formula::WeldRefEdit(m_xBuilder->weld_entry("input-range-edit")))
+, mxInputRangeButton(new 
formula::WeldRefButton(m_xBuilder->weld_button("input-range-button")))
+, mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
+, mxOutputRangeEdit(new 
formula::WeldRefEdit(m_xBuilder->weld_entry("output-range-edit")))
+, mxOutputRangeButton(new 
formula::WeldRefButton(m_xBuilder->weld_button("output-range-button")))
+, mxSampleSize(m_xBuilder->weld_spin_button("sample-size-spin"))
+, mxPeriod(m_xBuilder->weld_spin_button("period-spin"))
+, mxRandomMethodRadio(m_xBuilder->weld_radio_button("random-method-radio"))
+, mxWithReplacement(m_xBuilder->weld_check_button("with-replacement"))
+, mxKeepOrder(m_xBuilder->weld_check_button("keep-order"))
+, 
mxPeriodicMethodRadio(m_xBuilder->weld_radio_button("periodic-method-radio"))
+, mxButtonOk(m_xBuilder->weld_button("ok"))
 {
-get(mpInputRangeLabel,  "input-range-label");
-get(mpInputRangeEdit,   "input-range-edit");
-get(mpInputRangeButton, "input-range-button");
-mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
-mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
+mxInputRangeEdit->SetReferences(this, mxInputRangeLabel.get());
+mxInputRangeButton->SetReferences(this, mxInputRangeEdit.get());
 
-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");
-get(mpPeriod, "period-spin");
-
-get(mpRandomMethodRadio,   "random-method-radio");
-get(mpWithReplacement, "with-replacement");
-get(mpKeepOrder,   "keep-order");
-get(mpPeriodicMethodRadio, "periodic-method-radio");
-
-get(mpButtonOk, "ok");
+mxOutputRangeEdit->SetReferences(this, mxOutputRangeLabel.get());
+mxOutputRangeButton->SetReferences(this, mxOutputRangeEdit.get());