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: rtf.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 ************************************************************************/
33 #include <tools/solar.h>
35 // Umsetzung einiger FlyFrame-Attribute
41 USHORT nRelOrient
: 1;
47 RTFVertOrient( USHORT nValue
) { Value
.nVal
= nValue
; }
49 RTFVertOrient( USHORT nOrient
, USHORT nRelOrient
) {
50 Value
.Flags
.nOrient
= nOrient
;
51 Value
.Flags
.nRelOrient
= nRelOrient
;
54 USHORT
GetOrient() const { return Value
.Flags
.nOrient
; }
55 USHORT
GetRelation() const { return Value
.Flags
.nRelOrient
; }
56 USHORT
GetValue() const { return Value
.nVal
; }
65 USHORT nRelAnchor
: 4;
66 USHORT nRelOrient
: 1;
72 RTFHoriOrient( USHORT nValue
) { Value
.nVal
= nValue
; }
74 RTFHoriOrient( USHORT nOrient
, USHORT nRelOrient
) {
75 Value
.Flags
.nOrient
= nOrient
;
76 Value
.Flags
.nRelOrient
= nRelOrient
;
77 Value
.Flags
.nRelAnchor
= 0;
80 USHORT
GetOrient() const { return Value
.Flags
.nOrient
; }
81 USHORT
GetRelation() const { return Value
.Flags
.nRelOrient
; }
82 USHORT
GetValue() const { return Value
.nVal
; }
96 RTFProtect( BYTE nValue
) { Value
.nVal
= nValue
; }
98 RTFProtect( BOOL bCntnt
, BOOL bSize
, BOOL bPos
) {
99 Value
.Flags
.bCntnt
= bCntnt
;
100 Value
.Flags
.bSize
= bSize
;
101 Value
.Flags
.bPos
= bPos
;
104 BOOL
GetCntnt() const { return Value
.Flags
.bCntnt
; }
105 BOOL
GetSize() const { return Value
.Flags
.bSize
; }
106 BOOL
GetPos() const { return Value
.Flags
.bPos
; }
107 USHORT
GetValue() const { return Value
.nVal
; }
121 RTFSurround( BYTE nValue
) { Value
.nVal
= nValue
; }
123 RTFSurround( BOOL bGoldCut
, BYTE nOrder
) {
124 Value
.Flags
.nOrder
= nOrder
;
125 Value
.Flags
.nGoldCut
= bGoldCut
;
128 BYTE
GetOrder() const { return (BYTE
)Value
.Flags
.nOrder
; }
129 BOOL
GetGoldCut() const { return (BOOL
)Value
.Flags
.nGoldCut
; }
130 USHORT
GetValue() const { return Value
.nVal
; }