summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStefan Knorr <heinzlesspam@googlemail.com>2012-01-24 12:54:39 +0530
committerMuthu Subramanian <sumuthu@suse.com>2012-01-24 12:55:48 +0530
commit29ac03994484cb65725ec697cb7615a31b117b58 (patch)
tree771f8bbe70b8d21aeb5b60061781aca235051cda /svx
parentcf545e07f32f99e9c50e7dd6a0e932ead84e072c (diff)
Comments Translations.
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdorect.cxx54
-rw-r--r--svx/source/svdraw/svdotext.cxx187
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx18
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx8
-rw-r--r--svx/source/svdraw/svdotxat.cxx57
-rw-r--r--svx/source/svdraw/svdotxdr.cxx32
-rw-r--r--svx/source/svdraw/svdotxed.cxx28
-rw-r--r--svx/source/svdraw/svdotxln.cxx8
-rw-r--r--svx/source/svdraw/svdotxtr.cxx22
-rw-r--r--svx/source/svdraw/svdouno.cxx16
-rw-r--r--svx/source/svdraw/svdovirt.cxx30
-rw-r--r--svx/source/svdraw/svdpage.cxx82
-rw-r--r--svx/source/svdraw/svdpagv.cxx44
-rw-r--r--svx/source/svdraw/svdpntv.cxx22
-rw-r--r--svx/source/svdraw/svdpoev.cxx14
-rw-r--r--svx/source/svdraw/svdsnpv.cxx20
-rw-r--r--svx/source/svdraw/svdstr.src8
-rw-r--r--svx/source/svdraw/svdtext.cxx17
-rw-r--r--svx/source/svdraw/svdtrans.cxx123
-rw-r--r--svx/source/svdraw/svdundo.cxx107
-rw-r--r--svx/source/svdraw/svdview.cxx196
-rw-r--r--svx/source/svdraw/svdviter.cxx14
-rw-r--r--svx/source/svdraw/svdxcgv.cxx68
23 files changed, 583 insertions, 592 deletions
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index b92d67f7fa10..34e8d4e7892c 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -39,13 +39,13 @@
#include <svx/svddrag.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
-#include <svx/svdocapt.hxx> // fuer Import von SdrFileVersion 2
-#include <svx/svdpagv.hxx> // fuer
-#include <svx/svdview.hxx> // das
-#include <svx/svdundo.hxx> // Macro-Beispiel
+#include <svx/svdocapt.hxx> // for Import of SdrFileVersion 2
+#include <svx/svdpagv.hxx> // for
+#include <svx/svdview.hxx> // the
+#include <svx/svdundo.hxx> // macro example
#include <svx/svdopath.hxx>
#include "svx/svdglob.hxx" // Stringcache
-#include "svx/svdstr.hrc" // Objektname
+#include "svx/svdstr.hrc" // the object's name
#include <svx/xflclit.hxx>
#include <svx/xlnclit.hxx>
#include <svx/xlnwtit.hxx>
@@ -93,7 +93,7 @@ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind)
{
DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
- "SdrRectObj::SdrRectObj(SdrObjKind) ist nur fuer Textrahmen gedacht");
+ "SdrRectObj::SdrRectObj(SdrObjKind) can only be applied to text frames.");
bClosedObj=sal_True;
}
@@ -103,7 +103,7 @@ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect)
{
DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
- "SdrRectObj::SdrRectObj(SdrObjKind,...) ist nur fuer Textrahmen gedacht");
+ "SdrRectObj::SdrRectObj(SdrObjKind,...) can only be applied to text frames.");
bClosedObj=sal_True;
}
@@ -153,7 +153,7 @@ XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const
aNeuPoly[nPointAnz]=aNeuPoly[0];
aXPoly=aNeuPoly;
- // Die Winkelangaben beziehen sich immer auf die linke obere Ecke von !aRect!
+ // these angles always relate to the top left corner of aRect
if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan);
if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
return aXPoly;
@@ -239,13 +239,11 @@ void SdrRectObj::TakeObjNameSingul(XubString& rName) const
{
sal_uInt16 nResId=STR_ObjNameSingulRECT;
if (aGeo.nShearWink!=0) {
- nResId+=4; // Parallelogramm oder Raute
- // Raute ist nicht, weil Shear die vertikalen Kanten verlaengert!
- // Wenn Zeit ist, werde ich das mal berechnen.
+ nResId+=4; // parallelogram or, maybe, rhombus
} else {
- if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // Quadrat
+ if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // square
}
- if (GetEckenradius()!=0) nResId+=8; // abgerundet
+ if (GetEckenradius()!=0) nResId+=8; // rounded down
rName=ImpGetResStr(nResId);
String aName( GetName() );
@@ -265,11 +263,11 @@ void SdrRectObj::TakeObjNamePlural(XubString& rName) const
else {
sal_uInt16 nResId=STR_ObjNamePluralRECT;
if (aGeo.nShearWink!=0) {
- nResId+=4; // Parallelogramm oder Raute
+ nResId+=4; // parallelogram or rhombus
} else {
- if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // Quadrat
+ if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // square
}
- if (GetEckenradius()!=0) nResId+=8; // abgerundet
+ if (GetEckenradius()!=0) nResId+=8; // rounded down
rName=ImpGetResStr(nResId);
}
}
@@ -336,7 +334,7 @@ SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nHdlNum) const
case 1:
{
long a = GetEckenradius();
- long b = Max(aRect.GetWidth(),aRect.GetHeight())/2; // Wird aufgerundet, da GetWidth() eins draufaddiert
+ long b = Max(aRect.GetWidth(),aRect.GetHeight())/2; // rounded up, because GetWidth() adds 1
if (a>b) a=b;
if (a<0) a=0;
aPnt=aRect.TopLeft();
@@ -344,14 +342,14 @@ SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nHdlNum) const
eKind = HDL_CIRC;
break;
}
- case 2: aPnt=aRect.TopLeft(); eKind = HDL_UPLFT; break; // Oben links
- case 3: aPnt=aRect.TopCenter(); eKind = HDL_UPPER; break; // Oben
- case 4: aPnt=aRect.TopRight(); eKind = HDL_UPRGT; break; // Oben rechts
- case 5: aPnt=aRect.LeftCenter(); eKind = HDL_LEFT ; break; // Links
- case 6: aPnt=aRect.RightCenter(); eKind = HDL_RIGHT; break; // Rechts
- case 7: aPnt=aRect.BottomLeft(); eKind = HDL_LWLFT; break; // Unten links
- case 8: aPnt=aRect.BottomCenter(); eKind = HDL_LOWER; break; // Unten
- case 9: aPnt=aRect.BottomRight(); eKind = HDL_LWRGT; break; // Unten rechts
+ case 2: aPnt=aRect.TopLeft(); eKind = HDL_UPLFT; break;
+ case 3: aPnt=aRect.TopCenter(); eKind = HDL_UPPER; break;
+ case 4: aPnt=aRect.TopRight(); eKind = HDL_UPRGT; break;
+ case 5: aPnt=aRect.LeftCenter(); eKind = HDL_LEFT ; break;
+ case 6: aPnt=aRect.RightCenter(); eKind = HDL_RIGHT; break;
+ case 7: aPnt=aRect.BottomLeft(); eKind = HDL_LWLFT; break;
+ case 8: aPnt=aRect.BottomCenter(); eKind = HDL_LOWER; break;
+ case 9: aPnt=aRect.BottomRight(); eKind = HDL_LWRGT; break;
}
if(!pH)
@@ -441,7 +439,7 @@ String SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
Point aPt(rDrag.GetNow());
- // -sin fuer Umkehrung
+ // -sin for reversal
if(aGeo.nDrehWink)
RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos);
@@ -580,7 +578,7 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const
SdrObject* SdrRectObj::DoConvertToPolyObj(sal_Bool bBezier) const
{
XPolygon aXP(ImpCalcXPoly(aRect,GetEckenradius()));
- { // Nur Uebergangsweise bis zum neuen TakeContour()
+ { // TODO: this is only for the moment, until we have the new TakeContour()
aXP.Remove(0,1);
aXP[aXP.GetPointCount()-1]=aXP[0];
}
@@ -602,7 +600,7 @@ SdrObject* SdrRectObj::DoConvertToPolyObj(sal_Bool bBezier) const
void SdrRectObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
SdrTextObj::Notify(rBC,rHint);
- SetXPolyDirty(); // wg. Eckenradius
+ SetXPolyDirty(); // because of the corner radius
}
void SdrRectObj::RestGeoData(const SdrObjGeoData& rGeo)
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index e43b160cc81b..d92b4f05e362 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -29,14 +29,14 @@
#include <svx/svdotext.hxx>
#include "svx/svditext.hxx"
-#include <svx/svdpagv.hxx> // fuer Abfrage im Paint, ob das
-#include <svx/svdview.hxx> // Objekt gerade editiert wird
-#include <svx/svdpage.hxx> // und fuer AnimationHandler (Laufschrift)
+#include <svx/svdpagv.hxx> // for the request in Paint to see whether
+#include <svx/svdview.hxx> // the object is currently being edited
+#include <svx/svdpage.hxx> // and for AnimationHandler (ticker text)
#include <svx/svdetc.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdmodel.hxx> // OutlinerDefaults
#include "svx/svdglob.hxx" // Stringcache
-#include "svx/svdstr.hrc" // Objektname
+#include "svx/svdstr.hrc" // the object's name
#include <editeng/writingmodeitem.hxx>
#include <svx/sdtfchim.hxx>
#include <svtools/colorcfg.hxx>
@@ -229,7 +229,7 @@ void SdrTextObj::FitFrameToTextSize()
Rectangle aTextRect;
Size aNewSize(rOutliner.CalcTextSize());
rOutliner.Clear();
- aNewSize.Width()++; // wegen evtl. Rundungsfehler
+ aNewSize.Width()++; // because of possible rounding errors
aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
Rectangle aNewRect(aRect);
@@ -301,7 +301,7 @@ const Size& SdrTextObj::GetTextSize() const
aSiz=rOutliner.CalcTextSize();
rOutliner.Clear();
}
- // 2x casting auf nonconst
+ // casting to nonconst twice
((SdrTextObj*)this)->aTextSize=aSiz;
((SdrTextObj*)this)->bTextSizeDirty=sal_False;
}
@@ -311,7 +311,7 @@ const Size& SdrTextObj::GetTextSize() const
bool SdrTextObj::IsAutoGrowHeight() const
{
if(!bTextFrame)
- return sal_False; // AutoGrow nur bei TextFrames
+ return sal_False; // AutoGrow only together with TextFrames
const SfxItemSet& rSet = GetObjectItemSet();
sal_Bool bRet = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
@@ -336,7 +336,7 @@ bool SdrTextObj::IsAutoGrowHeight() const
bool SdrTextObj::IsAutoGrowWidth() const
{
if(!bTextFrame)
- return sal_False; // AutoGrow nur bei TextFrames
+ return sal_False; // AutoGrow only together with TextFrames
const SfxItemSet& rSet = GetObjectItemSet();
sal_Bool bRet = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
@@ -390,7 +390,7 @@ SdrTextHorzAdjust SdrTextObj::GetTextHorizontalAdjust(const SfxItemSet& rSet) co
}
return eRet;
-} // defaults: BLOCK fuer Textrahmen, CENTER fuer beschriftete Grafikobjekte
+} // defaults: BLOCK (justify) for text frame, CENTER for captions of drawing objects
SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust() const
{
@@ -423,7 +423,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons
}
return eRet;
-} // defaults: TOP fuer Textrahmen, CENTER fuer beschriftete Grafikobjekte
+} // defaults: TOP for text frame, CENTER for captions of drawing objects
void SdrTextObj::ImpJustifyRect(Rectangle& rRect) const
{
@@ -453,7 +453,7 @@ void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
rInfo.bMirror45Allowed =bNoTextFrame;
rInfo.bMirror90Allowed =bNoTextFrame;
- // allow transparence
+ // allow transparency
rInfo.bTransparenceAllowed = sal_True;
// gradient depends on fillstyle
@@ -614,8 +614,8 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho
if( bLineWidth )
{
- // Strichstaerke beruecksichtigen
- // Beim Hittest muss das unterbleiben (Performance!)
+ // Take line width into account.
+ // When doing the hit test, avoid this. (Performance!)
pContourPolyPolygon = new basegfx::B2DPolyPolygon();
// test if shadow needs to be avoided for TakeContour()
@@ -665,7 +665,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
long nRightDist=GetTextRightDistance();
long nUpperDist=GetTextUpperDistance();
long nLowerDist=GetTextLowerDistance();
- Rectangle aAnkRect(aRect); // Rect innerhalb dem geankert wird
+ Rectangle aAnkRect(aRect); // the rectangle in which we anchor
bool bFrame=IsTextFrame();
if (!bFrame) {
TakeUnrotatedSnapRect(aAnkRect);
@@ -681,9 +681,9 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
ImpJustifyRect(aAnkRect);
if (bFrame) {
- // !!! hier noch etwas verfeinern !!!
- if (aAnkRect.GetWidth()<2) aAnkRect.Right()=aAnkRect.Left()+1; // Mindestgroesse 2
- if (aAnkRect.GetHeight()<2) aAnkRect.Bottom()=aAnkRect.Top()+1; // Mindestgroesse 2
+ // TODO: Optimize this.
+ if (aAnkRect.GetWidth()<2) aAnkRect.Right()=aAnkRect.Left()+1; // minimum size h and v: 2 px
+ if (aAnkRect.GetHeight()<2) aAnkRect.Bottom()=aAnkRect.Top()+1;
}
if (aGeo.nDrehWink!=0) {
Point aTmpPt(aAnkRect.TopLeft());
@@ -697,7 +697,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText,
Rectangle* pAnchorRect, bool bLineWidth ) const
{
- Rectangle aAnkRect; // Rect innerhalb dem geankert wird
+ Rectangle aAnkRect; // the rectangle in which we anchor
TakeTextAnchorRect(aAnkRect);
SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
@@ -730,7 +730,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE))
{
- // Grenzenlose Papiergroesse fuer Laufschrift
+ // unlimited paper size for ticker text
if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nWdt=1000000;
if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=1000000;
}
@@ -794,7 +794,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
pText->CheckPortionInfo(rOutliner);
Point aTextPos(aAnkRect.TopLeft());
- Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() hat etwas Toleranz drauf, oder?
+ Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() adds a little tolerance, right?
// For draw objects containing text correct hor/ver alignment if text is bigger
// than the object itself. Without that correction, the text would always be
@@ -844,7 +844,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
if (pAnchorRect)
*pAnchorRect=aAnkRect;
- // rTextRect ist bei ContourFrame in einigen Faellen nicht korrekt
+ // rTextRect might not be correct in some cases at ContourFrame
rTextRect=Rectangle(aTextPos,aTextSiz);
if (bContourFrame)
rTextRect=aAnkRect;
@@ -868,7 +868,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
if(pOut && pOut->GetOutDevType() == OUTDEV_PRINTER)
{
- // Checken ob CharStretching ueberhaupt moeglich
+ // check whether CharStretching is possible at all
GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
UniString aTestString(sal_Unicode('J'));
@@ -895,8 +895,8 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
bNoStretching = (aSize1 == aSize2);
#ifdef WNT
- // Windows vergroessert bei Size(100,500) den Font proportional
- // Und das finden wir nicht so schoen.
+ // Windows zooms the font proportionally when using Size(100,500),
+ // we don't like that.
if(aSize2.Height() >= aSize1.Height() * 2)
{
bNoStretching = sal_True;
@@ -914,14 +914,14 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
long nIsHgt=rTextSize.Height();
if (nIsHgt==0) nIsHgt=1;
- long nXTolPl=nWantWdt/100; // Toleranz +1%
- long nXTolMi=nWantWdt/25; // Toleranz -4%
- long nXKorr =nWantWdt/20; // Korrekturmasstab 5%
+ long nXTolPl=nWantWdt/100; // tolerance: +1%
+ long nXTolMi=nWantWdt/25; // tolerance: -4%
+ long nXKorr =nWantWdt/20; // correction scale: 5%
- long nX=(nWantWdt*100) /nIsWdt; // X-Stretching berechnen
- long nY=(nWantHgt*100) /nIsHgt; // Y-Stretching berechnen
+ long nX=(nWantWdt*100) /nIsWdt; // calculate X stretching
+ long nY=(nWantHgt*100) /nIsHgt; // calculate Y stretching
bool bChkX = true;
- if (bNoStretching) { // evtl. nur proportional moeglich
+ if (bNoStretching) { // might only be be possible proportionally
if (nX>nY) { nX=nY; bChkX=sal_False; }
else { nY=nX; }
}
@@ -957,12 +957,12 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0) {
bNoMoreLoop = true;
} else {
- // Stretchingfaktoren korregieren
+ // correct stretching factors
long nMul=nWantWdt;
long nDiv=aSiz.Width();
if (Abs(nXDiff)<=2*nXKorr) {
- if (nMul>nDiv) nDiv+=(nMul-nDiv)/2; // und zwar nur um die haelfte des berechneten
- else nMul+=(nDiv-nMul)/2; // weil die EE ja eh wieder falsch rechnet
+ if (nMul>nDiv) nDiv+=(nMul-nDiv)/2; // but only add half of what we calculated,
+ else nMul+=(nDiv-nMul)/2; // because the EE calculates wrongly later on
}
nX=nX*nMul/nDiv;
if (bNoStretching) nY=nX;
@@ -1002,7 +1002,7 @@ void SdrTextObj::TakeObjNameSingul(XubString& rName) const
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if(pOutlinerParaObject && eTextKind != OBJ_OUTLINETEXT)
{
- // Macht bei OUTLINETEXT wohl derzeit noch etwas Probleme
+ // shouldn't currently cause any problems at OUTLINETEXT
XubString aStr2(pOutlinerParaObject->GetTextObject().GetText(0));
aStr2.EraseLeadingChars();
@@ -1116,7 +1116,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const
{
basegfx::B2DPolyPolygon aRetval(SdrAttrObj::TakeContour());
- // und nun noch ggf. das BoundRect des Textes dazu
+ // and now add the BoundRect of the text, if necessary
if ( pModel && GetOutlinerParaObject() && !IsFontwork() && !IsContourTextFrame() )
{
// using Clone()-Paint() strategy inside TakeContour() leaves a destroyed
@@ -1237,7 +1237,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame,
{
if (!bContourFrame)
{
- // FitToSize erstmal nicht mit ContourFrame
+ // FitToSize can't be used together with ContourFrame for now
if (IsFitToSize() || IsAutoFit())
{
sal_uIntPtr nStat=rOutliner.GetControlWord();
@@ -1251,7 +1251,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame,
if (!bContourFrame)
{
- // FitToSize erstmal nicht mit ContourFrame
+ // FitToSize can't be used together with ContourFrame for now
if (IsFitToSize())
{
ImpSetCharStretching(rOutliner,rTextRect.GetSize(),rAnchorRect.GetSize(),rFitXKorreg);
@@ -1297,7 +1297,7 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize,
if (fFactor >= 1.0 )
{
// resulting text area fits into available shape rect -
- // err on the larger streching, to optimally fill area
+ // err on the larger stretching, to optimally fill area
nMinStretchX = std::max(nMinStretchX,nCurrStretchX);
nMinStretchY = std::max(nMinStretchY,nCurrStretchY);
}
@@ -1386,12 +1386,12 @@ void SdrTextObj::NbcSetOutlinerParaObjectForText( OutlinerParaObject* pTextObjec
SetTextSizeDirty();
if (IsTextFrame() && (IsAutoGrowHeight() || IsAutoGrowWidth()))
- { // Textrahmen anpassen!
+ { // adapt text frame!
NbcAdjustTextFrameWidthAndHeight();
}
if (!IsTextFrame())
{
- // Das SnapRect behaelt seine Groesse bei
+ // the SnapRect keeps its size
SetRectsDirty(sal_True);
}
@@ -1415,7 +1415,7 @@ void SdrTextObj::NbcReformatText()
}
else
{
- // Das SnapRect behaelt seine Groesse bei
+ // the SnapRect keeps its size
SetBoundRectDirty();
SetRectsDirty(sal_True);
}
@@ -1459,7 +1459,7 @@ void SdrTextObj::SaveGeoData(SdrObjGeoData& rGeo) const
}
void SdrTextObj::RestGeoData(const SdrObjGeoData& rGeo)
-{ // RectsDirty wird von SdrObject gerufen
+{ // RectsDirty is called by SdrObject
SdrAttrObj::RestGeoData(rGeo);
SdrTextObjGeoData& rTGeo=(SdrTextObjGeoData&)rGeo;
aRect =rTGeo.aRect;
@@ -1576,7 +1576,7 @@ void SdrTextObj::SetVerticalWriting(sal_Bool bVertical)
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// transformation interface for StarOfficeAPI. This implements support for
-// homogen 3x3 matrices containing the transformation of the SdrObject. At the
+// homogeneous 3x3 matrices containing the transformation of the SdrObject. At the
// moment it contains a shearX, rotation and translation, but for setting all linear
// transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
//
@@ -1640,7 +1640,7 @@ sal_Bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::
return sal_False;
}
-// sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+// sets the base geometry of the object using infos contained in the homogeneous 3x3 matrix.
// If it's an SdrPathObj it will use the provided geometry information. The Polygon has
// to use (0,0) as upper left and will be scaled to the given size in the matrix.
void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& /*rPolyPolygon*/)
@@ -1771,19 +1771,19 @@ long SdrTextObj::GetMaxTextFrameWidth() const
bool SdrTextObj::IsFontwork() const
{
- return (bTextFrame) ? false // Default ist FALSE
+ return (bTextFrame) ? false // Default is FALSE
: ((XFormTextStyleItem&)(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE))).GetValue()!=XFT_NONE;
}
bool SdrTextObj::IsHideContour() const
{
- return (bTextFrame) ? false // Default ist: Nein, kein HideContour; HideContour nicht bei TextFrames
+ return (bTextFrame) ? false // Default is: no, don't HideContour; HideContour not together with TextFrames
: ((XFormTextHideFormItem&)(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM))).GetValue();
}
bool SdrTextObj::IsContourTextFrame() const
{
- return (bTextFrame) ? false // ContourFrame nicht bei normalen TextFrames
+ return (bTextFrame) ? false // ContourFrame not together with normal TextFrames
: ((SdrTextContourFrameItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME))).GetValue();
}
@@ -1967,66 +1967,67 @@ void SdrTextObj::SetObjectItemNoBroadcast(const SfxPoolItem& rItem)
/////////////////////////////////////////////////////////////////////////////////////////////////
//
-// Konzept des TextObjekts:
+// The concept of the text object:
// ~~~~~~~~~~~~~~~~~~~~~~~~
-// Attribute/Varianten:
-// - sal_Bool Textrahmen / beschriftetes Zeichenobjekt
-// - sal_Bool FontWork (wenn nicht Textrahmen und nicht ContourTextFrame)
-// - sal_Bool ContourTextFrame (wenn nicht Textrahmen und nicht Fontwork)
-// - long Drehwinkel (wenn nicht FontWork)
-// - long Textrahmenabstaende (wenn nicht FontWork)
-// - sal_Bool FitToSize (wenn nicht FontWork)
-// - sal_Bool AutoGrowingWidth/Height (wenn nicht FitToSize und nicht FontWork)
-// - long Min/MaxFrameWidth/Height (wenn AutoGrowingWidth/Height)
-// - enum Horizontale Textverankerung Links,Mitte,Rechts,Block,Stretch(ni)
-// - enum Vertikale Textverankerung Oben,Mitte,Unten,Block,Stretch(ni)
-// - enum Laufschrift (wenn nicht FontWork)
+// Attributes/Variations:
+// - sal_Bool text frame / graphics object with caption
+// - sal_Bool FontWork (if it is not a text frame and not a ContourTextFrame)
+// - sal_Bool ContourTextFrame (if it is not a text frame and not Fontwork)
+// - long rotation angle (if it is not FontWork)
+// - long text frame margins (if it is not FontWork)
+// - sal_Bool FitToSize (if it is not FontWork)
+// - sal_Bool AutoGrowingWidth/Height (if it is not FitToSize and not FontWork)
+// - long Min/MaxFrameWidth/Height (if AutoGrowingWidth/Height)
+// - enum horizontal text anchoring left,center,right,justify/block,Stretch(ni)
+// - enum vertical text anchoring top, middle, bottom, block, stretch(ni)
+// - enum ticker text (if it is not FontWork)
//
-// Jedes abgeleitete Objekt ist entweder ein Textrahmen (bTextFrame=sal_True)
-// oder ein beschriftetes Zeichenobjekt (bTextFrame=sal_False).
+// Every derived object is either a text frame (bTextFrame=sal_True)
+// or a drawing object with a caption (bTextFrame=sal_False).
//
-// Defaultverankerung von Textrahmen:
+// Default anchoring for text frames:
// SDRTEXTHORZADJUST_BLOCK, SDRTEXTVERTADJUST_TOP
-// = statische Pooldefaults
-// Defaultverankerung von beschrifteten Zeichenobjekten:
+// = static Pool defaults
+// Default anchoring for drawing objects with a caption:
// SDRTEXTHORZADJUST_CENTER, SDRTEXTVERTADJUST_CENTER
-// durch harte Attributierung von SdrAttrObj
+// via "hard" attribution of SdrAttrObj
//
-// Jedes vom SdrTextObj abgeleitete Objekt muss ein "UnrotatedSnapRect"
-// (->TakeUnrotatedSnapRect()) liefern (Drehreferenz ist TopLeft dieses
-// Rechtecks (aGeo.nDrehWink)), welches die Grundlage der Textverankerung
-// bildet. Von diesem werden dann ringsum die Textrahmenabstaende abgezogen;
-// das Ergebnis ist der Ankerbereich (->TakeTextAnchorRect()). Innerhalb
-// dieses Bereichs wird dann in Abhaengigkeit von der horizontalen und
-// vertikalen Ausrichtung (SdrTextVertAdjust,SdrTextHorzAdjust) der Ankerpunkt
-// sowie der Ausgabebereich bestimmt. Bei beschrifteten Grafikobjekten kann
-// der Ausgabebereich durchaus groesser als der Ankerbereich werden, bei
-// Textrahmen ist er stets kleiner oder gleich (ausser bei negativen Textrahmen-
-// abstaenden).
+// Every object derived from SdrTextObj must return an "UnrotatedSnapRect"
+// (->TakeUnrotatedSnapRect()) (the reference point for the rotation is the top
+// left of the rectangle (aGeo.nDrehWink)) which is the basis for anchoring
+// text. We then subtract the text frame margins from this rectangle, as a re-
+// sult we get the anchoring area (->TakeTextAnchorRect()). Within this area, we
+// calculate the anchoring point and the painting area, depending on the hori-
+// zontal and vertical adjustment of the text (SdrTextVertAdjust,
+// SdrTextHorzAdjust).
+// In the case of drawing objects with a caption the painting area might well
+// be larger than the anchoring area, for text frames on the other hand, it is
+// always of the same or a smaller size (except when there are negative text
+// frame margins).
//
-// FitToSize hat Prioritaet vor Textverankerung und AutoGrowHeight/Width. Der
-// Ausgabebereich ist bei FitToSize immer genau der Ankerbereich. Weiterhin
-// gibt es bei FitToSize keinen automatischen Zeilenumbruch.
+// FitToSize takes priority over text anchoring and AutoGrowHeight/Width. When
+// FitToSize is turned on, the painting area is always equal to the anchoring
+// area. Additionally, FitToSize doesn't allow automatic line breaks.
//
// ContourTextFrame:
-// - long Drehwinkel
-// - long Textrahmenabstaende spaeter vielleicht
-// - sal_Bool FitToSize spaeter vielleicht
-// - sal_Bool AutoGrowingWidth/Height viel spaeter vielleicht
-// - long Min/MaxFrameWidth/Height viel spaeter vielleicht
-// - enum Horizontale Textverankerung spaeter vielleicht, erstmal Links, Absatz zentr.
-// - enum Vertikale Textverankerung spaeter vielleicht, erstmal oben
-// - enum Laufschrift spaeter vielleicht (evtl. sogar mit korrektem Clipping)
+// - long rotation angle
+// - long text frame margins (maybe later)
+// - sal_Bool FitToSize (maybe later)
+// - sal_Bool AutoGrowingWidth/Height (maybe much later)
+// - long Min/MaxFrameWidth/Height (maybe much later)
+// - enum horizontal text anchoring (maybe later, for now: left, centered)
+// - enum vertical text anchoring (maybe later, for now: top)
+// - enum ticker text (maybe later, maybe even with correct clipping)
//
-// Bei Aenderungen zu beachten:
+// When making changes, check these:
// - Paint
// - HitTest
// - ConvertToPoly
// - Edit
-// - Drucken,Speichern, Paint in Nachbarview waerend Edit
-// - ModelChanged (z.B. durch NachbarView oder Lineale) waerend Edit
-// - FillColorChanged waerend Edit
-// - uvm...
+// - Printing, Saving, Painting in neighboring View while editing
+// - ModelChanged (e. g. through a neighboring View or rulers) while editing
+// - FillColorChanged while editin
+// - and many more...
//
/////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 3a4f9d8cce39..c5046b8d4ab4 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -197,7 +197,7 @@ namespace
// add font scale to new transform
aNewTransform.scale(aFontScaling.getX(), aFontScaling.getY());
- // look for proportional font scaling, evtl scale accordingly
+ // look for proportional font scaling, if necessary, scale accordingly
if(100 != rInfo.mrFont.GetPropr())
{
const double fFactor(rInfo.mrFont.GetPropr() / 100.0);
@@ -210,7 +210,7 @@ namespace
aNewTransform.rotate(-rInfo.mrFont.GetOrientation() * F_PI1800);
}
- // look for escapement, evtl translate accordingly
+ // look for escapement, if necessary, translate accordingly
if(rInfo.mrFont.GetEscapement())
{
sal_Int16 nEsc(rInfo.mrFont.GetEscapement());
@@ -267,7 +267,7 @@ namespace
// prepare wordLineMode (for underline and strikeout)
// NOT for bullet texts. It is set (this may be an error by itself), but needs to be suppressed to hinder e.g. '1)'
- // to be splitted which would not look like the original
+ // to be split which would not look like the original
const bool bWordLineMode(rInfo.mrFont.IsWordLineMode() && !rInfo.mbEndOfBullet);
// prepare new primitive
@@ -296,7 +296,7 @@ namespace
const drawinglayer::primitive2d::TextLine eFontUnderline(
drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetUnderline()));
- // check UndelineAbove
+ // check UnderlineAbove
const bool bUnderlineAbove(
drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont));
@@ -458,7 +458,7 @@ namespace
if(rInfo.mpFieldData)
{
// Support for FIELD_SEQ_BEGIN, FIELD_SEQ_END. If used, create a TextHierarchyFieldPrimitive2D
- // which holds the field type and evtl. the URL
+ // which holds the field type and, if applicable, the URL
const SvxURLField* pURLField = dynamic_cast< const SvxURLField* >(rInfo.mpFieldData);
const SvxPageField* pPageField = dynamic_cast< const SvxPageField* >(rInfo.mpFieldData);
@@ -688,7 +688,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
double fRotate, fShearX;
rSdrContourTextPrimitive.getObjectTransform().decompose(aScale, aTranslate, fRotate, fShearX);
- // prepare contour polygon, force to non-mirrored for layouting
+ // prepare contour polygon, force to non-mirrored for laying out
basegfx::B2DPolyPolygon aPolyPolygon(rSdrContourTextPrimitive.getUnitPolyPolygon());
aPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(fabs(aScale.getX()), fabs(aScale.getY())));
@@ -929,7 +929,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
- // set minimal paper size hor/ver if needed
+ // set minimal paper size horizontally/vertically if needed
if(bHorizontalIsBlock)
{
rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
@@ -1103,7 +1103,7 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
// set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
- // now get back the layouted text size from outliner
+ // now get back the laid out text size from outliner
const Size aOutlinerTextSiz(rOutliner.CalcTextSize());
const basegfx::B2DVector aOutlinerScale(
basegfx::fTools::equalZero(aOutlinerTextSiz.Width()) ? 1.0 : aOutlinerTextSiz.Width(),
@@ -1351,7 +1351,7 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL
if(basegfx::fTools::equalZero(fSingleStepWidth))
{
- // default to 1 milimeter
+ // default to 1 millimeter
fSingleStepWidth = 100.0;
}
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 558ee612981d..648812461644 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -567,7 +567,7 @@ namespace
}
}
- // consume from portion // no += here, xub_StrLen is sal_uInt16 and the compiler will gererate a warning here
+ // consume from portion // no += here, xub_StrLen is sal_uInt16 and the compiler will generate a warning here
nUsedTextLength = nUsedTextLength + nNextGlyphLen;
// consume from polygon
@@ -771,7 +771,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
aRetvalA[a] = drawinglayer::primitive2d::Primitive2DReference(aShadowDecomposition[a]);
}
- // evtl. add shadow outlines
+ // if necessary, add shadow outlines
if(rFormTextAttribute.getFormTextOutline()
&& !rFormTextAttribute.getShadowOutline().isDefault())
{
@@ -794,7 +794,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
aRetvalB[a] = drawinglayer::primitive2d::Primitive2DReference(aRegularDecomposition[a]);
}
- // evtl. add outlines
+ // if necessary, add outlines
if(rFormTextAttribute.getFormTextOutline()
&& !rFormTextAttribute.getOutline().isDefault())
{
@@ -809,7 +809,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
}
}
- // cleanup outliner
+ // clean up outliner
rOutliner.SetDrawPortionHdl(Link());
rOutliner.Clear();
rOutliner.setVisualizedPage(0);
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 27f04a322777..9022e3b6a47a 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -30,10 +30,10 @@
#include <svl/style.hxx>
#include <svx/svdotext.hxx>
#include "svx/svditext.hxx"
-#include <svx/svdmodel.hxx> // fuer GetMaxObjSize und GetStyleSheetPool
+#include <svx/svdmodel.hxx> // for GetMaxObjSize and GetStyleSheetPool
#include <svx/svdoutl.hxx>
-#include <svx/svdorect.hxx> // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight
-#include <svx/svdocapt.hxx> // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight
+#include <svx/svdorect.hxx> // for SetDirty at NbcAdjustTextFrameWidthAndHeight
+#include <svx/svdocapt.hxx> // for SetDirty at NbcAdjustTextFrameWidthAndHeight
#include <svx/svdetc.hxx>
#include <editeng/writingmodeitem.hxx>
#include <editeng/editeng.hxx>
@@ -103,14 +103,14 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bW
long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
aSiz.Width()-=nHDist;
aSiz.Height()-=nVDist;
- if (aSiz.Width()<2) aSiz.Width()=2; // Mindestgroesse 2
- if (aSiz.Height()<2) aSiz.Height()=2; // Mindestgroesse 2
+ if (aSiz.Width()<2) aSiz.Width()=2;
+ if (aSiz.Height()<2) aSiz.Height()=2;
sal_Bool bInEditMode = IsInEditMode();
if(!bInEditMode)
{
- if (bHScroll) aSiz.Width()=0x0FFFFFFF; // Laufschrift nicht umbrechen
+ if (bHScroll) aSiz.Width()=0x0FFFFFFF; // don't break ticker text
if (bVScroll) aSiz.Height()=0x0FFFFFFF;
}
@@ -119,17 +119,16 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bW
pEdtOutl->SetMaxAutoPaperSize(aSiz);
if (bWdtGrow) {
Size aSiz2(pEdtOutl->CalcTextSize());
- nWdt=aSiz2.Width()+1; // lieber etwas Tolleranz
- if (bHgtGrow) nHgt=aSiz2.Height()+1; // lieber etwas Tolleranz
+ nWdt=aSiz2.Width()+1; // a little tolerance
+ if (bHgtGrow) nHgt=aSiz2.Height()+1; // a little tolerance
} else {
- nHgt=pEdtOutl->GetTextHeight()+1; // lieber etwas Tolleranz
+ nHgt=pEdtOutl->GetTextHeight()+1; // a little tolerance
}
} else {
Outliner& rOutliner=ImpGetDrawOutliner();
rOutliner.SetPaperSize(aSiz);
rOutliner.SetUpdateMode(sal_True);
- // !!! hier sollte ich wohl auch noch mal die Optimierung mit
- // bPortionInfoChecked usw einbauen
+ // TODO: add the optimization with bPortionInfoChecked etc. here
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if ( pOutlinerParaObject != NULL )
{
@@ -139,21 +138,21 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bW
if (bWdtGrow)
{
Size aSiz2(rOutliner.CalcTextSize());
- nWdt=aSiz2.Width()+1; // lieber etwas Tolleranz
- if (bHgtGrow) nHgt=aSiz2.Height()+1; // lieber etwas Tolleranz
+ nWdt=aSiz2.Width()+1; // a little tolerance
+ if (bHgtGrow) nHgt=aSiz2.Height()+1; // a little tolerance
} else {
- nHgt=rOutliner.GetTextHeight()+1; // lieber etwas Tolleranz
+ nHgt=rOutliner.GetTextHeight()+1; // a little tolerance
}
rOutliner.Clear();
}
if (nWdt<nMinWdt) nWdt=nMinWdt;
if (nWdt>nMaxWdt) nWdt=nMaxWdt;
nWdt+=nHDist;
- if (nWdt<1) nWdt=1; // nHDist kann auch negativ sein
+ if (nWdt<1) nWdt=1; // nHDist may be negative
if (nHgt<nMinHgt) nHgt=nMinHgt;
if (nHgt>nMaxHgt) nHgt=nMaxHgt;
nHgt+=nVDist;
- if (nHgt<1) nHgt=1; // nVDist kann auch negativ sein
+ if (nHgt<1) nHgt=1; // nVDist may be negative
long nWdtGrow=nWdt-(rR.Right()-rR.Left());
long nHgtGrow=nHgt-(rR.Bottom()-rR.Top());
if (nWdtGrow==0) bWdtGrow=sal_False;
@@ -199,10 +198,10 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
bool bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt);
if (bRet) {
SetRectsDirty();
- if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack
+ if (HAS_BASE(SdrRectObj,this)) { // this is a hack
((SdrRectObj*)this)->SetXPolyDirty();
}
- if (HAS_BASE(SdrCaptionObj,this)) { // mal wieder 'nen Hack
+ if (HAS_BASE(SdrCaptionObj,this)) { // this is a hack
((SdrCaptionObj*)this)->ImpRecalcTail();
}
}
@@ -217,10 +216,10 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
aRect=aNeuRect;
SetRectsDirty();
- if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack
+ if (HAS_BASE(SdrRectObj,this)) { // this is a hack
((SdrRectObj*)this)->SetXPolyDirty();
}
- if (HAS_BASE(SdrCaptionObj,this)) { // mal wieder 'nen Hack
+ if (HAS_BASE(SdrCaptionObj,this)) { // this is a hack
((SdrCaptionObj*)this)->ImpRecalcTail();
}
SetChanged();
@@ -239,9 +238,9 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if (pOutlinerParaObject!=NULL)
{
- // Zunaechst werden alle im ParaObject enthaltenen StyleSheets
- // im Container aStyles gesammelt. Dazu wird die Family jeweils
- // ans Ende des StyleSheet-Namen drangehaengt.
+ // First, we collect all stylesheets contained in the ParaObject in
+ // the container aStyles. The Family is always appended to the name
+ // of the stylesheet.
const EditTextObject& rTextObj=pOutlinerParaObject->GetTextObject();
XubString aStyleName;
SfxStyleFamily eStyleFam;
@@ -264,7 +263,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
while(!bFnd && nNum > 0)
{
- // kein StyleSheet doppelt!
+ // we don't want duplicate stylesheets
nNum--;
bFnd = (aStyleName.Equals(*(XubString*)aStyles.GetObject(nNum)));
}
@@ -277,7 +276,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
}
}
- // nun die Strings im Container durch StyleSheet* ersetzten
+ // now replace the strings in the container by StyleSheet*
sal_uIntPtr nNum=aStyles.Count();
while (nNum>0) {
nNum--;
@@ -300,24 +299,24 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
aStyles.Remove(nNum);
}
}
- // jetzt alle ueberfluessigen StyleSheets entfernen
+ // now remove all superfluous stylesheets
nNum=GetBroadcasterCount();
while (nNum>0) {
nNum--;
SfxBroadcaster* pBroadcast=GetBroadcasterJOE((sal_uInt16)nNum);
SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pBroadcast);
- if (pStyle!=NULL && pStyle!=GetStyleSheet()) { // Sonderbehandlung fuer den StyleSheet des Objekts
+ if (pStyle!=NULL && pStyle!=GetStyleSheet()) { // special case for stylesheet of the object
if (aStyles.GetPos(pStyle)==CONTAINER_ENTRY_NOTFOUND) {
EndListening(*pStyle);
}
}
}
- // und schliesslich alle in aStyles enthaltenen StyleSheets mit den vorhandenen Broadcastern mergen
+ // and finally, merge all stylesheets that are contained in aStyles with previous broadcasters
nNum=aStyles.Count();
while (nNum>0) {
nNum--;
SfxStyleSheet* pStyle=(SfxStyleSheet*)aStyles.GetObject(nNum);
- // StartListening soll selbst nachsehen, ob hier nicht evtl. schon gehorcht wird
+ // let StartListening see for itself if there's already a listener registered
StartListening(*pStyle,sal_True);
}
}
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 307c9169f8b3..d6bbb3ebebe2 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -31,9 +31,9 @@
#include <svx/svdhdl.hxx>
#include <svx/svddrag.hxx>
#include <svx/svdview.hxx>
-#include <svx/svdorect.hxx> // fuer SetXPolyDirty in MovCreate bei SolidDragging
+#include <svx/svdorect.hxx> // for SetXPolyDirty in MovCreate at SolidDragging
#include "svx/svdglob.hxx" // Stringcache
-#include "svx/svdstr.hrc" // Objektname
+#include "svx/svdstr.hrc" // the object's name
#include <svx/svdoashp.hxx>
#include <tools/bigint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -52,14 +52,14 @@ SdrHdl* SdrTextObj::GetHdl(sal_uInt32 nHdlNum) const
Point aPnt;
SdrHdlKind eKind=HDL_MOVE;
switch (nHdlNum) {
- case 0: aPnt=aRect.TopLeft(); eKind=HDL_UPLFT; break; // Oben links
- case 1: aPnt=aRect.TopCenter(); eKind=HDL_UPPER; break; // Oben
- case 2: aPnt=aRect.TopRight(); eKind=HDL_UPRGT; break; // Oben rechts
- case 3: aPnt=aRect.LeftCenter(); eKind=HDL_LEFT ; break; // Links
- case 4: aPnt=aRect.RightCenter(); eKind=HDL_RIGHT; break; // Rechts
- case 5: aPnt=aRect.BottomLeft(); eKind=HDL_LWLFT; break; // Unten links
- case 6: aPnt=aRect.BottomCenter(); eKind=HDL_LOWER; break; // Unten
- case 7: aPnt=aRect.BottomRight(); eKind=HDL_LWRGT; break; // Unten rechts
+ case 0: aPnt=aRect.TopLeft(); eKind=HDL_UPLFT; break;
+ case 1: aPnt=aRect.TopCenter(); eKind=HDL_UPPER; break;
+ case 2: aPnt=aRect.TopRight(); eKind=HDL_UPRGT; break;
+ case 3: aPnt=aRect.LeftCenter(); eKind=HDL_LEFT ; break;
+ case 4: aPnt=aRect.RightCenter(); eKind=HDL_RIGHT; break;
+ case 5: aPnt=aRect.BottomLeft(); eKind=HDL_LWLFT; break;
+ case 6: aPnt=aRect.BottomCenter(); eKind=HDL_LOWER; break;
+ case 7: aPnt=aRect.BottomRight(); eKind=HDL_LWRGT; break;
}
if (aGeo.nShearWink!=0) ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
if (aGeo.nDrehWink!=0) RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
@@ -113,13 +113,13 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
nYMul=Abs(nYMul);
nXDiv=Abs(nXDiv);
nYDiv=Abs(nYDiv);
- Fraction aXFact(nXMul,nXDiv); // Fractions zum kuerzen
- Fraction aYFact(nYMul,nYDiv); // und zum vergleichen
+ Fraction aXFact(nXMul,nXDiv); // fractions for canceling
+ Fraction aYFact(nYMul,nYDiv); // and for comparing
nXMul=aXFact.GetNumerator();
nYMul=aYFact.GetNumerator();
nXDiv=aXFact.GetDenominator();
nYDiv=aYFact.GetDenominator();
- if (bEcke) { // Eckpunkthandles
+ if (bEcke) { // corner point handles
bool bUseX=(aXFact<aYFact) != bBigOrtho;
if (bUseX) {
long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
@@ -132,7 +132,7 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bLft) aTmpRect.Left()=aTmpRect.Right()-nNeed;
if (bRgt) aTmpRect.Right()=aTmpRect.Left()+nNeed;
}
- } else { // Scheitelpunkthandles
+ } else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
long nHgt0b=aRect.Bottom()-aRect.Top();
long nNeed=long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
@@ -206,7 +206,7 @@ bool SdrTextObj::MovCreate(SdrDragStat& rStat)
rStat.TakeCreateRect(aRect1);
ImpJustifyRect(aRect1);
rStat.SetActionRect(aRect1);
- aRect=aRect1; // fuer ObjName
+ aRect=aRect1; // for ObjName
SetBoundRectDirty();
bSnapRectDirty=sal_True;
if (HAS_BASE(SdrRectObj,this)) {
@@ -232,7 +232,7 @@ bool SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
if (nWdt==1) nWdt=0;
NbcSetMinTextFrameWidth(nWdt);
}
- // Textrahmen neu berechnen
+ // re-calculate text frame
NbcAdjustTextFrameWidthAndHeight();
}
SetRectsDirty();
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index c8aa75c36de6..3d3acc386037 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -29,7 +29,7 @@
#include <svx/svdotext.hxx>
#include "svx/svditext.hxx"
-#include <svx/svdmodel.hxx> // fuer GetMaxObjSize
+#include <svx/svdmodel.hxx> // for GetMaxObjSize
#include <svx/svdoutl.hxx>
#include <editeng/outliner.hxx>
#include <editeng/editstat.hxx>
@@ -40,14 +40,13 @@
bool SdrTextObj::HasTextEdit() const
{
- // lt. Anweisung von MB duerfen gelinkte Textobjekte nun doch
- // geaendert werden (kein automatisches Reload)
+ // linked text objects may be changed (no automatic reload)
return true;
}
sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
{
- if (pEdtOutl!=NULL) return sal_False; // Textedit laeuft evtl. schon an einer anderen View!
+ if (pEdtOutl!=NULL) return sal_False; // Textedit might already run in another View!
pEdtOutl=&rOutl;
mbInEditMode = sal_True;
@@ -79,7 +78,8 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
rOutl.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
}
- // ggf. Rahmenattribute am 1. (neuen) Absatz des Outliners setzen
+ // if necessary, set frame attributes for the first (new) paragraph of the
+ // outliner
if( !HasTextImpl( &rOutl ) )
{
// Outliner has no text so we must set some
@@ -89,10 +89,10 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
if(GetStyleSheet())
rOutl.SetStyleSheet( 0, GetStyleSheet());
- // Beim setzen der harten Attribute an den ersten Absatz muss
- // der Parent pOutlAttr (=die Vorlage) temporaer entfernt
- // werden, da sonst bei SetParaAttribs() auch alle in diesem
- // Parent enthaltenen Items hart am Absatz attributiert werden.
+ // When setting the "hard" attributes for first paragraph, the Parent
+ // pOutlAttr (i. e. the template) has to be removed temporarily. Else,
+ // at SetParaAttribs(), all attributes contained in the parent become
+ // attributed hard to the paragraph.
const SfxItemSet& rSet = GetObjectItemSet();
SfxItemSet aFilteredSet(*rSet.GetPool(), EE_ITEMS_START, EE_ITEMS_END);
aFilteredSet.Put(rSet);
@@ -142,7 +142,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
aViewInit.Move(aCenter.X(),aCenter.Y());
}
Size aAnkSiz(aViewInit.GetSize());
- aAnkSiz.Width()--; aAnkSiz.Height()--; // weil GetSize() ein draufaddiert
+ aAnkSiz.Width()--; aAnkSiz.Height()--; // because GetSize() adds 1
Size aMaxSiz(1000000,1000000);
if (pModel!=NULL) {
Size aTmpSiz(pModel->GetMaxObjSize());
@@ -174,7 +174,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE))
{
- // Grenzenlose Papiergroesse fuer Laufschrift
+ // ticker text uses an unlimited paper size
if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nMaxWdt=1000000;
if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nMaxHgt=1000000;
}
@@ -213,7 +213,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
else { pViewMin->Top()+=nYFree/2; pViewMin->Bottom()=pViewMin->Top()+aPaperMin.Height(); }
}
- // Die PaperSize soll in den meisten Faellen von selbst wachsen
+ // PaperSize should grow automatically in most cases
if(IsVerticalWriting())
aPaperMin.Width() = 0;
else
@@ -223,7 +223,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
aPaperMin.Width()=0;
}
- // For complete ver adjust support, set paper min height to 0, here.
+ // For complete vertical adjustment support, set paper min height to 0, here.
if(SDRTEXTVERTADJUST_BLOCK != eVAdj || bFitToSize)
{
aPaperMin.Height() = 0;
@@ -242,7 +242,7 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
if(HasTextImpl( &rOutl ) )
{
- // Damit der grauen Feldhintergrund wieder verschwindet
+ // to make the gray field background vanish again
rOutl.UpdateFields();
sal_uInt16 nParaAnz = static_cast< sal_uInt16 >( rOutl.GetParagraphCount() );
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index 485c5f5e6158..58abf9025d1a 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -69,7 +69,7 @@ void ImpSdrObjTextLink::Closed()
{
if (pSdrObj )
{
- // pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
+ // set pLink of the object to NULL, because we are destroying the link instance now
ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
if (pData!=NULL) pData->pLink=NULL;
pSdrObj->ReleaseTextLink();
@@ -281,7 +281,7 @@ void SdrTextObj::ImpLinkAnmeldung()
{
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
sfx2::LinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
- if (pLinkManager!=NULL && pData!=NULL && pData->pLink==NULL) { // Nicht 2x Anmelden
+ if (pLinkManager!=NULL && pData!=NULL && pData->pLink==NULL) { // don't register twice
pData->pLink=new ImpSdrObjTextLink(this);
#ifdef GCC
pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,pData->aFileName,
@@ -300,8 +300,8 @@ void SdrTextObj::ImpLinkAbmeldung()
{
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
sfx2::LinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
- if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // Nicht 2x Abmelden
- // Bei Remove wird *pLink implizit deleted
+ if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // don't register twice
+ // when doing Remove, *pLink is deleted implicitly
pLinkManager->Remove( pData->pLink );
pData->pLink=NULL;
}
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 39263ab13fb8..13b35beb2740 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -33,8 +33,8 @@
#include <svx/svdogrp.hxx>
#include <svx/svdopath.hxx>
#include <svx/svdoutl.hxx>
-#include <svx/svdpage.hxx> // fuer Convert
-#include <svx/svdmodel.hxx> // fuer Convert
+#include <svx/svdpage.hxx> // for Convert
+#include <svx/svdmodel.hxx> // for Convert
#include <editeng/outliner.hxx>
#include <svx/sdr/properties/itemsettools.hxx>
#include <svx/sdr/properties/properties.hxx>
@@ -67,7 +67,7 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect)
long nTHgt1=rRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
aRect=rRect;
ImpJustifyRect(aRect);
- if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
+ if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) {
if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
NbcAdjustTextFrameWidthAndHeight();
@@ -162,7 +162,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
if(bXMirr != bYMirr)
{
- // Polygon wenden und etwas schieben
+ // turn polygon and move it a little
Polygon aPol0(aPol);
aPol[0] = aPol0[1];
@@ -177,7 +177,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
if (bRota90Merk) {
bool bRota90=aGeo.nDrehWink % 9000 ==0;
- if (!bRota90) { // Scheinbar Rundungsfehler: Korregieren
+ if (!bRota90) { // there's seems to be a rounding error occurring: correct it
long a=NormAngle360(aGeo.nDrehWink);
if (a<4500) a=0;
else if (a<13500) a=9000;
@@ -187,7 +187,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
aGeo.nDrehWink=a;
aGeo.RecalcSinCos();
}
- if (bNoShearMerk!=(aGeo.nShearWink==0)) { // Shear ggf. korregieren wg. Rundungsfehler
+ if (bNoShearMerk!=(aGeo.nShearWink==0)) { // correct a rounding error occurring with Shear
aGeo.nShearWink=0;
aGeo.RecalcTan();
}
@@ -196,7 +196,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
ImpJustifyRect(aRect);
long nTWdt1=aRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
long nTHgt1=aRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
- if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
+ if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) {
if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
NbcAdjustTextFrameWidthAndHeight();
@@ -233,7 +233,7 @@ void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear
{
SetGlueReallyAbsolute(sal_True);
- // when this is a SdrPathObj aRect maybe not initialized
+ // when this is a SdrPathObj, aRect may be uninitialized
Polygon aPol(Rect2Poly(aRect.IsEmpty() ? GetSnapRect() : aRect, aGeo));
sal_uInt16 nPointCount=aPol.GetSize();
@@ -267,7 +267,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
for (i=0; i<nPntAnz; i++) {
MirrorPoint(aPol[i],rRef1,rRef2);
}
- // Polygon wenden und etwas schieben
+ // turn polygon and move it a little
Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
@@ -278,7 +278,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
if (bRota90Merk) {
bool bRota90=aGeo.nDrehWink % 9000 ==0;
- if (bRota90Merk && !bRota90) { // Scheinbar Rundungsfehler: Korregieren
+ if (bRota90Merk && !bRota90) { // there's seems to be a rounding error occurring: correct it
long a=NormAngle360(aGeo.nDrehWink);
if (a<4500) a=0;
else if (a<13500) a=9000;
@@ -289,7 +289,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
aGeo.RecalcSinCos();
}
}
- if (bNoShearMerk!=(aGeo.nShearWink==0)) { // Shear ggf. korregieren wg. Rundungsfehler
+ if (bNoShearMerk!=(aGeo.nShearWink==0)) { // correct a rounding error occurring with Shear
aGeo.nShearWink=0;
aGeo.RecalcTan();
}
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index e058fb07a1a2..bd8836343fa7 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -46,8 +46,8 @@
#include <svx/svdouno.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdmodel.hxx>
-#include "svx/svdglob.hxx" // Stringcache
-#include "svx/svdstr.hrc" // Objektname
+#include "svx/svdglob.hxx" // string cache
+#include "svx/svdstr.hrc" // the object's name
#include <svx/svdetc.hxx>
#include <svx/svdview.hxx>
#include <svx/svdorect.hxx>
@@ -68,7 +68,7 @@ using namespace ::sdr::contact;
//************************************************************
//************************************************************
-// Hilfsklasse SdrControlEventListenerImpl
+// Helper class SdrControlEventListenerImpl
//************************************************************
#include <com/sun/star/lang/XEventListener.hpp>
@@ -171,7 +171,7 @@ SdrUnoObj::SdrUnoObj(const String& rModelName, sal_Bool _bOwnUnoControlModel)
m_pImpl->pEventListener = new SdrControlEventListenerImpl(this);
- // nur ein owner darf eigenstaendig erzeugen
+ // only an owner may create independently
if (rModelName.Len())
CreateUnoControlModel(rModelName);
}
@@ -186,7 +186,7 @@ SdrUnoObj::SdrUnoObj(const String& rModelName,
m_pImpl->pEventListener = new SdrControlEventListenerImpl(this);
- // nur ein owner darf eigenstaendig erzeugen
+ // only an owner may create independently
if (rModelName.Len())
CreateUnoControlModel(rModelName,rxSFac);
}
@@ -199,7 +199,7 @@ SdrUnoObj::~SdrUnoObj()
uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
if (xComp.is())
{
- // is the control model owned by it's environment?
+ // is the control model owned by its environment?
uno::Reference< container::XChild > xContent(xUnoControlModel, uno::UNO_QUERY);
if (xContent.is() && !xContent->getParent().is())
xComp->dispose();
@@ -362,7 +362,7 @@ void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti
if (aGeo.nShearWink!=0 || aGeo.nDrehWink!=0)
{
- // kleine Korrekturen
+ // small correctures
if (aGeo.nDrehWink>=9000 && aGeo.nDrehWink<27000)
{
aRect.Move(aRect.Left()-aRect.Right(),aRect.Top()-aRect.Bottom());
@@ -538,7 +538,7 @@ void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >&
xUnoControlModel = xModel;
- // control model muss servicename des controls enthalten
+ // control model has to contain service name of the control
if (xUnoControlModel.is())
{
uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY);
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 2aa7d0e0351e..f3294debafa3 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -59,7 +59,7 @@ TYPEINIT1(SdrVirtObj,SdrObject);
SdrVirtObj::SdrVirtObj(SdrObject& rNewObj):
rRefObj(rNewObj)
{
- bVirtObj=sal_True; // Ja, ich bin ein virtuelles Objekt
+ bVirtObj=sal_True; // this is only a virtual object
rRefObj.AddReference(*this);
bClosedObj=rRefObj.IsClosedObj();
}
@@ -84,7 +84,7 @@ SdrObject& SdrVirtObj::ReferencedObj()
void SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
{
bClosedObj=rRefObj.IsClosedObj();
- SetRectsDirty(); // hier noch Optimieren.
+ SetRectsDirty(); // TODO: Optimize this.
// Only a repaint here, rRefObj may have changed and broadcasts
ActionChanged();
@@ -125,14 +125,14 @@ SdrObjList* SdrVirtObj::GetSubList() const
const Rectangle& SdrVirtObj::GetCurrentBoundRect() const
{
- ((SdrVirtObj*)this)->aOutRect=rRefObj.GetCurrentBoundRect(); // Hier noch optimieren
+ ((SdrVirtObj*)this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
((SdrVirtObj*)this)->aOutRect+=aAnchor;
return aOutRect;
}
const Rectangle& SdrVirtObj::GetLastBoundRect() const
{
- ((SdrVirtObj*)this)->aOutRect=rRefObj.GetLastBoundRect(); // Hier noch optimieren
+ ((SdrVirtObj*)this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this.
((SdrVirtObj*)this)->aOutRect+=aAnchor;
return aOutRect;
}
@@ -150,11 +150,11 @@ void SdrVirtObj::SetChanged()
SdrVirtObj* SdrVirtObj::Clone() const
{
- return new SdrVirtObj(this->rRefObj); // Nur eine weitere Referenz
+ return new SdrVirtObj(this->rRefObj); // only a further reference
}
SdrVirtObj& SdrVirtObj::operator=(const SdrVirtObj& rObj)
-{ // ???anderes Objekt referenzieren???
+{ // reference different object??
SdrObject::operator=(rObj);
aAnchor=rObj.aAnchor;
return *this;
@@ -326,7 +326,7 @@ bool SdrVirtObj::applySpecialDrag(SdrDragStat& rDrag)
basegfx::B2DPolyPolygon SdrVirtObj::getSpecialDragPoly(const SdrDragStat& rDrag) const
{
return rRefObj.getSpecialDragPoly(rDrag);
- // Offset handlen !!!!!! fehlt noch !!!!!!!
+ // TODO: we don't handle offsets yet!
}
String SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const
@@ -364,7 +364,7 @@ void SdrVirtObj::BrkCreate(SdrDragStat& rStat)
basegfx::B2DPolyPolygon SdrVirtObj::TakeCreatePoly(const SdrDragStat& rDrag) const
{
return rRefObj.TakeCreatePoly(rDrag);
- // Offset handlen !!!!!! fehlt noch !!!!!!!
+ // TODO: we don't handle offsets yet!
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -489,8 +489,8 @@ void SdrVirtObj::NbcSetSnapRect(const Rectangle& rRect)
const Rectangle& SdrVirtObj::GetLogicRect() const
{
- ((SdrVirtObj*)this)->aSnapRect=rRefObj.GetLogicRect(); // !!! Missbrauch von aSnapRect !!!
- ((SdrVirtObj*)this)->aSnapRect+=aAnchor; // Wenns mal Aerger gibt, muss ein weiteres Rectangle Member her (oder Heap)
+ ((SdrVirtObj*)this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
+ ((SdrVirtObj*)this)->aSnapRect+=aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
return aSnapRect;
}
@@ -615,27 +615,27 @@ bool SdrVirtObj::HasMacro() const
SdrObject* SdrVirtObj::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
{
- return rRefObj.CheckMacroHit(rRec); // Todo: Positionsversatz
+ return rRefObj.CheckMacroHit(rRec); // TODO: positioning offset
}
Pointer SdrVirtObj::GetMacroPointer(const SdrObjMacroHitRec& rRec) const
{
- return rRefObj.GetMacroPointer(rRec); // Todo: Positionsversatz
+ return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
}
void SdrVirtObj::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
{
- rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // Todo: Positionsversatz
+ rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
}
bool SdrVirtObj::DoMacro(const SdrObjMacroHitRec& rRec)
{
- return rRefObj.DoMacro(rRec); // Todo: Positionsversatz
+ return rRefObj.DoMacro(rRec); // TODO: positioning offset
}
XubString SdrVirtObj::GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const
{
- return rRefObj.GetMacroPopupComment(rRec); // Todo: Positionsversatz
+ return rRefObj.GetMacroPopupComment(rRec); // TODO: positioning offset
}
const Point SdrVirtObj::GetOffset() const
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 3fcd8363730d..36d63a2948cc 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -45,9 +45,9 @@
#include <svx/svdetc.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdogrp.hxx>
-#include <svx/svdograf.hxx> // fuer SwapInAll()
-#include <svx/svdoedge.hxx> // Zum kopieren der Konnektoren
-#include <svx/svdoole2.hxx> // Sonderbehandlung OLE beim SdrExchangeFormat
+#include <svx/svdograf.hxx> // for SwapInAll()
+#include <svx/svdoedge.hxx> // for copying the connectors
+#include <svx/svdoole2.hxx> // special case OLE at SdrExchangeFormat
#include "svx/svditer.hxx"
#include <svx/svdmodel.hxx>
#include <svx/svdlayer.hxx>
@@ -127,7 +127,7 @@ SdrObjList::~SdrObjList()
// to NULL here.
pModel = 0L;
- Clear(); // Containerinhalt loeschen!
+ Clear(); // delete contents of container
}
void SdrObjList::operator=(const SdrObjList& rSrcList)
@@ -175,8 +175,8 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
if (pSrcEdge!=NULL) {
SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(sal_True);
SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(sal_False);
- if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // Listenuebergreifend
- if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // ist (noch) nicht
+ if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // can't do this
+ if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // across all lists (yet)
if (pSrcNode1!=NULL || pSrcNode2!=NULL) {
SdrObject* pEdgeObjTmp=GetObj(no);
SdrEdgeObj* pDstEdge=PTR_CAST(SdrEdgeObj,pEdgeObjTmp);
@@ -184,7 +184,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
if (pSrcNode1!=NULL) {
sal_uIntPtr nDstNode1=pSrcNode1->GetOrdNum();
SdrObject* pDstNode1=GetObj(nDstNode1);
- if (pDstNode1!=NULL) { // Sonst grober Fehler!
+ if (pDstNode1!=NULL) { // else we get an error!
pDstEdge->ConnectToNode(sal_True,pDstNode1);
} else {
OSL_FAIL("SdrObjList::operator=(): pDstNode1==NULL!");
@@ -193,7 +193,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
if (pSrcNode2!=NULL) {
sal_uIntPtr nDstNode2=pSrcNode2->GetOrdNum();
SdrObject* pDstNode2=GetObj(nDstNode2);
- if (pDstNode2!=NULL) { // Node war sonst wohl nicht markiert
+ if (pDstNode2!=NULL) { // else the node was probably not selected
pDstEdge->ConnectToNode(sal_False,pDstNode2);
} else {
OSL_FAIL("SdrObjList::operator=(): pDstNode2==NULL!");
@@ -208,21 +208,20 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
} else {
#ifdef DBG_UTIL
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "SdrObjList::operator=(): Fehler beim Clonen "));
+ "SdrObjList::operator=(): 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."));
+ " Not copying connectors."));
OSL_FAIL(aStr.getStr());
#endif
@@ -346,7 +345,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrIns
{
DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcInsertObject(NULL)");
if (pObj!=NULL) {
- DBG_ASSERT(!pObj->IsInserted(),"ZObjekt hat bereits Inserted-Status");
+ DBG_ASSERT(!pObj->IsInserted(),"ZObjekt already has the status Inserted.");
sal_uIntPtr nAnz=GetObjCount();
if (nPos>nAnz) nPos=nAnz;
InsertObjectIntoContainer(*pObj,nPos);
@@ -364,7 +363,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrIns
aOutRect.Union(pObj->GetCurrentBoundRect());
aSnapRect.Union(pObj->GetSnapRect());
}
- pObj->SetInserted(sal_True); // Ruft u.a. den UserCall
+ pObj->SetInserted(sal_True); // calls the UserCall (among others)
}
}
@@ -385,9 +384,8 @@ void SdrObjList::InsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsert
// do insert to new group
NbcInsertObject(pObj, nPos, pReason);
- // Falls das Objekt in eine Gruppe eingefuegt wird
- // und nicht mit seinen Bruedern ueberlappt, muss es
- // einen eigenen Redraw bekommen
+ // In case the object is inserted into a group and doesn't overlap with
+ // the group's other members, it needs an own repaint.
if(pOwnerObj)
{
// only repaint here
@@ -396,8 +394,8 @@ void SdrObjList::InsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsert
if(pModel)
{
- // Hier muss ein anderer Broadcast her!
- // Repaint ab Objekt Nummer ... (Achtung: GroupObj)
+ // TODO: We need a different broadcast here!
+ // Repaint from object number ... (heads-up: GroupObj)
if(pObj->GetPage())
{
SdrHint aHint(*pObj);
@@ -423,16 +421,16 @@ SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr nObjNum)
SdrObject* pObj=maList[nObjNum];
RemoveObjectFromContainer(nObjNum);
- DBG_ASSERT(pObj!=NULL,"Object zum Removen nicht gefunden");
+ DBG_ASSERT(pObj!=NULL,"Could not find object to remove.");
if (pObj!=NULL) {
// flushViewObjectContacts() clears the VOC's and those invalidate
pObj->GetViewContact().flushViewObjectContacts(true);
- DBG_ASSERT(pObj->IsInserted(),"ZObjekt hat keinen Inserted-Status");
+ DBG_ASSERT(pObj->IsInserted(),"ZObjekt does not have the status Inserted.");
pObj->SetInserted(sal_False); // Ruft u.a. den UserCall
pObj->SetObjList(NULL);
pObj->SetPage(NULL);
- if (!bObjOrdNumsDirty) { // Optimierung fuer den Fall, dass das letzte Obj rausgenommen wird
+ if (!bObjOrdNumsDirty) { // optimizing for the case that the last object has to be removed
if (nObjNum!=sal_uIntPtr(nAnz-1)) {
bObjOrdNumsDirty=sal_True;
}
@@ -500,9 +498,9 @@ SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
}
SdrObject* pObj=maList[nObjNum];
- DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Object zum Removen nicht gefunden");
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Could not find object to remove.");
if (pObj!=NULL) {
- DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt hat keinen Inserted-Status");
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt does not have status Inserted.");
pObj->SetInserted(sal_False);
pObj->SetObjList(NULL);
pObj->SetPage(NULL);
@@ -539,11 +537,11 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
}
SdrObject* pObj=maList[nObjNum];
- DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Object zum Removen nicht gefunden");
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Could not find object to remove.");
if (pObj!=NULL) {
- DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt hat keinen Inserted-Status");
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt does not have status Inserted.");
if (pModel!=NULL) {
- // Hier muss ein anderer Broadcast her!
+ // TODO: We need a different broadcast here.
if (pObj->GetPage()!=NULL) {
SdrHint aHint(*pObj);
aHint.SetKind(HINT_OBJREMOVED);
@@ -568,7 +566,7 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
pNewObj->SetInserted(sal_True);
if (pModel!=NULL) {
- // Hier muss ein anderer Broadcast her!
+ // TODO: We need a different broadcast here.
if (pNewObj->GetPage()!=NULL) {
SdrHint aHint(*pNewObj);
aHint.SetKind(HINT_OBJINSERTED);
@@ -592,9 +590,9 @@ SdrObject* SdrObjList::NbcSetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nN
SdrObject* pObj=maList[nOldObjNum];
if (nOldObjNum==nNewObjNum) return pObj;
- DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcSetObjectOrdNum: Object nicht gefunden");
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcSetObjectOrdNum: Object not found.");
if (pObj!=NULL) {
- DBG_ASSERT(pObj->IsInserted(),"SdrObjList::NbcSetObjectOrdNum: ZObjekt hat keinen Inserted-Status");
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::NbcSetObjectOrdNum: ZObjekt does not have status Inserted.");
RemoveObjectFromContainer(nOldObjNum);
InsertObjectIntoContainer(*pObj,nNewObjNum);
@@ -620,9 +618,9 @@ SdrObject* SdrObjList::SetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nNewO
SdrObject* pObj=maList[nOldObjNum];
if (nOldObjNum==nNewObjNum) return pObj;
- DBG_ASSERT(pObj!=NULL,"SdrObjList::SetObjectOrdNum: Object nicht gefunden");
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::SetObjectOrdNum: Object not found.");
if (pObj!=NULL) {
- DBG_ASSERT(pObj->IsInserted(),"SdrObjList::SetObjectOrdNum: ZObjekt hat keinen Inserted-Status");
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::SetObjectOrdNum: ZObjekt does not have status Inserted.");
RemoveObjectFromContainer(nOldObjNum);
InsertObjectIntoContainer(*pObj,nNewObjNum);
@@ -634,7 +632,7 @@ SdrObject* SdrObjList::SetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nNewO
bObjOrdNumsDirty=sal_True;
if (pModel!=NULL)
{
- // Hier muss ein anderer Broadcast her!
+ // TODO: We need a different broadcast here.
if (pObj->GetPage()!=NULL) pModel->Broadcast(SdrHint(*pObj));
pModel->SetChanged();
}
@@ -656,7 +654,7 @@ const Rectangle& SdrObjList::GetAllObjBoundRect() const
// #i106183# for deep group hierarchies like in chart2, the invalidates
// through the hierarchy are not correct; use a 2nd hint for the needed
// recalculation. Future versions will have no bool flag at all, but
- // just aOutRect in empty state to representate an invalid state, thus
+ // just aOutRect in empty state to represent an invalid state, thus
// it's a step in the right direction.
if (bRectsDirty || aOutRect.IsEmpty())
{
@@ -689,7 +687,7 @@ void SdrObjList::ReformatAllTextObjects()
/** steps over all available objects and reformats all
edge objects that are connected to other objects so that
- they may reposition itselfs.
+ they may reposition themselves.
*/
void SdrObjList::ReformatAllEdgeObjects()
{
@@ -903,7 +901,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat
{
if (HasObjectNavigationOrder())
{
- // There is a user defined navigation order. Make sure the object
+ // There is a user defined navigation order. Make sure the object
// index is correct and look up the object in mpNavigationOrder.
if (nNavigationPosition >= mpNavigationOrder->size())
{
@@ -914,7 +912,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat
}
else
{
- // There is no user defined navigation order. Use the z-order
+ // There is no user defined navigation order. Use the z-order
// instead.
if (nNavigationPosition >= maList.size())
{
@@ -1445,7 +1443,7 @@ SdrPage& SdrPage::operator=(const SdrPage& rSrcPage)
mpSdrPageProperties->SetStyleSheet(rSrcPage.getSdrPageProperties().GetStyleSheet());
}
- // Now copy the contained obejcts (by cloning them)
+ // Now copy the contained objects (by cloning them)
SdrObjList::operator=(rSrcPage);
return *this;
}
@@ -1497,7 +1495,7 @@ sal_Int32 SdrPage::GetWdt() const
void SdrPage::SetOrientation(Orientation eOri)
{
- // Quadratisch ist und bleibt immer Portrait
+ // square: handle like portrait format
Size aSiz(GetSize());
if (aSiz.Width()!=aSiz.Height()) {
if ((eOri==ORIENTATION_PORTRAIT) == (aSiz.Width()>aSiz.Height())) {
@@ -1508,7 +1506,7 @@ void SdrPage::SetOrientation(Orientation eOri)
Orientation SdrPage::GetOrientation() const
{
- // Quadratisch ist Portrait
+ // square: handle like portrait format
Orientation eRet=ORIENTATION_PORTRAIT;
Size aSiz(GetSize());
if (aSiz.Width()>aSiz.Height()) eRet=ORIENTATION_LANDSCAPE;
@@ -1638,7 +1636,7 @@ void SdrPage::SetModel(SdrModel* pNewModel)
mpSdrPageProperties = pNew;
}
- // update listeners at possible api wrapper object
+ // update listeners at possible API wrapper object
if( pOldModel != pNewModel )
{
if( mxUnoPage.is() )
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 252ec09ebf3b..a79f269ab739 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -50,7 +50,7 @@
#include <svx/svdogrp.hxx>
#include <svx/svdtypes.hxx>
-#include <svx/svdotext.hxx> // fuer PaintOutlinerView
+#include <svx/svdotext.hxx> // for PaintOutlinerView
#include <svx/svdoole2.hxx>
#include <svx/sdr/contact/objectcontactofpageview.hxx>
@@ -481,7 +481,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
nMinLinPix=6;
}
else
- { // z.B. 640x480
+ { // e. g. 640x480
nMinDotPix=2;
nMinLinPix=4;
}
@@ -489,8 +489,8 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
Size aMinLinDist(rOut.PixelToLogic(Size(nMinLinPix,nMinLinPix)));
bool bHoriSolid=nx2<aMinDotDist.Width();
bool bVertSolid=ny2<aMinDotDist.Height();
- // Linienabstand vergroessern (mind. 4 Pixel)
- // Vergroesserung: *2 *5 *10 *20 *50 *100 ...
+ // enlarge line offset (minimum 4 pixels)
+ // enlarge by: *2 *5 *10 *20 *50 *100 ...
int nTgl=0;
long nVal0=nx1;
while (nx1<aMinLinDist.Width())
@@ -555,7 +555,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
}
if (!rRect.IsEmpty()) {
Size a1PixSiz(rOut.PixelToLogic(Size(1,1)));
- long nX1Pix=a1PixSiz.Width(); // 1 Pixel Toleranz drauf
+ long nX1Pix=a1PixSiz.Width(); // add 1 pixel of tolerance
long nY1Pix=a1PixSiz.Height();
if (x1<rRect.Left() -nX1Pix) x1=rRect.Left() -nX1Pix;
if (x2>rRect.Right() +nX1Pix) x2=rRect.Right() +nX1Pix;
@@ -590,12 +590,12 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
for(sal_uInt16 a=0;a<nSteps;a++)
{
- // Zeichnen
+ // draw
rOut.DrawGrid(
Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ),
Size( nx1, ny1 ), nGridFlags );
- // Schritt machen
+ // do a step
nStepOffset += nRestPerStepMul1000;
while(nStepOffset >= 1000)
{
@@ -615,12 +615,12 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
for(sal_uInt16 a=0;a<nSteps;a++)
{
- // Zeichnen
+ // draw
rOut.DrawGrid(
Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ),
Size( nx1, ny1 ), nGridFlags );
- // Schritt machen
+ // do a step
nStepOffset += nRestPerStepMul1000;
while(nStepOffset >= 1000)
{
@@ -677,13 +677,13 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const
{
if(pObj)
{
- // Vom Markieren ausgeschlossen?
+ // excluded from selection?
if(pObj->IsMarkProtect())
{
return sal_False;
}
- // only visible are markable
+ // only visible are selectable
if( !pObj->IsVisible() )
{
return sal_False;
@@ -691,7 +691,7 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const
if(pObj->ISA(SdrObjGroup))
{
- // If object is a Group object, visibility depends evtl. on
+ // If object is a Group object, visibility may depend on
// multiple layers. If one object is markable, Group is markable.
SdrObjList* pObjList = ((SdrObjGroup*)pObj)->GetSubList();
@@ -721,7 +721,7 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const
}
else
{
- // Der Layer muss sichtbar und darf nicht gesperrt sein
+ // the layer has to be visible and must not be locked
SdrLayerID nL = pObj->GetLayer();
return (aLayerVisi.IsSet(sal_uInt8(nL)) && !aLayerLock.IsSet(sal_uInt8(nL)));
}
@@ -804,7 +804,7 @@ void SdrPageView::InsertHelpLine(const SdrHelpLine& rHL, sal_uInt16 nNum)
ImpInvalidateHelpLineArea(nNum);
}
-// Betretene Gruppe und Liste setzen
+// set current group and list
void SdrPageView::SetAktGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList)
{
if(pAktGroup != pNewGroup)
@@ -885,20 +885,20 @@ void SdrPageView::LeaveOneGroup()
if(pParentGroup)
pParentList = pParentGroup->GetSubList();
- // Alles deselektieren
+ // deselect everything
GetView().UnmarkAll();
- // Zuweisungen, pAktGroup und pAktList muessen gesetzt sein
+ // allocations, pAktGroup and pAktList need to be set
SetAktGroupAndList(pParentGroup, pParentList);
- // gerade verlassene Gruppe selektieren
+ // select the group we just left
if(pLastGroup)
if(GetView().GetSdrPageView())
GetView().MarkObj(pLastGroup, GetView().GetSdrPageView());
GetView().AdjustMarkHdl();
- // invalidate only when view wants to visualize group entering
+ // invalidate only if view wants to visualize group entering
if(GetView().DoVisualizeEnteredGroup())
InvalidateAllWin();
@@ -918,13 +918,13 @@ void SdrPageView::LeaveAllGroup()
SdrObject* pLastGroup = GetAktGroup();
- // Alles deselektieren
+ // deselect everything
GetView().UnmarkAll();
- // Zuweisungen, pAktGroup und pAktList muessen gesetzt sein
+ // allocations, pAktGroup and pAktList always need to be set
SetAktGroupAndList(NULL, GetPage());
- // Oberste letzte Gruppe finden und selektieren
+ // find and select uppermost group
if(pLastGroup)
{
while(pLastGroup->GetUpGroup())
@@ -961,7 +961,7 @@ void SdrPageView::CheckAktGroup()
SdrObject* pGrp=GetAktGroup();
while (pGrp!=NULL &&
(!pGrp->IsInserted() || pGrp->GetObjList()==NULL ||
- pGrp->GetPage()==NULL || pGrp->GetModel()==NULL)) { // irgendwas daneben?
+ pGrp->GetPage()==NULL || pGrp->GetModel()==NULL)) { // anything outside of the borders?
pGrp=pGrp->GetUpGroup();
}
if (pGrp!=GetAktGroup()) {
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 8d5d71a2b5f7..fe6c7f345559 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -223,7 +223,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut)
AddWindowToPaintView(pOut);
}
- // Flag zur Visualisierung von Gruppen
+ // flag to visualize groups
bVisualizeEnteredGroup = sal_True;
maColorConfig.AddListener(this);
@@ -266,7 +266,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
return;
}
- sal_Bool bObjChg=!bSomeObjChgdFlag; // sal_True= auswerten fuer ComeBack-Timer
+ sal_Bool bObjChg=!bSomeObjChgdFlag; // if sal_True, evaluate for ComeBack timer
if (bObjChg) {
SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
if (pSdrHint!=NULL) {
@@ -313,7 +313,7 @@ IMPL_LINK_INLINE_END(SdrPaintView,ImpComeBackHdl,Timer*,pTimer)
void SdrPaintView::FlushComeBackTimer() const
{
if (bSomeObjChgdFlag) {
- // casting auf nonconst
+ // casting to nonconst
((SdrPaintView*)this)->ImpComeBackHdl(&((SdrPaintView*)this)->aComeBackTimer);
((SdrPaintView*)this)->aComeBackTimer.Stop();
}
@@ -321,7 +321,7 @@ void SdrPaintView::FlushComeBackTimer() const
void SdrPaintView::ModelHasChanged()
{
- // Auch alle PageViews benachrichtigen
+ // broadcast to all PageViews
if(mpPageView && !mpPageView->GetPage()->IsInserted())
{
HideSdrPage();
@@ -1045,7 +1045,7 @@ bool SdrPaintView::IsGroupEntered() const
void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, sal_Bool /*bReplaceAll*/)
{
- // bReplaceAll hat hier keinerlei Wirkung
+ // bReplaceAll has no effect here at all.
sal_Bool bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool();
const SfxPoolItem *pPoolItem=NULL;
if (rAttr.GetItemState(SDRATTR_LAYERID,sal_True,&pPoolItem)==SFX_ITEM_SET) {
@@ -1064,7 +1064,7 @@ void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, sal_Bool /*
void SdrPaintView::MergeNotPersistDefaultAttr(SfxItemSet& rAttr, sal_Bool /*bOnlyHardAttr*/) const
{
- // bOnlyHardAttr hat hier keinerlei Wirkung
+ // bOnlyHardAttr has no effect here at all.
sal_Bool bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool();
const XubString& aNam=bMeasure?aMeasureLayer:aAktLayer;
rAttr.Put(SdrLayerNameItem(aNam));
@@ -1092,13 +1092,13 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
if(bHasEEFeatureItems)
{
String aMessage;
- aMessage.AppendAscii("SdrPaintView::SetDefaultAttr(): Das setzen von EE_FEATURE-Items an der SdrView macht keinen Sinn! Es fuehrt nur zu Overhead und nicht mehr lesbaren Dokumenten.");
+ aMessage.AppendAscii("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
InfoBox(NULL, aMessage).Execute();
}
}
#endif
if (bReplaceAll) aDefaultAttr.Set(rAttr);
- else aDefaultAttr.Put(rAttr,sal_False); // FALSE= InvalidItems nicht als Default, sondern als "Loecher" betrachten
+ else aDefaultAttr.Put(rAttr,sal_False); // if FALSE, regard InvalidItems as "holes," not as Default
SetNotPersistDefaultAttr(rAttr,bReplaceAll);
#ifdef DBG_UTIL
if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
@@ -1136,7 +1136,7 @@ sal_Bool SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardA
}
else
{
- // sonst DefStyleSheet dazumergen
+ // else merge with DefStyleSheet
rTargetSet.Put(pDefaultStyleSheet->GetItemSet(), sal_False);
rTargetSet.Put(aDefaultAttr, sal_False);
}
@@ -1197,12 +1197,12 @@ void SdrPaintView::MakeVisible(const Rectangle& rRect, Window& rWin)
if (bNeedMoreX || bNeedMoreY)
{
bNewScale=sal_True;
- // Neuen MapMode (Size+Org) setzen und dabei alles invalidieren
+ // set new MapMode (Size+Org) and invalidate everything
Fraction aXFact(aNewSize.Width(),aActualSize.Width());
Fraction aYFact(aNewSize.Height(),aActualSize.Height());
if (aYFact>aXFact) aXFact=aYFact;
aXFact*=aMap.GetScaleX();
- aXFact.ReduceInaccurate(10); // Um Ueberlaeufe und BigInt-Mapping zu vermeiden
+ aXFact.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
aMap.SetScaleX(aXFact);
aMap.SetScaleY(aYFact);
rWin.SetMapMode(aMap);
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 62a3d84bec8e..cb132453be31 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -33,7 +33,7 @@
#include <svx/svdpage.hxx>
#include <svx/svdopath.hxx>
#include <svx/svdundo.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/svdtrans.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -402,8 +402,8 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
if(nNewPt0Idx)
{
- // Korrektur notwendig?
- DBG_ASSERT(bKorregFlag==sal_False,"Mehrfache Indexkorrektur bei SdrPolyEditView::RipUp()");
+ // correction necessary?
+ DBG_ASSERT(bKorregFlag==sal_False,"Multiple index corrections at SdrPolyEditView::RipUp().");
if(!bKorregFlag)
{
bKorregFlag = sal_True;
@@ -421,7 +421,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
pPts->Replace((sal_uInt16)nPntNum, nBla);
}
- i = nMarkPtsAnz; // ... und nochmal von vorn
+ i = nMarkPtsAnz;
}
}
}
@@ -677,7 +677,7 @@ static void ImpMove(Point& rPt, Point* pC1, Point* pC2, const void* p1, const vo
void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz, bool bCopy)
{
- bCopy=sal_False; // noch nicht implementiert
+ bCopy=sal_False; // TODO: not yet implemented
ForceUndirtyMrkPnt();
XubString aStr(ImpGetResStr(STR_EditMove));
if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
@@ -699,7 +699,7 @@ static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const
void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy)
{
- bCopy=sal_False; // noch nicht implementiert
+ bCopy=sal_False; // TODO: not yet implemented
ForceUndirtyMrkPnt();
XubString aStr(ImpGetResStr(STR_EditResize));
if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
@@ -721,7 +721,7 @@ static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const
void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy)
{
- bCopy=sal_False; // noch nicht implementiert
+ bCopy=sal_False; // TODO: not yet implemented
ForceUndirtyMrkPnt();
XubString aStr(ImpGetResStr(STR_EditResize));
if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 325bece0506d..fb8157bd9004 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -343,14 +343,14 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
long upp=pPage->GetUppBorder();
long lwr=pPage->GetLwrBorder();
long a;
- a=x- lft ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // linker Rand
- a=x-(xs-rgt); if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // rechter Rand
- a=x ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // linke Papierkante
- a=x- xs ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // rechte Papierkante
- a=y- upp ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // linker Rand
- a=y-(ys-lwr); if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // rechter Rand
- a=y ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // linke Papierkante
- a=y- ys ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // rechte Papierkante
+ a=x- lft ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // left margin
+ a=x-(xs-rgt); if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // right margin
+ a=x ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // left edge of paper
+ a=x- xs ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // right edge of paper
+ a=y- upp ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // left margin
+ a=y-(ys-lwr); if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // right margin
+ a=y ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // left edge of paper
+ a=y- ys ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // right edge of paper
}
if (bOFrmSnap || bOPntSnap) {
sal_uIntPtr nMaxPointSnapCount=200;
@@ -407,7 +407,7 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
{
double fx = (double)x;
- // round statt trunc
+ // round instead of trunc
if(fx - (double)pPV->GetPageOrigin().X() >= 0.0)
fx += fSnapWidth / 2.0;
else
@@ -422,7 +422,7 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
{
double fy = (double)y;
- // round statt trunc
+ // round instead of trunc
if(fy - (double)pPV->GetPageOrigin().Y() >= 0.0)
fy += fSnapWidth / 2.0;
else
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 1846cacd2bd9..f21f1dd8386b 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -1566,19 +1566,19 @@ String STR_ItemNam_SHEARANGLE
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
- // Ende der gecachten Strings
+ // End of cached strings
- // und hier noch Bitmaps
+ // Now: bitmaps:
Bitmap BMAP_GrafikEi { File = "grafikei.png" ; };
Bitmap BMAP_GrafikDe { File = "grafikde.png" ; };
-// Strings fuer den Vorlagen-Dialog
+// Strings for the templates dialog
String SIP_UNKNOWN_ATTR
{
Text [ en-US ] = "Unknown attribute";
};
-// Strings fuer den Vorlagen-Dialog
+// Strings for the templates dialog
String SIP_XA_LINESTYLE
{
Text [ en-US ] = "Line style";
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 580d38e94fde..8fc43ee8036f 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -62,7 +62,7 @@ void SdrText::CheckPortionInfo( SdrOutliner& rOutliner )
if(mpModel && &rOutliner == &mpModel->GetHitTestOutliner())
return;
- // Optimierung: ggf. BigTextObject erzeugen
+ // TODO: optimization: we could create a BigTextObject
mbPortionInfoChecked=true;
if(mpOutlinerParaObject!=NULL && rOutliner.ShouldCreateBigTextObject())
{
@@ -144,22 +144,21 @@ void SdrText::SetModel( SdrModel* pNewModel )
MapUnit aOldUnit(pOldModel->GetScaleUnit());
MapUnit aNewUnit(pNewModel->GetScaleUnit());
bool bScaleUnitChanged=aNewUnit!=aOldUnit;
- // und nun dem OutlinerParaObject einen neuen Pool verpassen
- // !!! Hier muss noch DefTab und RefDevice der beiden Models
- // !!! verglichen werden und dann ggf. AutoGrow zuschlagen !!!
- // !!! fehlende Implementation !!!
+ // Now move the OutlinerParaObject into a new Pool.
+ // TODO: We should compare the DefTab and RefDevice of both Models to
+ // see whether we need to use AutoGrow!
sal_uIntPtr nOldFontHgt=pOldModel->GetDefaultFontHeight();
sal_uIntPtr nNewFontHgt=pNewModel->GetDefaultFontHeight();
sal_Bool bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
sal_Bool bSetHgtItem=bDefHgtChanged && !bHgtSet;
if (bSetHgtItem)
{
- // zunaechst das HeightItem festklopfen, damit
- // 1. Es eben bestehen bleibt und
- // 2. DoStretchChars vom richtigen Wert ausgeht
+ // fix the value of HeightItem, so
+ // 1. it remains and
+ // 2. DoStretchChars gets the right value
SetObjectItem(SvxFontHeightItem(nOldFontHgt, 100, EE_CHAR_FONTHEIGHT));
}
- // erst jetzt den Outliner holen, etc. damit obiges SetAttr auch wirkt
+ // now use the Outliner, etc. so the above SetAttr can work at all
SdrOutliner& rOutliner = mrObject.ImpGetDrawOutliner();
rOutliner.SetText(*mpOutlinerParaObject);
delete mpOutlinerParaObject;
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 646d9f74f6d1..a9c585366b6e 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -49,7 +49,7 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con
{
if (xFact.GetDenominator()==0) {
long nWdt=rRect.Right()-rRect.Left();
- if (xFact.GetNumerator()>=0) { // DivZero abfangen
+ if (xFact.GetNumerator()>=0) { // catch divisions by zero
xFact=Fraction(xFact.GetNumerator(),1);
if (nWdt==0) rRect.Right()++;
} else {
@@ -63,7 +63,7 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con
{
if (yFact.GetDenominator()==0) {
long nHgt=rRect.Bottom()-rRect.Top();
- if (yFact.GetNumerator()>=0) { // DivZero abfangen
+ if (yFact.GetNumerator()>=0) { // catch divisions by zero
yFact=Fraction(yFact.GetNumerator(),1);
if (nHgt==0) rRect.Bottom()++;
} else {
@@ -71,7 +71,7 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con
if (nHgt==0) rRect.Top()--;
}
- yFact=Fraction(yFact.GetNumerator(),1); // DivZero abfangen
+ yFact=Fraction(yFact.GetNumerator(),1); // catch divisions by zero
}
rRect.Top() =rRef.Y()+Round(((double)(rRect.Top() -rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator());
rRect.Bottom()=rRef.Y()+Round(((double)(rRect.Bottom()-rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator());
@@ -124,25 +124,24 @@ void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2)
{
long mx=rRef2.X()-rRef1.X();
long my=rRef2.Y()-rRef1.Y();
- if (mx==0) { // Achse senkrecht
+ if (mx==0) { // vertical axis
long dx=rRef1.X()-rPnt.X();
rPnt.X()+=2*dx;
- } else if (my==0) { // Achse waagerecht
+ } else if (my==0) { // horizontal axis
long dy=rRef1.Y()-rPnt.Y();
rPnt.Y()+=2*dy;
- } else if (mx==my) { // Achse diagonal '\'
+ } else if (mx==my) { // diagonal axis '\'
long dx1=rPnt.X()-rRef1.X();
long dy1=rPnt.Y()-rRef1.Y();
rPnt.X()=rRef1.X()+dy1;
rPnt.Y()=rRef1.Y()+dx1;
- } else if (mx==-my) { // Achse diagonal '/'
+ } else if (mx==-my) { // diagonal axis '/'
long dx1=rPnt.X()-rRef1.X();
long dy1=rPnt.Y()-rRef1.Y();
rPnt.X()=rRef1.X()-dy1;
rPnt.Y()=rRef1.Y()-dx1;
- } else { // beliebige Achse
- // mal optimieren !!!
- // Lot auf der Spiegelachse faellen oder so
+ } else { // arbitrary axis
+ // TODO: Optimize this! Raise perpendicular on the mirroring axis..?
long nRefWink=GetAngle(rRef2-rRef1);
rPnt-=rRef1;
long nPntWink=GetAngle(rPnt);
@@ -202,15 +201,15 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
RotatePoint(rPnt,rCenter,sn,cs);
if (bC1) {
if (bVert) {
- // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ // move into the direction of the center, as a basic position for the rotation
pC1->Y()-=y0;
- // Resize, entsprechend der Entfernung vom Zentrum
+ // resize, account for the distance from the center
pC1->Y()=Round(((double)pC1->Y()) /rRad.X()*(cx-pC1->X()));
pC1->Y()+=cy;
} else {
- // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ // move into the direction of the center, as a basic position for the rotation
pC1->X()-=x0;
- // Resize, entsprechend der Entfernung vom Zentrum
+ // resize, account for the distance from the center
long nPntRad=cy-pC1->Y();
double nFact=(double)nPntRad/(double)rRad.Y();
pC1->X()=Round((double)pC1->X()*nFact);
@@ -220,15 +219,15 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
}
if (bC2) {
if (bVert) {
- // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ // move into the direction of the center, as a basic position for the rotation
pC2->Y()-=y0;
- // Resize, entsprechend der Entfernung vom Zentrum
+ // resize, account for the distance from the center
pC2->Y()=Round(((double)pC2->Y()) /rRad.X()*(rCenter.X()-pC2->X()));
pC2->Y()+=cy;
} else {
- // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ // move into the direction of the center, as a basic position for the rotation
pC2->X()-=x0;
- // Resize, entsprechend der Entfernung vom Zentrum
+ // resize, account for the distance from the center
long nPntRad=rCenter.Y()-pC2->Y();
double nFact=(double)nPntRad/(double)rRad.Y();
pC2->X()=Round((double)pC2->X()*nFact);
@@ -325,13 +324,13 @@ void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, b
Point* pPnt=&rPoly[i];
Point* pC1=NULL;
Point* pC2=NULL;
- if (i+1<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt links
+ if (i+1<nPointAnz && rPoly.IsControl(i)) { // control point to the left
pC1=pPnt;
i++;
pPnt=&rPoly[i];
}
i++;
- if (i<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt rechts
+ if (i<nPointAnz && rPoly.IsControl(i)) { // control point to the right
pC2=&rPoly[i];
i++;
}
@@ -348,13 +347,13 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bo
Point* pPnt=&rPoly[i];
Point* pC1=NULL;
Point* pC2=NULL;
- if (i+1<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt links
+ if (i+1<nPointAnz && rPoly.IsControl(i)) { // control point to the left
pC1=pPnt;
i++;
pPnt=&rPoly[i];
}
i++;
- if (i<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt rechts
+ if (i<nPointAnz && rPoly.IsControl(i)) { // control point to the right
pC2=&rPoly[i];
i++;
}
@@ -371,13 +370,13 @@ void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad,
Point* pPnt=&rPoly[i];
Point* pC1=NULL;
Point* pC2=NULL;
- if (i+1<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt links
+ if (i+1<nPointAnz && rPoly.IsControl(i)) { // control point to the left
pC1=pPnt;
i++;
pPnt=&rPoly[i];
}
i++;
- if (i<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt rechts
+ if (i<nPointAnz && rPoly.IsControl(i)) { // control point to the right
pC2=&rPoly[i];
i++;
}
@@ -455,7 +454,7 @@ long GetLen(const Point& rPnt)
{
long x=Abs(rPnt.X());
long y=Abs(rPnt.Y());
- if (x+y<0x8000) { // weil 7FFF * 7FFF * 2 = 7FFE0002
+ if (x+y<0x8000) { // because 7FFF * 7FFF * 2 = 7FFE0002
x*=x;
y*=y;
x+=y;
@@ -469,7 +468,7 @@ long GetLen(const Point& rPnt)
nx+=ny;
nx=sqrt(nx);
if (nx>0x7FFFFFFF) {
- return 0x7FFFFFFF; // Ueberlauf, mehr is nich!
+ return 0x7FFFFFFF; // we can't go any further, for fear of an overrun!
} else {
return Round(nx);
}
@@ -519,25 +518,25 @@ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
{
rGeo.nDrehWink=GetAngle(rPol[1]-rPol[0]);
rGeo.nDrehWink=NormAngle360(rGeo.nDrehWink);
- // Drehung ist damit im Kasten
+ // rotation successful
rGeo.RecalcSinCos();
Point aPt1(rPol[1]-rPol[0]);
- if (rGeo.nDrehWink!=0) RotatePoint(aPt1,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin fuer Rueckdrehung
+ if (rGeo.nDrehWink!=0) RotatePoint(aPt1,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin to reverse rotation
long nWdt=aPt1.X();
Point aPt0(rPol[0]);
Point aPt3(rPol[3]-rPol[0]);
- if (rGeo.nDrehWink!=0) RotatePoint(aPt3,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin fuer Rueckdrehung
+ if (rGeo.nDrehWink!=0) RotatePoint(aPt3,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin to reverse rotation
long nHgt=aPt3.Y();
long nShW=GetAngle(aPt3);
- nShW-=27000; // ShearWink wird zur Senkrechten gemessen
+ nShW-=27000; // ShearWink is measured against a vertical line
nShW=-nShW; // Negieren, denn '+' ist Rechtskursivierung
bool bMirr=aPt3.Y()<0;
- if (bMirr) { // "Punktetausch" bei Spiegelung
+ if (bMirr) { // "exchange of points" when mirroring
nHgt=-nHgt;
nShW+=18000;
aPt0=rPol[3];
@@ -546,7 +545,7 @@ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
if (nShW<-9000 || nShW>9000) {
nShW=NormAngle180(nShW+18000);
}
- if (nShW<-SDRMAXSHEAR) nShW=-SDRMAXSHEAR; // ShearWinkel begrenzen auf +/- 89.00 deg
+ if (nShW<-SDRMAXSHEAR) nShW=-SDRMAXSHEAR; // limit ShearWinkel (shear angle) to +/- 89.00 deg
if (nShW>SDRMAXSHEAR) nShW=SDRMAXSHEAR;
rGeo.nShearWink=nShW;
rGeo.RecalcTan();
@@ -594,9 +593,9 @@ long BigMulDiv(long nVal, long nMul, long nDiv)
BigInt aVal(nVal);
aVal*=nMul;
if (aVal.IsNeg()!=(nDiv<0)) {
- aVal-=nDiv/2; // fuer korrektes Runden
+ aVal-=nDiv/2; // to round correctly
} else {
- aVal+=nDiv/2; // fuer korrektes Runden
+ aVal+=nDiv/2; // to round correctly
}
if(nDiv)
{
@@ -615,23 +614,23 @@ void Kuerzen(Fraction& rF, unsigned nDigits)
if (nDiv<0) { nDiv=-nDiv; bNeg=!bNeg; }
if (nMul==0 || nDiv==0) return;
sal_uInt32 a;
- a=sal_uInt32(nMul); unsigned nMulZ=0; // Fuehrende Nullen zaehlen
+ a=sal_uInt32(nMul); unsigned nMulZ=0; // count leading zeros
while (a<0x00800000) { nMulZ+=8; a<<=8; }
while (a<0x80000000) { nMulZ++; a<<=1; }
- a=sal_uInt32(nDiv); unsigned nDivZ=0; // Fuehrende Nullen zaehlen
+ a=sal_uInt32(nDiv); unsigned nDivZ=0; // count leading zeros
while (a<0x00800000) { nDivZ+=8; a<<=8; }
while (a<0x80000000) { nDivZ++; a<<=1; }
- // Anzahl der verwendeten Digits bestimmen
+ // count the number of digits
int nMulDigits=32-nMulZ;
int nDivDigits=32-nDivZ;
- // Nun bestimmen, wieviele Stellen hinten weg koennen
+ // count how many decimal places can be removed
int nMulWeg=nMulDigits-nDigits; if (nMulWeg<0) nMulWeg=0;
int nDivWeg=nDivDigits-nDigits; if (nDivWeg<0) nDivWeg=0;
int nWeg=Min(nMulWeg,nDivWeg);
nMul>>=nWeg;
nDiv>>=nWeg;
if (nMul==0 || nDiv==0) {
- DBG_WARNING("Oups, beim kuerzen einer Fraction hat sich Joe verrechnet.");
+ DBG_WARNING("Math error after canceling decimal places.");
return;
}
if (bNeg) nMul=-nMul;
@@ -639,8 +638,8 @@ void Kuerzen(Fraction& rF, unsigned nDigits)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-// Wieviele eU-Einheiten passen in einen mm bzw. Inch?
-// Oder wie gross ist ein eU in mm bzw. Inch, und davon der Kehrwert
+// How many eU units fit into a mm, respectively an inch?
+// Or: How many mm, respectively inches, are there in an eU (and then give me the inverse)
FrPair GetInchOrMM(MapUnit eU)
{
@@ -658,13 +657,13 @@ FrPair GetInchOrMM(MapUnit eU)
case MAP_PIXEL : {
VirtualDevice aVD;
aVD.SetMapMode(MapMode(MAP_100TH_MM));
- Point aP(aVD.PixelToLogic(Point(64,64))); // 64 Pixel fuer bessere Genauigkeit
+ Point aP(aVD.PixelToLogic(Point(64,64))); // 64 pixels for more accuracy
return FrPair(6400,aP.X(),6400,aP.Y());
}
case MAP_APPFONT: case MAP_SYSFONT: {
VirtualDevice aVD;
aVD.SetMapMode(MapMode(eU));
- Point aP(aVD.LogicToPixel(Point(32,32))); // 32 Einheiten fuer bessere Genauigkeit
+ Point aP(aVD.LogicToPixel(Point(32,32))); // 32 units for more accuracy
aVD.SetMapMode(MapMode(MAP_100TH_MM));
aP=aVD.PixelToLogic(aP);
return FrPair(3200,aP.X(),3200,aP.Y());
@@ -693,8 +692,8 @@ FrPair GetInchOrMM(FieldUnit eU)
return Fraction(1,1);
}
-// Den Faktor berechnen, der anzuwenden ist um n Einheiten von eS nach
-// eD umzurechnen. Z.B. GetMapFactor(UNIT_MM,UNIT_100TH_MM) => 100.
+// Calculate the factor that we need to convert units from eS to eD.
+// e. g. GetMapFactor(UNIT_MM,UNIT_100TH_MM) => 100.
FrPair GetMapFactor(MapUnit eS, MapUnit eD)
{
@@ -768,7 +767,7 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, boo
bool bMetr = false, bInch = false;
switch (eFU) {
case FUNIT_NONE : break;
- // Metrisch
+ // metrically
case FUNIT_100TH_MM : bMetr = true; nKomma=5; break;
case FUNIT_MM : bMetr = true; nKomma=3; break;
case FUNIT_CM : bMetr = true; nKomma=2; break;
@@ -781,7 +780,7 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, boo
case FUNIT_INCH : bInch = true; break; // 1" = 1"
case FUNIT_FOOT : bInch = true; rnMul=12; break; // 1Ft = 12"
case FUNIT_MILE : bInch = true; rnMul=6336; nKomma=-1; break; // 1mile = 63360"
- // sonstiges
+ // others
case FUNIT_CUSTOM : break;
case FUNIT_PERCENT : nKomma=2; break;
// TODO: Add code to handle the following (added to remove warning)
@@ -799,7 +798,7 @@ void SdrFormatter::Undirty()
bool bSrcMetr,bSrcInch,bDstMetr,bDstInch;
long nMul1,nDiv1,nMul2,nDiv2;
short nKomma1,nKomma2;
- // Zunaechst normalisieren auf m bzw. "
+ // first: normalize to m or in
if (!bSrcFU) {
GetMeterOrInch(eSrcMU,nKomma1,nMul1,nDiv1,bSrcMetr,bSrcInch);
} else {
@@ -823,7 +822,7 @@ void SdrFormatter::Undirty()
nDiv1*=254;
}
- // Temporaere Fraction zum Kuerzen
+ // temporary fraction for canceling
Fraction aTempFract(nMul1,nDiv1);
nMul1=aTempFract.GetNumerator();
nDiv1=aTempFract.GetDenominator();
@@ -846,7 +845,7 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
return;
}
- // Hier fallen trotzdem evtl. Nachkommastellen weg, wg. MulDiv statt Real
+ // we may lose some decimal places here, because of MulDiv instead of Real
sal_Bool bNeg(nVal < 0);
SvtSysLocale aSysLoc;
const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
@@ -878,7 +877,7 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
if(nK > 0 && aStr.Len() <= nK )
{
- // Komma erforderlich
+ // decimal separator necessary
sal_Int16 nAnz(nK - aStr.Len());
if(nAnz >= 0 && rLoc.isNumLeadingZero())
@@ -887,25 +886,25 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
for(xub_StrLen i=0; i<nAnz; i++)
aStr.Insert(aNullCode, 0);
- // zuviele Nachkommastellen abhacken
+ // remove superfluous decimal points
xub_StrLen nNumDigits(rLoc.getNumDigits());
xub_StrLen nWeg(nK - nNumDigits);
if(nWeg > 0)
{
- // hier muesste eigentlich noch gerundet werden!
+ // TODO: we should round here
aStr.Erase(aStr.Len() - nWeg);
nK = nNumDigits;
}
}
- // Vorkommastellen fuer spaeter merken
+ // remember everything before the decimal separator for later
xub_StrLen nVorKomma(aStr.Len() - nK);
if(nK > 0)
{
- // KommaChar einfuegen
- // erstmal trailing Zeros abhacken
+ // insert KommaChar (decimal separator)
+ // remove trailing zeros
while(nK > 0 && aStr.GetChar(aStr.Len() - 1) == aNullCode)
{
aStr.Erase(aStr.Len() - 1);
@@ -914,13 +913,13 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
if(nK > 0)
{
- // na, noch Nachkommastellen da?
+ // do we still have decimal places?
sal_Unicode cDec(rLoc.getNumDecimalSep().GetChar(0));
aStr.Insert(cDec, nVorKomma);
}
}
- // ggf. Trennpunkte bei jedem Tausender einfuegen
+ // add in thousands separator (if necessary)
if( nVorKomma > 3 )
{
String aThoSep( rLoc.getNumThousandSep() );
@@ -952,7 +951,7 @@ void SdrFormatter::TakeUnitStr(MapUnit eUnit, XubString& rStr)
{
switch(eUnit)
{
- // Metrisch
+ // metrically
case MAP_100TH_MM :
{
rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm"));
@@ -1007,7 +1006,7 @@ void SdrFormatter::TakeUnitStr(MapUnit eUnit, XubString& rStr)
break;
}
- // Sonstiges
+ // others
case MAP_PIXEL :
{
rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pixel"));
@@ -1045,7 +1044,7 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr)
break;
}
- // Metrisch
+ // metrically
case FUNIT_100TH_MM:
{
rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm"));
@@ -1106,7 +1105,7 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr)
break;
}
- // sonstiges
+ // others
case FUNIT_PERCENT:
{
rStr = UniString();
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 975f76373ac3..481e4dacc7b9 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -35,7 +35,7 @@
#include <svx/svdlayer.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdview.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/scene3d.hxx>
#include <editeng/outlobj.hxx>
@@ -75,7 +75,7 @@ void SdrUndoAction::Repeat(SfxRepeatTarget& rView)
{
SdrView* pV=PTR_CAST(SdrView,&rView);
if (pV!=NULL) SdrRepeat(*pV);
- DBG_ASSERT(pV!=NULL,"Repeat: Uebergebenes SfxRepeatTarget ist keine SdrView");
+ DBG_ASSERT(pV!=NULL,"Repeat: SfxRepeatTarget that was handed over is not a SdrView");
}
XubString SdrUndoAction::GetRepeatComment(SfxRepeatTarget& rView) const
@@ -290,7 +290,7 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSave
if(bIsGroup)
{
- // Aha, Gruppenobjekt
+ // it's a group object!
pUndoGroup = new SdrUndoGroup(*pObj->GetModel());
sal_uInt32 nObjAnz(pOL->GetObjCount());
@@ -381,7 +381,7 @@ void SdrUndoAttrObj::Undo()
// it also sets fit-to-size text to non-fit-to-size text and
// switches on autogrowheight (the default). That may lead to
// loosing the geometry size info for the object when it is
- // re-layouted from AdjustTextFrameWidthAndHeight(). This makes
+ // laid out again from AdjustTextFrameWidthAndHeight(). This makes
// rescuing the size of the object necessary.
const Rectangle aSnapRect = pObj->GetSnapRect();
@@ -415,7 +415,7 @@ void SdrUndoAttrObj::Undo()
pObj->SetMergedItemSet(*pUndoSet);
}
- // Restore prev size here when it was changed.
+ // Restore previous size here when it was changed.
if(aSnapRect != pObj->GetSnapRect())
{
pObj->NbcSetSnapRect(aSnapRect);
@@ -482,7 +482,7 @@ void SdrUndoAttrObj::Redo()
pObj->SetMergedItemSet(*pRedoSet);
}
- // Restore prev size here when it was changed.
+ // Restore previous size here when it was changed.
if(aSnapRect != pObj->GetSnapRect())
{
pObj->NbcSetSnapRect(aSnapRect);
@@ -604,8 +604,9 @@ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj):
SdrObjList* pOL=rNewObj.GetSubList();
if (pOL!=NULL && pOL->GetObjCount() && !rNewObj.ISA(E3dScene))
{
- // Aha, Gruppenobjekt
- // Aber keine 3D-Szene, dann nur fuer die Szene selbst den Undo anlegen
+ // this is a group object!
+ // If this were 3D scene, we'd only add an Undo for the scene itself
+ // (which we do elsewhere).
pUndoGroup=new SdrUndoGroup(*pObj->GetModel());
sal_uIntPtr nObjAnz=pOL->GetObjCount();
for (sal_uIntPtr nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
@@ -690,10 +691,10 @@ SdrUndoObjList::~SdrUndoObjList()
{
if (pObj!=NULL && IsOwner())
{
- // Attribute muessen wieder in den regulaeren Pool
+ // Attribute have to go back to the regular Pool
SetOwner(sal_False);
- // nun loeschen
+ // now delete
SdrObject::Free( pObj );
}
}
@@ -710,12 +711,12 @@ void SdrUndoRemoveObj::Undo()
// Trigger PageChangeCall
ImpShowPageOfThisObject();
- DBG_ASSERT(!pObj->IsInserted(),"UndoRemoveObj: pObj ist bereits Inserted");
+ DBG_ASSERT(!pObj->IsInserted(),"UndoRemoveObj: pObj has already been inserted.");
if (!pObj->IsInserted())
{
// #i11426#
// For UNDOs in Calc/Writer it is necessary to adapt the anchor
- // pos of the target object.
+ // position of the target object.
Point aOwnerAnchorPos(0, 0);
if(pObjList
@@ -739,7 +740,7 @@ void SdrUndoRemoveObj::Undo()
void SdrUndoRemoveObj::Redo()
{
- DBG_ASSERT(pObj->IsInserted(),"RedoRemoveObj: pObj ist nicht Inserted");
+ DBG_ASSERT(pObj->IsInserted(),"RedoRemoveObj: pObj is not inserted.");
if (pObj->IsInserted())
{
ImplUnmarkObject( pObj );
@@ -758,7 +759,7 @@ void SdrUndoInsertObj::Undo()
// Trigger PageChangeCall
ImpShowPageOfThisObject();
- DBG_ASSERT(pObj->IsInserted(),"UndoInsertObj: pObj ist nicht Inserted");
+ DBG_ASSERT(pObj->IsInserted(),"UndoInsertObj: pObj is not inserted.");
if (pObj->IsInserted())
{
ImplUnmarkObject( pObj );
@@ -773,12 +774,12 @@ void SdrUndoInsertObj::Undo()
void SdrUndoInsertObj::Redo()
{
- DBG_ASSERT(!pObj->IsInserted(),"RedoInsertObj: pObj ist bereits Inserted");
+ DBG_ASSERT(!pObj->IsInserted(),"RedoInsertObj: pObj is already inserted");
if (!pObj->IsInserted())
{
// Restore anchor position of an object,
// which becomes a member of a group, because its cleared in method
- // <InsertObject(..)>. Needed for correct ReDo in Writer. (#i45952#)
+ // <InsertObject(..)>. Needed for correct Redo in Writer. (#i45952#)
Point aAnchorPos( 0, 0 );
if ( pObjList &&
pObjList->GetOwnerObj() &&
@@ -806,14 +807,14 @@ void SdrUndoInsertObj::Redo()
void SdrUndoDelObj::Undo()
{
SdrUndoRemoveObj::Undo();
- DBG_ASSERT(IsOwner(),"UndoDeleteObj: pObj gehoert nicht der UndoAction");
+ DBG_ASSERT(IsOwner(),"UndoDeleteObj: pObj does not belong to UndoAction");
SetOwner(sal_False);
}
void SdrUndoDelObj::Redo()
{
SdrUndoRemoveObj::Redo();
- DBG_ASSERT(!IsOwner(),"RedoDeleteObj: pObj gehoert bereits der UndoAction");
+ DBG_ASSERT(!IsOwner(),"RedoDeleteObj: pObj already belongs to UndoAction");
SetOwner(sal_True);
}
@@ -846,14 +847,14 @@ XubString SdrUndoDelObj::GetSdrRepeatComment(SdrView& /*rView*/) const
void SdrUndoNewObj::Undo()
{
SdrUndoInsertObj::Undo();
- DBG_ASSERT(!IsOwner(),"RedoNewObj: pObj gehoert bereits der UndoAction");
+ DBG_ASSERT(!IsOwner(),"RedoNewObj: pObj already belongs to UndoAction");
SetOwner(sal_True);
}
void SdrUndoNewObj::Redo()
{
SdrUndoInsertObj::Redo();
- DBG_ASSERT(IsOwner(),"RedoNewObj: pObj gehoert nicht der UndoAction");
+ DBG_ASSERT(IsOwner(),"RedoNewObj: pObj does not belong to UndoAction");
SetOwner(sal_False);
}
@@ -891,18 +892,18 @@ SdrUndoReplaceObj::~SdrUndoReplaceObj()
{
if (pObj!=NULL && IsOldOwner())
{
- // Attribute muessen wieder in den regulaeren Pool
+ // Attribute have to go back into the Pool
SetOldOwner(sal_False);
- // nun loeschen
+ // now delete
SdrObject::Free( pObj );
}
if (pNewObj!=NULL && IsNewOwner())
{
- // Attribute muessen wieder in den regulaeren Pool
+ // Attribute have to go back into the Pool
SetNewOwner(sal_False);
- // nun loeschen
+ // now delete
SdrObject::Free( pNewObj );
}
}
@@ -914,8 +915,8 @@ void SdrUndoReplaceObj::Undo()
if (IsOldOwner() && !IsNewOwner())
{
- DBG_ASSERT(!pObj->IsInserted(),"SdrUndoReplaceObj::Undo(): Altes Objekt ist bereits inserted!");
- DBG_ASSERT(pNewObj->IsInserted(),"SdrUndoReplaceObj::Undo(): Neues Objekt ist nicht inserted!");
+ DBG_ASSERT(!pObj->IsInserted(),"SdrUndoReplaceObj::Undo(): Old object is already inserted!");
+ DBG_ASSERT(pNewObj->IsInserted(),"SdrUndoReplaceObj::Undo(): New object is not inserted!");
SetOldOwner(sal_False);
SetNewOwner(sal_True);
@@ -924,7 +925,7 @@ void SdrUndoReplaceObj::Undo()
}
else
{
- OSL_FAIL("SdrUndoReplaceObj::Undo(): IsMine-Flags stehen verkehrt. Doppelter Undo-Aufruf?");
+ OSL_FAIL("SdrUndoReplaceObj::Undo(): Wrong IsMine flags. Did you call Undo twice?");
}
}
@@ -932,8 +933,8 @@ void SdrUndoReplaceObj::Redo()
{
if (!IsOldOwner() && IsNewOwner())
{
- DBG_ASSERT(!pNewObj->IsInserted(),"SdrUndoReplaceObj::Redo(): Neues Objekt ist bereits inserted!");
- DBG_ASSERT(pObj->IsInserted(),"SdrUndoReplaceObj::Redo(): Altes Objekt ist nicht inserted!");
+ DBG_ASSERT(!pNewObj->IsInserted(),"SdrUndoReplaceObj::Redo(): New object is already inserted!!");
+ DBG_ASSERT(pObj->IsInserted(),"SdrUndoReplaceObj::Redo(): Old object is not inserted!!");
SetOldOwner(sal_True);
SetNewOwner(sal_False);
@@ -943,7 +944,7 @@ void SdrUndoReplaceObj::Redo()
}
else
{
- OSL_FAIL("SdrUndoReplaceObj::Redo(): IsMine-Flags stehen verkehrt. Doppelter Redo-Aufruf?");
+ OSL_FAIL("SdrUndoReplaceObj::Redo(): Wrong IsMine flags. Did you call Redo twice?");
}
// Trigger PageChangeCall
@@ -1007,7 +1008,7 @@ void SdrUndoObjOrdNum::Undo()
SdrObjList* pOL=pObj->GetObjList();
if (pOL==NULL) {
- OSL_FAIL("UndoObjOrdNum: pObj hat keine ObjList");
+ OSL_FAIL("UndoObjOrdNum: pObj does not have an ObjList.");
return;
}
pOL->SetObjectOrdNum(nNewOrdNum,nOldOrdNum);
@@ -1017,7 +1018,7 @@ void SdrUndoObjOrdNum::Redo()
{
SdrObjList* pOL=pObj->GetObjList();
if (pOL==NULL) {
- OSL_FAIL("RedoObjOrdNum: pObj hat keine ObjList");
+ OSL_FAIL("RedoObjOrdNum: pObj does not have an ObjList.");
return;
}
pOL->SetObjectOrdNum(nOldOrdNum,nNewOrdNum);
@@ -1074,11 +1075,11 @@ void SdrUndoObjSetText::Undo()
// Trigger PageChangeCall
ImpShowPageOfThisObject();
- // alten Text sichern fuer Redo
+ // save old text for Redo
if (!bNewTextAvailable)
AfterSetText();
- // Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung
+ // copy text for Undo, because the original now belongs to SetOutlinerParaObject()
OutlinerParaObject* pText1 = pOldText;
if(pText1)
pText1 = new OutlinerParaObject(*pText1);
@@ -1093,7 +1094,7 @@ void SdrUndoObjSetText::Undo()
void SdrUndoObjSetText::Redo()
{
- // Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung
+ // copy text for Undo, because the original now belongs to SetOutlinerParaObject()
OutlinerParaObject* pText1 = pNewText;
if(pText1)
@@ -1278,18 +1279,18 @@ SdrUndoLayer::~SdrUndoLayer()
void SdrUndoNewLayer::Undo()
{
- DBG_ASSERT(!bItsMine,"SdrUndoNewLayer::Undo(): Layer gehoert bereits der UndoAction");
+ DBG_ASSERT(!bItsMine,"SdrUndoNewLayer::Undo(): Layer already belongs to UndoAction.");
bItsMine=sal_True;
#ifdef DBG_UTIL
SdrLayer* pCmpLayer=
#endif
pLayerAdmin->RemoveLayer(nNum);
- DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoNewLayer::Undo(): Removter Layer ist != pLayer");
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoNewLayer::Undo(): Removed layer is != pLayer.");
}
void SdrUndoNewLayer::Redo()
{
- DBG_ASSERT(bItsMine,"SdrUndoNewLayer::Undo(): Layer gehoert nicht der UndoAction");
+ DBG_ASSERT(bItsMine,"SdrUndoNewLayer::Undo(): Layer does not belong to UndoAction.");
bItsMine=sal_False;
pLayerAdmin->InsertLayer(pLayer,nNum);
}
@@ -1303,20 +1304,20 @@ XubString SdrUndoNewLayer::GetComment() const
void SdrUndoDelLayer::Undo()
{
- DBG_ASSERT(bItsMine,"SdrUndoDelLayer::Undo(): Layer gehoert nicht der UndoAction");
+ DBG_ASSERT(bItsMine,"SdrUndoDelLayer::Undo(): Layer does not belong to UndoAction.");
bItsMine=sal_False;
pLayerAdmin->InsertLayer(pLayer,nNum);
}
void SdrUndoDelLayer::Redo()
{
- DBG_ASSERT(!bItsMine,"SdrUndoDelLayer::Undo(): Layer gehoert bereits der UndoAction");
+ DBG_ASSERT(!bItsMine,"SdrUndoDelLayer::Undo(): Layer already belongs to UndoAction.");
bItsMine=sal_True;
#ifdef DBG_UTIL
SdrLayer* pCmpLayer=
#endif
pLayerAdmin->RemoveLayer(nNum);
- DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoDelLayer::Redo(): Removter Layer ist != pLayer");
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoDelLayer::Redo(): Removed layer is != pLayer.");
}
XubString SdrUndoDelLayer::GetComment() const
@@ -1332,7 +1333,7 @@ void SdrUndoMoveLayer::Undo()
SdrLayer* pCmpLayer=
#endif
pLayerAdmin->RemoveLayer(nNeuPos);
- DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Undo(): Removter Layer ist != pLayer");
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Undo(): Removed layer is != pLayer.");
pLayerAdmin->InsertLayer(pLayer,nNum);
}
@@ -1342,7 +1343,7 @@ void SdrUndoMoveLayer::Redo()
SdrLayer* pCmpLayer=
#endif
pLayerAdmin->RemoveLayer(nNum);
- DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Redo(): Removter Layer ist != pLayer");
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Redo(): Removed layer is != pLayer.");
pLayerAdmin->InsertLayer(pLayer,nNeuPos);
}
@@ -1360,7 +1361,7 @@ SdrUndoPage::SdrUndoPage(SdrPage& rNewPg)
void SdrUndoPage::ImpInsertPage(sal_uInt16 nNum)
{
- DBG_ASSERT(!mrPage.IsInserted(),"SdrUndoPage::ImpInsertPage(): mrPage ist bereits Inserted");
+ DBG_ASSERT(!mrPage.IsInserted(),"SdrUndoPage::ImpInsertPage(): mrPage is already inserted.");
if (!mrPage.IsInserted()) {
if (mrPage.IsMasterPage()) {
rMod.InsertMasterPage(&mrPage,nNum);
@@ -1372,7 +1373,7 @@ void SdrUndoPage::ImpInsertPage(sal_uInt16 nNum)
void SdrUndoPage::ImpRemovePage(sal_uInt16 nNum)
{
- DBG_ASSERT(mrPage.IsInserted(),"SdrUndoPage::ImpRemovePage(): mrPage ist nicht Inserted");
+ DBG_ASSERT(mrPage.IsInserted(),"SdrUndoPage::ImpRemovePage(): mrPage is not inserted.");
if (mrPage.IsInserted()) {
SdrPage* pChkPg=NULL;
if (mrPage.IsMasterPage()) {
@@ -1387,7 +1388,7 @@ void SdrUndoPage::ImpRemovePage(sal_uInt16 nNum)
void SdrUndoPage::ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum)
{
- DBG_ASSERT(mrPage.IsInserted(),"SdrUndoPage::ImpMovePage(): mrPage ist nicht Inserted");
+ DBG_ASSERT(mrPage.IsInserted(),"SdrUndoPage::ImpMovePage(): mrPage is not inserted.");
if (mrPage.IsInserted()) {
if (mrPage.IsMasterPage()) {
rMod.MoveMasterPage(nOldNum,nNewNum);
@@ -1427,7 +1428,7 @@ SdrUndoDelPage::SdrUndoDelPage(SdrPage& rNewPg):
{
bItsMine = sal_True;
- // Und nun ggf. die MasterPage-Beziehungen merken
+ // now remember the master page relationships
if(mrPage.IsMasterPage())
{
sal_uInt16 nPageAnz(rMod.GetPageCount());
@@ -1464,18 +1465,18 @@ SdrUndoDelPage::~SdrUndoDelPage()
void SdrUndoDelPage::Undo()
{
ImpInsertPage(nPageNum);
- if (pUndoGroup!=NULL) { // MasterPage-Beziehungen wiederherstellen
+ if (pUndoGroup!=NULL) { // recover master page relationships
pUndoGroup->Undo();
}
- DBG_ASSERT(bItsMine,"UndoDeletePage: mrPage gehoert nicht der UndoAction");
+ DBG_ASSERT(bItsMine,"UndoDeletePage: mrPage does not belong to UndoAction.");
bItsMine=sal_False;
}
void SdrUndoDelPage::Redo()
{
ImpRemovePage(nPageNum);
- // Die MasterPage-Beziehungen werden ggf. von selbst geloesst
- DBG_ASSERT(!bItsMine,"RedoDeletePage: mrPage gehoert bereits der UndoAction");
+ // master page relations are dissolved automatically
+ DBG_ASSERT(!bItsMine,"RedoDeletePage: mrPage already belongs to UndoAction.");
bItsMine=sal_True;
}
@@ -1507,14 +1508,14 @@ bool SdrUndoDelPage::CanSdrRepeat(SdrView& /*rView*/) const
void SdrUndoNewPage::Undo()
{
ImpRemovePage(nPageNum);
- DBG_ASSERT(!bItsMine,"UndoNewPage: mrPage gehoert bereits der UndoAction");
+ DBG_ASSERT(!bItsMine,"UndoNewPage: mrPage already belongs to UndoAction.");
bItsMine=sal_True;
}
void SdrUndoNewPage::Redo()
{
ImpInsertPage(nPageNum);
- DBG_ASSERT(bItsMine,"RedoNewPage: mrPage gehoert nicht der UndoAction");
+ DBG_ASSERT(bItsMine,"RedoNewPage: mrPage does not belong to UndoAction.");
bItsMine=sal_False;
}
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 1b2c3b119a07..f9c97d7d4978 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -28,16 +28,16 @@
#include <editeng/eeitem.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/svdpagv.hxx>
#include <svx/svdmrkv.hxx>
#include <svx/svdedxv.hxx>
#include <svx/svdobj.hxx>
-#include <svx/svdopath.hxx> // fuer GetContext
-#include <svx/svdograf.hxx> // fuer GetContext
-#include <svx/svdomedia.hxx> // fuer GetContext
-#include <svx/svdetc.hxx> // Fuer SdrEngineDefaults
+#include <svx/svdopath.hxx> // for GetContext
+#include <svx/svdograf.hxx> // for GetContext
+#include <svx/svdomedia.hxx> // for GetContext
+#include <svx/svdetc.hxx> // for SdrEngineDefaults
#ifdef DBG_UTIL
#include <svdibrow.hxx>
@@ -45,8 +45,8 @@
#include "svx/svdoutl.hxx"
#include "svx/svdview.hxx"
-#include "editeng/editview.hxx" // fuer GetField
-#include "editeng/flditem.hxx" // fuer URLField
+#include "editeng/editview.hxx" // for GetField
+#include "editeng/flditem.hxx" // for URLField
#include "svx/obj3d.hxx"
#include "svx/svddrgmt.hxx"
#include "svx/svdoutl.hxx"
@@ -297,28 +297,28 @@ SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, sal_uInt16 nEventKind,
return PickAnything(aPnt,rVEvt);
}
-// Mit der Maus draggen (Move)
-// Beispiel beim erzeugen eines Rechtecks. MouseDown muss ohne
-// ModKey erfolgen, weil sonst i.d.R. Markieren forciert wird (s.u.)
-// Drueckt man dann beim MouseMove gleichzeitig Shift, Ctrl, und Alt,
-// so erzeugt man ein zentrisches Quadrat ohne Fang.
-// Die Doppelbelegung von Ortho und Shift stellt i.d.R. kein Problem dar,
-// da sich beides meisst gegenseitig ausschliesst. Einzig Shear (das beim
-// Verzerren, nicht dass beim Drehen) beruecksichtigt beides gleichzeitig.
-// Dass muss der Anwender erstmal noch umschiffen (z.B. mit einer Hilfslinie).
-#define MODKEY_NoSnap bCtrl /* Fang temporaer aus */
-#define MODKEY_Ortho bShift /* na eben ortho */
-#define MODKEY_Center bAlt /* Zentrisch erzeugen/resizen */
+// Dragging with the Mouse (Move)
+// Example when creating a rectangle: MouseDown has to happen without a ModKey,
+// else we usually force a selection (see below).
+// When pressing Shift, Ctrl and Alt at the same time while doing a MouseMove,
+// a centered, not snapped square is created.
+// The dual allocation of Ortho and Shift won't usually create a problem, as the
+// two functions are in most cases mutually exclusive. Only shearing (the kind
+// that happens when contorting, not when rotating) can use both functions at
+// the same time. To get around this, the user can use e. g. help lines.
+#define MODKEY_NoSnap bCtrl /* temporarily disable snapping */
+#define MODKEY_Ortho bShift /* ortho */
+#define MODKEY_Center bAlt /* create/resize centeredly */
#define MODKEY_AngleSnap bShift
-#define MODKEY_CopyDrag bCtrl /* Draggen mit kopieren */
+#define MODKEY_CopyDrag bCtrl /* drag and copy */
-// irgendwo hinklicken (MouseDown)
-#define MODKEY_PolyPoly bAlt /* Neues Poly bei InsPt und bei Create */
-#define MODKEY_MultiMark bShift /* MarkObj ohne vorher UnmarkAll */
-#define MODKEY_Unmark bAlt /* Unmark durch Rahmenaufziehen */
-#define MODKEY_ForceMark bCtrl /* Rahmenaufziehen erzwingen, auch wenn Obj an MausPos */
+// click somewhere (MouseDown)
+#define MODKEY_PolyPoly bAlt /* new Poly at InsPt and at Create */
+#define MODKEY_MultiMark bShift /* MarkObj without doing UnmarkAll first */
+#define MODKEY_Unmark bAlt /* deselect with a dragged frame */
+#define MODKEY_ForceMark bCtrl /* force dragging a frame, even if there's an object at cursor position */
#define MODKEY_DeepMark bAlt /* MarkNextObj */
-#define MODKEY_DeepBackw bShift /* MarkNextObj rueckwaerts */
+#define MODKEY_DeepBackw bShift /* MarkNextObj but backwards */
SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const
{
@@ -328,7 +328,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
pOut = GetFirstOutputDevice();
}
- // #i73628# Use a non-changeable copy of he logic pos
+ // #i73628# Use a non-changeable copy of he logic position
const Point aLocalLogicPosition(rLogicPos);
sal_Bool bEditMode=IsEditMode();
@@ -357,15 +357,15 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
else if (pHdl!=NULL)
{
- eHit=SDRHIT_HANDLE; // Handle getroffen hat hoechste Prioritaet
+ eHit=SDRHIT_HANDLE; // handle is hit: highest priority
}
else if (bEditMode && IsHlplVisible() && IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,nHitTolLog,*pOut,nHlplIdx,pPV))
{
- eHit=SDRHIT_HELPLINE; // Hilfslinie im Vordergrund getroffen zum verschieben
+ eHit=SDRHIT_HELPLINE; // help line in the foreground hit: can be moved now
}
else if (bGluePointMode && PickGluePoint(aLocalLogicPosition,pObj,nGlueId,pPV))
{
- eHit=SDRHIT_GLUEPOINT; // nichtmarkierter Klebepunkt getroffen
+ eHit=SDRHIT_GLUEPOINT; // deselected glue point hit
}
else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_MARKED,&pObj,NULL,&nHitPassNum))
{
@@ -389,7 +389,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE,&pObj,NULL,&nHitPassNum))
{
- // MasterPages und WholePage fuer Macro und URL
+ // MasterPages and WholePage for Macro and URL
eHit=SDRHIT_UNMARKEDOBJECT;
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( pObj );
if( pTableObj )
@@ -410,13 +410,13 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,nHitTolLog,*pOut,nHlplIdx,pPV))
{
- eHit=SDRHIT_HELPLINE; // Hilfslinie im Vordergrund getroffen zum verschieben
+ eHit=SDRHIT_HELPLINE; // help line in foreground hit: can be moved now
}
if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT)
{
bool bRoot=pObj->HasMacro();
sal_Bool bDeep=pObj!=pHitObj && pHitObj->HasMacro();
- sal_Bool bMid=sal_False; // Gruppierte Gruppe mit Macro getroffen?
+ sal_Bool bMid=sal_False; // Have we hit upon a grouped group with a macro?
SdrObject* pMidObj=NULL;
if (pObj!=pHitObj)
{
@@ -448,7 +448,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
if (bRoot) bRoot=pObj->IsMacroHit(aHitRec);
if (bRoot || bMid || bDeep)
{
- // Prio: 1.Root, 2.Mid, 3.Deep
+ // Priorities: 1. Root, 2. Mid, 3. Deep
rVEvt.pRootObj=pObj;
if (!bRoot) pObj=pMidObj;
if (!bRoot && !bMid) pObj=pHitObj;
@@ -456,7 +456,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
}
}
- // auf URL-Field checken
+ // check for URL field
if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT)
{
SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pHitObj);
@@ -478,17 +478,17 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
// #i73628# Use a text-relative position for hit test in hit test outliner
Point aTemporaryTextRelativePosition(aLocalLogicPosition - aTextRect.TopLeft());
- // FitToSize berueksichtigen
+ // account for FitToSize
bool bFitToSize(pTextObj->IsFitToSize());
if (bFitToSize) {
Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1);
Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1);
ResizePoint(aTemporaryTextRelativePosition,Point(),aX,aY);
}
- // Drehung berueksichtigen
+ // account for rotation
const GeoStat& rGeo=pTextObj->GetGeoStat();
- if (rGeo.nDrehWink!=0) RotatePoint(aTemporaryTextRelativePosition,Point(),-rGeo.nSin,rGeo.nCos); // -sin fuer Unrotate
- // Laufschrift berueksichtigen fehlt noch ...
+ if (rGeo.nDrehWink!=0) RotatePoint(aTemporaryTextRelativePosition,Point(),-rGeo.nSin,rGeo.nCos); // -sin for Unrotate
+ // we currently don't account for ticker text
if(pActualOutDev && pActualOutDev->GetOutDevType() == OUTDEV_WINDOW)
{
OutlinerView aOLV(pOutliner, (Window*)pActualOutDev);
@@ -511,7 +511,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
(eHit==SDRHIT_MARKEDOBJECT || eHit==SDRHIT_UNMARKEDOBJECT) &&
(IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit())
{
- // Ringsum die TextEditArea ein Rand zum Selektieren ohne Textedit
+ // Around the TextEditArea there's a border to select without going into text edit mode.
Rectangle aBoundRect(pHitObj->GetCurrentBoundRect());
// Force to SnapRect when Fontwork
@@ -541,7 +541,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
bool bTEHit(pPV &&
SdrObjectPrimitiveHit(*pHitObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
- // TextEdit an Objekten im gesperrten Layer
+ // TextEdit attached to an object in a locked layer
if (pPV->GetLockedLayers().IsSet(pHitObj->GetLayer()))
{
bTEHit=sal_False;
@@ -624,12 +624,12 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
else if (eHit==SDRHIT_HELPLINE)
{
- eEvent=SDREVENT_BEGDRAGHELPLINE; // nix weiter
+ eEvent=SDREVENT_BEGDRAGHELPLINE; // nothing, actually
}
else if (eHit==SDRHIT_GLUEPOINT)
{
eEvent=SDREVENT_MARKGLUEPOINT; // AddMark+Drag
- rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // falls bei Deep nicht getroffen
+ rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep
}
else if (eHit==SDRHIT_HANDLE)
{
@@ -658,7 +658,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
else if (bMarked)
{
- eEvent=SDREVENT_BEGDRAGOBJ; // MarkState nicht aendern, nur Drag
+ eEvent=SDREVENT_BEGDRAGOBJ; // don't change MarkState, only change Drag
}
}
}
@@ -675,7 +675,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
{
eEvent=SDREVENT_BEGTEXTEDIT; // AddMark+Drag,DeepMark+Drag,Unmark
if (MODKEY_MultiMark || MODKEY_DeepMark)
- { // falls bei Deep nicht getroffen
+ { // if not hit with Deep
eEvent=SDREVENT_MARKOBJ;
}
}
@@ -683,7 +683,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
{
eEvent=SDREVENT_BEGMACROOBJ; // AddMark+Drag
if (MODKEY_MultiMark || MODKEY_DeepMark)
- { // falls bei Deep nicht getroffen
+ { // if not hit with Deep
eEvent=SDREVENT_MARKOBJ;
}
}
@@ -691,7 +691,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
{
eEvent=SDREVENT_EXECUTEURL; // AddMark+Drag
if (MODKEY_MultiMark || MODKEY_DeepMark)
- { // falls bei Deep nicht getroffen
+ { // if not hit with Deep
eEvent=SDREVENT_MARKOBJ;
}
}
@@ -700,13 +700,13 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
eEvent=SDREVENT_BEGDRAGOBJ; // DeepMark+Drag,Unmark
if (MODKEY_MultiMark || MODKEY_DeepMark)
- { // falls bei Deep nicht getroffen
+ { // if not hit with Deep
eEvent=SDREVENT_MARKOBJ;
}
}
else if (IsCreateMode())
{
- eEvent=SDREVENT_BEGCREATEOBJ; // Nix weiter
+ eEvent=SDREVENT_BEGCREATEOBJ; // nothing, actually
}
else if (eHit==SDRHIT_UNMARKEDOBJECT)
{
@@ -719,7 +719,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
if (eEvent==SDREVENT_MARKOBJ)
{
- rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // falls bei Deep nicht getroffen
+ rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep
rVEvt.bPrevNextMark=MODKEY_DeepMark;
rVEvt.bMarkPrev=MODKEY_DeepMark && MODKEY_DeepBackw;
}
@@ -770,7 +770,7 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
if (bMouseLeft) aDragStat.SetMouseDown(sal_True);
} else if (bMouseUp) {
if (bMouseLeft) aDragStat.SetMouseDown(sal_False);
- } else { // ansonsten MoueMove
+ } else { // else, MouseMove
aDragStat.SetMouseDown(bMouseLeft);
}
@@ -795,13 +795,13 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
SetCrookAtCenter(MODKEY_Center);
#endif
if (bMouseLeft && bMouseDown && rVEvt.bIsTextEdit && (eHit==SDRHIT_UNMARKEDOBJECT || eHit==SDRHIT_NONE)) {
- SdrEndTextEdit(); // Danebengeklickt, Ende mit Edit
- // pHdl ist dann ungueltig. Sollte aber egal sein, wein pHdl==NULL
- // sein muesste (wg. eHit).
+ SdrEndTextEdit(); // User has clicked beneath object, exit edit mode.
+ // pHdl is invalid, then, that shouldn't matter, though, as we expect
+ // pHdl==NULL (because of eHit).
}
switch (rVEvt.eEvent) {
case SDREVENT_NONE: bRet=sal_False; break;
- case SDREVENT_TEXTEDIT: bRet=sal_False; break; // Events an die OutlinerView werden hier nicht beruecksichtigt
+ case SDREVENT_TEXTEDIT: bRet=sal_False; break; // Events handled by the OutlinerView are not taken into account here.
case SDREVENT_MOVACTION: MovAction(aLogicPos); bRet=sal_True; break;
case SDREVENT_ENDACTION: EndAction(); bRet=sal_True; break;
case SDREVENT_BCKACTION: BckAction(); bRet=sal_True; break;
@@ -810,19 +810,19 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
case SDREVENT_BRKMARK : {
BrkAction();
if (!MarkObj(aLogicPos,nHitTolLog,rVEvt.bAddMark)) {
- // Kein Obj getroffen. Dann werden zuerst
- // - Markierte Klebepunkte deselektiert
- // - dann ggf. selektierte Polygonpunkte
- // - und ansonsten Objekte
+ // No object hit. Do the following:
+ // 1. deselect any selected glue points
+ // 2. deselect any selected polygon points
+ // 3. deselect any selected objects
if (!rVEvt.bAddMark) UnmarkAll();
}
bRet=sal_True;
} break;
- case SDREVENT_ENDCREATE: { // ggf. MarkObj
+ case SDREVENT_ENDCREATE: { // if necessary, MarkObj
SdrCreateCmd eCmd=SDRCREATE_NEXTPOINT;
if (MODKEY_PolyPoly) eCmd=SDRCREATE_NEXTOBJECT;
if (rVEvt.nMouseClicks>1) eCmd=SDRCREATE_FORCEEND;
- if (!EndCreateObj(eCmd)) { // Event fuer Create nicht ausgewerten? -> Markieren
+ if (!EndCreateObj(eCmd)) { // Don't evaluate event for Create? -> Select
if (eHit==SDRHIT_UNMARKEDOBJECT || eHit==SDRHIT_TEXTEDIT) {
MarkObj(rVEvt.pRootObj,rVEvt.pPV);
if (eHit==SDRHIT_TEXTEDIT)
@@ -837,20 +837,20 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
OutlinerView* pOLV=GetTextEditOutlinerView();
if (pOLV!=NULL) {
- pOLV->MouseButtonDown(aMEvt); // Event an den Outliner, aber ohne Doppelklick
- pOLV->MouseButtonUp(aMEvt); // Event an den Outliner, aber ohne Doppelklick
+ pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
+ pOLV->MouseButtonUp(aMEvt); // event for the Outliner, but without double-click
}
}
}
- bRet=sal_True; // Obj markiert und ggf. TextEdit gestartet
- } else bRet=sal_False; // Create abgebrochen, sonst nix weiter.
- } else bRet=sal_True; // EndCreate mit sal_True returniert
+ bRet=sal_True; // object is selected and (if necessary) TextEdit is started
+ } else bRet=sal_False; // canceled Create, nothing else
+ } else bRet=sal_True; // return sal_True for EndCreate
} break;
case SDREVENT_ENDDRAG: {
bRet=EndDragObj(IsDragWithCopy());
- ForceMarkedObjToAnotherPage(); // Undo+Klammerung fehlt noch !!!
+ ForceMarkedObjToAnotherPage(); // TODO: Undo+bracing missing!
} break;
- case SDREVENT_MARKOBJ: { // + ggf. BegDrag
+ case SDREVENT_MARKOBJ: { // + (if applicable) BegDrag
if (!rVEvt.bAddMark) UnmarkAllObj();
sal_Bool bUnmark=rVEvt.bUnmark;
if (rVEvt.bPrevNextMark) {
@@ -868,7 +868,7 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
bRet=sal_True;
}
} break;
- case SDREVENT_MARKPOINT: { // + ggf. BegDrag
+ case SDREVENT_MARKPOINT: { // + (if applicable) BegDrag
if (!rVEvt.bAddMark) UnmarkAllPoints();
if (rVEvt.bPrevNextMark) {
bRet=MarkNextPoint(aLogicPos,rVEvt.bMarkPrev);
@@ -880,7 +880,7 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
bRet=sal_True;
}
} break;
- case SDREVENT_MARKGLUEPOINT: { // + ggf. BegDrag
+ case SDREVENT_MARKGLUEPOINT: { // + (if applicable) BegDrag
if (!rVEvt.bAddMark) UnmarkAllGluePoints();
if (rVEvt.bPrevNextMark) {
bRet=MarkNextGluePoint(aLogicPos,rVEvt.bMarkPrev);
@@ -926,18 +926,18 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
MouseEvent aMEvt(pActualOutDev->LogicToPixel(aLogicPos),
1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
OutlinerView* pOLV=GetTextEditOutlinerView();
- if (pOLV!=NULL) pOLV->MouseButtonDown(aMEvt); // Event an den Outliner, aber ohne Doppelklick
+ if (pOLV!=NULL) pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
}
} break;
default: break;
} // switch
if (bRet && pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW) {
Window* pWin=(Window*)pActualOutDev;
- // Maus links gedrueckt?
+ // left mouse button pressed?
sal_Bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
- // Maus links losgelassen?
+ // left mouse button released?
sal_Bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
- // Maus links gedrueckt oder gehalten?
+ // left mouse button pressed or held?
sal_Bool bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp;
pWin->SetPointer(GetPreferedPointer(rVEvt.aLogicPos,pWin,
rVEvt.nMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1));
@@ -987,7 +987,7 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
else
return Pointer(POINTER_TEXT);
}
- // hier muss besser der Outliner was liefern:
+ // Outliner should return something here...
Point aPos(pOut->LogicToPixel(rMousePos));
Pointer aPointer(pTextEditOutlinerView->GetPointer(aPos));
if (aPointer==POINTER_ARROW)
@@ -1001,9 +1001,9 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
}
SdrViewEvent aVEvt;
- aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // um zu sehen, was bei MouseLeftDown passieren wuerde
- aVEvt.bMouseDown=!bLeftDown; // Was waere wenn ...
- aVEvt.bMouseUp=bLeftDown; // Was waere wenn ...
+ aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // to see what would happen on MouseLeftDown
+ aVEvt.bMouseDown=!bLeftDown; // What if ..?
+ aVEvt.bMouseUp=bLeftDown; // What if ..?
if (pOut!=NULL)
((SdrView*)this)->SetActualWin(pOut);
SdrHitKind eHit=PickAnything(rMousePos,aVEvt);
@@ -1062,14 +1062,14 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
sal_Bool bMarkHit=eHit==SDRHIT_MARKEDOBJECT;
SdrHdl* pHdl=aVEvt.pHdl;
- // Nun die Pointer fuer Dragging checken
+ // now check the pointers for draggingNun die Pointer fuer Dragging checken
if (pHdl!=NULL || bMarkHit) {
SdrHdlKind eHdl= pHdl!=NULL ? pHdl->GetKind() : HDL_MOVE;
sal_Bool bCorner=pHdl!=NULL && pHdl->IsCornerHdl();
sal_Bool bVertex=pHdl!=NULL && pHdl->IsVertexHdl();
sal_Bool bMov=eHdl==HDL_MOVE;
if (bMov && (eDragMode==SDRDRAG_MOVE || eDragMode==SDRDRAG_RESIZE || bMarkedHitMovesAlways)) {
- if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
+ if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible
return Pointer(POINTER_MOVE);
}
switch (eDragMode) {
@@ -1077,16 +1077,15 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
if ((bCorner || bMov) && !IsRotateAllowed(sal_True))
return Pointer(POINTER_NOTALLOWED);
- // Sind 3D-Objekte selektiert?
+ // are 3D objects selected?
sal_Bool b3DObjSelected = sal_False;
for (sal_uInt32 a=0; !b3DObjSelected && a<GetMarkedObjectCount(); a++) {
SdrObject* pObj = GetMarkedObjectByIndex(a);
if(pObj && pObj->ISA(E3dObject))
b3DObjSelected = sal_True;
}
- // Falls es um ein 3D-Objekt geht, muss trotz !IsShearAllowed
- // weitergemacht werden, da es sich um eine Rotation statt um
- // einen Shear handelt
+ // If we have a 3D object, go on despite !IsShearAllowed,
+ // because then we have a rotation instead of a shear.
if (bVertex && !IsShearAllowed() && !b3DObjSelected)
return Pointer(POINTER_NOTALLOWED);
if (bMov)
@@ -1099,7 +1098,7 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
}
if (bVertex && !IsShearAllowed()) return Pointer(POINTER_NOTALLOWED);
if (bMov) {
- if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
+ if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible
return Pointer(POINTER_MOVE);
}
} break;
@@ -1116,9 +1115,9 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
b45=b90 || (Abs(aDif.X())==Abs(aDif.Y()));
}
sal_Bool bNo=sal_False;
- if (!IsMirrorAllowed(sal_True,sal_True)) bNo=sal_True; // Spiegeln ueberhaupt nicht erlaubt
- if (!IsMirrorAllowed(sal_False,sal_False) && !b45) bNo=sal_True; // freies Spiegeln nicht erlaubt
- if (!IsMirrorAllowed(sal_True,sal_False) && !b90) bNo=sal_True; // Spiegeln hor/ver erlaubt
+ if (!IsMirrorAllowed(sal_True,sal_True)) bNo=sal_True; // any mirroring is forbidden
+ if (!IsMirrorAllowed(sal_False,sal_False) && !b45) bNo=sal_True; // mirroring freely is forbidden
+ if (!IsMirrorAllowed(sal_True,sal_False) && !b90) bNo=sal_True; // mirroring horizontally/vertically is allowed
if (bNo) return Pointer(POINTER_NOTALLOWED);
if (b90) {
return Pointer(POINTER_MIRROR);
@@ -1161,7 +1160,7 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
}
if (pHdl!=NULL) return pHdl->GetPointer();
if (bMov) {
- if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
+ if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible
return Pointer(POINTER_MOVE);
}
}
@@ -1174,7 +1173,7 @@ XubString SdrView::GetStatusText()
XubString aStr;
XubString aName;
- aStr.AppendAscii("nix");
+ aStr.AppendAscii("nothing");
if (pAktCreate!=NULL)
{
@@ -1234,7 +1233,7 @@ XubString SdrView::GetStatusText()
}
}
else if (IsTextEdit() && pTextEditOutlinerView!=NULL) {
- aStr=ImpGetResStr(STR_ViewTextEdit); // "TextEdit - Zeile y Spalte x";
+ aStr=ImpGetResStr(STR_ViewTextEdit); // "TextEdit - Row y, Column x";
ESelection aSel(pTextEditOutlinerView->GetSelection());
long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
if (aSel.nEndPara>0) {
@@ -1242,10 +1241,9 @@ XubString SdrView::GetStatusText()
nLin+=pTextEditOutliner->GetLineCount(nParaNum);
}
}
- // Noch 'ne kleine Unschoenheit:
- // Am Ende einer Zeile eines mehrzeiligen Absatzes wird die Position
- // der naechsten Zeile des selben Absatzes angezeigt, so es eine solche
- // gibt.
+ // A little imperfection:
+ // At the end of a line of any multi-line paragraph, we display the
+ // position of the next line of the same paragraph, if there is one.
sal_uInt16 nParaLine=0;
sal_uIntPtr nParaLineAnz=pTextEditOutliner->GetLineCount(aSel.nEndPara);
sal_Bool bBrk=sal_False;
@@ -1257,7 +1255,7 @@ XubString SdrView::GetStatusText()
nLin++;
nParaLine++;
} else bBrk=sal_True;
- if (nLen==0) bBrk=sal_True; // Sicherheitshalber
+ if (nLen==0) bBrk=sal_True; // to be sure
}
aStr.SearchAndReplaceAscii("%1", UniString::CreateFromInt32(nPar + 1));
@@ -1294,7 +1292,7 @@ XubString SdrView::GetStatusText()
if(aStr.Len())
{
- // ersten Buchstaben gross schreiben
+ // capitalize first letter
String aTmpStr(aStr.Copy(0, 1));
aTmpStr.ToUpperAscii();
aStr.Replace(0, 1, aTmpStr);
@@ -1376,7 +1374,7 @@ void SdrView::UnmarkAll()
if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
#endif
} else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
- else if (HasMarkedPoints()) UnmarkAllPoints(); // ! Marked statt Markable !
+ else if (HasMarkedPoints()) UnmarkAllPoints(); // Marked, not Markable!
else UnmarkAllObj();
}
@@ -1455,7 +1453,7 @@ void SdrView::SetMasterPagePaintCaching(sal_Bool bOn)
{
mbMasterPagePaintCaching = bOn;
- // reset at all SdrPageWindow's
+ // reset at all SdrPageWindows
SdrPageView* pPageView = GetSdrPageView();
if(pPageView)
diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx
index 9186ac3ceedc..e4ba75695164 100644
--- a/svx/source/svdraw/svdviter.cxx
+++ b/svx/source/svdraw/svdviter.cxx
@@ -89,8 +89,8 @@ sal_Bool SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const
{
if(mpObject)
{
- // Objekt gewuenscht? Na dann erstmal sehen, ob
- // das Obj in dieser PageView auch sichtbar ist.
+ // Looking for an object? First, determine if it visible in
+ // this PageView.
SetOfByte aObjLay;
mpObject->getMergedHierarchyLayerSet(aObjLay);
aObjLay &= pPV->GetVisibleLayers();
@@ -111,11 +111,11 @@ sal_Bool SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const
if(&rMasterPage == mpPage)
{
- // Aha, die gewuenschte Page ist also MasterPage in dieser PageView
+ // the page we're looking for is a master page in this PageView
if(mpObject)
{
- // Objekt gewuenscht? Na dann erstmal sehen, ob
- // das Obj in dieser PageView auch sichtbar ist.
+ // Looking for an object? First, determine if it visible in
+ // this PageView.
SetOfByte aObjLay;
mpObject->getMergedHierarchyLayerSet(aObjLay);
aObjLay &= pPV->GetVisibleLayers();
@@ -124,7 +124,7 @@ sal_Bool SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const
if(!aObjLay.IsEmpty())
{
return sal_True;
- } // ansonsten die naechste MasterPage der Page ansehen...
+ } // else, look at the next master page of this page...
}
else
{
@@ -134,7 +134,7 @@ sal_Bool SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const
}
}
- // MasterPage nicht erlaubt oder keine passende gefunden
+ // master page forbidden or no fitting master page found
return sal_False;
}
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 0a67518e5a8a..275f57087092 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -37,14 +37,14 @@
#include <svx/svdetc.hxx>
#include <svx/svdundo.hxx>
#include <svx/svdograf.hxx>
-#include <svx/svdoole2.hxx> // fuer kein OLE im SdrClipboardFormat
+#include <svx/svdoole2.hxx> // to not have OLE in SdrClipboardFormat
#include <svx/svdorect.hxx>
-#include <svx/svdoedge.hxx> // fuer Konnektoren uebers Clipboard
-#include <svx/svdopage.hxx> // fuer Konnektoren uebers Clipboard
+#include <svx/svdoedge.hxx> // for connectors via the clipboard
+#include <svx/svdopage.hxx> // for connectors via the clipboard
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
-#include <svx/svdtrans.hxx> // Fuer GetMapFactor zum umskalieren bei PasteModel
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdtrans.hxx> // for GetMapFactor, to rescale at PasteModel
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include "svx/xoutbmp.hxx"
#include <vcl/metaact.hxx>
@@ -154,12 +154,12 @@ sal_Bool SdrExchangeView::Paste(const XubString& rStr, const Point& rPos, SdrObj
SdrRectObj* pObj=new SdrRectObj(OBJ_TEXT,aTextRect);
pObj->SetModel(pMod);
pObj->SetLayer(nLayer);
- pObj->NbcSetText(rStr); // SetText vor SetAttr, weil SetAttr sonst unwirksam!
+ pObj->NbcSetText(rStr); // SetText before SetAttr, else SetAttr doesn't work!
if (pDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(pDefaultStyleSheet, sal_False);
pObj->SetMergedItemSet(aDefaultAttr);
- SfxItemSet aTempAttr(pMod->GetItemPool()); // Keine Fuellung oder Linie
+ SfxItemSet aTempAttr(pMod->GetItemPool()); // no fill, no line
aTempAttr.Put(XLineStyleItem(XLINE_NONE));
aTempAttr.Put(XFillStyleItem(XFILL_NONE));
@@ -195,7 +195,7 @@ sal_Bool SdrExchangeView::Paste(SvStream& rInput, const String& rBaseURL, sal_uI
pObj->SetMergedItemSet(aDefaultAttr);
- SfxItemSet aTempAttr(pMod->GetItemPool()); // Keine Fuellung oder Linie
+ SfxItemSet aTempAttr(pMod->GetItemPool()); // no fill, no line
aTempAttr.Put(XLineStyleItem(XLINE_NONE));
aTempAttr.Put(XFillStyleItem(XFILL_NONE));
@@ -235,7 +235,7 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
{
const SdrModel* pSrcMod=&rMod;
if (pSrcMod==pMod)
- return sal_False; // na so geht's ja nun nicht
+ return sal_False; // this can't work, right?
const bool bUndo = IsUndoEnabled();
@@ -268,8 +268,8 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
if (bUnmark)
UnmarkAllObj();
- // evtl. umskalieren bei unterschiedlicher MapUnit am Model
- // Dafuer erstmal die Faktoren berechnen
+ // Rescale, if the Model uses a different MapUnit.
+ // Calculate the necessary factors first.
MapUnit eSrcUnit=pSrcMod->GetScaleUnit();
MapUnit eDstUnit=pMod->GetScaleUnit();
sal_Bool bResize=eSrcUnit!=eDstUnit;
@@ -356,8 +356,8 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
if (bMark) {
- // Markhandles noch nicht sofort setzen!
- // Das erledigt das ModelHasChanged der MarkView.
+ // Don't already set Markhandles!
+ // That is instead being done by ModelHasChanged in MarkView.
MarkObj(pNeuObj,pMarkPV,sal_False,sal_True);
}
@@ -378,22 +378,21 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
{
#ifdef DBG_UTIL
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "SdrExchangeView::Paste(): Fehler beim Clonen "));
+ "SdrExchangeView::Paste(): Error when cloning "));
if(nCloneErrCnt == 1)
{
aStr.append(RTL_CONSTASCII_STRINGPARAM(
- "eines Zeichenobjekts."));
+ "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."));
+ " Not copying object connectors."));
OSL_FAIL(aStr.getStr());
#endif
@@ -448,7 +447,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
sal_Bool bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
if (bMark)
- { // Obj in der ersten gefundenen PageView markieren
+ { // select object the first PageView we found
MarkObj(pObj,pMarkPV);
}
}
@@ -475,7 +474,7 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap( sal_Bool bNoVDevIfOneBmpMarked ) con
const Graphic aGraphic( GetMarkedObjMetaFile( bNoVDevIfOneBmpMarked ) );
// #i102089# support user's settings of AA and LineSnap when the MetaFile gets
- // rasterconverted to a bitmap
+ // raster-converted to a bitmap
const SvtOptionsDrawinglayer aDrawinglayerOpt;
const GraphicConversionParameters aParameters(
Size(),
@@ -549,8 +548,8 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile( sal_Bool bNoVDevIfOneMtfMarke
aMtf.WindStart();
aMtf.SetPrefMapMode( aMap );
- // removed PrefSize extension. It is principially wrong to set a reduced size at
- // the created MetaFile. The mentioned errors occurr at output time since the integer
+ // removed PrefSize extension. It is principally wrong to set a reduced size at
+ // the created MetaFile. The mentioned errors occur at output time since the integer
// MapModes from VCL lead to errors. It is now corrected in the VCLRenderer for
// primitives (and may later be done in breaking up a MetaFile to primitives)
aMtf.SetPrefSize(aBoundSize);
@@ -616,7 +615,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
aOut.EnableOutput( sal_False );
aOut.SetMapMode( aMap );
aMtf.Record( &aOut );
- pObj->SingleObjectPainter( aOut ); // #110094#-17
+ pObj->SingleObjectPainter( aOut );
aMtf.Stop();
aMtf.WindStart();
@@ -654,7 +653,7 @@ void SdrExchangeView::DrawMarkedObj(OutputDevice& rOut) const
{
SdrMark* pMark = GetSdrMarkByIndex( n );
- // paint objects on control layer on top of all otherobjects
+ // paint objects on control layer on top of all other objects
if( nControlLayerId == pMark->GetMarkedSdrObj()->GetLayer() )
rObjVector2.push_back( pMark );
else
@@ -668,7 +667,7 @@ void SdrExchangeView::DrawMarkedObj(OutputDevice& rOut) const
for( sal_uInt32 i = 0; i < rObjVector.size(); i++ )
{
SdrMark* pMark = rObjVector[ i ];
- pMark->GetMarkedSdrObj()->SingleObjectPainter( rOut ); // #110094#-17
+ pMark->GetMarkedSdrObj()->SingleObjectPainter( rOut );
}
}
}
@@ -677,8 +676,8 @@ void SdrExchangeView::DrawMarkedObj(OutputDevice& rOut) const
SdrModel* SdrExchangeView::GetMarkedObjModel() const
{
- // Wenn das sortieren der MarkList mal stoeren sollte,
- // werde ich sie mir wohl kopieren muessen.
+ // Sorting the MarkList here might be problematic in the future, so
+ // use a copy.
SortMarkedObjects();
SdrModel* pNeuMod=pMod->AllocModel();
SdrPage* pNeuPag=pNeuMod->AllocPage(sal_False);
@@ -754,22 +753,21 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
{
#ifdef DBG_UTIL
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "SdrExchangeView::GetMarkedObjModel(): Fehler beim Clonen "));
+ "SdrExchangeView::GetMarkedObjModel(): Error when cloning "));
if(nCloneErrCnt == 1)
{
aStr.append(RTL_CONSTASCII_STRINGPARAM(
- "eines Zeichenobjekts."));
+ "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."));
+ " Not copying object connectors."));
OSL_FAIL(aStr.getStr());
#endif
@@ -782,7 +780,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
sal_Bool SdrExchangeView::Cut( sal_uIntPtr /*nFormat */)
{
- OSL_FAIL( "SdrExchangeView::Cut: Not supported anymore" );
+ OSL_FAIL( "SdrExchangeView::Cut: Not supported any more." );
return sal_False;
}
@@ -790,7 +788,7 @@ sal_Bool SdrExchangeView::Cut( sal_uIntPtr /*nFormat */)
sal_Bool SdrExchangeView::Yank(sal_uIntPtr /*nFormat*/)
{
- OSL_FAIL( "SdrExchangeView::Yank: Not supported anymore" );
+ OSL_FAIL( "SdrExchangeView::Yank: Not supported any more." );
return sal_False;
}
@@ -798,7 +796,7 @@ sal_Bool SdrExchangeView::Yank(sal_uIntPtr /*nFormat*/)
sal_Bool SdrExchangeView::Paste(Window* /*pWin*/, sal_uIntPtr /*nFormat*/)
{
- OSL_FAIL( "SdrExchangeView::Paste: Not supported anymore" );
+ OSL_FAIL( "SdrExchangeView::Paste: Not supported any more." );
return sal_False;
}