/* -*- 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_UNOTOOLS_FONTDEFS_HXX #define INCLUDED_UNOTOOLS_FONTDEFS_HXX #include #include #include #include #include #include namespace utl { class FontSubstConfiguration; struct FontNameAttr; } enum class SubsFontFlags { ONLYONE = 0x01, MS = 0x02, PS = 0x04, HTML = 0x08, }; namespace o3tl { template<> struct typed_flags : is_typed_flags {}; } UNOTOOLS_DLLPUBLIC OUString GetSubsFontName( const OUString& rName, SubsFontFlags nFlags ); UNOTOOLS_DLLPUBLIC void AddTokenFontName( OUString& rName, const OUString& rNewToken ); class UNOTOOLS_DLLPUBLIC ConvertChar { public: const sal_Unicode* mpCvtTab; const char* mpSubsFontName; sal_Unicode (*mpCvtFunc)( sal_Unicode ); sal_Unicode RecodeChar( sal_Unicode c ) const; void RecodeString( OUString& rStra, sal_Int32 nIndex, sal_Int32 nLen ) const; static const ConvertChar* GetRecodeData( const OUString& rOrgFontName, const OUString& rMapFontName ); }; enum class DefaultFontType { SANS_UNICODE = 1, SANS = 2, SERIF = 3, FIXED = 4, SYMBOL = 5, UI_SANS = 1000, UI_FIXED = 1001, LATIN_TEXT = 2000, LATIN_PRESENTATION = 2001, LATIN_SPREADSHEET = 2002, LATIN_HEADING = 2003, LATIN_DISPLAY = 2004, LATIN_FIXED = 2005, CJK_TEXT = 3000, CJK_PRESENTATION = 3001, CJK_SPREADSHEET = 3002, CJK_HEADING = 3003, CJK_DISPLAY = 3004, CTL_TEXT = 4000, CTL_PRESENTATION = 4001, CTL_SPREADSHEET = 4002, CTL_HEADING = 4003, CTL_DISPLAY = 4004, }; UNOTOOLS_DLLPUBLIC OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex ); UNOTOOLS_DLLPUBLIC OUString GetEnglishSearchFontName( const OUString& rName ); /** Strip any "script font suffix" from the font name Related: fdo#49271 RTF files often contain weird-ass Win 3.1/Win95 style fontnames which attempt to put the charset encoding into the filename http://www.webcenter.ru/~kazarn/eng/fonts_ttf.htm */ UNOTOOLS_DLLPUBLIC OUString StripScriptFromName(const OUString& rName); /** Determine if the font is the special Star|Open Symbol font @param rFontName The FontName to test for being Star|Open Symbol @return true if this is Star|Open Symbol */ // FIXME It's quite possible that code using this should instead check for RTL_TEXTENCODING_SYMBOL. UNOTOOLS_DLLPUBLIC bool IsStarSymbol(const OUString &rFontName); #endif // INCLUDED_UNOTOOLS_FONTDEFS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ alue='distro/collabora/cp-5.0'>distro/collabora/cp-5.0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2021-03-23use single-use attribute for ContextChangeEventMultiplexerNoel Grandin
2020-11-13tdf#123936 Formatting files in module framework with clang-formatPhilipp Hofer
2020-05-21use for-range on Sequence in f*Noel Grandin
2020-04-08loplugin:flatten in frameworkNoel Grandin
2019-11-20tdf#42949 Fix IWYU warnings in framework/*/*cxxGabor Kelemen
2019-07-20loplugin:referencecasting in frameworkNoel Grandin
2019-05-31Use hasElements to check Sequence emptiness in [e-i]*Arkadiy Illarionov
2018-10-23clang-tidy performance-unnecessary-copy-init in editeng..i18npoolNoel Grandin
2018-07-30Add missing sal/log.hxx headersGabor Kelemen
2018-04-01remove unused processfactory.hxx includesJochen Nitschke
2017-05-19loplugin:stringcopy: frameworkStephan Bergmann
2017-05-08cleanup tools/debug.hxx includesJochen Nitschke
2017-04-23tdf#95845 Use CommandInfoProviderMaxim Monastirsky
2016-10-18loplugin:unusedmethodsNoel Grandin
2016-07-27improve passstuffbyref return analysisNoel Grandin
2016-05-20clang-tidy misc-assign-operator-signatureNoel Grandin
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
2016-02-04loplugin:sallogareasStephan Bergmann
2016-02-04tdf#43157 Cleanup DBG_ASSERT for fpicker and frameworkBerk Gureken
2015-11-17tdf#95845 Add methods for menu labels to CommandInfoProviderSamuel Mehrbrodt
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-14com::sun::star->css in frameworkNoel Grandin
2015-09-28framework: remove obsolete Linux libc5 supportMichael Stahl
2015-07-14sfx2: remove the global SidebarController::maSidebarControllerContainerMichael Stahl
2015-05-29loplugin:loopvartoosmallNoel Grandin
2015-04-17convert SCRIPTTYPE_ constants to scoped enumNoel Grandin
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
2014-07-10improvements to ShareableMutexNoel Grandin
2014-04-18FillLangItems() doesn't need an SvtLanguageTable instanceEike Rathke
2014-04-07framework: sal_Bool->boolNoel Grandin
2014-04-06Kill superfluous vertical whitespaceTor Lillqvist
2014-02-23Remove unneccessary commentsAlexander Wilms
2014-01-28bool improvementsStephan Bergmann
2014-01-28Introduce com.sun.star.frame.theUICommandDescription singleton.Matúš Kukan