diff options
29 files changed, 740 insertions, 692 deletions
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx index 2c08410847e0..692c26a07ad9 100644 --- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx @@ -21,9 +21,10 @@ #include <com/sun/star/chart/ChartAxisLabelPosition.hpp> #include <com/sun/star/chart2/AxisOrientation.hpp> #include <com/sun/star/chart2/XAxis.hpp> - #include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <vcl/svapp.hxx> + #include "ChartAxisPanel.hxx" #include <ChartController.hxx> diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index f60d9eeb398c..28c86f4a8926 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -22,6 +22,8 @@ #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <vcl/svapp.hxx> + #include "ChartElementsPanel.hxx" #include <ChartController.hxx> #include <comphelper/processfactory.hxx> diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index e4dbdebdb2d2..7d040f2509a7 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -27,6 +27,8 @@ #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <vcl/svapp.hxx> + #include "ChartSeriesPanel.hxx" #include <ChartController.hxx> diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index aa4865c37e77..ed907d747cda 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -39,6 +39,11 @@ bool IsDockingWindowVisible( const css::uno::Reference< css::frame::XFrame >& rF class SFX2_DLLPUBLIC SfxDockingWindow : public DockingWindow { +protected: + std::unique_ptr<weld::Builder> m_xBuilder; + VclPtr<vcl::Window> m_xVclContentArea; + std::unique_ptr<weld::Container> m_xContainer; + private: tools::Rectangle aInnerRect; tools::Rectangle aOuterRect; @@ -77,7 +82,8 @@ public: SfxDockingWindow( SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window* pParent, - const OString& rID, const OUString& rUIXMLDescription ); + const OString& rID, const OUString& rUIXMLDescription, + bool bInterim = false ); virtual ~SfxDockingWindow() override; virtual void dispose() override; diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx index dcf9aa85b37c..0e715e5531bc 100644 --- a/include/svx/colorbox.hxx +++ b/include/svx/colorbox.hxx @@ -108,7 +108,8 @@ private: DECL_LINK(ToggleHdl, weld::ToggleButton&, void); public: - ColorListBox(std::unique_ptr<weld::MenuButton> pControl, weld::Window* pWindow); + // pTopLevelWindow will be used as parent for any color picker dialog created + ColorListBox(std::unique_ptr<weld::MenuButton> pControl, weld::Window* pTopLevelWindow); ~ColorListBox(); void SetSelectHdl(const Link<ColorListBox&, void>& rLink) diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx index 0fba454718df..cca06cc6959b 100644 --- a/include/svx/fontwork.hxx +++ b/include/svx/fontwork.hxx @@ -19,15 +19,13 @@ #ifndef INCLUDED_SVX_FONTWORK_HXX #define INCLUDED_SVX_FONTWORK_HXX -#include <vcl/toolbox.hxx> -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <vcl/idle.hxx> #include <sfx2/dockwin.hxx> #include <sfx2/ctrlitem.hxx> #include <svx/svxdllapi.h> +#include <vcl/idle.hxx> +#include <vcl/weld.hxx> -class SvxColorListBox; +class ColorListBox; class XFormTextAdjustItem; class XFormTextDistanceItem; @@ -71,67 +69,50 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkChildWindow final : public SfxChi /** Floating window for setting attributes of text effects */ -class SAL_WARN_UNUSED SvxFontWorkDialog : public SfxDockingWindow +class SAL_WARN_UNUSED SvxFontWorkDialog final : public SfxDockingWindow { #define CONTROLLER_COUNT 11 - SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT]; - - VclPtr<ToolBox> m_pTbxStyle; - VclPtr<ToolBox> m_pTbxAdjust; - - VclPtr<MetricField> m_pMtrFldDistance; - VclPtr<MetricField> m_pMtrFldTextStart; - - VclPtr<ToolBox> m_pTbxShadow; - - VclPtr<FixedImage> m_pFbShadowX; - VclPtr<MetricField> m_pMtrFldShadowX; - VclPtr<FixedImage> m_pFbShadowY; - VclPtr<MetricField> m_pMtrFldShadowY; - - VclPtr<SvxColorListBox> m_pShadowColorLB; - SfxBindings& rBindings; Idle aInputIdle; - sal_uInt16 nLastStyleTbxId; - sal_uInt16 nStyleOffId; - sal_uInt16 nStyleRotateId; - sal_uInt16 nStyleUprightId; - sal_uInt16 nStyleSlantXId; - sal_uInt16 nStyleSlantYId; - - sal_uInt16 nLastAdjustTbxId; - sal_uInt16 nAdjustMirrorId; - sal_uInt16 nAdjustLeftId; - sal_uInt16 nAdjustCenterId; - sal_uInt16 nAdjustRightId; - sal_uInt16 nAdjustAutoSizeId; - - sal_uInt16 nLastShadowTbxId; - sal_uInt16 nShowFormId; - sal_uInt16 nOutlineId; - sal_uInt16 nShadowOffId; - sal_uInt16 nShadowNormalId; - sal_uInt16 nShadowSlantId; + OString m_sLastStyleTbxId; + OString m_sLastAdjustTbxId; + OString m_sLastShadowTbxId; long nSaveShadowX; long nSaveShadowY; long nSaveShadowAngle; long nSaveShadowSize; - friend class SvxFontWorkChildWindow; - friend class SvxFontWorkControllerItem; + SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT]; - DECL_LINK( SelectStyleHdl_Impl, ToolBox *, void ); - DECL_LINK( SelectAdjustHdl_Impl, ToolBox *, void ); - DECL_LINK( SelectShadowHdl_Impl, ToolBox *, void ); + std::unique_ptr<weld::Toolbar> m_xTbxStyle; + std::unique_ptr<weld::Toolbar> m_xTbxAdjust; - DECL_LINK( ModifyInputHdl_Impl, Edit&, void ); - DECL_LINK( InputTimeoutHdl_Impl, Timer *, void ); + std::unique_ptr<weld::MetricSpinButton> m_xMtrFldDistance; + std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTextStart; - DECL_LINK( ColorSelectHdl_Impl, SvxColorListBox&, void ); + std::unique_ptr<weld::Toolbar> m_xTbxShadow; + + std::unique_ptr<weld::Image> m_xFbShadowX; + std::unique_ptr<weld::MetricSpinButton> m_xMtrFldShadowX; + std::unique_ptr<weld::Image> m_xFbShadowY; + std::unique_ptr<weld::MetricSpinButton> m_xMtrFldShadowY; + + std::unique_ptr<ColorListBox> m_xShadowColorLB; + + friend class SvxFontWorkChildWindow; + friend class SvxFontWorkControllerItem; + + DECL_LINK( SelectStyleHdl_Impl, const OString&, void ); + DECL_LINK( SelectAdjustHdl_Impl, const OString&, void ); + DECL_LINK( SelectShadowHdl_Impl, const OString&, void ); + + DECL_LINK( ModifyInputHdl_Impl, weld::MetricSpinButton&, void ); + DECL_LINK( InputTimeoutHdl_Impl, Timer*, void ); + + DECL_LINK( ColorSelectHdl_Impl, ColorListBox&, void ); void SetStyle_Impl(const XFormTextStyleItem*); void SetAdjust_Impl(const XFormTextAdjustItem*); @@ -147,11 +128,9 @@ class SAL_WARN_UNUSED SvxFontWorkDialog : public SfxDockingWindow void ApplyImageList(); - protected: virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign, SfxChildAlignment eAlign ) override; - - public: +public: SvxFontWorkDialog(SfxBindings *pBinding, SfxChildWindow *pCW, vcl::Window* pParent); virtual ~SvxFontWorkDialog() override; diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 01cb0ff4a447..ed9ea771ed41 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -14,7 +14,6 @@ #include <vcl/builder.hxx> #include <vcl/ctrl.hxx> -#include <vcl/layout.hxx> #include <vcl/timer.hxx> #include <vcl/idle.hxx> #include <vcl/weld.hxx> @@ -26,7 +25,7 @@ class SVX_DLLPUBLIC PanelLayout : public Control, public VclBuilderContainer { protected: std::unique_ptr<weld::Builder> m_xBuilder; - VclPtr<VclVBox> m_xVclContentArea; + VclPtr<vcl::Window> m_xVclContentArea; std::unique_ptr<weld::Container> m_xContainer; private: diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 6bdb64c0efba..ee7e4bc9710d 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1702,6 +1702,8 @@ #define RID_SVXSTR_PAGEDIR_LTR_VERT NC_("RID_SVXSTR_PAGEDIR_LTR_VERT", "Left-to-right (vertical)") #define RID_SVXSTR_PAGEDIR_LTR_BTT_VERT NC_("RID_SVXSTR_PAGEDIR_LTR_BTT_VERT", "Bottom-to-top, left-to-right (vertical)") +#define RID_SVXSTR_FONTWORK NC_("RID_SVXSTR_FONTWORK", "Fontwork") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index c61b73782087..e8046664e1a2 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1722,6 +1722,10 @@ public: } void set_help_id(const OString& rName) { m_xSpinButton->set_help_id(rName); } void set_position(int nCursorPos) { m_xSpinButton->set_position(nCursorPos); } + // set the width of the underlying widget in characters, this setting is + // invalidated when changing the units, range or digits, so to have effect + // must come after changing those values + void set_width_chars(int nChars) { m_xSpinButton->set_width_chars(nChars); } weld::SpinButton& get_widget() { return *m_xSpinButton; } }; diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index b778232ada75..1d33a9e15c01 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -23,6 +23,7 @@ #include <sfx2/linkmgr.hxx> #include <sfx2/docfile.hxx> #include <sfx2/viewfrm.hxx> +#include <vcl/commandevent.hxx> #include <vcl/help.hxx> #include <vcl/svapp.hxx> #include <tools/urlobj.hxx> diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index df63657f8e7d..d9de448fb0af 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -22,6 +22,8 @@ #include <sfx2/viewfrm.hxx> #include <svl/slstitm.hxx> #include <svl/stritem.hxx> +#include <vcl/commandevent.hxx> +#include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <vcl/settings.hxx> diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index fc2c35bab2b8..61db86ea000a 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -224,8 +224,9 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper(vcl::Window* pParentP, OSL_ENSURE( pViewShell, "missing view shell :-(" ); if (pViewShell) { - SetController(std::make_shared<ScAcceptChgDlg>(pBindings, this, pParentP->GetFrameWeld(), &pViewShell->GetViewData())); - static_cast<ScAcceptChgDlg*>(GetController().get())->Initialize( pInfo ); + auto xDlg = std::make_shared<ScAcceptChgDlg>(pBindings, this, pParentP->GetFrameWeld(), &pViewShell->GetViewData()); + SetController(xDlg); + xDlg->Initialize( pInfo ); } else SetController( nullptr ); diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx index 65a954213396..7aa293172646 100644 --- a/sd/source/ui/animations/CustomAnimationPane.hxx +++ b/sd/source/ui/animations/CustomAnimationPane.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONPANE_HXX #define INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONPANE_HXX +#include <vcl/button.hxx> #include <vcl/field.hxx> #include <vcl/fixed.hxx> #include <svx/sidebar/PanelLayout.hxx> diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx index bc1e3a0baed6..d0b91cbbea29 100644 --- a/sd/source/ui/sidebar/PanelFactory.cxx +++ b/sd/source/ui/sidebar/PanelFactory.cxx @@ -32,6 +32,7 @@ #include "SlideBackground.hxx" #include <sfx2/sidebar/SidebarPanelBase.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/servicehelper.hxx> #include <vcl/window.hxx> diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index df1afcb3c688..ee24a21cfe47 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -54,6 +54,7 @@ #include <EventMultiplexer.hxx> #include <unotools/localedatawrapper.hxx> #include <vcl/EnumContext.hxx> +#include <vcl/svapp.hxx> #include <editeng/sizeitem.hxx> #include <comphelper/lok.hxx> diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 90ec60845e31..0a77dacf6074 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -26,8 +26,9 @@ #include <comphelper/sequence.hxx> #include <sfx2/viewfrm.hxx> -#include <vcl/virdev.hxx> +#include <vcl/image.hxx> #include <vcl/settings.hxx> +#include <vcl/virdev.hxx> #include <tools/debug.hxx> #include <svl/style.hxx> diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk index 0eb097b7fffd..8293a22c56c3 100644 --- a/sfx2/UIConfig_sfx.mk +++ b/sfx2/UIConfig_sfx.mk @@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ sfx2/uiconfig/ui/cmisline \ sfx2/uiconfig/ui/custominfopage \ sfx2/uiconfig/ui/descriptioninfopage \ + sfx2/uiconfig/ui/dockingwindow \ sfx2/uiconfig/ui/documentfontspage \ sfx2/uiconfig/ui/documentinfopage \ sfx2/uiconfig/ui/documentpropertiesdialog \ diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index f0661a95157e..a2ad4336ad7f 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -20,6 +20,7 @@ #include <svl/eitem.hxx> #include <svl/solar.hrc> #include <vcl/event.hxx> +#include <vcl/layout.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> @@ -765,11 +766,21 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, required because the docking is implemented in Sfx through SfxChildWindows. */ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, - vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription) - : DockingWindow(pParent, rID, rUIXMLDescription) + vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, + bool bInterim) + : DockingWindow(pParent, bInterim ? "DockingWindow" : rID, + bInterim ? "sfx/ui/dockingwindow.ui" : rUIXMLDescription) , pBindings(pBindinx) , pMgr(pCW) { + if (bInterim) + { + m_xVclContentArea = VclPtr<VclVBox>::Create(this); + m_xVclContentArea->Show(); + m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription)); + m_xContainer = m_xBuilder->weld_container(rID); + } + pImpl.reset(new SfxDockingWindow_Impl(this)); } @@ -1035,6 +1046,9 @@ void SfxDockingWindow::dispose() { ReleaseChildWindow_Impl(); pImpl.reset(); + m_xContainer.reset(); + m_xBuilder.reset(); + m_xVclContentArea.disposeAndClear(); DockingWindow::dispose(); } diff --git a/sfx2/uiconfig/ui/dockingwindow.ui b/sfx2/uiconfig/ui/dockingwindow.ui new file mode 100644 index 000000000000..29f0bc6ca0c0 --- /dev/null +++ b/sfx2/uiconfig/ui/dockingwindow.ui @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.22.1 --> +<interface domain="svx"> + <requires lib="gtk+" version="3.18"/> + <requires lib="LibreOffice" version="1.0"/> + <object class="GtkWindow" id="DockingWindow"> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="type_hint">dock</property> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> +</interface> diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index e8c65a51f755..99a4a8616a2d 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -21,6 +21,8 @@ #include <sfx2/dispatch.hxx> #include <svx/colorbox.hxx> +#include <svx/dialmgr.hxx> +#include <svx/strings.hrc> #include <svx/xftadit.hxx> #include <svx/xftdiit.hxx> #include <svx/xftstit.hxx> @@ -36,6 +38,8 @@ #include <bitmaps.hlst> #include <svx/fontwork.hxx> +#define WIDTH_CHARS 10 + SFX_IMPL_DOCKINGWINDOW_WITHID( SvxFontWorkChildWindow, SID_FONTWORK ); // ControllerItem for Fontwork @@ -160,7 +164,6 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : - SfxChildWindow( _pParent, nId ) { VclPtrInstance<SvxFontWorkDialog> pDlg(pBindings, this, _pParent); @@ -173,48 +176,25 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* _pParent) - : SfxDockingWindow(pBindinx, pCW, _pParent, "DockingFontwork", "svx/ui/dockingfontwork.ui") + : SfxDockingWindow(pBindinx, pCW, _pParent, "DockingFontwork", "svx/ui/dockingfontwork.ui", true) , rBindings(*pBindinx) , aInputIdle("SvxFontWorkDialog Input") - , nLastStyleTbxId(0) - , nLastAdjustTbxId(0) - , nLastShadowTbxId(0) , nSaveShadowX(0) , nSaveShadowY(0) , nSaveShadowAngle(450) , nSaveShadowSize (100) + , m_xTbxStyle(m_xBuilder->weld_toolbar("style")) + , m_xTbxAdjust(m_xBuilder->weld_toolbar("adjust")) + , m_xMtrFldDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM)) + , m_xMtrFldTextStart(m_xBuilder->weld_metric_spin_button("indent", FieldUnit::CM)) + , m_xTbxShadow(m_xBuilder->weld_toolbar("shadow")) + , m_xFbShadowX(m_xBuilder->weld_image("shadowx")) + , m_xMtrFldShadowX(m_xBuilder->weld_metric_spin_button("distancex", FieldUnit::CM)) + , m_xFbShadowY(m_xBuilder->weld_image("shadowy")) + , m_xMtrFldShadowY(m_xBuilder->weld_metric_spin_button("distancey", FieldUnit::CM)) + , m_xShadowColorLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), GetFrameWeld())) { - get(m_pMtrFldDistance, "distance"); - get(m_pMtrFldTextStart, "indent"); - get(m_pMtrFldShadowX, "distancex"); - get(m_pMtrFldShadowY, "distancey"); - get(m_pShadowColorLB, "color"); - get(m_pFbShadowX, "shadowx"); - get(m_pFbShadowY, "shadowy"); - - get(m_pTbxStyle, "style"); - nStyleOffId = m_pTbxStyle->GetItemId(0); - // separator is item "1" - nStyleRotateId = m_pTbxStyle->GetItemId(2); - nStyleUprightId = m_pTbxStyle->GetItemId(3); - nStyleSlantXId = m_pTbxStyle->GetItemId(4); - nStyleSlantYId = m_pTbxStyle->GetItemId(5); - - get(m_pTbxShadow, "shadow"); - nShowFormId = m_pTbxShadow->GetItemId(0); - nOutlineId = m_pTbxShadow->GetItemId(1); - // separator is item "2" - nShadowOffId = m_pTbxShadow->GetItemId(3); - nShadowNormalId = m_pTbxShadow->GetItemId(4); - nShadowSlantId = m_pTbxShadow->GetItemId(5); - - get(m_pTbxAdjust, "adjust"); - nAdjustMirrorId = m_pTbxAdjust->GetItemId(0); - // separator is item "1" - nAdjustLeftId = m_pTbxAdjust->GetItemId(2); - nAdjustCenterId = m_pTbxAdjust->GetItemId(3); - nAdjustRightId = m_pTbxAdjust->GetItemId(4); - nAdjustAutoSizeId = m_pTbxAdjust->GetItemId(5); + SetText(SvxResId(RID_SVXSTR_FONTWORK)); ApplyImageList(); @@ -230,44 +210,40 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx, pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings); pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings); - Size aSize = m_pTbxStyle->CalcWindowSizePixel(); - m_pTbxStyle->SetSizePixel(aSize); - m_pTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) ); - - m_pTbxAdjust->SetSizePixel(aSize); - m_pTbxAdjust->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) ); - - m_pTbxShadow->SetSizePixel(aSize); - m_pTbxShadow->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) ); + m_xTbxStyle->connect_clicked(LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl)); + m_xTbxAdjust->connect_clicked(LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl)); + m_xTbxShadow->connect_clicked(LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl)); - Link<Edit&,void> aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl); - m_pMtrFldDistance->SetModifyHdl( aLink ); - m_pMtrFldTextStart->SetModifyHdl( aLink ); - m_pMtrFldShadowX->SetModifyHdl( aLink ); - m_pMtrFldShadowY->SetModifyHdl( aLink ); + Link<weld::MetricSpinButton&,void> aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl); + m_xMtrFldDistance->connect_value_changed( aLink ); + m_xMtrFldTextStart->connect_value_changed( aLink ); + m_xMtrFldShadowX->connect_value_changed( aLink ); + m_xMtrFldShadowY->connect_value_changed( aLink ); // Set System metric const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit(); - SetFieldUnit(*m_pMtrFldDistance, eDlgUnit, true); - SetFieldUnit(*m_pMtrFldTextStart, eDlgUnit, true); - SetFieldUnit(*m_pMtrFldShadowX, eDlgUnit, true); - SetFieldUnit(*m_pMtrFldShadowY, eDlgUnit, true); + SetFieldUnit(*m_xMtrFldDistance, eDlgUnit, true); + SetFieldUnit(*m_xMtrFldTextStart, eDlgUnit, true); + SetFieldUnit(*m_xMtrFldShadowX, eDlgUnit, true); + SetFieldUnit(*m_xMtrFldShadowY, eDlgUnit, true); if( eDlgUnit == FieldUnit::MM ) { - m_pMtrFldDistance->SetSpinSize( 50 ); - m_pMtrFldTextStart->SetSpinSize( 50 ); - m_pMtrFldShadowX->SetSpinSize( 50 ); - m_pMtrFldShadowY->SetSpinSize( 50 ); + m_xMtrFldDistance->set_increments(50, 500, FieldUnit::NONE); + m_xMtrFldTextStart->set_increments(50, 500, FieldUnit::NONE); + m_xMtrFldShadowX->set_increments(50, 500, FieldUnit::NONE); + m_xMtrFldShadowY->set_increments(50, 500, FieldUnit::NONE); } else { - m_pMtrFldDistance->SetSpinSize( 10 ); - m_pMtrFldTextStart->SetSpinSize( 10 ); - m_pMtrFldShadowX->SetSpinSize( 10 ); - m_pMtrFldShadowY->SetSpinSize( 10 ); + m_xMtrFldDistance->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldTextStart->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowX->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowY->set_increments(10, 100, FieldUnit::NONE); } + m_xMtrFldShadowX->set_width_chars(WIDTH_CHARS); + m_xMtrFldShadowY->set_width_chars(WIDTH_CHARS); - m_pShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) ); + m_xShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) ); aInputIdle.SetPriority(TaskPriority::LOWEST); aInputIdle.SetInvokeHandler(LINK(this, SvxFontWorkDialog, InputTimeoutHdl_Impl)); @@ -282,16 +258,16 @@ void SvxFontWorkDialog::dispose() { for (SvxFontWorkControllerItem* pCtrlItem : pCtrlItems) pCtrlItem->dispose(); - m_pTbxStyle.clear(); - m_pTbxAdjust.clear(); - m_pMtrFldDistance.clear(); - m_pMtrFldTextStart.clear(); - m_pTbxShadow.clear(); - m_pFbShadowX.clear(); - m_pMtrFldShadowX.clear(); - m_pFbShadowY.clear(); - m_pMtrFldShadowY.clear(); - m_pShadowColorLB.clear(); + m_xTbxStyle.reset(); + m_xTbxAdjust.reset(); + m_xMtrFldDistance.reset(); + m_xMtrFldTextStart.reset(); + m_xTbxShadow.reset(); + m_xFbShadowX.reset(); + m_xMtrFldShadowX.reset(); + m_xFbShadowY.reset(); + m_xMtrFldShadowY.reset(); + m_xShadowColorLB.reset(); SfxDockingWindow::dispose(); } @@ -335,43 +311,42 @@ SfxChildAlignment SvxFontWorkDialog::CheckAlignment( SfxChildAlignment eActAlign } // Set style buttons - void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem) { if ( pItem ) { - sal_uInt16 nId = nStyleOffId; + OString sId = "off"; switch ( pItem->GetValue() ) { - case XFormTextStyle::Rotate : nId = nStyleRotateId; break; - case XFormTextStyle::Upright: nId = nStyleUprightId; break; - case XFormTextStyle::SlantX : nId = nStyleSlantXId; break; - case XFormTextStyle::SlantY : nId = nStyleSlantYId; break; + case XFormTextStyle::Rotate : sId = "rotate"; break; + case XFormTextStyle::Upright: sId = "upright"; break; + case XFormTextStyle::SlantX : sId = "hori"; break; + case XFormTextStyle::SlantY : sId = "vert"; break; default: ;//prevent warning } - m_pTbxStyle->Enable(); + m_xTbxStyle->set_sensitive(true); // Make sure that there is always exactly one checked toolbox item. if ( pItem->GetValue() == XFormTextStyle::NONE ) { - m_pTbxStyle->CheckItem(nStyleRotateId, false); - m_pTbxStyle->CheckItem(nStyleUprightId, false); - m_pTbxStyle->CheckItem(nStyleSlantXId, false); - m_pTbxStyle->CheckItem(nStyleSlantYId, false); + m_xTbxStyle->set_item_active("rotate", false); + m_xTbxStyle->set_item_active("upright", false); + m_xTbxStyle->set_item_active("hori", false); + m_xTbxStyle->set_item_active("vert", false); - m_pTbxStyle->CheckItem(nStyleOffId); + m_xTbxStyle->set_item_active("off", true); } else { - m_pTbxStyle->CheckItem(nStyleOffId, false); - m_pTbxStyle->CheckItem(nId); + m_xTbxStyle->set_item_active("off", false); + m_xTbxStyle->set_item_active(sId, true); } - nLastStyleTbxId = nId; + m_sLastStyleTbxId = sId; } else - m_pTbxStyle->Disable(); + m_xTbxStyle->set_sensitive(false); } // Set adjust buttons @@ -380,35 +355,38 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem) { if ( pItem ) { - sal_uInt16 nId; + OString sId; - m_pTbxAdjust->Enable(); - m_pMtrFldDistance->Enable(); + m_xTbxAdjust->set_sensitive(true); + m_xMtrFldDistance->set_sensitive(true); if ( pItem->GetValue() == XFormTextAdjust::Left || pItem->GetValue() == XFormTextAdjust::Right ) { - if ( pItem->GetValue() == XFormTextAdjust::Left ) nId = nAdjustLeftId; - else nId = nAdjustRightId; - m_pMtrFldTextStart->Enable(); + if (pItem->GetValue() == XFormTextAdjust::Left) + sId = "left"; + else + sId = "right"; + m_xMtrFldTextStart->set_sensitive(true); } else { - if ( pItem->GetValue() == XFormTextAdjust::Center ) nId = nAdjustCenterId; - else nId = nAdjustAutoSizeId; - m_pMtrFldTextStart->Disable(); + if (pItem->GetValue() == XFormTextAdjust::Center) + sId = "center"; + else + sId = "autosize"; + m_xMtrFldTextStart->set_sensitive(false); } - if ( !m_pTbxAdjust->IsItemChecked(nId) ) - { - m_pTbxAdjust->CheckItem(nId); - } - nLastAdjustTbxId = nId; + if (!m_xTbxAdjust->get_item_active(sId)) + m_xTbxAdjust->set_item_active(sId, true); + + m_sLastAdjustTbxId = sId; } else { - m_pTbxAdjust->Disable(); - m_pMtrFldTextStart->Disable(); - m_pMtrFldDistance->Disable(); + m_xTbxAdjust->set_sensitive(false); + m_xMtrFldTextStart->set_sensitive(false); + m_xMtrFldDistance->set_sensitive(false); } } @@ -416,10 +394,9 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem) void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem) { - // Use HasChildPathFocus() instead of HasFocus() at SpinFields - if ( pItem && !m_pMtrFldDistance->HasChildPathFocus() ) + if (pItem && !m_xMtrFldDistance->has_focus()) { - SetMetricValue(*m_pMtrFldDistance, pItem->GetValue(), MapUnit::Map100thMM); + SetMetricValue(*m_xMtrFldDistance, pItem->GetValue(), MapUnit::Map100thMM); } } @@ -427,10 +404,9 @@ void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem) void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem) { - // Use HasChildPathFocus() instead of HasFocus() at SpinFields - if ( pItem && !m_pMtrFldTextStart->HasChildPathFocus() ) + if (pItem && !m_xMtrFldTextStart->has_focus()) { - SetMetricValue(*m_pMtrFldTextStart, pItem->GetValue(), MapUnit::Map100thMM); + SetMetricValue(*m_xMtrFldTextStart, pItem->GetValue(), MapUnit::Map100thMM); } } @@ -439,7 +415,7 @@ void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem) void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem) { if ( pItem ) - m_pTbxAdjust->CheckItem(nAdjustMirrorId, pItem->GetValue()); + m_xTbxAdjust->set_item_active("orientation", pItem->GetValue()); } // Set button for contour display @@ -447,7 +423,7 @@ void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem) void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem) { if ( pItem ) - m_pTbxShadow->CheckItem(nShowFormId, !pItem->GetValue()); + m_xTbxShadow->set_item_active("contour", !pItem->GetValue()); } // Set button for text border @@ -455,7 +431,7 @@ void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem) void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem) { if ( pItem ) - m_pTbxShadow->CheckItem(nOutlineId, pItem->GetValue()); + m_xTbxShadow->set_item_active("textcontour", pItem->GetValue()); } // Set shadow buttons @@ -465,54 +441,54 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem, { if ( pItem ) { - sal_uInt16 nId; + OString sId; - m_pTbxShadow->Enable(); + m_xTbxShadow->set_sensitive(true); if ( pItem->GetValue() == XFormTextShadow::NONE ) { - nId = nShadowOffId; - m_pFbShadowX->Hide(); - m_pFbShadowY->Hide(); - m_pMtrFldShadowX->Disable(); - m_pMtrFldShadowY->Disable(); - m_pShadowColorLB->Disable(); + sId = "noshadow"; + m_xFbShadowX->hide(); + m_xFbShadowY->hide(); + m_xMtrFldShadowX->set_sensitive(false); + m_xMtrFldShadowY->set_sensitive(false); + m_xShadowColorLB->set_sensitive(false); } else { - m_pFbShadowX->Show(); - m_pFbShadowY->Show(); - m_pMtrFldShadowX->Enable(); - m_pMtrFldShadowY->Enable(); - m_pShadowColorLB->Enable(); + m_xFbShadowX->show(); + m_xFbShadowY->show(); + m_xMtrFldShadowX->set_sensitive(true); + m_xMtrFldShadowY->set_sensitive(true); + m_xShadowColorLB->set_sensitive(true); if ( pItem->GetValue() == XFormTextShadow::Normal ) { - nId = nShadowNormalId; + sId = "vertical"; const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit(); - m_pMtrFldShadowX->SetUnit( eDlgUnit ); - m_pMtrFldShadowX->SetDecimalDigits(2); - m_pMtrFldShadowX->SetMin(LONG_MIN); - m_pMtrFldShadowX->SetMax(LONG_MAX); + m_xMtrFldShadowX->set_unit( eDlgUnit ); + m_xMtrFldShadowX->set_digits(2); + m_xMtrFldShadowX->set_range(INT_MIN, INT_MAX, FieldUnit::NONE); if( eDlgUnit == FieldUnit::MM ) - m_pMtrFldShadowX->SetSpinSize( 50 ); + m_xMtrFldShadowX->set_increments(50, 500, FieldUnit::NONE); else - m_pMtrFldShadowX->SetSpinSize( 10 ); + m_xMtrFldShadowX->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowX->set_width_chars(WIDTH_CHARS); - m_pMtrFldShadowY->SetUnit( eDlgUnit ); - m_pMtrFldShadowY->SetDecimalDigits(2); - m_pMtrFldShadowY->SetMin(LONG_MIN); - m_pMtrFldShadowY->SetMax(LONG_MAX); + m_xMtrFldShadowY->set_unit( eDlgUnit ); + m_xMtrFldShadowY->set_digits(2); + m_xMtrFldShadowY->set_range(INT_MIN, INT_MAX, FieldUnit::NONE); if( eDlgUnit == FieldUnit::MM ) - m_pMtrFldShadowY->SetSpinSize( 50 ); + m_xMtrFldShadowY->set_increments(50, 500, FieldUnit::NONE); else - m_pMtrFldShadowY->SetSpinSize( 10 ); + m_xMtrFldShadowY->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowY->set_width_chars(WIDTH_CHARS); if ( bRestoreValues ) { - SetMetricValue(*m_pMtrFldShadowX, nSaveShadowX, MapUnit::Map100thMM); - SetMetricValue(*m_pMtrFldShadowY, nSaveShadowY, MapUnit::Map100thMM); + SetMetricValue(*m_xMtrFldShadowX, nSaveShadowX, MapUnit::Map100thMM); + SetMetricValue(*m_xMtrFldShadowY, nSaveShadowY, MapUnit::Map100thMM); XFormTextShadowXValItem aXItem( nSaveShadowX ); XFormTextShadowYValItem aYItem( nSaveShadowY ); @@ -524,24 +500,24 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem, } else { - nId = nShadowSlantId; + sId = "slant"; - m_pMtrFldShadowX->SetUnit(FieldUnit::DEGREE); - m_pMtrFldShadowX->SetDecimalDigits(1); - m_pMtrFldShadowX->SetMin(-1800); - m_pMtrFldShadowX->SetMax( 1800); - m_pMtrFldShadowX->SetSpinSize(10); + m_xMtrFldShadowX->set_unit(FieldUnit::DEGREE); + m_xMtrFldShadowX->set_digits(1); + m_xMtrFldShadowX->set_range(-1800, 1800, FieldUnit::NONE); + m_xMtrFldShadowX->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowX->set_width_chars(WIDTH_CHARS); - m_pMtrFldShadowY->SetUnit(FieldUnit::PERCENT); - m_pMtrFldShadowY->SetDecimalDigits(0); - m_pMtrFldShadowY->SetMin(-999); - m_pMtrFldShadowY->SetMax( 999); - m_pMtrFldShadowY->SetSpinSize(10); + m_xMtrFldShadowY->set_unit(FieldUnit::PERCENT); + m_xMtrFldShadowY->set_digits(0); + m_xMtrFldShadowY->set_range(-999, 999, FieldUnit::NONE); + m_xMtrFldShadowY->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowY->set_width_chars(WIDTH_CHARS); if ( bRestoreValues ) { - m_pMtrFldShadowX->SetValue(nSaveShadowAngle); - m_pMtrFldShadowY->SetValue(nSaveShadowSize); + m_xMtrFldShadowX->set_value(nSaveShadowAngle, FieldUnit::NONE); + m_xMtrFldShadowY->set_value(nSaveShadowSize, FieldUnit::NONE); XFormTextShadowXValItem aXItem(nSaveShadowAngle); XFormTextShadowYValItem aYItem(nSaveShadowSize); GetBindings().GetDispatcher()->ExecuteList( @@ -551,20 +527,18 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem, } } - if ( !m_pTbxShadow->IsItemChecked(nId) ) - { - m_pTbxShadow->CheckItem(nId); - } - nLastShadowTbxId = nId; + if (!m_xTbxShadow->get_item_active(sId)) + m_xTbxShadow->set_item_active(sId, true); + m_sLastShadowTbxId = sId; ApplyImageList(); } else { - m_pTbxShadow->Disable(); - m_pMtrFldShadowX->Disable(); - m_pMtrFldShadowY->Disable(); - m_pShadowColorLB->Disable(); + m_xTbxShadow->set_sensitive(false); + m_xMtrFldShadowX->set_sensitive(false); + m_xMtrFldShadowY->set_sensitive(false); + m_xShadowColorLB->set_sensitive(false); } } @@ -573,15 +547,13 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem, void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pItem) { if ( pItem ) - m_pShadowColorLB->SelectEntry(pItem->GetColorValue()); + m_xShadowColorLB->SelectEntry(pItem->GetColorValue()); } // Enter X-value for shadow in edit field - void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem) { - // Use HasChildPathFocus() instead of HasFocus() at SpinFields - if ( pItem && !m_pMtrFldShadowX->HasChildPathFocus() ) + if (pItem && !m_xMtrFldShadowX->has_focus()) { // #i19251# // sal_Int32 nValue = pItem->GetValue(); @@ -590,7 +562,7 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem) // The two involved fields/items are used double and contain/give different // values regarding to the access method. Thus, here we need to separate the access // methods regarding to the kind of value accessed. - if (m_pTbxShadow->IsItemChecked(nShadowSlantId)) + if (m_xTbxShadow->get_item_active("slant")) { // #i19251# // There is no value correction necessary at all, i think this @@ -598,130 +570,122 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem) // involved fields/items are used double and contain/give different // values regarding to the access method. // nValue = nValue - ( int( float( nValue ) / 360.0 ) * 360 ); - m_pMtrFldShadowX->SetValue(pItem->GetValue()); + m_xMtrFldShadowX->set_value(pItem->GetValue(), FieldUnit::NONE); } else { - SetMetricValue(*m_pMtrFldShadowX, pItem->GetValue(), MapUnit::Map100thMM); + SetMetricValue(*m_xMtrFldShadowX, pItem->GetValue(), MapUnit::Map100thMM); } } } // Enter Y-value for shadow in edit field - void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem) { - // Use HasChildPathFocus() instead of HasFocus() at SpinFields - if ( pItem && !m_pMtrFldShadowY->HasChildPathFocus() ) + if (pItem && !m_xMtrFldShadowY->has_focus()) { // #i19251# // The two involved fields/items are used double and contain/give different // values regarding to the access method. Thus, here we need to separate the access // methods regarding to the kind of value accessed. - if (m_pTbxShadow->IsItemChecked(nShadowSlantId)) + if (m_xTbxShadow->get_item_active("slant")) { - m_pMtrFldShadowY->SetValue(pItem->GetValue()); + m_xMtrFldShadowY->set_value(pItem->GetValue(), FieldUnit::NONE); } else { - SetMetricValue(*m_pMtrFldShadowY, pItem->GetValue(), MapUnit::Map100thMM); + SetMetricValue(*m_xMtrFldShadowY, pItem->GetValue(), MapUnit::Map100thMM); } } } -IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl, ToolBox *, void) +IMPL_LINK(SvxFontWorkDialog, SelectStyleHdl_Impl, const OString&, rId, void) { - sal_uInt16 nId = m_pTbxStyle->GetCurItemId(); - // Execute this block when a different toolbox item has been clicked or // when the off item has been clicked. The later is necessary to // override the toolbox behaviour of unchecking the item after second // click on it: One of the items has to be checked at all times (when // enabled that is.) - if (nId == nStyleOffId || nId != nLastStyleTbxId ) + if (rId == "off" || rId != m_sLastStyleTbxId) { XFormTextStyle eStyle = XFormTextStyle::NONE; - if (nId == nStyleRotateId) + if (rId == "rotate") eStyle = XFormTextStyle::Rotate; - else if (nId == nStyleUprightId) + else if (rId == "upright") eStyle = XFormTextStyle::Upright; - else if (nId == nStyleSlantXId) + else if (rId == "hori") eStyle = XFormTextStyle::SlantX; - else if (nId == nStyleSlantYId) + else if (rId == "vert") eStyle = XFormTextStyle::SlantY; XFormTextStyleItem aItem( eStyle ); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_STYLE, SfxCallMode::RECORD, { &aItem }); SetStyle_Impl( &aItem ); - nLastStyleTbxId = nId; + m_sLastStyleTbxId = rId; } } -IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl, ToolBox *, void) +IMPL_LINK(SvxFontWorkDialog, SelectAdjustHdl_Impl, const OString&, rId, void) { - sal_uInt16 nId = m_pTbxAdjust->GetCurItemId(); - - if (nId == nAdjustMirrorId) + if (rId == "orientation") { - XFormTextMirrorItem aItem(m_pTbxAdjust->IsItemChecked(nId)); + XFormTextMirrorItem aItem(m_xTbxAdjust->get_item_active(rId)); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_MIRROR, SfxCallMode::SLOT, { &aItem }); } - else if ( nId != nLastAdjustTbxId ) + else if (rId != m_sLastAdjustTbxId) { XFormTextAdjust eAdjust = XFormTextAdjust::AutoSize; - if (nId == nAdjustLeftId) + if (rId == "left") eAdjust = XFormTextAdjust::Left; - else if (nId == nAdjustCenterId) + else if (rId == "center") eAdjust = XFormTextAdjust::Center; - else if (nId == nAdjustRightId) + else if (rId == "right") eAdjust = XFormTextAdjust::Right; XFormTextAdjustItem aItem(eAdjust); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_ADJUST, SfxCallMode::RECORD, { &aItem }); SetAdjust_Impl(&aItem); - nLastAdjustTbxId = nId; + m_sLastAdjustTbxId = rId; } } -IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl, ToolBox *, void) +IMPL_LINK(SvxFontWorkDialog, SelectShadowHdl_Impl, const OString&, rId, void) { - sal_uInt16 nId = m_pTbxShadow->GetCurItemId(); - - if (nId == nShowFormId) + if (rId == "contour") { - XFormTextHideFormItem aItem(!m_pTbxShadow->IsItemChecked(nId)); + XFormTextHideFormItem aItem(!m_xTbxShadow->get_item_active(rId)); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_HIDEFORM, SfxCallMode::RECORD, { &aItem }); } - else if (nId == nOutlineId) + else if (rId == "textcontour") { - XFormTextOutlineItem aItem(m_pTbxShadow->IsItemChecked(nId)); + XFormTextOutlineItem aItem(m_xTbxShadow->get_item_active(rId)); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_OUTLINE, SfxCallMode::RECORD, { &aItem }); } - else if (nId != nLastShadowTbxId) + else if (rId != m_sLastShadowTbxId) { XFormTextShadow eShadow = XFormTextShadow::NONE; - if (nLastShadowTbxId == nShadowNormalId) + if (m_sLastShadowTbxId == "vertical") { - nSaveShadowX = GetCoreValue(*m_pMtrFldShadowX, MapUnit::Map100thMM); - nSaveShadowY = GetCoreValue(*m_pMtrFldShadowY, MapUnit::Map100thMM); + nSaveShadowX = GetCoreValue(*m_xMtrFldShadowX, MapUnit::Map100thMM); + nSaveShadowY = GetCoreValue(*m_xMtrFldShadowY, MapUnit::Map100thMM); } - else if (nLastShadowTbxId == nShadowSlantId) + else if (m_sLastShadowTbxId == "slant") { - nSaveShadowAngle = static_cast<long>(m_pMtrFldShadowX->GetValue()); - nSaveShadowSize = static_cast<long>(m_pMtrFldShadowY->GetValue()); + nSaveShadowAngle = m_xMtrFldShadowX->get_value(FieldUnit::NONE); + nSaveShadowSize = m_xMtrFldShadowY->get_value(FieldUnit::NONE); } - nLastShadowTbxId = nId; + m_sLastShadowTbxId = rId; - if ( nId == nShadowNormalId) eShadow = XFormTextShadow::Normal; - else if (nId == nShadowSlantId) eShadow = XFormTextShadow::Slant; + if ( rId == "vertical") eShadow = XFormTextShadow::Normal; + else if (rId == "slant") eShadow = XFormTextShadow::Slant; XFormTextShadowItem aItem(eShadow); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_SHADOW, @@ -730,36 +694,53 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl, ToolBox *, void) } } -IMPL_LINK_NOARG(SvxFontWorkDialog, ModifyInputHdl_Impl, Edit&, void) +IMPL_LINK_NOARG(SvxFontWorkDialog, ModifyInputHdl_Impl, weld::MetricSpinButton&, void) { aInputIdle.Start(); } -IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer *, void) +IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer*, void) { // Possibly set the Metric system again. This should be done with a // listen, this is however not possible at the moment due to compatibility // issues. const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit(); - if( eDlgUnit != m_pMtrFldDistance->GetUnit() ) + if( eDlgUnit != m_xMtrFldDistance->get_unit() ) { - SetFieldUnit(*m_pMtrFldDistance, eDlgUnit, true); - SetFieldUnit(*m_pMtrFldTextStart, eDlgUnit, true); - m_pMtrFldDistance->SetSpinSize( eDlgUnit == FieldUnit::MM ? 50 : 10 ); - m_pMtrFldTextStart->SetSpinSize( eDlgUnit == FieldUnit::MM ? 50 : 10 ); + SetFieldUnit(*m_xMtrFldDistance, eDlgUnit, true); + SetFieldUnit(*m_xMtrFldTextStart, eDlgUnit, true); + if (eDlgUnit == FieldUnit::MM) + { + m_xMtrFldDistance->set_increments(50, 500, FieldUnit::NONE); + m_xMtrFldTextStart->set_increments(50, 500, FieldUnit::NONE); + } + else + { + m_xMtrFldDistance->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldTextStart->set_increments(10, 100, FieldUnit::NONE); + } } - if( eDlgUnit != m_pMtrFldShadowX->GetUnit() && - m_pTbxShadow->IsItemChecked(nShadowNormalId) ) + if( eDlgUnit != m_xMtrFldShadowX->get_unit() && + m_xTbxShadow->get_item_active("vertical") ) { - SetFieldUnit(*m_pMtrFldShadowX, eDlgUnit, true); - SetFieldUnit(*m_pMtrFldShadowY, eDlgUnit, true); - m_pMtrFldShadowX->SetSpinSize( eDlgUnit == FieldUnit::MM ? 50 : 10 ); - m_pMtrFldShadowY->SetSpinSize( eDlgUnit == FieldUnit::MM ? 50 : 10 ); + SetFieldUnit(*m_xMtrFldShadowX, eDlgUnit, true); + SetFieldUnit(*m_xMtrFldShadowY, eDlgUnit, true); + + if (eDlgUnit == FieldUnit::MM) + { + m_xMtrFldShadowX->set_increments(50, 500, FieldUnit::NONE); + m_xMtrFldShadowY->set_increments(50, 500, FieldUnit::NONE); + } + else + { + m_xMtrFldShadowX->set_increments(10, 100, FieldUnit::NONE); + m_xMtrFldShadowY->set_increments(10, 100, FieldUnit::NONE); + } } - long nValue = GetCoreValue(*m_pMtrFldDistance, MapUnit::Map100thMM); + long nValue = GetCoreValue(*m_xMtrFldDistance, MapUnit::Map100thMM); XFormTextDistanceItem aDistItem( nValue ); - nValue = GetCoreValue(*m_pMtrFldTextStart, MapUnit::Map100thMM); + nValue = GetCoreValue(*m_xMtrFldTextStart, MapUnit::Map100thMM); XFormTextStartItem aStartItem( nValue ); sal_Int32 nValueX(0); @@ -769,15 +750,15 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer *, void) // The two involved fields/items are used double and contain/give different // values regarding to the access method. Thus, here we need to separate the access // method regarding to the kind of value accessed. - if (nLastShadowTbxId == nShadowNormalId) + if (m_sLastShadowTbxId == "vertical") { - nValueX = GetCoreValue(*m_pMtrFldShadowX, MapUnit::Map100thMM); - nValueY = GetCoreValue(*m_pMtrFldShadowY, MapUnit::Map100thMM); + nValueX = GetCoreValue(*m_xMtrFldShadowX, MapUnit::Map100thMM); + nValueY = GetCoreValue(*m_xMtrFldShadowY, MapUnit::Map100thMM); } - else if (nLastShadowTbxId == nShadowSlantId) + else if (m_sLastShadowTbxId == "slant") { - nValueX = static_cast<long>(m_pMtrFldShadowX->GetValue()); - nValueY = static_cast<long>(m_pMtrFldShadowY->GetValue()); + nValueX = m_xMtrFldShadowX->get_value(FieldUnit::NONE); + nValueY = m_xMtrFldShadowY->get_value(FieldUnit::NONE); } XFormTextShadowXValItem aShadowXItem( nValueX ); @@ -789,24 +770,24 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer *, void) { &aDistItem, &aStartItem, &aShadowXItem, &aShadowYItem }); } -IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl, SvxColorListBox&, void) +IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl, ColorListBox&, void) { - XFormTextShadowColorItem aItem( "", m_pShadowColorLB->GetSelectEntryColor() ); + XFormTextShadowColorItem aItem( "", m_xShadowColorLB->GetSelectEntryColor() ); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_SHDWCOLOR, SfxCallMode::RECORD, { &aItem }); } void SvxFontWorkDialog::ApplyImageList() { - if (nLastShadowTbxId == nShadowSlantId) + if (m_sLastShadowTbxId == "slant") { - m_pFbShadowX->SetImage(Image(StockImage::Yes, RID_SVXBMP_SHADOW_ANGLE)); - m_pFbShadowY->SetImage(Image(StockImage::Yes, RID_SVXBMP_SHADOW_SIZE)); + m_xFbShadowX->set_from_icon_name(RID_SVXBMP_SHADOW_ANGLE); + m_xFbShadowY->set_from_icon_name(RID_SVXBMP_SHADOW_SIZE); } else { - m_pFbShadowX->SetImage(Image(StockImage::Yes, RID_SVXBMP_SHADOW_XDIST)); - m_pFbShadowY->SetImage(Image(StockImage::Yes, RID_SVXBMP_SHADOW_YDIST)); + m_xFbShadowX->set_from_icon_name(RID_SVXBMP_SHADOW_XDIST); + m_xFbShadowY->set_from_icon_name(RID_SVXBMP_SHADOW_YDIST); } } diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 25337d76c980..4bf6015c0913 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -304,9 +304,10 @@ FmFieldWinMgr::FmFieldWinMgr(vcl::Window* _pParent, sal_uInt16 _nId, SfxBindings* _pBindings, SfxChildWinInfo const * _pInfo) :SfxChildWindow(_pParent, _nId) { - SetController(std::make_shared<FmFieldWin>(_pBindings, this, _pParent->GetFrameWeld())); + auto xDlg = std::make_shared<FmFieldWin>(_pBindings, this, _pParent->GetFrameWeld()); + SetController(xDlg); SetHideNotDelete(true); - static_cast<FmFieldWin*>(GetController().get())->Initialize(_pInfo); + xDlg->Initialize(_pInfo); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 2c477e0b1c9b..2d3f2fab793b 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -23,6 +23,8 @@ #include <svl/stritem.hxx> #include <svl/intitem.hxx> #include <svl/eitem.hxx> +#include <vcl/commandevent.hxx> +#include <vcl/event.hxx> #include <vcl/transfer.hxx> #include <vcl/virdev.hxx> #include <sfx2/bindings.hxx> diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx index fcab1a5ed27e..93de4d218dc3 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx @@ -22,6 +22,7 @@ #include <svx/sidebar/AreaPropertyPanelBase.hxx> #include <svx/xflftrit.hxx> #include <svx/xgrad.hxx> +#include <vcl/svapp.hxx> namespace svx::sidebar { diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 56a8f130f778..d2782d761d2f 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -24,6 +24,7 @@ #include <svx/xlnwtit.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/viewoptions.hxx> +#include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include "LineWidthValueSet.hxx" #include <bitmaps.hlst> diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 86764f3af904..8bba220e0952 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -20,8 +20,9 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <comphelper/dispatchcommand.hxx> -#include <vcl/outdev.hxx> #include <vcl/commandinfoprovider.hxx> +#include <vcl/outdev.hxx> +#include <vcl/settings.hxx> namespace svx::sidebar { diff --git a/svx/uiconfig/ui/dockingfontwork.ui b/svx/uiconfig/ui/dockingfontwork.ui index 708a89c76c1c..95cc96b0ee4a 100644 --- a/svx/uiconfig/ui/dockingfontwork.ui +++ b/svx/uiconfig/ui/dockingfontwork.ui @@ -1,108 +1,228 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="svx"> <requires lib="gtk+" version="3.18"/> - <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="lower">-50000</property> <property name="upper">50000</property> <property name="step_increment">0.10000000000000001</property> <property name="page_increment">1</property> </object> - <object class="GtkWindow" id="DockingFontwork"> + <object class="GtkAdjustment" id="adjustment2"> + <property name="lower">-50000</property> + <property name="upper">50000</property> + <property name="step_increment">0.10000000000000001</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment3"> + <property name="lower">-50000</property> + <property name="upper">50000</property> + <property name="step_increment">0.10000000000000001</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment4"> + <property name="lower">-50000</property> + <property name="upper">50000</property> + <property name="step_increment">0.10000000000000001</property> + <property name="page_increment">1</property> + </object> + <object class="GtkGrid" id="DockingFontwork"> + <property name="visible">True</property> <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="border_width">6</property> - <property name="title" translatable="yes" context="dockingfontwork|DockingFontwork">Fontwork</property> - <property name="type_hint">dock</property> + <property name="row_spacing">12</property> + <child> + <object class="GtkToolbar" id="style"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkRadioToolButton" id="off"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|off|tooltip_text">Off</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw01.png</property> + <property name="active">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkSeparatorToolItem" id="toolbutton1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="rotate"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|rotate|tooltip_text">Rotate</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw02.png</property> + <property name="group">off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="upright"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|upright|tooltip_text">Upright</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw03.png</property> + <property name="group">off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="hori"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|hori|tooltip_text">Slant Horizontal</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw04.png</property> + <property name="group">off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="vert"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|vert|tooltip_text">Slant Vertical</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw05.png</property> + <property name="group">off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="adjust"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToggleToolButton" id="orientation"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|orientation|tooltip_text">Orientation</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw06.png</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkSeparatorToolItem" id="toolbutton2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="left"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|left|tooltip_text">Align Left</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw07.png</property> + <property name="group">autosize</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="center"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|center|tooltip_text">Center</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw08.png</property> + <property name="group">autosize</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="right"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|right|tooltip_text">Align Right</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw09.png</property> + <property name="group">autosize</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="autosize"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|autosize|tooltip_text">AutoSize Text</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw010.png</property> + <property name="active">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> <child> - <object class="GtkGrid" id="grid1"> + <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="row_spacing">12</property> + <property name="halign">end</property> + <property name="column_spacing">12</property> <child> - <object class="GtkToolbar" id="style"> + <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <child> - <object class="GtkToggleToolButton" id="off"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|off|tooltip_text">Off</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw01.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkSeparatorToolItem" id="toolbutton1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="rotate"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|rotate|tooltip_text">Rotate</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw02.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="upright"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|upright|tooltip_text">Upright</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw03.png</property> - <property name="group">rotate</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="hori"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|hori|tooltip_text">Slant Horizontal</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw04.png</property> - <property name="group">rotate</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="vert"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|vert|tooltip_text">Slant Vertical</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw05.png</property> - <property name="group">rotate</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> + <property name="valign">center</property> + <property name="icon_name">svx/res/fw020.png</property> </object> <packing> <property name="left_attach">0</property> @@ -110,353 +230,253 @@ </packing> </child> <child> - <object class="GtkToolbar" id="adjust"> + <object class="GtkSpinButton" id="distance"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|distance|tooltip_text">Distance</property> + <property name="adjustment">adjustment1</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <child> - <object class="GtkToggleToolButton" id="orientation"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|orientation|tooltip_text">Orientation</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw06.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkSeparatorToolItem" id="toolbutton2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="left"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|left|tooltip_text">Align Left</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw07.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="center"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|center|tooltip_text">Center</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw08.png</property> - <property name="group">left</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="right"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|right|tooltip_text">Align Right</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw09.png</property> - <property name="group">left</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="autosize"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|autosize|tooltip_text">AutoSize Text</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw010.png</property> - <property name="group">left</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> + <property name="valign">center</property> + <property name="icon_name">svx/res/fw021.png</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> - <object class="GtkGrid" id="grid2"> + <object class="GtkSpinButton" id="indent"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|indent|tooltip_text">Indent</property> + <property name="text">0.00</property> + <property name="adjustment">adjustment2</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="shadow"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToggleToolButton" id="contour"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="valign">center</property> - <property name="pixbuf">svx/res/fw020.png</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="distance:0.00mm"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|distance|tooltip_text">Distance</property> - <property name="adjustment">adjustment1</property> - <property name="digits">2</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|contour|tooltip_text">Contour</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw011.png</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="expand">False</property> + <property name="homogeneous">True</property> </packing> </child> <child> - <object class="GtkGrid" id="grid3"> + <object class="GtkToggleToolButton" id="textcontour"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="valign">center</property> - <property name="pixbuf">svx/res/fw021.png</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="indent:0.00mm"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|indent|tooltip_text">Indent</property> - <property name="text" translatable="no">0.00</property> - <property name="adjustment">adjustment1</property> - <property name="digits">2</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|textcontour|tooltip_text">Text Contour</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw012.png</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="expand">False</property> + <property name="homogeneous">True</property> </packing> </child> <child> - <object class="GtkToolbar" id="shadow"> + <object class="GtkSeparatorToolItem" id="toolbutton3"> <property name="visible">True</property> <property name="can_focus">False</property> - <child> - <object class="GtkToggleToolButton" id="contour"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|contour|tooltip_text">Contour</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw011.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkToggleToolButton" id="textcontour"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|textcontour|tooltip_text">Text Contour</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw012.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkSeparatorToolItem" id="toolbutton3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="noshadow"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|noshadow|tooltip_text">No Shadow</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw013.png</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="vertical"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|vertical|tooltip_text">Vertical</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw014.png</property> - <property name="group">noshadow</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkRadioToolButton" id="slant"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|slant|tooltip_text">Slant</property> - <property name="use_underline">True</property> - <property name="icon_name">svx/res/fw015.png</property> - <property name="group">noshadow</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> + <property name="expand">False</property> + <property name="homogeneous">True</property> </packing> </child> <child> - <object class="GtkGrid" id="grid4"> + <object class="GtkRadioToolButton" id="noshadow"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkImage" id="shadowx"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="valign">center</property> - <property name="pixbuf">svx/res/fw018.png</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="distancex:0.00mm"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|distancex|tooltip_text">Distance X</property> - <property name="text" translatable="no">0.00</property> - <property name="adjustment">adjustment1</property> - <property name="digits">2</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|noshadow|tooltip_text">No Shadow</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw013.png</property> + <property name="active">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">5</property> + <property name="expand">False</property> + <property name="homogeneous">True</property> </packing> </child> <child> - <object class="GtkGrid" id="grid5"> + <object class="GtkRadioToolButton" id="vertical"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkImage" id="shadowy"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="valign">center</property> - <property name="pixbuf">svx/res/fw019.png</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="distancey:0.00mm"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|distancey|tooltip_text">Distance Y</property> - <property name="text" translatable="no">0</property> - <property name="adjustment">adjustment1</property> - <property name="digits">2</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|vertical|tooltip_text">Vertical</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw014.png</property> + <property name="group">noshadow</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkRadioToolButton" id="slant"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|slant|tooltip_text">Slant</property> + <property name="use_underline">True</property> + <property name="icon_name">svx/res/fw015.png</property> + <property name="group">noshadow</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkImage" id="shadowx"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="icon_name">svx/res/fw018.png</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">6</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="distancex"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|distancex|tooltip_text">Distance X</property> + <property name="text">0.00</property> + <property name="adjustment">adjustment3</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> </packing> </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="column_spacing">12</property> <child> - <object class="svxcorelo-SvxColorListBox" id="color"> + <object class="GtkImage" id="shadowy"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes" context="dockingfontwork|color|tooltip_text">Shadow Color</property> - <property name="valign">start</property> - <property name="hexpand">True</property> + <property name="valign">center</property> + <property name="icon_name">svx/res/fw019.png</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">7</property> + <property name="top_attach">0</property> </packing> </child> + <child> + <object class="GtkSpinButton" id="distancey"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|distancey|tooltip_text">Distance Y</property> + <property name="text">0.00</property> + <property name="adjustment">adjustment4</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">6</property> + </packing> + </child> + <child> + <object class="GtkMenuButton" id="color"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="tooltip_text" translatable="yes" context="dockingfontwork|color|tooltip_text">Shadow Color</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="label" translatable="no"></property> + <child> + <placeholder/> + </child> </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">7</property> + </packing> </child> </object> <object class="GtkSizeGroup" id="sizegroup1"> <widgets> - <widget name="distance:0.00mm"/> - <widget name="indent:0.00mm"/> - <widget name="distancex:0.00mm"/> - <widget name="distancey:0.00mm"/> + <widget name="distance"/> + <widget name="indent"/> + <widget name="distancex"/> + <widget name="distancey"/> </widgets> </object> </interface> diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 00bc0160e47b..2c14d9aea412 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SW_SOURCE_UIBASE_INC_NAVIPI_HXX #include <vcl/lstbox.hxx> +#include <vcl/layout.hxx> #include <vcl/toolbox.hxx> #include <vcl/idle.hxx> #include <svl/lstner.hxx> diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 86da5fa73df2..d3159a43eb0f 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -60,9 +60,9 @@ SwRedlineAcceptChild::SwRedlineAcceptChild(vcl::Window* _pParent, SfxChildWinInfo* pInfo) : SwChildWinWrapper(_pParent, nId) { - SetController(std::make_shared<SwModelessRedlineAcceptDlg>(pBindings, this, _pParent->GetFrameWeld())); - - static_cast<SwModelessRedlineAcceptDlg*>(GetController().get())->Initialize(pInfo); + auto xDlg = std::make_shared<SwModelessRedlineAcceptDlg>(pBindings, this, _pParent->GetFrameWeld()); + SetController(xDlg); + xDlg->Initialize(pInfo); } // newly initialise dialog after document switch diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index b3f044d7ca36..7f3b81f512f1 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -17,6 +17,8 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <editeng/fontitem.hxx> +#include <vcl/bitmapex.hxx> +#include <vcl/image.hxx> #include <vcl/svapp.hxx> #include <vcl/virdev.hxx> #include <charatr.hxx> |