Bump version to 21.06.18.1
[LibreOffice.git] / sw / inc / fmtline.hxx
blob82a444829f779610e2bc76eb205963172919fa51
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_INC_FMTLINE_HXX
20 #define INCLUDED_SW_INC_FMTLINE_HXX
22 #include <svl/poolitem.hxx>
23 #include <tools/solar.h>
24 #include "hintids.hxx"
25 #include "swdllapi.h"
26 #include "swatrset.hxx"
28 class IntlWrapper;
30 class SW_DLLPUBLIC SwFormatLineNumber: public SfxPoolItem
32 sal_uLong m_nStartValue :24; ///< Starting value for the paragraph. 0 == no starting value.
33 bool m_bCountLines :1; ///< Also count lines of paragraph.
35 public:
36 SwFormatLineNumber();
37 virtual ~SwFormatLineNumber() override;
39 SwFormatLineNumber(SwFormatLineNumber const &) = default;
40 SwFormatLineNumber(SwFormatLineNumber &&) = default;
41 SwFormatLineNumber & operator =(SwFormatLineNumber const &) = delete; // due to SfxPoolItem
42 SwFormatLineNumber & operator =(SwFormatLineNumber &&) = delete; // due to SfxPoolItem
44 static SfxPoolItem* CreateDefault();
46 /// "Pure virtual methods" of SfxPoolItem.
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;
57 sal_uLong GetStartValue() const { return m_nStartValue; }
58 bool IsCount() const { return m_bCountLines; }
60 void SetStartValue( sal_uLong nNew ) { m_nStartValue = nNew; }
61 void SetCountLines( bool b ) { m_bCountLines = b; }
64 inline const SwFormatLineNumber &SwAttrSet::GetLineNumber(bool bInP) const
65 { return Get( RES_LINENUMBER,bInP); }
67 #endif
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */