1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: reffld.hxx,v $
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 ************************************************************************/
68 /*--------------------------------------------------------------------
69 Beschreibung: Referenz holen
70 --------------------------------------------------------------------*/
72 class SwGetRefFieldType
: public SwFieldType
76 SwGetRefFieldType(SwDoc
* pDoc
);
77 virtual SwFieldType
* Copy() const;
79 SwDoc
* GetDoc() const { return pDoc
; }
80 // ueberlagert, um alle Ref-Felder zu updaten
81 virtual void Modify( SfxPoolItem
*, SfxPoolItem
* );
83 void MergeWithOtherDoc( SwDoc
& rDestDoc
);
85 static SwTxtNode
* FindAnchor( SwDoc
* pDoc
, const String
& rRefMark
,
86 USHORT nSubType
, USHORT nSeqNo
,
87 USHORT
* pStt
, USHORT
* pEnd
= 0 );
90 /*--------------------------------------------------------------------
91 Beschreibung: Referenzfeld
92 --------------------------------------------------------------------*/
94 class SwGetRefField
: public SwField
101 SwGetRefField( SwGetRefFieldType
*, const String
& rSetRef
,
102 USHORT nSubType
, USHORT nSeqNo
, ULONG nFmt
);
104 virtual String
GetCntnt(BOOL bName
= FALSE
) const;
105 virtual String
Expand() const;
106 virtual SwField
* Copy() const;
108 const String
& GetSetRefName() const { return sSetRefName
; }
111 void SetExpand( const String
& rStr
) { sTxt
= rStr
; }
113 // SubType erfragen/setzen
114 virtual USHORT
GetSubType() const;
115 virtual void SetSubType( USHORT n
);
117 // SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant)
118 USHORT
GetSeqNo() const { return nSeqNo
; }
119 void SetSeqNo( USHORT n
) { nSeqNo
= n
; }
122 virtual const String
& GetPar1() const;
123 virtual void SetPar1(const String
& rStr
);
125 virtual String
GetPar2() const;
126 virtual BOOL
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMId
) const;
127 virtual BOOL
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMId
);
129 void ConvertProgrammaticToUIName();
133 } //namespace binfilter
134 #endif // _REFFLD_HXX