summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStefan Knorr (astron) <heinzlesspam@gmail.com>2011-11-27 23:21:00 +0100
committerThorsten Behrens <tbehrens@suse.com>2011-11-28 11:21:24 +0100
commitea298ff0aba3ce9d8dd42167538ef61cfe3a3421 (patch)
treeb5b577a7debef13d822f6d7b210153230535c7d8 /svx
parent74534364f9ce285079467aab11bfde8620f6d2f2 (diff)
Comment translation in svdraw (part one)
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx14
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx12
-rw-r--r--svx/source/svdraw/svdattr.cxx32
-rw-r--r--svx/source/svdraw/svdcrtv.cxx68
-rw-r--r--svx/source/svdraw/svddrag.cxx2
-rw-r--r--svx/source/svdraw/svddrgm1.hxx8
-rw-r--r--svx/source/svdraw/svddrgmt.cxx99
-rw-r--r--svx/source/svdraw/svddrgv.cxx57
-rw-r--r--svx/source/svdraw/svdedtv.cxx92
-rw-r--r--svx/source/svdraw/svdedtv1.cxx149
-rw-r--r--svx/source/svdraw/svdedtv2.cxx268
-rw-r--r--svx/source/svdraw/svdedxv.cxx193
-rw-r--r--svx/source/svdraw/svdetc.cxx53
-rw-r--r--svx/source/svdraw/svdfmtf.cxx23
-rw-r--r--svx/source/svdraw/svdfmtf.hxx12
-rw-r--r--svx/source/svdraw/svdglev.cxx10
-rw-r--r--svx/source/svdraw/svdglue.cxx26
-rw-r--r--svx/source/svdraw/svdhdl.cxx111
-rw-r--r--svx/source/svdraw/svdibrow.cxx68
-rw-r--r--svx/source/svdraw/svditer.cxx4
-rw-r--r--svx/source/svdraw/svdlayer.cxx12
-rw-r--r--svx/source/svdraw/svdmark.cxx40
-rw-r--r--svx/source/svdraw/svdmodel.cxx164
-rw-r--r--svx/source/svdraw/svdmrkv.cxx155
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx53
-rw-r--r--svx/source/svdraw/svdoashp.cxx67
-rw-r--r--svx/source/svdraw/svdoattr.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx121
28 files changed, 859 insertions, 1056 deletions
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index c8932b6fe85d..b592306eaccf 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -99,7 +99,7 @@ using namespace ::com::sun::star;
}
else
{
- // Printer und VirtualDevice, bzw. kein OutDev
+ // Printer and VirtualDevice, or rather: no OutDev
uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
if( xFactory.is() )
{
@@ -136,7 +136,7 @@ SdrPageWindow::SdrPageWindow(SdrPageView& rPageView, SdrPaintWindow& rPaintWindo
SdrPageWindow::~SdrPageWindow()
{
- // #110094#, #i26631#
+ // #i26631#
ResetObjectContact();
if (mxControlContainer.is())
@@ -154,13 +154,13 @@ SdrPageWindow::~SdrPageWindow()
}
}
-// #110094# ObjectContact section
+// ObjectContact section
sdr::contact::ObjectContact* SdrPageWindow::CreateViewSpecificObjectContact()
{
return new sdr::contact::ObjectContactOfPageView(*this);
}
-// OVERLAYMANAGER
+// OVERLAY MANAGER
::sdr::overlay::OverlayManager* SdrPageWindow::GetOverlayManager() const
{
return GetPaintWindow().GetOverlayManager();
@@ -305,13 +305,13 @@ void SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector* pRedire
const sal_Bool bPrinter(GetPaintWindow().OutputToPrinter());
SetOfByte aProcessLayers = bPrinter ? mrPageView.GetPrintableLayers() : mrPageView.GetVisibleLayers();
- // create PaintInfoRec, #114359# use Rectangle only temporarily
+ // create PaintInfoRec; use Rectangle only temporarily
const Region& rRegion = GetPaintWindow().GetRedrawRegion();
// create processing data
sdr::contact::DisplayInfo aDisplayInfo;
- // Draw all layers. do NOT draw form layer from CompleteRedraw, this is done separate
+ // Draw all layers. do NOT draw form layer from CompleteRedraw, this is done separately
// as a single layer paint
const SdrLayerAdmin& rLayerAdmin = rModel.GetLayerAdmin();
const SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName(), sal_False);
@@ -423,7 +423,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
}
}
-// #110094# ObjectContact section
+// ObjectContact section
sdr::contact::ObjectContact& SdrPageWindow::GetObjectContact() const
{
if(!mpObjectContact)
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 1afc4ac27cfe..1e0311b93939 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -130,10 +130,10 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
// decide which OverlayManager to use
if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer)
{
- // buffered OverlayManager, buffers it's background and refreshes from there
+ // buffered OverlayManager, buffers its background and refreshes from there
// for pure overlay changes (no system redraw). The 3rd parameter specifies
- // if that refresh itself will use a 2nd vdev to avoid flickering.
- // Also hand over the evtl. existing old OverlayManager; this means to take over
+ // whether that refresh itself will use a 2nd vdev to avoid flickering.
+ // Also hand over the old OverlayManager if existent; this means to take over
// the registered OverlayObjects from it
mpOverlayManager = new ::sdr::overlay::OverlayManagerBuffered(GetOutputDevice(), pOldOverlayManager, true);
}
@@ -141,7 +141,7 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
{
// unbuffered OverlayManager, just invalidates places where changes
// take place
- // Also hand over the evtl. existing old OverlayManager; this means to take over
+ // Also hand over the old OverlayManager if existent; this means to take over
// the registered OverlayObjects from it
mpOverlayManager = new ::sdr::overlay::OverlayManager(GetOutputDevice(), pOldOverlayManager);
}
@@ -170,11 +170,11 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
}
}
- // OverlayObjects are transfered for the evtl. newly created OverlayManager by handing over
+ // OverlayObjects are transfered for the in some cases newly created OverlayManager by handing over
// at construction time
if(pOldOverlayManager)
{
- // The old overlay manager is not used anymore and can be (has to be) deleted.
+ // The old overlay manager is not used any more and can be (has to be) deleted.
delete pOldOverlayManager;
}
}
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 8739a446d875..18cf582ca115 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -52,11 +52,11 @@
#include "editeng/xmlcnitm.hxx"
#include <svx/svxids.hrc>
-#include <svx/xtable.hxx> // fuer RGB_Color()
+#include <svx/xtable.hxx> // for RGB_Color()
#include "svx/svditext.hxx"
-#include <svx/svdmodel.hxx> // fuer DEGREE_CHAR
+#include <svx/svdmodel.hxx> // for DEGREE_CHAR
#include <svx/svdtrans.hxx>
-#include "svx/svdglob.hxx" // Stringcache
+#include "svx/svdglob.hxx" // string cache
#include "svx/svdstr.hrc"
#include <svx/sdgcpitm.hxx>
#include <editeng/adjitem.hxx>
@@ -85,7 +85,7 @@ using namespace ::com::sun::star;
/*************************************************************************
|*
-|* Konstruktor
+|* Constructor
|*
\************************************************************************/
@@ -94,10 +94,10 @@ SdrItemPool::SdrItemPool(
sal_Bool bLoadRefCounts)
: XOutdevItemPool(_pMaster, SDRATTR_START, SDRATTR_END, bLoadRefCounts)
{
- // preapare some constants
+ // prepare some constants
const Color aNullCol(RGB_Color(COL_BLACK));
const XubString aEmptyStr;
- const sal_Int32 nDefEdgeDist(500L); // Erstmal hart defaulted fuer Draw (100TH_MM). hier muss noch der MapMode beruecksichtigt werden.
+ const sal_Int32 nDefEdgeDist(500L); // Defaulting hard for Draw (100TH_MM) currently. MapMode will have to be taken into account in the future.
// init the non-persistent items
for(sal_uInt16 i(SDRATTR_NOTPERSIST_FIRST); i <= SDRATTR_NOTPERSIST_LAST; i++)
@@ -299,10 +299,8 @@ SdrItemPool::SdrItemPool(
SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER );
pBoxInfoItem->SetTable( sal_True );
- pBoxInfoItem->SetDist( sal_True); // Abstandsfeld immer anzeigen
-// pBoxInfoItem->SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
-// pBoxInfoItem->SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
- pBoxInfoItem->SetValid( VALID_DISABLE, sal_True ); // Einzelne Linien koennen nur in Tabellen DontCare-Status haben
+ pBoxInfoItem->SetDist( sal_True); // always show margin field
+ pBoxInfoItem->SetValid( VALID_DISABLE, sal_True ); // some lines may have DontCare state only in tables
mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem;
// mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_SHADOW - SDRATTR_START ] = new SvxShadowItem( SDRATTR_TABLE_BORDER_SHADOW );
@@ -327,7 +325,7 @@ SdrItemPool::SdrItemPool(
/*************************************************************************
|*
-|* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
+|* copy ctor, so that static defaults are cloned
|* (Parameter 2 = sal_True)
|*
\************************************************************************/
@@ -350,7 +348,7 @@ SfxItemPool* SdrItemPool::Clone() const
/*************************************************************************
|*
-|* Destruktor
+|* Destructor
|*
\************************************************************************/
@@ -897,7 +895,7 @@ SfxItemPresentation SdrAngleItem::GetPresentation(
if(bNull2)
{
- // keine Nachkommastellen
+ // no decimal place(s)
rText.Erase(nLen-2);
}
else
@@ -960,7 +958,7 @@ bool SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
if (GetValue()!=0) {
BigInt aVal(GetValue());
aVal*=nMul;
- aVal+=nDiv/2; // fuer korrektes Runden
+ aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
SetValue(long(aVal));
}
@@ -987,7 +985,7 @@ SfxItemPresentation SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
}
////////////////////////////////////////////////////////////////////////////////
-// Items des Legendenobjekts
+// items of the legend object
////////////////////////////////////////////////////////////////////////////////
TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem,SfxEnumItem);
@@ -1348,7 +1346,7 @@ bool SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
if (GetValue()>0) {
BigInt aVal(GetValue());
aVal*=nMul;
- aVal+=nDiv/2; // fuer korrektes Runden
+ aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
SetValue(short(aVal));
return sal_True;
@@ -1802,7 +1800,6 @@ bool SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberI
// Measure
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// MeasureKind
TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem,SfxEnumItem);
SfxPoolItem* SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); }
@@ -2004,7 +2001,6 @@ bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/
// Circ
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// CircKind
TYPEINIT1_AUTOFACTORY(SdrCircKindItem,SfxEnumItem);
SfxPoolItem* SdrCircKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCircKindItem(*this); }
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 3e5460895de5..ffb3185ef5ea 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -30,7 +30,7 @@
#include <svx/svdcrtv.hxx>
#include "svx/xattr.hxx"
#include <svx/svdundo.hxx>
-#include <svx/svdocapt.hxx> // Spezialbehandlung: Nach dem Create transparente Fuellung
+#include <svx/svdocapt.hxx> // special case: transparent filling after Create
#include <svx/svdoedge.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
@@ -87,7 +87,7 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, S
pTargetOverlay->add(*pNew);
maObjects.append(*pNew);
- // gluepoints
+ // glue points
if(rView.IsAutoVertexConnectors())
{
for(sal_uInt16 i(0); i < 4; i++)
@@ -186,15 +186,7 @@ void ImpSdrCreateViewExtraData::HideOverlay()
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@ @@@@@ @@@@ @@@@@@ @@ @@@@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
-//
+// CreateView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -295,7 +287,7 @@ sal_Bool SdrCreateView::CheckEdgeMode()
{
if (pAktCreate!=NULL)
{
- // wird vom EdgeObj gemanaged
+ // is managed by EdgeObj
if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return sal_False;
}
@@ -306,7 +298,7 @@ sal_Bool SdrCreateView::CheckEdgeMode()
}
else
{
- // sal_True heisst: MouseMove soll Connect checken
+ // sal_True, if MouseMove should check Connect
return !IsAction();
}
}
@@ -347,7 +339,7 @@ sal_Bool SdrCreateView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
if(pPV)
{
- // Defaultete Hit-Toleranz bei IsMarkedHit() mal aendern !!!!
+ // TODO: Change default hit tolerance at IsMarkedHit() some time!
Point aPos(pWin->PixelToLogic(rMEvt.GetPosPixel()));
sal_Bool bMarkHit=PickHandle(aPos)!=NULL || IsMarkedObjHit(aPos);
SdrObjConnection aCon;
@@ -383,12 +375,11 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent)
if(pObj)
{
- // Auf pers. Wunsch von Marco:
- // Mauszeiger bei Textwerkzeug immer I-Beam. Fadenkreuz
- // mit kleinem I-Beam erst bai MouseButtonDown
+ // Using text tool, mouse cursor is usually I-Beam,
+ // crosshairs with tiny I-Beam appears only on MouseButtonDown.
if(IsTextTool())
{
- // #81944# AW: Here the correct pointer needs to be used
+ // Here the correct pointer needs to be used
// if the default is set to vertical writing
aAktCreatePointer = POINTER_TEXT;
}
@@ -425,7 +416,7 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c
pCreatePV = GetSdrPageView();
}
if (pCreatePV!=NULL)
- { // ansonsten keine Seite angemeldet!
+ { // otherwise no side registered!
String aLay(aAktLayer);
if(nInvent == SdrInventor && nIdent == OBJ_MEASURE && aMeasureLayer.Len())
@@ -465,7 +456,7 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c
{
if (pDefaultStyleSheet!=NULL) pAktCreate->NbcSetStyleSheet(pDefaultStyleSheet, sal_False);
- // #101618# SW uses a naked SdrObject for frame construction. Normally, such an
+ // SW uses a naked SdrObject for frame construction. Normally, such an
// object should not be created. Since it is possible to use it as a helper
// object (e.g. in letting the user define an area with the interactive
// construction) at least no items should be set at that object.
@@ -485,18 +476,18 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c
if (nInvent==SdrInventor && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
nIdent==OBJ_TITLETEXT || nIdent==OBJ_OUTLINETEXT))
{
- // Fuer alle Textrahmen default keinen Hintergrund und keine Umrandung
+ // default for all text frames: no background, no border
SfxItemSet aSet(pMod->GetItemPool());
- aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // in case someone turns on Solid
aSet.Put(XFillStyleItem(XFILL_NONE));
- aSet.Put(XLineColorItem(String(),Color(COL_BLACK))); // Falls einer auf Solid umschaltet
+ aSet.Put(XLineColorItem(String(),Color(COL_BLACK))); // in case someone turns on Solid
aSet.Put(XLineStyleItem(XLINE_NONE));
pAktCreate->SetMergedItemSet(aSet);
}
if (!rLogRect.IsEmpty()) pAktCreate->NbcSetLogicRect(rLogRect);
- // #90129# make sure drag start point is inside WorkArea
+ // make sure drag start point is inside WorkArea
const Rectangle& rWorkArea = ((SdrDragView*)this)->GetWorkArea();
if(!rWorkArea.IsEmpty())
@@ -584,7 +575,7 @@ void SdrCreateView::MovCreateObj(const Point& rPnt)
else if (aDragStat.IsOrtho4Possible()) OrthoDistance4(aDragStat.GetPrev(),aPnt,IsBigOrtho());
}
- // #77734# If the drag point was limited and Ortho is active, do
+ // If the drag point was limited and Ortho is active, do
// the small ortho correction (reduction) -> last parameter to FALSE.
sal_Bool bDidLimit(ImpLimitToWorkArea(aPnt));
if(bDidLimit && IsOrtho())
@@ -626,8 +617,8 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
if (nAnz<=1 && eCmd==SDRCREATE_FORCEEND)
{
- BrkCreateObj(); // Objekte mit nur einem Punkt gibt's nicht (zumindest noch nicht)
- return sal_False; // sal_False=Event nicht ausgewertet
+ BrkCreateObj(); // objects with only a single point don't exist (at least today)
+ return sal_False; // sal_False = event not interpreted
}
sal_Bool bPntsEq=nAnz>1;
@@ -641,7 +632,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
if (!bPntsEq)
{
- // sonst Brk, weil alle Punkte gleich sind.
+ // otherwise Brk, because all points are equal
SdrObject* pObj=pAktCreate;
pAktCreate=NULL;
@@ -666,7 +657,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
pObj->SetLayer(nLayer);
- // #83403# recognize creation of a new 3D object inside a 3D scene
+ // recognize creation of a new 3D object inside a 3D scene
sal_Bool bSceneIntoScene(sal_False);
if(pObjMerk
@@ -695,7 +686,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
}
pCreatePV=NULL;
- bRet=sal_True; // sal_True=Event ausgewertet
+ bRet=sal_True; // sal_True = event interpreted
}
else
{
@@ -703,10 +694,10 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
}
}
else
- { // Mehr Punkte
- if (eCmd==SDRCREATE_FORCEEND || // nix da, Ende erzwungen
- nAnz==0 || // keine Punkte da (kann eigentlich nicht vorkommen)
- (nAnz<=1 && !aDragStat.IsMinMoved())) { // MinMove nicht erfuellt
+ { // more points
+ if (eCmd==SDRCREATE_FORCEEND || // nothing there -- force ending
+ nAnz==0 || // no existing points (should never happen)
+ (nAnz<=1 && !aDragStat.IsMinMoved())) { // MinMove not met
BrkCreateObj();
}
else
@@ -714,7 +705,7 @@ sal_Bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
// replace for DrawCreateObjDiff
HideCreateObj();
ShowCreateObj();
- aDragStat.ResetMinMoved(); // NextPoint gibt's bei MovCreateObj()
+ aDragStat.ResetMinMoved(); // NextPoint is at MovCreateObj()
bRet=sal_True;
}
}
@@ -776,8 +767,8 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
// overlay objects instead.
sal_Bool bUseSolidDragging(IsSolidDragging());
- // #i101648# check if dragged object is a naked SdrObject (no
- // derivation of). This is e.g. used in SW Frame construction
+ // #i101648# check if dragged object is a naked SdrObject (not
+ // a derivation). This is e.g. used in SW Frame construction
// as placeholder. Do not use SolidDragging for naked SDrObjects,
// they cannot have a valid optical representation
if(bUseSolidDragging && OBJ_NONE == pAktCreate->GetObjIdentifier())
@@ -854,7 +845,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
aDragPolyPolygon = rPathObj.getDragPolyPolygon(aDragStat);
}
- // use directly the SdrObject for overlay
+ // use the SdrObject directly for overlay
mpCreateViewExtraData->CreateAndShowOverlay(*this, pAktCreate, aDragPolyPolygon);
}
else
@@ -894,7 +885,6 @@ void SdrCreateView::HideCreateObj()
////////////////////////////////////////////////////////////////////////////////////////////////////
-/* new interface src537 */
sal_Bool SdrCreateView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr) const
{
if(pAktCreate)
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 6e79e2422420..478e8c39acaf 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -93,7 +93,7 @@ void SdrDragStat::NextPoint(bool bSaveReal)
void SdrDragStat::PrevPoint()
{
- if (aPnts.Count()>=2) { // einer muss immer da bleiben
+ if (aPnts.Count()>=2) { // one has to remain at all times
Point* pPnt=(Point*)(aPnts.GetObject(aPnts.Count()-2));
aPnts.Remove(aPnts.Count()-2);
delete pPnt;
diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx
index dd9ed18bc4c3..b45dde17729d 100644
--- a/svx/source/svdraw/svddrgm1.hxx
+++ b/svx/source/svdraw/svddrgm1.hxx
@@ -100,9 +100,9 @@ private:
long nWink0;
long nWink;
double nTan;
- bool bVertical; // Vertikales verzerren
- bool bResize; // Shear mit Resize
- bool bUpSideDown; // Beim Shear/Slant gespiegelt
+ bool bVertical; // contort vertically
+ bool bResize; // shear and resize
+ bool bUpSideDown; // mirror and shear/slant
bool bSlant;
public:
@@ -155,7 +155,7 @@ private:
// Handles to work on
SdrHdlGradient* pIAOHandle;
- // is this for gradient (or for transparence) ?
+ // is this for gradient (or for transparency)?
unsigned bIsGradient : 1;
public:
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 933356774a48..b3f5d5c12673 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -44,7 +44,7 @@
#include <svx/svdmark.hxx>
#include <svx/svdocapt.hxx>
#include <svx/svdpagv.hxx>
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include <svx/svddrgv.hxx>
#include <svx/svdundo.hxx>
@@ -210,7 +210,7 @@ SdrDragEntryPrimitive2DSequence::SdrDragEntryPrimitive2DSequence(
: SdrDragEntry(),
maPrimitive2DSequence(rSequence)
{
- // add parts to transparent overlay stuff eventually
+ // add parts to transparent overlay stuff if necessary
setAddToTransparent(bAddToTransparent);
}
@@ -394,7 +394,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag()
{
// when dragging a 50% transparent copy of a filled or not filled object without
// outline, this is normally hard to see. Add extra wireframe in that case. This
- // works nice e.g. with thext frames etc.
+ // works nice e.g. with text frames etc.
addSdrDragEntry(new SdrDragEntryPolyPolygon(pCandidate->TakeXorPoly()));
}
}
@@ -595,7 +595,7 @@ void SdrDragMethod::applyCurrentTransformationToSdrObject(SdrObject& rTarget)
double fRotate, fShearX;
aObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX);
- // get polygon's pos and size
+ // get polygon's position and size
const basegfx::B2DRange aPolyRange(aObjectPolyPolygon.getB2DRange());
// get the scaling factors (do not mirror, this is in the object transformation)
@@ -607,7 +607,7 @@ void SdrDragMethod::applyCurrentTransformationToSdrObject(SdrObject& rTarget)
-aPolyRange.getMinX(), -aPolyRange.getMinY()));
aPolyTransform.scale(fScaleX, fScaleY);
- // normally the poly should be moved back, but the translation is in the object
+ // normally the polygon should be moved back, but the translation is in the object
// transformation and thus does not need to be done
// aPolyTransform.translate(-aPolyRange.getMinX(), -aPolyRange.getMinY());
@@ -729,7 +729,7 @@ void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlay
}
}
- // evtl add DragStripes (help lines cross the page when dragging)
+ // add DragStripes if necessary (help lines cross the page when dragging)
if(getSdrDragView().IsDragStripes())
{
Rectangle aActionRectangle;
@@ -911,7 +911,7 @@ bool SdrDragMovHdl::BeginSdrDrag()
{
if (pH1==NULL || pH2==NULL)
{
- OSL_FAIL("SdrDragMovHdl::BeginSdrDrag(): Verschieben der Spiegelachse: Referenzhandles nicht gefunden");
+ OSL_FAIL("SdrDragMovHdl::BeginSdrDrag(): Moving the axis of reflection: reference handles not found.");
return false;
}
@@ -979,7 +979,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
nSA=getSdrDragView().GetSnapAngle();
if (getSdrDragView().IsMirrorAllowed(true,true))
- { // eingeschraenkt
+ { // limited
if (!getSdrDragView().IsMirrorAllowed(false,false)) nSA=4500;
if (!getSdrDragView().IsMirrorAllowed(true,false)) nSA=9000;
}
@@ -988,7 +988,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
nSA=4500;
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
SdrHdlKind eRef=HDL_REF1;
if (GetDragHdl()->GetKind()==HDL_REF1)
@@ -1010,7 +1010,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
double nCos=cos(a);
RotatePoint(aPnt,aRef,nSin,nCos);
- // Bei bestimmten Werten Rundungsfehler ausschliessen:
+ // eliminate rounding errors for certain values
if (nSA==9000)
{
if (nNeuWink==0 || nNeuWink==18000) aPnt.Y()=aRef.Y();
@@ -1197,7 +1197,7 @@ bool SdrDragObjOwn::BeginSdrDrag()
{
if(pObj->beginSpecialDrag(DragStat()))
{
- // create nitial clone to have a start visualisation
+ // create initial clone to have a start visualization
mpClone = pObj->getFullDragClone();
mpClone->applySpecialDrag(DragStat());
@@ -1315,11 +1315,11 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
}
}
- // evtl. use opertator= for setting changed object data (do not change selection in
+ // Maybe use operator = for setting changed object data (do not change selection in
// view, this will destroy the interactor). This is possible since a clone is now
// directly modified by the modifiers. Only SdrTableObj is adding own UNDOs
- // in it's SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses
- // a CreateUndoGeoObject() so maybe setting SetEndDragChangesAttributes is okay. I
+ // in its SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses
+ // a CreateUndoGeoObject(), so maybe setting SetEndDragChangesAttributes is okay. I
// will test this now
Rectangle aBoundRect0;
@@ -1395,14 +1395,14 @@ TYPEINIT1(SdrDragMove,SdrDragMethod);
void SdrDragMove::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool /*bModify*/)
{
- // for SdrDragMove, use current Primitive2DSequence of SdrObject visualisation
+ // for SdrDragMove, use current Primitive2DSequence of SdrObject visualization
// in given ObjectContact directly
sdr::contact::ViewContact& rVC = rOriginal.GetViewContact();
sdr::contact::ViewObjectContact& rVOC = rVC.GetViewObjectContact(rObjectContact);
sdr::contact::DisplayInfo aDisplayInfo;
// Do not use the last ViewPort set at the OC from the last ProcessDisplay(),
- // here we want the complete primitive sequence without visibility clippings
+ // here we want the complete primitive sequence without visible clippings
rObjectContact.resetViewPort();
addSdrDragEntry(new SdrDragEntryPrimitive2DSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo), true));
@@ -1545,7 +1545,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
}
if (aSR2.Left()>aLR.Left() || aSR2.Right()<aLR.Right())
- { // ist ueberhaupt Platz zum verschieben?
+ { // any space to move to?
aSR2.Move(aD.X(),0);
if (aSR2.Left()<aLR.Left())
@@ -1558,10 +1558,10 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
}
}
else
- aPt1.X()=DragStat().GetStart().X(); // kein Platz zum verschieben
+ aPt1.X()=DragStat().GetStart().X(); // no space to move to
if (aSR2.Top()>aLR.Top() || aSR2.Bottom()<aLR.Bottom())
- { // ist ueberhaupt Platz zum verschieben?
+ { // any space to move to?
aSR2.Move(0,aD.Y());
if (aSR2.Top()<aLR.Top())
@@ -1574,11 +1574,11 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
}
}
else
- aPt1.Y()=DragStat().GetStart().Y(); // kein Platz zum verschieben
+ aPt1.Y()=DragStat().GetStart().Y(); // no space to move to
}
if (getSdrDragView().IsDraggingGluePoints())
- { // Klebepunkte aufs BoundRect des Obj limitieren
+ { // restrict glue points to the BoundRect of the Obj
aPt1-=DragStat().GetStart();
const SdrMarkList& rML=GetMarkedObjectList();
sal_uLong nMarkAnz=rML.GetMarkCount();
@@ -1603,7 +1603,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
if (nGlueNum!=SDRGLUEPOINT_NOTFOUND)
{
Point aPt((*pGPL)[nGlueNum].GetAbsolutePos(*pObj));
- aPt+=aPt1; // soviel soll verschoben werden
+ aPt+=aPt1; // move by this much
if (aPt.X()<aBound.Left() ) aPt1.X()-=aPt.X()-aBound.Left() ;
if (aPt.X()>aBound.Right() ) aPt1.X()-=aPt.X()-aBound.Right() ;
if (aPt.Y()<aBound.Top() ) aPt1.Y()-=aPt.Y()-aBound.Top() ;
@@ -2054,7 +2054,7 @@ bool SdrDragRotate::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragRotate::BeginSdrDrag(): Kein Referenzpunkt-Handle gefunden");
+ OSL_FAIL("SdrDragRotate::BeginSdrDrag(): No reference point handle found.");
return false;
}
}
@@ -2081,7 +2081,7 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_)
nSA=9000;
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
nNeuWink+=nSA/2;
nNeuWink/=nSA;
nNeuWink*=nSA;
@@ -2102,8 +2102,8 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_)
nWink=nNeuWink;
double a=nWink*nPi180;
- double nSin1=sin(a); // schonmal berechnen, damit mgl. wenig Zeit
- double nCos1=cos(a); // zwischen Hide() und Show() vergeht
+ double nSin1=sin(a); // calculate now, so as little time as possible
+ double nCos1=cos(a); // passes between Hide() and Show()
Hide();
nSin=nSin1;
nCos=nCos1;
@@ -2203,7 +2203,7 @@ bool SdrDragShear::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragShear::BeginSdrDrag(): Kein Referenzpunkt-Handle fuer Shear gefunden");
+ OSL_FAIL("SdrDragShear::BeginSdrDrag(): No reference point handle for shearing found.");
return false;
}
@@ -2249,12 +2249,12 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
Point aPnt(rPnt);
Fraction aNeuFact(1,1);
- // Wenn kein Winkelfang, dann ggf. Rasterfang (ausser bei Slant)
+ // if angle snapping not activated, snap to raster (except when using slant)
if (nSA==0 && !bSlant)
aPnt=GetSnapPos(aPnt);
if (!bSlant && !bResize)
- { // Shear ohne Resize
+ { // shear, but no resize
if (bVertical)
aPnt.X()=aP0.X();
else
@@ -2288,7 +2288,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
Point aPt2(aPnt);
if (nSA!=0)
- aPt2=GetSnapPos(aPnt); // den also in jedem Falle fangen
+ aPt2=GetSnapPos(aPnt); // snap this one in any case
if (bVertical)
{
@@ -2307,7 +2307,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
nNeuWink=-nNeuWink;
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
nNeuWink+=nSA/2;
nNeuWink/=nSA;
nNeuWink*=nSA;
@@ -2317,15 +2317,15 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
bUpSideDown=nNeuWink>9000 && nNeuWink<27000;
if (bSlant)
- { // Resize fuer Slant berechnen
- // Mit Winkelfang jedoch ohne 89deg Begrenzung
+ { // calculate resize for slant
+ // when angle snapping is activated, disable 89 degree limit
long nTmpWink=nNeuWink;
if (bUpSideDown) nNeuWink-=18000;
if (bNeg) nTmpWink=-nTmpWink;
bResize=true;
double nCos=cos(nTmpWink*nPi180);
aNeuFact=nCos;
- Kuerzen(aFact,10); // 3 Dezimalstellen sollten reichen
+ Kuerzen(aFact,10); // three decimals should be enough
}
if (nNeuWink>8900)
@@ -2340,7 +2340,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
aFact=aNeuFact;
double a=nWink*nPi180;
double nTan1=0.0;
- nTan1=tan(a); // schonmal berechnen, damit mgl. wenig Zeit zwischen Hide() und Show() vergeht
+ nTan1=tan(a); // calculate now, so as little time as possible passes between Hide() and Show()
Hide();
nTan=nTan1;
DragStat().NextMove(rPnt);
@@ -2486,10 +2486,10 @@ bool SdrDragMirror::BeginSdrDrag()
nWink=NormAngle360(GetAngle(aDif));
if (!getSdrDragView().IsMirrorAllowed(false,false) && !b45)
- return false; // freier Achsenwinkel nicht erlaubt
+ return false; // free choice of axis angle not alowed
if (!getSdrDragView().IsMirrorAllowed(true,false) && !b90)
- return false; // 45deg auch nicht erlaubt
+ return false; // 45 degrees not allowed either
bSide0=ImpCheckSide(DragStat().GetStart());
Show();
@@ -2497,7 +2497,7 @@ bool SdrDragMirror::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragMirror::BeginSdrDrag(): Spiegelachse nicht gefunden");
+ OSL_FAIL("SdrDragMirror::BeginSdrDrag(): Axis of reflection not found.");
return false;
}
}
@@ -2638,7 +2638,7 @@ bool SdrDragGradient::BeginSdrDrag()
}
else
{
- OSL_FAIL("SdrDragGradient::BeginSdrDrag(): IAOGradient nicht gefunden");
+ OSL_FAIL("SdrDragGradient::BeginSdrDrag(): IAOGradient not found.");
}
return bRetval;
@@ -2687,7 +2687,6 @@ void SdrDragGradient::MoveSdrDrag(const Point& rPnt)
bool SdrDragGradient::EndSdrDrag(bool /*bCopy*/)
{
- // here the result is clear, do something with the values
Ref1() = pIAOHandle->GetPos();
Ref2() = pIAOHandle->Get2ndPos();
@@ -2769,7 +2768,7 @@ void SdrDragCrook::TakeSdrDragComment(XubString& rStr) const
rStr += ImpGetResStr(STR_EditWithCopy);
}
-// #96920# These defines parametrise the created raster
+// These defines parameterize the created raster
// for interactions
#define DRAG_CROOK_RASTER_MINIMUM (4)
#define DRAG_CROOK_RASTER_MAXIMUM (15)
@@ -2803,7 +2802,7 @@ basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectan
for(a = 0; a <= nVerDiv; a++)
{
- // hor lines
+ // horizontal lines
for(b = 0; b < nHorDiv; b++)
{
basegfx::B2DPolygon aHorLineSegment;
@@ -2825,7 +2824,7 @@ basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectan
for(a = 0; a <= nHorDiv; a++)
{
- // ver lines
+ // vertical lines
for(b = 0; b < nVerDiv; b++)
{
basegfx::B2DPolygon aVerLineSegment;
@@ -2981,7 +2980,7 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
Point* pC2=NULL;
if (i+1<nPtAnz && aPol.IsControl(i))
- { // Kontrollpunkt links
+ { // control point on the left
pC1=pPnt;
i++;
pPnt=&aPol[i];
@@ -2990,7 +2989,7 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
i++;
if (i<nPtAnz && aPol.IsControl(i))
- { // Kontrollpunkt rechts
+ { // control point on the right
pC2=&aPol[i];
i++;
}
@@ -3111,19 +3110,19 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (bValid)
{
- double a=0; // Steigung des Radius
+ double a=0; // slope of the radius
long nPntWink=0;
if (bVertical)
{
- a=((double)dy1)/((double)dx1); // Steigung des Radius
+ a=((double)dy1)/((double)dx1); // slope of the radius
nNeuRad=((long)(dy1*a)+dx1) /2;
aNeuCenter.X()+=nNeuRad;
nPntWink=GetAngle(aPnt-aNeuCenter);
}
else
{
- a=((double)dx1)/((double)dy1); // Steigung des Radius
+ a=((double)dx1)/((double)dy1); // slope of the radius
nNeuRad=((long)(dx1*a)+dy1) /2;
aNeuCenter.Y()+=nNeuRad;
nPntWink=GetAngle(aPnt-aNeuCenter)-9000;
@@ -3159,7 +3158,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (bResize)
{
if (nSA!=0)
- { // Winkelfang
+ { // angle snapping
long nWink0=nPntWink;
nPntWink+=nSA/2;
nPntWink/=nSA;
@@ -3191,7 +3190,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
bValid=false;
if (bValid && nSA!=0)
- { // Winkelfang
+ { // angle snapping
long nWink0=nWink;
nWink+=nSA/2;
nWink/=nSA;
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index ea8fa77399b8..a028d58afcf6 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -53,15 +53,7 @@ using namespace sdr;
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@@@@ @@@@ @@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@ @@ @@@@@ @@@@@@ @@ @@@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@@ @@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
-//
+// DragView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -189,20 +181,20 @@ sal_Bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, sal_Bool bTR ) const
Rectangle aR;
TakeActionRect(aR);
rPos = bTR ? aR.TopRight() : aR.TopLeft();
- if (GetMarkedObjectCount()==1 && IsDragObj() && // nur bei Einzelselektion
- !IsDraggingPoints() && !IsDraggingGluePoints() && // nicht beim Punkteschieben
- !mpCurrentSdrDragMethod->ISA(SdrDragMovHdl)) // nicht beim Handlesschieben
+ if (GetMarkedObjectCount()==1 && IsDragObj() && // only on single selection
+ !IsDraggingPoints() && !IsDraggingGluePoints() && // not when moving points
+ !mpCurrentSdrDragMethod->ISA(SdrDragMovHdl)) // not when moving handles
{
SdrObject* pObj=GetMarkedObjectByIndex(0);
if (pObj->ISA(SdrCaptionObj))
{
Point aPt(((SdrCaptionObj*)pObj)->GetTailPos());
- sal_Bool bTail=eDragHdl==HDL_POLY; // Schwanz wird gedraggt (nicht so ganz feine Abfrage hier)
- sal_Bool bOwn=mpCurrentSdrDragMethod->ISA(SdrDragObjOwn); // Objektspeziefisch
+ sal_Bool bTail=eDragHdl==HDL_POLY; // drag tail
+ sal_Bool bOwn=mpCurrentSdrDragMethod->ISA(SdrDragObjOwn); // specific to object
if (!bTail)
- { // bei bTail liefert TakeActionRect schon das richtige
+ { // for bTail, TakeActionRect already does the right thing
if (bOwn)
- { // bOwn kann sein MoveTextFrame, ResizeTextFrame aber eben nicht mehr DragTail
+ { // bOwn may be MoveTextFrame, ResizeTextFrame, but may not (any more) be DragTail
rPos=aPt;
}
else
@@ -265,7 +257,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
}
aDragStat.SetView((SdrView*)this);
- aDragStat.SetPageView(pMarkedPV); // <<-- hier muss die DragPV rein!!!
+ aDragStat.SetPageView(pMarkedPV); // <<-- DragPV has to go here!!!
aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
aDragStat.SetHdl(pHdl);
aDragStat.NextPoint();
@@ -274,7 +266,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
eDragHdl= pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
bDragHdl=eDragHdl==HDL_REF1 || eDragHdl==HDL_REF2 || eDragHdl==HDL_MIRX;
- // #103894# Expand test for HDL_ANCHOR_TR
+ // Expand test for HDL_ANCHOR_TR
sal_Bool bNotDraggable = (HDL_ANCHOR == eDragHdl || HDL_ANCHOR_TR == eDragHdl);
if(pHdl && (pHdl->GetKind() == HDL_SMARTTAG) && pForcedMeth )
@@ -296,7 +288,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
case HDL_LEFT: case HDL_RIGHT:
case HDL_UPPER: case HDL_LOWER:
{
- // Sind 3D-Objekte selektiert?
+ // are 3D objects selected?
sal_Bool b3DObjSelected = sal_False;
for(sal_uInt32 a=0;!b3DObjSelected && a<GetMarkedObjectCount();a++)
{
@@ -304,9 +296,8 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
if(pObj && pObj->ISA(E3dObject))
b3DObjSelected = sal_True;
}
- // Falls ja, Shear auch bei !IsShearAllowed zulassen,
- // da es sich bei 3D-Objekten um eingeschraenkte
- // Rotationen handelt
+ // If yes, allow shear even when !IsShearAllowed,
+ // because 3D objects are limited rotations
if (!b3DObjSelected && !IsShearAllowed())
return sal_False;
mpCurrentSdrDragMethod = new SdrDragShear(*this,eDragMode==SDRDRAG_ROTATE);
@@ -328,7 +319,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
default:
{
if (IsMarkedHitMovesAlways() && eDragHdl==HDL_MOVE)
- { // HDL_MOVE ist auch wenn Obj direkt getroffen
+ { // HDL_MOVE is true, even if Obj is hit directly
if (!IsMoveAllowed()) return sal_False;
mpCurrentSdrDragMethod = new SdrDragMove(*this);
}
@@ -514,7 +505,7 @@ sal_Bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl*
{
if (pHdl==NULL && IS_TYPE(SdrDragObjOwn,mpCurrentSdrDragMethod))
{
- // Aha, Obj kann nicht Move SpecialDrag, also MoveFrameDrag versuchen
+ // Obj may not Move SpecialDrag, so try with MoveFrameDrag
delete mpCurrentSdrDragMethod;
mpCurrentSdrDragMethod = 0;
bDragSpecial=sal_False;
@@ -554,7 +545,7 @@ sal_Bool SdrDragView::EndDragObj(sal_Bool bCopy)
{
bool bRet(false);
- // #i73341# If insert GluePoint, do not insist on last points being different
+ // #i73341# If inserting GluePoint, do not insist on last points being different
if(mpCurrentSdrDragMethod && aDragStat.IsMinMoved() && (IsInsertGluePoint() || aDragStat.GetNow() != aDragStat.GetPrev()))
{
sal_uIntPtr nHdlAnzMerk=0;
@@ -604,7 +595,7 @@ sal_Bool SdrDragView::EndDragObj(sal_Bool bCopy)
if (!bSomeObjChgdFlag)
{
- // Aha, Obj hat nicht gebroadcastet (z.B. Writer FlyFrames)
+ // Obj did not broadcast (e. g. Writer FlyFrames)
if(!bDragHdl)
{
AdjustMarkHdl();
@@ -633,7 +624,7 @@ void SdrDragView::BrkDragObj()
if (bInsPolyPoint)
{
- pInsPointUndo->Undo(); // Den eingefuegten Punkt wieder raus
+ pInsPointUndo->Undo(); // delete inserted point again
delete pInsPointUndo;
pInsPointUndo=NULL;
SetMarkHandles();
@@ -642,7 +633,7 @@ void SdrDragView::BrkDragObj()
if (IsInsertGluePoint())
{
- pInsPointUndo->Undo(); // Den eingefuegten Klebepunkt wieder raus
+ pInsPointUndo->Undo(); // delete inserted glue point again
delete pInsPointUndo;
pInsPointUndo=NULL;
SetInsertGluePoint(sal_False);
@@ -699,7 +690,7 @@ sal_Bool SdrDragView::ImpBegInsObjPoint(sal_Bool bIdxZwang, sal_uInt32 nIdx, con
if(bClosed0 != pMarkedPath->IsClosedObj())
{
- // Obj was closed implicit
+ // Obj was closed implicitly
// object changed
pMarkedPath->SetChanged();
pMarkedPath->BroadcastObjectChange();
@@ -738,7 +729,7 @@ sal_Bool SdrDragView::EndInsObjPoint(SdrCreateCmd eCmd)
sal_Bool bOk=EndDragObj(sal_False);
if (bOk==sal_True && eCmd!=SDRCREATE_FORCEEND)
{
- // Ret=True bedeutet: Action ist vorbei.
+ // Ret=True means: Action is over.
bOk=!(ImpBegInsObjPoint(sal_True, nNextPnt, aPnt, eCmd == SDRCREATE_NEXTOBJECT, pDragWin));
}
@@ -753,7 +744,7 @@ sal_Bool SdrDragView::IsInsGluePointPossible() const
{
if (GetMarkedObjectCount()==1)
{
- // sal_False liefern, wenn 1 Objekt und dieses ein Verbinder ist.
+ // return sal_False, if only 1 object which is a connector.
const SdrObject* pObj=GetMarkedObjectByIndex(0);
if (!HAS_BASE(SdrEdgeObj,pObj))
{
@@ -817,12 +808,12 @@ sal_Bool SdrDragView::BegInsGluePoint(const Point& rPnt)
}
else
{
- OSL_FAIL("BegInsGluePoint(): GluePoint-Handle nicht gefunden");
+ OSL_FAIL("BegInsGluePoint(): GluePoint handle not found.");
}
}
else
{
- // Keine Klebepunkte moeglich bei diesem Objekt (z.B. Edge)
+ // no glue points possible for this object (e. g. Edge)
SetInsertGluePoint(sal_False);
delete pInsPointUndo;
pInsPointUndo=NULL;
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 701c05d33f34..dfdf7efedddc 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -30,7 +30,7 @@
#include <vcl/metaact.hxx>
#include <svx/svdedtv.hxx>
#include <svx/svdundo.hxx>
-#include <svx/svdograf.hxx> // fuer Possibilities
+#include <svx/svdograf.hxx> // for Possibilities
#include <svx/svdopath.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdopage.hxx>
@@ -38,8 +38,8 @@
#include <svx/svdlayer.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
-#include <svx/svdpoev.hxx> // fuer die PolyPossiblities
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdpoev.hxx> // for the PolyPossiblities
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include <svx/e3dsceneupdater.hxx>
#include <rtl/strbuf.hxx>
@@ -49,15 +49,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
-//
+// EditView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -110,7 +102,7 @@ void SdrEditView::ImpResetPossibilityFlags()
void SdrEditView::ImpClearVars()
{
ImpResetPossibilityFlags();
- bPossibilitiesDirty=sal_True; // << war von Purify angemeckert
+ bPossibilitiesDirty=sal_True; // << Purify didn't like this
bBundleVirtObj=sal_False;
}
@@ -154,12 +146,11 @@ sal_Bool SdrEditView::ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const
SdrObject* pObj = pOL->GetObj(nObjNum);
SdrObjList* pSubOL = pObj->GetSubList();
- // #104809# Test explicitely for group objects and 3d scenes
+ // explicitly test for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(!ImpDelLayerCheck(pSubOL, nDelID))
{
- // Rekursion
bDelAll = sal_False;
}
}
@@ -190,7 +181,7 @@ void SdrEditView::ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID)
SdrObjList* pSubOL = pObj->GetSubList();
- // #104809# Test explicitely for group objects and 3d scenes
+ // explicitly test for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(ImpDelLayerCheck(pSubOL, nDelID))
@@ -259,7 +250,7 @@ void SdrEditView::DeleteLayer(const XubString& rName)
SdrObject* pObj = pPage->GetObj(nObjNum);
SdrObjList* pSubOL = pObj->GetSubList();
- // #104809# Test explicitely for group objects and 3d scenes
+ // explicitly test for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(ImpDelLayerCheck(pSubOL, nDelID))
@@ -382,13 +373,7 @@ void SdrEditView::ImpBroadcastEdgesOfMarkedNodes()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// #### ### #### #### # #### # # # ##### # ##### ####
-// # # # # # # # # # # # # # # # #
-// #### # # ### ### # #### # # # # # #### ###
-// # # # # # # # # # # # # # # #
-// # ### #### #### # #### # #### # # # ##### ####
-//
+// Possibilities
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrEditView::MarkListHasChanged()
@@ -455,10 +440,10 @@ sal_Bool SdrEditView::IsEdgeRadiusAllowed() const
sal_Bool SdrEditView::IsCrookAllowed(sal_Bool bNoContortion) const
{
- // CrookMode fehlt hier (weil kein Rotate bei Shear ...)
+ // CrookMode missing here (no rotations allowed when shearing ...)
ForcePossibilities();
if (bNoContortion) {
- if (!bRotateFreeAllowed) return sal_False; // Crook is nich
+ if (!bRotateFreeAllowed) return sal_False;
return !bMoveProtect && bMoveAllowed;
} else {
return !bResizeProtect && bContortionPossible;
@@ -497,7 +482,7 @@ void SdrEditView::CheckPossibilities()
{
// This call IS necessary to correct the MarkList, in which
// no longer to the model belonging objects still can reside.
- // These ones nned to be removed.
+ // These ones need to be removed.
CheckMarked();
}
@@ -512,8 +497,8 @@ void SdrEditView::CheckPossibilities()
bGroupPossible=nMarkAnz>=2;
bCombinePossible=nMarkAnz>=2;
if (nMarkAnz==1) {
- // bCombinePossible gruendlicher checken
- // fehlt noch ...
+ // check bCombinePossible more thoroughly
+ // still missing ...
const SdrObject* pObj=GetMarkedObjectByIndex(0);
//const SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
sal_Bool bGroup=pObj->GetSubList()!=NULL;
@@ -524,7 +509,7 @@ void SdrEditView::CheckPossibilities()
}
bCombineNoPolyPolyPossible=bCombinePossible;
bDeletePossible=sal_True;
- // Zu den Transformationen erstmal ja sagen
+ // accept transformations for now
bMoveAllowed =sal_True;
bResizeFreeAllowed=sal_True;
bResizePropAllowed=sal_True;
@@ -543,11 +528,11 @@ void SdrEditView::CheckPossibilities()
bGradientAllowed = (nMarkAnz == 1);
if(bGradientAllowed)
{
- // gradient depends on fillstyle
+ // gradient depends on fill style
const SdrMark* pM = GetSdrMarkByIndex(0);
const SdrObject* pObj = pM->GetMarkedSdrObj();
- // maybe group object, so get merged ItemSet
+ // may be group object, so get merged ItemSet
const SfxItemSet& rSet = pObj->GetMergedItemSet();
SfxItemState eState = rSet.GetItemState(XATTR_FILLSTYLE, sal_False);
@@ -579,7 +564,7 @@ void SdrEditView::CheckPossibilities()
pObj->TakeObjInfo(aInfo);
sal_Bool bMovPrt=pObj->IsMoveProtect();
sal_Bool bSizPrt=pObj->IsResizeProtect();
- if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // Menge der MovableObjs zaehlen
+ if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // count MovableObjs
if (bMovPrt) bMoveProtect=sal_True;
if (bSizPrt) bResizeProtect=sal_True;
@@ -587,7 +572,7 @@ void SdrEditView::CheckPossibilities()
if(!aInfo.bTransparenceAllowed)
bTransparenceAllowed = sal_False;
- // Wenn einer was nicht kann, duerfen's alle nicht
+ // If one of these can't do something, none can
if (!aInfo.bMoveAllowed ) bMoveAllowed =sal_False;
if (!aInfo.bResizeFreeAllowed) bResizeFreeAllowed=sal_False;
if (!aInfo.bResizePropAllowed) bResizePropAllowed=sal_False;
@@ -599,8 +584,8 @@ void SdrEditView::CheckPossibilities()
if (!aInfo.bShearAllowed ) bShearAllowed =sal_False;
if (aInfo.bEdgeRadiusAllowed) bEdgeRadiusAllowed=sal_True;
if (aInfo.bNoContortion ) bContortionPossible=sal_False;
- // Fuer Crook mit Contortion: Alle Objekte muessen
- // Movable und Rotatable sein, ausser maximal 1
+ // For Crook with Contortion: all objects have to be
+ // Movable and Rotatable, except for a maximum of 1 of them
if (!bMoreThanOneNoMovRot) {
if (!aInfo.bMoveAllowed || !aInfo.bResizeFreeAllowed) {
bMoreThanOneNoMovRot=bNoMovRotFound;
@@ -608,13 +593,13 @@ void SdrEditView::CheckPossibilities()
}
}
- // when one member cannot be converted, no conversion is possible
+ // if one member cannot be converted, no conversion is possible
if(!aInfo.bCanConvToContour)
bCanConvToContour = sal_False;
// Ungroup
if (!bUnGroupPossible) bUnGroupPossible=pObj->GetSubList()!=NULL;
- // ConvertToCurve: Wenn mind. einer konvertiert werden kann ist das ok.
+ // ConvertToCurve: If at least one can be converted, that is fine.
if (aInfo.bCanConvToPath ) bCanConvToPath =sal_True;
if (aInfo.bCanConvToPoly ) bCanConvToPoly =sal_True;
if (aInfo.bCanConvToPathLineToArea) bCanConvToPathLineToArea=sal_True;
@@ -629,9 +614,9 @@ void SdrEditView::CheckPossibilities()
if (!bDismantlePossible) bDismantlePossible = ImpCanDismantle(pObj, sal_False);
if (!bDismantleMakeLinesPossible) bDismantleMakeLinesPossible = ImpCanDismantle(pObj, sal_True);
- // OrthoDesiredOnMarked checken
+ // check OrthoDesiredOnMarked
if (!bOrthoDesiredOnMarked && !aInfo.bNoOrthoDesired) bOrthoDesiredOnMarked=sal_True;
- // ImportMtf checken
+ // check ImportMtf
if (!bImportMtfPossible) {
sal_Bool bGraf=HAS_BASE(SdrGrafObj,pObj);
@@ -664,8 +649,8 @@ void SdrEditView::CheckPossibilities()
bGrpEnterPossible=bMerker1;
}
if (bMoveAllowed) {
- // Verschieben von angeklebten Verbindern unterbinden
- // Derzeit nur fuer Einfachselektion implementiert.
+ // Don't allow moving glued connectors.
+ // Currently only implemented for single selection.
if (nMarkAnz==1) {
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
@@ -738,7 +723,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
SdrMark* pM = rMark.GetMark(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ // extra undo actions for changed connector which now may hold its layed out path (SJ)
std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
AddUndoActions( vConnectorUndoActions );
@@ -746,7 +731,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
}
}
- // Sicherstellen, dass die OrderNums stimmen:
+ // make sure, OrderNums are correct:
rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
std::vector< SdrObject* > aRemoved3DObjects;
@@ -756,7 +741,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
nm--;
SdrMark* pM = rMark.GetMark(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
- SdrObjList* pOL = pObj->GetObjList(); //#52680#
+ SdrObjList* pOL = pObj->GetObjList();
const sal_uInt32 nOrdNum(pObj->GetOrdNumDirect());
bool bIs3D = dynamic_cast< E3dObject* >(pObj);
@@ -910,8 +895,8 @@ void SdrEditView::CopyMarkedObj()
SortMarkedObjects();
SdrMarkList aSourceObjectsForCopy(GetMarkedObjectList());
- // Folgende Schleife Anstatt MarkList::Merge(), damit
- // ich jeweils mein Flag an die MarkEntries setzen kann.
+ // The following loop is used instead of MarkList::Merge(), to be
+ // able to flag the MarkEntries.
sal_uIntPtr nEdgeAnz = GetEdgesOfMarkedNodes().GetMarkCount();
for (sal_uIntPtr nEdgeNum=0; nEdgeNum<nEdgeAnz; nEdgeNum++) {
SdrMark aM(*GetEdgesOfMarkedNodes().GetMark(nEdgeNum));
@@ -946,7 +931,7 @@ void SdrEditView::CopyMarkedObj()
if (pM->GetUser()==0)
{
- // Sonst war's nur eine mitzukierende Edge
+ // otherwise it is only an Edge we have to copy as well
GetMarkedObjectListWriteAccess().InsertEntry(aME);
}
} else {
@@ -962,21 +947,20 @@ void SdrEditView::CopyMarkedObj()
{
#ifdef DBG_UTIL
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "SdrEditView::CopyMarkedObj(): Fehler beim Clonen "));
+ "SdrEditView::CopyMarkedObj(): Error when cloning "));
if(nCloneErrCnt == 1)
{
- aStr.append(RTL_CONSTASCII_STRINGPARAM("eines Zeichenobjekts."));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM("a drawing object."));
}
else
{
- aStr.append(RTL_CONSTASCII_STRINGPARAM("von "));
aStr.append(static_cast<sal_Int32>(nCloneErrCnt));
- aStr.append(RTL_CONSTASCII_STRINGPARAM(" Zeichenobjekten."));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" drawing objects."));
}
aStr.append(RTL_CONSTASCII_STRINGPARAM(
- " Objektverbindungen werden nicht mitkopiert."));
+ " This object's/These objects's connections will not be copied."));
OSL_FAIL(aStr.getStr());
#endif
}
@@ -991,7 +975,7 @@ sal_Bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, sal_
SdrLayerID nLayer=rPV.GetPage()->GetLayerAdmin().GetLayerID(aAktLayer,sal_True);
if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
if (rPV.GetLockedLayers().IsSet(nLayer) || !rPV.GetVisibleLayers().IsSet(nLayer)) {
- SdrObject::Free( pObj ); // Layer gesperrt oder nicht sichtbar
+ SdrObject::Free( pObj ); // Layer locked or invisible
return sal_False;
}
pObj->NbcSetLayer(nLayer);
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index de360beb4189..cc958a6673ba 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -37,19 +37,19 @@
#include <svl/itemiter.hxx>
#include <vcl/msgbox.hxx>
#include <svx/rectenum.hxx>
-#include <svx/svxids.hrc> // fuer SID_ATTR_TRANSFORM_...
-#include <svx/svdattr.hxx> // fuer Get/SetGeoAttr
+#include <svx/svxids.hrc> // for SID_ATTR_TRANSFORM_...
+#include <svx/svdattr.hxx> // for Get/SetGeoAttr
#include "svx/svditext.hxx"
#include "svx/svditer.hxx"
#include <svx/svdtrans.hxx>
#include <svx/svdundo.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
-#include <svx/svdlayer.hxx> // fuer MergeNotPersistAttr
-#include <svx/svdattrx.hxx> // fuer MergeNotPersistAttr
-#include <svx/svdetc.hxx> // fuer SearchOutlinerItems
-#include <svx/svdopath.hxx> // fuer Crook
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdlayer.hxx> // for MergeNotPersistAttr
+#include <svx/svdattrx.hxx> // for MergeNotPersistAttr
+#include <svx/svdetc.hxx> // for SearchOutlinerItems
+#include <svx/svdopath.hxx> // for Crook
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include <editeng/eeitem.hxx>
#include <svl/aeitem.hxx>
@@ -61,17 +61,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
-//
+// EditView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -119,7 +109,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, sal_Bool bCopy)
aR1=rRect;
}
else
- { // aR1 von aR0 nach rRect transformieren
+ { // transform aR1 to aR0 after rRect
aR1.Move(-x0,-y0);
BigInt l(aR1.Left());
BigInt r(aR1.Right());
@@ -145,7 +135,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, sal_Bool bCopy)
}
pO->SetSnapRect(aR1);
} else {
- OSL_FAIL("SetMarkedObjRect(): pObj->GetSnapRect() liefert leeres Rect");
+ OSL_FAIL("SetMarkedObjRect(): pObj->GetSnapRect() returns empty Rect");
}
}
if( bUndo )
@@ -195,7 +185,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
XubString aStr(ImpGetResStr(STR_EditMove));
if (bCopy)
aStr+=ImpGetResStr(STR_EditWithCopy);
- // benoetigt eigene UndoGroup wegen Parameter
+ // meeds its own UndoGroup because of its parameters
BegUndo(aStr,GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVE);
}
@@ -300,7 +290,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
if( bUndo )
{
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ // extra undo actions for changed connector which now may hold its layed out path (SJ)
std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
AddUndoActions( vConnectorUndoActions );
@@ -360,7 +350,7 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
if( bUndo )
{
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ // extra undo actions for changed connector which now may hold its layed out path (SJ)
std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
AddUndoActions( vConnectorUndoActions );
@@ -479,7 +469,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
if(!bDone && !pPath && pO->IsPolyObj() && 0L != pO->GetPointCount())
{
- // FuerPolyObj's, aber NICHT fuer SdrPathObj's, z.B. fuer's Bemassungsobjekt
+ // for PolyObj's, but NOT for SdrPathObj's, e.g. the measurement object
sal_uInt32 nPtAnz(pO->GetPointCount());
XPolygon aXP((sal_uInt16)nPtAnz);
sal_uInt32 nPtNum;
@@ -499,8 +489,8 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++)
{
- // hier koennte man vieleicht auch mal das Broadcasting optimieren
- // ist aber z.Zt. bei den 2 Punkten des Bemassungsobjekts noch nicht so tragisch
+ // broadcasting could be optimized here, but for the
+ // current two points of the measurement object, it's fine
pO->SetPoint(aXP[(sal_uInt16)nPtNum],nPtNum);
}
@@ -509,7 +499,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
if(!bDone)
{
- // Fuer alle anderen oder wenn bNoContortion
+ // for all others or if bNoContortion
Point aCtr0(pO->GetSnapRect().Center());
Point aCtr1(aCtr0);
sal_Bool bRotOk(sal_False);
@@ -593,7 +583,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol
}
else if(pO->IsPolyObj())
{
- // z.B. fuer's Bemassungsobjekt
+ // e. g. for the mesurement object
sal_uInt32 nPtAnz(pO->GetPointCount());
XPolygon aXP((sal_uInt16)nPtAnz);
sal_uInt32 nPtNum;
@@ -608,8 +598,8 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol
for(nPtNum = 0L; nPtNum < nPtAnz; nPtNum++)
{
- // hier koennte man vieleicht auch mal das Broadcasting optimieren
- // ist aber z.Zt. bei den 2 Punkten des Bemassungsobjekts noch nicht so tragisch
+ // broadcasting could be optimized here, but for the
+ // current two points of the measurement object, it's fine
pO->SetPoint(aXP[(sal_uInt16)nPtNum],nPtNum);
}
}
@@ -660,7 +650,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto
void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*bReplaceAll*/)
{
- // bReplaceAll hat hier keinerlei Wirkung
+ // bReplaceAll has no effect here
Rectangle aAllSnapRect(GetMarkedObjRect());
const SfxPoolItem *pPoolItem=NULL;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,sal_True,&pPoolItem)==SFX_ITEM_SET) {
@@ -701,7 +691,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*
bAllHgt=sal_True; bDoIt=sal_True;
}
if (bDoIt) {
- Rectangle aRect(aAllSnapRect); // !!! fuer PolyPt's und GluePt's aber bitte noch aendern !!!
+ Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!!
if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0);
if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top());
if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt;
@@ -731,7 +721,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*
const bool bUndo = IsUndoEnabled();
- // Todo: WhichRange nach Notwendigkeit ueberpruefen.
+ // TODO: check if WhichRange is necessary.
sal_uIntPtr nMarkAnz=GetMarkedObjectCount();
for (sal_uIntPtr nm=0; nm<nMarkAnz; nm++)
{
@@ -747,15 +737,14 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, sal_Bool /*
void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, sal_Bool /*bOnlyHardAttr*/) const
{
- // bOnlyHardAttr hat hier keinerlei Wirkung
- // Hier muss ausserdem noch der Nullpunkt und
- // die PvPos berueksichtigt werden.
- Rectangle aAllSnapRect(GetMarkedObjRect()); // !!! fuer PolyPt's und GluePt's aber bitte noch aendern !!!
+ // bOnlyHardAttr has no effect here.
+ // TODO: Take into account the origin and PvPos.
+ Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!!
long nAllSnapPosX=aAllSnapRect.Left();
long nAllSnapPosY=aAllSnapRect.Top();
long nAllSnapWdt=aAllSnapRect.GetWidth()-1;
long nAllSnapHgt=aAllSnapRect.GetHeight()-1;
- // koennte mal zu CheckPossibilities mit rein
+ // TODO: could go into CheckPossibilities
sal_Bool bMovProtect=sal_False,bMovProtectDC=sal_False;
sal_Bool bSizProtect=sal_False,bSizProtectDC=sal_False;
sal_Bool bPrintable =sal_True ,bPrintableDC=sal_False;
@@ -831,7 +820,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, sal_Bool /*bO
if (bSnapWdtDC || nAllSnapWdt !=nSnapWdt ) rAttr.Put(SdrAllSizeWidthItem(nAllSnapWdt));
if (bSnapHgtDC || nAllSnapHgt !=nSnapHgt ) rAttr.Put(SdrAllSizeHeightItem(nAllSnapHgt));
- // Items fuer reine Transformationen
+ // items for pure transformations
rAttr.Put(SdrMoveXItem());
rAttr.Put(SdrMoveYItem());
rAttr.Put(SdrResizeXOneItem());
@@ -953,11 +942,11 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
}
}
- // Joe, 2.7.98: Damit Undo nach Format.Standard auch die Textattribute korrekt restauriert
+ // To make Undo reconstruct text attributes correctly after Format.Standard
sal_Bool bHasEEItems=SearchOutlinerItems(rAttr,bReplaceAll);
- // AW 030100: save additional geom info when para or char attributes
- // are changed and the geom form of the text object might be changed
+ // save additional geometry information when paragraph or character attributes
+ // are changed and the geometrical shape of the text object might be changed
sal_Bool bPossibleGeomChange(sal_False);
SfxWhichIter aIter(rAttr);
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -991,7 +980,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
// create ItemSet without SFX_ITEM_DONTCARE. Put()
- // uses it's second parameter (bInvalidAsDefault) to
+ // uses its second parameter (bInvalidAsDefault) to
// remove all such items to set them to default.
SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges());
aAttr.Put(rAttr, sal_True);
@@ -1037,7 +1026,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,sal_False,bHasEEItems || bPossibleGeomChange || bRescueText));
}
- // set up a scxene updater if object is a 3d object
+ // set up a scene updater if object is a 3d object
if(dynamic_cast< E3dObject* >(pObj))
{
aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
@@ -1057,7 +1046,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
// #110094#-14 pTextObj->SendRepaintBroadcast(pTextObj->GetBoundRect());
pTextObj->RemoveOutlinerCharacterAttribs( aCharWhichIds );
- // object has changed, should be called form
+ // object has changed, should be called from
// RemoveOutlinerCharacterAttribs. This will change when the text
// object implementation changes.
pTextObj->SetChanged();
@@ -1090,9 +1079,9 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
SetAnimationTimer(0L);
}
- // besser vorher checken, was gemacht werden soll:
- // pObj->SetAttr() oder SetNotPersistAttr()
- // !!! fehlende Implementation !!!
+ // better check before what to do:
+ // pObj->SetAttr() or SetNotPersistAttr()
+ // TODO: missing implementation!
SetNotPersistAttrToMarked(rAttr,bReplaceAll);
if( bUndo )
@@ -1109,7 +1098,7 @@ SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() const
SdrMark* pM=GetSdrMarkByIndex(nm);
SfxStyleSheet* pSS=pM->GetMarkedSdrObj()->GetStyleSheet();
if (b1st) pRet=pSS;
- else if (pRet!=pSS) return NULL; // verschiedene StyleSheets
+ else if (pRet!=pSS) return NULL; // different stylesheets
b1st=sal_False;
}
return pRet;
@@ -1150,7 +1139,6 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, sal_Bool bDo
////////////////////////////////////////////////////////////////////////////////////////////////////
-/* new interface src537 */
sal_Bool SdrEditView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr) const
{
if(GetMarkedObjectCount())
@@ -1198,13 +1186,13 @@ sal_Bool SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRe
SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
{
- SfxItemSet aRetSet(pMod->GetItemPool(), // SID_ATTR_TRANSFORM_... aus s:svxids.hrc
+ SfxItemSet aRetSet(pMod->GetItemPool(), // SID_ATTR_TRANSFORM_... from s:svxids.hrc
SID_ATTR_TRANSFORM_POS_X,SID_ATTR_TRANSFORM_ANGLE,
SID_ATTR_TRANSFORM_PROTECT_POS,SID_ATTR_TRANSFORM_AUTOHEIGHT,
SDRATTR_ECKENRADIUS,SDRATTR_ECKENRADIUS,
0);
if (AreObjectsMarked()) {
- SfxItemSet aMarkAttr(GetAttrFromMarked(sal_False)); // wg. AutoGrowHeight und Eckenradius
+ SfxItemSet aMarkAttr(GetAttrFromMarked(sal_False)); // because of AutoGrowHeight and corner radius
Rectangle aRect(GetMarkedObjRect());
if(GetSdrPageView())
@@ -1212,14 +1200,14 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
GetSdrPageView()->LogicToPagePos(aRect);
}
- // Position
+ // position
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_X,aRect.Left()));
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_Y,aRect.Top()));
- // Groesse
+ // size
long nResizeRefX=aRect.Left();
long nResizeRefY=aRect.Top();
- if (eDragMode==SDRDRAG_ROTATE) { // Drehachse auch als Referenz fuer Resize
+ if (eDragMode==SDRDRAG_ROTATE) { // use rotation axis as a reference for resizing, too
nResizeRefX=aRef1.X();
nResizeRefY=aRef1.Y();
}
@@ -1235,7 +1223,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
GetSdrPageView()->LogicToPagePos(aRotateAxe);
}
- // Drehung
+ // rotation
long nRotateRefX=aRect.Center().X();
long nRotateRefY=aRect.Center().Y();
if (eDragMode==SDRDRAG_ROTATE) {
@@ -1246,10 +1234,10 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_X,nRotateRefX));
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_Y,nRotateRefY));
- // Shear
+ // shearing
long nShearRefX=aRect.Left();
long nShearRefY=aRect.Bottom();
- if (eDragMode==SDRDRAG_ROTATE) { // Drehachse auch als Referenz fuer Shear
+ if (eDragMode==SDRDRAG_ROTATE) { // use rotation axis as a reference for shearing, too
nShearRefX=aRotateAxe.X();
nShearRefY=aRotateAxe.Y();
}
@@ -1257,7 +1245,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X,nShearRefX));
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y,nShearRefY));
- // Pruefen der einzelnen Objekte, ob Objekte geschuetzt sind
+ // check every object whether it is protected
const SdrMarkList& rMarkList=GetMarkedObjectList();
sal_uIntPtr nMarkCount=rMarkList.GetMarkCount();
SdrObject* pObj=rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -1271,7 +1259,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
if (bSizProt!=pObj->IsResizeProtect()) bSizProtDontCare=sal_True;
}
- // InvalidateItem setzt das Item auf DONT_CARE
+ // InvalidateItem sets item to DONT_CARE
if (bPosProtDontCare) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_PROTECT_POS);
} else {
@@ -1324,7 +1312,7 @@ Point ImpGetPoint(Rectangle aRect, RECT_POINT eRP)
case RP_MB: return aRect.BottomCenter();
case RP_RB: return aRect.BottomRight();
}
- return Point(); // Sollte nicht vorkommen !
+ return Point(); // Should not happen!
}
void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
@@ -1349,7 +1337,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
long nSizY=0;
long nRotateAngle=0;
- // #86909#
sal_Bool bModeIsRotate(eDragMode == SDRDRAG_ROTATE);
long nRotateX(0);
long nRotateY(0);
@@ -1383,7 +1370,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
const SfxPoolItem* pPoolItem=NULL;
- // Position
+ // position
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,sal_True,&pPoolItem)) {
nPosDX=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Left();
bChgPos=sal_True;
@@ -1392,7 +1379,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
nPosDY=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Top();
bChgPos=sal_True;
}
- // Groesse
+ // size
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,sal_True,&pPoolItem)) {
nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue();
bChgSiz=sal_True;
@@ -1405,21 +1392,21 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
eSizePoint=(RECT_POINT)((const SfxAllEnumItem&)rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue();
}
- // Rotation
+ // rotation
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,sal_True,&pPoolItem)) {
nRotateAngle=((const SfxInt32Item*)pPoolItem)->GetValue()-nOldRotateAngle;
bRotate = (nRotateAngle != 0);
}
- // #86909# pos rot point x
+ // position rotation point x
if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_X, sal_True ,&pPoolItem))
nRotateX = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_X)).GetValue();
- // #86909# pos rot point y
+ // position rotation point y
if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_Y, sal_True ,&pPoolItem))
nRotateY = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_Y)).GetValue();
- // Shear
+ // shearing
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,sal_True,&pPoolItem)) {
long nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue();
if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
@@ -1430,7 +1417,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
nShearAngle=nNewShearAngle;
} else {
if (nNewShearAngle!=0 && nOldShearAngle!=0) {
- // Bugfix #25714#.
+ // bug fix
double nOld=tan((double)nOldShearAngle*nPi180);
double nNew=tan((double)nNewShearAngle*nPi180);
nNew-=nOld;
@@ -1461,7 +1448,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
bSetAttr=sal_True;
}
- // Eckenradius
+ // corner radius
if (bEdgeRadiusAllowed && SFX_ITEM_SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,sal_True,&pPoolItem)) {
long nRadius=((SdrEckenradiusItem*)pPoolItem)->GetValue();
aSetAttr.Put(SdrEckenradiusItem(nRadius));
@@ -1476,7 +1463,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
SetAttrToMarked(aSetAttr,sal_False);
}
- // Groesse und Hoehe aendern
+ // change size and height
if (bChgSiz && (bResizeFreeAllowed || bResizePropAllowed)) {
Fraction aWdt(nSizX,aRect.Right()-aRect.Left());
Fraction aHgt(nSizY,aRect.Bottom()-aRect.Top());
@@ -1490,7 +1477,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
ResizeMarkedObj(aRef,aWdt,aHgt);
}
- // Rotieren
+ // rotate
if (bRotate && (bRotateFreeAllowed || bRotate90Allowed)) {
Point aRef(nRotateX,nRotateY);
@@ -1502,7 +1489,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
RotateMarkedObj(aRef,nRotateAngle);
}
- // #86909# set rotation point position
+ // set rotation point position
if(bModeIsRotate && (nRotateX != nOldRotateX || nRotateY != nOldRotateY))
{
Point aNewRef1(nRotateX, nRotateY);
@@ -1515,7 +1502,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
SetRef1(aNewRef1);
}
- // Shear
+ // shear
if (bShear && bShearAllowed) {
Point aRef(nShearX,nShearY);
@@ -1534,7 +1521,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
// or not. Taking out.
}
- // Position aendern
+ // change position
if (bChgPos && bMoveAllowed) {
MoveMarkedObj(Size(nPosDX,nPosDY));
}
@@ -1613,12 +1600,12 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
////////////////////////////////////////////////////////////////////////////////////////////////////
sal_Bool SdrEditView::IsAlignPossible() const
-{ // Mindestens 2 markierte Objekte, davon mind. 1 beweglich
+{ // at least two selected objects, at least one of them movable
ForcePossibilities();
sal_uIntPtr nAnz=GetMarkedObjectCount();
- if (nAnz==0) return sal_False; // Nix markiert!
- if (nAnz==1) return bMoveAllowed; // einzelnes Obj an der Seite ausrichten
- return bOneOrMoreMovable; // ansonsten ist MarkCount>=2
+ if (nAnz==0) return sal_False; // nothing selected!
+ if (nAnz==1) return bMoveAllowed; // align single object to page
+ return bOneOrMoreMovable; // otherwise: MarkCount>=2
}
void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, sal_Bool bBoundRects)
@@ -1685,7 +1672,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, sal_B
if (!bHasFixed)
{
if (nMarkAnz==1)
- { // einzelnes Obj an der Seite ausrichten
+ { // align single object to page
const SdrObject* pObj=GetMarkedObjectByIndex(0L);
const SdrPage* pPage=pObj->GetPage();
const SdrPageGridFrameList* pGFL=pPage->GetGridFrameList(GetSdrPageViewOfMarkedByIndex(0),&(pObj->GetSnapRect()));
@@ -1743,7 +1730,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, sal_B
}
if (nXMov!=0 || nYMov!=0)
{
- // #104104# SdrEdgeObj needs an extra SdrUndoGeoObj since the
+ // SdrEdgeObj needs an extra SdrUndoGeoObj since the
// connections may need to be saved
if( bUndo )
{
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 4b5ec2367a13..98a89f06b79e 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -30,15 +30,15 @@
#include <svx/svdedtv.hxx>
#include <editeng/outliner.hxx>
#include <svx/svdundo.hxx>
-#include <svx/svdogrp.hxx> // fuer's Gruppieren
-#include <svx/svdovirt.hxx> // fuer VirtualObject-Bundling (Writer)
-#include <svx/svdopath.hxx> // fuer CombineObjects
+#include <svx/svdogrp.hxx> // for grouping objects
+#include <svx/svdovirt.hxx> // for VirtualObject bundling (Writer)
+#include <svx/svdopath.hxx> // for CombineObjects
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
#include "svx/svditer.hxx"
-#include <svx/svdograf.hxx> // fuer Possibilities
-#include <svx/svdoole2.hxx> // und Mtf-Import
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdograf.hxx> // for Possibilities
+#include <svx/svdoole2.hxx> // and Mtf-Import
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include "svdfmtf.hxx"
#include <svx/svdetc.hxx>
@@ -86,7 +86,7 @@ void SdrEditView::MovMarkedToTop()
SortMarkedObjects();
sal_uIntPtr nm;
for (nm=0; nm<nAnz; nm++)
- { // Ordnums muessen alle stimmen!
+ { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
sal_Bool bChg=sal_False;
@@ -113,9 +113,9 @@ void SdrEditView::MovMarkedToTop()
if (nMaxPos!=0)
nMaxPos--;
if (nNewPos>nMaxPos)
- nNewPos=nMaxPos; // diesen nicht ueberholen.
+ nNewPos=nMaxPos; // neither go faster...
if (nNewPos<nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go in the other direction
}
sal_Bool bEnd=sal_False;
while (nCmpPos<nNewPos && !bEnd)
@@ -123,7 +123,7 @@ void SdrEditView::MovMarkedToTop()
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
if (pCmpObj==NULL)
{
- OSL_FAIL("MovMarkedToTop(): Vergleichsobjekt nicht gefunden");
+ OSL_FAIL("MovMarkedToTop(): Reference object not found.");
bEnd=sal_True;
}
else if (pCmpObj==pMaxObj)
@@ -174,7 +174,7 @@ void SdrEditView::MovMarkedToBtm()
SortMarkedObjects();
sal_uIntPtr nm;
for (nm=0; nm<nAnz; nm++)
- { // Ordnums muessen alle stimmen!
+ { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
@@ -199,20 +199,20 @@ void SdrEditView::MovMarkedToBtm()
{
sal_uIntPtr nMinPos=pMaxObj->GetOrdNum()+1;
if (nNewPos<nMinPos)
- nNewPos=nMinPos; // diesen nicht ueberholen.
+ nNewPos=nMinPos; // neither go faster...
if (nNewPos>nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go in the other direction
}
sal_Bool bEnd=sal_False;
- // nNewPos ist an dieser Stelle noch die maximale Position,
- // an der das Obj hinruecken darf, ohne seinen Vorgaenger
- // (Mehrfachselektion) zu ueberholen.
+ // nNewPos in this case is the "maximum" position
+ // the object may reach without going faster than the object before
+ // it (multiple selection).
while (nCmpPos>nNewPos && !bEnd)
{
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
if (pCmpObj==NULL)
{
- OSL_FAIL("MovMarkedToBtm(): Vergleichsobjekt nicht gefunden");
+ OSL_FAIL("MovMarkedToBtm(): Reference object not found.");
bEnd=sal_True;
}
else if (pCmpObj==pMaxObj)
@@ -268,8 +268,8 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
if (pRefObj!=NULL)
{
- // Damit "Vor das Objekt" auch funktioniert wenn die
- // markierten Objekte bereits vor dem Objekt stehen
+ // Make "in front of the object" work, even if the
+ // selected objects are already in front of the other object
sal_uIntPtr nRefMark=TryToFindMarkedObject(pRefObj);
SdrMark aRefMark;
if (nRefMark!=CONTAINER_ENTRY_NOTFOUND)
@@ -286,7 +286,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
sal_uIntPtr nm;
for (nm=0; nm<nAnz; nm++)
- { // Ordnums muessen alle stimmen!
+ { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
sal_Bool bChg=sal_False;
@@ -309,27 +309,27 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
if (pMaxObj!=NULL)
{
- sal_uIntPtr nMaxOrd=pMaxObj->GetOrdNum(); // geht leider nicht anders
+ sal_uIntPtr nMaxOrd=pMaxObj->GetOrdNum(); // sadly doesn't work any other way
if (nMaxOrd>0)
nMaxOrd--;
if (nNewPos>nMaxOrd)
- nNewPos=nMaxOrd; // nicht ueberholen.
+ nNewPos=nMaxOrd; // neither go faster...
if (nNewPos<nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go into the other direction
}
if (pRefObj!=NULL)
{
if (pRefObj->GetObjList()==pObj->GetObjList())
{
- sal_uIntPtr nMaxOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
+ sal_uIntPtr nMaxOrd=pRefObj->GetOrdNum(); // sadly doesn't work any other way
if (nNewPos>nMaxOrd)
- nNewPos=nMaxOrd; // nicht ueberholen.
+ nNewPos=nMaxOrd; // neither go faster...
if (nNewPos<nNowPos)
- nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ nNewPos=nNowPos; // nor go into the other direction
}
else
{
- nNewPos=nNowPos; // andere PageView, also nicht veraendern
+ nNewPos=nNowPos; // different PageView, so don't change
}
}
if (nNowPos!=nNewPos)
@@ -342,7 +342,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
nNewPos--;
} // if (pObj!=pRefObj)
- } // for-Schleife ueber alle Markierten Objekte
+ } // for loop over all selected objects
if( bUndo )
EndUndo();
@@ -370,8 +370,8 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
SortMarkedObjects();
if (pRefObj!=NULL)
{
- // Damit "Hinter das Objekt" auch funktioniert wenn die
- // markierten Objekte bereits hinter dem Objekt stehen
+ // Make "behind the object" work, even if the
+ // selected objects are already behind the other object
sal_uIntPtr nRefMark=TryToFindMarkedObject(pRefObj);
SdrMark aRefMark;
if (nRefMark!=CONTAINER_ENTRY_NOTFOUND)
@@ -387,7 +387,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
}
}
sal_uIntPtr nm;
- for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ for (nm=0; nm<nAnz; nm++) { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
sal_Bool bChg=sal_False;
@@ -405,17 +405,17 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
sal_uIntPtr nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMinObj=GetMaxToBtmObj(pObj);
if (pMinObj!=NULL) {
- sal_uIntPtr nMinOrd=pMinObj->GetOrdNum()+1; // geht leider nicht anders
- if (nNewPos<nMinOrd) nNewPos=nMinOrd; // nicht ueberholen.
- if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ sal_uIntPtr nMinOrd=pMinObj->GetOrdNum()+1; // sadly doesn't work any differently
+ if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
}
if (pRefObj!=NULL) {
if (pRefObj->GetObjList()==pObj->GetObjList()) {
- sal_uIntPtr nMinOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
- if (nNewPos<nMinOrd) nNewPos=nMinOrd; // nicht ueberholen.
- if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ sal_uIntPtr nMinOrd=pRefObj->GetOrdNum(); // sadly doesn't work any differently
+ if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
} else {
- nNewPos=nNowPos; // andere PageView, also nicht veraendern
+ nNewPos=nNowPos; // different PageView, so don't change
}
}
if (nNowPos!=nNewPos) {
@@ -427,7 +427,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
}
nNewPos++;
} // if (pObj!=pRefObj)
- } // for-Schleife ueber alle markierten Objekte
+ } // for loop over all selected objects
if(bUndo)
EndUndo();
@@ -452,13 +452,13 @@ void SdrEditView::ReverseOrderOfMarked()
sal_uIntPtr a=0;
do {
- // Markierung ueber mehrere PageViews berueksichtigen
+ // take into account selection across multiple PageViews
sal_uIntPtr b=a+1;
while (b<nMarkAnz && GetSdrPageViewOfMarkedByIndex(b) == GetSdrPageViewOfMarkedByIndex(a)) b++;
b--;
SdrObjList* pOL=GetSdrPageViewOfMarkedByIndex(a)->GetObjList();
sal_uIntPtr c=b;
- if (a<c) { // Sicherstellen, dass die OrdNums nicht Dirty sind
+ if (a<c) { // make sure OrdNums aren't dirty
GetMarkedObjectByIndex(a)->GetOrdNum();
}
while (a<c) {
@@ -472,9 +472,9 @@ void SdrEditView::ReverseOrderOfMarked()
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj2,nOrd2-1,nOrd1));
}
pOL->SetObjectOrdNum(nOrd1,nOrd2);
- // Obj 2 ist um eine Position nach vorn gerutscht, deshalb nun nOrd2-1
+ // Obj 2 has moved forward by one position, so now nOrd2-1
pOL->SetObjectOrdNum(nOrd2-1,nOrd1);
- // Verwendung von Replace statt SetOrdNum wg. Performance (Neuberechnung der Ordnums)
+ // use Replace instead of SetOrdNum for performance reasons (recalculation of Ordnums)
a++; c--;
bChg=sal_True;
}
@@ -495,7 +495,7 @@ void SdrEditView::ImpCheckToTopBtmPossible()
if (nAnz==0)
return;
if (nAnz==1)
- { // Sonderbehandlung fuer Einzelmarkierung
+ { // special-casing for single selection
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrObjList* pOL=pObj->GetObjList();
sal_uIntPtr nMax=pOL->GetObjCount();
@@ -513,11 +513,11 @@ void SdrEditView::ImpCheckToTopBtmPossible()
}
bToTopPossible=nObjNum<sal_uIntPtr(nMax-1);
bToBtmPossible=nObjNum>nMin;
- } else { // Mehrfachselektion
+ } else { // multiple selection
sal_uIntPtr nm=0;
SdrObjList* pOL0=NULL;
long nPos0=-1;
- while (!bToBtmPossible && nm<nAnz) { // 'nach hinten' checken
+ while (!bToBtmPossible && nm<nAnz) { // check 'send to background'
SdrObject* pObj=GetMarkedObjectByIndex(nm);
SdrObjList* pOL=pObj->GetObjList();
if (pOL!=pOL0) {
@@ -532,7 +532,7 @@ void SdrEditView::ImpCheckToTopBtmPossible()
nm=nAnz;
pOL0=NULL;
nPos0=0x7FFFFFFF;
- while (!bToTopPossible && nm>0) { // 'nach vorn' checken
+ while (!bToTopPossible && nm>0) { // check 'bring to front'
nm--;
SdrObject* pObj=GetMarkedObjectByIndex(nm);
SdrObjList* pOL=pObj->GetObjList();
@@ -548,22 +548,14 @@ void SdrEditView::ImpCheckToTopBtmPossible()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@
-// @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@@ @@ @@
-// @@ @@ @@ @@@@@@@ @@ @@ @@ @@@@@@ @@
-// @@ @@ @@ @@@@@@@ @@@@@ @@ @@@@@@ @@@@
-// @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@
-//
+// Combine
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) const
{
if (pSource!=NULL) {
SdrObjList* pOL=pSource->GetSubList();
- if (pOL!=NULL && !pSource->Is3DObj()) { // erstes Nichtgruppenobjekt aus der Gruppe holen
+ if (pOL!=NULL && !pSource->Is3DObj()) { // get first non-group object from group
SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
pSource=aIter.Next();
}
@@ -575,7 +567,7 @@ void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest)
SDRATTR_START, SDRATTR_NOTPERSIST_FIRST-1,
SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
EE_ITEMS_START, EE_ITEMS_END,
- 0, 0); // #52757#, #52762#
+ 0, 0);
aSet.Put(pSource->GetMergedItemSet());
@@ -589,7 +581,7 @@ void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest)
sal_Bool SdrEditView::ImpCanConvertForCombine1(const SdrObject* pObj) const
{
- // #69711 : new condition IsLine() to be able to combine simple Lines
+ // new condition IsLine() to be able to combine simple Lines
sal_Bool bIsLine(sal_False);
const SdrPathObj* pPath = PTR_CAST(SdrPathObj,pObj);
@@ -617,7 +609,7 @@ sal_Bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) const
{
SdrObject* pObj1 = aIter.Next();
- // Es muessen alle Member einer Gruppe konvertierbar sein
+ // all members of a group have to be convertible
if(!ImpCanConvertForCombine1(pObj1))
{
return sal_False;
@@ -862,7 +854,7 @@ void SdrEditView::DistributeMarkedObjects()
if(eHor == SvxDistributeHorizontalDistance)
{
- // calc room in-between
+ // calculate room in-between
sal_Int32 nWidth = GetAllMarkedBoundRect().GetWidth() + 1;
double fStepWidth = ((double)nWidth - (double)nFullLength) / (double)(aEntryList.size() - 1);
double fStepStart = (double)aEntryList[ 0 ]->mnPos;
@@ -882,7 +874,7 @@ void SdrEditView::DistributeMarkedObjects()
}
else
{
- // calc distances
+ // calculate distances
sal_Int32 nWidth = aEntryList[ aEntryList.size() - 1 ]->mnPos - aEntryList[ 0 ]->mnPos;
double fStepWidth = (double)nWidth / (double)(aEntryList.size() - 1);
double fStepStart = (double)aEntryList[ 0 ]->mnPos;
@@ -957,7 +949,7 @@ void SdrEditView::DistributeMarkedObjects()
if(eVer == SvxDistributeVerticalDistance)
{
- // calc room in-between
+ // calculate room in-between
sal_Int32 nHeight = GetAllMarkedBoundRect().GetHeight() + 1;
double fStepWidth = ((double)nHeight - (double)nFullLength) / (double)(aEntryList.size() - 1);
double fStepStart = (double)aEntryList[ 0 ]->mnPos;
@@ -977,7 +969,7 @@ void SdrEditView::DistributeMarkedObjects()
}
else
{
- // calc distances
+ // calculate distances
sal_Int32 nHeight = aEntryList[ aEntryList.size() - 1 ]->mnPos - aEntryList[ 0 ]->mnPos;
double fStepWidth = (double)nHeight / (double)(aEntryList.size() - 1);
double fStepStart = (double)aEntryList[ 0 ]->mnPos;
@@ -1057,7 +1049,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
pInsPV = pM->GetPageView();
pInsOL = pObj->GetObjList();
- // #i76891# use single iter from SJ here whcih works on SdrObjects and takes
+ // #i76891# use single iteration from SJ here which works on SdrObjects and takes
// groups into account by itself
SdrObjListIter aIter(*pObj, IM_DEEPWITHGROUPS);
@@ -1075,7 +1067,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
aTmpPoly = basegfx::tools::simplifyCurveSegments(aTmpPoly);
// for each part polygon as preparation, remove self-intersections
- // correct orientations and get rid of evtl. neutral polygons.
+ // correct orientations and get rid of possible neutral polygons.
aTmpPoly = basegfx::tools::prepareForPolygonOperation(aTmpPoly);
if(!bFirstObjectComplete)
@@ -1108,7 +1100,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
}
}
- // was there something added to the first poly?
+ // was there something added to the first polygon?
if(!bFirstObjectComplete && aMergePolyPolygonA.count())
{
bFirstObjectComplete = sal_True;
@@ -1220,7 +1212,6 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
// use this info. Do not convert LineToArea on Connect commands.
// ConvertMarkedToPathObj(!bNoPolyPoly);
- // #114310#
// This is used for Combine and Connect. In no case it is necessary to force
// the content to curve, but it is also not good to force to polygons. Thus,
// curve is the less information loosing one. Remember: This place is not
@@ -1257,7 +1248,7 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
if(ImpCanConvertForCombine(pObj))
{
- // Obj merken fuer Attribute kopieren
+ // remember objects to be able to copy attributes
pAttrObj = pObj;
// unfortunately ConvertMarkedToPathObj has converted all
@@ -1296,7 +1287,7 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
}
else
{
- // auf Polyline Checken
+ // check for Polyline
const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0L));
const sal_uInt32 nPointCount(aPolygon.count());
@@ -1327,14 +1318,13 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
SdrPathObj* pPath = new SdrPathObj(eKind,aPolyPolygon);
- // Attribute des untersten Objekts
+ // attributes of the lowest object
ImpCopyAttributes(pAttrObj, pPath);
- // #100408# If LineStyle of pAttrObj is XLINE_NONE force to XLINE_SOLID to make visible.
+ // If LineStyle of pAttrObj is XLINE_NONE force to XLINE_SOLID to make visible.
const XLineStyle eLineStyle = ((const XLineStyleItem&)pAttrObj->GetMergedItem(XATTR_LINESTYLE)).GetValue();
const XFillStyle eFillStyle = ((const XFillStyleItem&)pAttrObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue();
- // #110635#
// Take fill style/closed state of pAttrObj in account when deciding to change the line style
sal_Bool bIsClosedPathObj(pAttrObj->ISA(SdrPathObj) && ((SdrPathObj*)pAttrObj)->IsClosed());
@@ -1348,7 +1338,6 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath));
- // #111111#
// Here was a severe error: Without UnmarkAllObj, the new object was marked
// additionally to the two ones which are deleted below. As long as those are
// in the UNDO there is no problem, but as soon as they get deleted, the
@@ -1357,27 +1346,19 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
MarkObj(pPath, pInsPV, sal_False, sal_True);
}
- // UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
- aRemoveMerker.ForceSort(); // wichtig fuer Remove (s.u.)
+ // build an UndoComment from the objects actually used
+ aRemoveMerker.ForceSort(); // important for remove (see below)
if( bUndo )
SetUndoComment(ImpGetResStr(bNoPolyPoly?STR_EditCombine_OnePoly:STR_EditCombine_PolyPoly),aRemoveMerker.GetMarkDescription());
- // die tatsaechlich verwendeten Objekten aus der Liste entfernen
+ // remove objects actually used from the list
DeleteMarkedList(aRemoveMerker);
if( bUndo )
EndUndo();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@@@ @@ @@@@@
-// @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@@@@@@ @@ @@ @@@@@@ @@ @@ @@
-// @@ @@ @@ @@@@ @@@@@@@ @@@@@@ @@@@@@ @@ @@ @@@@
-// @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@@@@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@
-//
+// Dismantle
////////////////////////////////////////////////////////////////////////////////////////////////////
sal_Bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolygon, sal_Bool bMakeLines) const
@@ -1407,14 +1388,13 @@ sal_Bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolyg
sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines) const
{
- sal_Bool bOtherObjs(sal_False); // sal_True=andere Objekte ausser PathObj's vorhanden
- sal_Bool bMin1PolyPoly(sal_False); // sal_True=mind. 1 PolyPolygon mit mehr als ein Polygon vorhanden
+ sal_Bool bOtherObjs(sal_False); // sal_True=objects other than PathObj's existent
+ sal_Bool bMin1PolyPoly(sal_False); // sal_True=at least 1 PolyPolygon with more than one Polygon existent
SdrObjList* pOL = pObj->GetSubList();
if(pOL)
{
- // Aha, Gruppenobjekt. Also alle Member ansehen.
- // Alle muessen PathObjs sein !
+ // group object -- check all members if they're PathObjs
SdrObjListIter aIter(*pOL, IM_DEEPNOGROUPS);
while(aIter.IsMore() && !bOtherObjs)
@@ -1434,7 +1414,7 @@ sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines
if(!aInfo.bCanConvToPath)
{
- // Passiert z.B. im Falle Fontwork (Joe, 28-11-95)
+ // happens e. g. in the case of FontWork
bOtherObjs = sal_True;
}
}
@@ -1460,10 +1440,10 @@ sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines
SdrObjTransformInfoRec aInfo;
pObj->TakeObjInfo(aInfo);
- // #69711 : new condition IsLine() to be able to break simple Lines
+ // new condition IsLine() to be able to break simple Lines
if(!(aInfo.bCanConvToPath || aInfo.bCanConvToPoly) && !pPath->IsLine())
{
- // Passiert z.B. im Falle Fontwork (Joe, 28-11-95)
+ // happens e. g. in the case of FontWork
bOtherObjs = sal_True;
}
}
@@ -1493,7 +1473,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
if(pSrcPath)
{
// #i74631# redesigned due to XpolyPolygon removal and explicit constructors
- SdrObject* pLast = 0; // fuer die Zuweisung des OutlinerParaObject
+ SdrObject* pLast = 0; // to be able to apply OutlinerParaObject
const basegfx::B2DPolyPolygon& rPolyPolygon(pSrcPath->GetPathPoly());
const sal_uInt32 nPolyCount(rPolyPolygon.count());
@@ -1637,7 +1617,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
void SdrEditView::DismantleMarkedObjects(sal_Bool bMakeLines)
{
//sal_uInt32 nCnt(0);
- // Temporaere Marklist
+ // temporary MarkList
SdrMarkList aRemoveMerker;
SortMarkedObjects();
@@ -1646,7 +1626,7 @@ void SdrEditView::DismantleMarkedObjects(sal_Bool bMakeLines)
if( bUndo )
{
- // Der Comment wird spaeter zusammengebaut
+ // comment is constructed later
BegUndo(String(), String(),
bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS);
}
@@ -1660,7 +1640,7 @@ void SdrEditView::DismantleMarkedObjects(sal_Bool bMakeLines)
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrPageView* pPV=pM->GetPageView();
SdrObjList* pOL=pObj->GetObjList();
- if (pOL!=pOL0) { pOL0=pOL; pObj->GetOrdNum(); } // sicherstellen, dass OrdNums stimmen!
+ if (pOL!=pOL0) { pOL0=pOL; pObj->GetOrdNum(); } // make sure OrdNums are correct!
if (ImpCanDismantle(pObj,bMakeLines)) {
aRemoveMerker.InsertEntry(SdrMark(pObj,pM->GetPageView()));
sal_uIntPtr nPos0=pObj->GetOrdNumDirect();
@@ -1686,21 +1666,15 @@ void SdrEditView::DismantleMarkedObjects(sal_Bool bMakeLines)
if( bUndo )
{
- // UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
+ // construct UndoComment from objects actually used
SetUndoComment(ImpGetResStr(bMakeLines?STR_EditDismantle_Lines:STR_EditDismantle_Polys),aRemoveMerker.GetMarkDescription());
- // die tatsaechlich verwendeten Objekten aus der Liste entfernen
+ // remove objects actually used from the list
EndUndo();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// #### #### ### # # ####
-// # # # # # # # # #
-// # ## #### # # # # ####
-// # # # # # # # # #
-// #### # # ### ### #
-//
+// Group
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
@@ -1717,7 +1691,7 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
const sal_uIntPtr nAnz = GetMarkedObjectCount();
for(sal_uIntPtr nm = nAnz; nm>0; )
{
- // UndoActions fuer alle betroffenen Objekte anlegen
+ // add UndoActions for all affected objects
nm--;
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
@@ -1736,15 +1710,15 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
SdrObjList* pSrcLst=pAktLst;
SdrObjList* pSrcLst0=pSrcLst;
SdrPage* pPage=pPV->GetPage();
- // sicherstellen, dass die OrdNums stimmen
+ // make sure OrdNums are correct
if (pSrcLst->IsObjOrdNumsDirty())
pSrcLst->RecalcObjOrdNums();
SdrObject* pGrp=NULL;
- SdrObject* pRefObj=NULL; // Referenz fuer InsertReason (-> rumankern im Writer)
- SdrObject* pRefObj1=NULL; // Referenz fuer InsertReason (-> rumankern im Writer)
+ SdrObject* pRefObj=NULL; // reference for InsertReason (-> anchors in Writer)
+ SdrObject* pRefObj1=NULL; // reference for InsertReason (-> anchors in Writer)
SdrObjList* pDstLst=NULL;
- // Falls alle markierten Objekte aus Fremden Obj-Listen
- // kommen, kommt das Gruppenobjekt an das Ende der Liste.
+ // if all selected objects come from foreign object lists.
+ // the group object is the last one in the list.
sal_uIntPtr nInsPos=pSrcLst->GetObjCount();
sal_Bool bNeedInsPos=sal_True;
for (sal_uIntPtr nm=GetMarkedObjectCount(); nm>0;)
@@ -1760,7 +1734,7 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
if (pGrp==NULL)
pGrp=new SdrObjGroup;
pDstLst=pGrp->GetSubList();
- DBG_ASSERT(pDstLst!=NULL,"Angebliches Gruppenobjekt liefert keine Objektliste");
+ DBG_ASSERT(pDstLst!=NULL,"Alleged group object doesn't return object list.");
}
SdrObject* pObj=pM->GetMarkedSdrObj();
pSrcLst=pObj->GetObjList();
@@ -1773,22 +1747,22 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
sal_Bool bGrouped=pSrcLst!=pPage;
if (!bForeignList && bNeedInsPos)
{
- nInsPos=pObj->GetOrdNum(); // ua, damit sind alle ObjOrdNum der Page gesetzt
+ nInsPos=pObj->GetOrdNum(); // this way, all ObjOrdNum of the page are set
nInsPos++;
bNeedInsPos=sal_False;
}
pSrcLst->RemoveObject(pObj->GetOrdNumDirect());
if (!bForeignList)
- nInsPos--; // InsertPos korregieren
+ nInsPos--; // correct InsertPos
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pDstLst->InsertObject(pObj,0,&aReason);
GetMarkedObjectListWriteAccess().DeleteMark(nm);
if (pRefObj1==NULL)
- pRefObj1=pObj; // Das oberste sichtbare Objekt
+ pRefObj1=pObj; // the topmost visible object
if (!bGrouped)
{
if (pRefObj==NULL)
- pRefObj=pObj; // Das oberste sichtbare nicht gruppierte Objekt
+ pRefObj=pObj; // the topmost visible non-group object
}
pSrcLst0=pSrcLst;
}
@@ -1803,7 +1777,7 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
pAktLst->InsertObject(pGrp,nInsPos,&aReason);
if( bUndo )
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // Kein Recalc!
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // no recalculation!
for (sal_uIntPtr no=0; no<nAnz; no++)
{
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pDstLst->GetObj(no)));
@@ -1820,13 +1794,7 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// # # # # #### #### ### # # ####
-// # # ## # # # # # # # # # #
-// # # # # # # ## #### # # # # ####
-// # # # ## # # # # # # # # #
-// ### # # #### # # ### ### #
-//
+// Ungroup
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrEditView::UnGroupMarked()
@@ -1849,14 +1817,14 @@ void SdrEditView::UnGroupMarked()
if (pSrcLst!=NULL) {
nCount++;
if (nCount==1) {
- pGrp->TakeObjNameSingul(aName); // Bezeichnung der Gruppe holen
- pGrp->TakeObjNamePlural(aName1); // Bezeichnung der Gruppe holen
+ pGrp->TakeObjNameSingul(aName); // retrieve name of group
+ pGrp->TakeObjNamePlural(aName1); // retrieve name of group
bNameOk=sal_True;
} else {
- if (nCount==2) aName=aName1; // Pluralname setzen
+ if (nCount==2) aName=aName1; // set plural name
if (bNameOk) {
XubString aStr;
- pGrp->TakeObjNamePlural(aStr); // Bezeichnung der Gruppe holen
+ pGrp->TakeObjNamePlural(aStr); // retrieve name of group
if(!aStr.Equals(aName))
bNameOk = sal_False;
@@ -1888,16 +1856,15 @@ void SdrEditView::UnGroupMarked()
if( bUndo )
AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pObj,true));
nDstCnt++;
- // Kein SortCheck beim einfuegen in die MarkList, denn das
- // wuerde wg. pObj->GetOrdNum() jedesmal ein RecalcOrdNums()
- // provozieren:
+ // No SortCheck when inserting into MarkList, because that would
+ // provoke a RecalcOrdNums() each time because of pObj->GetOrdNum():
aNewMark.InsertEntry(SdrMark(pObj,pM->GetPageView()),sal_False);
}
if( bUndo )
{
- // Now it is safe to add the delete-UNDO which trigers the
- // MigrateItemPool now only for itself, not for the subobjects.
+ // Now it is safe to add the delete-UNDO which triggers the
+ // MigrateItemPool now only for itself, not for the sub-objects.
// nDstCnt is right, because previous inserts move group
// object deeper and increase nDstCnt.
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pGrp));
@@ -1913,7 +1880,7 @@ void SdrEditView::UnGroupMarked()
if (nCount!=0)
{
if (!bNameOk)
- aName=ImpGetResStr(STR_ObjNamePluralGRUP); // Oberbegriff Gruppenobjekte verwenden, wenn verschiedene Objekte.
+ aName=ImpGetResStr(STR_ObjNamePluralGRUP); // Use the term "Group Objects," if different objects are grouped.
SetUndoComment(ImpGetResStr(STR_EditUngroup),aName);
}
@@ -1922,19 +1889,13 @@ void SdrEditView::UnGroupMarked()
if (nCount!=0)
{
- GetMarkedObjectListWriteAccess().Merge(aNewMark,sal_True); // Durch das obige Einsortieren ist aNewMark genau verkehrtherum
+ GetMarkedObjectListWriteAccess().Merge(aNewMark,sal_True); // Because of the sorting above, aNewMark is reversed
MarkListHasChanged();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// ### ### # # # # ##### #### ##### ##### ### #### ### # # #
-// # # # # ## # # # # # # # # # # # # # # # # #
-// # # # # # # # # #### #### # # # # #### # # # #
-// # # # # # ## # # # # # # # # # # # # # #
-// ### ### # # # ##### # # # # ### # ### #### #
-//
+// ConvertToPoly
////////////////////////////////////////////////////////////////////////////////////////////////////
SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, sal_Bool bPath, sal_Bool bLineToArea)
@@ -1943,7 +1904,7 @@ SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, sal_Bool bPath, sal_Bo
if (pNewObj!=NULL)
{
SdrObjList* pOL=pObj->GetObjList();
- DBG_ASSERT(pOL!=NULL,"ConvertTo: Obj liefert keine ObjList");
+ DBG_ASSERT(pOL!=NULL,"ConvertTo: Object doesn't return object list");
if (pOL!=NULL)
{
const bool bUndo = IsUndoEnabled();
@@ -2023,13 +1984,7 @@ void SdrEditView::ConvertMarkedToPolyObj(sal_Bool bLineToArea)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// # # ##### ##### ### ##### # # ##### # # # #### ### #### #####
-// ## ## # # # # # # # # # ## ## # # # # # # #
-// # # # #### # ##### ### # # #### ### # # # # #### # # #### #
-// # # # # # # # # # # # # # # # # # # #
-// # # ##### # # # # # #### ##### # # # # ### # # #
-//
+// Metafile Import
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
@@ -2045,8 +2000,8 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
sal_uIntPtr nAnz=GetMarkedObjectCount();
for (sal_uIntPtr nm=nAnz; nm>0;)
- { // Undo Objekte fuer alle neuen Objekte erzeugen
- // zwischen den Metafiles auf Abbruch testen
+ { // create Undo objects for all new objects
+ // check for cancellation between the metafiles
if( pProgrInfo != NULL )
{
pProgrInfo->SetNextObject();
@@ -2086,7 +2041,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));
- // Neue MarkList pflegen
+ // update new MarkList
SdrMark aNewMark(pOL->GetObj(nObj), pPV);
aNewMarked.InsertEntry(aNewMark);
@@ -2097,7 +2052,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
- // Objekt aus selektion loesen und loeschen
+ // remove object from selection and delete
GetMarkedObjectListWriteAccess().DeleteMark(TryToFindMarkedObject(pObj));
pOL->RemoveObject(nInsPos-1);
@@ -2106,10 +2061,9 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
}
}
- // MarkObj... fehlt... jetzt nicht mehr (AW)
if(aNewMarked.GetMarkCount())
{
- // Neue Selektion bilden
+ // create new selection
for(sal_uIntPtr a(0); a < aNewMarked.GetMarkCount(); a++)
{
GetMarkedObjectListWriteAccess().InsertEntry(*aNewMarked.GetMark(a));
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 9c83f03ccf41..feee99794edf 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -56,7 +56,7 @@
#include "svx/svditer.hxx"
#include "svx/svdpagv.hxx"
#include "svx/svdpage.hxx"
-#include "svx/svdetc.hxx" // fuer GetDraftFillColor
+#include "svx/svdetc.hxx" // for GetDraftFillColor
#include "svx/svdotable.hxx"
#include <svx/selectioncontroller.hxx>
#ifdef DBG_UTIL
@@ -64,8 +64,8 @@
#endif
#include <svx/svdoutl.hxx>
-#include <svx/svddrgv.hxx> // fuer SetSolidDragging()
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svddrgv.hxx> // for SetSolidDragging()
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
#include "svx/globl3d.hxx"
#include <editeng/outliner.hxx>
@@ -105,7 +105,7 @@ SdrObjEditView::SdrObjEditView(SdrModel* pModel1, OutputDevice* pOut):
SdrObjEditView::~SdrObjEditView()
{
- pTextEditWin = NULL; // Damit es in SdrEndTextEdit kein ShowCursor gibt
+ pTextEditWin = NULL; // so there's no ShowCursor in SdrEndTextEdit
if (IsTextEdit()) SdrEndTextEdit();
if (pTextEditOutliner!=NULL) {
delete pTextEditOutliner;
@@ -155,7 +155,7 @@ void SdrObjEditView::TakeActionRect(Rectangle& rRect) const
void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
SdrGlueEditView::Notify(rBC,rHint);
- // Printerwechsel waerend des Editierens
+ // change of printer while editing
SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
if (pSdrHint!=NULL && pTextEditOutliner!=NULL) {
SdrHintKind eKind=pSdrHint->GetKind();
@@ -168,7 +168,7 @@ void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
if (eKind==HINT_DEFFONTHGTCHG) {
// ...
}
- if (eKind==HINT_MODELSAVED) { // #43095#
+ if (eKind==HINT_MODELSAVED) {
pTextEditOutliner->ClearModifyFlag();
}
}
@@ -177,8 +177,8 @@ void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
void SdrObjEditView::ModelHasChanged()
{
SdrGlueEditView::ModelHasChanged();
- if (mxTextEditObj.is() && !mxTextEditObj->IsInserted()) SdrEndTextEdit(); // Objekt geloescht
- // TextEditObj geaendert?
+ if (mxTextEditObj.is() && !mxTextEditObj->IsInserted()) SdrEndTextEdit(); // object deleted
+ // TextEditObj changed?
if (IsTextEdit()) {
SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( mxTextEditObj.get() );
if (pTextObj!=NULL) {
@@ -191,14 +191,13 @@ void SdrObjEditView::ModelHasChanged()
Rectangle aOldArea(aMinTextEditArea);
aOldArea.Union(aTextEditArea);
Color aNewColor;
- { // Area Checken
+ { // check area
Size aPaperMin1;
Size aPaperMax1;
Rectangle aEditArea1;
Rectangle aMinArea1;
pTextObj->TakeTextEditArea(&aPaperMin1,&aPaperMax1,&aEditArea1,&aMinArea1);
- // #108784#
Point aPvOfs(pTextObj->GetTextEditOffset());
aEditArea1.Move(aPvOfs.X(),aPvOfs.Y());
@@ -212,7 +211,7 @@ void SdrObjEditView::ModelHasChanged()
pTextEditOutliner->SetUpdateMode(sal_False);
pTextEditOutliner->SetMinAutoPaperSize(aPaperMin1);
pTextEditOutliner->SetMaxAutoPaperSize(aPaperMax1);
- pTextEditOutliner->SetPaperSize(Size(0,0)); // Damit der Outliner neu formatiert
+ pTextEditOutliner->SetPaperSize(Size(0,0)); // re-format Outliner
if (!bContourFrame) {
pTextEditOutliner->ClearPolygon();
sal_uIntPtr nStat=pTextEditOutliner->GetControlWord();
@@ -230,7 +229,7 @@ void SdrObjEditView::ModelHasChanged()
OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
sal_uIntPtr nStat0=pOLV->GetControlWord();
sal_uIntPtr nStat=nStat0;
- // AutoViewSize nur wenn nicht KontourFrame.
+ // AutoViewSize only if not ContourFrame.
if (!bContourFrame) nStat|=EV_CNTRL_AUTOSIZE;
else nStat&=~EV_CNTRL_AUTOSIZE;
if (nStat!=nStat0) pOLV->SetControlWord(nStat);
@@ -239,7 +238,7 @@ void SdrObjEditView::ModelHasChanged()
bAreaChg=sal_True;
}
}
- if (pTextEditOutlinerView!=NULL) { // Fuellfarbe und Anker checken
+ if (pTextEditOutlinerView!=NULL) { // check fill and anchor
EVAnchorMode eOldAnchor=pTextEditOutlinerView->GetAnchorMode();
eNewAnchor=(EVAnchorMode)pTextObj->GetOutlinerViewAnchorMode();
bAnchorChg=eOldAnchor!=eNewAnchor;
@@ -247,12 +246,12 @@ void SdrObjEditView::ModelHasChanged()
aNewColor = GetTextEditBackgroundColor(*this);
bColorChg=aOldColor!=aNewColor;
}
- // #104082# refresh always when it's a contour frame. That
+ // refresh always when it's a contour frame. That
// refresh is necessary since it triggers the repaint
// which makes the Handles visible. Changes at TakeTextRect()
// seem to have resulted in a case where no refresh is executed.
// Before that, a refresh must have been always executed
- // (else this error would have happend earlier), thus i
+ // (else this error would have happened earlier), thus I
// even think here a refresh should be done always.
// Since follow-up problems cannot even be guessed I only
// add this one more case to the if below.
@@ -267,7 +266,7 @@ void SdrObjEditView::ModelHasChanged()
for (sal_uIntPtr nOV=0; nOV<nOutlViewAnz; nOV++)
{
OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
- { // Alten OutlinerView-Bereich invalidieren
+ { // invalidate old OutlinerView area
Window* pWin=pOLV->GetWindow();
Rectangle aTmpRect(aOldArea);
sal_uInt16 nPixSiz=pOLV->GetInvalidateMore()+1;
@@ -283,7 +282,7 @@ void SdrObjEditView::ModelHasChanged()
if (bColorChg)
pOLV->SetBackgroundColor( aNewColor );
- pOLV->SetOutputArea(aTextEditArea); // weil sonst scheinbar nicht richtig umgeankert wird
+ pOLV->SetOutputArea(aTextEditArea); // because otherwise, we're not re-anchoring correctly
ImpInvalidateOutlinerView(*pOLV);
}
pTextEditOutlinerView->ShowCursor();
@@ -294,15 +293,7 @@ void SdrObjEditView::ModelHasChanged()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@@ @@@@@ @@ @@@@@@
-// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
-// @@ @@@@ @@@ @@ @@@@ @@ @@ @@ @@
-// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
-// @@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@
-//
+// TextEdit
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect) const
@@ -314,17 +305,16 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject());
bool bTextFrame(pText && pText->IsTextFrame());
bool bFitToSize(pText && pText->IsFitToSize());
- bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095#
+ bool bModifyMerk(pTextEditOutliner->IsModified());
Rectangle aBlankRect(rOutlView.GetOutputArea());
aBlankRect.Union(aMinTextEditArea);
Rectangle aPixRect(pWin->LogicToPixel(aBlankRect));
aBlankRect.Intersection(rRect);
- rOutlView.GetOutliner()->SetUpdateMode(sal_True); // Bugfix #22596#
+ rOutlView.GetOutliner()->SetUpdateMode(sal_True);
rOutlView.Paint(aBlankRect);
if(!bModifyMerk)
{
- // #43095#
pTextEditOutliner->ClearModifyFlag();
}
@@ -337,7 +327,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1);
{
- // xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten
+ // limit xPixRect because of driver problems when pixel coordinates are too far out
Size aMaxXY(pWin->GetOutputSizePixel());
long a(2 * nPixSiz);
long nMaxX(aMaxXY.Width() + a);
@@ -397,7 +387,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const
aPixRect.Bottom()++;
{
- // xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten
+ // limit xPixRect because of driver problems when pixel coordinates are too far out
Size aMaxXY(pWin->GetOutputSizePixel());
long a(2 * nPixSiz);
long nMaxX(aMaxXY.Width() + a);
@@ -425,20 +415,20 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const
OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, sal_Bool /*bNoPaint*/, OutlinerView* pGivenView) const
{
- // Hintergrund
+ // background
Color aBackground(GetTextEditBackgroundColor(*this));
SdrTextObj* pText = dynamic_cast< SdrTextObj * >( mxTextEditObj.get() );
sal_Bool bTextFrame=pText!=NULL && pText->IsTextFrame();
sal_Bool bContourFrame=pText!=NULL && pText->IsContourTextFrame();
- // OutlinerView erzeugen
+ // create OutlinerView
OutlinerView* pOutlView=pGivenView;
pTextEditOutliner->SetUpdateMode(sal_False);
if (pOutlView==NULL) pOutlView=new OutlinerView(pTextEditOutliner,pWin);
else pOutlView->SetWindow(pWin);
- // Scrollen verbieten
+ // disallow scrolling
sal_uIntPtr nStat=pOutlView->GetControlWord();
nStat&=~EV_CNTRL_AUTOSCROLL;
- // AutoViewSize nur wenn nicht KontourFrame.
+ // AutoViewSize only if not ContourFrame.
if (!bContourFrame) nStat|=EV_CNTRL_AUTOSIZE;
if (bTextFrame) {
sal_uInt16 nPixSiz=aHdl.GetHdlSize()*2+1;
@@ -491,7 +481,7 @@ IMPL_LINK(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI)
pFI->SetFldColor(*pFldCol);
delete pFldCol;
} else {
- pFI->SetFldColor(Color(COL_LIGHTGRAY)); // kann spaeter (357) raus
+ pFI->SetFldColor(Color(COL_LIGHTGRAY)); // TODO: remove this later on (357)
}
}
}
@@ -521,7 +511,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
if(bGrabFocus && pWin)
{
- // attetion, this call may cause an EndTextEdit() call to this view
+ // attention, this call may cause an EndTextEdit() call to this view
pWin->GrabFocus(); // to force the cursor into the edit view
}
@@ -531,7 +521,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
const sal_uInt32 nWinAnz(PaintWindowCount());
sal_uInt32 i;
sal_Bool bBrk(sal_False);
- // Abbruch, wenn kein Objekt angegeben.
+ // break, when no object given
if(!pObj)
{
@@ -550,7 +540,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
}
}
- // Abbruch, wenn kein Window da.
+ // break, when no window exists
if(!pWin)
{
bBrk = sal_True;
@@ -561,7 +551,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
{
pPV = GetSdrPageView();
- // Abbruch, wenn keine PageView zu dem Objekt vorhanden.
+ // break, when no PageView for the object exists
if(!pPV)
{
bBrk = sal_True;
@@ -570,7 +560,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
if(pObj && pPV)
{
- // Kein TextEdit an Objekten im gesperrten Layer
+ // no TextEdit on objects in locked Layer
if(pPV->GetLockedLayers().IsSet(pObj->GetLayer()))
{
bBrk = sal_True;
@@ -579,7 +569,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
if(pTextEditOutliner)
{
- OSL_FAIL("SdrObjEditView::SdrBeginTextEdit() da stand noch ein alter Outliner rum");
+ OSL_FAIL("SdrObjEditView::SdrBeginTextEdit(): Old Outliner still exists.");
delete pTextEditOutliner;
pTextEditOutliner = 0L;
}
@@ -601,7 +591,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
sal_Bool bEmpty = mxTextEditObj->GetOutlinerParaObject()==NULL;
aOldCalcFieldValueLink=pTextEditOutliner->GetCalcFieldValueHdl();
- // Der FieldHdl muss von SdrBeginTextEdit gesetzt sein, da dor ein UpdateFields gerufen wird.
+ // FieldHdl has to be set by SdrBeginTextEdit, because this call an UpdateFields
pTextEditOutliner->SetCalcFieldValueHdl(LINK(this,SdrObjEditView,ImpOutlinerCalcFieldValueHdl));
pTextEditOutliner->SetBeginPasteOrDropHdl(LINK(this,SdrObjEditView,BeginPasteOrDropHdl));
pTextEditOutliner->SetEndPasteOrDropHdl(LINK(this,SdrObjEditView, EndPasteOrDropHdl));
@@ -618,10 +608,10 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
if( !pTextObj )
return sal_False;
- // #111096# Switch off evtl. running TextAnimation
+ // switch off any running TextAnimations
pTextObj->SetTextAnimationAllowed(sal_False);
- // alten Cursor merken
+ // remember old cursor
if (pTextEditOutliner->GetViewCount()!=0)
{
OutlinerView* pTmpOLV=pTextEditOutliner->RemoveView(static_cast<size_t>(0));
@@ -629,26 +619,25 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
delete pTmpOLV;
}
- // EditArea ueberTakeTextEditArea bestimmen
- // Das koennte eigentlich entfallen, da TakeTextRect() die Berechnung der aTextEditArea vornimmt
- // Die aMinTextEditArea muss jedoch wohl auch erfolgen (darum bleibt es voerst drinnen)
+ // Determine EditArea via TakeTextEditArea.
+ // TODO: This could theoretically be left out, because TakeTextRect() calculates the aTextEditArea,
+ // but aMinTextEditArea has to happen, too (therefore leaving this in right now)
pTextObj->TakeTextEditArea(NULL,NULL,&aTextEditArea,&aMinTextEditArea);
Rectangle aTextRect;
Rectangle aAnchorRect;
pTextObj->TakeTextRect(*pTextEditOutliner, aTextRect, sal_True,
- &aAnchorRect /* #97097# Give sal_True here, not sal_False */);
+ &aAnchorRect /* Give sal_True here, not sal_False */);
if ( !pTextObj->IsContourTextFrame() )
{
- // FitToSize erstmal nicht mit ContourFrame
+ // FitToSize not together with ContourFrame, for now
if (pTextObj->IsFitToSize())
aTextRect = aAnchorRect;
}
aTextEditArea = aTextRect;
- // #108784#
Point aPvOfs(pTextObj->GetTextEditOffset());
aTextEditArea.Move(aPvOfs.X(),aPvOfs.Y());
@@ -679,7 +668,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
aHdl.SetMoveOutside(sal_True);
//OLMRefreshAllIAOManagers();
- // alle Wins als OutlinerView beim Outliner anmelden
+ // register all windows as OutlinerViews with the Outliner
if(!bOnlyOneView)
{
for(i = 0L; i < nWinAnz; i++)
@@ -702,12 +691,10 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
#endif
pTextEditOutliner->ClearModifyFlag();
- // #71519#, #91453#
if(pWin)
{
sal_Bool bExtraInvalidate(sal_False);
- // #71519#
if(!bExtraInvalidate)
{
if(pTextObj->IsFitToSize())
@@ -720,7 +707,6 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
}
}
- // send HINT_BEGEDIT #99840#
if( GetModel() )
{
SdrHint aHint(*pTextObj);
@@ -733,7 +719,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
if( mxSelectionController.is() )
mxSelectionController->onSelectionHasChanged();
- return sal_True; // Gut gelaufen, TextEdit laeuft nun
+ return sal_True; // ran fine, let TextEdit run now
}
else
{
@@ -749,7 +735,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
pTextEditOutliner->setVisualizedPage(0);
}
- // wenn hier angekommen, dann ist irgendwas schief gelaufen
+ // something went wrong...
if(!bDontDeleteOutliner)
{
if(pGivenOutliner!=NULL)
@@ -791,7 +777,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
OutlinerView* pTEOutlinerView=pTextEditOutlinerView;
Cursor* pTECursorMerker=pTextEditCursorMerker;
- // send HINT_ENDEDIT #99840#
if( GetModel() && mxTextEditObj.is() )
{
SdrHint aHint(*mxTextEditObj.get());
@@ -830,8 +815,8 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
pTxtUndo = dynamic_cast< SdrUndoObjSetText* >( GetModel()->GetSdrUndoFactory().CreateUndoObjectSetText(*pTEObj, nText ) );
}
DBG_ASSERT( !bModified || pTxtUndo, "svx::SdrObjEditView::EndTextEdit(), could not create undo action!" );
- // Den alten CalcFieldValue-Handler wieder setzen
- // Muss vor Obj::EndTextEdit() geschehen, da dort ein UpdateFields() gemacht wird.
+ // Set old CalcFieldValue-Handler again, this
+ // has to happen before Obj::EndTextEdit(), as this does UpdateFields().
pTEOutliner->SetCalcFieldValueHdl(aOldCalcFieldValueLink);
pTEOutliner->SetBeginPasteOrDropHdl(Link());
pTEOutliner->SetEndPasteOrDropHdl(Link());
@@ -848,7 +833,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
if( (pTEObj->GetRotateAngle() != 0) || (pTEObj && pTEObj->ISA(SdrTextObj) && ((SdrTextObj*)pTEObj)->IsFontwork()) )
{
- // obviously a repaint
pTEObj->ActionChanged();
}
@@ -861,7 +845,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
pTxtUndo=NULL;
}
}
- // Loeschung des gesamten TextObj checken
+ // check deletion of entire TextObj
SdrUndoAction* pDelUndo=NULL;
sal_Bool bDelObj=sal_False;
SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pTEObj);
@@ -899,23 +883,22 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
delete pDelUndo;
}
eRet=SDRENDTEXTEDIT_DELETED;
- DBG_ASSERT(pTEObj->GetObjList()!=NULL,"SdrObjEditView::SdrEndTextEdit(): Fatal: Editiertes Objekt hat keine ObjList!");
+ DBG_ASSERT(pTEObj->GetObjList()!=NULL,"SdrObjEditView::SdrEndTextEdit(): Fatal: Object edited doesn't have an ObjList!");
if (pTEObj->GetObjList()!=NULL)
{
pTEObj->GetObjList()->RemoveObject(pTEObj->GetOrdNum());
- CheckMarked(); // und gleich die Maekierung entfernen...
+ CheckMarked(); // remove selection immediately...
}
}
else if (bDelObj)
- { // Fuer den Writer: Loeschen muss die App nachholen.
+ { // for Writer: the app has to do the deletion itself.
eRet=SDRENDTEXTEDIT_SHOULDBEDELETED;
}
if( bUndo )
- EndUndo(); // EndUndo hinter Remove, falls der UndoStack gleich weggehaun' wird
+ EndUndo(); // EndUndo after Remove, in case UndoStack is deleted immediately
- // #111096#
- // Switch on evtl. TextAnimation again after TextEdit
+ // Switch on any TextAnimation again after TextEdit
if(pTEObj->ISA(SdrTextObj))
{
((SdrTextObj*)pTEObj)->SetTextAnimationAllowed(sal_True);
@@ -926,18 +909,18 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
// to call AdjustMarkHdl() always.
AdjustMarkHdl();
}
- // alle OutlinerViews loeschen
+ // delete all OutlinerViews
for (sal_uIntPtr i=pTEOutliner->GetViewCount(); i>0;)
{
i--;
OutlinerView* pOLV=pTEOutliner->GetView(i);
- sal_uInt16 nMorePix=pOLV->GetInvalidateMore() + 10; // solaris aw033 test #i#
+ sal_uInt16 nMorePix=pOLV->GetInvalidateMore() + 10;
Window* pWin=pOLV->GetWindow();
Rectangle aRect(pOLV->GetOutputArea());
pTEOutliner->RemoveView(i);
if (!bTextEditDontDelete || i!=0)
{
- // die nullte gehoert mir u.U. nicht.
+ // may not own the zeroth one
delete pOLV;
}
aRect.Union(aTextEditArea);
@@ -961,7 +944,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
pWin->DrawPixel(aRect.BottomRight());
//pWin->DrawRect(aRect);
}
- // und auch den Outliner selbst
+ // and now the Outliner itself
if (!bTextEditDontDelete) delete pTEOutliner;
else pTEOutliner->Clear();
if (pTEWin!=NULL) {
@@ -973,7 +956,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
aHdl.SetMoveOutside(sal_False);
if (eRet!=SDRENDTEXTEDIT_UNCHANGED)
//HMH {
-//HMH ShowMarkHdl(); // Handles kommen ansonsten via Broadcast
+//HMH ShowMarkHdl(); // Otherwise handles come via broadcast
//HMH }
//HMH else
{
@@ -988,7 +971,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
#endif
}
- // #108784#
if( pTEObj &&
pTEObj->GetModel() &&
!pTEObj->GetModel()->isLocked() &&
@@ -1043,7 +1025,7 @@ void SdrObjEditView::SetTextEditWin(Window* pWin)
}
pTextEditOutlinerView=pNewView;
pTextEditWin=pWin;
- pWin->GrabFocus(); // Damit der Cursor hier auch blinkt
+ pWin->GrabFocus(); // Make the cursor blink here as well
pNewView->ShowCursor();
ImpMakeTextCursorAreaVisible();
}
@@ -1056,10 +1038,9 @@ sal_Bool SdrObjEditView::IsTextEditHit(const Point& rHit, short nTol) const
if(mxTextEditObj.is())
{
nTol=ImpGetHitTolLogic(nTol,NULL);
- // nur drittel Toleranz hier, damit die Handles
- // noch vernuenftig getroffen werden koennen
+ // only a third of the tolerance here, so handles can be hit well
nTol=nTol/3;
- nTol=0; // Joe am 6.3.1997: Keine Hittoleranz mehr hier
+ nTol=0; // no hit tolerance here any more
if (!bOk)
{
Rectangle aEditArea;
@@ -1074,7 +1055,7 @@ sal_Bool SdrObjEditView::IsTextEditHit(const Point& rHit, short nTol) const
aEditArea.Bottom()+=nTol;
bOk=aEditArea.IsInside(rHit);
if (bOk)
- { // Nun noch checken, ob auch wirklich Buchstaben getroffen wurden
+ { // check if any characters were actually hit
Point aPnt(rHit); aPnt-=aEditArea.TopLeft();
long nHitTol = 2000;
OutputDevice* pRef = pTextEditOutliner->GetRefDevice();
@@ -1238,8 +1219,7 @@ sal_Bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
sal_Bool SdrObjEditView::Command(const CommandEvent& rCEvt, Window* pWin)
{
- // solange bis die OutlinerView einen sal_Bool zurueckliefert
- // bekommt sie nur COMMAND_STARTDRAG
+ // as long as OutlinerView returns a sal_Bool, it only gets COMMAND_STARTDRAG
if (pTextEditOutlinerView!=NULL)
{
if (rCEvt.GetCommand()==COMMAND_STARTDRAG) {
@@ -1260,7 +1240,7 @@ sal_Bool SdrObjEditView::Command(const CommandEvent& rCEvt, Window* pWin)
if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
}
CommandEvent aCEvt(aPixPos,rCEvt.GetCommand(),rCEvt.IsMouseEvent());
- // Command ist an der OutlinerView leider void
+ // Command is void at the OutlinerView, sadly
pTextEditOutlinerView->Command(aCEvt);
if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
@@ -1299,7 +1279,7 @@ sal_Bool SdrObjEditView::ImpIsTextEditAllSelected() const
if(aStr.Len() == aESel.nEndPos)
bRet = sal_True;
}
- // und nun auch noch fuer den Fall, das rueckwaerts selektiert wurde
+ // in case the selection was done backwards
if (!bRet && aESel.nEndPara==0 && aESel.nEndPos==0 && aESel.nStartPara==sal_uInt16(nParaAnz-1))
{
XubString aStr(pTextEditOutliner->GetText(pLastPara));
@@ -1322,7 +1302,7 @@ void SdrObjEditView::ImpMakeTextCursorAreaVisible()
Cursor* pCsr=pTextEditWin->GetCursor();
if (pCsr!=NULL) {
Size aSiz(pCsr->GetSize());
- if (aSiz.Width()!=0 && aSiz.Height()!=0) { // #38450#
+ if (aSiz.Width()!=0 && aSiz.Height()!=0) {
MakeVisible(Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin);
}
}
@@ -1362,7 +1342,6 @@ sal_uInt16 SdrObjEditView::GetScriptType() const
return nScriptType;
}
-/* new interface src537 */
sal_Bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr) const
{
if( mxSelectionController.is() )
@@ -1374,7 +1353,7 @@ sal_Bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHar
DBG_ASSERT(pTextEditOutlinerView!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
DBG_ASSERT(pTextEditOutliner!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
- // #92389# take care of bOnlyHardAttr(!)
+ // take care of bOnlyHardAttr(!)
if(!bOnlyHardAttr && mxTextEditObj->GetStyleSheet())
rTargetSet.Put(mxTextEditObj->GetStyleSheet()->GetItemSet());
@@ -1386,7 +1365,7 @@ sal_Bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHar
if(pTextEditOutlinerView)
{
- // FALSE= InvalidItems nicht al Default, sondern als "Loecher" betrachten
+ // FALSE= regard InvalidItems as "holes," not as Default
rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), sal_False);
rTargetSet.Put( SvxScriptTypeItem( pTextEditOutlinerView->GetSelectedScriptType() ), sal_False );
}
@@ -1415,7 +1394,7 @@ sal_Bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplace
if (!bTextEdit)
{
- // Kein TextEdit aktiv -> alle Items ans Zeichenobjekt
+ // no TextEdit activw -> all Items to drawing object
if( mxSelectionController.is() )
bRet=mxSelectionController->SetAttributes(*pSet,bReplaceAll );
@@ -1446,7 +1425,7 @@ sal_Bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplace
if(bHasEEFeatureItems)
{
String aMessage;
- aMessage.AppendAscii("SdrObjEditView::SetAttributes(): Das setzen von EE_FEATURE-Items an der SdrView macht keinen Sinn! Es fuehrt nur zu Overhead und nicht mehr lesbaren Dokumenten.");
+ aMessage.AppendAscii("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView doesn't make sense! It only leads to verhead and unreadable documents.");
InfoBox(NULL, aMessage).Execute();
}
}
@@ -1454,8 +1433,8 @@ sal_Bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplace
sal_Bool bOnlyEEItems;
sal_Bool bNoEEItems=!SearchOutlinerItems(*pSet,bReplaceAll,&bOnlyEEItems);
- // alles selektiert? -> Attrs auch an den Rahmen
- // und falls keine EEItems, dann Attrs nur an den Rahmen
+ // everything selected? -> attributes to the border, too
+ // if no EEItems, attributes to the border only
if (bAllTextSelected || bNoEEItems)
{
if( mxSelectionController.is() )
@@ -1486,18 +1465,18 @@ sal_Bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplace
mxTextEditObj->SetMergedItemSetAndBroadcast(*pSet, bReplaceAll);
- FlushComeBackTimer(); // Damit ModeHasChanged sofort kommt
+ FlushComeBackTimer(); // to set ModeHasChanged immediately
bRet=sal_True;
}
}
else if (!bOnlyEEItems)
{
- // sonst Set ggf. splitten
- // Es wird nun ein ItemSet aSet gemacht, in den die EE_Items von
- // *pSet nicht enhalten ist (ansonsten ist es eine Kopie).
+ // Otherwise split Set, if necessary.
+ // Now we build an ItemSet aSet that doesn't contain EE_Items from
+ // *pSet (otherwise it would be a copy).
sal_uInt16* pNewWhichTable=RemoveWhichRange(pSet->GetRanges(),EE_ITEMS_START,EE_ITEMS_END);
SfxItemSet aSet(pMod->GetItemPool(),pNewWhichTable);
- /*90353*/ delete[] pNewWhichTable;
+ delete[] pNewWhichTable;
SfxWhichIter aIter(aSet);
sal_uInt16 nWhich=aIter.FirstWhich();
while (nWhich!=0)
@@ -1536,9 +1515,8 @@ sal_Bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplace
}
if(!bNoEEItems)
{
- // und nun die Attribute auch noch an die EditEngine
+ // and now the attributes to the EditEngine
if (bReplaceAll) {
- // Am Outliner kann man leider nur alle Attribute platthauen
pTextEditOutlinerView->RemoveAttribs( sal_True );
}
pTextEditOutlinerView->SetAttribs(rSet);
@@ -1588,7 +1566,6 @@ sal_Bool SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDon
// if we are currently in edit mode we must also set the stylesheet
// on all paragraphs in the Outliner for the edit view
- // #92191#
if( NULL != pTextEditOutlinerView )
{
Outliner* pOutliner = pTextEditOutlinerView->GetOutliner();
@@ -1639,15 +1616,7 @@ sal_Bool SdrObjEditView::IsTextEditInSelectionMode() const
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@ @@ @@@@ @@@@ @@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@
-// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@
-// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@
-// @@@@@@@ @@@@@@ @@ @@@@@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@@@
-// @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@@ @@@@@
-//
+// MacroMode
////////////////////////////////////////////////////////////////////////////////////////////////////
sal_Bool SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, Window* pWin)
@@ -1784,7 +1753,7 @@ extern rtl::Reference< sdr::SelectionController > CreateTableController( SdrObjE
/* check if we have a single selection and that single object likes
to handle the mouse and keyboard events itself
- @todo: the selection controller should be queried from the
+ TODO: the selection controller should be queried from the
object specific view contact. Currently this method only
works for tables.
*/
@@ -2002,8 +1971,8 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar
if( !pOLV )
{
// if not in text edit mode (aka the user selected text or clicked on a word)
- // apply formating attributes to selected shape
- // All formating items (see ranges above) that are unequal in selected shape and
+ // apply formatting attributes to selected shape
+ // All formatting items (see ranges above) that are unequal in selected shape and
// the format paintbrush are hard set on the selected shape.
const sal_uInt16* pRanges = rFormatSet.GetRanges();
@@ -2026,7 +1995,7 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar
SetAttrToMarked(aPaintSet, bReplaceAll);
}
- // now apply character and paragraph formating to text, if the shape has any
+ // now apply character and paragraph formatting to text, if the shape has any
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObj);
if( pTextObj )
{
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 3d549be880a3..0e1d3e25c525 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -74,7 +74,7 @@
using namespace ::com::sun::star;
/******************************************************************************
-* Globale Daten der DrawingEngine
+* Global data of the DrawingEngine
******************************************************************************/
SdrGlobalData::SdrGlobalData() :
@@ -223,7 +223,7 @@ sal_Bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
// case since no one ever used this option.
//
// A much better (and working) criteria would be the VOC contact count.
- // The quesion is what will happen whe i make it work now suddenly? I
+ // The question is what will happen when i make it work now suddenly? I
// will try it for 2.4.
const sdr::contact::ViewContact& rViewContact = pObj->GetViewContact();
const bool bVisible(rViewContact.HasViewObjectContacts(true));
@@ -328,10 +328,10 @@ void SdrLinkList::InsertLink(const Link& rLink, unsigned nPos)
if (rLink.IsSet()) {
aList.Insert(new Link(rLink),nPos);
} else {
- OSL_FAIL("SdrLinkList::InsertLink(): Versuch, einen nicht gesetzten Link einzufuegen");
+ OSL_FAIL("SdrLinkList::InsertLink(): Tried to insert a link that was not set already.");
}
} else {
- OSL_FAIL("SdrLinkList::InsertLink(): Link schon vorhanden");
+ OSL_FAIL("SdrLinkList::InsertLink(): Link already in place.");
}
}
@@ -342,12 +342,11 @@ void SdrLinkList::RemoveLink(const Link& rLink)
Link* pLink=(Link*)aList.Remove(nFnd);
delete pLink;
} else {
- OSL_FAIL("SdrLinkList::RemoveLink(): Link nicht gefunden");
+ OSL_FAIL("SdrLinkList::RemoveLink(): Link not found.");
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-// #98988# Re-implement GetDraftFillColor(...)
bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
{
@@ -368,7 +367,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
Color aCol1(((XFillHatchItem&)rSet.Get(XATTR_FILLHATCH)).GetHatchValue().GetColor());
Color aCol2(COL_WHITE);
- // #97870# when hatch background is activated, use object fill color as hatch color
+ // when hatched background is activated, use object fill color as hatch color
sal_Bool bFillHatchBackground = ((const XFillBackgroundItem&)(rSet.Get(XATTR_FILLBACKGROUND))).GetValue();
if(bFillHatchBackground)
{
@@ -544,9 +543,9 @@ sal_Bool SearchOutlinerItems(const SfxItemSet& rSet, sal_Bool bInklDefaults, sal
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich=aIter.FirstWhich();
while (((bLookOnly && bOnly) || !bHas) && nWhich!=0) {
- // bei bInklDefaults ist der gesamte Which-Range
- // ausschlaggebend, ansonsten nur die gesetzten Items
- // Disabled und DontCare wird als Loch im Which-Range betrachtet
+ // For bInklDefaults, the entire Which range is decisive,
+ // in other cases only the set items are.
+ // Disabled and DontCare are regarded as holes in the Which range.
SfxItemState eState=rSet.GetItemState(nWhich);
if ((eState==SFX_ITEM_DEFAULT && bInklDefaults) || eState==SFX_ITEM_SET) {
if (nWhich<EE_ITEMS_START || nWhich>EE_ITEMS_END) bOnly=sal_False;
@@ -561,17 +560,17 @@ sal_Bool SearchOutlinerItems(const SfxItemSet& rSet, sal_Bool bInklDefaults, sal
sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRangeBeg, sal_uInt16 nRangeEnd)
{
- // insgesamt sind 6 Faelle moeglich (je Range):
- // [Beg..End] zu entfernender Range
- // [b..e] [b..e] [b..e] Fall 1,3,2: egal, ganz weg, egal + Ranges
- // [b........e] [b........e] Fall 4,5 : Bereich verkleinern | in
- // [b......................e] Fall 6 : Splitting + pOldWhichTable
+ // Six possible cases (per range):
+ // [Beg..End] Range, to delete
+ // [b..e] [b..e] [b..e] Cases 1,3,2: doesn't matter, delete, doesn't matter + Ranges
+ // [b........e] [b........e] Cases 4,5 : shrink range | in
+ // [b......................e] Case 6 : splitting + pOldWhichTable
sal_uInt16 nAnz=0;
while (pOldWhichTable[nAnz]!=0) nAnz++;
- nAnz++; // nAnz muesste nun in jedem Fall eine ungerade Zahl sein (0 am Ende des Arrays)
- DBG_ASSERT((nAnz&1)==1,"Joe: RemoveWhichRange: WhichTable hat keine ungerade Anzahl von Eintraegen");
+ nAnz++; // nAnz should now be an odd number (0 for end of array)
+ DBG_ASSERT((nAnz&1)==1,"RemoveWhichRange: WhichTable doesn't have an odd number of entries.");
sal_uInt16 nAlloc=nAnz;
- // benoetigte Groesse des neuen Arrays ermitteln
+ // check necessary size of new array
sal_uInt16 nNum=nAnz-1;
while (nNum!=0) {
nNum-=2;
@@ -587,8 +586,8 @@ sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRange
sal_uInt16* pNewWhichTable=new sal_uInt16[nAlloc];
memcpy(pNewWhichTable,pOldWhichTable,nAlloc*sizeof(sal_uInt16));
- pNewWhichTable[nAlloc-1]=0; // im Falle 3 fehlt die 0 am Ende
- // nun die unerwuenschten Ranges entfernen
+ pNewWhichTable[nAlloc-1]=0; // in case 3, there's no 0 at the end.
+ // now remove the unwanted ranges
nNum=nAlloc-1;
while (nNum!=0) {
nNum-=2;
@@ -605,14 +604,14 @@ sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRange
case 3: {
unsigned nTailBytes=(nAnz-(nNum+2))*sizeof(sal_uInt16);
memcpy(&pNewWhichTable[nNum],&pNewWhichTable[nNum+2],nTailBytes);
- nAnz-=2; // Merken: Array hat sich verkleinert
+ nAnz-=2; // remember: array is now smaller
} break;
case 4: pNewWhichTable[nNum+1]=nRangeBeg-1; break;
case 5: pNewWhichTable[nNum]=nRangeEnd+1; break;
case 6: {
unsigned nTailBytes=(nAnz-(nNum+2))*sizeof(sal_uInt16);
memcpy(&pNewWhichTable[nNum+4],&pNewWhichTable[nNum+2],nTailBytes);
- nAnz+=2; // Merken: Array hat sich vergroessert
+ nAnz+=2; // remember:array is now larger
pNewWhichTable[nNum+2]=nRangeEnd+1;
pNewWhichTable[nNum+3]=pNewWhichTable[nNum+1];
pNewWhichTable[nNum+1]=nRangeBeg-1;
@@ -626,7 +625,7 @@ sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRange
SvdProgressInfo::SvdProgressInfo( Link *_pLink )
{
- DBG_ASSERT(_pLink!=NULL,"SvdProgressInfo(): Kein Link angegeben!!");
+ DBG_ASSERT(_pLink!=NULL,"SvdProgressInfo(): No Link stated!");
pLink = _pLink;
nSumActionCount = 0;
@@ -700,7 +699,7 @@ void SvdProgressInfo::ReportError()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-// #i101872# isolate GetTextEditBackgroundColor to tooling; it woll anyways only be used as long
+// #i101872# isolate GetTextEditBackgroundColor to tooling; it will anyways only be used as long
// as text edit is not running on overlay
namespace
@@ -733,7 +732,7 @@ namespace
{
SdrTextObj* pText = dynamic_cast< SdrTextObj * >(pObj);
- // #108867# Exclude zero master page object (i.e. background shape) from color query
+ // Exclude zero master page object (i.e. background shape) from color query
if(pText
&& pObj->IsClosedObj()
&& (!bMaster || (!pObj->IsNotVisibleAsMaster() && 0 != no))
@@ -770,7 +769,7 @@ namespace
aSet &= rPage.TRG_GetMasterPageVisibleLayers();
SdrPage& rMasterPage = rPage.TRG_GetMasterPage();
- // #108867# Don't fall back to background shape on
+ // Don't fall back to background shape on
// master pages. This is later handled by
// GetBackgroundColor, and is necessary to cater for
// the silly ordering: 1. shapes, 2. master page
@@ -780,7 +779,7 @@ namespace
}
}
- // #108867# Only now determine background color from background shapes
+ // Only now determine background color from background shapes
if(!bRet && !bSkipBackgroundShape)
{
rCol = rPage.GetPageBackgroundColor();
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 0b0d5d43f0e8..134d0b9b00d4 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -201,7 +201,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
if(pProgrInfo != NULL)
{
nActionsToReport++;
- if(nActionsToReport >= 16) // Alle 16 Action updaten
+ if(nActionsToReport >= 16) // update all 16 actions
{
if(!pProgrInfo->ReportActions(nActionsToReport))
break;
@@ -216,19 +216,18 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
nActionsToReport = 0;
}
- // MapMode-Scaling vornehmen
+ // MapMode scaling
MapScaling();
- // Objekte in vorgegebenes Rechteck hineinskalieren
+ // scale objects to predetermined rectangle
sal_uIntPtr nAnz=aTmpList.GetObjCount();
- // Beim berechnen der Fortschrittsanzeige wird GetActionSize()*3 benutzt.
- // Da in aTmpList allerdings weniger eintraege als GetActionSize()
- // existieren koennen, muessen hier die zuviel vermuteten Actionen wieder
- // hinzugefuegt werden.
+ // To calculate the progress meter, we use GetActionSize()*3.
+ // However, aTmpList has a lower entry count limit than GetActionSize(),
+ // so the actions that were assumed were too much have to be re-added.
nActionsToReport = (pMtf->GetActionSize() - nAnz)*2;
- // Alle noch nicht gemeldeten Rescales melden
+ // announce all currently unannounced rescales
if(pProgrInfo)
{
pProgrInfo->ReportRescales(nActionsToReport);
@@ -236,7 +235,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
}
nActionsToReport = 0;
- // alle in aTmpList zwischengespeicherten Objekte nun in rOL ab der Position nInsPos einfuegen
+ // insert all objects cached in aTmpList zwischengespeicherten Objekte now into rOL from nInsPos
if (nInsPos>rOL.GetObjCount()) nInsPos=rOL.GetObjCount();
SdrInsertReason aReason(SDRREASON_VIEWCALL);
for (sal_uIntPtr i=0; i<nAnz; i++)
@@ -248,7 +247,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
if(pProgrInfo != NULL)
{
nActionsToReport++;
- if(nActionsToReport >= 32) // Alle 32 Action updaten
+ if(nActionsToReport >= 32) // update all 32 actions
{
pProgrInfo->ReportInserts(nActionsToReport);
nActionsToReport = 0;
@@ -257,7 +256,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
}
if (pTmpMtf!=NULL) delete pTmpMtf;
- // ein letztesmal alle verbliebennen Inserts reporten
+ // report all remaining inserts for the last time
if(pProgrInfo != NULL)
{
pProgrInfo->ReportInserts(nActionsToReport);
@@ -987,7 +986,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
if(aVD.IsLineColor())
{
- // switch line off; when there was one there will be a
+ // switch line off; if there was one, there will be a
// META_POLYLINE_ACTION following creating another object
const Color aLineColor(aVD.GetLineColor());
aVD.SetLineColor();
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index c2f99a212d79..e9c2d317f13b 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -34,7 +34,7 @@
#include <svx/svdobj.hxx>
//************************************************************
-// Vorausdeklarationen
+// Forward Declarations
//************************************************************
class SfxItemSet;
@@ -45,7 +45,7 @@ class SdrObject;
class SvdProgressInfo;
//************************************************************
-// Hilfsklasse SdrObjRefList
+// Helper Class SdrObjRefList
//************************************************************
class SdrObjRefList
@@ -66,7 +66,7 @@ public:
};
//************************************************************
-// Hilfsklasse ImpSdrGDIMetaFileImport
+// Helper Class ImpSdrGDIMetaFileImport
//************************************************************
class ImpSdrGDIMetaFileImport
@@ -75,7 +75,7 @@ protected:
SdrObjRefList aTmpList;
VirtualDevice aVD;
Rectangle aScaleRect;
- sal_uLong nMapScalingOfs; // ab hier nocht nicht mit MapScaling bearbeitet
+ sal_uLong nMapScalingOfs; // from here on, not edited with MapScaling
SfxItemSet* pLineAttr;
SfxItemSet* pFillAttr;
SfxItemSet* pTextAttr;
@@ -97,12 +97,12 @@ protected:
sal_Bool bFntDirty;
- // fuer Optimierung von (PenNULL,Brush,DrawPoly),(Pen,BrushNULL,DrawPoly) -> aus 2 mach ein
+ // to optimize (PenNULL,Brush,DrawPoly),(Pen,BrushNULL,DrawPoly) -> two-in-one
sal_Bool bLastObjWasPolyWithoutLine;
sal_Bool bNoLine;
sal_Bool bNoFill;
- // fuer Optimierung mehrerer Linien zu einer Polyline
+ // to optimize multiple lines into a Polyline
sal_Bool bLastObjWasLine;
protected:
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index df175ae71864..0d9c0c75deca 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -31,7 +31,7 @@
#include <math.h>
#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/svdpagv.hxx>
#include <svx/svdglue.hxx>
@@ -302,10 +302,10 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints()
sal_uInt16 nGlueIdx=pGPL->FindGluePoint(nPtId);
if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND)
{
- SdrGluePoint aNewGP((*pGPL)[nGlueIdx]); // GluePoint klonen
- sal_uInt16 nNewIdx=pGPL->Insert(aNewGP); // und einfuegen
- sal_uInt16 nNewId=(*pGPL)[nNewIdx].GetId(); // Id des neuen GluePoints ermitteln
- pPts->Replace(nNewId,nPtNum); // und diesen markieren (anstelle des alten)
+ SdrGluePoint aNewGP((*pGPL)[nGlueIdx]); // clone GluePoint
+ sal_uInt16 nNewIdx=pGPL->Insert(aNewGP); // and insert it
+ sal_uInt16 nNewId=(*pGPL)[nNewIdx].GetId(); // retrieve ID of new GluePoints
+ pPts->Replace(nNewId,nPtNum); // select it (instead of the old one)
}
}
}
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 8029ba57b621..eac24300d6f4 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -83,7 +83,7 @@ Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
}
}
aPt+=aOfs;
- // Und nun auf's BoundRect des Objekts begrenzen
+ // Now limit to the BoundRect ofthe object
if (aPt.X()<aBound.Left ()) aPt.X()=aBound.Left ();
if (aPt.X()>aBound.Right ()) aPt.X()=aBound.Right ();
if (aPt.Y()<aBound.Top ()) aPt.Y()=aBound.Top ();
@@ -183,12 +183,12 @@ void SdrGluePoint::Rotate(const Point& rRef, long nWink, double sn, double cs, c
{
Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
RotatePoint(aPt,rRef,sn,cs);
- // Bezugskante drehen
+ // rotate reference edge
if(nAlign != (SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER))
{
SetAlignAngle(GetAlignAngle()+nWink);
}
- // Austrittsrichtungen drehen
+ // rotate exit directions
sal_uInt16 nEscDir0=nEscDir;
sal_uInt16 nEscDir1=0;
if ((nEscDir0&SDRESC_LEFT )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_LEFT )+nWink);
@@ -203,14 +203,14 @@ void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nWink, co
{
Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
MirrorPoint(aPt,rRef1,rRef2);
- // Bezugskante spiegeln
+ // mirror reference edge
if(nAlign != (SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER))
{
long nAW=GetAlignAngle();
nAW+=2*(nWink-nAW);
SetAlignAngle(nAW);
}
- // Austrittsrichtungen spiegeln
+ // mirror exit directions
sal_uInt16 nEscDir0=nEscDir;
sal_uInt16 nEscDir1=0;
if ((nEscDir0&SDRESC_LEFT)!=0) {
@@ -250,9 +250,8 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const
Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
aPt=rWin.LogicToPixel(aPt);
rWin.EnableMapMode(sal_False);
- long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel
+ long x=aPt.X(),y=aPt.Y(); // Size fixed to 7 pixels for now
- // #111096#
// do not erase background, that causes flicker (!)
rWin.Invalidate(Rectangle(Point(x-3,y-3),Point(x+3,y+3)), INVALIDATE_NOERASE);
@@ -287,9 +286,8 @@ void SdrGluePointList::operator=(const SdrGluePointList& rSrcList)
}
}
-// Die Id's der Klebepunkte in der Liste sind stets streng monoton steigend!
-// Ggf. wird dem neuen Klebepunkt eine neue Id zugewiesen (wenn diese bereits
-// vergeben ist). Die Id 0 ist reserviert.
+// The ID's of the glue points always increase monotonously!
+// If an ID is taken already, the new glue point gets a new ID. ID 0 is reserved.
sal_uInt16 SdrGluePointList::Insert(const SdrGluePoint& rGP)
{
SdrGluePoint* pGP=new SdrGluePoint(rGP);
@@ -308,11 +306,11 @@ sal_uInt16 SdrGluePointList::Insert(const SdrGluePoint& rGP)
const SdrGluePoint* pGP2=GetObject(nNum);
sal_uInt16 nTmpId=pGP2->GetId();
if (nTmpId==nId) {
- nId=nLastId+1; // bereits vorhanden
+ nId=nLastId+1; // already in use
bBrk = true;
}
if (nTmpId>nId) {
- nInsPos=nNum; // Hier einfuegen (einsortieren)
+ nInsPos=nNum; // insert here (sort)
bBrk = true;
}
}
@@ -333,8 +331,8 @@ void SdrGluePointList::Invalidate(Window& rWin, const SdrObject* pObj) const
sal_uInt16 SdrGluePointList::FindGluePoint(sal_uInt16 nId) const
{
- // Hier noch einen optimaleren Suchalgorithmus implementieren.
- // Die Liste sollte stets sortiert sein!!!!
+ // TODO: Implement a better search algorithm
+ // List should be sorted at all times!
sal_uInt16 nAnz=GetCount();
sal_uInt16 nRet=SDRGLUEPOINT_NOTFOUND;
for (sal_uInt16 nNum=0; nNum<nAnz && nRet==SDRGLUEPOINT_NOTFOUND; nNum++) {
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 63674622feb8..d0fb01c4df2d 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -68,22 +68,22 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// #i15222#
-// Due to the ressource problems in Win95/98 with bitmap ressources i
-// will change this handle bitmap provinging class. Old version was splitting
+// Due to the resource problems in Win95/98 with bitmap resources I
+// will change this handle bitmap providing class. Old version was splitting
// and preparing all small handle bitmaps in device bitmap format, now this will
-// be done on the fly. Thus, tehre is only the one big bitmap remembered. With
-// three source bitmaps, this will be 3 system bitmap ressources instead of hundreds.
+// be done on the fly. Thus, there is only one big bitmap in memory. With
+// three source bitmaps, this will be 3 system bitmap resources instead of hundreds.
// The price for that needs to be evaluated. Maybe we will need another change here
// if this is too expensive.
class SdrHdlBitmapSet
{
- // the bitmap holding all infos
+ // the bitmap holding all information
BitmapEx maMarkersBitmap;
// the cropped Bitmaps for reusage
::std::vector< BitmapEx > maRealMarkers;
- // elpers
+ // helpers
BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle);
public:
@@ -122,7 +122,7 @@ BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const R
return rTargetBitmap;
}
-// change getting of bitmap to use the big ressource bitmap
+// change getting of bitmap to use the big resource bitmap
const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd)
{
// fill in size and source position in maMarkersBitmap
@@ -132,7 +132,7 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
{
default:
{
- OSL_FAIL( "unknown kind of marker" );
+ OSL_FAIL( "Unknown kind of marker." );
// no break here, return Rect_7x7 as default
}
case Rect_7x7:
@@ -249,13 +249,13 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 67), Size(9, 9)));
}
- case Anchor: // #101688# AnchorTR for SW
+ case Anchor: // AnchorTR for SW
case AnchorTR:
{
return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 67), Size(24, 24)));
}
- // #98388# add AnchorPressed to be able to aninate anchor control
+ // add AnchorPressed to be able to animate anchor control
case AnchorPressed:
case AnchorPressedTR:
{
@@ -418,7 +418,7 @@ void SdrHdl::CreateB2dIAObject()
eColIndex = (bSelect) ? Cyan : LightCyan;
if(bRot)
{
- // Drehhandles in Rot
+ // red rotation handles
if(pObj && bSelect)
eColIndex = Red;
else
@@ -523,7 +523,7 @@ void SdrHdl::CreateB2dIAObject()
{
break;
}
- // #101688# top right anchor for SW
+ // top right anchor for SW
case HDL_ANCHOR_TR:
{
eKindOfMarker = AnchorTR;
@@ -613,10 +613,10 @@ BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd) const
case RectPlus_7x7: eRetval = RectPlus_9x9; break;
case RectPlus_9x9: eRetval = RectPlus_11x11; break;
- // #98388# let anchor blink with it's pressed state
+ // let anchor blink with its pressed state
case Anchor: eRetval = AnchorPressed; break;
- // #101688# same for AnchorTR
+ // same for AnchorTR
case AnchorTR: eRetval = AnchorPressedTR; break;
default:
break;
@@ -683,7 +683,7 @@ BitmapEx SdrHdl::ImpGetBitmapEx( BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd
}
}
- // create animated hdl
+ // create animated handle
BitmapEx aBmpEx1 = ImpGetBitmapEx( eKindOfMarker, (sal_uInt16)eColIndex );
BitmapEx aBmpEx2 = ImpGetBitmapEx( eNextBigger, (sal_uInt16)eColIndex );
@@ -783,7 +783,7 @@ Pointer SdrHdl::GetPointer() const
break;
}
} else {
- // Fuer Resize von gedrehten Rechtecken die Mauszeiger etwas mitdrehen
+ // When resizing rotated rectangles, rotate the mouse cursor slightly, too
if (bSize && nDrehWink!=0) {
long nHdlWink=0;
switch (eKind) {
@@ -798,7 +798,7 @@ Pointer SdrHdl::GetPointer() const
default:
break;
}
- nHdlWink+=nDrehWink+2249; // und etwas drauf (zum runden)
+ nHdlWink+=nDrehWink+2249; // a little bit more (for rounding)
while (nHdlWink<0) nHdlWink+=36000;
while (nHdlWink>=36000) nHdlWink-=36000;
nHdlWink/=4500;
@@ -838,40 +838,39 @@ Pointer SdrHdl::GetPointer() const
return Pointer(ePtr);
}
-// #97016# II
sal_Bool SdrHdl::IsFocusHdl() const
{
switch(eKind)
{
- case HDL_UPLFT: // Oben links
- case HDL_UPPER: // Oben
- case HDL_UPRGT: // Oben rechts
- case HDL_LEFT: // Links
- case HDL_RIGHT: // Rechts
- case HDL_LWLFT: // Unten links
- case HDL_LOWER: // Unten
- case HDL_LWRGT: // Unten rechts
- {
- // if it's a activated TextEdit, it's moved to extended points
+ case HDL_UPLFT:
+ case HDL_UPPER:
+ case HDL_UPRGT:
+ case HDL_LEFT:
+ case HDL_RIGHT:
+ case HDL_LWLFT:
+ case HDL_LOWER:
+ case HDL_LWRGT:
+ {
+ // if it's an activated TextEdit, it's moved to extended points
if(pHdlList && pHdlList->IsMoveOutside())
return sal_False;
else
return sal_True;
}
- case HDL_MOVE: // Handle zum Verschieben des Objekts
- case HDL_POLY: // Punktselektion an Polygon oder Bezierkurve
- case HDL_BWGT: // Gewicht an einer Bezierkurve
- case HDL_CIRC: // Winkel an Kreissegmenten, Eckenradius am Rect
- case HDL_REF1: // Referenzpunkt 1, z.B. Rotationsmitte
- case HDL_REF2: // Referenzpunkt 2, z.B. Endpunkt der Spiegelachse
- //case HDL_MIRX: // Die Spiegelachse selbst
- case HDL_GLUE: // GluePoint
- case HDL_GLUE_DESELECTED: // formerly a little blue cross
- // #98388# do NOT activate here, let SW implement their own SdrHdl and
+ case HDL_MOVE: // handle to move object
+ case HDL_POLY: // selected point of polygon or curve
+ case HDL_BWGT: // weight at a curve
+ case HDL_CIRC: // angle of circle segments, corner radius of rectangles
+ case HDL_REF1: // reference point 1, e. g. center of rotation
+ case HDL_REF2: // reference point 2, e. g. endpoint of reflection axis
+ //case HDL_MIRX: // reflection axis itself
+ case HDL_GLUE: // glue point
+ case HDL_GLUE_DESELECTED: // deselected glue point, used to be a little blue cross
+ // do NOT activate here, let SW implement their own SdrHdl and
// overload IsFocusHdl() there to make the anchor accessible
//case HDL_ANCHOR: // anchor symbol (SD, SW)
- // #101688# same for AnchorTR
+ // same for AnchorTR
//case HDL_ANCHOR_TR: // anchor symbol (SD, SW)
//case HDL_TRNS: // interactive transparence
@@ -977,7 +976,7 @@ Bitmap SdrHdlColor::CreateColorDropper(Color aCol)
// get write access
BitmapWriteAccess* pWrite = aRetval.AcquireWriteAccess();
- DBG_ASSERT(pWrite, "Got NO write access to a new Bitmap !!!");
+ DBG_ASSERT(pWrite, "Got NO write access to a new Bitmap!");
if(pWrite)
{
@@ -1603,7 +1602,7 @@ Pointer ImpMeasureHdl::GetPointer() const
{
case 0: case 1: return Pointer(POINTER_HAND);
case 2: case 3: return Pointer(POINTER_MOVEPOINT);
- case 4: case 5: return SdrHdl::GetPointer(); // wird dann entsprechend gedreht
+ case 4: case 5: return SdrHdl::GetPointer(); // will then be rotated appropriately
} // switch
return Pointer(POINTER_NOTALLOWED);
}
@@ -1680,7 +1679,7 @@ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const
{
SdrHdlKind eKind1=((SdrHdl*)pElem1)->GetKind();
SdrHdlKind eKind2=((SdrHdl*)pElem2)->GetKind();
- // Level 1: Erst normale Handles, dann Glue, dann User, dann Plushandles, dann Retpunkt-Handles
+ // Level 1: first normal handles, then Glue, then User, then Plus handles, then reference point handles
unsigned n1=1;
unsigned n2=1;
if (eKind1!=eKind2)
@@ -1711,9 +1710,9 @@ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const
sal_uInt32 nNum1=((SdrHdl*)pElem1)->GetObjHdlNum();
sal_uInt32 nNum2=((SdrHdl*)pElem2)->GetObjHdlNum();
if (nNum1==nNum2)
- { // #48763#
+ {
if (eKind1==eKind2)
- return (long)pElem1<(long)pElem2 ? -1 : 1; // Notloesung, um immer die gleiche Sortierung zu haben
+ return (long)pElem1<(long)pElem2 ? -1 : 1; // Hack, to always get to the same sorting
return (sal_uInt16)eKind1<(sal_uInt16)eKind2 ? -1 : 1;
}
else
@@ -1740,14 +1739,14 @@ SdrMarkView* SdrHdlList::GetView() const
return pView;
}
-// #105678# Help struct for re-sorting handles
+// Helper struct for re-sorting handles
struct ImplHdlAndIndex
{
SdrHdl* mpHdl;
sal_uInt32 mnIndex;
};
-// #105678# Help method for sorting handles taking care of OrdNums, keeping order in
+// Helper method for sorting handles taking care of OrdNums, keeping order in
// single objects and re-sorting polygon handles intuitively
extern "C" int __LOADONCALLAPI ImplSortHdlFunc( const void* pVoid1, const void* pVoid2 )
{
@@ -1824,7 +1823,6 @@ extern "C" int __LOADONCALLAPI ImplSortHdlFunc( const void* pVoid1, const void*
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-// #97016# II
void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
{
@@ -1847,10 +1845,10 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
//SDObRefresh = sal_True;
}
- // #105678# Alloc pointer array for sorted handle list
+ // allocate pointer array for sorted handle list
ImplHdlAndIndex* pHdlAndIndex = new ImplHdlAndIndex[aList.Count()];
- // #105678# build sorted handle list
+ // build sorted handle list
sal_uInt32 a;
for( a = 0; a < aList.Count(); a++)
{
@@ -1858,10 +1856,9 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
pHdlAndIndex[a].mnIndex = a;
}
- // #105678# qsort all entries
qsort(pHdlAndIndex, aList.Count(), sizeof(ImplHdlAndIndex), ImplSortHdlFunc);
- // #105678# look for old num in sorted array
+ // look for old num in sorted array
sal_uIntPtr nOldHdl(nOldHdlNum);
if(nOldHdlNum != CONTAINER_ENTRY_NOTFOUND)
@@ -1876,10 +1873,10 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
}
- // #105678# build new HdlNum
+ // build new HdlNum
sal_uIntPtr nNewHdl(nOldHdl);
- // #105678# do the focus travel
+ // do the focus travel
if(bForward)
{
if(nOldHdl != CONTAINER_ENTRY_NOTFOUND)
@@ -1924,7 +1921,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
}
- // #105678# build new HdlNum
+ // build new HdlNum
sal_uInt32 nNewHdlNum(nNewHdl);
// look for old num in sorted array
@@ -1955,7 +1952,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
}
- // #105678# free mem again
+ // free memory again
delete [] pHdlAndIndex;
}
}
@@ -2099,13 +2096,13 @@ void SdrHdlList::Clear()
void SdrHdlList::Sort()
{
- // #97016# II: remember current focused handle
+ // remember currently focused handle
SdrHdl* pPrev = GetFocusHdl();
ImpSdrHdlListSorter aSort(aList);
aSort.DoSort();
- // #97016# II: get now and compare
+ // get now and compare
SdrHdl* pNow = GetFocusHdl();
if(pPrev != pNow)
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 77783638e3e5..7557d6c73686 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -512,7 +512,7 @@ bool _SdrItemBrowserControl::BegChangeEntry(sal_uIntPtr nPos)
SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT);
pEditControl=new ImpItemEdit(&GetDataWindow(),this,0/*|WB_BORDER|WB_3DLOOK*/);
Rectangle aRect(GetFieldRectPixel(nPos,ITEMBROWSER_VALUECOL_ID,sal_False));
- aRect.Left()+=2; // Kleiner Offset fuer's Edit, damit's pixelgenau stimmt
+ aRect.Left()+=2; // little offset for the Edit, so it's exact to the pixel
aRect.Right()--;
pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize());
pEditControl->SetText(pEntry->aValue);
@@ -583,7 +583,7 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, sal_uIntP
bool bValueDiff=!rEntry.aValue.Equals(pAktEntry->aValue);
bool bAllDiff = true;
if (bStateDiff || bValueDiff) {
- // Checken, ob nur State und/oder Value geaendert
+ // check whether only state and/or value have changed
ImpItemListRow aTest(rEntry);
aTest.eState=pAktEntry->eState;
aTest.aValue=pAktEntry->aValue;
@@ -646,18 +646,18 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
}
}
} break;
- case XATTR_FILLCOLOR : /*nur bei Style=Color*/
- case XATTR_FILLGRADIENT : /*nur bei Style=Gradient*/
- case XATTR_FILLHATCH : /*nur bei Style=Hatch*/
- case XATTR_FILLTRANSPARENCE : /*nur bei Style=Color*/
- case XATTR_GRADIENTSTEPCOUNT : /*nur bei Style=Gradient*/
- case XATTR_FILLBACKGROUND : /*nur bei Style=Hatch*/
+ case XATTR_FILLCOLOR : /* only for Style=Color */
+ case XATTR_FILLGRADIENT : /* only for Style=Gradient */
+ case XATTR_FILLHATCH : /* only for Style=Hatch */
+ case XATTR_FILLTRANSPARENCE : /* only for Style=Color */
+ case XATTR_GRADIENTSTEPCOUNT : /* only for Style=Gradient */
+ case XATTR_FILLBACKGROUND : /* only for Style=Hatch */
{
rIndent=1;
if (ImpGetItem(*pSet,XATTR_FILLSTYLE,pItem)) {
XFillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue();
if (eFillStyle==XFILL_NONE) return sal_True;
- // Transparenz z.Zt. nur fuer SolidFill
+ // transparency currently only for SolidFill
if (eFillStyle!=XFILL_SOLID && (nWhich==XATTR_FILLCOLOR || nWhich==XATTR_FILLTRANSPARENCE)) return sal_True;
if (eFillStyle!=XFILL_GRADIENT && (nWhich==XATTR_FILLGRADIENT || nWhich==XATTR_GRADIENTSTEPCOUNT)) return sal_True;
if (eFillStyle!=XFILL_HATCH && (nWhich==XATTR_FILLHATCH || nWhich==XATTR_FILLBACKGROUND)) return sal_True;
@@ -665,22 +665,22 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
} break;
case XATTR_FILLBITMAP :
case XATTR_FILLBMP_TILE :
- case XATTR_FILLBMP_POS : /* z.Zt. nur wenn TILE=sal_True */
- case XATTR_FILLBMP_SIZEX : /* nur wenn nicht Stretch */
- case XATTR_FILLBMP_SIZEY : /* nur wenn nicht Stretch */
- case XATTR_FILLBMP_SIZELOG : /* nur wenn SIZELOG=sal_False zum ruecksetzen auf sal_True (alt) -> doch noch in Gebrauch */
- case XATTR_FILLBMP_TILEOFFSETX : /* nur wenn TILE=sal_True */
- case XATTR_FILLBMP_TILEOFFSETY : /* nur wenn TILE=sal_True */
- case XATTR_FILLBMP_STRETCH : /* nur wenn TILE=sal_False */
- case XATTR_FILLBMP_POSOFFSETX : /* nur wenn TILE=sal_True*/
- case XATTR_FILLBMP_POSOFFSETY : { /* nur wenn TILE=sal_True*/
+ case XATTR_FILLBMP_POS : /* currently only if TILE=sal_True */
+ case XATTR_FILLBMP_SIZEX : /* only if not Stretch */
+ case XATTR_FILLBMP_SIZEY : /* only if not Stretch */
+ case XATTR_FILLBMP_SIZELOG : /* only if SIZELOG=sal_False to reset to sal_True (old) -> but is still in use */
+ case XATTR_FILLBMP_TILEOFFSETX : /* only if TILE=sal_True */
+ case XATTR_FILLBMP_TILEOFFSETY : /* only if TILE=sal_True */
+ case XATTR_FILLBMP_STRETCH : /* only if TILE=sal_False */
+ case XATTR_FILLBMP_POSOFFSETX : /* only if TILE=sal_True*/
+ case XATTR_FILLBMP_POSOFFSETY : { /* only if TILE=sal_True*/
rIndent=1;
if (ImpGetItem(*pSet,XATTR_FILLSTYLE,pItem)) {
XFillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue();
if (eFillStyle!=XFILL_BITMAP) return sal_True;
}
if (nWhich==XATTR_FILLBITMAP || nWhich==XATTR_FILLBMP_TILE) {
- return sal_False; // immer anwaehlbar
+ return sal_False; // always selectable
}
bool bTileTRUE = false;
bool bTileFALSE = false;
@@ -692,21 +692,21 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
if (ImpGetItem(*pSet,XATTR_FILLBMP_STRETCH,pItem)) {
bStretchTRUE=((const XFillBmpStretchItem*)pItem)->GetValue();
}
- // Stretch nicht anwaehlbar, wenn Tile=TRUE
+ // Stretch not selectable if Tile=TRUE
if (nWhich==XATTR_FILLBMP_STRETCH) return bTileTRUE;
- // und uebrig bleiben 7+1 Item (Unterattribute)
+ // and 7+1 items (sub-attributes) remain
rIndent=2;
- // Pos (enum) nicht anwaehlbar, wenn Tile=FALSE
+ // Pos (enum) not selectable if Tile=FALSE
if (nWhich==XATTR_FILLBMP_POS) return bTileFALSE;
- // SizeXY nicht anwaehlbar bei Stretch=TRUE
+ // SizeXY not selectable if Stretch=TRUE
if (nWhich==XATTR_FILLBMP_SIZEX || nWhich==XATTR_FILLBMP_SIZEY) {
return bTileFALSE && bStretchTRUE;
}
- // 2 Items speziell fuer Tile
+ // 2 items specially for Tile
if (nWhich==XATTR_FILLBMP_POSOFFSETX || nWhich==XATTR_FILLBMP_POSOFFSETY) {
return bTileFALSE;
}
- // Noch 2 Items speziell fuer Tile die sich jedoch gegenseitig ausschliessen
+ // another 2 items specially for Tile -- however, these exclude each other
if (nWhich==XATTR_FILLBMP_TILEOFFSETX || nWhich==XATTR_FILLBMP_TILEOFFSETY) {
if (bTileFALSE) return sal_True;
sal_uInt16 nX=0,nY=0;
@@ -727,10 +727,10 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
if (nX!=0) return sal_True;
}
}
- // SizeLog nicht anwaehlbar bei Stretch=TRUE
- // und sonst auch nur wenn es auf SizeLog=sal_False gesetzt ist.
- // -> wohl doch noch in Gebrauch
- // (sal_True ist der statische PoolDefault)
+ // SizeLog not selectable if Stretch=TRUE and/or
+ // if SizeLog=sal_False.
+ // -> apparently still in use
+ // (sal_True is the static PoolDefault)
if (nWhich==XATTR_FILLBMP_SIZELOG) {
if (bTileFALSE && bStretchTRUE) return sal_True;
}
@@ -932,9 +932,9 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
sal_uInt16 nWhich0=0;
sal_uInt16 nWhich=aIter.FirstWhich();
while (nWhich!=0) {
- // Nun erstmal etwas umsortieren
- // Geht nur, solange keine InvalidItems, d.h. keine Luecken
- // an dieser Stelle im Set sind
+ // Now sort this a little bit differently.
+ // Only works as long as there are no InvalidItems, i. e. no gaps
+ // at this position in the Set.
if (!bDontSortItems) nWhich=ImpSortWhich(nWhich);
SfxItemState eState=pSet->GetItemState(nWhich);
if (p2ndSet!=NULL) {
@@ -1050,7 +1050,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
nWhich=aIter.NextWhich();
} // while
- if (aList.Count()>nEntryNum) { // evtl. noch zuviele Eintraege
+ if (aList.Count()>nEntryNum) { // maybe still too many entries
sal_uIntPtr nTooMuch=aList.Count()-nEntryNum;
for (sal_uIntPtr nNum=0; nNum<nTooMuch; nNum++) {
delete ImpGetEntry(nEntryNum);
@@ -1059,7 +1059,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
RowRemoved(nEntryNum,nTooMuch);
}
} else {
- Clear(); // wenn pSet==NULL
+ Clear(); // if pSet==NULL
}
ImpRestoreWhich();
SetMode(MYBROWSEMODE);
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index 84be68161ef7..b9ea4d6c6aad 100644
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -31,8 +31,6 @@
#include <svx/svdogrp.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdmark.hxx>
-
-// #99190#
#include <svx/scene3d.hxx>
SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode, bool bReverse)
@@ -92,7 +90,7 @@ void SdrObjListIter::ImpProcessMarkList( const SdrMarkList& rMarkList, SdrIterMo
void SdrObjListIter::ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, bool bUseZOrder)
{
bool bIsGroup = pObj->IsGroupObject();
- // #99190# 3D objects are no group objects, IsGroupObject()
+ // 3D objects are not group objects, IsGroupObject()
// only tests if pSub is not null ptr :-(
if( bIsGroup && pObj->ISA( E3dObject ) && !pObj->ISA( E3dScene ) )
bIsGroup = false;
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index 81d2cf495eaf..42d90291e4fa 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -29,9 +29,9 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <svx/svdlayer.hxx>
-#include <svx/svdmodel.hxx> // fuer Broadcasting
+#include <svx/svdmodel.hxx> // for Broadcasting
#include "svx/svdglob.hxx" // StringCache
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include "svx/svdstr.hrc" // names taken from the resource
////////////////////////////////////////////////////////////////////////////////////////////////////
// SetOfByte
@@ -213,7 +213,7 @@ void SdrLayer::SetName(const XubString& rNewName)
if(!rNewName.Equals(aName))
{
aName = rNewName;
- nType = 0; // Userdefined
+ nType = 0; // user defined
if(pModel)
{
@@ -399,9 +399,9 @@ const SdrLayer* SdrLayerAdmin::GetLayerPerID(sal_uInt16 nID) const
return pLay;
}
-// Globale LayerID's beginnen mit 0 aufsteigend.
-// Lokale LayerID's beginnen mit 254 absteigend.
-// 255 ist reserviert fuer SDRLAYER_NOTFOUND
+// Global LayerIDs begin at 0 and increase,
+// local LayerIDs begin at 254 and decrease;
+// 255 is reserved for SDRLAYER_NOTFOUND.
SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const
{
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 7bbc638d6fb8..c9ef7d63286f 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -35,10 +35,10 @@
#include <svx/svdpage.hxx>
#include "svx/svditer.hxx"
#include <svx/svdpagv.hxx>
-#include <svx/svdopath.hxx> // zur Abschaltung
-#include <svx/svdogrp.hxx> // des Cache bei
-#include <svx/svdorect.hxx> // GetMarkDescription
-#include "svx/svdstr.hrc" // Namen aus der Resource
+#include <svx/svdopath.hxx> // To turn off
+#include <svx/svdogrp.hxx> // the cache at
+#include <svx/svdorect.hxx> // GetMarkDescription.
+#include "svx/svdstr.hrc" // names taken from the resource
#include "svx/svdglob.hxx" // StringCache
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -191,7 +191,7 @@ void SdrMark::ObjectInDestruction(const SdrObject& rObject)
{
(void) rObject; // avoid warnings
OSL_ENSURE(mpSelectedSdrObject && mpSelectedSdrObject == &rObject, "SdrMark::ObjectInDestruction: called form object different from hosted one (!)");
- OSL_ENSURE(mpSelectedSdrObject, "SdrMark::ObjectInDestruction: still seleceted SdrObject is deleted, deselect first (!)");
+ OSL_ENSURE(mpSelectedSdrObject, "SdrMark::ObjectInDestruction: still selected SdrObject is deleted, deselect first (!)");
mpSelectedSdrObject = 0L;
}
@@ -401,7 +401,7 @@ void SdrMarkList::ImpForceSort()
if(pCmp->IsCon2())
pAkt->SetCon2(sal_True);
- // pCmp loeschen.
+ // delete pCmp
maList.Remove();
delete pCmp;
@@ -452,8 +452,6 @@ void SdrMarkList::operator=(const SdrMarkList& rLst)
sal_uLong SdrMarkList::FindObject(const SdrObject* pObj) const
{
- // #109658#
- //
// Since relying on OrdNums is not allowed for the selection because objects in the
// selection may not be inserted in a list if they are e.g. modified ATM, i changed
// this loop to just look if the object pointer is in the selection.
@@ -497,7 +495,7 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, sal_Bool bChkSort)
if(pLastObj == pNeuObj)
{
- // Aha, den gibt's schon
+ // This one already exists.
// Con1/Con2 Merging
if(rMark.IsCon1())
pLast->SetCon1(sal_True);
@@ -510,7 +508,7 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, sal_Bool bChkSort)
SdrMark* pKopie = new SdrMark(rMark);
maList.Insert(pKopie, CONTAINER_APPEND);
- // und nun checken, ob die Sortierung noch ok ist
+ // now check if the sort is ok
const SdrObjList* pLastOL = pLastObj!=0L ? pLastObj->GetObjList() : 0L;
const SdrObjList* pNeuOL = pNeuObj !=0L ? pNeuObj ->GetObjList() : 0L;
@@ -521,13 +519,13 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, sal_Bool bChkSort)
if(nNeuNum < nLastNum)
{
- // irgendwann muss mal sortiert werden
+ // at some point, we have to sort
mbSorted = sal_False;
}
}
else
{
- // irgendwann muss mal sortiert werden
+ // at some point, we have to sort
mbSorted = sal_False;
}
}
@@ -539,7 +537,7 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, sal_Bool bChkSort)
void SdrMarkList::DeleteMark(sal_uLong nNum)
{
SdrMark* pMark = GetMark(nNum);
- DBG_ASSERT(pMark!=0L,"DeleteMark: MarkEntry nicht gefunden");
+ DBG_ASSERT(pMark!=0L,"DeleteMark: MarkEntry not found.");
if(pMark)
{
@@ -552,7 +550,7 @@ void SdrMarkList::DeleteMark(sal_uLong nNum)
void SdrMarkList::ReplaceMark(const SdrMark& rNewMark, sal_uLong nNum)
{
SdrMark* pMark = GetMark(nNum);
- DBG_ASSERT(pMark!=0L,"ReplaceMark: MarkEntry nicht gefunden");
+ DBG_ASSERT(pMark!=0L,"ReplaceMark: MarkEntry not found.");
if(pMark)
{
@@ -570,7 +568,7 @@ void SdrMarkList::Merge(const SdrMarkList& rSrcList, sal_Bool bReverse)
if(rSrcList.mbSorted)
{
- // Merging ohne ein Sort bei rSrcList zu erzwingen
+ // merge without forcing a Sort in rSrcList
bReverse = sal_False;
}
@@ -617,7 +615,7 @@ sal_Bool SdrMarkList::DeletePageView(const SdrPageView& rPV)
sal_Bool SdrMarkList::InsertPageView(const SdrPageView& rPV)
{
sal_Bool bChgd(sal_False);
- DeletePageView(rPV); // erstmal alle raus, dann die ganze Seite hinten dran
+ DeletePageView(rPV); // delete all of them, then append the entire page
SdrObject* pObj;
const SdrObjList* pOL = rPV.GetObjList();
sal_uLong nObjAnz(pOL->GetObjCount());
@@ -645,7 +643,7 @@ const XubString& SdrMarkList::GetMarkDescription() const
if(mbNameOk && 1L == nAnz)
{
- // Bei Einfachselektion nur Textrahmen cachen
+ // if it's a single selection, cache only text frame
const SdrObject* pObj = GetMark(0)->GetMarkedSdrObj();
const SdrTextObj* pTextObj = PTR_CAST(SdrTextObj, pObj);
@@ -731,14 +729,14 @@ const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const
if(nMarkPtObjAnz > 1 && rNameOk)
{
- // vorzeitige Entscheidung
+ // preliminary decision
return rName;
}
}
if(rNameOk && 1L == nMarkPtObjAnz)
{
- // Bei Einfachselektion nur Textrahmen cachen
+ // if it's a single selection, cache only text frame
const SdrObject* pObj = GetMark(0)->GetMarkedSdrObj();
const SdrTextObj* pTextObj = PTR_CAST(SdrTextObj,pObj);
@@ -961,7 +959,7 @@ namespace sdr
maMarkedEdgesOfMarkedNodes.Clear();
maAllMarkedObjects.clear();
- // #126320# GetMarkCount after ForceSort
+ // GetMarkCount after ForceSort
const sal_uLong nMarkAnz(maMarkedObjectList.GetMarkCount());
for(sal_uLong a(0L); a < nMarkAnz; a++)
@@ -1003,7 +1001,7 @@ namespace sdr
if(CONTAINER_ENTRY_NOTFOUND == maMarkedObjectList.FindObject(pEdge))
{
- // nachsehen, ob er selbst markiert ist
+ // check if it itself is selected
maEdgesOfMarkedNodes.InsertEntry(aM);
}
else
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 3531ae70a76e..a5ef15cd7c29 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -49,7 +49,7 @@
#include <svx/xlnstit.hxx>
#include "svx/svditext.hxx"
-#include <editeng/editeng.hxx> // Fuer EditEngine::CreatePool()
+#include <editeng/editeng.hxx> // for EditEngine::CreatePool()
#include <svx/xtable.hxx>
@@ -60,12 +60,12 @@
#include <svx/svdundo.hxx>
#include <svx/svdpool.hxx>
#include <svx/svdobj.hxx>
-#include <svx/svdotext.hxx> // fuer ReformatAllTextObjects und CalcFieldValue
+#include <svx/svdotext.hxx> // for ReformatAllTextObjects and CalcFieldValue
#include <svx/svdetc.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdoole2.hxx>
-#include "svx/svdglob.hxx" // Stringcache
-#include "svx/svdstr.hrc" // Objektname
+#include "svx/svdglob.hxx" // StringCache
+#include "svx/svdstr.hrc" // object's name
#include "svdoutlinercache.hxx"
@@ -83,11 +83,9 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
-// #90477#
#include <tools/tenccvt.hxx>
#include <unotools/syslocale.hxx>
-// #95114#
#include <vcl/svapp.hxx>
#include <svx/sdr/properties/properties.hxx>
#include <editeng/eeitem.hxx>
@@ -185,16 +183,16 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
if ( pPool == NULL )
{
pItemPool=new SdrItemPool(0L, bLoadRefCounts);
- // Der Outliner hat keinen eigenen Pool, deshalb den der EditEngine
+ // Outliner doesn't have its own Pool, so use the EditEngine's
SfxItemPool* pOutlPool=EditEngine::CreatePool( bLoadRefCounts );
- // OutlinerPool als SecondaryPool des SdrPool
+ // OutlinerPool as SecondaryPool of SdrPool
pItemPool->SetSecondaryPool(pOutlPool);
- // Merken, dass ich mir die beiden Pools selbst gemacht habe
+ // remember that I created both pools myself
bMyPool=sal_True;
}
pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
-// SJ: #95129# using static SdrEngineDefaults only if default SvxFontHeight item is not available
+// using static SdrEngineDefaults only if default SvxFontHeight item is not available
const SfxPoolItem* pPoolItem = pItemPool->GetPoolDefaultItem( EE_CHAR_FONTHEIGHT );
if ( pPoolItem )
nDefTextHgt = ((SvxFontHeightItem*)pPoolItem)->GetHeight();
@@ -208,8 +206,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
pLayerAdmin->SetModel(this);
ImpSetUIUnit();
- // den DrawOutliner OnDemand erzeugen geht noch nicht, weil ich den Pool
- // sonst nicht kriege (erst ab 302!)
+ // can't create DrawOutliner OnDemand, because I can't get the Pool,
+ // then (only from 302 onwards!)
pDrawOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
ImpSetOutlinerDefaults(pDrawOutliner, sal_True);
@@ -279,8 +277,8 @@ SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
#endif
- // noch nicht implementiert
- OSL_FAIL("SdrModel::CopyCtor() ist noch nicht implementiert");
+ // not yet implemented
+ OSL_FAIL("SdrModel::CopyCtor() is not yet implemented.");
}
SdrModel::~SdrModel()
@@ -302,7 +300,7 @@ SdrModel::~SdrModel()
if(pAktUndoGroup)
{
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Im Dtor des SdrModel steht noch ein offenes Undo rum: \""));
+ "In the Dtor of the SdrModel there is an open Undo left: \""));
aStr.append(rtl::OUStringToOString(pAktUndoGroup->GetComment(), osl_getThreadTextEncoding()))
.append('\"');
OSL_FAIL(aStr.getStr());
@@ -311,20 +309,17 @@ SdrModel::~SdrModel()
if (pAktUndoGroup!=NULL)
delete pAktUndoGroup;
- // #116168#
ClearModel(sal_True);
delete pLayerAdmin;
- // Den DrawOutliner erst nach dem ItemPool loeschen, da
- // der ItemPool Items des DrawOutliners referenziert !!! (<- das war mal)
- // Wg. Problem bei Malte Reihenfolge wieder umgestellt.
- // Loeschen des Outliners vor dem loeschen des ItemPools
+ // Delete DrawOutliner only after deleting ItemPool, because ItemPool
+ // references Items of the DrawOutliner!
delete pHitTestOutliner;
delete pDrawOutliner;
// delete StyleSheetPool, derived classes should not do this since
- // the DrawingEngine may need it in its destrctor (SB)
+ // the DrawingEngine may need it in its destructor
if( mxStyleSheetPool.is() )
{
Reference< XComponent > xComponent( dynamic_cast< cppu::OWeakObject* >( mxStyleSheetPool.get() ), UNO_QUERY );
@@ -340,12 +335,11 @@ SdrModel::~SdrModel()
if (bMyPool)
{
- // Pools loeschen, falls es meine sind
+ // delete Pools if they're mine
SfxItemPool* pOutlPool=pItemPool->GetSecondaryPool();
SfxItemPool::Free(pItemPool);
- // Der OutlinerPool muss nach dem ItemPool plattgemacht werden, da der
- // ItemPool SetItems enthaelt die ihrerseits Items des OutlinerPools
- // referenzieren (Joe)
+ // OutlinerPool has to be deleted after deleting ItemPool, because
+ // ItemPool contains SetItems that themselves reference Items from OutlinerPool.
SfxItemPool::Free(pOutlPool);
}
@@ -364,15 +358,15 @@ bool SdrModel::IsInDestruction() const
return mbInDestruction;
}
-// noch nicht implementiert:
+// not yet implemented
void SdrModel::operator=(const SdrModel& /*rSrcModel*/)
{
- OSL_FAIL("SdrModel::operator=() ist noch nicht implementiert");
+ OSL_FAIL("SdrModel::operator=() is not yet implemented.");
}
bool SdrModel::operator==(const SdrModel& /*rCmpModel*/) const
{
- OSL_FAIL("SdrModel::operator==() ist noch nicht implementiert");
+ OSL_FAIL("SdrModel::operator==() is not yet implemented");
return sal_False;
}
@@ -623,7 +617,7 @@ void SdrModel::EndUndo()
void SdrModel::SetUndoComment(const XubString& rComment)
{
- DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is on level 0!");
+ DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is already 0!");
if( mpImpl->mpUndoManager )
{
@@ -640,7 +634,7 @@ void SdrModel::SetUndoComment(const XubString& rComment)
void SdrModel::SetUndoComment(const XubString& rComment, const XubString& rObjDescr)
{
- DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is 0!");
+ DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is already 0!");
if( mpImpl->mpUndoManager )
{
OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" );
@@ -712,7 +706,6 @@ void SdrModel::ImpCreateTables()
}
}
-// #116168#
void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
{
if(bCalledFromDestructor)
@@ -728,7 +721,6 @@ void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
DeletePage( (sal_uInt16)i );
}
maPages.Clear();
- // #109538#
PageListChanged();
// delete all Masterpages
@@ -738,7 +730,6 @@ void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
DeleteMasterPage( (sal_uInt16)i );
}
maMaPag.Clear();
- // #109538#
MasterPageListChanged();
pLayerAdmin->ClearLayer();
@@ -763,7 +754,7 @@ void SdrModel::SetTextDefaults() const
void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt )
{
- // #95114# set application-language specific dynamic pool language defaults
+ // set application-language specific dynamic pool language defaults
SvxFontItem aSvxFontItem( EE_CHAR_FONTINFO) ;
SvxFontItem aSvxFontItemCJK(EE_CHAR_FONTINFO_CJK);
SvxFontItem aSvxFontItemCTL(EE_CHAR_FONTINFO_CTL);
@@ -822,7 +813,7 @@ const SdrTextObj* SdrModel::GetFormattingTextObj() const
void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, sal_Bool bInit )
{
/**************************************************************************
- * Initialisierung der Outliner fuer Textausgabe und HitTest
+ * Initialization of the Outliners for drawing text and HitTest
**************************************************************************/
if( bInit )
{
@@ -869,10 +860,9 @@ void SdrModel::ImpReformatAllTextObjects()
}
}
-/** #103122#
- steps over all available pages and sends notify messages to
+/* steps over all available pages and sends notify messages to
all edge objects that are connected to other objects so that
- they may reposition itselfs
+ they may reposition themselves
*/
void SdrModel::ImpReformatAllEdgeObjects()
{
@@ -897,7 +887,7 @@ SvStream* SdrModel::GetDocumentStream(SdrDocumentStreamInfo& /*rStreamInfo*/) co
return NULL;
}
-// Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
+// convert template attributes from the string into "hard" attributes
void SdrModel::BurnInStyleSheetAttributes()
{
sal_uInt16 nAnz=GetMasterPageCount();
@@ -978,7 +968,7 @@ void SdrModel::ImpSetUIUnit()
switch (eUIUnit)
{
case FUNIT_NONE : break;
- // Metrisch
+ // metric
case FUNIT_100TH_MM: nUIUnitKomma-=5; break;
case FUNIT_MM : nUIUnitKomma-=3; break;
case FUNIT_CM : nUIUnitKomma-=2; break;
@@ -987,14 +977,14 @@ void SdrModel::ImpSetUIUnit()
// Inch
case FUNIT_TWIP : nMul=144; nUIUnitKomma--; break; // 1Twip = 1/1440"
case FUNIT_POINT : nMul=72; break; // 1Pt = 1/72"
- case FUNIT_PICA : nMul=6; break; // 1Pica = 1/6" ?
+ case FUNIT_PICA : nMul=6; break; // 1Pica = 1/6"
case FUNIT_INCH : break; // 1" = 1"
case FUNIT_FOOT : nDiv*=12; break; // 1Ft = 12"
case FUNIT_MILE : nDiv*=6336; nUIUnitKomma++; break; // 1mile = 63360"
- // sonstiges
+ // other
case FUNIT_CUSTOM : break;
case FUNIT_PERCENT: nUIUnitKomma+=2; break;
- // TODO: Add code to handle the following if needed (added to removed warning)
+ // TODO: Add code to handle the following if needed (added to remove warning)
case FUNIT_CHAR : break;
case FUNIT_LINE : break;
} // switch
@@ -1036,14 +1026,14 @@ void SdrModel::ImpSetUIUnit()
nDiv *= aUIScale.GetNumerator();
}
- // shorten trailing zeroes for dividend
+ // shorten trailing zeros for dividend
while(0 == (nMul % 10))
{
nUIUnitKomma--;
nMul /= 10;
}
- // shorten trailing zeroes for divisor
+ // shorten trailing zeros for divisor
while(0 == (nDiv % 10))
{
nUIUnitKomma++;
@@ -1065,7 +1055,7 @@ void SdrModel::SetScaleUnit(MapUnit eMap, const Fraction& rFrac)
ImpSetUIUnit();
ImpSetOutlinerDefaults( pDrawOutliner );
ImpSetOutlinerDefaults( pHitTestOutliner );
- ImpReformatAllTextObjects(); // #40424#
+ ImpReformatAllTextObjects();
}
}
@@ -1077,7 +1067,7 @@ void SdrModel::SetScaleUnit(MapUnit eMap)
ImpSetUIUnit();
ImpSetOutlinerDefaults( pDrawOutliner );
ImpSetOutlinerDefaults( pHitTestOutliner );
- ImpReformatAllTextObjects(); // #40424#
+ ImpReformatAllTextObjects();
}
}
@@ -1088,7 +1078,7 @@ void SdrModel::SetScaleFraction(const Fraction& rFrac)
ImpSetUIUnit();
ImpSetOutlinerDefaults( pDrawOutliner );
ImpSetOutlinerDefaults( pHitTestOutliner );
- ImpReformatAllTextObjects(); // #40424#
+ ImpReformatAllTextObjects();
}
}
@@ -1097,7 +1087,7 @@ void SdrModel::SetUIUnit(FieldUnit eUnit)
if (eUIUnit!=eUnit) {
eUIUnit=eUnit;
ImpSetUIUnit();
- ImpReformatAllTextObjects(); // #40424#
+ ImpReformatAllTextObjects();
}
}
@@ -1106,7 +1096,7 @@ void SdrModel::SetUIScale(const Fraction& rScale)
if (aUIScale!=rScale) {
aUIScale=rScale;
ImpSetUIUnit();
- ImpReformatAllTextObjects(); // #40424#
+ ImpReformatAllTextObjects();
}
}
@@ -1116,7 +1106,7 @@ void SdrModel::SetUIUnit(FieldUnit eUnit, const Fraction& rScale)
eUIUnit=eUnit;
aUIScale=rScale;
ImpSetUIUnit();
- ImpReformatAllTextObjects(); // #40424#
+ ImpReformatAllTextObjects();
}
}
@@ -1200,7 +1190,7 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr)
void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_Int32 nNumDigits) const
{
// #i22167#
- // change to double precision usage to not loose decimal places after comma
+ // change to double precision usage to not lose decimal places
const bool bNegative(nVal < 0L);
SvtSysLocale aSysLoc;
const LocaleDataWrapper& rLoc(aSysLoc.GetLocaleData());
@@ -1239,7 +1229,7 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_
if(nKomma < 0)
{
- // Negatives Komma bedeutet: Nullen dran
+ // negative nKomma (decimal point) means: add zeros
sal_Int32 nAnz(-nKomma);
for(sal_Int32 i=0; i<nAnz; i++)
@@ -1248,11 +1238,11 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_
nKomma = 0;
}
- // #83257# the second condition needs to be <= since inside this loop
+ // the second condition needs to be <= since inside this loop
// also the leading zero is inserted.
if(nKomma > 0 && rStr.Len() <= nKomma)
{
- // Fuer Komma evtl. vorne Nullen dran
+ // if necessary, add zeros before the decimal point
sal_Int32 nAnz(nKomma - rStr.Len());
if(nAnz >= 0 && rLoc.isNumLeadingZero())
@@ -1264,7 +1254,7 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_
sal_Unicode cDec( rLoc.getNumDecimalSep().GetChar(0) );
- // KommaChar einfuegen
+ // insert KommaChar (decimal point character)
sal_Int32 nVorKomma(rStr.Len() - nKomma);
if(nKomma > 0)
@@ -1279,7 +1269,7 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_
rStr.Erase(rStr.Len() - 1);
}
- // ggf. Trennpunkte bei jedem Tausender einfuegen
+ // if necessary, add separators before every third digit
if( nVorKomma > 3 )
{
String aThoSep( rLoc.getNumThousandSep() );
@@ -1288,7 +1278,7 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_
sal_Unicode cTho( aThoSep.GetChar(0) );
sal_Int32 i(nVorKomma - 3);
- while(i > 0) // #78311#
+ while(i > 0)
{
rStr.Insert(cTho, (xub_StrLen)i);
i -= 3;
@@ -1390,7 +1380,6 @@ void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
sal_uInt16 nAnz=GetPageCount();
if (nPos>nAnz) nPos=nAnz;
maPages.Insert(pPage,nPos);
- // #109538#
PageListChanged();
pPage->SetInserted(sal_True);
pPage->SetPageNum(nPos);
@@ -1411,7 +1400,6 @@ void SdrModel::DeletePage(sal_uInt16 nPgNum)
SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
{
SdrPage* pPg=(SdrPage*)maPages.Remove(nPgNum);
- // #109538#
PageListChanged();
if (pPg!=NULL) {
pPg->SetInserted(sal_False);
@@ -1427,7 +1415,6 @@ SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
void SdrModel::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
SdrPage* pPg=(SdrPage*)maPages.Remove(nPgNum);
- // #109538#
PageListChanged();
if (pPg!=NULL) {
pPg->SetInserted(sal_False);
@@ -1440,7 +1427,6 @@ void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
sal_uInt16 nAnz=GetMasterPageCount();
if (nPos>nAnz) nPos=nAnz;
maMaPag.Insert(pPage,nPos);
- // #109538#
MasterPageListChanged();
pPage->SetInserted(sal_True);
pPage->SetPageNum(nPos);
@@ -1463,12 +1449,11 @@ void SdrModel::DeleteMasterPage(sal_uInt16 nPgNum)
SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum)
{
SdrPage* pRetPg=(SdrPage*)maMaPag.Remove(nPgNum);
- // #109538#
MasterPageListChanged();
if(pRetPg)
{
- // Nun die Verweise der normalen Zeichenseiten auf die entfernte MasterPage loeschen
+ // Now delete the links from the normal drawing pages to the deleted master page.
sal_uInt16 nPageAnz(GetPageCount());
for(sal_uInt16 np(0); np < nPageAnz; np++)
@@ -1490,12 +1475,10 @@ SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum)
void SdrModel::MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
SdrPage* pPg=(SdrPage*)maMaPag.Remove(nPgNum);
- // #109538#
MasterPageListChanged();
if (pPg!=NULL) {
pPg->SetInserted(sal_False);
maMaPag.Insert(pPg,nNewPos);
- // #109538#
MasterPageListChanged();
}
bMPgNumsDirty=sal_True;
@@ -1507,7 +1490,6 @@ void SdrModel::MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
////////////////////////////////////////////////////////////////////////////////////////////////////
-// #48289#
void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
sal_uInt16 nDestPos,
bool bUndo, bool bMoveNoCopy)
@@ -1531,7 +1513,7 @@ void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
if (nDestPos>nPageAnz)
nDestPos=nPageAnz;
- // Zunaechst die Zeiger der betroffenen Seiten in einem Array sichern
+ // at first, save the pointers of the affected pages in an array
sal_uInt16 nPageNum=nFirstPageNum;
sal_uInt16 nCopyAnz=((!bReverse)?(nLastPageNum-nFirstPageNum):(nFirstPageNum-nLastPageNum))+1;
SdrPage** pPagePtrs=new SdrPage*[nCopyAnz];
@@ -1545,7 +1527,7 @@ void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
nPageNum++;
}
- // Jetzt die Seiten kopieren
+ // now copy the pages
sal_uInt16 nDestNum=nDestPos;
for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++)
{
@@ -1562,7 +1544,7 @@ void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
}
else
{
- // Move ist nicht getestet!
+ // TODO: Move is untested!
if (nDestNum>nPageNum2)
nDestNum--;
@@ -1592,7 +1574,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
bool bUndo, bool bTreadSourceAsConst)
{
if (&rSourceModel==this)
- { // #48289#
+ {
CopyPages(nFirstPageNum,nLastPageNum,nDestPos,bUndo,!bTreadSourceAsConst);
return;
}
@@ -1616,7 +1598,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
bool* pMasterNeed=NULL;
sal_uInt16 nMasterNeed=0;
if (bMergeMasterPages && nSrcMasterPageAnz!=0) {
- // Feststellen, welche MasterPages aus rSrcModel benoetigt werden
+ // determine which MasterPages from rSrcModel we need
pMasterMap=new sal_uInt16[nSrcMasterPageAnz];
pMasterNeed=new bool[nSrcMasterPageAnz];
memset(pMasterMap,0xFF,nSrcMasterPageAnz*sizeof(sal_uInt16));
@@ -1640,7 +1622,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
}
}
}
- // Nun das Mapping der MasterPages bestimmen
+ // now determine the Mapping of the MasterPages
sal_uInt16 nAktMaPagNum=nDstMasterPageAnz;
for (sal_uInt16 i=0; i<nSrcMasterPageAnz; i++) {
if (pMasterNeed[i]) {
@@ -1651,7 +1633,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
}
}
- // rueberholen der Masterpages
+ // get the MasterPages
if (pMasterMap!=NULL && pMasterNeed!=NULL && nMasterNeed!=0) {
for (sal_uInt16 i=nSrcMasterPageAnz; i>0;) {
i--;
@@ -1664,11 +1646,10 @@ void SdrModel::Merge(SdrModel& rSourceModel,
pPg=rSourceModel.RemoveMasterPage(i);
}
if (pPg!=NULL) {
- // und alle ans einstige Ende des DstModel reinschieben.
- // nicht InsertMasterPage() verwenden da die Sache
- // inkonsistent ist bis alle drin sind
+ // Now append all of them to the end of the DstModel.
+ // Don't use InsertMasterPage(), because everything is
+ // inconsistent until all are in.
maMaPag.Insert(pPg,nDstMasterPageAnz);
- // #109538#
MasterPageListChanged();
pPg->SetInserted(sal_True);
pPg->SetModel(this);
@@ -1681,7 +1662,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
}
}
- // rueberholen der Zeichenseiten
+ // get the drawing pages
if (bInsPages) {
sal_uInt16 nSourcePos=nFirstPageNum;
sal_uInt16 nMergeCount=sal_uInt16(Abs((long)((long)nFirstPageNum-nLastPageNum))+1);
@@ -1697,7 +1678,6 @@ void SdrModel::Merge(SdrModel& rSourceModel,
if (pPg!=NULL) {
InsertPage(pPg,nDestPos);
if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pPg));
- // und nun zu den MasterPageDescriptoren
if(pPg->TRG_HasMasterPage())
{
@@ -1722,17 +1702,17 @@ void SdrModel::Merge(SdrModel& rSourceModel,
pPg->TRG_SetMasterPage(*GetMasterPage(nNeuNum));
}
- DBG_ASSERT(nNeuNum!=0xFFFF,"SdrModel::Merge(): Irgendwas ist krumm beim Mappen der MasterPages");
+ DBG_ASSERT(nNeuNum!=0xFFFF,"SdrModel::Merge(): Something is crooked with the mapping of the MasterPages.");
} else {
if (nMaPgNum>=nDstMasterPageAnz) {
- // Aha, die ist ausserbalb des urspruenglichen Bereichs der Masterpages des DstModel
+ // This is outside of the original area of the MasterPage of the DstModel.
pPg->TRG_ClearMasterPage();
}
}
}
} else {
- OSL_FAIL("SdrModel::Merge(): Zeichenseite im SourceModel nicht gefunden");
+ OSL_FAIL("SdrModel::Merge(): Drawing page not found in SourceModel.");
}
nDestPos++;
if (bReverse) nSourcePos--;
@@ -1748,8 +1728,8 @@ void SdrModel::Merge(SdrModel& rSourceModel,
bPagNumsDirty=sal_True;
SetChanged();
- // Fehlt: Mergen und Mapping der Layer
- // an den Objekten sowie an den MasterPageDescriptoren
+ // TODO: Missing: merging and mapping of layers
+ // at the objects as well as at the MasterPageDescriptors
if (bUndo) EndUndo();
}
@@ -1757,8 +1737,8 @@ void SdrModel::SetStarDrawPreviewMode(sal_Bool bPreview)
{
if (!bPreview && bStarDrawPreviewMode && GetPageCount())
{
- // Das Zuruecksetzen ist nicht erlaubt, da das Model ev. nicht vollstaendig geladen wurde
- DBG_ASSERT(sal_False,"SdrModel::SetStarDrawPreviewMode(): Zuruecksetzen nicht erlaubt, da Model ev. nicht vollstaendig");
+ // Resetting is not allowed, because the Model might not be loaded completely
+ DBG_ASSERT(sal_False,"SdrModel::SetStarDrawPreviewMode(): Resetting not allowed, because Model might not be complete.");
}
else
{
@@ -1792,9 +1772,9 @@ void SdrModel::setLock( bool bLock )
{
if( sal_False == bLock )
{
- // ReformatAllTextObjects(); #103122# due to a typo in the above if, this code was never
+ // ReformatAllTextObjects(); due to a typo in the above if, this code was never
// executed, so I remove it until we discover that we need it here
- ImpReformatAllEdgeObjects(); // #103122#
+ ImpReformatAllEdgeObjects();
}
mbModelLocked = bLock;
}
@@ -1837,7 +1817,7 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
pItem = ((XFillGradientItem*)pItem)->checkForUniqueItem( pNewModel );
break;
case XATTR_FILLFLOATTRANSPARENCE:
- // #85953# allow all kinds of XFillFloatTransparenceItem to be set
+ // allow all kinds of XFillFloatTransparenceItem to be set
pItem = ((XFillFloatTransparenceItem*)pItem)->checkForUniqueItem( pNewModel );
break;
case XATTR_FILLHATCH:
@@ -2009,8 +1989,8 @@ void SdrModel::SetSdrUndoFactory( SdrUndoFactory* pUndoFactory )
}
}
-/** cl: added this for OJ to complete his reporting engine, does not work
- correctly so only enable it for his model */
+/* added for the reporting engine, but does not work
+ correctly, so only enable it for this model */
void SdrModel::SetAllowShapePropertyChangeListener( bool bAllow )
{
if( mpImpl )
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 489298487809..f720e680c23c 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -64,7 +64,7 @@
class SdrUnoControlList;
////////////////////////////////////////////////////////////////////////////////////////////////////
-// #114409#-3 Migrate Marking of Objects, Points and GluePoints
+// Migrate Marking of Objects, Points and GluePoints
class ImplMarkingOverlay
{
@@ -130,15 +130,7 @@ void ImplMarkingOverlay::SetSecondPosition(const basegfx::B2DPoint& rNewPosition
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@ @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@
-// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
-// @@@@@@@ @@@@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@@@@@@
-// @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
-// @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
-//
+// MarkView
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -162,10 +154,10 @@ void SdrMarkView::ImpClearVars()
mbMarkHandlesHidden = false;
bMrkPntDirty=sal_False;
bMarkHdlWhenTextEdit=sal_False;
- bMarkableObjCountDirty=sal_False; // noch nicht implementiert
- nMarkableObjCount=0; // noch nicht implementiert
+ bMarkableObjCountDirty=sal_False; // not yet implemented
+ nMarkableObjCount=0; // not yet implemented
- // #114409#-3 Migrate selections
+ // Migrate selections
BrkMarkObj();
BrkMarkPoints();
BrkMarkGluePoints();
@@ -185,7 +177,7 @@ SdrMarkView::SdrMarkView(SdrModel* pModel1, OutputDevice* pOut)
SdrMarkView::~SdrMarkView()
{
- // #114409#-3 Migrate selections
+ // Migrate selections
BrkMarkObj();
BrkMarkPoints();
BrkMarkGluePoints();
@@ -220,15 +212,15 @@ void SdrMarkView::ModelHasChanged()
GetMarkedObjectListWriteAccess().SetNameDirty();
bMarkedObjRectDirty=sal_True;
bMarkedPointsRectsDirty=sal_True;
- // Es sind beispielsweise Obj markiert und maMarkedObjectListist Sorted.
- // In einer anderen View 2 wird die ObjOrder veraendert
- // (z.B. MovToTop()). Dann ist Neusortieren der MarkList erforderlich.
+ // Example: Obj is selected and maMarkedObjectList is sorted.
+ // In another View 2, the ObjOrder is changed (e. g. MovToTop())
+ // Then we need to re-sort MarkList.
GetMarkedObjectListWriteAccess().SetUnsorted();
SortMarkedObjects();
bMrkPntDirty=sal_True;
UndirtyMrkPnt();
SdrView* pV=(SdrView*)this;
- if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) { // an dieser Stelle habe ich ein ziemliches Problem !!!
+ if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) {
AdjustMarkHdl();
}
}
@@ -328,7 +320,7 @@ void SdrMarkView::HideSdrPage()
//HMH HideMarkHdl();
//HMH}
- // Alle Markierungen dieser Seite verwerfen
+ // Discard all selections on this page
bMrkChg = GetMarkedObjectListWriteAccess().DeletePageView(*mpPageView);
}
@@ -573,10 +565,10 @@ sal_Bool SdrMarkView::ImpIsFrameHandles() const
}
}
if (!bStdDrag && !bFrmHdl) {
- // Grundsaetzlich erstmal alle anderen Dragmodi nur mit FrameHandles
+ // all other drag modes only with FrameHandles
bFrmHdl=sal_True;
if (eDragMode==SDRDRAG_ROTATE) {
- // bei Rotate ObjOwn-Drag, wenn mind. 1 PolyObj
+ // when rotating, use ObjOwn drag, if there's at least 1 PolyObj
for (sal_uIntPtr nMarkNum=0; nMarkNum<nMarkAnz && bFrmHdl; nMarkNum++) {
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
const SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -585,7 +577,7 @@ sal_Bool SdrMarkView::ImpIsFrameHandles() const
}
}
if (!bFrmHdl) {
- // FrameHandles, wenn wenigstens 1 Obj kein SpecialDrag kann
+ // FrameHandles, if at least 1 Obj can't do SpecialDrag
for (sal_uIntPtr nMarkNum=0; nMarkNum<nMarkAnz && !bFrmHdl; nMarkNum++) {
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
const SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -597,7 +589,7 @@ sal_Bool SdrMarkView::ImpIsFrameHandles() const
void SdrMarkView::SetMarkHandles()
{
- // #105722# remember old focus handle values to search for it again
+ // remember old focus handle values to search for it again
const SdrHdl* pSaveOldFocusHdl = aHdl.GetFocusHdl();
sal_Bool bSaveOldFocus(sal_False);
sal_uInt32 nSavePolyNum(0L), nSavePointNum(0L);
@@ -668,7 +660,7 @@ void SdrMarkView::SetMarkHandles()
&& ((SdrTextObj*)pMarkedObj)->IsInEditMode());
if(!aRect.IsEmpty() && !bHideHandlesWhenInTextEdit)
- { // sonst nix gefunden
+ { // otherwise nothing is found
if( bSingleTextObjMark )
{
const sal_uIntPtr nSiz0=aHdl.GetHdlCount();
@@ -763,7 +755,7 @@ void SdrMarkView::SetMarkHandles()
} // for nMarkNum
} // if bFrmHdl else
- // GluePoint-Handles
+ // GluePoint handles
for (sal_uIntPtr nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++)
{
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
@@ -797,7 +789,7 @@ void SdrMarkView::SetMarkHandles()
}
}
- // Drehpunkt/Spiegelachse
+ // rotation point/axis of reflection
AddDragModeHdl(eDragMode);
// sort handles
@@ -806,7 +798,7 @@ void SdrMarkView::SetMarkHandles()
// add custom handles (used by other apps, e.g. AnchorPos)
AddCustomHdl();
- // #105722# try to restore focus handle index from remembered values
+ // try to restore focus handle index from remembered values
if(bSaveOldFocus)
{
for(sal_uInt32 a(0); a < aHdl.GetHdlCount(); a++)
@@ -864,16 +856,16 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
}
case SDRDRAG_MIRROR:
{
- // add mirror axis
+ // add axis of reflection
SdrHdl* pHdl3 = new SdrHdl(aRef2, HDL_REF2);
SdrHdl* pHdl2 = new SdrHdl(aRef1, HDL_REF1);
SdrHdl* pHdl1 = new SdrHdlLine(*pHdl2, *pHdl3, HDL_MIRX);
- pHdl1->SetObjHdlNum(1); // fuer Sortierung
- pHdl2->SetObjHdlNum(2); // fuer Sortierung
- pHdl3->SetObjHdlNum(3); // fuer Sortierung
+ pHdl1->SetObjHdlNum(1); // for sorting
+ pHdl2->SetObjHdlNum(2); // for sorting
+ pHdl3->SetObjHdlNum(3); // for sorting
- aHdl.AddHdl(pHdl1); // Linie als erstes, damit als letztes im HitTest
+ aHdl.AddHdl(pHdl1); // line comes first, so it is the last in HitTest
aHdl.AddHdl(pHdl2);
aHdl.AddHdl(pHdl3);
@@ -881,7 +873,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
}
case SDRDRAG_TRANSPARENCE:
{
- // add interactive transparence handle
+ // add interactive transparency handle
sal_uIntPtr nMarkAnz = GetMarkedObjectCount();
if(nMarkAnz == 1)
{
@@ -929,7 +921,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
SdrHdlColor* pColHdl1 = new SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, SDR_HANDLE_COLOR_SIZE_NORMAL, sal_True);
SdrHdlColor* pColHdl2 = new SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, SDR_HANDLE_COLOR_SIZE_NORMAL, sal_True);
SdrHdlGradient* pGradHdl = new SdrHdlGradient(aTmpPos1, aTmpPos2, sal_False);
- DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Got not all necessary handles!!");
+ DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Could not get all necessary handles!");
// link them
pGradHdl->SetColorHandles(pColHdl1, pColHdl2);
@@ -971,7 +963,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
SdrHdlColor* pColHdl1 = new SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, aHdlSize, sal_False);
SdrHdlColor* pColHdl2 = new SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, aHdlSize, sal_False);
SdrHdlGradient* pGradHdl = new SdrHdlGradient(aTmpPos1, aTmpPos2, sal_True);
- DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Got not all necessary handles!!");
+ DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Could not get all necessary handles!");
// link them
pGradHdl->SetColorHandles(pColHdl1, pColHdl2);
@@ -989,7 +981,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
}
case SDRDRAG_CROP:
{
- // todo
+ // TODO
break;
}
default: break;
@@ -1049,7 +1041,7 @@ void SdrMarkView::ForceRefToMarked()
case SDRDRAG_MIRROR:
{
- // Erstmal die laenge der Spiegelachsenlinie berechnen
+ // first calculate the length of the axis of reflection
long nOutMin=0;
long nOutMax=0;
long nMinLen=0;
@@ -1058,18 +1050,18 @@ void SdrMarkView::ForceRefToMarked()
OutputDevice* pOut=GetFirstOutputDevice();
//OutputDevice* pOut=GetWin(0);
if (pOut!=NULL) {
- // Mindestlaenge 50 Pixel
+ // minimum length: 50 pixels
nMinLen=pOut->PixelToLogic(Size(0,50)).Height();
- // 20 Pixel fuer RefPt-Abstand vom Obj
+ // 20 pixels distance to the Obj for the reference point
nObjDst=pOut->PixelToLogic(Size(0,20)).Height();
// MinY/MaxY
- // Abstand zum Rand = Mindestlaenge = 10 Pixel
+ // margin = minimum length = 10 pixels
long nDst=pOut->PixelToLogic(Size(0,10)).Height();
nOutMin=-pOut->GetMapMode().GetOrigin().Y();
nOutMax=pOut->GetOutputSize().Height()-1+nOutMin;
nOutMin+=nDst;
nOutMax-=nDst;
- // Absolute Mindestlaenge jedoch 10 Pixel
+ // absolute minimum length, however, is 10 pixels
if (nOutMax-nOutMin<nDst) {
nOutMin+=nOutMax+1;
nOutMin/=2;
@@ -1077,7 +1069,7 @@ void SdrMarkView::ForceRefToMarked()
nOutMax=nOutMin+nDst;
}
nOutHgt=nOutMax-nOutMin;
- // Sonst Mindestlaenge = 1/4 OutHgt
+ // otherwise minimum length = 1/4 OutHgt
long nTemp=nOutHgt/4;
if (nTemp>nMinLen) nMinLen=nTemp;
}
@@ -1085,15 +1077,15 @@ void SdrMarkView::ForceRefToMarked()
Rectangle aR(GetMarkedObjBoundRect());
Point aCenter(aR.Center());
long nMarkHgt=aR.GetHeight()-1;
- long nHgt=nMarkHgt+nObjDst*2; // 20 Pixel obej und unten ueberstehend
- if (nHgt<nMinLen) nHgt=nMinLen; // Mindestlaenge 50 Pixel bzw. 1/4 OutHgt
+ long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below
+ if (nHgt<nMinLen) nHgt=nMinLen; // minimum length 50 pixels or 1/4 OutHgt, respectively
long nY1=aCenter.Y()-(nHgt+1)/2;
long nY2=nY1+nHgt;
- if (pOut!=NULL && nMinLen>nOutHgt) nMinLen=nOutHgt; // evtl. noch etwas verkuerzen
+ if (pOut!=NULL && nMinLen>nOutHgt) nMinLen=nOutHgt; // TODO: maybe shorten this a little
- if (pOut!=NULL) { // nun vollstaendig in den sichtbaren Bereich schieben
+ if (pOut!=NULL) { // now move completely into the visible area
if (nY1<nOutMin) {
nY1=nOutMin;
if (nY2<nY1+nMinLen) nY2=nY1+nMinLen;
@@ -1157,20 +1149,20 @@ void SdrMarkView::CheckMarked()
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrPageView* pPV=pM->GetPageView();
SdrLayerID nLay=pObj->GetLayer();
- sal_Bool bRaus=!pObj->IsInserted(); // Obj geloescht?
+ sal_Bool bRaus=!pObj->IsInserted(); // Obj deleted?
if (!pObj->Is3DObj()) {
- bRaus=bRaus || pObj->GetPage()!=pPV->GetPage(); // Obj ploetzlich in anderer Page oder Group
+ bRaus=bRaus || pObj->GetPage()!=pPV->GetPage(); // Obj suddenly in different Page or Group
}
- bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer gesperrt?
- !pPV->GetVisibleLayers().IsSet(nLay); // Layer nicht sichtbar?
+ bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer locked?
+ !pPV->GetVisibleLayers().IsSet(nLay); // Layer invisible?
if( !bRaus )
- bRaus = !pObj->IsVisible(); // not visible objects can not be marked
+ bRaus = !pObj->IsVisible(); // invisible objects can not be selected
if (!bRaus) {
- // Joe am 9.3.1997: Gruppierte Objekten koennen nun auch
- // markiert werden. Nach EnterGroup muessen aber die Objekte
- // der hoeheren Ebene deselektiert werden.
+ // Grouped objects can now be selected.
+ // After EnterGroup the higher-level objects,
+ // have to be deselected, though.
const SdrObjList* pOOL=pObj->GetObjList();
const SdrObjList* pVOL=pPV->GetObjList();
while (pOOL!=NULL && pOOL!=pVOL) {
@@ -1185,7 +1177,7 @@ void SdrMarkView::CheckMarked()
}
else
{
- if (!IsGluePointEditMode()) { // Markierte GluePoints nur im GlueEditMode
+ if (!IsGluePointEditMode()) { // selected glue points only in GlueEditMode
SdrUShortCont* pPts=pM->GetMarkedGluePoints();
if (pPts!=NULL && pPts->GetCount()!=0) {
pPts->Clear();
@@ -1194,7 +1186,7 @@ void SdrMarkView::CheckMarked()
}
}
- // #97995# at least reset the remembered BoundRect to prevent handle
+ // at least reset the remembered BoundRect to prevent handle
// generation if bForceFrameHandles is TRUE.
bMarkedObjRectDirty = sal_True;
}
@@ -1232,8 +1224,7 @@ void SdrMarkView::SetEditMode(SdrViewEditMode eMode)
eEditMode=eMode;
sal_Bool bGlue1=eEditMode==SDREDITMODE_GLUEPOINTEDIT;
sal_Bool bEdge1=((SdrCreateView*)this)->IsEdgeTool();
- // etwas Aufwand um Flackern zu verhindern beim Umschalten
- // zwischen GlueEdit und EdgeTool
+ // avoid flickering when switching between GlueEdit and EdgeTool
if (bGlue1 && !bGlue0) ImpSetGlueVisible2(bGlue1);
if (bEdge1!=bEdge0) ImpSetGlueVisible3(bEdge1);
if (!bGlue1 && bGlue0) ImpSetGlueVisible2(bGlue1);
@@ -1250,8 +1241,8 @@ sal_Bool SdrMarkView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
if (pObj->IsMarkProtect() ||
(!bDesignMode && pObj->IsUnoObj()))
{
- // Objekt nicht selektierbar oder
- // SdrUnoObj nicht im DesignMode
+ // objekt not selectable or
+ // SdrUnoObj not in DesignMode
return sal_False;
}
}
@@ -1272,7 +1263,7 @@ sal_Bool SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const
SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, sal_uIntPtr nOptions, SdrHdl* pHdl0) const
{
- if (bSomeObjChgdFlag) { // ggf. Handles neu berechnen lassen!
+ if (bSomeObjChgdFlag) { // recalculate handles, if necessary
FlushComeBackTimer();
}
sal_Bool bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
@@ -1307,7 +1298,7 @@ sal_Bool SdrMarkView::MarkNextObj(sal_Bool bPrev)
SortMarkedObjects();
sal_uIntPtr nMarkAnz=GetMarkedObjectCount();
- sal_uIntPtr nChgMarkNum = ULONG_MAX; // Nummer des zu ersetzenden MarkEntries
+ sal_uIntPtr nChgMarkNum = ULONG_MAX; // number of the MarkEntry we want to replace
sal_uIntPtr nSearchObjNum = bPrev ? 0 : ULONG_MAX;
if (nMarkAnz!=0) {
nChgMarkNum=bPrev ? 0 : sal_uIntPtr(nMarkAnz-1);
@@ -1347,7 +1338,7 @@ sal_Bool SdrMarkView::MarkNextObj(sal_Bool bPrev)
{
GetMarkedObjectListWriteAccess().DeleteMark(nChgMarkNum);
}
- MarkObj(pMarkObj,pPageView); // ruft auch MarkListHasChanged(), AdjustMarkHdl()
+ MarkObj(pMarkObj,pPageView); // also calls MarkListHasChanged(), AdjustMarkHdl()
return sal_True;
}
@@ -1360,7 +1351,7 @@ sal_Bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, sal_Bool bPrev)
SdrMark* pBtmMarkHit=NULL;
sal_uIntPtr nTopMarkHit=0;
sal_uIntPtr nBtmMarkHit=0;
- // oberstes der markierten Objekte suchen, das von rPnt getroffen wird
+ // find topmost of the selected objects that is hit by rPnt
sal_uIntPtr nMarkAnz=GetMarkedObjectCount();
sal_uIntPtr nm=0;
for (nm=nMarkAnz; nm>0 && pTopMarkHit==NULL;) {
@@ -1372,14 +1363,14 @@ sal_Bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, sal_Bool bPrev)
nTopMarkHit=nm;
}
}
- // Nichts gefunden, dann ganz normal ein Obj markieren.
+ // nothing found, in this case, just select an object
if (pTopMarkHit==NULL) return MarkObj(rPnt,sal_uInt16(nTol),sal_False);
SdrObject* pTopObjHit=pTopMarkHit->GetMarkedSdrObj();
SdrObjList* pObjList=pTopObjHit->GetObjList();
SdrPageView* pPV=pTopMarkHit->GetPageView();
- // unterstes der markierten Objekte suchen, das von rPnt getroffen wird
- // und auf der gleichen PageView liegt wie pTopMarkHit
+ // find lowermost of the selected objects that is hit by rPnt
+ // and is placed on the same PageView as pTopMarkHit
for (nm=0; nm<nMarkAnz && pBtmMarkHit==NULL; nm++) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrPageView* pPV2=pM->GetPageView();
@@ -1393,7 +1384,6 @@ sal_Bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, sal_Bool bPrev)
SdrObject* pBtmObjHit=pBtmMarkHit->GetMarkedSdrObj();
sal_uIntPtr nObjAnz=pObjList->GetObjCount();
- // #110988#
//sal_uIntPtr nSearchBeg=bPrev ? pBtmObjHit->GetOrdNum()+1 : pTopObjHit->GetOrdNum();
sal_uInt32 nSearchBeg;
E3dScene* pScene = NULL;
@@ -1446,7 +1436,7 @@ sal_Bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, sal_Bool bPrev)
if (TryToFindMarkedObject(pObj)==CONTAINER_ENTRY_NOTFOUND) {
pFndObj=pObj;
} else {
- // hier wg. Performance ggf. noch no auf Top bzw. auf Btm stellen
+ // TODO: for performance reasons set no to Top or Btm, if necessary
}
}
if (bPrev) no++;
@@ -1525,7 +1515,7 @@ void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, sal_Bool bUnmark, s
MarkListHasChanged();
AdjustMarkHdl(); //HMHTRUE);
//HMHif (!bSomeObjChgdFlag) {
- // ShowMarkHdl kommt sonst mit dem AfterPaintTimer
+ // ShowMarkHdl otherwise comes via AfterPaintTimer
//HMHShowMarkHdl();
//HMH}
}
@@ -1534,8 +1524,8 @@ void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, sal_Bool bUnmark, s
sal_Bool SdrMarkView::IsObjMarked(SdrObject* pObj) const
{
- // nicht so ganz die feine Art: Da FindObject() nicht const ist
- // muss ich mich hier auf non-const casten.
+ // Hack: Because FindObject() is not const,
+ // I have to cast myself to non-const.
sal_uIntPtr nPos=((SdrMarkView*)this)->TryToFindMarkedObject(pObj);
return nPos!=CONTAINER_ENTRY_NOTFOUND;
}
@@ -1557,7 +1547,7 @@ void SdrMarkView::SetMarkHdlSizePixel(sal_uInt16 nSiz)
}
}
-#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */
+#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage is being searched right now */
SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay) const
{
if(((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
@@ -1580,7 +1570,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
nTol2*=2;
}
- aRect.Left ()-=nTol2; // Einmal Toleranz drauf fuer alle Objekte
+ aRect.Left ()-=nTol2; // add 1 tolerance for all objects
aRect.Top ()-=nTol2;
aRect.Right ()+=nTol2;
aRect.Bottom()+=nTol2;
@@ -1594,8 +1584,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
if (pOL!=NULL && pOL->GetObjCount()!=0)
{
SdrObject* pTmpObj;
- // OD 30.06.2003 #108784# - adjustment hit point for virtual
- // objects.
+ // adjustment hit point for virtual objects
Point aPnt( rPnt );
if ( pObj->ISA(SdrVirtObj) )
@@ -1631,7 +1620,6 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
rpRootObj=NULL;
if (pOL!=NULL)
{
- // #110988#
sal_Bool bRemap(pOL->GetOwnerObj() && pOL->GetOwnerObj()->ISA(E3dScene));
E3dScene* pRemapScene = (bRemap ? (E3dScene*)pOL->GetOwnerObj() : 0L);
@@ -1641,7 +1629,6 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
if (!bBack) nObjNum--;
SdrObject* pObj;
- // #110988#
if(bRemap)
{
pObj = pOL->GetObj(pRemapScene->RemapOrdNum(nObjNum));
@@ -1665,7 +1652,7 @@ sal_Bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj,
}
sal_Bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, sal_uIntPtr* pnMarkNum, sal_uInt16* pnPassNum) const
-{ // Fehlt noch Pass2,Pass3
+{ // TODO: lacks a Pass2,Pass3
SortMarkedObjects();
if (ppRootObj!=NULL) *ppRootObj=NULL;
if (pnMarkNum!=NULL) *pnMarkNum=CONTAINER_ENTRY_NOTFOUND;
@@ -1718,7 +1705,7 @@ sal_Bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj,
}
sal_Bool bExtraPassForWholePage=bWholePage && pPage!=pPV->GetObjList();
- if (bExtraPassForWholePage) nPgAnz++; // Suche erst in AktObjList, dann auf der gesamten Page
+ if (bExtraPassForWholePage) nPgAnz++; // First search in AktObjList, then on the entire page
sal_uInt16 nPgNum=bBack ? 0 : nPgAnz;
while (pHitObj==NULL && (bBack ? nPgNum<nPgAnz : nPgNum>0)) {
sal_uIntPtr nTmpOptions=nOptions;
@@ -1736,7 +1723,7 @@ sal_Bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj,
}
else
{
- // sonst MasterPage
+ // otherwise MasterPage
SdrPage& rMasterPage = pPage->TRG_GetMasterPage();
pMVisLay = &pPage->TRG_GetMasterPageVisibleLayers();
pObjList = &rMasterPage;
@@ -1984,9 +1971,9 @@ void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, XubString& rStr,
sal_Bool SdrMarkView::EnterMarkedGroup()
{
sal_Bool bRet=sal_False;
- // Es wird nur die erste gefundene Gruppe (also nur in einer PageView) geentert
- // Weil PageView::EnterGroup ein AdjustMarkHdl ruft.
- // Das muss ich per Flag mal unterbinden vvvvvvvv
+ // We enter only the first group found (in only one PageView), because
+ // PageView::EnterGroup calls an AdjustMarkHdl.
+ // TODO: I'll have to prevent that via a flag.
SdrPageView* pPV = GetSdrPageView();
if(pPV)
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 1067b871f290..684d8cdab015 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -36,17 +36,7 @@
#include "svddrgm1.hxx"
////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// @@@@@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@ @@ @@ @@@@
-// @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@
-// @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@
-// @@@@@ @@ @@ @@@@@@ @@@@ @@ @@@@@@@ @@@@@@ @@@@@ @@@@ @@ @@@@ @@@@@ @@ @@ @@@@@@ @@ @@@
-// @@ @@ @@ @@ @@@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@
-// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
-// @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@@@ @@ @@ @@@@@
-//
+// Point Selection
////////////////////////////////////////////////////////////////////////////////////////////////////
sal_Bool SdrMarkView::HasMarkablePoints() const
@@ -200,7 +190,6 @@ sal_Bool SdrMarkView::ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, sal_Bool bUnmar
}
}
- // #97016# II: Sort handles. This was missing in ImpMarkPoint all the time.
aHdl.Sort();
return sal_True;
@@ -246,13 +235,13 @@ sal_Bool SdrMarkView::MarkPoints(const Rectangle* pRect, sal_Bool bUnmark)
if (IsPointMarkable(*pHdl) && pHdl->IsSelected()==bUnmark) {
const SdrObject* pObj=pHdl->GetObj();
const SdrPageView* pPV=pHdl->GetPageView();
- if (pObj!=pObj0 || pPV!=pPV0 || pM==NULL) { // Dieser Abschnitt dient zur Optimierung,
+ if (pObj!=pObj0 || pPV!=pPV0 || pM==NULL) { // This section is for optimization,
if (pM!=NULL) {
SdrUShortCont* pPts=pM->GetMarkedPoints();
if (pPts!=NULL) pPts->ForceSort();
}
- sal_uIntPtr nMarkNum=TryToFindMarkedObject(pObj); // damit ImpMarkPoint() nicht staendig das
- if (nMarkNum!=CONTAINER_ENTRY_NOTFOUND) { // Objekt in der MarkList suchen muss.
+ sal_uIntPtr nMarkNum=TryToFindMarkedObject(pObj); // so ImpMarkPoint() doesn't always
+ if (nMarkNum!=CONTAINER_ENTRY_NOTFOUND) { // have to search the object in the MarkList.
pM=GetSdrMarkByIndex(nMarkNum);
pObj0=pObj;
pPV0=pPV;
@@ -261,7 +250,7 @@ sal_Bool SdrMarkView::MarkPoints(const Rectangle* pRect, sal_Bool bUnmark)
} else {
#ifdef DBG_UTIL
if (pObj->IsInserted()) {
- OSL_FAIL("SdrMarkView::MarkPoints(const Rectangle* pRect): Markiertes Objekt nicht gefunden");
+ OSL_FAIL("SdrMarkView::MarkPoints(const Rectangle* pRect): Selected object not found.");
}
#endif
pM=NULL;
@@ -277,11 +266,10 @@ sal_Bool SdrMarkView::MarkPoints(const Rectangle* pRect, sal_Bool bUnmark)
}
}
}
- if (pM!=NULL) { // Den zuletzt geaenderten MarkEntry ggf. noch aufraeumen
+ if (pM!=NULL) { // Clean up the last selected MarkEntry, if necessary
SdrUShortCont* pPts=pM->GetMarkedPoints();
if (pPts!=NULL) pPts->ForceSort();
}
- //HMHif (bHideHdl) ShowMarkHdl(); // #36987#
if (bChgd) {
MarkListHasChanged();
}
@@ -309,7 +297,7 @@ const Rectangle& SdrMarkView::GetMarkedPointsRect() const
}
void SdrMarkView::SetPlusHandlesAlwaysVisible(sal_Bool bOn)
-{ // HandlePaint optimieren !!!!!!!
+{ // TODO: Optimize HandlePaint!
ForceUndirtyMrkPnt();
if (bOn!=bPlusHdlAlways) {
//HMHBOOL bVis=IsMarkHdlShown();
@@ -322,7 +310,7 @@ void SdrMarkView::SetPlusHandlesAlwaysVisible(sal_Bool bOn)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-// ImpSetPointsRects() ist fuer PolyPoints und GluePoints!
+// ImpSetPointsRects() is for PolyPoints and GluePoints!
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrMarkView::ImpSetPointsRects() const
@@ -352,7 +340,7 @@ void SdrMarkView::ImpSetPointsRects() const
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-// UndirtyMrkPnt() ist fuer PolyPoints und GluePoints!
+// UndirtyMrkPnt() is for PolyPoints and GluePoints!
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrMarkView::UndirtyMrkPnt() const
@@ -366,8 +354,8 @@ void SdrMarkView::UndirtyMrkPnt() const
SdrUShortCont* pPts=pM->GetMarkedPoints();
if (pPts!=NULL) {
if (pObj->IsPolyObj()) {
- // Ungueltig markierte Punkte entfernen, also alle
- // Eintraege die groesser sind als die Punktanzahl des Objekts
+ // Remove invalid selected points, that is, all
+ // entries above the number of points in the object.
sal_uInt32 nMax(pObj->GetPointCount());
sal_uInt32 nPtNum(0xffffffff);
@@ -387,7 +375,7 @@ void SdrMarkView::UndirtyMrkPnt() const
}
else
{
- OSL_FAIL("SdrMarkView::UndirtyMrkPnt(): Markierte Punkte an einem Objekt, dass kein PolyObj ist!");
+ OSL_FAIL("SdrMarkView::UndirtyMrkPnt(): Selected points on an object that is not a PolyObj!");
if(pPts && pPts->GetCount())
{
pPts->Clear();
@@ -401,9 +389,9 @@ void SdrMarkView::UndirtyMrkPnt() const
const SdrGluePointList* pGPL=pObj->GetGluePointList();
if (pPts!=NULL) {
if (pGPL!=NULL) {
- // Ungueltig markierte Klebepunkte entfernen, also alle
- // Eintraege (Id's) die nicht in der GluePointList des
- // Objekts enthalten sind
+ // Remove invalid selected glue points, that is, all entries
+ // (IDs) that aren't contained in the GluePointList of the
+ // object
pPts->ForceSort();
for (sal_uIntPtr nIndex=pPts->GetCount(); nIndex>0;) {
nIndex--;
@@ -415,7 +403,7 @@ void SdrMarkView::UndirtyMrkPnt() const
}
} else {
if (pPts!=NULL && pPts->GetCount()!=0) {
- pPts->Clear(); // Objekt hat keine Klebepunkte (mehr)
+ pPts->Clear(); // object doesn't have any glue points (any more)
bChg=sal_True;
}
}
@@ -426,8 +414,6 @@ void SdrMarkView::UndirtyMrkPnt() const
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
sal_Bool SdrMarkView::HasMarkableGluePoints() const
{
@@ -563,7 +549,7 @@ sal_Bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uI
}
}
}
- bNext=sal_False; // HitNextGluePoint nur beim ersten Obj
+ bNext=sal_False; // HitNextGluePoint only for the first Obj
if (bBack) nMarkNum++;
}
return sal_False;
@@ -591,8 +577,7 @@ sal_Bool SdrMarkView::MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const
}
}
} else {
- // Objekt implizit markieren ...
- // ... fehlende Implementation
+ // TODO: implement implicit selection of objects
}
}
if (bChgd) {
@@ -606,7 +591,7 @@ sal_Bool SdrMarkView::IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) c
{
ForceUndirtyMrkPnt();
sal_Bool bRet=sal_False;
- sal_uIntPtr nPos=((SdrMarkView*)this)->TryToFindMarkedObject(pObj); // casting auf NonConst
+ sal_uIntPtr nPos=((SdrMarkView*)this)->TryToFindMarkedObject(pObj); // casting to NonConst
if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
const SdrMark* pM=GetSdrMarkByIndex(nPos);
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 207add3068d4..5e7c53ba8aeb 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -55,9 +55,9 @@
#include <svx/svdtrans.hxx>
#include <svx/svdetc.hxx>
#include <svx/svdattrx.hxx> // NotPersistItems
-#include <svx/svdoedge.hxx> // Die Verbinder nach Move nochmal anbroadcasten
+#include <svx/svdoedge.hxx> // for broadcasting connectors to Move
#include "svx/svdglob.hxx" // StringCache
-#include "svx/svdstr.hrc" // Objektname
+#include "svx/svdstr.hrc" // the object's name
#include <editeng/eeitem.hxx>
#include "editeng/editstat.hxx"
#include <svx/svdoutl.hxx>
@@ -346,7 +346,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
aTempSet.Put(XFillTransparenceItem(nShadowTransparence));
}
- // hatch and transparence like shadow
+ // hatch and transparency like shadow
if(bHatchFillUsed)
{
XHatch aHatch(((XFillHatchItem&)(rOriginalSet.Get(XATTR_FILLHATCH))).GetHatchValue());
@@ -355,7 +355,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
aTempSet.Put(XFillTransparenceItem(nShadowTransparence));
}
- // bitmap and transparence like shadow
+ // bitmap and transparency like shadow
if(bBitmapFillUsed)
{
XOBitmap aFillBitmap(((XFillBitmapItem&)(rOriginalSet.Get(XATTR_FILLBITMAP))).GetBitmapValue());
@@ -1830,8 +1830,8 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
}
}
- // copy new list to local. This is NOT very convenient behaviour, the local
- // GluePointList should not be set, but be delivered by using GetGluePointList(),
+ // copy new list to local. This is NOT very convenient behavior, the local
+ // GluePointList should not be set, but we delivered by using GetGluePointList(),
// maybe on demand. Since the local object is changed here, this is assumed to
// be a result of GetGluePointList and thus the list is copied
if(pPlusData)
@@ -2212,7 +2212,7 @@ bool SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd )
if (nWdt==1) nWdt=0;
NbcSetMinTextFrameWidth( nWdt );
}
- // Textrahmen neu berechnen
+ // re-calculate text frame
NbcAdjustTextFrameWidthAndHeight();
}
SetRectsDirty();
@@ -2264,7 +2264,7 @@ void SdrObjCustomShape::SetVerticalWriting( sal_Bool bVertical )
// get item settings
const SfxItemSet& rSet = GetObjectItemSet();
- // Also exchange hor/ver adjust items
+ // Also exchange horizontal and vertical adjust items
SdrTextHorzAdjust eHorz = ((SdrTextHorzAdjustItem&)(rSet.Get(SDRATTR_TEXT_HORZADJUST))).GetValue();
SdrTextVertAdjust eVert = ((SdrTextVertAdjustItem&)(rSet.Get(SDRATTR_TEXT_VERTADJUST))).GetValue();
@@ -2274,14 +2274,14 @@ void SdrObjCustomShape::SetVerticalWriting( sal_Bool bVertical )
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
- // Expanded item ranges to also support hor and ver adjust.
+ // Expanded item ranges to also support horizontal and vertical adjust.
SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST,
0, 0);
aNewSet.Put(rSet);
- // Exchange horz and vert adjusts
+ // Exchange horizontal and vertical adjusts
switch(eVert)
{
case SDRTEXTVERTADJUST_TOP: aNewSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); break;
@@ -2344,9 +2344,9 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
aSiz.Width()-=nHDist;
aSiz.Height()-=nVDist;
if ( aSiz.Width() < 2 )
- aSiz.Width() = 2; // Mindestgroesse 2
+ aSiz.Width() = 2; // minimum size=2
if ( aSiz.Height() < 2 )
- aSiz.Height() = 2; // Mindestgroesse 2
+ aSiz.Height() = 2; // minimum size=2
if(pEdtOutl)
{
@@ -2354,11 +2354,11 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
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 more tolerance
+ if (bHgtGrow) nHgt=aSiz2.Height()+1; // a little more tolerance
} else
{
- nHgt=pEdtOutl->GetTextHeight()+1; // lieber etwas Tolleranz
+ nHgt=pEdtOutl->GetTextHeight()+1; // a little more tolerance
}
}
else
@@ -2366,8 +2366,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
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 again.
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if( pOutlinerParaObject != NULL )
{
@@ -2377,12 +2376,12 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
if ( bWdtGrow )
{
Size aSiz2(rOutliner.CalcTextSize());
- nWdt=aSiz2.Width()+1; // lieber etwas Tolleranz
+ nWdt=aSiz2.Width()+1; // a little more tolerance
if ( bHgtGrow )
- nHgt=aSiz2.Height()+1; // lieber etwas Tolleranz
+ nHgt=aSiz2.Height()+1; // a little more tolerance
}
else
- nHgt = rOutliner.GetTextHeight()+1; // lieber etwas Tolleranz
+ nHgt = rOutliner.GetTextHeight()+1; // a little more tolerance
rOutliner.Clear();
}
if ( nWdt < nMinWdt )
@@ -2391,14 +2390,14 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
nWdt = nMaxWdt;
nWdt += nHDist;
if ( nWdt < 1 )
- nWdt = 1; // nHDist kann auch negativ sein
+ nWdt = 1; // nHDist may also be negative
if ( nHgt < nMinHgt )
nHgt = nMinHgt;
if ( nHgt > nMaxHgt )
nHgt = nMaxHgt;
nHgt+=nVDist;
if ( nHgt < 1 )
- nHgt = 1; // nVDist kann auch negativ sein
+ nHgt = 1; // nVDist may also be negative
long nWdtGrow = nWdt-(rR.Right()-rR.Left());
long nHgtGrow = nHgt-(rR.Bottom()-rR.Top());
if ( nWdtGrow == 0 )
@@ -2567,7 +2566,7 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Recta
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());
@@ -2634,7 +2633,7 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Recta
if( eHAdj != SDRTEXTHORZADJUST_BLOCK )
aPaperMin.Width()=0;
- // For complete ver adjust support, set paper min height to 0, here.
+ // For complete vertical adjust support, set paper min height to 0, here.
if(SDRTEXTVERTADJUST_BLOCK != eVAdj )
aPaperMin.Height() = 0;
@@ -2675,7 +2674,7 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const
void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText,
Rectangle* pAnchorRect, bool /*bLineWidth*/) const
{
- Rectangle aAnkRect; // Rect innerhalb dem geankert wird
+ Rectangle aAnkRect; // Rect in which we anchor
TakeTextAnchorRect(aAnkRect);
SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
@@ -2709,7 +2708,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe
rOutliner.SetMaxAutoPaperSize( Size( nMaxAutoPaperWidth, nMaxAutoPaperHeight ) );
rOutliner.SetPaperSize( aNullSize );
- // Text in den Outliner stecken - ggf. den aus dem EditOutliner
+ // put text into the Outliner - if necessary the use the text from the EditOutliner
OutlinerParaObject* pPara= GetOutlinerParaObject();
if (pEdtOutl && !bNoEditText)
pPara=pEdtOutl->CreateParaObject();
@@ -2746,11 +2745,11 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe
pText->CheckPortionInfo( rOutliner );
Point aTextPos(aAnkRect.TopLeft());
- Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() hat etwas Toleranz drauf, oder?
+ Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() has a little added tolerance, no?
- // For draw objects containing text correct hor/ver alignment if text is bigger
+ // For draw objects containing text correct horizontal/vertical alignment if text is bigger
// than the object itself. Without that correction, the text would always be
- // formatted to the left edge (or top edge when vertical) of the draw object.
+ // formatted to the left edge (or top edge when vertical) of the draw object.
if( !IsTextFrame() )
{
@@ -2797,7 +2796,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe
if (pAnchorRect)
*pAnchorRect=aAnkRect;
- // rTextRect ist bei ContourFrame in einigen Faellen nicht korrekt
+ // using rTextRect together with ContourFrame doesn't always work correctly
rTextRect=Rectangle(aTextPos,aTextSiz);
}
@@ -3081,7 +3080,7 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba
{
MirrorPoint(aPol[i],aRef1,aRef2);
}
- // Polygon wenden und etwas schieben
+ // mirror polygon and move it a bit
Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
@@ -3103,7 +3102,7 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba
{
MirrorPoint(aPol[i],aRef1,aRef2);
}
- // Polygon wenden und etwas schieben
+ // mirror polygon and move it a bit
Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
@@ -3118,7 +3117,7 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba
basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight());
basegfx::B2DTuple aTranslate(aRectangle.Left(), aRectangle.Top());
- // position maybe relative to anchorpos, convert
+ // position may be relative to anchorpos, convert
if( pModel && pModel->IsWriter() )
{
if(GetAnchorPos().X() || GetAnchorPos().Y())
@@ -3135,7 +3134,7 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba
{
case SFX_MAPUNIT_TWIP :
{
- // postion
+ // position
aTranslate.setX(ImplTwipsToMM(aTranslate.getX()));
aTranslate.setY(ImplTwipsToMM(aTranslate.getY()));
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 4063e7f28ca9..1b2fe9d2be7e 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -145,7 +145,7 @@ void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
SetBoundRectDirty();
SetRectsDirty(sal_True);
- // This may have lead to object change
+ // This may have led to object change
SetChanged();
BroadcastObjectChange();
SendUserCall(SDRUSERCALL_CHGATTR, aBoundRect);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 44fdaef271d1..2956b03cc13e 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -30,7 +30,7 @@
#define _USE_MATH_DEFINES
#include <math.h>
-#include <vcl/metaact.hxx> // fuer TakeContour
+#include <vcl/metaact.hxx> // for TakeContour
#include <vcl/cvtsvm.hxx>
#include <tools/line.hxx>
#include <tools/bigint.hxx>
@@ -44,10 +44,10 @@
#include <svx/svddrag.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
-#include <svx/svdovirt.hxx> // Fuer Add/Del Ref
-#include <svx/svdview.hxx> // fuer Dragging (Ortho abfragen)
+#include <svx/svdovirt.hxx> // for Add/Del Ref
+#include <svx/svdview.hxx> // for Dragging (check Ortho)
#include "svx/svdglob.hxx" // StringCache
-#include <svx/svdstr.hrc> // Objektname
+#include <svx/svdstr.hrc> // the object's name
#include <svx/svdogrp.hxx> // Factory
#include <svx/svdopath.hxx> // Factory
#include <svx/svdoedge.hxx> // Factory
@@ -260,13 +260,13 @@ SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
if (pNeuUserData!=NULL) {
pNeuPlusData->pUserDataList->InsertUserData(pNeuUserData);
} else {
- OSL_FAIL("SdrObjPlusData::Clone(): UserData.Clone() liefert NULL");
+ OSL_FAIL("SdrObjPlusData::Clone(): UserData.Clone() returns NULL.");
}
}
}
}
if (pGluePoints!=NULL) pNeuPlusData->pGluePoints=new SdrGluePointList(*pGluePoints);
- // MtfAnimator wird auch nicht mitkopiert
+ // MtfAnimator isn't copied either
// #i68101#
// copy object name, title and description
@@ -481,7 +481,7 @@ void SdrObject::SetModel(SdrModel* pNewModel)
}
}
- // update listeners at possible api wrapper object
+ // update listeners at possible API wrapper object
if( pModel != pNewModel )
{
SvxShape* pShape = getSvxShape();
@@ -806,8 +806,8 @@ void SdrObject::SetNavigationPosition (const sal_uInt32 nNewPosition)
// To make clearer that this method may trigger RecalcBoundRect and thus may be
-// expensive and somtimes problematic (inside a bigger object change You will get
-// non-useful BoundRects sometimes) i rename that method from GetBoundRect() to
+// expensive and sometimes problematic (inside a bigger object change you will get
+// non-useful BoundRects sometimes) I rename that method from GetBoundRect() to
// GetCurrentBoundRect().
const Rectangle& SdrObject::GetCurrentBoundRect() const
{
@@ -821,7 +821,7 @@ const Rectangle& SdrObject::GetCurrentBoundRect() const
// To have a possibility to get the last calculated BoundRect e.g for producing
// the first rectangle for repaints (old and new need to be used) without forcing
-// a RecalcBoundRect (which may be problematical and expensive sometimes) i add here
+// a RecalcBoundRect (which may be problematical and expensive sometimes) I add here
// a new method for accessing the last BoundRect.
const Rectangle& SdrObject::GetLastBoundRect() const
{
@@ -882,7 +882,7 @@ void SdrObject::BroadcastObjectChange() const
void SdrObject::SetChanged()
{
- // For test purposes, use the new ViewContact for change
+ // For testing purposes, use the new ViewContact for change
// notification now.
ActionChanged();
@@ -892,7 +892,7 @@ void SdrObject::SetChanged()
}
}
-// Tooling for painting a single object to a OutputDevice.
+// tooling for painting a single object to an OutputDevice.
sal_Bool SdrObject::SingleObjectPainter(OutputDevice& rOut) const
{
sdr::contact::SdrObjectVector aObjectVector;
@@ -901,7 +901,6 @@ sal_Bool SdrObject::SingleObjectPainter(OutputDevice& rOut) const
sdr::contact::ObjectContactOfObjListPainter aPainter(rOut, aObjectVector, GetPage());
sdr::contact::DisplayInfo aDisplayInfo;
- // do processing
aPainter.ProcessDisplay(aDisplayInfo);
return sal_True;
@@ -937,7 +936,7 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
// The Clone() method uses the local copy constructor from the individual
// sdr::properties::BaseProperties class. Since the target class maybe for another
- // draw object a SdrObject needs to be provided, as in the nromal constructor.
+ // draw object, an SdrObject needs to be provided, as in the normal constructor.
mpProperties = &rObj.GetProperties().Clone(*this);
pModel =rObj.pModel;
@@ -951,9 +950,7 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
bNoPrint=rObj.bNoPrint;
mbVisible=rObj.mbVisible;
bMarkProt=rObj.bMarkProt;
- //EmptyPresObj wird nicht kopiert: nun doch!
bEmptyPresObj =rObj.bEmptyPresObj;
- //NotVisibleAsMaster wird nicht kopiert: nun doch!
bNotVisibleAsMaster=rObj.bNotVisibleAsMaster;
bSnapRectDirty=sal_True;
bNotMasterCachable=rObj.bNotMasterCachable;
@@ -963,7 +960,7 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
pPlusData=rObj.pPlusData->Clone(this);
}
if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
- delete pPlusData->pBroadcast; // der Broadcaster wird nicht mitkopiert
+ delete pPlusData->pBroadcast; // broadcaster isn't copied
pPlusData->pBroadcast=NULL;
}
return *this;
@@ -1085,7 +1082,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
SfxItemSet aNewSet(*GetObjectItemPool());
// #i101980# ignore LineWidth; that's what the old implementation
- // did. With linewidth, the result may be huge due to fat/thick
+ // did. With line width, the result may be huge due to fat/thick
// line decompositions
aNewSet.Put(XLineWidthItem(0));
@@ -1110,7 +1107,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
const std::vector< basegfx::B2DPolyPolygon >& rResult(aExtractor.getExtractedContour());
const sal_uInt32 nSize(rResult.size());
- // when count is one, it is implied that the object has only it's normal
+ // when count is one, it is implied that the object has only its normal
// contour anyways and TakeCountour() is to return an empty PolyPolygon
// (see old implementation for historical reasons)
if(nSize > 1)
@@ -1140,14 +1137,14 @@ SdrHdl* SdrObject::GetHdl(sal_uInt32 nHdlNum) const
SdrHdl* pH=NULL;
const Rectangle& rR=GetSnapRect();
switch (nHdlNum) {
- case 0: pH=new SdrHdl(rR.TopLeft(), HDL_UPLFT); break; // Oben links
- case 1: pH=new SdrHdl(rR.TopCenter(), HDL_UPPER); break; // Oben
- case 2: pH=new SdrHdl(rR.TopRight(), HDL_UPRGT); break; // Oben rechts
- case 3: pH=new SdrHdl(rR.LeftCenter(), HDL_LEFT ); break; // Links
- case 4: pH=new SdrHdl(rR.RightCenter(), HDL_RIGHT); break; // Rechts
- case 5: pH=new SdrHdl(rR.BottomLeft(), HDL_LWLFT); break; // Unten links
- case 6: pH=new SdrHdl(rR.BottomCenter(),HDL_LOWER); break; // Unten
- case 7: pH=new SdrHdl(rR.BottomRight(), HDL_LWRGT); break; // Unten rechts
+ case 0: pH=new SdrHdl(rR.TopLeft(), HDL_UPLFT); break;
+ case 1: pH=new SdrHdl(rR.TopCenter(), HDL_UPPER); break;
+ case 2: pH=new SdrHdl(rR.TopRight(), HDL_UPRGT); break;
+ case 3: pH=new SdrHdl(rR.LeftCenter(), HDL_LEFT ); break;
+ case 4: pH=new SdrHdl(rR.RightCenter(), HDL_RIGHT); break;
+ case 5: pH=new SdrHdl(rR.BottomLeft(), HDL_LWLFT); break;
+ case 6: pH=new SdrHdl(rR.BottomCenter(),HDL_LOWER); break;
+ case 7: pH=new SdrHdl(rR.BottomRight(), HDL_LWRGT); break;
}
return pH;
}
@@ -1204,13 +1201,13 @@ Rectangle SdrObject::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));
@@ -1223,7 +1220,7 @@ Rectangle SdrObject::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));
@@ -1366,7 +1363,7 @@ Pointer SdrObject::GetCreatePointer() const
return Pointer(POINTER_CROSS);
}
-// Transformationen
+// transformations
void SdrObject::NbcMove(const Size& rSiz)
{
MoveRect(aOutRect,rSiz);
@@ -1416,7 +1413,7 @@ void SdrObject::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
aOutRect.Bottom()=-R.Left();
}
aOutRect.Move(rRef.X(),rRef.Y());
- aOutRect.Justify(); // Sicherheitshalber
+ aOutRect.Justify(); // just in case
SetRectsDirty();
NbcRotateGluePoints(rRef,nWink,sn,cs);
SetGlueReallyAbsolute(sal_False);
@@ -1429,25 +1426,25 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
Rectangle R(aOutRect);
long dx=rRef2.X()-rRef1.X();
long dy=rRef2.Y()-rRef1.Y();
- if (dx==0) { // Vertikale Achse
+ if (dx==0) { // vertical axis
aOutRect.Left() =-R.Right();
aOutRect.Right()=-R.Left();
- } else if (dy==0) { // Horizontale Achse
+ } else if (dy==0) { // horizontal axis
aOutRect.Top() =-R.Bottom();
aOutRect.Bottom()=-R.Top();
- } else if (dx==dy) { /* 45 Grad Achse \ */
+ } else if (dx==dy) { // 45deg axis
aOutRect.Left() =R.Top();
aOutRect.Right() =R.Bottom();
aOutRect.Top() =R.Left();
aOutRect.Bottom()=R.Right();
- } else if (dx==-dy) { // 45 Grad Achse /
+ } else if (dx==-dy) { // 45deg axis
aOutRect.Left() =-R.Bottom();
aOutRect.Right() =-R.Top();
aOutRect.Top() =-R.Right();
aOutRect.Bottom()=-R.Left();
}
aOutRect.Move(rRef1.X(),rRef1.Y());
- aOutRect.Justify(); // Sicherheitshalber
+ aOutRect.Justify(); // just in case
SetRectsDirty();
NbcMirrorGluePoints(rRef1,rRef2);
SetGlueReallyAbsolute(sal_False);
@@ -1517,7 +1514,7 @@ void SdrObject::NbcSetRelativePos(const Point& rPnt)
{
Point aRelPos0(GetSnapRect().TopLeft()-aAnchor);
Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
- NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+ NbcMove(aSiz); // This also calls SetRectsDirty()
}
void SdrObject::SetRelativePos(const Point& rPnt)
@@ -1540,7 +1537,7 @@ void SdrObject::NbcSetAnchorPos(const Point& rPnt)
{
Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
aAnchor=rPnt;
- NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+ NbcMove(aSiz); // This also calls SetRectsDirty()
}
void SdrObject::SetAnchorPos(const Point& rPnt)
@@ -1816,7 +1813,7 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
rGeo.bClosedObj =bClosedObj ;
rGeo.mnLayerID = mnLayerID;
- // Benutzerdefinierte Klebepunkte
+ // user-defined glue points
if (pPlusData!=NULL && pPlusData->pGluePoints!=NULL) {
if (rGeo.pGPL!=NULL) {
*rGeo.pGPL=*pPlusData->pGluePoints;
@@ -1843,7 +1840,7 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
bClosedObj =rGeo.bClosedObj ;
mnLayerID = rGeo.mnLayerID;
- // Benutzerdefinierte Klebepunkte
+ // user-defined glue points
if (rGeo.pGPL!=NULL) {
ImpForcePlusData();
if (pPlusData->pGluePoints!=NULL) {
@@ -2171,7 +2168,7 @@ void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRe
GetProperties().SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
}
-// Das Broadcasting beim Setzen der Attribute wird vom AttrObj gemanagt
+// Broadcasting while setting attributes is managed by the AttrObj.
////////////////////////////////////////////////////////////////////////////////////////////////////
bool SdrObject::IsNode() const
@@ -2234,9 +2231,8 @@ SdrGluePointList* SdrObject::ForceGluePointList()
void SdrObject::SetGlueReallyAbsolute(bool bOn)
{
- // erst Const-Aufruf um zu sehen, ob
- // ueberhaupt Klebepunkte da sind
- // const-Aufruf erzwingen!
+ // First a const call to see whether there are any glue points.
+ // Force const call!
if (GetGluePointList()!=NULL) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->SetReallyAbsolute(bOn,*this);
@@ -2245,9 +2241,8 @@ void SdrObject::SetGlueReallyAbsolute(bool bOn)
void SdrObject::NbcRotateGluePoints(const Point& rRef, long nWink, double sn, double cs)
{
- // erst Const-Aufruf um zu sehen, ob
- // ueberhaupt Klebepunkte da sind
- // const-Aufruf erzwingen!
+ // First a const call to see whether there are any glue points.
+ // Force const call!
if (GetGluePointList()!=NULL) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->Rotate(rRef,nWink,sn,cs,this);
@@ -2256,9 +2251,8 @@ void SdrObject::NbcRotateGluePoints(const Point& rRef, long nWink, double sn, do
void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2)
{
- // erst Const-Aufruf um zu sehen, ob
- // ueberhaupt Klebepunkte da sind
- // const-Aufruf erzwingen!
+ // First a const call to see whether there are any glue points.
+ // Force const call!
if (GetGluePointList()!=NULL) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->Mirror(rRef1,rRef2,this);
@@ -2267,9 +2261,8 @@ void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2)
void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, bool bVShear)
{
- // erst Const-Aufruf um zu sehen, ob
- // ueberhaupt Klebepunkte da sind
- // const-Aufruf erzwingen!
+ // First a const call to see whether there are any glue points.
+ // Force const call!
if (GetGluePointList()!=NULL) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->Shear(rRef,nWink,tn,bVShear,this);
@@ -2548,7 +2541,7 @@ void SdrObject::SetInserted(sal_Bool bIns)
if (bIns) SendUserCall(SDRUSERCALL_INSERTED,aBoundRect0);
else SendUserCall(SDRUSERCALL_REMOVED,aBoundRect0);
- if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) { // #42522#
+ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
SdrHint aHint(*this);
aHint.SetKind(bIns?HINT_OBJINSERTED:HINT_OBJREMOVED);
pPlusData->pBroadcast->Broadcast(aHint);
@@ -2627,7 +2620,7 @@ void SdrObject::InsertUserData(SdrObjUserData* pData, sal_uInt16 nPos)
if (pPlusData->pUserDataList==NULL) pPlusData->pUserDataList=new SdrObjUserDataList;
pPlusData->pUserDataList->InsertUserData(pData,nPos);
} else {
- OSL_FAIL("SdrObject::InsertUserData(): pData ist NULL-Pointer");
+ OSL_FAIL("SdrObject::InsertUserData(): pData is NULL pointer.");
}
}
@@ -2641,7 +2634,7 @@ void SdrObject::DeleteUserData(sal_uInt16 nNum)
pPlusData->pUserDataList=NULL;
}
} else {
- OSL_FAIL("SdrObject::DeleteUserData(): ungueltiger Index");
+ OSL_FAIL("SdrObject::DeleteUserData(): Invalid Index.");
}
}
@@ -2659,7 +2652,7 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundR
while( pGroup )
{
- // Gruppe benachrichtigen
+ // broadcast to group
if( pGroup->GetUserCall() )
{
SdrUserCallType eChildUserType = SDRUSERCALL_CHILD_CHGATTR;
@@ -2723,7 +2716,7 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundR
}
}
-// ItemPool fuer dieses Objekt wechseln
+// change ItemPool for this object
void SdrObject::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
{
if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
@@ -2808,7 +2801,7 @@ void SdrObject::notifyShapePropertyChange( const ::svx::ShapeProperty _eProperty
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// 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.
//
@@ -2841,7 +2834,7 @@ sal_Bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B
{
case SFX_MAPUNIT_TWIP :
{
- // postion
+ // position
aTranslate.setX(ImplTwipsToMM(aTranslate.getX()));
aTranslate.setY(ImplTwipsToMM(aTranslate.getY()));
@@ -2864,7 +2857,7 @@ sal_Bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B
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 SdrObject::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& /*rPolyPolygon*/)
@@ -3039,7 +3032,7 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
if(pObj == NULL)
{
- // Na wenn's denn keiner will ...
+ // Well, if no one wants it...
}
if(pObj != NULL)