LibreOffice Module svx (master) 1
fntctrl.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SVX_FNTCTRL_HXX
20#define INCLUDED_SVX_FNTCTRL_HXX
21
22#include <memory>
23#include <editeng/svxfont.hxx>
24#include <rtl/ustring.hxx>
25#include <svx/svxdllapi.h>
26#include <vcl/customweld.hxx>
27
28class SfxItemSet;
30
32{
33private:
34 std::unique_ptr<FontPrevWin_Impl> pImpl;
35
36 SVX_DLLPRIVATE static void ApplySettings(vcl::RenderContext& rRenderContext);
37 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
38 SVX_DLLPRIVATE static void SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
39 SVX_DLLPRIVATE static void SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
40
41public:
43 virtual ~SvxFontPrevWindow() override;
44
46 const SvxFont& GetFont() const;
47 void SetFont( const SvxFont& rNormalFont, const SvxFont& rCJKFont, const SvxFont& rCTLFont );
48 SvxFont& GetCJKFont();
49 SvxFont& GetCTLFont();
50 void SetColor( const Color& rColor );
51 void ResetColor();
52 void SetTextLineColor(const Color& rColor);
53 void SetOverlineColor(const Color& rColor);
54 void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override;
55
56 bool IsTwoLines() const;
57 void SetTwoLines(bool bSet);
58
59 void SetBrackets(sal_Unicode cStart, sal_Unicode cEnd);
60
61 void SetFontWidthScale( sal_uInt16 nScaleInPercent );
62
63 void AutoCorrectFontColor();
64
65 void SetPreviewText( const OUString& rString );
66 void SetFontNameAsPreviewText();
67
68 void SetFromItemSet( const SfxItemSet &rSet,
69 bool bPreviewBackgroundToCharacter );
70};
71
72#endif // INCLUDED_SVX_FNTCTRL_HXX
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< FontPrevWin_Impl > pImpl
Definition: fntctrl.hxx:34
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
static bool SetFont(const SfxItemSet &rSet, sal_uInt16 nSlot, SvxFont &rFont)
Definition: tbcontrl.cxx:1302
static bool SetFontSize(vcl::RenderContext &rRenderContext, const SfxItemSet &rSet, sal_uInt16 nSlot, SvxFont &rFont)
Definition: tbcontrl.cxx:1315
sal_uInt16 sal_Unicode
#define SAL_WARN_UNUSED