diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-06 14:46:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-06 22:09:58 +0200 |
commit | 4d598dca80720738077e335eb17b6c757e1dc18c (patch) | |
tree | 863be9a62066c04d0f68bcc026ae0c3a655fb452 /include | |
parent | 09849abf10d70b2e4680c9b0d2ad8e977752d87b (diff) |
weld SwSectionIndentTabPage
Change-Id: I961686c1257f0d85686df06aa7c73c324d0f70b8
Reviewed-on: https://gerrit.libreoffice.org/55389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/dialoghelper.hxx | 3 | ||||
-rw-r--r-- | include/svx/paraprev.hxx | 76 |
2 files changed, 78 insertions, 1 deletions
diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx index aa0b70b457ee..f83c438f76b4 100644 --- a/include/sfx2/dialoghelper.hxx +++ b/include/sfx2/dialoghelper.hxx @@ -17,6 +17,7 @@ class DateTime; class LocaleDataWrapper; namespace vcl { class Window; } +class OutputDevice; class VclBuilderContainer; //when two tab pages both have the same basic layout with a preview on the @@ -28,7 +29,7 @@ class VclBuilderContainer; //except for the preview widget void SFX2_DLLPUBLIC setPreviewsToSamePlace(vcl::Window const *pParent, VclBuilderContainer *pPage); -Size SFX2_DLLPUBLIC getParagraphPreviewOptimalSize(const vcl::Window *pReference); +Size SFX2_DLLPUBLIC getParagraphPreviewOptimalSize(const OutputDevice& rReference); Size SFX2_DLLPUBLIC getDrawPreviewOptimalSize(const vcl::Window *pReference); diff --git a/include/svx/paraprev.hxx b/include/svx/paraprev.hxx index 6c702f88c021..59c07e5eacfd 100644 --- a/include/svx/paraprev.hxx +++ b/include/svx/paraprev.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_SVX_PARAPREV_HXX #define INCLUDED_SVX_PARAPREV_HXX +#include <vcl/customweld.hxx> #include <vcl/window.hxx> #include <editeng/svxenum.hxx> #include <svx/svxdllapi.h> @@ -111,6 +112,81 @@ public: } }; +class SVX_DLLPUBLIC ParaPrevWindow final : public weld::CustomWidgetController +{ + Size aSize; + + // indentation + long nLeftMargin; + long nRightMargin; + short nFirstLineOfst; + // distances + sal_uInt16 nUpper; + sal_uInt16 nLower; + // adjustment + SvxAdjust eAdjust; + // last line in justification + SvxAdjust eLastLine; + // line distance + SvxPrevLineSpace eLine; + + OUString aText; + tools::Rectangle Lines[9]; + + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + void DrawParagraph(vcl::RenderContext& rRenderContext); + +public: + ParaPrevWindow(); + + void SetFirstLineOfst( short nNew ) + { + nFirstLineOfst = nNew; + } + void SetLeftMargin( long nNew ) + { + nLeftMargin = nNew; + } + void SetRightMargin( long nNew ) + { + nRightMargin = nNew; + } + void SetUpper( sal_uInt16 nNew ) + { + nUpper = nNew; + } + void SetLower( sal_uInt16 nNew ) + { + nLower = nNew; + } + void SetAdjust( SvxAdjust eNew ) + { + eAdjust = eNew; + } + void SetLastLine( SvxAdjust eNew ) + { + eLastLine = eNew; + } + void SetLineSpace( SvxPrevLineSpace eNew ) + { + eLine = eNew; + } + void SetText( const OUString& rStr ) + { + aText = rStr; + } + void SetSize( Size aNew ) + { + aSize = aNew; + } + OUString GetText() const + { + return aText; + } +}; + + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |