LibreOffice Module svx (master)  1
CommonStylePreviewRenderer.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #pragma once
11 
12 #include <memory>
13 
14 #include <sfx2/objsh.hxx>
16 #include <rtl/ustring.hxx>
17 #include <tools/color.hxx>
18 #include <tools/gen.hxx>
19 
20 class OutputDevice;
21 class SfxStyleSheetBase;
22 class SvxFont;
23 
24 namespace svx
25 {
27 {
28  std::unique_ptr<SvxFont> m_pFont;
32  OUString maStyleName;
33 
34  Size getRenderSize() const;
35 
36 public:
37  CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev,
38  SfxStyleSheetBase* pStyle, long nMaxHeight);
39  virtual ~CommonStylePreviewRenderer() override;
40 
41  virtual bool recalculate() override;
42  virtual bool render(const tools::Rectangle& aRectangle,
43  RenderAlign eRenderAlign = RenderAlign::CENTER) override;
44 };
45 
46 } // end namespace svx
47 
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CommonStylePreviewRenderer(const SfxObjectShell &rShell, OutputDevice &rOutputDev, SfxStyleSheetBase *pStyle, long nMaxHeight)
virtual bool render(const tools::Rectangle &aRectangle, RenderAlign eRenderAlign=RenderAlign::CENTER) override