sc/inc/userdat.hxx | 2 +- sc/source/core/data/drwlayer.cxx | 5 +---- sc/source/core/tool/detfunc.cxx | 5 +++-- 3 files changed, 5 insertions(+), 7 deletions(-)
New commits: commit 08708fcc39f300c477aad581e5bdc42e5931dd8c Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Sat Jan 7 20:56:15 2012 -0500 Mark detective arrows clearly since we need to treat them differently. Otherwise it gets confused with normal arrow objects during re- positioning. diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx index ed6adc2..e0463b3 100644 --- a/sc/inc/userdat.hxx +++ b/sc/inc/userdat.hxx @@ -59,7 +59,7 @@ public: class ScDrawObjData : public SdrObjUserData { public: - enum Type { CellNote, ValidationCircle, DrawingObject }; + enum Type { CellNote, ValidationCircle, DetectiveArrow, DrawingObject }; ScAddress maStart; ScAddress maEnd; diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 087d510..cdbb95d 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -643,9 +643,6 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati SCROW nRow2 = rData.maEnd.Row(); SCTAB nTab2 = rData.maEnd.Tab(); - // detective arrow - bool bArrow = pObj->IsPolyObj() && (pObj->GetPointCount() == 2); - if (rData.meType == ScDrawObjData::ValidationCircle) { // Validation circle for detective. @@ -675,7 +672,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati pObj->SetLogicRect(rData.maLastRect); } } - else if( bArrow ) + else if (rData.meType == ScDrawObjData::DetectiveArrow) { rData.maLastRect = pObj->GetLogicRect(); basegfx::B2DPolygon aCalcPoly; diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index ebf9ef8..9c6d65f 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -545,16 +545,17 @@ sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, pPage->InsertObject( pArrow ); pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) ); - ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, sal_True ); + ScDrawObjData* pData = ScDrawLayer::GetObjData(pArrow, true); if (bFromOtherTab) pData->maStart.SetInvalid(); else pData->maStart.Set( nRefStartCol, nRefStartRow, nTab); pData->maEnd.Set( nCol, nRow, nTab); + pData->meType = ScDrawObjData::DetectiveArrow; Modified(); - return sal_True; + return true; } sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits