LibreOffice Module sw (master) 1
txtatr.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_TXTATR_HXX
20#define INCLUDED_SW_INC_TXTATR_HXX
21
22#include "txatbase.hxx"
23#include "calbck.hxx"
24
25class SwTextNode;
26class SwCharFormat;
27class SwFormatMeta;
28
29namespace sw {
30 class MetaFieldManager;
31}
32
33class SwTextCharFormat final : public SwTextAttrEnd
34{
36 sal_uInt16 m_nSortNumber;
37
38public:
39 SwTextCharFormat( SwFormatCharFormat& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
40 virtual ~SwTextCharFormat( ) override;
41
43 bool GetInfo( SfxPoolItem const & rInfo ) const;
44
45 // get and set TextNode pointer
46 void ChgTextNode( SwTextNode* pNew ) { m_pTextNode = pNew; }
47
48 void SetSortNumber( sal_uInt16 nSortNumber ) { m_nSortNumber = nSortNumber; }
49 sal_uInt16 GetSortNumber() const { return m_nSortNumber; }
50};
51
52
53class SwTextMeta final : public SwTextAttrNesting
54{
55private:
56 SwTextMeta( SwFormatMeta & i_rAttr,
57 const sal_Int32 i_nStart, const sal_Int32 i_nEnd );
58
59public:
61 ::sw::MetaFieldManager & i_rTargetDocManager,
62 SwTextNode *const i_pTargetTextNode,
63 SwFormatMeta & i_rAttr,
64 sal_Int32 const i_nStart, sal_Int32 const i_nEnd,
65 bool const i_bIsCopy);
66
67 virtual ~SwTextMeta() override;
68
69 void ChgTextNode(SwTextNode * const pNode);
70};
71
72
74{
76 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
77public:
78 SwTextRuby( SwFormatRuby& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
79 virtual ~SwTextRuby() override;
80
81 virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
82
83 SAL_DLLPRIVATE void InitRuby(SwTextNode & rNode);
84
86 inline const SwTextNode& GetTextNode() const;
87 void ChgTextNode( SwTextNode* pNew ) { m_pTextNode = pNew; }
88
91 { return const_cast<SwTextRuby*>(this)->GetCharFormat(); }
92};
93
95{
96 assert( m_pTextNode );
97 return *m_pTextNode;
98}
99
100#endif
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Represents the style of a text portion.
Definition: charfmt.hxx:27
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: calbck.cxx:120
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:173
SwFormatMeta is a pool item subclass that owns a Meta.
Definition: fmtmeta.hxx:93
const SwFormatCharFormat & GetCharFormat() const
Definition: txatbase.hxx:187
SwTextCharFormat(SwFormatCharFormat &rAttr, sal_Int32 nStart, sal_Int32 nEnd)
Definition: txtatr2.cxx:37
virtual ~SwTextCharFormat() override
Definition: txtatr2.cxx:48
bool GetInfo(SfxPoolItem const &rInfo) const
Definition: txtatr2.cxx:71
SwTextNode * m_pTextNode
Definition: txtatr.hxx:35
void SetSortNumber(sal_uInt16 nSortNumber)
Definition: txtatr.hxx:48
void ChgTextNode(SwTextNode *pNew)
Definition: txtatr.hxx:46
void TriggerNodeUpdate(const sw::LegacyModifyHint &)
Definition: txtatr2.cxx:52
sal_uInt16 m_nSortNumber
Definition: txtatr.hxx:36
sal_uInt16 GetSortNumber() const
Definition: txtatr.hxx:49
static SwTextMeta * CreateTextMeta(::sw::MetaFieldManager &i_rTargetDocManager, SwTextNode *const i_pTargetTextNode, SwFormatMeta &i_rAttr, sal_Int32 const i_nStart, sal_Int32 const i_nEnd, bool const i_bIsCopy)
Definition: txtatr2.cxx:258
SwTextMeta(SwFormatMeta &i_rAttr, const sal_Int32 i_nStart, const sal_Int32 i_nEnd)
Definition: txtatr2.cxx:275
void ChgTextNode(SwTextNode *const pNode)
Definition: txtatr2.cxx:293
virtual ~SwTextMeta() override
Definition: txtatr2.cxx:284
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
const SwTextNode & GetTextNode() const
Get and set TextNode pointer.
Definition: txtatr.hxx:94
const SwCharFormat * GetCharFormat() const
Definition: txtatr.hxx:90
SwTextNode * m_pTextNode
Definition: txtatr.hxx:75
void ChgTextNode(SwTextNode *pNew)
Definition: txtatr.hxx:87
knows all meta-fields in the document.
Definition: fmtmeta.hxx:202
Dialog to specify the properties of date form field.
#define SW_DLLPUBLIC
Definition: swdllapi.h:28