LibreOffice Module sc (master) 1
fonthelper.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
10#pragma once
11
12#include "scdllapi.h"
13#include <optional>
14#include <tools/fontenum.hxx>
15#include <tools/color.hxx>
16#include <vcl/fntstyle.hxx>
17#include <i18nlangtag/lang.h>
18
19class SvxFontItem;
20
22{
23 std::optional<const SvxFontItem*> pFontAttr;
24 std::optional<sal_uInt32> nFontHeight;
25 std::optional<FontWeight> eWeight;
26 std::optional<FontItalic> eItalic;
27 std::optional<FontLineStyle> eUnder;
28 std::optional<FontLineStyle> eOver;
29 std::optional<bool> bWordLine;
30 std::optional<FontStrikeout> eStrike;
31 std::optional<bool> bOutline;
32 std::optional<bool> bShadow;
33 std::optional<FontEmphasisMark> eEmphasis;
34 std::optional<FontRelief> eRelief;
35 std::optional<Color> aColor;
36 std::optional<LanguageType> eLang;
37
38 bool isEmpty() const
39 {
40 return !(pFontAttr || nFontHeight ||
41 eWeight || eItalic || eUnder ||
42 eOver || bWordLine || eStrike ||
43 bOutline || bShadow || eEmphasis ||
44 eRelief || aColor || eLang);
45 }
46};
47
48/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
std::optional< bool > bShadow
Definition: fonthelper.hxx:32
std::optional< const SvxFontItem * > pFontAttr
Definition: fonthelper.hxx:23
std::optional< bool > bOutline
Definition: fonthelper.hxx:31
std::optional< bool > bWordLine
Definition: fonthelper.hxx:29
std::optional< FontLineStyle > eUnder
Definition: fonthelper.hxx:27
std::optional< FontItalic > eItalic
Definition: fonthelper.hxx:26
std::optional< FontLineStyle > eOver
Definition: fonthelper.hxx:28
std::optional< FontRelief > eRelief
Definition: fonthelper.hxx:34
std::optional< LanguageType > eLang
Definition: fonthelper.hxx:36
std::optional< FontStrikeout > eStrike
Definition: fonthelper.hxx:30
std::optional< FontEmphasisMark > eEmphasis
Definition: fonthelper.hxx:33
std::optional< sal_uInt32 > nFontHeight
Definition: fonthelper.hxx:24
bool isEmpty() const
Definition: fonthelper.hxx:38
std::optional< FontWeight > eWeight
Definition: fonthelper.hxx:25
std::optional< Color > aColor
Definition: fonthelper.hxx:35