From 587899f9ced03d02fbf8ffa9a3f52ba31be30818 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 5 Sep 2018 11:57:59 +0100 Subject: weld SwColumnPage and SwColumnDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia649785047db2551044b4d765881309f83b5c838 Reviewed-on: https://gerrit.libreoffice.org/60044 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/svtools/ctrlbox.hxx | 7 ++- include/svtools/valueset.hxx | 7 ++- include/svx/frmdirlbox.hxx | 2 +- include/svx/pagectrl.hxx | 110 ++----------------------------------------- 4 files changed, 17 insertions(+), 109 deletions(-) (limited to 'include') diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 8df5dfdadc2b..c1cc78eb7e9f 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -294,13 +294,15 @@ public: ~SvtLineListBox(); /** Set the width in Twips */ - void SetWidth( long nWidth ) + void SetWidth(long nWidth) { m_nWidth = nWidth; UpdateEntries(); UpdatePreview(); } + long GetWidth() const { return m_nWidth; } + /** Insert a listbox entry with all widths in Twips. */ void InsertEntry(const BorderWidthImpl& rWidthImpl, SvxBorderLineStyle nStyle, long nMinWidth = 0, @@ -317,12 +319,15 @@ public: { aColor = rColor; UpdateEntries(); + UpdatePreview(); } const Color& GetColor() const { return aColor; } void SetSelectHdl(const Link& rLink) { maSelectHdl = rLink; } + void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); } + private: SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance, diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index fa4b3994de86..b1d8596eced6 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -495,9 +495,11 @@ public: virtual void LoseFocus() override; virtual void Resize() override; virtual void StyleUpdated() override; - virtual void Select(); virtual OUString RequestHelp(tools::Rectangle& rHelpRect) override; + virtual void Select(); + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + OUString const & GetText() const { return maText; } void SetText(const OUString& rText) { maText = rText; } void SetStyle(WinBits nStyle); @@ -513,6 +515,8 @@ public: const OUString& rStr); /// Insert an User Drawn item. void InsertItem(sal_uInt16 nItemId, size_t nPos = VALUESET_APPEND); + /// Insert an User Drawn item with @rStr tooltip. + void InsertItem(sal_uInt16 nItemId, const OUString& rStr, size_t nPos); void RemoveItem(sal_uInt16 nItemId); void Clear(); @@ -560,6 +564,7 @@ public: void SetExtraSpacing( sal_uInt16 nNewSpacing ); void Format(vcl::RenderContext const & rRenderContext); + void SetFormat(); Size CalcWindowSizePixel(const Size& rItemSize, sal_uInt16 nCalcCols = 0, diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx index fb2208f59190..405065199da9 100644 --- a/include/svx/frmdirlbox.hxx +++ b/include/svx/frmdirlbox.hxx @@ -70,7 +70,7 @@ public: void set_active_id(SvxFrameDirection eDir) { m_xControl->set_active_id(OUString::number(static_cast(eDir))); } void remove_id(SvxFrameDirection eDir) { m_xControl->remove_id(OUString::number(static_cast(eDir))); } void hide() { m_xControl->hide(); } - void show() { m_xControl->show(); } + void show(bool bShow = true) { m_xControl->show(bShow); } int get_count() const { return m_xControl->get_count(); } /** Inserts a string with corresponding direction enum into the listbox. */ void append(SvxFrameDirection eDirection, const OUString& rString) diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx index 074c936328c6..f2db16bbaa9b 100644 --- a/include/svx/pagectrl.hxx +++ b/include/svx/pagectrl.hxx @@ -28,112 +28,6 @@ class SvxBoxItem; enum class SvxPageUsage; enum class SvxFrameDirection; -class SVX_DLLPUBLIC SvxPageWindow : public vcl::Window -{ - using Window::GetBorder; - -private: - Size aWinSize; - Size aSize; - - long nTop; - long nBottom; - long nLeft; - long nRight; - - long nHdLeft; - long nHdRight; - long nHdDist; - long nHdHeight; - - long nFtLeft; - long nFtRight; - long nFtDist; - long nFtHeight; - - drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes; - drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes; - drawinglayer::attribute::SdrAllFillAttributesHelperPtr maPageFillAttributes; - - bool bFooter : 1; - bool bHeader : 1; - - SvxPageUsage eUsage; - -protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; - - virtual void DrawPage(vcl::RenderContext& rRenderContext, const Point& rPoint, - const bool bSecond, const bool bEnabled); - - void drawFillAttributes(vcl::RenderContext& rRenderContext, - const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, - const tools::Rectangle& rPaintRange, const tools::Rectangle& rDefineRange); - -public: - SvxPageWindow(vcl::Window* pParent); - virtual ~SvxPageWindow() override; - - void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) - { - maHeaderFillAttributes = rFillAttributes; - } - void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) - { - maFooterFillAttributes = rFillAttributes; - } - void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) - { - maPageFillAttributes = rFillAttributes; - } - const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const - { - return maPageFillAttributes; - } - void SetSize(const Size& rSize) - { - aSize = rSize; - } - const Size& GetSize() const - { - return aSize; - } - - void SetTop(long nNew) { nTop = nNew; } - void SetBottom(long nNew) { nBottom = nNew; } - void SetLeft(long nNew) { nLeft = nNew; } - void SetRight(long nNew) { nRight = nNew; } - - long GetTop() const { return nTop; } - long GetBottom() const { return nBottom; } - long GetLeft() const { return nLeft; } - long GetRight() const { return nRight; } - - void SetHdLeft(long nNew) { nHdLeft = nNew; } - void SetHdRight(long nNew) { nHdRight = nNew; } - void SetHdDist(long nNew) { nHdDist = nNew; } - void SetHdHeight(long nNew) { nHdHeight = nNew; } - - long GetHdDist() const { return nHdDist; } - long GetHdHeight() const { return nHdHeight; } - - void SetFtLeft(long nNew) { nFtLeft = nNew; } - void SetFtRight(long nNew) { nFtRight = nNew; } - void SetFtDist(long nNew) { nFtDist = nNew; } - void SetFtHeight(long nNew) { nFtHeight = nNew; } - - long GetFtDist() const { return nFtDist; } - long GetFtHeight() const { return nFtHeight; } - - void SetUsage(SvxPageUsage eU) { eUsage = eU; } - SvxPageUsage GetUsage() const { return eUsage; } - - void SetHeader( bool bNew ) { bHeader = bNew; } - void SetFooter( bool bNew ) { bFooter = bNew; } - - virtual Size GetOptimalSize() const override; -}; - class SVX_DLLPUBLIC PageWindow : public weld::CustomWidgetController { private: @@ -198,6 +92,10 @@ public: { maPageFillAttributes = rFillAttributes; } + const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const + { + return maPageFillAttributes; + } void SetSize(const Size& rSize) { aSize = rSize; -- cgit