merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / txtrfmrk.hxx
blob7260e19fb4687e7e1485b95805205af5cde98551
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: txtrfmrk.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _TXTRFMRK_HXX
31 #define _TXTRFMRK_HXX
33 #include <txatbase.hxx>
35 class SwTxtNode;
37 // SWTXT_REFMARK *************************************
38 // Attribut fuer Inhalts-/Positions-Referenzen im Text
40 class SwTxtRefMark : public SwTxtAttrEnd
42 SwTxtNode * m_pTxtNode;
43 xub_StrLen * m_pEnd; // end is optional (point reference)
45 public:
46 SwTxtRefMark( SwFmtRefMark& rAttr,
47 xub_StrLen nStart, xub_StrLen * pEnd = 0 );
49 virtual xub_StrLen * GetEnd(); // SwTxtAttr
50 inline const xub_StrLen * GetEnd() const { return m_pEnd; }
52 // get and set TxtNode pointer
53 inline const SwTxtNode& GetTxtNode() const;
54 void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
57 inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
59 ASSERT( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" );
60 return *m_pTxtNode;
63 #endif