diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 22:22:37 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 22:22:37 +0000 |
commit | 531a63cf15443f617d90ed450e3ad6ac62e2fd75 (patch) | |
tree | c2a36558e1b27c42056e42951ad6c7855dcb4b66 /svx/source/svdraw/svdocapt.cxx | |
parent | 2630bfc2932202025cc127d48a43c47dcc90f58b (diff) |
INTEGRATION: CWS aw033 (1.20.12); FILE MERGED
2008/07/21 18:29:38 aw 1.20.12.11: #i39532# changed aOutRect and bBoundRectValid
2008/07/10 13:00:56 aw 1.20.12.10: #i39532# XOutputDevice removed, PrepareDelete removed
2008/06/24 15:42:26 aw 1.20.12.9: #i39532# corrections
2008/05/14 14:06:00 aw 1.20.12.8: RESYNC: (1.28-1.29); FILE MERGED
2008/01/22 12:29:32 aw 1.20.12.7: adaptions and 1st stripping
2007/08/09 19:01:45 aw 1.20.12.6: RESYNC: (1.27-1.28); FILE MERGED
2007/03/20 14:19:51 aw 1.20.12.5: RESYNC: (1.26-1.27); FILE MERGED
2006/11/28 19:38:51 aw 1.20.12.4: RESYNC: (1.23-1.26); FILE MERGED
2006/09/26 19:35:09 aw 1.20.12.3: RESYNC: (1.20-1.23); FILE MERGED
2006/05/12 12:46:28 aw 1.20.12.2: code changes for primitive support
2005/10/28 11:40:27 aw 1.20.12.1: #i39532#
Diffstat (limited to 'svx/source/svdraw/svdocapt.cxx')
-rw-r--r-- | svx/source/svdraw/svdocapt.cxx | 105 |
1 files changed, 18 insertions, 87 deletions
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index dbe7ab0811ee..c29c65580f4c 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdocapt.cxx,v $ - * $Revision: 1.29 $ + * $Revision: 1.30 $ * * This file is part of OpenOffice.org. * @@ -33,13 +33,11 @@ #include <tools/bigint.hxx> #include <svx/xlnwtit.hxx> #include <svtools/style.hxx> - #include <svx/svdocapt.hxx> #include <svx/xpool.hxx> #include <svx/xpoly.hxx> #include <svx/svdattrx.hxx> #include <svx/svdpool.hxx> -#include "svdxout.hxx" #include <svx/svdetc.hxx> #include <svx/svdtrans.hxx> #include "svdtouch.hxx" @@ -56,9 +54,8 @@ #include <svx/xfltrit.hxx> #include <svx/eeitem.hxx> #include <svx/sdr/properties/captionproperties.hxx> - -// #i32599# #include <vcl/salbtype.hxx> // FRound +#include <svx/sdr/contact/viewcontactofsdrcaptionobj.hxx> #include <basegfx/tuple/b2dtuple.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -185,6 +182,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi } ////////////////////////////////////////////////////////////////////////////// +// BaseProperties section sdr::properties::BaseProperties* SdrCaptionObj::CreateObjectSpecificProperties() { @@ -192,6 +190,14 @@ sdr::properties::BaseProperties* SdrCaptionObj::CreateObjectSpecificProperties() } ////////////////////////////////////////////////////////////////////////////// +// DrawContact section + +sdr::contact::ViewContact* SdrCaptionObj::CreateObjectSpecificViewContact() +{ + return new sdr::contact::ViewContactOfSdrCaptionObj(*this); +} + +////////////////////////////////////////////////////////////////////////////// TYPEINIT1(SdrCaptionObj,SdrRectObj); @@ -224,64 +230,6 @@ SdrCaptionObj::~SdrCaptionObj() { } -sal_Bool SdrCaptionObj::DoPaintObject(XOutputDevice& rOut, const SdrPaintInfoRec& rInfoRec) const -{ - // special shadow paint for calc - if(mbSpecialTextBoxShadow) - { - const SfxItemSet& rSet = GetObjectItemSet(); - sal_uInt32 nXDist = ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue(); - sal_uInt32 nYDist = ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue(); - const SdrShadowColorItem& rShadColItem = ((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))); - Color aShadCol(rShadColItem.GetColorValue()); - sal_uInt16 nTransp = ((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue(); - XFillStyle eStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); - - SfxItemSet aSet(rSet); - // #99001# Hide lines for special calc shadow - aSet.Put(XLineStyleItem(XLINE_NONE)); - - if(eStyle == XFILL_HATCH) // #41666# - { - XHatch aHatch = ((XFillHatchItem&)(rSet.Get(XATTR_FILLHATCH))).GetHatchValue(); - aHatch.SetColor(aShadCol); - aSet.Put(XFillHatchItem(String(),aHatch)); - } - else - { - if(eStyle != XFILL_NONE && eStyle != XFILL_SOLID) - { - // also fuer Gradient und Bitmap - aSet.Put(XFillStyleItem(XFILL_SOLID)); - } - - aSet.Put(XFillColorItem(String(),aShadCol)); - aSet.Put(XFillTransparenceItem(nTransp)); - } - - rOut.SetFillAttr(aSet); - // #99001# Hide lines for special calc shadow - rOut.SetLineAttr(aSet); - - sal_Int32 nEckRad(GetEckenradius()); - if(PaintNeedsXPoly(nEckRad)) - { - XPolygon aX(GetXPoly()); - aX.Move(nXDist,nYDist); - rOut.DrawPolygon(aX.getB2DPolygon()); - } - else - { - Rectangle aR(aRect); - aR.Move(nXDist,nYDist); - rOut.DrawRect(aR,USHORT(2*nEckRad),USHORT(2*nEckRad)); - } - } - - // call parent for normal paint - return SdrRectObj::DoPaintObject(rOut, rInfoRec); -} - void SdrCaptionObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { rInfo.bRotateFreeAllowed=FALSE; @@ -305,28 +253,6 @@ UINT16 SdrCaptionObj::GetObjIdentifier() const return UINT16(OBJ_CAPTION); } -void SdrCaptionObj::RecalcBoundRect() -{ - aOutRect=GetSnapRect(); - - // #i32599# - // Add BoundRect of TailPlygon here, not in RecalcSnapRect() - aOutRect.Union(aTailPoly.GetBoundRect()); - - long nLineWdt=ImpGetLineWdt(); - nLineWdt++; nLineWdt/=2; - long nLEndWdt=ImpGetLineEndAdd(); - if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt; - if (nLineWdt!=0) { - aOutRect.Left ()-=nLineWdt; - aOutRect.Top ()-=nLineWdt; - aOutRect.Right ()+=nLineWdt; - aOutRect.Bottom()+=nLineWdt; - } - ImpAddShadowToBoundRect(); - ImpAddTextToBoundRect(); -} - SdrObject* SdrCaptionObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const { if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer()))) @@ -713,7 +639,7 @@ FASTBOOL SdrCaptionObj::MovCreate(SdrDragStat& rStat) aRect.SetPos(rStat.GetNow()); ImpCalcTail(aPara,aTailPoly,aRect); rStat.SetActionRect(aRect); - bBoundRectDirty=TRUE; + SetBoundRectDirty(); bSnapRectDirty=TRUE; return TRUE; } @@ -796,7 +722,6 @@ void SdrCaptionObj::RecalcSnapRect() { SdrRectObj::RecalcSnapRect(); // #i32599# - // Add BoundRect of TailPlygon in RecalcBoundRect(), not here // maSnapRect.Union(aTailPoly.GetBoundRect()); // !!!!! fehlende Impl. } @@ -979,4 +904,10 @@ void SdrCaptionObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons ImpRecalcTail(); } +// geometry access +::basegfx::B2DPolygon SdrCaptionObj::getTailPolygon() const +{ + return aTailPoly.getB2DPolygon(); +} + // eof |