[Libreoffice-commits] .: svx/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Mon Nov 28 02:21:39 PST 2011
svx/source/svdraw/sdrpagewindow.cxx | 14 -
svx/source/svdraw/sdrpaintwindow.cxx | 12 -
svx/source/svdraw/svdattr.cxx | 32 +---
svx/source/svdraw/svdcrtv.cxx | 68 +++-----
svx/source/svdraw/svddrag.cxx | 2
svx/source/svdraw/svddrgm1.hxx | 8 -
svx/source/svdraw/svddrgmt.cxx | 99 ++++++------
svx/source/svdraw/svddrgv.cxx | 57 +++----
svx/source/svdraw/svdedtv.cxx | 92 ++++--------
svx/source/svdraw/svdedtv1.cxx | 149 ++++++++-----------
svx/source/svdraw/svdedtv2.cxx | 268 ++++++++++++++---------------------
svx/source/svdraw/svdedxv.cxx | 193 ++++++++++---------------
svx/source/svdraw/svdetc.cxx | 53 +++---
svx/source/svdraw/svdfmtf.cxx | 23 +--
svx/source/svdraw/svdfmtf.hxx | 12 -
svx/source/svdraw/svdglev.cxx | 10 -
svx/source/svdraw/svdglue.cxx | 26 +--
svx/source/svdraw/svdhdl.cxx | 111 +++++++-------
svx/source/svdraw/svdibrow.cxx | 68 ++++----
svx/source/svdraw/svditer.cxx | 4
svx/source/svdraw/svdlayer.cxx | 12 -
svx/source/svdraw/svdmark.cxx | 40 ++---
svx/source/svdraw/svdmodel.cxx | 164 +++++++++------------
svx/source/svdraw/svdmrkv.cxx | 155 +++++++++-----------
svx/source/svdraw/svdmrkv1.cxx | 53 ++----
svx/source/svdraw/svdoashp.cxx | 67 ++++----
svx/source/svdraw/svdoattr.cxx | 2
svx/source/svdraw/svdobj.cxx | 121 +++++++--------
28 files changed, 859 insertions(+), 1056 deletions(-)
New commits:
commit ea298ff0aba3ce9d8dd42167538ef61cfe3a3421
Author: Stefan Knorr (astron) <heinzlesspam at gmail.com>
Date: Sun Nov 27 23:21:00 2011 +0100
Comment translation in svdraw (part one)
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index c8932b6..b592306 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -99,7 +99,7 @@ using namespace ::com::sun::star;
}
else
{
- // Printer und VirtualDevice, bzw. kein OutDev
+ // Printer and VirtualDevice, or rather: no OutDev
uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
if( xFactory.is() )
{
@@ -136,7 +136,7 @@ SdrPageWindow::SdrPageWindow(SdrPageView& rPageView, SdrPaintWindow& rPaintWindo
SdrPageWindow::~SdrPageWindow()
{
- // #110094#, #i26631#
+ // #i26631#
ResetObjectContact();
if (mxControlContainer.is())
@@ -154,13 +154,13 @@ SdrPageWindow::~SdrPageWindow()
}
}
-// #110094# ObjectContact section
+// ObjectContact section
sdr::contact::ObjectContact* SdrPageWindow::CreateViewSpecificObjectContact()
{
return new sdr::contact::ObjectContactOfPageView(*this);
}
-// OVERLAYMANAGER
+// OVERLAY MANAGER
::sdr::overlay::OverlayManager* SdrPageWindow::GetOverlayManager() const
{
return GetPaintWindow().GetOverlayManager();
@@ -305,13 +305,13 @@ void SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector* pRedire
const sal_Bool bPrinter(GetPaintWindow().OutputToPrinter());
SetOfByte aProcessLayers = bPrinter ? mrPageView.GetPrintableLayers() : mrPageView.GetVisibleLayers();
- // create PaintInfoRec, #114359# use Rectangle only temporarily
+ // create PaintInfoRec; use Rectangle only temporarily
const Region& rRegion = GetPaintWindow().GetRedrawRegion();
// create processing data
sdr::contact::DisplayInfo aDisplayInfo;
- // Draw all layers. do NOT draw form layer from CompleteRedraw, this is done separate
+ // Draw all layers. do NOT draw form layer from CompleteRedraw, this is done separately
// as a single layer paint
const SdrLayerAdmin& rLayerAdmin = rModel.GetLayerAdmin();
const SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName(), sal_False);
@@ -423,7 +423,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
}
}
-// #110094# ObjectContact section
+// ObjectContact section
sdr::contact::ObjectContact& SdrPageWindow::GetObjectContact() const
{
if(!mpObjectContact)
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 1afc4ac..1e0311b 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -130,10 +130,10 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
// decide which OverlayManager to use
if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer)
{
- // buffered OverlayManager, buffers it's background and refreshes from there
+ // buffered OverlayManager, buffers its background and refreshes from there
// for pure overlay changes (no system redraw). The 3rd parameter specifies
- // if that refresh itself will use a 2nd vdev to avoid flickering.
- // Also hand over the evtl. existing old OverlayManager; this means to take over
+ // whether that refresh itself will use a 2nd vdev to avoid flickering.
+ // Also hand over the old OverlayManager if existent; this means to take over
// the registered OverlayObjects from it
mpOverlayManager = new ::sdr::overlay::OverlayManagerBuffered(GetOutputDevice(), pOldOverlayManager, true);
}
@@ -141,7 +141,7 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
{
// unbuffered OverlayManager, just invalidates places where changes
// take place
- // Also hand over the evtl. existing old OverlayManager; this means to take over
+ // Also hand over the old OverlayManager if existent; this means to take over
// the registered OverlayObjects from it
mpOverlayManager = new ::sdr::overlay::OverlayManager(GetOutputDevice(), pOldOverlayManager);
}
@@ -170,11 +170,11 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
}
}
- // OverlayObjects are transfered for the evtl. newly created OverlayManager by handing over
+ // OverlayObjects are transfered for the in some cases newly created OverlayManager by handing over
// at construction time
if(pOldOverlayManager)
{
- // The old overlay manager is not used anymore and can be (has to be) deleted.
+ // The old overlay manager is not used any more and can be (has to be) deleted.
delete pOldOverlayManager;
}
}
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 8739a44..18cf582 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -52,11 +52,11 @@
#include "editeng/xmlcnitm.hxx"
#include <svx/svxids.hrc>
-#include <svx/xtable.hxx> // fuer RGB_Color()
+#include <svx/xtable.hxx> // for RGB_Color()
#include "svx/svditext.hxx"
-#include <svx/svdmodel.hxx> // fuer DEGREE_CHAR
+#include <svx/svdmodel.hxx> // for DEGREE_CHAR
#include <svx/svdtrans.hxx>
-#include "svx/svdglob.hxx" // Stringcache
+#include "svx/svdglob.hxx" // string cache
#include "svx/svdstr.hrc"
#include <svx/sdgcpitm.hxx>
#include <editeng/adjitem.hxx>
@@ -85,7 +85,7 @@ using namespace ::com::sun::star;
/*************************************************************************
|*
-|* Konstruktor
+|* Constructor
|*
\************************************************************************/
@@ -94,10 +94,10 @@ SdrItemPool::SdrItemPool(
sal_Bool bLoadRefCounts)
: XOutdevItemPool(_pMaster, SDRATTR_START, SDRATTR_END, bLoadRefCounts)
{
- // preapare some constants
+ // prepare some constants
const Color aNullCol(RGB_Color(COL_BLACK));
const XubString aEmptyStr;
- const sal_Int32 nDefEdgeDist(500L); // Erstmal hart defaulted fuer Draw (100TH_MM). hier muss noch der MapMode beruecksichtigt werden.
+ const sal_Int32 nDefEdgeDist(500L); // Defaulting hard for Draw (100TH_MM) currently. MapMode will have to be taken into account in the future.
// init the non-persistent items
for(sal_uInt16 i(SDRATTR_NOTPERSIST_FIRST); i <= SDRATTR_NOTPERSIST_LAST; i++)
@@ -299,10 +299,8 @@ SdrItemPool::SdrItemPool(
SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER );
pBoxInfoItem->SetTable( sal_True );
- pBoxInfoItem->SetDist( sal_True); // Abstandsfeld immer anzeigen
-// pBoxInfoItem->SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
-// pBoxInfoItem->SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
- pBoxInfoItem->SetValid( VALID_DISABLE, sal_True ); // Einzelne Linien koennen nur in Tabellen DontCare-Status haben
+ pBoxInfoItem->SetDist( sal_True); // always show margin field
+ pBoxInfoItem->SetValid( VALID_DISABLE, sal_True ); // some lines may have DontCare state only in tables
mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem;
// mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_SHADOW - SDRATTR_START ] = new SvxShadowItem( SDRATTR_TABLE_BORDER_SHADOW );
@@ -327,7 +325,7 @@ SdrItemPool::SdrItemPool(
/*************************************************************************
|*
-|* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
+|* copy ctor, so that static defaults are cloned
|* (Parameter 2 = sal_True)
|*
\************************************************************************/
@@ -350,7 +348,7 @@ SfxItemPool* SdrItemPool::Clone() const
/*************************************************************************
|*
-|* Destruktor
+|* Destructor
|*
\************************************************************************/
@@ -897,7 +895,7 @@ SfxItemPresentation SdrAngleItem::GetPresentation(
if(bNull2)
{
- // keine Nachkommastellen
+ // no decimal place(s)
rText.Erase(nLen-2);
}
else
@@ -960,7 +958,7 @@ bool SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
if (GetValue()!=0) {
BigInt aVal(GetValue());
aVal*=nMul;
- aVal+=nDiv/2; // fuer korrektes Runden
+ aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
SetValue(long(aVal));
}
@@ -987,7 +985,7 @@ SfxItemPresentation SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
}
////////////////////////////////////////////////////////////////////////////////
-// Items des Legendenobjekts
+// items of the legend object
////////////////////////////////////////////////////////////////////////////////
TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem,SfxEnumItem);
@@ -1348,7 +1346,7 @@ bool SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
if (GetValue()>0) {
BigInt aVal(GetValue());
aVal*=nMul;
- aVal+=nDiv/2; // fuer korrektes Runden
+ aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
SetValue(short(aVal));
return sal_True;
@@ -1802,7 +1800,6 @@ bool SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberI
// Measure
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// MeasureKind
TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem,SfxEnumItem);
SfxPoolItem* SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); }
@@ -2004,7 +2001,6 @@ bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/
// Circ
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// CircKind
TYPEINIT1_AUTOFACTORY(SdrCircKindItem,SfxEnumItem);
SfxPoolItem* SdrCircKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCircKindItem(*this); }
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 3e54608..ffb3185 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -30,7 +30,7 @@
#include <svx/svdcrtv.hxx>
#include "svx/xattr.hxx"
#include <svx/svdundo.hxx>
-#include <svx/svdocapt.hxx> // Spezialbehandlung: Nach dem Create transparente Fuellung
+#include <svx/svdocapt.hxx> // special case: transparent filling after Create
#include <svx/svdoedge.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
@@ -87,7 +87,7 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, S
pTargetOverlay->add(*pNew);
maObjects.append(*pNew);
- // gluepoints
+ // glue points
if(rView.IsAutoVertexConnectors())
{
for(sal_uInt16 i(0); i < 4; i++)
@@ -186,15 +186,7 @@ void ImpSdrCreateViewExtraData::HideOverlay()
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@ @@@@@ @@@@ @@@@@@ @@ @@@@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
-//
+// CreateView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -295,7 +287,7 @@ sal_Bool SdrCreateView::CheckEdgeMode()
{
if (pAktCreate!=NULL)
{
- // wird vom EdgeObj gemanaged
+ // is managed by EdgeObj
if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return sal_False;
}
@@ -306,7 +298,7 @@ sal_Bool SdrCreateView::CheckEdgeMode()
}
else
{
- // sal_True heisst: MouseMove soll Connect checken
+ // sal_True, if MouseMove should check Connect
return !IsAction();
}
}
@@ -347,7 +339,7 @@ sal_Bool SdrCreateView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
if(pPV)
{
- // Defaultete Hit-Toleranz bei IsMarkedHit() mal aendern !!!!
+ // TODO: Change default hit tolerance at IsMarkedHit() some time!
Point aPos(pWin->PixelToLogic(rMEvt.GetPosPixel()));
sal_Bool bMarkHit=PickHandle(aPos)!=NULL || IsMarkedObjHit(aPos);
SdrObjConnection aCon;
@@ -383,12 +375,11 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent)
if(pObj)
{
- // Auf pers. Wunsch von Marco:
- // Mauszeiger bei Textwerkzeug immer I-Beam. Fadenkreuz
- // mit kleinem I-Beam erst bai MouseButtonDown
+ // Using text tool, mouse cursor is usually I-Beam,
+ // crosshairs with tiny I-Beam appears only on MouseButtonDown.
if(IsTextTool())
{
- // #81944# AW: Here the correct pointer needs to be used
+ // Here the correct pointer needs to be used
// if the default is set to vertical writing
aAktCreatePointer = POINTER_TEXT;
}
@@ -425,7 +416,7 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c
pCreatePV = GetSdrPageView();
}
if (pCreatePV!=NULL)
- { // ansonsten keine Seite angemeldet!
+ { // otherwise no side registered!
String aLay(aAktLayer);
if(nInvent == SdrInventor && nIdent == OBJ_MEASURE && aMeasureLayer.Len())
@@ -465,7 +456,7 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c
{
if (pDefaultStyleSheet!=NULL) pAktCreate->NbcSetStyleSheet(pDefaultStyleSheet, sal_False);
- // #101618# SW uses a naked SdrObject for frame construction. Normally, such an
+ // SW uses a naked SdrObject for frame construction. Normally, such an
// object should not be created. Since it is possible to use it as a helper
// object (e.g. in letting the user define an area with the interactive
// construction) at least no items should be set at that object.
@@ -485,18 +476,18 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c
if (nInvent==SdrInventor && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
nIdent==OBJ_TITLETEXT || nIdent==OBJ_OUTLINETEXT))
{
- // Fuer alle Textrahmen default keinen Hintergrund und keine Umrandung
+ // default for all text frames: no background, no border
SfxItemSet aSet(pMod->GetItemPool());
- aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // in case someone turns on Solid
aSet.Put(XFillStyleItem(XFILL_NONE));
- aSet.Put(XLineColorItem(String(),Color(COL_BLACK))); // Falls einer auf Solid umschaltet
+ aSet.Put(XLineColorItem(String(),Color(COL_BLACK))); // in case someone turns on Solid
aSet.Put(XLineStyleItem(XLINE_NONE));
pAktCreate->SetMergedItemSet(aSet);
}
if (!rLogRect.IsEmpty()) pAktCreate->NbcSetLogicRect(rLogRect);
- // #90129# make sure drag start point is inside WorkArea
+ // make sure drag start point is inside WorkArea
const Rectangle& rWorkArea = ((SdrDragView*)this)->GetWorkArea();
if(!rWorkArea.IsEmpty())
@@ -584,7 +575,7 @@ void SdrCreateView::MovCreateObj(const Point& rPnt)
else if (aDragStat.IsOrtho4Possible()) OrthoDistance4(aDragStat.GetPrev(),aPnt,IsBigOrtho());
}
- // #77734# If the drag point was limited and Ortho is active, do
+ // If the drag point was limited and Ortho is active, do
// the small ortho correction (reduction) -> last parameter to FALSE.
sal_Bool bDidLimit(ImpLimitToWorkArea(aPnt));
if(bDidLimit && IsOrtho())
@@ -626,8 +617,8 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
if (nAnz<=1 && eCmd==SDRCREATE_FORCEEND)
{
- BrkCreateObj(); // Objekte mit nur einem Punkt gibt's nicht (zumindest noch nicht)
- return sal_False; // sal_False=Event nicht ausgewertet
+ BrkCreateObj(); // objects with only a single point don't exist (at least today)
+ return sal_False; // sal_False = event not interpreted
}
sal_Bool bPntsEq=nAnz>1;
@@ -641,7 +632,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
if (!bPntsEq)
{
- // sonst Brk, weil alle Punkte gleich sind.
+ // otherwise Brk, because all points are equal
SdrObject* pObj=pAktCreate;
pAktCreate=NULL;
@@ -666,7 +657,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
pObj->SetLayer(nLayer);
- // #83403# recognize creation of a new 3D object inside a 3D scene
+ // recognize creation of a new 3D object inside a 3D scene
sal_Bool bSceneIntoScene(sal_False);
if(pObjMerk
@@ -695,7 +686,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
}
pCreatePV=NULL;
- bRet=sal_True; // sal_True=Event ausgewertet
+ bRet=sal_True; // sal_True = event interpreted
}
else
{
@@ -703,10 +694,10 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
}
}
else
- { // Mehr Punkte
- if (eCmd==SDRCREATE_FORCEEND || // nix da, Ende erzwungen
- nAnz==0 || // keine Punkte da (kann eigentlich nicht vorkommen)
- (nAnz<=1 && !aDragStat.IsMinMoved())) { // MinMove nicht erfuellt
+ { // more points
+ if (eCmd==SDRCREATE_FORCEEND || // nothing there -- force ending
+ nAnz==0 || // no existing points (should never happen)
+ (nAnz<=1 && !aDragStat.IsMinMoved())) { // MinMove not met
BrkCreateObj();
}
else
@@ -714,7 +705,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
// replace for DrawCreateObjDiff
HideCreateObj();
ShowCreateObj();
- aDragStat.ResetMinMoved(); // NextPoint gibt's bei MovCreateObj()
+ aDragStat.ResetMinMoved(); // NextPoint is at MovCreateObj()
bRet=sal_True;
}
}
@@ -776,8 +767,8 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
// overlay objects instead.
sal_Bool bUseSolidDragging(IsSolidDragging());
- // #i101648# check if dragged object is a naked SdrObject (no
- // derivation of). This is e.g. used in SW Frame construction
+ // #i101648# check if dragged object is a naked SdrObject (not
+ // a derivation). This is e.g. used in SW Frame construction
// as placeholder. Do not use SolidDragging for naked SDrObjects,
// they cannot have a valid optical representation
if(bUseSolidDragging && OBJ_NONE == pAktCreate->GetObjIdentifier())
@@ -854,7 +845,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
aDragPolyPolygon = rPathObj.getDragPolyPolygon(aDragStat);
}
- // use directly the SdrObject for overlay
+ // use the SdrObject directly for overlay
mpCreateViewExtraData->CreateAndShowOverlay(*this, pAktCreate, aDragPolyPolygon);
}
else
@@ -894,7 +885,6 @@ void SdrCreateView::HideCreateObj()
////////////////////////////////////////////////////////////////////////////////////////////////////
-/* new interface src537 */
sal_Bool SdrCreateView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr) const
{
if(pAktCreate)
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 6e79e24..478e8c3 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -93,7 +93,7 @@ void SdrDragStat::NextPoint(bool bSaveReal)
void SdrDragStat::PrevPoint()
{
- if (aPnts.Count()>=2) { // einer muss immer da bleiben
+ if (aPnts.Count()>=2) { // one has to remain at all times
Point* pPnt=(Point*)(aPnts.GetObject(aPnts.Count()-2));
aPnts.Remove(aPnts.Count()-2);
delete pPnt;
diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx
index dd9ed18..b45dde1 100644
--- a/svx/source/svdraw/svddrgm1.hxx
+++ b/svx/source/svdraw/svddrgm1.hxx
@@ -100,9 +100,9 @@ private:
long nWink0;
long nWink;
double nTan;
- bool bVertical; // Vertikales verzerren
- bool bResize; // Shear mit Resize
- bool bUpSideDown; // Beim Shear/Slant gespiegelt
+ bool bVertical; // contort vertically
+ bool bResize; // shear and resize
+ bool bUpSideDown; // mirror and shear/slant
bool bSlant;
public:
@@ -155,7 +155,7 @@ private:
// Handles to work on
SdrHdlGradient* pIAOHandle;
- // is this for gradient (or for transparence) ?
+ // is this for gradient (or for transparency)?
unsigned bIsGradient : 1;
public:
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 9333567..b3f5d5c 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -44,7 +44,7 @@
#include <svx/svdmark.hxx>
#include <svx/svdocapt.hxx>
#include <svx/svdpagv.hxx>
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include <svx/svddrgv.hxx>
#include <svx/svdundo.hxx>
@@ -210,7 +210,7 @@ SdrDragEntryPrimitive2DSequence::SdrDragEntryPrimitive2DSequence(
: SdrDragEntry(),
maPrimitive2DSequence(rSequence)
{
- // add parts to transparent overlay stuff eventually
+ // add parts to transparent overlay stuff if necessary
setAddToTransparent(bAddToTransparent);
}
@@ -394,7 +394,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag()
{
// when dragging a 50% transparent copy of a filled or not filled object without
// outline, this is normally hard to see. Add extra wireframe in that case. This
- // works nice e.g. with thext frames etc.
+ // works nice e.g. with text frames etc.
addSdrDragEntry(new SdrDragEntryPolyPolygon(pCandidate->TakeXorPoly()));
}
}
@@ -595,7 +595,7 @@ void SdrDragMethod::applyCurrentTransformationToSdrObject(SdrObject& rTarget)
double fRotate, fShearX;
aObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX);
- // get polygon's pos and size
+ // get polygon's position and size
const basegfx::B2DRange aPolyRange(aObjectPolyPolygon.getB2DRange());
// get the scaling factors (do not mirror, this is in the object transformation)
@@ -607,7 +607,7 @@ void SdrDragMethod::applyCurrentTransformationToSdrObject(SdrObject& rTarget)
-aPolyRange.getMinX(), -aPolyRange.getMinY()));
aPolyTransform.scale(fScaleX, fScaleY);
- // normally the poly should be moved back, but the translation is in the object
+ // normally the polygon should be moved back, but the translation is in the object
// transformation and thus does not need to be done
// aPolyTransform.translate(-aPolyRange.getMinX(), -aPolyRange.getMinY());
@@ -729,7 +729,7 @@ void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlay
}
}
- // evtl add DragStripes (help lines cross the page when dragging)
+ // add DragStripes if necessary (help lines cross the page when dragging)
if(getSdrDragView().IsDragStripes())
{
Rectangle aActionRectangle;
@@ -911,7 +911,7 @@ bool SdrDragMovHdl::BeginSdrDrag()
{
if (pH1==NULL || pH2==NULL)
{
- OSL_FAIL("SdrDragMovHdl::BeginSdrDrag(): Verschieben der Spiegelachse: Referenzhandles nicht gefunden");
+ OSL_FAIL("SdrDragMovHdl::BeginSdrDrag(): Moving the axis of reflection: reference handles not found.");
return false;
}
@@ -979,7 +979,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
nSA=getSdrDragView().GetSnapAngle();
if (getSdrDragView().IsMirrorAllowed(true,true))
- { // eingeschraenkt
+ { // limited
if (!getSdrDragView().IsMirrorAllowed(false,false)) nSA=4500;
if (!getSdrDragView().IsMirrorAllowed(true,false)) nSA=9000;
}
@@ -988,7 +988,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
nSA=4500;
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
SdrHdlKind eRef=HDL_REF1;
if (GetDragHdl()->GetKind()==HDL_REF1)
@@ -1010,7 +1010,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
double nCos=cos(a);
RotatePoint(aPnt,aRef,nSin,nCos);
- // Bei bestimmten Werten Rundungsfehler ausschliessen:
+ // eliminate rounding errors for certain values
if (nSA==9000)
{
if (nNeuWink==0 || nNeuWink==18000) aPnt.Y()=aRef.Y();
@@ -1197,7 +1197,7 @@ bool SdrDragObjOwn::BeginSdrDrag()
{
if(pObj->beginSpecialDrag(DragStat()))
{
- // create nitial clone to have a start visualisation
+ // create initial clone to have a start visualization
mpClone = pObj->getFullDragClone();
mpClone->applySpecialDrag(DragStat());
@@ -1315,11 +1315,11 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
}
}
- // evtl. use opertator= for setting changed object data (do not change selection in
+ // Maybe use operator = for setting changed object data (do not change selection in
// view, this will destroy the interactor). This is possible since a clone is now
// directly modified by the modifiers. Only SdrTableObj is adding own UNDOs
- // in it's SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses
- // a CreateUndoGeoObject() so maybe setting SetEndDragChangesAttributes is okay. I
+ // in its SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses
+ // a CreateUndoGeoObject(), so maybe setting SetEndDragChangesAttributes is okay. I
// will test this now
Rectangle aBoundRect0;
@@ -1395,14 +1395,14 @@ TYPEINIT1(SdrDragMove,SdrDragMethod);
void SdrDragMove::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool /*bModify*/)
{
- // for SdrDragMove, use current Primitive2DSequence of SdrObject visualisation
+ // for SdrDragMove, use current Primitive2DSequence of SdrObject visualization
// in given ObjectContact directly
sdr::contact::ViewContact& rVC = rOriginal.GetViewContact();
sdr::contact::ViewObjectContact& rVOC = rVC.GetViewObjectContact(rObjectContact);
sdr::contact::DisplayInfo aDisplayInfo;
// Do not use the last ViewPort set at the OC from the last ProcessDisplay(),
- // here we want the complete primitive sequence without visibility clippings
+ // here we want the complete primitive sequence without visible clippings
rObjectContact.resetViewPort();
addSdrDragEntry(new SdrDragEntryPrimitive2DSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo), true));
@@ -1545,7 +1545,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
}
if (aSR2.Left()>aLR.Left() || aSR2.Right()<aLR.Right())
- { // ist ueberhaupt Platz zum verschieben?
+ { // any space to move to?
aSR2.Move(aD.X(),0);
if (aSR2.Left()<aLR.Left())
@@ -1558,10 +1558,10 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
}
}
else
- aPt1.X()=DragStat().GetStart().X(); // kein Platz zum verschieben
+ aPt1.X()=DragStat().GetStart().X(); // no space to move to
if (aSR2.Top()>aLR.Top() || aSR2.Bottom()<aLR.Bottom())
- { // ist ueberhaupt Platz zum verschieben?
+ { // any space to move to?
aSR2.Move(0,aD.Y());
if (aSR2.Top()<aLR.Top())
@@ -1574,11 +1574,11 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
}
}
else
- aPt1.Y()=DragStat().GetStart().Y(); // kein Platz zum verschieben
+ aPt1.Y()=DragStat().GetStart().Y(); // no space to move to
}
if (getSdrDragView().IsDraggingGluePoints())
- { // Klebepunkte aufs BoundRect des Obj limitieren
+ { // restrict glue points to the BoundRect of the Obj
aPt1-=DragStat().GetStart();
const SdrMarkList& rML=GetMarkedObjectList();
sal_uLong nMarkAnz=rML.GetMarkCount();
@@ -1603,7 +1603,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
if (nGlueNum!=SDRGLUEPOINT_NOTFOUND)
{
Point aPt((*pGPL)[nGlueNum].GetAbsolutePos(*pObj));
- aPt+=aPt1; // soviel soll verschoben werden
+ aPt+=aPt1; // move by this much
if (aPt.X()<aBound.Left() ) aPt1.X()-=aPt.X()-aBound.Left() ;
if (aPt.X()>aBound.Right() ) aPt1.X()-=aPt.X()-aBound.Right() ;
if (aPt.Y()<aBound.Top() ) aPt1.Y()-=aPt.Y()-aBound.Top() ;
@@ -2054,7 +2054,7 @@ bool SdrDragRotate::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragRotate::BeginSdrDrag(): Kein Referenzpunkt-Handle gefunden");
+ OSL_FAIL("SdrDragRotate::BeginSdrDrag(): No reference point handle found.");
return false;
}
}
@@ -2081,7 +2081,7 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_)
nSA=9000;
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
nNeuWink+=nSA/2;
nNeuWink/=nSA;
nNeuWink*=nSA;
@@ -2102,8 +2102,8 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_)
nWink=nNeuWink;
double a=nWink*nPi180;
- double nSin1=sin(a); // schonmal berechnen, damit mgl. wenig Zeit
- double nCos1=cos(a); // zwischen Hide() und Show() vergeht
+ double nSin1=sin(a); // calculate now, so as little time as possible
+ double nCos1=cos(a); // passes between Hide() and Show()
Hide();
nSin=nSin1;
nCos=nCos1;
@@ -2203,7 +2203,7 @@ bool SdrDragShear::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragShear::BeginSdrDrag(): Kein Referenzpunkt-Handle fuer Shear gefunden");
+ OSL_FAIL("SdrDragShear::BeginSdrDrag(): No reference point handle for shearing found.");
return false;
}
@@ -2249,12 +2249,12 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
Point aPnt(rPnt);
Fraction aNeuFact(1,1);
- // Wenn kein Winkelfang, dann ggf. Rasterfang (ausser bei Slant)
+ // if angle snapping not activated, snap to raster (except when using slant)
if (nSA==0 && !bSlant)
aPnt=GetSnapPos(aPnt);
if (!bSlant && !bResize)
- { // Shear ohne Resize
+ { // shear, but no resize
if (bVertical)
aPnt.X()=aP0.X();
else
@@ -2288,7 +2288,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
Point aPt2(aPnt);
if (nSA!=0)
- aPt2=GetSnapPos(aPnt); // den also in jedem Falle fangen
+ aPt2=GetSnapPos(aPnt); // snap this one in any case
if (bVertical)
{
@@ -2307,7 +2307,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
nNeuWink=-nNeuWink;
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
nNeuWink+=nSA/2;
nNeuWink/=nSA;
nNeuWink*=nSA;
@@ -2317,15 +2317,15 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
bUpSideDown=nNeuWink>9000 && nNeuWink<27000;
if (bSlant)
- { // Resize fuer Slant berechnen
- // Mit Winkelfang jedoch ohne 89deg Begrenzung
+ { // calculate resize for slant
+ // when angle snapping is activated, disable 89 degree limit
long nTmpWink=nNeuWink;
if (bUpSideDown) nNeuWink-=18000;
if (bNeg) nTmpWink=-nTmpWink;
bResize=true;
double nCos=cos(nTmpWink*nPi180);
aNeuFact=nCos;
- Kuerzen(aFact,10); // 3 Dezimalstellen sollten reichen
+ Kuerzen(aFact,10); // three decimals should be enough
}
if (nNeuWink>8900)
@@ -2340,7 +2340,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
aFact=aNeuFact;
double a=nWink*nPi180;
double nTan1=0.0;
- nTan1=tan(a); // schonmal berechnen, damit mgl. wenig Zeit zwischen Hide() und Show() vergeht
+ nTan1=tan(a); // calculate now, so as little time as possible passes between Hide() and Show()
Hide();
nTan=nTan1;
DragStat().NextMove(rPnt);
@@ -2486,10 +2486,10 @@ bool SdrDragMirror::BeginSdrDrag()
nWink=NormAngle360(GetAngle(aDif));
if (!getSdrDragView().IsMirrorAllowed(false,false) && !b45)
- return false; // freier Achsenwinkel nicht erlaubt
+ return false; // free choice of axis angle not alowed
if (!getSdrDragView().IsMirrorAllowed(true,false) && !b90)
- return false; // 45deg auch nicht erlaubt
+ return false; // 45 degrees not allowed either
bSide0=ImpCheckSide(DragStat().GetStart());
Show();
@@ -2497,7 +2497,7 @@ bool SdrDragMirror::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragMirror::BeginSdrDrag(): Spiegelachse nicht gefunden");
+ OSL_FAIL("SdrDragMirror::BeginSdrDrag(): Axis of reflection not found.");
return false;
}
}
@@ -2638,7 +2638,7 @@ bool SdrDragGradient::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragGradient::BeginSdrDrag(): IAOGradient nicht gefunden");
+ OSL_FAIL("SdrDragGradient::BeginSdrDrag(): IAOGradient not found.");
}
return bRetval;
@@ -2687,7 +2687,6 @@ void SdrDragGradient::MoveSdrDrag(const Point& rPnt)
bool SdrDragGradient::EndSdrDrag(bool /*bCopy*/)
{
- // here the result is clear, do something with the values
Ref1() = pIAOHandle->GetPos();
Ref2() = pIAOHandle->Get2ndPos();
@@ -2769,7 +2768,7 @@ void SdrDragCrook::TakeSdrDragComment(XubString& rStr) const
rStr += ImpGetResStr(STR_EditWithCopy);
}
-// #96920# These defines parametrise the created raster
+// These defines parameterize the created raster
// for interactions
#define DRAG_CROOK_RASTER_MINIMUM (4)
#define DRAG_CROOK_RASTER_MAXIMUM (15)
@@ -2803,7 +2802,7 @@ basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectan
for(a = 0; a <= nVerDiv; a++)
{
- // hor lines
+ // horizontal lines
for(b = 0; b < nHorDiv; b++)
{
basegfx::B2DPolygon aHorLineSegment;
@@ -2825,7 +2824,7 @@ basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectan
for(a = 0; a <= nHorDiv; a++)
{
- // ver lines
+ // vertical lines
for(b = 0; b < nVerDiv; b++)
{
basegfx::B2DPolygon aVerLineSegment;
@@ -2981,7 +2980,7 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
Point* pC2=NULL;
if (i+1<nPtAnz && aPol.IsControl(i))
- { // Kontrollpunkt links
+ { // control point on the left
pC1=pPnt;
i++;
pPnt=&aPol[i];
@@ -2990,7 +2989,7 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
i++;
if (i<nPtAnz && aPol.IsControl(i))
- { // Kontrollpunkt rechts
+ { // control point on the right
pC2=&aPol[i];
i++;
}
@@ -3111,19 +3110,19 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (bValid)
{
- double a=0; // Steigung des Radius
+ double a=0; // slope of the radius
long nPntWink=0;
if (bVertical)
{
- a=((double)dy1)/((double)dx1); // Steigung des Radius
+ a=((double)dy1)/((double)dx1); // slope of the radius
nNeuRad=((long)(dy1*a)+dx1) /2;
aNeuCenter.X()+=nNeuRad;
nPntWink=GetAngle(aPnt-aNeuCenter);
}
else
{
- a=((double)dx1)/((double)dy1); // Steigung des Radius
+ a=((double)dx1)/((double)dy1); // slope of the radius
nNeuRad=((long)(dx1*a)+dy1) /2;
aNeuCenter.Y()+=nNeuRad;
nPntWink=GetAngle(aPnt-aNeuCenter)-9000;
@@ -3159,7 +3158,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (bResize)
{
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
long nWink0=nPntWink;
nPntWink+=nSA/2;
nPntWink/=nSA;
@@ -3191,7 +3190,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
bValid=false;
if (bValid && nSA!=0)
- { // Winkelfang
+ { // angle snapping
long nWink0=nWink;
nWink+=nSA/2;
nWink/=nSA;
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index ea8fa77..a028d58 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -53,15 +53,7 @@ using namespace sdr;
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@@@@ @@@@ @@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@ @@ @@@@@ @@@@@@ @@ @@@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@@ @@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
-//
+// DragView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -189,20 +181,20 @@ sal_Bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, sal_Bool bTR ) const
Rectangle aR;
TakeActionRect(aR);
rPos = bTR ? aR.TopRight() : aR.TopLeft();
- if (GetMarkedObjectCount()==1 && IsDragObj() && // nur bei Einzelselektion
- !IsDraggingPoints() && !IsDraggingGluePoints() && // nicht beim Punkteschieben
- !mpCurrentSdrDragMethod->ISA(SdrDragMovHdl)) // nicht beim Handlesschieben
+ if (GetMarkedObjectCount()==1 && IsDragObj() && // only on single selection
+ !IsDraggingPoints() && !IsDraggingGluePoints() && // not when moving points
+ !mpCurrentSdrDragMethod->ISA(SdrDragMovHdl)) // not when moving handles
{
SdrObject* pObj=GetMarkedObjectByIndex(0);
if (pObj->ISA(SdrCaptionObj))
{
Point aPt(((SdrCaptionObj*)pObj)->GetTailPos());
- sal_Bool bTail=eDragHdl==HDL_POLY; // Schwanz wird gedraggt (nicht so ganz feine Abfrage hier)
- sal_Bool bOwn=mpCurrentSdrDragMethod->ISA(SdrDragObjOwn); // Objektspeziefisch
+ sal_Bool bTail=eDragHdl==HDL_POLY; // drag tail
+ sal_Bool bOwn=mpCurrentSdrDragMethod->ISA(SdrDragObjOwn); // specific to object
if (!bTail)
- { // bei bTail liefert TakeActionRect schon das richtige
+ { // for bTail, TakeActionRect already does the right thing
if (bOwn)
- { // bOwn kann sein MoveTextFrame, ResizeTextFrame aber eben nicht mehr DragTail
+ { // bOwn may be MoveTextFrame, ResizeTextFrame, but may not (any more) be DragTail
rPos=aPt;
}
else
@@ -265,7 +257,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
}
aDragStat.SetView((SdrView*)this);
- aDragStat.SetPageView(pMarkedPV); // <<-- hier muss die DragPV rein!!!
+ aDragStat.SetPageView(pMarkedPV); // <<-- DragPV has to go here!!!
aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
aDragStat.SetHdl(pHdl);
aDragStat.NextPoint();
@@ -274,7 +266,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
eDragHdl= pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
bDragHdl=eDragHdl==HDL_REF1 || eDragHdl==HDL_REF2 || eDragHdl==HDL_MIRX;
- // #103894# Expand test for HDL_ANCHOR_TR
+ // Expand test for HDL_ANCHOR_TR
sal_Bool bNotDraggable = (HDL_ANCHOR == eDragHdl || HDL_ANCHOR_TR == eDragHdl);
if(pHdl && (pHdl->GetKind() == HDL_SMARTTAG) && pForcedMeth )
@@ -296,7 +288,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
case HDL_LEFT: case HDL_RIGHT:
case HDL_UPPER: case HDL_LOWER:
{
- // Sind 3D-Objekte selektiert?
+ // are 3D objects selected?
sal_Bool b3DObjSelected = sal_False;
for(sal_uInt32 a=0;!b3DObjSelected && a<GetMarkedObjectCount();a++)
{
@@ -304,9 +296,8 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
if(pObj && pObj->ISA(E3dObject))
b3DObjSelected = sal_True;
}
- // Falls ja, Shear auch bei !IsShearAllowed zulassen,
- // da es sich bei 3D-Objekten um eingeschraenkte
- // Rotationen handelt
+ // If yes, allow shear even when !IsShearAllowed,
+ // because 3D objects are limited rotations
if (!b3DObjSelected && !IsShearAllowed())
return sal_False;
mpCurrentSdrDragMethod = new SdrDragShear(*this,eDragMode==SDRDRAG_ROTATE);
@@ -328,7 +319,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
default:
{
if (IsMarkedHitMovesAlways() && eDragHdl==HDL_MOVE)
- { // HDL_MOVE ist auch wenn Obj direkt getroffen
+ { // HDL_MOVE is true, even if Obj is hit directly
if (!IsMoveAllowed()) return sal_False;
mpCurrentSdrDragMethod = new SdrDragMove(*this);
}
@@ -514,7 +505,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
{
if (pHdl==NULL && IS_TYPE(SdrDragObjOwn,mpCurrentSdrDragMethod))
{
- // Aha, Obj kann nicht Move SpecialDrag, also MoveFrameDrag versuchen
+ // Obj may not Move SpecialDrag, so try with MoveFrameDrag
delete mpCurrentSdrDragMethod;
mpCurrentSdrDragMethod = 0;
bDragSpecial=sal_False;
@@ -554,7 +545,7 @@ sal_Bool SdrDragView::EndDragObj(sal_Bool bCopy)
{
bool bRet(false);
- // #i73341# If insert GluePoint, do not insist on last points being different
+ // #i73341# If inserting GluePoint, do not insist on last points being different
if(mpCurrentSdrDragMethod && aDragStat.IsMinMoved() && (IsInsertGluePoint() || aDragStat.GetNow() != aDragStat.GetPrev()))
{
sal_uIntPtr nHdlAnzMerk=0;
@@ -604,7 +595,7 @@ sal_Bool SdrDragView::EndDragObj(sal_Bool bCopy)
if (!bSomeObjChgdFlag)
{
- // Aha, Obj hat nicht gebroadcastet (z.B. Writer FlyFrames)
+ // Obj did not broadcast (e. g. Writer FlyFrames)
if(!bDragHdl)
{
AdjustMarkHdl();
@@ -633,7 +624,7 @@ void SdrDragView::BrkDragObj()
if (bInsPolyPoint)
{
- pInsPointUndo->Undo(); // Den eingefuegten Punkt wieder raus
+ pInsPointUndo->Undo(); // delete inserted point again
delete pInsPointUndo;
pInsPointUndo=NULL;
SetMarkHandles();
@@ -642,7 +633,7 @@ void SdrDragView::BrkDragObj()
if (IsInsertGluePoint())
{
- pInsPointUndo->Undo(); // Den eingefuegten Klebepunkt wieder raus
+ pInsPointUndo->Undo(); // delete inserted glue point again
delete pInsPointUndo;
pInsPointUndo=NULL;
SetInsertGluePoint(sal_False);
@@ -699,7 +690,7 @@ sal_Bool SdrDragView::ImpBegInsObjPoint(sal_Bool bIdxZwang, sal_uInt32 nIdx, con
if(bClosed0 != pMarkedPath->IsClosedObj())
{
- // Obj was closed implicit
+ // Obj was closed implicitly
// object changed
pMarkedPath->SetChanged();
pMarkedPath->BroadcastObjectChange();
@@ -738,7 +729,7 @@ sal_Bool SdrDragView::EndInsObjPoint(SdrCreateCmd eCmd)
sal_Bool bOk=EndDragObj(sal_False);
if (bOk==sal_True && eCmd!=SDRCREATE_FORCEEND)
{
- // Ret=True bedeutet: Action ist vorbei.
+ // Ret=True means: Action is over.
bOk=!(ImpBegInsObjPoint(sal_True, nNextPnt, aPnt, eCmd == SDRCREATE_NEXTOBJECT, pDragWin));
}
@@ -753,7 +744,7 @@ sal_Bool SdrDragView::IsInsGluePointPossible() const
{
if (GetMarkedObjectCount()==1)
{
- // sal_False liefern, wenn 1 Objekt und dieses ein Verbinder ist.
+ // return sal_False, if only 1 object which is a connector.
const SdrObject* pObj=GetMarkedObjectByIndex(0);
if (!HAS_BASE(SdrEdgeObj,pObj))
{
@@ -817,12 +808,12 @@ sal_Bool SdrDragView::BegInsGluePoint(const Point& rPnt)
}
else
{
- OSL_FAIL("BegInsGluePoint(): GluePoint-Handle nicht gefunden");
+ OSL_FAIL("BegInsGluePoint(): GluePoint handle not found.");
}
}
else
{
- // Keine Klebepunkte moeglich bei diesem Objekt (z.B. Edge)
+ // no glue points possible for this object (e. g. Edge)
SetInsertGluePoint(sal_False);
delete pInsPointUndo;
pInsPointUndo=NULL;
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 701c05d..dfdf7ef 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -30,7 +30,7 @@
#include <vcl/metaact.hxx>
#include <svx/svdedtv.hxx>
#include <svx/svdundo.hxx>
-#include <svx/svdograf.hxx> // fuer Possibilities
+#include <svx/svdograf.hxx> // for Possibilities
#include <svx/svdopath.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdopage.hxx>
@@ -38,8 +38,8 @@
#include <svx/svdlayer.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
-#include <svx/svdpoev.hxx> // fuer die PolyPossiblities
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdpoev.hxx> // for the PolyPossiblities
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include <svx/e3dsceneupdater.hxx>
#include <rtl/strbuf.hxx>
@@ -49,15 +49,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
-//
+// EditView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -110,7 +102,7 @@ void SdrEditView::ImpResetPossibilityFlags()
void SdrEditView::ImpClearVars()
{
ImpResetPossibilityFlags();
- bPossibilitiesDirty=sal_True; // << war von Purify angemeckert
+ bPossibilitiesDirty=sal_True; // << Purify didn't like this
bBundleVirtObj=sal_False;
}
@@ -154,12 +146,11 @@ sal_Bool SdrEditView::ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const
SdrObject* pObj = pOL->GetObj(nObjNum);
SdrObjList* pSubOL = pObj->GetSubList();
- // #104809# Test explicitely for group objects and 3d scenes
+ // explicitly test for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(!ImpDelLayerCheck(pSubOL, nDelID))
{
- // Rekursion
bDelAll = sal_False;
}
}
@@ -190,7 +181,7 @@ void SdrEditView::ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID)
SdrObjList* pSubOL = pObj->GetSubList();
- // #104809# Test explicitely for group objects and 3d scenes
+ // explicitly test for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(ImpDelLayerCheck(pSubOL, nDelID))
@@ -259,7 +250,7 @@ void SdrEditView::DeleteLayer(const XubString& rName)
SdrObject* pObj = pPage->GetObj(nObjNum);
SdrObjList* pSubOL = pObj->GetSubList();
- // #104809# Test explicitely for group objects and 3d scenes
+ // explicitly test for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(ImpDelLayerCheck(pSubOL, nDelID))
@@ -382,13 +373,7 @@ void SdrEditView::ImpBroadcastEdgesOfMarkedNodes()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// #### ### #### #### # #### # # # ##### # ##### ####
-// # # # # # # # # # # # # # # # #
-// #### # # ### ### # #### # # # # # #### ###
-// # # # # # # # # # # # # # # #
-// # ### #### #### # #### # #### # # # ##### ####
-//
+// Possibilities
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrEditView::MarkListHasChanged()
@@ -455,10 +440,10 @@ sal_Bool SdrEditView::IsEdgeRadiusAllowed() const
sal_Bool SdrEditView::IsCrookAllowed(sal_Bool bNoContortion) const
{
- // CrookMode fehlt hier (weil kein Rotate bei Shear ...)
+ // CrookMode missing here (no rotations allowed when shearing ...)
ForcePossibilities();
if (bNoContortion) {
- if (!bRotateFreeAllowed) return sal_False; // Crook is nich
+ if (!bRotateFreeAllowed) return sal_False;
return !bMoveProtect && bMoveAllowed;
} else {
return !bResizeProtect && bContortionPossible;
@@ -497,7 +482,7 @@ void SdrEditView::CheckPossibilities()
{
// This call IS necessary to correct the MarkList, in which
// no longer to the model belonging objects still can reside.
- // These ones nned to be removed.
+ // These ones need to be removed.
CheckMarked();
}
@@ -512,8 +497,8 @@ void SdrEditView::CheckPossibilities()
bGroupPossible=nMarkAnz>=2;
bCombinePossible=nMarkAnz>=2;
if (nMarkAnz==1) {
- // bCombinePossible gruendlicher checken
- // fehlt noch ...
+ // check bCombinePossible more thoroughly
+ // still missing ...
const SdrObject* pObj=GetMarkedObjectByIndex(0);
//const SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
sal_Bool bGroup=pObj->GetSubList()!=NULL;
@@ -524,7 +509,7 @@ void SdrEditView::CheckPossibilities()
}
bCombineNoPolyPolyPossible=bCombinePossible;
bDeletePossible=sal_True;
- // Zu den Transformationen erstmal ja sagen
+ // accept transformations for now
bMoveAllowed =sal_True;
bResizeFreeAllowed=sal_True;
bResizePropAllowed=sal_True;
@@ -543,11 +528,11 @@ void SdrEditView::CheckPossibilities()
bGradientAllowed = (nMarkAnz == 1);
if(bGradientAllowed)
{
- // gradient depends on fillstyle
+ // gradient depends on fill style
const SdrMark* pM = GetSdrMarkByIndex(0);
const SdrObject* pObj = pM->GetMarkedSdrObj();
- // maybe group object, so get merged ItemSet
+ // may be group object, so get merged ItemSet
const SfxItemSet& rSet = pObj->GetMergedItemSet();
SfxItemState eState = rSet.GetItemState(XATTR_FILLSTYLE, sal_False);
@@ -579,7 +564,7 @@ void SdrEditView::CheckPossibilities()
pObj->TakeObjInfo(aInfo);
sal_Bool bMovPrt=pObj->IsMoveProtect();
sal_Bool bSizPrt=pObj->IsResizeProtect();
- if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // Menge der MovableObjs zaehlen
+ if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // count MovableObjs
if (bMovPrt) bMoveProtect=sal_True;
if (bSizPrt) bResizeProtect=sal_True;
@@ -587,7 +572,7 @@ void SdrEditView::CheckPossibilities()
if(!aInfo.bTransparenceAllowed)
bTransparenceAllowed = sal_False;
- // Wenn einer was nicht kann, duerfen's alle nicht
+ // If one of these can't do something, none can
if (!aInfo.bMoveAllowed ) bMoveAllowed =sal_False;
if (!aInfo.bResizeFreeAllowed) bResizeFreeAllowed=sal_False;
if (!aInfo.bResizePropAllowed) bResizePropAllowed=sal_False;
@@ -599,8 +584,8 @@ void SdrEditView::CheckPossibilities()
if (!aInfo.bShearAllowed ) bShearAllowed =sal_False;
if (aInfo.bEdgeRadiusAllowed) bEdgeRadiusAllowed=sal_True;
if (aInfo.bNoContortion ) bContortionPossible=sal_False;
- // Fuer Crook mit Contortion: Alle Objekte muessen
- // Movable und Rotatable sein, ausser maximal 1
+ // For Crook with Contortion: all objects have to be
+ // Movable and Rotatable, except for a maximum of 1 of them
if (!bMoreThanOneNoMovRot) {
if (!aInfo.bMoveAllowed || !aInfo.bResizeFreeAllowed) {
bMoreThanOneNoMovRot=bNoMovRotFound;
@@ -608,13 +593,13 @@ void SdrEditView::CheckPossibilities()
}
}
- // when one member cannot be converted, no conversion is possible
+ // if one member cannot be converted, no conversion is possible
if(!aInfo.bCanConvToContour)
bCanConvToContour = sal_False;
// Ungroup
if (!bUnGroupPossible) bUnGroupPossible=pObj->GetSubList()!=NULL;
- // ConvertToCurve: Wenn mind. einer konvertiert werden kann ist das ok.
+ // ConvertToCurve: If at least one can be converted, that is fine.
if (aInfo.bCanConvToPath ) bCanConvToPath =sal_True;
if (aInfo.bCanConvToPoly ) bCanConvToPoly =sal_True;
if (aInfo.bCanConvToPathLineToArea) bCanConvToPathLineToArea=sal_True;
@@ -629,9 +614,9 @@ void SdrEditView::CheckPossibilities()
if (!bDismantlePossible) bDismantlePossible = ImpCanDismantle(pObj, sal_False);
if (!bDismantleMakeLinesPossible) bDismantleMakeLinesPossible = ImpCanDismantle(pObj, sal_True);
- // OrthoDesiredOnMarked checken
+ // check OrthoDesiredOnMarked
if (!bOrthoDesiredOnMarked && !aInfo.bNoOrthoDesired) bOrthoDesiredOnMarked=sal_True;
- // ImportMtf checken
+ // check ImportMtf
if (!bImportMtfPossible) {
sal_Bool bGraf=HAS_BASE(SdrGrafObj,pObj);
@@ -664,8 +649,8 @@ void SdrEditView::CheckPossibilities()
bGrpEnterPossible=bMerker1;
}
if (bMoveAllowed) {
- // Verschieben von angeklebten Verbindern unterbinden
- // Derzeit nur fuer Einfachselektion implementiert.
+ // Don't allow moving glued connectors.
+ // Currently only implemented for single selection.
if (nMarkAnz==1) {
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
@@ -738,7 +723,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
SdrMark* pM = rMark.GetMark(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ // extra undo actions for changed connector which now may hold its layed out path (SJ)
std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
AddUndoActions( vConnectorUndoActions );
@@ -746,7 +731,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
}
}
- // Sicherstellen, dass die OrderNums stimmen:
+ // make sure, OrderNums are correct:
rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
std::vector< SdrObject* > aRemoved3DObjects;
@@ -756,7 +741,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
nm--;
SdrMark* pM = rMark.GetMark(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
- SdrObjList* pOL = pObj->GetObjList(); //#52680#
+ SdrObjList* pOL = pObj->GetObjList();
const sal_uInt32 nOrdNum(pObj->GetOrdNumDirect());
bool bIs3D = dynamic_cast< E3dObject* >(pObj);
@@ -910,8 +895,8 @@ void SdrEditView::CopyMarkedObj()
SortMarkedObjects();
SdrMarkList aSourceObjectsForCopy(GetMarkedObjectList());
- // Folgende Schleife Anstatt MarkList::Merge(), damit
- // ich jeweils mein Flag an die MarkEntries setzen kann.
+ // The following loop is used instead of MarkList::Merge(), to be
+ // able to flag the MarkEntries.
sal_uIntPtr nEdgeAnz = GetEdgesOfMarkedNodes().GetMarkCount();
for (sal_uIntPtr nEdgeNum=0; nEdgeNum<nEdgeAnz; nEdgeNum++) {
SdrMark aM(*GetEdgesOfMarkedNodes().GetMark(nEdgeNum));
@@ -946,7 +931,7 @@ void SdrEditView::CopyMarkedObj()
if (pM->GetUser()==0)
{
- // Sonst war's nur eine mitzukierende Edge
+ // otherwise it is only an Edge we have to copy as well
GetMarkedObjectListWriteAccess().InsertEntry(aME);
}
} else {
@@ -962,21 +947,20 @@ void SdrEditView::CopyMarkedObj()
{
#ifdef DBG_UTIL
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "SdrEditView::CopyMarkedObj(): Fehler beim Clonen "));
+ "SdrEditView::CopyMarkedObj(): Error when cloning "));
if(nCloneErrCnt == 1)
{
- aStr.append(RTL_CONSTASCII_STRINGPARAM("eines Zeichenobjekts."));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM("a drawing object."));
}
else
{
- aStr.append(RTL_CONSTASCII_STRINGPARAM("von "));
aStr.append(static_cast<sal_Int32>(nCloneErrCnt));
- aStr.append(RTL_CONSTASCII_STRINGPARAM(" Zeichenobjekten."));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" drawing objects."));
}
aStr.append(RTL_CONSTASCII_STRINGPARAM(
- " Objektverbindungen werden nicht mitkopiert."));
+ " This object's/These objects's connections will not be copied."));
OSL_FAIL(aStr.getStr());
#endif
}
@@ -991,7 +975,7 @@ sal_Bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, sal_
SdrLayerID nLayer=rPV.GetPage()->GetLayerAdmin().GetLayerID(aAktLayer,sal_True);
if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
if (rPV.GetLockedLayers().IsSet(nLayer) || !rPV.GetVisibleLayers().IsSet(nLayer)) {
- SdrObject::Free( pObj ); // Layer gesperrt oder nicht sichtbar
+ SdrObject::Free( pObj ); // Layer locked or invisible
return sal_False;
}
pObj->NbcSetLayer(nLayer);
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index de360be..cc958a6 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -37,19 +37,19 @@
#include <svl/itemiter.hxx>
#include <vcl/msgbox.hxx>
#include <svx/rectenum.hxx>
-#include <svx/svxids.hrc> // fuer SID_ATTR_TRANSFORM_...
-#include <svx/svdattr.hxx> // fuer Get/SetGeoAttr
+#include <svx/svxids.hrc> // for SID_ATTR_TRANSFORM_...
+#include <svx/svdattr.hxx> // for Get/SetGeoAttr
#include "svx/svditext.hxx"
#include "svx/svditer.hxx"
#include <svx/svdtrans.hxx>
#include <svx/svdundo.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
-#include <svx/svdlayer.hxx> // fuer MergeNotPersistAttr
-#include <svx/svdattrx.hxx> // fuer MergeNotPersistAttr
-#include <svx/svdetc.hxx> // fuer SearchOutlinerItems
-#include <svx/svdopath.hxx> // fuer Crook
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdlayer.hxx> // for MergeNotPersistAttr
+#include <svx/svdattrx.hxx> // for MergeNotPersistAttr
+#include <svx/svdetc.hxx> // for SearchOutlinerItems
+#include <svx/svdopath.hxx> // for Crook
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include <editeng/eeitem.hxx>
#include <svl/aeitem.hxx>
@@ -61,17 +61,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
-//
+// EditView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -119,7 +109,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, sal_Bool bCopy)
aR1=rRect;
}
else
- { // aR1 von aR0 nach rRect transformieren
+ { // transform aR1 to aR0 after rRect
aR1.Move(-x0,-y0);
BigInt l(aR1.Left());
BigInt r(aR1.Right());
@@ -145,7 +135,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, sal_Bool bCopy)
}
pO->SetSnapRect(aR1);
} else {
- OSL_FAIL("SetMarkedObjRect(): pObj->GetSnapRect() liefert leeres Rect");
+ OSL_FAIL("SetMarkedObjRect(): pObj->GetSnapRect() returns empty Rect");
}
}
if( bUndo )
@@ -195,7 +185,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
XubString aStr(ImpGetResStr(STR_EditMove));
if (bCopy)
aStr+=ImpGetResStr(STR_EditWithCopy);
- // benoetigt eigene UndoGroup wegen Parameter
+ // meeds its own UndoGroup because of its parameters
BegUndo(aStr,GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVE);
}
@@ -300,7 +290,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
if( bUndo )
{
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ // extra undo actions for changed connector which now may hold its layed out path (SJ)
std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
AddUndoActions( vConnectorUndoActions );
@@ -360,7 +350,7 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
if( bUndo )
{
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ // extra undo actions for changed connector which now may hold its layed out path (SJ)
std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
AddUndoActions( vConnectorUndoActions );
@@ -479,7 +469,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
if(!bDone && !pPath && pO->IsPolyObj() && 0L != pO->GetPointCount())
{
- // FuerPolyObj's, aber NICHT fuer SdrPathObj's, z.B. fuer's Bemassungsobjekt
+ // 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 nPtNum;
@@ -499,8 +489,8 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++)
{
- // hier koennte man vieleicht auch mal das Broadcasting optimieren
- // ist aber z.Zt. bei den 2 Punkten des Bemassungsobjekts noch nicht so tragisch
+ // broadcasting could be optimized here, but for the
+ // current two points of the measurement object, it's fine
pO->SetPoint(aXP[(sal_uInt16)nPtNum],nPtNum);
}
@@ -509,7 +499,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
if(!bDone)
{
- // Fuer alle anderen oder wenn bNoContortion
+ // for all others or if bNoContortion
Point aCtr0(pO->GetSnapRect().Center());
Point aCtr1(aCtr0);
sal_Bool bRotOk(sal_False);
@@ -593,7 +583,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol
}
else if(pO->IsPolyObj())
{
- // z.B. fuer's Bemassungsobjekt
+ // e. g. for the mesurement object
sal_uInt32 nPtAnz(pO->GetPointCount());
XPolygon aXP((sal_uInt16)nPtAnz);
sal_uInt32 nPtNum;
@@ -608,8 +598,8 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol
for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++)
{
- // hier koennte man vieleicht auch mal das Broadcasting optimieren
- // ist aber z.Zt. bei den 2 Punkten des Bemassungsobjekts noch nicht so tragisch
+ // broadcasting could be optimized here, but for the
+ // current two points of the measurement object, it's fine
pO->SetPoint(aXP[(sal_uInt16)nPtNum],nPtNum);
}
}
@@ -660,7 +650,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto
void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*bReplaceAll*/)
{
- // bReplaceAll hat hier keinerlei Wirkung
+ // bReplaceAll has no effect here
Rectangle aAllSnapRect(GetMarkedObjRect());
const SfxPoolItem *pPoolItem=NULL;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,sal_True,&pPoolItem)==SFX_ITEM_SET) {
@@ -701,7 +691,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*
bAllHgt=sal_True; bDoIt=sal_True;
}
if (bDoIt) {
- Rectangle aRect(aAllSnapRect); // !!! fuer PolyPt's und GluePt's aber bitte noch aendern !!!
+ Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!!
if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0);
if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top());
if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt;
@@ -731,7 +721,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*
const bool bUndo = IsUndoEnabled();
- // Todo: WhichRange nach Notwendigkeit ueberpruefen.
+ // TODO: check if WhichRange is necessary.
sal_uIntPtr nMarkAnz=GetMarkedObjectCount();
for (sal_uIntPtr nm=0; nm<nMarkAnz; nm++)
{
@@ -747,15 +737,14 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*
void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, sal_Bool /*bOnlyHardAttr*/) const
{
- // bOnlyHardAttr hat hier keinerlei Wirkung
- // Hier muss ausserdem noch der Nullpunkt und
- // die PvPos berueksichtigt werden.
- Rectangle aAllSnapRect(GetMarkedObjRect()); // !!! fuer PolyPt's und GluePt's aber bitte noch aendern !!!
+ // bOnlyHardAttr has no effect here.
+ // TODO: Take into account the origin and PvPos.
+ Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!!
long nAllSnapPosX=aAllSnapRect.Left();
long nAllSnapPosY=aAllSnapRect.Top();
long nAllSnapWdt=aAllSnapRect.GetWidth()-1;
long nAllSnapHgt=aAllSnapRect.GetHeight()-1;
- // koennte mal zu CheckPossibilities mit rein
+ // TODO: could go into CheckPossibilities
sal_Bool bMovProtect=sal_False,bMovProtectDC=sal_False;
sal_Bool bSizProtect=sal_False,bSizProtectDC=sal_False;
sal_Bool bPrintable =sal_True ,bPrintableDC=sal_False;
@@ -831,7 +820,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, sal_Bool /*bO
if (bSnapWdtDC || nAllSnapWdt !=nSnapWdt ) rAttr.Put(SdrAllSizeWidthItem(nAllSnapWdt));
if (bSnapHgtDC || nAllSnapHgt !=nSnapHgt ) rAttr.Put(SdrAllSizeHeightItem(nAllSnapHgt));
- // Items fuer reine Transformationen
+ // items for pure transformations
rAttr.Put(SdrMoveXItem());
rAttr.Put(SdrMoveYItem());
rAttr.Put(SdrResizeXOneItem());
@@ -953,11 +942,11 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
}
}
- // Joe, 2.7.98: Damit Undo nach Format.Standard auch die Textattribute korrekt restauriert
+ // To make Undo reconstruct text attributes correctly after Format.Standard
sal_Bool bHasEEItems=SearchOutlinerItems(rAttr,bReplaceAll);
- // AW 030100: save additional geom info when para or char attributes
- // are changed and the geom form of the text object might be changed
+ // save additional geometry information when paragraph or character attributes
+ // are changed and the geometrical shape of the text object might be changed
sal_Bool bPossibleGeomChange(sal_False);
SfxWhichIter aIter(rAttr);
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -991,7 +980,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
// create ItemSet without SFX_ITEM_DONTCARE. Put()
- // uses it's second parameter (bInvalidAsDefault) to
+ // uses its second parameter (bInvalidAsDefault) to
// remove all such items to set them to default.
SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges());
aAttr.Put(rAttr, sal_True);
@@ -1037,7 +1026,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,sal_False,bHasEEItems || bPossibleGeomChange || bRescueText));
}
- // set up a scxene updater if object is a 3d object
+ // set up a scene updater if object is a 3d object
if(dynamic_cast< E3dObject* >(pObj))
{
aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
@@ -1057,7 +1046,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
// #110094#-14 pTextObj->SendRepaintBroadcast(pTextObj->GetBoundRect());
pTextObj->RemoveOutlinerCharacterAttribs( aCharWhichIds );
- // object has changed, should be called form
+ // object has changed, should be called from
// RemoveOutlinerCharacterAttribs. This will change when the text
// object implementation changes.
pTextObj->SetChanged();
@@ -1090,9 +1079,9 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
SetAnimationTimer(0L);
}
- // besser vorher checken, was gemacht werden soll:
- // pObj->SetAttr() oder SetNotPersistAttr()
- // !!! fehlende Implementation !!!
+ // better check before what to do:
+ // pObj->SetAttr() or SetNotPersistAttr()
+ // TODO: missing implementation!
SetNotPersistAttrToMarked(rAttr,bReplaceAll);
if( bUndo )
@@ -1109,7 +1098,7 @@ SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() const
SdrMark* pM=GetSdrMarkByIndex(nm);
SfxStyleSheet* pSS=pM->GetMarkedSdrObj()->GetStyleSheet();
if (b1st) pRet=pSS;
- else if (pRet!=pSS) return NULL; // verschiedene StyleSheets
+ else if (pRet!=pSS) return NULL; // different stylesheets
b1st=sal_False;
}
return pRet;
@@ -1150,7 +1139,6 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, sal_Bool bDo
////////////////////////////////////////////////////////////////////////////////////////////////////
-/* new interface src537 */
sal_Bool SdrEditView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr) const
{
if(GetMarkedObjectCount())
@@ -1198,13 +1186,13 @@ sal_Bool SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRe
SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
{
- SfxItemSet aRetSet(pMod->GetItemPool(), // SID_ATTR_TRANSFORM_... aus s:svxids.hrc
+ SfxItemSet aRetSet(pMod->GetItemPool(), // SID_ATTR_TRANSFORM_... from s:svxids.hrc
SID_ATTR_TRANSFORM_POS_X,SID_ATTR_TRANSFORM_ANGLE,
SID_ATTR_TRANSFORM_PROTECT_POS,SID_ATTR_TRANSFORM_AUTOHEIGHT,
SDRATTR_ECKENRADIUS,SDRATTR_ECKENRADIUS,
0);
if (AreObjectsMarked()) {
- SfxItemSet aMarkAttr(GetAttrFromMarked(sal_False)); // wg. AutoGrowHeight und Eckenradius
+ SfxItemSet aMarkAttr(GetAttrFromMarked(sal_False)); // because of AutoGrowHeight and corner radius
Rectangle aRect(GetMarkedObjRect());
if(GetSdrPageView())
@@ -1212,14 +1200,14 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
GetSdrPageView()->LogicToPagePos(aRect);
}
- // Position
+ // position
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_X,aRect.Left()));
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_Y,aRect.Top()));
- // Groesse
+ // size
long nResizeRefX=aRect.Left();
long nResizeRefY=aRect.Top();
- if (eDragMode==SDRDRAG_ROTATE) { // Drehachse auch als Referenz fuer Resize
+ if (eDragMode==SDRDRAG_ROTATE) { // use rotation axis as a reference for resizing, too
nResizeRefX=aRef1.X();
nResizeRefY=aRef1.Y();
}
@@ -1235,7 +1223,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
GetSdrPageView()->LogicToPagePos(aRotateAxe);
}
- // Drehung
+ // rotation
long nRotateRefX=aRect.Center().X();
long nRotateRefY=aRect.Center().Y();
if (eDragMode==SDRDRAG_ROTATE) {
@@ -1246,10 +1234,10 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_X,nRotateRefX));
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_Y,nRotateRefY));
- // Shear
+ // shearing
long nShearRefX=aRect.Left();
long nShearRefY=aRect.Bottom();
- if (eDragMode==SDRDRAG_ROTATE) { // Drehachse auch als Referenz fuer Shear
+ if (eDragMode==SDRDRAG_ROTATE) { // use rotation axis as a reference for shearing, too
nShearRefX=aRotateAxe.X();
nShearRefY=aRotateAxe.Y();
}
@@ -1257,7 +1245,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X,nShearRefX));
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y,nShearRefY));
- // Pruefen der einzelnen Objekte, ob Objekte geschuetzt sind
+ // check every object whether it is protected
const SdrMarkList& rMarkList=GetMarkedObjectList();
sal_uIntPtr nMarkCount=rMarkList.GetMarkCount();
SdrObject* pObj=rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -1271,7 +1259,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
if (bSizProt!=pObj->IsResizeProtect()) bSizProtDontCare=sal_True;
}
- // InvalidateItem setzt das Item auf DONT_CARE
+ // InvalidateItem sets item to DONT_CARE
if (bPosProtDontCare) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_PROTECT_POS);
} else {
@@ -1324,7 +1312,7 @@ Point ImpGetPoint(Rectangle aRect, RECT_POINT eRP)
case RP_MB: return aRect.BottomCenter();
case RP_RB: return aRect.BottomRight();
}
- return Point(); // Sollte nicht vorkommen !
+ return Point(); // Should not happen!
}
void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
@@ -1349,7 +1337,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
long nSizY=0;
long nRotateAngle=0;
- // #86909#
sal_Bool bModeIsRotate(eDragMode == SDRDRAG_ROTATE);
long nRotateX(0);
long nRotateY(0);
@@ -1383,7 +1370,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
const SfxPoolItem* pPoolItem=NULL;
- // Position
+ // position
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,sal_True,&pPoolItem)) {
nPosDX=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Left();
bChgPos=sal_True;
@@ -1392,7 +1379,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
nPosDY=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Top();
bChgPos=sal_True;
}
- // Groesse
+ // size
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,sal_True,&pPoolItem)) {
nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue();
bChgSiz=sal_True;
@@ -1405,21 +1392,21 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
eSizePoint=(RECT_POINT)((const SfxAllEnumItem&)rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue();
}
- // Rotation
+ // rotation
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,sal_True,&pPoolItem)) {
nRotateAngle=((const SfxInt32Item*)pPoolItem)->GetValue()-nOldRotateAngle;
bRotate = (nRotateAngle != 0);
}
- // #86909# pos rot point x
+ // position rotation point x
if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_X, sal_True ,&pPoolItem))
nRotateX = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_X)).GetValue();
- // #86909# pos rot point y
+ // position rotation point y
if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_Y, sal_True ,&pPoolItem))
nRotateY = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_Y)).GetValue();
- // Shear
+ // shearing
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,sal_True,&pPoolItem)) {
long nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue();
if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
@@ -1430,7 +1417,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
nShearAngle=nNewShearAngle;
} else {
if (nNewShearAngle!=0 && nOldShearAngle!=0) {
- // Bugfix #25714#.
+ // bug fix
double nOld=tan((double)nOldShearAngle*nPi180);
double nNew=tan((double)nNewShearAngle*nPi180);
nNew-=nOld;
@@ -1461,7 +1448,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
bSetAttr=sal_True;
}
- // Eckenradius
+ // corner radius
if (bEdgeRadiusAllowed && SFX_ITEM_SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,sal_True,&pPoolItem)) {
long nRadius=((SdrEckenradiusItem*)pPoolItem)->GetValue();
aSetAttr.Put(SdrEckenradiusItem(nRadius));
@@ -1476,7 +1463,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
SetAttrToMarked(aSetAttr,sal_False);
}
- // Groesse und Hoehe aendern
+ // change size and height
if (bChgSiz && (bResizeFreeAllowed || bResizePropAllowed)) {
Fraction aWdt(nSizX,aRect.Right()-aRect.Left());
Fraction aHgt(nSizY,aRect.Bottom()-aRect.Top());
@@ -1490,7 +1477,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
ResizeMarkedObj(aRef,aWdt,aHgt);
}
- // Rotieren
+ // rotate
if (bRotate && (bRotateFreeAllowed || bRotate90Allowed)) {
Point aRef(nRotateX,nRotateY);
@@ -1502,7 +1489,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
RotateMarkedObj(aRef,nRotateAngle);
}
- // #86909# set rotation point position
+ // set rotation point position
if(bModeIsRotate && (nRotateX != nOldRotateX || nRotateY != nOldRotateY))
{
Point aNewRef1(nRotateX, nRotateY);
@@ -1515,7 +1502,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
SetRef1(aNewRef1);
}
- // Shear
+ // shear
if (bShear && bShearAllowed) {
Point aRef(nShearX,nShearY);
@@ -1534,7 +1521,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
// or not. Taking out.
}
- // Position aendern
+ // change position
if (bChgPos && bMoveAllowed) {
MoveMarkedObj(Size(nPosDX,nPosDY));
}
@@ -1613,12 +1600,12 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
////////////////////////////////////////////////////////////////////////////////////////////////////
sal_Bool SdrEditView::IsAlignPossible() const
-{ // Mindestens 2 markierte Objekte, davon mind. 1 beweglich
+{ // at least two selected objects, at least one of them movable
ForcePossibilities();
sal_uIntPtr nAnz=GetMarkedObjectCount();
- if (nAnz==0) return sal_False; // Nix markiert!
- if (nAnz==1) return bMoveAllowed; // einzelnes Obj an der Seite ausrichten
- return bOneOrMoreMovable; // ansonsten ist MarkCount>=2
+ if (nAnz==0) return sal_False; // nothing selected!
+ if (nAnz==1) return bMoveAllowed; // align single object to page
+ return bOneOrMoreMovable; // otherwise: MarkCount>=2
}
void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, sal_Bool bBoundRects)
@@ -1685,7 +1672,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, sal_B
if (!bHasFixed)
{
if (nMarkAnz==1)
- { // einzelnes Obj an der Seite ausrichten
+ { // align single object to page
const SdrObject* pObj=GetMarkedObjectByIndex(0L);
const SdrPage* pPage=pObj->GetPage();
const SdrPageGridFrameList* pGFL=pPage->GetGridFrameList(GetSdrPageViewOfMarkedByIndex(0),&(pObj->GetSnapRect()));
@@ -1743,7 +1730,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, sal_B
}
if (nXMov!=0 || nYMov!=0)
{
- // #104104# SdrEdgeObj needs an extra SdrUndoGeoObj since the
+ // SdrEdgeObj needs an extra SdrUndoGeoObj since the
// connections may need to be saved
if( bUndo )
{
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 4b5ec23..98a89f0 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -30,15 +30,15 @@
#include <svx/svdedtv.hxx>
#include <editeng/outliner.hxx>
#include <svx/svdundo.hxx>
-#include <svx/svdogrp.hxx> // fuer's Gruppieren
-#include <svx/svdovirt.hxx> // fuer VirtualObject-Bundling (Writer)
-#include <svx/svdopath.hxx> // fuer CombineObjects
+#include <svx/svdogrp.hxx> // for grouping objects
+#include <svx/svdovirt.hxx> // for VirtualObject bundling (Writer)
+#include <svx/svdopath.hxx> // for CombineObjects
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
#include "svx/svditer.hxx"
-#include <svx/svdograf.hxx> // fuer Possibilities
-#include <svx/svdoole2.hxx> // und Mtf-Import
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdograf.hxx> // for Possibilities
+#include <svx/svdoole2.hxx> // and Mtf-Import
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include "svdfmtf.hxx"
#include <svx/svdetc.hxx>
@@ -86,7 +86,7 @@ void SdrEditView::MovMarkedToTop()
SortMarkedObjects();
sal_uIntPtr nm;
for (nm=0; nm<nAnz; nm++)
- { // Ordnums muessen alle stimmen!
+ { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
sal_Bool bChg=sal_False;
@@ -113,9 +113,9 @@ void SdrEditView::MovMarkedToTop()
if (nMaxPos!=0)
nMaxPos--;
if (nNewPos>nMaxPos)
- nNewPos=nMaxPos; // diesen nicht ueberholen.
+ nNewPos=nMaxPos; // neither go faster...
if (nNewPos<nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go in the other direction
}
sal_Bool bEnd=sal_False;
while (nCmpPos<nNewPos && !bEnd)
@@ -123,7 +123,7 @@ void SdrEditView::MovMarkedToTop()
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
if (pCmpObj==NULL)
{
- OSL_FAIL("MovMarkedToTop(): Vergleichsobjekt nicht gefunden");
+ OSL_FAIL("MovMarkedToTop(): Reference object not found.");
bEnd=sal_True;
}
else if (pCmpObj==pMaxObj)
@@ -174,7 +174,7 @@ void SdrEditView::MovMarkedToBtm()
SortMarkedObjects();
sal_uIntPtr nm;
for (nm=0; nm<nAnz; nm++)
- { // Ordnums muessen alle stimmen!
+ { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
@@ -199,20 +199,20 @@ void SdrEditView::MovMarkedToBtm()
{
sal_uIntPtr nMinPos=pMaxObj->GetOrdNum()+1;
if (nNewPos<nMinPos)
- nNewPos=nMinPos; // diesen nicht ueberholen.
+ nNewPos=nMinPos; // neither go faster...
if (nNewPos>nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go in the other direction
}
sal_Bool bEnd=sal_False;
- // nNewPos ist an dieser Stelle noch die maximale Position,
- // an der das Obj hinruecken darf, ohne seinen Vorgaenger
- // (Mehrfachselektion) zu ueberholen.
+ // nNewPos in this case is the "maximum" position
+ // the object may reach without going faster than the object before
+ // it (multiple selection).
while (nCmpPos>nNewPos && !bEnd)
{
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
if (pCmpObj==NULL)
{
- OSL_FAIL("MovMarkedToBtm(): Vergleichsobjekt nicht gefunden");
+ OSL_FAIL("MovMarkedToBtm(): Reference object not found.");
bEnd=sal_True;
}
else if (pCmpObj==pMaxObj)
@@ -268,8 +268,8 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
if (pRefObj!=NULL)
{
- // Damit "Vor das Objekt" auch funktioniert wenn die
- // markierten Objekte bereits vor dem Objekt stehen
+ // Make "in front of the object" work, even if the
+ // selected objects are already in front of the other object
sal_uIntPtr nRefMark=TryToFindMarkedObject(pRefObj);
SdrMark aRefMark;
if (nRefMark!=CONTAINER_ENTRY_NOTFOUND)
@@ -286,7 +286,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
sal_uIntPtr nm;
for (nm=0; nm<nAnz; nm++)
- { // Ordnums muessen alle stimmen!
+ { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
sal_Bool bChg=sal_False;
@@ -309,27 +309,27 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
if (pMaxObj!=NULL)
{
- sal_uIntPtr nMaxOrd=pMaxObj->GetOrdNum(); // geht leider nicht anders
+ sal_uIntPtr nMaxOrd=pMaxObj->GetOrdNum(); // sadly doesn't work any other way
if (nMaxOrd>0)
nMaxOrd--;
if (nNewPos>nMaxOrd)
- nNewPos=nMaxOrd; // nicht ueberholen.
+ nNewPos=nMaxOrd; // neither go faster...
if (nNewPos<nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go into the other direction
}
if (pRefObj!=NULL)
{
if (pRefObj->GetObjList()==pObj->GetObjList())
{
- sal_uIntPtr nMaxOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
+ sal_uIntPtr nMaxOrd=pRefObj->GetOrdNum(); // sadly doesn't work any other way
if (nNewPos>nMaxOrd)
- nNewPos=nMaxOrd; // nicht ueberholen.
+ nNewPos=nMaxOrd; // neither go faster...
if (nNewPos<nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go into the other direction
}
else
{
- nNewPos=nNowPos; // andere PageView, also nicht veraendern
+ nNewPos=nNowPos; // different PageView, so don't change
}
}
if (nNowPos!=nNewPos)
@@ -342,7 +342,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
nNewPos--;
} // if (pObj!=pRefObj)
- } // for-Schleife ueber alle Markierten Objekte
+ } // for loop over all selected objects
if( bUndo )
EndUndo();
@@ -370,8 +370,8 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
SortMarkedObjects();
if (pRefObj!=NULL)
{
- // Damit "Hinter das Objekt" auch funktioniert wenn die
- // markierten Objekte bereits hinter dem Objekt stehen
+ // Make "behind the object" work, even if the
+ // selected objects are already behind the other object
sal_uIntPtr nRefMark=TryToFindMarkedObject(pRefObj);
SdrMark aRefMark;
if (nRefMark!=CONTAINER_ENTRY_NOTFOUND)
@@ -387,7 +387,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
}
}
sal_uIntPtr nm;
- for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ for (nm=0; nm<nAnz; nm++) { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
sal_Bool bChg=sal_False;
@@ -405,17 +405,17 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
sal_uIntPtr nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMinObj=GetMaxToBtmObj(pObj);
if (pMinObj!=NULL) {
- sal_uIntPtr nMinOrd=pMinObj->GetOrdNum()+1; // geht leider nicht anders
- if (nNewPos<nMinOrd) nNewPos=nMinOrd; // nicht ueberholen.
- if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ sal_uIntPtr nMinOrd=pMinObj->GetOrdNum()+1; // sadly doesn't work any differently
+ if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
}
if (pRefObj!=NULL) {
if (pRefObj->GetObjList()==pObj->GetObjList()) {
- sal_uIntPtr nMinOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
- if (nNewPos<nMinOrd) nNewPos=nMinOrd; // nicht ueberholen.
- if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ sal_uIntPtr nMinOrd=pRefObj->GetOrdNum(); // sadly doesn't work any differently
+ if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
} else {
- nNewPos=nNowPos; // andere PageView, also nicht veraendern
+ nNewPos=nNowPos; // different PageView, so don't change
}
}
if (nNowPos!=nNewPos) {
@@ -427,7 +427,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
}
nNewPos++;
} // if (pObj!=pRefObj)
- } // for-Schleife ueber alle markierten Objekte
+ } // for loop over all selected objects
if(bUndo)
EndUndo();
@@ -452,13 +452,13 @@ void SdrEditView::ReverseOrderOfMarked()
sal_uIntPtr a=0;
do {
- // Markierung ueber mehrere PageViews berueksichtigen
+ // take into account selection across multiple PageViews
sal_uIntPtr b=a+1;
while (b<nMarkAnz && GetSdrPageViewOfMarkedByIndex(b) == GetSdrPageViewOfMarkedByIndex(a)) b++;
b--;
SdrObjList* pOL=GetSdrPageViewOfMarkedByIndex(a)->GetObjList();
sal_uIntPtr c=b;
- if (a<c) { // Sicherstellen, dass die OrdNums nicht Dirty sind
+ if (a<c) { // make sure OrdNums aren't dirty
GetMarkedObjectByIndex(a)->GetOrdNum();
}
while (a<c) {
@@ -472,9 +472,9 @@ void SdrEditView::ReverseOrderOfMarked()
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj2,nOrd2-1,nOrd1));
}
pOL->SetObjectOrdNum(nOrd1,nOrd2);
- // Obj 2 ist um eine Position nach vorn gerutscht, deshalb nun nOrd2-1
+ // Obj 2 has moved forward by one position, so now nOrd2-1
pOL->SetObjectOrdNum(nOrd2-1,nOrd1);
- // Verwendung von Replace statt SetOrdNum wg. Performance (Neuberechnung der Ordnums)
+ // use Replace instead of SetOrdNum for performance reasons (recalculation of Ordnums)
a++; c--;
bChg=sal_True;
}
@@ -495,7 +495,7 @@ void SdrEditView::ImpCheckToTopBtmPossible()
if (nAnz==0)
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list