diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-26 18:49:29 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-08-27 08:30:49 +0900 |
commit | 48d2dca48d75fef67e3caa61d80f074fdbeb9984 (patch) | |
tree | f74d55c1ea4e86af468268a1cfaf02426f0cdc66 /include/sfx2 | |
parent | a0ab7c31a254285856f6520d069570647c56af22 (diff) |
Show previews of style presets in sidebar
Change-Id: I0e3d6f00a79bc33e1db1329df217e7e867dfd511
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/StylePreviewRenderer.hxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/sfx2/StylePreviewRenderer.hxx b/include/sfx2/StylePreviewRenderer.hxx index bc77e20792d1..1fc980409e99 100644 --- a/include/sfx2/StylePreviewRenderer.hxx +++ b/include/sfx2/StylePreviewRenderer.hxx @@ -26,8 +26,14 @@ protected: OutputDevice& mrOutputDev; SfxStyleSheetBase* mpStyle; long mnMaxHeight; + OUString msRenderText; public: + enum class RenderAlign + { + TOP, CENTER, BOTTOM + }; + StylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle, @@ -36,14 +42,20 @@ public: , mrOutputDev(rOutputDev) , mpStyle(pStyle) , mnMaxHeight(nMaxHeight) + , msRenderText() {} virtual ~StylePreviewRenderer() {} + void setRenderText(OUString& rRenderText) + { + msRenderText = rRenderText; + } + virtual bool recalculate() = 0; virtual Size getRenderSize() = 0; - virtual bool render(const Rectangle& aRectangle) = 0; + virtual bool render(const Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) = 0; }; } // end namespace sfx2 |