Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
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>
31 : #include <com/sun/star/uno/Sequence.hxx>
32 :
33 : #include "editeng/boxitem.hxx"
34 : #include "editeng/lineitem.hxx"
35 : #include "editeng/shaditem.hxx"
36 : #include "editeng/xmlcnitm.hxx"
37 : #include <comphelper/processfactory.hxx>
38 : #include <editeng/adjustitem.hxx>
39 : #include <editeng/editdata.hxx>
40 : #include <editeng/writingmodeitem.hxx>
41 : #include <i18nutil/unicode.hxx>
42 : #include <svl/solar.hrc>
43 : #include <tools/bigint.hxx>
44 : #include <tools/stream.hxx>
45 : #include <unotools/intlwrapper.hxx>
46 : #include <vcl/svapp.hxx>
47 : #include <vcl/settings.hxx>
48 :
49 : #include "svdglob.hxx"
50 : #include "svx/svdstr.hrc"
51 :
52 : #include <svx/sdgcpitm.hxx>
53 : #include <svx/sdtfchim.hxx>
54 : #include <svx/svdattr.hxx>
55 : #include <svx/svdmodel.hxx>
56 : #include <svx/svdpool.hxx>
57 : #include <svx/svdtrans.hxx>
58 : #include <svx/svx3ditems.hxx>
59 : #include <svx/svxids.hrc>
60 : #include <sxallitm.hxx>
61 : #include <svx/sxcaitm.hxx>
62 : #include <svx/sxcecitm.hxx>
63 : #include <svx/sxcgitm.hxx>
64 : #include <svx/sxciaitm.hxx>
65 : #include <sxcikitm.hxx>
66 : #include <svx/sxcllitm.hxx>
67 : #include <svx/sxctitm.hxx>
68 : #include <svx/sxekitm.hxx>
69 : #include <svx/sxelditm.hxx>
70 : #include <svx/sxenditm.hxx>
71 : #include <svx/sxfiitm.hxx>
72 : #include <sxlayitm.hxx>
73 : #include <sxlogitm.hxx>
74 : #include <svx/sxmbritm.hxx>
75 : #include <svx/sxmfsitm.hxx>
76 : #include <sxmkitm.hxx>
77 : #include <svx/sxmlhitm.hxx>
78 : #include <sxmoitm.hxx>
79 : #include <sxmovitm.hxx>
80 : #include <sxmsitm.hxx>
81 : #include <svx/sxmspitm.hxx>
82 : #include <svx/sxmsuitm.hxx>
83 : #include <sxmtaitm.hxx>
84 : #include <svx/sxmtfitm.hxx>
85 : #include <svx/sxmtpitm.hxx>
86 : #include <svx/sxmtritm.hxx>
87 : #include <svx/sxmuitm.hxx>
88 : #include <sxoneitm.hxx>
89 : #include <sxonitm.hxx>
90 : #include <sxopitm.hxx>
91 : #include <sxraitm.hxx>
92 : #include <sxreaitm.hxx>
93 : #include <sxreoitm.hxx>
94 : #include <sxroaitm.hxx>
95 : #include <sxrooitm.hxx>
96 : #include <sxsaitm.hxx>
97 : #include <sxsalitm.hxx>
98 : #include <svx/sxsiitm.hxx>
99 : #include <sxsoitm.hxx>
100 : #include <sxtraitm.hxx>
101 : #include <svx/xfillit0.hxx>
102 : #include <svx/xflclit.hxx>
103 : #include <svx/xlineit0.hxx>
104 : #include <svx/xtable.hxx>
105 :
106 : using namespace ::com::sun::star;
107 :
108 4814 : SdrItemPool::SdrItemPool(
109 : SfxItemPool* _pMaster,
110 : bool bLoadRefCounts)
111 4814 : : XOutdevItemPool(_pMaster, SDRATTR_START, SDRATTR_END, bLoadRefCounts)
112 : {
113 : // prepare some constants
114 4814 : const Color aNullCol(RGB_Color(COL_BLACK));
115 4814 : const sal_Int32 nDefEdgeDist(500L); // Defaulting hard for Draw (100TH_MM) currently. MapMode will have to be taken into account in the future.
116 :
117 : // init the non-persistent items
118 178118 : for(sal_uInt16 i(SDRATTR_NOTPERSIST_FIRST); i <= SDRATTR_NOTPERSIST_LAST; i++)
119 : {
120 173304 : mpLocalItemInfos[i - SDRATTR_START]._nFlags = SfxItemPoolFlags::NONE;
121 : }
122 :
123 : // init own PoolDefaults
124 4814 : mppLocalPoolDefaults[SDRATTR_SHADOW -SDRATTR_START]=new SdrOnOffItem(SDRATTR_SHADOW, false);
125 4814 : mppLocalPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new XColorItem(SDRATTR_SHADOWCOLOR, aNullCol);
126 4814 : mppLocalPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWXDIST, 0);
127 4814 : mppLocalPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWYDIST, 0);
128 4814 : mppLocalPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0);
129 4814 : mppLocalPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D );
130 4814 : mppLocalPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP );
131 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ;
132 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE, true);
133 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONANGLE -SDRATTR_START]=new SdrCaptionAngleItem ;
134 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONGAP -SDRATTR_START]=new SdrCaptionGapItem ;
135 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONESCDIR -SDRATTR_START]=new SdrCaptionEscDirItem ;
136 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONESCISREL -SDRATTR_START]=new SdrCaptionEscIsRelItem ;
137 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONESCREL -SDRATTR_START]=new SdrCaptionEscRelItem ;
138 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONESCABS -SDRATTR_START]=new SdrCaptionEscAbsItem ;
139 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONLINELEN -SDRATTR_START]=new SdrCaptionLineLenItem ;
140 4814 : mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem;
141 4814 : mppLocalPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrMetricItem(SDRATTR_ECKENRADIUS, 0);
142 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0);
143 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true);
144 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem;
145 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0);
146 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0);
147 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_UPPERDIST, 0);
148 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LOWERDIST, 0);
149 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_VERTADJUST -SDRATTR_START]=new SdrTextVertAdjustItem;
150 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0);
151 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0);
152 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0);
153 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false);
154 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem;
155 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem;
156 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem;
157 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANISTARTINSIDE -SDRATTR_START]=new SdrTextAniStartInsideItem;
158 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANISTOPINSIDE -SDRATTR_START]=new SdrTextAniStopInsideItem;
159 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANICOUNT -SDRATTR_START]=new SdrTextAniCountItem;
160 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANIDELAY -SDRATTR_START]=new SdrTextAniDelayItem;
161 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_ANIAMOUNT -SDRATTR_START]=new SdrTextAniAmountItem;
162 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, false);
163 4814 : mppLocalPoolDefaults[SDRATTR_CUSTOMSHAPE_ADJUSTMENT -SDRATTR_START]=new SdrCustomShapeAdjustmentItem;
164 4814 : mppLocalPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES );
165 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem;
166 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_WORDWRAP -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true);
167 4814 : mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWSIZE -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWSIZE, false);
168 4814 : mppLocalPoolDefaults[SDRATTR_EDGEKIND -SDRATTR_START]=new SdrEdgeKindItem;
169 4814 : mppLocalPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist);
170 4814 : mppLocalPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist);
171 4814 : mppLocalPoolDefaults[SDRATTR_EDGENODE2HORZDIST-SDRATTR_START]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist);
172 4814 : mppLocalPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new SdrEdgeNode2VertDistItem(nDefEdgeDist);
173 4814 : mppLocalPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem;
174 4814 : mppLocalPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem;
175 4814 : mppLocalPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new SdrEdgeLineDeltaAnzItem;
176 4814 : mppLocalPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0);
177 4814 : mppLocalPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0);
178 4814 : mppLocalPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0);
179 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem;
180 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem;
181 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem;
182 4814 : mppLocalPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASURELINEDIST, 800);
183 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, 200);
184 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, 100);
185 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, 0);
186 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, 0);
187 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem;
188 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTROTA90 -SDRATTR_START]=new SdrMeasureTextRota90Item;
189 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN -SDRATTR_START]=new SdrMeasureTextUpsideDownItem;
190 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREOVERHANG -SDRATTR_START]=new SdrMeasureOverhangItem(600);
191 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREUNIT -SDRATTR_START]=new SdrMeasureUnitItem;
192 4814 : mppLocalPoolDefaults[SDRATTR_MEASURESCALE -SDRATTR_START]=new SdrMeasureScaleItem;
193 4814 : mppLocalPoolDefaults[SDRATTR_MEASURESHOWUNIT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, false);
194 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREFORMATSTRING -SDRATTR_START]=new SdrMeasureFormatStringItem();
195 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLE -SDRATTR_START]=new SdrMeasureTextAutoAngleItem();
196 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLEVIEW-SDRATTR_START]=new SdrMeasureTextAutoAngleViewItem();
197 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTISFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextIsFixedAngleItem();
198 4814 : mppLocalPoolDefaults[SDRATTR_MEASURETEXTFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextFixedAngleItem();
199 4814 : mppLocalPoolDefaults[SDRATTR_MEASUREDECIMALPLACES -SDRATTR_START]=new SdrMeasureDecimalPlacesItem();
200 4814 : mppLocalPoolDefaults[SDRATTR_CIRCKIND -SDRATTR_START]=new SdrCircKindItem;
201 4814 : mppLocalPoolDefaults[SDRATTR_CIRCSTARTANGLE-SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCSTARTANGLE, 0);
202 4814 : mppLocalPoolDefaults[SDRATTR_CIRCENDANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCENDANGLE, 36000);
203 4814 : mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, false);
204 4814 : mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, false);
205 4814 : mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem;
206 4814 : mppLocalPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem;
207 4814 : mppLocalPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem;
208 4814 : mppLocalPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem;
209 4814 : mppLocalPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_OBJECTNAME);
210 4814 : mppLocalPoolDefaults[SDRATTR_ALLPOSITIONX -SDRATTR_START]=new SdrAllPositionXItem;
211 4814 : mppLocalPoolDefaults[SDRATTR_ALLPOSITIONY -SDRATTR_START]=new SdrAllPositionYItem;
212 4814 : mppLocalPoolDefaults[SDRATTR_ALLSIZEWIDTH -SDRATTR_START]=new SdrAllSizeWidthItem;
213 4814 : mppLocalPoolDefaults[SDRATTR_ALLSIZEHEIGHT -SDRATTR_START]=new SdrAllSizeHeightItem;
214 4814 : mppLocalPoolDefaults[SDRATTR_ONEPOSITIONX -SDRATTR_START]=new SdrOnePositionXItem;
215 4814 : mppLocalPoolDefaults[SDRATTR_ONEPOSITIONY -SDRATTR_START]=new SdrOnePositionYItem;
216 4814 : mppLocalPoolDefaults[SDRATTR_ONESIZEWIDTH -SDRATTR_START]=new SdrOneSizeWidthItem;
217 4814 : mppLocalPoolDefaults[SDRATTR_ONESIZEHEIGHT -SDRATTR_START]=new SdrOneSizeHeightItem;
218 4814 : mppLocalPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem;
219 4814 : mppLocalPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem;
220 4814 : mppLocalPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_ROTATEANGLE, 0);
221 4814 : mppLocalPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new SdrShearAngleItem;
222 4814 : mppLocalPoolDefaults[SDRATTR_MOVEX -SDRATTR_START]=new SdrMoveXItem;
223 4814 : mppLocalPoolDefaults[SDRATTR_MOVEY -SDRATTR_START]=new SdrMoveYItem;
224 4814 : mppLocalPoolDefaults[SDRATTR_RESIZEXONE -SDRATTR_START]=new SdrResizeXOneItem;
225 4814 : mppLocalPoolDefaults[SDRATTR_RESIZEYONE -SDRATTR_START]=new SdrResizeYOneItem;
226 4814 : mppLocalPoolDefaults[SDRATTR_ROTATEONE -SDRATTR_START]=new SdrRotateOneItem;
227 4814 : mppLocalPoolDefaults[SDRATTR_HORZSHEARONE -SDRATTR_START]=new SdrHorzShearOneItem;
228 4814 : mppLocalPoolDefaults[SDRATTR_VERTSHEARONE -SDRATTR_START]=new SdrVertShearOneItem;
229 4814 : mppLocalPoolDefaults[SDRATTR_RESIZEXALL -SDRATTR_START]=new SdrResizeXAllItem;
230 4814 : mppLocalPoolDefaults[SDRATTR_RESIZEYALL -SDRATTR_START]=new SdrResizeYAllItem;
231 4814 : mppLocalPoolDefaults[SDRATTR_ROTATEALL -SDRATTR_START]=new SdrRotateAllItem;
232 4814 : mppLocalPoolDefaults[SDRATTR_HORZSHEARALL -SDRATTR_START]=new SdrHorzShearAllItem;
233 4814 : mppLocalPoolDefaults[SDRATTR_VERTSHEARALL -SDRATTR_START]=new SdrVertShearAllItem;
234 4814 : mppLocalPoolDefaults[SDRATTR_TRANSFORMREF1X -SDRATTR_START]=new SdrTransformRef1XItem;
235 4814 : mppLocalPoolDefaults[SDRATTR_TRANSFORMREF1Y -SDRATTR_START]=new SdrTransformRef1YItem;
236 4814 : mppLocalPoolDefaults[SDRATTR_TRANSFORMREF2X -SDRATTR_START]=new SdrTransformRef2XItem;
237 4814 : mppLocalPoolDefaults[SDRATTR_TRANSFORMREF2Y -SDRATTR_START]=new SdrTransformRef2YItem;
238 4814 : mppLocalPoolDefaults[SDRATTR_TEXTDIRECTION -SDRATTR_START]=new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB, SDRATTR_TEXTDIRECTION);
239 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFRED - SDRATTR_START] = new SdrGrafRedItem;
240 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFGREEN - SDRATTR_START] = new SdrGrafGreenItem;
241 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFBLUE - SDRATTR_START] = new SdrGrafBlueItem;
242 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFLUMINANCE - SDRATTR_START] = new SdrGrafLuminanceItem;
243 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFCONTRAST - SDRATTR_START] = new SdrGrafContrastItem;
244 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFGAMMA - SDRATTR_START] = new SdrGrafGamma100Item;
245 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFTRANSPARENCE - SDRATTR_START] = new SdrGrafTransparenceItem;
246 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFINVERT - SDRATTR_START] = new SdrGrafInvertItem;
247 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFMODE - SDRATTR_START] = new SdrGrafModeItem;
248 4814 : mppLocalPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem;
249 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, 10);
250 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, 100);
251 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000);
252 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24);
253 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24);
254 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, 3600);
255 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, false);
256 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem;
257 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, false);
258 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem;
259 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem;
260 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, false);
261 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR);
262 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION);
263 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR);
264 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, 15);
265 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem;
266 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem;
267 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, false);
268 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_NORMALS - SDRATTR_START ] = new Svx3DSmoothNormalsItem;
269 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_LIDS - SDRATTR_START ] = new Svx3DSmoothLidsItem;
270 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_CHARACTER_MODE - SDRATTR_START ] = new Svx3DCharacterModeItem;
271 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_FRONT - SDRATTR_START ] = new Svx3DCloseFrontItem;
272 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem;
273 4814 : mppLocalPoolDefaults[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY - SDRATTR_START ] = new Svx3DReducedLineGeometryItem;
274 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem;
275 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100);
276 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100);
277 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false);
278 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1);
279 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2);
280 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3);
281 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4);
282 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5);
283 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6);
284 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7);
285 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8);
286 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR);
287 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, true);
288 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, false);
289 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, false);
290 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_4 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, false);
291 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_5 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, false);
292 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, false);
293 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, false);
294 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, false);
295 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963));
296 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, basegfx::B3DVector(0.0,0.0,1.0));
297 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, basegfx::B3DVector(0.0,0.0,1.0));
298 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, basegfx::B3DVector(0.0,0.0,1.0));
299 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, basegfx::B3DVector(0.0,0.0,1.0));
300 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, basegfx::B3DVector(0.0,0.0,1.0));
301 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, basegfx::B3DVector(0.0,0.0,1.0));
302 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, basegfx::B3DVector(0.0,0.0,1.0));
303 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0);
304 4814 : mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem;
305 4814 : mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SdrCustomShapeEngineItem;
306 4814 : mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_DATA - SDRATTR_START ] = new SdrCustomShapeDataItem;
307 4814 : mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_GEOMETRY - SDRATTR_START ] = new SdrCustomShapeGeometryItem;
308 4814 : mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL - SDRATTR_START ] = new SdrCustomShapeReplacementURLItem;
309 :
310 4814 : SvxBoxItem* pboxItem = new SvxBoxItem( SDRATTR_TABLE_BORDER );
311 4814 : pboxItem->SetDistance( 100 );
312 4814 : mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER - SDRATTR_START ] = pboxItem;
313 :
314 4814 : SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER );
315 :
316 4814 : pBoxInfoItem->SetTable( true );
317 4814 : pBoxInfoItem->SetDist( true); // always show margin field
318 4814 : pBoxInfoItem->SetValid( SvxBoxInfoItemValidFlags::DISABLE, true ); // some lines may have DontCare state only in tables
319 :
320 4814 : mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem;
321 4814 : mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR );
322 4814 : mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR );
323 :
324 : // set own ItemInfos
325 4814 : mpLocalItemInfos[SDRATTR_SHADOW-SDRATTR_START]._nSID=SID_ATTR_FILL_SHADOW;
326 4814 : mpLocalItemInfos[SDRATTR_TEXT_FITTOSIZE-SDRATTR_START]._nSID=SID_ATTR_TEXT_FITTOSIZE;
327 4814 : mpLocalItemInfos[SDRATTR_GRAFCROP-SDRATTR_START]._nSID=SID_ATTR_GRAF_CROP;
328 :
329 4814 : mpLocalItemInfos[SDRATTR_TABLE_BORDER - SDRATTR_START ]._nSID = SID_ATTR_BORDER_OUTER;
330 4814 : mpLocalItemInfos[SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ]._nSID = SID_ATTR_BORDER_INNER;
331 4814 : mpLocalItemInfos[SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_TLBR;
332 4814 : mpLocalItemInfos[SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_BLTR;
333 :
334 : // it's my own creation level, set Defaults and ItemInfos
335 4814 : SetDefaults(mppLocalPoolDefaults);
336 4814 : SetItemInfos(mpLocalItemInfos);
337 4814 : }
338 :
339 : // copy ctor, so that static defaults are cloned
340 : // (Parameter 2 = sal_True)
341 0 : SdrItemPool::SdrItemPool(const SdrItemPool& rPool)
342 0 : : XOutdevItemPool(rPool)
343 : {
344 0 : }
345 :
346 0 : SfxItemPool* SdrItemPool::Clone() const
347 : {
348 0 : return new SdrItemPool(*this);
349 : }
350 :
351 14049 : SdrItemPool::~SdrItemPool()
352 : {
353 : // dtor of SfxItemPool
354 4683 : Delete();
355 :
356 : // clear own static Defaults
357 4683 : if(mppLocalPoolDefaults)
358 : {
359 4683 : const sal_uInt16 nBeg(SDRATTR_SHADOW_FIRST - SDRATTR_START);
360 4683 : const sal_uInt16 nEnd2(SDRATTR_END - SDRATTR_START);
361 :
362 889770 : for(sal_uInt16 i(nBeg); i <= nEnd2; i++)
363 : {
364 885087 : SetRefCount(*mppLocalPoolDefaults[i],0);
365 885087 : delete mppLocalPoolDefaults[i];
366 885087 : mppLocalPoolDefaults[i] = 0L;
367 : }
368 : }
369 :
370 : // split pools before destroying
371 4683 : SetSecondaryPool(NULL);
372 9366 : }
373 :
374 0 : bool SdrItemPool::GetPresentation(
375 : const SfxPoolItem& rItem,
376 : SfxMapUnit ePresentationMetric, OUString& rText,
377 : const IntlWrapper * pIntlWrapper) const
378 : {
379 0 : if (!IsInvalidItem(&rItem)) {
380 0 : sal_uInt16 nWhich=rItem.Which();
381 0 : if (nWhich>=SDRATTR_SHADOW_FIRST && nWhich<=SDRATTR_END) {
382 : rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS,
383 0 : GetMetric(nWhich),ePresentationMetric,rText,
384 0 : pIntlWrapper);
385 0 : OUString aStr;
386 :
387 0 : TakeItemName(nWhich, aStr);
388 0 : rText = aStr + " " + rText;
389 :
390 0 : return true;
391 : }
392 : }
393 0 : return XOutdevItemPool::GetPresentation(rItem,ePresentationMetric,rText,pIntlWrapper);
394 : }
395 :
396 0 : void SdrItemPool::TakeItemName(sal_uInt16 nWhich, OUString& rItemName)
397 : {
398 0 : ResMgr* pResMgr = ImpGetResMgr();
399 0 : sal_uInt16 nResId = SIP_UNKNOWN_ATTR;
400 :
401 0 : switch (nWhich)
402 : {
403 0 : case XATTR_LINESTYLE : nResId = SIP_XA_LINESTYLE;break;
404 0 : case XATTR_LINEDASH : nResId = SIP_XA_LINEDASH;break;
405 0 : case XATTR_LINEWIDTH : nResId = SIP_XA_LINEWIDTH;break;
406 0 : case XATTR_LINECOLOR : nResId = SIP_XA_LINECOLOR;break;
407 0 : case XATTR_LINESTART : nResId = SIP_XA_LINESTART;break;
408 0 : case XATTR_LINEEND : nResId = SIP_XA_LINEEND;break;
409 0 : case XATTR_LINESTARTWIDTH : nResId = SIP_XA_LINESTARTWIDTH;break;
410 0 : case XATTR_LINEENDWIDTH : nResId = SIP_XA_LINEENDWIDTH;break;
411 0 : case XATTR_LINESTARTCENTER : nResId = SIP_XA_LINESTARTCENTER;break;
412 0 : case XATTR_LINEENDCENTER : nResId = SIP_XA_LINEENDCENTER;break;
413 0 : case XATTR_LINETRANSPARENCE : nResId = SIP_XA_LINETRANSPARENCE;break;
414 0 : case XATTR_LINEJOINT : nResId = SIP_XA_LINEJOINT;break;
415 0 : case XATTRSET_LINE : nResId = SIP_XATTRSET_LINE;break;
416 :
417 0 : case XATTR_FILLSTYLE : nResId = SIP_XA_FILLSTYLE;break;
418 0 : case XATTR_FILLCOLOR : nResId = SIP_XA_FILLCOLOR;break;
419 0 : case XATTR_FILLGRADIENT : nResId = SIP_XA_FILLGRADIENT;break;
420 0 : case XATTR_FILLHATCH : nResId = SIP_XA_FILLHATCH;break;
421 0 : case XATTR_FILLBITMAP : nResId = SIP_XA_FILLBITMAP;break;
422 0 : case XATTR_FILLTRANSPARENCE : nResId = SIP_XA_FILLTRANSPARENCE;break;
423 0 : case XATTR_GRADIENTSTEPCOUNT : nResId = SIP_XA_GRADIENTSTEPCOUNT;break;
424 0 : case XATTR_FILLBMP_TILE : nResId = SIP_XA_FILLBMP_TILE;break;
425 0 : case XATTR_FILLBMP_POS : nResId = SIP_XA_FILLBMP_POS;break;
426 0 : case XATTR_FILLBMP_SIZEX : nResId = SIP_XA_FILLBMP_SIZEX;break;
427 0 : case XATTR_FILLBMP_SIZEY : nResId = SIP_XA_FILLBMP_SIZEY;break;
428 0 : case XATTR_FILLFLOATTRANSPARENCE: nResId = SIP_XA_FILLFLOATTRANSPARENCE;break;
429 0 : case XATTR_SECONDARYFILLCOLOR : nResId = SIP_XA_SECONDARYFILLCOLOR;break;
430 0 : case XATTR_FILLBMP_SIZELOG : nResId = SIP_XA_FILLBMP_SIZELOG;break;
431 0 : case XATTR_FILLBMP_TILEOFFSETX : nResId = SIP_XA_FILLBMP_TILEOFFSETX;break;
432 0 : case XATTR_FILLBMP_TILEOFFSETY : nResId = SIP_XA_FILLBMP_TILEOFFSETY;break;
433 0 : case XATTR_FILLBMP_STRETCH : nResId = SIP_XA_FILLBMP_STRETCH;break;
434 0 : case XATTR_FILLBMP_POSOFFSETX : nResId = SIP_XA_FILLBMP_POSOFFSETX;break;
435 0 : case XATTR_FILLBMP_POSOFFSETY : nResId = SIP_XA_FILLBMP_POSOFFSETY;break;
436 0 : case XATTR_FILLBACKGROUND : nResId = SIP_XA_FILLBACKGROUND;break;
437 :
438 0 : case XATTRSET_FILL : nResId = SIP_XATTRSET_FILL;break;
439 :
440 0 : case XATTR_FORMTXTSTYLE : nResId = SIP_XA_FORMTXTSTYLE;break;
441 0 : case XATTR_FORMTXTADJUST : nResId = SIP_XA_FORMTXTADJUST;break;
442 0 : case XATTR_FORMTXTDISTANCE : nResId = SIP_XA_FORMTXTDISTANCE;break;
443 0 : case XATTR_FORMTXTSTART : nResId = SIP_XA_FORMTXTSTART;break;
444 0 : case XATTR_FORMTXTMIRROR : nResId = SIP_XA_FORMTXTMIRROR;break;
445 0 : case XATTR_FORMTXTOUTLINE : nResId = SIP_XA_FORMTXTOUTLINE;break;
446 0 : case XATTR_FORMTXTSHADOW : nResId = SIP_XA_FORMTXTSHADOW;break;
447 0 : case XATTR_FORMTXTSHDWCOLOR : nResId = SIP_XA_FORMTXTSHDWCOLOR;break;
448 0 : case XATTR_FORMTXTSHDWXVAL : nResId = SIP_XA_FORMTXTSHDWXVAL;break;
449 0 : case XATTR_FORMTXTSHDWYVAL : nResId = SIP_XA_FORMTXTSHDWYVAL;break;
450 0 : case XATTR_FORMTXTHIDEFORM : nResId = SIP_XA_FORMTXTHIDEFORM;break;
451 0 : case XATTR_FORMTXTSHDWTRANSP: nResId = SIP_XA_FORMTXTSHDWTRANSP;break;
452 :
453 0 : case SDRATTR_SHADOW : nResId = SIP_SA_SHADOW;break;
454 0 : case SDRATTR_SHADOWCOLOR : nResId = SIP_SA_SHADOWCOLOR;break;
455 0 : case SDRATTR_SHADOWXDIST : nResId = SIP_SA_SHADOWXDIST;break;
456 0 : case SDRATTR_SHADOWYDIST : nResId = SIP_SA_SHADOWYDIST;break;
457 0 : case SDRATTR_SHADOWTRANSPARENCE: nResId = SIP_SA_SHADOWTRANSPARENCE;break;
458 0 : case SDRATTR_SHADOW3D : nResId = SIP_SA_SHADOW3D;break;
459 0 : case SDRATTR_SHADOWPERSP : nResId = SIP_SA_SHADOWPERSP;break;
460 :
461 0 : case SDRATTR_CAPTIONTYPE : nResId = SIP_SA_CAPTIONTYPE;break;
462 0 : case SDRATTR_CAPTIONFIXEDANGLE: nResId = SIP_SA_CAPTIONFIXEDANGLE;break;
463 0 : case SDRATTR_CAPTIONANGLE : nResId = SIP_SA_CAPTIONANGLE;break;
464 0 : case SDRATTR_CAPTIONGAP : nResId = SIP_SA_CAPTIONGAP;break;
465 0 : case SDRATTR_CAPTIONESCDIR : nResId = SIP_SA_CAPTIONESCDIR;break;
466 0 : case SDRATTR_CAPTIONESCISREL : nResId = SIP_SA_CAPTIONESCISREL;break;
467 0 : case SDRATTR_CAPTIONESCREL : nResId = SIP_SA_CAPTIONESCREL;break;
468 0 : case SDRATTR_CAPTIONESCABS : nResId = SIP_SA_CAPTIONESCABS;break;
469 0 : case SDRATTR_CAPTIONLINELEN : nResId = SIP_SA_CAPTIONLINELEN;break;
470 0 : case SDRATTR_CAPTIONFITLINELEN: nResId = SIP_SA_CAPTIONFITLINELEN;break;
471 :
472 0 : case SDRATTR_ECKENRADIUS : nResId = SIP_SA_ECKENRADIUS;break;
473 0 : case SDRATTR_TEXT_MINFRAMEHEIGHT : nResId = SIP_SA_TEXT_MINFRAMEHEIGHT;break;
474 0 : case SDRATTR_TEXT_AUTOGROWHEIGHT : nResId = SIP_SA_TEXT_AUTOGROWHEIGHT;break;
475 0 : case SDRATTR_TEXT_FITTOSIZE : nResId = SIP_SA_TEXT_FITTOSIZE;break;
476 0 : case SDRATTR_TEXT_LEFTDIST : nResId = SIP_SA_TEXT_LEFTDIST;break;
477 0 : case SDRATTR_TEXT_RIGHTDIST : nResId = SIP_SA_TEXT_RIGHTDIST;break;
478 0 : case SDRATTR_TEXT_UPPERDIST : nResId = SIP_SA_TEXT_UPPERDIST;break;
479 0 : case SDRATTR_TEXT_LOWERDIST : nResId = SIP_SA_TEXT_LOWERDIST;break;
480 0 : case SDRATTR_TEXT_VERTADJUST : nResId = SIP_SA_TEXT_VERTADJUST;break;
481 0 : case SDRATTR_TEXT_MAXFRAMEHEIGHT : nResId = SIP_SA_TEXT_MAXFRAMEHEIGHT;break;
482 0 : case SDRATTR_TEXT_MINFRAMEWIDTH : nResId = SIP_SA_TEXT_MINFRAMEWIDTH;break;
483 0 : case SDRATTR_TEXT_MAXFRAMEWIDTH : nResId = SIP_SA_TEXT_MAXFRAMEWIDTH;break;
484 0 : case SDRATTR_TEXT_AUTOGROWWIDTH : nResId = SIP_SA_TEXT_AUTOGROWWIDTH;break;
485 0 : case SDRATTR_TEXT_HORZADJUST : nResId = SIP_SA_TEXT_HORZADJUST;break;
486 0 : case SDRATTR_TEXT_ANIKIND : nResId = SIP_SA_TEXT_ANIKIND;break;
487 0 : case SDRATTR_TEXT_ANIDIRECTION : nResId = SIP_SA_TEXT_ANIDIRECTION;break;
488 0 : case SDRATTR_TEXT_ANISTARTINSIDE : nResId = SIP_SA_TEXT_ANISTARTINSIDE;break;
489 0 : case SDRATTR_TEXT_ANISTOPINSIDE : nResId = SIP_SA_TEXT_ANISTOPINSIDE;break;
490 0 : case SDRATTR_TEXT_ANICOUNT : nResId = SIP_SA_TEXT_ANICOUNT;break;
491 0 : case SDRATTR_TEXT_ANIDELAY : nResId = SIP_SA_TEXT_ANIDELAY;break;
492 0 : case SDRATTR_TEXT_ANIAMOUNT : nResId = SIP_SA_TEXT_ANIAMOUNT;break;
493 0 : case SDRATTR_TEXT_CONTOURFRAME : nResId = SIP_SA_TEXT_CONTOURFRAME;break;
494 0 : case SDRATTR_CUSTOMSHAPE_ADJUSTMENT : nResId = SIP_SA_CUSTOMSHAPE_ADJUSTMENT;break;
495 0 : case SDRATTR_XMLATTRIBUTES : nResId = SIP_SA_XMLATTRIBUTES;break;
496 0 : case SDRATTR_TEXT_USEFIXEDCELLHEIGHT: nResId = SIP_SA_TEXT_USEFIXEDCELLHEIGHT;break;
497 0 : case SDRATTR_TEXT_WORDWRAP : nResId = SIP_SA_WORDWRAP;break;
498 0 : case SDRATTR_TEXT_AUTOGROWSIZE : nResId = SIP_SA_AUTOGROWSIZE;break;
499 :
500 0 : case SDRATTR_EDGEKIND : nResId = SIP_SA_EDGEKIND;break;
501 0 : case SDRATTR_EDGENODE1HORZDIST : nResId = SIP_SA_EDGENODE1HORZDIST;break;
502 0 : case SDRATTR_EDGENODE1VERTDIST : nResId = SIP_SA_EDGENODE1VERTDIST;break;
503 0 : case SDRATTR_EDGENODE2HORZDIST : nResId = SIP_SA_EDGENODE2HORZDIST;break;
504 0 : case SDRATTR_EDGENODE2VERTDIST : nResId = SIP_SA_EDGENODE2VERTDIST;break;
505 0 : case SDRATTR_EDGENODE1GLUEDIST : nResId = SIP_SA_EDGENODE1GLUEDIST;break;
506 0 : case SDRATTR_EDGENODE2GLUEDIST : nResId = SIP_SA_EDGENODE2GLUEDIST;break;
507 0 : case SDRATTR_EDGELINEDELTAANZ : nResId = SIP_SA_EDGELINEDELTAANZ;break;
508 0 : case SDRATTR_EDGELINE1DELTA : nResId = SIP_SA_EDGELINE1DELTA;break;
509 0 : case SDRATTR_EDGELINE2DELTA : nResId = SIP_SA_EDGELINE2DELTA;break;
510 0 : case SDRATTR_EDGELINE3DELTA : nResId = SIP_SA_EDGELINE3DELTA;break;
511 :
512 0 : case SDRATTR_MEASUREKIND : nResId = SIP_SA_MEASUREKIND;break;
513 0 : case SDRATTR_MEASURETEXTHPOS : nResId = SIP_SA_MEASURETEXTHPOS;break;
514 0 : case SDRATTR_MEASURETEXTVPOS : nResId = SIP_SA_MEASURETEXTVPOS;break;
515 0 : case SDRATTR_MEASURELINEDIST : nResId = SIP_SA_MEASURELINEDIST;break;
516 0 : case SDRATTR_MEASUREHELPLINEOVERHANG : nResId = SIP_SA_MEASUREHELPLINEOVERHANG;break;
517 0 : case SDRATTR_MEASUREHELPLINEDIST : nResId = SIP_SA_MEASUREHELPLINEDIST;break;
518 0 : case SDRATTR_MEASUREHELPLINE1LEN : nResId = SIP_SA_MEASUREHELPLINE1LEN;break;
519 0 : case SDRATTR_MEASUREHELPLINE2LEN : nResId = SIP_SA_MEASUREHELPLINE2LEN;break;
520 0 : case SDRATTR_MEASUREBELOWREFEDGE : nResId = SIP_SA_MEASUREBELOWREFEDGE;break;
521 0 : case SDRATTR_MEASURETEXTROTA90 : nResId = SIP_SA_MEASURETEXTROTA90;break;
522 0 : case SDRATTR_MEASURETEXTUPSIDEDOWN : nResId = SIP_SA_MEASURETEXTUPSIDEDOWN;break;
523 0 : case SDRATTR_MEASUREOVERHANG : nResId = SIP_SA_MEASUREOVERHANG;break;
524 0 : case SDRATTR_MEASUREUNIT : nResId = SIP_SA_MEASUREUNIT;break;
525 0 : case SDRATTR_MEASURESCALE : nResId = SIP_SA_MEASURESCALE;break;
526 0 : case SDRATTR_MEASURESHOWUNIT : nResId = SIP_SA_MEASURESHOWUNIT;break;
527 0 : case SDRATTR_MEASUREFORMATSTRING : nResId = SIP_SA_MEASUREFORMATSTRING;break;
528 0 : case SDRATTR_MEASURETEXTAUTOANGLE : nResId = SIP_SA_MEASURETEXTAUTOANGLE;break;
529 0 : case SDRATTR_MEASURETEXTAUTOANGLEVIEW: nResId = SIP_SA_MEASURETEXTAUTOANGLEVIEW;break;
530 0 : case SDRATTR_MEASURETEXTISFIXEDANGLE : nResId = SIP_SA_MEASURETEXTISFIXEDANGLE;break;
531 0 : case SDRATTR_MEASURETEXTFIXEDANGLE : nResId = SIP_SA_MEASURETEXTFIXEDANGLE;break;
532 0 : case SDRATTR_MEASUREDECIMALPLACES : nResId = SIP_SA_MEASUREDECIMALPLACES;break;
533 :
534 0 : case SDRATTR_CIRCKIND : nResId = SIP_SA_CIRCKIND;break;
535 0 : case SDRATTR_CIRCSTARTANGLE: nResId = SIP_SA_CIRCSTARTANGLE;break;
536 0 : case SDRATTR_CIRCENDANGLE : nResId = SIP_SA_CIRCENDANGLE;break;
537 :
538 0 : case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break;
539 0 : case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break;
540 0 : case SDRATTR_OBJPRINTABLE : nResId = SIP_SA_OBJPRINTABLE;break;
541 0 : case SDRATTR_OBJVISIBLE : nResId = SIP_SA_OBJVISIBLE;break;
542 0 : case SDRATTR_LAYERID : nResId = SIP_SA_LAYERID;break;
543 0 : case SDRATTR_LAYERNAME : nResId = SIP_SA_LAYERNAME;break;
544 0 : case SDRATTR_OBJECTNAME : nResId = SIP_SA_OBJECTNAME;break;
545 0 : case SDRATTR_ALLPOSITIONX : nResId = SIP_SA_ALLPOSITIONX;break;
546 0 : case SDRATTR_ALLPOSITIONY : nResId = SIP_SA_ALLPOSITIONY;break;
547 0 : case SDRATTR_ALLSIZEWIDTH : nResId = SIP_SA_ALLSIZEWIDTH;break;
548 0 : case SDRATTR_ALLSIZEHEIGHT : nResId = SIP_SA_ALLSIZEHEIGHT;break;
549 0 : case SDRATTR_ONEPOSITIONX : nResId = SIP_SA_ONEPOSITIONX;break;
550 0 : case SDRATTR_ONEPOSITIONY : nResId = SIP_SA_ONEPOSITIONY;break;
551 0 : case SDRATTR_ONESIZEWIDTH : nResId = SIP_SA_ONESIZEWIDTH;break;
552 0 : case SDRATTR_ONESIZEHEIGHT : nResId = SIP_SA_ONESIZEHEIGHT;break;
553 0 : case SDRATTR_LOGICSIZEWIDTH : nResId = SIP_SA_LOGICSIZEWIDTH;break;
554 0 : case SDRATTR_LOGICSIZEHEIGHT: nResId = SIP_SA_LOGICSIZEHEIGHT;break;
555 0 : case SDRATTR_ROTATEANGLE : nResId = SIP_SA_ROTATEANGLE;break;
556 0 : case SDRATTR_SHEARANGLE : nResId = SIP_SA_SHEARANGLE;break;
557 0 : case SDRATTR_MOVEX : nResId = SIP_SA_MOVEX;break;
558 0 : case SDRATTR_MOVEY : nResId = SIP_SA_MOVEY;break;
559 0 : case SDRATTR_RESIZEXONE : nResId = SIP_SA_RESIZEXONE;break;
560 0 : case SDRATTR_RESIZEYONE : nResId = SIP_SA_RESIZEYONE;break;
561 0 : case SDRATTR_ROTATEONE : nResId = SIP_SA_ROTATEONE;break;
562 0 : case SDRATTR_HORZSHEARONE : nResId = SIP_SA_HORZSHEARONE;break;
563 0 : case SDRATTR_VERTSHEARONE : nResId = SIP_SA_VERTSHEARONE;break;
564 0 : case SDRATTR_RESIZEXALL : nResId = SIP_SA_RESIZEXALL;break;
565 0 : case SDRATTR_RESIZEYALL : nResId = SIP_SA_RESIZEYALL;break;
566 0 : case SDRATTR_ROTATEALL : nResId = SIP_SA_ROTATEALL;break;
567 0 : case SDRATTR_HORZSHEARALL : nResId = SIP_SA_HORZSHEARALL;break;
568 0 : case SDRATTR_VERTSHEARALL : nResId = SIP_SA_VERTSHEARALL;break;
569 0 : case SDRATTR_TRANSFORMREF1X : nResId = SIP_SA_TRANSFORMREF1X;break;
570 0 : case SDRATTR_TRANSFORMREF1Y : nResId = SIP_SA_TRANSFORMREF1Y;break;
571 0 : case SDRATTR_TRANSFORMREF2X : nResId = SIP_SA_TRANSFORMREF2X;break;
572 0 : case SDRATTR_TRANSFORMREF2Y : nResId = SIP_SA_TRANSFORMREF2Y;break;
573 :
574 0 : case SDRATTR_GRAFRED : nResId = SIP_SA_GRAFRED;break;
575 0 : case SDRATTR_GRAFGREEN : nResId = SIP_SA_GRAFGREEN;break;
576 0 : case SDRATTR_GRAFBLUE : nResId = SIP_SA_GRAFBLUE;break;
577 0 : case SDRATTR_GRAFLUMINANCE : nResId = SIP_SA_GRAFLUMINANCE;break;
578 0 : case SDRATTR_GRAFCONTRAST : nResId = SIP_SA_GRAFCONTRAST;break;
579 0 : case SDRATTR_GRAFGAMMA : nResId = SIP_SA_GRAFGAMMA;break;
580 0 : case SDRATTR_GRAFTRANSPARENCE : nResId = SIP_SA_GRAFTRANSPARENCE;break;
581 0 : case SDRATTR_GRAFINVERT : nResId = SIP_SA_GRAFINVERT;break;
582 0 : case SDRATTR_GRAFMODE : nResId = SIP_SA_GRAFMODE;break;
583 0 : case SDRATTR_GRAFCROP : nResId = SIP_SA_GRAFCROP;break;
584 :
585 0 : case EE_PARA_HYPHENATE : nResId = SIP_EE_PARA_HYPHENATE;break;
586 0 : case EE_PARA_BULLETSTATE: nResId = SIP_EE_PARA_BULLETSTATE;break;
587 0 : case EE_PARA_OUTLLRSPACE: nResId = SIP_EE_PARA_OUTLLRSPACE;break;
588 0 : case EE_PARA_OUTLLEVEL : nResId = SIP_EE_PARA_OUTLLEVEL;break;
589 0 : case EE_PARA_BULLET : nResId = SIP_EE_PARA_BULLET;break;
590 0 : case EE_PARA_LRSPACE : nResId = SIP_EE_PARA_LRSPACE;break;
591 0 : case EE_PARA_ULSPACE : nResId = SIP_EE_PARA_ULSPACE;break;
592 0 : case EE_PARA_SBL : nResId = SIP_EE_PARA_SBL;break;
593 0 : case EE_PARA_JUST : nResId = SIP_EE_PARA_JUST;break;
594 0 : case EE_PARA_TABS : nResId = SIP_EE_PARA_TABS;break;
595 :
596 0 : case EE_CHAR_COLOR : nResId = SIP_EE_CHAR_COLOR;break;
597 0 : case EE_CHAR_FONTINFO : nResId = SIP_EE_CHAR_FONTINFO;break;
598 0 : case EE_CHAR_FONTHEIGHT : nResId = SIP_EE_CHAR_FONTHEIGHT;break;
599 0 : case EE_CHAR_FONTWIDTH : nResId = SIP_EE_CHAR_FONTWIDTH;break;
600 0 : case EE_CHAR_WEIGHT : nResId = SIP_EE_CHAR_WEIGHT;break;
601 0 : case EE_CHAR_UNDERLINE : nResId = SIP_EE_CHAR_UNDERLINE;break;
602 0 : case EE_CHAR_OVERLINE : nResId = SIP_EE_CHAR_OVERLINE;break;
603 0 : case EE_CHAR_STRIKEOUT : nResId = SIP_EE_CHAR_STRIKEOUT;break;
604 0 : case EE_CHAR_ITALIC : nResId = SIP_EE_CHAR_ITALIC;break;
605 0 : case EE_CHAR_OUTLINE : nResId = SIP_EE_CHAR_OUTLINE;break;
606 0 : case EE_CHAR_SHADOW : nResId = SIP_EE_CHAR_SHADOW;break;
607 0 : case EE_CHAR_ESCAPEMENT : nResId = SIP_EE_CHAR_ESCAPEMENT;break;
608 0 : case EE_CHAR_PAIRKERNING: nResId = SIP_EE_CHAR_PAIRKERNING;break;
609 0 : case EE_CHAR_KERNING : nResId = SIP_EE_CHAR_KERNING;break;
610 0 : case EE_CHAR_WLM : nResId = SIP_EE_CHAR_WLM;break;
611 0 : case EE_FEATURE_TAB : nResId = SIP_EE_FEATURE_TAB;break;
612 0 : case EE_FEATURE_LINEBR : nResId = SIP_EE_FEATURE_LINEBR;break;
613 0 : case EE_FEATURE_NOTCONV : nResId = SIP_EE_FEATURE_NOTCONV;break;
614 0 : case EE_FEATURE_FIELD : nResId = SIP_EE_FEATURE_FIELD;break;
615 : } // switch
616 :
617 0 : rItemName = ResId( nResId, *pResMgr );
618 0 : }
619 :
620 :
621 : // FractionItem
622 :
623 :
624 65562 : TYPEINIT1_AUTOFACTORY(SdrFractionItem,SfxPoolItem);
625 :
626 0 : SdrFractionItem::SdrFractionItem(sal_uInt16 nId, SvStream& rIn):
627 0 : SfxPoolItem(nId)
628 : {
629 : sal_Int32 nMul,nDiv;
630 0 : rIn.ReadInt32( nMul );
631 0 : rIn.ReadInt32( nDiv );
632 0 : nValue=Fraction(nMul,nDiv);
633 0 : }
634 :
635 0 : bool SdrFractionItem::operator==(const SfxPoolItem& rCmp) const
636 : {
637 0 : return SfxPoolItem::operator==(rCmp) &&
638 0 : static_cast<const SdrFractionItem&>(rCmp).GetValue()==nValue;
639 : }
640 :
641 0 : bool SdrFractionItem::GetPresentation(
642 : SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/,
643 : SfxMapUnit /*ePresentationMetric*/, OUString &rText, const IntlWrapper *) const
644 : {
645 0 : if(nValue.IsValid())
646 : {
647 0 : sal_Int32 nDiv = nValue.GetDenominator();
648 0 : rText = OUString::number(nValue.GetNumerator());
649 :
650 0 : if(nDiv != 1)
651 : {
652 0 : rText = rText + "/" + OUString::number(nDiv);
653 : }
654 : }
655 : else
656 : {
657 0 : rText = "?";
658 : }
659 :
660 0 : if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
661 : {
662 0 : OUString aStr;
663 :
664 0 : SdrItemPool::TakeItemName(Which(), aStr);
665 0 : rText = aStr + " " + rText;
666 0 : return true;
667 : }
668 0 : else if(ePresentation == SFX_ITEM_PRESENTATION_NAMELESS)
669 0 : return true;
670 :
671 0 : return false;
672 : }
673 :
674 0 : SfxPoolItem* SdrFractionItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
675 : {
676 0 : return new SdrFractionItem(Which(),rIn);
677 : }
678 :
679 0 : SvStream& SdrFractionItem::Store(SvStream& rOut, sal_uInt16 /*nItemVers*/) const
680 : {
681 0 : rOut.WriteInt32( nValue.GetNumerator() );
682 0 : rOut.WriteInt32( nValue.GetDenominator() );
683 0 : return rOut;
684 : }
685 :
686 0 : SfxPoolItem* SdrFractionItem::Clone(SfxItemPool * /*pPool*/) const
687 : {
688 0 : return new SdrFractionItem(Which(),GetValue());
689 : }
690 :
691 :
692 : // ScaleItem
693 :
694 :
695 14049 : TYPEINIT1_AUTOFACTORY(SdrScaleItem,SdrFractionItem);
696 :
697 0 : bool SdrScaleItem::GetPresentation(
698 : SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/,
699 : SfxMapUnit /*ePresentationMetric*/, OUString &rText, const IntlWrapper *) const
700 : {
701 0 : if(GetValue().IsValid())
702 : {
703 0 : sal_Int32 nDiv = GetValue().GetDenominator();
704 :
705 0 : rText = OUString::number(GetValue().GetNumerator()) + ":" + OUString::number(nDiv);
706 : }
707 : else
708 : {
709 0 : rText = "?";
710 : }
711 :
712 0 : if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
713 : {
714 0 : OUString aStr;
715 :
716 0 : SdrItemPool::TakeItemName(Which(), aStr);
717 0 : rText = aStr + " " + rText;
718 : }
719 :
720 0 : return true;
721 : }
722 :
723 0 : SfxPoolItem* SdrScaleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
724 : {
725 0 : return new SdrScaleItem(Which(),rIn);
726 : }
727 :
728 0 : SfxPoolItem* SdrScaleItem::Clone(SfxItemPool * /*pPool*/) const
729 : {
730 0 : return new SdrScaleItem(Which(),GetValue());
731 : }
732 :
733 :
734 : // OnOffItem
735 :
736 :
737 409615 : TYPEINIT1_AUTOFACTORY(SdrOnOffItem,SfxBoolItem);
738 :
739 99650 : SfxPoolItem* SdrOnOffItem::Clone(SfxItemPool* /*pPool*/) const
740 : {
741 99650 : return new SdrOnOffItem(Which(),GetValue());
742 : }
743 :
744 0 : SfxPoolItem* SdrOnOffItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
745 : {
746 0 : return new SdrOnOffItem(Which(),rIn);
747 : }
748 :
749 0 : OUString SdrOnOffItem::GetValueTextByVal(bool bVal) const
750 : {
751 0 : if (bVal)
752 0 : return ImpGetResStr(STR_ItemValON);
753 0 : return ImpGetResStr(STR_ItemValOFF);
754 : }
755 :
756 0 : bool SdrOnOffItem::GetPresentation(SfxItemPresentation ePres,
757 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
758 : {
759 0 : rText=GetValueTextByVal(GetValue());
760 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
761 0 : OUString aStr;
762 :
763 0 : SdrItemPool::TakeItemName(Which(), aStr);
764 0 : rText = aStr + " " + rText;
765 : }
766 0 : return true;
767 : }
768 :
769 197540 : TYPEINIT1_AUTOFACTORY(SdrYesNoItem,SfxBoolItem);
770 :
771 1194 : SfxPoolItem* SdrYesNoItem::Clone(SfxItemPool* /*pPool*/) const
772 : {
773 1194 : return new SdrYesNoItem(Which(),GetValue());
774 : }
775 :
776 0 : SfxPoolItem* SdrYesNoItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
777 : {
778 0 : return new SdrYesNoItem(Which(),rIn);
779 : }
780 :
781 0 : OUString SdrYesNoItem::GetValueTextByVal(bool bVal) const
782 : {
783 0 : if (bVal)
784 0 : return ImpGetResStr(STR_ItemValYES);
785 0 : return ImpGetResStr(STR_ItemValNO);
786 : }
787 :
788 0 : bool SdrYesNoItem::GetPresentation(SfxItemPresentation ePres,
789 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
790 : {
791 0 : rText=GetValueTextByVal(GetValue());
792 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
793 0 : OUString aStr;
794 :
795 0 : SdrItemPool::TakeItemName(Which(), aStr);
796 0 : rText = aStr + " " + rText;
797 : }
798 0 : return true;
799 : }
800 :
801 :
802 : // class SdrPercentItem
803 :
804 :
805 25038 : TYPEINIT1_AUTOFACTORY(SdrPercentItem,SfxUInt16Item);
806 :
807 586 : SfxPoolItem* SdrPercentItem::Clone(SfxItemPool* /*pPool*/) const
808 : {
809 586 : return new SdrPercentItem(Which(),GetValue());
810 : }
811 :
812 0 : SfxPoolItem* SdrPercentItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
813 : {
814 0 : return new SdrPercentItem(Which(),rIn);
815 : }
816 :
817 0 : bool SdrPercentItem::GetPresentation(
818 : SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/,
819 : SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
820 : {
821 0 : rText = unicode::formatPercent(GetValue(),
822 0 : Application::GetSettings().GetUILanguageTag());
823 :
824 0 : if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
825 : {
826 0 : OUString aStr;
827 :
828 0 : SdrItemPool::TakeItemName(Which(), aStr);
829 0 : rText = aStr + " " + rText;
830 : }
831 :
832 0 : return true;
833 : }
834 :
835 :
836 : // class SdrAngleItem
837 :
838 :
839 183368 : TYPEINIT1_AUTOFACTORY(SdrAngleItem,SfxInt32Item);
840 :
841 434 : SfxPoolItem* SdrAngleItem::Clone(SfxItemPool* /*pPool*/) const
842 : {
843 434 : return new SdrAngleItem(Which(),GetValue());
844 : }
845 :
846 0 : SfxPoolItem* SdrAngleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
847 : {
848 0 : return new SdrAngleItem(Which(),rIn);
849 : }
850 :
851 0 : bool SdrAngleItem::GetPresentation(
852 : SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
853 : OUString& rText, const IntlWrapper * pIntlWrapper) const
854 : {
855 0 : sal_Int32 nValue(GetValue());
856 0 : bool bNeg(nValue < 0);
857 :
858 0 : if(bNeg)
859 0 : nValue = -nValue;
860 :
861 0 : OUStringBuffer aText = OUString::number(nValue);
862 :
863 0 : if(nValue)
864 : {
865 0 : sal_Unicode aUnicodeNull('0');
866 0 : sal_Int32 nCount(2);
867 :
868 0 : const IntlWrapper* pMyIntlWrapper = NULL;
869 0 : if(!pIntlWrapper)
870 : pIntlWrapper = pMyIntlWrapper = new IntlWrapper(
871 0 : Application::GetSettings().GetLanguageTag() );
872 :
873 0 : if(LocaleDataWrapper::isNumLeadingZero())
874 0 : nCount++;
875 :
876 0 : while(aText.getLength() < nCount)
877 0 : aText.insert(0, aUnicodeNull);
878 :
879 0 : sal_Int32 nLen = aText.getLength();
880 0 : bool bNull1(aText[nLen-1] == aUnicodeNull);
881 0 : bool bNull2(bNull1 && aText[nLen-2] == aUnicodeNull);
882 :
883 0 : if(bNull2)
884 : {
885 : // no decimal place(s)
886 0 : sal_Int32 idx = nLen-2;
887 0 : aText.remove(idx, aText.getLength()-idx);
888 : }
889 : else
890 : {
891 : sal_Unicode cDec =
892 0 : pIntlWrapper->getLocaleData()->getNumDecimalSep()[0];
893 0 : aText.insert(nLen-2, cDec);
894 :
895 0 : if(bNull1)
896 0 : aText.remove(nLen, aText.getLength()-nLen);
897 : }
898 :
899 0 : if(bNeg)
900 0 : aText.insert(0, '-');
901 :
902 0 : if ( pMyIntlWrapper )
903 : {
904 0 : delete pMyIntlWrapper;
905 0 : pIntlWrapper = NULL;
906 : }
907 : }
908 :
909 0 : aText.insert(aText.getLength(), sal_Unicode(DEGREE_CHAR));
910 :
911 0 : if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
912 : {
913 0 : OUString aStr;
914 :
915 0 : SdrItemPool::TakeItemName(Which(), aStr);
916 0 : aText.insert(0, ' ');
917 0 : aText.insert(0, aStr);
918 : }
919 :
920 0 : rText = aText.makeStringAndClear();
921 0 : return true;
922 : }
923 :
924 :
925 : // class SdrMetricItem
926 :
927 :
928 972171 : TYPEINIT1_AUTOFACTORY(SdrMetricItem,SfxInt32Item);
929 :
930 136370 : SfxPoolItem* SdrMetricItem::Clone(SfxItemPool* /*pPool*/) const
931 : {
932 136370 : return new SdrMetricItem(Which(),GetValue());
933 : }
934 :
935 0 : SfxPoolItem* SdrMetricItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
936 : {
937 0 : return new SdrMetricItem(Which(),rIn);
938 : }
939 :
940 0 : bool SdrMetricItem::HasMetrics() const
941 : {
942 0 : return true;
943 : }
944 :
945 0 : bool SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
946 : {
947 0 : if (GetValue()!=0) {
948 0 : BigInt aVal(GetValue());
949 0 : aVal*=nMul;
950 0 : aVal+=nDiv/2; // to round accurately
951 0 : aVal/=nDiv;
952 0 : SetValue(long(aVal));
953 : }
954 0 : return true;
955 : }
956 :
957 0 : bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
958 : SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, OUString& rText, const IntlWrapper *) const
959 : {
960 0 : long nValue=GetValue();
961 0 : SdrFormatter aFmt((MapUnit)eCoreMetric,(MapUnit)ePresMetric);
962 0 : aFmt.TakeStr(nValue,rText);
963 0 : OUString aStr;
964 0 : SdrFormatter::TakeUnitStr((MapUnit)ePresMetric,aStr);
965 0 : rText += " " + aStr;
966 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
967 0 : OUString aStr2;
968 :
969 0 : SdrItemPool::TakeItemName(Which(), aStr2);
970 0 : rText = aStr2 + " " + rText;
971 : }
972 0 : return true;
973 : }
974 :
975 :
976 : // items of the legend object
977 :
978 :
979 14049 : TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem,SfxEnumItem);
980 :
981 0 : SfxPoolItem* SdrCaptionTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCaptionTypeItem(*this); }
982 :
983 0 : SfxPoolItem* SdrCaptionTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrCaptionTypeItem(rIn); }
984 :
985 0 : sal_uInt16 SdrCaptionTypeItem::GetValueCount() const { return 4; }
986 :
987 0 : OUString SdrCaptionTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
988 : {
989 0 : return ImpGetResStr(STR_ItemValCAPTIONTYPE1+nPos);
990 : }
991 :
992 0 : bool SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres,
993 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
994 : {
995 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
996 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
997 0 : OUString aStr;
998 :
999 0 : SdrItemPool::TakeItemName(Which(), aStr);
1000 0 : rText = aStr + " " + rText;
1001 : }
1002 0 : return true;
1003 : }
1004 :
1005 14167 : TYPEINIT1_AUTOFACTORY(SdrCaptionEscDirItem,SfxEnumItem);
1006 :
1007 45 : SfxPoolItem* SdrCaptionEscDirItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCaptionEscDirItem(*this); }
1008 :
1009 0 : SfxPoolItem* SdrCaptionEscDirItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrCaptionEscDirItem(rIn); }
1010 :
1011 0 : sal_uInt16 SdrCaptionEscDirItem::GetValueCount() const { return 3; }
1012 :
1013 0 : OUString SdrCaptionEscDirItem::GetValueTextByPos(sal_uInt16 nPos) const
1014 : {
1015 0 : return ImpGetResStr(STR_ItemValCAPTIONESCHORI+nPos);
1016 : }
1017 :
1018 0 : bool SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres,
1019 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1020 : {
1021 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1022 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1023 0 : OUString aStr;
1024 :
1025 0 : SdrItemPool::TakeItemName(Which(), aStr);
1026 0 : rText = aStr + " " + rText;
1027 : }
1028 0 : return true;
1029 : }
1030 :
1031 :
1032 : // MiscItems
1033 :
1034 :
1035 : // FitToSize
1036 23032 : TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxEnumItem);
1037 :
1038 2048 : SfxPoolItem* SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); }
1039 :
1040 0 : SfxPoolItem* SdrTextFitToSizeTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); }
1041 :
1042 0 : sal_uInt16 SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
1043 :
1044 0 : OUString SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
1045 : {
1046 0 : return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos);
1047 : }
1048 :
1049 0 : bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
1050 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1051 : {
1052 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1053 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1054 0 : OUString aStr;
1055 :
1056 0 : SdrItemPool::TakeItemName(Which(), aStr);
1057 0 : rText = aStr + " " + rText;
1058 : }
1059 0 : return true;
1060 : }
1061 :
1062 0 : bool SdrTextFitToSizeTypeItem::HasBoolValue() const { return true; }
1063 :
1064 0 : bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; }
1065 :
1066 0 : void SdrTextFitToSizeTypeItem::SetBoolValue(bool bVal)
1067 : {
1068 0 : SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE));
1069 0 : }
1070 :
1071 272 : bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1072 : {
1073 272 : drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue();
1074 272 : rVal <<= eFS;
1075 :
1076 272 : return true;
1077 : }
1078 :
1079 1164 : bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1080 : {
1081 : drawing::TextFitToSizeType eFS;
1082 1164 : if(!(rVal >>= eFS))
1083 : {
1084 3 : sal_Int32 nEnum = 0;
1085 3 : if(!(rVal >>= nEnum))
1086 3 : return false;
1087 :
1088 0 : eFS = (drawing::TextFitToSizeType) nEnum;
1089 : }
1090 :
1091 1161 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrFitToSizeType)eFS ) );
1092 :
1093 1161 : return true;
1094 : }
1095 :
1096 175662 : TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem);
1097 :
1098 39982 : SfxPoolItem* SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); }
1099 :
1100 0 : SfxPoolItem* SdrTextVertAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextVertAdjustItem(rIn); }
1101 :
1102 0 : sal_uInt16 SdrTextVertAdjustItem::GetValueCount() const { return 5; }
1103 :
1104 0 : OUString SdrTextVertAdjustItem::GetValueTextByPos(sal_uInt16 nPos) const
1105 : {
1106 0 : return ImpGetResStr(STR_ItemValTEXTVADJTOP+nPos);
1107 : }
1108 :
1109 0 : bool SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres,
1110 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1111 : {
1112 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1113 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1114 0 : OUString aStr;
1115 :
1116 0 : SdrItemPool::TakeItemName(Which(), aStr);
1117 0 : rText = aStr + " " + rText;
1118 : }
1119 0 : return true;
1120 : }
1121 :
1122 2674 : bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1123 : {
1124 2674 : rVal <<= (drawing::TextVerticalAdjust)GetValue();
1125 2674 : return true;
1126 : }
1127 :
1128 25252 : bool SdrTextVertAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1129 : {
1130 : drawing::TextVerticalAdjust eAdj;
1131 25252 : if(!(rVal >>= eAdj))
1132 : {
1133 3 : sal_Int32 nEnum = 0;
1134 3 : if(!(rVal >>= nEnum))
1135 0 : return false;
1136 :
1137 3 : eAdj = (drawing::TextVerticalAdjust)nEnum;
1138 : }
1139 :
1140 25252 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextVertAdjust)eAdj ) );
1141 :
1142 25252 : return true;
1143 : }
1144 :
1145 152002 : TYPEINIT1_AUTOFACTORY(SdrTextHorzAdjustItem,SfxEnumItem);
1146 :
1147 53935 : SfxPoolItem* SdrTextHorzAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextHorzAdjustItem(*this); }
1148 :
1149 0 : SfxPoolItem* SdrTextHorzAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextHorzAdjustItem(rIn); }
1150 :
1151 0 : sal_uInt16 SdrTextHorzAdjustItem::GetValueCount() const { return 5; }
1152 :
1153 0 : OUString SdrTextHorzAdjustItem::GetValueTextByPos(sal_uInt16 nPos) const
1154 : {
1155 0 : return ImpGetResStr(STR_ItemValTEXTHADJLEFT+nPos);
1156 : }
1157 :
1158 0 : bool SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres,
1159 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1160 : {
1161 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1162 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1163 0 : OUString aStr;
1164 :
1165 0 : SdrItemPool::TakeItemName(Which(), aStr);
1166 0 : rText = aStr + " " + rText;
1167 : }
1168 0 : return true;
1169 : }
1170 :
1171 2007 : bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1172 : {
1173 2007 : rVal <<= (drawing::TextHorizontalAdjust)GetValue();
1174 2007 : return true;
1175 : }
1176 :
1177 22368 : bool SdrTextHorzAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1178 : {
1179 : drawing::TextHorizontalAdjust eAdj;
1180 22368 : if(!(rVal >>= eAdj))
1181 : {
1182 399 : sal_Int32 nEnum = 0;
1183 399 : if(!(rVal >>= nEnum))
1184 0 : return false;
1185 :
1186 399 : eAdj = (drawing::TextHorizontalAdjust)nEnum;
1187 : }
1188 :
1189 22368 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextHorzAdjust)eAdj ) );
1190 :
1191 22368 : return true;
1192 : }
1193 :
1194 14309 : TYPEINIT1_AUTOFACTORY(SdrTextAniKindItem,SfxEnumItem);
1195 :
1196 301 : SfxPoolItem* SdrTextAniKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniKindItem(*this); }
1197 :
1198 0 : SfxPoolItem* SdrTextAniKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextAniKindItem(rIn); }
1199 :
1200 0 : sal_uInt16 SdrTextAniKindItem::GetValueCount() const { return 5; }
1201 :
1202 0 : OUString SdrTextAniKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1203 : {
1204 0 : return ImpGetResStr(STR_ItemValTEXTANI_NONE+nPos);
1205 : }
1206 :
1207 0 : bool SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres,
1208 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1209 : {
1210 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1211 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1212 0 : OUString aStr;
1213 :
1214 0 : SdrItemPool::TakeItemName(Which(), aStr);
1215 0 : rText = aStr + " " + rText;
1216 : }
1217 0 : return true;
1218 : }
1219 :
1220 260 : bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1221 : {
1222 260 : rVal <<= (drawing::TextAnimationKind)GetValue();
1223 260 : return true;
1224 : }
1225 :
1226 0 : bool SdrTextAniKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1227 : {
1228 : drawing::TextAnimationKind eKind;
1229 0 : if(!(rVal >>= eKind))
1230 : {
1231 0 : sal_Int32 nEnum = 0;
1232 0 : if(!(rVal >>= nEnum))
1233 0 : return false;
1234 0 : eKind = (drawing::TextAnimationKind)nEnum;
1235 : }
1236 :
1237 0 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextAniKind)eKind ) );
1238 :
1239 0 : return true;
1240 : }
1241 :
1242 14309 : TYPEINIT1_AUTOFACTORY(SdrTextAniDirectionItem,SfxEnumItem);
1243 :
1244 292 : SfxPoolItem* SdrTextAniDirectionItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniDirectionItem(*this); }
1245 :
1246 0 : SfxPoolItem* SdrTextAniDirectionItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextAniDirectionItem(rIn); }
1247 :
1248 0 : sal_uInt16 SdrTextAniDirectionItem::GetValueCount() const { return 4; }
1249 :
1250 0 : OUString SdrTextAniDirectionItem::GetValueTextByPos(sal_uInt16 nPos) const
1251 : {
1252 0 : return ImpGetResStr(STR_ItemValTEXTANI_LEFT+nPos);
1253 : }
1254 :
1255 0 : bool SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres,
1256 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1257 : {
1258 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1259 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1260 0 : OUString aStr;
1261 :
1262 0 : SdrItemPool::TakeItemName(Which(), aStr);
1263 0 : rText = aStr + " " + rText;
1264 : }
1265 0 : return true;
1266 : }
1267 :
1268 260 : bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1269 : {
1270 260 : rVal <<= (drawing::TextAnimationDirection)GetValue();
1271 260 : return true;
1272 : }
1273 :
1274 0 : bool SdrTextAniDirectionItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1275 : {
1276 : drawing::TextAnimationDirection eDir;
1277 0 : if(!(rVal >>= eDir))
1278 : {
1279 0 : sal_Int32 nEnum = 0;
1280 0 : if(!(rVal >>= nEnum))
1281 0 : return false;
1282 :
1283 0 : eDir = (drawing::TextAnimationDirection)nEnum;
1284 : }
1285 :
1286 0 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextAniDirection)eDir ) );
1287 :
1288 0 : return true;
1289 : }
1290 :
1291 14309 : TYPEINIT1_AUTOFACTORY(SdrTextAniDelayItem,SfxUInt16Item);
1292 :
1293 292 : SfxPoolItem* SdrTextAniDelayItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniDelayItem(*this); }
1294 :
1295 0 : SfxPoolItem* SdrTextAniDelayItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextAniDelayItem(rIn); }
1296 :
1297 0 : bool SdrTextAniDelayItem::GetPresentation(
1298 : SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
1299 : OUString& rText, const IntlWrapper *) const
1300 : {
1301 0 : rText = OUString::number(GetValue()) + "ms";
1302 :
1303 0 : if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
1304 : {
1305 0 : OUString aStr;
1306 :
1307 0 : SdrItemPool::TakeItemName(Which(), aStr);
1308 0 : rText = aStr + " " + rText;
1309 : }
1310 :
1311 0 : return true;
1312 : }
1313 :
1314 14309 : TYPEINIT1_AUTOFACTORY(SdrTextAniAmountItem,SfxInt16Item);
1315 :
1316 292 : SfxPoolItem* SdrTextAniAmountItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniAmountItem(*this); }
1317 :
1318 0 : SfxPoolItem* SdrTextAniAmountItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextAniAmountItem(rIn); }
1319 :
1320 0 : bool SdrTextAniAmountItem::HasMetrics() const
1321 : {
1322 0 : return GetValue()>0;
1323 : }
1324 :
1325 0 : bool SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
1326 : {
1327 0 : if (GetValue()>0) {
1328 0 : BigInt aVal(GetValue());
1329 0 : aVal*=nMul;
1330 0 : aVal+=nDiv/2; // to round accurately
1331 0 : aVal/=nDiv;
1332 0 : SetValue(short(aVal));
1333 0 : return true;
1334 0 : } else return false;
1335 : }
1336 :
1337 0 : bool SdrTextAniAmountItem::GetPresentation(
1338 : SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
1339 : OUString& rText, const IntlWrapper *) const
1340 : {
1341 0 : sal_Int32 nValue(GetValue());
1342 :
1343 0 : if(!nValue)
1344 0 : nValue = -1L;
1345 :
1346 0 : if(nValue < 0)
1347 : {
1348 0 : rText = OUString::number(-nValue) + "pixel";
1349 : }
1350 : else
1351 : {
1352 0 : SdrFormatter aFmt((MapUnit)eCoreMetric, (MapUnit)ePresMetric);
1353 0 : OUString aStr;
1354 :
1355 0 : aFmt.TakeStr(nValue, rText);
1356 0 : SdrFormatter::TakeUnitStr((MapUnit)ePresMetric, aStr);
1357 0 : rText += aStr;
1358 : }
1359 :
1360 0 : if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
1361 : {
1362 0 : OUString aStr;
1363 :
1364 0 : SdrItemPool::TakeItemName(Which(), aStr);
1365 0 : rText = aStr + " " + rText;
1366 : }
1367 :
1368 0 : return true;
1369 : }
1370 :
1371 17790 : TYPEINIT1_AUTOFACTORY( SdrTextFixedCellHeightItem, SfxBoolItem );
1372 9937 : SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( bool bUseFixedCellHeight )
1373 9937 : : SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT, bUseFixedCellHeight )
1374 : {
1375 9937 : }
1376 0 : SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion )
1377 0 : : SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT, false )
1378 : {
1379 0 : if ( nVersion )
1380 : {
1381 : bool bValue;
1382 0 : rStream.ReadCharAsBool( bValue );
1383 0 : SetValue( bValue );
1384 : }
1385 0 : }
1386 0 : bool SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres,
1387 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/,
1388 : OUString &rText, const IntlWrapper * ) const
1389 : {
1390 0 : rText = GetValueTextByVal( GetValue() );
1391 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE)
1392 : {
1393 0 : OUString aStr;
1394 0 : SdrItemPool::TakeItemName(Which(), aStr);
1395 0 : rText = aStr + " " + rText;
1396 : }
1397 0 : return true;
1398 : }
1399 0 : SfxPoolItem* SdrTextFixedCellHeightItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
1400 : {
1401 0 : return new SdrTextFixedCellHeightItem( rIn, nItemVersion );
1402 : }
1403 0 : SvStream& SdrTextFixedCellHeightItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
1404 : {
1405 0 : if ( nItemVersion )
1406 : {
1407 0 : bool bValue = GetValue();
1408 0 : rOut.WriteBool( bValue );
1409 : }
1410 0 : return rOut;
1411 : }
1412 2770 : SfxPoolItem* SdrTextFixedCellHeightItem::Clone( SfxItemPool * /*pPool*/) const
1413 : {
1414 2770 : return new SdrTextFixedCellHeightItem( GetValue() );
1415 : }
1416 0 : sal_uInt16 SdrTextFixedCellHeightItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
1417 : {
1418 0 : return 1;
1419 : }
1420 880 : bool SdrTextFixedCellHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1421 : {
1422 880 : bool bValue = GetValue();
1423 880 : rVal <<= bValue;
1424 880 : return true;
1425 : }
1426 950 : bool SdrTextFixedCellHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1427 : {
1428 : bool bValue;
1429 950 : if( !( rVal >>= bValue ) )
1430 0 : return false;
1431 950 : SetValue( bValue );
1432 950 : return true;
1433 : }
1434 :
1435 14049 : TYPEINIT1_AUTOFACTORY( SdrCustomShapeAdjustmentItem, SfxPoolItem );
1436 :
1437 4846 : SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem() : SfxPoolItem( SDRATTR_CUSTOMSHAPE_ADJUSTMENT )
1438 : {
1439 4846 : }
1440 :
1441 0 : SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion ):
1442 0 : SfxPoolItem( SDRATTR_CUSTOMSHAPE_ADJUSTMENT )
1443 : {
1444 0 : if ( nVersion )
1445 : {
1446 : SdrCustomShapeAdjustmentValue aVal;
1447 : sal_uInt32 i, nCount;
1448 0 : rIn.ReadUInt32( nCount );
1449 0 : for ( i = 0; i < nCount; i++ )
1450 : {
1451 0 : rIn.ReadUInt32( aVal.nValue );
1452 0 : SetValue( i, aVal );
1453 : }
1454 : }
1455 0 : }
1456 :
1457 9430 : SdrCustomShapeAdjustmentItem::~SdrCustomShapeAdjustmentItem()
1458 : {
1459 9430 : }
1460 :
1461 0 : bool SdrCustomShapeAdjustmentItem::operator==( const SfxPoolItem& rCmp ) const
1462 : {
1463 0 : bool bRet = SfxPoolItem::operator==( rCmp );
1464 0 : if ( bRet )
1465 : {
1466 0 : bRet = GetCount() == static_cast<const SdrCustomShapeAdjustmentItem&>(rCmp).GetCount();
1467 :
1468 0 : if (bRet)
1469 : {
1470 0 : for (sal_uInt32 i = 0; i < GetCount(); ++i)
1471 0 : if (aAdjustmentValueList[i].nValue != static_cast<const SdrCustomShapeAdjustmentItem&>(rCmp).aAdjustmentValueList[i].nValue)
1472 0 : return false;
1473 : }
1474 : }
1475 0 : return bRet;
1476 : }
1477 :
1478 0 : bool SdrCustomShapeAdjustmentItem::GetPresentation(
1479 : SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/,
1480 : SfxMapUnit /*ePresentationMetric*/, OUString &rText, const IntlWrapper *) const
1481 : {
1482 0 : sal_uInt32 i, nCount = GetCount();
1483 0 : rText += OUString::number( nCount );
1484 0 : for ( i = 0; i < nCount; i++ )
1485 : {
1486 0 : rText = rText + " " + OUString::number( GetValue( i ).nValue );
1487 : }
1488 0 : if ( ePresentation == SFX_ITEM_PRESENTATION_COMPLETE )
1489 : {
1490 0 : OUString aStr;
1491 :
1492 0 : SdrItemPool::TakeItemName( Which(), aStr );
1493 0 : rText = aStr + " " + rText;
1494 : }
1495 0 : return true;
1496 : }
1497 :
1498 0 : SfxPoolItem* SdrCustomShapeAdjustmentItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
1499 : {
1500 0 : return new SdrCustomShapeAdjustmentItem( rIn, nItemVersion );
1501 : }
1502 :
1503 0 : SvStream& SdrCustomShapeAdjustmentItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
1504 : {
1505 0 : if ( nItemVersion )
1506 : {
1507 0 : sal_uInt32 i, nCount = GetCount();
1508 0 : rOut.WriteUInt32( nCount );
1509 0 : for ( i = 0; i < nCount; i++ )
1510 0 : rOut.WriteUInt32( GetValue( i ).nValue );
1511 : }
1512 0 : return rOut;
1513 : }
1514 :
1515 32 : SfxPoolItem* SdrCustomShapeAdjustmentItem::Clone( SfxItemPool * /*pPool*/) const
1516 : {
1517 32 : SdrCustomShapeAdjustmentItem* pItem = new SdrCustomShapeAdjustmentItem;
1518 32 : pItem->aAdjustmentValueList = aAdjustmentValueList;
1519 32 : return pItem;
1520 : }
1521 :
1522 0 : const SdrCustomShapeAdjustmentValue& SdrCustomShapeAdjustmentItem::GetValue( sal_uInt32 nIndex ) const
1523 : {
1524 : #ifdef DBG_UTIL
1525 : if ( aAdjustmentValueList.size() <= nIndex )
1526 : OSL_FAIL( "SdrCustomShapeAdjustemntItem::GetValue - nIndex out of range (SJ)" );
1527 : #endif
1528 0 : return aAdjustmentValueList[nIndex];
1529 : }
1530 :
1531 0 : void SdrCustomShapeAdjustmentItem::SetValue( sal_uInt32 nIndex, const SdrCustomShapeAdjustmentValue& rVal )
1532 : {
1533 0 : for (sal_uInt32 i = aAdjustmentValueList.size(); i <= nIndex; i++ )
1534 0 : aAdjustmentValueList.push_back(SdrCustomShapeAdjustmentValue());
1535 :
1536 0 : aAdjustmentValueList[nIndex] = rVal;
1537 0 : }
1538 :
1539 0 : sal_uInt16 SdrCustomShapeAdjustmentItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
1540 : {
1541 0 : return 1;
1542 : }
1543 :
1544 0 : bool SdrCustomShapeAdjustmentItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1545 : {
1546 0 : sal_uInt32 i, nCount = GetCount();
1547 0 : uno::Sequence< sal_Int32 > aSequence( nCount );
1548 0 : if ( nCount )
1549 : {
1550 0 : sal_Int32* pPtr = aSequence.getArray();
1551 0 : for ( i = 0; i < nCount; i++ )
1552 0 : *pPtr++ = GetValue( i ).nValue;
1553 : }
1554 0 : rVal <<= aSequence;
1555 0 : return true;
1556 : }
1557 :
1558 0 : bool SdrCustomShapeAdjustmentItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1559 : {
1560 0 : uno::Sequence< sal_Int32 > aSequence;
1561 0 : if( !( rVal >>= aSequence ) )
1562 0 : return false;
1563 :
1564 0 : aAdjustmentValueList.clear();
1565 :
1566 0 : sal_uInt32 i, nCount = aSequence.getLength();
1567 0 : if ( nCount )
1568 : {
1569 : SdrCustomShapeAdjustmentValue val;
1570 0 : const sal_Int32* pPtr2 = aSequence.getConstArray();
1571 0 : for ( i = 0; i < nCount; i++ )
1572 : {
1573 0 : val.nValue = *pPtr2++;
1574 0 : aAdjustmentValueList.push_back(val);
1575 : }
1576 : }
1577 0 : return true;
1578 : }
1579 :
1580 : // EdgeKind
1581 14181 : TYPEINIT1_AUTOFACTORY(SdrEdgeKindItem,SfxEnumItem);
1582 :
1583 42 : SfxPoolItem* SdrEdgeKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrEdgeKindItem(*this); }
1584 :
1585 0 : SfxPoolItem* SdrEdgeKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrEdgeKindItem(rIn); }
1586 :
1587 0 : sal_uInt16 SdrEdgeKindItem::GetValueCount() const { return 4; }
1588 :
1589 0 : OUString SdrEdgeKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1590 : {
1591 0 : return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES+nPos);
1592 : }
1593 :
1594 0 : bool SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres,
1595 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1596 : {
1597 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1598 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1599 0 : OUString aStr;
1600 :
1601 0 : SdrItemPool::TakeItemName(Which(), aStr);
1602 0 : rText = aStr + " " + rText;
1603 : }
1604 0 : return true;
1605 : }
1606 :
1607 27 : bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1608 : {
1609 27 : drawing::ConnectorType eCT = drawing::ConnectorType_STANDARD;
1610 :
1611 27 : switch( GetValue() )
1612 : {
1613 1 : case SDREDGE_ORTHOLINES : eCT = drawing::ConnectorType_STANDARD; break;
1614 0 : case SDREDGE_THREELINES : eCT = drawing::ConnectorType_LINES; break;
1615 26 : case SDREDGE_ONELINE : eCT = drawing::ConnectorType_LINE; break;
1616 0 : case SDREDGE_BEZIER : eCT = drawing::ConnectorType_CURVE; break;
1617 0 : case SDREDGE_ARC : eCT = drawing::ConnectorType_CURVE; break;
1618 : default:
1619 : OSL_FAIL( "SdrEdgeKindItem::QueryValue : unknown enum" );
1620 : }
1621 :
1622 27 : rVal <<= eCT;
1623 :
1624 27 : return true;
1625 : }
1626 :
1627 1 : bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1628 : {
1629 : drawing::ConnectorType eCT;
1630 1 : if(!(rVal >>= eCT))
1631 : {
1632 0 : sal_Int32 nEnum = 0;
1633 0 : if(!(rVal >>= nEnum))
1634 0 : return false;
1635 :
1636 0 : eCT = (drawing::ConnectorType)nEnum;
1637 : }
1638 :
1639 1 : SdrEdgeKind eEK = SDREDGE_ORTHOLINES;
1640 1 : switch( eCT )
1641 : {
1642 1 : case drawing::ConnectorType_STANDARD : eEK = SDREDGE_ORTHOLINES; break;
1643 0 : case drawing::ConnectorType_CURVE : eEK = SDREDGE_BEZIER; break;
1644 0 : case drawing::ConnectorType_LINE : eEK = SDREDGE_ONELINE; break;
1645 0 : case drawing::ConnectorType_LINES : eEK = SDREDGE_THREELINES; break;
1646 : default:
1647 : OSL_FAIL( "SdrEdgeKindItem::PuValue : unknown enum" );
1648 : }
1649 1 : SetValue( sal::static_int_cast< sal_uInt16 >( eEK ) );
1650 :
1651 1 : return true;
1652 : }
1653 :
1654 0 : bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1655 : {
1656 0 : rVal <<= (sal_Int32)GetValue();
1657 0 : return true;
1658 : }
1659 :
1660 0 : bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1661 : {
1662 0 : sal_Int32 nValue = 0;
1663 0 : if(!(rVal >>= nValue))
1664 0 : return false;
1665 :
1666 0 : SetValue( nValue );
1667 0 : return true;
1668 : }
1669 :
1670 0 : bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1671 : {
1672 0 : rVal <<= (sal_Int32)GetValue();
1673 0 : return true;
1674 : }
1675 :
1676 0 : bool SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1677 : {
1678 0 : sal_Int32 nValue = 0;
1679 0 : if(!(rVal >>= nValue))
1680 0 : return false;
1681 :
1682 0 : SetValue( nValue );
1683 0 : return true;
1684 : }
1685 :
1686 0 : bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1687 : {
1688 0 : rVal <<= (sal_Int32)GetValue();
1689 0 : return true;
1690 : }
1691 :
1692 0 : bool SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1693 : {
1694 0 : sal_Int32 nValue = 0;
1695 0 : if(!(rVal >>= nValue))
1696 0 : return false;
1697 :
1698 0 : SetValue( nValue );
1699 0 : return true;
1700 : }
1701 :
1702 0 : bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1703 : {
1704 0 : rVal <<= (sal_Int32)GetValue();
1705 0 : return true;
1706 : }
1707 :
1708 0 : bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1709 : {
1710 0 : sal_Int32 nValue = 0;
1711 0 : if(!(rVal >>= nValue))
1712 0 : return false;
1713 :
1714 0 : SetValue( nValue );
1715 0 : return true;
1716 : }
1717 :
1718 14049 : TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem,SfxEnumItem);
1719 :
1720 0 : SfxPoolItem* SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); }
1721 :
1722 0 : SfxPoolItem* SdrMeasureKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrMeasureKindItem(rIn); }
1723 :
1724 0 : sal_uInt16 SdrMeasureKindItem::GetValueCount() const { return 2; }
1725 :
1726 0 : OUString SdrMeasureKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1727 : {
1728 0 : return ImpGetResStr(STR_ItemValMEASURE_STD+nPos);
1729 : }
1730 :
1731 0 : bool SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres,
1732 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1733 : {
1734 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1735 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1736 0 : OUString aStr;
1737 :
1738 0 : SdrItemPool::TakeItemName(Which(), aStr);
1739 0 : rText = aStr + " " + rText;
1740 : }
1741 0 : return true;
1742 : }
1743 :
1744 0 : bool SdrMeasureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1745 : {
1746 0 : rVal <<= (drawing::MeasureKind)GetValue();
1747 0 : return true;
1748 : }
1749 :
1750 0 : bool SdrMeasureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1751 : {
1752 : drawing::MeasureKind eKind;
1753 0 : if(!(rVal >>= eKind))
1754 : {
1755 0 : sal_Int32 nEnum = 0;
1756 0 : if(!(rVal >>= nEnum))
1757 0 : return false;
1758 :
1759 0 : eKind = (drawing::MeasureKind)nEnum;
1760 : }
1761 :
1762 0 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrMeasureKind)eKind ) );
1763 0 : return true;
1764 : }
1765 :
1766 14049 : TYPEINIT1_AUTOFACTORY(SdrMeasureTextHPosItem,SfxEnumItem);
1767 :
1768 0 : SfxPoolItem* SdrMeasureTextHPosItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureTextHPosItem(*this); }
1769 :
1770 0 : SfxPoolItem* SdrMeasureTextHPosItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrMeasureTextHPosItem(rIn); }
1771 :
1772 0 : sal_uInt16 SdrMeasureTextHPosItem::GetValueCount() const { return 4; }
1773 :
1774 0 : OUString SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos) const
1775 : {
1776 0 : return ImpGetResStr(STR_ItemValMEASURE_TEXTHAUTO+nPos);
1777 : }
1778 :
1779 0 : bool SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres,
1780 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1781 : {
1782 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1783 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1784 0 : OUString aStr;
1785 :
1786 0 : SdrItemPool::TakeItemName(Which(), aStr);
1787 0 : rText = aStr + " " + rText;
1788 : }
1789 0 : return true;
1790 : }
1791 :
1792 0 : bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1793 : {
1794 0 : rVal <<= (drawing::MeasureTextHorzPos)GetValue();
1795 0 : return true;
1796 : }
1797 :
1798 0 : bool SdrMeasureTextHPosItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1799 : {
1800 : drawing::MeasureTextHorzPos ePos;
1801 0 : if(!(rVal >>= ePos))
1802 : {
1803 0 : sal_Int32 nEnum = 0;
1804 0 : if(!(rVal >>= nEnum))
1805 0 : return false;
1806 :
1807 0 : ePos = (drawing::MeasureTextHorzPos)nEnum;
1808 : }
1809 :
1810 0 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrMeasureTextHPos)ePos ) );
1811 0 : return true;
1812 : }
1813 :
1814 14049 : TYPEINIT1_AUTOFACTORY(SdrMeasureTextVPosItem,SfxEnumItem);
1815 :
1816 0 : SfxPoolItem* SdrMeasureTextVPosItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureTextVPosItem(*this); }
1817 :
1818 0 : SfxPoolItem* SdrMeasureTextVPosItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrMeasureTextVPosItem(rIn); }
1819 :
1820 0 : sal_uInt16 SdrMeasureTextVPosItem::GetValueCount() const { return 5; }
1821 :
1822 0 : OUString SdrMeasureTextVPosItem::GetValueTextByPos(sal_uInt16 nPos) const
1823 : {
1824 0 : return ImpGetResStr(STR_ItemValMEASURE_TEXTVAUTO+nPos);
1825 : }
1826 :
1827 0 : bool SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres,
1828 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1829 : {
1830 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1831 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1832 0 : OUString aStr;
1833 :
1834 0 : SdrItemPool::TakeItemName(Which(), aStr);
1835 0 : rText = aStr + " " + rText;
1836 : }
1837 0 : return true;
1838 : }
1839 :
1840 0 : bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1841 : {
1842 0 : rVal <<= (drawing::MeasureTextVertPos)GetValue();
1843 0 : return true;
1844 : }
1845 :
1846 0 : bool SdrMeasureTextVPosItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1847 : {
1848 : drawing::MeasureTextVertPos ePos;
1849 0 : if(!(rVal >>= ePos))
1850 : {
1851 0 : sal_Int32 nEnum = 0;
1852 0 : if(!(rVal >>= nEnum))
1853 0 : return false;
1854 :
1855 0 : ePos = (drawing::MeasureTextVertPos)nEnum;
1856 : }
1857 :
1858 0 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrMeasureTextHPos)ePos ) );
1859 0 : return true;
1860 : }
1861 :
1862 14049 : TYPEINIT1_AUTOFACTORY(SdrMeasureUnitItem,SfxEnumItem);
1863 :
1864 0 : SfxPoolItem* SdrMeasureUnitItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureUnitItem(*this); }
1865 :
1866 0 : SfxPoolItem* SdrMeasureUnitItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrMeasureUnitItem(rIn); }
1867 :
1868 0 : sal_uInt16 SdrMeasureUnitItem::GetValueCount() const { return 14; }
1869 :
1870 0 : OUString SdrMeasureUnitItem::GetValueTextByPos(sal_uInt16 nPos) const
1871 : {
1872 0 : OUString aRetval;
1873 :
1874 0 : if((FieldUnit)nPos == FUNIT_NONE)
1875 0 : aRetval = "default";
1876 : else
1877 0 : SdrFormatter::TakeUnitStr((FieldUnit)nPos, aRetval);
1878 :
1879 0 : return aRetval;
1880 : }
1881 :
1882 0 : bool SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres,
1883 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1884 : {
1885 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1886 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1887 0 : OUString aStr;
1888 :
1889 0 : SdrItemPool::TakeItemName(Which(), aStr);
1890 0 : rText = aStr + " " + rText;
1891 : }
1892 0 : return true;
1893 : }
1894 :
1895 0 : bool SdrMeasureUnitItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1896 : {
1897 0 : rVal <<= (sal_Int32)GetValue();
1898 0 : return true;
1899 : }
1900 :
1901 0 : bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1902 : {
1903 0 : sal_Int32 nMeasure = 0;
1904 0 : if(!(rVal >>= nMeasure))
1905 0 : return false;
1906 :
1907 0 : SetValue( sal::static_int_cast< sal_uInt16 >( (FieldUnit)nMeasure ) );
1908 0 : return true;
1909 : }
1910 :
1911 14398 : TYPEINIT1_AUTOFACTORY(SdrCircKindItem,SfxEnumItem);
1912 :
1913 98 : SfxPoolItem* SdrCircKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCircKindItem(*this); }
1914 :
1915 0 : SfxPoolItem* SdrCircKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrCircKindItem(rIn); }
1916 :
1917 0 : sal_uInt16 SdrCircKindItem::GetValueCount() const { return 4; }
1918 :
1919 0 : OUString SdrCircKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1920 : {
1921 0 : return ImpGetResStr(STR_ItemValCIRC_FULL+nPos);
1922 : }
1923 :
1924 0 : bool SdrCircKindItem::GetPresentation(SfxItemPresentation ePres,
1925 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
1926 : {
1927 0 : rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1928 0 : if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1929 0 : OUString aStr;
1930 :
1931 0 : SdrItemPool::TakeItemName(Which(), aStr);
1932 0 : rText = aStr + " " + rText;
1933 : }
1934 0 : return true;
1935 : }
1936 :
1937 0 : bool SdrCircKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1938 : {
1939 0 : rVal <<= (drawing::CircleKind)GetValue();
1940 0 : return true;
1941 : }
1942 :
1943 67 : bool SdrCircKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1944 : {
1945 : drawing::CircleKind eKind;
1946 67 : if(!(rVal >>= eKind))
1947 : {
1948 0 : sal_Int32 nEnum = 0;
1949 0 : if(!(rVal >>= nEnum))
1950 0 : return false;
1951 :
1952 0 : eKind = (drawing::CircleKind)nEnum;
1953 : }
1954 :
1955 67 : SetValue( sal::static_int_cast< sal_uInt16 >( (SdrCircKind)eKind ) );
1956 67 : return true;
1957 : }
1958 :
1959 :
1960 : // class SdrSignedPercentItem
1961 :
1962 :
1963 46830 : TYPEINIT1_AUTOFACTORY( SdrSignedPercentItem, SfxInt16Item );
1964 :
1965 :
1966 0 : SfxPoolItem* SdrSignedPercentItem::Clone(SfxItemPool* /*pPool*/) const
1967 : {
1968 0 : return new SdrSignedPercentItem( Which(), GetValue() );
1969 : }
1970 :
1971 0 : SfxPoolItem* SdrSignedPercentItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
1972 : {
1973 0 : return new SdrSignedPercentItem( Which(), rIn );
1974 : }
1975 :
1976 0 : bool SdrSignedPercentItem::GetPresentation(
1977 : SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
1978 : OUString& rText, const IntlWrapper *) const
1979 : {
1980 0 : rText = unicode::formatPercent(GetValue(),
1981 0 : Application::GetSettings().GetUILanguageTag());
1982 :
1983 0 : if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
1984 : {
1985 0 : OUString aStr;
1986 :
1987 0 : SdrItemPool::TakeItemName(Which(), aStr);
1988 0 : rText = aStr + " " + rText;
1989 : }
1990 :
1991 0 : return true;
1992 : }
1993 :
1994 15705 : TYPEINIT1( SdrGrafRedItem, SdrSignedPercentItem );
1995 :
1996 1495 : SfxPoolItem* SdrGrafRedItem::Clone( SfxItemPool* /*pPool*/) const
1997 : {
1998 1495 : return new SdrGrafRedItem( *this );
1999 : }
2000 :
2001 0 : SfxPoolItem* SdrGrafRedItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2002 : {
2003 0 : return new SdrGrafRedItem( rIn );
2004 : }
2005 :
2006 15705 : TYPEINIT1( SdrGrafGreenItem, SdrSignedPercentItem );
2007 :
2008 1495 : SfxPoolItem* SdrGrafGreenItem::Clone( SfxItemPool* /*pPool*/) const
2009 : {
2010 1495 : return new SdrGrafGreenItem( *this );
2011 : }
2012 :
2013 0 : SfxPoolItem* SdrGrafGreenItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2014 : {
2015 0 : return new SdrGrafGreenItem( rIn );
2016 : }
2017 :
2018 15705 : TYPEINIT1( SdrGrafBlueItem, SdrSignedPercentItem );
2019 :
2020 1495 : SfxPoolItem* SdrGrafBlueItem::Clone( SfxItemPool* /*pPool*/) const
2021 : {
2022 1495 : return new SdrGrafBlueItem( *this );
2023 : }
2024 :
2025 0 : SfxPoolItem* SdrGrafBlueItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2026 : {
2027 0 : return new SdrGrafBlueItem( rIn );
2028 : }
2029 :
2030 16078 : TYPEINIT1( SdrGrafLuminanceItem, SdrSignedPercentItem );
2031 :
2032 1495 : SfxPoolItem* SdrGrafLuminanceItem::Clone( SfxItemPool* /*pPool*/) const
2033 : {
2034 1495 : return new SdrGrafLuminanceItem( *this );
2035 : }
2036 :
2037 0 : SfxPoolItem* SdrGrafLuminanceItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2038 : {
2039 0 : return new SdrGrafLuminanceItem( rIn );
2040 : }
2041 :
2042 16137 : TYPEINIT1( SdrGrafContrastItem, SdrSignedPercentItem );
2043 :
2044 1512 : SfxPoolItem* SdrGrafContrastItem::Clone( SfxItemPool* /*pPool*/) const
2045 : {
2046 1512 : return new SdrGrafContrastItem( *this );
2047 : }
2048 :
2049 0 : SfxPoolItem* SdrGrafContrastItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2050 : {
2051 0 : return new SdrGrafContrastItem( rIn );
2052 : }
2053 :
2054 15705 : TYPEINIT1( SdrGrafGamma100Item, SfxUInt32Item );
2055 :
2056 1495 : SfxPoolItem* SdrGrafGamma100Item::Clone( SfxItemPool* /*pPool */) const
2057 : {
2058 1495 : return new SdrGrafGamma100Item( *this );
2059 : }
2060 :
2061 0 : SfxPoolItem* SdrGrafGamma100Item::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2062 : {
2063 0 : return new SdrGrafGamma100Item( rIn );
2064 : }
2065 :
2066 93 : bool SdrGrafGamma100Item::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2067 : {
2068 93 : rVal <<= ((double)GetValue()) / 100.0;
2069 93 : return true;
2070 : }
2071 :
2072 76 : bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2073 : {
2074 76 : double nGamma = 0;
2075 76 : if(!(rVal >>= nGamma))
2076 0 : return false;
2077 :
2078 76 : SetValue( (sal_uInt32)(nGamma * 100.0 ) );
2079 76 : return true;
2080 : }
2081 :
2082 15143 : TYPEINIT1( SdrGrafInvertItem, SdrOnOffItem );
2083 :
2084 1403 : SfxPoolItem* SdrGrafInvertItem::Clone( SfxItemPool* /*pPool*/) const
2085 : {
2086 1403 : return new SdrGrafInvertItem( *this );
2087 : }
2088 :
2089 0 : SfxPoolItem* SdrGrafInvertItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2090 : {
2091 0 : return new SdrGrafInvertItem( rIn );
2092 : }
2093 :
2094 15790 : TYPEINIT1( SdrGrafTransparenceItem, SdrPercentItem );
2095 :
2096 1512 : SfxPoolItem* SdrGrafTransparenceItem::Clone( SfxItemPool* /*pPool*/) const
2097 : {
2098 1512 : return new SdrGrafTransparenceItem( *this );
2099 : }
2100 :
2101 0 : SfxPoolItem* SdrGrafTransparenceItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2102 : {
2103 0 : return new SdrGrafTransparenceItem( rIn );
2104 : }
2105 :
2106 17568 : TYPEINIT1( SdrGrafModeItem, SfxEnumItem );
2107 :
2108 1820 : SfxPoolItem* SdrGrafModeItem::Clone(SfxItemPool* /*pPool*/) const
2109 : {
2110 1820 : return new SdrGrafModeItem( *this );
2111 : }
2112 :
2113 0 : SfxPoolItem* SdrGrafModeItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2114 : {
2115 0 : return new SdrGrafModeItem( rIn );
2116 : }
2117 :
2118 0 : sal_uInt16 SdrGrafModeItem::GetValueCount() const
2119 : {
2120 0 : return 4;
2121 : }
2122 :
2123 0 : OUString SdrGrafModeItem::GetValueTextByPos(sal_uInt16 nPos) const
2124 : {
2125 0 : OUString aStr;
2126 :
2127 0 : switch(nPos)
2128 : {
2129 : case 1:
2130 : {
2131 0 : aStr = "Greys";
2132 0 : break;
2133 : }
2134 : case 2:
2135 : {
2136 0 : aStr = "Black/White";
2137 0 : break;
2138 : }
2139 : case 3:
2140 : {
2141 0 : aStr = "Watermark";
2142 0 : break;
2143 : }
2144 : default:
2145 : {
2146 0 : aStr = "Standard";
2147 0 : break;
2148 : }
2149 : }
2150 :
2151 0 : return aStr;
2152 : }
2153 :
2154 0 : bool SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,
2155 : SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
2156 : OUString& rText, const IntlWrapper *) const
2157 : {
2158 0 : rText = GetValueTextByPos( sal::static_int_cast< sal_uInt16 >( GetValue() ) );
2159 :
2160 0 : if( ePres == SFX_ITEM_PRESENTATION_COMPLETE )
2161 : {
2162 0 : OUString aStr;
2163 :
2164 0 : SdrItemPool::TakeItemName( Which(), aStr );
2165 0 : rText = aStr + " " + rText;
2166 : }
2167 :
2168 0 : return true;
2169 : }
2170 :
2171 16757 : TYPEINIT1( SdrGrafCropItem, SvxGrfCrop );
2172 :
2173 1834 : SfxPoolItem* SdrGrafCropItem::Clone( SfxItemPool* /*pPool*/) const
2174 : {
2175 1834 : return new SdrGrafCropItem( *this );
2176 : }
2177 :
2178 0 : SfxPoolItem* SdrGrafCropItem::Create( SvStream& rIn, sal_uInt16 nVer ) const
2179 : {
2180 0 : return( ( 0 == nVer ) ? Clone( NULL ) : SvxGrfCrop::Create( rIn, nVer ) );
2181 : }
2182 :
2183 0 : sal_uInt16 SdrGrafCropItem::GetVersion( sal_uInt16 /*nFileVersion*/) const
2184 : {
2185 : // GRFCROP_VERSION_MOVETOSVX is 1
2186 0 : return GRFCROP_VERSION_MOVETOSVX;
2187 435 : }
2188 :
2189 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|