LCOV - code coverage report
Current view: top level - libreoffice/svx/source/svdraw - svdattr.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 355 1260 28.2 %
Date: 2012-12-27 Functions: 170 374 45.5 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10