1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
/*************************************************************************
*
* $RCSfile: uiitems.cxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifdef PRECOMPILED
#include "ui_pch.hxx"
#endif
#pragma hdrstop
#ifndef _SVX_ITEMTYPE_HXX
#include <svx/itemtype.hxx>
#endif
#ifndef _UNOSETT_HXX
#include <unosett.hxx>
#endif
#include "uiparam.hxx"
#include "swtypes.hxx"
#include "cmdid.h"
#include "pagedesc.hxx"
#include "uiitems.hxx"
#include "utlui.hrc"
#include "attrdesc.hrc"
using namespace ::com::sun::star;
// Breitenangaben der Fussnotenlinien, mit TabPage abstimmen
static const USHORT __FAR_DATA nFtnLines[] = {
0,
10,
50,
80,
100,
150
};
#define FTN_LINE_STYLE_COUNT 5
SwPageFtnInfoItem::SwPageFtnInfoItem( const USHORT nId, SwPageFtnInfo& rInfo) :
SfxPoolItem( nId ),
aFtnInfo(rInfo)
{
}
SwPageFtnInfoItem::SwPageFtnInfoItem( const SwPageFtnInfoItem& rItem ) :
SfxPoolItem( rItem ),
aFtnInfo(rItem.GetPageFtnInfo())
{
}
SwPageFtnInfoItem::~SwPageFtnInfoItem()
{
}
SfxPoolItem* SwPageFtnInfoItem::Clone( SfxItemPool *pPool ) const
{
return new SwPageFtnInfoItem( *this );
}
int SwPageFtnInfoItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( Which() == rAttr.Which(), "keine gleichen Attribute" );
return ( aFtnInfo == ((SwPageFtnInfoItem&)rAttr).GetPageFtnInfo());
}
SfxItemPresentation SwPageFtnInfoItem::GetPresentation
(
SfxItemPresentation ePres,
SfxMapUnit eCoreUnit,
SfxMapUnit ePresUnit,
String& rText,
const International* pIntl
) const
{
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
rText.Erase();
return SFX_ITEM_PRESENTATION_NONE;
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
USHORT nHght = (USHORT) GetPageFtnInfo().GetHeight();
if ( nHght )
{
rText = SW_RESSTR( STR_MAX_FTN_HEIGHT );
rText += ' ';
rText += ::GetMetricText( nHght, eCoreUnit, ePresUnit );
rText += ::GetSvxString( ::GetMetricId( ePresUnit ) );
}
return ePres;
}
}
return SFX_ITEM_PRESENTATION_NONE;
}
SwPtrItem::SwPtrItem( const USHORT nId, void* pPtr ) :
SfxPoolItem( nId ),
pMisc(pPtr)
{
}
/*--------------------------------------------------------------------
Beschreibung: Copy-Konstruktor
--------------------------------------------------------------------*/
SwPtrItem::SwPtrItem( const SwPtrItem& rItem ) : SfxPoolItem( rItem )
{
pMisc = rItem.pMisc;
}
/*--------------------------------------------------------------------
Beschreibung: Clonen
--------------------------------------------------------------------*/
SfxPoolItem* SwPtrItem::Clone( SfxItemPool *pPool ) const
{
return new SwPtrItem( *this );
}
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
const SwPtrItem& rItem = (SwPtrItem&)rAttr;
return ( pMisc == rItem.pMisc );
}
/*-----------------12.11.97 12:55-------------------------------
SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten
---------------------------------------------------------------*/
SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const USHORT nId )
: SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) )
{
}
SwUINumRuleItem::SwUINumRuleItem( const String& rName, const USHORT nId )
: SfxPoolItem( nId ), pRule( new SwNumRule( rName ) )
{
}
SwUINumRuleItem::SwUINumRuleItem( const SwUINumRuleItem& rItem )
: SfxPoolItem( rItem ),
pRule( new SwNumRule( *rItem.pRule ))
{
}
SwUINumRuleItem::~SwUINumRuleItem()
{
delete pRule;
}
SfxPoolItem* SwUINumRuleItem::Clone( SfxItemPool *pPool ) const
{
return new SwUINumRuleItem( *this );
}
int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
return *pRule == *((SwUINumRuleItem&)rAttr).pRule;
}
BOOL SwUINumRuleItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
return TRUE;
}
BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
if(rVal.getValueType() == ::getCppuType((uno::Reference< container::XIndexReplace >*)0) )
{
uno::Reference< container::XIndexReplace>* pxRulesRef = (uno::Reference< container::XIndexReplace>*)rVal.getValue();
uno::Reference< lang::XUnoTunnel > xTunnel(*pxRulesRef, uno::UNO_QUERY);
SwXNumberingRules* pSwXRules = xTunnel.is() ? (SwXNumberingRules*)
xTunnel->getSomething(SwXNumberingRules::getUnoTunnelId()) : 0;
if(pSwXRules)
{
*pRule = *pSwXRules->GetNumRule();
}
}
return TRUE;
}
/* -----------------17.06.98 17:43-------------------
*
* --------------------------------------------------*/
SwBackgroundDestinationItem::SwBackgroundDestinationItem(USHORT nWhich, USHORT nValue) :
SfxUInt16Item(nWhich, nValue)
{
}
/* -----------------17.06.98 17:44-------------------
*
* --------------------------------------------------*/
SfxPoolItem* SwBackgroundDestinationItem::Clone( SfxItemPool *pPool ) const
{
return new SwBackgroundDestinationItem(Which(), GetValue());
}
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
Revision 1.37 2000/09/18 16:06:19 willem.vandorp
OpenOffice header added.
Revision 1.36 2000/05/26 16:55:03 os
includes removed
Revision 1.35 2000/05/26 07:21:35 os
old SW Basic API Slots removed
Revision 1.34 2000/03/23 07:55:38 os
UNO III
Revision 1.33 2000/03/03 15:17:05 os
StarView remainders removed
Revision 1.32 1999/09/01 08:41:58 OS
#66082# GetPresentation: new Parameter
Rev 1.31 01 Sep 1999 10:41:58 OS
#66082# GetPresentation: new Parameter
Rev 1.30 23 Feb 1999 10:22:36 OS
#61767# Kapitelnumerierung funktioniert wieder
Rev 1.29 27 Jan 1999 10:00:32 OS
#56371# TF_ONE51
Rev 1.28 26 Jun 1998 17:35:36 OS
SwBGDestItem mit Which #51751#
Rev 1.27 17 Jun 1998 18:19:06 OS
SwBackgroundDestinationItem
Rev 1.26 27 May 1998 13:40:12 OS
Put/QueryValue fuer SwUINumRuleItem
Rev 1.25 24 Mar 1998 13:46:28 JP
SwUINumRule: CTORen mit Name oder NumRule, nicht mehr mit NumRulePointer
Rev 1.24 29 Nov 1997 15:08:58 MA
includes
Rev 1.23 21 Nov 1997 12:10:18 MA
includes
Rev 1.22 17 Nov 1997 10:21:32 JP
Umstellung Numerierung
Rev 1.21 03 Nov 1997 13:59:22 MA
precomp entfernt
Rev 1.20 06 Sep 1997 10:58:32 OS
PenStyle der Fussnoten per Basic funktioniert #43272#
Rev 1.19 11 Nov 1996 10:54:14 MA
ResMgr
Rev 1.18 28 Aug 1996 15:42:40 OS
includes
Rev 1.17 20 Aug 1996 16:24:56 OS
SwPtrItem jetzt hier
Rev 1.16 25 Mar 1996 13:31:50 OS
Bugs im SwPageFtnInfoItem behoben
Rev 1.15 31 Jan 1996 09:43:46 OS
Masseinheit fuer SwPageFtnInfoItem
Rev 1.14 04 Dec 1995 16:05:52 OS
Set/FillVariable impl.
Rev 1.13 27 Nov 1995 18:55:14 OS
Umstellung 303a
Rev 1.12 24 Nov 1995 16:57:24 OM
PCH->PRECOMPILED
Rev 1.11 16 Nov 1995 18:30:36 OS
neu: Get/SetVariable, nicht impl.
Rev 1.10 08 Nov 1995 12:17:22 OS
Change => Set
Rev 1.9 11 Oct 1995 17:50:54 MA
fix: __EXPORT'iert
Rev 1.8 28 Sep 1995 08:05:46 OS
Typen fuer MSC richtig gecastet
------------------------------------------------------------------------*/
|