diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-29 14:14:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-30 09:53:31 +0200 |
commit | 0871c62fab7effd915d54caf953fd6b7e8de2372 (patch) | |
tree | 812408fcbd822f11f06a6180840a1d0777fbd56e /sw/source/uibase | |
parent | 16073ff56f792144bf262795869f7e5413eca8fc (diff) |
weld SwRedlineOptionsTabPage
Change-Id: Ic901356d399e8d758747f0fea07d3656fbf89aab
Reviewed-on: https://gerrit.libreoffice.org/76559
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/optpage.hxx | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 0a6f191ae32e..97af1974b1ea 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -264,10 +264,8 @@ public: }; // mark preview -class SwMarkPreview : public vcl::Window +class SwMarkPreview : public weld::CustomWidgetController { - Size m_aInitialSize; - Color m_aBgCol; // background Color const m_aTransCol; // transparency Color m_aMarkCol; // marks @@ -282,51 +280,52 @@ class SwMarkPreview : public vcl::Window sal_uInt16 nMarkPos; - void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; void PaintPage(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect); void InitColors(); -protected: - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - public: - SwMarkPreview(vcl::Window* pParent, WinBits nWinBits); + SwMarkPreview(); + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; virtual ~SwMarkPreview() override; void SetColor(const Color& rCol) { m_aMarkCol = rCol; } void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; } - virtual Size GetOptimalSize() const override; }; // redlining options class SwRedlineOptionsTabPage : public SfxTabPage { - VclPtr<ListBox> m_pInsertLB; - VclPtr<SvxColorListBox> m_pInsertColorLB; - VclPtr<SvxFontPrevWindow> m_pInsertedPreviewWN; - - VclPtr<ListBox> m_pDeletedLB; - VclPtr<SvxColorListBox> m_pDeletedColorLB; - VclPtr<SvxFontPrevWindow> m_pDeletedPreviewWN; - - VclPtr<ListBox> m_pChangedLB; - VclPtr<SvxColorListBox> m_pChangedColorLB; - VclPtr<SvxFontPrevWindow> m_pChangedPreviewWN; - - VclPtr<ListBox> m_pMarkPosLB; - VclPtr<SvxColorListBox> m_pMarkColorLB; - VclPtr<SwMarkPreview> m_pMarkPreviewWN; - - DECL_LINK(AttribHdl, ListBox&, void); + std::unique_ptr<weld::ComboBox> m_xInsertLB; + std::unique_ptr<ColorListBox> m_xInsertColorLB; + std::unique_ptr<FontPrevWindow> m_xInsertedPreviewWN; + std::unique_ptr<weld::CustomWeld> m_xInsertedPreview; + + std::unique_ptr<weld::ComboBox> m_xDeletedLB; + std::unique_ptr<ColorListBox> m_xDeletedColorLB; + std::unique_ptr<FontPrevWindow> m_xDeletedPreviewWN; + std::unique_ptr<weld::CustomWeld> m_xDeletedPreview; + + std::unique_ptr<weld::ComboBox> m_xChangedLB; + std::unique_ptr<ColorListBox> m_xChangedColorLB; + std::unique_ptr<FontPrevWindow> m_xChangedPreviewWN; + std::unique_ptr<weld::CustomWeld> m_xChangedPreview; + + std::unique_ptr<weld::ComboBox> m_xMarkPosLB; + std::unique_ptr<ColorListBox> m_xMarkColorLB; + std::unique_ptr<SwMarkPreview> m_xMarkPreviewWN; + std::unique_ptr<weld::CustomWeld> m_xMarkPreview; + + DECL_LINK(AttribHdl, weld::ComboBox&, void); void ChangedMaskPrev(); - DECL_LINK(ChangedMaskPrevHdl, ListBox&, void); - DECL_LINK(ChangedMaskColorPrevHdl, SvxColorListBox&, void); - DECL_LINK(ColorHdl, SvxColorListBox&, void); + DECL_LINK(ChangedMaskPrevHdl, weld::ComboBox&, void); + DECL_LINK(ChangedMaskColorPrevHdl, ColorListBox&, void); + DECL_LINK(ColorHdl, ColorListBox&, void); - static void InitFontStyle(SvxFontPrevWindow& rExampleWin); + static void InitFontStyle(FontPrevWindow& rExampleWin, const OUString& rText); public: - SwRedlineOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet); + SwRedlineOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet); virtual ~SwRedlineOptionsTabPage() override; virtual void dispose() override; |