1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SVX_COMMONSTYLEPREVIEWRENDERER_HXX
11 #define INCLUDED_SVX_COMMONSTYLEPREVIEWRENDERER_HXX
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>
23 class SfxStyleSheetBase
;
29 class SVX_DLLPUBLIC CommonStylePreviewRenderer final
: public sfx2::StylePreviewRenderer
31 std::unique_ptr
<SvxFont
> m_pFont
;
33 Color maBackgroundColor
;
35 OUString
const maStyleName
;
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: */