[Libreoffice-commits] core.git: include/formula sc/source sc/uiconfig solenv/sanitizers
include/formula/funcutl.hxx |5 sc/source/ui/app/scmod.cxx | 36 +- sc/source/ui/inc/crnrdlg.hxx | 69 ++-- sc/source/ui/inc/reffact.hxx |2 sc/source/ui/miscdlgs/crnrdlg.cxx| 493 +++ sc/source/ui/view/reffact.cxx|4 sc/source/ui/view/tabview3.cxx | 16 - sc/source/ui/view/tabvwsh4.cxx | 15 sc/source/ui/view/tabvwshc.cxx | 11 sc/uiconfig/scalc/ui/namerangesdialog.ui | 64 +++- solenv/sanitizers/ui/modules/scalc.suppr |4 11 files changed, 395 insertions(+), 324 deletions(-) New commits: commit dd5fbb68ebaa8b8be8b6a4a97a8aedbf22d5714f Author: Caolán McNamara AuthorDate: Thu Apr 11 21:19:28 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Apr 12 14:53:02 2019 +0200 weld ScColRowNameRangesDlg Change-Id: I976fb892f8ac1dedb0c2c3110dce17c1211de238 Reviewed-on: https://gerrit.libreoffice.org/70652 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index d7734d8fd68d..22e46ecc81c1 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -147,6 +147,11 @@ public: xEntry->select_region(rSelection.Min(), rSelection.Max()); } +void SetCursorAtLast() +{ +xEntry->set_position(-1); +} + Selection GetSelection() const { int nStartPos, nEndPos; diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 7235c02076fb..09c7bbd63027 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1605,11 +1605,19 @@ bool ScModule::IsTableLocked() SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( m_nCurRefDlgId ); if ( pChildWnd ) { -IAnyRefDialog* pRefDlg(dynamic_cast(pChildWnd->GetWindow())); -assert(pRefDlg); -if(pRefDlg) +if (pChildWnd->GetWindow()) +{ +IAnyRefDialog* pRefDlg(dynamic_cast(pChildWnd->GetWindow())); +assert(pRefDlg); +if (pRefDlg) +bLocked = pRefDlg->IsTableLocked(); +} +if (pChildWnd->GetController()) { -bLocked = pRefDlg->IsTableLocked(); +IAnyRefDialog* pRefDlg = dynamic_cast(pChildWnd->GetController().get()); +assert(pRefDlg); +if (pRefDlg) +bLocked = pRefDlg->IsTableLocked(); } } else @@ -1764,11 +1772,23 @@ void ScModule::AddRefEntry() OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { -IAnyRefDialog* pRefDlg = dynamic_cast(pChildWnd->GetWindow()); -assert(pRefDlg); -if(pRefDlg) +if (pChildWnd->GetWindow()) { -pRefDlg->AddRefEntry(); +IAnyRefDialog* pRefDlg = dynamic_cast(pChildWnd->GetWindow()); +assert(pRefDlg); +if (pRefDlg) +{ +pRefDlg->AddRefEntry(); +} +} +if (pChildWnd->GetController()) +{ +IAnyRefDialog* pRefDlg = dynamic_cast(pChildWnd->GetController().get()); +assert(pRefDlg); +if (pRefDlg) +{ +pRefDlg->AddRefEntry(); +} } } } diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index 95222a9b5379..948724e08e84 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -29,35 +29,20 @@ class ScViewData; class ScDocument; -class ScColRowNameRangesDlg : public ScAnyRefDlg +class ScColRowNameRangesDlg : public ScAnyRefDlgController { public: -ScColRowNameRangesDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, - ScViewData*ptrViewData ); -virtual ~ScColRowNameRangesDlg() override; -virtual voiddispose() override; +ScColRowNameRangesDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, + ScViewData* ptrViewData); +virtual ~ScColRowNameRangesDlg() override; virtual voidSetReference( const ScRange& rRef, ScDocument* pDoc ) override; virtual boolIsRefInputMode() const override; virtual voidSetActive() override; -virtual boolClose() override; +virtual voidClose() override; private: -VclPtr pLbRange; - -VclPtrpEdAssign; -VclPtr pRbAssign; -VclPtr pBtnColHead; -VclPtr pBtnRowHead; -VclPtrpEdAssign2; -VclPtr pRbAssign2; - -VclPtrpBtnOk; -VclPtrpBtnCancel; -VclPtr pBtnAdd; -VclPtr pBtnRemove; -
[Libreoffice-commits] core.git: include/formula sc/source sc/uiconfig solenv/sanitizers
include/formula/funcutl.hxx | 10 sc/source/ui/inc/areasdlg.hxx| 64 +++--- sc/source/ui/inc/reffact.hxx |2 sc/source/ui/pagedlg/areasdlg.cxx| 319 ++- sc/source/ui/view/reffact.cxx|4 sc/source/ui/view/tabvwshc.cxx |9 sc/uiconfig/scalc/ui/printareasdialog.ui | 23 +- solenv/sanitizers/ui/modules/scalc.suppr |9 8 files changed, 219 insertions(+), 221 deletions(-) New commits: commit 0b022f7e1a0312ab4db762a198714675cdf65ca8 Author: Caolán McNamara AuthorDate: Thu Apr 11 14:52:50 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Apr 12 12:45:38 2019 +0200 weld ScPrintAreasDlg Change-Id: I1e1d31551b623453a1bade9c932ef1c9e1060f35 Reviewed-on: https://gerrit.libreoffice.org/70600 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index d2aec01bf90a..d7734d8fd68d 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -159,6 +159,16 @@ public: return pLabelWidget; } +void SaveValue() +{ +xEntry->save_value(); +} + +bool IsValueChangedFromSaved() const +{ +return xEntry->get_value_changed_from_saved(); +} + void SetGetFocusHdl(const Link& rLink) { maGetFocusHdl = rLink; } void SetLoseFocusHdl(const Link& rLink) { maLoseFocusHdl = rLink; } void SetModifyHdl(const Link& rLink) { maModifyHdl = rLink; } diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index 098eed033468..694e0447d78a 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -28,12 +28,11 @@ class ScDocument; class ScViewData; class SfxStringItem; -class ScPrintAreasDlg : public ScAnyRefDlg +class ScPrintAreasDlg : public ScAnyRefDlgController { public: -ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent ); -virtual ~ScPrintAreasDlg() override; -virtual voiddispose() override; +ScPrintAreasDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent); +virtual ~ScPrintAreasDlg() override; virtual voidSetReference( const ScRange& rRef, ScDocument* pDoc ) override; virtual voidAddRefEntry() override; @@ -41,41 +40,52 @@ public: virtual boolIsTableLocked() const override; virtual voidSetActive() override; -virtual voidDeactivate() override; -virtual boolClose() override; +virtual voidClose() override; private: -VclPtr pLbPrintArea; -VclPtrpEdPrintArea; -VclPtr pRbPrintArea; - -VclPtr pLbRepeatRow; -VclPtrpEdRepeatRow; -VclPtr pRbRepeatRow; - -VclPtr pLbRepeatCol; -VclPtrpEdRepeatCol; -VclPtr pRbRepeatCol; - -VclPtrpBtnOk; -VclPtrpBtnCancel; - boolbDlgLostFocus; -VclPtr pRefInputEdit; ScDocument* pDoc; ScViewData* pViewData; SCTAB nCurTab; +formula::WeldRefEdit* m_pRefInputEdit; + +std::unique_ptr m_xLbPrintArea; +std::unique_ptr m_xEdPrintArea; +std::unique_ptr m_xRbPrintArea; + +std::unique_ptr m_xLbRepeatRow; +std::unique_ptr m_xEdRepeatRow; +std::unique_ptr m_xRbRepeatRow; + +std::unique_ptr m_xLbRepeatCol; +std::unique_ptr m_xEdRepeatCol; +std::unique_ptr m_xRbRepeatCol; + +std::unique_ptr m_xBtnOk; +std::unique_ptr m_xBtnCancel; + +std::unique_ptr m_xPrintFrame; +std::unique_ptr m_xRowFrame; +std::unique_ptr m_xColFrame; + +std::unique_ptr m_xPrintFrameFT; +std::unique_ptr m_xRowFrameFT; +std::unique_ptr m_xColFrameFT; + void Impl_Reset(); bool Impl_CheckRefStrings(); void Impl_FillLists(); -bool Impl_GetItem( const Edit* pEd, SfxStringItem& rItem ); +bool Impl_GetItem( const formula::WeldRefEdit* pEd, SfxStringItem& rItem ); // Handler: -DECL_LINK( Impl_SelectHdl, ListBox&, void ); -DECL_LINK( Impl_ModifyHdl, Edit&, void ); -DECL_LINK( Impl_BtnHdl,Button*, void ); -DECL_LINK( Impl_GetFocusHdl, Control&, void ); +DECL_LINK( Impl_SelectHdl, weld::ComboBox&, void ); +DECL_LINK( Impl_ModifyHdl, formula::WeldRefEdit&, void ); +DECL_LINK( Impl_BtnHdl,weld::Button&, void ); +DECL_LINK( Impl_GetEditFocusHdl, formula::WeldRefEdit&, void ); +DECL_LINK( Impl_LoseEditFocusHdl, formula::WeldRefEdit&, void ); +DECL_LINK( Impl_LoseButtonFocusHdl, formula::WeldRefButton&, void ); +DECL_LINK( Impl_GetFocusHdl, weld::Widget&, void ); }; #endif diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index 79a873f31115..444abd3b1362 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -55,7 +55,7 @@
[Libreoffice-commits] core.git: include/formula sc/source sc/uiconfig solenv/sanitizers
include/formula/funcutl.hxx | 12 +++ sc/source/ui/inc/reffact.hxx |5 + sc/source/ui/inc/simpref.hxx | 25 +++--- sc/source/ui/miscdlgs/simpref.cxx| 91 +--- sc/source/ui/view/reffact.cxx| 35 + sc/source/ui/view/tabvwshc.cxx | 19 ++--- sc/uiconfig/scalc/ui/simplerefdialog.ui | 113 --- solenv/sanitizers/ui/modules/scalc.suppr |1 8 files changed, 151 insertions(+), 150 deletions(-) New commits: commit 8d19e03b17fdd6e6159843249fe0b4f41c526f17 Author: Caolán McNamara AuthorDate: Wed Apr 10 13:09:05 2019 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 11 11:23:30 2019 +0200 weld ScSimpleRefDlg Change-Id: I36fe5a0790b2f7a43b9e4d8def9ef3a224d4d546 Reviewed-on: https://gerrit.libreoffice.org/70549 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 5a6c095db77e..d2aec01bf90a 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -142,6 +142,18 @@ public: xEntry->select_region(0, -1); } +void SetSelection(const Selection& rSelection) +{ +xEntry->select_region(rSelection.Min(), rSelection.Max()); +} + +Selection GetSelection() const +{ +int nStartPos, nEndPos; +xEntry->get_selection_bounds(nStartPos, nEndPos); +return Selection(nStartPos, nEndPos); +} + weld::Label* GetLabelWidgetForShrinkMode() { return pLabelWidget; diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index b7ab53612a0b..e6bf12c0feec 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -180,7 +180,10 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow SfxBindings*, SfxChildWinInfo* ); -SFX_DECL_CHILDWINDOW_WITHID(Class); +static std::unique_ptr CreateImpl(vcl::Window *pParent, sal_uInt16 nId, + SfxBindings *pBindings, SfxChildWinInfo* pInfo); +static void RegisterChildWindow(bool bVisible=false, SfxModule *pMod=nullptr, SfxChildWindowFlags nFlags=SfxChildWindowFlags::NONE); +static sal_uInt16 GetChildWindowId(); static void SetDefaultPosSize(Point aPos, Size aSize); voidSetRefString(const OUString& rStr); diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx index 492dac5910b2..c3a9184c1099 100644 --- a/sc/source/ui/inc/simpref.hxx +++ b/sc/source/ui/inc/simpref.hxx @@ -25,7 +25,7 @@ class ScDocument; -class ScSimpleRefDlg: public ScAnyRefDlg +class ScSimpleRefDlg: public ScAnyRefDlgController { private: Link aCloseHdl; @@ -33,13 +33,6 @@ private: Link aAbortedHdl; Link aChangeHdl; -VclPtr m_pFtAssign; -VclPtr m_pEdAssign; -VclPtr m_pRbAssign; - -VclPtr m_pBtnOk; -VclPtr m_pBtnCancel; - ScRange theCurArea; boolbCloseFlag; boolbAutoReOpen; @@ -47,30 +40,34 @@ private: boolbSingleCell; boolbMultiSelection; +std::unique_ptr m_xFtAssign; +std::unique_ptr m_xEdAssign; +std::unique_ptr m_xRbAssign; +std::unique_ptr m_xBtnOk; +std::unique_ptr m_xBtnCancel; + voidInit(); -DECL_LINK( CancelBtnHdl, Button*, void ); -DECL_LINK( OkBtnHdl, Button*, void ); +DECL_LINK( CancelBtnHdl, weld::Button&, void ); +DECL_LINK( OkBtnHdl, weld::Button&, void ); protected: virtual voidRefInputDone( bool bForced = false ) override; public: -ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent); +ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent); virtual~ScSimpleRefDlg() 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; voidStartRefInput(); voidSetRefString(const OUString ); -virtual voidFillInfo(SfxChildWinInfo&) const override; voidSetCloseHdl( const Link& rLink ); voidSetUnoLinks( const Link& rDone, const Link& rAbort, diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx index def1babab0f9..362c4e1382ae 100644 --- a/sc/source/ui/miscdlgs/simpref.cxx +++ b/sc/source/ui/miscdlgs/simpref.cxx @@ -21,23 +21,20 @@ #include #include -ScSimpleRefDlg::ScSimpleRefDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window*