diff options
Diffstat (limited to 'svx/source/svdraw')
34 files changed, 242 insertions, 243 deletions
diff --git a/svx/source/svdraw/gradtrns.hxx b/svx/source/svdraw/gradtrns.hxx index d5b29116fa10..d8efa391b680 100644 --- a/svx/source/svdraw/gradtrns.hxx +++ b/svx/source/svdraw/gradtrns.hxx @@ -45,9 +45,9 @@ class GradTransformer public: GradTransformer() {} - void GradToVec(GradTransGradient& rG, GradTransVector& rV, + static void GradToVec(GradTransGradient& rG, GradTransVector& rV, const SdrObject* pObj); - void VecToGrad(GradTransVector& rV, GradTransGradient& rG, + static void VecToGrad(GradTransVector& rV, GradTransGradient& rG, GradTransGradient& rGOld, const SdrObject* pObj, bool bMoveSingle, bool bMoveFirst); }; diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 3380f21e4984..408a694623dc 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -117,7 +117,7 @@ SdrItemPool::SdrItemPool( // init the non-persistent items for(sal_uInt16 i(SDRATTR_NOTPERSIST_FIRST); i <= SDRATTR_NOTPERSIST_LAST; i++) { - mpLocalItemInfos[i - SDRATTR_START]._nFlags=0; + mpLocalItemInfos[i - SDRATTR_START]._nFlags = SfxItemPoolFlags::NONE; } // init own PoolDefaults @@ -1405,7 +1405,7 @@ SvStream& SdrTextFixedCellHeightItem::Store( SvStream& rOut, sal_uInt16 nItemVer if ( nItemVersion ) { bool bValue = GetValue(); - rOut.WriteUChar( bValue ); + rOut.WriteBool( bValue ); } return rOut; } diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index 3c0f109954b0..f6ed475da790 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -89,7 +89,7 @@ void SdrDragStat::PrevPoint() } } -Point SdrDragStat::KorregPos(const Point& rNow, const Point& /*rPrev*/) const +Point SdrDragStat::KorregPos(const Point& rNow, const Point& /*rPrev*/) { Point aRet(rNow); return aRet; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 3541cd018ce1..a1ae7ca6f7b1 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1687,9 +1687,9 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) { const SdrMark* pM=rML.GetMark(nMarkNum); const SdrUShortCont* pPts=pM->GetMarkedGluePoints(); - const size_t nPtAnz=pPts==NULL ? 0 : pPts->size(); + const size_t nPointCount=pPts==NULL ? 0 : pPts->size(); - if (nPtAnz!=0) + if (nPointCount!=0) { const SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrGluePointList* pGPL=pObj->GetGluePointList(); @@ -1808,7 +1808,7 @@ void SdrDragResize::TakeSdrDragComment(OUString& rStr) const if(!bEqual) rStr += "x="; - getSdrDragView().GetModel()->TakePercentStr(aXFact, aStr); + SdrModel::TakePercentStr(aXFact, aStr); rStr += aStr; } @@ -1818,7 +1818,7 @@ void SdrDragResize::TakeSdrDragComment(OUString& rStr) const rStr += " "; rStr += "y="; - getSdrDragView().GetModel()->TakePercentStr(aYFact, aStr); + SdrModel::TakePercentStr(aYFact, aStr); rStr += aStr; } @@ -2134,7 +2134,7 @@ void SdrDragRotate::TakeSdrDragComment(OUString& rStr) const } OUString aStr; - getSdrDragView().GetModel()->TakeAngleStr(nTmpAngle, aStr); + SdrModel::TakeAngleStr(nTmpAngle, aStr); rStr += aStr + ")"; if(getSdrDragView().IsDragWithCopy()) @@ -2270,7 +2270,7 @@ void SdrDragShear::TakeSdrDragComment(OUString& rStr) const nTmpAngle = NormAngle180(nTmpAngle); OUString aStr; - getSdrDragView().GetModel()->TakeAngleStr(nTmpAngle, aStr); + SdrModel::TakeAngleStr(nTmpAngle, aStr); rStr += aStr + ")"; if(getSdrDragView().IsDragWithCopy()) @@ -2856,7 +2856,7 @@ void SdrDragCrook::TakeSdrDragComment(OUString& rStr) const nVal = std::abs(nVal); OUString aStr; - getSdrDragView().GetModel()->TakeAngleStr(nVal, aStr); + SdrModel::TakeAngleStr(nVal, aStr); rStr += aStr + ")"; } @@ -2993,17 +2993,17 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget) if (pPV->HasMarkedObjPageView()) { - sal_uInt16 nPolyAnz=aTempPolyPoly.Count(); + sal_uInt16 nPolyCount=aTempPolyPoly.Count(); if (!bContortion && !getSdrDragView().IsNoDragXorPolys()) { sal_uInt16 n1st=0,nLast=0; Point aC(aCenter); - while (n1st<nPolyAnz) + while (n1st<nPolyCount) { nLast=n1st; - while (nLast<nPolyAnz && aTempPolyPoly[nLast].GetPointCount()!=0) nLast++; + while (nLast<nPolyCount && aTempPolyPoly[nLast].GetPointCount()!=0) nLast++; Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect()); sal_uInt16 i; @@ -3063,19 +3063,19 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget) { sal_uInt16 i,j; - for (j=0; j<nPolyAnz; j++) + for (j=0; j<nPolyCount; j++) { XPolygon& aPol=aTempPolyPoly[j]; - sal_uInt16 nPtAnz=aPol.GetPointCount(); + sal_uInt16 nPointCount=aPol.GetPointCount(); i=0; - while (i<nPtAnz) + while (i<nPointCount) { Point* pPnt=&aPol[i]; Point* pC1=NULL; Point* pC2=NULL; - if (i+1<nPtAnz && aPol.IsControl(i)) + if (i+1<nPointCount && aPol.IsControl(i)) { // control point on the left pC1=pPnt; i++; @@ -3084,7 +3084,7 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget) i++; - if (i<nPtAnz && aPol.IsControl(i)) + if (i<nPointCount && aPol.IsControl(i)) { // control point on the right pC2=&aPol[i]; i++; @@ -3356,7 +3356,7 @@ void SdrDragCrook::applyCurrentTransformationToSdrObject(SdrObject& rTarget) const Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect()); const bool bLocalRotate(!bContortion && eMode == SDRCROOK_ROTATE && getSdrDragView().IsRotateAllowed(false)); - getSdrDragView().ImpCrookObj(&rTarget,aCenter,aRad,eMode,bVertical,!bContortion,bLocalRotate,aLocalMarkRect); + SdrEditView::ImpCrookObj(&rTarget,aCenter,aRad,eMode,bVertical,!bContortion,bLocalRotate,aLocalMarkRect); } } } @@ -3595,7 +3595,7 @@ void SdrDragDistort::applyCurrentTransformationToSdrObject(SdrObject& rTarget) if (bDoDistort) { - getSdrDragView().ImpDistortObj(&rTarget, aMarkRect, aDistortedRect, !bContortion); + SdrEditView::ImpDistortObj(&rTarget, aMarkRect, aDistortedRect, !bContortion); } } diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index f40c7e31ce21..26e4b32da9ee 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -527,11 +527,11 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa if(!bDone && !pPath && pO->IsPolyObj() && 0L != pO->GetPointCount()) { // for PolyObj's, but NOT for SdrPathObj's, e.g. the measurement object - sal_uInt32 nPtAnz(pO->GetPointCount()); - XPolygon aXP((sal_uInt16)nPtAnz); + sal_uInt32 nPointCount(pO->GetPointCount()); + XPolygon aXP((sal_uInt16)nPointCount); sal_uInt32 nPtNum; - for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++) + for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) { Point aPt(pO->GetPoint(nPtNum)); aXP[(sal_uInt16)nPtNum]=aPt; @@ -544,7 +544,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa case SDRCROOK_STRETCH: CrookStretchPoly(aXP,rRef,rRad,bVertical,rMarkRect); break; } - for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++) + for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) { // broadcasting could be optimized here, but for the // current two points of the measurement object, it's fine @@ -641,11 +641,11 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol else if(pO->IsPolyObj()) { // e. g. for the measurement object - sal_uInt32 nPtAnz(pO->GetPointCount()); - XPolygon aXP((sal_uInt16)nPtAnz); + sal_uInt32 nPointCount(pO->GetPointCount()); + XPolygon aXP((sal_uInt16)nPointCount); sal_uInt32 nPtNum; - for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++) + for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) { Point aPt(pO->GetPoint(nPtNum)); aXP[(sal_uInt16)nPtNum]=aPt; @@ -653,7 +653,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol aXP.Distort(rRef, rDistortedRect); - for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++) + for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) { // broadcasting could be optimized here, but for the // current two points of the measurement object it's fine diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index bb56746f45e9..e2fd8d2df57b 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -563,7 +563,7 @@ void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) } } -bool SdrEditView::ImpCanConvertForCombine1(const SdrObject* pObj) const +bool SdrEditView::ImpCanConvertForCombine1(const SdrObject* pObj) { // new condition IsLine() to be able to combine simple Lines bool bIsLine(false); @@ -581,7 +581,7 @@ bool SdrEditView::ImpCanConvertForCombine1(const SdrObject* pObj) const return (aInfo.bCanConvToPath || aInfo.bCanConvToPoly || bIsLine); } -bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) const +bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) { SdrObjList* pOL = pObj->GetSubList(); @@ -611,7 +611,7 @@ bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) const return true; } -basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, bool bCombine) const +basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, bool bCombine) { basegfx::B2DPolyPolygon aRetval; const SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj); @@ -660,7 +660,7 @@ basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, b return aRetval; } -basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj, bool bCombine) const +basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj, bool bCombine) { SdrObjList* pOL = pObj->GetSubList(); @@ -683,7 +683,7 @@ basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj, bo } } -basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) const +basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) { const sal_uInt32 nPolyCount(rPolyPolygon.count()); @@ -1348,7 +1348,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) // Dismantle -bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolygon, bool bMakeLines) const +bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolygon, bool bMakeLines) { bool bCan(false); const sal_uInt32 nPolygonCount(rPpolyPolygon.count()); @@ -1373,7 +1373,7 @@ bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolygon, return bCan; } -bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, bool bMakeLines) const +bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, bool bMakeLines) { bool bOtherObjs(false); // true=objects other than PathObj's existent bool bMin1PolyPoly(false); // true=at least 1 tools::PolyPolygon with more than one Polygon existent diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f46b07d9c0a2..0d4ee090e7d6 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1403,9 +1403,9 @@ void SdrObjEditView::ImpMakeTextCursorAreaVisible() } } -sal_uInt16 SdrObjEditView::GetScriptType() const +SvtScriptType SdrObjEditView::GetScriptType() const { - sal_uInt16 nScriptType = 0; + SvtScriptType nScriptType = SvtScriptType::NONE; if( IsTextEdit() ) { @@ -1430,8 +1430,8 @@ sal_uInt16 SdrObjEditView::GetScriptType() const } } - if( nScriptType == 0 ) - nScriptType = SCRIPTTYPE_LATIN; + if( nScriptType == SvtScriptType::NONE ) + nScriptType = SvtScriptType::LATIN; return nScriptType; } @@ -1923,7 +1923,7 @@ sal_uInt16 SdrObjEditView::GetSelectionLevel() const return nLevel; } -bool SdrObjEditView::SupportsFormatPaintbrush( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const +bool SdrObjEditView::SupportsFormatPaintbrush( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) { if( nObjectInventor != SdrInventor && nObjectInventor != E3dInventor ) return false; diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index a4c62ebda45e..32e8b24389cd 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -412,7 +412,7 @@ SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rModel) pOutl->SetEditTextObjectPool( pPool ); pOutl->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(rModel.GetStyleSheetPool())); pOutl->SetDefTab(rModel.GetDefaultTabulator()); - pOutl->SetForbiddenCharsTable(rModel.GetForbiddenCharsTable()); + Outliner::SetForbiddenCharsTable(rModel.GetForbiddenCharsTable()); pOutl->SetAsianCompressionMode(rModel.GetCharCompressType()); pOutl->SetKernAsianPunctuation(rModel.IsKernAsianPunctuation()); pOutl->SetAddExtLeading(rModel.IsAddExtLeading()); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index fb7843f9dd5d..0a6974e72084 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -561,7 +561,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale) aPoly, maClip, true, - aPoly.isClosed() ? false : true)); + !aPoly.isClosed())); const basegfx::B2DRange aNewRange(aNewPoly.getB2DRange()); if(!aNewRange.isEmpty()) diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index fbdfaef5cc73..c7c32f4619e2 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -131,12 +131,12 @@ protected: void DoAction(MetaMaskScaleAction& rAct); void DoAction(MetaMaskScalePartAction& rAct); void DoAction(MetaGradientAction& rAct); - void DoAction(MetaWallpaperAction& rAct); + static void DoAction(MetaWallpaperAction& rAct); void DoAction(MetaTransparentAction& rAct); - void DoAction(MetaEPSAction& rAct); + static void DoAction(MetaEPSAction& rAct); void DoAction(MetaRefPointAction& rAct) { rAct.Execute(mpVD); } void DoAction(MetaTextLineColorAction& rAct) { rAct.Execute(mpVD); mbFntDirty = true; } - void DoAction(MetaTextLineAction& rAct); + static void DoAction(MetaTextLineAction& rAct); void DoAction(MetaFloatTransparentAction& rAct); void DoAction(MetaGradientExAction& rAct); void DoAction(MetaLayoutModeAction& rAct) { rAct.Execute(mpVD); mbFntDirty = true; } diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index af3d31ea38e2..82b2adc07401 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -49,8 +49,8 @@ void SdrGlueEditView::ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, co SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrUShortCont* pPts=pM->GetMarkedGluePoints(); - sal_uIntPtr nPtAnz=pPts==NULL ? 0 : pPts->size(); - if (nPtAnz!=0) { + sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size(); + if (nPointCount!=0) { SdrGluePointList* pGPL=NULL; if (bConst) { const SdrGluePointList* pConstGPL=pObj->GetGluePointList(); @@ -233,8 +233,8 @@ void SdrGlueEditView::DeleteMarkedGluePoints() SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrUShortCont* pPts=pM->GetMarkedGluePoints(); - sal_uIntPtr nPtAnz=pPts==NULL ? 0 : pPts->size(); - if (nPtAnz!=0) + sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size(); + if (nPointCount!=0) { SdrGluePointList* pGPL=pObj->ForceGluePointList(); if (pGPL!=NULL) @@ -279,8 +279,8 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints() SdrObject* pObj=pM->GetMarkedSdrObj(); SdrUShortCont* pPts=pM->GetMarkedGluePoints(); SdrGluePointList* pGPL=pObj->ForceGluePointList(); - sal_uIntPtr nPtAnz=pPts==NULL ? 0 : pPts->size(); - if (nPtAnz!=0 && pGPL!=NULL) + sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size(); + if (nPointCount!=0 && pGPL!=NULL) { if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj)); @@ -322,8 +322,8 @@ void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const vo SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrUShortCont* pPts=pM->GetMarkedGluePoints(); - sal_uIntPtr nPtAnz=pPts==NULL ? 0 : pPts->size(); - if (nPtAnz!=0) { + sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size(); + if (nPointCount!=0) { SdrGluePointList* pGPL=pObj->ForceGluePointList(); if (pGPL!=NULL) { diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index bc69407a219a..9018d6844e86 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -149,7 +149,7 @@ void SdrGluePoint::SetAlignAngle(long nAngle) else if (nAngle<33750) nAlign=SDRHORZALIGN_RIGHT |SDRVERTALIGN_BOTTOM; } -long SdrGluePoint::EscDirToAngle(sal_uInt16 nEsc) const +long SdrGluePoint::EscDirToAngle(sal_uInt16 nEsc) { switch (nEsc) { case SDRESC_RIGHT : return 0; @@ -160,7 +160,7 @@ long SdrGluePoint::EscDirToAngle(sal_uInt16 nEsc) const return 0; } -sal_uInt16 SdrGluePoint::EscAngleToDir(long nAngle) const +sal_uInt16 SdrGluePoint::EscAngleToDir(long nAngle) { nAngle=NormAngle360(nAngle); if (nAngle>=31500 || nAngle<4500) diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index d6248ff9cb45..348cf2d37bd9 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -639,7 +639,7 @@ void SdrHdl::CreateB2dIAObject() } } -BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd) const +BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd) { BitmapMarkerKind eRetval(eKnd); @@ -1262,7 +1262,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, bool bSetItemOnObject, bool aOldGradTransGradient.aGradient = static_cast<const XFillFloatTransparenceItem&>(rSet.Get(XATTR_FILLFLOATTRANSPARENCE)).GetGradientValue(); // transform vector data to gradient - aGradTransformer.VecToGrad(aGradTransVector, aGradTransGradient, aOldGradTransGradient, _pObj, bMoveSingleHandle, bMoveFirstHandle); + GradTransformer::VecToGrad(aGradTransVector, aGradTransGradient, aOldGradTransGradient, _pObj, bMoveSingleHandle, bMoveFirstHandle); if(bSetItemOnObject) { @@ -1293,7 +1293,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, bool bSetItemOnObject, bool } // back transformation, set values on pIAOHandle - aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, _pObj); + GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, _pObj); SetPos(Point(FRound(aGradTransVector.maPositionA.getX()), FRound(aGradTransVector.maPositionA.getY()))); Set2ndPos(Point(FRound(aGradTransVector.maPositionB.getX()), FRound(aGradTransVector.maPositionB.getY()))); diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 261d11945818..cddf3dfa9954 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -202,7 +202,7 @@ void ImpItemEdit::KeyInput(const KeyEvent& rKEvt) // - _SdrItemBrowserControl - -#define MYBROWSEMODE (BROWSER_THUMBDRAGGING|BROWSER_KEEPHIGHLIGHT|BROWSER_NO_HSCROLL|BROWSER_HIDECURSOR) +#define MYBROWSEMODE (BrowserMode::THUMBDRAGGING|BrowserMode::KEEPHIGHLIGHT|BrowserMode::NO_HSCROLL|BrowserMode::HIDECURSOR) _SdrItemBrowserControl::_SdrItemBrowserControl(vcl::Window* pParent, WinBits nBits): BrowseBox(pParent,nBits,MYBROWSEMODE), @@ -494,7 +494,7 @@ bool _SdrItemBrowserControl::BegChangeEntry(sal_uIntPtr nPos) bool bRet = false; ImpItemListRow* pEntry=ImpGetEntry(nPos); if (pEntry!=NULL && !pEntry->bComment) { - SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT); + SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT)); pEditControl=VclPtr<ImpItemEdit>::Create(&GetDataWindow(),this,0); Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false)); aRect.Left()+=2; // little offset for the Edit, so it's exact to the pixel @@ -907,7 +907,7 @@ sal_uInt16 ImpSortWhich(sal_uInt16 nWhich) void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet) { - SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT); + SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT)); if (pSet!=NULL) { sal_uInt16 nEntryNum=0; SfxWhichIter aIter(*pSet); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 2f7366b6933a..eb0f00ee6582 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -778,7 +778,7 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit ) } pOutliner->SetRefDevice(GetRefDevice()); - pOutliner->SetForbiddenCharsTable(GetForbiddenCharsTable()); + Outliner::SetForbiddenCharsTable(GetForbiddenCharsTable()); pOutliner->SetAsianCompressionMode( mnCharCompressType ); pOutliner->SetKernAsianPunctuation( IsKernAsianPunctuation() ); pOutliner->SetAddExtLeading( IsAddExtLeading() ); @@ -1324,7 +1324,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I rStr = aBuf.makeStringAndClear(); } -void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar) const +void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar) { bool bNeg = nAngle < 0; @@ -1355,7 +1355,7 @@ void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar) const rStr = aBuf.makeStringAndClear(); } -void SdrModel::TakePercentStr(const Fraction& rVal, OUString& rStr, bool bNoPercentChar) const +void SdrModel::TakePercentStr(const Fraction& rVal, OUString& rStr, bool bNoPercentChar) { sal_Int32 nMul(rVal.GetNumerator()); sal_Int32 nDiv(rVal.GetDenominator()); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index cfc0cb9e5e31..a747bc69889a 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1003,7 +1003,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) GradTransGradient aGradTransGradient; aGradTransGradient.aGradient = static_cast<const XFillFloatTransparenceItem&>(rSet.Get(XATTR_FILLFLOATTRANSPARENCE)).GetGradientValue(); - aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj); + GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, pObj); // build handles const Point aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), basegfx::fround(aGradTransVector.maPositionA.getY())); @@ -1045,7 +1045,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) Size aHdlSize(15, 15); aGradTransGradient.aGradient = static_cast<const XFillGradientItem&>(rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue(); - aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj); + GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, pObj); // build handles const Point aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), basegfx::fround(aGradTransVector.maPositionA.getY())); @@ -1474,8 +1474,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) E3dScene* pScene = NULL; SdrObject* pObjHit = (bPrev) ? pBtmObjHit : pTopObjHit; bool bRemap = pObjHit->ISA(E3dCompoundObject) - ? static_cast<E3dCompoundObject*>(pObjHit)->IsAOrdNumRemapCandidate(pScene) - : false; + && static_cast<E3dCompoundObject*>(pObjHit)->IsAOrdNumRemapCandidate(pScene); if(bPrev) { diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 238166b932a8..5080b71d2bb2 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -492,7 +492,7 @@ bool SdrObjCustomShape::UseNoFillStyle() const const Any* pAny = rGeometryItem.GetPropertyValueByName( sType ); if ( pAny ) *pAny >>= sShapeType; - bRet = IsCustomShapeFilledByDefault( EnhancedCustomShapeTypeNames::Get( sType ) ) == false; + bRet = !IsCustomShapeFilledByDefault( EnhancedCustomShapeTypeNames::Get( sType ) ); return bRet; } @@ -1588,12 +1588,12 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co if ( ( ( xFact.GetNumerator() < 0 ) && ( xFact.GetDenominator() > 0 ) ) || ( ( xFact.GetNumerator() > 0 ) && ( xFact.GetDenominator() < 0 ) ) ) { - SetMirroredX( IsMirroredX() == false ); + SetMirroredX( !IsMirroredX() ); } if ( ( ( yFact.GetNumerator() < 0 ) && ( yFact.GetDenominator() > 0 ) ) || ( ( yFact.GetNumerator() > 0 ) && ( yFact.GetDenominator() < 0 ) ) ) { - SetMirroredY( IsMirroredY() == false ); + SetMirroredY( !IsMirroredY() ); } } @@ -3108,8 +3108,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); sal_uInt16 i; - sal_uInt16 nPntAnz=aPol.GetSize(); - for (i=0; i<nPntAnz; i++) + sal_uInt16 nPointCount=aPol.GetSize(); + for (i=0; i<nPointCount; i++) { MirrorPoint(aPol[i],aRef1,aRef2); } @@ -3130,8 +3130,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); sal_uInt16 i; - sal_uInt16 nPntAnz=aPol.GetSize(); - for (i=0; i<nPntAnz; i++) + sal_uInt16 nPointCount=aPol.GetSize(); + for (i=0; i<nPointCount; i++) { MirrorPoint(aPol[i],aRef1,aRef2); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 2108dab7b940..e829dffac9d0 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -412,7 +412,7 @@ void SdrObject::Free( SdrObject*& _rpObject ) delete pObject; } -SdrObjPlusData* SdrObject::NewPlusData() const +SdrObjPlusData* SdrObject::NewPlusData() { return new SdrObjPlusData; } @@ -686,7 +686,7 @@ void SdrObject::SetName(const OUString& rStr) { bUndo = true; SdrUndoAction* pUndoAction = - GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr( + SdrUndoFactory::CreateUndoObjectStrAttr( *this, SdrUndoObjStrAttr::OBJ_NAME, GetName(), @@ -730,7 +730,7 @@ void SdrObject::SetTitle(const OUString& rStr) { bUndo = true; SdrUndoAction* pUndoAction = - GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr( + SdrUndoFactory::CreateUndoObjectStrAttr( *this, SdrUndoObjStrAttr::OBJ_TITLE, GetTitle(), @@ -774,7 +774,7 @@ void SdrObject::SetDescription(const OUString& rStr) { bUndo = true; SdrUndoAction* pUndoAction = - GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr( + SdrUndoFactory::CreateUndoObjectStrAttr( *this, SdrUndoObjStrAttr::OBJ_DESCRIPTION, GetDescription(), @@ -840,7 +840,7 @@ void SdrObject::SetGrabBagItem(const com::sun::star::uno::Any& rVal) BroadcastObjectChange(); } -sal_uInt32 SdrObject::GetNavigationPosition (void) +sal_uInt32 SdrObject::GetNavigationPosition() { if (pObjList!=NULL && pObjList->RecalcNavigationPositions()) { @@ -1085,7 +1085,7 @@ OUString SdrObject::GetAngleStr(long nAngle, bool bNoDegChar) const { OUString aStr; if (pModel!=NULL) { - pModel->TakeAngleStr(nAngle,aStr,bNoDegChar); + SdrModel::TakeAngleStr(nAngle,aStr,bNoDegChar); } return aStr; } @@ -2407,7 +2407,7 @@ void extractLineContourFromPrimitive2DSequence( -SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDash) const +SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDash) { bool bNoChange(true); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index e62175d690ce..0434d6918a2a 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -569,16 +569,16 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const OUString aStr; ImpTakeDescriptionStr(STR_ViewCreateObj, aStr); OUStringBuffer aBuf(aStr); - const sal_uInt32 nPntAnz(rDrag.GetPointAnz()); + const sal_uInt32 nPointCount(rDrag.GetPointAnz()); - if(OBJ_CIRC != meCircleKind && nPntAnz > 2) + if(OBJ_CIRC != meCircleKind && nPointCount > 2) { const ImpCircUser* pU = static_cast<const ImpCircUser*>(rDrag.GetUser()); sal_Int32 nAngle; aBuf.appendAscii(" ("); - if(3 == nPntAnz) + if(3 == nPointCount) { nAngle = pU->nStart; } @@ -1148,7 +1148,7 @@ void SdrCircObj::ImpSetCircInfoToAttr() SdrObject* SdrCircObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const { - const bool bFill(OBJ_CARC == meCircleKind ? sal_False : sal_True); + const bool bFill(meCircleKind != OBJ_CARC); const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, maRect, nStartAngle, nEndAngle)); SdrObject* pRet = ImpConvertMakeObj(basegfx::B2DPolyPolygon(aCircPolygon), bFill, bBezier); diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 27f476321ad2..8bfc8e16d4cd 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -413,18 +413,18 @@ bool SdrEdgeObj::IsNode() const SdrGluePoint SdrEdgeObj::GetVertexGluePoint(sal_uInt16 nNum) const { Point aPt; - sal_uInt16 nPntAnz=pEdgeTrack->GetPointCount(); - if (nPntAnz>0) + sal_uInt16 nPointCount=pEdgeTrack->GetPointCount(); + if (nPointCount>0) { Point aOfs = GetSnapRect().Center(); if (nNum==2 && GetConnectedNode(true)==NULL) aPt=(*pEdgeTrack)[0]; - else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPntAnz-1]; + else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPointCount-1]; else { - if ((nPntAnz & 1) ==1) { - aPt=(*pEdgeTrack)[nPntAnz/2]; + if ((nPointCount & 1) ==1) { + aPt=(*pEdgeTrack)[nPointCount/2]; } else { - Point aPt1((*pEdgeTrack)[nPntAnz/2-1]); - Point aPt2((*pEdgeTrack)[nPntAnz/2]); + Point aPt1((*pEdgeTrack)[nPointCount/2-1]); + Point aPt2((*pEdgeTrack)[nPointCount/2]); aPt1+=aPt2; aPt1.X()/=2; aPt1.Y()/=2; @@ -493,12 +493,12 @@ bool SdrEdgeObj::CheckNodeConnection(bool bTail1) const { bool bRet = false; const SdrObjConnection& rCon=GetConnection(bTail1); - sal_uInt16 nPtAnz=pEdgeTrack->GetPointCount(); - if (rCon.pObj!=NULL && rCon.pObj->GetPage()==pPage && nPtAnz!=0) { + sal_uInt16 nPointCount=pEdgeTrack->GetPointCount(); + if (rCon.pObj!=NULL && rCon.pObj->GetPage()==pPage && nPointCount!=0) { const SdrGluePointList* pGPL=rCon.pObj->GetGluePointList(); sal_uInt16 nConAnz=pGPL==NULL ? 0 : pGPL->GetCount(); sal_uInt16 nGesAnz=nConAnz+8; - Point aTail(bTail1 ? (*pEdgeTrack)[0] : (*pEdgeTrack)[sal_uInt16(nPtAnz-1)]); + Point aTail(bTail1 ? (*pEdgeTrack)[0] : (*pEdgeTrack)[sal_uInt16(nPointCount-1)]); for (sal_uInt16 i=0; i<nGesAnz && !bRet; i++) { if (i<nConAnz) { // UserDefined bRet=aTail==(*pGPL)[i].GetAbsolutePos(*rCon.pObj); @@ -516,15 +516,15 @@ bool SdrEdgeObj::CheckNodeConnection(bool bTail1) const void SdrEdgeObj::ImpSetTailPoint(bool bTail1, const Point& rPt) { - sal_uInt16 nPtAnz=pEdgeTrack->GetPointCount(); - if (nPtAnz==0) { + sal_uInt16 nPointCount=pEdgeTrack->GetPointCount(); + if (nPointCount==0) { (*pEdgeTrack)[0]=rPt; (*pEdgeTrack)[1]=rPt; - } else if (nPtAnz==1) { + } else if (nPointCount==1) { if (!bTail1) (*pEdgeTrack)[1]=rPt; else { (*pEdgeTrack)[1]=(*pEdgeTrack)[0]; (*pEdgeTrack)[0]=rPt; } } else { - if (!bTail1) (*pEdgeTrack)[sal_uInt16(nPtAnz-1)]=rPt; + if (!bTail1) (*pEdgeTrack)[sal_uInt16(nPointCount-1)]=rPt; else (*pEdgeTrack)[0]=rPt; } ImpRecalcEdgeTrack(); @@ -599,7 +599,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() } } -sal_uInt16 SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const +sal_uInt16 SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) { if (pObj==NULL) return SDRESC_ALL; Rectangle aR(pObj->GetSnapRect()); @@ -637,7 +637,7 @@ sal_uInt16 SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const } } -XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) const +XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) { XPolygon aXP; aXP.Insert(XPOLY_APPEND,rStPt,XPOLY_NORMAL); @@ -1266,16 +1266,16 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec nNum--; aXP1.Insert(XPOLY_APPEND,aXP2[nNum],XPOLY_NORMAL); } - sal_uInt16 nPntAnz=aXP1.GetPointCount(); + sal_uInt16 nPointCount=aXP1.GetPointCount(); char cForm=0; if (bInfo || pnQuality!=NULL) { cForm='?'; - if (nPntAnz==2) cForm='I'; - else if (nPntAnz==3) cForm='L'; - else if (nPntAnz==4) { // Z or U + if (nPointCount==2) cForm='I'; + else if (nPointCount==3) cForm='L'; + else if (nPointCount==4) { // Z or U if (nAngle1==nAngle2) cForm='U'; else cForm='Z'; - } else if (nPntAnz==6) { // S or C or ... + } else if (nPointCount==6) { // S or C or ... if (nAngle1!=nAngle2) { // For type S, line 2 has the same direction as line 4. // For type C, the opposite is true. @@ -1315,7 +1315,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec sal_uIntPtr nQual0=nQual; // prevent overruns bool bOverflow = false; Point aPt0(aXP1[0]); - for (sal_uInt16 nPntNum=1; nPntNum<nPntAnz; nPntNum++) { + for (sal_uInt16 nPntNum=1; nPntNum<nPointCount; nPntNum++) { Point aPt1b(aXP1[nPntNum]); nQual+=std::abs(aPt1b.X()-aPt0.X())+std::abs(aPt1b.Y()-aPt0.Y()); if (nQual<nQual0) bOverflow = true; @@ -1323,7 +1323,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec aPt0=aPt1b; } - sal_uInt16 nTmp=nPntAnz; + sal_uInt16 nTmp=nPointCount; if (cForm=='Z') { nTmp=2; // Z shape with good quality (nTmp=2 instead of 4) sal_uIntPtr n1=std::abs(aXP1[1].X()-aXP1[0].X())+std::abs(aXP1[1].Y()-aXP1[0].Y()); @@ -1344,9 +1344,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec nQual+=(sal_uIntPtr)nTmp*0x01000000; if (nQual<nQual0 || nTmp>15) bOverflow = true; } - if (nPntAnz>=2) { // check exit angle again + if (nPointCount>=2) { // check exit angle again Point aP1(aXP1[1]); aP1-=aXP1[0]; - Point aP2(aXP1[nPntAnz-2]); aP2-=aXP1[nPntAnz-1]; + Point aP2(aXP1[nPointCount-2]); aP2-=aXP1[nPointCount-1]; long nAng1=0; if (aP1.X()<0) nAng1=18000; if (aP1.Y()>0) nAng1=27000; if (aP1.Y()<0) nAng1=9000; if (aP1.X()!=0 && aP1.Y()!=0) nAng1=1; // slant?! long nAng2=0; if (aP2.X()<0) nAng2=18000; if (aP2.Y()>0) nAng2=27000; @@ -1361,14 +1361,14 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec aBewareRect1=rBewareRect1; aBewareRect2=rBewareRect2; - for (sal_uInt16 i=0; i<nPntAnz; i++) { + for (sal_uInt16 i=0; i<nPointCount; i++) { Point aPt1b(aXP1[i]); bool b1=aPt1b.X()>aBewareRect1.Left() && aPt1b.X()<aBewareRect1.Right() && aPt1b.Y()>aBewareRect1.Top() && aPt1b.Y()<aBewareRect1.Bottom(); bool b2=aPt1b.X()>aBewareRect2.Left() && aPt1b.X()<aBewareRect2.Right() && aPt1b.Y()>aBewareRect2.Top() && aPt1b.Y()<aBewareRect2.Bottom(); sal_uInt16 nInt0=nIntersections; - if (i==0 || i==nPntAnz-1) { + if (i==0 || i==nPointCount-1) { if (b1 && b2) nIntersections++; } else { if (b1) nIntersections++; @@ -1394,7 +1394,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } aPt0=aPt1b; } - if (nPntAnz<=1) nIntersections++; + if (nPointCount<=1) nIntersections++; nQual0=nQual; nQual+=(sal_uIntPtr)nIntersections*0x10000000; if (nQual<nQual0 || nIntersections>15) bOverflow = true; @@ -1455,37 +1455,37 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } } // make the connector a bezier curve, if appropriate - if (eKind==SDREDGE_BEZIER && nPntAnz>2) { + if (eKind==SDREDGE_BEZIER && nPointCount>2) { Point* pPt1=&aXP1[0]; Point* pPt2=&aXP1[1]; - Point* pPt3=&aXP1[nPntAnz-2]; - Point* pPt4=&aXP1[nPntAnz-1]; + Point* pPt3=&aXP1[nPointCount-2]; + Point* pPt4=&aXP1[nPointCount-1]; long dx1=pPt2->X()-pPt1->X(); long dy1=pPt2->Y()-pPt1->Y(); long dx2=pPt3->X()-pPt4->X(); long dy2=pPt3->Y()-pPt4->Y(); - if (cForm=='L') { // nPntAnz==3 + if (cForm=='L') { // nPointCount==3 aXP1.SetFlags(1,XPOLY_CONTROL); Point aPt3(*pPt2); aXP1.Insert(2,aPt3,XPOLY_CONTROL); - nPntAnz=aXP1.GetPointCount(); + nPointCount=aXP1.GetPointCount(); pPt2=&aXP1[1]; - pPt3=&aXP1[nPntAnz-2]; + pPt3=&aXP1[nPointCount-2]; pPt2->X()-=dx1/3; pPt2->Y()-=dy1/3; pPt3->X()-=dx2/3; pPt3->Y()-=dy2/3; - } else if (nPntAnz>=4 && nPntAnz<=6) { // Z or U or ... + } else if (nPointCount>=4 && nPointCount<=6) { // Z or U or ... // To all others, the end points of the original lines become control - // points for now. Thus, we need to do some more work for nPntAnz>4! + // points for now. Thus, we need to do some more work for nPointCount>4! aXP1.SetFlags(1,XPOLY_CONTROL); - aXP1.SetFlags(nPntAnz-2,XPOLY_CONTROL); + aXP1.SetFlags(nPointCount-2,XPOLY_CONTROL); // distance x1.5 pPt2->X()+=dx1/2; pPt2->Y()+=dy1/2; pPt3->X()+=dx2/2; pPt3->Y()+=dy2/2; - if (nPntAnz==5) { + if (nPointCount==5) { // add a control point before and after center Point aCenter(aXP1[2]); long dx1b=aCenter.X()-aXP1[1].X(); @@ -1502,7 +1502,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec aXP1[4].X()-=dx2b/2; aXP1[4].Y()-=dy2b/2; } - if (nPntAnz==6) { + if (nPointCount==6) { Point aPt1b(aXP1[2]); Point aPt2b(aXP1[3]); aXP1.Insert(2,aPt1b,XPOLY_CONTROL); @@ -1719,20 +1719,20 @@ sal_uInt32 SdrEdgeObj::GetHdlCount() const { SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue(); sal_uInt32 nHdlAnz(0L); - sal_uInt32 nPntAnz(pEdgeTrack->GetPointCount()); + sal_uInt32 nPointCount(pEdgeTrack->GetPointCount()); - if(nPntAnz) + if(nPointCount) { nHdlAnz = 2L; - if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPntAnz >= 4L) + if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPointCount >= 4L) { sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0L ? aEdgeInfo.nObj1Lines - 1L : 0L); sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0L ? aEdgeInfo.nObj2Lines - 1L : 0L); sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0xFFFF ? 1L : 0L); nHdlAnz += nO1 + nO2 + nM; } - else if (eKind==SDREDGE_THREELINES && nPntAnz == 4L) + else if (eKind==SDREDGE_THREELINES && nPointCount == 4L) { if(GetConnectedNode(true)) nHdlAnz++; @@ -1748,13 +1748,13 @@ sal_uInt32 SdrEdgeObj::GetHdlCount() const SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const { SdrHdl* pHdl=NULL; - sal_uInt32 nPntAnz(pEdgeTrack->GetPointCount()); - if (nPntAnz!=0) { + sal_uInt32 nPointCount(pEdgeTrack->GetPointCount()); + if (nPointCount!=0) { if (nHdlNum==0) { pHdl=new ImpEdgeHdl((*pEdgeTrack)[0],HDL_POLY); if (aCon1.pObj!=NULL && aCon1.bBestVertex) pHdl->Set1PixMore(true); } else if (nHdlNum==1) { - pHdl=new ImpEdgeHdl((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],HDL_POLY); + pHdl=new ImpEdgeHdl((*pEdgeTrack)[sal_uInt16(nPointCount-1)],HDL_POLY); if (aCon2.pObj!=NULL && aCon2.bBestVertex) pHdl->Set1PixMore(true); } else { SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue(); @@ -1772,7 +1772,7 @@ SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const } else { nNum=nNum-nO1; if (nNum<nO2) { - nPt=nPntAnz-3-nNum; + nPt=nPointCount-3-nNum; if (nNum==0) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ2LINE2); if (nNum==1) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ2LINE3); } else { @@ -2298,8 +2298,8 @@ void SdrEdgeObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) if(!bCon2 && pEdgeTrack) { - sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); - RotatePoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,sn,cs); + sal_uInt16 nPointCount = pEdgeTrack->GetPointCount(); + RotatePoint((*pEdgeTrack)[sal_uInt16(nPointCount-1)],rRef,sn,cs); ImpDirtyEdgeTrack(); } } @@ -2329,8 +2329,8 @@ void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2) if(!bCon2 && pEdgeTrack) { - sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); - MirrorPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef1,rRef2); + sal_uInt16 nPointCount = pEdgeTrack->GetPointCount(); + MirrorPoint((*pEdgeTrack)[sal_uInt16(nPointCount-1)],rRef1,rRef2); ImpDirtyEdgeTrack(); } } @@ -2360,8 +2360,8 @@ void SdrEdgeObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea if(!bCon2 && pEdgeTrack) { - sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); - ShearPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,tn,bVShear); + sal_uInt16 nPointCount = pEdgeTrack->GetPointCount(); + ShearPoint((*pEdgeTrack)[sal_uInt16(nPointCount-1)],rRef,tn,bVShear); ImpDirtyEdgeTrack(); } } diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index a0c519d97555..9e1f49112780 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -131,9 +131,9 @@ class SdrGraphicUpdater : public ::osl::Thread { public: SdrGraphicUpdater( const OUString& rFileName, const OUString& rFilterName, SdrGraphicLink& ); - virtual ~SdrGraphicUpdater( void ); + virtual ~SdrGraphicUpdater(); - void SAL_CALL Terminate( void ); + void SAL_CALL Terminate(); bool GraphicLinkChanged( const OUString& rFileName ){ return maFileName != rFileName; }; @@ -142,12 +142,12 @@ protected: /** is called from the inherited create method and acts as the main function of this thread. */ - virtual void SAL_CALL run(void) SAL_OVERRIDE; + virtual void SAL_CALL run() SAL_OVERRIDE; /** Called after the thread is terminated via the terminate method. Used to kill the thread by calling delete on this. */ - virtual void SAL_CALL onTerminated(void) SAL_OVERRIDE; + virtual void SAL_CALL onTerminated() SAL_OVERRIDE; private: @@ -167,7 +167,7 @@ SdrGraphicUpdater::SdrGraphicUpdater( const OUString& rFileName, const OUString& create(); } -SdrGraphicUpdater::~SdrGraphicUpdater( void ) +SdrGraphicUpdater::~SdrGraphicUpdater() { } @@ -176,12 +176,12 @@ void SdrGraphicUpdater::Terminate() mbIsTerminated = true; } -void SAL_CALL SdrGraphicUpdater::onTerminated(void) +void SAL_CALL SdrGraphicUpdater::onTerminated() { delete this; } -void SAL_CALL SdrGraphicUpdater::run(void) +void SAL_CALL SdrGraphicUpdater::run() { osl_setThreadName("SdrGraphicUpdater"); @@ -226,7 +226,7 @@ void SdrGraphicLink::RemoveGraphicUpdater() if( pLinkManager && rValue.hasValue() ) { - pLinkManager->GetDisplayNames( this, 0, &rGrafObj.aFileName, 0, &rGrafObj.aFilterName ); + sfx2::LinkManager::GetDisplayNames( this, 0, &rGrafObj.aFileName, 0, &rGrafObj.aFilterName ); Graphic aGraphic; if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic )) diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 531f2b4e9de8..be529e4fa46e 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -544,7 +544,7 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& } } -basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol) const +basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol) { basegfx::B2DPolyPolygon aRetval; basegfx::B2DPolygon aPartPolyA; diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 7a26f78b729b..403646b6f10e 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -930,7 +930,7 @@ bool SdrOle2Obj::UpdateLinkURL_Impl() if ( pLinkManager ) { OUString aNewLinkURL; - pLinkManager->GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL, 0, 0 ); if ( !aNewLinkURL.equalsIgnoreAsciiCase( mpImpl->maLinkURL ) ) { const_cast<SdrOle2Obj*>(this)->GetObjRef_Impl(); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index efd6a03fb692..262223694d50 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -80,7 +80,7 @@ struct ImpSdrPathDragData : public SdrDragStatUserData bool bClosed; // closed object? sal_uInt16 nPoly; // number of the polygon in the PolyPolygon sal_uInt16 nPnt; // number of point in the above polygon - sal_uInt16 nPntAnz; // number of points of the polygon + sal_uInt16 nPointCount; // number of points of the polygon sal_uInt16 nPntMax; // maximum index bool bBegPnt; // dragged point is first point of a Polyline bool bEndPnt; // dragged point is finishing point of a Polyline @@ -119,7 +119,7 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl , bClosed(false) , nPoly(0) , nPnt(0) - , nPntAnz(0) + , nPointCount(0) , nPntMax(0) , bBegPnt(false) , bEndPnt(false) @@ -171,14 +171,14 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl nPoly=(sal_uInt16)rHdl.GetPolyNum(); // number of the polygon in the PolyPolygon nPnt=(sal_uInt16)rHdl.GetPointNum(); // number of points in the above polygon const XPolygon aTmpXP(rPO.GetPathPoly().getB2DPolygon(nPoly)); - nPntAnz=aTmpXP.GetPointCount(); // number of point of the polygon - if (nPntAnz==0 || (bClosed && nPntAnz==1)) return; // minimum of 1 points for Lines, minimum of 2 points for Polygon - nPntMax=nPntAnz-1; // maximum index + nPointCount=aTmpXP.GetPointCount(); // number of point of the polygon + if (nPointCount==0 || (bClosed && nPointCount==1)) return; // minimum of 1 points for Lines, minimum of 2 points for Polygon + nPntMax=nPointCount-1; // maximum index bBegPnt=!bClosed && nPnt==0; // dragged point is first point of a Polyline bEndPnt=!bClosed && nPnt==nPntMax; // dragged point is finishing point of a Polyline - if (bClosed && nPntAnz<=3) { // if polygon is only a line - bBegPnt=(nPntAnz<3) || nPnt==0; - bEndPnt=(nPntAnz<3) || nPnt==nPntMax-1; + if (bClosed && nPointCount<=3) { // if polygon is only a line + bBegPnt=(nPointCount<3) || nPnt==0; + bEndPnt=(nPointCount<3) || nPnt==nPntMax-1; } nPrevPnt=nPnt; // index of previous point nNextPnt=nPnt; // index of next point @@ -269,11 +269,11 @@ public: XPolygon GetFormPoly() const; bool CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown); XPolygon GetBezierPoly() const; - XPolygon GetCurvePoly() const { return XPolygon(); } + static XPolygon GetCurvePoly() { return XPolygon(); } bool CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); XPolygon GetCirclePoly() const; bool CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); - Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView* pView) const; + static Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView* pView); XPolygon GetLinePoly() const; bool CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); XPolygon GetRectPoly() const; @@ -387,7 +387,7 @@ XPolygon ImpPathCreateUser::GetCirclePoly() const } } -Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, SdrView* pView) const +Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, SdrView* pView) { long x=aCsr.X(),x1=x,x2=x; long y=aCsr.Y(),y1=y,y2=y; @@ -529,14 +529,14 @@ public: Pointer GetCreatePointer() const; // helping stuff - bool IsClosed(SdrObjKind eKind) const { return eKind==OBJ_POLY || eKind==OBJ_PATHPOLY || eKind==OBJ_PATHFILL || eKind==OBJ_FREEFILL || eKind==OBJ_SPLNFILL; } - bool IsFreeHand(SdrObjKind eKind) const { return eKind==OBJ_FREELINE || eKind==OBJ_FREEFILL; } - bool IsBezier(SdrObjKind eKind) const { return eKind==OBJ_PATHLINE || eKind==OBJ_PATHFILL; } + static bool IsClosed(SdrObjKind eKind) { return eKind==OBJ_POLY || eKind==OBJ_PATHPOLY || eKind==OBJ_PATHFILL || eKind==OBJ_FREEFILL || eKind==OBJ_SPLNFILL; } + static bool IsFreeHand(SdrObjKind eKind) { return eKind==OBJ_FREELINE || eKind==OBJ_FREEFILL; } + static bool IsBezier(SdrObjKind eKind) { return eKind==OBJ_PATHLINE || eKind==OBJ_PATHFILL; } bool IsCreating() const { return mbCreating; } // get the polygon basegfx::B2DPolyPolygon TakeObjectPolyPolygon(const SdrDragStat& rDrag) const; - basegfx::B2DPolyPolygon TakeDragPolyPolygon(const SdrDragStat& rDrag) const; + static basegfx::B2DPolyPolygon TakeDragPolyPolygon(const SdrDragStat& rDrag); basegfx::B2DPolyPolygon getModifiedPolyPolygon() const { return aPathPolygon.getB2DPolyPolygon(); } }; @@ -685,11 +685,11 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const sal_uInt16 nPnt1=0xFFFF,nPnt2=0xFFFF; // its neighboring points Point aNeuPos1,aNeuPos2; // new alternative for aPos bool bPnt1 = false, bPnt2 = false; // are these valid alternatives? - if (!bClosed && mpSdrPathDragData->nPntAnz>=2) { // minimum of 2 points for lines + if (!bClosed && mpSdrPathDragData->nPointCount>=2) { // minimum of 2 points for lines if (!bBegPnt) nPnt1=nPrevPnt; if (!bEndPnt) nPnt2=nNextPnt; } - if (bClosed && mpSdrPathDragData->nPntAnz>=3) { // minimum of 3 points for polygon + if (bClosed && mpSdrPathDragData->nPointCount>=3) { // minimum of 3 points for polygon nPnt1=nPrevPnt; nPnt2=nNextPnt; } @@ -957,7 +957,7 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag if(pU->bCircle) { - mrSdrPathObject.GetModel()->TakeAngleStr(std::abs(pU->nCircRelAngle), aMetr); + SdrModel::TakeAngleStr(std::abs(pU->nCircRelAngle), aMetr); aStr += aMetr; aStr += " r="; mrSdrPathObject.GetModel()->TakeMetricStr(pU->nCircRadius, aMetr, true); @@ -981,7 +981,7 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag sal_Int32 nAngle(GetAngle(aNow)); aStr += " "; - mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr); + SdrModel::TakeAngleStr(nAngle, aMetr); aStr += aMetr; } @@ -1049,11 +1049,11 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag { sal_uInt16 nPntNum((sal_uInt16)pHdl->GetPointNum()); const XPolygon& rXPoly = aPathPolygon[(sal_uInt16)rDrag.GetHdl()->GetPolyNum()]; - sal_uInt16 nPntAnz((sal_uInt16)rXPoly.GetPointCount()); + sal_uInt16 nPointCount((sal_uInt16)rXPoly.GetPointCount()); bool bClose(IsClosed(meObjectKind)); if(bClose) - nPntAnz--; + nPointCount--; if(pHdl->IsPlusHdl()) { @@ -1074,17 +1074,17 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag sal_Int32 nAngle(GetAngle(aNow)); aStr += " "; - mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr); + SdrModel::TakeAngleStr(nAngle, aMetr); aStr += aMetr; } - else if(nPntAnz > 1) + else if(nPointCount > 1) { - sal_uInt16 nPntMax(nPntAnz - 1); + sal_uInt16 nPntMax(nPointCount - 1); bool bIsClosed(IsClosed(meObjectKind)); bool bPt1(nPntNum > 0); bool bPt2(nPntNum < nPntMax); - if(bIsClosed && nPntAnz > 2) + if(bIsClosed && nPointCount > 2) { bPt1 = true; bPt2 = true; @@ -1120,7 +1120,7 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag sal_Int32 nAngle(GetAngle(aPt)); aStr += " "; - mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr); + SdrModel::TakeAngleStr(nAngle, aMetr); aStr += aMetr; } @@ -1141,7 +1141,7 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag sal_Int32 nAngle(GetAngle(aPt)); aStr += " "; - mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr); + SdrModel::TakeAngleStr(nAngle, aMetr); aStr += aMetr; } } @@ -1176,7 +1176,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra } // copy certain data locally to use less code and have faster access times bool bClosed =mpSdrPathDragData->bClosed ; // closed object? - sal_uInt16 nPntAnz =mpSdrPathDragData->nPntAnz ; // number of points + sal_uInt16 nPointCount = mpSdrPathDragData->nPointCount; // number of points sal_uInt16 nPnt =mpSdrPathDragData->nPnt ; // number of points in the polygon bool bBegPnt =mpSdrPathDragData->bBegPnt ; // dragged point is the first point of a Polyline bool bEndPnt =mpSdrPathDragData->bEndPnt ; // dragged point is the last point of a Polyline @@ -1249,7 +1249,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra if (bEndPnt) aXPoly.Remove(aXPoly.GetPointCount()-1,1); } if (bClosed) { // "pear problem": 2 lines, 1 curve, everything smoothed, a point between both lines is dragged - if (aXPoly.GetPointCount()>nPntAnz && aXPoly.IsControl(1)) { + if (aXPoly.GetPointCount()>nPointCount && aXPoly.IsControl(1)) { sal_uInt16 a=aXPoly.GetPointCount(); aXPoly[a-2]=aXPoly[2]; aXPoly.SetFlags(a-2,aXPoly.GetFlags(2)); aXPoly[a-1]=aXPoly[3]; aXPoly.SetFlags(a-1,aXPoly.GetFlags(3)); @@ -1451,11 +1451,11 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) nActPoint--; } if (pU->IsFormFlag()) { - sal_uInt16 nPtAnz0=rXPoly.GetPointCount(); + sal_uInt16 nPointCount0=rXPoly.GetPointCount(); rXPoly.Remove(nActPoint-1,2); // remove last two points and replace by form rXPoly.Insert(XPOLY_APPEND,pU->GetFormPoly()); - sal_uInt16 nPtAnz1=rXPoly.GetPointCount(); - for (sal_uInt16 i=nPtAnz0+1; i<nPtAnz1-1; i++) { // to make BckAction work + sal_uInt16 nPointCount1=rXPoly.GetPointCount(); + for (sal_uInt16 i=nPointCount0+1; i<nPointCount1-1; i++) { // to make BckAction work if (!rXPoly.IsControl(i)) rStat.NextPoint(); } nActPoint=rXPoly.GetPointCount()-1; @@ -1476,31 +1476,31 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) } } - sal_uInt16 nPolyAnz=aPathPolygon.Count(); - if (nPolyAnz!=0) { + sal_uInt16 nPolyCount=aPathPolygon.Count(); + if (nPolyCount!=0) { // delete last point, if necessary if (eCmd==SDRCREATE_FORCEEND) { - XPolygon& rXP=aPathPolygon[nPolyAnz-1]; - sal_uInt16 nPtAnz=rXP.GetPointCount(); - if (nPtAnz>=2) { - if (!rXP.IsControl(nPtAnz-2)) { - if (rXP[nPtAnz-1]==rXP[nPtAnz-2]) { - rXP.Remove(nPtAnz-1,1); + XPolygon& rXP=aPathPolygon[nPolyCount-1]; + sal_uInt16 nPointCount=rXP.GetPointCount(); + if (nPointCount>=2) { + if (!rXP.IsControl(nPointCount-2)) { + if (rXP[nPointCount-1]==rXP[nPointCount-2]) { + rXP.Remove(nPointCount-1,1); } } else { - if (rXP[nPtAnz-3]==rXP[nPtAnz-2]) { - rXP.Remove(nPtAnz-3,3); + if (rXP[nPointCount-3]==rXP[nPointCount-2]) { + rXP.Remove(nPointCount-3,3); } } } } - for (sal_uInt16 nPolyNum=nPolyAnz; nPolyNum>0;) { + for (sal_uInt16 nPolyNum=nPolyCount; nPolyNum>0;) { nPolyNum--; XPolygon& rXP=aPathPolygon[nPolyNum]; - sal_uInt16 nPtAnz=rXP.GetPointCount(); + sal_uInt16 nPointCount=rXP.GetPointCount(); // delete polygons with too few points - if (nPolyNum<nPolyAnz-1 || eCmd==SDRCREATE_FORCEEND) { - if (nPtAnz<2) aPathPolygon.Remove(nPolyNum); + if (nPolyNum<nPolyCount-1 || eCmd==SDRCREATE_FORCEEND) { + if (nPointCount<2) aPathPolygon.Remove(nPolyNum); } } } @@ -1605,7 +1605,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const Sdr return aRetval; } -basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeDragPolyPolygon(const SdrDragStat& rDrag) const +basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeDragPolyPolygon(const SdrDragStat& rDrag) { basegfx::B2DPolyPolygon aRetval; SdrView* pView = rDrag.GetView(); @@ -2308,7 +2308,7 @@ basegfx::B2DPolyPolygon SdrPathObj::TakeCreatePoly(const SdrDragStat& rDrag) con if(mpDAC) { aRetval = mpDAC->TakeObjectPolyPolygon(rDrag); - aRetval.append(mpDAC->TakeDragPolyPolygon(rDrag)); + aRetval.append(ImpPathForDragAndCreate::TakeDragPolyPolygon(rDrag)); } return aRetval; @@ -2333,7 +2333,7 @@ basegfx::B2DPolyPolygon SdrPathObj::getDragPolyPolygon(const SdrDragStat& rDrag) if(mpDAC) { - aRetval = mpDAC->TakeDragPolyPolygon(rDrag); + aRetval = ImpPathForDragAndCreate::TakeDragPolyPolygon(rDrag); } return aRetval; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 4f5dc1510a67..43c1aa31c855 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -412,7 +412,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons return eRet; } // defaults: TOP for text frame, CENTER for captions of drawing objects -void SdrTextObj::ImpJustifyRect(Rectangle& rRect) const +void SdrTextObj::ImpJustifyRect(Rectangle& rRect) { if (!rRect.IsEmpty()) { rRect.Justify(); @@ -878,7 +878,7 @@ OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const return pPara; } -void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg) const +void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg) { OutputDevice* pOut = rOutliner.GetRefDevice(); bool bNoStretching(false); @@ -1793,20 +1793,20 @@ long SdrTextObj::GetMaxTextFrameWidth() const bool SdrTextObj::IsFontwork() const { - return (bTextFrame) ? false // Default is FALSE - : static_cast<const XFormTextStyleItem&>(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE)).GetValue() != XFT_NONE; + return !bTextFrame // Default is FALSE + && static_cast<const XFormTextStyleItem&>(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE)).GetValue() != XFT_NONE; } bool SdrTextObj::IsHideContour() const { - return (bTextFrame) ? false // Default is: no, don't HideContour; HideContour not together with TextFrames - : static_cast<const XFormTextHideFormItem&>(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM)).GetValue(); + return !bTextFrame // Default is: no, don't HideContour; HideContour not together with TextFrames + && static_cast<const XFormTextHideFormItem&>(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM)).GetValue(); } bool SdrTextObj::IsContourTextFrame() const { - return (bTextFrame) ? false // ContourFrame not together with normal TextFrames - : static_cast<const SdrOnOffItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(); + return !bTextFrame // ContourFrame not together with normal TextFrames + && static_cast<const SdrOnOffItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(); } long SdrTextObj::GetTextLeftDistance() const diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 8041b3dd4add..84ef3242fd46 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -97,9 +97,9 @@ namespace DECL_LINK(decomposeBlockBulletPrimitive, DrawBulletInfo* ); DECL_LINK(decomposeStretchBulletPrimitive, DrawBulletInfo* ); - bool impIsUnderlineAbove(const vcl::Font& rFont) const; + static bool impIsUnderlineAbove(const vcl::Font& rFont); void impCreateTextPortionPrimitive(const DrawPortionInfo& rInfo); - drawinglayer::primitive2d::BasePrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const; + static drawinglayer::primitive2d::BasePrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo); void impFlushTextPortionPrimitivesToLinePrimitives(); void impFlushLinePrimitivesToParagraphPrimitives(); void impHandleDrawPortionInfo(const DrawPortionInfo& rInfo); @@ -159,7 +159,7 @@ namespace drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(); }; - bool impTextBreakupHandler::impIsUnderlineAbove(const vcl::Font& rFont) const + bool impTextBreakupHandler::impIsUnderlineAbove(const vcl::Font& rFont) { if(!rFont.IsVertical()) { @@ -452,7 +452,7 @@ namespace } } - drawinglayer::primitive2d::BasePrimitive2D* impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const + drawinglayer::primitive2d::BasePrimitive2D* impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) { if(rInfo.mpFieldData) { diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 61b5f8acf1e9..6d053e47ddb3 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -92,7 +92,7 @@ namespace maFont(rInfo.mrFont), maDblDXArray(), maLocale(rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale()), - mbRTL(rInfo.mrFont.IsVertical() ? sal_False : rInfo.IsRTL()) + mbRTL(!rInfo.mrFont.IsVertical() && rInfo.IsRTL()) { if(mnTextLength && rInfo.mpDXArray) { @@ -214,7 +214,7 @@ namespace std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow Reference < com::sun::star::i18n::XBreakIterator > mxBreak; // break iterator - double getParagraphTextLength(const ::std::vector< const impPathTextPortion* >& rTextPortions) + static double getParagraphTextLength(const ::std::vector< const impPathTextPortion* >& rTextPortions) { drawinglayer::primitive2d::TextLayouterDevice aTextLayouter; double fRetval(0.0); diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 27d97a259b85..c0913d2ce7bd 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -81,7 +81,7 @@ void ImpSdrObjTextLink::Closed() { OUString aFile; OUString aFilter; - pLinkManager->GetDisplayNames( this, 0,&aFile, 0, &aFilter ); + sfx2::LinkManager::GetDisplayNames( this, 0,&aFile, 0, &aFilter ); if( pData->aFileName != aFile || pData->aFilterName != aFilter ) diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index a2be884b8a4c..fca3331358c8 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -258,8 +258,8 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) } Polygon aPol(Rect2Poly(maRect,aGeo)); sal_uInt16 i; - sal_uInt16 nPntAnz=aPol.GetSize(); - for (i=0; i<nPntAnz; i++) { + sal_uInt16 nPointCount=aPol.GetSize(); + for (i=0; i<nPointCount; i++) { MirrorPoint(aPol[i],rRef1,rRef2); } // turn polygon and move it a little diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 590f847a62cb..6c35b7128752 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -320,7 +320,7 @@ void SdrObjList::SetRectsDirty() if (pUpList!=NULL) pUpList->SetRectsDirty(); } -void SdrObjList::impChildInserted(SdrObject& rChild) const +void SdrObjList::impChildInserted(SdrObject& rChild) { sdr::contact::ViewContact* pParent = rChild.GetViewContact().GetParentContact(); @@ -763,7 +763,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum ) -bool SdrObjList::HasObjectNavigationOrder (void) const +bool SdrObjList::HasObjectNavigationOrder() const { return mxNavigationOrder.get() != NULL; } @@ -857,7 +857,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat -void SdrObjList::ClearObjectNavigationOrder (void) +void SdrObjList::ClearObjectNavigationOrder() { mxNavigationOrder.reset(); mbIsNavigationOrderDirty = true; @@ -866,7 +866,7 @@ void SdrObjList::ClearObjectNavigationOrder (void) -bool SdrObjList::RecalcNavigationPositions (void) +bool SdrObjList::RecalcNavigationPositions() { if (mbIsNavigationOrderDirty) { diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 911527d961aa..59c0fbb36d8a 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -190,7 +190,7 @@ void SdrPaintView::ImpClearVars() bRestoreColors=true; pDefaultStyleSheet=NULL; bSomeObjChgdFlag=false; - nGraphicManagerDrawMode = GRFMGR_DRAW_STANDARD; + nGraphicManagerDrawMode = GraphicManagerDrawFlags::STANDARD; aComeBackIdle.SetPriority(SchedulerPriority::REPAINT); aComeBackIdle.SetIdleHdl(LINK(this,SdrPaintView,ImpComeBackHdl)); @@ -573,7 +573,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s static bool bTimesInited(false); static sal_uInt32 nRepeatCount(10L); static double fLastTimes[REMEMBERED_TIMES_COUNT]; - const sal_uInt32 nStartTime(tools::Time::GetSystemTicks()); + const sal_uInt64 nStartTime(tools::Time::GetSystemTicks()); sal_uInt32 count(1L); sal_uInt32 a; @@ -647,8 +647,8 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s if(bDoTimerTest) { - const sal_uInt32 nStopTime(tools::Time::GetSystemTicks()); - const sal_uInt32 nNeededTime(nStopTime - nStartTime); + const sal_uInt64 nStopTime(tools::Time::GetSystemTicks()); + const sal_uInt64 nNeededTime(nStopTime - nStartTime); const double fTimePerPaint((double)nNeededTime / (double)nRepeatCount); if(!bTimesInited) @@ -680,7 +680,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s const double fAverageTimePerPaint(fAddedTimes / (double)REMEMBERED_TIMES_COUNT); fprintf(stderr, "-----------(start result)----------\n"); - fprintf(stderr, "StartTime : %u, StopTime: %u, NeededTime: %u, TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint); + fprintf(stderr, "StartTime : %" SAL_PRIuUINT64 ", StopTime: %" SAL_PRIuUINT64 ", NeededTime: %" SAL_PRIuUINT64 ", TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint); fprintf(stderr, "Remembered times: "); for(a = 0L; a < REMEMBERED_TIMES_COUNT; a++) diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 7a33186a843b..9d559ff5af4f 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -391,7 +391,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints() if(nNewPt0Idx) { // correction necessary? - DBG_ASSERT(bKorregFlag==false,"Multiple index corrections at SdrPolyEditView::RipUp()."); + DBG_ASSERT(!bKorregFlag,"Multiple index corrections at SdrPolyEditView::RipUp()."); if(!bKorregFlag) { bKorregFlag = true; @@ -588,9 +588,9 @@ void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrUShortCont* pPts=pM->GetMarkedPoints(); - sal_uIntPtr nPtAnz=pPts==NULL ? 0 : pPts->size(); + sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size(); SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj); - if (nPtAnz!=0 && pPath!=NULL) + if (nPointCount!=0 && pPath!=NULL) { if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj)); diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 488d6c66d601..476b4be808e4 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -367,24 +367,24 @@ void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { - sal_uInt16 nPolyAnz=rPoly.Count(); - for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { + sal_uInt16 nPolyCount=rPoly.Count(); + for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyCount; nPolyNum++) { CrookRotatePoly(rPoly[nPolyNum],rCenter,rRad,bVert); } } void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { - sal_uInt16 nPolyAnz=rPoly.Count(); - for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { + sal_uInt16 nPolyCount=rPoly.Count(); + for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyCount; nPolyNum++) { CrookSlantPoly(rPoly[nPolyNum],rCenter,rRad,bVert); } } void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect) { - sal_uInt16 nPolyAnz=rPoly.Count(); - for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { + sal_uInt16 nPolyCount=rPoly.Count(); + for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyCount; nPolyNum++) { CrookStretchPoly(rPoly[nPolyNum],rCenter,rRad,bVert,rRefRect); } } diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 12bf4203b9d4..74665329c8a6 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -1456,7 +1456,7 @@ void SdrUndoPage::ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum) } } -void SdrUndoPage::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 /*n*/, bool /*bRepeat*/) const +void SdrUndoPage::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 /*n*/, bool /*bRepeat*/) { rStr = ImpGetResStr(nStrCacheID); } @@ -1736,32 +1736,32 @@ SdrUndoAction* SdrUndoFactory::CreateUndoGeoObject( SdrObject& rObject ) SdrUndoAction* SdrUndoFactory::CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText ) { - return new SdrUndoAttrObj( rObject, bStyleSheet1 ? sal_True : sal_False, bSaveText ? sal_True : sal_False ); + return new SdrUndoAttrObj( rObject, bStyleSheet1, bSaveText ); } SdrUndoAction* SdrUndoFactory::CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoRemoveObj( rObject, bOrdNumDirect ? sal_True : sal_False ); + return new SdrUndoRemoveObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoInsertObj( rObject, bOrdNumDirect ? sal_True : sal_False ); + return new SdrUndoInsertObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoDelObj( rObject, bOrdNumDirect ? sal_True : sal_False ); + return new SdrUndoDelObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoNewObj( rObject, bOrdNumDirect ? sal_True : sal_False ); + return new SdrUndoNewObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoCopyObj( rObject, bOrdNumDirect ? sal_True : sal_False ); + return new SdrUndoCopyObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1) @@ -1771,7 +1771,7 @@ SdrUndoAction* SdrUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_u SdrUndoAction* SdrUndoFactory::CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect ) { - return new SdrUndoReplaceObj( rOldObject, rNewObject, bOrdNumDirect ? sal_True : sal_False ); + return new SdrUndoReplaceObj( rOldObject, rNewObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ) |