[Libreoffice-commits] .: 2 commits - svx/source
Muthu Subramanian
sumuthu at kemper.freedesktop.org
Mon Jan 23 23:09:41 PST 2012
svx/source/svdraw/sdrpagewindow.cxx | 16 -
svx/source/svdraw/svdattr.cxx | 3
svx/source/svdraw/svdcrtv.cxx | 5
svx/source/svdraw/svddrgmt.cxx | 10 -
svx/source/svdraw/svddrgv.cxx | 1
svx/source/svdraw/svdedtv1.cxx | 1
svx/source/svdraw/svdedtv2.cxx | 1
svx/source/svdraw/svdedxv.cxx | 21 --
svx/source/svdraw/svdetc.cxx | 4
svx/source/svdraw/svdfmtf.cxx | 2
svx/source/svdraw/svdhdl.cxx | 27 ---
svx/source/svdraw/svdibrow.cxx | 5
svx/source/svdraw/svdmodel.cxx | 6
svx/source/svdraw/svdmrkv.cxx | 54 +-----
svx/source/svdraw/svdmrkv1.cxx | 10 -
svx/source/svdraw/svdoashp.cxx | 4
svx/source/svdraw/svdobj.cxx | 14 -
svx/source/svdraw/svdoedge.cxx | 2
svx/source/svdraw/svdopath.cxx | 1
svx/source/svdraw/svdorect.cxx | 58 +++----
svx/source/svdraw/svdotext.cxx | 187 +++++++++++-----------
svx/source/svdraw/svdotextdecomposition.cxx | 18 +-
svx/source/svdraw/svdotextpathdecomposition.cxx | 8
svx/source/svdraw/svdotxat.cxx | 59 +++----
svx/source/svdraw/svdotxdr.cxx | 32 +--
svx/source/svdraw/svdotxed.cxx | 28 +--
svx/source/svdraw/svdotxln.cxx | 8
svx/source/svdraw/svdotxtr.cxx | 22 +-
svx/source/svdraw/svdouno.cxx | 16 -
svx/source/svdraw/svdovirt.cxx | 30 +--
svx/source/svdraw/svdpage.cxx | 82 ++++------
svx/source/svdraw/svdpagv.cxx | 48 ++---
svx/source/svdraw/svdpntv.cxx | 22 +-
svx/source/svdraw/svdpoev.cxx | 18 +-
svx/source/svdraw/svdsnpv.cxx | 21 +-
svx/source/svdraw/svdstr.src | 8
svx/source/svdraw/svdtext.cxx | 23 --
svx/source/svdraw/svdtrans.cxx | 123 +++++++--------
svx/source/svdraw/svdundo.cxx | 107 ++++++-------
svx/source/svdraw/svdview.cxx | 196 +++++++++++-------------
svx/source/svdraw/svdviter.cxx | 14 -
svx/source/svdraw/svdxcgv.cxx | 68 ++++----
42 files changed, 610 insertions(+), 773 deletions(-)
New commits:
commit 29ac03994484cb65725ec697cb7615a31b117b58
Author: Stefan Knorr <heinzlesspam at googlemail.com>
Date: Tue Jan 24 12:54:39 2012 +0530
Comments Translations.
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index b92d67f..34e8d4e 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 e43b160..d92b4f0 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 3a4f9d8..c5046b8 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 558ee61..6488124 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 27f04a3..9022e3b 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 307c916..d6bbb3e 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 c8aa75c..3d3acc3 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 485c5f5..58abf90 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 39263ab..13b35be 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 e058fb0..bd88363 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 2aa7d0e..f3294de 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 3fcd836..36d63a2 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 252ec09..a79f269 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 8d5d71a..fe6c7f3 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 62a3d84..cb13245 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 325bece..fb8157b 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 1846cac..f21f1dd 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 580d38e..8fc43ee 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
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list