/* -*- 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 .
*/
class SwFieldPortion : public SwExpandPortion
{ friendclass SwTextFormatter;
protected:
OUString m_aExpand; // The expanded field
std::unique_ptr<SwFont> m_pFont; // For multi-line fields
TextFrameIndex m_nNextOffset; // Offset of the follow in the original string
TextFrameIndex m_nNextScriptChg;
TextFrameIndex m_nFieldLen; //< Length of field text, 1 for normal fields, any number for input fields // TODO ^ do we need this as member or is base class len enough?
SwTwips m_nViewWidth; // Screen width for empty fields bool m_bFollow : 1; // 2nd or later part of a field bool m_bLeft : 1; // Used by SwNumberPortion bool m_bHide : 1; // Used by SwNumberPortion bool m_bCenter : 1; // Used by SwNumberPortion bool m_bHasFollow : 1; // Continues on the next line bool m_bAnimated : 1; // Used by SwGrfNumPortion bool m_bNoPaint : 1; // Used by SwGrfNumPortion bool m_bReplace : 1; // Used by SwGrfNumPortion bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR) bool m_bContentControl = false;
// Field cloner for SplitGlue virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
};
class SwNumberPortion : public SwFieldPortion
{ protected:
SwTwips m_nFixWidth; // See Glues
SwTwips m_nMinDist; // Minimal distance to the text bool mbLabelAlignmentPosAndSpaceModeActive;
/** * Used in for asian layout specialities to display up to six characters * in 2 rows and 2-3 columns. * E.g.: <pre> * A.. A.. A.B A.B A.B.C A.B.C * ... ..B .C. C.D .D.E. D.E.F * </pre>
*/ class SwCombinedPortion : public SwFieldPortion
{
SwTwips m_aPos[6]; // up to six X positions
o3tl::enumarray<SwFontScript, SwTwips> m_aWidth; // one width for every scripttype
SwFontScript m_aScrType[6]; // scripttype of every character
SwTwips m_nUpPos; // the Y position of the upper baseline
SwTwips m_nLowPos; // the Y position of the lower baseline
sal_uInt8 m_nProportion; // relative font height public: explicit SwCombinedPortion( const OUString &rExpand ); virtualvoid Paint( const SwTextPaintInfo &rInf ) const override; virtualbool Format( SwTextFormatInfo &rInf ) override; virtual SwTwips GetViewWidth(const SwTextSizeInfo& rInf) const override;
};
namespace sw::mark { class Fieldmark; }
class SwFieldFormDropDownPortion : public SwFieldPortion
{ public: explicit SwFieldFormDropDownPortion(sw::mark::Fieldmark *pFieldMark, const OUString &rExpand)
: SwFieldPortion(rExpand)
, m_pFieldMark(pFieldMark)
{
} // Field cloner for SplitGlue virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.