[Libreoffice-commits] core.git: chart2/source sc/source sw/source
Alexander Wilms
f.alexander.wilms at gmail.com
Fri Feb 21 07:34:14 PST 2014
chart2/source/controller/main/ElementSelector.cxx | 4
sc/source/ui/view/pivotsh.cxx | 12 -
sc/source/ui/view/select.cxx | 31 ---
sc/source/ui/view/viewdata.cxx | 72 +++----
sw/source/core/edit/ednumber.cxx | 2
sw/source/core/text/blink.cxx | 1
sw/source/core/text/guess.cxx | 5
sw/source/core/text/itratr.cxx | 94 ++-------
sw/source/core/text/itratr.hxx | 4
sw/source/core/text/itrpaint.cxx | 48 +---
sw/source/core/text/noteurl.cxx | 3
sw/source/core/text/porlay.hxx | 22 --
sw/source/core/text/redlnitr.cxx | 55 ++---
sw/source/core/text/txtdrop.cxx | 111 ++---------
sw/source/core/text/txtfrm.cxx | 144 ++------------
sw/source/core/text/txtftn.cxx | 135 -------------
sw/source/filter/writer/writer.cxx | 36 +--
sw/source/filter/writer/wrt_fn.cxx | 3
sw/source/filter/ww1/fltshell.cxx | 122 ++++--------
sw/source/filter/ww1/w1class.cxx | 64 +++---
sw/source/filter/ww1/w1class.hxx | 185 +++++--------------
sw/source/filter/ww1/w1filter.cxx | 214 +++++++++-------------
sw/source/filter/ww1/w1par.cxx | 22 --
sw/source/filter/ww1/w1sprm.cxx | 13 -
sw/source/filter/ww1/w1struct.hxx | 22 +-
sw/source/filter/xml/XMLRedlineImportHelper.cxx | 38 +--
sw/source/filter/xml/XMLRedlineImportHelper.hxx | 69 +++----
sw/source/filter/xml/swxml.cxx | 5
sw/source/filter/xml/wrtxml.cxx | 7
sw/source/filter/xml/wrtxml.hxx | 18 -
sw/source/filter/xml/xmlbrsh.cxx | 1
sw/source/filter/xml/xmlbrshe.hxx | 2
sw/source/filter/xml/xmlbrshi.hxx | 1
sw/source/filter/xml/xmlexp.cxx | 1
sw/source/filter/xml/xmlexp.hxx | 1
sw/source/filter/xml/xmlexpit.cxx | 3
sw/source/filter/xml/xmlfmt.cxx | 11 -
sw/source/filter/xml/xmlfmte.cxx | 2
sw/source/filter/xml/xmlfonte.cxx | 5
sw/source/filter/xml/xmlimp.cxx | 17 -
sw/source/filter/xml/xmlimpit.cxx | 7
sw/source/filter/xml/xmlitem.cxx | 1
sw/source/filter/xml/xmlitem.hxx | 1
sw/source/filter/xml/xmliteme.cxx | 4
sw/source/filter/xml/xmlitemi.cxx | 5
sw/source/filter/xml/xmlithlp.cxx | 3
sw/source/filter/xml/xmlithlp.hxx | 4
sw/source/filter/xml/xmlitmap.hxx | 7
sw/source/filter/xml/xmlitmpr.cxx | 1
sw/source/filter/xml/xmlmeta.cxx | 6
sw/source/filter/xml/xmlscript.cxx | 2
sw/source/filter/xml/xmltble.cxx | 10 -
sw/source/filter/xml/xmltbli.cxx | 34 ---
sw/source/filter/xml/xmltbli.hxx | 2
sw/source/filter/xml/xmltext.cxx | 3
sw/source/filter/xml/xmltexte.cxx | 2
sw/source/filter/xml/xmltexti.cxx | 5
sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 104 +++++-----
sw/source/ui/dialog/ascfldlg.cxx | 6
sw/source/ui/dialog/docstdlg.cxx | 17 -
sw/source/ui/misc/titlepage.cxx | 4
sw/source/ui/table/chartins.cxx | 9
sw/source/ui/table/colwd.cxx | 8
sw/source/ui/table/convert.cxx | 2
sw/source/ui/table/rowht.cxx | 4
sw/source/ui/table/swtablerep.cxx | 4
sw/source/ui/table/tabledlg.cxx | 63 ++----
sw/source/ui/table/tablemgr.cxx | 23 --
sw/source/ui/table/tablepg.hxx | 5
69 files changed, 582 insertions(+), 1369 deletions(-)
New commits:
commit 42deae1e9d3ea0ed4ff5d1423c786d15ebcebfea
Author: Alexander Wilms <f.alexander.wilms at gmail.com>
Date: Sun Feb 9 01:04:08 2014 +0100
Translate German comments and remove superfluous ones as well as visual noise
Conflicts:
sc/source/ui/view/select.cxx
sc/source/ui/view/viewdata.cxx
sw/source/core/text/redlnitr.cxx
sw/source/core/text/txtfrm.cxx
sw/source/core/text/txtftn.cxx
sw/source/ui/table/tabledlg.cxx
Change-Id: I23371b913514d656552bc6f7fb4ba554ee6a3694
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index fba6fb4..bb2459a 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -111,7 +111,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
Reference< lang::XMultiServiceFactory > xFact( xChartController->getModel(), uno::UNO_QUERY );
if( xFact.is() )
xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
- ExplicitValueProvider* pExplicitValueProvider = 0;//ExplicitValueProvider::getExplicitValueProvider(xChartView); dies erzeugt alle sichtbaren datenpinkte, das ist zu viel
+ ExplicitValueProvider* pExplicitValueProvider = 0; //ExplicitValueProvider::getExplicitValueProvider(xChartView); this creates all visible data points, that's too much
ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider, true /*bFlattenDiagram*/, true /*bOrderingForElementSelector*/ );
lcl_addObjectsToList( aHierarchy, aHierarchy.getRootNodeOID(), m_aEntries, 0, xChartDoc );
@@ -168,7 +168,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
nEntryCount = 100;
SetDropDownLineCount( nEntryCount );
}
- SaveValue();//remind current selection pos
+ SaveValue(); //remind current selection pos
}
void SelectorListBox::ReleaseFocus_Impl()
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index d9d3602..8782062 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -38,13 +38,10 @@
#include "dbdocfun.hxx"
#include "uiitems.hxx"
#include "scabstdlg.hxx"
-//------------------------------------------------------------------------
#define ScPivotShell
#include "scslots.hxx"
-//------------------------------------------------------------------------
-
TYPEINIT1( ScPivotShell, SfxShell );
SFX_IMPL_INTERFACE(ScPivotShell, SfxShell, ScResId(SCSTR_PIVOTSHELL))
@@ -52,9 +49,6 @@ SFX_IMPL_INTERFACE(ScPivotShell, SfxShell, ScResId(SCSTR_PIVOTSHELL))
SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_PIVOT) );
}
-
-//------------------------------------------------------------------------
-
ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) :
SfxShell(pViewSh),
pViewShell( pViewSh )
@@ -72,12 +66,10 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) :
SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Pivot));
}
-//------------------------------------------------------------------------
ScPivotShell::~ScPivotShell()
{
}
-//------------------------------------------------------------------------
void ScPivotShell::Execute( SfxRequest& rReq )
{
switch ( rReq.GetSlot() )
@@ -140,7 +132,6 @@ void ScPivotShell::Execute( SfxRequest& rReq )
}
}
-//------------------------------------------------------------------------
void ScPivotShell::GetState( SfxItemSet& rSet )
{
ScDocShell* pDocSh = pViewShell->GetViewData()->GetDocShell();
@@ -175,9 +166,6 @@ void ScPivotShell::GetState( SfxItemSet& rSet )
}
}
-
-//------------------------------------------------------------------------
-
ScDPObject* ScPivotShell::GetCurrDPObject()
{
const ScViewData& rViewData = *pViewShell->GetViewData();
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 616c0e8..1b4b8ad 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -46,10 +46,7 @@ static bool bDidSwitch = false;
// -----------------------------------------------------------------------
-//
-// View (Gridwin / keyboard)
-//
-
+// View (Gridwin / keyboard)
ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
pEngine( NULL ),
@@ -149,8 +146,7 @@ void ScViewFunctionSet::SetSelectionEngine( ScViewSelectionEngine* pSelEngine )
pEngine = pSelEngine;
}
-// Drag & Drop
-
+// Drag & Drop
void ScViewFunctionSet::BeginDrag()
{
SCTAB nTab = pViewData->GetTabNo();
@@ -223,8 +219,7 @@ void ScViewFunctionSet::BeginDrag()
}
-// Selection
-
+// Selection
void ScViewFunctionSet::CreateAnchor()
{
if (bAnchor) return;
@@ -257,10 +252,10 @@ void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY )
}
else
{
- // nicht weg und gleich wieder hin
+ // don't go there and back again
if ( bStarted && pView->IsMarking( nPosX, nPosY, nTab ) )
{
- // nix
+ // don't do anything
}
else
{
@@ -318,7 +313,6 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /*
aEffPos.Y() = -1;
// Scrolling
-
Size aWinSize = pEngine->GetWindow()->GetOutputSizePixel();
bool bRightScroll = ( aEffPos.X() >= aWinSize.Width() );
bool bLeftScroll = ( aEffPos.X() < 0 );
@@ -354,7 +348,6 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /*
}
// moved out of fix limit?
-
ScSplitPos eWhich = GetWhich();
if ( eWhich == pViewData->GetActivePart() )
{
@@ -737,8 +730,6 @@ void ScViewFunctionSet::DeselectAll()
bAnchor = false;
}
-//------------------------------------------------------------------------
-
ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
ScSplitPos eSplitPos ) :
SelectionEngine( pWindow, pView->GetFunctionSet() ),
@@ -748,13 +739,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
EnableDrag( true );
}
-
-//------------------------------------------------------------------------
-
-//
-// column and row headers
-//
-
+// column and row headers
ScHeaderFunctionSet::ScHeaderFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
bColumn( false ),
@@ -818,7 +803,6 @@ bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /
}
// Scrolling
-
Size aWinSize = pViewData->GetActiveWin()->GetOutputSizePixel();
bool bScroll;
if (bColumn)
@@ -827,7 +811,6 @@ bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /
bScroll = ( rPointPixel.Y() < 0 || rPointPixel.Y() >= aWinSize.Height() );
// moved out of fix limit?
-
bool bSwitched = false;
if ( bColumn )
{
@@ -931,8 +914,6 @@ void ScHeaderFunctionSet::DeselectAll()
bAnchor = false;
}
-//------------------------------------------------------------------------
-
ScHeaderSelectionEngine::ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunctionSet* pFuncSet ) :
SelectionEngine( pWindow, pFuncSet )
{
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7b764c3..de4070b 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -71,8 +71,8 @@ using namespace com::sun::star;
#define TAG_TABBARWIDTH "tw:"
-static bool bMoveArea = false; //! Member?
-sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; //! Member !!!
+static bool bMoveArea = false; // Member?
+sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; // Member!
ScViewDataTable::ScViewDataTable() :
eZoomType( SVX_ZOOM_PERCENT ),
@@ -309,13 +309,13 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
nPasteFlags ( SC_PASTE_NONE ),
eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
nFillMode ( SC_FILL_NONE ),
- bActive ( true ), //! wie initialisieren?
+ bActive ( true ), // how to initialize?
bIsRefMode ( false ),
bDelMarkValid( false ),
bPagebreak ( false ),
bSelCtrlMouseClick( false )
{
- mpMarkData->SelectOneTable(0); // Sync with nTabNo.
+ mpMarkData->SelectOneTable(0); // Sync with nTabNo
SetGridMode ( true );
SetSyntaxMode ( false );
@@ -345,7 +345,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
*pOptions = pDoc->GetViewOptions();
}
- // keine ausgeblendete Tabelle anzeigen:
+ // don't show hidden tables
if (pDoc && !pDoc->IsVisible(nTabNo))
{
while ( !pDoc->IsVisible(nTabNo) && pDoc->HasTable(nTabNo+1) )
@@ -377,10 +377,10 @@ ScViewData::ScViewData( const ScViewData& rViewData ) :
aDefPageZoomY( rViewData.aDefPageZoomY ),
eRefType ( SC_REFTYPE_NONE ),
nTabNo ( rViewData.nTabNo ),
- nRefTabNo ( rViewData.nTabNo ), // kein RefMode
+ nRefTabNo ( rViewData.nTabNo ), // no RefMode
eEditActivePart( rViewData.eEditActivePart ),
nFillMode ( SC_FILL_NONE ),
- bActive ( true ), //! wie initialisieren?
+ bActive ( true ), // how to initialize?
bIsRefMode ( false ),
bDelMarkValid( false ),
bPagebreak ( rViewData.bPagebreak ),
@@ -500,7 +500,7 @@ void ScViewData::DeleteTabs( SCTAB nTab, SCTAB nSheets )
void ScViewData::CopyTab( SCTAB nSrcTab, SCTAB nDestTab )
{
if (nDestTab==SC_TAB_APPEND)
- nDestTab = pDoc->GetTableCount() - 1; // am Doc muss vorher kopiert worden sein
+ nDestTab = pDoc->GetTableCount() - 1; // something had to have been copied
if (nDestTab > MAXTAB)
{
@@ -543,7 +543,7 @@ void ScViewData::MoveTab( SCTAB nSrcTab, SCTAB nDestTab )
UpdateCurrentTab();
mpMarkData->DeleteTab( nSrcTab );
- mpMarkData->InsertTab( nDestTab ); // ggf. angepasst
+ mpMarkData->InsertTab( nDestTab ); // adapted if needed
}
void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
@@ -902,8 +902,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
bool bWasThere = false;
if (pEditView[eWhich])
{
- // Wenn die View schon da ist, nichts aufrufen, was die Cursorposition aendert
-
+ // if the view is already therem don't call anything that changes the cursor position
if (bEditActive[eWhich])
bWasThere = true;
else
@@ -1061,8 +1060,8 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
pEditView[eWhich]->Scroll( 0, aOutputArea.Top() - aDocPos.Y() );
}
- // hier muss bEditActive schon gesetzt sein
- // (wegen Map-Mode bei Paint)
+ // here bEditActive needs to be set already
+ // (due to Map-Mode during Paint)
if (!bWasThere)
pNewEngine->InsertView(pEditView[eWhich]);
@@ -1076,7 +1075,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
}
pEditView[eWhich]->SetBackgroundColor( aBackCol );
- pEditView[eWhich]->Invalidate(); // needed ??
+ pEditView[eWhich]->Invalidate(); // needed?
// needed, wenn position changed
}
@@ -1782,7 +1781,7 @@ bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
}
}
- if (bNextIfLarge) // zu grosse Zellen ?
+ if (bNextIfLarge) // cells to big?
{
if ( rPosX == nStartPosX && nClickX > 0 )
{
@@ -1807,8 +1806,7 @@ bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
if (bTestMerge)
{
- //! public Methode um Position anzupassen
-
+ // public method to adapt position
SCCOL nOrigX = rPosX;
SCROW nOrigY = rPosY;
pDoc->SkipOverlapped(rPosX, rPosY, nTabNo);
@@ -1925,7 +1923,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
pThisTab->nPosY[eWhich] = 0;
}
-void ScViewData::RecalcPixPos() // nach Zoom-Aenderungen
+void ScViewData::RecalcPixPos() // after zoom changes
{
for (sal_uInt16 eWhich=0; eWhich<2; eWhich++)
{
@@ -2045,7 +2043,7 @@ void ScViewData::SetScreen( const Rectangle& rVisArea )
{
SetScreenPos( rVisArea.TopLeft() );
- // hier ohne GetOutputFactor(), weil fuer Ausgabe in Metafile
+ // here without GetOutputFactor(), since it's for the output into a Metafile
aScrSize = rVisArea.GetSize();
aScrSize.Width() = (long)
@@ -2200,13 +2198,13 @@ void ScViewData::WriteUserData(OUString& rData)
rData += ";"; // Numerierung darf auf keinen Fall durcheinanderkommen
if (i < static_cast<SCTAB>(maTabData.size()) && maTabData[i])
{
- OUString cTabSep = OUString(SC_OLD_TABSEP); // wie 3.1
+ OUString cTabSep = OUString(SC_OLD_TABSEP); // like 3.1
if ( maTabData[i]->nCurY > MAXROW_30 ||
maTabData[i]->nPosY[0] > MAXROW_30 || maTabData[i]->nPosY[1] > MAXROW_30 ||
( maTabData[i]->eVSplitMode == SC_SPLIT_FIX &&
maTabData[i]->nFixPosY > MAXROW_30 ) )
{
- cTabSep = OUString(SC_NEW_TABSEP); // um eine 3.1-Version nicht umzubringen
+ cTabSep = OUString(SC_NEW_TABSEP); // in order to not kill a 3.1-version
}
@@ -2235,8 +2233,8 @@ void ScViewData::WriteUserData(OUString& rData)
void ScViewData::ReadUserData(const OUString& rData)
{
- if (rData.isEmpty()) // Leerer String kommt bei "neu Laden"
- return; // dann auch ohne Assertion beenden
+ if (rData.isEmpty()) // Leerer String kommt bei "neu Laden"
+ return; // then exit without assertion
sal_Int32 nCount = comphelper::string::getTokenCount(rData, ';');
if ( nCount <= 2 )
@@ -2250,29 +2248,25 @@ void ScViewData::ReadUserData(const OUString& rData)
// nicht pro Tabelle:
SCTAB nTabStart = 2;
- Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; //! evaluate (all sheets?)
+ Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; // evaluate (all sheets?)
OUString aZoomStr = rData.getToken(0, ';'); // Zoom/PageZoom/Modus
sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0,'/').toInt32());
if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM )
- aZoomX = aZoomY = Fraction( nNormZoom, 100 ); // "normaler" Zoom (immer)
+ aZoomX = aZoomY = Fraction( nNormZoom, 100 ); // "normal" zoom (always)
sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(1,'/').toInt32());
if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM )
- aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 ); // Pagebreak-Zoom, wenn gesetzt
- sal_Unicode cMode = aZoomStr.getToken(2,'/')[0]; // 0 oder "0"/"1"
+ aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 ); // Pagebreak-zoom, if set
+ sal_Unicode cMode = aZoomStr.getToken(2,'/')[0]; // 0 or "0"/"1"
SetPagebreakMode( cMode == '1' );
// SetPagebreakMode muss immer gerufen werden wegen CalcPPT / RecalcPixPos()
- //
// Tabelle kann ungueltig geworden sein (z.B. letzte Version):
- //
SCTAB nNewTab = static_cast<SCTAB>(rData.getToken(1, ';').toInt32());
if (pDoc->HasTable( nNewTab ))
SetTabNo(nNewTab);
- //
// wenn vorhanden, TabBar-Breite holen:
- //
OUString aTabOpt = rData.getToken(2, ';');
if (aTabOpt.startsWith(TAG_TABBARWIDTH))
@@ -2282,7 +2276,7 @@ void ScViewData::ReadUserData(const OUString& rData)
nTabStart = 3;
}
- // pro Tabelle:
+ // per table
SCTAB nPos = 0;
while ( nCount > nPos+nTabStart )
{
@@ -2882,7 +2876,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
void ScViewData::SetOptions( const ScViewOptions& rOpt )
{
- // if visibility of horiz. ScrollBar is changed, TabBar may have to be resized...
+ // if visibility of horizontal ScrollBar is changed, TabBar may have to be resized...
bool bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) );
// if graphics are turned on or off, animation has to be started or stopped
@@ -2916,10 +2910,10 @@ bool ScViewData::IsOle()
return pDocShell && pDocShell->IsOle();
}
-bool ScViewData::UpdateFixX( SCTAB nTab ) // true = Wert geaendert
+bool ScViewData::UpdateFixX( SCTAB nTab ) // true = value changed
{
if (!ValidTab(nTab)) // Default
- nTab=nTabNo; // akuelle Tabelle
+ nTab=nTabNo; // current table
if (!pView || maTabData[nTab]->eHSplitMode != SC_SPLIT_FIX)
return false;
@@ -2944,17 +2938,17 @@ bool ScViewData::UpdateFixX( SCTAB nTab ) // true = Wert geaendert
{
maTabData[nTab]->nHSplitPos = nNewPos;
if (nTab == nTabNo)
- RecalcPixPos(); //! sollte nicht noetig sein !!!
+ RecalcPixPos(); // should not be needed
return true;
}
return false;
}
-bool ScViewData::UpdateFixY( SCTAB nTab ) // true = Wert geaendert
+bool ScViewData::UpdateFixY( SCTAB nTab ) // true = value changed
{
if (!ValidTab(nTab)) // Default
- nTab=nTabNo; // akuelle Tabelle
+ nTab=nTabNo; // current table
if (!pView || maTabData[nTab]->eVSplitMode != SC_SPLIT_FIX)
return false;
@@ -2979,7 +2973,7 @@ bool ScViewData::UpdateFixY( SCTAB nTab ) // true = Wert geaendert
{
maTabData[nTab]->nVSplitPos = nNewPos;
if (nTab == nTabNo)
- RecalcPixPos(); //! sollte nicht noetig sein !!!
+ RecalcPixPos(); // should not be needed
return true;
}
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 5151462..da1f030 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -271,7 +271,7 @@ sal_Bool SwEditShell::HasBullet() const
}
// <- #i29560#
-/// delete, split list
+// delete, split list
void SwEditShell::DelNumRules()
{
StartAllAction();
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index ffb6fe7..3b3e6ac 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -177,5 +177,4 @@ void SwBlink::FrmDelete( const SwRootFrm* pRoot )
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 7524943..f911e6a 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -526,13 +526,8 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
return false;
}
-/*************************************************************************
- * SwTxtGuess::AlternativeSpelling
- *************************************************************************/
-
// returns true if word at position nPos has a diffenrent spelling
// if hyphenated at this position (old german spelling)
-
bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
const sal_Int32 nPos )
{
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 53e0d0a..9cf8052 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -57,10 +57,6 @@
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star;
-/*************************************************************************
- * SwAttrIter::Chg()
- *************************************************************************/
-
void SwAttrIter::Chg( SwTxtAttr *pHt )
{
OSL_ENSURE( pHt && pFnt, "No attribute of font available for change");
@@ -71,10 +67,6 @@ void SwAttrIter::Chg( SwTxtAttr *pHt )
nChgCnt++;
}
-/*************************************************************************
- * SwAttrIter::Rst()
- *************************************************************************/
-
void SwAttrIter::Rst( SwTxtAttr *pHt )
{
OSL_ENSURE( pHt && pFnt, "No attribute of font available for reset");
@@ -86,10 +78,6 @@ void SwAttrIter::Rst( SwTxtAttr *pHt )
nChgCnt--;
}
-/*************************************************************************
- * virtual SwAttrIter::~SwAttrIter()
- *************************************************************************/
-
SwAttrIter::~SwAttrIter()
{
delete pRedln;
@@ -116,10 +104,6 @@ SwTxtAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
return (m_pTxtNode) ? m_pTxtNode->GetTxtAttrForCharAt(nPosition) : 0;
}
-/*************************************************************************
- * SwAttrIter::SeekAndChg()
- *************************************************************************/
-
bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut )
{
bool bChg = nStartIndex && nNewPos == nPos ? pFnt->IsFntChg() : Seek( nNewPos );
@@ -131,8 +115,7 @@ bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut
}
if( bChg )
{
- // wenn der Aenderungszaehler auf Null ist, kennen wir die MagicNo
- // des gewuenschten Fonts ...
+ // if the change counter is zero, we know the MagicNo of the wanted font
if ( !nChgCnt && !nPropFont )
pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
@@ -151,10 +134,6 @@ bool SwAttrIter::IsSymbol( const sal_Int32 nNewPos )
return pFnt->IsSymbol( pShell );
}
-/*************************************************************************
- * SwAttrIter::SeekStartAndChg()
- *************************************************************************/
-
bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFont )
{
if ( pRedln && pRedln->ExtOn() )
@@ -179,12 +158,11 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
if ( pHints && !bParaFont )
{
SwTxtAttr *pTxtAttr;
- // Solange wir noch nicht am Ende des StartArrays angekommen sind &&
- // das TextAttribut an Position 0 beginnt ...
+ // While we've not reached the end of the StartArray && the TextAttribute starts at position 0...
while ( ( nStartIndex < pHints->GetStartCount() ) &&
!(*(pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()) )
{
- // oeffne die TextAttribute
+ // open the TextAttributes
Chg( pTxtAttr );
nStartIndex++;
}
@@ -199,8 +177,7 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
}
if( bChg )
{
- // wenn der Aenderungszaehler auf Null ist, kennen wir die MagicNo
- // des gewuenschten Fonts ...
+ // if the application counter is zero, we know the MagicNo of the wanted font
if ( !nChgCnt && !nPropFont )
pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
@@ -209,12 +186,7 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
return bChg;
}
-/*************************************************************************
- * SwAttrIter::SeekFwd()
- *************************************************************************/
-
-// AMA: Neuer AttrIter Nov 94
-
+// AMA: New AttrIter Nov 94
void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
{
SwTxtAttr *pTxtAttr;
@@ -234,7 +206,7 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
nEndIndex++;
}
}
- else // ueberlies die nicht geoeffneten Enden
+ else // skip the not opended ends
{
while ( (nEndIndex < pHints->GetEndCount()) &&
(*pHints->GetEnd(nEndIndex)->GetAnyEnd() <= nNewPos) )
@@ -248,17 +220,13 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
(*(pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()<=nNewPos))
{
- // oeffne die TextAttribute, deren Ende hinter der neuen Position liegt
+ // open the TextAttributes, whose ends lie behind the new position
if ( *pTxtAttr->GetAnyEnd() > nNewPos ) Chg( pTxtAttr );
nStartIndex++;
}
}
-/*************************************************************************
- * SwAttrIter::Seek()
- *************************************************************************/
-
bool SwAttrIter::Seek( const sal_Int32 nNewPos )
{
if ( pRedln && pRedln->ExtOn() )
@@ -280,7 +248,7 @@ bool SwAttrIter::Seek( const sal_Int32 nNewPos )
nStartIndex = nEndIndex = nPos = 0;
nChgCnt = 0;
- // Achtung!
+ // Attention!
// resetting the font here makes it necessary to apply any
// changes for extended input directly to the font
if ( pRedln && pRedln->ExtOn() )
@@ -304,10 +272,6 @@ bool SwAttrIter::Seek( const sal_Int32 nNewPos )
return pFnt->IsFntChg();
}
-/*************************************************************************
- * SwAttrIter::GetNextAttr()
- *************************************************************************/
-
sal_Int32 SwAttrIter::GetNextAttr( ) const
{
sal_Int32 nNext = COMPLETE_STRING;
@@ -336,7 +300,7 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
}
}
if (m_pTxtNode!=NULL) {
- //TODO maybe use hints like FieldHints for this instead of looking at the text...
+ // TODO maybe use hints like FieldHints for this instead of looking at the text...
const sal_Int32 l = nNext<m_pTxtNode->Len() ? nNext : m_pTxtNode->Len();
sal_Int32 p=nPos;
while (p<l && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FIELDSTART
@@ -440,13 +404,13 @@ bool SwTxtNode::IsSymbol( const sal_Int32 nBegin ) const
class SwMinMaxNodeArgs
{
public:
- sal_uLong nMaxWidth; // Summe aller Rahmenbreite
- long nMinWidth; // Breitester Rahmen
- long nLeftRest; // noch nicht von Rahmen ueberdeckter Platz im l. Rand
- long nRightRest; // noch nicht von Rahmen ueberdeckter Platz im r. Rand
- long nLeftDiff; // Min/Max-Differenz des Rahmens im linken Rand
- long nRightDiff; // Min/Max-Differenz des Rahmens im rechten Rand
- sal_uLong nIndx; // Indexnummer des Nodes
+ sal_uLong nMaxWidth; // sum of all frame widths
+ long nMinWidth; // biggest frame
+ long nLeftRest; // space not already covered by frames in the left margin
+ long nRightRest; // space not already covered by frames in the right margin
+ long nLeftDiff; // Min/Max-difference of the frame in the left margin
+ long nRightDiff; // Min/Max-difference of the frame in the right margin
+ sal_uLong nIndx; // index of the node
void Minimum( long nNew ) { if( nNew > nMinWidth ) nMinWidth = nNew; }
};
@@ -476,7 +440,7 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
MSHORT nWhich = pNd->Which();
if( RES_DRAWFRMFMT != nWhich )
{
- // Enthaelt der Rahmen zu Beginn oder am Ende eine Tabelle?
+ // Does the frame contain a table at the start or the end?
const SwNodes& rNodes = pNd->GetDoc()->GetNodes();
const SwFmtCntnt& rFlyCntnt = pNd->GetCntnt();
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
@@ -535,10 +499,9 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
return;
}
- // Rahmen, die recht bzw. links ausgerichtet sind, gehen nur
- // teilweise in die Max-Berechnung ein, da der Rand schon berueck-
- // sichtigt wird. Nur wenn die Rahmen in den Textkoerper ragen,
- // wird dieser Teil hinzuaddiert.
+ // Frames, which are left- or right-aligned are only party considered
+ // when calculating the maximum, since the border is already being considered.
+ // Only if the frame extends into the text body, this part is being added
switch( eHoriOri )
{
case text::HoriOrientation::RIGHT:
@@ -605,8 +568,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
const SvxLRSpaceItem &rSpace = GetSwAttrSet().GetLRSpace();
long nLROffset = rSpace.GetTxtLeft() + GetLeftMarginWithNum( true );
short nFLOffs;
- // Bei Numerierung ist ein neg. Erstzeileneinzug vermutlich
- // bereits gefuellt...
+ // For enumerations a negative first line indentation is probably filled already
if( !GetFirstLineOfsWithNum( nFLOffs ) || nFLOffs > nLROffset )
nLROffset = nFLOffs;
@@ -737,13 +699,13 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
&& rTmpSize.GetWidthPercent() )
{
/*-----------------------------------------------------------------------------
- * Hier ein HACK fuer folgende Situation: In dem Absatz befindet sich
- * ein Textrahmen mit relativer Groesse. Dann nehmen wir mal als minimale
- * Breite 0,5 cm und als maximale KSHRT_MAX.
- * Sauberer und vielleicht spaeter notwendig waere es, ueber den Inhalt
- * des Textrahmens zu iterieren und GetMinMaxSize rekursiv zu rufen.
+ * This is a hack for the wollowing situation: In the paragraph there's a
+ * text frame with relative size. Then let's take 0.5 cm as minimum width
+ * and KSHRT_MAX as maximum width
+ * It were cleaner and maybe neccessary later on to iterate over the content
+ * of the text frame and call GetMinMaxSize recursively
* --------------------------------------------------------------------------*/
- nAktWidth = FLYINCNT_MIN_WIDTH; // 0,5 cm
+ nAktWidth = FLYINCNT_MIN_WIDTH; // 0.5 cm
if( (long)rMax < KSHRT_MAX )
rMax = KSHRT_MAX;
}
@@ -832,7 +794,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
pOut = &pSh->GetRefDev();
else
{
- //Zugriff ueber StarONE, es muss keine Shell existieren oder aktiv sein.
+ // Access via StarONE, there's no need for an existing or active shell
if ( getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) )
pOut = GetpApp()->GetDefaultDevice();
else
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 3edc31f..7b18a8a 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -35,10 +35,6 @@ class SwRedlineItr;
class SwViewShell;
class SwTxtFrm;
-/*************************************************************************
- * class SwAttrIter
- *************************************************************************/
-
class SwAttrIter
{
friend class SwFontSave;
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index a962997..ab9a7d2 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -39,7 +39,6 @@
// #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
-
#include "flyfrms.hxx"
#include "viewsh.hxx"
#include "itrpaint.hxx"
@@ -75,9 +74,6 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
SVX_CASEMAP_KAPITAELCHEN == rFnt.GetCaseMap();
}
-/*************************************************************************
- * SwTxtPainter::CtorInitTxtPainter()
- *************************************************************************/
void SwTxtPainter::CtorInitTxtPainter( SwTxtFrm *pNewFrm, SwTxtPaintInfo *pNewInf )
{
CtorInitTxtCursor( pNewFrm, pNewInf );
@@ -95,10 +91,6 @@ void SwTxtPainter::CtorInitTxtPainter( SwTxtFrm *pNewFrm, SwTxtPaintInfo *pNewIn
bPaintDrop = false;
}
-
-/*************************************************************************
- * SwTxtPainter::CalcPaintOfst()
- *************************************************************************/
SwLinePortion *SwTxtPainter::CalcPaintOfst( const SwRect &rPaint )
{
SwLinePortion *pPor = pCurr->GetFirstPortion();
@@ -166,7 +158,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
GetInfo().ResetSpaceIdx();
GetInfo().SetKanaComp( pCurr->GetpKanaComp() );
GetInfo().ResetKanaIdx();
- // Die Groesse des Frames
+ // The size of the frame
GetInfo().SetIdx( GetStart() );
GetInfo().SetPos( GetTopLeft() );
@@ -177,18 +169,18 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
SwLinePortion *pPor = bEndPor ? pCurr->GetFirstPortion() : CalcPaintOfst( rPaint );
- // Optimierung!
+ // Optimization!
const SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
const SwTwips nTmpLeft = GetInfo().X();
if( !bEndPor && nTmpLeft >= nMaxRight )
return;
// DropCaps!
- // 7538: natuerlich auch auf dem Drucker
+ // 7538: of course for the printer, too
if( !bPaintDrop )
{
- // 8084: Optimierung, weniger Painten.
- // AMA: Durch 8084 wurde 7538 wiederbelebt!
+ // 8084: Optimization, less painting
+ // AMA: By 8084 7538 has been revived
// bDrawInWindow entfernt, damit DropCaps auch gedruckt werden
bPaintDrop = pPor == pCurr->GetFirstPortion()
&& GetDropLines() >= GetLineNr();
@@ -197,7 +189,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
KSHORT nTmpHeight, nTmpAscent;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
- // bClip entscheidet darueber, ob geclippt werden muss.
+ // bClip decides if there's a need to clip
// Das Ganze muss vor der Retusche stehen
bool bClip = ( bDrawInWindow || bUnderSz ) && !rClip.IsChg();
@@ -223,7 +215,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
#endif
}
- // Alignment:
+ // Alignment
OutputDevice* pOut = GetInfo().GetOut();
Point aPnt1( nTmpLeft, GetInfo().GetPos().Y() );
if ( aPnt1.X() < rPaint.Left() )
@@ -259,7 +251,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if ( ! bAdjustBaseLine )
GetInfo().Y( nLineBaseLine );
- // 7529: PostIts prepainten
+ // 7529: Pre-paint post-its
if( GetInfo().OnWin() && pPor && !pPor->Width() )
{
SeekAndChg( GetInfo() );
@@ -280,7 +272,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
pPor->PrePaint( GetInfo(), pPor );
}
- // 7923: EndPortions geben auch Zeichen aus, deswegen den Fnt wechseln!
+ // 7923: EndPortions output chars, too, that's why we change the font
if( bEndPor )
SeekStartAndChg( GetInfo() );
@@ -327,8 +319,8 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
SeekAndChg( GetInfo() );
else if ( !bFirst && pPor->IsBreakPortion() && GetInfo().GetOpt().IsParagraph() )
{
- // Paragraphzeichen sollten den gleichen Font wie das Zeichen vor
- // haben, es sei denn, es gibt Redlining in dem Absatz.
+ // Paragraph symbols should have the same fon as the paragraph in fron of them,
+ // except for the case that there's redlining in the paragraph
if( GetRedln() )
SeekAndChg( GetInfo() );
else
@@ -337,7 +329,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
else
bSeeked = false;
-// bRest = false;
+ // bRest = false;
// Wenn das Ende der Portion hinausragt, wird geclippt.
// Es wird ein Sicherheitsabstand von Height-Halbe aufaddiert,
@@ -349,13 +341,13 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
}
- // Portions, die "unter" dem Text liegen wie PostIts
+ // Portions, which lay "below" the text like post-its
SwLinePortion *pNext = pPor->GetPortion();
if( GetInfo().OnWin() && pNext && !pNext->Width() )
{
- // Fix 11289: Felder waren hier ausgeklammert wg. Last!=Owner beim
- // Laden von Brief.sdw. Jetzt sind die Felder wieder zugelassen,
- // durch bSeeked wird Last!=Owner vermieden.
+ // Fix 11289: Fields were omitted here because of Last!=Owner during
+ // loading Brief.sdw. Now the fields are allowed again,
+ // by bSeeked Last!=Owner is being avoided.
if ( !bSeeked )
SeekAndChg( GetInfo() );
pNext->PrePaint( GetInfo(), pPor );
@@ -461,7 +453,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( pArrow )
GetInfo().DrawRedArrow( *pArrow );
- // GetInfo().Y() must be current baseline.
+ // GetInfo().Y() must be current baseline
SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTxtFrm()->Frm().Bottom();
if( ( nDiff > 0 &&
( GetEnd() < GetInfo().GetTxt().getLength() ||
@@ -485,7 +477,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
long nAdjustBaseLine )
{
- // Check if common underline should not be continued.
+ // Check if common underline should not be continued
if ( IsUnderlineBreak( *pPor, *pFnt ) )
{
// delete underline font
@@ -496,7 +488,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// If current underline matches the common underline font, we continue
// to use the common underline font.
- //Bug 120769:Color of underline display wrongly
+ // Bug 120769:Color of underline display wrongly
if ( GetInfo().GetUnderFnt() &&
GetInfo().GetUnderFnt()->GetFont().GetUnderline() == GetFnt()->GetUnderline() &&
GetInfo().GetFont() && GetInfo().GetFont()->GetUnderColor() != Color(COL_AUTO) )
@@ -566,9 +558,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// check, if underlining is not isolated
if ( nIndx + GetInfo().GetLen() < nUnderEnd + 1 )
{
- //
// here starts the algorithm for calculating the underline font
- //
SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo();
SwAttrIter aIter( *(SwTxtNode*)GetInfo().GetTxtFrm()->GetTxtNode(),
rScriptInfo );
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index 2e972de..3d20a39 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -67,7 +67,4 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,
}
}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index e74a4fe..3251955 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -34,10 +34,6 @@ class SwDropPortion;
class SvStream;
class SwTxtFormatter;
-/*************************************************************************
- * class SwCharRange
- *************************************************************************/
-
class SwCharRange
{
sal_Int32 nStart, nLen;
@@ -61,10 +57,6 @@ public:
SwCharRange &operator+=(const SwCharRange &rRange);
};
-/*************************************************************************
- * class SwRepaint
- *************************************************************************/
-
// SwRepaint is a document-global SwRect
// nOfst states from where in the first line should be painted
// nRightOfst gives the right margin
@@ -84,13 +76,13 @@ public:
};
-/// Collection of SwLinePortion instances, representing one line of text.
+/// Collection of SwLinePortion instances, representing one line of text
class SwLineLayout : public SwTxtPortion
{
private:
SwLineLayout *pNext; // The next Line
- std::vector<long>* pLLSpaceAdd; // Used for justified alignment.
- std::deque<sal_uInt16>* pKanaComp; // Used for Kana compression.
+ std::vector<long>* pLLSpaceAdd; // Used for justified alignment
+ std::deque<sal_uInt16>* pKanaComp; // Used for Kana compression
KSHORT nRealHeight; // The height resulting from line spacing and register
bool bFormatAdj : 1;
bool bDummy : 1;
@@ -176,9 +168,7 @@ public:
// For special treatment for empty lines
virtual bool Format( SwTxtFormatInfo &rInf );
- //
- // STUFF FOR JUSTIFIED ALIGNMENT
- //
+ // Stuff for justified alignment
inline bool IsSpaceAdd() { return pLLSpaceAdd != NULL; }
void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary
void CreateSpaceAdd( const long nInit = 0 );
@@ -195,9 +185,7 @@ public:
inline void RemoveFirstLLSpaceAdd() { pLLSpaceAdd->erase( pLLSpaceAdd->begin() ); }
inline std::vector<long>* GetpLLSpaceAdd() const { return pLLSpaceAdd; }
- //
- // STUFF FOR KANA COMPRESSION
- //
+ // Stuff for Kana compression
inline void SetKanaComp( std::deque<sal_uInt16>* pNew ){ pKanaComp = pNew; }
inline void FinishKanaComp() { delete pKanaComp; pKanaComp = NULL; }
inline std::deque<sal_uInt16>* GetpKanaComp() const { return pKanaComp; }
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 8d313c2..310e7d7 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -42,12 +42,9 @@
using namespace ::com::sun::star;
-/*************************************************************************
- * SwAttrIter::CtorInitAttrIter()
- *************************************************************************/
void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, SwTxtFrm* pFrm )
{
- // Beim HTML-Import kann es vorkommen, dass kein Layout existiert.
+ // during HTML-Import it can happen, that no layout exists
SwRootFrm* pRootFrm = rTxtNode.getIDocumentLayoutAccess()->GetCurrentLayout();
pShell = pRootFrm ? pRootFrm->GetCurrShell() : 0;
@@ -155,20 +152,19 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
}
/*************************************************************************
- * SwRedlineItr - Der Redline-Iterator
+ * SwRedlineItr - The Redline-Iterator
*
- * Folgende Informationen/Zustaende gibt es im RedlineIterator:
+ * The foolowing information/states exist in RedlineIterator:
*
- * nFirst ist der erste Index der RedlineTbl, der mit dem Absatz ueberlappt.
+ * nFirst is the first index of RedlineTbl, which overlaps with the paragraph.
*
- * nAct ist der zur Zeit aktive ( wenn bOn gesetzt ist ) oder der naechste
- * in Frage kommende Index.
- * nStart und nEnd geben die Grenzen des Objekts innerhalb des Absatzes an.
+ * nAct is the currently active (if bOn is set) or the next possible index.
+ * nStart and nEnd give you the borders of the object within the paragraph.
*
- * Wenn bOn gesetzt ist, ist der Font entsprechend manipuliert worden.
+ * If bOn is set, the font has been manipulated according to it.
*
- * Wenn nAct auf COMPLETE_STRING gesetzt wurde ( durch Reset() ), so ist zur Zeit
- * kein Redline aktiv, nStart und nEnd sind invalid.
+ * If nAct is set to COMPLETE_STRING (via Reset()), then currently no
+ * Redline is active, nStart and nEnd are invalid.
*************************************************************************/
SwRedlineItr::SwRedlineItr( const SwTxtNode& rTxtNd, SwFont& rFnt,
@@ -193,15 +189,14 @@ SwRedlineItr::~SwRedlineItr()
delete pExt;
}
-// Der Return-Wert von SwRedlineItr::Seek gibt an, ob der aktuelle Font
-// veraendert wurde durch Verlassen (-1) oder Betreten eines Bereichs (+1)
-
+// The return value of SwRedlineItr::Seek tells you if the current font
+// has been manipulated by leaving (-1) or accessing (+1) of a section
short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
{
short nRet = 0;
if( ExtOn() )
- return 0; // Abkuerzung: wenn wir innerhalb eines ExtendTextInputs sind
- // kann es keine anderen Attributwechsel (auch nicht durch Redlining) geben
+ return 0; // Abbreviation: if we're within an ExtendTextInputs
+ // there can't be other changes of attributes (not even by redlining)
if( bShow )
{
if( bOn )
@@ -209,20 +204,20 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
if( nNew >= nEnd )
{
--nRet;
- _Clear( &rFnt ); // Wir gehen hinter den aktuellen Bereich
- ++nAct; // und pruefen gleich den naechsten
+ _Clear( &rFnt ); // We go behind the current section
+ ++nAct; // and check the next one
}
else if( nNew < nStart )
{
--nRet;
- _Clear( &rFnt ); // Wir gehen vor den aktuellen Bereich
+ _Clear( &rFnt ); // We go in front of the current section
if( nAct > nFirst )
- nAct = nFirst; // Die Pruefung muss von vorne beginnen
+ nAct = nFirst; // the test has to run from the beginning
else
- return nRet + EnterExtend( rFnt, nNew ); // Es gibt keinen vor uns.
+ return nRet + EnterExtend( rFnt, nNew ); // There's none prior to us
}
else
- return nRet + EnterExtend( rFnt, nNew ); // Wir sind im gleichen Bereich geblieben.
+ return nRet + EnterExtend( rFnt, nNew ); // We stayed in the same section
}
if( COMPLETE_STRING == nAct || nOld > nNew )
nAct = nFirst;
@@ -365,9 +360,9 @@ sal_Int32 SwRedlineItr::_GetNextRedln( sal_Int32 nNext )
bool SwRedlineItr::_ChkSpecialUnderline() const
{
- // Wenn die Unterstreichung oder das Escapement vom Redling kommt,
- // wenden wir immer das SpecialUnderlining, d.h. die Unterstreichung
- // unter der Grundlinie an.
+ // If the underlining or the escapement is caused by redlining,
+ // we always apply the SpecialUnderlining, i.e. the underlining
+ // below the base line
for (size_t i = 0; i < m_Hints.size(); ++i)
{
MSHORT nWhich = m_Hints[i]->Which();
@@ -382,7 +377,7 @@ bool SwRedlineItr::CheckLine( sal_Int32 nChkStart, sal_Int32 nChkEnd )
{
if( nFirst == COMPLETE_STRING )
return false;
- if( nChkEnd == nChkStart ) // Leerzeilen gucken ein Zeichen weiter.
+ if( nChkEnd == nChkStart ) // empty lines look one char further
++nChkEnd;
sal_Int32 nOldStart = nStart;
sal_Int32 nOldEnd = nEnd;
@@ -451,9 +446,9 @@ bool SwExtend::_Leave(SwFont& rFnt, sal_Int32 nNew)
MSHORT nOldAttr = rArr[ nPos - nStart ];
nPos = nNew;
if( Inside() )
- { // Wir sind innerhalb des ExtendText-Bereichs geblieben
+ { // We stayed within the ExtendText-section
MSHORT nAttr = rArr[ nPos - nStart ];
- if( nOldAttr != nAttr ) // Gibt es einen (inneren) Attributwechsel?
+ if( nOldAttr != nAttr ) // Is there an (inner) change of attributes?
{
rFnt = *pFnt;
ActualizeFont( rFnt, nAttr );
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index e60d9c8..8be7e90 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -66,10 +66,6 @@ static bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
return false;
}
-/*************************************************************************
- * class SwDropSave
- *************************************************************************/
-
class SwDropSave
{
SwTxtPaintInfo* pInf;
@@ -97,20 +93,14 @@ SwDropSave::~SwDropSave()
pInf->Y( nY );
}
-/*************************************************************************
- * SwDropPortionPart DTor
- *************************************************************************/
-
+// SwDropPortionPart DTor
SwDropPortionPart::~SwDropPortionPart()
{
delete pFollow;
delete pFnt;
}
-/*************************************************************************
- * SwDropPortion CTor, DTor
- *************************************************************************/
-
+// SwDropPortion CTor, DTor
SwDropPortion::SwDropPortion( const MSHORT nLineCnt,
const KSHORT nDrpHeight,
const KSHORT nDrpDescent,
@@ -133,12 +123,7 @@ SwDropPortion::~SwDropPortion()
pBlink->Delete( this );
}
-/*************************************************************************
- * SwTxtNode::GetDropLen()
- *
- * nWishLen = 0 indicates that we want a whole word
- *************************************************************************/
-
+// nWishLen = 0 indicates that we want a whole word
MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
{
sal_Int32 nEnd = GetTxt().getLength();
@@ -260,12 +245,8 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
return true;
}
-/*************************************************************************
- * SwDropPortion::PaintTxt()
- *************************************************************************/
-
-// Die Breite manipulieren, sonst werden die Buchstaben gestretcht
+// Manipulate the width, otherwise the chars are being stretched
void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
{
OSL_ENSURE( nDropHeight && pPart && nLines != 1, "Drop Portion painted twice" );
@@ -314,17 +295,13 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
const_cast<SwDropPortion*>(this)->SetJoinBorderWithPrev(false);
}
-/*************************************************************************
- * SwDropPortion::Paint()
- *************************************************************************/
-
void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
{
- // ganz normale Ausgabe wird w?hrend des normalen Paints erledigt
+ // normal output is being done during the normal painting
if( ! nDropHeight || ! pPart || nLines == 1 )
return;
- // Luegenwerte einstellen!
+ // set the lying values
const KSHORT nOldHeight = Height();
const KSHORT nOldWidth = Width();
const KSHORT nOldAscent = GetAscent();
@@ -333,7 +310,7 @@ void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
const SwParaPortion *pPara = rInf.GetParaPortion();
const Point aOutPos( nOldPosX + nX, nOldPosY - pPara->GetAscent()
- pPara->GetRealHeight() + pPara->Height() );
- // Retusche nachholen.
+ // make good for retouching
// Set baseline
((SwTxtPaintInfo&)rInf).Y( aOutPos.Y() + nDropHeight );
@@ -343,7 +320,7 @@ void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
((SwDropPortion*)this)->Width( Width() - nX );
((SwDropPortion*)this)->SetAscent( nDropHeight );
- // Clipregion auf uns einstellen!
+ // adapt Clipregion to us
// Und zwar immer, und nie mit dem bestehenden ClipRect
// verrechnen, weil dies auf die Zeile eingestellt sein koennte.
@@ -358,20 +335,16 @@ void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
// Das machen, was man sonst nur macht ...
PaintTxt( rInf );
- // Alte Werte sichern
+ // save old values
((SwDropPortion*)this)->Height( nOldHeight );
((SwDropPortion*)this)->Width( nOldWidth );
((SwDropPortion*)this)->SetAscent( nOldAscent );
((SwTxtPaintInfo&)rInf).Y( nOldPosY );
}
-/*************************************************************************
- * virtual SwDropPortion::Paint()
- *************************************************************************/
-
void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
- // ganz normale Ausgabe wird hier erledigt.
+ // normal output is being done here
if( ! nDropHeight || ! pPart || 1 == nLines )
{
if ( rInf.OnWin() &&
@@ -396,11 +369,6 @@ void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * virtual Format()
- *************************************************************************/
-
-
bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
{
const sal_Int32 nOldLen = GetLen();
@@ -408,7 +376,7 @@ bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
if (!SwTxtPortion::Format( rInf ))
return false;
- // sieht zwar Scheisse aus, aber was soll man schon machen?
+ // looks like shit, but what can we do?
rInf.SetUnderFlow( 0 );
Truncate();
SetLen( nOldLen );
@@ -416,11 +384,6 @@ bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
return true;
}
-/*************************************************************************
- * virtual GetTxtSize()
- *************************************************************************/
-
-
SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
{
sal_uInt16 nMyX = 0;
@@ -464,19 +427,11 @@ SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return aPosSize;
}
-/*************************************************************************
- * virtual GetCrsrOfst()
- *************************************************************************/
-
sal_Int32 SwDropPortion::GetCrsrOfst( const KSHORT ) const
{
return 0;
}
-/*************************************************************************
- * SwTxtFormatter::CalcDropHeight()
- *************************************************************************/
-
void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
{
const SwLinePortion *const pOldCurr = GetCurr();
@@ -495,7 +450,7 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
break;
}
- // Wenn wir nur eine Zeile haben returnen wir 0
+ // If we have only one line we return 0
if( GetNext() || GetDropLines() == 1 )
{
for( ; nDropLns < nLines; nDropLns++ )
@@ -538,13 +493,10 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
/*************************************************************************
* SwTxtFormatter::GuessDropHeight()
*
- * Wir schaetzen mal, dass die Fonthoehe sich nicht aendert und dass
- * erst mindestens soviele Zeilen gibt, wie die DropCap-Einstellung angibt.
+ * We assume hat the font height doesn't change and that at first there
+ * are at least as many lines, as the DropCap-setting claims
*
*************************************************************************/
-
-
-
void SwTxtFormatter::GuessDropHeight( const MSHORT nLines )
{
OSL_ENSURE( nLines, "GuessDropHeight: Give me more Lines!" );
@@ -560,10 +512,6 @@ void SwTxtFormatter::GuessDropHeight( const MSHORT nLines )
SetDropHeight( nHeight * nLines - GetDropDescent() );
}
-/*************************************************************************
- * SwTxtFormatter::NewDropPortion
- *************************************************************************/
-
SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
{
if( !pDropFmt )
@@ -579,7 +527,7 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
SwDropPortion *pDropPor = 0;
- // erste oder zweite Runde?
+ // first or second round?
if ( !( GetDropHeight() || IsOnceMore() ) )
{
if ( GetNext() )
@@ -653,12 +601,6 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
return pDropPor;
}
-/*************************************************************************
- * SwTxtPainter::PaintDropPortion()
- *************************************************************************/
-
-
-
void SwTxtPainter::PaintDropPortion()
{
const SwDropPortion *pDrop = GetInfo().GetParaPortion()->FindDropPortion();
@@ -675,7 +617,7 @@ void SwTxtPainter::PaintDropPortion()
GetInfo().SetKanaComp( pCurr->GetpKanaComp() );
GetInfo().ResetKanaIdx();
- // 8047: Drops und Dummies
+ // 8047: Drops and Dummies
while( !pCurr->GetLen() && Next() )
;
@@ -703,10 +645,10 @@ void SwTxtPainter::PaintDropPortion()
}
/*************************************************************************
- * clas SwDropCapCache
+ * class SwDropCapCache
*
- * Da die Berechnung der Fontgroesse der Initialen ein teures Geschaeft ist,
- * wird dies durch einen DropCapCache geschleust.
+ * Since the calculation of the font size is expensive, this is being
+ * channeled through a DropCapCache
*************************************************************************/
#define DROP_CACHE_SIZE 10
@@ -725,10 +667,7 @@ public:
void CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf );
};
-/*************************************************************************
- * SwDropCapCache Ctor / Dtor
- *************************************************************************/
-
+// SwDropCapCache Ctor / Dtor
SwDropCapCache::SwDropCapCache() : nIndex( 0 )
{
memset( &aMagicNo, 0, sizeof(aMagicNo) );
@@ -740,10 +679,6 @@ void SwDropPortion::DeleteDropCapCache()
delete pDropCapCache;
}
-/*************************************************************************
- * SwDropCapCache::CalcFontSize
- *************************************************************************/
-
void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
{
const void* pFntNo = 0;
@@ -857,7 +792,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
nAscent = rFnt.GetAscent( rInf.GetVsh(), *pOut );
- // Wir besorgen uns das alle Buchstaben umfassende Rechteck:
+ // we get the rectangle that covers all chars
bHaveGlyphRect = pOut->GetTextBoundRect( aRect, rInf.GetTxt(), 0,
nIdx, pCurrPart->GetLen() ) &&
! aRect.IsEmpty();
@@ -1016,10 +951,6 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
pDrop->SetY( (short)nDescent );
}
-/*************************************************************************
- * virtual Format()
- *************************************************************************/
-
bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
{
bool bFull = false;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index ce9fd33..08857df 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -83,7 +83,7 @@ void SwTxtFrm::SwapWidthAndHeight()
{
const long nPrtOfstX = Prt().Pos().X();
Prt().Pos().X() = Prt().Pos().Y();
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( IsVertLR() )
Prt().Pos().Y() = nPrtOfstX;
else
@@ -94,7 +94,7 @@ void SwTxtFrm::SwapWidthAndHeight()
{
const long nPrtOfstY = Prt().Pos().Y();
Prt().Pos().Y() = Prt().Pos().X();
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( IsVertLR() )
Prt().Pos().X() = nPrtOfstY;
else
@@ -116,7 +116,7 @@ void SwTxtFrm::SwapWidthAndHeight()
void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
{
// calc offset inside frame
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
long nOfstX, nOfstY;
if ( IsVertLR() )
{
@@ -132,7 +132,7 @@ void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
const long nWidth = rRect.Width();
const long nHeight = rRect.Height();
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( IsVertLR() )
rRect.Left(Frm().Left() + nOfstY);
else
@@ -156,7 +156,7 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const
// calc offset inside frame
const long nOfstX = rPoint.X() - Frm().Left();
const long nOfstY = rPoint.Y() - Frm().Top();
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( IsVertLR() )
rPoint.X() = Frm().Left() + nOfstY;
else
@@ -188,7 +188,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
// calc offset inside frame
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( IsVertLR() )
nOfstX = rRect.Left() - Frm().Left();
else
@@ -218,7 +218,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
// calc offset inside frame
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( IsVertLR() )
nOfstX = rPoint.X() - Frm().Left();
else
@@ -329,10 +329,6 @@ SwDigitModeModifier::~SwDigitModeModifier()
((OutputDevice&)rOut).SetDigitLanguage( nOldLanguageType );
}
-/*************************************************************************
- * SwTxtFrm::Init()
- *************************************************************************/
-
void SwTxtFrm::Init()
{
OSL_ENSURE( !IsLocked(), "+SwTxtFrm::Init: this is locked." );
@@ -347,9 +343,6 @@ void SwTxtFrm::Init()
}
}
-/*************************************************************************
- * SwTxtFrm::SwTxtFrm()
- *************************************************************************/
SwTxtFrm::SwTxtFrm(SwTxtNode * const pNode, SwFrm* pSib )
: SwCntntFrm( pNode, pSib )
, nAllLines( 0 )
@@ -378,9 +371,6 @@ SwTxtFrm::SwTxtFrm(SwTxtNode * const pNode, SwFrm* pSib )
mnType = FRMC_TXT;
}
-/*************************************************************************
- * SwTxtFrm::~SwTxtFrm()
- *************************************************************************/
SwTxtFrm::~SwTxtFrm()
{
// Remove associated SwParaPortion from pTxtCache
@@ -402,9 +392,6 @@ void SwTxtFrm::ResetPreps()
}
}
-/*************************************************************************
- * SwTxtFrm::IsHiddenNow()
- *************************************************************************/
bool SwTxtFrm::IsHiddenNow() const
{
SwFrmSwapper aSwapper( this, true );
@@ -436,12 +423,7 @@ bool SwTxtFrm::IsHiddenNow() const
return false;
}
-
-/*************************************************************************
- * SwTxtFrm::HideHidden()
- *************************************************************************/
// removes Textfrm's attachments, when it's hidden
-
void SwTxtFrm::HideHidden()
{
OSL_ENSURE( !GetFollow() && IsHiddenNow(),
@@ -456,9 +438,6 @@ void SwTxtFrm::HideHidden()
ClearPara();
}
-/*************************************************************************
- * SwTxtFrm::HideFootnotes()
- *************************************************************************/
void SwTxtFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
{
const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
@@ -542,9 +521,7 @@ bool sw_HideObj( const SwTxtFrm& _rFrm,
return bRet;
}
-/*************************************************************************
- * SwTxtFrm::HideAndShowObjects()
- *************************************************************************/
+
/** method to hide/show objects
OD 2004-01-15 #110582#
@@ -655,10 +632,10 @@ sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt,
nFound++;
}
- // Eine knifflige Sache mit den TxtAttr-Dummy-Zeichen (hier "$"):
- // "Dr.$Meyer" am Anfang der zweiten Zeile. Dahinter ein Blank eingegeben
- // und das Wort rutscht nicht in die erste Zeile, obwohl es ginge.
- // Aus diesem Grund nehmen wir das Dummy-Zeichen noch mit.
+ // A tricky situation with the TxtAttr-Dummy-character (in this case "$"):
+ // "Dr.$Meyer" at the beginning of the second line. Typing a blank after that
+ // doesn't result in the word moving into first line, even though that would work.
+ // For this reason we don't skip the dummy char.
while( nFound <= nEndLine && ' ' != rTxt[nFound] )
{
nFound++;
@@ -667,10 +644,6 @@ sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt,
return nFound;
}
-/*************************************************************************
- * SwTxtFrm::IsIdxInside()
- *************************************************************************/
-
bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
{
if( nLen != COMPLETE_STRING && GetOfst() > nPos + nLen ) // the range preceded us
@@ -690,19 +663,12 @@ bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
return pPara && ( nPos <= nMax + pPara->GetLen() );
}
-/*************************************************************************
- * SwTxtFrm::InvalidateRange()
- *************************************************************************/
inline void SwTxtFrm::InvalidateRange(const SwCharRange &aRange, const long nD)
{
if ( IsIdxInside( aRange.Start(), aRange.Len() ) )
_InvalidateRange( aRange, nD );
}
-/*************************************************************************
- * SwTxtFrm::_InvalidateRange()
- *************************************************************************/
-
void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
{
if ( !HasPara() )
@@ -716,10 +682,10 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
bool bInv = false;
if( 0 != nD )
{
- //Auf nDelta werden die Differenzen zwischen alter und
- //neuer Zeilenlaenge aufaddiert, deshalb ist es negativ,
- //wenn Zeichen eingefuegt wurden, positiv, wenn Zeichen
- //geloescht wurden.
+ // In nDelta the differences betwen old and new
+ // linelengths are being added, that's why it's negative
+ // if chars have been added and positive, if chars have
+ // deleted
*(pPara->GetDelta()) += nD;
bInv = true;
}
@@ -737,10 +703,6 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
}
}
-/*************************************************************************
- * SwTxtFrm::CalcLineSpace()
- *************************************************************************/
-
void SwTxtFrm::CalcLineSpace()
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
@@ -892,17 +854,13 @@ static void lcl_ModifyOfst( SwTxtFrm* pFrm, sal_Int32 nPos, sal_Int32 nLen )
}
}
-//Related: fdo#56031 filter out attribute changes that don't matter for
-//humans/a11y to stop flooding the destination mortal with useless noise
+// Related: fdo#56031 filter out attribute changes that don't matter for
+// humans/a11y to stop flooding the destination mortal with useless noise
static bool isA11yRelevantAttribute(MSHORT nWhich)
{
return nWhich != RES_CHRATR_RSID;
}
-/*************************************************************************
- * SwTxtFrm::Modify()
- *************************************************************************/
-
void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const MSHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
@@ -1363,10 +1321,6 @@ bool SwTxtFrm::GetInfo( SfxPoolItem &rHnt ) const
return true;
}
-/*************************************************************************
- * SwTxtFrm::PrepWidows()
- *************************************************************************/
-
void SwTxtFrm::PrepWidows( const MSHORT nNeed, bool bNotify )
{
OSL_ENSURE(GetFollow() && nNeed, "+SwTxtFrm::Prepare: lost all friends");
@@ -1421,10 +1375,6 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, bool bNotify )
UNDO_SWAP( this )
}
-/*************************************************************************
- * SwTxtFrm::Prepare
- *************************************************************************/
-
static bool lcl_ErgoVadis( SwTxtFrm* pFrm, sal_Int32 &rPos, const PrepareHint ePrep )
{
const SwFtnInfo &rFtnInfo = pFrm->GetNode()->GetDoc()->GetFtnInfo();
@@ -1899,11 +1849,6 @@ sal_Bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, sal_Bool
return SwTxtFrm::WouldFit( rMaxHeight, bSplit, sal_True );
}
-
-/*************************************************************************
- * SwTxtFrm::WouldFit()
- *************************************************************************/
-
/* SwTxtFrm::WouldFit()
* sal_True: wenn ich aufspalten kann.
* Es soll und braucht nicht neu formatiert werden.
@@ -2016,11 +1961,6 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs
return bRet;
}
-
-/*************************************************************************
- * SwTxtFrm::GetParHeight()
- *************************************************************************/
-
KSHORT SwTxtFrm::GetParHeight() const
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
@@ -2055,19 +1995,14 @@ KSHORT SwTxtFrm::GetParHeight() const
return nHeight;
}
-
-/*************************************************************************
- * SwTxtFrm::GetFormatted()
- *************************************************************************/
-
// returns this _always_ in the formated state!
SwTxtFrm* SwTxtFrm::GetFormatted( bool bForceQuickFormat )
{
SWAP_IF_SWAPPED( this )
- //Kann gut sein, dass mir der IdleCollector mir die gecachten
- //Informationen entzogen hat. Calc() ruft unser Format.
- //Nicht bei leeren Absaetzen!
+ // Kann gut sein, dass mir der IdleCollector mir die gecachten
+ // Informationen entzogen hat. Calc() ruft unser Format.
+ // Nicht bei leeren Absaetzen!
if( !HasPara() && !(IsValid() && IsEmpty()) )
{
// Calc() must be called, because frame position can be wrong
@@ -2086,10 +2021,6 @@ SwTxtFrm* SwTxtFrm::GetFormatted( bool bForceQuickFormat )
return this;
}
-/*************************************************************************
- * SwTxtFrm::CalcFitToContent()
- *************************************************************************/
-
SwTwips SwTxtFrm::CalcFitToContent()
{
// #i31490#
@@ -2357,9 +2288,6 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
}
}
-/*************************************************************************
- * SwTxtFrm::GetLineSpace()
- *************************************************************************/
// OD 07.01.2004 #i11859# - change return data type
// add default parameter <_bNoPropLineSpacing> to control, if the
// value of a proportional line spacing is returned or not
@@ -2411,10 +2339,6 @@ long SwTxtFrm::GetLineSpace( const bool _bNoPropLineSpace ) const
return nRet;
}
-/*************************************************************************
- * SwTxtFrm::FirstLineHeight()
- *************************************************************************/
-
KSHORT SwTxtFrm::FirstLineHeight() const
{
if ( !HasPara() )
@@ -2453,8 +2377,7 @@ MSHORT SwTxtFrm::GetLineCount( sal_Int32 nPos )
void SwTxtFrm::ChgThisLines()
{
- //not necessary to format here (GerFormatted etc.), because we have to come from there!
-
+ // not necessary to format here (GerFormatted etc.), because we have to come from there!
sal_uLong nNew = 0;
const SwLineNumberInfo &rInf = GetNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo();
if ( !GetTxt().isEmpty() && HasPara() )
@@ -2494,7 +2417,7 @@ void SwTxtFrm::ChgThisLines()
if( pNxt )
pNxt->InvalidateLineNum();
- //Extend repaint to the bottom.
+ // Extend repaint to the bottom.
if ( HasPara() )
{
SwRepaint *pRepaint = GetPara()->GetRepaint();
@@ -2502,7 +2425,7 @@ void SwTxtFrm::ChgThisLines()
Frm().Top()+Prt().Bottom()));
}
}
- else //Paragraphs which are not counted should not manipulate the AllLines.
+ else // Paragraphs which are not counted should not manipulate the AllLines.
nThisLines = nNew;
}
}
@@ -2523,8 +2446,8 @@ void SwTxtFrm::RecalcAllLines()
if ( !IsFollow() && rLineNum.GetStartValue() && rLineNum.IsCount() )
nNewNum = rLineNum.GetStartValue() - 1;
- //If it is a follow or not has not be considered if it is a restart at each page; the
- //restart should also take affekt at follows.
+ // If it is a follow or not has not be considered if it is a restart at each page; the
+ // restart should also take affekt at follows.
else if ( bRestart && FindPageFrm()->FindFirstBodyCntnt() == this )
{
nNewNum = 0;
@@ -2591,22 +2514,13 @@ void SwTxtFrm::VisitPortions( SwPortionHandler& rPH ) const
rPH.Finish();
}
-
-/*************************************************************************
- * SwTxtFrm::GetScriptInfo()
- *************************************************************************/
-
const SwScriptInfo* SwTxtFrm::GetScriptInfo() const
{
const SwParaPortion* pPara = GetPara();
return pPara ? &pPara->GetScriptInfo() : 0;
}
-/*************************************************************************
- * lcl_CalcFlyBasePos()
- * Helper function for SwTxtFrm::CalcBasePosForFly()
- *************************************************************************/
-
+// Helper function for SwTxtFrm::CalcBasePosForFly()
static SwTwips lcl_CalcFlyBasePos( const SwTxtFrm& rFrm, SwRect aFlyRect,
SwTxtFly& rTxtFly )
{
@@ -2653,10 +2567,6 @@ static SwTwips lcl_CalcFlyBasePos( const SwTxtFrm& rFrm, SwRect aFlyRect,
return nRet;
}
-/*************************************************************************
- * SwTxtFrm::CalcBasePosForFly()
- *************************************************************************/
-
void SwTxtFrm::CalcBaseOfstForFly()
{
OSL_ENSURE( !IsVertical() || !IsSwapped(),
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index fe9149a..41dfb0e 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -55,10 +55,6 @@
using namespace ::com::sun::star;
-/*************************************************************************
- * _IsFtnNumFrm()
- *************************************************************************/
-
bool SwTxtFrm::_IsFtnNumFrm() const
{
const SwFtnFrm* pFtn = FindFtnFrm()->GetMaster();
@@ -67,12 +63,7 @@ bool SwTxtFrm::_IsFtnNumFrm() const
return !pFtn;
}
-/*************************************************************************
- * FindFtn()
- *************************************************************************/
-
// Sucht innerhalb einer Master-Follow-Kette den richtigen TxtFrm zum SwTxtFtn
-
SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
{
SwTxtFrm *pFrm = this;
@@ -87,12 +78,8 @@ SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
return pFrm;
}
-/*************************************************************************
- * CalcFtnFlag()
- *************************************************************************/
-
#ifdef DBG_UTIL
-void SwTxtFrm::CalcFtnFlag( sal_Int32 nStop )//For testing the SplitFrm
+void SwTxtFrm::CalcFtnFlag( sal_Int32 nStop )// For testing the SplitFrm
#else
void SwTxtFrm::CalcFtnFlag()
#endif
@@ -129,10 +116,6 @@ void SwTxtFrm::CalcFtnFlag()
}
}
-/*************************************************************************
- * CalcPrepFtnAdjust()
- *************************************************************************/
-
bool SwTxtFrm::CalcPrepFtnAdjust()
{
OSL_ENSURE( HasFtn(), "Wer ruft mich da?" );
@@ -190,12 +173,9 @@ static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
SwTwips nAdd;
SwTwips nRet = nLower;
- //
// Check if text is inside a table.
- //
if ( pFrm->IsInTab() )
{
- //
// If pFrm is inside a table, we have to check if
// a) The table is not allowed to split or
// b) The table row is not allowed to split
@@ -204,7 +184,6 @@ static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
// see SwFrm::FindFtnBossFrm. So we don't have to check
// the case that pFrm is inside a (footnote collecting) section
// within the table.
- //
const SwFrm* pRow = pFrm;
while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() )
pRow = pRow->GetUpper();
@@ -275,11 +254,6 @@ static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
return nRet;
}
-
-/*************************************************************************
- * SwTxtFrm::GetFtnLine()
- *************************************************************************/
-
SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
@@ -315,14 +289,9 @@ SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
return nRet;
}
-/*************************************************************************
- * SwTxtFrm::GetFtnRstHeight()
- *************************************************************************/
-
// Ermittelt die max. erreichbare Hoehe des TxtFrm im Ftn-Bereich.
// Sie wird eingeschraenkt durch den unteren Rand der Zeile mit
// der Ftn-Referenz.
-
SwTwips SwTxtFrm::_GetFtnFrmHeight() const
{
OSL_ENSURE( !IsFollow() && IsInFtn(), "SwTxtFrm::SetFtnLine: moon walk" );
@@ -396,10 +365,6 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
return nHeight;
}
-/*************************************************************************
- * SwTxtFrm::FindQuoVadisFrm()
- *************************************************************************/
-
SwTxtFrm *SwTxtFrm::FindQuoVadisFrm()
{
// Erstmal feststellen, ob wir in einem FtnFrm stehen:
@@ -423,10 +388,6 @@ SwTxtFrm *SwTxtFrm::FindQuoVadisFrm()
return (SwTxtFrm*)pLast;
}
-/*************************************************************************
- * SwTxtFrm::RemoveFtn()
- *************************************************************************/
-
void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
{
if ( !IsFtnAllowed() )
@@ -600,9 +561,6 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
GetFollow()->ManipOfst( nOldOfst );
}
-/*************************************************************************
- * SwTxtFormatter::ConnectFtn()
- *************************************************************************/
// false, wenn irgendetwas schief gegangen ist.
// Es gibt eigentlich nur zwei Moeglichkeiten:
// a) Die Ftn ist bereits vorhanden
@@ -614,7 +572,6 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
// Optimierungen bei Endnoten.
// Noch ein Problem: wenn die Deadline im Ftn-Bereich liegt, muss die
// Ftn verschoben werden.
-
void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
{
OSL_ENSURE( !IsVertical() || !IsSwapped(),
@@ -624,10 +581,8 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
bInFtnConnect = true; //Bloss zuruecksetzen!
const bool bEnd = pFtn->GetFtn().IsEndNote();
- //
// We want to store this value, because it is needed as a fallback
// in GetFtnLine(), if there is no paragraph information available
- //
mnFtnLine = nDeadLine;
// Wir brauchen immer einen Boss (Spalte/Seite)
@@ -826,12 +781,6 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
return;
}
-
-
-/*************************************************************************
- * SwTxtFormatter::NewFtnPortion()
- *************************************************************************/
-
// Die Portion fuer die Ftn-Referenz im Text
SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
SwTxtAttr *pHint )
@@ -975,12 +924,7 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
return pRet;
}
-/*************************************************************************
- * SwTxtFormatter::NewFtnNumPortion()
- *************************************************************************/
-
// Die Portion fuer die Ftn-Nummerierung im Ftn-Bereich
-
SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
{
OSL_ENSURE( pFrm->IsInFtn() && !pFrm->GetIndPrev() && !rInf.IsFtnDone(),
@@ -1035,7 +979,6 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
/*************************************************************************
* SwTxtFormatter::NewErgoSumPortion()
*************************************************************************/
-
OUString lcl_GetPageNumber( const SwPageFrm* pPage )
{
OSL_ENSURE( pPage, "GetPageNumber: Homeless TxtFrm" );
@@ -1073,10 +1016,6 @@ SwErgoSumPortion *SwTxtFormatter::NewErgoSumPortion( SwTxtFormatInfo &rInf ) con
return pErgo;
}
-/*************************************************************************
- * SwTxtFormatter::FormatQuoVadis()
- *************************************************************************/
-
sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
{
OSL_ENSURE( ! pFrm->IsVertical() || ! pFrm->IsSwapped(),
@@ -1270,17 +1209,11 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
return nRet;
}
-
-/*************************************************************************
- * SwTxtFormatter::MakeDummyLine()
- *************************************************************************/
-
// MakeDummyLine() erzeugt eine Line, die bis zum unteren Seitenrand
// reicht. DummyLines bzw. DummyPortions sorgen dafuer, dass Oszillationen
// zum stehen kommen, weil Rueckflussmoeglichkeiten genommen werden.
// Sie werden bei absatzgebundenen Frames in Fussnoten und bei Ftn-
// Oszillationen verwendet.
-
void SwTxtFormatter::MakeDummyLine()
{
KSHORT nRstHeight = GetFrmRstHeight();
@@ -1295,9 +1228,6 @@ void SwTxtFormatter::MakeDummyLine()
}
}
-/*************************************************************************
- * class SwFtnSave
- *************************************************************************/
class SwFtnSave
{
SwTxtSizeInfo *pInf;
@@ -1311,10 +1241,6 @@ public:
~SwFtnSave();
};
-/*************************************************************************
- * SwFtnSave::SwFtnSave()
- *************************************************************************/
-
SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
const SwTxtFtn* pTxtFtn,
const bool bApplyGivenScriptType,
@@ -1378,10 +1304,6 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
pFnt = NULL;
}
-/*************************************************************************
- * SwFtnSave::~SwFtnSave()
- *************************************************************************/
-
SwFtnSave::~SwFtnSave()
{
if( pFnt )
@@ -1394,10 +1316,6 @@ SwFtnSave::~SwFtnSave()
}
}
-/*************************************************************************
- * SwFtnPortion::SwFtnPortion()
- *************************************************************************/
-
SwFtnPortion::SwFtnPortion( const OUString &rExpand,
SwTxtFtn *pFootn, KSHORT nReal )
: SwFldPortion( rExpand, 0 )
@@ -1411,20 +1329,12 @@ SwFtnPortion::SwFtnPortion( const OUString &rExpand,
SetWhichPor( POR_FTN );
}
-/*************************************************************************
- * SwFtnPortion::GetExpTxt()
- *************************************************************************/
-
bool SwFtnPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
{
rTxt = aExpand;
return true;
}
-/*************************************************************************
- * virtual SwFtnPortion::Format()
- *************************************************************************/
-
bool SwFtnPortion::Format( SwTxtFormatInfo &rInf )
{
// #i98418#
@@ -1444,10 +1354,6 @@ bool SwFtnPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-/*************************************************************************
- * virtual SwFtnPortion::Paint()
- *************************************************************************/
-
void SwFtnPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
// #i98418#
@@ -1457,10 +1363,6 @@ void SwFtnPortion::Paint( const SwTxtPaintInfo &rInf ) const
SwExpandPortion::Paint( rInf );
}
-/*************************************************************************
- * virtual SwFtnPortion::GetTxtSize()
- *************************************************************************/
-
SwPosSize SwFtnPortion::GetTxtSize( const SwTxtSizeInfo &rInfo ) const
{
// #i98418#
@@ -1476,10 +1378,6 @@ void SwFtnPortion::SetPreferredScriptType( sal_uInt8 nPreferredScriptType )
mnPreferredScriptType = nPreferredScriptType;
}
-/*************************************************************************
- * class SwQuoVadisPortion
- *************************************************************************/
-
SwFldPortion *SwQuoVadisPortion::Clone( const OUString &rExpand ) const
{
return new SwQuoVadisPortion( rExpand, aErgo );
@@ -1492,10 +1390,6 @@ SwQuoVadisPortion::SwQuoVadisPortion( const OUString &rExp, const OUString& rStr
SetWhichPor( POR_QUOVADIS );
}
-/*************************************************************************
- * virtual SwQuoVadisPortion::Format()
- *************************************************************************/
-
bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
{
// erster Versuch, vielleicht passt der Text
@@ -1523,10 +1417,6 @@ bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-/*************************************************************************
- * virtual SwQuoVadisPortion::GetExpTxt()
- *************************************************************************/
-
bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
{
rTxt = aExpand;
@@ -1537,10 +1427,6 @@ bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
return true;
}
-/*************************************************************************
- * virtual SwQuoVadisPortion::HandlePortion()
- *************************************************************************/
-
void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString( aExpand );
@@ -1548,10 +1434,6 @@ void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), aString, GetWhichPor() );
}
-/*************************************************************************
- * virtual SwQuoVadisPortion::Paint()
- *************************************************************************/
-
void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
// Wir wollen _immer_ per DrawStretchText ausgeben,
@@ -1565,10 +1447,6 @@ void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * class SwErgoSumPortion
- *************************************************************************/
-
SwFldPortion *SwErgoSumPortion::Clone( const OUString &rExpand ) const
{
return new SwErgoSumPortion( rExpand, OUString() );
@@ -1590,10 +1468,6 @@ sal_Int32 SwErgoSumPortion::GetCrsrOfst( const KSHORT ) const
return 0;
}
-/*************************************************************************
- * virtual SwErgoSumPortion::Format()
- *************************************************************************/
-
bool SwErgoSumPortion::Format( SwTxtFormatInfo &rInf )
{
const bool bFull = SwFldPortion::Format( rInf );
@@ -1612,11 +1486,6 @@ bool SwErgoSumPortion::Format( SwTxtFormatInfo &rInf )
return false;
}
-
-/*************************************************************************
- * SwParaPortion::SetErgoSumNum()
- *************************************************************************/
-
void SwParaPortion::SetErgoSumNum( const OUString& rErgo )
{
SwLineLayout *pLay = this;
@@ -1664,6 +1533,4 @@ bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
return pQuo->GetQuoTxt() == rQuo;
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index eece35d..bcee1e0 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -36,25 +36,23 @@ using namespace ::com::sun::star;
namespace
{
-
-SvStream& lcl_OutLongExt( SvStream& rStrm, sal_uLong nVal, bool bNeg )
-{
- sal_Char aBuf[28];
-
- int i = SAL_N_ELEMENTS(aBuf);
- aBuf[--i] = 0;
- do
+ SvStream& lcl_OutLongExt( SvStream& rStrm, sal_uLong nVal, bool bNeg )
{
- aBuf[--i] = '0' + static_cast<sal_Char>(nVal % 10);
- nVal /= 10;
- } while (nVal);
+ sal_Char aBuf[28];
- if (bNeg)
- aBuf[--i] = '-';
+ int i = SAL_N_ELEMENTS(aBuf);
+ aBuf[--i] = 0;
+ do
+ {
+ aBuf[--i] = '0' + static_cast<sal_Char>(nVal % 10);
+ nVal /= 10;
+ } while (nVal);
- return rStrm.WriteCharPtr( &aBuf[i] );
-}
+ if (bNeg)
+ aBuf[--i] = '-';
+ return rStrm.WriteCharPtr( &aBuf[i] );
+ }
}
typedef std::multimap<sal_uLong, const ::sw::mark::IMark*> SwBookmarkNodeTable;
@@ -93,7 +91,6 @@ void Writer_Impl::RemoveFontList( SwDoc& rDoc )
void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
{
-
sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex();
aBkmkNodePos.insert( SwBookmarkNodeTable::value_type( nNd, &rBkmk ) );
@@ -167,7 +164,7 @@ sal_Bool Writer::CopyNextPam( SwPaM ** ppPam )
if( (*ppPam)->GetNext() == pOrigPam )
{
*ppPam = pOrigPam; // set back to the beginning pam
- return sal_False; // end of the ring
+ return sal_False; // end of the ring
}
// otherwise copy the next value from the next Pam
@@ -220,8 +217,6 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
return pNew;
}
-/////////////////////////////////////////////////////////////////////////////
-
// Stream-specific
SvStream& Writer::Strm()
{
@@ -432,10 +427,7 @@ sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, sal_Int32 nStt,
return rArr.size();
}
-////////////////////////////////////////////////////////////////////////////
-
// Storage-specific
-
sal_uLong StgWriter::WriteStream()
{
OSL_ENSURE( !this, "Write in Storages on a stream?" );
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index 4011ddb..d091773 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -90,7 +90,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
{
- // It must be a CntntNode !!
+ // It must be a CntntNode!
SwCntntNode * pCNd = rNode.GetCntntNode();
if( !pCNd )
return rWrt;
@@ -117,5 +117,4 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
return rWrt;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 994dad4..8a1cc74 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -77,7 +77,7 @@ static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, bool bNext)
return pCNd;
}
-// ------ Stack entry for all text attributes -----------
+// Stack entry for all text attributes
SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt)
: m_aMkPos(rStartPos)
, m_aPtPos(rStartPos)
@@ -85,9 +85,9 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt)
, mnEndCP(-1)
, bIsParaEnd(false)
{
- pAttr = pHt; // store a copy of the attribute
+ pAttr = pHt; // store a copy of the attribute
bOld = sal_False; // used for marking Attributes *before* skipping field results
- bOpen = sal_True; // lock the attribute --> may first
+ bOpen = sal_True; // lock the attribute --> may first
bConsumedByField = sal_False;
}
@@ -129,7 +129,7 @@ bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, bool bCheck,
{
return false;
}
- // !!! The content indices always apply to the node !!!
+ // The content indices always apply to the node!
rRegion.GetPoint()->nNode = rMkPos.m_nNode.GetIndex() + 1;
SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, true);
rRegion.GetPoint()->nContent.Assign(pCNd, rMkPos.m_nCntnt);
@@ -426,7 +426,7 @@ static void MakeBookRegionOrPoint(const SwFltStackEntry& rEntry, SwDoc* pDoc,
SwPaM& rRegion, sal_Bool bCheck )
{
if (rEntry.MakeRegion(pDoc, rRegion, bCheck )){
-// sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
+ // sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
if (rRegion.GetPoint()->nNode.GetNode().FindTableBoxStartNode()
!= rRegion.GetMark()->nNode.GetNode().FindTableBoxStartNode())
{
@@ -670,7 +670,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
break;
default:
{
- //Revised for more complex situations should be considered
+ // Revised for more complex situations should be considered
if ( !bSdODChecked )
{
bHasSdOD = HasSdOD();
@@ -772,7 +772,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
SwNodeIndex aEndNode(pEnd->nNode, -1);
const sal_Int32 nEndIdx = pEnd->nContent.GetIndex();
- //We don't support deleting content that is over one node, or removing a node.
+ // We don't support deleting content that is over one node, or removing a node.
OSL_ENSURE(aEndNode == aStartNode, "nodes must be the same, or this method extended");
if (aEndNode != aStartNode)
return;
@@ -813,19 +813,19 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
if (bTotallyContained)
{
- //after start, before end, delete
+ // after start, before end, delete
DeleteAndDestroy(nSize);
continue;
}
const sal_Int32 nCntntDiff = nEndIdx - nStartIdx;
- //to be adjusted
+ // to be adjusted
if (bEntryStartAfterSelStart)
{
if (bEntryStartBeforeSelEnd)
{
- //move start to new start
+ // move start to new start
rEntry.m_aMkPos.SetPos(aStartNode, nStartIdx);
}
else
@@ -846,7 +846,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
}
}
-//------ methods of SwFltAnchor follow -----------
+// methods of SwFltAnchor follow
SwFltAnchor::SwFltAnchor(SwFrmFmt* pFmt) :
SfxPoolItem(RES_FLTR_ANCHOR), pFrmFmt(pFmt)
{
@@ -914,7 +914,7 @@ void SwFltAnchorClient::Modify(const SfxPoolItem *, const SfxPoolItem * pNew)
}
}
-//------ methods of SwFltRedline follow -----------
+// methods of SwFltRedline follow
bool SwFltRedline::operator==(const SfxPoolItem& rItem) const
{
return this == &rItem;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list