1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include "precompiled_svx.hxx" 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <svx/sdr/attribute/sdrtextattribute.hxx> 31*cdf0e10cSrcweir #include <svx/sdr/attribute/sdrformtextattribute.hxx> 32*cdf0e10cSrcweir #include <svx/svdotext.hxx> 33*cdf0e10cSrcweir #include <editeng/outlobj.hxx> 34*cdf0e10cSrcweir #include <editeng/editobj.hxx> 35*cdf0e10cSrcweir #include <editeng/flditem.hxx> 36*cdf0e10cSrcweir #include <svx/sdr/properties/properties.hxx> 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir namespace drawinglayer 41*cdf0e10cSrcweir { 42*cdf0e10cSrcweir namespace attribute 43*cdf0e10cSrcweir { 44*cdf0e10cSrcweir class ImpSdrTextAttribute 45*cdf0e10cSrcweir { 46*cdf0e10cSrcweir public: 47*cdf0e10cSrcweir // refcounter 48*cdf0e10cSrcweir sal_uInt32 mnRefCount; 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir // all-text attributes. The SdrText itself and a copy 51*cdf0e10cSrcweir // of te OPO 52*cdf0e10cSrcweir const SdrText* mpSdrText; 53*cdf0e10cSrcweir const OutlinerParaObject* mpOutlinerParaObject; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir // Set when it's a FormText; contains all FormText attributes 56*cdf0e10cSrcweir SdrFormTextAttribute maSdrFormTextAttribute; 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir // text distances 59*cdf0e10cSrcweir sal_Int32 maTextLeftDistance; 60*cdf0e10cSrcweir sal_Int32 maTextUpperDistance; 61*cdf0e10cSrcweir sal_Int32 maTextRightDistance; 62*cdf0e10cSrcweir sal_Int32 maTextLowerDistance; 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir // #i101556# use versioning from text attributes to detect changes 65*cdf0e10cSrcweir sal_uInt32 maPropertiesVersion; 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir // text alignments 68*cdf0e10cSrcweir SdrTextHorzAdjust maSdrTextHorzAdjust; 69*cdf0e10cSrcweir SdrTextVertAdjust maSdrTextVertAdjust; 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir // bitfield 72*cdf0e10cSrcweir unsigned mbContour : 1; 73*cdf0e10cSrcweir unsigned mbFitToSize : 1; 74*cdf0e10cSrcweir unsigned mbHideContour : 1; 75*cdf0e10cSrcweir unsigned mbBlink : 1; 76*cdf0e10cSrcweir unsigned mbScroll : 1; 77*cdf0e10cSrcweir unsigned mbInEditMode : 1; 78*cdf0e10cSrcweir unsigned mbFixedCellHeight : 1; 79*cdf0e10cSrcweir unsigned mbWrongSpell : 1; 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir public: 82*cdf0e10cSrcweir ImpSdrTextAttribute( 83*cdf0e10cSrcweir const SdrText* pSdrText, 84*cdf0e10cSrcweir const OutlinerParaObject& rOutlinerParaObject, 85*cdf0e10cSrcweir XFormTextStyle eFormTextStyle, 86*cdf0e10cSrcweir sal_Int32 aTextLeftDistance, 87*cdf0e10cSrcweir sal_Int32 aTextUpperDistance, 88*cdf0e10cSrcweir sal_Int32 aTextRightDistance, 89*cdf0e10cSrcweir sal_Int32 aTextLowerDistance, 90*cdf0e10cSrcweir SdrTextHorzAdjust aSdrTextHorzAdjust, 91*cdf0e10cSrcweir SdrTextVertAdjust aSdrTextVertAdjust, 92*cdf0e10cSrcweir bool bContour, 93*cdf0e10cSrcweir bool bFitToSize, 94*cdf0e10cSrcweir bool bHideContour, 95*cdf0e10cSrcweir bool bBlink, 96*cdf0e10cSrcweir bool bScroll, 97*cdf0e10cSrcweir bool bInEditMode, 98*cdf0e10cSrcweir bool bFixedCellHeight, 99*cdf0e10cSrcweir bool bWrongSpell) 100*cdf0e10cSrcweir : mnRefCount(0), 101*cdf0e10cSrcweir mpSdrText(pSdrText), 102*cdf0e10cSrcweir mpOutlinerParaObject(new OutlinerParaObject(rOutlinerParaObject)), 103*cdf0e10cSrcweir maSdrFormTextAttribute(), 104*cdf0e10cSrcweir maTextLeftDistance(aTextLeftDistance), 105*cdf0e10cSrcweir maTextUpperDistance(aTextUpperDistance), 106*cdf0e10cSrcweir maTextRightDistance(aTextRightDistance), 107*cdf0e10cSrcweir maTextLowerDistance(aTextLowerDistance), 108*cdf0e10cSrcweir maPropertiesVersion(0), 109*cdf0e10cSrcweir maSdrTextHorzAdjust(aSdrTextHorzAdjust), 110*cdf0e10cSrcweir maSdrTextVertAdjust(aSdrTextVertAdjust), 111*cdf0e10cSrcweir mbContour(bContour), 112*cdf0e10cSrcweir mbFitToSize(bFitToSize), 113*cdf0e10cSrcweir mbHideContour(bHideContour), 114*cdf0e10cSrcweir mbBlink(bBlink), 115*cdf0e10cSrcweir mbScroll(bScroll), 116*cdf0e10cSrcweir mbInEditMode(bInEditMode), 117*cdf0e10cSrcweir mbFixedCellHeight(bFixedCellHeight), 118*cdf0e10cSrcweir mbWrongSpell(bWrongSpell) 119*cdf0e10cSrcweir { 120*cdf0e10cSrcweir if(pSdrText) 121*cdf0e10cSrcweir { 122*cdf0e10cSrcweir if(XFT_NONE != eFormTextStyle) 123*cdf0e10cSrcweir { 124*cdf0e10cSrcweir // text on path. Create FormText attribute 125*cdf0e10cSrcweir const SfxItemSet& rSet = pSdrText->GetItemSet(); 126*cdf0e10cSrcweir maSdrFormTextAttribute = SdrFormTextAttribute(rSet); 127*cdf0e10cSrcweir } 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir // #i101556# init with version number to detect changes of single text 130*cdf0e10cSrcweir // attribute and/or style sheets in primitive data without having to 131*cdf0e10cSrcweir // copy that data locally (which would be better from principle) 132*cdf0e10cSrcweir maPropertiesVersion = pSdrText->GetObject().GetProperties().getVersion(); 133*cdf0e10cSrcweir } 134*cdf0e10cSrcweir } 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir ImpSdrTextAttribute() 137*cdf0e10cSrcweir : mnRefCount(0), 138*cdf0e10cSrcweir mpSdrText(0), 139*cdf0e10cSrcweir mpOutlinerParaObject(0), 140*cdf0e10cSrcweir maSdrFormTextAttribute(), 141*cdf0e10cSrcweir maTextLeftDistance(0), 142*cdf0e10cSrcweir maTextUpperDistance(0), 143*cdf0e10cSrcweir maTextRightDistance(0), 144*cdf0e10cSrcweir maTextLowerDistance(0), 145*cdf0e10cSrcweir maPropertiesVersion(0), 146*cdf0e10cSrcweir maSdrTextHorzAdjust(SDRTEXTHORZADJUST_LEFT), 147*cdf0e10cSrcweir maSdrTextVertAdjust(SDRTEXTVERTADJUST_TOP), 148*cdf0e10cSrcweir mbContour(false), 149*cdf0e10cSrcweir mbFitToSize(false), 150*cdf0e10cSrcweir mbHideContour(false), 151*cdf0e10cSrcweir mbBlink(false), 152*cdf0e10cSrcweir mbScroll(false), 153*cdf0e10cSrcweir mbInEditMode(false), 154*cdf0e10cSrcweir mbFixedCellHeight(false), 155*cdf0e10cSrcweir mbWrongSpell(false) 156*cdf0e10cSrcweir { 157*cdf0e10cSrcweir } 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir ~ImpSdrTextAttribute() 160*cdf0e10cSrcweir { 161*cdf0e10cSrcweir if(mpOutlinerParaObject) 162*cdf0e10cSrcweir { 163*cdf0e10cSrcweir delete mpOutlinerParaObject; 164*cdf0e10cSrcweir } 165*cdf0e10cSrcweir } 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir // data read access 168*cdf0e10cSrcweir const SdrText& getSdrText() const 169*cdf0e10cSrcweir { 170*cdf0e10cSrcweir OSL_ENSURE(mpSdrText, "Access to text of default version of ImpSdrTextAttribute (!)"); 171*cdf0e10cSrcweir return *mpSdrText; 172*cdf0e10cSrcweir } 173*cdf0e10cSrcweir const OutlinerParaObject& getOutlinerParaObject() const 174*cdf0e10cSrcweir { 175*cdf0e10cSrcweir OSL_ENSURE(mpOutlinerParaObject, "Access to OutlinerParaObject of default version of ImpSdrTextAttribute (!)"); 176*cdf0e10cSrcweir return *mpOutlinerParaObject; 177*cdf0e10cSrcweir } 178*cdf0e10cSrcweir bool isContour() const { return mbContour; } 179*cdf0e10cSrcweir bool isFitToSize() const { return mbFitToSize; } 180*cdf0e10cSrcweir bool isHideContour() const { return mbHideContour; } 181*cdf0e10cSrcweir bool isBlink() const { return mbBlink; } 182*cdf0e10cSrcweir bool isScroll() const { return mbScroll; } 183*cdf0e10cSrcweir bool isInEditMode() const { return mbInEditMode; } 184*cdf0e10cSrcweir bool isFixedCellHeight() const { return mbFixedCellHeight; } 185*cdf0e10cSrcweir bool isWrongSpell() const { return mbWrongSpell; } 186*cdf0e10cSrcweir const SdrFormTextAttribute& getSdrFormTextAttribute() const { return maSdrFormTextAttribute; } 187*cdf0e10cSrcweir sal_Int32 getTextLeftDistance() const { return maTextLeftDistance; } 188*cdf0e10cSrcweir sal_Int32 getTextUpperDistance() const { return maTextUpperDistance; } 189*cdf0e10cSrcweir sal_Int32 getTextRightDistance() const { return maTextRightDistance; } 190*cdf0e10cSrcweir sal_Int32 getTextLowerDistance() const { return maTextLowerDistance; } 191*cdf0e10cSrcweir sal_uInt32 getPropertiesVersion() const { return maPropertiesVersion; } 192*cdf0e10cSrcweir SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; } 193*cdf0e10cSrcweir SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; } 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir // compare operator 196*cdf0e10cSrcweir bool operator==(const ImpSdrTextAttribute& rCandidate) const 197*cdf0e10cSrcweir { 198*cdf0e10cSrcweir if(mpOutlinerParaObject != rCandidate.mpOutlinerParaObject) 199*cdf0e10cSrcweir { 200*cdf0e10cSrcweir if(mpOutlinerParaObject && rCandidate.mpOutlinerParaObject) 201*cdf0e10cSrcweir { 202*cdf0e10cSrcweir // compares OPO and it's contents, but traditionally not the RedLining 203*cdf0e10cSrcweir // which is not seen as model, but as temporary information 204*cdf0e10cSrcweir if(!(getOutlinerParaObject() == rCandidate.getOutlinerParaObject())) 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir return false; 207*cdf0e10cSrcweir } 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir // #i102062# for primitive visualisation, the WrongList (SpellChecking) 210*cdf0e10cSrcweir // is important, too, so use isWrongListEqual since there is no WrongList 211*cdf0e10cSrcweir // comparison in the regular OutlinerParaObject compare (since it's 212*cdf0e10cSrcweir // not-persistent data) 213*cdf0e10cSrcweir if(!(getOutlinerParaObject().isWrongListEqual(rCandidate.getOutlinerParaObject()))) 214*cdf0e10cSrcweir { 215*cdf0e10cSrcweir return false; 216*cdf0e10cSrcweir } 217*cdf0e10cSrcweir } 218*cdf0e10cSrcweir else 219*cdf0e10cSrcweir { 220*cdf0e10cSrcweir // only one is zero; not equal 221*cdf0e10cSrcweir return false; 222*cdf0e10cSrcweir } 223*cdf0e10cSrcweir } 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir return ( 226*cdf0e10cSrcweir getSdrFormTextAttribute() == rCandidate.getSdrFormTextAttribute() 227*cdf0e10cSrcweir && getTextLeftDistance() == rCandidate.getTextLeftDistance() 228*cdf0e10cSrcweir && getTextUpperDistance() == rCandidate.getTextUpperDistance() 229*cdf0e10cSrcweir && getTextRightDistance() == rCandidate.getTextRightDistance() 230*cdf0e10cSrcweir && getTextLowerDistance() == rCandidate.getTextLowerDistance() 231*cdf0e10cSrcweir && getPropertiesVersion() == rCandidate.getPropertiesVersion() 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir && getSdrTextHorzAdjust() == rCandidate.getSdrTextHorzAdjust() 234*cdf0e10cSrcweir && getSdrTextVertAdjust() == rCandidate.getSdrTextVertAdjust() 235*cdf0e10cSrcweir 236*cdf0e10cSrcweir && isContour() == rCandidate.isContour() 237*cdf0e10cSrcweir && isFitToSize() == rCandidate.isFitToSize() 238*cdf0e10cSrcweir && isHideContour() == rCandidate.isHideContour() 239*cdf0e10cSrcweir && isBlink() == rCandidate.isBlink() 240*cdf0e10cSrcweir && isScroll() == rCandidate.isScroll() 241*cdf0e10cSrcweir && isInEditMode() == rCandidate.isInEditMode() 242*cdf0e10cSrcweir && isFixedCellHeight() == rCandidate.isFixedCellHeight() 243*cdf0e10cSrcweir && isWrongSpell() == rCandidate.isWrongSpell()); 244*cdf0e10cSrcweir } 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir static ImpSdrTextAttribute* get_global_default() 247*cdf0e10cSrcweir { 248*cdf0e10cSrcweir static ImpSdrTextAttribute* pDefault = 0; 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir if(!pDefault) 251*cdf0e10cSrcweir { 252*cdf0e10cSrcweir // use default constructor 253*cdf0e10cSrcweir pDefault = new ImpSdrTextAttribute(); 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir // never delete; start with RefCount 1, not 0 256*cdf0e10cSrcweir pDefault->mnRefCount++; 257*cdf0e10cSrcweir } 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir return pDefault; 260*cdf0e10cSrcweir } 261*cdf0e10cSrcweir }; 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir SdrTextAttribute::SdrTextAttribute( 264*cdf0e10cSrcweir const SdrText& rSdrText, 265*cdf0e10cSrcweir const OutlinerParaObject& rOutlinerParaObject, 266*cdf0e10cSrcweir XFormTextStyle eFormTextStyle, 267*cdf0e10cSrcweir sal_Int32 aTextLeftDistance, 268*cdf0e10cSrcweir sal_Int32 aTextUpperDistance, 269*cdf0e10cSrcweir sal_Int32 aTextRightDistance, 270*cdf0e10cSrcweir sal_Int32 aTextLowerDistance, 271*cdf0e10cSrcweir SdrTextHorzAdjust aSdrTextHorzAdjust, 272*cdf0e10cSrcweir SdrTextVertAdjust aSdrTextVertAdjust, 273*cdf0e10cSrcweir bool bContour, 274*cdf0e10cSrcweir bool bFitToSize, 275*cdf0e10cSrcweir bool bHideContour, 276*cdf0e10cSrcweir bool bBlink, 277*cdf0e10cSrcweir bool bScroll, 278*cdf0e10cSrcweir bool bInEditMode, 279*cdf0e10cSrcweir bool bFixedCellHeight, 280*cdf0e10cSrcweir bool bWrongSpell) 281*cdf0e10cSrcweir : mpSdrTextAttribute(new ImpSdrTextAttribute( 282*cdf0e10cSrcweir &rSdrText, rOutlinerParaObject, eFormTextStyle, aTextLeftDistance, aTextUpperDistance, 283*cdf0e10cSrcweir aTextRightDistance, aTextLowerDistance, aSdrTextHorzAdjust, aSdrTextVertAdjust, bContour, 284*cdf0e10cSrcweir bFitToSize, bHideContour, bBlink, bScroll, bInEditMode, bFixedCellHeight, bWrongSpell)) 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir } 287*cdf0e10cSrcweir 288*cdf0e10cSrcweir SdrTextAttribute::SdrTextAttribute() 289*cdf0e10cSrcweir : mpSdrTextAttribute(ImpSdrTextAttribute::get_global_default()) 290*cdf0e10cSrcweir { 291*cdf0e10cSrcweir mpSdrTextAttribute->mnRefCount++; 292*cdf0e10cSrcweir } 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir SdrTextAttribute::SdrTextAttribute(const SdrTextAttribute& rCandidate) 295*cdf0e10cSrcweir : mpSdrTextAttribute(rCandidate.mpSdrTextAttribute) 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir mpSdrTextAttribute->mnRefCount++; 298*cdf0e10cSrcweir } 299*cdf0e10cSrcweir 300*cdf0e10cSrcweir SdrTextAttribute::~SdrTextAttribute() 301*cdf0e10cSrcweir { 302*cdf0e10cSrcweir if(mpSdrTextAttribute->mnRefCount) 303*cdf0e10cSrcweir { 304*cdf0e10cSrcweir mpSdrTextAttribute->mnRefCount--; 305*cdf0e10cSrcweir } 306*cdf0e10cSrcweir else 307*cdf0e10cSrcweir { 308*cdf0e10cSrcweir delete mpSdrTextAttribute; 309*cdf0e10cSrcweir } 310*cdf0e10cSrcweir } 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir bool SdrTextAttribute::isDefault() const 313*cdf0e10cSrcweir { 314*cdf0e10cSrcweir return mpSdrTextAttribute == ImpSdrTextAttribute::get_global_default(); 315*cdf0e10cSrcweir } 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir SdrTextAttribute& SdrTextAttribute::operator=(const SdrTextAttribute& rCandidate) 318*cdf0e10cSrcweir { 319*cdf0e10cSrcweir if(rCandidate.mpSdrTextAttribute != mpSdrTextAttribute) 320*cdf0e10cSrcweir { 321*cdf0e10cSrcweir if(mpSdrTextAttribute->mnRefCount) 322*cdf0e10cSrcweir { 323*cdf0e10cSrcweir mpSdrTextAttribute->mnRefCount--; 324*cdf0e10cSrcweir } 325*cdf0e10cSrcweir else 326*cdf0e10cSrcweir { 327*cdf0e10cSrcweir delete mpSdrTextAttribute; 328*cdf0e10cSrcweir } 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir mpSdrTextAttribute = rCandidate.mpSdrTextAttribute; 331*cdf0e10cSrcweir mpSdrTextAttribute->mnRefCount++; 332*cdf0e10cSrcweir } 333*cdf0e10cSrcweir 334*cdf0e10cSrcweir return *this; 335*cdf0e10cSrcweir } 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir bool SdrTextAttribute::operator==(const SdrTextAttribute& rCandidate) const 338*cdf0e10cSrcweir { 339*cdf0e10cSrcweir if(rCandidate.mpSdrTextAttribute == mpSdrTextAttribute) 340*cdf0e10cSrcweir { 341*cdf0e10cSrcweir return true; 342*cdf0e10cSrcweir } 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir if(rCandidate.isDefault() != isDefault()) 345*cdf0e10cSrcweir { 346*cdf0e10cSrcweir return false; 347*cdf0e10cSrcweir } 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir return (*rCandidate.mpSdrTextAttribute == *mpSdrTextAttribute); 350*cdf0e10cSrcweir } 351*cdf0e10cSrcweir 352*cdf0e10cSrcweir const SdrText& SdrTextAttribute::getSdrText() const 353*cdf0e10cSrcweir { 354*cdf0e10cSrcweir return mpSdrTextAttribute->getSdrText(); 355*cdf0e10cSrcweir } 356*cdf0e10cSrcweir 357*cdf0e10cSrcweir const OutlinerParaObject& SdrTextAttribute::getOutlinerParaObject() const 358*cdf0e10cSrcweir { 359*cdf0e10cSrcweir return mpSdrTextAttribute->getOutlinerParaObject(); 360*cdf0e10cSrcweir } 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir bool SdrTextAttribute::isContour() const 363*cdf0e10cSrcweir { 364*cdf0e10cSrcweir return mpSdrTextAttribute->isContour(); 365*cdf0e10cSrcweir } 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir bool SdrTextAttribute::isFitToSize() const 368*cdf0e10cSrcweir { 369*cdf0e10cSrcweir return mpSdrTextAttribute->isFitToSize(); 370*cdf0e10cSrcweir } 371*cdf0e10cSrcweir 372*cdf0e10cSrcweir bool SdrTextAttribute::isHideContour() const 373*cdf0e10cSrcweir { 374*cdf0e10cSrcweir return mpSdrTextAttribute->isHideContour(); 375*cdf0e10cSrcweir } 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir bool SdrTextAttribute::isBlink() const 378*cdf0e10cSrcweir { 379*cdf0e10cSrcweir return mpSdrTextAttribute->isBlink(); 380*cdf0e10cSrcweir } 381*cdf0e10cSrcweir 382*cdf0e10cSrcweir bool SdrTextAttribute::isScroll() const 383*cdf0e10cSrcweir { 384*cdf0e10cSrcweir return mpSdrTextAttribute->isScroll(); 385*cdf0e10cSrcweir } 386*cdf0e10cSrcweir 387*cdf0e10cSrcweir bool SdrTextAttribute::isInEditMode() const 388*cdf0e10cSrcweir { 389*cdf0e10cSrcweir return mpSdrTextAttribute->isInEditMode(); 390*cdf0e10cSrcweir } 391*cdf0e10cSrcweir 392*cdf0e10cSrcweir bool SdrTextAttribute::isFixedCellHeight() const 393*cdf0e10cSrcweir { 394*cdf0e10cSrcweir return mpSdrTextAttribute->isFixedCellHeight(); 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir bool SdrTextAttribute::isWrongSpell() const 398*cdf0e10cSrcweir { 399*cdf0e10cSrcweir return mpSdrTextAttribute->isWrongSpell(); 400*cdf0e10cSrcweir } 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir const SdrFormTextAttribute& SdrTextAttribute::getSdrFormTextAttribute() const 403*cdf0e10cSrcweir { 404*cdf0e10cSrcweir return mpSdrTextAttribute->getSdrFormTextAttribute(); 405*cdf0e10cSrcweir } 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir sal_Int32 SdrTextAttribute::getTextLeftDistance() const 408*cdf0e10cSrcweir { 409*cdf0e10cSrcweir return mpSdrTextAttribute->getTextLeftDistance(); 410*cdf0e10cSrcweir } 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir sal_Int32 SdrTextAttribute::getTextUpperDistance() const 413*cdf0e10cSrcweir { 414*cdf0e10cSrcweir return mpSdrTextAttribute->getTextUpperDistance(); 415*cdf0e10cSrcweir } 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir sal_Int32 SdrTextAttribute::getTextRightDistance() const 418*cdf0e10cSrcweir { 419*cdf0e10cSrcweir return mpSdrTextAttribute->getTextRightDistance(); 420*cdf0e10cSrcweir } 421*cdf0e10cSrcweir 422*cdf0e10cSrcweir sal_Int32 SdrTextAttribute::getTextLowerDistance() const 423*cdf0e10cSrcweir { 424*cdf0e10cSrcweir return mpSdrTextAttribute->getTextLowerDistance(); 425*cdf0e10cSrcweir } 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir sal_uInt32 SdrTextAttribute::getPropertiesVersion() const 428*cdf0e10cSrcweir { 429*cdf0e10cSrcweir return mpSdrTextAttribute->getPropertiesVersion(); 430*cdf0e10cSrcweir } 431*cdf0e10cSrcweir 432*cdf0e10cSrcweir SdrTextHorzAdjust SdrTextAttribute::getSdrTextHorzAdjust() const 433*cdf0e10cSrcweir { 434*cdf0e10cSrcweir return mpSdrTextAttribute->getSdrTextHorzAdjust(); 435*cdf0e10cSrcweir } 436*cdf0e10cSrcweir 437*cdf0e10cSrcweir SdrTextVertAdjust SdrTextAttribute::getSdrTextVertAdjust() const 438*cdf0e10cSrcweir { 439*cdf0e10cSrcweir return mpSdrTextAttribute->getSdrTextVertAdjust(); 440*cdf0e10cSrcweir } 441*cdf0e10cSrcweir 442*cdf0e10cSrcweir void SdrTextAttribute::getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const 443*cdf0e10cSrcweir { 444*cdf0e10cSrcweir if(isBlink()) 445*cdf0e10cSrcweir { 446*cdf0e10cSrcweir getSdrText().GetObject().impGetBlinkTextTiming(rAnimList); 447*cdf0e10cSrcweir } 448*cdf0e10cSrcweir } 449*cdf0e10cSrcweir 450*cdf0e10cSrcweir void SdrTextAttribute::getScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const 451*cdf0e10cSrcweir { 452*cdf0e10cSrcweir if(isScroll()) 453*cdf0e10cSrcweir { 454*cdf0e10cSrcweir getSdrText().GetObject().impGetScrollTextTiming(rAnimList, fFrameLength, fTextLength); 455*cdf0e10cSrcweir } 456*cdf0e10cSrcweir } 457*cdf0e10cSrcweir } // end of namespace attribute 458*cdf0e10cSrcweir } // end of namespace drawinglayer 459*cdf0e10cSrcweir 460*cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 461*cdf0e10cSrcweir // eof 462