core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/toolkit/treelistbox.hxx |1 + vcl/inc/jsdialog/jsdialogbuilder.hxx |5 + vcl/jsdialog/jsdialogbuilder.cxx | 20 vcl/source/treelist/svtabbx.cxx |1 + vcl/source/treelist/treelistbox.cxx | 12 5 files changed, 39 insertions(+) New commits: commit 88219419bd99349453471272e9c59424c014826d Author: Jaume Pujantell AuthorDate: Tue Jul 30 16:45:31 2024 +0200 Commit: Miklos Vajna CommitDate: Wed Aug 7 08:28:31 2024 +0200 cool#9704 calc jsdialog autofilter send disabled entry information Added the code necessary to disable already filtered entries on jsdialog autofilter, like it is done on desktop UI. Change-Id: I095b7fe0054efcaff2717d05a2ab7bd1d8248b29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171246 Reviewed-by: Miklos Vajna Tested-by: Jenkins CollaboraOffice (cherry picked from commit 2815d11bb608a933e14b799cc802825423426d28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171530 Tested-by: Jenkins diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index f116b82efcb2..7d3213bfa1bc 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -563,6 +563,7 @@ public: voidSetCheckButtonState( SvTreeListEntry*, SvButtonState ); SvButtonState GetCheckButtonState( SvTreeListEntry* ) const; +bool GetCheckButtonEnabled(SvTreeListEntry* pEntry) const; voidSetEntryText(SvTreeListEntry*, const OUString& ); voidSetExpandedEntryBmp( SvTreeListEntry* _pEntry, const Image& _rImage ); diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index ee4105e5d7b4..28435d6536f1 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -774,6 +774,11 @@ public: virtual void set_toggle(int pos, TriState eState, int col = -1) override; virtual void set_toggle(const weld::TreeIter& rIter, TriState bOn, int col = -1) override; +using SalInstanceTreeView::set_sensitive; +/// pos is used differently here, it defines how many steps of iterator we need to perform to take entry +virtual void set_sensitive(int pos, bool bSensitive, int col = -1) override; +virtual void set_sensitive(const weld::TreeIter& rIter, bool bSensitive, int col = -1) override; + using SalInstanceTreeView::select; /// pos is used differently here, it defines how many steps of iterator we need to perform to take entry virtual void select(int pos) override; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index aba9d5381855..8cc2d0f38c86 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -2056,6 +2056,26 @@ void JSTreeView::set_toggle(const weld::TreeIter& rIter, TriState bOn, int col) sendUpdate(); } +void JSTreeView::set_sensitive(int pos, bool bSensitive, int col) +{ +SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, 0); + +while (pEntry && pos--) +pEntry = m_xTreeView->Next(pEntry); + +if (pEntry) +{ +SalInstanceTreeView::set_sensitive(pEntry, bSensitive, col); +sendUpdate(); +} +} + +void JSTreeView::set_sensitive(const weld::TreeIter& rIter, bool bSensitive, int col) +{ +SalInstanceTreeView::set_sensitive(rIter, bSensitive, col); +sendUpdate(); +} + void JSTreeView::select(int pos) { assert(m_xTreeView->IsUpdateMode() && "don't select when frozen"); diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 9614c7493c90..7968635362ad 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -161,6 +161,7 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter, rJsonWriter.put("state", false); else if (eCheckState == SvButtonState::Checked) rJsonWriter.put("state", true); +rJsonWriter.put("enabled", pTabListBox->GetCheckButtonEnabled(pEntry)); } if (pTabListBox->IsSelected(pEntry)) diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index a16758e3eaba..2984d1aeb38c 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -1707,6 +1707,18 @@ SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) cons return eState; } +bool SvTreeListBox::GetCheckButtonEnabled(SvTreeListEntry* pEntry) const +{ +if (pEntry && (nTreeFlags & SvTreeFlags::CHKBTN)) +{ +SvLBoxButton* pItem += static_cast(pEntry->GetFirstItem(SvLBoxItemType::Button)); +if (pItem) +return pItem->isEnable(); +} +return false; +} + void SvTreeListBox::CheckButtonHdl() { if ( pCheckButtonData )
core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/toolkit/prgsbar.hxx |3 +++ include/vcl/wintypes.hxx |3 ++- vcl/inc/jsdialog/jsdialogbuilder.hxx | 10 ++ vcl/inc/salvtables.hxx | 19 +++ vcl/jsdialog/jsdialogbuilder.cxx | 25 + vcl/source/app/salvtables.cxx| 19 --- vcl/source/control/prgsbar.cxx |8 vcl/source/window/window.cxx |1 + 8 files changed, 68 insertions(+), 20 deletions(-) New commits: commit 460a7103664ac8dc60e260c56e5113d689b8072f Author: Hubert Figuière AuthorDate: Fri Mar 22 09:59:54 2024 -0400 Commit: Caolán McNamara CommitDate: Thu Mar 28 09:36:17 2024 +0100 vcl: Implement JSLevelBar This fixes the JSDialog layout of the sheet protection dialog. This was introduced for 24.02 to provide password strength indication of the sheet password. Defined a new WindowType of PROGRESSBAR. The type property in JSDialog JSON will be "progressbar". Change-Id: I202528a81706943e1838f3c37fb555f4a1bf889e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165236 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/vcl/toolkit/prgsbar.hxx b/include/vcl/toolkit/prgsbar.hxx index 1fcba74fdaba..bced6fc9e259 100644 --- a/include/vcl/toolkit/prgsbar.hxx +++ b/include/vcl/toolkit/prgsbar.hxx @@ -73,6 +73,9 @@ private: SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16 nNewPerc); +protected: +virtual voidDumpAsPropertyTree(tools::JsonWriter&) override; + public: ProgressBar( vcl::Window* pParent, WinBits nWinBits, BarStyle eBarStyle ); diff --git a/include/vcl/wintypes.hxx b/include/vcl/wintypes.hxx index 644b2405cc2a..c025e83b0afe 100644 --- a/include/vcl/wintypes.hxx +++ b/include/vcl/wintypes.hxx @@ -98,7 +98,8 @@ enum class WindowType : sal_uInt16 RULER, HEADERBAR, VERTICALTABCONTROL , -LAST = VERTICALTABCONTROL, +PROGRESSBAR , +LAST = PROGRESSBAR, // only used in vclxtoolkit.cxx TOOLKIT_FRAMEWINDOW= 0x1000, TOOLKIT_SYSTEMCHILDWINDOW = 0x1001, diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 34fdb7a068d5..2c544146dfad 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -312,6 +313,7 @@ public: virtual std::unique_ptr weld_box(const OUString& id) override; virtual std::unique_ptr weld_widget(const OUString& id) override; virtual std::unique_ptr weld_image(const OUString& id) override; +virtual std::unique_ptr weld_level_bar(const OUString& id) override; virtual std::unique_ptr weld_calendar(const OUString& id) override; static weld::MessageDialog* @@ -892,6 +894,14 @@ public: virtual void set_image(const css::uno::Reference& rImage) override; }; +class JSLevelBar : public JSWidget +{ +public: +JSLevelBar(JSDialogSender* pSender, ::ProgressBar* pProgressBar, SalInstanceBuilder* pBuilder, + bool bTakeOwnership); +virtual void set_percentage(double fPercentage) override; +}; + class JSCalendar : public JSWidget { public: diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index cc7b34092d01..54abb89ffa21 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -2181,6 +2182,24 @@ public: virtual ~SalInstanceScrolledWindow() override; }; +class SalInstanceLevelBar : public SalInstanceWidget, public virtual weld::LevelBar +{ +private: +VclPtr<::ProgressBar> m_xLevelBar; + +public: +SalInstanceLevelBar(::ProgressBar* pLevelBar, SalInstanceBuilder* pBuilder, bool bTakeOwnership) +: SalInstanceWidget(pLevelBar, pBuilder, bTakeOwnership) +, m_xLevelBar(pLevelBar) +{ +} + +virtual void set_percentage(double fPercentage) override +{ +m_xLevelBar->SetValue(static_cast(fPercentage)); +} +}; + class SalInstanceCalendar : public SalInstanceWidget, public virtual weld::Calendar { private: diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 1f56bda71bba..fa574088c7c6 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1264,6 +1264,19 @@ std::unique_ptr JSInstanceBuilder::weld_image(const OUString& id) return pWeldWidget; } +std::unique_ptr JSInstanceBuilder::weld_level_bar(const OUString& id) +{ +::ProgressBar* pLevelBar = m_xBuilder->get<::ProgressBar>(id); + +auto pWeldWidget += pLevelBar ? std::make_uniq
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/jsdialog/executor.hxx | 15 +++ include/vcl/layout.hxx| 10 +- include/vcl/weld.hxx |6 ++ vcl/inc/salvtables.hxx|6 ++ vcl/jsdialog/executor.cxx | 26 -- vcl/source/app/salvtables.cxx | 18 ++ 6 files changed, 66 insertions(+), 15 deletions(-) New commits: commit c19f041f27c9a297ec20107acc89e9b1144ec070 Author: Szymon Kłos AuthorDate: Fri Mar 31 17:12:51 2023 +0200 Commit: Szymon Kłos CommitDate: Thu Apr 6 10:53:21 2023 +0200 jsdialog: implemented mouse events for drawingarea Change-Id: Ieab3d9fdbcee90ccd125e84f74c06cd1d6711a9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149953 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150057 Tested-by: Jenkins diff --git a/include/vcl/jsdialog/executor.hxx b/include/vcl/jsdialog/executor.hxx index 6138f156e0de..005f9f36070d 100644 --- a/include/vcl/jsdialog/executor.hxx +++ b/include/vcl/jsdialog/executor.hxx @@ -66,6 +66,21 @@ public: rDrawingArea.dblclick(rPos); } +static void trigger_mouse_up(weld::DrawingArea& rDrawingArea, const Point& rPos) +{ +rDrawingArea.mouse_up(rPos); +} + +static void trigger_mouse_down(weld::DrawingArea& rDrawingArea, const Point& rPos) +{ +rDrawingArea.mouse_down(rPos); +} + +static void trigger_mouse_move(weld::DrawingArea& rDrawingArea, const Point& rPos) +{ +rDrawingArea.mouse_move(rPos); +} + static void trigger_selected(weld::MenuButton& rButton, const OUString& rIdent) { rButton.signal_selected(rIdent); diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 995b0d952ff0..507225f4d249 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -647,11 +647,6 @@ private: { m_aResizeHdl.Call(GetOutputSizePixel()); } -virtual void MouseMove(const MouseEvent& rMEvt) override -{ -if (!m_aMouseMotionHdl.Call(rMEvt)) -Control::MouseMove(rMEvt); -} virtual void KeyInput(const KeyEvent& rKEvt) override { if (!m_aKeyPressHdl.Call(rKEvt)) @@ -711,6 +706,11 @@ public: if (!m_aMouseReleaseHdl.Call(rMEvt)) Control::MouseButtonUp(rMEvt); } +virtual void MouseMove(const MouseEvent& rMEvt) override +{ +if (!m_aMouseMotionHdl.Call(rMEvt)) +Control::MouseMove(rMEvt); +} virtual OUString GetSurroundingText() const override; virtual Selection GetSurroundingTextSelection() const override; virtual bool DeleteSurroundingText(const Selection& rSelection) override; diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 5b763b4b253c..e9068f446d6d 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2360,6 +2360,12 @@ private: virtual void click(const Point&) = 0; virtual void dblclick(const Point&){}; + +virtual void mouse_up(const Point&){}; + +virtual void mouse_down(const Point&){}; + +virtual void mouse_move(const Point&){}; }; enum class Placement diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index bd462ad56ccd..cbb9fce51eee 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1341,6 +1341,12 @@ public: virtual void click(const Point& rPos) override; virtual void dblclick(const Point& rPos) override; + +virtual void mouse_up(const Point& rPos) override; + +virtual void mouse_down(const Point& rPos) override; + +virtual void mouse_move(const Point& rPos) override; }; class SalInstanceToolbar : public SalInstanceWidget, public virtual weld::Toolbar diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index cb8dfa4d455c..eb11af9b2884 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -192,7 +192,8 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap auto pArea = dynamic_cast(pWidget); if (pArea) { -if (sAction == "click" || sAction == "dblclick") +if (sAction == "click" || sAction == "dblclick" || sAction == "mousemove" +|| sAction == "mousedown" || sAction == "mouseup") { OUString sClickData = rData["data"]; int nSeparatorPos = sClickData.indexOf(';'); @@ -205,23 +206,28 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap if (nClickPosX.empty() || nClickPosY.empty()) return true; -double posX = o3tl::toDouble(nClickPosX); -double posY = o3tl::toDouble(nClickPosY); +double fPosX = o3tl::toDouble(nClickPosX); +double fPosY = o3tl::toDouble(nC
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/jsdialog/executor.hxx |5 + include/vcl/weld.hxx |4 +++- vcl/inc/salvtables.hxx|2 ++ vcl/jsdialog/executor.cxx |7 +-- vcl/source/app/salvtables.cxx |7 +++ 5 files changed, 22 insertions(+), 3 deletions(-) New commits: commit 464a3549ae228bcd70bae8ea519fc781c2cc9e45 Author: Szymon Kłos AuthorDate: Tue Mar 14 13:11:46 2023 +0100 Commit: Szymon Kłos CommitDate: Wed Mar 22 08:44:34 2023 + jsdialog: double click for drawing area Change-Id: I280158b101f39d107090a2eebb2c06e64591cb94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148852 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149231 Tested-by: Jenkins diff --git a/include/vcl/jsdialog/executor.hxx b/include/vcl/jsdialog/executor.hxx index 50f71272bb61..0c47066da9fa 100644 --- a/include/vcl/jsdialog/executor.hxx +++ b/include/vcl/jsdialog/executor.hxx @@ -61,6 +61,11 @@ public: rDrawingArea.click(rPos); } +static void trigger_dblclick(weld::DrawingArea& rDrawingArea, const Point& rPos) +{ +rDrawingArea.dblclick(rPos); +} + static void trigger_value_changed(weld::SpinButton& rSpinButton) { rSpinButton.signal_value_changed(); diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index d22fa5eb616e..21d6fec1acc2 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2356,7 +2356,9 @@ public: private: friend class ::LOKTrigger; -virtual void click(const Point& rPos) = 0; +virtual void click(const Point&) = 0; + +virtual void dblclick(const Point&){}; }; enum class Placement diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 3c421fc89c90..c5665b28dd0c 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1339,6 +1339,8 @@ public: virtual OutputDevice& get_ref_device() override; virtual void click(const Point& rPos) override; + +virtual void dblclick(const Point& rPos) override; }; class SalInstanceToolbar : public SalInstanceWidget, public virtual weld::Toolbar diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index f52bef4b9aa7..4668193cb579 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -187,7 +187,7 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM auto pArea = dynamic_cast(pWidget); if (pArea) { -if (sAction == "click") +if (sAction == "click" || sAction == "dblclick") { OUString sClickData = rData["data"]; int nSeparatorPos = sClickData.indexOf(';'); @@ -209,7 +209,10 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM Size size = rRefDevice.GetOutputSize(); posX = posX * size.Width(); posY = posY * size.Height(); -LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +if (sAction == "click") +LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +else +LOKTrigger::trigger_dblclick(*pArea, Point(posX, posY)); return true; } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 4a31b3d2cd3d..e4e76768ec55 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6350,6 +6350,13 @@ void SalInstanceDrawingArea::click(const Point& rPos) m_xDrawingArea->MouseButtonUp(aEvent); } +void SalInstanceDrawingArea::dblclick(const Point& rPos) +{ +MouseEvent aEvent(rPos, 2, MouseEventModifiers::NONE, MOUSE_LEFT, 0); +m_xDrawingArea->MouseButtonDown(aEvent); +m_xDrawingArea->MouseButtonUp(aEvent); +} + IMPL_LINK(SalInstanceDrawingArea, PaintHdl, target_and_area, aPayload, void) { m_aDrawHdl.Call(aPayload);
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/toolkit/fixed.hxx|1 vcl/inc/jsdialog/jsdialogbuilder.hxx |8 --- vcl/jsdialog/enabled.cxx |3 +- vcl/jsdialog/jsdialogbuilder.cxx | 39 +-- vcl/source/control/fixed.cxx |7 ++ 5 files changed, 48 insertions(+), 10 deletions(-) New commits: commit b350a9a3f36282be41a2fb8ea9016f4ccfd4128d Author: Szymon Kłos AuthorDate: Tue Mar 1 16:19:07 2022 +0100 Commit: Szymon Kłos CommitDate: Fri Mar 4 12:30:38 2022 +0100 jsdialog: enable Accessibility Check dialog - fix crash due to wrong type for label - deduplicate widgets with the same id in one dialog/builder - refresh on box reordering Change-Id: I6993552342a3f139de40c3f87243bdf4e0617fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130797 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130951 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/include/vcl/toolkit/fixed.hxx b/include/vcl/toolkit/fixed.hxx index afa0004f7ec8..238d1cbdfafb 100644 --- a/include/vcl/toolkit/fixed.hxx +++ b/include/vcl/toolkit/fixed.hxx @@ -83,6 +83,7 @@ public: virtual voidLoseFocus() override; virtual voidApplySettings(vcl::RenderContext&) override; +virtual voidDumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override; }; class VCL_DLLPUBLIC FixedLine final : public Control diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index ca45a53c1e76..7aac0d4e25dd 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -224,7 +224,7 @@ class JSInstanceBuilder final : public SalInstanceBuilder, public JSDialogSender static std::map& GetLOKWeldWidgetsMap(); static void InsertWindowToMap(const std::string& nWindowId); -void RememberWidget(const OString& id, weld::Widget* pWidget); +void RememberWidget(OString id, weld::Widget* pWidget); static void RememberWidget(const std::string& nWindowId, const OString& id, weld::Widget* pWidget); static weld::Widget* FindWeldWidgetsMap(const std::string& nWindowId, const OString& rWidget); @@ -459,10 +459,10 @@ public: bool bTakeOwnership); }; -class JSLabel final : public JSWidget +class JSLabel final : public JSWidget { public: -JSLabel(JSDialogSender* pSender, FixedText* pLabel, SalInstanceBuilder* pBuilder, +JSLabel(JSDialogSender* pSender, Control* pLabel, SalInstanceBuilder* pBuilder, bool bTakeOwnership); virtual void set_label(const OUString& rText) override; }; @@ -705,6 +705,8 @@ class JSBox : public JSWidget { public: JSBox(JSDialogSender* pSender, VclBox* pBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership); + +void reorder_child(weld::Widget* pWidget, int nNewPosition) override; }; class JSWidgetInstance : public JSWidget diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 14fc9610c356..31b18a3ae347 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -54,7 +54,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/scalc/ui/textimportcsv.ui" || rUIFile == u"xmlsec/ui/digitalsignaturesdialog.ui" || rUIFile == u"xmlsec/ui/viewcertdialog.ui" || rUIFile == u"xmlsec/ui/certgeneral.ui" -|| rUIFile == u"xmlsec/ui/certpage.ui") +|| rUIFile == u"xmlsec/ui/certpage.ui" || rUIFile == u"svx/ui/accessibilitycheckdialog.ui" +|| rUIFile == u"svx/ui/accessibilitycheckentry.ui") { return true; } diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index b6eac0bf126a..0a49f20a9b82 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -701,10 +701,31 @@ void JSInstanceBuilder::InsertWindowToMap(const std::string& nWindowId) GetLOKWeldWidgetsMap().insert(std::map::value_type(nWindowId, map)); } -void JSInstanceBuilder::RememberWidget(const OString& id, weld::Widget* pWidget) +void JSInstanceBuilder::RememberWidget(OString sId, weld::Widget* pWidget) { -RememberWidget(getMapIdFromWindowId(), id, pWidget); -m_aRememberedWidgets.push_back(id.getStr()); +// do not use the same id for two widgets inside one builder +// exception is sidebar where we base our full invalidation on that "Panel" id sharing +if (m_sTypeOfJSON != "sidebar") +{ +static std::atomic nNotRepeatIndex = 0; +auto aWindowIt = GetLOKWeldWidgetsMap().find(getMapIdFromWindowId()); +if (aWindowIt != GetLOKWeldWidgetsMap().end()) +{ +auto aWidgetIt = aWindowIt->second.find(sId); +if (aWidgetIt != aWindowIt->second.end()) +{ +unsigned long long int nIndex = nNotRepeatIndex++; +
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/toolkit/menubtn.hxx |3 vcl/inc/jsdialog/jsdialogbuilder.hxx | 35 - vcl/inc/salvtables.hxx |4 - vcl/jsdialog/enabled.cxx |2 vcl/jsdialog/jsdialogbuilder.cxx | 132 --- vcl/source/control/menubtn.cxx | 17 vcl/source/window/toolbox2.cxx |8 +- 7 files changed, 166 insertions(+), 35 deletions(-) New commits: commit cf9baa91a3c15fb798639c96f2fee6a5bd4975ff Author: Szymon Kłos AuthorDate: Thu Jun 24 14:31:45 2021 +0200 Commit: Szymon Kłos CommitDate: Thu Jul 29 11:04:29 2021 +0200 jsdialog: toolbox popups unify menubutton popups and toolbox dropdowns Change-Id: I61c0c33a17d96f03d6513507bda6d5c8edbc55dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117786 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119608 Tested-by: Szymon Kłos diff --git a/include/vcl/toolkit/menubtn.hxx b/include/vcl/toolkit/menubtn.hxx index 95d8a65d4769..ca77a48c9fec 100644 --- a/include/vcl/toolkit/menubtn.hxx +++ b/include/vcl/toolkit/menubtn.hxx @@ -82,6 +82,7 @@ public: PopupMenu* GetPopupMenu() const { return mpMenu; } voidSetPopover(Window* pWindow); +Window* GetPopover() { return mpFloatingWindow.get(); } OString const & GetCurItemIdent() const { return msCurItemIdent; } @@ -91,8 +92,6 @@ public: virtual FactoryFunction GetUITestFactory() const override; void SetCurItemId(); - -void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 7c6ce7be45e1..92acff3fc594 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -9,9 +9,10 @@ #pragma once +#include +#include #include #include -#include #include #include #include @@ -29,6 +30,9 @@ #include #define ACTION_TYPE "action_type" +#define PARENT_ID "parent_id" +#define WINDOW_ID "id" +#define CLOSE_ID "close_id" class ToolBox; class ComboBox; @@ -46,7 +50,8 @@ enum MessageType FullUpdate, WidgetUpdate, Close, -Action +Action, +Popup }; } @@ -102,6 +107,7 @@ class JSDialogNotifyIdle final : public Idle bool m_bForce; std::deque m_aMessageQueue; +osl::Mutex m_aQueueMutex; public: JSDialogNotifyIdle(VclPtr aNotifierWindow, VclPtr aContentWindow, @@ -121,6 +127,9 @@ private: std::unique_ptr generateCloseMessage() const; std::unique_ptr generateActionMessage(VclPtr pWindow, std::unique_ptr pData) const; +std::unique_ptr +generatePopupMessage(VclPtr pWindow, OUString sParentId, OUString sCloseId) const; +std::unique_ptr generateClosePopupMessage(OUString sWindowId) const; }; class JSDialogSender @@ -141,6 +150,8 @@ public: void sendClose(); void sendUpdate(VclPtr pWindow, bool bForce = false); virtual void sendAction(VclPtr pWindow, std::unique_ptr pData); +virtual void sendPopup(VclPtr pWindow, OUString sParentId, OUString sCloseId); +virtual void sendClosePopup(vcl::LOKWindowId nWindowId); void flush() { mpIdleNotify->Invoke(); } protected: @@ -288,6 +299,10 @@ public: virtual void sendFullUpdate(bool bForce = false) = 0; virtual void sendAction(std::unique_ptr pData) = 0; + +virtual void sendPopup(vcl::Window* pPopup, OUString sParentId, OUString sCloseId) = 0; + +virtual void sendClosePopup(vcl::LOKWindowId nWindowId) = 0; }; template @@ -395,6 +410,18 @@ public: if (!m_bIsFreezed && m_pSender && pData) m_pSender->sendAction(BaseInstanceClass::m_xWidget, std::move(pData)); } + +virtual void sendPopup(vcl::Window* pPopup, OUString sParentId, OUString sCloseId) override +{ +if (!m_bIsFreezed && m_pSender) +m_pSender->sendPopup(pPopup, sParentId, sCloseId); +} + +virtual void sendClosePopup(vcl::LOKWindowId nWindowId) override +{ +if (!m_bIsFreezed && m_pSender) +m_pSender->sendClosePopup(nWindowId); +} }; class JSDialog final : public JSWidget @@ -531,9 +558,13 @@ public: class JSToolbar final : public JSWidget { +std::map m_pPopovers; + public: JSToolbar(JSDialogSender* pSender, ::ToolBox* pToolbox, SalInstanceBuilder* pBuilder, bool bTakeOwnership); + +virtual void set_menu_item_active(const OString& rIdent, bool bActive) override; }; class JSTextView final : public JSWidget diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 3d5dc97a3a31..1cca6afd071b 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1189,7 +1189,7 @@ public: class SalInstanceToolbar : public SalInstanceWidget, public virtual weld::Toolbar { -private: +p
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/toolkit/menubtn.hxx |1 vcl/inc/jsdialog/enabled.hxx |1 vcl/inc/jsdialog/jsdialogbuilder.hxx | 18 +- vcl/jsdialog/enabled.cxx |9 + vcl/jsdialog/executor.cxx| 20 +++ vcl/jsdialog/jsdialogbuilder.cxx | 59 ++- vcl/source/control/menubtn.cxx | 18 ++ vcl/source/window/builder.cxx|4 +- 8 files changed, 126 insertions(+), 4 deletions(-) New commits: commit 79eab8450b3a9db343a082e6d450764643340a3e Author: Szymon Kłos AuthorDate: Tue Jun 15 13:10:00 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Jul 28 14:32:30 2021 +0200 jsdialog: dump and activate popup windows Change-Id: I4eb49a81d12ac37f50c6595eeec6d472fdbe6d82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117251 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119581 Tested-by: Szymon Kłos diff --git a/include/vcl/toolkit/menubtn.hxx b/include/vcl/toolkit/menubtn.hxx index db4f9f44f5d6..95d8a65d4769 100644 --- a/include/vcl/toolkit/menubtn.hxx +++ b/include/vcl/toolkit/menubtn.hxx @@ -92,6 +92,7 @@ public: void SetCurItemId(); +void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/jsdialog/enabled.hxx b/vcl/inc/jsdialog/enabled.hxx index 50586cf3bb13..0f37301d0c0d 100644 --- a/vcl/inc/jsdialog/enabled.hxx +++ b/vcl/inc/jsdialog/enabled.hxx @@ -14,6 +14,7 @@ namespace jsdialog { bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile); +bool isBuilderEnabledForPopup(std::u16string_view rUIFile); bool isBuilderEnabledForSidebar(std::u16string_view rUIFile); bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile); } diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 78534ea8c29a..7c6ce7be45e1 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -195,6 +195,8 @@ class JSInstanceBuilder final : public SalInstanceBuilder, public JSDialogSender std::string m_sTypeOfJSON; bool m_bHasTopLevelDialog; bool m_bIsNotebookbar; +/// When LOKNotifier is set by jsdialogs code we need to release it +VclPtr m_aWindowToRelease; friend VCL_DLLPUBLIC bool jsdialog::ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rData); @@ -206,8 +208,9 @@ class JSInstanceBuilder final : public SalInstanceBuilder, public JSDialogSender void RememberWidget(const OString& id, weld::Widget* pWidget); static weld::Widget* FindWeldWidgetsMap(sal_uInt64 nWindowId, const OString& rWidget); -/// used for dialogs -JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile); +/// used for dialogs or popups +JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile, + bool bPopup = false); /// used for sidebar panels JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile, sal_uInt64 nLOKWindowId); @@ -231,6 +234,8 @@ public: static JSInstanceBuilder* CreateSidebarBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile, sal_uInt64 nLOKWindowId = 0); +static JSInstanceBuilder* CreatePopupBuilder(weld::Widget* pParent, const OUString& rUIRoot, + const OUString& rUIFile); virtual ~JSInstanceBuilder() override; virtual std::unique_ptr weld_message_dialog(const OString& id) override; @@ -255,6 +260,7 @@ public: virtual std::unique_ptr weld_radio_button(const OString& id) override; virtual std::unique_ptr weld_frame(const OString& id) override; virtual std::unique_ptr weld_menu_button(const OString& id) override; +virtual std::unique_ptr weld_popover(const OString& id) override; static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType, @@ -627,6 +633,14 @@ public: virtual void set_label(const OUString& rText) override; virtual void set_image(VirtualDevice* pDevice) override; virtual void set_image(const css::uno::Reference& rImage) override; +virtual void set_active(bool active) override; +}; + +class JSPopover : public JSWidget +{ +public: +JSPopover(JSDialogSender* pSender, DockingWindow* pPopover, SalInstanceBuilder* pBuilder, + bool bTakeOwnership); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/jsdialog
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/window.hxx |3 -- vcl/inc/jsdialog/jsdialogbuilder.hxx | 11 --- vcl/inc/window.h |2 - vcl/jsdialog/jsdialogbuilder.cxx | 52 +++ vcl/source/window/window.cxx | 14 - 5 files changed, 6 insertions(+), 76 deletions(-) New commits: commit 8cbf3938ee3951ef53842bb5664bea6b57828111 Author: Szymon Kłos AuthorDate: Wed Dec 30 10:05:26 2020 +0100 Commit: Szymon Kłos CommitDate: Wed Jan 13 08:47:15 2021 +0100 Revert "jsdialog: disable idle notify" This reverts commit 71ec214d7583f637fefcb5eca13c637cc6b38029. and partially 54b5e6b4e083ce7a71e16ef622753898f38dc8ab freeze/thaw functionality was added so no longer needed. Change-Id: Iee29fa79bcebfd409fd3cea4f11cb1d48053daa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108509 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index bf4a8790ae25..1a164c0654ed 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1178,9 +1178,6 @@ public: /// Find an existing Window based on the LOKWindowId. static VclPtr FindLOKWindow(vcl::LOKWindowId nWindowId); -boolIsDisableIdleNotify(); -voidSetDisableIdleNotify(bool bValue); - /// check if LOK Window container is empty static bool IsLOKWindowsEmpty(); diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index c31c3e5fa560..2df2aaeb3ad1 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -73,7 +73,6 @@ public: virtual void notifyDialogState(bool bForce = false); void sendClose(); -void dumpStatus(); virtual void sendUpdate(VclPtr pWindow); }; @@ -250,11 +249,6 @@ public: class JSDialog : public JSWidget { -DECL_LINK(on_dump_status, void*, void); -DECL_LINK(on_window_event, VclWindowEvent&, void); - -bool m_bNotifyCreated; - public: JSDialog(VclPtr aNotifierWindow, VclPtr aContentWindow, ::Dialog* pDialog, SalInstanceBuilder* pBuilder, bool bTakeOwnership, @@ -343,11 +337,6 @@ public: class JSMessageDialog : public SalInstanceMessageDialog, public JSDialogSender { -DECL_LINK(on_dump_status, void*, void); -DECL_LINK(on_window_event, VclWindowEvent&, void); - -bool m_bNotifyCreated; - public: JSMessageDialog(::MessageDialog* pDialog, VclPtr aContentWindow, SalInstanceBuilder* pBuilder, bool bTakeOwnership); diff --git a/vcl/inc/window.h b/vcl/inc/window.h index a6d46c41eeda..a14852ca02c0 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -117,8 +117,6 @@ struct ImplWinData sal_uInt16 mnIsTopWindow; boolmbMouseOver;//< tracks mouse over for native widget paint effect boolmbEnableNativeWidget; //< toggle native widget rendering -boolmbDisableIdleNotify; - ::std::list< VclPtr > maTopWindowChildren; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index f33d0be85fd5..df2d68e71c16 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -159,8 +159,7 @@ void JSDialogNotifyIdle::sendClose() { send(*generateCloseMessage()); } void JSDialogSender::notifyDialogState(bool bForce) { -auto aNotifierWnd = mpIdleNotify->getNotifierWindow(); -if (aNotifierWnd && aNotifierWnd->IsDisableIdleNotify()) +if (!mpIdleNotify->getNotifierWindow()) return; if (bForce) @@ -170,8 +169,6 @@ void JSDialogSender::notifyDialogState(bool bForce) void JSDialogSender::sendClose() { mpIdleNotify->sendClose(); } -void JSDialogSender::dumpStatus() { mpIdleNotify->Invoke(); } - void JSDialogSender::sendUpdate(VclPtr pWindow) { mpIdleNotify->updateStatus(pWindow); @@ -461,16 +458,13 @@ std::unique_ptr JSInstanceBuilder::weld_dialog(const OString& id) m_xBuilder->drop_ownership(pDialog); m_bHasTopLevelDialog = true; -if (id == "MacroSelectorDialog") -pDialog->SetDisableIdleNotify(true); - pRet.reset( new JSDialog(m_aOwnedToplevel, m_aOwnedToplevel, pDialog, this, false, m_sTypeOfJSON)); RememberWidget("__DIALOG__", pRet.get()); const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier(); -if (pNotifier && id != "MacroSelectorDialog") +if (pNotifier) { tools::JsonWriter aJsonWriter; m_aOwnedToplevel->DumpAsPropertyTree(aJsonWriter); @@ -497,14 +491,14 @@ std::unique_ptr JSInstanceBuilder::weld_message_dialog(cons assert(!m_aOwnedToplevel && "only one toplevel per .ui allowed"); m_aOwnedToplevel.set(pMessageDialog);
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source
include/vcl/window.hxx |3 +++ vcl/inc/jsdialog/jsdialogbuilder.hxx |1 + vcl/inc/window.h |2 ++ vcl/jsdialog/jsdialogbuilder.cxx |6 ++ vcl/source/window/window.cxx | 14 +- 5 files changed, 25 insertions(+), 1 deletion(-) New commits: commit 71ec214d7583f637fefcb5eca13c637cc6b38029 Author: Henry Castro AuthorDate: Thu Dec 17 10:45:13 2020 -0400 Commit: Henry Castro CommitDate: Tue Dec 22 13:03:59 2020 +0100 jsdialog: disable idle notify After testing on client side, when showing the Macro Selector Dialog its receive 5 times the same data. So add an option to not use the idle notifier instead it will use the event 'WindowShow'. Change-Id: Ib5657f3c823fc6e998581b99052aaf578d0913e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107893 Tested-by: Jenkins Reviewed-by: Henry Castro diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index d4e96f93a45e..99a1043bb3d3 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1176,6 +1176,9 @@ public: /// Find an existing Window based on the LOKWindowId. static VclPtr FindLOKWindow(vcl::LOKWindowId nWindowId); +boolIsDisableIdleNotify(); +voidSetDisableIdleNotify(bool bValue); + /// check if LOK Window container is empty static bool IsLOKWindowsEmpty(); diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index d3c6e7b26d48..14090f43a0e4 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -49,6 +49,7 @@ public: void Invoke() override; void ForceUpdate(); void sendClose(); +VclPtr getNotifierWindow() { return m_aNotifierWindow; } private: void send(std::unique_ptr aJsonWriter); diff --git a/vcl/inc/window.h b/vcl/inc/window.h index a14852ca02c0..a6d46c41eeda 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -117,6 +117,8 @@ struct ImplWinData sal_uInt16 mnIsTopWindow; boolmbMouseOver;//< tracks mouse over for native widget paint effect boolmbEnableNativeWidget; //< toggle native widget rendering +boolmbDisableIdleNotify; + ::std::list< VclPtr > maTopWindowChildren; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 795acc644274..11a84bc8bc64 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -107,6 +107,9 @@ void JSDialogNotifyIdle::sendClose() { send(generateCloseMessage()); } void JSDialogSender::notifyDialogState(bool bForce) { +if (mpIdleNotify->getNotifierWindow()->IsDisableIdleNotify()) +return; + if (bForce) mpIdleNotify->ForceUpdate(); mpIdleNotify->Start(); @@ -404,6 +407,9 @@ std::unique_ptr JSInstanceBuilder::weld_dialog(const OString& id) RememberWidget("__DIALOG__", pRet.get()); +if (id == "MacroSelectorDialog") +pDialog->SetDisableIdleNotify(true); + const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier(); if (pNotifier && id != "MacroSelectorDialog") { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 7bbc9924709d..719a5268c2f2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -755,7 +755,8 @@ ImplWinData::ImplWinData() : mnTrackFlags(ShowTrackFlags::NONE), mnIsTopWindow(sal_uInt16(~0)), // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) mbMouseOver(false), -mbEnableNativeWidget(false) +mbEnableNativeWidget(false), +mbDisableIdleNotify(false) { } @@ -3201,6 +3202,17 @@ VclPtr Window::FindLOKWindow(vcl::LOKWindowId nWindowId) return VclPtr(); } +bool Window::IsDisableIdleNotify() +{ +return ImplGetWinData()->mbDisableIdleNotify; +} + +void Window::SetDisableIdleNotify(bool bValue) +{ +if (ImplGetWinData()->mbDisableIdleNotify != bValue) +ImplGetWinData()->mbDisableIdleNotify = bValue; +} + bool Window::IsLOKWindowsEmpty() { return GetLOKWindowsMap().empty(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/jsdialog vcl/source vcl/unx
include/vcl/weld.hxx | 107 +++-- vcl/inc/jsdialog/jsdialogbuilder.hxx | 37 ++- vcl/inc/salvtables.hxx | 104 +++- vcl/jsdialog/jsdialogbuilder.cxx | 68 + vcl/source/app/salvtables.cxx| 175 ++- vcl/unx/gtk3/gtk3gtkinst.cxx | 147 ++--- 6 files changed, 261 insertions(+), 377 deletions(-) New commits: commit 66ce7a7bcae0e0e38fc56f6780eec86e06acfd90 Author: Caolán McNamara AuthorDate: Tue Oct 6 09:45:54 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 6 14:43:09 2020 +0200 drop ownership argument we have never needed to diverge from the defaults of true for toplevels and false for non-toplevels Change-Id: I884b1e221d0ec44895214363d391c27e3e1707f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104019 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 6f227c7cbb6a..db1b6d519d1f 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2238,80 +2238,49 @@ public: class VCL_DLLPUBLIC Builder { public: -virtual std::unique_ptr weld_message_dialog(const OString& id, - bool bTakeOwnership = true) -= 0; -virtual std::unique_ptr weld_dialog(const OString& id, bool bTakeOwnership = true) = 0; -virtual std::unique_ptr weld_assistant(const OString& id, bool bTakeOwnership = true) -= 0; -virtual std::unique_ptr weld_widget(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_container(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_box(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_paned(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_button(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_menu_button(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_frame(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_scrolled_window(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_notebook(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_toggle_button(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_radio_button(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_check_button(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_link_button(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_spin_button(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr -weld_metric_spin_button(const OString& id, FieldUnit eUnit, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr -weld_formatted_spin_button(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_combo_box(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_tree_view(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_icon_view(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_label(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_text_view(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_expander(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_entry(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_scale(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_progress_bar(const OString& id, - bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_spinner(const OString& id, bool bTakeOwnership = false) -= 0; -virtual std::unique_ptr weld_image(const OString& id, bool bTakeOwnership = false) = 0; -virtual std::unique_ptr weld_calendar(const OStr