/* -*- 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_LRSPITEM_HXX #define INCLUDED_EDITENG_LRSPITEM_HXX
// class SvxLRSpaceItem --------------------------------------------------
/* [Description]
Left/Right margin and first line indent
SvxLRSpaceItem offers two interfaces to get the left margin and first line indent. - The Get* methods return the member in the way the layout used to expect: with a negative first line indent, the left margin shifts to the left. - The SetText*,GetText* methods assume that the left margin represents the 0 coordinate for the first line indent:
/// GetLeft() - for everything that's not applied to a paragraph class EDITENG_DLLPUBLIC SvxLeftMarginItem final : public SfxPoolItem
{ private: /// left margin: nothing special
tools::Long m_nLeftMargin = 0;
sal_uInt16 m_nPropLeftMargin = 100;
/// GetTextLeft() - for everything that's applied to a paragraph class EDITENG_DLLPUBLIC SvxTextLeftMarginItem final : public SfxPoolItem
{ private: friendclass SvxFirstLineIndentItem; /// left margin including negative first-line indent
SvxIndentValue m_stTextLeftMargin = SvxIndentValue::zero();
sal_uInt16 m_nPropLeftMargin = 100;
/// first line indent that may be applied to paragraphs class EDITENG_DLLPUBLIC SvxFirstLineIndentItem final : public SfxPoolItem
{ private: /// First-line indent always relative to GetTextLeft()
SvxIndentValue m_stFirstLineOffset = SvxIndentValue::zero();
sal_uInt16 m_nPropFirstLineOffset = 100; /// Automatic calculation of the first line indent bool m_bAutoFirst = false;
class EDITENG_DLLPUBLIC SvxRightMarginItem final : public SfxPoolItem
{ private: /// right margin: nothing special
SvxIndentValue m_stRightMargin = SvxIndentValue::zero();
sal_uInt16 m_nPropRightMargin = 100;
/// gutter margin - for page styles class EDITENG_DLLPUBLIC SvxGutterLeftMarginItem final : public SfxPoolItem
{ private: /// The amount of extra space added to the left margin.
tools::Long m_nGutterMargin = 0;
/// gutter margin - for page styles class EDITENG_DLLPUBLIC SvxGutterRightMarginItem final : public SfxPoolItem
{ private: /// The amount of extra space added to the right margin, on mirrored pages.
tools::Long m_nRightGutterMargin = 0;
class EDITENG_DLLPUBLIC SvxLRSpaceItem final : public SfxPoolItem
{ /// First-line indent always relative to GetTextLeft()
SvxIndentValue m_stFirstLineOffset = SvxIndentValue::zero();
SvxIndentValue m_stLeftMargin
= SvxIndentValue::zero(); // nLeft or the negative first-line indent
SvxIndentValue m_stRightMargin = SvxIndentValue::zero(); /// The amount of extra space added to the left margin.
tools::Long m_nGutterMargin; /// The amount of extra space added to the right margin, on mirrored pages.
tools::Long m_nRightGutterMargin;
sal_uInt16 nPropFirstLineOffset, nPropLeftMargin, nPropRightMargin; bool bAutoFirst; // Automatic calculation of the first line indent bool bExplicitZeroMarginValRight; bool bExplicitZeroMarginValLeft;
¤ 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.0.25Bemerkung:
(vorverarbeitet am 2026-05-08)
¤
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.