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 
28 class SfxItemSet;
29 class FontPrevWin_Impl;
30 
32 {
33 private:
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 
41 public:
43  virtual ~SvxFontPrevWindow() override;
44 
45  SvxFont& GetFont();
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: */
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
sal_uInt16 sal_Unicode
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
#define SAL_WARN_UNUSED
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
std::unique_ptr< FontPrevWin_Impl > pImpl
Definition: fntctrl.hxx:34
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0