diff options
author | Hubert Figuière <hub@collabora.com> | 2024-03-22 09:59:54 -0400 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-03-28 09:36:17 +0100 |
commit | 460a7103664ac8dc60e260c56e5113d689b8072f (patch) | |
tree | bd6af06335ef49422aa3ddf7cb6c81f21596cfe6 /vcl/inc/salvtables.hxx | |
parent | e347cff87bec2e8d802fb2dfb8abd3d7d94f8103 (diff) |
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 <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/inc/salvtables.hxx')
-rw-r--r-- | vcl/inc/salvtables.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
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 <vcl/toolkit/fixedhyper.hxx> #include <vcl/toolkit/lstbox.hxx> #include <vcl/toolkit/menubtn.hxx> +#include <vcl/toolkit/prgsbar.hxx> #include <vcl/toolkit/combobox.hxx> #include <vcl/tabctrl.hxx> #include <vcl/layout.hxx> @@ -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<sal_uInt16>(fPercentage)); + } +}; + class SalInstanceCalendar : public SalInstanceWidget, public virtual weld::Calendar { private: |