Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / CommonStylePreviewRenderer.hxx
blob0a7dd8944cf1d68c19ca54568387012236890bfa
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 <vcl/outdev.hxx>
14 #include <rsc/rscsfx.hxx>
15 #include <editeng/svxfont.hxx>
16 #include <svx/svxdllapi.h>
18 #include <sfx2/StylePreviewRenderer.hxx>
20 namespace svx
23 class SVX_DLLPUBLIC CommonStylePreviewRenderer : public sfx2::StylePreviewRenderer
25 std::unique_ptr<SvxFont> m_pFont;
26 Color maFontColor;
27 Color maBackgroundColor;
28 Size maPixelSize;
29 OUString maStyleName;
31 public:
32 CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev,
33 SfxStyleSheetBase* pStyle, long nMaxHeight = 32);
34 virtual ~CommonStylePreviewRenderer();
36 virtual bool recalculate() SAL_OVERRIDE;
37 virtual Size getRenderSize() SAL_OVERRIDE;
38 virtual bool render(const Rectangle& aRectangle) SAL_OVERRIDE;
41 } // end namespace svx
43 #endif // INCLUDED_SVX_COMMONSTYLEPREVIEWRENDERER_HXX
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */