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

Generated by: LCOV version 1.10