1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <txatbase.hxx>
23 #include <tools/string.hxx>
28 // ATT_FLD ***********************************
30 class SwTxtFld
: public SwTxtAttr
32 mutable String m_aExpand
;
33 SwTxtNode
* m_pTxtNode
;
36 SwTxtFld(SwFmtFld
& rAttr
, xub_StrLen
const nStart
,
37 bool const bInClipboard
);
40 void CopyFld( SwTxtFld
*pDest
) const;
42 inline void ExpandAlways();
44 // get and set TxtNode pointer
45 SwTxtNode
* GetpTxtNode() const { return m_pTxtNode
; }
46 inline SwTxtNode
& GetTxtNode() const;
47 void ChgTxtNode( SwTxtNode
* pNew
) { m_pTxtNode
= pNew
; }
48 // enable notification that field content has changed and needs reformatting
49 void NotifyContentChange(SwFmtFld
& rFmtFld
);
52 Returns position of this field.
54 @return position of this field. Has to be deleted explicitly.
58 inline SwTxtNode
& SwTxtFld::GetTxtNode() const
60 OSL_ENSURE( m_pTxtNode
, "SwTxtFld:: where is my TxtNode?" );
64 inline void SwTxtFld::ExpandAlways()
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */