Kaydet (Commit) f2df50ab authored tarafından Noel Grandin's avatar Noel Grandin

rename Neu->New in svx

Change-Id: I77a49d55dd49b0fd41f5335ac30a5484ac130250
Reviewed-on: https://gerrit.libreoffice.org/53050Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 200aa825
......@@ -363,7 +363,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
return SdrView::GetMarkedObjModel();
}
SdrModel* pNewModel = nullptr;
SdrModel* pNewModelel = nullptr;
tools::Rectangle aSelectedSnapRect;
// set 3d selection flags at all directly selected objects
......@@ -405,13 +405,13 @@ SdrModel* E3dView::GetMarkedObjModel() const
// call parent. This will copy all scenes and the selection flags at the 3D objects. So
// it will be possible to delete all non-selected 3d objects from the cloned 3d scenes
pNewModel = SdrView::GetMarkedObjModel();
pNewModelel = SdrView::GetMarkedObjModel();
if(pNewModel)
if(pNewModelel)
{
for(sal_uInt16 nPg(0); nPg < pNewModel->GetPageCount(); nPg++)
for(sal_uInt16 nPg(0); nPg < pNewModelel->GetPageCount(); nPg++)
{
const SdrPage* pSrcPg=pNewModel->GetPage(nPg);
const SdrPage* pSrcPg=pNewModelel->GetPage(nPg);
const size_t nObjCount(pSrcPg->GetObjCount());
for(size_t nOb = 0; nOb < nObjCount; ++nOb)
......@@ -436,7 +436,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
// restore old selection
rCurrentMarkList = aOldML;
return pNewModel;
return pNewModelel;
}
// When pasting objects have to integrated if a scene is inserted, but
......
......@@ -70,9 +70,9 @@ FmFormPage::~FmFormPage()
{
}
SdrPage* FmFormPage::Clone(SdrModel* pNewModel) const
SdrPage* FmFormPage::Clone(SdrModel* pNewModelel) const
{
FmFormModel& rFmFormModel(static_cast< FmFormModel& >(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
FmFormModel& rFmFormModel(static_cast< FmFormModel& >(nullptr == pNewModelel ? getSdrModelFromSdrPage() : *pNewModelel));
FmFormPage* pClonedFmFormPage(
new FmFormPage(
rFmFormModel,
......
This diff is collapsed.
......@@ -172,14 +172,14 @@ SdrLayerAdmin& SdrLayerAdmin::operator=(const SdrLayerAdmin& rSrcLayerAdmin)
return *this;
}
void SdrLayerAdmin::SetModel(SdrModel* pNewModel)
void SdrLayerAdmin::SetModel(SdrModel* pNewModelel)
{
if (pNewModel!=pModel) {
pModel=pNewModel;
if (pNewModelel!=pModel) {
pModel=pNewModelel;
sal_uInt16 nCount=GetLayerCount();
sal_uInt16 i;
for (i=0; i<nCount; i++) {
GetLayer(i)->SetModel(pNewModel);
GetLayer(i)->SetModel(pNewModelel);
}
}
}
......
......@@ -1740,9 +1740,9 @@ void SdrModel::setLock( bool bLock )
}
void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModel )
void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModelel )
{
assert(pNewModel != nullptr);
assert(pNewModelel != nullptr);
if( pSourceSet && pDestSet && (pSourceSet != pDestSet ) )
{
SfxWhichIter aWhichIter(*pSourceSet);
......@@ -1758,26 +1758,26 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
switch( nWhich )
{
case XATTR_FILLBITMAP:
pResultItem = static_cast<const XFillBitmapItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XFillBitmapItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
case XATTR_LINEDASH:
pResultItem = static_cast<const XLineDashItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XLineDashItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
case XATTR_LINESTART:
pResultItem = static_cast<const XLineStartItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XLineStartItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
case XATTR_LINEEND:
pResultItem = static_cast<const XLineEndItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XLineEndItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
case XATTR_FILLGRADIENT:
pResultItem = static_cast<const XFillGradientItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XFillGradientItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
case XATTR_FILLFLOATTRANSPARENCE:
// allow all kinds of XFillFloatTransparenceItem to be set
pResultItem = static_cast<const XFillFloatTransparenceItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XFillFloatTransparenceItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
case XATTR_FILLHATCH:
pResultItem = static_cast<const XFillHatchItem*>(pPoolItem)->checkForUniqueItem( pNewModel );
pResultItem = static_cast<const XFillHatchItem*>(pPoolItem)->checkForUniqueItem( pNewModelel );
break;
}
......
......@@ -30,31 +30,31 @@ SdrObjPlusData::~SdrObjPlusData()
SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
{
SdrObjPlusData* pNeuPlusData=new SdrObjPlusData;
SdrObjPlusData* pNewPlusData=new SdrObjPlusData;
if (pUserDataList!=nullptr) {
sal_uInt16 nCount=pUserDataList->GetUserDataCount();
if (nCount!=0) {
pNeuPlusData->pUserDataList.reset(new SdrObjUserDataList);
pNewPlusData->pUserDataList.reset(new SdrObjUserDataList);
for (sal_uInt16 i=0; i<nCount; i++) {
std::unique_ptr<SdrObjUserData> pNewUserData=pUserDataList->GetUserData(i).Clone(pObj1);
if (pNewUserData!=nullptr) {
pNeuPlusData->pUserDataList->AppendUserData(std::move(pNewUserData));
pNewPlusData->pUserDataList->AppendUserData(std::move(pNewUserData));
} else {
OSL_FAIL("SdrObjPlusData::Clone(): UserData.Clone() returns NULL.");
}
}
}
}
if (pGluePoints!=nullptr) pNeuPlusData->pGluePoints.reset(new SdrGluePointList(*pGluePoints));
if (pGluePoints!=nullptr) pNewPlusData->pGluePoints.reset(new SdrGluePointList(*pGluePoints));
// MtfAnimator isn't copied either
// #i68101#
// copy object name, title and description
pNeuPlusData->aObjName = aObjName;
pNeuPlusData->aObjTitle = aObjTitle;
pNeuPlusData->aObjDescription = aObjDescription;
pNewPlusData->aObjName = aObjName;
pNewPlusData->aObjTitle = aObjTitle;
pNewPlusData->aObjDescription = aObjDescription;
return pNeuPlusData;
return pNewPlusData;
}
void SdrObjPlusData::SetGluePoints(const SdrGluePointList& rPts)
......
......@@ -668,7 +668,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
Point aPos(rDrag.GetNow()); // current position
Point aPnt(mpSdrPathDragData->aXP[nPnt]); // the dragged point
sal_uInt16 nPnt1=0xFFFF,nPnt2=0xFFFF; // its neighboring points
Point aNeuPos1,aNeuPos2; // new alternative for aPos
Point aNewPos1,aNewPos2; // new alternative for aPos
bool bPnt1 = false, bPnt2 = false; // are these valid alternatives?
if (!bClosed && mpSdrPathDragData->nPointCount>=2) { // minimum of 2 points for lines
if (!bBegPnt) nPnt1=nPrevPnt;
......@@ -694,9 +694,9 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
if (bHor) ndy=long(ndy0*nXFact);
if (bVer) ndx=long(ndx0*nYFact);
aNeuPos1=aPnt1;
aNeuPos1.AdjustX(ndx );
aNeuPos1.AdjustY(ndy );
aNewPos1=aPnt1;
aNewPos1.AdjustX(ndx );
aNewPos1.AdjustY(ndy );
}
}
if (nPnt2!=0xFFFF && !bNextIsControl) {
......@@ -715,23 +715,23 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
if (bHor) ndy=long(ndy0*nXFact);
if (bVer) ndx=long(ndx0*nYFact);
aNeuPos2=aPnt2;
aNeuPos2.AdjustX(ndx );
aNeuPos2.AdjustY(ndy );
aNewPos2=aPnt2;
aNewPos2.AdjustX(ndx );
aNewPos2.AdjustY(ndy );
}
}
if (bPnt1 && bPnt2) { // both alternatives exist (and compete)
BigInt nX1(aNeuPos1.X()-aPos.X()); nX1*=nX1;
BigInt nY1(aNeuPos1.Y()-aPos.Y()); nY1*=nY1;
BigInt nX2(aNeuPos2.X()-aPos.X()); nX2*=nX2;
BigInt nY2(aNeuPos2.Y()-aPos.Y()); nY2*=nY2;
BigInt nX1(aNewPos1.X()-aPos.X()); nX1*=nX1;
BigInt nY1(aNewPos1.Y()-aPos.Y()); nY1*=nY1;
BigInt nX2(aNewPos2.X()-aPos.X()); nX2*=nX2;
BigInt nY2(aNewPos2.Y()-aPos.Y()); nY2*=nY2;
nX1+=nY1; // correction distance to square
nX2+=nY2; // correction distance to square
// let the alternative that allows fewer correction win
if (nX1<nX2) bPnt2=false; else bPnt1=false;
}
if (bPnt1) rDrag.SetNow(aNeuPos1);
if (bPnt2) rDrag.SetNow(aNeuPos2);
if (bPnt1) rDrag.SetNow(aNewPos1);
if (bPnt2) rDrag.SetNow(aNewPos2);
}
rDrag.SetActionRect(tools::Rectangle(rDrag.GetNow(),rDrag.GetNow()));
......
......@@ -116,19 +116,19 @@ XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) co
{
XPolygon aXPoly(rRect1,nRad1,nRad1);
const sal_uInt16 nPointCnt(aXPoly.GetPointCount());
XPolygon aNeuPoly(nPointCnt+1);
XPolygon aNewPoly(nPointCnt+1);
sal_uInt16 nShift=nPointCnt-2;
if (nRad1!=0) nShift=nPointCnt-5;
sal_uInt16 j=nShift;
for (sal_uInt16 i=1; i<nPointCnt; i++) {
aNeuPoly[i]=aXPoly[j];
aNeuPoly.SetFlags(i,aXPoly.GetFlags(j));
aNewPoly[i]=aXPoly[j];
aNewPoly.SetFlags(i,aXPoly.GetFlags(j));
j++;
if (j>=nPointCnt) j=1;
}
aNeuPoly[0]=rRect1.BottomCenter();
aNeuPoly[nPointCnt]=aNeuPoly[0];
aXPoly=aNeuPoly;
aNewPoly[0]=rRect1.BottomCenter();
aNewPoly[nPointCnt]=aNewPoly[0];
aXPoly=aNewPoly;
// these angles always relate to the top left corner of aRect
if (aGeo.nShearAngle!=0) ShearXPoly(aXPoly,maRect.TopLeft(),aGeo.nTan);
......
......@@ -271,11 +271,11 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
bool SdrTextObj::AdjustTextFrameWidthAndHeight()
{
tools::Rectangle aNeuRect(maRect);
bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect);
tools::Rectangle aNewRect(maRect);
bool bRet=AdjustTextFrameWidthAndHeight(aNewRect);
if (bRet) {
tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
maRect = aNeuRect;
maRect = aNewRect;
SetRectsDirty();
if (dynamic_cast<const SdrRectObj *>(this) != nullptr) { // this is a hack
static_cast<SdrRectObj*>(this)->SetXPolyDirty();
......
......@@ -89,22 +89,22 @@ SdrObjList::~SdrObjList()
Clear(); // delete contents of container
}
SdrObjList* SdrObjList::CloneSdrObjList(SdrModel* pNewModel) const
SdrObjList* SdrObjList::CloneSdrObjList(SdrModel* pNewModelel) const
{
SdrObjList* pObjList = new SdrObjList();
pObjList->copyDataFromSdrObjList(*this, pNewModel);
pObjList->copyDataFromSdrObjList(*this, pNewModelel);
return pObjList;
}
void SdrObjList::copyDataFromSdrObjList(const SdrObjList& rSrcList, SdrModel* pNewModel)
void SdrObjList::copyDataFromSdrObjList(const SdrObjList& rSrcList, SdrModel* pNewModelel)
{
// this function is only supposed to be called once, right after construction
assert(maList.empty());
eListKind=rSrcList.eListKind;
CopyObjects(rSrcList, pNewModel);
CopyObjects(rSrcList, pNewModelel);
}
void SdrObjList::CopyObjects(const SdrObjList& rSrcList, SdrModel* pNewModel)
void SdrObjList::CopyObjects(const SdrObjList& rSrcList, SdrModel* pNewModelel)
{
Clear();
bObjOrdNumsDirty = false;
......@@ -115,7 +115,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList, SdrModel* pNewModel)
for (size_t no(0); no < nCount; ++no)
{
SdrObject* pSO(rSrcList.GetObj(no));
SdrObject* pDO(pSO->Clone(pNewModel));
SdrObject* pDO(pSO->Clone(pNewModelel));
if(nullptr != pDO)
{
......@@ -1219,9 +1219,9 @@ void SdrPage::lateInit(const SdrPage& rSrcPage)
eListKind = (mbMaster) ? SdrObjListKind::MasterPage : SdrObjListKind::DrawPage;
}
SdrPage* SdrPage::Clone(SdrModel* pNewModel) const
SdrPage* SdrPage::Clone(SdrModel* pNewModelel) const
{
SdrPage* pClonedPage(new SdrPage(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
SdrPage* pClonedPage(new SdrPage(nullptr == pNewModelel ? getSdrModelFromSdrPage() : *pNewModelel));
pClonedPage->lateInit(*this);
return pClonedPage;
}
......
......@@ -714,11 +714,11 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
// Sorting the MarkList here might be problematic in the future, so
// use a copy.
SortMarkedObjects();
SdrModel* pNeuMod=mpModel->AllocModel();
SdrPage* pNeuPag=pNeuMod->AllocPage(false);
pNeuMod->InsertPage(pNeuPag);
SdrModel* pNewModel=mpModel->AllocModel();
SdrPage* pnewPage=pNewModel->AllocPage(false);
pNewModel->InsertPage(pnewPage);
if( !mxSelectionController.is() || !mxSelectionController->GetMarkedObjModel( pNeuPag ) )
if( !mxSelectionController.is() || !mxSelectionController->GetMarkedObjModel( pnewPage ) )
{
::std::vector< SdrObject* > aSdrObjects(GetMarkedObjects());
......@@ -735,18 +735,18 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
// convert SdrPageObj's to a graphic representation, because
// virtual connection to referenced page gets lost in new model
pNewObj = new SdrGrafObj(
*pNeuMod,
*pNewModel,
GetObjGraphic(*pObj),
pObj->GetLogicRect());
pNewObj->SetPage( pNeuPag );
pNewObj->SetPage( pnewPage );
}
else
{
pNewObj = pObj->Clone();
pNewObj->SetPage( pNeuPag );
pNewObj->SetPage( pnewPage );
}
pNeuPag->InsertObject(pNewObj, SAL_MAX_SIZE);
pnewPage->InsertObject(pNewObj, SAL_MAX_SIZE);
// #i13033#
aCloneList.AddPair(pObj, pNewObj);
......@@ -757,7 +757,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
aCloneList.CopyConnections();
}
return pNeuMod;
return pNewModel;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -198,7 +198,7 @@ public:
std::vector<std::unique_ptr<SdrUndoAction>> maUndos;
bool mbSkipChangeLayout;
void SetModel(SdrModel* pNewModel);
void SetModel(SdrModel* pNewModelel);
CellRef getCell( const CellPos& rPos ) const;
void LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight );
......@@ -320,7 +320,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource )
}
void SdrTableObjImpl::SetModel(SdrModel* pNewModel)
void SdrTableObjImpl::SetModel(SdrModel* pNewModelel)
{
// try to find new table style
disconnectTableStyle();
......@@ -330,7 +330,7 @@ void SdrTableObjImpl::SetModel(SdrModel* pNewModel)
{
const OUString sStyleName( Reference< XNamed >( mxTableStyle, UNO_QUERY_THROW )->getName() );
Reference< XStyleFamiliesSupplier > xSFS( pNewModel->getUnoModel(), UNO_QUERY_THROW );
Reference< XStyleFamiliesSupplier > xSFS( pNewModelel->getUnoModel(), UNO_QUERY_THROW );
Reference< XNameAccess > xFamilyNameAccess( xSFS->getStyleFamilies(), UNO_QUERY_THROW );
const OUString sFamilyName( "table" );
Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( sFamilyName ), UNO_QUERY_THROW );
......@@ -1856,14 +1856,14 @@ void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Frac
bool SdrTableObj::AdjustTextFrameWidthAndHeight()
{
tools::Rectangle aNeuRect(maLogicRect);
bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect);
tools::Rectangle aNewRect(maLogicRect);
bool bRet=AdjustTextFrameWidthAndHeight(aNewRect);
if (bRet)
{
tools::Rectangle aBoundRect0;
if (pUserCall!=nullptr)
aBoundRect0=GetLastBoundRect();
maRect = aNeuRect;
maRect = aNewRect;
SetRectsDirty();
SetChanged();
BroadcastObjectChange();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment