xref: /aoo42x/main/svx/source/svdraw/svdattr.cxx (revision ae2dc0fa)
1f6e50924SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f6e50924SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f6e50924SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f6e50924SAndrew Rist  * distributed with this work for additional information
6f6e50924SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f6e50924SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f6e50924SAndrew Rist  * "License"); you may not use this file except in compliance
9f6e50924SAndrew Rist  * with the License.  You may obtain a copy of the License at
10f6e50924SAndrew Rist  *
11f6e50924SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12f6e50924SAndrew Rist  *
13f6e50924SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f6e50924SAndrew Rist  * software distributed under the License is distributed on an
15f6e50924SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f6e50924SAndrew Rist  * KIND, either express or implied.  See the License for the
17f6e50924SAndrew Rist  * specific language governing permissions and limitations
18f6e50924SAndrew Rist  * under the License.
19f6e50924SAndrew Rist  *
20f6e50924SAndrew Rist  *************************************************************/
21f6e50924SAndrew Rist 
22f6e50924SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svx.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
2826734c99SArmin Le Grand #include <com/sun/star/drawing/TextFitToSizeType.hpp>
29cdf0e10cSrcweir #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
30cdf0e10cSrcweir #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
31cdf0e10cSrcweir #include <com/sun/star/drawing/TextAnimationKind.hpp>
32cdf0e10cSrcweir #include <com/sun/star/uno/Any.hxx>
33cdf0e10cSrcweir #include <com/sun/star/drawing/TextAnimationDirection.hpp>
34cdf0e10cSrcweir #include <com/sun/star/drawing/ConnectorType.hpp>
35cdf0e10cSrcweir #include <com/sun/star/drawing/MeasureKind.hpp>
36cdf0e10cSrcweir #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
37cdf0e10cSrcweir #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
38cdf0e10cSrcweir #include <com/sun/star/drawing/CircleKind.hpp>
39cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #include <unotools/intlwrapper.hxx>
42cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
43cdf0e10cSrcweir #include <vcl/svapp.hxx>
44cdf0e10cSrcweir #include <svx/svdattr.hxx>
45cdf0e10cSrcweir #include <svx/svdattrx.hxx>
46cdf0e10cSrcweir #include <svx/svdpool.hxx>
47cdf0e10cSrcweir 
48cdf0e10cSrcweir #include <svl/solar.hrc>
49cdf0e10cSrcweir #include "editeng/xmlcnitm.hxx"
50cdf0e10cSrcweir 
51cdf0e10cSrcweir #include <svx/svxids.hrc>
52cdf0e10cSrcweir #include <svx/xtable.hxx>    // fuer RGB_Color()
53cdf0e10cSrcweir #include "svx/svditext.hxx"
54cdf0e10cSrcweir #include <svx/svdmodel.hxx>  // fuer DEGREE_CHAR
55cdf0e10cSrcweir #include <svx/svdtrans.hxx>
56cdf0e10cSrcweir #include "svx/svdglob.hxx"  // Stringcache
57cdf0e10cSrcweir #include "svx/svdstr.hrc"
58cdf0e10cSrcweir #include <svx/sdgcpitm.hxx>
59cdf0e10cSrcweir #include <editeng/adjitem.hxx>
60cdf0e10cSrcweir #include <svx/sdtfchim.hxx>
61cdf0e10cSrcweir #include <editeng/writingmodeitem.hxx>
62cdf0e10cSrcweir #include <tools/bigint.hxx>
63cdf0e10cSrcweir #include <tools/stream.hxx>
64cdf0e10cSrcweir 
65cdf0e10cSrcweir #include <svx/xfillit0.hxx>
66cdf0e10cSrcweir #include <svx/xflclit.hxx>
67cdf0e10cSrcweir #include <svx/xlineit0.hxx>
68cdf0e10cSrcweir #include <svx/svx3ditems.hxx>
69cdf0e10cSrcweir 
70cdf0e10cSrcweir #define ITEMID_BOX SDRATTR_TABLE_BORDER
71cdf0e10cSrcweir #define ITEMID_BOXINFO SDRATTR_TABLE_BORDER_INNER
72cdf0e10cSrcweir #include "editeng/boxitem.hxx"
73cdf0e10cSrcweir 
74cdf0e10cSrcweir #define ITEMID_SHADOW SDRATTR_TABLE_BORDER_SHADOW
75cdf0e10cSrcweir #include "editeng/shaditem.hxx"
76cdf0e10cSrcweir 
77cdf0e10cSrcweir #define ITEMID_LINE 0
78cdf0e10cSrcweir #include "editeng/bolnitem.hxx"
79cdf0e10cSrcweir 
80cdf0e10cSrcweir using namespace ::rtl;
81cdf0e10cSrcweir using namespace ::com::sun::star;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir /*************************************************************************
84cdf0e10cSrcweir |*
85cdf0e10cSrcweir |* Konstruktor
86cdf0e10cSrcweir |*
87cdf0e10cSrcweir \************************************************************************/
88cdf0e10cSrcweir 
SdrItemPool(SfxItemPool * _pMaster,sal_Bool bLoadRefCounts)89cdf0e10cSrcweir SdrItemPool::SdrItemPool(
90cdf0e10cSrcweir 	SfxItemPool* _pMaster,
91cdf0e10cSrcweir 	sal_Bool bLoadRefCounts)
92cdf0e10cSrcweir :	XOutdevItemPool(_pMaster, SDRATTR_START, SDRATTR_END, bLoadRefCounts)
93cdf0e10cSrcweir {
94cdf0e10cSrcweir 	// preapare some constants
95cdf0e10cSrcweir 	const Color aNullCol(RGB_Color(COL_BLACK));
96cdf0e10cSrcweir 	const XubString aEmptyStr;
97cdf0e10cSrcweir 	const sal_Int32 nDefEdgeDist(500L); // Erstmal hart defaulted fuer Draw (100TH_MM). hier muss noch der MapMode beruecksichtigt werden.
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 	// init the non-persistent items
100cdf0e10cSrcweir 	for(sal_uInt16 i(SDRATTR_NOTPERSIST_FIRST); i <= SDRATTR_NOTPERSIST_LAST; i++)
101cdf0e10cSrcweir 	{
102cdf0e10cSrcweir 		mpLocalItemInfos[i - SDRATTR_START]._nFlags=0;
103cdf0e10cSrcweir 	}
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 	// init own PoolDefaults
106cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOW            -SDRATTR_START]=new SdrShadowItem;
107cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOWCOLOR       -SDRATTR_START]=new SdrShadowColorItem(aEmptyStr,aNullCol);
108cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOWXDIST       -SDRATTR_START]=new SdrShadowXDistItem;
109cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOWYDIST       -SDRATTR_START]=new SdrShadowYDistItem;
110cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrShadowTransparenceItem;
111cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOW3D          -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D    );
112cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHADOWPERSP       -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP );
113cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONTYPE      -SDRATTR_START]=new SdrCaptionTypeItem      ;
114cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrCaptionFixedAngleItem;
115cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONANGLE     -SDRATTR_START]=new SdrCaptionAngleItem     ;
116cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONGAP       -SDRATTR_START]=new SdrCaptionGapItem       ;
117cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONESCDIR    -SDRATTR_START]=new SdrCaptionEscDirItem    ;
118cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONESCISREL  -SDRATTR_START]=new SdrCaptionEscIsRelItem  ;
119cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONESCREL    -SDRATTR_START]=new SdrCaptionEscRelItem    ;
120cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONESCABS    -SDRATTR_START]=new SdrCaptionEscAbsItem    ;
121cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONLINELEN   -SDRATTR_START]=new SdrCaptionLineLenItem   ;
122cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem;
123cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ECKENRADIUS			-SDRATTR_START]=new SdrEckenradiusItem;
124cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT	-SDRATTR_START]=new SdrTextMinFrameHeightItem;
125cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT	-SDRATTR_START]=new SdrTextAutoGrowHeightItem;
126cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE		-SDRATTR_START]=new SdrTextFitToSizeTypeItem;
127cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST		-SDRATTR_START]=new SdrTextLeftDistItem;
128cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST		-SDRATTR_START]=new SdrTextRightDistItem;
129cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_UPPERDIST		-SDRATTR_START]=new SdrTextUpperDistItem;
130cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_LOWERDIST		-SDRATTR_START]=new SdrTextLowerDistItem;
131cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_VERTADJUST		-SDRATTR_START]=new SdrTextVertAdjustItem;
132cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT	-SDRATTR_START]=new SdrTextMaxFrameHeightItem;
133cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH	-SDRATTR_START]=new SdrTextMinFrameWidthItem;
134cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH	-SDRATTR_START]=new SdrTextMaxFrameWidthItem;
135cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH	-SDRATTR_START]=new SdrTextAutoGrowWidthItem;
136cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_HORZADJUST		-SDRATTR_START]=new SdrTextHorzAdjustItem;
137cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANIKIND			-SDRATTR_START]=new SdrTextAniKindItem;
138cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANIDIRECTION	-SDRATTR_START]=new SdrTextAniDirectionItem;
139cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANISTARTINSIDE	-SDRATTR_START]=new SdrTextAniStartInsideItem;
140cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANISTOPINSIDE	-SDRATTR_START]=new SdrTextAniStopInsideItem;
141cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANICOUNT		-SDRATTR_START]=new SdrTextAniCountItem;
142cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANIDELAY		-SDRATTR_START]=new SdrTextAniDelayItem;
143cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_ANIAMOUNT		-SDRATTR_START]=new SdrTextAniAmountItem;
144cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_CONTOURFRAME	-SDRATTR_START]=new SdrTextContourFrameItem;
145cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CUSTOMSHAPE_ADJUSTMENT -SDRATTR_START]=new SdrCustomShapeAdjustmentItem;
146cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES );
147cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem;
148cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_WORDWRAP		   -SDRATTR_START]=new SdrTextWordWrapItem;
149cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWSIZE	   -SDRATTR_START]=new SdrTextAutoGrowSizeItem;
150cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGEKIND         -SDRATTR_START]=new SdrEdgeKindItem;
151cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist);
152cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist);
153cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGENODE2HORZDIST-SDRATTR_START]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist);
154cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new SdrEdgeNode2VertDistItem(nDefEdgeDist);
155cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem;
156cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem;
157cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new SdrEdgeLineDeltaAnzItem;
158cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGELINE1DELTA   -SDRATTR_START]=new SdrEdgeLine1DeltaItem;
159cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGELINE2DELTA   -SDRATTR_START]=new SdrEdgeLine2DeltaItem;
160cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_EDGELINE3DELTA   -SDRATTR_START]=new SdrEdgeLine3DeltaItem;
161cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREKIND             -SDRATTR_START]=new SdrMeasureKindItem;
162cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTHPOS         -SDRATTR_START]=new SdrMeasureTextHPosItem;
163cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTVPOS         -SDRATTR_START]=new SdrMeasureTextVPosItem;
164cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURELINEDIST         -SDRATTR_START]=new SdrMeasureLineDistItem(800);
165cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMeasureHelplineOverhangItem(200);
166cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEDIST     -SDRATTR_START]=new SdrMeasureHelplineDistItem(100);
167cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN     -SDRATTR_START]=new SdrMeasureHelpline1LenItem;
168cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN     -SDRATTR_START]=new SdrMeasureHelpline2LenItem;
169cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE     -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem;
170cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTROTA90       -SDRATTR_START]=new SdrMeasureTextRota90Item;
171cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN   -SDRATTR_START]=new SdrMeasureTextUpsideDownItem;
172cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREOVERHANG         -SDRATTR_START]=new SdrMeasureOverhangItem(600);
173cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREUNIT             -SDRATTR_START]=new SdrMeasureUnitItem;
174cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURESCALE            -SDRATTR_START]=new SdrMeasureScaleItem;
175cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURESHOWUNIT         -SDRATTR_START]=new SdrMeasureShowUnitItem;
176cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREFORMATSTRING     -SDRATTR_START]=new SdrMeasureFormatStringItem();
177cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLE    -SDRATTR_START]=new SdrMeasureTextAutoAngleItem();
178cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLEVIEW-SDRATTR_START]=new SdrMeasureTextAutoAngleViewItem();
179cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTISFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextIsFixedAngleItem();
180cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASURETEXTFIXEDANGLE   -SDRATTR_START]=new SdrMeasureTextFixedAngleItem();
181cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MEASUREDECIMALPLACES    -SDRATTR_START]=new SdrMeasureDecimalPlacesItem();
182cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CIRCKIND      -SDRATTR_START]=new SdrCircKindItem;
183cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CIRCSTARTANGLE-SDRATTR_START]=new SdrCircStartAngleItem;
184cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_CIRCENDANGLE  -SDRATTR_START]=new SdrCircEndAngleItem;
185cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrObjMoveProtectItem;
186cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrObjSizeProtectItem;
187cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE   -SDRATTR_START]=new SdrObjPrintableItem;
188cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_OBJVISIBLE		-SDRATTR_START]=new SdrObjVisibleItem;
189cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_LAYERID        -SDRATTR_START]=new SdrLayerIdItem;
190cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_LAYERNAME      -SDRATTR_START]=new SdrLayerNameItem;
191cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_OBJECTNAME     -SDRATTR_START]=new SdrObjectNameItem;
192cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ALLPOSITIONX   -SDRATTR_START]=new SdrAllPositionXItem;
193cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ALLPOSITIONY   -SDRATTR_START]=new SdrAllPositionYItem;
194cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ALLSIZEWIDTH   -SDRATTR_START]=new SdrAllSizeWidthItem;
195cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ALLSIZEHEIGHT  -SDRATTR_START]=new SdrAllSizeHeightItem;
196cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ONEPOSITIONX   -SDRATTR_START]=new SdrOnePositionXItem;
197cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ONEPOSITIONY   -SDRATTR_START]=new SdrOnePositionYItem;
198cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ONESIZEWIDTH   -SDRATTR_START]=new SdrOneSizeWidthItem;
199cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ONESIZEHEIGHT  -SDRATTR_START]=new SdrOneSizeHeightItem;
200cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem;
201cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem;
202cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ROTATEANGLE    -SDRATTR_START]=new SdrRotateAngleItem;
203cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_SHEARANGLE     -SDRATTR_START]=new SdrShearAngleItem;
204cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MOVEX          -SDRATTR_START]=new SdrMoveXItem;
205cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_MOVEY          -SDRATTR_START]=new SdrMoveYItem;
206cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_RESIZEXONE     -SDRATTR_START]=new SdrResizeXOneItem;
207cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_RESIZEYONE     -SDRATTR_START]=new SdrResizeYOneItem;
208cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ROTATEONE      -SDRATTR_START]=new SdrRotateOneItem;
209cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_HORZSHEARONE   -SDRATTR_START]=new SdrHorzShearOneItem;
210cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_VERTSHEARONE   -SDRATTR_START]=new SdrVertShearOneItem;
211cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_RESIZEXALL     -SDRATTR_START]=new SdrResizeXAllItem;
212cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_RESIZEYALL     -SDRATTR_START]=new SdrResizeYAllItem;
213cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_ROTATEALL      -SDRATTR_START]=new SdrRotateAllItem;
214cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_HORZSHEARALL   -SDRATTR_START]=new SdrHorzShearAllItem;
215cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_VERTSHEARALL   -SDRATTR_START]=new SdrVertShearAllItem;
216cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TRANSFORMREF1X -SDRATTR_START]=new SdrTransformRef1XItem;
217cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TRANSFORMREF1Y -SDRATTR_START]=new SdrTransformRef1YItem;
218cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TRANSFORMREF2X -SDRATTR_START]=new SdrTransformRef2XItem;
219cdf0e10cSrcweir 	mppLocalPoolDefaults[SDRATTR_TRANSFORMREF2Y -SDRATTR_START]=new SdrTransformRef2YItem;
220cdf0e10cSrcweir     mppLocalPoolDefaults[SDRATTR_TEXTDIRECTION  -SDRATTR_START]=new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB, SDRATTR_TEXTDIRECTION);
221cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFRED				- SDRATTR_START] = new SdrGrafRedItem;
222cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFGREEN			- SDRATTR_START] = new SdrGrafGreenItem;
223cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFBLUE			- SDRATTR_START] = new SdrGrafBlueItem;
224cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFLUMINANCE		- SDRATTR_START] = new SdrGrafLuminanceItem;
225cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFCONTRAST		- SDRATTR_START] = new SdrGrafContrastItem;
226cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFGAMMA			- SDRATTR_START] = new SdrGrafGamma100Item;
227cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFTRANSPARENCE	- SDRATTR_START] = new SdrGrafTransparenceItem;
228cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFINVERT			- SDRATTR_START] = new SdrGrafInvertItem;
229cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFMODE			- SDRATTR_START] = new SdrGrafModeItem;
230cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_GRAFCROP			- SDRATTR_START] = new SdrGrafCropItem;
231cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new Svx3DPercentDiagonalItem;
232cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new Svx3DBackscaleItem;
233cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new Svx3DDepthItem;
234cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new Svx3DHorizontalSegmentsItem;
235cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new Svx3DVerticalSegmentsItem;
236cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new Svx3DEndAngleItem;
237cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new Svx3DDoubleSidedItem;
238cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem;
239cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new Svx3DNormalsInvertItem;
240cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem;
241cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem;
242cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new Svx3DShadow3DItem;
243cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new Svx3DMaterialColorItem;
244cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new Svx3DMaterialEmissionItem;
245cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new Svx3DMaterialSpecularItem;
246cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new Svx3DMaterialSpecularIntensityItem;
247cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem;
248cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem;
249cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new Svx3DTextureFilterItem;
250cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_NORMALS - SDRATTR_START ] = new Svx3DSmoothNormalsItem;
251cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_LIDS - SDRATTR_START ] = new Svx3DSmoothLidsItem;
252cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_CHARACTER_MODE - SDRATTR_START ] = new Svx3DCharacterModeItem;
253cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_FRONT - SDRATTR_START ] = new Svx3DCloseFrontItem;
254cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem;
255cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY - SDRATTR_START ] = new Svx3DReducedLineGeometryItem;
256cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem;
257cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new Svx3DDistanceItem;
258cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new Svx3DFocalLengthItem;
259cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new Svx3DTwoSidedLightingItem;
260cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new Svx3DLightcolor1Item;
261cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new Svx3DLightcolor2Item;
262cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new Svx3DLightcolor3Item;
263cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new Svx3DLightcolor4Item;
264cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new Svx3DLightcolor5Item;
265cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new Svx3DLightcolor6Item;
266cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new Svx3DLightcolor7Item;
267cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new Svx3DLightcolor8Item;
268cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new Svx3DAmbientcolorItem;
269cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new Svx3DLightOnOff1Item;
270cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new Svx3DLightOnOff2Item;
271cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new Svx3DLightOnOff3Item;
272cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_4 - SDRATTR_START ] = new Svx3DLightOnOff4Item;
273cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_5 - SDRATTR_START ] = new Svx3DLightOnOff5Item;
274cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new Svx3DLightOnOff6Item;
275cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new Svx3DLightOnOff7Item;
276cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new Svx3DLightOnOff8Item;
277cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new Svx3DLightDirection1Item;
278cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new Svx3DLightDirection2Item;
279cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new Svx3DLightDirection3Item;
280cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new Svx3DLightDirection4Item;
281cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new Svx3DLightDirection5Item;
282cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new Svx3DLightDirection6Item;
283cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new Svx3DLightDirection7Item;
284cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new Svx3DLightDirection8Item;
285cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new Svx3DShadowSlantItem;
286cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem;
287cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SdrCustomShapeEngineItem;
288cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_DATA - SDRATTR_START ] = new SdrCustomShapeDataItem;
289cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_GEOMETRY - SDRATTR_START ] = new SdrCustomShapeGeometryItem;
290cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL - SDRATTR_START ] = new SdrCustomShapeReplacementURLItem;
291cdf0e10cSrcweir 
292cdf0e10cSrcweir 	SvxBoxItem* pboxItem = new SvxBoxItem( SDRATTR_TABLE_BORDER );
293cdf0e10cSrcweir 	pboxItem->SetDistance( 100 );
294cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER - SDRATTR_START ] = pboxItem;
295cdf0e10cSrcweir 
296cdf0e10cSrcweir 	SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER );
297cdf0e10cSrcweir 
298cdf0e10cSrcweir 	pBoxInfoItem->SetTable( sal_True );
299cdf0e10cSrcweir 	pBoxInfoItem->SetDist( sal_True);        // Abstandsfeld immer anzeigen
300cdf0e10cSrcweir //	pBoxInfoItem->SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
301cdf0e10cSrcweir //	pBoxInfoItem->SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
302cdf0e10cSrcweir 	pBoxInfoItem->SetValid( VALID_DISABLE, sal_True ); // Einzelne Linien koennen nur in Tabellen DontCare-Status haben
303cdf0e10cSrcweir 
304cdf0e10cSrcweir 	mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] =  pBoxInfoItem;
305cdf0e10cSrcweir //	mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_SHADOW - SDRATTR_START ] = new SvxShadowItem( SDRATTR_TABLE_BORDER_SHADOW );
306cdf0e10cSrcweir     mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR );
307cdf0e10cSrcweir     mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR );
308cdf0e10cSrcweir 
309cdf0e10cSrcweir 	// set own ItemInfos
310cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_SHADOW-SDRATTR_START]._nSID=SID_ATTR_FILL_SHADOW;
311cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_TEXT_FITTOSIZE-SDRATTR_START]._nSID=SID_ATTR_TEXT_FITTOSIZE;
312cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_GRAFCROP-SDRATTR_START]._nSID=SID_ATTR_GRAF_CROP;
313cdf0e10cSrcweir 
314cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_TABLE_BORDER - SDRATTR_START ]._nSID = SID_ATTR_BORDER_OUTER;
315cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ]._nSID = SID_ATTR_BORDER_INNER;
316cdf0e10cSrcweir //	mpLocalItemInfos[SDRATTR_TABLE_BORDER_SHADOW - SDRATTR_START ]._nSID = SID_ATTR_BORDER_SHADOW;
317cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_TLBR;
318cdf0e10cSrcweir 	mpLocalItemInfos[SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_BLTR;
319cdf0e10cSrcweir 
320cdf0e10cSrcweir 	// it's my own creation level, set Defaults and ItemInfos
321cdf0e10cSrcweir 	SetDefaults(mppLocalPoolDefaults);
322cdf0e10cSrcweir 	SetItemInfos(mpLocalItemInfos);
323cdf0e10cSrcweir }
324cdf0e10cSrcweir 
325cdf0e10cSrcweir /*************************************************************************
326cdf0e10cSrcweir |*
327cdf0e10cSrcweir |* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
328cdf0e10cSrcweir |*            (Parameter 2 = sal_True)
329cdf0e10cSrcweir |*
330cdf0e10cSrcweir \************************************************************************/
331cdf0e10cSrcweir 
SdrItemPool(const SdrItemPool & rPool)332cdf0e10cSrcweir SdrItemPool::SdrItemPool(const SdrItemPool& rPool)
333cdf0e10cSrcweir :	XOutdevItemPool(rPool)
334cdf0e10cSrcweir {
335cdf0e10cSrcweir }
336cdf0e10cSrcweir 
337cdf0e10cSrcweir /*************************************************************************
338cdf0e10cSrcweir |*
339cdf0e10cSrcweir |* Clone()
340cdf0e10cSrcweir |*
341cdf0e10cSrcweir \************************************************************************/
342cdf0e10cSrcweir 
Clone() const343cdf0e10cSrcweir SfxItemPool* __EXPORT SdrItemPool::Clone() const
344cdf0e10cSrcweir {
345cdf0e10cSrcweir 	return new SdrItemPool(*this);
346cdf0e10cSrcweir }
347cdf0e10cSrcweir 
348cdf0e10cSrcweir /*************************************************************************
349cdf0e10cSrcweir |*
350cdf0e10cSrcweir |* Destruktor
351cdf0e10cSrcweir |*
352cdf0e10cSrcweir \************************************************************************/
353cdf0e10cSrcweir 
~SdrItemPool()354cdf0e10cSrcweir SdrItemPool::~SdrItemPool()
355cdf0e10cSrcweir {
356cdf0e10cSrcweir 	// dtor of SfxItemPool
357cdf0e10cSrcweir 	Delete();
358cdf0e10cSrcweir 
359cdf0e10cSrcweir 	// clear own static Defaults
360cdf0e10cSrcweir 	if(mppLocalPoolDefaults)
361cdf0e10cSrcweir 	{
362cdf0e10cSrcweir 		const sal_uInt16 nBeg(SDRATTR_SHADOW_FIRST - SDRATTR_START);
363cdf0e10cSrcweir 		const sal_uInt16 nEnd2(SDRATTR_END - SDRATTR_START);
364cdf0e10cSrcweir 
365cdf0e10cSrcweir 		for(sal_uInt16 i(nBeg); i <= nEnd2; i++)
366cdf0e10cSrcweir 		{
367cdf0e10cSrcweir 			SetRefCount(*mppLocalPoolDefaults[i],0);
368cdf0e10cSrcweir 			delete mppLocalPoolDefaults[i];
369cdf0e10cSrcweir 			mppLocalPoolDefaults[i] = 0L;
370cdf0e10cSrcweir 		}
371cdf0e10cSrcweir 	}
372cdf0e10cSrcweir 
373cdf0e10cSrcweir 	// split pools before detroying
374cdf0e10cSrcweir 	SetSecondaryPool(NULL);
375cdf0e10cSrcweir }
376cdf0e10cSrcweir 
GetPresentation(const SfxPoolItem & rItem,SfxItemPresentation ePresentation,SfxMapUnit ePresentationMetric,XubString & rText,const IntlWrapper * pIntlWrapper) const377cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrItemPool::GetPresentation(
378cdf0e10cSrcweir 			  const SfxPoolItem& rItem, SfxItemPresentation ePresentation,
379cdf0e10cSrcweir 			  SfxMapUnit ePresentationMetric, XubString& rText,
380cdf0e10cSrcweir               const IntlWrapper * pIntlWrapper) const
381cdf0e10cSrcweir {
382cdf0e10cSrcweir 	if (!IsInvalidItem(&rItem)) {
383cdf0e10cSrcweir 		sal_uInt16 nWhich=rItem.Which();
384cdf0e10cSrcweir 		if (nWhich>=SDRATTR_SHADOW_FIRST && nWhich<=SDRATTR_END) {
385cdf0e10cSrcweir 			rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS,
386cdf0e10cSrcweir 						GetMetric(nWhich),ePresentationMetric,rText,
387cdf0e10cSrcweir                         pIntlWrapper);
388cdf0e10cSrcweir 			String aStr;
389cdf0e10cSrcweir 
390cdf0e10cSrcweir 			TakeItemName(nWhich, aStr);
391cdf0e10cSrcweir 			aStr += sal_Unicode(' ');
392cdf0e10cSrcweir 			rText.Insert(aStr, 0);
393cdf0e10cSrcweir 
394cdf0e10cSrcweir 			return ePresentation;
395cdf0e10cSrcweir 		}
396cdf0e10cSrcweir 	}
397cdf0e10cSrcweir     return XOutdevItemPool::GetPresentation(rItem,ePresentation,ePresentationMetric,rText,pIntlWrapper);
398cdf0e10cSrcweir }
399cdf0e10cSrcweir 
TakeItemName(sal_uInt16 nWhich,String & rItemName)400cdf0e10cSrcweir void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName)
401cdf0e10cSrcweir {
402cdf0e10cSrcweir 	ResMgr* pResMgr = ImpGetResMgr();
403cdf0e10cSrcweir 	sal_uInt16	nResId = SIP_UNKNOWN_ATTR;
404cdf0e10cSrcweir 
405cdf0e10cSrcweir 	switch (nWhich)
406cdf0e10cSrcweir 	{
407cdf0e10cSrcweir 		case XATTR_LINESTYLE        : nResId = SIP_XA_LINESTYLE;break;
408cdf0e10cSrcweir 		case XATTR_LINEDASH         : nResId = SIP_XA_LINEDASH;break;
409cdf0e10cSrcweir 		case XATTR_LINEWIDTH        : nResId = SIP_XA_LINEWIDTH;break;
410cdf0e10cSrcweir 		case XATTR_LINECOLOR        : nResId = SIP_XA_LINECOLOR;break;
411cdf0e10cSrcweir 		case XATTR_LINESTART        : nResId = SIP_XA_LINESTART;break;
412cdf0e10cSrcweir 		case XATTR_LINEEND          : nResId = SIP_XA_LINEEND;break;
413cdf0e10cSrcweir 		case XATTR_LINESTARTWIDTH   : nResId = SIP_XA_LINESTARTWIDTH;break;
414cdf0e10cSrcweir 		case XATTR_LINEENDWIDTH     : nResId = SIP_XA_LINEENDWIDTH;break;
415cdf0e10cSrcweir 		case XATTR_LINESTARTCENTER  : nResId = SIP_XA_LINESTARTCENTER;break;
416cdf0e10cSrcweir 		case XATTR_LINEENDCENTER    : nResId = SIP_XA_LINEENDCENTER;break;
417cdf0e10cSrcweir 		case XATTR_LINETRANSPARENCE : nResId = SIP_XA_LINETRANSPARENCE;break;
418cdf0e10cSrcweir 		case XATTR_LINEJOINT		: nResId = SIP_XA_LINEJOINT;break;
419cdf0e10cSrcweir 		case XATTRSET_LINE          : nResId = SIP_XATTRSET_LINE;break;
420cdf0e10cSrcweir 
421cdf0e10cSrcweir 		case XATTR_FILLSTYLE			: nResId = SIP_XA_FILLSTYLE;break;
422cdf0e10cSrcweir 		case XATTR_FILLCOLOR			: nResId = SIP_XA_FILLCOLOR;break;
423cdf0e10cSrcweir 		case XATTR_FILLGRADIENT			: nResId = SIP_XA_FILLGRADIENT;break;
424cdf0e10cSrcweir 		case XATTR_FILLHATCH			: nResId = SIP_XA_FILLHATCH;break;
425cdf0e10cSrcweir 		case XATTR_FILLBITMAP			: nResId = SIP_XA_FILLBITMAP;break;
426cdf0e10cSrcweir 		case XATTR_FILLTRANSPARENCE		: nResId = SIP_XA_FILLTRANSPARENCE;break;
427cdf0e10cSrcweir 		case XATTR_GRADIENTSTEPCOUNT	: nResId = SIP_XA_GRADIENTSTEPCOUNT;break;
428cdf0e10cSrcweir 		case XATTR_FILLBMP_TILE			: nResId = SIP_XA_FILLBMP_TILE;break;
429cdf0e10cSrcweir 		case XATTR_FILLBMP_POS			: nResId = SIP_XA_FILLBMP_POS;break;
430cdf0e10cSrcweir 		case XATTR_FILLBMP_SIZEX		: nResId = SIP_XA_FILLBMP_SIZEX;break;
431cdf0e10cSrcweir 		case XATTR_FILLBMP_SIZEY		: nResId = SIP_XA_FILLBMP_SIZEY;break;
432cdf0e10cSrcweir 		case XATTR_FILLFLOATTRANSPARENCE: nResId = SIP_XA_FILLFLOATTRANSPARENCE;break;
433cdf0e10cSrcweir 		case XATTR_SECONDARYFILLCOLOR	: nResId = SIP_XA_SECONDARYFILLCOLOR;break;
434cdf0e10cSrcweir 		case XATTR_FILLBMP_SIZELOG		: nResId = SIP_XA_FILLBMP_SIZELOG;break;
435cdf0e10cSrcweir 		case XATTR_FILLBMP_TILEOFFSETX	: nResId = SIP_XA_FILLBMP_TILEOFFSETX;break;
436cdf0e10cSrcweir 		case XATTR_FILLBMP_TILEOFFSETY	: nResId = SIP_XA_FILLBMP_TILEOFFSETY;break;
437cdf0e10cSrcweir 		case XATTR_FILLBMP_STRETCH		: nResId = SIP_XA_FILLBMP_STRETCH;break;
438cdf0e10cSrcweir 		case XATTR_FILLBMP_POSOFFSETX	: nResId = SIP_XA_FILLBMP_POSOFFSETX;break;
439cdf0e10cSrcweir 		case XATTR_FILLBMP_POSOFFSETY	: nResId = SIP_XA_FILLBMP_POSOFFSETY;break;
440cdf0e10cSrcweir 		case XATTR_FILLBACKGROUND		: nResId = SIP_XA_FILLBACKGROUND;break;
441cdf0e10cSrcweir 
442cdf0e10cSrcweir 		case XATTRSET_FILL             : nResId = SIP_XATTRSET_FILL;break;
443cdf0e10cSrcweir 
444cdf0e10cSrcweir 		case XATTR_FORMTXTSTYLE     : nResId = SIP_XA_FORMTXTSTYLE;break;
445cdf0e10cSrcweir 		case XATTR_FORMTXTADJUST    : nResId = SIP_XA_FORMTXTADJUST;break;
446cdf0e10cSrcweir 		case XATTR_FORMTXTDISTANCE  : nResId = SIP_XA_FORMTXTDISTANCE;break;
447cdf0e10cSrcweir 		case XATTR_FORMTXTSTART     : nResId = SIP_XA_FORMTXTSTART;break;
448cdf0e10cSrcweir 		case XATTR_FORMTXTMIRROR    : nResId = SIP_XA_FORMTXTMIRROR;break;
449cdf0e10cSrcweir 		case XATTR_FORMTXTOUTLINE   : nResId = SIP_XA_FORMTXTOUTLINE;break;
450cdf0e10cSrcweir 		case XATTR_FORMTXTSHADOW    : nResId = SIP_XA_FORMTXTSHADOW;break;
451cdf0e10cSrcweir 		case XATTR_FORMTXTSHDWCOLOR : nResId = SIP_XA_FORMTXTSHDWCOLOR;break;
452cdf0e10cSrcweir 		case XATTR_FORMTXTSHDWXVAL  : nResId = SIP_XA_FORMTXTSHDWXVAL;break;
453cdf0e10cSrcweir 		case XATTR_FORMTXTSHDWYVAL  : nResId = SIP_XA_FORMTXTSHDWYVAL;break;
454cdf0e10cSrcweir 		case XATTR_FORMTXTHIDEFORM  : nResId = SIP_XA_FORMTXTHIDEFORM;break;
455cdf0e10cSrcweir 		case XATTR_FORMTXTSHDWTRANSP: nResId = SIP_XA_FORMTXTSHDWTRANSP;break;
456cdf0e10cSrcweir 
457cdf0e10cSrcweir 		case SDRATTR_SHADOW            : nResId = SIP_SA_SHADOW;break;
458cdf0e10cSrcweir 		case SDRATTR_SHADOWCOLOR       : nResId = SIP_SA_SHADOWCOLOR;break;
459cdf0e10cSrcweir 		case SDRATTR_SHADOWXDIST       : nResId = SIP_SA_SHADOWXDIST;break;
460cdf0e10cSrcweir 		case SDRATTR_SHADOWYDIST       : nResId = SIP_SA_SHADOWYDIST;break;
461cdf0e10cSrcweir 		case SDRATTR_SHADOWTRANSPARENCE: nResId = SIP_SA_SHADOWTRANSPARENCE;break;
462cdf0e10cSrcweir 		case SDRATTR_SHADOW3D          : nResId = SIP_SA_SHADOW3D;break;
463cdf0e10cSrcweir 		case SDRATTR_SHADOWPERSP       : nResId = SIP_SA_SHADOWPERSP;break;
464cdf0e10cSrcweir 
465cdf0e10cSrcweir 		case SDRATTR_CAPTIONTYPE      : nResId = SIP_SA_CAPTIONTYPE;break;
466cdf0e10cSrcweir 		case SDRATTR_CAPTIONFIXEDANGLE: nResId = SIP_SA_CAPTIONFIXEDANGLE;break;
467cdf0e10cSrcweir 		case SDRATTR_CAPTIONANGLE     : nResId = SIP_SA_CAPTIONANGLE;break;
468cdf0e10cSrcweir 		case SDRATTR_CAPTIONGAP       : nResId = SIP_SA_CAPTIONGAP;break;
469cdf0e10cSrcweir 		case SDRATTR_CAPTIONESCDIR    : nResId = SIP_SA_CAPTIONESCDIR;break;
470cdf0e10cSrcweir 		case SDRATTR_CAPTIONESCISREL  : nResId = SIP_SA_CAPTIONESCISREL;break;
471cdf0e10cSrcweir 		case SDRATTR_CAPTIONESCREL    : nResId = SIP_SA_CAPTIONESCREL;break;
472cdf0e10cSrcweir 		case SDRATTR_CAPTIONESCABS    : nResId = SIP_SA_CAPTIONESCABS;break;
473cdf0e10cSrcweir 		case SDRATTR_CAPTIONLINELEN   : nResId = SIP_SA_CAPTIONLINELEN;break;
474cdf0e10cSrcweir 		case SDRATTR_CAPTIONFITLINELEN: nResId = SIP_SA_CAPTIONFITLINELEN;break;
475cdf0e10cSrcweir 
476cdf0e10cSrcweir 		case SDRATTR_ECKENRADIUS			: nResId = SIP_SA_ECKENRADIUS;break;
477cdf0e10cSrcweir 		case SDRATTR_TEXT_MINFRAMEHEIGHT	: nResId = SIP_SA_TEXT_MINFRAMEHEIGHT;break;
478cdf0e10cSrcweir 		case SDRATTR_TEXT_AUTOGROWHEIGHT	: nResId = SIP_SA_TEXT_AUTOGROWHEIGHT;break;
479cdf0e10cSrcweir 		case SDRATTR_TEXT_FITTOSIZE			: nResId = SIP_SA_TEXT_FITTOSIZE;break;
480cdf0e10cSrcweir 		case SDRATTR_TEXT_LEFTDIST			: nResId = SIP_SA_TEXT_LEFTDIST;break;
481cdf0e10cSrcweir 		case SDRATTR_TEXT_RIGHTDIST			: nResId = SIP_SA_TEXT_RIGHTDIST;break;
482cdf0e10cSrcweir 		case SDRATTR_TEXT_UPPERDIST			: nResId = SIP_SA_TEXT_UPPERDIST;break;
483cdf0e10cSrcweir 		case SDRATTR_TEXT_LOWERDIST			: nResId = SIP_SA_TEXT_LOWERDIST;break;
484cdf0e10cSrcweir 		case SDRATTR_TEXT_VERTADJUST		: nResId = SIP_SA_TEXT_VERTADJUST;break;
485cdf0e10cSrcweir 		case SDRATTR_TEXT_MAXFRAMEHEIGHT	: nResId = SIP_SA_TEXT_MAXFRAMEHEIGHT;break;
486cdf0e10cSrcweir 		case SDRATTR_TEXT_MINFRAMEWIDTH		: nResId = SIP_SA_TEXT_MINFRAMEWIDTH;break;
487cdf0e10cSrcweir 		case SDRATTR_TEXT_MAXFRAMEWIDTH		: nResId = SIP_SA_TEXT_MAXFRAMEWIDTH;break;
488cdf0e10cSrcweir 		case SDRATTR_TEXT_AUTOGROWWIDTH		: nResId = SIP_SA_TEXT_AUTOGROWWIDTH;break;
489cdf0e10cSrcweir 		case SDRATTR_TEXT_HORZADJUST		: nResId = SIP_SA_TEXT_HORZADJUST;break;
490cdf0e10cSrcweir 		case SDRATTR_TEXT_ANIKIND			: nResId = SIP_SA_TEXT_ANIKIND;break;
491cdf0e10cSrcweir 		case SDRATTR_TEXT_ANIDIRECTION		: nResId = SIP_SA_TEXT_ANIDIRECTION;break;
492cdf0e10cSrcweir 		case SDRATTR_TEXT_ANISTARTINSIDE	: nResId = SIP_SA_TEXT_ANISTARTINSIDE;break;
493cdf0e10cSrcweir 		case SDRATTR_TEXT_ANISTOPINSIDE		: nResId = SIP_SA_TEXT_ANISTOPINSIDE;break;
494cdf0e10cSrcweir 		case SDRATTR_TEXT_ANICOUNT			: nResId = SIP_SA_TEXT_ANICOUNT;break;
495cdf0e10cSrcweir 		case SDRATTR_TEXT_ANIDELAY			: nResId = SIP_SA_TEXT_ANIDELAY;break;
496cdf0e10cSrcweir 		case SDRATTR_TEXT_ANIAMOUNT			: nResId = SIP_SA_TEXT_ANIAMOUNT;break;
497cdf0e10cSrcweir 		case SDRATTR_TEXT_CONTOURFRAME		: nResId = SIP_SA_TEXT_CONTOURFRAME;break;
498cdf0e10cSrcweir 		case SDRATTR_CUSTOMSHAPE_ADJUSTMENT	: nResId = SIP_SA_CUSTOMSHAPE_ADJUSTMENT;break;
499cdf0e10cSrcweir 		case SDRATTR_XMLATTRIBUTES			: nResId = SIP_SA_XMLATTRIBUTES;break;
500cdf0e10cSrcweir 		case SDRATTR_TEXT_USEFIXEDCELLHEIGHT: nResId = SIP_SA_TEXT_USEFIXEDCELLHEIGHT;break;
501cdf0e10cSrcweir 		case SDRATTR_TEXT_WORDWRAP			: nResId = SIP_SA_WORDWRAP;break;
502cdf0e10cSrcweir 		case SDRATTR_TEXT_AUTOGROWSIZE		: nResId = SIP_SA_AUTOGROWSIZE;break;
503cdf0e10cSrcweir 
504cdf0e10cSrcweir 		case SDRATTR_EDGEKIND           : nResId = SIP_SA_EDGEKIND;break;
505cdf0e10cSrcweir 		case SDRATTR_EDGENODE1HORZDIST  : nResId = SIP_SA_EDGENODE1HORZDIST;break;
506cdf0e10cSrcweir 		case SDRATTR_EDGENODE1VERTDIST  : nResId = SIP_SA_EDGENODE1VERTDIST;break;
507cdf0e10cSrcweir 		case SDRATTR_EDGENODE2HORZDIST  : nResId = SIP_SA_EDGENODE2HORZDIST;break;
508cdf0e10cSrcweir 		case SDRATTR_EDGENODE2VERTDIST  : nResId = SIP_SA_EDGENODE2VERTDIST;break;
509cdf0e10cSrcweir 		case SDRATTR_EDGENODE1GLUEDIST  : nResId = SIP_SA_EDGENODE1GLUEDIST;break;
510cdf0e10cSrcweir 		case SDRATTR_EDGENODE2GLUEDIST  : nResId = SIP_SA_EDGENODE2GLUEDIST;break;
511cdf0e10cSrcweir 		case SDRATTR_EDGELINEDELTAANZ   : nResId = SIP_SA_EDGELINEDELTAANZ;break;
512cdf0e10cSrcweir 		case SDRATTR_EDGELINE1DELTA     : nResId = SIP_SA_EDGELINE1DELTA;break;
513cdf0e10cSrcweir 		case SDRATTR_EDGELINE2DELTA     : nResId = SIP_SA_EDGELINE2DELTA;break;
514cdf0e10cSrcweir 		case SDRATTR_EDGELINE3DELTA     : nResId = SIP_SA_EDGELINE3DELTA;break;
515cdf0e10cSrcweir 
516cdf0e10cSrcweir 		case SDRATTR_MEASUREKIND             : nResId = SIP_SA_MEASUREKIND;break;
517cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTHPOS         : nResId = SIP_SA_MEASURETEXTHPOS;break;
518cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTVPOS         : nResId = SIP_SA_MEASURETEXTVPOS;break;
519cdf0e10cSrcweir 		case SDRATTR_MEASURELINEDIST         : nResId = SIP_SA_MEASURELINEDIST;break;
520cdf0e10cSrcweir 		case SDRATTR_MEASUREHELPLINEOVERHANG : nResId = SIP_SA_MEASUREHELPLINEOVERHANG;break;
521cdf0e10cSrcweir 		case SDRATTR_MEASUREHELPLINEDIST     : nResId = SIP_SA_MEASUREHELPLINEDIST;break;
522cdf0e10cSrcweir 		case SDRATTR_MEASUREHELPLINE1LEN     : nResId = SIP_SA_MEASUREHELPLINE1LEN;break;
523cdf0e10cSrcweir 		case SDRATTR_MEASUREHELPLINE2LEN     : nResId = SIP_SA_MEASUREHELPLINE2LEN;break;
524cdf0e10cSrcweir 		case SDRATTR_MEASUREBELOWREFEDGE     : nResId = SIP_SA_MEASUREBELOWREFEDGE;break;
525cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTROTA90       : nResId = SIP_SA_MEASURETEXTROTA90;break;
526cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTUPSIDEDOWN   : nResId = SIP_SA_MEASURETEXTUPSIDEDOWN;break;
527cdf0e10cSrcweir 		case SDRATTR_MEASUREOVERHANG         : nResId = SIP_SA_MEASUREOVERHANG;break;
528cdf0e10cSrcweir 		case SDRATTR_MEASUREUNIT             : nResId = SIP_SA_MEASUREUNIT;break;
529cdf0e10cSrcweir 		case SDRATTR_MEASURESCALE            : nResId = SIP_SA_MEASURESCALE;break;
530cdf0e10cSrcweir 		case SDRATTR_MEASURESHOWUNIT         : nResId = SIP_SA_MEASURESHOWUNIT;break;
531cdf0e10cSrcweir 		case SDRATTR_MEASUREFORMATSTRING     : nResId = SIP_SA_MEASUREFORMATSTRING;break;
532cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTAUTOANGLE    : nResId = SIP_SA_MEASURETEXTAUTOANGLE;break;
533cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTAUTOANGLEVIEW: nResId = SIP_SA_MEASURETEXTAUTOANGLEVIEW;break;
534cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTISFIXEDANGLE : nResId = SIP_SA_MEASURETEXTISFIXEDANGLE;break;
535cdf0e10cSrcweir 		case SDRATTR_MEASURETEXTFIXEDANGLE   : nResId = SIP_SA_MEASURETEXTFIXEDANGLE;break;
536cdf0e10cSrcweir 		case SDRATTR_MEASUREDECIMALPLACES    : nResId = SIP_SA_MEASUREDECIMALPLACES;break;
537cdf0e10cSrcweir 
538cdf0e10cSrcweir 		case SDRATTR_CIRCKIND      : nResId = SIP_SA_CIRCKIND;break;
539cdf0e10cSrcweir 		case SDRATTR_CIRCSTARTANGLE: nResId = SIP_SA_CIRCSTARTANGLE;break;
540cdf0e10cSrcweir 		case SDRATTR_CIRCENDANGLE  : nResId = SIP_SA_CIRCENDANGLE;break;
541cdf0e10cSrcweir 
542cdf0e10cSrcweir 		case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break;
543cdf0e10cSrcweir 		case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break;
544cdf0e10cSrcweir 		case SDRATTR_OBJPRINTABLE   : nResId = SIP_SA_OBJPRINTABLE;break;
545cdf0e10cSrcweir 		case SDRATTR_OBJVISIBLE		: nResId = SIP_SA_OBJVISIBLE;break;
546cdf0e10cSrcweir 		case SDRATTR_LAYERID        : nResId = SIP_SA_LAYERID;break;
547cdf0e10cSrcweir 		case SDRATTR_LAYERNAME      : nResId = SIP_SA_LAYERNAME;break;
548cdf0e10cSrcweir 		case SDRATTR_OBJECTNAME     : nResId = SIP_SA_OBJECTNAME;break;
549cdf0e10cSrcweir 		case SDRATTR_ALLPOSITIONX   : nResId = SIP_SA_ALLPOSITIONX;break;
550cdf0e10cSrcweir 		case SDRATTR_ALLPOSITIONY   : nResId = SIP_SA_ALLPOSITIONY;break;
551cdf0e10cSrcweir 		case SDRATTR_ALLSIZEWIDTH   : nResId = SIP_SA_ALLSIZEWIDTH;break;
552cdf0e10cSrcweir 		case SDRATTR_ALLSIZEHEIGHT  : nResId = SIP_SA_ALLSIZEHEIGHT;break;
553cdf0e10cSrcweir 		case SDRATTR_ONEPOSITIONX   : nResId = SIP_SA_ONEPOSITIONX;break;
554cdf0e10cSrcweir 		case SDRATTR_ONEPOSITIONY   : nResId = SIP_SA_ONEPOSITIONY;break;
555cdf0e10cSrcweir 		case SDRATTR_ONESIZEWIDTH   : nResId = SIP_SA_ONESIZEWIDTH;break;
556cdf0e10cSrcweir 		case SDRATTR_ONESIZEHEIGHT  : nResId = SIP_SA_ONESIZEHEIGHT;break;
557cdf0e10cSrcweir 		case SDRATTR_LOGICSIZEWIDTH : nResId = SIP_SA_LOGICSIZEWIDTH;break;
558cdf0e10cSrcweir 		case SDRATTR_LOGICSIZEHEIGHT: nResId = SIP_SA_LOGICSIZEHEIGHT;break;
559cdf0e10cSrcweir 		case SDRATTR_ROTATEANGLE    : nResId = SIP_SA_ROTATEANGLE;break;
560cdf0e10cSrcweir 		case SDRATTR_SHEARANGLE     : nResId = SIP_SA_SHEARANGLE;break;
561cdf0e10cSrcweir 		case SDRATTR_MOVEX          : nResId = SIP_SA_MOVEX;break;
562cdf0e10cSrcweir 		case SDRATTR_MOVEY          : nResId = SIP_SA_MOVEY;break;
563cdf0e10cSrcweir 		case SDRATTR_RESIZEXONE     : nResId = SIP_SA_RESIZEXONE;break;
564cdf0e10cSrcweir 		case SDRATTR_RESIZEYONE     : nResId = SIP_SA_RESIZEYONE;break;
565cdf0e10cSrcweir 		case SDRATTR_ROTATEONE      : nResId = SIP_SA_ROTATEONE;break;
566cdf0e10cSrcweir 		case SDRATTR_HORZSHEARONE   : nResId = SIP_SA_HORZSHEARONE;break;
567cdf0e10cSrcweir 		case SDRATTR_VERTSHEARONE   : nResId = SIP_SA_VERTSHEARONE;break;
568cdf0e10cSrcweir 		case SDRATTR_RESIZEXALL     : nResId = SIP_SA_RESIZEXALL;break;
569cdf0e10cSrcweir 		case SDRATTR_RESIZEYALL     : nResId = SIP_SA_RESIZEYALL;break;
570cdf0e10cSrcweir 		case SDRATTR_ROTATEALL      : nResId = SIP_SA_ROTATEALL;break;
571cdf0e10cSrcweir 		case SDRATTR_HORZSHEARALL   : nResId = SIP_SA_HORZSHEARALL;break;
572cdf0e10cSrcweir 		case SDRATTR_VERTSHEARALL   : nResId = SIP_SA_VERTSHEARALL;break;
573cdf0e10cSrcweir 		case SDRATTR_TRANSFORMREF1X : nResId = SIP_SA_TRANSFORMREF1X;break;
574cdf0e10cSrcweir 		case SDRATTR_TRANSFORMREF1Y : nResId = SIP_SA_TRANSFORMREF1Y;break;
575cdf0e10cSrcweir 		case SDRATTR_TRANSFORMREF2X : nResId = SIP_SA_TRANSFORMREF2X;break;
576cdf0e10cSrcweir 		case SDRATTR_TRANSFORMREF2Y : nResId = SIP_SA_TRANSFORMREF2Y;break;
577cdf0e10cSrcweir 
578cdf0e10cSrcweir 		case SDRATTR_GRAFRED			: nResId = SIP_SA_GRAFRED;break;
579cdf0e10cSrcweir 		case SDRATTR_GRAFGREEN			: nResId = SIP_SA_GRAFGREEN;break;
580cdf0e10cSrcweir 		case SDRATTR_GRAFBLUE			: nResId = SIP_SA_GRAFBLUE;break;
581cdf0e10cSrcweir 		case SDRATTR_GRAFLUMINANCE		: nResId = SIP_SA_GRAFLUMINANCE;break;
582cdf0e10cSrcweir 		case SDRATTR_GRAFCONTRAST		: nResId = SIP_SA_GRAFCONTRAST;break;
583cdf0e10cSrcweir 		case SDRATTR_GRAFGAMMA			: nResId = SIP_SA_GRAFGAMMA;break;
584cdf0e10cSrcweir 		case SDRATTR_GRAFTRANSPARENCE	: nResId = SIP_SA_GRAFTRANSPARENCE;break;
585cdf0e10cSrcweir 		case SDRATTR_GRAFINVERT 		: nResId = SIP_SA_GRAFINVERT;break;
586cdf0e10cSrcweir 		case SDRATTR_GRAFMODE			: nResId = SIP_SA_GRAFMODE;break;
587cdf0e10cSrcweir 		case SDRATTR_GRAFCROP			: nResId = SIP_SA_GRAFCROP;break;
588cdf0e10cSrcweir 
589cdf0e10cSrcweir 		case EE_PARA_HYPHENATE  : nResId = SIP_EE_PARA_HYPHENATE;break;
590cdf0e10cSrcweir 		case EE_PARA_BULLETSTATE: nResId = SIP_EE_PARA_BULLETSTATE;break;
591cdf0e10cSrcweir 		case EE_PARA_OUTLLRSPACE: nResId = SIP_EE_PARA_OUTLLRSPACE;break;
592cdf0e10cSrcweir 		case EE_PARA_OUTLLEVEL  : nResId = SIP_EE_PARA_OUTLLEVEL;break;
593cdf0e10cSrcweir 		case EE_PARA_BULLET     : nResId = SIP_EE_PARA_BULLET;break;
594cdf0e10cSrcweir 		case EE_PARA_LRSPACE    : nResId = SIP_EE_PARA_LRSPACE;break;
595cdf0e10cSrcweir 		case EE_PARA_ULSPACE    : nResId = SIP_EE_PARA_ULSPACE;break;
596cdf0e10cSrcweir 		case EE_PARA_SBL        : nResId = SIP_EE_PARA_SBL;break;
597cdf0e10cSrcweir 		case EE_PARA_JUST       : nResId = SIP_EE_PARA_JUST;break;
598cdf0e10cSrcweir 		case EE_PARA_TABS       : nResId = SIP_EE_PARA_TABS;break;
599cdf0e10cSrcweir 
600cdf0e10cSrcweir 		case EE_CHAR_COLOR      : nResId = SIP_EE_CHAR_COLOR;break;
601cdf0e10cSrcweir 		case EE_CHAR_FONTINFO   : nResId = SIP_EE_CHAR_FONTINFO;break;
602cdf0e10cSrcweir 		case EE_CHAR_FONTHEIGHT : nResId = SIP_EE_CHAR_FONTHEIGHT;break;
603cdf0e10cSrcweir 		case EE_CHAR_FONTWIDTH  : nResId = SIP_EE_CHAR_FONTWIDTH;break;
604cdf0e10cSrcweir 		case EE_CHAR_WEIGHT     : nResId = SIP_EE_CHAR_WEIGHT;break;
605cdf0e10cSrcweir 		case EE_CHAR_UNDERLINE  : nResId = SIP_EE_CHAR_UNDERLINE;break;
606cdf0e10cSrcweir 		case EE_CHAR_OVERLINE   : nResId = SIP_EE_CHAR_OVERLINE;break;
607cdf0e10cSrcweir 		case EE_CHAR_STRIKEOUT  : nResId = SIP_EE_CHAR_STRIKEOUT;break;
608cdf0e10cSrcweir 		case EE_CHAR_ITALIC     : nResId = SIP_EE_CHAR_ITALIC;break;
609cdf0e10cSrcweir 		case EE_CHAR_OUTLINE    : nResId = SIP_EE_CHAR_OUTLINE;break;
610cdf0e10cSrcweir 		case EE_CHAR_SHADOW     : nResId = SIP_EE_CHAR_SHADOW;break;
611cdf0e10cSrcweir 		case EE_CHAR_ESCAPEMENT : nResId = SIP_EE_CHAR_ESCAPEMENT;break;
612cdf0e10cSrcweir 		case EE_CHAR_PAIRKERNING: nResId = SIP_EE_CHAR_PAIRKERNING;break;
613cdf0e10cSrcweir 		case EE_CHAR_KERNING    : nResId = SIP_EE_CHAR_KERNING;break;
614cdf0e10cSrcweir 		case EE_CHAR_WLM        : nResId = SIP_EE_CHAR_WLM;break;
615cdf0e10cSrcweir 		case EE_FEATURE_TAB     : nResId = SIP_EE_FEATURE_TAB;break;
616cdf0e10cSrcweir 		case EE_FEATURE_LINEBR  : nResId = SIP_EE_FEATURE_LINEBR;break;
617cdf0e10cSrcweir 		case EE_FEATURE_NOTCONV : nResId = SIP_EE_FEATURE_NOTCONV;break;
618cdf0e10cSrcweir 		case EE_FEATURE_FIELD   : nResId = SIP_EE_FEATURE_FIELD;break;
619cdf0e10cSrcweir 	} // switch
620cdf0e10cSrcweir 
621cdf0e10cSrcweir 	rItemName = String( ResId( nResId, *pResMgr ) );
622cdf0e10cSrcweir }
623cdf0e10cSrcweir 
624cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
625cdf0e10cSrcweir // FractionItem
626cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
627cdf0e10cSrcweir 
628cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrFractionItem,SfxPoolItem);
629cdf0e10cSrcweir 
SdrFractionItem(sal_uInt16 nId,SvStream & rIn)630cdf0e10cSrcweir SdrFractionItem::SdrFractionItem(sal_uInt16 nId, SvStream& rIn):
631cdf0e10cSrcweir 	SfxPoolItem(nId)
632cdf0e10cSrcweir {
633cdf0e10cSrcweir 	sal_Int32 nMul,nDiv;
634cdf0e10cSrcweir 	rIn>>nMul;
635cdf0e10cSrcweir 	rIn>>nDiv;
636cdf0e10cSrcweir 	nValue=Fraction(nMul,nDiv);
637cdf0e10cSrcweir }
638cdf0e10cSrcweir 
operator ==(const SfxPoolItem & rCmp) const639cdf0e10cSrcweir int __EXPORT SdrFractionItem::operator==(const SfxPoolItem& rCmp) const
640cdf0e10cSrcweir {
641cdf0e10cSrcweir 	return SfxPoolItem::operator==(rCmp) &&
642cdf0e10cSrcweir 		   ((SdrFractionItem&)rCmp).GetValue()==nValue;
643cdf0e10cSrcweir }
644cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePresentation,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const645cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrFractionItem::GetPresentation(
646cdf0e10cSrcweir 	SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/,
647cdf0e10cSrcweir     SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const
648cdf0e10cSrcweir {
649cdf0e10cSrcweir 	if(nValue.IsValid())
650cdf0e10cSrcweir 	{
651cdf0e10cSrcweir 		sal_Int32 nDiv = nValue.GetDenominator();
652cdf0e10cSrcweir 		rText = UniString::CreateFromInt32(nValue.GetNumerator());
653cdf0e10cSrcweir 
654cdf0e10cSrcweir 		if(nDiv != 1)
655cdf0e10cSrcweir 		{
656cdf0e10cSrcweir 			rText += sal_Unicode('/');
657cdf0e10cSrcweir 			rText += UniString::CreateFromInt32(nDiv);
658cdf0e10cSrcweir 		}
659cdf0e10cSrcweir 	}
660cdf0e10cSrcweir 	else
661cdf0e10cSrcweir 	{
662cdf0e10cSrcweir 		rText = UniString();
663cdf0e10cSrcweir 		rText += sal_Unicode('?');
664cdf0e10cSrcweir 	}
665cdf0e10cSrcweir 
666cdf0e10cSrcweir 	if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
667cdf0e10cSrcweir 	{
668cdf0e10cSrcweir 		XubString aStr;
669cdf0e10cSrcweir 
670cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
671cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
672cdf0e10cSrcweir 		rText.Insert(aStr, 0);
673cdf0e10cSrcweir 	}
674cdf0e10cSrcweir 
675cdf0e10cSrcweir 	return ePresentation;
676cdf0e10cSrcweir }
677cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const678cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrFractionItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
679cdf0e10cSrcweir {
680cdf0e10cSrcweir 	return new SdrFractionItem(Which(),rIn);
681cdf0e10cSrcweir }
682cdf0e10cSrcweir 
Store(SvStream & rOut,sal_uInt16) const683cdf0e10cSrcweir SvStream& __EXPORT SdrFractionItem::Store(SvStream& rOut, sal_uInt16 /*nItemVers*/) const
684cdf0e10cSrcweir {
685cdf0e10cSrcweir 	rOut<<sal_Int32(nValue.GetNumerator());
686cdf0e10cSrcweir 	rOut<<sal_Int32(nValue.GetDenominator());
687cdf0e10cSrcweir 	return rOut;
688cdf0e10cSrcweir }
689cdf0e10cSrcweir 
Clone(SfxItemPool *) const690cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrFractionItem::Clone(SfxItemPool * /*pPool*/) const
691cdf0e10cSrcweir {
692cdf0e10cSrcweir 	return new SdrFractionItem(Which(),GetValue());
693cdf0e10cSrcweir }
694cdf0e10cSrcweir 
695cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const696cdf0e10cSrcweir int __EXPORT SdrFractionItem::IsPoolable() const
697cdf0e10cSrcweir {
698cdf0e10cSrcweir 	sal_uInt16 nId=Which();
699cdf0e10cSrcweir 	return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
700cdf0e10cSrcweir }
701cdf0e10cSrcweir #endif
702cdf0e10cSrcweir 
703cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
704cdf0e10cSrcweir // ScaleItem
705cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
706cdf0e10cSrcweir 
707cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrScaleItem,SdrFractionItem);
708cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePresentation,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const709cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrScaleItem::GetPresentation(
710cdf0e10cSrcweir 	SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/,
711cdf0e10cSrcweir     SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const
712cdf0e10cSrcweir {
713cdf0e10cSrcweir 	if(GetValue().IsValid())
714cdf0e10cSrcweir 	{
715cdf0e10cSrcweir 		sal_Int32 nDiv = GetValue().GetDenominator();
716cdf0e10cSrcweir 
717cdf0e10cSrcweir 		rText = UniString::CreateFromInt32(GetValue().GetNumerator());
718cdf0e10cSrcweir 		rText += sal_Unicode(':');
719cdf0e10cSrcweir 		rText += UniString::CreateFromInt32(nDiv);
720cdf0e10cSrcweir 	}
721cdf0e10cSrcweir 	else
722cdf0e10cSrcweir 	{
723cdf0e10cSrcweir 		rText = UniString();
724cdf0e10cSrcweir 		rText += sal_Unicode('?');
725cdf0e10cSrcweir 	}
726cdf0e10cSrcweir 
727cdf0e10cSrcweir 	if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
728cdf0e10cSrcweir 	{
729cdf0e10cSrcweir 		XubString aStr;
730cdf0e10cSrcweir 
731cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
732cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
733cdf0e10cSrcweir 		rText.Insert(aStr, 0);
734cdf0e10cSrcweir 	}
735cdf0e10cSrcweir 
736cdf0e10cSrcweir 	return ePresentation;
737cdf0e10cSrcweir }
738cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const739cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrScaleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
740cdf0e10cSrcweir {
741cdf0e10cSrcweir 	return new SdrScaleItem(Which(),rIn);
742cdf0e10cSrcweir }
743cdf0e10cSrcweir 
Clone(SfxItemPool *) const744cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrScaleItem::Clone(SfxItemPool * /*pPool*/) const
745cdf0e10cSrcweir {
746cdf0e10cSrcweir 	return new SdrScaleItem(Which(),GetValue());
747cdf0e10cSrcweir }
748cdf0e10cSrcweir 
749cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
750cdf0e10cSrcweir // OnOffItem
751cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
752cdf0e10cSrcweir 
753cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrOnOffItem,SfxBoolItem);
754cdf0e10cSrcweir 
Clone(SfxItemPool *) const755cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrOnOffItem::Clone(SfxItemPool* /*pPool*/) const
756cdf0e10cSrcweir {
757cdf0e10cSrcweir 	return new SdrOnOffItem(Which(),GetValue());
758cdf0e10cSrcweir }
759cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const760cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrOnOffItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
761cdf0e10cSrcweir {
762cdf0e10cSrcweir 	return new SdrOnOffItem(Which(),rIn);
763cdf0e10cSrcweir }
764cdf0e10cSrcweir 
GetValueTextByVal(sal_Bool bVal) const765cdf0e10cSrcweir XubString __EXPORT SdrOnOffItem::GetValueTextByVal(sal_Bool bVal) const
766cdf0e10cSrcweir {
767cdf0e10cSrcweir 	if (bVal) return ImpGetResStr(STR_ItemValON);
768cdf0e10cSrcweir 	else return ImpGetResStr(STR_ItemValOFF);
769cdf0e10cSrcweir }
770cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const771cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrOnOffItem::GetPresentation(SfxItemPresentation ePres,
772cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
773cdf0e10cSrcweir {
774cdf0e10cSrcweir 	rText=GetValueTextByVal(GetValue());
775cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
776cdf0e10cSrcweir 		String aStr;
777cdf0e10cSrcweir 
778cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
779cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
780cdf0e10cSrcweir 		rText.Insert(aStr, 0);
781cdf0e10cSrcweir 	}
782cdf0e10cSrcweir 	return ePres;
783cdf0e10cSrcweir }
784cdf0e10cSrcweir 
785cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const786cdf0e10cSrcweir int __EXPORT SdrOnOffItem::IsPoolable() const
787cdf0e10cSrcweir {
788cdf0e10cSrcweir 	sal_uInt16 nId=Which();
789cdf0e10cSrcweir 	return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
790cdf0e10cSrcweir }
791cdf0e10cSrcweir #endif
792cdf0e10cSrcweir 
793cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrYesNoItem,SfxBoolItem);
794cdf0e10cSrcweir 
Clone(SfxItemPool *) const795cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrYesNoItem::Clone(SfxItemPool* /*pPool*/) const
796cdf0e10cSrcweir {
797cdf0e10cSrcweir 	return new SdrYesNoItem(Which(),GetValue());
798cdf0e10cSrcweir }
799cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const800cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrYesNoItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
801cdf0e10cSrcweir {
802cdf0e10cSrcweir 	return new SdrYesNoItem(Which(),rIn);
803cdf0e10cSrcweir }
804cdf0e10cSrcweir 
GetValueTextByVal(sal_Bool bVal) const805cdf0e10cSrcweir XubString __EXPORT SdrYesNoItem::GetValueTextByVal(sal_Bool bVal) const
806cdf0e10cSrcweir {
807cdf0e10cSrcweir 	if (bVal) return ImpGetResStr(STR_ItemValYES);
808cdf0e10cSrcweir 	else return ImpGetResStr(STR_ItemValNO);
809cdf0e10cSrcweir }
810cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const811cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrYesNoItem::GetPresentation(SfxItemPresentation ePres,
812cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
813cdf0e10cSrcweir {
814cdf0e10cSrcweir 	rText=GetValueTextByVal(GetValue());
815cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
816cdf0e10cSrcweir 		String aStr;
817cdf0e10cSrcweir 
818cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
819cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
820cdf0e10cSrcweir 		rText.Insert(aStr, 0);
821cdf0e10cSrcweir 	}
822cdf0e10cSrcweir 	return ePres;
823cdf0e10cSrcweir }
824cdf0e10cSrcweir 
825cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const826cdf0e10cSrcweir int __EXPORT SdrYesNoItem::IsPoolable() const
827cdf0e10cSrcweir {
828cdf0e10cSrcweir 	sal_uInt16 nId=Which();
829cdf0e10cSrcweir 	return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
830cdf0e10cSrcweir }
831cdf0e10cSrcweir #endif
832cdf0e10cSrcweir 
833cdf0e10cSrcweir //------------------------------------------------------------
834cdf0e10cSrcweir // class SdrPercentItem
835cdf0e10cSrcweir //------------------------------------------------------------
836cdf0e10cSrcweir 
837cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrPercentItem,SfxUInt16Item);
838cdf0e10cSrcweir 
Clone(SfxItemPool *) const839cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrPercentItem::Clone(SfxItemPool* /*pPool*/) const
840cdf0e10cSrcweir {
841cdf0e10cSrcweir 	return new SdrPercentItem(Which(),GetValue());
842cdf0e10cSrcweir }
843cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const844cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrPercentItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
845cdf0e10cSrcweir {
846cdf0e10cSrcweir 	return new SdrPercentItem(Which(),rIn);
847cdf0e10cSrcweir }
848cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const849cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrPercentItem::GetPresentation(
850cdf0e10cSrcweir 	SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/,
851cdf0e10cSrcweir     SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
852cdf0e10cSrcweir {
853cdf0e10cSrcweir 	rText = UniString::CreateFromInt32(GetValue());
854cdf0e10cSrcweir 	rText += sal_Unicode('%');
855cdf0e10cSrcweir 
856cdf0e10cSrcweir 	if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
857cdf0e10cSrcweir 	{
858cdf0e10cSrcweir 		XubString aStr;
859cdf0e10cSrcweir 
860cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
861cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
862cdf0e10cSrcweir 		rText.Insert(aStr, 0);
863cdf0e10cSrcweir 	}
864cdf0e10cSrcweir 
865cdf0e10cSrcweir 	return ePres;
866cdf0e10cSrcweir }
867cdf0e10cSrcweir 
868cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const869cdf0e10cSrcweir int __EXPORT SdrPercentItem::IsPoolable() const
870cdf0e10cSrcweir {
871cdf0e10cSrcweir 	sal_uInt16 nId=Which();
872cdf0e10cSrcweir 	return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
873cdf0e10cSrcweir }
874cdf0e10cSrcweir #endif
875cdf0e10cSrcweir 
876cdf0e10cSrcweir //------------------------------------------------------------
877cdf0e10cSrcweir // class SdrAngleItem
878cdf0e10cSrcweir //------------------------------------------------------------
879cdf0e10cSrcweir 
880cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrAngleItem,SfxInt32Item);
881cdf0e10cSrcweir 
Clone(SfxItemPool *) const882cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrAngleItem::Clone(SfxItemPool* /*pPool*/) const
883cdf0e10cSrcweir {
884cdf0e10cSrcweir 	return new SdrAngleItem(Which(),GetValue());
885cdf0e10cSrcweir }
886cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const887cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrAngleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
888cdf0e10cSrcweir {
889cdf0e10cSrcweir 	return new SdrAngleItem(Which(),rIn);
890cdf0e10cSrcweir }
891cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper * pIntlWrapper) const892cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrAngleItem::GetPresentation(
893cdf0e10cSrcweir 	SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
894cdf0e10cSrcweir     XubString& rText, const IntlWrapper * pIntlWrapper) const
895cdf0e10cSrcweir {
896cdf0e10cSrcweir 	sal_Int32 nValue(GetValue());
897cdf0e10cSrcweir 	sal_Bool bNeg(nValue < 0);
898cdf0e10cSrcweir 
899cdf0e10cSrcweir 	if(bNeg)
900cdf0e10cSrcweir 		nValue = -nValue;
901cdf0e10cSrcweir 
902cdf0e10cSrcweir 	rText = UniString::CreateFromInt32(nValue);
903cdf0e10cSrcweir 
904cdf0e10cSrcweir 	if(nValue)
905cdf0e10cSrcweir 	{
906cdf0e10cSrcweir 		sal_Unicode aUnicodeNull('0');
907cdf0e10cSrcweir 		xub_StrLen nAnz(2);
908cdf0e10cSrcweir 
909cdf0e10cSrcweir         const IntlWrapper* pMyIntlWrapper = NULL;
910cdf0e10cSrcweir //        DBG_ASSERT( pIntlWrapper, "SdrAngleItem::GetPresentation: using default App-IntlWrapper" );
911cdf0e10cSrcweir         if(!pIntlWrapper)
912cdf0e10cSrcweir             pIntlWrapper = pMyIntlWrapper = new IntlWrapper(
913cdf0e10cSrcweir                 ::comphelper::getProcessServiceFactory(),
914cdf0e10cSrcweir                 Application::GetSettings().GetLanguage() );
915cdf0e10cSrcweir 
916cdf0e10cSrcweir         if(pIntlWrapper->getLocaleData()->isNumLeadingZero())
917cdf0e10cSrcweir 			nAnz++;
918cdf0e10cSrcweir 
919cdf0e10cSrcweir 		while(rText.Len() < nAnz)
920cdf0e10cSrcweir 			rText.Insert(aUnicodeNull, 0);
921cdf0e10cSrcweir 
922cdf0e10cSrcweir 		xub_StrLen nLen = rText.Len();
923cdf0e10cSrcweir 		sal_Bool bNull1(rText.GetChar(nLen-1) == aUnicodeNull);
924cdf0e10cSrcweir 		sal_Bool bNull2(bNull1 && rText.GetChar(nLen-2) == aUnicodeNull);
925cdf0e10cSrcweir 
926cdf0e10cSrcweir 		if(bNull2)
927cdf0e10cSrcweir 		{
928cdf0e10cSrcweir 			// keine Nachkommastellen
929cdf0e10cSrcweir 			rText.Erase(nLen-2);
930cdf0e10cSrcweir 		}
931cdf0e10cSrcweir 		else
932cdf0e10cSrcweir 		{
933cdf0e10cSrcweir             sal_Unicode cDec =
934cdf0e10cSrcweir                 pIntlWrapper->getLocaleData()->getNumDecimalSep().GetChar(0);
935cdf0e10cSrcweir 			rText.Insert(cDec, nLen-2);
936cdf0e10cSrcweir 
937cdf0e10cSrcweir 			if(bNull1)
938cdf0e10cSrcweir 				rText.Erase(nLen);
939cdf0e10cSrcweir 		}
940cdf0e10cSrcweir 
941cdf0e10cSrcweir 		if(bNeg)
942cdf0e10cSrcweir 			rText.Insert(sal_Unicode('-'), 0);
943cdf0e10cSrcweir 
944cdf0e10cSrcweir         if ( pMyIntlWrapper )
945cdf0e10cSrcweir         {
946cdf0e10cSrcweir             delete pMyIntlWrapper;
947cdf0e10cSrcweir             pIntlWrapper = NULL;
948cdf0e10cSrcweir         }
949cdf0e10cSrcweir 	}
950cdf0e10cSrcweir 
951cdf0e10cSrcweir 	rText += sal_Unicode(DEGREE_CHAR);
952cdf0e10cSrcweir 
953cdf0e10cSrcweir 	if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
954cdf0e10cSrcweir 	{
955cdf0e10cSrcweir 		XubString aStr;
956cdf0e10cSrcweir 
957cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
958cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
959cdf0e10cSrcweir 		rText.Insert(aStr, 0);
960cdf0e10cSrcweir 	}
961cdf0e10cSrcweir 
962cdf0e10cSrcweir 	return ePres;
963cdf0e10cSrcweir }
964cdf0e10cSrcweir 
965cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const966cdf0e10cSrcweir int __EXPORT SdrAngleItem::IsPoolable() const
967cdf0e10cSrcweir {
968cdf0e10cSrcweir 	sal_uInt16 nId=Which();
969cdf0e10cSrcweir 	return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
970cdf0e10cSrcweir }
971cdf0e10cSrcweir #endif
972cdf0e10cSrcweir 
973cdf0e10cSrcweir //------------------------------------------------------------
974cdf0e10cSrcweir // class SdrMetricItem
975cdf0e10cSrcweir //------------------------------------------------------------
976cdf0e10cSrcweir 
977cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrMetricItem,SfxInt32Item);
978cdf0e10cSrcweir 
Clone(SfxItemPool *) const979cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMetricItem::Clone(SfxItemPool* /*pPool*/) const
980cdf0e10cSrcweir {
981cdf0e10cSrcweir 	return new SdrMetricItem(Which(),GetValue());
982cdf0e10cSrcweir }
983cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const984cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMetricItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
985cdf0e10cSrcweir {
986cdf0e10cSrcweir 	return new SdrMetricItem(Which(),rIn);
987cdf0e10cSrcweir }
988cdf0e10cSrcweir 
HasMetrics() const989cdf0e10cSrcweir FASTBOOL __EXPORT SdrMetricItem::HasMetrics() const
990cdf0e10cSrcweir {
991cdf0e10cSrcweir 	return sal_True;
992cdf0e10cSrcweir }
993cdf0e10cSrcweir 
ScaleMetrics(long nMul,long nDiv)994cdf0e10cSrcweir FASTBOOL __EXPORT SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
995cdf0e10cSrcweir {
996cdf0e10cSrcweir 	if (GetValue()!=0) {
997cdf0e10cSrcweir 		BigInt aVal(GetValue());
998cdf0e10cSrcweir 		aVal*=nMul;
999cdf0e10cSrcweir 		aVal+=nDiv/2; // fuer korrektes Runden
1000cdf0e10cSrcweir 		aVal/=nDiv;
1001cdf0e10cSrcweir 		SetValue(long(aVal));
1002cdf0e10cSrcweir 	}
1003cdf0e10cSrcweir 	return sal_True;
1004cdf0e10cSrcweir }
1005cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreMetric,SfxMapUnit ePresMetric,XubString & rText,const IntlWrapper *) const1006cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
1007cdf0e10cSrcweir                       SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const IntlWrapper *) const
1008cdf0e10cSrcweir {
1009cdf0e10cSrcweir 	long nValue=GetValue();
1010cdf0e10cSrcweir 	SdrFormatter aFmt((MapUnit)eCoreMetric,(MapUnit)ePresMetric);
1011cdf0e10cSrcweir 	aFmt.TakeStr(nValue,rText);
1012cdf0e10cSrcweir 	String aStr;
1013cdf0e10cSrcweir 	aFmt.TakeUnitStr((MapUnit)ePresMetric,aStr);
1014*ae2dc0faSTsutomu Uchino 	rText += sal_Unicode(' ');
1015cdf0e10cSrcweir 	rText+=aStr;
1016cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1017cdf0e10cSrcweir 		String aStr2;
1018cdf0e10cSrcweir 
1019cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr2);
1020cdf0e10cSrcweir 		aStr2 += sal_Unicode(' ');
1021cdf0e10cSrcweir 		rText.Insert(aStr2, 0);
1022cdf0e10cSrcweir 	}
1023cdf0e10cSrcweir 	return ePres;
1024cdf0e10cSrcweir }
1025cdf0e10cSrcweir 
1026cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const1027cdf0e10cSrcweir int __EXPORT SdrMetricItem::IsPoolable() const
1028cdf0e10cSrcweir {
1029cdf0e10cSrcweir 	sal_uInt16 nId=Which();
1030cdf0e10cSrcweir 	return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
1031cdf0e10cSrcweir }
1032cdf0e10cSrcweir #endif
1033cdf0e10cSrcweir 
1034cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
1035cdf0e10cSrcweir // Items des Legendenobjekts
1036cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
1037cdf0e10cSrcweir 
1038cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem,SfxEnumItem);
1039cdf0e10cSrcweir 
Clone(SfxItemPool *) const1040cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCaptionTypeItem::Clone(SfxItemPool* /*pPool*/) const                { return new SdrCaptionTypeItem(*this); }
1041cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1042cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCaptionTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const       { return new SdrCaptionTypeItem(rIn); }
1043cdf0e10cSrcweir 
GetValueCount() const1044cdf0e10cSrcweir sal_uInt16 __EXPORT SdrCaptionTypeItem::GetValueCount() const { return 4; }
1045cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1046cdf0e10cSrcweir XubString __EXPORT SdrCaptionTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
1047cdf0e10cSrcweir {
1048cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValCAPTIONTYPE1+nPos);
1049cdf0e10cSrcweir }
1050cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1051cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres,
1052cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1053cdf0e10cSrcweir {
1054cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1055cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1056cdf0e10cSrcweir 		String aStr;
1057cdf0e10cSrcweir 
1058cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1059cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1060cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1061cdf0e10cSrcweir 	}
1062cdf0e10cSrcweir 	return ePres;
1063cdf0e10cSrcweir }
1064cdf0e10cSrcweir 
1065cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrCaptionEscDirItem,SfxEnumItem);
1066cdf0e10cSrcweir 
Clone(SfxItemPool *) const1067cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCaptionEscDirItem::Clone(SfxItemPool* /*pPool*/) const              { return new SdrCaptionEscDirItem(*this); }
1068cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1069cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCaptionEscDirItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const     { return new SdrCaptionEscDirItem(rIn); }
1070cdf0e10cSrcweir 
GetValueCount() const1071cdf0e10cSrcweir sal_uInt16 __EXPORT SdrCaptionEscDirItem::GetValueCount() const { return 3; }
1072cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1073cdf0e10cSrcweir XubString __EXPORT SdrCaptionEscDirItem::GetValueTextByPos(sal_uInt16 nPos) const
1074cdf0e10cSrcweir {
1075cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValCAPTIONESCHORI+nPos);
1076cdf0e10cSrcweir }
1077cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1078cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres,
1079cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1080cdf0e10cSrcweir {
1081cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1082cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1083cdf0e10cSrcweir 		String aStr;
1084cdf0e10cSrcweir 
1085cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1086cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1087cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1088cdf0e10cSrcweir 	}
1089cdf0e10cSrcweir 	return ePres;
1090cdf0e10cSrcweir }
1091cdf0e10cSrcweir 
1092cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
1093cdf0e10cSrcweir // MiscItems
1094cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////
1095cdf0e10cSrcweir 
1096cdf0e10cSrcweir // FitToSize
109726734c99SArmin Le Grand TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxEnumItem);
1098cdf0e10cSrcweir 
Clone(SfxItemPool *) const109926734c99SArmin Le Grand SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const         { return new SdrTextFitToSizeTypeItem(*this); }
1100cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1101cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); }
1102cdf0e10cSrcweir 
GetValueCount() const110326734c99SArmin Le Grand sal_uInt16 __EXPORT SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
110426734c99SArmin Le Grand 
GetValueTextByPos(sal_uInt16 nPos) const110526734c99SArmin Le Grand XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
1106cdf0e10cSrcweir {
110726734c99SArmin Le Grand 	return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos);
1108cdf0e10cSrcweir }
1109cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1110cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
111126734c99SArmin Le Grand                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1112cdf0e10cSrcweir {
111326734c99SArmin Le Grand 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1114cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1115cdf0e10cSrcweir 		String aStr;
1116cdf0e10cSrcweir 
1117cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1118cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1119cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1120cdf0e10cSrcweir 	}
1121cdf0e10cSrcweir 	return ePres;
1122cdf0e10cSrcweir }
1123cdf0e10cSrcweir 
HasBoolValue() const112426734c99SArmin Le Grand int  __EXPORT SdrTextFitToSizeTypeItem::HasBoolValue() const { return sal_True; }
112526734c99SArmin Le Grand 
GetBoolValue() const112626734c99SArmin Le Grand sal_Bool __EXPORT SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; }
112726734c99SArmin Le Grand 
SetBoolValue(sal_Bool bVal)112826734c99SArmin Le Grand void __EXPORT SdrTextFitToSizeTypeItem::SetBoolValue(sal_Bool bVal) { SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE)); }
112926734c99SArmin Le Grand 
QueryValue(uno::Any & rVal,sal_uInt8) const113026734c99SArmin Le Grand sal_Bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
113126734c99SArmin Le Grand {
113226734c99SArmin Le Grand 	drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue();
113326734c99SArmin Le Grand 	rVal <<= eFS;
113426734c99SArmin Le Grand 
113526734c99SArmin Le Grand 	return sal_True;
113626734c99SArmin Le Grand }
113726734c99SArmin Le Grand 
PutValue(const uno::Any & rVal,sal_uInt8)113826734c99SArmin Le Grand sal_Bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
113926734c99SArmin Le Grand {
114026734c99SArmin Le Grand 	drawing::TextFitToSizeType eFS;
114126734c99SArmin Le Grand 	if(!(rVal >>= eFS))
114226734c99SArmin Le Grand 	{
114326734c99SArmin Le Grand 		sal_Int32 nEnum = 0;
114426734c99SArmin Le Grand 		if(!(rVal >>= nEnum))
114526734c99SArmin Le Grand 			return sal_False;
114626734c99SArmin Le Grand 
114726734c99SArmin Le Grand 		eFS = (drawing::TextFitToSizeType) nEnum;
114826734c99SArmin Le Grand 	}
114926734c99SArmin Le Grand 
115026734c99SArmin Le Grand 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrFitToSizeType)eFS ) );
115126734c99SArmin Le Grand 
115226734c99SArmin Le Grand 	return sal_True;
115326734c99SArmin Le Grand }
115426734c99SArmin Le Grand 
1155cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem);
1156cdf0e10cSrcweir 
Clone(SfxItemPool *) const1157cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextVertAdjustItem(*this); }
1158cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1159cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrTextVertAdjustItem(rIn); }
1160cdf0e10cSrcweir 
GetValueCount() const1161cdf0e10cSrcweir sal_uInt16 __EXPORT SdrTextVertAdjustItem::GetValueCount() const { return 5; }
1162cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1163cdf0e10cSrcweir XubString __EXPORT SdrTextVertAdjustItem::GetValueTextByPos(sal_uInt16 nPos) const
1164cdf0e10cSrcweir {
1165cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValTEXTVADJTOP+nPos);
1166cdf0e10cSrcweir }
1167cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1168cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres,
1169cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1170cdf0e10cSrcweir {
1171cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1172cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1173cdf0e10cSrcweir 		String aStr;
1174cdf0e10cSrcweir 
1175cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1176cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1177cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1178cdf0e10cSrcweir 	}
1179cdf0e10cSrcweir 	return ePres;
1180cdf0e10cSrcweir }
1181cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1182cdf0e10cSrcweir sal_Bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1183cdf0e10cSrcweir {
1184cdf0e10cSrcweir 	rVal <<= (drawing::TextVerticalAdjust)GetValue();
1185cdf0e10cSrcweir 	return sal_True;
1186cdf0e10cSrcweir }
1187cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1188cdf0e10cSrcweir sal_Bool SdrTextVertAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1189cdf0e10cSrcweir {
1190cdf0e10cSrcweir 	drawing::TextVerticalAdjust eAdj;
1191cdf0e10cSrcweir 	if(!(rVal >>= eAdj))
1192cdf0e10cSrcweir 	{
1193cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1194cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1195cdf0e10cSrcweir 			return sal_False;
1196cdf0e10cSrcweir 
1197cdf0e10cSrcweir 		eAdj = (drawing::TextVerticalAdjust)nEnum;
1198cdf0e10cSrcweir 	}
1199cdf0e10cSrcweir 
1200cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextVertAdjust)eAdj ) );
1201cdf0e10cSrcweir 
1202cdf0e10cSrcweir 	return sal_True;
1203cdf0e10cSrcweir }
1204cdf0e10cSrcweir 
1205cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrTextHorzAdjustItem,SfxEnumItem);
1206cdf0e10cSrcweir 
Clone(SfxItemPool *) const1207cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextHorzAdjustItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextHorzAdjustItem(*this); }
1208cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1209cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextHorzAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrTextHorzAdjustItem(rIn); }
1210cdf0e10cSrcweir 
GetValueCount() const1211cdf0e10cSrcweir sal_uInt16 __EXPORT SdrTextHorzAdjustItem::GetValueCount() const { return 5; }
1212cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1213cdf0e10cSrcweir XubString __EXPORT SdrTextHorzAdjustItem::GetValueTextByPos(sal_uInt16 nPos) const
1214cdf0e10cSrcweir {
1215cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValTEXTHADJLEFT+nPos);
1216cdf0e10cSrcweir }
1217cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1218cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres,
1219cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1220cdf0e10cSrcweir {
1221cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1222cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1223cdf0e10cSrcweir 		String aStr;
1224cdf0e10cSrcweir 
1225cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1226cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1227cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1228cdf0e10cSrcweir 	}
1229cdf0e10cSrcweir 	return ePres;
1230cdf0e10cSrcweir }
1231cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1232cdf0e10cSrcweir sal_Bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1233cdf0e10cSrcweir {
1234cdf0e10cSrcweir 	rVal <<= (drawing::TextHorizontalAdjust)GetValue();
1235cdf0e10cSrcweir 	return sal_True;
1236cdf0e10cSrcweir }
1237cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1238cdf0e10cSrcweir sal_Bool SdrTextHorzAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1239cdf0e10cSrcweir {
1240cdf0e10cSrcweir 	drawing::TextHorizontalAdjust eAdj;
1241cdf0e10cSrcweir 	if(!(rVal >>= eAdj))
1242cdf0e10cSrcweir 	{
1243cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1244cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1245cdf0e10cSrcweir 			return sal_False;
1246cdf0e10cSrcweir 
1247cdf0e10cSrcweir 		eAdj = (drawing::TextHorizontalAdjust)nEnum;
1248cdf0e10cSrcweir 	}
1249cdf0e10cSrcweir 
1250cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextHorzAdjust)eAdj ) );
1251cdf0e10cSrcweir 
1252cdf0e10cSrcweir 	return sal_True;
1253cdf0e10cSrcweir }
1254cdf0e10cSrcweir 
1255cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrTextAniKindItem,SfxEnumItem);
1256cdf0e10cSrcweir 
Clone(SfxItemPool *) const1257cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniKindItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextAniKindItem(*this); }
1258cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1259cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrTextAniKindItem(rIn); }
1260cdf0e10cSrcweir 
GetValueCount() const1261cdf0e10cSrcweir sal_uInt16 __EXPORT SdrTextAniKindItem::GetValueCount() const { return 5; }
1262cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1263cdf0e10cSrcweir XubString __EXPORT SdrTextAniKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1264cdf0e10cSrcweir {
1265cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValTEXTANI_NONE+nPos);
1266cdf0e10cSrcweir }
1267cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1268cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres,
1269cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1270cdf0e10cSrcweir {
1271cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1272cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1273cdf0e10cSrcweir 		String aStr;
1274cdf0e10cSrcweir 
1275cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1276cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1277cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1278cdf0e10cSrcweir 	}
1279cdf0e10cSrcweir 	return ePres;
1280cdf0e10cSrcweir }
1281cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1282cdf0e10cSrcweir sal_Bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1283cdf0e10cSrcweir {
1284cdf0e10cSrcweir 	rVal <<= (drawing::TextAnimationKind)GetValue();
1285cdf0e10cSrcweir 	return sal_True;
1286cdf0e10cSrcweir }
1287cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1288cdf0e10cSrcweir sal_Bool SdrTextAniKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1289cdf0e10cSrcweir {
1290cdf0e10cSrcweir 	drawing::TextAnimationKind eKind;
1291cdf0e10cSrcweir 	if(!(rVal >>= eKind))
1292cdf0e10cSrcweir 	{
1293cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1294cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1295cdf0e10cSrcweir 			return sal_False;
1296cdf0e10cSrcweir 		eKind = (drawing::TextAnimationKind)nEnum;
1297cdf0e10cSrcweir 	}
1298cdf0e10cSrcweir 
1299cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextAniKind)eKind ) );
1300cdf0e10cSrcweir 
1301cdf0e10cSrcweir 	return sal_True;
1302cdf0e10cSrcweir }
1303cdf0e10cSrcweir 
1304cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrTextAniDirectionItem,SfxEnumItem);
1305cdf0e10cSrcweir 
Clone(SfxItemPool *) const1306cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniDirectionItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextAniDirectionItem(*this); }
1307cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1308cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniDirectionItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrTextAniDirectionItem(rIn); }
1309cdf0e10cSrcweir 
GetValueCount() const1310cdf0e10cSrcweir sal_uInt16 __EXPORT SdrTextAniDirectionItem::GetValueCount() const { return 4; }
1311cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1312cdf0e10cSrcweir XubString __EXPORT SdrTextAniDirectionItem::GetValueTextByPos(sal_uInt16 nPos) const
1313cdf0e10cSrcweir {
1314cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValTEXTANI_LEFT+nPos);
1315cdf0e10cSrcweir }
1316cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1317cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres,
1318cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1319cdf0e10cSrcweir {
1320cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1321cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1322cdf0e10cSrcweir 		String aStr;
1323cdf0e10cSrcweir 
1324cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1325cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1326cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1327cdf0e10cSrcweir 	}
1328cdf0e10cSrcweir 	return ePres;
1329cdf0e10cSrcweir }
1330cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1331cdf0e10cSrcweir sal_Bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1332cdf0e10cSrcweir {
1333cdf0e10cSrcweir 	rVal <<= (drawing::TextAnimationDirection)GetValue();
1334cdf0e10cSrcweir 	return sal_True;
1335cdf0e10cSrcweir }
1336cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1337cdf0e10cSrcweir sal_Bool SdrTextAniDirectionItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1338cdf0e10cSrcweir {
1339cdf0e10cSrcweir 	drawing::TextAnimationDirection eDir;
1340cdf0e10cSrcweir 	if(!(rVal >>= eDir))
1341cdf0e10cSrcweir 	{
1342cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1343cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1344cdf0e10cSrcweir 			return sal_False;
1345cdf0e10cSrcweir 
1346cdf0e10cSrcweir 		eDir = (drawing::TextAnimationDirection)nEnum;
1347cdf0e10cSrcweir 	}
1348cdf0e10cSrcweir 
1349cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrTextAniDirection)eDir ) );
1350cdf0e10cSrcweir 
1351cdf0e10cSrcweir 	return sal_True;
1352cdf0e10cSrcweir }
1353cdf0e10cSrcweir 
1354cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrTextAniDelayItem,SfxUInt16Item);
1355cdf0e10cSrcweir 
Clone(SfxItemPool *) const1356cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniDelayItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextAniDelayItem(*this); }
1357cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1358cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniDelayItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrTextAniDelayItem(rIn); }
1359cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1360cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextAniDelayItem::GetPresentation(
1361cdf0e10cSrcweir 	SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
1362cdf0e10cSrcweir     XubString& rText, const IntlWrapper *) const
1363cdf0e10cSrcweir {
1364cdf0e10cSrcweir 	rText = UniString::CreateFromInt32(GetValue());
1365cdf0e10cSrcweir 	rText += sal_Unicode('m');
1366cdf0e10cSrcweir 	rText += sal_Unicode('s');
1367cdf0e10cSrcweir 
1368cdf0e10cSrcweir 	if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
1369cdf0e10cSrcweir 	{
1370cdf0e10cSrcweir 		XubString aStr;
1371cdf0e10cSrcweir 
1372cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1373cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1374cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1375cdf0e10cSrcweir 	}
1376cdf0e10cSrcweir 
1377cdf0e10cSrcweir 	return ePres;
1378cdf0e10cSrcweir }
1379cdf0e10cSrcweir 
1380cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrTextAniAmountItem,SfxInt16Item);
1381cdf0e10cSrcweir 
Clone(SfxItemPool *) const1382cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniAmountItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextAniAmountItem(*this); }
1383cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1384cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextAniAmountItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrTextAniAmountItem(rIn); }
1385cdf0e10cSrcweir 
HasMetrics() const1386cdf0e10cSrcweir FASTBOOL __EXPORT SdrTextAniAmountItem::HasMetrics() const
1387cdf0e10cSrcweir {
1388cdf0e10cSrcweir 	return GetValue()>0;
1389cdf0e10cSrcweir }
1390cdf0e10cSrcweir 
ScaleMetrics(long nMul,long nDiv)1391cdf0e10cSrcweir FASTBOOL __EXPORT SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
1392cdf0e10cSrcweir {
1393cdf0e10cSrcweir 	if (GetValue()>0) {
1394cdf0e10cSrcweir 		BigInt aVal(GetValue());
1395cdf0e10cSrcweir 		aVal*=nMul;
1396cdf0e10cSrcweir 		aVal+=nDiv/2; // fuer korrektes Runden
1397cdf0e10cSrcweir 		aVal/=nDiv;
1398cdf0e10cSrcweir 		SetValue(short(aVal));
1399cdf0e10cSrcweir 		return sal_True;
1400cdf0e10cSrcweir 	} else return sal_False;
1401cdf0e10cSrcweir }
1402cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreMetric,SfxMapUnit ePresMetric,XubString & rText,const IntlWrapper *) const1403cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextAniAmountItem::GetPresentation(
1404cdf0e10cSrcweir 	SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
1405cdf0e10cSrcweir     XubString& rText, const IntlWrapper *) const
1406cdf0e10cSrcweir {
1407cdf0e10cSrcweir 	sal_Int32 nValue(GetValue());
1408cdf0e10cSrcweir 
1409cdf0e10cSrcweir 	if(!nValue)
1410cdf0e10cSrcweir 		nValue = -1L;
1411cdf0e10cSrcweir 
1412cdf0e10cSrcweir 	if(nValue < 0)
1413cdf0e10cSrcweir 	{
1414027cdf4aSHerbert Dürr 		const sal_Char aText[] = "pixel";
1415cdf0e10cSrcweir 
1416cdf0e10cSrcweir 		rText = UniString::CreateFromInt32(-nValue);
1417027cdf4aSHerbert Dürr 		rText += UniString(aText, sizeof(aText)-1);
1418cdf0e10cSrcweir 	}
1419cdf0e10cSrcweir 	else
1420cdf0e10cSrcweir 	{
1421cdf0e10cSrcweir 		SdrFormatter aFmt((MapUnit)eCoreMetric, (MapUnit)ePresMetric);
1422cdf0e10cSrcweir 		XubString aStr;
1423cdf0e10cSrcweir 
1424cdf0e10cSrcweir 		aFmt.TakeStr(nValue, rText);
1425cdf0e10cSrcweir 		aFmt.TakeUnitStr((MapUnit)ePresMetric, aStr);
1426cdf0e10cSrcweir 		rText += aStr;
1427cdf0e10cSrcweir 	}
1428cdf0e10cSrcweir 
1429cdf0e10cSrcweir 	if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
1430cdf0e10cSrcweir 	{
1431cdf0e10cSrcweir 		XubString aStr;
1432cdf0e10cSrcweir 
1433cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1434cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1435cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1436cdf0e10cSrcweir 	}
1437cdf0e10cSrcweir 
1438cdf0e10cSrcweir 	return ePres;
1439cdf0e10cSrcweir }
1440cdf0e10cSrcweir 
1441cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY( SdrTextFixedCellHeightItem, SfxBoolItem );
SdrTextFixedCellHeightItem(sal_Bool bUseFixedCellHeight)1442cdf0e10cSrcweir SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( sal_Bool bUseFixedCellHeight )
1443cdf0e10cSrcweir 	: SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT, bUseFixedCellHeight )
1444cdf0e10cSrcweir {
1445cdf0e10cSrcweir }
SdrTextFixedCellHeightItem(SvStream & rStream,sal_uInt16 nVersion)1446cdf0e10cSrcweir SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion )
1447cdf0e10cSrcweir 	: SfxBoolItem( SDRATTR_TEXT_USEFIXEDCELLHEIGHT, sal_False )
1448cdf0e10cSrcweir {
1449cdf0e10cSrcweir 	if ( nVersion )
1450cdf0e10cSrcweir 	{
1451cdf0e10cSrcweir 		sal_Bool bValue;
1452cdf0e10cSrcweir 		rStream >> bValue;
1453cdf0e10cSrcweir 		SetValue( bValue );
1454cdf0e10cSrcweir 	}
1455cdf0e10cSrcweir }
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1456cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres,
1457cdf0e10cSrcweir 									SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/,
1458cdf0e10cSrcweir                                         String &rText, const IntlWrapper * ) const
1459cdf0e10cSrcweir {
1460cdf0e10cSrcweir 	rText = GetValueTextByVal( GetValue() );
1461cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE)
1462cdf0e10cSrcweir 	{
1463cdf0e10cSrcweir 		String aStr;
1464cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1465cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1466cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1467cdf0e10cSrcweir 	}
1468cdf0e10cSrcweir 	return ePres;
1469cdf0e10cSrcweir }
Create(SvStream & rIn,sal_uInt16 nItemVersion) const1470cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextFixedCellHeightItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
1471cdf0e10cSrcweir {
1472cdf0e10cSrcweir 	return new SdrTextFixedCellHeightItem( rIn, nItemVersion );
1473cdf0e10cSrcweir }
Store(SvStream & rOut,sal_uInt16 nItemVersion) const1474cdf0e10cSrcweir SvStream& __EXPORT SdrTextFixedCellHeightItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
1475cdf0e10cSrcweir {
1476cdf0e10cSrcweir 	if ( nItemVersion )
1477cdf0e10cSrcweir 	{
1478cdf0e10cSrcweir 		sal_Bool bValue = (sal_Bool)GetValue();
1479cdf0e10cSrcweir 		rOut << bValue;
1480cdf0e10cSrcweir 	}
1481cdf0e10cSrcweir 	return rOut;
1482cdf0e10cSrcweir }
Clone(SfxItemPool *) const1483cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrTextFixedCellHeightItem::Clone( SfxItemPool * /*pPool*/) const
1484cdf0e10cSrcweir {
1485cdf0e10cSrcweir 	return new SdrTextFixedCellHeightItem( GetValue() );
1486cdf0e10cSrcweir }
GetVersion(sal_uInt16) const1487cdf0e10cSrcweir sal_uInt16 SdrTextFixedCellHeightItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
1488cdf0e10cSrcweir {
1489cdf0e10cSrcweir 	return 1;
1490cdf0e10cSrcweir }
QueryValue(uno::Any & rVal,sal_uInt8) const1491cdf0e10cSrcweir sal_Bool SdrTextFixedCellHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1492cdf0e10cSrcweir {
1493cdf0e10cSrcweir 	sal_Bool bValue = (sal_Bool)GetValue();
1494cdf0e10cSrcweir 	rVal <<= bValue;
1495cdf0e10cSrcweir 	return sal_True;
1496cdf0e10cSrcweir }
PutValue(const uno::Any & rVal,sal_uInt8)1497cdf0e10cSrcweir sal_Bool SdrTextFixedCellHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1498cdf0e10cSrcweir {
1499cdf0e10cSrcweir 	sal_Bool bValue = sal_Bool();
1500cdf0e10cSrcweir 	if( !( rVal >>= bValue ) )
1501cdf0e10cSrcweir 		return sal_False;
1502cdf0e10cSrcweir 	SetValue( bValue );
1503cdf0e10cSrcweir 	return sal_True;
1504cdf0e10cSrcweir }
1505cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const1506cdf0e10cSrcweir int __EXPORT SdrTextFixedCellHeightItem::IsPoolable() const
1507cdf0e10cSrcweir {
1508cdf0e10cSrcweir 	sal_uInt16 nId=Which();
1509cdf0e10cSrcweir 	return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST;
1510cdf0e10cSrcweir }
1511cdf0e10cSrcweir #endif
1512cdf0e10cSrcweir 
1513cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY( SdrCustomShapeAdjustmentItem, SfxPoolItem );
1514cdf0e10cSrcweir 
SdrCustomShapeAdjustmentItem()1515cdf0e10cSrcweir SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem() : SfxPoolItem( SDRATTR_CUSTOMSHAPE_ADJUSTMENT )
1516cdf0e10cSrcweir {
1517cdf0e10cSrcweir }
1518cdf0e10cSrcweir 
SdrCustomShapeAdjustmentItem(SvStream & rIn,sal_uInt16 nVersion)1519cdf0e10cSrcweir SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion ):
1520cdf0e10cSrcweir 	SfxPoolItem( SDRATTR_CUSTOMSHAPE_ADJUSTMENT )
1521cdf0e10cSrcweir {
1522cdf0e10cSrcweir 	if ( nVersion )
1523cdf0e10cSrcweir 	{
1524cdf0e10cSrcweir 		SdrCustomShapeAdjustmentValue aVal;
1525cdf0e10cSrcweir 		sal_uInt32 i, nCount;
1526cdf0e10cSrcweir 		rIn >> nCount;
1527cdf0e10cSrcweir 		for ( i = 0; i < nCount; i++ )
1528cdf0e10cSrcweir 		{
1529cdf0e10cSrcweir 			rIn >> aVal.nValue;
1530cdf0e10cSrcweir 			SetValue( i, aVal );
1531cdf0e10cSrcweir 		}
1532cdf0e10cSrcweir 	}
1533cdf0e10cSrcweir }
1534cdf0e10cSrcweir 
~SdrCustomShapeAdjustmentItem()1535cdf0e10cSrcweir SdrCustomShapeAdjustmentItem::~SdrCustomShapeAdjustmentItem()
1536cdf0e10cSrcweir {
1537cdf0e10cSrcweir 	void* pPtr;
1538cdf0e10cSrcweir 	for ( pPtr = aAdjustmentValueList.First(); pPtr; pPtr = aAdjustmentValueList.Next() )
1539cdf0e10cSrcweir 		delete (SdrCustomShapeAdjustmentValue*)pPtr;
1540cdf0e10cSrcweir }
1541cdf0e10cSrcweir 
operator ==(const SfxPoolItem & rCmp) const1542cdf0e10cSrcweir int __EXPORT SdrCustomShapeAdjustmentItem::operator==( const SfxPoolItem& rCmp ) const
1543cdf0e10cSrcweir {
1544cdf0e10cSrcweir 	int bRet = SfxPoolItem::operator==( rCmp );
1545cdf0e10cSrcweir 	if ( bRet )
1546cdf0e10cSrcweir 	{
1547cdf0e10cSrcweir 		bRet = ((SdrCustomShapeAdjustmentItem&)rCmp).GetCount() == GetCount();
1548cdf0e10cSrcweir 		if ( bRet )
1549cdf0e10cSrcweir 		{
1550cdf0e10cSrcweir 			sal_uInt32 i;
1551cdf0e10cSrcweir 			for ( i = 0; i < GetCount(); i++ )
1552cdf0e10cSrcweir 			{
1553cdf0e10cSrcweir 				if ( ((SdrCustomShapeAdjustmentItem&)rCmp).GetValue( i ).nValue != GetValue( i ).nValue )
1554cdf0e10cSrcweir 				{
1555cdf0e10cSrcweir 					bRet = 0;
1556cdf0e10cSrcweir 					break;
1557cdf0e10cSrcweir 				}
1558cdf0e10cSrcweir 			}
1559cdf0e10cSrcweir 		}
1560cdf0e10cSrcweir 	}
1561cdf0e10cSrcweir 	return bRet;
1562cdf0e10cSrcweir }
1563cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePresentation,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1564cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrCustomShapeAdjustmentItem::GetPresentation(
1565cdf0e10cSrcweir 	SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/,
1566cdf0e10cSrcweir     SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const
1567cdf0e10cSrcweir {
1568cdf0e10cSrcweir 	sal_uInt32 i, nCount = GetCount();
1569cdf0e10cSrcweir 	rText.Append( UniString::CreateFromInt32( nCount ) );
1570cdf0e10cSrcweir 	for ( i = 0; i < nCount; i++ )
1571cdf0e10cSrcweir 	{
1572cdf0e10cSrcweir 		rText += sal_Unicode( ' ' );
1573cdf0e10cSrcweir 		rText.Append( UniString::CreateFromInt32( GetValue( i ).nValue ) );
1574cdf0e10cSrcweir 	}
1575cdf0e10cSrcweir 	if ( ePresentation == SFX_ITEM_PRESENTATION_COMPLETE )
1576cdf0e10cSrcweir 	{
1577cdf0e10cSrcweir 		XubString aStr;
1578cdf0e10cSrcweir 
1579cdf0e10cSrcweir 		SdrItemPool::TakeItemName( Which(), aStr );
1580cdf0e10cSrcweir 		aStr += sal_Unicode( ' ' );
1581cdf0e10cSrcweir 		rText.Insert( aStr, 0 );
1582cdf0e10cSrcweir 	}
1583cdf0e10cSrcweir 	return ePresentation;
1584cdf0e10cSrcweir }
1585cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16 nItemVersion) const1586cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCustomShapeAdjustmentItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
1587cdf0e10cSrcweir {
1588cdf0e10cSrcweir 	return new SdrCustomShapeAdjustmentItem( rIn, nItemVersion );
1589cdf0e10cSrcweir }
1590cdf0e10cSrcweir 
Store(SvStream & rOut,sal_uInt16 nItemVersion) const1591cdf0e10cSrcweir SvStream& __EXPORT SdrCustomShapeAdjustmentItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
1592cdf0e10cSrcweir {
1593cdf0e10cSrcweir 	if ( nItemVersion )
1594cdf0e10cSrcweir 	{
1595cdf0e10cSrcweir 		sal_uInt32 i, nCount = GetCount();
1596cdf0e10cSrcweir 		rOut << nCount;
1597cdf0e10cSrcweir 		for ( i = 0; i < nCount; i++ )
1598cdf0e10cSrcweir 			rOut << GetValue( i ).nValue;
1599cdf0e10cSrcweir 	}
1600cdf0e10cSrcweir 	return rOut;
1601cdf0e10cSrcweir }
1602cdf0e10cSrcweir 
Clone(SfxItemPool *) const1603cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCustomShapeAdjustmentItem::Clone( SfxItemPool * /*pPool*/) const
1604cdf0e10cSrcweir {
1605cdf0e10cSrcweir 	sal_uInt32 i;
1606cdf0e10cSrcweir 	SdrCustomShapeAdjustmentItem* pItem = new SdrCustomShapeAdjustmentItem;
1607cdf0e10cSrcweir 	for ( i = 0; i < GetCount(); i++ )
1608cdf0e10cSrcweir 	{
1609cdf0e10cSrcweir 		const SdrCustomShapeAdjustmentValue& rVal = GetValue( i );
1610cdf0e10cSrcweir 		pItem->SetValue( i, rVal );
1611cdf0e10cSrcweir 	}
1612cdf0e10cSrcweir 	return pItem;
1613cdf0e10cSrcweir }
1614cdf0e10cSrcweir 
1615cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
IsPoolable() const1616cdf0e10cSrcweir int __EXPORT SdrCustomShapeAdjustmentItem::IsPoolable() const
1617cdf0e10cSrcweir {
1618cdf0e10cSrcweir 	sal_uInt16 nId=Which();
1619cdf0e10cSrcweir 	return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST;
1620cdf0e10cSrcweir }
1621cdf0e10cSrcweir #endif
1622cdf0e10cSrcweir 
GetValue(sal_uInt32 nIndex) const1623cdf0e10cSrcweir const SdrCustomShapeAdjustmentValue& SdrCustomShapeAdjustmentItem::GetValue( sal_uInt32 nIndex ) const
1624cdf0e10cSrcweir {
1625cdf0e10cSrcweir #ifdef DBG_UTIL
1626cdf0e10cSrcweir 	if ( aAdjustmentValueList.Count() <= nIndex )
1627cdf0e10cSrcweir 		DBG_ERROR( "SdrCustomShapeAdjustemntItem::GetValue - nIndex out of range (SJ)" );
1628cdf0e10cSrcweir #endif
1629cdf0e10cSrcweir 	return *(SdrCustomShapeAdjustmentValue*)aAdjustmentValueList.GetObject( nIndex );
1630cdf0e10cSrcweir }
1631cdf0e10cSrcweir 
SetValue(sal_uInt32 nIndex,const SdrCustomShapeAdjustmentValue & rVal)1632cdf0e10cSrcweir void SdrCustomShapeAdjustmentItem::SetValue( sal_uInt32 nIndex, const SdrCustomShapeAdjustmentValue& rVal )
1633cdf0e10cSrcweir {
1634cdf0e10cSrcweir 	sal_uInt32 i;
1635cdf0e10cSrcweir 	for ( i = GetCount(); i <= nIndex; i++ )
1636cdf0e10cSrcweir 	{
1637cdf0e10cSrcweir 		SdrCustomShapeAdjustmentValue* pItem = new SdrCustomShapeAdjustmentValue;
1638cdf0e10cSrcweir 		aAdjustmentValueList.Insert( pItem, LIST_APPEND );
1639cdf0e10cSrcweir 	}
1640cdf0e10cSrcweir 	SdrCustomShapeAdjustmentValue& rValue = *(SdrCustomShapeAdjustmentValue*)aAdjustmentValueList.GetObject( nIndex );
1641cdf0e10cSrcweir 	rValue.nValue = rVal.nValue;
1642cdf0e10cSrcweir }
1643cdf0e10cSrcweir 
GetVersion(sal_uInt16) const1644cdf0e10cSrcweir sal_uInt16 SdrCustomShapeAdjustmentItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
1645cdf0e10cSrcweir {
1646cdf0e10cSrcweir 	return 1;
1647cdf0e10cSrcweir }
1648cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1649cdf0e10cSrcweir sal_Bool SdrCustomShapeAdjustmentItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1650cdf0e10cSrcweir {
1651cdf0e10cSrcweir 	sal_uInt32 i, nCount = GetCount();
1652cdf0e10cSrcweir 	uno::Sequence< sal_Int32 > aSequence( nCount );
1653cdf0e10cSrcweir 	if ( nCount )
1654cdf0e10cSrcweir 	{
1655cdf0e10cSrcweir 		sal_Int32* pPtr = aSequence.getArray();
1656cdf0e10cSrcweir 		for ( i = 0; i < nCount; i++ )
1657cdf0e10cSrcweir 			*pPtr++ = GetValue( i ).nValue;
1658cdf0e10cSrcweir 	}
1659cdf0e10cSrcweir 	rVal <<= aSequence;
1660cdf0e10cSrcweir 	return sal_True;
1661cdf0e10cSrcweir }
1662cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1663cdf0e10cSrcweir sal_Bool SdrCustomShapeAdjustmentItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1664cdf0e10cSrcweir {
1665cdf0e10cSrcweir 	uno::Sequence< sal_Int32 > aSequence;
1666cdf0e10cSrcweir 	if( !( rVal >>= aSequence ) )
1667cdf0e10cSrcweir 		return sal_False;
1668cdf0e10cSrcweir 
1669cdf0e10cSrcweir 	void* pPtr;
1670cdf0e10cSrcweir 	for ( pPtr = aAdjustmentValueList.First(); pPtr; pPtr = aAdjustmentValueList.Next() )
1671cdf0e10cSrcweir 		delete (SdrCustomShapeAdjustmentValue*)pPtr;
1672cdf0e10cSrcweir 
1673cdf0e10cSrcweir 	sal_uInt32 i, nCount = aSequence.getLength();
1674cdf0e10cSrcweir 	if ( nCount )
1675cdf0e10cSrcweir 	{
1676cdf0e10cSrcweir 		const sal_Int32* pPtr2 = aSequence.getConstArray();
1677cdf0e10cSrcweir 		for ( i = 0; i < nCount; i++ )
1678cdf0e10cSrcweir 		{
1679cdf0e10cSrcweir 			SdrCustomShapeAdjustmentValue* pItem = new SdrCustomShapeAdjustmentValue;
1680cdf0e10cSrcweir 			pItem->nValue = *pPtr2++;
1681cdf0e10cSrcweir 			aAdjustmentValueList.Insert( pItem, LIST_APPEND );
1682cdf0e10cSrcweir 		}
1683cdf0e10cSrcweir 	}
1684cdf0e10cSrcweir 	return sal_True;
1685cdf0e10cSrcweir }
1686cdf0e10cSrcweir 
1687cdf0e10cSrcweir 
1688cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1689cdf0e10cSrcweir // Edge
1690cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1691cdf0e10cSrcweir 
1692cdf0e10cSrcweir // EdgeKind
1693cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrEdgeKindItem,SfxEnumItem);
1694cdf0e10cSrcweir 
Clone(SfxItemPool *) const1695cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrEdgeKindItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrEdgeKindItem(*this); }
1696cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1697cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrEdgeKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrEdgeKindItem(rIn); }
1698cdf0e10cSrcweir 
GetValueCount() const1699cdf0e10cSrcweir sal_uInt16 __EXPORT SdrEdgeKindItem::GetValueCount() const { return 4; }
1700cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1701cdf0e10cSrcweir XubString __EXPORT SdrEdgeKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1702cdf0e10cSrcweir {
1703cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES+nPos);
1704cdf0e10cSrcweir }
1705cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1706cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres,
1707cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1708cdf0e10cSrcweir {
1709cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1710cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1711cdf0e10cSrcweir 		String aStr;
1712cdf0e10cSrcweir 
1713cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1714cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1715cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1716cdf0e10cSrcweir 	}
1717cdf0e10cSrcweir 	return ePres;
1718cdf0e10cSrcweir }
1719cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1720cdf0e10cSrcweir sal_Bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1721cdf0e10cSrcweir {
1722cdf0e10cSrcweir 	drawing::ConnectorType eCT = drawing::ConnectorType_STANDARD;
1723cdf0e10cSrcweir 
1724cdf0e10cSrcweir 	switch( GetValue() )
1725cdf0e10cSrcweir 	{
1726cdf0e10cSrcweir 		case SDREDGE_ORTHOLINES :   eCT = drawing::ConnectorType_STANDARD; break;
1727cdf0e10cSrcweir 		case SDREDGE_THREELINES :   eCT = drawing::ConnectorType_LINES;	break;
1728cdf0e10cSrcweir 		case SDREDGE_ONELINE :		eCT = drawing::ConnectorType_LINE;	break;
1729cdf0e10cSrcweir 		case SDREDGE_BEZIER :		eCT = drawing::ConnectorType_CURVE;	break;
1730cdf0e10cSrcweir 		case SDREDGE_ARC :          eCT = drawing::ConnectorType_CURVE;	break;
1731cdf0e10cSrcweir 		default:
1732cdf0e10cSrcweir 			DBG_ERROR( "SdrEdgeKindItem::QueryValue : unknown enum" );
1733cdf0e10cSrcweir 	}
1734cdf0e10cSrcweir 
1735cdf0e10cSrcweir 	rVal <<= eCT;
1736cdf0e10cSrcweir 
1737cdf0e10cSrcweir 	return sal_True;
1738cdf0e10cSrcweir }
1739cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1740cdf0e10cSrcweir sal_Bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1741cdf0e10cSrcweir {
1742cdf0e10cSrcweir 	drawing::ConnectorType eCT;
1743cdf0e10cSrcweir 	if(!(rVal >>= eCT))
1744cdf0e10cSrcweir 	{
1745cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1746cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1747cdf0e10cSrcweir 			return sal_False;
1748cdf0e10cSrcweir 
1749cdf0e10cSrcweir 		eCT = (drawing::ConnectorType)nEnum;
1750cdf0e10cSrcweir 	}
1751cdf0e10cSrcweir 
1752cdf0e10cSrcweir 	SdrEdgeKind eEK = SDREDGE_ORTHOLINES;
1753cdf0e10cSrcweir 	switch( eCT )
1754cdf0e10cSrcweir 	{
1755cdf0e10cSrcweir 		case drawing::ConnectorType_STANDARD :	eEK = SDREDGE_ORTHOLINES;	break;
1756cdf0e10cSrcweir 		case drawing::ConnectorType_CURVE :		eEK = SDREDGE_BEZIER;		break;
1757cdf0e10cSrcweir 		case drawing::ConnectorType_LINE :       eEK = SDREDGE_ONELINE;		break;
1758cdf0e10cSrcweir 		case drawing::ConnectorType_LINES :      eEK = SDREDGE_THREELINES;   break;
1759cdf0e10cSrcweir 		default:
1760cdf0e10cSrcweir 			DBG_ERROR( "SdrEdgeKindItem::PuValue : unknown enum" );
1761cdf0e10cSrcweir 	}
1762cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( eEK ) );
1763cdf0e10cSrcweir 
1764cdf0e10cSrcweir 	return sal_True;
1765cdf0e10cSrcweir }
1766cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1767cdf0e10cSrcweir sal_Bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1768cdf0e10cSrcweir {
1769cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1770cdf0e10cSrcweir 	return sal_True;
1771cdf0e10cSrcweir }
1772cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1773cdf0e10cSrcweir sal_Bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1774cdf0e10cSrcweir {
1775cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1776cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1777cdf0e10cSrcweir 		return sal_False;
1778cdf0e10cSrcweir 
1779cdf0e10cSrcweir 	SetValue( nValue );
1780cdf0e10cSrcweir 	return sal_True;
1781cdf0e10cSrcweir }
1782cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1783cdf0e10cSrcweir sal_Bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1784cdf0e10cSrcweir {
1785cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1786cdf0e10cSrcweir 	return sal_True;
1787cdf0e10cSrcweir }
1788cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1789cdf0e10cSrcweir sal_Bool SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1790cdf0e10cSrcweir {
1791cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1792cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1793cdf0e10cSrcweir 		return sal_False;
1794cdf0e10cSrcweir 
1795cdf0e10cSrcweir 	SetValue( nValue );
1796cdf0e10cSrcweir 	return sal_True;
1797cdf0e10cSrcweir }
1798cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1799cdf0e10cSrcweir sal_Bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1800cdf0e10cSrcweir {
1801cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1802cdf0e10cSrcweir 	return sal_True;
1803cdf0e10cSrcweir }
1804cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1805cdf0e10cSrcweir sal_Bool SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1806cdf0e10cSrcweir {
1807cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1808cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1809cdf0e10cSrcweir 		return sal_False;
1810cdf0e10cSrcweir 
1811cdf0e10cSrcweir 	SetValue( nValue );
1812cdf0e10cSrcweir 	return sal_True;
1813cdf0e10cSrcweir }
1814cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1815cdf0e10cSrcweir sal_Bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1816cdf0e10cSrcweir {
1817cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1818cdf0e10cSrcweir 	return sal_True;
1819cdf0e10cSrcweir }
1820cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1821cdf0e10cSrcweir sal_Bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1822cdf0e10cSrcweir {
1823cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1824cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1825cdf0e10cSrcweir 		return sal_False;
1826cdf0e10cSrcweir 
1827cdf0e10cSrcweir 	SetValue( nValue );
1828cdf0e10cSrcweir 	return sal_True;
1829cdf0e10cSrcweir }
1830cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1831cdf0e10cSrcweir sal_Bool SdrEdgeLine1DeltaItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1832cdf0e10cSrcweir {
1833cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1834cdf0e10cSrcweir 	return sal_True;
1835cdf0e10cSrcweir }
1836cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1837cdf0e10cSrcweir sal_Bool SdrEdgeLine1DeltaItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1838cdf0e10cSrcweir {
1839cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1840cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1841cdf0e10cSrcweir 		return sal_False;
1842cdf0e10cSrcweir 
1843cdf0e10cSrcweir 	SetValue( nValue );
1844cdf0e10cSrcweir 	return sal_True;
1845cdf0e10cSrcweir }
1846cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1847cdf0e10cSrcweir sal_Bool SdrEdgeLine2DeltaItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1848cdf0e10cSrcweir {
1849cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1850cdf0e10cSrcweir 	return sal_True;
1851cdf0e10cSrcweir }
1852cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1853cdf0e10cSrcweir sal_Bool SdrEdgeLine2DeltaItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1854cdf0e10cSrcweir {
1855cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1856cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1857cdf0e10cSrcweir 		return sal_False;
1858cdf0e10cSrcweir 
1859cdf0e10cSrcweir 	SetValue( nValue );
1860cdf0e10cSrcweir 	return sal_True;
1861cdf0e10cSrcweir }
1862cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1863cdf0e10cSrcweir sal_Bool SdrEdgeLine3DeltaItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1864cdf0e10cSrcweir {
1865cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
1866cdf0e10cSrcweir 	return sal_True;
1867cdf0e10cSrcweir }
1868cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1869cdf0e10cSrcweir sal_Bool SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1870cdf0e10cSrcweir {
1871cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1872cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1873cdf0e10cSrcweir 		return sal_False;
1874cdf0e10cSrcweir 
1875cdf0e10cSrcweir 	SetValue( nValue );
1876cdf0e10cSrcweir 	return sal_True;
1877cdf0e10cSrcweir }
1878cdf0e10cSrcweir 
1879cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1880cdf0e10cSrcweir // Measure
1881cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1882cdf0e10cSrcweir 
1883cdf0e10cSrcweir // MeasureKind
1884cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem,SfxEnumItem);
1885cdf0e10cSrcweir 
Clone(SfxItemPool *) const1886cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrMeasureKindItem(*this); }
1887cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1888cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrMeasureKindItem(rIn); }
1889cdf0e10cSrcweir 
GetValueCount() const1890cdf0e10cSrcweir sal_uInt16 __EXPORT SdrMeasureKindItem::GetValueCount() const { return 2; }
1891cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1892cdf0e10cSrcweir XubString __EXPORT SdrMeasureKindItem::GetValueTextByPos(sal_uInt16 nPos) const
1893cdf0e10cSrcweir {
1894cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValMEASURE_STD+nPos);
1895cdf0e10cSrcweir }
1896cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1897cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres,
1898cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1899cdf0e10cSrcweir {
1900cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1901cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1902cdf0e10cSrcweir 		String aStr;
1903cdf0e10cSrcweir 
1904cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1905cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1906cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1907cdf0e10cSrcweir 	}
1908cdf0e10cSrcweir 	return ePres;
1909cdf0e10cSrcweir }
1910cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1911cdf0e10cSrcweir sal_Bool SdrMeasureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1912cdf0e10cSrcweir {
1913cdf0e10cSrcweir 	rVal <<= (drawing::MeasureKind)GetValue();
1914cdf0e10cSrcweir 	return sal_True;
1915cdf0e10cSrcweir }
1916cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1917cdf0e10cSrcweir sal_Bool SdrMeasureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1918cdf0e10cSrcweir {
1919cdf0e10cSrcweir 	drawing::MeasureKind eKind;
1920cdf0e10cSrcweir 	if(!(rVal >>= eKind))
1921cdf0e10cSrcweir 	{
1922cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1923cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1924cdf0e10cSrcweir 			return sal_False;
1925cdf0e10cSrcweir 
1926cdf0e10cSrcweir 		eKind = (drawing::MeasureKind)nEnum;
1927cdf0e10cSrcweir 	}
1928cdf0e10cSrcweir 
1929cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrMeasureKind)eKind ) );
1930cdf0e10cSrcweir 	return sal_True;
1931cdf0e10cSrcweir }
1932cdf0e10cSrcweir 
1933cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrMeasureTextHPosItem,SfxEnumItem);
1934cdf0e10cSrcweir 
Clone(SfxItemPool *) const1935cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureTextHPosItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrMeasureTextHPosItem(*this); }
1936cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1937cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureTextHPosItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrMeasureTextHPosItem(rIn); }
1938cdf0e10cSrcweir 
GetValueCount() const1939cdf0e10cSrcweir sal_uInt16 __EXPORT SdrMeasureTextHPosItem::GetValueCount() const { return 4; }
1940cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1941cdf0e10cSrcweir XubString __EXPORT SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos) const
1942cdf0e10cSrcweir {
1943cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValMEASURE_TEXTHAUTO+nPos);
1944cdf0e10cSrcweir }
1945cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1946cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres,
1947cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1948cdf0e10cSrcweir {
1949cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1950cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
1951cdf0e10cSrcweir 		String aStr;
1952cdf0e10cSrcweir 
1953cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
1954cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
1955cdf0e10cSrcweir 		rText.Insert(aStr, 0);
1956cdf0e10cSrcweir 	}
1957cdf0e10cSrcweir 	return ePres;
1958cdf0e10cSrcweir }
1959cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const1960cdf0e10cSrcweir sal_Bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1961cdf0e10cSrcweir {
1962cdf0e10cSrcweir 	rVal <<= (drawing::MeasureTextHorzPos)GetValue();
1963cdf0e10cSrcweir 	return sal_True;
1964cdf0e10cSrcweir }
1965cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)1966cdf0e10cSrcweir sal_Bool SdrMeasureTextHPosItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1967cdf0e10cSrcweir {
1968cdf0e10cSrcweir 	drawing::MeasureTextHorzPos ePos;
1969cdf0e10cSrcweir 	if(!(rVal >>= ePos))
1970cdf0e10cSrcweir 	{
1971cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
1972cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
1973cdf0e10cSrcweir 			return sal_False;
1974cdf0e10cSrcweir 
1975cdf0e10cSrcweir 		ePos = (drawing::MeasureTextHorzPos)nEnum;
1976cdf0e10cSrcweir 	}
1977cdf0e10cSrcweir 
1978cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrMeasureTextHPos)ePos ) );
1979cdf0e10cSrcweir 	return sal_True;
1980cdf0e10cSrcweir }
1981cdf0e10cSrcweir 
1982cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrMeasureTextVPosItem,SfxEnumItem);
1983cdf0e10cSrcweir 
Clone(SfxItemPool *) const1984cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureTextVPosItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrMeasureTextVPosItem(*this); }
1985cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const1986cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureTextVPosItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrMeasureTextVPosItem(rIn); }
1987cdf0e10cSrcweir 
GetValueCount() const1988cdf0e10cSrcweir sal_uInt16 __EXPORT SdrMeasureTextVPosItem::GetValueCount() const { return 5; }
1989cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const1990cdf0e10cSrcweir XubString __EXPORT SdrMeasureTextVPosItem::GetValueTextByPos(sal_uInt16 nPos) const
1991cdf0e10cSrcweir {
1992cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValMEASURE_TEXTVAUTO+nPos);
1993cdf0e10cSrcweir }
1994cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const1995cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres,
1996cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
1997cdf0e10cSrcweir {
1998cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
1999cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
2000cdf0e10cSrcweir 		String aStr;
2001cdf0e10cSrcweir 
2002cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
2003cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
2004cdf0e10cSrcweir 		rText.Insert(aStr, 0);
2005cdf0e10cSrcweir 	}
2006cdf0e10cSrcweir 	return ePres;
2007cdf0e10cSrcweir }
2008cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const2009cdf0e10cSrcweir sal_Bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2010cdf0e10cSrcweir {
2011cdf0e10cSrcweir 	rVal <<= (drawing::MeasureTextVertPos)GetValue();
2012cdf0e10cSrcweir 	return sal_True;
2013cdf0e10cSrcweir }
2014cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)2015cdf0e10cSrcweir sal_Bool SdrMeasureTextVPosItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2016cdf0e10cSrcweir {
2017cdf0e10cSrcweir 	drawing::MeasureTextVertPos ePos;
2018cdf0e10cSrcweir 	if(!(rVal >>= ePos))
2019cdf0e10cSrcweir 	{
2020cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
2021cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
2022cdf0e10cSrcweir 			return sal_False;
2023cdf0e10cSrcweir 
2024cdf0e10cSrcweir 		ePos = (drawing::MeasureTextVertPos)nEnum;
2025cdf0e10cSrcweir 	}
2026cdf0e10cSrcweir 
2027cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrMeasureTextHPos)ePos ) );
2028cdf0e10cSrcweir 	return sal_True;
2029cdf0e10cSrcweir }
2030cdf0e10cSrcweir 
2031cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrMeasureUnitItem,SfxEnumItem);
2032cdf0e10cSrcweir 
Clone(SfxItemPool *) const2033cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureUnitItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrMeasureUnitItem(*this); }
2034cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2035cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrMeasureUnitItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const   { return new SdrMeasureUnitItem(rIn); }
2036cdf0e10cSrcweir 
GetValueCount() const2037cdf0e10cSrcweir sal_uInt16 __EXPORT SdrMeasureUnitItem::GetValueCount() const { return 14; }
2038cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const2039cdf0e10cSrcweir XubString __EXPORT SdrMeasureUnitItem::GetValueTextByPos(sal_uInt16 nPos) const
2040cdf0e10cSrcweir {
2041cdf0e10cSrcweir 	XubString aRetval;
2042cdf0e10cSrcweir 
2043cdf0e10cSrcweir 	if((FieldUnit)nPos == FUNIT_NONE)
2044cdf0e10cSrcweir 	{
2045e67a7c0cSHerbert Dürr 		const sal_Char aText[] = "default";
2046027cdf4aSHerbert Dürr 		aRetval += UniString(aText, sizeof(aText)-1);
2047cdf0e10cSrcweir 	}
2048cdf0e10cSrcweir 	else
2049cdf0e10cSrcweir 	{
2050cdf0e10cSrcweir 		SdrFormatter::TakeUnitStr((FieldUnit)nPos, aRetval);
2051cdf0e10cSrcweir 	}
2052cdf0e10cSrcweir 
2053cdf0e10cSrcweir 	return aRetval;
2054cdf0e10cSrcweir }
2055cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const2056cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres,
2057cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
2058cdf0e10cSrcweir {
2059cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
2060cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
2061cdf0e10cSrcweir 		String aStr;
2062cdf0e10cSrcweir 
2063cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
2064cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
2065cdf0e10cSrcweir 		rText.Insert(aStr, 0);
2066cdf0e10cSrcweir 	}
2067cdf0e10cSrcweir 	return ePres;
2068cdf0e10cSrcweir }
2069cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const2070cdf0e10cSrcweir sal_Bool SdrMeasureUnitItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2071cdf0e10cSrcweir {
2072cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
2073cdf0e10cSrcweir 	return sal_True;
2074cdf0e10cSrcweir }
2075cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)2076cdf0e10cSrcweir sal_Bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2077cdf0e10cSrcweir {
2078cdf0e10cSrcweir 	sal_Int32 nMeasure = 0;
2079cdf0e10cSrcweir 	if(!(rVal >>= nMeasure))
2080cdf0e10cSrcweir 		return sal_False;
2081cdf0e10cSrcweir 
2082cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (FieldUnit)nMeasure ) );
2083cdf0e10cSrcweir 	return sal_True;
2084cdf0e10cSrcweir }
2085cdf0e10cSrcweir 
2086cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2087cdf0e10cSrcweir // Circ
2088cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2089cdf0e10cSrcweir 
2090cdf0e10cSrcweir // CircKind
2091cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SdrCircKindItem,SfxEnumItem);
2092cdf0e10cSrcweir 
Clone(SfxItemPool *) const2093cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCircKindItem::Clone(SfxItemPool* /*pPool*/) const          { return new SdrCircKindItem(*this); }
2094cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2095cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrCircKindItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrCircKindItem(rIn); }
2096cdf0e10cSrcweir 
GetValueCount() const2097cdf0e10cSrcweir sal_uInt16 __EXPORT SdrCircKindItem::GetValueCount() const { return 4; }
2098cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const2099cdf0e10cSrcweir XubString __EXPORT SdrCircKindItem::GetValueTextByPos(sal_uInt16 nPos) const
2100cdf0e10cSrcweir {
2101cdf0e10cSrcweir 	return ImpGetResStr(STR_ItemValCIRC_FULL+nPos);
2102cdf0e10cSrcweir }
2103cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const2104cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrCircKindItem::GetPresentation(SfxItemPresentation ePres,
2105cdf0e10cSrcweir                       SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
2106cdf0e10cSrcweir {
2107cdf0e10cSrcweir 	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
2108cdf0e10cSrcweir 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
2109cdf0e10cSrcweir 		String aStr;
2110cdf0e10cSrcweir 
2111cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
2112cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
2113cdf0e10cSrcweir 		rText.Insert(aStr, 0);
2114cdf0e10cSrcweir 	}
2115cdf0e10cSrcweir 	return ePres;
2116cdf0e10cSrcweir }
2117cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const2118cdf0e10cSrcweir sal_Bool SdrCircKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2119cdf0e10cSrcweir {
2120cdf0e10cSrcweir 	rVal <<= (drawing::CircleKind)GetValue();
2121cdf0e10cSrcweir 	return sal_True;
2122cdf0e10cSrcweir }
2123cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)2124cdf0e10cSrcweir sal_Bool SdrCircKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2125cdf0e10cSrcweir {
2126cdf0e10cSrcweir 	drawing::CircleKind eKind;
2127cdf0e10cSrcweir 	if(!(rVal >>= eKind))
2128cdf0e10cSrcweir 	{
2129cdf0e10cSrcweir 		sal_Int32 nEnum = 0;
2130cdf0e10cSrcweir 		if(!(rVal >>= nEnum))
2131cdf0e10cSrcweir 			return sal_False;
2132cdf0e10cSrcweir 
2133cdf0e10cSrcweir 		eKind = (drawing::CircleKind)nEnum;
2134cdf0e10cSrcweir 	}
2135cdf0e10cSrcweir 
2136cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrCircKind)eKind ) );
2137cdf0e10cSrcweir 	return sal_True;
2138cdf0e10cSrcweir }
2139cdf0e10cSrcweir 
2140cdf0e10cSrcweir //------------------------------------------------------------
2141cdf0e10cSrcweir // class SdrSignedPercentItem
2142cdf0e10cSrcweir //------------------------------------------------------------
2143cdf0e10cSrcweir 
2144cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY( SdrSignedPercentItem, SfxInt16Item );
2145cdf0e10cSrcweir 
2146cdf0e10cSrcweir 
Clone(SfxItemPool *) const2147cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrSignedPercentItem::Clone(SfxItemPool* /*pPool*/) const
2148cdf0e10cSrcweir {
2149cdf0e10cSrcweir 	return new SdrSignedPercentItem( Which(), GetValue() );
2150cdf0e10cSrcweir }
2151cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2152cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrSignedPercentItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2153cdf0e10cSrcweir {
2154cdf0e10cSrcweir 	return new SdrSignedPercentItem( Which(), rIn );
2155cdf0e10cSrcweir }
2156cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const2157cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrSignedPercentItem::GetPresentation(
2158cdf0e10cSrcweir 	SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
2159cdf0e10cSrcweir     XubString& rText, const IntlWrapper *) const
2160cdf0e10cSrcweir {
2161cdf0e10cSrcweir 	rText = UniString::CreateFromInt32(GetValue());
2162cdf0e10cSrcweir 	rText += sal_Unicode('%');
2163cdf0e10cSrcweir 
2164cdf0e10cSrcweir 	if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
2165cdf0e10cSrcweir 	{
2166cdf0e10cSrcweir 		XubString aStr;
2167cdf0e10cSrcweir 
2168cdf0e10cSrcweir 		SdrItemPool::TakeItemName(Which(), aStr);
2169cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
2170cdf0e10cSrcweir 		rText.Insert(aStr, 0);
2171cdf0e10cSrcweir 	}
2172cdf0e10cSrcweir 
2173cdf0e10cSrcweir 	return ePres;
2174cdf0e10cSrcweir }
2175cdf0e10cSrcweir 
2176cdf0e10cSrcweir #ifdef SDR_ISPOOLABLE
2177cdf0e10cSrcweir 
IsPoolable() const2178cdf0e10cSrcweir int __EXPORT SdrSignedPercentItem::IsPoolable() const
2179cdf0e10cSrcweir {
2180cdf0e10cSrcweir 	sal_uInt16 nId=Which();
2181cdf0e10cSrcweir 	return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST;
2182cdf0e10cSrcweir }
2183cdf0e10cSrcweir #endif
2184cdf0e10cSrcweir 
2185cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2186cdf0e10cSrcweir // SdrGrafRedItem
2187cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2188cdf0e10cSrcweir 
2189cdf0e10cSrcweir TYPEINIT1( SdrGrafRedItem, SdrSignedPercentItem );
2190cdf0e10cSrcweir 
Clone(SfxItemPool *) const2191cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafRedItem::Clone( SfxItemPool* /*pPool*/) const
2192cdf0e10cSrcweir {
2193cdf0e10cSrcweir 	return new SdrGrafRedItem( *this );
2194cdf0e10cSrcweir }
2195cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2196cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafRedItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2197cdf0e10cSrcweir {
2198cdf0e10cSrcweir 	return new SdrGrafRedItem( rIn );
2199cdf0e10cSrcweir }
2200cdf0e10cSrcweir 
2201cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2202cdf0e10cSrcweir // SdrGrafGreenItem
2203cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2204cdf0e10cSrcweir 
2205cdf0e10cSrcweir TYPEINIT1( SdrGrafGreenItem, SdrSignedPercentItem );
2206cdf0e10cSrcweir 
Clone(SfxItemPool *) const2207cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafGreenItem::Clone( SfxItemPool* /*pPool*/) const
2208cdf0e10cSrcweir {
2209cdf0e10cSrcweir 	return new SdrGrafGreenItem( *this );
2210cdf0e10cSrcweir }
2211cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2212cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafGreenItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2213cdf0e10cSrcweir {
2214cdf0e10cSrcweir 	return new SdrGrafGreenItem( rIn );
2215cdf0e10cSrcweir }
2216cdf0e10cSrcweir 
2217cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2218cdf0e10cSrcweir // SdrGrafBlueItem
2219cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2220cdf0e10cSrcweir 
2221cdf0e10cSrcweir TYPEINIT1( SdrGrafBlueItem, SdrSignedPercentItem );
2222cdf0e10cSrcweir 
Clone(SfxItemPool *) const2223cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafBlueItem::Clone( SfxItemPool* /*pPool*/) const
2224cdf0e10cSrcweir {
2225cdf0e10cSrcweir 	return new SdrGrafBlueItem( *this );
2226cdf0e10cSrcweir }
2227cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2228cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafBlueItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2229cdf0e10cSrcweir {
2230cdf0e10cSrcweir 	return new SdrGrafBlueItem( rIn );
2231cdf0e10cSrcweir }
2232cdf0e10cSrcweir 
2233cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2234cdf0e10cSrcweir // SdrGrafLuminanceItem
2235cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2236cdf0e10cSrcweir 
2237cdf0e10cSrcweir TYPEINIT1( SdrGrafLuminanceItem, SdrSignedPercentItem );
2238cdf0e10cSrcweir 
Clone(SfxItemPool *) const2239cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Clone( SfxItemPool* /*pPool*/) const
2240cdf0e10cSrcweir {
2241cdf0e10cSrcweir 	return new SdrGrafLuminanceItem( *this );
2242cdf0e10cSrcweir }
2243cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2244cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2245cdf0e10cSrcweir {
2246cdf0e10cSrcweir 	return new SdrGrafLuminanceItem( rIn );
2247cdf0e10cSrcweir }
2248cdf0e10cSrcweir 
2249cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2250cdf0e10cSrcweir // SdrGrafContrastItem
2251cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2252cdf0e10cSrcweir 
2253cdf0e10cSrcweir TYPEINIT1( SdrGrafContrastItem, SdrSignedPercentItem );
2254cdf0e10cSrcweir 
Clone(SfxItemPool *) const2255cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafContrastItem::Clone( SfxItemPool* /*pPool*/) const
2256cdf0e10cSrcweir {
2257cdf0e10cSrcweir 	return new SdrGrafContrastItem( *this );
2258cdf0e10cSrcweir }
2259cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2260cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafContrastItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2261cdf0e10cSrcweir {
2262cdf0e10cSrcweir 	return new SdrGrafContrastItem( rIn );
2263cdf0e10cSrcweir }
2264cdf0e10cSrcweir 
2265cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2266cdf0e10cSrcweir // SdrGrafGamma100Item
2267cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2268cdf0e10cSrcweir 
2269cdf0e10cSrcweir TYPEINIT1( SdrGrafGamma100Item, SfxUInt32Item );
2270cdf0e10cSrcweir 
Clone(SfxItemPool *) const2271cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafGamma100Item::Clone( SfxItemPool* /*pPool */) const
2272cdf0e10cSrcweir {
2273cdf0e10cSrcweir 	return new SdrGrafGamma100Item( *this );
2274cdf0e10cSrcweir }
2275cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2276cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafGamma100Item::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2277cdf0e10cSrcweir {
2278cdf0e10cSrcweir 	return new SdrGrafGamma100Item( rIn );
2279cdf0e10cSrcweir }
2280cdf0e10cSrcweir 
QueryValue(uno::Any & rVal,sal_uInt8) const2281cdf0e10cSrcweir sal_Bool SdrGrafGamma100Item::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2282cdf0e10cSrcweir {
2283cdf0e10cSrcweir 	rVal <<= ((double)GetValue()) / 100.0;
2284cdf0e10cSrcweir 	return sal_True;
2285cdf0e10cSrcweir }
2286cdf0e10cSrcweir 
PutValue(const uno::Any & rVal,sal_uInt8)2287cdf0e10cSrcweir sal_Bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2288cdf0e10cSrcweir {
2289cdf0e10cSrcweir 	double nGamma = 0;
2290cdf0e10cSrcweir 	if(!(rVal >>= nGamma))
2291cdf0e10cSrcweir 		return sal_False;
2292cdf0e10cSrcweir 
2293cdf0e10cSrcweir 	SetValue( (sal_uInt32)(nGamma * 100.0  ) );
2294cdf0e10cSrcweir 	return sal_True;
2295cdf0e10cSrcweir }
2296cdf0e10cSrcweir 
2297cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2298cdf0e10cSrcweir // SdrGrafInvertItem
2299cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2300cdf0e10cSrcweir 
2301cdf0e10cSrcweir TYPEINIT1( SdrGrafInvertItem, SdrOnOffItem );
2302cdf0e10cSrcweir 
Clone(SfxItemPool *) const2303cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafInvertItem::Clone( SfxItemPool* /*pPool*/) const
2304cdf0e10cSrcweir {
2305cdf0e10cSrcweir 	return new SdrGrafInvertItem( *this );
2306cdf0e10cSrcweir }
2307cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2308cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafInvertItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2309cdf0e10cSrcweir {
2310cdf0e10cSrcweir 	return new SdrGrafInvertItem( rIn );
2311cdf0e10cSrcweir }
2312cdf0e10cSrcweir 
2313cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2314cdf0e10cSrcweir // SdrGrafTransparenceItem
2315cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2316cdf0e10cSrcweir 
2317cdf0e10cSrcweir TYPEINIT1( SdrGrafTransparenceItem, SdrPercentItem );
2318cdf0e10cSrcweir 
Clone(SfxItemPool *) const2319cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Clone( SfxItemPool* /*pPool*/) const
2320cdf0e10cSrcweir {
2321cdf0e10cSrcweir 	return new SdrGrafTransparenceItem( *this );
2322cdf0e10cSrcweir }
2323cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2324cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2325cdf0e10cSrcweir {
2326cdf0e10cSrcweir 	return new SdrGrafTransparenceItem( rIn );
2327cdf0e10cSrcweir }
2328cdf0e10cSrcweir 
2329cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2330cdf0e10cSrcweir // SdrGrafModeItem
2331cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2332cdf0e10cSrcweir 
2333cdf0e10cSrcweir TYPEINIT1( SdrGrafModeItem, SfxEnumItem );
2334cdf0e10cSrcweir 
Clone(SfxItemPool *) const2335cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafModeItem::Clone(SfxItemPool* /*pPool*/) const
2336cdf0e10cSrcweir {
2337cdf0e10cSrcweir 	return new SdrGrafModeItem( *this );
2338cdf0e10cSrcweir }
2339cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16) const2340cdf0e10cSrcweir SfxPoolItem* __EXPORT SdrGrafModeItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
2341cdf0e10cSrcweir {
2342cdf0e10cSrcweir 	return new SdrGrafModeItem( rIn );
2343cdf0e10cSrcweir }
2344cdf0e10cSrcweir 
GetValueCount() const2345cdf0e10cSrcweir sal_uInt16 __EXPORT SdrGrafModeItem::GetValueCount() const
2346cdf0e10cSrcweir {
2347cdf0e10cSrcweir 	return 4;
2348cdf0e10cSrcweir }
2349cdf0e10cSrcweir 
GetValueTextByPos(sal_uInt16 nPos) const2350cdf0e10cSrcweir XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(sal_uInt16 nPos) const
2351cdf0e10cSrcweir {
2352cdf0e10cSrcweir 	XubString aStr;
2353cdf0e10cSrcweir 
2354cdf0e10cSrcweir 	switch(nPos)
2355cdf0e10cSrcweir 	{
2356cdf0e10cSrcweir 		case 1:
2357cdf0e10cSrcweir 		{
2358027cdf4aSHerbert Dürr 			const sal_Char aTextGreys[] = "Greys";
2359027cdf4aSHerbert Dürr 			aStr += UniString(aTextGreys, sizeof(aTextGreys)-1);
2360cdf0e10cSrcweir 			break;
2361cdf0e10cSrcweir 		}
2362cdf0e10cSrcweir 		case 2:
2363cdf0e10cSrcweir 		{
2364027cdf4aSHerbert Dürr 			const sal_Char aTextBlackWhite[] = "Black/White";
2365027cdf4aSHerbert Dürr 			aStr += UniString(aTextBlackWhite, sizeof(aTextBlackWhite)-1);
2366cdf0e10cSrcweir 			break;
2367cdf0e10cSrcweir 		}
2368cdf0e10cSrcweir 		case 3:
2369cdf0e10cSrcweir 		{
2370027cdf4aSHerbert Dürr 			const sal_Char aTextWatermark[] = "Watermark";
2371027cdf4aSHerbert Dürr 			aStr += UniString(aTextWatermark, sizeof(aTextWatermark)-1);
2372cdf0e10cSrcweir 			break;
2373cdf0e10cSrcweir 		}
2374cdf0e10cSrcweir 		default:
2375cdf0e10cSrcweir 		{
2376027cdf4aSHerbert Dürr 			const sal_Char aTextStandard[] = "Standard";
2377027cdf4aSHerbert Dürr 			aStr += UniString(aTextStandard, sizeof(aTextStandard)-1);
2378cdf0e10cSrcweir 			break;
2379cdf0e10cSrcweir 		}
2380cdf0e10cSrcweir 	}
2381cdf0e10cSrcweir 
2382cdf0e10cSrcweir 	return aStr;
2383cdf0e10cSrcweir }
2384cdf0e10cSrcweir 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const2385cdf0e10cSrcweir SfxItemPresentation __EXPORT SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,
2386cdf0e10cSrcweir 															   SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
2387cdf0e10cSrcweir                                                                XubString& rText, const IntlWrapper *) const
2388cdf0e10cSrcweir {
2389cdf0e10cSrcweir 	rText = GetValueTextByPos( sal::static_int_cast< sal_uInt16 >( GetValue() ) );
2390cdf0e10cSrcweir 
2391cdf0e10cSrcweir 	if( ePres == SFX_ITEM_PRESENTATION_COMPLETE )
2392cdf0e10cSrcweir 	{
2393cdf0e10cSrcweir 		String aStr;
2394cdf0e10cSrcweir 
2395cdf0e10cSrcweir 		SdrItemPool::TakeItemName( Which(), aStr );
2396cdf0e10cSrcweir 		aStr += sal_Unicode(' ');
2397cdf0e10cSrcweir 		rText.Insert( aStr, 0 );
2398cdf0e10cSrcweir 	}
2399cdf0e10cSrcweir 
2400cdf0e10cSrcweir 	return ePres;
2401cdf0e10cSrcweir }
2402cdf0e10cSrcweir 
2403cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2404cdf0e10cSrcweir // SdrGrafCropItem
2405cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2406cdf0e10cSrcweir 
2407cdf0e10cSrcweir TYPEINIT1( SdrGrafCropItem, SvxGrfCrop );
2408cdf0e10cSrcweir 
Clone(SfxItemPool *) const2409cdf0e10cSrcweir SfxPoolItem* SdrGrafCropItem::Clone( SfxItemPool* /*pPool*/) const
2410cdf0e10cSrcweir {
2411cdf0e10cSrcweir 	return new SdrGrafCropItem( *this );
2412cdf0e10cSrcweir }
2413cdf0e10cSrcweir 
Create(SvStream & rIn,sal_uInt16 nVer) const2414cdf0e10cSrcweir SfxPoolItem* SdrGrafCropItem::Create( SvStream& rIn, sal_uInt16 nVer ) const
2415cdf0e10cSrcweir {
2416cdf0e10cSrcweir 	return( ( 0 == nVer ) ? Clone( NULL ) : SvxGrfCrop::Create( rIn, nVer ) );
2417cdf0e10cSrcweir }
2418cdf0e10cSrcweir 
GetVersion(sal_uInt16) const2419cdf0e10cSrcweir sal_uInt16 SdrGrafCropItem::GetVersion( sal_uInt16 /*nFileVersion*/) const
2420cdf0e10cSrcweir {
2421cdf0e10cSrcweir 	// GRFCROP_VERSION_MOVETOSVX is 1
2422cdf0e10cSrcweir 	return GRFCROP_VERSION_MOVETOSVX;
2423cdf0e10cSrcweir }
2424cdf0e10cSrcweir 
2425cdf0e10cSrcweir // eof
2426