1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
21 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
22 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
23 #include <com/sun/star/drawing/TextAnimationKind.hpp>
24 #include <com/sun/star/uno/Any.hxx>
25 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
26 #include <com/sun/star/drawing/ConnectorType.hpp>
27 #include <com/sun/star/drawing/MeasureKind.hpp>
28 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
29 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
30 #include <com/sun/star/drawing/CircleKind.hpp>
32 #include <docmodel/theme/FormatScheme.hxx>
34 #include <editeng/boxitem.hxx>
35 #include <editeng/eeitem.hxx>
36 #include <editeng/lineitem.hxx>
37 #include <editeng/xmlcnitm.hxx>
38 #include <editeng/writingmodeitem.hxx>
39 #include <editeng/charrotateitem.hxx>
40 #include <osl/diagnose.h>
41 #include <i18nutil/unicode.hxx>
42 #include <tools/bigint.hxx>
43 #include <unotools/intlwrapper.hxx>
44 #include <unotools/localedatawrapper.hxx>
45 #include <vcl/svapp.hxx>
46 #include <vcl/settings.hxx>
48 #include <svl/grabbagitem.hxx>
50 #include <svx/strings.hrc>
51 #include <svx/dialmgr.hxx>
52 #include <svx/sdgcpitm.hxx>
53 #include <svx/sdtfchim.hxx>
54 #include <svx/sdasitm.hxx>
55 #include <sdgcoitm.hxx>
56 #include <svx/sdggaitm.hxx>
57 #include <sdginitm.hxx>
58 #include <svx/sdgluitm.hxx>
59 #include <svx/sdgmoitm.hxx>
60 #include <sdgtritm.hxx>
61 #include <svx/sdprcitm.hxx>
62 #include <svx/sdtaaitm.hxx>
63 #include <svx/sdtacitm.hxx>
64 #include <svx/sdtaditm.hxx>
65 #include <svx/sdtaiitm.hxx>
66 #include <svx/sdtaitm.hxx>
67 #include <svx/sdtakitm.hxx>
68 #include <svx/sdtayitm.hxx>
69 #include <svx/sdtfsitm.hxx>
70 #include <svx/svdmodel.hxx>
71 #include <svx/svdpool.hxx>
72 #include <svx/svdtrans.hxx>
73 #include <svx/svx3ditems.hxx>
74 #include <svx/svxids.hrc>
75 #include <sxallitm.hxx>
76 #include <sxcaitm.hxx>
77 #include <svx/sxcecitm.hxx>
78 #include <svx/sxcgitm.hxx>
79 #include <sxcikitm.hxx>
80 #include <svx/sxcllitm.hxx>
81 #include <svx/sxctitm.hxx>
82 #include <svx/sxekitm.hxx>
83 #include <svx/sxelditm.hxx>
84 #include <svx/sxenditm.hxx>
85 #include <sxfiitm.hxx>
86 #include <sxlayitm.hxx>
87 #include <sxlogitm.hxx>
88 #include <svx/sxmbritm.hxx>
89 #include <sxmfsitm.hxx>
90 #include <sxmkitm.hxx>
91 #include <sxmoitm.hxx>
92 #include <sxmovitm.hxx>
93 #include <sxmsitm.hxx>
94 #include <sxmtaitm.hxx>
95 #include <svx/sxmtfitm.hxx>
96 #include <svx/sxmtpitm.hxx>
97 #include <svx/sxmtritm.hxx>
98 #include <svx/sxmuitm.hxx>
99 #include <svx/xcolit.hxx>
100 #include <svx/RectangleAlignmentItem.hxx>
101 #include <sxoneitm.hxx>
102 #include <sxopitm.hxx>
103 #include <sxreaitm.hxx>
104 #include <sxreoitm.hxx>
105 #include <sxroaitm.hxx>
106 #include <sxrooitm.hxx>
107 #include <sxsaitm.hxx>
108 #include <sxsalitm.hxx>
109 #include <sxsiitm.hxx>
110 #include <sxsoitm.hxx>
111 #include <sxtraitm.hxx>
112 #include <editeng/frmdiritem.hxx>
113 #include <libxml/xmlwriter.h>
115 using namespace ::com::sun::star
;
117 SdrItemPool::SdrItemPool(
118 SfxItemPool
* _pMaster
)
119 : XOutdevItemPool(_pMaster
)
121 // prepare some constants
122 const Color
aNullCol(COL_BLACK
);
123 const sal_Int32
nDefEdgeDist(500); // Defaulting hard for Draw (100TH_MM) currently. MapMode will have to be taken into account in the future.
125 // init the non-persistent items
126 for(sal_uInt16
i(SDRATTR_NOTPERSIST_FIRST
); i
<= SDRATTR_NOTPERSIST_LAST
; i
++)
128 mpLocalItemInfos
[i
- SDRATTR_START
]._bPoolable
= false;
131 // init own PoolDefaults
132 std::vector
<SfxPoolItem
*>& rPoolDefaults
= *mpLocalPoolDefaults
;
133 rPoolDefaults
[SDRATTR_SHADOW
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_SHADOW
, false);
134 rPoolDefaults
[SDRATTR_SHADOWCOLOR
-SDRATTR_START
]=new XColorItem(SDRATTR_SHADOWCOLOR
, aNullCol
);
135 rPoolDefaults
[SDRATTR_SHADOWXDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_SHADOWXDIST
, 0);
136 rPoolDefaults
[SDRATTR_SHADOWYDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_SHADOWYDIST
, 0);
137 rPoolDefaults
[SDRATTR_SHADOWSIZEX
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_SHADOWSIZEX
, 100000);
138 rPoolDefaults
[SDRATTR_SHADOWSIZEY
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_SHADOWSIZEY
, 100000);
139 rPoolDefaults
[SDRATTR_SHADOWTRANSPARENCE
-SDRATTR_START
]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE
, 0);
140 rPoolDefaults
[SDRATTR_SHADOWBLUR
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_SHADOWBLUR
, 0);
141 rPoolDefaults
[SDRATTR_SHADOWALIGNMENT
-SDRATTR_START
]=new SvxRectangleAlignmentItem(SDRATTR_SHADOWALIGNMENT
, model::RectangleAlignment::Unset
);
142 rPoolDefaults
[SDRATTR_SHADOW3D
-SDRATTR_START
]=new SfxVoidItem(SDRATTR_SHADOW3D
);
143 rPoolDefaults
[SDRATTR_SHADOWPERSP
-SDRATTR_START
]=new SfxVoidItem(SDRATTR_SHADOWPERSP
);
144 rPoolDefaults
[SDRATTR_CAPTIONTYPE
-SDRATTR_START
]=new SdrCaptionTypeItem
;
145 rPoolDefaults
[SDRATTR_CAPTIONFIXEDANGLE
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE
, true);
146 rPoolDefaults
[SDRATTR_CAPTIONANGLE
-SDRATTR_START
]=new SdrCaptionAngleItem
;
147 rPoolDefaults
[SDRATTR_CAPTIONGAP
-SDRATTR_START
]=new SdrCaptionGapItem
;
148 rPoolDefaults
[SDRATTR_CAPTIONESCDIR
-SDRATTR_START
]=new SdrCaptionEscDirItem
;
149 rPoolDefaults
[SDRATTR_CAPTIONESCISREL
-SDRATTR_START
]=new SdrCaptionEscIsRelItem
;
150 rPoolDefaults
[SDRATTR_CAPTIONESCREL
-SDRATTR_START
]=new SdrCaptionEscRelItem
;
151 rPoolDefaults
[SDRATTR_CAPTIONESCABS
-SDRATTR_START
]=new SdrCaptionEscAbsItem
;
152 rPoolDefaults
[SDRATTR_CAPTIONLINELEN
-SDRATTR_START
]=new SdrCaptionLineLenItem
;
153 rPoolDefaults
[SDRATTR_CAPTIONFITLINELEN
-SDRATTR_START
]=new SdrCaptionFitLineLenItem
;
154 rPoolDefaults
[SDRATTR_CORNER_RADIUS
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_CORNER_RADIUS
, 0);
155 rPoolDefaults
[SDRATTR_TEXT_MINFRAMEHEIGHT
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT
, 0);
156 rPoolDefaults
[SDRATTR_TEXT_AUTOGROWHEIGHT
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT
, true);
157 rPoolDefaults
[SDRATTR_TEXT_FITTOSIZE
-SDRATTR_START
]=new SdrTextFitToSizeTypeItem
;
158 rPoolDefaults
[SDRATTR_TEXT_LEFTDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST
, 0);
159 rPoolDefaults
[SDRATTR_TEXT_RIGHTDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST
, 0);
160 rPoolDefaults
[SDRATTR_TEXT_UPPERDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_UPPERDIST
, 0);
161 rPoolDefaults
[SDRATTR_TEXT_LOWERDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_LOWERDIST
, 0);
162 rPoolDefaults
[SDRATTR_TEXT_VERTADJUST
-SDRATTR_START
]=new SdrTextVertAdjustItem
;
163 rPoolDefaults
[SDRATTR_TEXT_MAXFRAMEHEIGHT
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT
, 0);
164 rPoolDefaults
[SDRATTR_TEXT_MINFRAMEWIDTH
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH
, 0);
165 rPoolDefaults
[SDRATTR_TEXT_MAXFRAMEWIDTH
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH
, 0);
166 rPoolDefaults
[SDRATTR_TEXT_AUTOGROWWIDTH
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH
, false);
167 rPoolDefaults
[SDRATTR_TEXT_HORZADJUST
-SDRATTR_START
]=new SdrTextHorzAdjustItem
;
168 rPoolDefaults
[SDRATTR_TEXT_ANIKIND
-SDRATTR_START
]=new SdrTextAniKindItem
;
169 rPoolDefaults
[SDRATTR_TEXT_ANIDIRECTION
-SDRATTR_START
]=new SdrTextAniDirectionItem
;
170 rPoolDefaults
[SDRATTR_TEXT_ANISTARTINSIDE
-SDRATTR_START
]=new SdrTextAniStartInsideItem
;
171 rPoolDefaults
[SDRATTR_TEXT_ANISTOPINSIDE
-SDRATTR_START
]=new SdrTextAniStopInsideItem
;
172 rPoolDefaults
[SDRATTR_TEXT_ANICOUNT
-SDRATTR_START
]=new SdrTextAniCountItem
;
173 rPoolDefaults
[SDRATTR_TEXT_ANIDELAY
-SDRATTR_START
]=new SdrTextAniDelayItem
;
174 rPoolDefaults
[SDRATTR_TEXT_ANIAMOUNT
-SDRATTR_START
]=new SdrTextAniAmountItem
;
175 rPoolDefaults
[SDRATTR_TEXT_CONTOURFRAME
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME
, false);
176 rPoolDefaults
[SDRATTR_XMLATTRIBUTES
-SDRATTR_START
]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES
);
177 rPoolDefaults
[SDRATTR_TEXT_CHAINNEXTNAME
-SDRATTR_START
]=new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME
, "");
178 rPoolDefaults
[SDRATTR_TEXT_USEFIXEDCELLHEIGHT
-SDRATTR_START
]=new SdrTextFixedCellHeightItem
;
179 rPoolDefaults
[SDRATTR_TEXT_WORDWRAP
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP
, true);
180 rPoolDefaults
[SDRATTR_TEXT_CLIPVERTOVERFLOW
-SDRATTR_START
]=new SdrOnOffItem(SDRATTR_TEXT_CLIPVERTOVERFLOW
, false);
181 rPoolDefaults
[SDRATTR_EDGEKIND
-SDRATTR_START
]=new SdrEdgeKindItem
;
182 rPoolDefaults
[SDRATTR_EDGENODE1HORZDIST
-SDRATTR_START
]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist
);
183 rPoolDefaults
[SDRATTR_EDGENODE1VERTDIST
-SDRATTR_START
]=new SdrEdgeNode1VertDistItem(nDefEdgeDist
);
184 rPoolDefaults
[SDRATTR_EDGENODE2HORZDIST
-SDRATTR_START
]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist
);
185 rPoolDefaults
[SDRATTR_EDGENODE2VERTDIST
-SDRATTR_START
]=new SdrEdgeNode2VertDistItem(nDefEdgeDist
);
186 rPoolDefaults
[SDRATTR_EDGENODE1GLUEDIST
-SDRATTR_START
]=new SdrEdgeNode1GlueDistItem
;
187 rPoolDefaults
[SDRATTR_EDGENODE2GLUEDIST
-SDRATTR_START
]=new SdrEdgeNode2GlueDistItem
;
188 rPoolDefaults
[SDRATTR_EDGELINEDELTACOUNT
-SDRATTR_START
]=new SdrEdgeLineDeltaCountItem
;
189 rPoolDefaults
[SDRATTR_EDGELINE1DELTA
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_EDGELINE1DELTA
, 0);
190 rPoolDefaults
[SDRATTR_EDGELINE2DELTA
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_EDGELINE2DELTA
, 0);
191 rPoolDefaults
[SDRATTR_EDGELINE3DELTA
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_EDGELINE3DELTA
, 0);
192 rPoolDefaults
[SDRATTR_MEASUREKIND
-SDRATTR_START
]=new SdrMeasureKindItem
;
193 rPoolDefaults
[SDRATTR_MEASURETEXTHPOS
-SDRATTR_START
]=new SdrMeasureTextHPosItem
;
194 rPoolDefaults
[SDRATTR_MEASURETEXTVPOS
-SDRATTR_START
]=new SdrMeasureTextVPosItem
;
195 rPoolDefaults
[SDRATTR_MEASURELINEDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_MEASURELINEDIST
, 800);
196 rPoolDefaults
[SDRATTR_MEASUREHELPLINEOVERHANG
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG
, 200);
197 rPoolDefaults
[SDRATTR_MEASUREHELPLINEDIST
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST
, 100);
198 rPoolDefaults
[SDRATTR_MEASUREHELPLINE1LEN
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN
, 0);
199 rPoolDefaults
[SDRATTR_MEASUREHELPLINE2LEN
-SDRATTR_START
]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN
, 0);
200 rPoolDefaults
[SDRATTR_MEASUREBELOWREFEDGE
-SDRATTR_START
]=new SdrMeasureBelowRefEdgeItem
;
201 rPoolDefaults
[SDRATTR_MEASURETEXTROTA90
-SDRATTR_START
]=new SdrMeasureTextRota90Item
;
202 rPoolDefaults
[SDRATTR_MEASURETEXTUPSIDEDOWN
-SDRATTR_START
]=new SdrMeasureTextUpsideDownItem
;
203 rPoolDefaults
[SDRATTR_MEASUREOVERHANG
-SDRATTR_START
]=new SdrMeasureOverhangItem(600);
204 rPoolDefaults
[SDRATTR_MEASUREUNIT
-SDRATTR_START
]=new SdrMeasureUnitItem
;
205 rPoolDefaults
[SDRATTR_MEASURESCALE
-SDRATTR_START
]=new SdrMeasureScaleItem
;
206 rPoolDefaults
[SDRATTR_MEASURESHOWUNIT
-SDRATTR_START
]=new SdrYesNoItem(SDRATTR_MEASURESHOWUNIT
, false);
207 rPoolDefaults
[SDRATTR_MEASUREFORMATSTRING
-SDRATTR_START
]=new SdrMeasureFormatStringItem();
208 rPoolDefaults
[SDRATTR_MEASURETEXTAUTOANGLE
-SDRATTR_START
]=new SdrMeasureTextAutoAngleItem();
209 rPoolDefaults
[SDRATTR_MEASURETEXTAUTOANGLEVIEW
-SDRATTR_START
]=new SdrMeasureTextAutoAngleViewItem();
210 rPoolDefaults
[SDRATTR_MEASURETEXTISFIXEDANGLE
-SDRATTR_START
]=new SdrMeasureTextIsFixedAngleItem();
211 rPoolDefaults
[SDRATTR_MEASURETEXTFIXEDANGLE
-SDRATTR_START
]=new SdrMeasureTextFixedAngleItem();
212 rPoolDefaults
[SDRATTR_MEASUREDECIMALPLACES
-SDRATTR_START
]=new SdrMeasureDecimalPlacesItem();
213 rPoolDefaults
[SDRATTR_CIRCKIND
-SDRATTR_START
]=new SdrCircKindItem
;
214 rPoolDefaults
[SDRATTR_CIRCSTARTANGLE
-SDRATTR_START
]=new SdrAngleItem(SDRATTR_CIRCSTARTANGLE
, 0_deg100
);
215 rPoolDefaults
[SDRATTR_CIRCENDANGLE
-SDRATTR_START
]=new SdrAngleItem(SDRATTR_CIRCENDANGLE
, 36000_deg100
);
216 rPoolDefaults
[SDRATTR_OBJMOVEPROTECT
-SDRATTR_START
]=new SdrYesNoItem(SDRATTR_OBJMOVEPROTECT
, false);
217 rPoolDefaults
[SDRATTR_OBJSIZEPROTECT
-SDRATTR_START
]=new SdrYesNoItem(SDRATTR_OBJSIZEPROTECT
, false);
218 rPoolDefaults
[SDRATTR_OBJPRINTABLE
-SDRATTR_START
]=new SdrObjPrintableItem
;
219 rPoolDefaults
[SDRATTR_OBJVISIBLE
-SDRATTR_START
]=new SdrObjVisibleItem
;
220 rPoolDefaults
[SDRATTR_LAYERID
-SDRATTR_START
]=new SdrLayerIdItem(SdrLayerID(0));
221 rPoolDefaults
[SDRATTR_LAYERNAME
-SDRATTR_START
]=new SdrLayerNameItem
;
222 rPoolDefaults
[SDRATTR_OBJECTNAME
-SDRATTR_START
]=new SfxStringItem(SDRATTR_OBJECTNAME
);
223 rPoolDefaults
[SDRATTR_ALLPOSITIONX
-SDRATTR_START
]=new SdrAllPositionXItem
;
224 rPoolDefaults
[SDRATTR_ALLPOSITIONY
-SDRATTR_START
]=new SdrAllPositionYItem
;
225 rPoolDefaults
[SDRATTR_ALLSIZEWIDTH
-SDRATTR_START
]=new SdrAllSizeWidthItem
;
226 rPoolDefaults
[SDRATTR_ALLSIZEHEIGHT
-SDRATTR_START
]=new SdrAllSizeHeightItem
;
227 rPoolDefaults
[SDRATTR_ONEPOSITIONX
-SDRATTR_START
]=new SdrOnePositionXItem
;
228 rPoolDefaults
[SDRATTR_ONEPOSITIONY
-SDRATTR_START
]=new SdrOnePositionYItem
;
229 rPoolDefaults
[SDRATTR_ONESIZEWIDTH
-SDRATTR_START
]=new SdrOneSizeWidthItem
;
230 rPoolDefaults
[SDRATTR_ONESIZEHEIGHT
-SDRATTR_START
]=new SdrOneSizeHeightItem
;
231 rPoolDefaults
[SDRATTR_LOGICSIZEWIDTH
-SDRATTR_START
]=new SdrLogicSizeWidthItem
;
232 rPoolDefaults
[SDRATTR_LOGICSIZEHEIGHT
-SDRATTR_START
]=new SdrLogicSizeHeightItem
;
233 rPoolDefaults
[SDRATTR_ROTATEANGLE
-SDRATTR_START
]=new SdrAngleItem(SDRATTR_ROTATEANGLE
, 0_deg100
);
234 rPoolDefaults
[SDRATTR_SHEARANGLE
-SDRATTR_START
]=new SdrShearAngleItem
;
235 rPoolDefaults
[SDRATTR_MOVEX
-SDRATTR_START
]=new SdrMoveXItem
;
236 rPoolDefaults
[SDRATTR_MOVEY
-SDRATTR_START
]=new SdrMoveYItem
;
237 rPoolDefaults
[SDRATTR_RESIZEXONE
-SDRATTR_START
]=new SdrResizeXOneItem
;
238 rPoolDefaults
[SDRATTR_RESIZEYONE
-SDRATTR_START
]=new SdrResizeYOneItem
;
239 rPoolDefaults
[SDRATTR_ROTATEONE
-SDRATTR_START
]=new SdrRotateOneItem
;
240 rPoolDefaults
[SDRATTR_HORZSHEARONE
-SDRATTR_START
]=new SdrHorzShearOneItem
;
241 rPoolDefaults
[SDRATTR_VERTSHEARONE
-SDRATTR_START
]=new SdrVertShearOneItem
;
242 rPoolDefaults
[SDRATTR_RESIZEXALL
-SDRATTR_START
]=new SdrResizeXAllItem
;
243 rPoolDefaults
[SDRATTR_RESIZEYALL
-SDRATTR_START
]=new SdrResizeYAllItem
;
244 rPoolDefaults
[SDRATTR_ROTATEALL
-SDRATTR_START
]=new SdrRotateAllItem
;
245 rPoolDefaults
[SDRATTR_HORZSHEARALL
-SDRATTR_START
]=new SdrHorzShearAllItem
;
246 rPoolDefaults
[SDRATTR_VERTSHEARALL
-SDRATTR_START
]=new SdrVertShearAllItem
;
247 rPoolDefaults
[SDRATTR_TRANSFORMREF1X
-SDRATTR_START
]=new SdrTransformRef1XItem
;
248 rPoolDefaults
[SDRATTR_TRANSFORMREF1Y
-SDRATTR_START
]=new SdrTransformRef1YItem
;
249 rPoolDefaults
[SDRATTR_TRANSFORMREF2X
-SDRATTR_START
]=new SdrTransformRef2XItem
;
250 rPoolDefaults
[SDRATTR_TRANSFORMREF2Y
-SDRATTR_START
]=new SdrTransformRef2YItem
;
251 rPoolDefaults
[SDRATTR_TEXTDIRECTION
-SDRATTR_START
]=new SvxWritingModeItem(css::text::WritingMode_LR_TB
, SDRATTR_TEXTDIRECTION
);
252 rPoolDefaults
[ SDRATTR_GRAFRED
- SDRATTR_START
] = new SdrGrafRedItem
;
253 rPoolDefaults
[ SDRATTR_GRAFGREEN
- SDRATTR_START
] = new SdrGrafGreenItem
;
254 rPoolDefaults
[ SDRATTR_GRAFBLUE
- SDRATTR_START
] = new SdrGrafBlueItem
;
255 rPoolDefaults
[ SDRATTR_GRAFLUMINANCE
- SDRATTR_START
] = new SdrGrafLuminanceItem
;
256 rPoolDefaults
[ SDRATTR_GRAFCONTRAST
- SDRATTR_START
] = new SdrGrafContrastItem
;
257 rPoolDefaults
[ SDRATTR_GRAFGAMMA
- SDRATTR_START
] = new SdrGrafGamma100Item
;
258 rPoolDefaults
[ SDRATTR_GRAFTRANSPARENCE
- SDRATTR_START
] = new SdrGrafTransparenceItem
;
259 rPoolDefaults
[ SDRATTR_GRAFINVERT
- SDRATTR_START
] = new SdrGrafInvertItem
;
260 rPoolDefaults
[ SDRATTR_GRAFMODE
- SDRATTR_START
] = new SdrGrafModeItem
;
261 rPoolDefaults
[ SDRATTR_GRAFCROP
- SDRATTR_START
] = new SdrGrafCropItem
;
262 rPoolDefaults
[ SDRATTR_3DOBJ_PERCENT_DIAGONAL
- SDRATTR_START
] = new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL
, 10);
263 rPoolDefaults
[ SDRATTR_3DOBJ_BACKSCALE
- SDRATTR_START
] = new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE
, 100);
264 rPoolDefaults
[ SDRATTR_3DOBJ_DEPTH
- SDRATTR_START
] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH
, 1000);
265 rPoolDefaults
[ SDRATTR_3DOBJ_HORZ_SEGS
- SDRATTR_START
] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS
, 24);
266 rPoolDefaults
[ SDRATTR_3DOBJ_VERT_SEGS
- SDRATTR_START
] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS
, 24);
267 rPoolDefaults
[ SDRATTR_3DOBJ_END_ANGLE
- SDRATTR_START
] = new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE
, 3600);
268 rPoolDefaults
[ SDRATTR_3DOBJ_DOUBLE_SIDED
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED
, false);
269 rPoolDefaults
[ SDRATTR_3DOBJ_NORMALS_KIND
- SDRATTR_START
] = new Svx3DNormalsKindItem
;
270 rPoolDefaults
[ SDRATTR_3DOBJ_NORMALS_INVERT
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT
, false);
271 rPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_PROJ_X
- SDRATTR_START
] = new Svx3DTextureProjectionXItem
;
272 rPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y
- SDRATTR_START
] = new Svx3DTextureProjectionYItem
;
273 rPoolDefaults
[ SDRATTR_3DOBJ_SHADOW_3D
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D
, false);
274 rPoolDefaults
[ SDRATTR_3DOBJ_MAT_COLOR
- SDRATTR_START
] = new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR
);
275 rPoolDefaults
[ SDRATTR_3DOBJ_MAT_EMISSION
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION
);
276 rPoolDefaults
[ SDRATTR_3DOBJ_MAT_SPECULAR
- SDRATTR_START
] = new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR
);
277 rPoolDefaults
[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY
- SDRATTR_START
] = new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY
, 15);
278 rPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_KIND
- SDRATTR_START
] = new Svx3DTextureKindItem
;
279 rPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_MODE
- SDRATTR_START
] = new Svx3DTextureModeItem
;
280 rPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_FILTER
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER
, false);
281 rPoolDefaults
[ SDRATTR_3DOBJ_SMOOTH_NORMALS
- SDRATTR_START
] = new Svx3DSmoothNormalsItem
;
282 rPoolDefaults
[ SDRATTR_3DOBJ_SMOOTH_LIDS
- SDRATTR_START
] = new Svx3DSmoothLidsItem
;
283 rPoolDefaults
[ SDRATTR_3DOBJ_CHARACTER_MODE
- SDRATTR_START
] = new Svx3DCharacterModeItem
;
284 rPoolDefaults
[ SDRATTR_3DOBJ_CLOSE_FRONT
- SDRATTR_START
] = new Svx3DCloseFrontItem
;
285 rPoolDefaults
[ SDRATTR_3DOBJ_CLOSE_BACK
- SDRATTR_START
] = new Svx3DCloseBackItem
;
286 rPoolDefaults
[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY
- SDRATTR_START
] = new Svx3DReducedLineGeometryItem
;
287 rPoolDefaults
[ SDRATTR_3DSCENE_PERSPECTIVE
- SDRATTR_START
] = new Svx3DPerspectiveItem
;
288 rPoolDefaults
[ SDRATTR_3DSCENE_DISTANCE
- SDRATTR_START
] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE
, 100);
289 rPoolDefaults
[ SDRATTR_3DSCENE_FOCAL_LENGTH
- SDRATTR_START
] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH
, 100);
290 rPoolDefaults
[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING
, false);
291 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_1
- SDRATTR_START
] = new SvxColorItem(Color(ColorTransparency
, 0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1
);
292 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_2
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2
);
293 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_3
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3
);
294 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_4
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4
);
295 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_5
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5
);
296 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_6
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6
);
297 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_7
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7
);
298 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_8
- SDRATTR_START
] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8
);
299 rPoolDefaults
[ SDRATTR_3DSCENE_AMBIENTCOLOR
- SDRATTR_START
] = new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR
);
300 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_1
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1
, true);
301 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_2
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2
, false);
302 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_3
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3
, false);
303 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_4
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4
, false);
304 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_5
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5
, false);
305 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_6
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6
, false);
306 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_7
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7
, false);
307 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_8
- SDRATTR_START
] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8
, false);
308 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_1
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1
, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963));
309 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_2
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2
, basegfx::B3DVector(0.0,0.0,1.0));
310 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_3
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3
, basegfx::B3DVector(0.0,0.0,1.0));
311 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_4
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4
, basegfx::B3DVector(0.0,0.0,1.0));
312 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_5
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5
, basegfx::B3DVector(0.0,0.0,1.0));
313 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_6
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6
, basegfx::B3DVector(0.0,0.0,1.0));
314 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_7
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7
, basegfx::B3DVector(0.0,0.0,1.0));
315 rPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_8
- SDRATTR_START
] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8
, basegfx::B3DVector(0.0,0.0,1.0));
316 rPoolDefaults
[ SDRATTR_3DSCENE_SHADOW_SLANT
- SDRATTR_START
] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT
, 0);
317 rPoolDefaults
[ SDRATTR_3DSCENE_SHADE_MODE
- SDRATTR_START
] = new Svx3DShadeModeItem
;
318 rPoolDefaults
[ SDRATTR_CUSTOMSHAPE_ENGINE
- SDRATTR_START
] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE
, "");
319 rPoolDefaults
[ SDRATTR_CUSTOMSHAPE_DATA
- SDRATTR_START
] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA
, "");
320 rPoolDefaults
[ SDRATTR_CUSTOMSHAPE_GEOMETRY
- SDRATTR_START
] = new SdrCustomShapeGeometryItem
;
322 SvxBoxItem
* pboxItem
= new SvxBoxItem( SDRATTR_TABLE_BORDER
);
323 pboxItem
->SetAllDistances( 100 );
324 rPoolDefaults
[ SDRATTR_TABLE_BORDER
- SDRATTR_START
] = pboxItem
;
326 SvxBoxInfoItem
* pBoxInfoItem
= new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER
);
328 pBoxInfoItem
->SetTable( true );
329 pBoxInfoItem
->SetDist( true); // always show margin field
330 pBoxInfoItem
->SetValid( SvxBoxInfoItemValidFlags::DISABLE
); // some lines may have DontCare state only in tables
332 rPoolDefaults
[ SDRATTR_TABLE_BORDER_INNER
- SDRATTR_START
] = pBoxInfoItem
;
333 rPoolDefaults
[ SDRATTR_TABLE_BORDER_TLBR
- SDRATTR_START
] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR
);
334 rPoolDefaults
[ SDRATTR_TABLE_BORDER_BLTR
- SDRATTR_START
] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR
);
335 rPoolDefaults
[ SDRATTR_TABLE_TEXT_ROTATION
- SDRATTR_START
] = new SvxTextRotateItem(0_deg10
, SDRATTR_TABLE_TEXT_ROTATION
);
336 rPoolDefaults
[ SDRATTR_TABLE_CELL_GRABBAG
- SDRATTR_START
] = new SfxGrabBagItem(SDRATTR_TABLE_CELL_GRABBAG
);
338 rPoolDefaults
[ SDRATTR_GLOW_RADIUS
- SDRATTR_START
] = new SdrMetricItem(SDRATTR_GLOW_RADIUS
, 0);
339 rPoolDefaults
[ SDRATTR_GLOW_COLOR
- SDRATTR_START
] = new XColorItem(SDRATTR_GLOW_COLOR
, aNullCol
);
340 rPoolDefaults
[ SDRATTR_GLOW_TRANSPARENCY
- SDRATTR_START
] = new SdrPercentItem(SDRATTR_GLOW_TRANSPARENCY
, 0);
342 rPoolDefaults
[SDRATTR_SOFTEDGE_RADIUS
- SDRATTR_START
] = new SdrMetricItem(SDRATTR_SOFTEDGE_RADIUS
, 0);
344 rPoolDefaults
[SDRATTR_TEXTCOLUMNS_NUMBER
- SDRATTR_START
] = new SfxInt16Item(SDRATTR_TEXTCOLUMNS_NUMBER
, 1);
345 rPoolDefaults
[SDRATTR_TEXTCOLUMNS_SPACING
- SDRATTR_START
] = new SdrMetricItem(SDRATTR_TEXTCOLUMNS_SPACING
, 0);
347 rPoolDefaults
[SDRATTR_WRITINGMODE2
- SDRATTR_START
] = new SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB
, SDRATTR_WRITINGMODE2
);
350 mpLocalItemInfos
[SDRATTR_SHADOW
-SDRATTR_START
]._nSID
=SID_ATTR_FILL_SHADOW
;
351 mpLocalItemInfos
[SDRATTR_SHADOWCOLOR
-SDRATTR_START
]._nSID
=SID_ATTR_SHADOW_COLOR
;
352 mpLocalItemInfos
[SDRATTR_SHADOWTRANSPARENCE
-SDRATTR_START
]._nSID
=SID_ATTR_SHADOW_TRANSPARENCE
;
353 mpLocalItemInfos
[SDRATTR_SHADOWBLUR
-SDRATTR_START
]._nSID
=SID_ATTR_SHADOW_BLUR
;
354 mpLocalItemInfos
[SDRATTR_SHADOWXDIST
-SDRATTR_START
]._nSID
=SID_ATTR_SHADOW_XDISTANCE
;
355 mpLocalItemInfos
[SDRATTR_SHADOWYDIST
-SDRATTR_START
]._nSID
=SID_ATTR_SHADOW_YDISTANCE
;
356 mpLocalItemInfos
[SDRATTR_TEXT_FITTOSIZE
-SDRATTR_START
]._nSID
=SID_ATTR_TEXT_FITTOSIZE
;
357 mpLocalItemInfos
[SDRATTR_GRAFCROP
-SDRATTR_START
]._nSID
=SID_ATTR_GRAF_CROP
;
359 mpLocalItemInfos
[SDRATTR_TABLE_BORDER
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_OUTER
;
360 mpLocalItemInfos
[SDRATTR_TABLE_BORDER_INNER
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_INNER
;
361 mpLocalItemInfos
[SDRATTR_TABLE_BORDER_TLBR
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_DIAG_TLBR
;
362 mpLocalItemInfos
[SDRATTR_TABLE_BORDER_BLTR
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_DIAG_BLTR
;
364 mpLocalItemInfos
[SDRATTR_GLOW_RADIUS
- SDRATTR_START
]._nSID
= SID_ATTR_GLOW_RADIUS
;
365 mpLocalItemInfos
[SDRATTR_GLOW_COLOR
- SDRATTR_START
]._nSID
= SID_ATTR_GLOW_COLOR
;
366 mpLocalItemInfos
[SDRATTR_GLOW_TRANSPARENCY
- SDRATTR_START
]._nSID
= SID_ATTR_GLOW_TRANSPARENCY
;
368 mpLocalItemInfos
[SDRATTR_SOFTEDGE_RADIUS
- SDRATTR_START
]._nSID
= SID_ATTR_SOFTEDGE_RADIUS
;
370 mpLocalItemInfos
[SDRATTR_TEXTCOLUMNS_NUMBER
- SDRATTR_START
]._nSID
= 0 /*TODO*/;
371 mpLocalItemInfos
[SDRATTR_TEXTCOLUMNS_SPACING
- SDRATTR_START
]._nSID
= 0 /*TODO*/;
373 mpLocalItemInfos
[SDRATTR_WRITINGMODE2
- SDRATTR_START
]._nSID
= 0 /*TODO*/;
375 // it's my own creation level, set Defaults and ItemInfos
376 SetDefaults(mpLocalPoolDefaults
);
377 SetItemInfos(mpLocalItemInfos
.get());
380 // copy ctor, so that static defaults are cloned
381 // (Parameter 2 = sal_True)
382 SdrItemPool::SdrItemPool(const SdrItemPool
& rPool
)
383 : XOutdevItemPool(rPool
)
387 rtl::Reference
<SfxItemPool
> SdrItemPool::Clone() const
389 return new SdrItemPool(*this);
392 SdrItemPool::~SdrItemPool()
394 // split pools before destroying
395 SetSecondaryPool(nullptr);
398 bool SdrItemPool::GetPresentation(
399 const SfxPoolItem
& rItem
,
400 MapUnit ePresentationMetric
, OUString
& rText
,
401 const IntlWrapper
& rIntlWrapper
) const
403 if (!IsInvalidItem(&rItem
)) {
404 sal_uInt16 nWhich
=rItem
.Which();
405 if (nWhich
>=SDRATTR_SHADOW_FIRST
&& nWhich
<=SDRATTR_END
) {
406 rItem
.GetPresentation(SfxItemPresentation::Nameless
,
407 GetMetric(nWhich
),ePresentationMetric
,rText
,
409 rText
= GetItemName(nWhich
) + " " + rText
;
414 return XOutdevItemPool::GetPresentation(rItem
,ePresentationMetric
,rText
,rIntlWrapper
);
417 OUString
SdrItemPool::GetItemName(sal_uInt16 nWhich
)
419 TranslateId pResId
= SIP_UNKNOWN_ATTR
;
423 case XATTR_LINESTYLE
: pResId
= SIP_XA_LINESTYLE
;break;
424 case XATTR_LINEDASH
: pResId
= SIP_XA_LINEDASH
;break;
425 case XATTR_LINEWIDTH
: pResId
= SIP_XA_LINEWIDTH
;break;
426 case XATTR_LINECOLOR
: pResId
= SIP_XA_LINECOLOR
;break;
427 case XATTR_LINESTART
: pResId
= SIP_XA_LINESTART
;break;
428 case XATTR_LINEEND
: pResId
= SIP_XA_LINEEND
;break;
429 case XATTR_LINESTARTWIDTH
: pResId
= SIP_XA_LINESTARTWIDTH
;break;
430 case XATTR_LINEENDWIDTH
: pResId
= SIP_XA_LINEENDWIDTH
;break;
431 case XATTR_LINESTARTCENTER
: pResId
= SIP_XA_LINESTARTCENTER
;break;
432 case XATTR_LINEENDCENTER
: pResId
= SIP_XA_LINEENDCENTER
;break;
433 case XATTR_LINETRANSPARENCE
: pResId
= SIP_XA_LINETRANSPARENCE
;break;
434 case XATTR_LINEJOINT
: pResId
= SIP_XA_LINEJOINT
;break;
435 case XATTRSET_LINE
: pResId
= SIP_XATTRSET_LINE
;break;
437 case XATTR_FILLSTYLE
: pResId
= SIP_XA_FILLSTYLE
;break;
438 case XATTR_FILLCOLOR
: pResId
= SIP_XA_FILLCOLOR
;break;
439 case XATTR_FILLGRADIENT
: pResId
= SIP_XA_FILLGRADIENT
;break;
440 case XATTR_FILLHATCH
: pResId
= SIP_XA_FILLHATCH
;break;
441 case XATTR_FILLBITMAP
: pResId
= SIP_XA_FILLBITMAP
;break;
442 case XATTR_FILLTRANSPARENCE
: pResId
= SIP_XA_FILLTRANSPARENCE
;break;
443 case XATTR_GRADIENTSTEPCOUNT
: pResId
= SIP_XA_GRADIENTSTEPCOUNT
;break;
444 case XATTR_FILLBMP_TILE
: pResId
= SIP_XA_FILLBMP_TILE
;break;
445 case XATTR_FILLBMP_POS
: pResId
= SIP_XA_FILLBMP_POS
;break;
446 case XATTR_FILLBMP_SIZEX
: pResId
= SIP_XA_FILLBMP_SIZEX
;break;
447 case XATTR_FILLBMP_SIZEY
: pResId
= SIP_XA_FILLBMP_SIZEY
;break;
448 case XATTR_FILLFLOATTRANSPARENCE
: pResId
= SIP_XA_FILLFLOATTRANSPARENCE
;break;
449 case XATTR_SECONDARYFILLCOLOR
: pResId
= SIP_XA_SECONDARYFILLCOLOR
;break;
450 case XATTR_FILLBMP_SIZELOG
: pResId
= SIP_XA_FILLBMP_SIZELOG
;break;
451 case XATTR_FILLBMP_TILEOFFSETX
: pResId
= SIP_XA_FILLBMP_TILEOFFSETX
;break;
452 case XATTR_FILLBMP_TILEOFFSETY
: pResId
= SIP_XA_FILLBMP_TILEOFFSETY
;break;
453 case XATTR_FILLBMP_STRETCH
: pResId
= SIP_XA_FILLBMP_STRETCH
;break;
454 case XATTR_FILLBMP_POSOFFSETX
: pResId
= SIP_XA_FILLBMP_POSOFFSETX
;break;
455 case XATTR_FILLBMP_POSOFFSETY
: pResId
= SIP_XA_FILLBMP_POSOFFSETY
;break;
456 case XATTR_FILLBACKGROUND
: pResId
= SIP_XA_FILLBACKGROUND
;break;
457 case XATTR_FILLUSESLIDEBACKGROUND
: pResId
= SIP_XA_FILLUSESLIDEBACKGROUND
;break;
459 case XATTRSET_FILL
: pResId
= SIP_XATTRSET_FILL
;break;
461 case XATTR_FORMTXTSTYLE
: pResId
= SIP_XA_FORMTXTSTYLE
;break;
462 case XATTR_FORMTXTADJUST
: pResId
= SIP_XA_FORMTXTADJUST
;break;
463 case XATTR_FORMTXTDISTANCE
: pResId
= SIP_XA_FORMTXTDISTANCE
;break;
464 case XATTR_FORMTXTSTART
: pResId
= SIP_XA_FORMTXTSTART
;break;
465 case XATTR_FORMTXTMIRROR
: pResId
= SIP_XA_FORMTXTMIRROR
;break;
466 case XATTR_FORMTXTOUTLINE
: pResId
= SIP_XA_FORMTXTOUTLINE
;break;
467 case XATTR_FORMTXTSHADOW
: pResId
= SIP_XA_FORMTXTSHADOW
;break;
468 case XATTR_FORMTXTSHDWCOLOR
: pResId
= SIP_XA_FORMTXTSHDWCOLOR
;break;
469 case XATTR_FORMTXTSHDWXVAL
: pResId
= SIP_XA_FORMTXTSHDWXVAL
;break;
470 case XATTR_FORMTXTSHDWYVAL
: pResId
= SIP_XA_FORMTXTSHDWYVAL
;break;
471 case XATTR_FORMTXTHIDEFORM
: pResId
= SIP_XA_FORMTXTHIDEFORM
;break;
472 case XATTR_FORMTXTSHDWTRANSP
: pResId
= SIP_XA_FORMTXTSHDWTRANSP
;break;
474 case SDRATTR_SHADOW
: pResId
= SIP_SA_SHADOW
;break;
475 case SDRATTR_SHADOWCOLOR
: pResId
= SIP_SA_SHADOWCOLOR
;break;
476 case SDRATTR_SHADOWXDIST
: pResId
= SIP_SA_SHADOWXDIST
;break;
477 case SDRATTR_SHADOWYDIST
: pResId
= SIP_SA_SHADOWYDIST
;break;
478 case SDRATTR_SHADOWTRANSPARENCE
: pResId
= SIP_SA_SHADOWTRANSPARENCE
;break;
479 case SDRATTR_SHADOWBLUR
: pResId
= SIP_SA_SHADOWBLUR
;break;
480 case SDRATTR_SHADOW3D
: pResId
= SIP_SA_SHADOW3D
;break;
481 case SDRATTR_SHADOWPERSP
: pResId
= SIP_SA_SHADOWPERSP
;break;
483 case SDRATTR_GLOW_RADIUS
: pResId
= SIP_SA_GLOW_RADIUS
;break;
484 case SDRATTR_GLOW_COLOR
: pResId
= SIP_SA_GLOW_COLOR
;break;
485 case SDRATTR_GLOW_TRANSPARENCY
: pResId
= SIP_SA_GLOW_TRANSPARENCY
;break;
487 case SDRATTR_SOFTEDGE_RADIUS
: pResId
= SIP_SA_SOFTEDGE_RADIUS
; break;
489 case SDRATTR_CAPTIONTYPE
: pResId
= SIP_SA_CAPTIONTYPE
;break;
490 case SDRATTR_CAPTIONFIXEDANGLE
: pResId
= SIP_SA_CAPTIONFIXEDANGLE
;break;
491 case SDRATTR_CAPTIONANGLE
: pResId
= SIP_SA_CAPTIONANGLE
;break;
492 case SDRATTR_CAPTIONGAP
: pResId
= SIP_SA_CAPTIONGAP
;break;
493 case SDRATTR_CAPTIONESCDIR
: pResId
= SIP_SA_CAPTIONESCDIR
;break;
494 case SDRATTR_CAPTIONESCISREL
: pResId
= SIP_SA_CAPTIONESCISREL
;break;
495 case SDRATTR_CAPTIONESCREL
: pResId
= SIP_SA_CAPTIONESCREL
;break;
496 case SDRATTR_CAPTIONESCABS
: pResId
= SIP_SA_CAPTIONESCABS
;break;
497 case SDRATTR_CAPTIONLINELEN
: pResId
= SIP_SA_CAPTIONLINELEN
;break;
498 case SDRATTR_CAPTIONFITLINELEN
: pResId
= SIP_SA_CAPTIONFITLINELEN
;break;
500 case SDRATTR_CORNER_RADIUS
: pResId
= SIP_SA_CORNER_RADIUS
;break;
501 case SDRATTR_TEXT_MINFRAMEHEIGHT
: pResId
= SIP_SA_TEXT_MINFRAMEHEIGHT
;break;
502 case SDRATTR_TEXT_AUTOGROWHEIGHT
: pResId
= SIP_SA_TEXT_AUTOGROWHEIGHT
;break;
503 case SDRATTR_TEXT_FITTOSIZE
: pResId
= SIP_SA_TEXT_FITTOSIZE
;break;
504 case SDRATTR_TEXT_LEFTDIST
: pResId
= SIP_SA_TEXT_LEFTDIST
;break;
505 case SDRATTR_TEXT_RIGHTDIST
: pResId
= SIP_SA_TEXT_RIGHTDIST
;break;
506 case SDRATTR_TEXT_UPPERDIST
: pResId
= SIP_SA_TEXT_UPPERDIST
;break;
507 case SDRATTR_TEXT_LOWERDIST
: pResId
= SIP_SA_TEXT_LOWERDIST
;break;
508 case SDRATTR_TEXT_VERTADJUST
: pResId
= SIP_SA_TEXT_VERTADJUST
;break;
509 case SDRATTR_TEXT_MAXFRAMEHEIGHT
: pResId
= SIP_SA_TEXT_MAXFRAMEHEIGHT
;break;
510 case SDRATTR_TEXT_MINFRAMEWIDTH
: pResId
= SIP_SA_TEXT_MINFRAMEWIDTH
;break;
511 case SDRATTR_TEXT_MAXFRAMEWIDTH
: pResId
= SIP_SA_TEXT_MAXFRAMEWIDTH
;break;
512 case SDRATTR_TEXT_AUTOGROWWIDTH
: pResId
= SIP_SA_TEXT_AUTOGROWWIDTH
;break;
513 case SDRATTR_TEXT_HORZADJUST
: pResId
= SIP_SA_TEXT_HORZADJUST
;break;
514 case SDRATTR_TEXT_ANIKIND
: pResId
= SIP_SA_TEXT_ANIKIND
;break;
515 case SDRATTR_TEXT_ANIDIRECTION
: pResId
= SIP_SA_TEXT_ANIDIRECTION
;break;
516 case SDRATTR_TEXT_ANISTARTINSIDE
: pResId
= SIP_SA_TEXT_ANISTARTINSIDE
;break;
517 case SDRATTR_TEXT_ANISTOPINSIDE
: pResId
= SIP_SA_TEXT_ANISTOPINSIDE
;break;
518 case SDRATTR_TEXT_ANICOUNT
: pResId
= SIP_SA_TEXT_ANICOUNT
;break;
519 case SDRATTR_TEXT_ANIDELAY
: pResId
= SIP_SA_TEXT_ANIDELAY
;break;
520 case SDRATTR_TEXT_ANIAMOUNT
: pResId
= SIP_SA_TEXT_ANIAMOUNT
;break;
521 case SDRATTR_TEXT_CONTOURFRAME
: pResId
= SIP_SA_TEXT_CONTOURFRAME
;break;
522 case SDRATTR_XMLATTRIBUTES
: pResId
= SIP_SA_XMLATTRIBUTES
;break;
523 case SDRATTR_TEXT_USEFIXEDCELLHEIGHT
: pResId
= SIP_SA_TEXT_USEFIXEDCELLHEIGHT
;break;
524 case SDRATTR_TEXT_WORDWRAP
: pResId
= SIP_SA_WORDWRAP
;break;
525 case SDRATTR_TEXT_CHAINNEXTNAME
: pResId
= SIP_SA_CHAINNEXTNAME
;break;
527 case SDRATTR_EDGEKIND
: pResId
= SIP_SA_EDGEKIND
;break;
528 case SDRATTR_EDGENODE1HORZDIST
: pResId
= SIP_SA_EDGENODE1HORZDIST
;break;
529 case SDRATTR_EDGENODE1VERTDIST
: pResId
= SIP_SA_EDGENODE1VERTDIST
;break;
530 case SDRATTR_EDGENODE2HORZDIST
: pResId
= SIP_SA_EDGENODE2HORZDIST
;break;
531 case SDRATTR_EDGENODE2VERTDIST
: pResId
= SIP_SA_EDGENODE2VERTDIST
;break;
532 case SDRATTR_EDGENODE1GLUEDIST
: pResId
= SIP_SA_EDGENODE1GLUEDIST
;break;
533 case SDRATTR_EDGENODE2GLUEDIST
: pResId
= SIP_SA_EDGENODE2GLUEDIST
;break;
534 case SDRATTR_EDGELINEDELTACOUNT
: pResId
= SIP_SA_EDGELINEDELTACOUNT
;break;
535 case SDRATTR_EDGELINE1DELTA
: pResId
= SIP_SA_EDGELINE1DELTA
;break;
536 case SDRATTR_EDGELINE2DELTA
: pResId
= SIP_SA_EDGELINE2DELTA
;break;
537 case SDRATTR_EDGELINE3DELTA
: pResId
= SIP_SA_EDGELINE3DELTA
;break;
539 case SDRATTR_MEASUREKIND
: pResId
= SIP_SA_MEASUREKIND
;break;
540 case SDRATTR_MEASURETEXTHPOS
: pResId
= SIP_SA_MEASURETEXTHPOS
;break;
541 case SDRATTR_MEASURETEXTVPOS
: pResId
= SIP_SA_MEASURETEXTVPOS
;break;
542 case SDRATTR_MEASURELINEDIST
: pResId
= SIP_SA_MEASURELINEDIST
;break;
543 case SDRATTR_MEASUREHELPLINEOVERHANG
: pResId
= SIP_SA_MEASUREHELPLINEOVERHANG
;break;
544 case SDRATTR_MEASUREHELPLINEDIST
: pResId
= SIP_SA_MEASUREHELPLINEDIST
;break;
545 case SDRATTR_MEASUREHELPLINE1LEN
: pResId
= SIP_SA_MEASUREHELPLINE1LEN
;break;
546 case SDRATTR_MEASUREHELPLINE2LEN
: pResId
= SIP_SA_MEASUREHELPLINE2LEN
;break;
547 case SDRATTR_MEASUREBELOWREFEDGE
: pResId
= SIP_SA_MEASUREBELOWREFEDGE
;break;
548 case SDRATTR_MEASURETEXTROTA90
: pResId
= SIP_SA_MEASURETEXTROTA90
;break;
549 case SDRATTR_MEASURETEXTUPSIDEDOWN
: pResId
= SIP_SA_MEASURETEXTUPSIDEDOWN
;break;
550 case SDRATTR_MEASUREOVERHANG
: pResId
= SIP_SA_MEASUREOVERHANG
;break;
551 case SDRATTR_MEASUREUNIT
: pResId
= SIP_SA_MEASUREUNIT
;break;
552 case SDRATTR_MEASURESCALE
: pResId
= SIP_SA_MEASURESCALE
;break;
553 case SDRATTR_MEASURESHOWUNIT
: pResId
= SIP_SA_MEASURESHOWUNIT
;break;
554 case SDRATTR_MEASUREFORMATSTRING
: pResId
= SIP_SA_MEASUREFORMATSTRING
;break;
555 case SDRATTR_MEASURETEXTAUTOANGLE
: pResId
= SIP_SA_MEASURETEXTAUTOANGLE
;break;
556 case SDRATTR_MEASURETEXTAUTOANGLEVIEW
: pResId
= SIP_SA_MEASURETEXTAUTOANGLEVIEW
;break;
557 case SDRATTR_MEASURETEXTISFIXEDANGLE
: pResId
= SIP_SA_MEASURETEXTISFIXEDANGLE
;break;
558 case SDRATTR_MEASURETEXTFIXEDANGLE
: pResId
= SIP_SA_MEASURETEXTFIXEDANGLE
;break;
559 case SDRATTR_MEASUREDECIMALPLACES
: pResId
= SIP_SA_MEASUREDECIMALPLACES
;break;
561 case SDRATTR_CIRCKIND
: pResId
= SIP_SA_CIRCKIND
;break;
562 case SDRATTR_CIRCSTARTANGLE
: pResId
= SIP_SA_CIRCSTARTANGLE
;break;
563 case SDRATTR_CIRCENDANGLE
: pResId
= SIP_SA_CIRCENDANGLE
;break;
565 case SDRATTR_OBJMOVEPROTECT
: pResId
= SIP_SA_OBJMOVEPROTECT
;break;
566 case SDRATTR_OBJSIZEPROTECT
: pResId
= SIP_SA_OBJSIZEPROTECT
;break;
567 case SDRATTR_OBJPRINTABLE
: pResId
= SIP_SA_OBJPRINTABLE
;break;
568 case SDRATTR_OBJVISIBLE
: pResId
= SIP_SA_OBJVISIBLE
;break;
569 case SDRATTR_LAYERID
: pResId
= SIP_SA_LAYERID
;break;
570 case SDRATTR_LAYERNAME
: pResId
= SIP_SA_LAYERNAME
;break;
571 case SDRATTR_OBJECTNAME
: pResId
= SIP_SA_OBJECTNAME
;break;
572 case SDRATTR_ALLPOSITIONX
: pResId
= SIP_SA_ALLPOSITIONX
;break;
573 case SDRATTR_ALLPOSITIONY
: pResId
= SIP_SA_ALLPOSITIONY
;break;
574 case SDRATTR_ALLSIZEWIDTH
: pResId
= SIP_SA_ALLSIZEWIDTH
;break;
575 case SDRATTR_ALLSIZEHEIGHT
: pResId
= SIP_SA_ALLSIZEHEIGHT
;break;
576 case SDRATTR_ONEPOSITIONX
: pResId
= SIP_SA_ONEPOSITIONX
;break;
577 case SDRATTR_ONEPOSITIONY
: pResId
= SIP_SA_ONEPOSITIONY
;break;
578 case SDRATTR_ONESIZEWIDTH
: pResId
= SIP_SA_ONESIZEWIDTH
;break;
579 case SDRATTR_ONESIZEHEIGHT
: pResId
= SIP_SA_ONESIZEHEIGHT
;break;
580 case SDRATTR_LOGICSIZEWIDTH
: pResId
= SIP_SA_LOGICSIZEWIDTH
;break;
581 case SDRATTR_LOGICSIZEHEIGHT
: pResId
= SIP_SA_LOGICSIZEHEIGHT
;break;
582 case SDRATTR_ROTATEANGLE
: pResId
= SIP_SA_ROTATEANGLE
;break;
583 case SDRATTR_SHEARANGLE
: pResId
= SIP_SA_SHEARANGLE
;break;
584 case SDRATTR_MOVEX
: pResId
= SIP_SA_MOVEX
;break;
585 case SDRATTR_MOVEY
: pResId
= SIP_SA_MOVEY
;break;
586 case SDRATTR_RESIZEXONE
: pResId
= SIP_SA_RESIZEXONE
;break;
587 case SDRATTR_RESIZEYONE
: pResId
= SIP_SA_RESIZEYONE
;break;
588 case SDRATTR_ROTATEONE
: pResId
= SIP_SA_ROTATEONE
;break;
589 case SDRATTR_HORZSHEARONE
: pResId
= SIP_SA_HORZSHEARONE
;break;
590 case SDRATTR_VERTSHEARONE
: pResId
= SIP_SA_VERTSHEARONE
;break;
591 case SDRATTR_RESIZEXALL
: pResId
= SIP_SA_RESIZEXALL
;break;
592 case SDRATTR_RESIZEYALL
: pResId
= SIP_SA_RESIZEYALL
;break;
593 case SDRATTR_ROTATEALL
: pResId
= SIP_SA_ROTATEALL
;break;
594 case SDRATTR_HORZSHEARALL
: pResId
= SIP_SA_HORZSHEARALL
;break;
595 case SDRATTR_VERTSHEARALL
: pResId
= SIP_SA_VERTSHEARALL
;break;
596 case SDRATTR_TRANSFORMREF1X
: pResId
= SIP_SA_TRANSFORMREF1X
;break;
597 case SDRATTR_TRANSFORMREF1Y
: pResId
= SIP_SA_TRANSFORMREF1Y
;break;
598 case SDRATTR_TRANSFORMREF2X
: pResId
= SIP_SA_TRANSFORMREF2X
;break;
599 case SDRATTR_TRANSFORMREF2Y
: pResId
= SIP_SA_TRANSFORMREF2Y
;break;
601 case SDRATTR_GRAFRED
: pResId
= SIP_SA_GRAFRED
;break;
602 case SDRATTR_GRAFGREEN
: pResId
= SIP_SA_GRAFGREEN
;break;
603 case SDRATTR_GRAFBLUE
: pResId
= SIP_SA_GRAFBLUE
;break;
604 case SDRATTR_GRAFLUMINANCE
: pResId
= SIP_SA_GRAFLUMINANCE
;break;
605 case SDRATTR_GRAFCONTRAST
: pResId
= SIP_SA_GRAFCONTRAST
;break;
606 case SDRATTR_GRAFGAMMA
: pResId
= SIP_SA_GRAFGAMMA
;break;
607 case SDRATTR_GRAFTRANSPARENCE
: pResId
= SIP_SA_GRAFTRANSPARENCE
;break;
608 case SDRATTR_GRAFINVERT
: pResId
= SIP_SA_GRAFINVERT
;break;
609 case SDRATTR_GRAFMODE
: pResId
= SIP_SA_GRAFMODE
;break;
610 case SDRATTR_GRAFCROP
: pResId
= SIP_SA_GRAFCROP
;break;
612 case EE_PARA_HYPHENATE
: pResId
= SIP_EE_PARA_HYPHENATE
;break;
613 case EE_PARA_BULLETSTATE
: pResId
= SIP_EE_PARA_BULLETSTATE
;break;
614 case EE_PARA_OUTLLRSPACE
: pResId
= SIP_EE_PARA_OUTLLRSPACE
;break;
615 case EE_PARA_OUTLLEVEL
: pResId
= SIP_EE_PARA_OUTLLEVEL
;break;
616 case EE_PARA_BULLET
: pResId
= SIP_EE_PARA_BULLET
;break;
617 case EE_PARA_LRSPACE
: pResId
= SIP_EE_PARA_LRSPACE
;break;
618 case EE_PARA_ULSPACE
: pResId
= SIP_EE_PARA_ULSPACE
;break;
619 case EE_PARA_SBL
: pResId
= SIP_EE_PARA_SBL
;break;
620 case EE_PARA_JUST
: pResId
= SIP_EE_PARA_JUST
;break;
621 case EE_PARA_TABS
: pResId
= SIP_EE_PARA_TABS
;break;
623 case EE_CHAR_COLOR
: pResId
= SIP_EE_CHAR_COLOR
;break;
624 case EE_CHAR_FONTINFO
: pResId
= SIP_EE_CHAR_FONTINFO
;break;
625 case EE_CHAR_FONTHEIGHT
: pResId
= SIP_EE_CHAR_FONTHEIGHT
;break;
626 case EE_CHAR_FONTWIDTH
: pResId
= SIP_EE_CHAR_FONTWIDTH
;break;
627 case EE_CHAR_WEIGHT
: pResId
= SIP_EE_CHAR_WEIGHT
;break;
628 case EE_CHAR_UNDERLINE
: pResId
= SIP_EE_CHAR_UNDERLINE
;break;
629 case EE_CHAR_OVERLINE
: pResId
= SIP_EE_CHAR_OVERLINE
;break;
630 case EE_CHAR_STRIKEOUT
: pResId
= SIP_EE_CHAR_STRIKEOUT
;break;
631 case EE_CHAR_ITALIC
: pResId
= SIP_EE_CHAR_ITALIC
;break;
632 case EE_CHAR_OUTLINE
: pResId
= SIP_EE_CHAR_OUTLINE
;break;
633 case EE_CHAR_SHADOW
: pResId
= SIP_EE_CHAR_SHADOW
;break;
634 case EE_CHAR_ESCAPEMENT
: pResId
= SIP_EE_CHAR_ESCAPEMENT
;break;
635 case EE_CHAR_PAIRKERNING
: pResId
= SIP_EE_CHAR_PAIRKERNING
;break;
636 case EE_CHAR_KERNING
: pResId
= SIP_EE_CHAR_KERNING
;break;
637 case EE_CHAR_WLM
: pResId
= SIP_EE_CHAR_WLM
;break;
638 case EE_FEATURE_TAB
: pResId
= SIP_EE_FEATURE_TAB
;break;
639 case EE_FEATURE_LINEBR
: pResId
= SIP_EE_FEATURE_LINEBR
;break;
640 case EE_FEATURE_NOTCONV
: pResId
= SIP_EE_FEATURE_NOTCONV
;break;
641 case EE_FEATURE_FIELD
: pResId
= SIP_EE_FEATURE_FIELD
;break;
643 case SDRATTR_TEXTCOLUMNS_NUMBER
: pResId
= SIP_SA_TEXTCOLUMNS_NUMBER
; break;
644 case SDRATTR_TEXTCOLUMNS_SPACING
: pResId
= SIP_SA_TEXTCOLUMNS_SPACING
; break;
647 return SvxResId(pResId
);
654 bool SdrFractionItem::operator==(const SfxPoolItem
& rCmp
) const
656 return SfxPoolItem::operator==(rCmp
) &&
657 static_cast<const SdrFractionItem
&>(rCmp
).GetValue()==nValue
;
660 bool SdrFractionItem::GetPresentation(
661 SfxItemPresentation ePresentation
, MapUnit
/*eCoreMetric*/,
662 MapUnit
/*ePresentationMetric*/, OUString
&rText
, const IntlWrapper
&) const
666 sal_Int32 nDiv
= nValue
.GetDenominator();
667 rText
= OUString::number(nValue
.GetNumerator());
671 rText
+= "/" + OUString::number(nDiv
);
679 if(ePresentation
== SfxItemPresentation::Complete
)
681 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
684 else if(ePresentation
== SfxItemPresentation::Nameless
)
690 SdrFractionItem
* SdrFractionItem::Clone(SfxItemPool
* /*pPool*/) const
692 return new SdrFractionItem(Which(),GetValue());
699 bool SdrScaleItem::GetPresentation(
700 SfxItemPresentation ePresentation
, MapUnit
/*eCoreMetric*/,
701 MapUnit
/*ePresentationMetric*/, OUString
&rText
, const IntlWrapper
&) const
703 if(GetValue().IsValid())
705 sal_Int32 nDiv
= GetValue().GetDenominator();
707 rText
= OUString::number(GetValue().GetNumerator()) + ":" + OUString::number(nDiv
);
714 if(ePresentation
== SfxItemPresentation::Complete
)
716 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
722 SdrScaleItem
* SdrScaleItem::Clone(SfxItemPool
* /*pPool*/) const
724 return new SdrScaleItem(Which(),GetValue());
731 SdrOnOffItem
* SdrOnOffItem::Clone(SfxItemPool
* /*pPool*/) const
733 return new SdrOnOffItem(TypedWhichId
<SdrOnOffItem
>(Which()),GetValue());
736 OUString
SdrOnOffItem::GetValueTextByVal(bool bVal
) const
739 return SvxResId(STR_ItemValON
);
740 return SvxResId(STR_ItemValOFF
);
743 bool SdrOnOffItem::GetPresentation(SfxItemPresentation ePres
,
744 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
746 rText
=GetValueTextByVal(GetValue());
747 if (ePres
==SfxItemPresentation::Complete
) {
748 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
753 void SdrOnOffItem::dumpAsXml(xmlTextWriterPtr pWriter
) const
755 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("SdrOnOffItem"));
756 if (Which() == SDRATTR_SHADOW
)
758 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOW"));
761 SfxBoolItem::dumpAsXml(pWriter
);
763 (void)xmlTextWriterEndElement(pWriter
);
766 SdrYesNoItem
* SdrYesNoItem::Clone(SfxItemPool
* /*pPool*/) const
768 return new SdrYesNoItem(TypedWhichId
<SdrYesNoItem
>(Which()),GetValue());
771 OUString
SdrYesNoItem::GetValueTextByVal(bool bVal
) const
774 return SvxResId(STR_ItemValYES
);
775 return SvxResId(STR_ItemValNO
);
778 bool SdrYesNoItem::GetPresentation(SfxItemPresentation ePres
,
779 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
781 rText
=GetValueTextByVal(GetValue());
782 if (ePres
==SfxItemPresentation::Complete
) {
783 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
788 SdrPercentItem
* SdrPercentItem::Clone(SfxItemPool
* /*pPool*/) const
790 return new SdrPercentItem(TypedWhichId
<SdrPercentItem
>(Which()),GetValue());
793 bool SdrPercentItem::GetPresentation(
794 SfxItemPresentation ePres
, MapUnit
/*eCoreMetric*/,
795 MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
797 rText
= unicode::formatPercent(GetValue(),
798 Application::GetSettings().GetUILanguageTag());
800 if(ePres
== SfxItemPresentation::Complete
)
802 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
808 void SdrPercentItem::dumpAsXml(xmlTextWriterPtr pWriter
) const
810 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("SdrPercentItem"));
811 if (Which() == SDRATTR_SHADOWTRANSPARENCE
)
813 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"),
814 BAD_CAST("SDRATTR_SHADOWTRANSPARENCE"));
817 SfxUInt16Item::dumpAsXml(pWriter
);
819 (void)xmlTextWriterEndElement(pWriter
);
822 SdrAngleItem
* SdrAngleItem::Clone(SfxItemPool
* /*pPool*/) const
824 return new SdrAngleItem(TypedWhichId
<SdrAngleItem
>(Which()),GetValue());
827 bool SdrAngleItem::GetPresentation(
828 SfxItemPresentation ePres
, MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/,
829 OUString
& rText
, const IntlWrapper
& rIntlWrapper
) const
831 sal_Int32
nValue(GetValue());
832 bool bNeg(nValue
< 0);
837 OUStringBuffer aText
= OUString::number(nValue
);
841 sal_Unicode
aUnicodeNull('0');
844 if(LocaleDataWrapper::isNumLeadingZero())
847 while(aText
.getLength() < nCount
)
848 aText
.insert(0, aUnicodeNull
);
850 sal_Int32 nLen
= aText
.getLength();
851 bool bNull1(aText
[nLen
-1] == aUnicodeNull
);
852 bool bNull2(bNull1
&& aText
[nLen
-2] == aUnicodeNull
);
856 // no decimal place(s)
857 sal_Int32 idx
= nLen
-2;
858 aText
.remove(idx
, aText
.getLength()-idx
);
863 rIntlWrapper
.getLocaleData()->getNumDecimalSep()[0];
864 aText
.insert(nLen
-2, cDec
);
867 aText
.remove(nLen
, aText
.getLength()-nLen
);
871 aText
.insert(0, '-');
874 aText
.append(sal_Unicode(DEGREE_CHAR
));
876 if(ePres
== SfxItemPresentation::Complete
)
878 OUString aStr
= SdrItemPool::GetItemName(Which());
879 aText
.insert(0, aStr
+ " ");
882 rText
= aText
.makeStringAndClear();
886 SdrMetricItem
* SdrMetricItem::Clone(SfxItemPool
* /*pPool*/) const
888 return new SdrMetricItem(TypedWhichId
<SdrMetricItem
>(Which()),GetValue());
891 bool SdrMetricItem::HasMetrics() const
896 void SdrMetricItem::ScaleMetrics(tools::Long nMul
, tools::Long nDiv
)
899 SetValue(BigInt::Scale(GetValue(), nMul
, nDiv
));
903 bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres
,
904 MapUnit eCoreMetric
, MapUnit ePresMetric
, OUString
& rText
, const IntlWrapper
&) const
906 tools::Long nValue
=GetValue();
907 SdrFormatter
aFmt(eCoreMetric
,ePresMetric
);
908 rText
= aFmt
.GetStr(nValue
);
909 rText
+= " " + SdrFormatter::GetUnitStr(ePresMetric
);
910 if (ePres
==SfxItemPresentation::Complete
) {
911 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
916 void SdrMetricItem::dumpAsXml(xmlTextWriterPtr pWriter
) const
918 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("SdrMetricItem"));
919 if (Which() == SDRATTR_SHADOWXDIST
)
921 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOWXDIST"));
923 else if (Which() == SDRATTR_SHADOWYDIST
)
925 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOWYDIST"));
927 else if (Which() == SDRATTR_SHADOWSIZEX
)
929 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOWSIZEX"));
931 else if (Which() == SDRATTR_SHADOWSIZEY
)
933 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOWSIZEY"));
935 else if (Which() == SDRATTR_SHADOWBLUR
)
937 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOWBLUR"));
940 SfxInt32Item::dumpAsXml(pWriter
);
942 (void)xmlTextWriterEndElement(pWriter
);
945 // items of the legend object
948 SdrCaptionTypeItem
* SdrCaptionTypeItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrCaptionTypeItem(*this); }
950 sal_uInt16
SdrCaptionTypeItem::GetValueCount() const { return 4; }
952 OUString
SdrCaptionTypeItem::GetValueTextByPos(sal_uInt16 nPos
)
954 static TranslateId ITEMVALCAPTIONTYPES
[] =
956 STR_ItemValCAPTIONTYPE1
,
957 STR_ItemValCAPTIONTYPE2
,
958 STR_ItemValCAPTIONTYPE3
,
959 STR_ItemValCAPTIONTYPE4
961 assert(nPos
< SAL_N_ELEMENTS(ITEMVALCAPTIONTYPES
) && "wrong pos!");
962 return SvxResId(ITEMVALCAPTIONTYPES
[nPos
]);
965 bool SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres
,
966 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
968 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
969 if (ePres
==SfxItemPresentation::Complete
) {
970 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
976 SdrCaptionEscDirItem
* SdrCaptionEscDirItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrCaptionEscDirItem(*this); }
978 sal_uInt16
SdrCaptionEscDirItem::GetValueCount() const { return 3; }
980 OUString
SdrCaptionEscDirItem::GetValueTextByPos(sal_uInt16 nPos
)
982 static TranslateId ITEMVALCAPTIONTYPES
[] =
984 STR_ItemValCAPTIONESCHORI
,
985 STR_ItemValCAPTIONESCVERT
,
986 STR_ItemValCAPTIONESCBESTFIT
988 assert(nPos
< SAL_N_ELEMENTS(ITEMVALCAPTIONTYPES
) && "wrong pos!");
989 return SvxResId(ITEMVALCAPTIONTYPES
[nPos
]);
992 bool SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres
,
993 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
995 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
996 if (ePres
==SfxItemPresentation::Complete
) {
997 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1008 SfxPoolItem
* SdrTextFitToSizeTypeItem::CreateDefault() { return new SdrTextFitToSizeTypeItem
; }
1010 SdrTextFitToSizeTypeItem
* SdrTextFitToSizeTypeItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); }
1012 bool SdrTextFitToSizeTypeItem::operator==(const SfxPoolItem
& rItem
) const
1014 if (!SfxEnumItem
<css::drawing::TextFitToSizeType
>::operator==(rItem
))
1019 return m_nMaxScale
== static_cast<const SdrTextFitToSizeTypeItem
&>(rItem
).m_nMaxScale
;
1022 sal_uInt16
SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
1024 OUString
SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos
)
1026 static TranslateId ITEMVALFITTISIZETYPES
[] =
1028 STR_ItemValFITTOSIZENONE
,
1029 STR_ItemValFITTOSIZEPROP
,
1030 STR_ItemValFITTOSIZEALLLINES
,
1031 STR_ItemValFITTOSIZERESIZEAT
1033 assert(nPos
< SAL_N_ELEMENTS(ITEMVALFITTISIZETYPES
) && "wrong pos!");
1034 return SvxResId(ITEMVALFITTISIZETYPES
[nPos
]);
1037 bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres
,
1038 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1040 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1041 if (ePres
==SfxItemPresentation::Complete
) {
1042 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1047 bool SdrTextFitToSizeTypeItem::HasBoolValue() const { return true; }
1049 bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue() != drawing::TextFitToSizeType_NONE
; }
1051 void SdrTextFitToSizeTypeItem::SetBoolValue(bool bVal
)
1053 SetValue(bVal
? drawing::TextFitToSizeType_PROPORTIONAL
: drawing::TextFitToSizeType_NONE
);
1056 bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1058 drawing::TextFitToSizeType eFS
= GetValue();
1064 bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1066 drawing::TextFitToSizeType eFS
;
1069 sal_Int32 nEnum
= 0;
1070 if(!(rVal
>>= nEnum
))
1073 eFS
= static_cast<drawing::TextFitToSizeType
>(nEnum
);
1082 SdrTextVertAdjustItem
* SdrTextVertAdjustItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); }
1084 sal_uInt16
SdrTextVertAdjustItem::GetValueCount() const { return 5; }
1086 OUString
SdrTextVertAdjustItem::GetValueTextByPos(sal_uInt16 nPos
)
1088 static TranslateId ITEMVALTEXTVADJTYPES
[] =
1090 STR_ItemValTEXTVADJTOP
,
1091 STR_ItemValTEXTVADJCENTER
,
1092 STR_ItemValTEXTVADJBOTTOM
,
1093 STR_ItemValTEXTVADJBLOCK
,
1094 STR_ItemValTEXTVADJSTRETCH
1096 assert(nPos
< SAL_N_ELEMENTS(ITEMVALTEXTVADJTYPES
) && "wrong pos!");
1097 return SvxResId(ITEMVALTEXTVADJTYPES
[nPos
]);
1100 bool SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres
,
1101 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1103 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1104 if (ePres
==SfxItemPresentation::Complete
) {
1105 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1110 bool SdrTextVertAdjustItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1112 rVal
<<= static_cast<drawing::TextVerticalAdjust
>(GetValue());
1116 bool SdrTextVertAdjustItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1118 drawing::TextVerticalAdjust eAdj
;
1119 if(!(rVal
>>= eAdj
))
1121 sal_Int32 nEnum
= 0;
1122 if(!(rVal
>>= nEnum
))
1125 eAdj
= static_cast<drawing::TextVerticalAdjust
>(nEnum
);
1128 SetValue( static_cast<SdrTextVertAdjust
>(eAdj
) );
1133 void SdrTextVertAdjustItem::dumpAsXml(xmlTextWriterPtr pWriter
) const
1135 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("SdrTextVertAdjustItem"));
1136 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
1137 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
1138 (void)xmlTextWriterEndElement(pWriter
);
1141 SdrTextHorzAdjustItem
* SdrTextHorzAdjustItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextHorzAdjustItem(*this); }
1143 sal_uInt16
SdrTextHorzAdjustItem::GetValueCount() const { return 5; }
1145 OUString
SdrTextHorzAdjustItem::GetValueTextByPos(sal_uInt16 nPos
)
1147 static TranslateId ITEMVALTEXTHADJTYPES
[] =
1149 STR_ItemValTEXTHADJLEFT
,
1150 STR_ItemValTEXTHADJCENTER
,
1151 STR_ItemValTEXTHADJRIGHT
,
1152 STR_ItemValTEXTHADJBLOCK
,
1153 STR_ItemValTEXTHADJSTRETCH
1155 assert(nPos
< SAL_N_ELEMENTS(ITEMVALTEXTHADJTYPES
) && "wrong pos!");
1156 return SvxResId(ITEMVALTEXTHADJTYPES
[nPos
]);
1159 bool SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres
,
1160 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1162 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1163 if (ePres
==SfxItemPresentation::Complete
) {
1164 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1169 bool SdrTextHorzAdjustItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1171 rVal
<<= static_cast<drawing::TextHorizontalAdjust
>(GetValue());
1175 bool SdrTextHorzAdjustItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1177 drawing::TextHorizontalAdjust eAdj
;
1178 if(!(rVal
>>= eAdj
))
1180 sal_Int32 nEnum
= 0;
1181 if(!(rVal
>>= nEnum
))
1184 eAdj
= static_cast<drawing::TextHorizontalAdjust
>(nEnum
);
1187 SetValue( static_cast<SdrTextHorzAdjust
>(eAdj
) );
1193 SdrTextAniKindItem
* SdrTextAniKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniKindItem(*this); }
1195 sal_uInt16
SdrTextAniKindItem::GetValueCount() const { return 5; }
1197 OUString
SdrTextAniKindItem::GetValueTextByPos(sal_uInt16 nPos
)
1199 static TranslateId ITEMVALTEXTANITYPES
[] =
1201 STR_ItemValTEXTANI_NONE
,
1202 STR_ItemValTEXTANI_BLINK
,
1203 STR_ItemValTEXTANI_SCROLL
,
1204 STR_ItemValTEXTANI_ALTERNATE
,
1205 STR_ItemValTEXTANI_SLIDE
1207 assert(nPos
< SAL_N_ELEMENTS(ITEMVALTEXTANITYPES
) && "wrong pos!");
1208 return SvxResId(ITEMVALTEXTANITYPES
[nPos
]);
1211 bool SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres
,
1212 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1214 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1215 if (ePres
==SfxItemPresentation::Complete
) {
1216 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1221 bool SdrTextAniKindItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1223 rVal
<<= static_cast<drawing::TextAnimationKind
>(GetValue());
1227 bool SdrTextAniKindItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1229 drawing::TextAnimationKind eKind
;
1230 if(!(rVal
>>= eKind
))
1232 sal_Int32 nEnum
= 0;
1233 if(!(rVal
>>= nEnum
))
1235 eKind
= static_cast<drawing::TextAnimationKind
>(nEnum
);
1238 SetValue( static_cast<SdrTextAniKind
>(eKind
) );
1244 SdrTextAniDirectionItem
* SdrTextAniDirectionItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniDirectionItem(*this); }
1246 sal_uInt16
SdrTextAniDirectionItem::GetValueCount() const { return 4; }
1248 OUString
SdrTextAniDirectionItem::GetValueTextByPos(sal_uInt16 nPos
)
1250 static TranslateId ITEMVALTEXTANITYPES
[] =
1252 STR_ItemValTEXTANI_LEFT
,
1253 STR_ItemValTEXTANI_UP
,
1254 STR_ItemValTEXTANI_RIGHT
,
1255 STR_ItemValTEXTANI_DOWN
1257 assert(nPos
< SAL_N_ELEMENTS(ITEMVALTEXTANITYPES
) && "wrong pos!");
1258 return SvxResId(ITEMVALTEXTANITYPES
[nPos
]);
1261 bool SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres
,
1262 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1264 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1265 if (ePres
==SfxItemPresentation::Complete
) {
1266 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1271 bool SdrTextAniDirectionItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1273 rVal
<<= static_cast<drawing::TextAnimationDirection
>(GetValue());
1277 bool SdrTextAniDirectionItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1279 drawing::TextAnimationDirection eDir
;
1280 if(!(rVal
>>= eDir
))
1282 sal_Int32 nEnum
= 0;
1283 if(!(rVal
>>= nEnum
))
1286 eDir
= static_cast<drawing::TextAnimationDirection
>(nEnum
);
1289 SetValue( static_cast<SdrTextAniDirection
>(eDir
) );
1295 SdrTextAniDelayItem
* SdrTextAniDelayItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniDelayItem(*this); }
1297 bool SdrTextAniDelayItem::GetPresentation(
1298 SfxItemPresentation ePres
, MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/,
1299 OUString
& rText
, const IntlWrapper
&) const
1301 rText
= OUString::number(GetValue()) + "ms";
1303 if(ePres
== SfxItemPresentation::Complete
)
1305 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1312 SdrTextAniAmountItem
* SdrTextAniAmountItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniAmountItem(*this); }
1314 bool SdrTextAniAmountItem::HasMetrics() const
1316 return GetValue()>0;
1319 void SdrTextAniAmountItem::ScaleMetrics(tools::Long nMul
, tools::Long nDiv
)
1322 BigInt
aVal(GetValue());
1324 aVal
+=nDiv
/2; // to round accurately
1326 SetValue(short(aVal
));
1330 bool SdrTextAniAmountItem::GetPresentation(
1331 SfxItemPresentation ePres
, MapUnit eCoreMetric
, MapUnit ePresMetric
,
1332 OUString
& rText
, const IntlWrapper
&) const
1334 sal_Int32
nValue(GetValue());
1341 rText
= OUString::number(-nValue
) + "pixel";
1345 SdrFormatter
aFmt(eCoreMetric
, ePresMetric
);
1346 rText
= aFmt
.GetStr(nValue
) +
1347 SdrFormatter::GetUnitStr(ePresMetric
);
1350 if(ePres
== SfxItemPresentation::Complete
)
1352 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1359 SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( bool bUseFixedCellHeight
)
1360 : SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT
, bUseFixedCellHeight
)
1363 bool SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres
,
1364 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresentationMetric*/,
1365 OUString
&rText
, const IntlWrapper
& ) const
1367 rText
= GetValueTextByVal( GetValue() );
1368 if (ePres
==SfxItemPresentation::Complete
)
1370 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1375 SdrTextFixedCellHeightItem
* SdrTextFixedCellHeightItem::Clone( SfxItemPool
* /*pPool*/) const
1377 return new SdrTextFixedCellHeightItem( GetValue() );
1380 bool SdrTextFixedCellHeightItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1382 bool bValue
= GetValue();
1386 bool SdrTextFixedCellHeightItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1389 if( !( rVal
>>= bValue
) )
1397 SdrEdgeKindItem
* SdrEdgeKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrEdgeKindItem(*this); }
1399 sal_uInt16
SdrEdgeKindItem::GetValueCount() const { return 4; }
1401 OUString
SdrEdgeKindItem::GetValueTextByPos(sal_uInt16 nPos
)
1403 static TranslateId ITEMVALEDGES
[] =
1405 STR_ItemValEDGE_ORTHOLINES
,
1406 STR_ItemValEDGE_THREELINES
,
1407 STR_ItemValEDGE_ONELINE
,
1408 STR_ItemValEDGE_BEZIER
1410 assert(nPos
< SAL_N_ELEMENTS(ITEMVALEDGES
) && "wrong pos!");
1411 return SvxResId(ITEMVALEDGES
[nPos
]);
1414 bool SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres
,
1415 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1417 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1418 if (ePres
==SfxItemPresentation::Complete
) {
1419 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1424 bool SdrEdgeKindItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1426 drawing::ConnectorType eCT
= drawing::ConnectorType_STANDARD
;
1428 switch( GetValue() )
1430 case SdrEdgeKind::OrthoLines
: eCT
= drawing::ConnectorType_STANDARD
; break;
1431 case SdrEdgeKind::ThreeLines
: eCT
= drawing::ConnectorType_LINES
; break;
1432 case SdrEdgeKind::OneLine
: eCT
= drawing::ConnectorType_LINE
; break;
1433 case SdrEdgeKind::Bezier
: eCT
= drawing::ConnectorType_CURVE
; break;
1434 case SdrEdgeKind::Arc
: eCT
= drawing::ConnectorType_CURVE
; break;
1436 OSL_FAIL( "SdrEdgeKindItem::QueryValue : unknown enum" );
1444 bool SdrEdgeKindItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1446 drawing::ConnectorType eCT
;
1449 sal_Int32 nEnum
= 0;
1450 if(!(rVal
>>= nEnum
))
1453 eCT
= static_cast<drawing::ConnectorType
>(nEnum
);
1456 SdrEdgeKind eEK
= SdrEdgeKind::OrthoLines
;
1459 case drawing::ConnectorType_STANDARD
: eEK
= SdrEdgeKind::OrthoLines
; break;
1460 case drawing::ConnectorType_CURVE
: eEK
= SdrEdgeKind::Bezier
; break;
1461 case drawing::ConnectorType_LINE
: eEK
= SdrEdgeKind::OneLine
; break;
1462 case drawing::ConnectorType_LINES
: eEK
= SdrEdgeKind::ThreeLines
; break;
1464 OSL_FAIL( "SdrEdgeKindItem::PuValue : unknown enum" );
1471 bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1473 rVal
<<= GetValue();
1477 bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1479 sal_Int32 nValue
= 0;
1480 if(!(rVal
>>= nValue
))
1487 SdrEdgeNode1HorzDistItem
* SdrEdgeNode1HorzDistItem::Clone(SfxItemPool
* /*pPool*/) const
1489 return new SdrEdgeNode1HorzDistItem(*this);
1492 bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1494 rVal
<<= GetValue();
1498 bool SdrEdgeNode1VertDistItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1500 sal_Int32 nValue
= 0;
1501 if(!(rVal
>>= nValue
))
1508 SdrEdgeNode1VertDistItem
* SdrEdgeNode1VertDistItem::Clone(SfxItemPool
* /*pPool*/) const
1510 return new SdrEdgeNode1VertDistItem(*this);
1513 bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1515 rVal
<<= GetValue();
1519 bool SdrEdgeNode2HorzDistItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1521 sal_Int32 nValue
= 0;
1522 if(!(rVal
>>= nValue
))
1529 SdrEdgeNode2HorzDistItem
* SdrEdgeNode2HorzDistItem::Clone(SfxItemPool
* /*pPool*/) const
1531 return new SdrEdgeNode2HorzDistItem(*this);
1534 bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1536 rVal
<<= GetValue();
1540 bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1542 sal_Int32 nValue
= 0;
1543 if(!(rVal
>>= nValue
))
1550 SdrEdgeNode2VertDistItem
* SdrEdgeNode2VertDistItem::Clone(SfxItemPool
* /*pPool*/) const
1552 return new SdrEdgeNode2VertDistItem(*this);
1555 SdrEdgeNode1GlueDistItem
* SdrEdgeNode1GlueDistItem::Clone(SfxItemPool
* /*pPool*/) const
1557 return new SdrEdgeNode1GlueDistItem(*this);
1560 SdrEdgeNode2GlueDistItem
* SdrEdgeNode2GlueDistItem::Clone(SfxItemPool
* /*pPool*/) const
1562 return new SdrEdgeNode2GlueDistItem(*this);
1565 SdrMeasureKindItem
* SdrMeasureKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureKindItem(*this); }
1567 sal_uInt16
SdrMeasureKindItem::GetValueCount() const { return 2; }
1569 OUString
SdrMeasureKindItem::GetValueTextByPos(sal_uInt16 nPos
)
1571 static TranslateId ITEMVALMEASURETYPES
[] =
1573 STR_ItemValMEASURE_STD
,
1574 STR_ItemValMEASURE_RADIUS
1576 assert(nPos
< SAL_N_ELEMENTS(ITEMVALMEASURETYPES
) && "wrong pos!");
1577 return SvxResId(ITEMVALMEASURETYPES
[nPos
]);
1580 bool SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres
,
1581 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1583 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1584 if (ePres
==SfxItemPresentation::Complete
) {
1585 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1590 bool SdrMeasureKindItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1592 rVal
<<= static_cast<drawing::MeasureKind
>(GetValue());
1596 bool SdrMeasureKindItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1598 drawing::MeasureKind eKind
;
1599 if(!(rVal
>>= eKind
))
1601 sal_Int32 nEnum
= 0;
1602 if(!(rVal
>>= nEnum
))
1605 eKind
= static_cast<drawing::MeasureKind
>(nEnum
);
1608 SetValue( static_cast<SdrMeasureKind
>(eKind
) );
1613 SdrMeasureTextHPosItem
* SdrMeasureTextHPosItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureTextHPosItem(*this); }
1615 sal_uInt16
SdrMeasureTextHPosItem::GetValueCount() const { return 4; }
1617 const OUString
& SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos
)
1619 static std::array
<OUString
, 4> aMeasureTextHPosItem
1623 "inside (centered)",
1626 assert(nPos
< aMeasureTextHPosItem
.size() && "wrong pos!");
1627 return aMeasureTextHPosItem
[nPos
];
1630 bool SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres
,
1631 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1633 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1634 if (ePres
==SfxItemPresentation::Complete
) {
1635 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1640 bool SdrMeasureTextHPosItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1642 rVal
<<= GetValue();
1646 bool SdrMeasureTextHPosItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1648 drawing::MeasureTextHorzPos ePos
;
1649 if(!(rVal
>>= ePos
))
1651 sal_Int32 nEnum
= 0;
1652 if(!(rVal
>>= nEnum
))
1655 ePos
= static_cast<drawing::MeasureTextHorzPos
>(nEnum
);
1662 SdrMeasureTextVPosItem
* SdrMeasureTextVPosItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureTextVPosItem(*this); }
1664 sal_uInt16
SdrMeasureTextVPosItem::GetValueCount() const { return 5; }
1666 OUString
SdrMeasureTextVPosItem::GetValueTextByPos(sal_uInt16 nPos
)
1668 static TranslateId ITEMVALMEASURETEXTTYPES
[] =
1670 STR_ItemValMEASURE_TEXTVAUTO
,
1671 STR_ItemValMEASURE_ABOVE
,
1672 STR_ItemValMEASURETEXT_BREAKEDLINE
,
1673 STR_ItemValMEASURE_BELOW
,
1674 STR_ItemValMEASURETEXT_VERTICALCEN
1676 assert(nPos
< SAL_N_ELEMENTS(ITEMVALMEASURETEXTTYPES
) && "wrong pos!");
1677 return SvxResId(ITEMVALMEASURETEXTTYPES
[nPos
]);
1680 bool SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres
,
1681 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1683 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1684 if (ePres
==SfxItemPresentation::Complete
) {
1685 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1690 bool SdrMeasureTextVPosItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1692 rVal
<<= GetValue();
1696 bool SdrMeasureTextVPosItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1698 drawing::MeasureTextVertPos ePos
;
1699 if(!(rVal
>>= ePos
))
1701 sal_Int32 nEnum
= 0;
1702 if(!(rVal
>>= nEnum
))
1705 ePos
= static_cast<drawing::MeasureTextVertPos
>(nEnum
);
1712 SdrMeasureUnitItem
* SdrMeasureUnitItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureUnitItem(*this); }
1714 sal_uInt16
SdrMeasureUnitItem::GetValueCount() const { return 14; }
1716 OUString
SdrMeasureUnitItem::GetValueTextByPos(sal_uInt16 nPos
)
1718 if(static_cast<FieldUnit
>(nPos
) == FieldUnit::NONE
)
1721 return SdrFormatter::GetUnitStr(static_cast<FieldUnit
>(nPos
));
1724 bool SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres
,
1725 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1727 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1728 if (ePres
==SfxItemPresentation::Complete
) {
1729 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1734 bool SdrMeasureUnitItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1736 rVal
<<= static_cast<sal_Int32
>(GetValue());
1740 bool SdrMeasureUnitItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1742 sal_Int32 nMeasure
= 0;
1743 if(!(rVal
>>= nMeasure
))
1746 SetValue( static_cast<FieldUnit
>(nMeasure
) );
1751 SdrCircKindItem
* SdrCircKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrCircKindItem(*this); }
1753 sal_uInt16
SdrCircKindItem::GetValueCount() const { return 4; }
1755 OUString
SdrCircKindItem::GetValueTextByPos(sal_uInt16 nPos
)
1757 static TranslateId ITEMVALCIRCTYPES
[] =
1759 STR_ItemValCIRC_FULL
,
1760 STR_ItemValCIRC_SECT
,
1761 STR_ItemValCIRC_CUT
,
1764 assert(nPos
< SAL_N_ELEMENTS(ITEMVALCIRCTYPES
) && "wrong pos!");
1765 return SvxResId(ITEMVALCIRCTYPES
[nPos
]);
1768 bool SdrCircKindItem::GetPresentation(SfxItemPresentation ePres
,
1769 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/, OUString
& rText
, const IntlWrapper
&) const
1771 rText
=GetValueTextByPos(sal::static_int_cast
< sal_uInt16
>(GetValue()));
1772 if (ePres
==SfxItemPresentation::Complete
) {
1773 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1778 bool SdrCircKindItem::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1780 rVal
<<= static_cast<drawing::CircleKind
>(GetValue());
1784 bool SdrCircKindItem::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1786 drawing::CircleKind eKind
;
1787 if(!(rVal
>>= eKind
))
1789 sal_Int32 nEnum
= 0;
1790 if(!(rVal
>>= nEnum
))
1793 eKind
= static_cast<drawing::CircleKind
>(nEnum
);
1796 SetValue( static_cast<SdrCircKind
>(eKind
) );
1800 SdrSignedPercentItem
* SdrSignedPercentItem::Clone(SfxItemPool
* /*pPool*/) const
1802 return new SdrSignedPercentItem( Which(), GetValue() );
1805 bool SdrSignedPercentItem::GetPresentation(
1806 SfxItemPresentation ePres
, MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/,
1807 OUString
& rText
, const IntlWrapper
&) const
1809 rText
= unicode::formatPercent(GetValue(),
1810 Application::GetSettings().GetUILanguageTag());
1812 if(ePres
== SfxItemPresentation::Complete
)
1814 rText
= SdrItemPool::GetItemName(Which()) + " " + rText
;
1820 SdrGrafRedItem
* SdrGrafRedItem::Clone( SfxItemPool
* /*pPool*/) const
1822 return new SdrGrafRedItem( *this );
1825 SdrGrafGreenItem
* SdrGrafGreenItem::Clone( SfxItemPool
* /*pPool*/) const
1827 return new SdrGrafGreenItem( *this );
1830 SdrGrafBlueItem
* SdrGrafBlueItem::Clone( SfxItemPool
* /*pPool*/) const
1832 return new SdrGrafBlueItem( *this );
1835 SdrGrafLuminanceItem
* SdrGrafLuminanceItem::Clone( SfxItemPool
* /*pPool*/) const
1837 return new SdrGrafLuminanceItem( *this );
1840 SdrGrafContrastItem
* SdrGrafContrastItem::Clone( SfxItemPool
* /*pPool*/) const
1842 return new SdrGrafContrastItem( *this );
1845 SdrGrafGamma100Item
* SdrGrafGamma100Item::Clone( SfxItemPool
* /*pPool */) const
1847 return new SdrGrafGamma100Item( *this );
1850 bool SdrGrafGamma100Item::QueryValue( uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
1852 rVal
<<= static_cast<double>(GetValue()) / 100.0;
1856 bool SdrGrafGamma100Item::PutValue( const uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
1859 if(!(rVal
>>= nGamma
))
1862 SetValue( static_cast<sal_uInt32
>(nGamma
* 100.0 ) );
1866 SdrGrafInvertItem
* SdrGrafInvertItem::Clone( SfxItemPool
* /*pPool*/) const
1868 return new SdrGrafInvertItem( *this );
1871 SdrGrafTransparenceItem
* SdrGrafTransparenceItem::Clone( SfxItemPool
* /*pPool*/) const
1873 return new SdrGrafTransparenceItem( *this );
1876 SdrGrafModeItem
* SdrGrafModeItem::Clone(SfxItemPool
* /*pPool*/) const
1878 return new SdrGrafModeItem( *this );
1881 sal_uInt16
SdrGrafModeItem::GetValueCount() const
1886 OUString
SdrGrafModeItem::GetValueTextByPos(sal_uInt16 nPos
)
1899 aStr
= "Black/White";
1917 bool SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres
,
1918 MapUnit
/*eCoreMetric*/, MapUnit
/*ePresMetric*/,
1919 OUString
& rText
, const IntlWrapper
&) const
1921 rText
= GetValueTextByPos( sal::static_int_cast
< sal_uInt16
>( GetValue() ) );
1923 if( ePres
== SfxItemPresentation::Complete
)
1925 rText
= SdrItemPool::GetItemName( Which() ) + " " + rText
;
1931 SdrGrafCropItem
* SdrGrafCropItem::Clone( SfxItemPool
* /*pPool*/) const
1933 return new SdrGrafCropItem( *this );
1936 SdrTextAniStartInsideItem::~SdrTextAniStartInsideItem()
1940 SdrTextAniStartInsideItem
* SdrTextAniStartInsideItem::Clone(SfxItemPool
* ) const
1942 return new SdrTextAniStartInsideItem(*this);
1945 SdrTextAniStopInsideItem::~SdrTextAniStopInsideItem()
1949 SdrTextAniStopInsideItem
* SdrTextAniStopInsideItem::Clone(SfxItemPool
* ) const
1951 return new SdrTextAniStopInsideItem(*this);
1954 SdrCaptionEscIsRelItem::~SdrCaptionEscIsRelItem()
1958 SdrCaptionEscIsRelItem
* SdrCaptionEscIsRelItem::Clone(SfxItemPool
* ) const
1960 return new SdrCaptionEscIsRelItem(*this);
1963 SdrCaptionEscRelItem::~SdrCaptionEscRelItem()
1967 SdrCaptionEscRelItem
* SdrCaptionEscRelItem::Clone(SfxItemPool
*) const
1969 return new SdrCaptionEscRelItem(*this);
1972 SdrCaptionFitLineLenItem::~SdrCaptionFitLineLenItem()
1976 SdrCaptionFitLineLenItem
* SdrCaptionFitLineLenItem::Clone(SfxItemPool
* ) const
1978 return new SdrCaptionFitLineLenItem(*this);
1981 SdrCaptionLineLenItem::~SdrCaptionLineLenItem()
1985 SdrCaptionLineLenItem
* SdrCaptionLineLenItem::Clone(SfxItemPool
*) const
1987 return new SdrCaptionLineLenItem(*this);
1990 SdrMeasureBelowRefEdgeItem::~SdrMeasureBelowRefEdgeItem()
1994 SdrMeasureBelowRefEdgeItem
* SdrMeasureBelowRefEdgeItem::Clone(SfxItemPool
* ) const
1996 return new SdrMeasureBelowRefEdgeItem(*this);
1999 SdrMeasureTextIsFixedAngleItem::~SdrMeasureTextIsFixedAngleItem()
2003 SdrMeasureTextIsFixedAngleItem
* SdrMeasureTextIsFixedAngleItem::Clone(SfxItemPool
* ) const
2005 return new SdrMeasureTextIsFixedAngleItem(*this);
2008 SdrMeasureTextFixedAngleItem::~SdrMeasureTextFixedAngleItem()
2012 SdrMeasureTextFixedAngleItem
* SdrMeasureTextFixedAngleItem::Clone(SfxItemPool
* ) const
2014 return new SdrMeasureTextFixedAngleItem(*this);
2017 SdrMeasureDecimalPlacesItem::~SdrMeasureDecimalPlacesItem()
2021 SdrMeasureDecimalPlacesItem
* SdrMeasureDecimalPlacesItem::Clone(SfxItemPool
* ) const
2023 return new SdrMeasureDecimalPlacesItem(*this);
2026 SdrMeasureTextRota90Item::~SdrMeasureTextRota90Item()
2030 SdrMeasureTextRota90Item
* SdrMeasureTextRota90Item::Clone(SfxItemPool
* ) const
2032 return new SdrMeasureTextRota90Item(*this);
2035 SdrMeasureTextUpsideDownItem::~SdrMeasureTextUpsideDownItem()
2039 SdrMeasureTextUpsideDownItem
* SdrMeasureTextUpsideDownItem::Clone(SfxItemPool
* ) const
2041 return new SdrMeasureTextUpsideDownItem(*this);
2044 SdrLayerIdItem
* SdrLayerIdItem::Clone(SfxItemPool
* /*pPool*/) const
2046 return new SdrLayerIdItem(*this);
2049 SdrLayerNameItem
* SdrLayerNameItem::Clone(SfxItemPool
* /*pPool*/) const
2051 return new SdrLayerNameItem(*this);
2054 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */