[Libreoffice-commits] core.git: include/sfx2 include/vcl sc/source sfx2/source
include/sfx2/childwin.hxx |2 ++ include/vcl/toolkit/dialog.hxx |2 ++ sc/source/ui/dbgui/validate.cxx |6 ++ sc/source/ui/inc/validate.hxx |2 ++ sfx2/source/appl/childwin.cxx | 21 +++-- 5 files changed, 27 insertions(+), 6 deletions(-) New commits: commit a5c61b143d53bb10430b8a486874856c16a2d86c Author: Balazs Varga AuthorDate: Mon Jul 3 19:56:43 2023 +0200 Commit: Balazs Varga CommitDate: Wed Jul 5 14:30:14 2023 +0200 tdf#155708 Fix validity dialog closes when moving focus to another window Do not close Validation window if click on another Calc sheet. Change-Id: I75569cbb91ebd445ac57f7a52d914297c21349e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153930 Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 57c2369233ef..6e4b20037be0 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -156,6 +156,8 @@ public: }; const int nCloseResponseToJustHide = -42; +// sc.hrc --> SID_VALIDITY_REFERENCE: 26161 +const sal_uInt16 nScValidityWindowSlotID = 26161; #define SFX_DECL_CHILDWINDOW(Class) \ public : \ diff --git a/include/vcl/toolkit/dialog.hxx b/include/vcl/toolkit/dialog.hxx index 5e11d2f783b5..640204acfe60 100644 --- a/include/vcl/toolkit/dialog.hxx +++ b/include/vcl/toolkit/dialog.hxx @@ -58,6 +58,8 @@ private: boolmbModalMode; InitFlagmnInitFlag; // used for deferred init +const int nCloseResponseToJustHide = -42; + VclPtr mpActionArea; VclPtr mpContentArea; diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 4445f68245c8..f8565e964354 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -104,6 +104,12 @@ ScValidationDlg::ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSe void ScValidationDlg::EndDialog(int nResponse) { +// tdf#155708 - do not close, just hide validation window if we click in another sheet +if (nResponse == nCloseResponseToJustHide && getDialog()->get_visible()) +{ +getDialog()->hide(); +return; +} // tdf#137215 ensure original modality of true is restored before dialog loop ends if (m_bOwnRefHdlr) RemoveRefDlg(true); diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index c8ed4447c400..c58ae53bbf7f 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -154,6 +154,8 @@ class ScValidationDlg boolm_bOwnRefHdlr:1; boolm_bRefInputting:1; +const int nCloseResponseToJustHide = -42; + std::unique_ptr m_xHBox; boolEnterRefStatus(); diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 1fe6c39a7a03..633c33bb35c9 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -522,12 +522,21 @@ void SfxChildWindow::Show( ShowFlags nFlags ) { if (!xController->getDialog()->get_visible()) { -weld::DialogController::runAsync(xController, -[this](sal_Int32 nResult) { -if (nResult == nCloseResponseToJustHide) -return; -xController->Close(); -}); +if (nScValidityWindowSlotID == GetType()) +{ +// tdf#155708 - do not run a new (Async) validation window, +// because we already have one in sync mode, just show the running one +xController->getDialog()->show(); +} +else +{ +weld::DialogController::runAsync(xController, +[this](sal_Int32 nResult) { +if (nResult == nCloseResponseToJustHide) +return; +xController->Close(); +}); +} } } else
[Libreoffice-commits] core.git: include/sfx2 include/vcl sc/source sfx2/source sfx2/uiconfig solenv/sanitizers sw/source vcl/source vcl/unx
include/sfx2/newstyle.hxx | 27 include/vcl/weld.hxx| 31 + sc/source/ui/view/formatsh.cxx |6 +- sfx2/source/dialog/newstyle.cxx | 67 +- sfx2/source/dialog/templdlg.cxx |6 +- sfx2/uiconfig/ui/newstyle.ui| 89 ++-- solenv/sanitizers/ui/sfx.suppr |1 sw/source/uibase/app/docst.cxx |6 +- vcl/source/app/salvtables.cxx | 56 + vcl/source/window/builder.cxx | 50 ++ vcl/unx/gtk3/gtk3gtkinst.cxx|5 ++ 11 files changed, 269 insertions(+), 75 deletions(-) New commits: commit 854d8c418904bbb9370ca6ee0aad6bde5deb426e Author: Caolán McNamara AuthorDate: Fri Apr 6 16:06:49 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Sep 9 15:01:06 2018 +0200 weld SfxNewStyleDlg set some parents and replace VclComboBoxText with an entry and a treeview Change-Id: Ied75176355f23c986eac4d5de8654472a15dbbbf Reviewed-on: https://gerrit.libreoffice.org/52517 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx index dcc2e7ec..6fecb3378f4d 100644 --- a/include/sfx2/newstyle.hxx +++ b/include/sfx2/newstyle.hxx @@ -22,34 +22,29 @@ #include #include #include -#include -#include -#include -#include -#include #include class SfxStyleSheetBasePool; -class SFX2_DLLPUBLIC SfxNewStyleDlg : public ModalDialog +class SFX2_DLLPUBLIC SfxNewStyleDlg : public weld::GenericDialogController { private: -VclPtr m_pColBox; -VclPtr m_pOKBtn; +SfxStyleSheetBasePool& m_rPool; -std::unique_ptr xQueryOverwriteBox; -SfxStyleSheetBasePool& rPool; +std::unique_ptr m_xColBox; +std::unique_ptr m_xOKBtn; -DECL_DLLPRIVATE_LINK( OKHdl, ComboBox&, void ); -DECL_DLLPRIVATE_LINK( OKClickHdl, Button *, void ); -DECL_DLLPRIVATE_LINK( ModifyHdl, Edit&, void ); +std::unique_ptr m_xQueryOverwriteBox; + +DECL_DLLPRIVATE_LINK(OKHdl, weld::TreeView&, void); +DECL_DLLPRIVATE_LINK(OKClickHdl, weld::Button&, void); +DECL_DLLPRIVATE_LINK(ModifyHdl, weld::Entry&, void); public: -SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& ); +SfxNewStyleDlg(weld::Window* pParent, SfxStyleSheetBasePool&); virtual ~SfxNewStyleDlg() override; -virtual void dispose() override; -OUStringGetName() const { return comphelper::string::stripStart(m_pColBox->GetText(), ' '); } +OUStringGetName() const { return comphelper::string::stripStart(m_xColBox->get_text(), ' '); } }; #endif diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 9c0fa76468b8..6f6776f38b57 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -901,6 +901,33 @@ public: virtual Point get_accessible_location() = 0; }; +// an entry + treeview pair, where the entry autocompletes from the +// treeview list, and selecting something in the list sets the +// entry to that text +class VCL_DLLPUBLIC EntryTreeView +{ +private: +DECL_DLLPRIVATE_LINK(ClickHdl, weld::TreeView&, void); +DECL_DLLPRIVATE_LINK(ModifyHdl, weld::Entry&, void); +void EntryModifyHdl(weld::Entry& rEntry); + +protected: +Link m_aChangeHdl; +std::unique_ptr m_xEntry; +std::unique_ptr m_xTreeView; + +public: +EntryTreeView(std::unique_ptr xEntry, std::unique_ptr xTreeView); +OUString get_text() const { return m_xEntry->get_text(); } +void append_text(const OUString& rText) { m_xTreeView->append_text(rText); } +void connect_row_activated(const Link& rLink) +{ +m_xTreeView->connect_row_activated(rLink); +} +void connect_changed(const Link& rLink) { m_aChangeHdl = rLink; } +void set_size_request_by_digits_rows(int nDigits, int nRows); +}; + class VCL_DLLPUBLIC Menu { public: @@ -992,6 +1019,10 @@ public: FactoryFunction pUITestFactoryFunction = nullptr, void* pUserData = nullptr, bool bTakeOwnership = false) = 0; +virtual std::unique_ptr weld_entry_tree_view(const OString& entryid, +const OString& treeviewid, +bool bTakeOwnership = false) += 0; virtual std::unique_ptr weld_menu(const OString& id, bool bTakeOwnership = true) = 0; virtual std::unique_ptr create_size_group() = 0; virtual ~Builder() {} diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 7622c978683c..9213b39042d8 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -434,10 +434,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) aStyleName = static_cast(pNameItem)->GetValue(); else if ( nSlotId ==
[Libreoffice-commits] core.git: include/sfx2 include/vcl sc/source sfx2/source vcl/source
include/sfx2/tabdlg.hxx|1 include/vcl/abstdlg.hxx| 18 ++ include/vcl/dialog.hxx | 17 ++ sc/source/ui/attrdlg/scdlgfact.hxx |5 + sc/source/ui/view/tabvwsha.cxx | 34 ++-- sfx2/source/control/request.cxx| 17 ++ sfx2/source/dialog/tabdlg.cxx | 37 - vcl/source/window/abstdlg.cxx |6 ++ vcl/source/window/dialog.cxx | 100 + vcl/source/window/window.cxx |5 + 10 files changed, 179 insertions(+), 61 deletions(-) New commits: commit c40dfabd56ade10fe35690dc9810955c2e99e2c0 Author: Jan HolesovskyDate: Fri Jan 12 11:57:22 2018 + lokdialog: Allow closing the Format Cell dialogs in any order. Includes also lots of infrastructural changes, making the conversion of the rest of the dialogs much easier. StartExecuteAsync should be used in-place of StartExecuteModal and the latter removed from the code-base incrementally. More common code from Dialog::Execute should be moved to ImplStartExecuteModal in a next step, as this is used more widely. Change-Id: Idb2c1ec790e38f582438471a0419a56cdcf1439d Reviewed-on: https://gerrit.libreoffice.org/47722 Tested-by: Jenkins Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 06f99318c3c0..409b15196307 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -190,6 +190,7 @@ public: short Execute() override; voidStartExecuteModal( const Link