summaryrefslogtreecommitdiff
path: root/editeng/source/outliner
diff options
context:
space:
mode:
authorAlbert Thuswaldner <thuswa@gmail.com>2011-02-16 16:34:02 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-02-16 17:18:05 -0500
commit65d891652fd5de4b93d9cd3dadd866b099af423b (patch)
tree41f71e98926e2013e959d385bf29e31a414a3132 /editeng/source/outliner
parentebf0ce614b01de1249cfa3f0082c33c70433045f (diff)
Translation of german comments.
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r--editeng/source/outliner/outleeng.cxx2
-rw-r--r--editeng/source/outliner/outleeng.hxx1
-rw-r--r--editeng/source/outliner/outlin2.cxx4
-rw-r--r--editeng/source/outliner/outliner.cxx126
-rw-r--r--editeng/source/outliner/outlundo.hxx8
-rw-r--r--editeng/source/outliner/outlvw.cxx103
-rw-r--r--editeng/source/outliner/paralist.cxx2
7 files changed, 113 insertions, 133 deletions
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index b7a74cdd3a83..751c7f2e32a4 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -184,7 +184,7 @@ void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const Str
void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
{
- EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL
+ EditEngine::FieldClicked( rField, nPara, nPos ); // If URL
pOwner->FieldClicked( rField, nPara, nPos );
}
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index 021e49841989..085aadc12b97 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -54,7 +54,6 @@ public:
virtual void ParagraphDeleted( USHORT nDeletedParagraph );
virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph );
- // #101498#
virtual void DrawingText(
const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 61bd21427ead..345983907dd3 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -57,8 +57,8 @@ DBG_NAMEEX(Outliner)
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::linguistic2;
-// =====================================================================
-// ====================== Einfache Durchreicher =======================
+// ======================================================================
+// ====================== Simple pass-through =======================
// ======================================================================
void Outliner::SetUpdateMode( BOOL bUpdate )
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index c7ef90d3e793..90b661dd5791 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -63,14 +63,14 @@
#include <editeng/brshitem.hxx>
#include <svl/itempool.hxx>
-// #101498# calculate if it's RTL or not
+// calculate if it's RTL or not
#include <unicode/ubidi.h>
using ::std::advance;
#define DEFAULT_SCALE 75
-static const USHORT nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen
+static const USHORT nDefStyles = 3; // Special treatment for the first 3 levels
static const USHORT nDefBulletIndent = 800;
static const USHORT nDefBulletWidth = 700;
static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
@@ -224,7 +224,7 @@ void Outliner::ParagraphDeleted( USHORT nPara )
if ( pPara && ( pPara->GetDepth() > nDepth ) )
{
ImplCalcBulletText( nPara, TRUE, FALSE );
- // naechsten auf gleicher Ebene suchen...
+ // Search for next on the this level ...
while ( pPara && pPara->GetDepth() > nDepth )
pPara = pParaList->GetParagraph( ++nPara );
}
@@ -429,7 +429,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
aText.ConvertLineEnd( LINEEND_LF );
if( aText.GetChar( aText.Len()-1 ) == '\x0A' )
- aText.Erase( aText.Len()-1, 1 ); // letzten Umbruch loeschen
+ aText.Erase( aText.Len()-1, 1 ); // Delete the last break
USHORT nCount = aText.GetTokenCount( '\x0A' );
USHORT nPos = 0;
@@ -447,20 +447,19 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
else
nCurDepth = pPara->GetDepth();
- // Im Outliner-Modus die Tabulatoren filtern und die
- // Einrueckung ueber ein LRSpaceItem einstellen
- // Im EditEngine-Modus ueber Maltes Tabulatoren einruecken
+ // In the outliner mode, filter the tabs and set the indentation
+ // about a LRSpaceItem. In EditEngine mode intend over old tabs
if( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ||
( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) )
{
- // Tabs raus
+ // Extract Tabs
USHORT nTabs = 0;
while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) )
nTabs++;
if ( nTabs )
aStr.Erase( 0, nTabs );
- // Tiefe beibehalten ? (siehe Outliner::Insert)
+ // Keep depth? (see Outliner::Insert)
if( !(pPara->nFlags & PARAFLAG_HOLDDEPTH) )
{
nCurDepth = nTabs-1;
@@ -469,7 +468,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
pPara->nFlags &= (~PARAFLAG_HOLDDEPTH);
}
}
- if( nPos ) // nicht mit dem ersten Absatz
+ if( nPos ) // not with the first paragraph
{
pParaList->Insert( pPara, nInsPos );
pEditEngine->InsertParagraph( nInsPos, aStr );
@@ -493,7 +492,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
pEditEngine->SetUpdateMode( bUpdate );
}
-// pView == 0 -> Tabulatoren nicht beachten
+// pView == 0 -> Ignore tabs
bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
{
@@ -528,11 +527,11 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
if ( nHeadingNumberStart || nNumberingNumberStart )
{
- // PowerPoint-Import ?
+ // PowerPoint import ?
if( nHeadingNumberStart && ( aStr.Len() >= 2 ) &&
( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) )
{
- // Bullet & Tab raus
+ // Extract Bullet and Tab
aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, 2 );
}
@@ -541,18 +540,18 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
aLevel.EraseLeadingChars( ' ' );
nTabs = sal::static_int_cast< USHORT >(aLevel.ToInt32());
if( nTabs )
- nTabs--; // ebene 0 = "heading 1"
+ nTabs--; // Level 0 = "heading 1"
bConverted = TRUE;
}
else
{
- // Fuehrende Tabulatoren filtern
+ // filter leading tabs
while( *pPtr == '\t' )
{
pPtr++;
nTabs++;
}
- // Tabulatoren aus dem Text entfernen
+ // Remove tabs from the text
if( nTabs )
aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, nTabs );
}
@@ -695,7 +694,7 @@ XubString Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, US
return String( ' ' );
EditFieldInfo aFldInfo( this, rField, nPara, nPos );
- // Die FldColor ist mit COL_LIGHTGRAY voreingestellt.
+ // The FldColor is preset with COL_LIGHTGRAY.
if ( rpFldColor )
aFldInfo.SetFldColor( *rpFldColor );
@@ -791,9 +790,8 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo,
sal_Int16 nOldDepth = pPara->GetDepth();
pPara->SetDepth( nDepth );
- // Bei IsInUndo brauchen Attribute und Style nicht eingestellt werden,
- // dort werden die alten Werte durch die EditEngine restauriert.
-
+ // For IsInUndo attributes and style do not have to be set, there
+ // the old values are restored by the EditEngine.
if( !IsInUndo() )
{
BOOL bUpdate = pEditEngine->GetUpdateMode();
@@ -861,7 +859,7 @@ BOOL Outliner::Expand( Paragraph* pPara )
BOOL Outliner::Collapse( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
- if ( pParaList->HasVisibleChilds( pPara ) ) // expandiert
+ if ( pParaList->HasVisibleChilds( pPara ) ) // expanded
{
OLUndoExpand* pUndo = 0;
BOOL bUndo = FALSE;
@@ -897,7 +895,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" );
- Font aStdFont; //#107508#
+ Font aStdFont;
if ( !pEditEngine->IsFlatMode() )
{
ESelection aSel( nPara, 0, nPara, 0 );
@@ -923,7 +921,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
aBulletFont.SetRelief( RELIEF_NONE );
}
- // #107508# Use original scale...
+ // Use original scale...
USHORT nStretchX, nStretchY;
const_cast<Outliner*>(this)->GetGlobalCharStretching(nStretchX, nStretchY);
@@ -984,7 +982,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
{
Font aBulletFont( ImpCalcBulletFont( nPara ) );
- // #2338# Use base line
+ // Use baseline
BOOL bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE );
Font aOldFont = pOutDev->GetFont();
@@ -1010,8 +1008,8 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
if ( nOrientation )
{
- // Sowohl TopLeft als auch BottomLeft nicht ganz richtig, da
- // in EditEngine BaseLine...
+ // Both TopLeft and bottom left is not quite correct,
+ // since in EditEngine baseline ...
double nRealOrientation = nOrientation*F_PI1800;
double nCos = cos( nRealOrientation );
double nSin = sin( nRealOrientation );
@@ -1029,7 +1027,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
pOutDev->SetFont( aRotatedFont );
}
- // #105803# VCL will care for brackets and so on...
+ // VCL will take care of brackets and so on...
ULONG nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
if ( bRightToLeftPara )
@@ -1098,14 +1096,14 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
}
else
{
- // MT: Remove CAST when KA made the Draw-Method const
+ // Remove CAST when KA made the Draw-Method const
((GraphicObject*)pFmt->GetBrush()->GetGraphicObject())->Draw( pOutDev, aBulletPos, pPara->aBulSize );
}
}
}
}
- // Bei zusammengeklappten Absaetzen einen Strich vor den Text malen.
+ // In case of collapsed subparagraphs paint a line before the text.
if( pParaList->HasChilds(pPara) && !pParaList->HasVisibleChilds(pPara) &&
!bStrippingPortions && !nOrientation )
{
@@ -1223,7 +1221,7 @@ void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara )
}
else if ( pLastConverted )
{
- // Normale Absaetze unter der Ueberschrift anordnen...
+ // Arrange normal paragraphs below the heading ...
pPara->SetDepth( pLastConverted->GetDepth() );
}
@@ -1269,7 +1267,7 @@ void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount )
DepthChangedHdl();
}
}
- else // EditEngine-Modus
+ else // EditEngine mode
{
sal_Int16 nDepth = -1;
const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nStartPara );
@@ -1303,17 +1301,17 @@ long Outliner::IndentingPagesHdl( OutlinerView* pView )
BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
{
DBG_CHKTHIS(Outliner,0);
- // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages
- // schon eingestellt sein
+ // The selected pages must already be set in advance through
+ // ImpCalcSelectedPages
- // Wenn der erste Absatz auf Ebene 0 liegt darf er auf keinen Fall
- // eingerueckt werden, evtl folgen aber weitere auf Ebene 0.
+ // If the first paragraph is on level 0 it can not indented in any case,
+ // possible there might be indentations in the following on the 0 level.
if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
{
- if ( nDepthChangedHdlPrevDepth == 1 ) // ist die einzige Seite
+ if ( nDepthChangedHdlPrevDepth == 1 ) // is the only page
return FALSE;
else
- pCurView->ImpCalcSelectedPages( FALSE ); // ohne die erste
+ pCurView->ImpCalcSelectedPages( FALSE ); // without the first
}
return (BOOL)IndentingPagesHdl( pCurView );
}
@@ -1322,8 +1320,8 @@ BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
{
DBG_CHKTHIS(Outliner,0);
- // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages
- // schon eingestellt sein
+ // The selected pages must already be set in advance through
+ // ImpCalcSelectedPages
return (BOOL)RemovingPagesHdl( pCurView );
}
@@ -1368,7 +1366,7 @@ size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex )
{
DBG_CHKTHIS(Outliner,0);
size_t ActualIndex;
-//joe
+
if ( nIndex >= aViewList.size() )
{
aViewList.push_back( pView );
@@ -1392,13 +1390,13 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView )
{
if ( *it == pView )
{
- pView->pEditView->HideCursor(); // HACK wg. BugId 10006
+ pView->pEditView->HideCursor(); // HACK
pEditEngine->RemoveView( pView->pEditView );
aViewList.erase( it );
break;
}
}
- return NULL; // MT: return ueberfluessig
+ return NULL; // return superfluous
}
OutlinerView* Outliner::RemoveView( size_t nIndex )
@@ -1406,7 +1404,7 @@ OutlinerView* Outliner::RemoveView( size_t nIndex )
DBG_CHKTHIS(Outliner,0);
EditView* pEditView = pEditEngine->GetView( (USHORT)nIndex );
- pEditView->HideCursor(); // HACK wg. BugId 10006
+ pEditView->HideCursor(); // HACK
pEditEngine->RemoveView( (USHORT)nIndex );
@@ -1416,7 +1414,7 @@ OutlinerView* Outliner::RemoveView( size_t nIndex )
aViewList.erase( it );
}
- return NULL; // MT: return ueberfluessig
+ return NULL; // return superfluous
}
@@ -1573,11 +1571,10 @@ void Outliner::ParaAttribsChanged( USHORT nPara )
{
DBG_CHKTHIS(Outliner,0);
- // Der Outliner hat kein eigenes Undo, wenn Absaetz getrennt/verschmolzen werden.
- // Beim ParagraphInserted ist das Attribut EE_PARA_OUTLLEVEL
- // ggf. noch nicht eingestellt, dies wird aber benoetigt um die Tiefe
- // des Absatzes zu bestimmen.
-
+ // The Outliner does not have an undo of its own, when paragraphs are
+ // separated/merged. When ParagraphInserted the attribute EE_PARA_OUTLLEVEL
+ // may not be set, this is however needed when the depth of the paragraph
+ // is to be determined.
if( pEditEngine->IsInUndo() )
{
if ( pParaList->GetParagraphCount() == pEditEngine->GetParagraphCount() )
@@ -1597,11 +1594,10 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
{
DBG_CHKTHIS(Outliner,0);
- // Die EditEngine ruft StyleSheetChanged auch fuer abgeleitete Styles.
- // MT: Hier wurde frueher alle Absaetze durch ein ImpRecalcParaAttribs
- // gejagt, die die besagte Vorlage haben, warum?
- // => Eigentlich kann sich nur die Bullet-Repraesentation aendern...
-
+ // The EditEngine calls StyleSheetChanged also for derived styles.
+ // Here all the paragraphs, which had the said template, used to be
+ // hunted by a ImpRecalcParaAttribs, why?
+ // => only the Bullet-representation can really change...
USHORT nParas = (USHORT)pParaList->GetParagraphCount();
for( USHORT nPara = 0; nPara < nParas; nPara++ )
{
@@ -1609,7 +1605,7 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
{
ImplCheckNumBulletItem( nPara );
ImplCalcBulletText( nPara, FALSE, FALSE );
- // #97333# EditEngine formats changed paragraphs before calling this method,
+ // EditEngine formats changed paragraphs before calling this method,
// so they are not reformatted now and use wrong bullet indent
pEditEngine->QuickMarkInvalid( ESelection( nPara, 0, nPara, 0 ) );
}
@@ -1618,7 +1614,7 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos )
{
- // Bullet-Bereich innerhalb des Absatzes...
+ // Bullet area within the paragraph ...
Rectangle aBulletArea;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
@@ -1636,12 +1632,12 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst() + nSpaceBefore;
long nBulletWidth = Max( (long) -rLR.GetTxtFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
- if ( nBulletWidth < aBulletSize.Width() ) // Bullet macht sich Platz
+ if ( nBulletWidth < aBulletSize.Width() ) // The Bullet creates its space
nBulletWidth = aBulletSize.Width();
if ( bAdjust && !bOutlineMode )
{
- // Bei zentriert/rechtsbuendig anpassen
+ // Adjust when centered or align right
const SvxAdjustItem& rItem = (const SvxAdjustItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST );
if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) ||
( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
@@ -1650,15 +1646,15 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
}
}
- // Vertikal:
+ // Vertical:
ParagraphInfos aInfos = pEditEngine->GetParagraphInfos( nPara );
if ( aInfos.bValid )
{
- aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ // #91076# nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
+ aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight
+ aInfos.nFirstLineTextHeight / 2
- aBulletSize.Height() / 2;
- // ggf. lieber auf der Baseline ausgeben...
+ // may prefer to print out on the baseline ...
if( ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) )
{
Font aBulletFont( ImpCalcBulletFont( nPara ) );
@@ -1668,7 +1664,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
Font aOldFont = pRefDev->GetFont();
pRefDev->SetFont( aBulletFont );
FontMetric aMetric( pRefDev->GetFontMetric() );
- // Leading der ersten Zeile...
+ // Leading on the first line ...
aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent;
aTopLeft.Y() -= aMetric.GetAscent();
pRefDev->SetFont( aOldFont );
@@ -1686,7 +1682,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
}
- if ( aTopLeft.X() < 0 ) // dann draengeln
+ if ( aTopLeft.X() < 0 ) // then push
aTopLeft.X() = 0;
aBulletArea = Rectangle( aTopLeft, aBulletSize );
@@ -1796,7 +1792,6 @@ void Outliner::StripPortions()
bStrippingPortions = FALSE;
}
-// #101498#
void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
@@ -1812,7 +1807,6 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO
if(aDrawPortionHdl.IsSet())
{
- // #101498#
DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, false, 0, bEndOfLine, bEndOfParagraph, bEndOfBullet);
@@ -2062,7 +2056,7 @@ String Outliner::ImplGetBulletText( USHORT nPara )
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
{
- // MT: Optimierung mal wieder aktivieren...
+ // Enable optimization again ...
// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
ImplCalcBulletText( nPara, FALSE, FALSE );
aRes = pPara->GetText();
diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx
index b3ed76b08dbd..a6c04490abc0 100644
--- a/editeng/source/outliner/outlundo.hxx
+++ b/editeng/source/outliner/outlundo.hxx
@@ -100,9 +100,9 @@ public:
virtual void Repeat();
};
-// Hilfs-Undo: Wenn es fuer eine Aktion keine OutlinerUndoAction gibst, weil
-// die EditEngine das handelt, aber z.B. noch das Bullet neu berechnet werden muss.
-
+// Help-Undo: If it does not exist an OutlinerUndoAction for a certain action
+// because this is handled by the EditEngine, but for example the bullet has
+// to be recalculated.
class OutlinerUndoCheckPara : public OutlinerUndoBase
{
using SfxUndoAction::Repeat;
@@ -133,7 +133,7 @@ public:
virtual void Redo();
virtual void Repeat();
- USHORT* pParas; // 0 == nCount enthaelt Absatznummer
+ USHORT* pParas; // 0 == nCount contains paragraph number
Outliner* pOutliner;
USHORT nCount;
};
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index a2d4a2519d77..d7280fa16f3d 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -58,13 +58,13 @@
#include <editeng/editstat.hxx>
-// Breite der Randzonen innerhalb derer beim D&D gescrollt wird
+// Width of the border zones within which is scrolled during Drag and Drop
#define OL_SCROLL_LRBORDERWIDTHPIX 10
#define OL_SCROLL_TBBORDERWIDTHPIX 10
-// Wert, um den Fensterinhalt beim D&D gescrollt wird
-#define OL_SCROLL_HOROFFSET 20 /* in % von VisibleSize.Width */
-#define OL_SCROLL_VEROFFSET 20 /* in % von VisibleSize.Height */
+// Value to the window content when scrolling during Drag and Drop
+#define OL_SCROLL_HOROFFSET 20 /* in % of VisibleSize.Width */
+#define OL_SCROLL_VEROFFSET 20 /* in % of VisibleSize.Height */
using namespace ::com::sun::star;
@@ -96,8 +96,8 @@ void OutlinerView::Paint( const Rectangle& rRect )
{
DBG_CHKTHIS(OutlinerView,0);
- // beim ersten Paint/KeyInput/Drop wird aus einem leeren Outliner ein
- // Outliner mit genau einem Absatz
+ // For the first Paint/KeyInput/Drop an emty Outliner is turned into
+ // an Outliner with exactly one paragraph.
if( pOwner->bFirstParaIsEmpty )
pOwner->Insert( String() );
@@ -108,8 +108,8 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
{
DBG_CHKTHIS( OutlinerView, 0 );
- // beim ersten Paint/KeyInput/Drop wird aus einem leeren Outliner ein
- // Outliner mit genau einem Absatz
+ // For the first Paint/KeyInput/Drop an emty Outliner is turned into
+ // an Outliner with exactly one paragraph.
if( pOwner->bFirstParaIsEmpty )
pOwner->Insert( String() );
@@ -172,7 +172,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
}
}
break;
- default: // wird dann evtl. unten bearbeitet.
+ default: // is then possibly edited below.
eFunc = KEYFUNC_DONTKNOW;
}
}
@@ -220,13 +220,13 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
{
if ( !bReadOnly )
{
- // Sonderbehandlung: Hartes Return am Ende eines Absatzes,
- // der eingeklappte Unterabsaetze besitzt
+ // Special treatment: hard return at the end of a paragraph,
+ // which has collapsed subparagraphs.
Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara );
if( !aKeyCode.IsShift() )
{
- // Nochmal ImpGetCursor ???
+ // ImpGetCursor again???
if( !bSelection &&
aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
{
@@ -236,9 +236,9 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
pOwner->UndoActionStart( OLUNDO_INSERT );
ULONG nTemp = aSel.nEndPara;
nTemp += nChilds;
- nTemp++; // einfuegen ueber naechstem Non-Child
+ nTemp++; // insert above next Non-Child
pOwner->Insert( String(),nTemp,pPara->GetDepth());
- // Cursor positionieren
+ // Position the cursor
ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0);
pEditView->SetSelection( aTmpSel );
pEditView->ShowCursor( TRUE, TRUE );
@@ -256,7 +256,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
nTemp++;
pOwner->Insert( String(), nTemp, pPara->GetDepth()+1 );
- // Cursor positionieren
+ // Position the cursor
ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0);
pEditView->SetSelection( aTmpSel );
pEditView->ShowCursor( TRUE, TRUE );
@@ -358,7 +358,7 @@ BOOL OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
ULONG nEndPara = nPara;
if ( bHasChilds && pOwner->pParaList->HasVisibleChilds(pPara) )
nEndPara += pOwner->pParaList->GetChildCount( pPara );
- // umgekehrt rum selektieren, damit EditEngine nicht scrollt
+ // The selection is inverted, so that EditEngine does not scroll
ESelection aSel((USHORT)nEndPara, 0xffff,(USHORT)nPara, 0 );
pEditView->SetSelection( aSel );
}
@@ -467,7 +467,7 @@ void OutlinerView::ImpPaintDDCursor()
pWindow->SetRasterOp( eOldOp );
}
-// Berechnet, ueber welchem Absatz eingefuegt werden muss
+// Calculates above which paragraph must it must be inserted
ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel )
{
@@ -549,7 +549,7 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs )
pEditView->SetAttribs( rAttrs );
- // Bullet-Texte aktualisieren
+ // Update Bullet text
for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
pOwner->ImplCheckNumBulletItem( nPara );
@@ -575,7 +575,7 @@ ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds )
ParaRange aParas( aSel.nStartPara, aSel.nEndPara );
aParas.Adjust();
- // unsichtbare Childs des letzten Parents in Selektion mit aufnehmen
+ // Record the invisible Children of the last Parents in the selection
if ( bIncludeHiddenChilds )
{
Paragraph* pLast = pOwner->pParaList->GetParagraph( aParas.nEndPara );
@@ -588,7 +588,7 @@ ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds )
return aParas;
}
-// MT: Name sollte mal geaendert werden!
+// TODO: Name should be changed!
void OutlinerView::AdjustDepth( short nDX )
{
Indent( nDX );
@@ -610,7 +610,7 @@ void OutlinerView::Indent( short nDiff )
if( bUndo )
pOwner->UndoActionStart( OLUNDO_DEPTH );
- sal_Int16 nMinDepth = -1; // Optimierung: Nicht unnoetig viele Absatze neu berechnen
+ sal_Int16 nMinDepth = -1; // Optimization: Not to recalculate to manny parargaphs when not really needed.
ParaRange aSel = ImpGetSelectedParagraphs( TRUE );
for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
@@ -625,7 +625,7 @@ void OutlinerView::Indent( short nDiff )
const bool bPage = pPara->HasFlag(PARAFLAG_ISPAGE);
if( (bPage && (nDiff == +1)) || (!bPage && (nDiff == -1) && (nOldDepth <= 0)) )
{
- // App benachrichtigen
+ // Notify App
pOwner->nDepthChangedHdlPrevDepth = (sal_Int16)nOldDepth;
pOwner->mnDepthChangeHdlPrevFlags = pPara->nFlags;
pOwner->pHdlParagraph = pPara;
@@ -667,10 +667,10 @@ void OutlinerView::Indent( short nDiff )
{
if ( ( nPara == aSel.nStartPara ) && aSel.nStartPara && ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ))
{
- // Sonderfall: Der Vorgaenger eines eingerueckten Absatzes ist
- // unsichtbar und steht jetzt auf der gleichen Ebene wie der
- // sichtbare Absatz. In diesem Fall wird der naechste sichtbare
- // Absatz gesucht und aufgeplustert.
+ // Special case: the predecessor of an indented paragraph is
+ // invisible and is now on the same level as the visible
+ // paragraph. In this case, the next visible paragraph is
+ // searched for and fluffed.
#ifdef DBG_UTIL
Paragraph* _pPara = pOwner->pParaList->GetParagraph( aSel.nStartPara );
DBG_ASSERT(_pPara->IsVisible(),"Selected Paragraph invisible ?!");
@@ -679,8 +679,8 @@ void OutlinerView::Indent( short nDiff )
if( !pPrev->IsVisible() && ( pPrev->GetDepth() == nNewDepth ) )
{
- // Vorgaenger ist eingeklappt und steht auf gleicher Ebene
- // => naechsten sichtbaren Absatz suchen und expandieren
+ // Predecessor is collapsed and is on the same level
+ // => find next visible paragraph and expand it
pPrev = pOwner->pParaList->GetParent( pPrev );
while( !pPrev->IsVisible() )
pPrev = pOwner->pParaList->GetParent( pPrev );
@@ -700,7 +700,7 @@ void OutlinerView::Indent( short nDiff )
if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
pOwner->ImplSetLevelDependendStyleSheet( nPara );
- // App benachrichtigen
+ // Notify App
pOwner->DepthChangedHdl();
}
else
@@ -710,12 +710,6 @@ void OutlinerView::Indent( short nDiff )
}
}
- // MT 19.08.99: War mal fuer Optimierung (outliner.cxx#1.193),
- // hat aber zu zuviel Wartungsaufwand / doppelten Funktionen gefuehrt
- // und zu wenig gebracht:
- // pOwner->ImpSetBulletTextsFrom( aSel.nStartPara+1, nMinDepth );
- // Wird jetzt direkt in Schleife mit ImplCalcBulletText() erledigt.
- // Jetzt fehlen nur noch die folgenden Ansaetze, die davon betroffen sind.
USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount();
for ( USHORT n = aSel.nEndPara+1; n < nParas; n++ )
{
@@ -778,7 +772,7 @@ Point OutlinerView::ImpGetDocPos( const Point& rPosPixel )
{
DBG_CHKTHIS(OutlinerView,0);
Rectangle aOutArWin = GetOutputArea();
- // Position in der OutputArea berechnen
+ // Calculate position in the OutputArea
Point aCurPosDoc( rPosPixel );
aCurPosDoc = pEditView->GetWindow()->PixelToLogic( aCurPosDoc );
aCurPosDoc -= aOutArWin.TopLeft();
@@ -786,8 +780,6 @@ Point OutlinerView::ImpGetDocPos( const Point& rPosPixel )
return aCurPosDoc;
}
-// MT 05/00: Wofuer dies ImpXXXScroll, sollte das nicht die EditEngine machen???
-
void OutlinerView::ImpDragScroll( const Point& rPosPix )
{
DBG_CHKTHIS(OutlinerView,0);
@@ -947,7 +939,7 @@ void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL
BOOL bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara );
if( bDone )
{
- // Der Strich unter dem Absatz muss verschwinden...
+ // The line under the paragraph should disappear ...
pOwner->pEditEngine->QuickMarkToBeRepainted( nPara );
}
}
@@ -978,16 +970,14 @@ void OutlinerView::Collapse( Paragraph* pPara)
void OutlinerView::InsertText( const OutlinerParaObject& rParaObj )
{
- // MT: Wie Paste, nur EditView::Insert, statt EditView::Paste.
- // Eigentlich nicht ganz richtig, das evtl. Einrueckungen
- // korrigiert werden muessen, aber das kommt spaeter durch ein
- // allgemeingueltiges Import.
- // Dann wird im Inserted gleich ermittelt, was f�r eine Einrueckebene
- // Moegliche Struktur:
- // pImportInfo mit DestPara, DestPos, nFormat, pParaObj...
- // Evtl. Problematisch:
- // EditEngine, RTF => Absplittung des Bereichs, spaeter
- // zusammenfuehrung
+ // Like Paste, only EditView::Insert, instead of EditView::Paste.
+ // Actually not quite true that possible indentations must be corrected,
+ // but that comes later by a universal import. The indentation level is
+ // then determined right in the Inserted method.
+ // Possible structure:
+ // pImportInfo with DestPara, DestPos, nFormat, pParaObj...
+ // Possibly problematic:
+ // EditEngine, RTF => Splitting the area, later join together.
DBG_CHKTHIS(OutlinerView,0);
@@ -1021,7 +1011,7 @@ void OutlinerView::Cut()
void OutlinerView::Paste()
{
DBG_CHKTHIS(OutlinerView,0);
- PasteSpecial(); // HACK(SD ruft nicht PasteSpecial auf)
+ PasteSpecial(); // HACK(SD does not call PasteSpecial)
}
void OutlinerView::PasteSpecial()
@@ -1164,11 +1154,11 @@ USHORT OutlinerView::ImpCalcSelectedPages( BOOL bIncludeFirstSelected )
USHORT nFirstPage = 0xFFFF;
USHORT nStartPara = aSel.nStartPara;
if ( !bIncludeFirstSelected )
- nStartPara++; // alle nach StartPara kommenden Absaetze werden geloescht
+ nStartPara++; // All paragraphs after StartPara will be deleted
for ( USHORT nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- DBG_ASSERT(pPara, "ImpCalcSelectedPages: ungueltige Selection? ");
+ DBG_ASSERT(pPara, "ImpCalcSelectedPages: invalid Selection? ");
if( pPara->HasFlag(PARAFLAG_ISPAGE) )
{
nPages++;
@@ -1288,7 +1278,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b
pEditView->RemoveAttribs( bRemoveParaAttribs, nWhich );
if ( bRemoveParaAttribs )
{
- // Ueber alle Absaetze, und Einrueckung und Level einstellen
+ // Loop through all paragraphs and set indentation and level
ESelection aSel = pEditView->GetSelection();
aSel.Adjust();
for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
@@ -1303,8 +1293,8 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b
-// =====================================================================
-// ====================== Einfache Durchreicher =======================
+// ======================================================================
+// ====================== Simple pass-through =======================
// ======================================================================
@@ -1606,9 +1596,6 @@ ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextForma
ULONG nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs );
- // MT 08/00: Hier sollte eigentlich das gleiche wie in PasteSpecial passieren!
- // Mal anpassen, wenn dieses ImplInitPaste und ImpPasted-Geraffel ueberarbeitet ist.
-
long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount;
USHORT nChangesStart = aOldSel.nStartPara;
USHORT nChangesEnd = sal::static_int_cast< USHORT >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara));
diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx
index e1fc065a3f39..11984494aa1c 100644
--- a/editeng/source/outliner/paralist.cxx
+++ b/editeng/source/outliner/paralist.cxx
@@ -30,7 +30,7 @@
#include "precompiled_editeng.hxx"
#include <paralist.hxx>
-#include <editeng/outliner.hxx> // nur wegen Paragraph, muss geaendert werden!
+#include <editeng/outliner.hxx> // only because of Paragraph, this must be changed!
#include <editeng/numdef.hxx>
DBG_NAME(Paragraph)