LibreOffice Module sw (master) 1
fmtline.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SW_INC_FMTLINE_HXX
20#define INCLUDED_SW_INC_FMTLINE_HXX
21
22#include <svl/poolitem.hxx>
23#include <tools/solar.h>
24#include "hintids.hxx"
25#include "swdllapi.h"
26#include "swatrset.hxx"
27
28class IntlWrapper;
29
31{
33 bool m_bCountLines :1;
34
35public:
37 virtual ~SwFormatLineNumber() override;
38
41 SwFormatLineNumber & operator =(SwFormatLineNumber const &) = delete; // due to SfxPoolItem
42 SwFormatLineNumber & operator =(SwFormatLineNumber &&) = delete; // due to SfxPoolItem
43
44 static SfxPoolItem* CreateDefault();
45
47 virtual bool operator==( const SfxPoolItem& ) const override;
48 virtual SwFormatLineNumber* Clone( SfxItemPool* pPool = nullptr ) const override;
49 virtual bool GetPresentation( SfxItemPresentation ePres,
50 MapUnit eCoreMetric,
51 MapUnit ePresMetric,
52 OUString &rText,
53 const IntlWrapper& rIntl ) const override;
54 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
55 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
56
57 sal_uLong GetStartValue() const { return m_nStartValue; }
58 bool IsCount() const { return m_bCountLines; }
59
60 void SetStartValue( sal_uLong nNew ) { m_nStartValue = nNew; }
61 void SetCountLines( bool b ) { m_bCountLines = b; }
62};
63
64inline const SwFormatLineNumber &SwAttrSet::GetLineNumber(bool bInP) const
65 { return Get( RES_LINENUMBER,bInP); }
66
67#endif
68
69/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
virtual bool operator==(const SfxPoolItem &) const=0
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
SfxPoolItem & operator=(const SfxPoolItem &)=delete
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
const SwFormatLineNumber & GetLineNumber(bool=true) const
Definition: fmtline.hxx:64
bool IsCount() const
Definition: fmtline.hxx:58
sal_uLong m_nStartValue
Starting value for the paragraph. 0 == no starting value.
Definition: fmtline.hxx:32
bool m_bCountLines
Also count lines of paragraph.
Definition: fmtline.hxx:33
sal_uLong GetStartValue() const
Definition: fmtline.hxx:57
SwFormatLineNumber(SwFormatLineNumber &&)=default
void SetCountLines(bool b)
Definition: fmtline.hxx:61
SwFormatLineNumber(SwFormatLineNumber const &)=default
void SetStartValue(sal_uLong nNew)
Definition: fmtline.hxx:60
constexpr TypedWhichId< SwFormatLineNumber > RES_LINENUMBER(116)
MapUnit
SfxItemPresentation
sal_uIntPtr sal_uLong
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8