tdf#124953: Use rangelist's combined range top-left address...
[LibreOffice.git] / include / svx / CommonStylePreviewRenderer.hxx
blob7d298c1be445539a443e67cd25e689ab33b8247e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_SVX_COMMONSTYLEPREVIEWRENDERER_HXX
11 #define INCLUDED_SVX_COMMONSTYLEPREVIEWRENDERER_HXX
13 #include <memory>
15 #include <sfx2/objsh.hxx>
16 #include <sfx2/StylePreviewRenderer.hxx>
17 #include <svx/svxdllapi.h>
18 #include <rtl/ustring.hxx>
19 #include <tools/color.hxx>
20 #include <tools/gen.hxx>
22 class OutputDevice;
23 class SfxStyleSheetBase;
24 class SvxFont;
26 namespace svx
29 class SVX_DLLPUBLIC CommonStylePreviewRenderer : public sfx2::StylePreviewRenderer
31 std::unique_ptr<SvxFont> m_pFont;
32 Color maFontColor;
33 Color maBackgroundColor;
34 Size maPixelSize;
35 OUString const maStyleName;
37 public:
38 CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev,
39 SfxStyleSheetBase* pStyle, long nMaxHeight);
40 virtual ~CommonStylePreviewRenderer() override;
42 virtual bool recalculate() override;
43 virtual Size getRenderSize() override;
44 virtual bool render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) override;
47 } // end namespace svx
49 #endif // INCLUDED_SVX_COMMONSTYLEPREVIEWRENDERER_HXX
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */