update ooo310-m15
[ooovba.git] / sw / inc / txtrfmrk.hxx
blob70e82d69c37c3c9cfc78e8866d2e18b23f9aaac0
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* pMyTxtNd;
43 USHORT* pEnd; // fuer InhaltsReferenz / PositionRef. ohne Ende
44 public:
45 SwTxtRefMark( const SwFmtRefMark& rAttr,
46 xub_StrLen nStart, xub_StrLen * pEnd = 0 );
48 virtual xub_StrLen *GetEnd(); // SwTxtAttr
49 inline const xub_StrLen* GetEnd() const { return pEnd; }
51 // erfrage und setze den TxtNode Pointer
52 inline const SwTxtNode& GetTxtNode() const;
53 void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
55 inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
57 ASSERT( pMyTxtNd, "SwTxtRefMark:: wo ist mein TextNode?" );
58 return *pMyTxtNd;
61 #endif