/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_EDITENG_FONTITEM_HXX #define INCLUDED_EDITENG_FONTITEM_HXX #include #include #include #include class SvXMLUnitConverter; /** This item describes a Font. */ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem { OUString aFamilyName; OUString aStyleName; FontFamily eFamily; FontPitch ePitch; rtl_TextEncoding eTextEncoding; static bool bEnableStoreUnicodeNames; public: static SfxPoolItem* CreateDefault(); explicit SvxFontItem(const sal_uInt16 nId); SvxFontItem(const FontFamily eFam, const OUString& rFamilyName, const OUString& rStyleName, const FontPitch eFontPitch /*= PITCH_DONTKNOW*/, const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/, const sal_uInt16 nId); // "pure virtual Methods" from SfxPoolItem virtual bool operator==(const SfxPoolItem& rItem) const override; virtual SfxPoolItem* Clone(SfxItemPool *pPool = nullptr) const override; virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16) const override; virtual SvStream& Store(SvStream& rStream, sal_uInt16 nItemVersion) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override; virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper&) const override; // Access methods: void SetFamilyName(const OUString& rFamilyName) { aFamilyName = rFamilyName; } const OUString &GetFamilyName() const { return aFamilyName; } void SetStyleName(const OUString &rStyleName) { aStyleName = rStyleName; } const OUString &GetStyleName() const { return aStyleName; } void SetFamily(FontFamily _eFamily) { eFamily = _eFamily; } FontFamily GetFamily() const { return eFamily; } void SetPitch(FontPitch _ePitch) { ePitch = _ePitch; } FontPitch GetPitch() const { return ePitch; } void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; } rtl_TextEncoding GetCharSet() const { return eTextEncoding; } SvxFontItem& operator=(const SvxFontItem& rFont); SvxFontItem(SvxFontItem const &) = default; // SfxPoolItem copy function dichotomy void dumpAsXml(struct _xmlTextWriter* pWriter) const override; }; EDITENG_DLLPUBLIC void GetDefaultFonts(SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rComplex); #endif // INCLUDED_EDITENG_FONTITEM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 2'>distro/collabora/dcm-6.2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-04tdf#153880 sc: Make Calc text hyperlinks stand out moreBalazs Varga
Add underlining for links in Calc. TODO: unit test Change-Id: Idd5a7de7464d8ce443cdec756ac803491e73b0ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149913 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2020-03-02tdf#42949 Fix IWYU warnings in svx/source/s*/*cxxGabor Kelemen
Except for already done svx/source/sdr/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I1c4b34cf42aa9faa2f7de36fe1602059460c6c1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89656 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>