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: svdattr.cxx,v $
10 * $Revision: 1.34.212.2 $
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 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
35 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
36 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
37 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
38 #include <com/sun/star/drawing/TextAnimationKind.hpp>
39 #include <com/sun/star/uno/Any.hxx>
40 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
41 #include <com/sun/star/drawing/ConnectorType.hpp>
42 #include <com/sun/star/drawing/MeasureKind.hpp>
43 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
44 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
45 #include <com/sun/star/drawing/CircleKind.hpp>
46 #include <com/sun/star/uno/Sequence.hxx>
48 #include <unotools/intlwrapper.hxx>
49 #include <comphelper/processfactory.hxx>
50 #include <vcl/svapp.hxx>
51 #include <svx/svdattr.hxx>
52 #include <svx/svdattrx.hxx>
53 #include <svx/svdpool.hxx>
55 #include <svtools/solar.hrc>
56 #include "xmlcnitm.hxx"
58 #include <svx/svxids.hrc>
59 #include <svx/xtable.hxx> // fuer RGB_Color()
60 #include "svditext.hxx"
61 #include <svx/svdmodel.hxx> // fuer DEGREE_CHAR
62 #include <svx/svdtrans.hxx>
63 #include "svdglob.hxx" // Stringcache
65 #include <svx/sdgcpitm.hxx>
66 #include <svx/adjitem.hxx>
67 #include <svx/sdtfchim.hxx>
68 #include <svx/writingmodeitem.hxx>
69 #include <tools/bigint.hxx>
70 #include <tools/stream.hxx>
72 #include <svx/xfillit0.hxx>
73 #include <svx/xflclit.hxx>
74 #include <svx/xlineit0.hxx>
75 #include <svx/svx3ditems.hxx>
77 #define ITEMID_BOX SDRATTR_TABLE_BORDER
78 #define ITEMID_BOXINFO SDRATTR_TABLE_BORDER_INNER
79 #include "svx/boxitem.hxx"
81 #define ITEMID_SHADOW SDRATTR_TABLE_BORDER_SHADOW
82 #include "svx/shaditem.hxx"
85 #include "bolnitem.hxx"
87 using namespace ::rtl
;
88 using namespace ::com::sun::star
;
90 /*************************************************************************
94 \************************************************************************/
96 SdrItemPool::SdrItemPool(
97 SfxItemPool
* _pMaster
,
98 sal_Bool bLoadRefCounts
)
99 : XOutdevItemPool(_pMaster
, SDRATTR_START
, SDRATTR_END
, bLoadRefCounts
)
101 // preapare some constants
102 const Color
aNullCol(RGB_Color(COL_BLACK
));
103 const XubString aEmptyStr
;
104 const sal_Int32
nDefEdgeDist(500L); // Erstmal hart defaulted fuer Draw (100TH_MM). hier muss noch der MapMode beruecksichtigt werden.
106 // init the non-persistent items
107 for(sal_uInt16
i(SDRATTR_NOTPERSIST_FIRST
); i
<= SDRATTR_NOTPERSIST_LAST
; i
++)
109 mpLocalItemInfos
[i
- SDRATTR_START
]._nFlags
=0;
112 // init own PoolDefaults
113 mppLocalPoolDefaults
[SDRATTR_SHADOW
-SDRATTR_START
]=new SdrShadowItem
;
114 mppLocalPoolDefaults
[SDRATTR_SHADOWCOLOR
-SDRATTR_START
]=new SdrShadowColorItem(aEmptyStr
,aNullCol
);
115 mppLocalPoolDefaults
[SDRATTR_SHADOWXDIST
-SDRATTR_START
]=new SdrShadowXDistItem
;
116 mppLocalPoolDefaults
[SDRATTR_SHADOWYDIST
-SDRATTR_START
]=new SdrShadowYDistItem
;
117 mppLocalPoolDefaults
[SDRATTR_SHADOWTRANSPARENCE
-SDRATTR_START
]=new SdrShadowTransparenceItem
;
118 mppLocalPoolDefaults
[SDRATTR_SHADOW3D
-SDRATTR_START
]=new SfxVoidItem(SDRATTR_SHADOW3D
);
119 mppLocalPoolDefaults
[SDRATTR_SHADOWPERSP
-SDRATTR_START
]=new SfxVoidItem(SDRATTR_SHADOWPERSP
);
120 mppLocalPoolDefaults
[SDRATTR_CAPTIONTYPE
-SDRATTR_START
]=new SdrCaptionTypeItem
;
121 mppLocalPoolDefaults
[SDRATTR_CAPTIONFIXEDANGLE
-SDRATTR_START
]=new SdrCaptionFixedAngleItem
;
122 mppLocalPoolDefaults
[SDRATTR_CAPTIONANGLE
-SDRATTR_START
]=new SdrCaptionAngleItem
;
123 mppLocalPoolDefaults
[SDRATTR_CAPTIONGAP
-SDRATTR_START
]=new SdrCaptionGapItem
;
124 mppLocalPoolDefaults
[SDRATTR_CAPTIONESCDIR
-SDRATTR_START
]=new SdrCaptionEscDirItem
;
125 mppLocalPoolDefaults
[SDRATTR_CAPTIONESCISREL
-SDRATTR_START
]=new SdrCaptionEscIsRelItem
;
126 mppLocalPoolDefaults
[SDRATTR_CAPTIONESCREL
-SDRATTR_START
]=new SdrCaptionEscRelItem
;
127 mppLocalPoolDefaults
[SDRATTR_CAPTIONESCABS
-SDRATTR_START
]=new SdrCaptionEscAbsItem
;
128 mppLocalPoolDefaults
[SDRATTR_CAPTIONLINELEN
-SDRATTR_START
]=new SdrCaptionLineLenItem
;
129 mppLocalPoolDefaults
[SDRATTR_CAPTIONFITLINELEN
-SDRATTR_START
]=new SdrCaptionFitLineLenItem
;
130 mppLocalPoolDefaults
[SDRATTR_ECKENRADIUS
-SDRATTR_START
]=new SdrEckenradiusItem
;
131 mppLocalPoolDefaults
[SDRATTR_TEXT_MINFRAMEHEIGHT
-SDRATTR_START
]=new SdrTextMinFrameHeightItem
;
132 mppLocalPoolDefaults
[SDRATTR_TEXT_AUTOGROWHEIGHT
-SDRATTR_START
]=new SdrTextAutoGrowHeightItem
;
133 mppLocalPoolDefaults
[SDRATTR_TEXT_FITTOSIZE
-SDRATTR_START
]=new SdrTextFitToSizeTypeItem
;
134 mppLocalPoolDefaults
[SDRATTR_TEXT_LEFTDIST
-SDRATTR_START
]=new SdrTextLeftDistItem
;
135 mppLocalPoolDefaults
[SDRATTR_TEXT_RIGHTDIST
-SDRATTR_START
]=new SdrTextRightDistItem
;
136 mppLocalPoolDefaults
[SDRATTR_TEXT_UPPERDIST
-SDRATTR_START
]=new SdrTextUpperDistItem
;
137 mppLocalPoolDefaults
[SDRATTR_TEXT_LOWERDIST
-SDRATTR_START
]=new SdrTextLowerDistItem
;
138 mppLocalPoolDefaults
[SDRATTR_TEXT_VERTADJUST
-SDRATTR_START
]=new SdrTextVertAdjustItem
;
139 mppLocalPoolDefaults
[SDRATTR_TEXT_MAXFRAMEHEIGHT
-SDRATTR_START
]=new SdrTextMaxFrameHeightItem
;
140 mppLocalPoolDefaults
[SDRATTR_TEXT_MINFRAMEWIDTH
-SDRATTR_START
]=new SdrTextMinFrameWidthItem
;
141 mppLocalPoolDefaults
[SDRATTR_TEXT_MAXFRAMEWIDTH
-SDRATTR_START
]=new SdrTextMaxFrameWidthItem
;
142 mppLocalPoolDefaults
[SDRATTR_TEXT_AUTOGROWWIDTH
-SDRATTR_START
]=new SdrTextAutoGrowWidthItem
;
143 mppLocalPoolDefaults
[SDRATTR_TEXT_HORZADJUST
-SDRATTR_START
]=new SdrTextHorzAdjustItem
;
144 mppLocalPoolDefaults
[SDRATTR_TEXT_ANIKIND
-SDRATTR_START
]=new SdrTextAniKindItem
;
145 mppLocalPoolDefaults
[SDRATTR_TEXT_ANIDIRECTION
-SDRATTR_START
]=new SdrTextAniDirectionItem
;
146 mppLocalPoolDefaults
[SDRATTR_TEXT_ANISTARTINSIDE
-SDRATTR_START
]=new SdrTextAniStartInsideItem
;
147 mppLocalPoolDefaults
[SDRATTR_TEXT_ANISTOPINSIDE
-SDRATTR_START
]=new SdrTextAniStopInsideItem
;
148 mppLocalPoolDefaults
[SDRATTR_TEXT_ANICOUNT
-SDRATTR_START
]=new SdrTextAniCountItem
;
149 mppLocalPoolDefaults
[SDRATTR_TEXT_ANIDELAY
-SDRATTR_START
]=new SdrTextAniDelayItem
;
150 mppLocalPoolDefaults
[SDRATTR_TEXT_ANIAMOUNT
-SDRATTR_START
]=new SdrTextAniAmountItem
;
151 mppLocalPoolDefaults
[SDRATTR_TEXT_CONTOURFRAME
-SDRATTR_START
]=new SdrTextContourFrameItem
;
152 mppLocalPoolDefaults
[SDRATTR_CUSTOMSHAPE_ADJUSTMENT
-SDRATTR_START
]=new SdrCustomShapeAdjustmentItem
;
153 mppLocalPoolDefaults
[SDRATTR_XMLATTRIBUTES
-SDRATTR_START
]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES
);
154 mppLocalPoolDefaults
[SDRATTR_TEXT_USEFIXEDCELLHEIGHT
-SDRATTR_START
]=new SdrTextFixedCellHeightItem
;
155 mppLocalPoolDefaults
[SDRATTR_TEXT_WORDWRAP
-SDRATTR_START
]=new SdrTextWordWrapItem( FALSE
);
156 mppLocalPoolDefaults
[SDRATTR_TEXT_AUTOGROWSIZE
-SDRATTR_START
]=new SdrTextAutoGrowSizeItem
;
157 mppLocalPoolDefaults
[SDRATTR_EDGEKIND
-SDRATTR_START
]=new SdrEdgeKindItem
;
158 mppLocalPoolDefaults
[SDRATTR_EDGENODE1HORZDIST
-SDRATTR_START
]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist
);
159 mppLocalPoolDefaults
[SDRATTR_EDGENODE1VERTDIST
-SDRATTR_START
]=new SdrEdgeNode1VertDistItem(nDefEdgeDist
);
160 mppLocalPoolDefaults
[SDRATTR_EDGENODE2HORZDIST
-SDRATTR_START
]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist
);
161 mppLocalPoolDefaults
[SDRATTR_EDGENODE2VERTDIST
-SDRATTR_START
]=new SdrEdgeNode2VertDistItem(nDefEdgeDist
);
162 mppLocalPoolDefaults
[SDRATTR_EDGENODE1GLUEDIST
-SDRATTR_START
]=new SdrEdgeNode1GlueDistItem
;
163 mppLocalPoolDefaults
[SDRATTR_EDGENODE2GLUEDIST
-SDRATTR_START
]=new SdrEdgeNode2GlueDistItem
;
164 mppLocalPoolDefaults
[SDRATTR_EDGELINEDELTAANZ
-SDRATTR_START
]=new SdrEdgeLineDeltaAnzItem
;
165 mppLocalPoolDefaults
[SDRATTR_EDGELINE1DELTA
-SDRATTR_START
]=new SdrEdgeLine1DeltaItem
;
166 mppLocalPoolDefaults
[SDRATTR_EDGELINE2DELTA
-SDRATTR_START
]=new SdrEdgeLine2DeltaItem
;
167 mppLocalPoolDefaults
[SDRATTR_EDGELINE3DELTA
-SDRATTR_START
]=new SdrEdgeLine3DeltaItem
;
168 mppLocalPoolDefaults
[SDRATTR_MEASUREKIND
-SDRATTR_START
]=new SdrMeasureKindItem
;
169 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTHPOS
-SDRATTR_START
]=new SdrMeasureTextHPosItem
;
170 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTVPOS
-SDRATTR_START
]=new SdrMeasureTextVPosItem
;
171 mppLocalPoolDefaults
[SDRATTR_MEASURELINEDIST
-SDRATTR_START
]=new SdrMeasureLineDistItem(800);
172 mppLocalPoolDefaults
[SDRATTR_MEASUREHELPLINEOVERHANG
-SDRATTR_START
]=new SdrMeasureHelplineOverhangItem(200);
173 mppLocalPoolDefaults
[SDRATTR_MEASUREHELPLINEDIST
-SDRATTR_START
]=new SdrMeasureHelplineDistItem(100);
174 mppLocalPoolDefaults
[SDRATTR_MEASUREHELPLINE1LEN
-SDRATTR_START
]=new SdrMeasureHelpline1LenItem
;
175 mppLocalPoolDefaults
[SDRATTR_MEASUREHELPLINE2LEN
-SDRATTR_START
]=new SdrMeasureHelpline2LenItem
;
176 mppLocalPoolDefaults
[SDRATTR_MEASUREBELOWREFEDGE
-SDRATTR_START
]=new SdrMeasureBelowRefEdgeItem
;
177 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTROTA90
-SDRATTR_START
]=new SdrMeasureTextRota90Item
;
178 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTUPSIDEDOWN
-SDRATTR_START
]=new SdrMeasureTextUpsideDownItem
;
179 mppLocalPoolDefaults
[SDRATTR_MEASUREOVERHANG
-SDRATTR_START
]=new SdrMeasureOverhangItem(600);
180 mppLocalPoolDefaults
[SDRATTR_MEASUREUNIT
-SDRATTR_START
]=new SdrMeasureUnitItem
;
181 mppLocalPoolDefaults
[SDRATTR_MEASURESCALE
-SDRATTR_START
]=new SdrMeasureScaleItem
;
182 mppLocalPoolDefaults
[SDRATTR_MEASURESHOWUNIT
-SDRATTR_START
]=new SdrMeasureShowUnitItem
;
183 mppLocalPoolDefaults
[SDRATTR_MEASUREFORMATSTRING
-SDRATTR_START
]=new SdrMeasureFormatStringItem();
184 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTAUTOANGLE
-SDRATTR_START
]=new SdrMeasureTextAutoAngleItem();
185 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTAUTOANGLEVIEW
-SDRATTR_START
]=new SdrMeasureTextAutoAngleViewItem();
186 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTISFIXEDANGLE
-SDRATTR_START
]=new SdrMeasureTextIsFixedAngleItem();
187 mppLocalPoolDefaults
[SDRATTR_MEASURETEXTFIXEDANGLE
-SDRATTR_START
]=new SdrMeasureTextFixedAngleItem();
188 mppLocalPoolDefaults
[SDRATTR_MEASUREDECIMALPLACES
-SDRATTR_START
]=new SdrMeasureDecimalPlacesItem();
189 mppLocalPoolDefaults
[SDRATTR_CIRCKIND
-SDRATTR_START
]=new SdrCircKindItem
;
190 mppLocalPoolDefaults
[SDRATTR_CIRCSTARTANGLE
-SDRATTR_START
]=new SdrCircStartAngleItem
;
191 mppLocalPoolDefaults
[SDRATTR_CIRCENDANGLE
-SDRATTR_START
]=new SdrCircEndAngleItem
;
192 mppLocalPoolDefaults
[SDRATTR_OBJMOVEPROTECT
-SDRATTR_START
]=new SdrObjMoveProtectItem
;
193 mppLocalPoolDefaults
[SDRATTR_OBJSIZEPROTECT
-SDRATTR_START
]=new SdrObjSizeProtectItem
;
194 mppLocalPoolDefaults
[SDRATTR_OBJPRINTABLE
-SDRATTR_START
]=new SdrObjPrintableItem
;
195 mppLocalPoolDefaults
[SDRATTR_LAYERID
-SDRATTR_START
]=new SdrLayerIdItem
;
196 mppLocalPoolDefaults
[SDRATTR_LAYERNAME
-SDRATTR_START
]=new SdrLayerNameItem
;
197 mppLocalPoolDefaults
[SDRATTR_OBJECTNAME
-SDRATTR_START
]=new SdrObjectNameItem
;
198 mppLocalPoolDefaults
[SDRATTR_ALLPOSITIONX
-SDRATTR_START
]=new SdrAllPositionXItem
;
199 mppLocalPoolDefaults
[SDRATTR_ALLPOSITIONY
-SDRATTR_START
]=new SdrAllPositionYItem
;
200 mppLocalPoolDefaults
[SDRATTR_ALLSIZEWIDTH
-SDRATTR_START
]=new SdrAllSizeWidthItem
;
201 mppLocalPoolDefaults
[SDRATTR_ALLSIZEHEIGHT
-SDRATTR_START
]=new SdrAllSizeHeightItem
;
202 mppLocalPoolDefaults
[SDRATTR_ONEPOSITIONX
-SDRATTR_START
]=new SdrOnePositionXItem
;
203 mppLocalPoolDefaults
[SDRATTR_ONEPOSITIONY
-SDRATTR_START
]=new SdrOnePositionYItem
;
204 mppLocalPoolDefaults
[SDRATTR_ONESIZEWIDTH
-SDRATTR_START
]=new SdrOneSizeWidthItem
;
205 mppLocalPoolDefaults
[SDRATTR_ONESIZEHEIGHT
-SDRATTR_START
]=new SdrOneSizeHeightItem
;
206 mppLocalPoolDefaults
[SDRATTR_LOGICSIZEWIDTH
-SDRATTR_START
]=new SdrLogicSizeWidthItem
;
207 mppLocalPoolDefaults
[SDRATTR_LOGICSIZEHEIGHT
-SDRATTR_START
]=new SdrLogicSizeHeightItem
;
208 mppLocalPoolDefaults
[SDRATTR_ROTATEANGLE
-SDRATTR_START
]=new SdrRotateAngleItem
;
209 mppLocalPoolDefaults
[SDRATTR_SHEARANGLE
-SDRATTR_START
]=new SdrShearAngleItem
;
210 mppLocalPoolDefaults
[SDRATTR_MOVEX
-SDRATTR_START
]=new SdrMoveXItem
;
211 mppLocalPoolDefaults
[SDRATTR_MOVEY
-SDRATTR_START
]=new SdrMoveYItem
;
212 mppLocalPoolDefaults
[SDRATTR_RESIZEXONE
-SDRATTR_START
]=new SdrResizeXOneItem
;
213 mppLocalPoolDefaults
[SDRATTR_RESIZEYONE
-SDRATTR_START
]=new SdrResizeYOneItem
;
214 mppLocalPoolDefaults
[SDRATTR_ROTATEONE
-SDRATTR_START
]=new SdrRotateOneItem
;
215 mppLocalPoolDefaults
[SDRATTR_HORZSHEARONE
-SDRATTR_START
]=new SdrHorzShearOneItem
;
216 mppLocalPoolDefaults
[SDRATTR_VERTSHEARONE
-SDRATTR_START
]=new SdrVertShearOneItem
;
217 mppLocalPoolDefaults
[SDRATTR_RESIZEXALL
-SDRATTR_START
]=new SdrResizeXAllItem
;
218 mppLocalPoolDefaults
[SDRATTR_RESIZEYALL
-SDRATTR_START
]=new SdrResizeYAllItem
;
219 mppLocalPoolDefaults
[SDRATTR_ROTATEALL
-SDRATTR_START
]=new SdrRotateAllItem
;
220 mppLocalPoolDefaults
[SDRATTR_HORZSHEARALL
-SDRATTR_START
]=new SdrHorzShearAllItem
;
221 mppLocalPoolDefaults
[SDRATTR_VERTSHEARALL
-SDRATTR_START
]=new SdrVertShearAllItem
;
222 mppLocalPoolDefaults
[SDRATTR_TRANSFORMREF1X
-SDRATTR_START
]=new SdrTransformRef1XItem
;
223 mppLocalPoolDefaults
[SDRATTR_TRANSFORMREF1Y
-SDRATTR_START
]=new SdrTransformRef1YItem
;
224 mppLocalPoolDefaults
[SDRATTR_TRANSFORMREF2X
-SDRATTR_START
]=new SdrTransformRef2XItem
;
225 mppLocalPoolDefaults
[SDRATTR_TRANSFORMREF2Y
-SDRATTR_START
]=new SdrTransformRef2YItem
;
226 mppLocalPoolDefaults
[SDRATTR_TEXTDIRECTION
-SDRATTR_START
]=new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB
, SDRATTR_TEXTDIRECTION
);
227 mppLocalPoolDefaults
[ SDRATTR_GRAFRED
- SDRATTR_START
] = new SdrGrafRedItem
;
228 mppLocalPoolDefaults
[ SDRATTR_GRAFGREEN
- SDRATTR_START
] = new SdrGrafGreenItem
;
229 mppLocalPoolDefaults
[ SDRATTR_GRAFBLUE
- SDRATTR_START
] = new SdrGrafBlueItem
;
230 mppLocalPoolDefaults
[ SDRATTR_GRAFLUMINANCE
- SDRATTR_START
] = new SdrGrafLuminanceItem
;
231 mppLocalPoolDefaults
[ SDRATTR_GRAFCONTRAST
- SDRATTR_START
] = new SdrGrafContrastItem
;
232 mppLocalPoolDefaults
[ SDRATTR_GRAFGAMMA
- SDRATTR_START
] = new SdrGrafGamma100Item
;
233 mppLocalPoolDefaults
[ SDRATTR_GRAFTRANSPARENCE
- SDRATTR_START
] = new SdrGrafTransparenceItem
;
234 mppLocalPoolDefaults
[ SDRATTR_GRAFINVERT
- SDRATTR_START
] = new SdrGrafInvertItem
;
235 mppLocalPoolDefaults
[ SDRATTR_GRAFMODE
- SDRATTR_START
] = new SdrGrafModeItem
;
236 mppLocalPoolDefaults
[ SDRATTR_GRAFCROP
- SDRATTR_START
] = new SdrGrafCropItem
;
237 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_PERCENT_DIAGONAL
- SDRATTR_START
] = new Svx3DPercentDiagonalItem
;
238 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_BACKSCALE
- SDRATTR_START
] = new Svx3DBackscaleItem
;
239 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_DEPTH
- SDRATTR_START
] = new Svx3DDepthItem
;
240 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_HORZ_SEGS
- SDRATTR_START
] = new Svx3DHorizontalSegmentsItem
;
241 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_VERT_SEGS
- SDRATTR_START
] = new Svx3DVerticalSegmentsItem
;
242 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_END_ANGLE
- SDRATTR_START
] = new Svx3DEndAngleItem
;
243 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_DOUBLE_SIDED
- SDRATTR_START
] = new Svx3DDoubleSidedItem
;
244 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_NORMALS_KIND
- SDRATTR_START
] = new Svx3DNormalsKindItem
;
245 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_NORMALS_INVERT
- SDRATTR_START
] = new Svx3DNormalsInvertItem
;
246 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_PROJ_X
- SDRATTR_START
] = new Svx3DTextureProjectionXItem
;
247 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y
- SDRATTR_START
] = new Svx3DTextureProjectionYItem
;
248 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_SHADOW_3D
- SDRATTR_START
] = new Svx3DShadow3DItem
;
249 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_MAT_COLOR
- SDRATTR_START
] = new Svx3DMaterialColorItem
;
250 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_MAT_EMISSION
- SDRATTR_START
] = new Svx3DMaterialEmissionItem
;
251 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_MAT_SPECULAR
- SDRATTR_START
] = new Svx3DMaterialSpecularItem
;
252 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY
- SDRATTR_START
] = new Svx3DMaterialSpecularIntensityItem
;
253 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_KIND
- SDRATTR_START
] = new Svx3DTextureKindItem
;
254 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_MODE
- SDRATTR_START
] = new Svx3DTextureModeItem
;
255 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_TEXTURE_FILTER
- SDRATTR_START
] = new Svx3DTextureFilterItem
;
256 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_SMOOTH_NORMALS
- SDRATTR_START
] = new Svx3DSmoothNormalsItem
;
257 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_SMOOTH_LIDS
- SDRATTR_START
] = new Svx3DSmoothLidsItem
;
258 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_CHARACTER_MODE
- SDRATTR_START
] = new Svx3DCharacterModeItem
;
259 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_CLOSE_FRONT
- SDRATTR_START
] = new Svx3DCloseFrontItem
;
260 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_CLOSE_BACK
- SDRATTR_START
] = new Svx3DCloseBackItem
;
261 mppLocalPoolDefaults
[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY
- SDRATTR_START
] = new Svx3DReducedLineGeometryItem
;
262 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_PERSPECTIVE
- SDRATTR_START
] = new Svx3DPerspectiveItem
;
263 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_DISTANCE
- SDRATTR_START
] = new Svx3DDistanceItem
;
264 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_FOCAL_LENGTH
- SDRATTR_START
] = new Svx3DFocalLengthItem
;
265 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING
- SDRATTR_START
] = new Svx3DTwoSidedLightingItem
;
266 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_1
- SDRATTR_START
] = new Svx3DLightcolor1Item
;
267 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_2
- SDRATTR_START
] = new Svx3DLightcolor2Item
;
268 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_3
- SDRATTR_START
] = new Svx3DLightcolor3Item
;
269 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_4
- SDRATTR_START
] = new Svx3DLightcolor4Item
;
270 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_5
- SDRATTR_START
] = new Svx3DLightcolor5Item
;
271 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_6
- SDRATTR_START
] = new Svx3DLightcolor6Item
;
272 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_7
- SDRATTR_START
] = new Svx3DLightcolor7Item
;
273 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTCOLOR_8
- SDRATTR_START
] = new Svx3DLightcolor8Item
;
274 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_AMBIENTCOLOR
- SDRATTR_START
] = new Svx3DAmbientcolorItem
;
275 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_1
- SDRATTR_START
] = new Svx3DLightOnOff1Item
;
276 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_2
- SDRATTR_START
] = new Svx3DLightOnOff2Item
;
277 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_3
- SDRATTR_START
] = new Svx3DLightOnOff3Item
;
278 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_4
- SDRATTR_START
] = new Svx3DLightOnOff4Item
;
279 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_5
- SDRATTR_START
] = new Svx3DLightOnOff5Item
;
280 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_6
- SDRATTR_START
] = new Svx3DLightOnOff6Item
;
281 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_7
- SDRATTR_START
] = new Svx3DLightOnOff7Item
;
282 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTON_8
- SDRATTR_START
] = new Svx3DLightOnOff8Item
;
283 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_1
- SDRATTR_START
] = new Svx3DLightDirection1Item
;
284 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_2
- SDRATTR_START
] = new Svx3DLightDirection2Item
;
285 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_3
- SDRATTR_START
] = new Svx3DLightDirection3Item
;
286 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_4
- SDRATTR_START
] = new Svx3DLightDirection4Item
;
287 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_5
- SDRATTR_START
] = new Svx3DLightDirection5Item
;
288 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_6
- SDRATTR_START
] = new Svx3DLightDirection6Item
;
289 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_7
- SDRATTR_START
] = new Svx3DLightDirection7Item
;
290 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_LIGHTDIRECTION_8
- SDRATTR_START
] = new Svx3DLightDirection8Item
;
291 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_SHADOW_SLANT
- SDRATTR_START
] = new Svx3DShadowSlantItem
;
292 mppLocalPoolDefaults
[ SDRATTR_3DSCENE_SHADE_MODE
- SDRATTR_START
] = new Svx3DShadeModeItem
;
293 mppLocalPoolDefaults
[ SDRATTR_CUSTOMSHAPE_ENGINE
- SDRATTR_START
] = new SdrCustomShapeEngineItem
;
294 mppLocalPoolDefaults
[ SDRATTR_CUSTOMSHAPE_DATA
- SDRATTR_START
] = new SdrCustomShapeDataItem
;
295 mppLocalPoolDefaults
[ SDRATTR_CUSTOMSHAPE_GEOMETRY
- SDRATTR_START
] = new SdrCustomShapeGeometryItem
;
296 mppLocalPoolDefaults
[ SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL
- SDRATTR_START
] = new SdrCustomShapeReplacementURLItem
;
298 SvxBoxItem
* pboxItem
= new SvxBoxItem( SDRATTR_TABLE_BORDER
);
299 pboxItem
->SetDistance( 100 );
300 mppLocalPoolDefaults
[ SDRATTR_TABLE_BORDER
- SDRATTR_START
] = pboxItem
;
302 SvxBoxInfoItem
* pBoxInfoItem
= new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER
);
304 pBoxInfoItem
->SetTable( TRUE
);
305 pBoxInfoItem
->SetDist( TRUE
); // Abstandsfeld immer anzeigen
306 // pBoxInfoItem->SetMinDist( TRUE );// Minimalgroesse in Tabellen und Absaetzen setzen
307 // pBoxInfoItem->SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
308 pBoxInfoItem
->SetValid( VALID_DISABLE
, TRUE
); // Einzelne Linien koennen nur in Tabellen DontCare-Status haben
310 mppLocalPoolDefaults
[ SDRATTR_TABLE_BORDER_INNER
- SDRATTR_START
] = pBoxInfoItem
;
311 // mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_SHADOW - SDRATTR_START ] = new SvxShadowItem( SDRATTR_TABLE_BORDER_SHADOW );
312 mppLocalPoolDefaults
[ SDRATTR_TABLE_BORDER_TLBR
- SDRATTR_START
] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR
);
313 mppLocalPoolDefaults
[ SDRATTR_TABLE_BORDER_BLTR
- SDRATTR_START
] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR
);
316 mpLocalItemInfos
[SDRATTR_SHADOW
-SDRATTR_START
]._nSID
=SID_ATTR_FILL_SHADOW
;
317 mpLocalItemInfos
[SDRATTR_TEXT_FITTOSIZE
-SDRATTR_START
]._nSID
=SID_ATTR_TEXT_FITTOSIZE
;
318 mpLocalItemInfos
[SDRATTR_GRAFCROP
-SDRATTR_START
]._nSID
=SID_ATTR_GRAF_CROP
;
320 mpLocalItemInfos
[SDRATTR_TABLE_BORDER
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_OUTER
;
321 mpLocalItemInfos
[SDRATTR_TABLE_BORDER_INNER
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_INNER
;
322 // mpLocalItemInfos[SDRATTR_TABLE_BORDER_SHADOW - SDRATTR_START ]._nSID = SID_ATTR_BORDER_SHADOW;
323 mpLocalItemInfos
[SDRATTR_TABLE_BORDER_TLBR
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_DIAG_TLBR
;
324 mpLocalItemInfos
[SDRATTR_TABLE_BORDER_BLTR
- SDRATTR_START
]._nSID
= SID_ATTR_BORDER_DIAG_BLTR
;
326 // it's my own creation level, set Defaults and ItemInfos
327 SetDefaults(mppLocalPoolDefaults
);
328 SetItemInfos(mpLocalItemInfos
);
331 /*************************************************************************
333 |* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
334 |* (Parameter 2 = TRUE)
336 \************************************************************************/
338 SdrItemPool::SdrItemPool(const SdrItemPool
& rPool
)
339 : XOutdevItemPool(rPool
)
343 /*************************************************************************
347 \************************************************************************/
349 SfxItemPool
* __EXPORT
SdrItemPool::Clone() const
351 return new SdrItemPool(*this);
354 /*************************************************************************
358 \************************************************************************/
360 SdrItemPool::~SdrItemPool()
362 // dtor of SfxItemPool
365 // clear own static Defaults
366 if(mppLocalPoolDefaults
)
368 const sal_uInt16
nBeg(SDRATTR_SHADOW_FIRST
- SDRATTR_START
);
369 const sal_uInt16
nEnd2(SDRATTR_END
- SDRATTR_START
);
371 for(sal_uInt16
i(nBeg
); i
<= nEnd2
; i
++)
373 SetRefCount(*mppLocalPoolDefaults
[i
],0);
374 delete mppLocalPoolDefaults
[i
];
375 mppLocalPoolDefaults
[i
] = 0L;
379 // split pools before detroying
380 SetSecondaryPool(NULL
);
383 SfxItemPresentation __EXPORT
SdrItemPool::GetPresentation(
384 const SfxPoolItem
& rItem
, SfxItemPresentation ePresentation
,
385 SfxMapUnit ePresentationMetric
, XubString
& rText
,
386 const IntlWrapper
* pIntlWrapper
) const
388 if (!IsInvalidItem(&rItem
)) {
389 USHORT nWhich
=rItem
.Which();
390 if (nWhich
>=SDRATTR_SHADOW_FIRST
&& nWhich
<=SDRATTR_END
) {
391 rItem
.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS
,
392 GetMetric(nWhich
),ePresentationMetric
,rText
,
396 TakeItemName(nWhich
, aStr
);
397 aStr
+= sal_Unicode(' ');
398 rText
.Insert(aStr
, 0);
400 return ePresentation
;
403 return XOutdevItemPool::GetPresentation(rItem
,ePresentation
,ePresentationMetric
,rText
,pIntlWrapper
);
406 void SdrItemPool::TakeItemName(sal_uInt16 nWhich
, String
& rItemName
)
408 ResMgr
* pResMgr
= ImpGetResMgr();
409 USHORT nResId
= SIP_UNKNOWN_ATTR
;
413 case XATTR_LINESTYLE
: nResId
= SIP_XA_LINESTYLE
;break;
414 case XATTR_LINEDASH
: nResId
= SIP_XA_LINEDASH
;break;
415 case XATTR_LINEWIDTH
: nResId
= SIP_XA_LINEWIDTH
;break;
416 case XATTR_LINECOLOR
: nResId
= SIP_XA_LINECOLOR
;break;
417 case XATTR_LINESTART
: nResId
= SIP_XA_LINESTART
;break;
418 case XATTR_LINEEND
: nResId
= SIP_XA_LINEEND
;break;
419 case XATTR_LINESTARTWIDTH
: nResId
= SIP_XA_LINESTARTWIDTH
;break;
420 case XATTR_LINEENDWIDTH
: nResId
= SIP_XA_LINEENDWIDTH
;break;
421 case XATTR_LINESTARTCENTER
: nResId
= SIP_XA_LINESTARTCENTER
;break;
422 case XATTR_LINEENDCENTER
: nResId
= SIP_XA_LINEENDCENTER
;break;
423 case XATTR_LINETRANSPARENCE
: nResId
= SIP_XA_LINETRANSPARENCE
;break;
424 case XATTR_LINEJOINT
: nResId
= SIP_XA_LINEJOINT
;break;
425 case XATTRSET_LINE
: nResId
= SIP_XATTRSET_LINE
;break;
427 case XATTR_FILLSTYLE
: nResId
= SIP_XA_FILLSTYLE
;break;
428 case XATTR_FILLCOLOR
: nResId
= SIP_XA_FILLCOLOR
;break;
429 case XATTR_FILLGRADIENT
: nResId
= SIP_XA_FILLGRADIENT
;break;
430 case XATTR_FILLHATCH
: nResId
= SIP_XA_FILLHATCH
;break;
431 case XATTR_FILLBITMAP
: nResId
= SIP_XA_FILLBITMAP
;break;
432 case XATTR_FILLTRANSPARENCE
: nResId
= SIP_XA_FILLTRANSPARENCE
;break;
433 case XATTR_GRADIENTSTEPCOUNT
: nResId
= SIP_XA_GRADIENTSTEPCOUNT
;break;
434 case XATTR_FILLBMP_TILE
: nResId
= SIP_XA_FILLBMP_TILE
;break;
435 case XATTR_FILLBMP_POS
: nResId
= SIP_XA_FILLBMP_POS
;break;
436 case XATTR_FILLBMP_SIZEX
: nResId
= SIP_XA_FILLBMP_SIZEX
;break;
437 case XATTR_FILLBMP_SIZEY
: nResId
= SIP_XA_FILLBMP_SIZEY
;break;
438 case XATTR_FILLFLOATTRANSPARENCE
: nResId
= SIP_XA_FILLFLOATTRANSPARENCE
;break;
439 case XATTR_SECONDARYFILLCOLOR
: nResId
= SIP_XA_SECONDARYFILLCOLOR
;break;
440 case XATTR_FILLBMP_SIZELOG
: nResId
= SIP_XA_FILLBMP_SIZELOG
;break;
441 case XATTR_FILLBMP_TILEOFFSETX
: nResId
= SIP_XA_FILLBMP_TILEOFFSETX
;break;
442 case XATTR_FILLBMP_TILEOFFSETY
: nResId
= SIP_XA_FILLBMP_TILEOFFSETY
;break;
443 case XATTR_FILLBMP_STRETCH
: nResId
= SIP_XA_FILLBMP_STRETCH
;break;
444 case XATTR_FILLBMP_POSOFFSETX
: nResId
= SIP_XA_FILLBMP_POSOFFSETX
;break;
445 case XATTR_FILLBMP_POSOFFSETY
: nResId
= SIP_XA_FILLBMP_POSOFFSETY
;break;
446 case XATTR_FILLBACKGROUND
: nResId
= SIP_XA_FILLBACKGROUND
;break;
448 case XATTRSET_FILL
: nResId
= SIP_XATTRSET_FILL
;break;
450 case XATTR_FORMTXTSTYLE
: nResId
= SIP_XA_FORMTXTSTYLE
;break;
451 case XATTR_FORMTXTADJUST
: nResId
= SIP_XA_FORMTXTADJUST
;break;
452 case XATTR_FORMTXTDISTANCE
: nResId
= SIP_XA_FORMTXTDISTANCE
;break;
453 case XATTR_FORMTXTSTART
: nResId
= SIP_XA_FORMTXTSTART
;break;
454 case XATTR_FORMTXTMIRROR
: nResId
= SIP_XA_FORMTXTMIRROR
;break;
455 case XATTR_FORMTXTOUTLINE
: nResId
= SIP_XA_FORMTXTOUTLINE
;break;
456 case XATTR_FORMTXTSHADOW
: nResId
= SIP_XA_FORMTXTSHADOW
;break;
457 case XATTR_FORMTXTSHDWCOLOR
: nResId
= SIP_XA_FORMTXTSHDWCOLOR
;break;
458 case XATTR_FORMTXTSHDWXVAL
: nResId
= SIP_XA_FORMTXTSHDWXVAL
;break;
459 case XATTR_FORMTXTSHDWYVAL
: nResId
= SIP_XA_FORMTXTSHDWYVAL
;break;
460 case XATTR_FORMTXTSTDFORM
: nResId
= SIP_XA_FORMTXTSTDFORM
;break;
461 case XATTR_FORMTXTHIDEFORM
: nResId
= SIP_XA_FORMTXTHIDEFORM
;break;
462 case XATTR_FORMTXTSHDWTRANSP
: nResId
= SIP_XA_FORMTXTSHDWTRANSP
;break;
464 case SDRATTR_SHADOW
: nResId
= SIP_SA_SHADOW
;break;
465 case SDRATTR_SHADOWCOLOR
: nResId
= SIP_SA_SHADOWCOLOR
;break;
466 case SDRATTR_SHADOWXDIST
: nResId
= SIP_SA_SHADOWXDIST
;break;
467 case SDRATTR_SHADOWYDIST
: nResId
= SIP_SA_SHADOWYDIST
;break;
468 case SDRATTR_SHADOWTRANSPARENCE
: nResId
= SIP_SA_SHADOWTRANSPARENCE
;break;
469 case SDRATTR_SHADOW3D
: nResId
= SIP_SA_SHADOW3D
;break;
470 case SDRATTR_SHADOWPERSP
: nResId
= SIP_SA_SHADOWPERSP
;break;
472 case SDRATTR_CAPTIONTYPE
: nResId
= SIP_SA_CAPTIONTYPE
;break;
473 case SDRATTR_CAPTIONFIXEDANGLE
: nResId
= SIP_SA_CAPTIONFIXEDANGLE
;break;
474 case SDRATTR_CAPTIONANGLE
: nResId
= SIP_SA_CAPTIONANGLE
;break;
475 case SDRATTR_CAPTIONGAP
: nResId
= SIP_SA_CAPTIONGAP
;break;
476 case SDRATTR_CAPTIONESCDIR
: nResId
= SIP_SA_CAPTIONESCDIR
;break;
477 case SDRATTR_CAPTIONESCISREL
: nResId
= SIP_SA_CAPTIONESCISREL
;break;
478 case SDRATTR_CAPTIONESCREL
: nResId
= SIP_SA_CAPTIONESCREL
;break;
479 case SDRATTR_CAPTIONESCABS
: nResId
= SIP_SA_CAPTIONESCABS
;break;
480 case SDRATTR_CAPTIONLINELEN
: nResId
= SIP_SA_CAPTIONLINELEN
;break;
481 case SDRATTR_CAPTIONFITLINELEN
: nResId
= SIP_SA_CAPTIONFITLINELEN
;break;
483 case SDRATTR_ECKENRADIUS
: nResId
= SIP_SA_ECKENRADIUS
;break;
484 case SDRATTR_TEXT_MINFRAMEHEIGHT
: nResId
= SIP_SA_TEXT_MINFRAMEHEIGHT
;break;
485 case SDRATTR_TEXT_AUTOGROWHEIGHT
: nResId
= SIP_SA_TEXT_AUTOGROWHEIGHT
;break;
486 case SDRATTR_TEXT_FITTOSIZE
: nResId
= SIP_SA_TEXT_FITTOSIZE
;break;
487 case SDRATTR_TEXT_LEFTDIST
: nResId
= SIP_SA_TEXT_LEFTDIST
;break;
488 case SDRATTR_TEXT_RIGHTDIST
: nResId
= SIP_SA_TEXT_RIGHTDIST
;break;
489 case SDRATTR_TEXT_UPPERDIST
: nResId
= SIP_SA_TEXT_UPPERDIST
;break;
490 case SDRATTR_TEXT_LOWERDIST
: nResId
= SIP_SA_TEXT_LOWERDIST
;break;
491 case SDRATTR_TEXT_VERTADJUST
: nResId
= SIP_SA_TEXT_VERTADJUST
;break;
492 case SDRATTR_TEXT_MAXFRAMEHEIGHT
: nResId
= SIP_SA_TEXT_MAXFRAMEHEIGHT
;break;
493 case SDRATTR_TEXT_MINFRAMEWIDTH
: nResId
= SIP_SA_TEXT_MINFRAMEWIDTH
;break;
494 case SDRATTR_TEXT_MAXFRAMEWIDTH
: nResId
= SIP_SA_TEXT_MAXFRAMEWIDTH
;break;
495 case SDRATTR_TEXT_AUTOGROWWIDTH
: nResId
= SIP_SA_TEXT_AUTOGROWWIDTH
;break;
496 case SDRATTR_TEXT_HORZADJUST
: nResId
= SIP_SA_TEXT_HORZADJUST
;break;
497 case SDRATTR_TEXT_ANIKIND
: nResId
= SIP_SA_TEXT_ANIKIND
;break;
498 case SDRATTR_TEXT_ANIDIRECTION
: nResId
= SIP_SA_TEXT_ANIDIRECTION
;break;
499 case SDRATTR_TEXT_ANISTARTINSIDE
: nResId
= SIP_SA_TEXT_ANISTARTINSIDE
;break;
500 case SDRATTR_TEXT_ANISTOPINSIDE
: nResId
= SIP_SA_TEXT_ANISTOPINSIDE
;break;
501 case SDRATTR_TEXT_ANICOUNT
: nResId
= SIP_SA_TEXT_ANICOUNT
;break;
502 case SDRATTR_TEXT_ANIDELAY
: nResId
= SIP_SA_TEXT_ANIDELAY
;break;
503 case SDRATTR_TEXT_ANIAMOUNT
: nResId
= SIP_SA_TEXT_ANIAMOUNT
;break;
504 case SDRATTR_TEXT_CONTOURFRAME
: nResId
= SIP_SA_TEXT_CONTOURFRAME
;break;
505 case SDRATTR_CUSTOMSHAPE_ADJUSTMENT
: nResId
= SIP_SA_CUSTOMSHAPE_ADJUSTMENT
;break;
506 case SDRATTR_XMLATTRIBUTES
: nResId
= SIP_SA_XMLATTRIBUTES
;break;
507 case SDRATTR_TEXT_USEFIXEDCELLHEIGHT
: nResId
= SIP_SA_TEXT_USEFIXEDCELLHEIGHT
;break;
508 case SDRATTR_TEXT_WORDWRAP
: nResId
= SIP_SA_WORDWRAP
;break;
509 case SDRATTR_TEXT_AUTOGROWSIZE
: nResId
= SIP_SA_AUTOGROWSIZE
;break;
511 case SDRATTR_EDGEKIND
: nResId
= SIP_SA_EDGEKIND
;break;
512 case SDRATTR_EDGENODE1HORZDIST
: nResId
= SIP_SA_EDGENODE1HORZDIST
;break;
513 case SDRATTR_EDGENODE1VERTDIST
: nResId
= SIP_SA_EDGENODE1VERTDIST
;break;
514 case SDRATTR_EDGENODE2HORZDIST
: nResId
= SIP_SA_EDGENODE2HORZDIST
;break;
515 case SDRATTR_EDGENODE2VERTDIST
: nResId
= SIP_SA_EDGENODE2VERTDIST
;break;
516 case SDRATTR_EDGENODE1GLUEDIST
: nResId
= SIP_SA_EDGENODE1GLUEDIST
;break;
517 case SDRATTR_EDGENODE2GLUEDIST
: nResId
= SIP_SA_EDGENODE2GLUEDIST
;break;
518 case SDRATTR_EDGELINEDELTAANZ
: nResId
= SIP_SA_EDGELINEDELTAANZ
;break;
519 case SDRATTR_EDGELINE1DELTA
: nResId
= SIP_SA_EDGELINE1DELTA
;break;
520 case SDRATTR_EDGELINE2DELTA
: nResId
= SIP_SA_EDGELINE2DELTA
;break;
521 case SDRATTR_EDGELINE3DELTA
: nResId
= SIP_SA_EDGELINE3DELTA
;break;
523 case SDRATTR_MEASUREKIND
: nResId
= SIP_SA_MEASUREKIND
;break;
524 case SDRATTR_MEASURETEXTHPOS
: nResId
= SIP_SA_MEASURETEXTHPOS
;break;
525 case SDRATTR_MEASURETEXTVPOS
: nResId
= SIP_SA_MEASURETEXTVPOS
;break;
526 case SDRATTR_MEASURELINEDIST
: nResId
= SIP_SA_MEASURELINEDIST
;break;
527 case SDRATTR_MEASUREHELPLINEOVERHANG
: nResId
= SIP_SA_MEASUREHELPLINEOVERHANG
;break;
528 case SDRATTR_MEASUREHELPLINEDIST
: nResId
= SIP_SA_MEASUREHELPLINEDIST
;break;
529 case SDRATTR_MEASUREHELPLINE1LEN
: nResId
= SIP_SA_MEASUREHELPLINE1LEN
;break;
530 case SDRATTR_MEASUREHELPLINE2LEN
: nResId
= SIP_SA_MEASUREHELPLINE2LEN
;break;
531 case SDRATTR_MEASUREBELOWREFEDGE
: nResId
= SIP_SA_MEASUREBELOWREFEDGE
;break;
532 case SDRATTR_MEASURETEXTROTA90
: nResId
= SIP_SA_MEASURETEXTROTA90
;break;
533 case SDRATTR_MEASURETEXTUPSIDEDOWN
: nResId
= SIP_SA_MEASURETEXTUPSIDEDOWN
;break;
534 case SDRATTR_MEASUREOVERHANG
: nResId
= SIP_SA_MEASUREOVERHANG
;break;
535 case SDRATTR_MEASUREUNIT
: nResId
= SIP_SA_MEASUREUNIT
;break;
536 case SDRATTR_MEASURESCALE
: nResId
= SIP_SA_MEASURESCALE
;break;
537 case SDRATTR_MEASURESHOWUNIT
: nResId
= SIP_SA_MEASURESHOWUNIT
;break;
538 case SDRATTR_MEASUREFORMATSTRING
: nResId
= SIP_SA_MEASUREFORMATSTRING
;break;
539 case SDRATTR_MEASURETEXTAUTOANGLE
: nResId
= SIP_SA_MEASURETEXTAUTOANGLE
;break;
540 case SDRATTR_MEASURETEXTAUTOANGLEVIEW
: nResId
= SIP_SA_MEASURETEXTAUTOANGLEVIEW
;break;
541 case SDRATTR_MEASURETEXTISFIXEDANGLE
: nResId
= SIP_SA_MEASURETEXTISFIXEDANGLE
;break;
542 case SDRATTR_MEASURETEXTFIXEDANGLE
: nResId
= SIP_SA_MEASURETEXTFIXEDANGLE
;break;
543 case SDRATTR_MEASUREDECIMALPLACES
: nResId
= SIP_SA_MEASUREDECIMALPLACES
;break;
545 case SDRATTR_CIRCKIND
: nResId
= SIP_SA_CIRCKIND
;break;
546 case SDRATTR_CIRCSTARTANGLE
: nResId
= SIP_SA_CIRCSTARTANGLE
;break;
547 case SDRATTR_CIRCENDANGLE
: nResId
= SIP_SA_CIRCENDANGLE
;break;
549 case SDRATTR_OBJMOVEPROTECT
: nResId
= SIP_SA_OBJMOVEPROTECT
;break;
550 case SDRATTR_OBJSIZEPROTECT
: nResId
= SIP_SA_OBJSIZEPROTECT
;break;
551 case SDRATTR_OBJPRINTABLE
: nResId
= SIP_SA_OBJPRINTABLE
;break;
552 case SDRATTR_LAYERID
: nResId
= SIP_SA_LAYERID
;break;
553 case SDRATTR_LAYERNAME
: nResId
= SIP_SA_LAYERNAME
;break;
554 case SDRATTR_OBJECTNAME
: nResId
= SIP_SA_OBJECTNAME
;break;
555 case SDRATTR_ALLPOSITIONX
: nResId
= SIP_SA_ALLPOSITIONX
;break;
556 case SDRATTR_ALLPOSITIONY
: nResId
= SIP_SA_ALLPOSITIONY
;break;
557 case SDRATTR_ALLSIZEWIDTH
: nResId
= SIP_SA_ALLSIZEWIDTH
;break;
558 case SDRATTR_ALLSIZEHEIGHT
: nResId
= SIP_SA_ALLSIZEHEIGHT
;break;
559 case SDRATTR_ONEPOSITIONX
: nResId
= SIP_SA_ONEPOSITIONX
;break;
560 case SDRATTR_ONEPOSITIONY
: nResId
= SIP_SA_ONEPOSITIONY
;break;
561 case SDRATTR_ONESIZEWIDTH
: nResId
= SIP_SA_ONESIZEWIDTH
;break;
562 case SDRATTR_ONESIZEHEIGHT
: nResId
= SIP_SA_ONESIZEHEIGHT
;break;
563 case SDRATTR_LOGICSIZEWIDTH
: nResId
= SIP_SA_LOGICSIZEWIDTH
;break;
564 case SDRATTR_LOGICSIZEHEIGHT
: nResId
= SIP_SA_LOGICSIZEHEIGHT
;break;
565 case SDRATTR_ROTATEANGLE
: nResId
= SIP_SA_ROTATEANGLE
;break;
566 case SDRATTR_SHEARANGLE
: nResId
= SIP_SA_SHEARANGLE
;break;
567 case SDRATTR_MOVEX
: nResId
= SIP_SA_MOVEX
;break;
568 case SDRATTR_MOVEY
: nResId
= SIP_SA_MOVEY
;break;
569 case SDRATTR_RESIZEXONE
: nResId
= SIP_SA_RESIZEXONE
;break;
570 case SDRATTR_RESIZEYONE
: nResId
= SIP_SA_RESIZEYONE
;break;
571 case SDRATTR_ROTATEONE
: nResId
= SIP_SA_ROTATEONE
;break;
572 case SDRATTR_HORZSHEARONE
: nResId
= SIP_SA_HORZSHEARONE
;break;
573 case SDRATTR_VERTSHEARONE
: nResId
= SIP_SA_VERTSHEARONE
;break;
574 case SDRATTR_RESIZEXALL
: nResId
= SIP_SA_RESIZEXALL
;break;
575 case SDRATTR_RESIZEYALL
: nResId
= SIP_SA_RESIZEYALL
;break;
576 case SDRATTR_ROTATEALL
: nResId
= SIP_SA_ROTATEALL
;break;
577 case SDRATTR_HORZSHEARALL
: nResId
= SIP_SA_HORZSHEARALL
;break;
578 case SDRATTR_VERTSHEARALL
: nResId
= SIP_SA_VERTSHEARALL
;break;
579 case SDRATTR_TRANSFORMREF1X
: nResId
= SIP_SA_TRANSFORMREF1X
;break;
580 case SDRATTR_TRANSFORMREF1Y
: nResId
= SIP_SA_TRANSFORMREF1Y
;break;
581 case SDRATTR_TRANSFORMREF2X
: nResId
= SIP_SA_TRANSFORMREF2X
;break;
582 case SDRATTR_TRANSFORMREF2Y
: nResId
= SIP_SA_TRANSFORMREF2Y
;break;
584 case SDRATTR_GRAFRED
: nResId
= SIP_SA_GRAFRED
;break;
585 case SDRATTR_GRAFGREEN
: nResId
= SIP_SA_GRAFGREEN
;break;
586 case SDRATTR_GRAFBLUE
: nResId
= SIP_SA_GRAFBLUE
;break;
587 case SDRATTR_GRAFLUMINANCE
: nResId
= SIP_SA_GRAFLUMINANCE
;break;
588 case SDRATTR_GRAFCONTRAST
: nResId
= SIP_SA_GRAFCONTRAST
;break;
589 case SDRATTR_GRAFGAMMA
: nResId
= SIP_SA_GRAFGAMMA
;break;
590 case SDRATTR_GRAFTRANSPARENCE
: nResId
= SIP_SA_GRAFTRANSPARENCE
;break;
591 case SDRATTR_GRAFINVERT
: nResId
= SIP_SA_GRAFINVERT
;break;
592 case SDRATTR_GRAFMODE
: nResId
= SIP_SA_GRAFMODE
;break;
593 case SDRATTR_GRAFCROP
: nResId
= SIP_SA_GRAFCROP
;break;
595 case EE_PARA_HYPHENATE
: nResId
= SIP_EE_PARA_HYPHENATE
;break;
596 case EE_PARA_BULLETSTATE
: nResId
= SIP_EE_PARA_BULLETSTATE
;break;
597 case EE_PARA_OUTLLRSPACE
: nResId
= SIP_EE_PARA_OUTLLRSPACE
;break;
598 case EE_PARA_OUTLLEVEL
: nResId
= SIP_EE_PARA_OUTLLEVEL
;break;
599 case EE_PARA_BULLET
: nResId
= SIP_EE_PARA_BULLET
;break;
600 case EE_PARA_LRSPACE
: nResId
= SIP_EE_PARA_LRSPACE
;break;
601 case EE_PARA_ULSPACE
: nResId
= SIP_EE_PARA_ULSPACE
;break;
602 case EE_PARA_SBL
: nResId
= SIP_EE_PARA_SBL
;break;
603 case EE_PARA_JUST
: nResId
= SIP_EE_PARA_JUST
;break;
604 case EE_PARA_TABS
: nResId
= SIP_EE_PARA_TABS
;break;
606 case EE_CHAR_COLOR
: nResId
= SIP_EE_CHAR_COLOR
;break;
607 case EE_CHAR_FONTINFO
: nResId
= SIP_EE_CHAR_FONTINFO
;break;
608 case EE_CHAR_FONTHEIGHT
: nResId
= SIP_EE_CHAR_FONTHEIGHT
;break;
609 case EE_CHAR_FONTWIDTH
: nResId
= SIP_EE_CHAR_FONTWIDTH
;break;
610 case EE_CHAR_WEIGHT
: nResId
= SIP_EE_CHAR_WEIGHT
;break;
611 case EE_CHAR_UNDERLINE
: nResId
= SIP_EE_CHAR_UNDERLINE
;break;
612 case EE_CHAR_OVERLINE
: nResId
= SIP_EE_CHAR_OVERLINE
;break;
613 case EE_CHAR_STRIKEOUT
: nResId
= SIP_EE_CHAR_STRIKEOUT
;break;
614 case EE_CHAR_ITALIC
: nResId
= SIP_EE_CHAR_ITALIC
;break;
615 case EE_CHAR_OUTLINE
: nResId
= SIP_EE_CHAR_OUTLINE
;break;
616 case EE_CHAR_SHADOW
: nResId
= SIP_EE_CHAR_SHADOW
;break;
617 case EE_CHAR_ESCAPEMENT
: nResId
= SIP_EE_CHAR_ESCAPEMENT
;break;
618 case EE_CHAR_PAIRKERNING
: nResId
= SIP_EE_CHAR_PAIRKERNING
;break;
619 case EE_CHAR_KERNING
: nResId
= SIP_EE_CHAR_KERNING
;break;
620 case EE_CHAR_WLM
: nResId
= SIP_EE_CHAR_WLM
;break;
621 case EE_FEATURE_TAB
: nResId
= SIP_EE_FEATURE_TAB
;break;
622 case EE_FEATURE_LINEBR
: nResId
= SIP_EE_FEATURE_LINEBR
;break;
623 case EE_FEATURE_NOTCONV
: nResId
= SIP_EE_FEATURE_NOTCONV
;break;
624 case EE_FEATURE_FIELD
: nResId
= SIP_EE_FEATURE_FIELD
;break;
627 rItemName
= String( ResId( nResId
, *pResMgr
) );
630 ////////////////////////////////////////////////////////////////////////////////
632 ////////////////////////////////////////////////////////////////////////////////
634 TYPEINIT1_AUTOFACTORY(SdrFractionItem
,SfxPoolItem
);
636 SdrFractionItem::SdrFractionItem(USHORT nId
, SvStream
& rIn
):
642 nValue
=Fraction(nMul
,nDiv
);
645 int __EXPORT
SdrFractionItem::operator==(const SfxPoolItem
& rCmp
) const
647 return SfxPoolItem::operator==(rCmp
) &&
648 ((SdrFractionItem
&)rCmp
).GetValue()==nValue
;
651 SfxItemPresentation __EXPORT
SdrFractionItem::GetPresentation(
652 SfxItemPresentation ePresentation
, SfxMapUnit
/*eCoreMetric*/,
653 SfxMapUnit
/*ePresentationMetric*/, XubString
&rText
, const IntlWrapper
*) const
657 INT32 nDiv
= nValue
.GetDenominator();
658 rText
= UniString::CreateFromInt32(nValue
.GetNumerator());
662 rText
+= sal_Unicode('/');
663 rText
+= UniString::CreateFromInt32(nDiv
);
669 rText
+= sal_Unicode('?');
672 if(ePresentation
== SFX_ITEM_PRESENTATION_COMPLETE
)
676 SdrItemPool::TakeItemName(Which(), aStr
);
677 aStr
+= sal_Unicode(' ');
678 rText
.Insert(aStr
, 0);
681 return ePresentation
;
684 SfxPoolItem
* __EXPORT
SdrFractionItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
686 return new SdrFractionItem(Which(),rIn
);
689 SvStream
& __EXPORT
SdrFractionItem::Store(SvStream
& rOut
, USHORT
/*nItemVers*/) const
691 rOut
<<INT32(nValue
.GetNumerator());
692 rOut
<<INT32(nValue
.GetDenominator());
696 SfxPoolItem
* __EXPORT
SdrFractionItem::Clone(SfxItemPool
* /*pPool*/) const
698 return new SdrFractionItem(Which(),GetValue());
701 #ifdef SDR_ISPOOLABLE
702 int __EXPORT
SdrFractionItem::IsPoolable() const
705 return nId
<SDRATTR_NOTPERSIST_FIRST
|| nId
>SDRATTR_NOTPERSIST_LAST
;
709 ////////////////////////////////////////////////////////////////////////////////
711 ////////////////////////////////////////////////////////////////////////////////
713 TYPEINIT1_AUTOFACTORY(SdrScaleItem
,SdrFractionItem
);
715 SfxItemPresentation __EXPORT
SdrScaleItem::GetPresentation(
716 SfxItemPresentation ePresentation
, SfxMapUnit
/*eCoreMetric*/,
717 SfxMapUnit
/*ePresentationMetric*/, XubString
&rText
, const IntlWrapper
*) const
719 if(GetValue().IsValid())
721 INT32 nDiv
= GetValue().GetDenominator();
723 rText
= UniString::CreateFromInt32(GetValue().GetNumerator());
724 rText
+= sal_Unicode(':');
725 rText
+= UniString::CreateFromInt32(nDiv
);
730 rText
+= sal_Unicode('?');
733 if(ePresentation
== SFX_ITEM_PRESENTATION_COMPLETE
)
737 SdrItemPool::TakeItemName(Which(), aStr
);
738 aStr
+= sal_Unicode(' ');
739 rText
.Insert(aStr
, 0);
742 return ePresentation
;
745 SfxPoolItem
* __EXPORT
SdrScaleItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
747 return new SdrScaleItem(Which(),rIn
);
750 SfxPoolItem
* __EXPORT
SdrScaleItem::Clone(SfxItemPool
* /*pPool*/) const
752 return new SdrScaleItem(Which(),GetValue());
755 ////////////////////////////////////////////////////////////////////////////////
757 ////////////////////////////////////////////////////////////////////////////////
759 TYPEINIT1_AUTOFACTORY(SdrOnOffItem
,SfxBoolItem
);
761 SfxPoolItem
* __EXPORT
SdrOnOffItem::Clone(SfxItemPool
* /*pPool*/) const
763 return new SdrOnOffItem(Which(),GetValue());
766 SfxPoolItem
* __EXPORT
SdrOnOffItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
768 return new SdrOnOffItem(Which(),rIn
);
771 XubString __EXPORT
SdrOnOffItem::GetValueTextByVal(BOOL bVal
) const
773 if (bVal
) return ImpGetResStr(STR_ItemValON
);
774 else return ImpGetResStr(STR_ItemValOFF
);
777 SfxItemPresentation __EXPORT
SdrOnOffItem::GetPresentation(SfxItemPresentation ePres
,
778 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
780 rText
=GetValueTextByVal(GetValue());
781 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
784 SdrItemPool::TakeItemName(Which(), aStr
);
785 aStr
+= sal_Unicode(' ');
786 rText
.Insert(aStr
, 0);
791 #ifdef SDR_ISPOOLABLE
792 int __EXPORT
SdrOnOffItem::IsPoolable() const
795 return nId
<SDRATTR_NOTPERSIST_FIRST
|| nId
>SDRATTR_NOTPERSIST_LAST
;
799 TYPEINIT1_AUTOFACTORY(SdrYesNoItem
,SfxBoolItem
);
801 SfxPoolItem
* __EXPORT
SdrYesNoItem::Clone(SfxItemPool
* /*pPool*/) const
803 return new SdrYesNoItem(Which(),GetValue());
806 SfxPoolItem
* __EXPORT
SdrYesNoItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
808 return new SdrYesNoItem(Which(),rIn
);
811 XubString __EXPORT
SdrYesNoItem::GetValueTextByVal(BOOL bVal
) const
813 if (bVal
) return ImpGetResStr(STR_ItemValYES
);
814 else return ImpGetResStr(STR_ItemValNO
);
817 SfxItemPresentation __EXPORT
SdrYesNoItem::GetPresentation(SfxItemPresentation ePres
,
818 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
820 rText
=GetValueTextByVal(GetValue());
821 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
824 SdrItemPool::TakeItemName(Which(), aStr
);
825 aStr
+= sal_Unicode(' ');
826 rText
.Insert(aStr
, 0);
831 #ifdef SDR_ISPOOLABLE
832 int __EXPORT
SdrYesNoItem::IsPoolable() const
835 return nId
<SDRATTR_NOTPERSIST_FIRST
|| nId
>SDRATTR_NOTPERSIST_LAST
;
839 //------------------------------------------------------------
840 // class SdrPercentItem
841 //------------------------------------------------------------
843 TYPEINIT1_AUTOFACTORY(SdrPercentItem
,SfxUInt16Item
);
845 SfxPoolItem
* __EXPORT
SdrPercentItem::Clone(SfxItemPool
* /*pPool*/) const
847 return new SdrPercentItem(Which(),GetValue());
850 SfxPoolItem
* __EXPORT
SdrPercentItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
852 return new SdrPercentItem(Which(),rIn
);
855 SfxItemPresentation __EXPORT
SdrPercentItem::GetPresentation(
856 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreMetric*/,
857 SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
859 rText
= UniString::CreateFromInt32(GetValue());
860 rText
+= sal_Unicode('%');
862 if(ePres
== SFX_ITEM_PRESENTATION_COMPLETE
)
866 SdrItemPool::TakeItemName(Which(), aStr
);
867 aStr
+= sal_Unicode(' ');
868 rText
.Insert(aStr
, 0);
874 #ifdef SDR_ISPOOLABLE
875 int __EXPORT
SdrPercentItem::IsPoolable() const
878 return nId
<SDRATTR_NOTPERSIST_FIRST
|| nId
>SDRATTR_NOTPERSIST_LAST
;
882 //------------------------------------------------------------
883 // class SdrAngleItem
884 //------------------------------------------------------------
886 TYPEINIT1_AUTOFACTORY(SdrAngleItem
,SfxInt32Item
);
888 SfxPoolItem
* __EXPORT
SdrAngleItem::Clone(SfxItemPool
* /*pPool*/) const
890 return new SdrAngleItem(Which(),GetValue());
893 SfxPoolItem
* __EXPORT
SdrAngleItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
895 return new SdrAngleItem(Which(),rIn
);
898 SfxItemPresentation __EXPORT
SdrAngleItem::GetPresentation(
899 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/,
900 XubString
& rText
, const IntlWrapper
* pIntlWrapper
) const
902 INT32
nValue(GetValue());
903 BOOL
bNeg(nValue
< 0);
908 rText
= UniString::CreateFromInt32(nValue
);
912 sal_Unicode
aUnicodeNull('0');
915 const IntlWrapper
* pMyIntlWrapper
= NULL
;
916 // DBG_ASSERT( pIntlWrapper, "SdrAngleItem::GetPresentation: using default App-IntlWrapper" );
918 pIntlWrapper
= pMyIntlWrapper
= new IntlWrapper(
919 ::comphelper::getProcessServiceFactory(),
920 Application::GetSettings().GetLanguage() );
922 if(pIntlWrapper
->getLocaleData()->isNumLeadingZero())
925 while(rText
.Len() < nAnz
)
926 rText
.Insert(aUnicodeNull
, 0);
928 xub_StrLen nLen
= rText
.Len();
929 BOOL
bNull1(rText
.GetChar(nLen
-1) == aUnicodeNull
);
930 BOOL
bNull2(bNull1
&& rText
.GetChar(nLen
-2) == aUnicodeNull
);
934 // keine Nachkommastellen
940 pIntlWrapper
->getLocaleData()->getNumDecimalSep().GetChar(0);
941 rText
.Insert(cDec
, nLen
-2);
948 rText
.Insert(sal_Unicode('-'), 0);
950 if ( pMyIntlWrapper
)
952 delete pMyIntlWrapper
;
957 rText
+= sal_Unicode(DEGREE_CHAR
);
959 if(ePres
== SFX_ITEM_PRESENTATION_COMPLETE
)
963 SdrItemPool::TakeItemName(Which(), aStr
);
964 aStr
+= sal_Unicode(' ');
965 rText
.Insert(aStr
, 0);
971 #ifdef SDR_ISPOOLABLE
972 int __EXPORT
SdrAngleItem::IsPoolable() const
975 return nId
<SDRATTR_NOTPERSIST_FIRST
|| nId
>SDRATTR_NOTPERSIST_LAST
;
979 //------------------------------------------------------------
980 // class SdrMetricItem
981 //------------------------------------------------------------
983 TYPEINIT1_AUTOFACTORY(SdrMetricItem
,SfxInt32Item
);
985 SfxPoolItem
* __EXPORT
SdrMetricItem::Clone(SfxItemPool
* /*pPool*/) const
987 return new SdrMetricItem(Which(),GetValue());
990 SfxPoolItem
* __EXPORT
SdrMetricItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const
992 return new SdrMetricItem(Which(),rIn
);
995 FASTBOOL __EXPORT
SdrMetricItem::HasMetrics() const
1000 FASTBOOL __EXPORT
SdrMetricItem::ScaleMetrics(long nMul
, long nDiv
)
1002 if (GetValue()!=0) {
1003 BigInt
aVal(GetValue());
1005 aVal
+=nDiv
/2; // fuer korrektes Runden
1007 SetValue(long(aVal
));
1012 SfxItemPresentation __EXPORT
SdrMetricItem::GetPresentation(SfxItemPresentation ePres
,
1013 SfxMapUnit eCoreMetric
, SfxMapUnit ePresMetric
, XubString
& rText
, const IntlWrapper
*) const
1015 long nValue
=GetValue();
1016 SdrFormatter
aFmt((MapUnit
)eCoreMetric
,(MapUnit
)ePresMetric
);
1017 aFmt
.TakeStr(nValue
,rText
);
1019 aFmt
.TakeUnitStr((MapUnit
)ePresMetric
,aStr
);
1021 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1024 SdrItemPool::TakeItemName(Which(), aStr2
);
1025 aStr2
+= sal_Unicode(' ');
1026 rText
.Insert(aStr2
, 0);
1031 #ifdef SDR_ISPOOLABLE
1032 int __EXPORT
SdrMetricItem::IsPoolable() const
1035 return nId
<SDRATTR_NOTPERSIST_FIRST
|| nId
>SDRATTR_NOTPERSIST_LAST
;
1039 ////////////////////////////////////////////////////////////////////////////////
1040 // Items des Legendenobjekts
1041 ////////////////////////////////////////////////////////////////////////////////
1043 TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem
,SfxEnumItem
);
1045 SfxPoolItem
* __EXPORT
SdrCaptionTypeItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrCaptionTypeItem(*this); }
1047 SfxPoolItem
* __EXPORT
SdrCaptionTypeItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrCaptionTypeItem(rIn
); }
1049 USHORT __EXPORT
SdrCaptionTypeItem::GetValueCount() const { return 4; }
1051 XubString __EXPORT
SdrCaptionTypeItem::GetValueTextByPos(USHORT nPos
) const
1053 return ImpGetResStr(STR_ItemValCAPTIONTYPE1
+nPos
);
1056 SfxItemPresentation __EXPORT
SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres
,
1057 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1059 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1060 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1063 SdrItemPool::TakeItemName(Which(), aStr
);
1064 aStr
+= sal_Unicode(' ');
1065 rText
.Insert(aStr
, 0);
1070 TYPEINIT1_AUTOFACTORY(SdrCaptionEscDirItem
,SfxEnumItem
);
1072 SfxPoolItem
* __EXPORT
SdrCaptionEscDirItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrCaptionEscDirItem(*this); }
1074 SfxPoolItem
* __EXPORT
SdrCaptionEscDirItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrCaptionEscDirItem(rIn
); }
1076 USHORT __EXPORT
SdrCaptionEscDirItem::GetValueCount() const { return 3; }
1078 XubString __EXPORT
SdrCaptionEscDirItem::GetValueTextByPos(USHORT nPos
) const
1080 return ImpGetResStr(STR_ItemValCAPTIONESCHORI
+nPos
);
1083 SfxItemPresentation __EXPORT
SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres
,
1084 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1086 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1087 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1090 SdrItemPool::TakeItemName(Which(), aStr
);
1091 aStr
+= sal_Unicode(' ');
1092 rText
.Insert(aStr
, 0);
1097 ////////////////////////////////////////////////////////////////////////////////
1099 ////////////////////////////////////////////////////////////////////////////////
1102 TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem
,SfxEnumItem
);
1104 SfxPoolItem
* __EXPORT
SdrTextFitToSizeTypeItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); }
1106 SfxPoolItem
* __EXPORT
SdrTextFitToSizeTypeItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn
); }
1108 USHORT __EXPORT
SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
1110 XubString __EXPORT
SdrTextFitToSizeTypeItem::GetValueTextByPos(USHORT nPos
) const
1112 return ImpGetResStr(STR_ItemValFITTOSIZENONE
+nPos
);
1115 SfxItemPresentation __EXPORT
SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres
,
1116 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1118 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1119 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1122 SdrItemPool::TakeItemName(Which(), aStr
);
1123 aStr
+= sal_Unicode(' ');
1124 rText
.Insert(aStr
, 0);
1129 int __EXPORT
SdrTextFitToSizeTypeItem::HasBoolValue() const { return TRUE
; }
1131 BOOL __EXPORT
SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE
; }
1133 void __EXPORT
SdrTextFitToSizeTypeItem::SetBoolValue(BOOL bVal
) { SetValue(sal::static_int_cast
< USHORT
>(bVal
? SDRTEXTFIT_PROPORTIONAL
: SDRTEXTFIT_NONE
)); }
1135 sal_Bool
SdrTextFitToSizeTypeItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1137 drawing::TextFitToSizeType eFS
= (drawing::TextFitToSizeType
)GetValue();
1143 sal_Bool
SdrTextFitToSizeTypeItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1145 drawing::TextFitToSizeType eFS
;
1148 sal_Int32 nEnum
= 0;
1149 if(!(rVal
>>= nEnum
))
1152 eFS
= (drawing::TextFitToSizeType
) nEnum
;
1155 SetValue( sal::static_int_cast
< USHORT
>( (SdrFitToSizeType
)eFS
) );
1160 TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem
,SfxEnumItem
);
1162 SfxPoolItem
* __EXPORT
SdrTextVertAdjustItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); }
1164 SfxPoolItem
* __EXPORT
SdrTextVertAdjustItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextVertAdjustItem(rIn
); }
1166 USHORT __EXPORT
SdrTextVertAdjustItem::GetValueCount() const { return 5; }
1168 XubString __EXPORT
SdrTextVertAdjustItem::GetValueTextByPos(USHORT nPos
) const
1170 return ImpGetResStr(STR_ItemValTEXTVADJTOP
+nPos
);
1173 SfxItemPresentation __EXPORT
SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres
,
1174 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1176 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1177 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1180 SdrItemPool::TakeItemName(Which(), aStr
);
1181 aStr
+= sal_Unicode(' ');
1182 rText
.Insert(aStr
, 0);
1187 sal_Bool
SdrTextVertAdjustItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1189 rVal
<<= (drawing::TextVerticalAdjust
)GetValue();
1193 sal_Bool
SdrTextVertAdjustItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1195 drawing::TextVerticalAdjust eAdj
;
1196 if(!(rVal
>>= eAdj
))
1198 sal_Int32 nEnum
= 0;
1199 if(!(rVal
>>= nEnum
))
1202 eAdj
= (drawing::TextVerticalAdjust
)nEnum
;
1205 SetValue( sal::static_int_cast
< USHORT
>( (SdrTextVertAdjust
)eAdj
) );
1210 TYPEINIT1_AUTOFACTORY(SdrTextHorzAdjustItem
,SfxEnumItem
);
1212 SfxPoolItem
* __EXPORT
SdrTextHorzAdjustItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextHorzAdjustItem(*this); }
1214 SfxPoolItem
* __EXPORT
SdrTextHorzAdjustItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextHorzAdjustItem(rIn
); }
1216 USHORT __EXPORT
SdrTextHorzAdjustItem::GetValueCount() const { return 5; }
1218 XubString __EXPORT
SdrTextHorzAdjustItem::GetValueTextByPos(USHORT nPos
) const
1220 return ImpGetResStr(STR_ItemValTEXTHADJLEFT
+nPos
);
1223 SfxItemPresentation __EXPORT
SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres
,
1224 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1226 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1227 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1230 SdrItemPool::TakeItemName(Which(), aStr
);
1231 aStr
+= sal_Unicode(' ');
1232 rText
.Insert(aStr
, 0);
1237 sal_Bool
SdrTextHorzAdjustItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1239 rVal
<<= (drawing::TextHorizontalAdjust
)GetValue();
1243 sal_Bool
SdrTextHorzAdjustItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1245 drawing::TextHorizontalAdjust eAdj
;
1246 if(!(rVal
>>= eAdj
))
1248 sal_Int32 nEnum
= 0;
1249 if(!(rVal
>>= nEnum
))
1252 eAdj
= (drawing::TextHorizontalAdjust
)nEnum
;
1255 SetValue( sal::static_int_cast
< USHORT
>( (SdrTextHorzAdjust
)eAdj
) );
1260 TYPEINIT1_AUTOFACTORY(SdrTextAniKindItem
,SfxEnumItem
);
1262 SfxPoolItem
* __EXPORT
SdrTextAniKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniKindItem(*this); }
1264 SfxPoolItem
* __EXPORT
SdrTextAniKindItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextAniKindItem(rIn
); }
1266 USHORT __EXPORT
SdrTextAniKindItem::GetValueCount() const { return 5; }
1268 XubString __EXPORT
SdrTextAniKindItem::GetValueTextByPos(USHORT nPos
) const
1270 return ImpGetResStr(STR_ItemValTEXTANI_NONE
+nPos
);
1273 SfxItemPresentation __EXPORT
SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres
,
1274 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1276 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1277 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1280 SdrItemPool::TakeItemName(Which(), aStr
);
1281 aStr
+= sal_Unicode(' ');
1282 rText
.Insert(aStr
, 0);
1287 sal_Bool
SdrTextAniKindItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1289 rVal
<<= (drawing::TextAnimationKind
)GetValue();
1293 sal_Bool
SdrTextAniKindItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1295 drawing::TextAnimationKind eKind
;
1296 if(!(rVal
>>= eKind
))
1298 sal_Int32 nEnum
= 0;
1299 if(!(rVal
>>= nEnum
))
1301 eKind
= (drawing::TextAnimationKind
)nEnum
;
1304 SetValue( sal::static_int_cast
< USHORT
>( (SdrTextAniKind
)eKind
) );
1309 TYPEINIT1_AUTOFACTORY(SdrTextAniDirectionItem
,SfxEnumItem
);
1311 SfxPoolItem
* __EXPORT
SdrTextAniDirectionItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniDirectionItem(*this); }
1313 SfxPoolItem
* __EXPORT
SdrTextAniDirectionItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextAniDirectionItem(rIn
); }
1315 USHORT __EXPORT
SdrTextAniDirectionItem::GetValueCount() const { return 4; }
1317 XubString __EXPORT
SdrTextAniDirectionItem::GetValueTextByPos(USHORT nPos
) const
1319 return ImpGetResStr(STR_ItemValTEXTANI_LEFT
+nPos
);
1322 SfxItemPresentation __EXPORT
SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres
,
1323 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1325 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1326 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1329 SdrItemPool::TakeItemName(Which(), aStr
);
1330 aStr
+= sal_Unicode(' ');
1331 rText
.Insert(aStr
, 0);
1336 sal_Bool
SdrTextAniDirectionItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1338 rVal
<<= (drawing::TextAnimationDirection
)GetValue();
1342 sal_Bool
SdrTextAniDirectionItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1344 drawing::TextAnimationDirection eDir
;
1345 if(!(rVal
>>= eDir
))
1347 sal_Int32 nEnum
= 0;
1348 if(!(rVal
>>= nEnum
))
1351 eDir
= (drawing::TextAnimationDirection
)nEnum
;
1354 SetValue( sal::static_int_cast
< USHORT
>( (SdrTextAniDirection
)eDir
) );
1359 TYPEINIT1_AUTOFACTORY(SdrTextAniDelayItem
,SfxUInt16Item
);
1361 SfxPoolItem
* __EXPORT
SdrTextAniDelayItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniDelayItem(*this); }
1363 SfxPoolItem
* __EXPORT
SdrTextAniDelayItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextAniDelayItem(rIn
); }
1365 SfxItemPresentation __EXPORT
SdrTextAniDelayItem::GetPresentation(
1366 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/,
1367 XubString
& rText
, const IntlWrapper
*) const
1369 rText
= UniString::CreateFromInt32(GetValue());
1370 rText
+= sal_Unicode('m');
1371 rText
+= sal_Unicode('s');
1373 if(ePres
== SFX_ITEM_PRESENTATION_COMPLETE
)
1377 SdrItemPool::TakeItemName(Which(), aStr
);
1378 aStr
+= sal_Unicode(' ');
1379 rText
.Insert(aStr
, 0);
1385 TYPEINIT1_AUTOFACTORY(SdrTextAniAmountItem
,SfxInt16Item
);
1387 SfxPoolItem
* __EXPORT
SdrTextAniAmountItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrTextAniAmountItem(*this); }
1389 SfxPoolItem
* __EXPORT
SdrTextAniAmountItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrTextAniAmountItem(rIn
); }
1391 FASTBOOL __EXPORT
SdrTextAniAmountItem::HasMetrics() const
1393 return GetValue()>0;
1396 FASTBOOL __EXPORT
SdrTextAniAmountItem::ScaleMetrics(long nMul
, long nDiv
)
1399 BigInt
aVal(GetValue());
1401 aVal
+=nDiv
/2; // fuer korrektes Runden
1403 SetValue(short(aVal
));
1405 } else return FALSE
;
1408 SfxItemPresentation __EXPORT
SdrTextAniAmountItem::GetPresentation(
1409 SfxItemPresentation ePres
, SfxMapUnit eCoreMetric
, SfxMapUnit ePresMetric
,
1410 XubString
& rText
, const IntlWrapper
*) const
1412 INT32
nValue(GetValue());
1419 sal_Char aText
[] = "pixel";
1421 rText
= UniString::CreateFromInt32(-nValue
);
1422 rText
+= UniString(aText
, sizeof(aText
-1));
1426 SdrFormatter
aFmt((MapUnit
)eCoreMetric
, (MapUnit
)ePresMetric
);
1429 aFmt
.TakeStr(nValue
, rText
);
1430 aFmt
.TakeUnitStr((MapUnit
)ePresMetric
, aStr
);
1434 if(ePres
== SFX_ITEM_PRESENTATION_COMPLETE
)
1438 SdrItemPool::TakeItemName(Which(), aStr
);
1439 aStr
+= sal_Unicode(' ');
1440 rText
.Insert(aStr
, 0);
1446 TYPEINIT1_AUTOFACTORY( SdrTextFixedCellHeightItem
, SfxBoolItem
);
1447 SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( BOOL bUseFixedCellHeight
)
1448 : SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT
, bUseFixedCellHeight
)
1451 SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( SvStream
& rStream
, sal_uInt16 nVersion
)
1452 : SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT
, FALSE
)
1461 SfxItemPresentation __EXPORT
SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres
,
1462 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresentationMetric*/,
1463 String
&rText
, const IntlWrapper
* ) const
1465 rText
= GetValueTextByVal( GetValue() );
1466 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
)
1469 SdrItemPool::TakeItemName(Which(), aStr
);
1470 aStr
+= sal_Unicode(' ');
1471 rText
.Insert(aStr
, 0);
1475 SfxPoolItem
* __EXPORT
SdrTextFixedCellHeightItem::Create( SvStream
& rIn
, sal_uInt16 nItemVersion
) const
1477 return new SdrTextFixedCellHeightItem( rIn
, nItemVersion
);
1479 SvStream
& __EXPORT
SdrTextFixedCellHeightItem::Store( SvStream
& rOut
, sal_uInt16 nItemVersion
) const
1483 sal_Bool bValue
= (sal_Bool
)GetValue();
1488 SfxPoolItem
* __EXPORT
SdrTextFixedCellHeightItem::Clone( SfxItemPool
* /*pPool*/) const
1490 return new SdrTextFixedCellHeightItem( GetValue() );
1492 sal_uInt16
SdrTextFixedCellHeightItem::GetVersion( sal_uInt16
/*nFileFormatVersion*/) const
1496 sal_Bool
SdrTextFixedCellHeightItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1498 sal_Bool bValue
= (sal_Bool
)GetValue();
1502 sal_Bool
SdrTextFixedCellHeightItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1504 sal_Bool bValue
= sal_Bool();
1505 if( !( rVal
>>= bValue
) )
1510 #ifdef SDR_ISPOOLABLE
1511 int __EXPORT
SdrTextFixedCellHeightItem::IsPoolable() const
1514 return nId
< SDRATTR_NOTPERSIST_FIRST
|| nId
> SDRATTR_NOTPERSIST_LAST
;
1518 TYPEINIT1_AUTOFACTORY( SdrCustomShapeAdjustmentItem
, SfxPoolItem
);
1520 SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem() : SfxPoolItem( SDRATTR_CUSTOMSHAPE_ADJUSTMENT
)
1524 SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem( SvStream
& rIn
, sal_uInt16 nVersion
):
1525 SfxPoolItem( SDRATTR_CUSTOMSHAPE_ADJUSTMENT
)
1529 SdrCustomShapeAdjustmentValue aVal
;
1530 sal_uInt32 i
, nCount
;
1532 for ( i
= 0; i
< nCount
; i
++ )
1535 SetValue( i
, aVal
);
1540 SdrCustomShapeAdjustmentItem::~SdrCustomShapeAdjustmentItem()
1543 for ( pPtr
= aAdjustmentValueList
.First(); pPtr
; pPtr
= aAdjustmentValueList
.Next() )
1544 delete (SdrCustomShapeAdjustmentValue
*)pPtr
;
1547 int __EXPORT
SdrCustomShapeAdjustmentItem::operator==( const SfxPoolItem
& rCmp
) const
1549 int bRet
= SfxPoolItem::operator==( rCmp
);
1552 bRet
= ((SdrCustomShapeAdjustmentItem
&)rCmp
).GetCount() == GetCount();
1556 for ( i
= 0; i
< GetCount(); i
++ )
1558 if ( ((SdrCustomShapeAdjustmentItem
&)rCmp
).GetValue( i
).nValue
!= GetValue( i
).nValue
)
1569 SfxItemPresentation __EXPORT
SdrCustomShapeAdjustmentItem::GetPresentation(
1570 SfxItemPresentation ePresentation
, SfxMapUnit
/*eCoreMetric*/,
1571 SfxMapUnit
/*ePresentationMetric*/, XubString
&rText
, const IntlWrapper
*) const
1573 sal_uInt32 i
, nCount
= GetCount();
1574 rText
.Append( UniString::CreateFromInt32( nCount
) );
1575 for ( i
= 0; i
< nCount
; i
++ )
1577 rText
+= sal_Unicode( ' ' );
1578 rText
.Append( UniString::CreateFromInt32( GetValue( i
).nValue
) );
1580 if ( ePresentation
== SFX_ITEM_PRESENTATION_COMPLETE
)
1584 SdrItemPool::TakeItemName( Which(), aStr
);
1585 aStr
+= sal_Unicode( ' ' );
1586 rText
.Insert( aStr
, 0 );
1588 return ePresentation
;
1591 SfxPoolItem
* __EXPORT
SdrCustomShapeAdjustmentItem::Create( SvStream
& rIn
, sal_uInt16 nItemVersion
) const
1593 return new SdrCustomShapeAdjustmentItem( rIn
, nItemVersion
);
1596 SvStream
& __EXPORT
SdrCustomShapeAdjustmentItem::Store( SvStream
& rOut
, sal_uInt16 nItemVersion
) const
1600 sal_uInt32 i
, nCount
= GetCount();
1602 for ( i
= 0; i
< nCount
; i
++ )
1603 rOut
<< GetValue( i
).nValue
;
1608 SfxPoolItem
* __EXPORT
SdrCustomShapeAdjustmentItem::Clone( SfxItemPool
* /*pPool*/) const
1611 SdrCustomShapeAdjustmentItem
* pItem
= new SdrCustomShapeAdjustmentItem
;
1612 for ( i
= 0; i
< GetCount(); i
++ )
1614 const SdrCustomShapeAdjustmentValue
& rVal
= GetValue( i
);
1615 pItem
->SetValue( i
, rVal
);
1620 #ifdef SDR_ISPOOLABLE
1621 int __EXPORT
SdrCustomShapeAdjustmentItem::IsPoolable() const
1624 return nId
< SDRATTR_NOTPERSIST_FIRST
|| nId
> SDRATTR_NOTPERSIST_LAST
;
1628 const SdrCustomShapeAdjustmentValue
& SdrCustomShapeAdjustmentItem::GetValue( sal_uInt32 nIndex
) const
1631 if ( aAdjustmentValueList
.Count() <= nIndex
)
1632 DBG_ERROR( "SdrCustomShapeAdjustemntItem::GetValue - nIndex out of range (SJ)" );
1634 return *(SdrCustomShapeAdjustmentValue
*)aAdjustmentValueList
.GetObject( nIndex
);
1637 void SdrCustomShapeAdjustmentItem::SetValue( sal_uInt32 nIndex
, const SdrCustomShapeAdjustmentValue
& rVal
)
1640 for ( i
= GetCount(); i
<= nIndex
; i
++ )
1642 SdrCustomShapeAdjustmentValue
* pItem
= new SdrCustomShapeAdjustmentValue
;
1643 aAdjustmentValueList
.Insert( pItem
, LIST_APPEND
);
1645 SdrCustomShapeAdjustmentValue
& rValue
= *(SdrCustomShapeAdjustmentValue
*)aAdjustmentValueList
.GetObject( nIndex
);
1646 rValue
.nValue
= rVal
.nValue
;
1649 sal_uInt16
SdrCustomShapeAdjustmentItem::GetVersion( sal_uInt16
/*nFileFormatVersion*/) const
1654 sal_Bool
SdrCustomShapeAdjustmentItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1656 sal_uInt32 i
, nCount
= GetCount();
1657 uno::Sequence
< sal_Int32
> aSequence( nCount
);
1660 sal_Int32
* pPtr
= aSequence
.getArray();
1661 for ( i
= 0; i
< nCount
; i
++ )
1662 *pPtr
++ = GetValue( i
).nValue
;
1668 sal_Bool
SdrCustomShapeAdjustmentItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1670 uno::Sequence
< sal_Int32
> aSequence
;
1671 if( !( rVal
>>= aSequence
) )
1675 for ( pPtr
= aAdjustmentValueList
.First(); pPtr
; pPtr
= aAdjustmentValueList
.Next() )
1676 delete (SdrCustomShapeAdjustmentValue
*)pPtr
;
1678 sal_uInt32 i
, nCount
= aSequence
.getLength();
1681 const sal_Int32
* pPtr2
= aSequence
.getConstArray();
1682 for ( i
= 0; i
< nCount
; i
++ )
1684 SdrCustomShapeAdjustmentValue
* pItem
= new SdrCustomShapeAdjustmentValue
;
1685 pItem
->nValue
= *pPtr2
++;
1686 aAdjustmentValueList
.Insert( pItem
, LIST_APPEND
);
1693 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1695 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1698 TYPEINIT1_AUTOFACTORY(SdrEdgeKindItem
,SfxEnumItem
);
1700 SfxPoolItem
* __EXPORT
SdrEdgeKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrEdgeKindItem(*this); }
1702 SfxPoolItem
* __EXPORT
SdrEdgeKindItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrEdgeKindItem(rIn
); }
1704 USHORT __EXPORT
SdrEdgeKindItem::GetValueCount() const { return 4; }
1706 XubString __EXPORT
SdrEdgeKindItem::GetValueTextByPos(USHORT nPos
) const
1708 return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES
+nPos
);
1711 SfxItemPresentation __EXPORT
SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres
,
1712 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1714 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1715 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1718 SdrItemPool::TakeItemName(Which(), aStr
);
1719 aStr
+= sal_Unicode(' ');
1720 rText
.Insert(aStr
, 0);
1725 sal_Bool
SdrEdgeKindItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1727 drawing::ConnectorType eCT
= drawing::ConnectorType_STANDARD
;
1729 switch( GetValue() )
1731 case SDREDGE_ORTHOLINES
: eCT
= drawing::ConnectorType_STANDARD
; break;
1732 case SDREDGE_THREELINES
: eCT
= drawing::ConnectorType_LINES
; break;
1733 case SDREDGE_ONELINE
: eCT
= drawing::ConnectorType_LINE
; break;
1734 case SDREDGE_BEZIER
: eCT
= drawing::ConnectorType_CURVE
; break;
1735 case SDREDGE_ARC
: eCT
= drawing::ConnectorType_CURVE
; break;
1737 DBG_ERROR( "SdrEdgeKindItem::QueryValue : unknown enum" );
1745 sal_Bool
SdrEdgeKindItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1747 drawing::ConnectorType eCT
;
1750 sal_Int32 nEnum
= 0;
1751 if(!(rVal
>>= nEnum
))
1754 eCT
= (drawing::ConnectorType
)nEnum
;
1757 SdrEdgeKind eEK
= SDREDGE_ORTHOLINES
;
1760 case drawing::ConnectorType_STANDARD
: eEK
= SDREDGE_ORTHOLINES
; break;
1761 case drawing::ConnectorType_CURVE
: eEK
= SDREDGE_BEZIER
; break;
1762 case drawing::ConnectorType_LINE
: eEK
= SDREDGE_ONELINE
; break;
1763 case drawing::ConnectorType_LINES
: eEK
= SDREDGE_THREELINES
; break;
1765 DBG_ERROR( "SdrEdgeKindItem::PuValue : unknown enum" );
1767 SetValue( sal::static_int_cast
< USHORT
>( eEK
) );
1772 sal_Bool
SdrEdgeNode1HorzDistItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1774 rVal
<<= (sal_Int32
)GetValue();
1778 sal_Bool
SdrEdgeNode1HorzDistItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1780 sal_Int32 nValue
= 0;
1781 if(!(rVal
>>= nValue
))
1788 BOOL
SdrEdgeNode1VertDistItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1790 rVal
<<= (sal_Int32
)GetValue();
1794 BOOL
SdrEdgeNode1VertDistItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1796 sal_Int32 nValue
= 0;
1797 if(!(rVal
>>= nValue
))
1804 BOOL
SdrEdgeNode2HorzDistItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1806 rVal
<<= (sal_Int32
)GetValue();
1810 BOOL
SdrEdgeNode2HorzDistItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1812 sal_Int32 nValue
= 0;
1813 if(!(rVal
>>= nValue
))
1820 BOOL
SdrEdgeNode2VertDistItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1822 rVal
<<= (sal_Int32
)GetValue();
1826 BOOL
SdrEdgeNode2VertDistItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1828 sal_Int32 nValue
= 0;
1829 if(!(rVal
>>= nValue
))
1836 BOOL
SdrEdgeLine1DeltaItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1838 rVal
<<= (sal_Int32
)GetValue();
1842 BOOL
SdrEdgeLine1DeltaItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1844 sal_Int32 nValue
= 0;
1845 if(!(rVal
>>= nValue
))
1852 BOOL
SdrEdgeLine2DeltaItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1854 rVal
<<= (sal_Int32
)GetValue();
1858 BOOL
SdrEdgeLine2DeltaItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1860 sal_Int32 nValue
= 0;
1861 if(!(rVal
>>= nValue
))
1868 BOOL
SdrEdgeLine3DeltaItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1870 rVal
<<= (sal_Int32
)GetValue();
1874 BOOL
SdrEdgeLine3DeltaItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1876 sal_Int32 nValue
= 0;
1877 if(!(rVal
>>= nValue
))
1884 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1886 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1889 TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem
,SfxEnumItem
);
1891 SfxPoolItem
* __EXPORT
SdrMeasureKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureKindItem(*this); }
1893 SfxPoolItem
* __EXPORT
SdrMeasureKindItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrMeasureKindItem(rIn
); }
1895 USHORT __EXPORT
SdrMeasureKindItem::GetValueCount() const { return 2; }
1897 XubString __EXPORT
SdrMeasureKindItem::GetValueTextByPos(USHORT nPos
) const
1899 return ImpGetResStr(STR_ItemValMEASURE_STD
+nPos
);
1902 SfxItemPresentation __EXPORT
SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres
,
1903 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1905 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1906 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1909 SdrItemPool::TakeItemName(Which(), aStr
);
1910 aStr
+= sal_Unicode(' ');
1911 rText
.Insert(aStr
, 0);
1916 sal_Bool
SdrMeasureKindItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1918 rVal
<<= (drawing::MeasureKind
)GetValue();
1922 sal_Bool
SdrMeasureKindItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1924 drawing::MeasureKind eKind
;
1925 if(!(rVal
>>= eKind
))
1927 sal_Int32 nEnum
= 0;
1928 if(!(rVal
>>= nEnum
))
1931 eKind
= (drawing::MeasureKind
)nEnum
;
1934 SetValue( sal::static_int_cast
< USHORT
>( (SdrMeasureKind
)eKind
) );
1938 TYPEINIT1_AUTOFACTORY(SdrMeasureTextHPosItem
,SfxEnumItem
);
1940 SfxPoolItem
* __EXPORT
SdrMeasureTextHPosItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureTextHPosItem(*this); }
1942 SfxPoolItem
* __EXPORT
SdrMeasureTextHPosItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrMeasureTextHPosItem(rIn
); }
1944 USHORT __EXPORT
SdrMeasureTextHPosItem::GetValueCount() const { return 4; }
1946 XubString __EXPORT
SdrMeasureTextHPosItem::GetValueTextByPos(USHORT nPos
) const
1948 return ImpGetResStr(STR_ItemValMEASURE_TEXTHAUTO
+nPos
);
1951 SfxItemPresentation __EXPORT
SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres
,
1952 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
1954 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
1955 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
1958 SdrItemPool::TakeItemName(Which(), aStr
);
1959 aStr
+= sal_Unicode(' ');
1960 rText
.Insert(aStr
, 0);
1965 sal_Bool
SdrMeasureTextHPosItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
1967 rVal
<<= (drawing::MeasureTextHorzPos
)GetValue();
1971 sal_Bool
SdrMeasureTextHPosItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
1973 drawing::MeasureTextHorzPos ePos
;
1974 if(!(rVal
>>= ePos
))
1976 sal_Int32 nEnum
= 0;
1977 if(!(rVal
>>= nEnum
))
1980 ePos
= (drawing::MeasureTextHorzPos
)nEnum
;
1983 SetValue( sal::static_int_cast
< USHORT
>( (SdrMeasureTextHPos
)ePos
) );
1987 TYPEINIT1_AUTOFACTORY(SdrMeasureTextVPosItem
,SfxEnumItem
);
1989 SfxPoolItem
* __EXPORT
SdrMeasureTextVPosItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureTextVPosItem(*this); }
1991 SfxPoolItem
* __EXPORT
SdrMeasureTextVPosItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrMeasureTextVPosItem(rIn
); }
1993 USHORT __EXPORT
SdrMeasureTextVPosItem::GetValueCount() const { return 5; }
1995 XubString __EXPORT
SdrMeasureTextVPosItem::GetValueTextByPos(USHORT nPos
) const
1997 return ImpGetResStr(STR_ItemValMEASURE_TEXTVAUTO
+nPos
);
2000 SfxItemPresentation __EXPORT
SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres
,
2001 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
2003 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
2004 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
2007 SdrItemPool::TakeItemName(Which(), aStr
);
2008 aStr
+= sal_Unicode(' ');
2009 rText
.Insert(aStr
, 0);
2014 sal_Bool
SdrMeasureTextVPosItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
2016 rVal
<<= (drawing::MeasureTextVertPos
)GetValue();
2020 sal_Bool
SdrMeasureTextVPosItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
2022 drawing::MeasureTextVertPos ePos
;
2023 if(!(rVal
>>= ePos
))
2025 sal_Int32 nEnum
= 0;
2026 if(!(rVal
>>= nEnum
))
2029 ePos
= (drawing::MeasureTextVertPos
)nEnum
;
2032 SetValue( sal::static_int_cast
< USHORT
>( (SdrMeasureTextHPos
)ePos
) );
2036 TYPEINIT1_AUTOFACTORY(SdrMeasureUnitItem
,SfxEnumItem
);
2038 SfxPoolItem
* __EXPORT
SdrMeasureUnitItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrMeasureUnitItem(*this); }
2040 SfxPoolItem
* __EXPORT
SdrMeasureUnitItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrMeasureUnitItem(rIn
); }
2042 USHORT __EXPORT
SdrMeasureUnitItem::GetValueCount() const { return 14; }
2044 XubString __EXPORT
SdrMeasureUnitItem::GetValueTextByPos(USHORT nPos
) const
2048 if((FieldUnit
)nPos
== FUNIT_NONE
)
2050 sal_Char aText
[] = "default";
2051 aRetval
+= UniString(aText
, sizeof(aText
-1));
2055 SdrFormatter::TakeUnitStr((FieldUnit
)nPos
, aRetval
);
2061 SfxItemPresentation __EXPORT
SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres
,
2062 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
2064 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
2065 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
2068 SdrItemPool::TakeItemName(Which(), aStr
);
2069 aStr
+= sal_Unicode(' ');
2070 rText
.Insert(aStr
, 0);
2075 sal_Bool
SdrMeasureUnitItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
2077 rVal
<<= (sal_Int32
)GetValue();
2081 sal_Bool
SdrMeasureUnitItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
2083 sal_Int32 nMeasure
= 0;
2084 if(!(rVal
>>= nMeasure
))
2087 SetValue( sal::static_int_cast
< USHORT
>( (FieldUnit
)nMeasure
) );
2091 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2093 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2096 TYPEINIT1_AUTOFACTORY(SdrCircKindItem
,SfxEnumItem
);
2098 SfxPoolItem
* __EXPORT
SdrCircKindItem::Clone(SfxItemPool
* /*pPool*/) const { return new SdrCircKindItem(*this); }
2100 SfxPoolItem
* __EXPORT
SdrCircKindItem::Create(SvStream
& rIn
, USHORT
/*nVer*/) const { return new SdrCircKindItem(rIn
); }
2102 USHORT __EXPORT
SdrCircKindItem::GetValueCount() const { return 4; }
2104 XubString __EXPORT
SdrCircKindItem::GetValueTextByPos(USHORT nPos
) const
2106 return ImpGetResStr(STR_ItemValCIRC_FULL
+nPos
);
2109 SfxItemPresentation __EXPORT
SdrCircKindItem::GetPresentation(SfxItemPresentation ePres
,
2110 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/, XubString
& rText
, const IntlWrapper
*) const
2112 rText
=GetValueTextByPos(sal::static_int_cast
< USHORT
>(GetValue()));
2113 if (ePres
==SFX_ITEM_PRESENTATION_COMPLETE
) {
2116 SdrItemPool::TakeItemName(Which(), aStr
);
2117 aStr
+= sal_Unicode(' ');
2118 rText
.Insert(aStr
, 0);
2123 sal_Bool
SdrCircKindItem::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
2125 rVal
<<= (drawing::CircleKind
)GetValue();
2129 sal_Bool
SdrCircKindItem::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
2131 drawing::CircleKind eKind
;
2132 if(!(rVal
>>= eKind
))
2134 sal_Int32 nEnum
= 0;
2135 if(!(rVal
>>= nEnum
))
2138 eKind
= (drawing::CircleKind
)nEnum
;
2141 SetValue( sal::static_int_cast
< USHORT
>( (SdrCircKind
)eKind
) );
2145 //------------------------------------------------------------
2146 // class SdrSignedPercentItem
2147 //------------------------------------------------------------
2149 TYPEINIT1_AUTOFACTORY( SdrSignedPercentItem
, SfxInt16Item
);
2152 SfxPoolItem
* __EXPORT
SdrSignedPercentItem::Clone(SfxItemPool
* /*pPool*/) const
2154 return new SdrSignedPercentItem( Which(), GetValue() );
2157 SfxPoolItem
* __EXPORT
SdrSignedPercentItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2159 return new SdrSignedPercentItem( Which(), rIn
);
2162 SfxItemPresentation __EXPORT
SdrSignedPercentItem::GetPresentation(
2163 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/,
2164 XubString
& rText
, const IntlWrapper
*) const
2166 rText
= UniString::CreateFromInt32(GetValue());
2167 rText
+= sal_Unicode('%');
2169 if(ePres
== SFX_ITEM_PRESENTATION_COMPLETE
)
2173 SdrItemPool::TakeItemName(Which(), aStr
);
2174 aStr
+= sal_Unicode(' ');
2175 rText
.Insert(aStr
, 0);
2181 #ifdef SDR_ISPOOLABLE
2183 int __EXPORT
SdrSignedPercentItem::IsPoolable() const
2186 return nId
< SDRATTR_NOTPERSIST_FIRST
|| nId
> SDRATTR_NOTPERSIST_LAST
;
2190 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2192 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2194 TYPEINIT1( SdrGrafRedItem
, SdrSignedPercentItem
);
2196 SfxPoolItem
* __EXPORT
SdrGrafRedItem::Clone( SfxItemPool
* /*pPool*/) const
2198 return new SdrGrafRedItem( *this );
2201 SfxPoolItem
* __EXPORT
SdrGrafRedItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2203 return new SdrGrafRedItem( rIn
);
2206 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2208 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2210 TYPEINIT1( SdrGrafGreenItem
, SdrSignedPercentItem
);
2212 SfxPoolItem
* __EXPORT
SdrGrafGreenItem::Clone( SfxItemPool
* /*pPool*/) const
2214 return new SdrGrafGreenItem( *this );
2217 SfxPoolItem
* __EXPORT
SdrGrafGreenItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2219 return new SdrGrafGreenItem( rIn
);
2222 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2224 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2226 TYPEINIT1( SdrGrafBlueItem
, SdrSignedPercentItem
);
2228 SfxPoolItem
* __EXPORT
SdrGrafBlueItem::Clone( SfxItemPool
* /*pPool*/) const
2230 return new SdrGrafBlueItem( *this );
2233 SfxPoolItem
* __EXPORT
SdrGrafBlueItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2235 return new SdrGrafBlueItem( rIn
);
2238 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2239 // SdrGrafLuminanceItem
2240 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2242 TYPEINIT1( SdrGrafLuminanceItem
, SdrSignedPercentItem
);
2244 SfxPoolItem
* __EXPORT
SdrGrafLuminanceItem::Clone( SfxItemPool
* /*pPool*/) const
2246 return new SdrGrafLuminanceItem( *this );
2249 SfxPoolItem
* __EXPORT
SdrGrafLuminanceItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2251 return new SdrGrafLuminanceItem( rIn
);
2254 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2255 // SdrGrafContrastItem
2256 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2258 TYPEINIT1( SdrGrafContrastItem
, SdrSignedPercentItem
);
2260 SfxPoolItem
* __EXPORT
SdrGrafContrastItem::Clone( SfxItemPool
* /*pPool*/) const
2262 return new SdrGrafContrastItem( *this );
2265 SfxPoolItem
* __EXPORT
SdrGrafContrastItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2267 return new SdrGrafContrastItem( rIn
);
2270 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2271 // SdrGrafGamma100Item
2272 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2274 TYPEINIT1( SdrGrafGamma100Item
, SfxUInt32Item
);
2276 SfxPoolItem
* __EXPORT
SdrGrafGamma100Item::Clone( SfxItemPool
* /*pPool */) const
2278 return new SdrGrafGamma100Item( *this );
2281 SfxPoolItem
* __EXPORT
SdrGrafGamma100Item::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2283 return new SdrGrafGamma100Item( rIn
);
2286 sal_Bool
SdrGrafGamma100Item::QueryValue( uno::Any
& rVal
, BYTE
/*nMemberId*/) const
2288 rVal
<<= ((double)GetValue()) / 100.0;
2292 sal_Bool
SdrGrafGamma100Item::PutValue( const uno::Any
& rVal
, BYTE
/*nMemberId*/)
2295 if(!(rVal
>>= nGamma
))
2298 SetValue( (UINT32
)(nGamma
* 100.0 ) );
2302 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2303 // SdrGrafInvertItem
2304 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2306 TYPEINIT1( SdrGrafInvertItem
, SdrOnOffItem
);
2308 SfxPoolItem
* __EXPORT
SdrGrafInvertItem::Clone( SfxItemPool
* /*pPool*/) const
2310 return new SdrGrafInvertItem( *this );
2313 SfxPoolItem
* __EXPORT
SdrGrafInvertItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2315 return new SdrGrafInvertItem( rIn
);
2318 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2319 // SdrGrafTransparenceItem
2320 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2322 TYPEINIT1( SdrGrafTransparenceItem
, SdrPercentItem
);
2324 SfxPoolItem
* __EXPORT
SdrGrafTransparenceItem::Clone( SfxItemPool
* /*pPool*/) const
2326 return new SdrGrafTransparenceItem( *this );
2329 SfxPoolItem
* __EXPORT
SdrGrafTransparenceItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2331 return new SdrGrafTransparenceItem( rIn
);
2334 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2336 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2338 TYPEINIT1( SdrGrafModeItem
, SfxEnumItem
);
2340 SfxPoolItem
* __EXPORT
SdrGrafModeItem::Clone(SfxItemPool
* /*pPool*/) const
2342 return new SdrGrafModeItem( *this );
2345 SfxPoolItem
* __EXPORT
SdrGrafModeItem::Create( SvStream
& rIn
, USHORT
/*nVer*/) const
2347 return new SdrGrafModeItem( rIn
);
2350 USHORT __EXPORT
SdrGrafModeItem::GetValueCount() const
2355 XubString __EXPORT
SdrGrafModeItem::GetValueTextByPos(UINT16 nPos
) const
2363 sal_Char aTextGreys
[] = "Greys";
2364 aStr
+= UniString(aTextGreys
, sizeof(aTextGreys
-1));
2369 sal_Char aTextBlackWhite
[] = "Black/White";
2370 aStr
+= UniString(aTextBlackWhite
, sizeof(aTextBlackWhite
-1));
2375 sal_Char aTextWatermark
[] = "Watermark";
2376 aStr
+= UniString(aTextWatermark
, sizeof(aTextWatermark
-1));
2381 sal_Char aTextStandard
[] = "Standard";
2382 aStr
+= UniString(aTextStandard
, sizeof(aTextStandard
-1));
2390 SfxItemPresentation __EXPORT
SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres
,
2391 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/,
2392 XubString
& rText
, const IntlWrapper
*) const
2394 rText
= GetValueTextByPos( sal::static_int_cast
< USHORT
>( GetValue() ) );
2396 if( ePres
== SFX_ITEM_PRESENTATION_COMPLETE
)
2400 SdrItemPool::TakeItemName( Which(), aStr
);
2401 aStr
+= sal_Unicode(' ');
2402 rText
.Insert( aStr
, 0 );
2408 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2410 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2412 TYPEINIT1( SdrGrafCropItem
, SvxGrfCrop
);
2414 SfxPoolItem
* SdrGrafCropItem::Clone( SfxItemPool
* /*pPool*/) const
2416 return new SdrGrafCropItem( *this );
2419 SfxPoolItem
* SdrGrafCropItem::Create( SvStream
& rIn
, USHORT nVer
) const
2421 return( ( 0 == nVer
) ? Clone( NULL
) : SvxGrfCrop::Create( rIn
, nVer
) );
2424 USHORT
SdrGrafCropItem::GetVersion( USHORT
/*nFileVersion*/) const
2426 // GRFCROP_VERSION_MOVETOSVX is 1
2427 return GRFCROP_VERSION_MOVETOSVX
;