solenv/clang-format/excludelist | 2 +- svx/Library_svx.mk | 1 - sw/Library_sw.mk | 1 + sw/source/uibase/sidebar/PageSizeControl.cxx | 4 ++-- sw/source/uibase/sidebar/PageSizeControl.hxx | 8 +++----- sw/source/uibase/sidebar/ValueSetWithTextControl.cxx | 8 ++++---- sw/source/uibase/sidebar/ValueSetWithTextControl.hxx | 10 +++++----- 7 files changed, 16 insertions(+), 18 deletions(-)
New commits: commit ab2846a3d628e239464bc026391e96088ff2db0c Author: Michael Weghorn <[email protected]> AuthorDate: Mon Nov 24 11:47:16 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Nov 25 10:09:39 2025 +0100 Move ValueSetWithTextControl from svx to sw This control is exclusively used in sw::sidebar::PageSizeControl, so there's no need to have it as an svx class defined in a global svx header. (And I think that using existing weld::Widgets instead of having that custom logic would be preferred, too, so this control also shouldn't be more widely used in the future. See also discussion in tdf#169637.) Change-Id: I8b040072a975c227fad2280d9475a3bddfc3b4dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194487 Reviewed-by: Michael Weghorn <[email protected]> Code-Style: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 68a061705516..c4c327578abb 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -11472,7 +11472,6 @@ svx/source/sidebar/text/TextCharacterSpacingControl.hxx svx/source/sidebar/text/TextPropertyPanel.cxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/text/TextUnderlineControl.cxx -svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/smarttags/SmartTagMgr.cxx svx/source/stbctrls/insctrl.cxx svx/source/stbctrls/modctrl.cxx @@ -13136,6 +13135,7 @@ sw/source/uibase/sidebar/StylePresetsPanel.hxx sw/source/uibase/sidebar/SwPanelFactory.cxx sw/source/uibase/sidebar/ThemePanel.cxx sw/source/uibase/sidebar/ThemePanel.hxx +sw/source/uibase/sidebar/ValueSetWithTextControl.cxx sw/source/uibase/sidebar/WrapPropertyPanel.cxx sw/source/uibase/sidebar/WrapPropertyPanel.hxx sw/source/uibase/table/chartins.cxx diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index c60463c3ad93..e0fe649db132 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -249,7 +249,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/sidebar/shapes/DefaultShapesPanel \ svx/source/sidebar/shapes/ShapesUtil \ svx/source/sidebar/textcolumns/TextColumnsPropertyPanel \ - svx/source/sidebar/tools/ValueSetWithTextControl \ svx/source/stbctrls/pszctrl \ svx/source/stbctrls/insctrl \ svx/source/stbctrls/selctrl \ diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index f887b4fa24e9..d3f93ee1bb17 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -744,6 +744,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/sidebar/TableEditPanel \ sw/source/uibase/sidebar/ThemePanel \ sw/source/uibase/sidebar/SwPanelFactory \ + sw/source/uibase/sidebar/ValueSetWithTextControl \ sw/source/uibase/sidebar/WriterInspectorTextPanel \ sw/source/uibase/sidebar/CommentsPanel \ sw/source/uibase/sidebar/A11yCheckIssuesPanel \ diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx index e5f105ad3ee3..e124446288df 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.cxx +++ b/sw/source/uibase/sidebar/PageSizeControl.cxx @@ -19,10 +19,10 @@ #include <memory> #include "PageSizeControl.hxx" +#include "ValueSetWithTextControl.hxx" #include <cmdid.h> #include <svx/pageitem.hxx> -#include <svx/sidebar/ValueSetWithTextControl.hxx> #include <unotools/localedatawrapper.hxx> #include <rtl/character.hxx> @@ -71,7 +71,7 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, weld::Widget* pParent) : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"modules/swriter/ui/pagesizecontrol.ui"_ustr, u"PageSizeControl"_ustr) , mxMoreButton(m_xBuilder->weld_button(u"moreoptions"_ustr)) , mxWidthHeightField(m_xBuilder->weld_metric_spin_button(u"metric"_ustr, FieldUnit::CM)) - , mxSizeValueSet(new svx::sidebar::ValueSetWithTextControl) + , mxSizeValueSet(new ValueSetWithTextControl) , mxSizeValueSetWin(new weld::CustomWeld(*m_xBuilder, u"pagesizevalueset"_ustr, *mxSizeValueSet)) , mxControl(pControl) { diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx index bbeaa1b198d2..f1adaad49c61 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.hxx +++ b/sw/source/uibase/sidebar/PageSizeControl.hxx @@ -19,6 +19,8 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGESIZECONTROL_HXX #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGESIZECONTROL_HXX +#include "ValueSetWithTextControl.hxx" + #include <i18nutil/paper.hxx> #include <svtools/toolbarmenu.hxx> @@ -26,10 +28,6 @@ #include <vector> -namespace svx::sidebar -{ -class ValueSetWithTextControl; -} class PageSizePopup; class ValueSet; @@ -46,7 +44,7 @@ private: std::unique_ptr<weld::Button> mxMoreButton; // hidden metric field std::unique_ptr<weld::MetricSpinButton> mxWidthHeightField; - std::unique_ptr<svx::sidebar::ValueSetWithTextControl> mxSizeValueSet; + std::unique_ptr<ValueSetWithTextControl> mxSizeValueSet; std::unique_ptr<weld::CustomWeld> mxSizeValueSetWin; rtl::Reference<PageSizePopup> mxControl; diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/sw/source/uibase/sidebar/ValueSetWithTextControl.cxx similarity index 97% rename from svx/source/sidebar/tools/ValueSetWithTextControl.cxx rename to sw/source/uibase/sidebar/ValueSetWithTextControl.cxx index 39e385db5243..5240e19b78c2 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/sw/source/uibase/sidebar/ValueSetWithTextControl.cxx @@ -16,15 +16,15 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <svx/sidebar/ValueSetWithTextControl.hxx> -#include <sfx2/sidebar/Theme.hxx> +#include "ValueSetWithTextControl.hxx" +#include <sfx2/sidebar/Theme.hxx> #include <svtools/valueset.hxx> #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> -namespace svx::sidebar { +namespace sw::sidebar { ValueSetWithTextControl::ValueSetWithTextControl() : ValueSet(nullptr) @@ -114,6 +114,6 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) Invalidate( aRect ); } -} // end of namespace svx::sidebar +} // end of namespace sw::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/sw/source/uibase/sidebar/ValueSetWithTextControl.hxx similarity index 84% rename from include/svx/sidebar/ValueSetWithTextControl.hxx rename to sw/source/uibase/sidebar/ValueSetWithTextControl.hxx index e52c53b0051e..751567915b7e 100644 --- a/include/svx/sidebar/ValueSetWithTextControl.hxx +++ b/sw/source/uibase/sidebar/ValueSetWithTextControl.hxx @@ -24,7 +24,7 @@ #include <vector> -namespace svx::sidebar +namespace sw::sidebar { /** Specialization of class <ValueSet>. This specialization allows is a one-columned ValueSet which allow @@ -32,16 +32,16 @@ namespace svx::sidebar Especially, used for sidebar related controls. */ -class SVX_DLLPUBLIC ValueSetWithTextControl final : public ValueSet +class ValueSetWithTextControl final : public ValueSet { public: ValueSetWithTextControl(); - SVX_DLLPRIVATE virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; void AddItem(const OUString& rItemText, const OUString& rItemText2); - SVX_DLLPRIVATE virtual void UserDraw(const UserDrawEvent& rUDEvt) override; + virtual void UserDraw(const UserDrawEvent& rUDEvt) override; private: struct ValueSetWithTextItem @@ -53,6 +53,6 @@ private: ::std::vector<ValueSetWithTextItem> maItems; }; -} // end of namespace svx::sidebar +} // end of namespace sw::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
