summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Weissenbacher <p.weissenbacher@gmail.com>2014-10-03 15:56:16 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-10-04 09:46:09 +0000
commitaa053bb16f34ce4d216848abd32845f7369e236b (patch)
tree89526e5b3b49b48fd3c3898d7592da344f3a0820
parentd06039e7c93362a88ba394a178d3fcb85fc5d779 (diff)
fdo#39468 Finish translating German comments in sw/source/core/inc
Change-Id: I9a07a46582eafe70dcc26161e39856e9cf72de0c Reviewed-on: https://gerrit.libreoffice.org/11792 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
-rw-r--r--sw/source/core/inc/ptqueue.hxx35
-rw-r--r--sw/source/core/inc/rootfrm.hxx214
-rw-r--r--sw/source/core/inc/rowfrm.hxx18
-rw-r--r--sw/source/core/inc/sectfrm.hxx42
-rw-r--r--sw/source/core/inc/swblocks.hxx70
-rw-r--r--sw/source/core/inc/swcache.hxx103
-rw-r--r--sw/source/core/inc/tabfrm.hxx80
-rw-r--r--sw/source/core/inc/tblrwcl.hxx28
-rw-r--r--sw/source/core/inc/txmsrt.hxx12
-rw-r--r--sw/source/core/inc/txtfrm.hxx418
-rw-r--r--sw/source/core/inc/viewimp.hxx114
11 files changed, 622 insertions, 512 deletions
diff --git a/sw/source/core/inc/ptqueue.hxx b/sw/source/core/inc/ptqueue.hxx
index 155776d850e3..817f2f9b2845 100644
--- a/sw/source/core/inc/ptqueue.hxx
+++ b/sw/source/core/inc/ptqueue.hxx
@@ -19,23 +19,24 @@
#ifndef INCLUDED_SW_SOURCE_CORE_INC_PTQUEUE_HXX
#define INCLUDED_SW_SOURCE_CORE_INC_PTQUEUE_HXX
-//Leider vertragen wir es nicht so gut, wenn wir mehr als ein Paint
-//gleichzeitig verarbeiten sollen. Insbesondere beim Drucken kommt dies
-//leider haeufig vor.
-//SwRootFrm::Paint() stellt fest, dass es zum zweitenmal gerufen wird, und
-//traegt das Rechteck sowie die dazugehoerige Shell in den PaintCollector ein.
-//Diejenigen stellen, die moeglicherweise das doppelte Paint "Verursachen"
-//brauchen nur noch zum richtigen Zeitpunkt die gesammelten Paints verarbeiten.
-//Derzeit bietet sich der Druckvorgang an, und zwar nach dem Druck von jeweils
-//einer Seite.
-
-//Das Invalidieren der Windows direkt aus dem RootFrm::Paint hat sich als nicht
-//erfolgreich erwiesen, weil die Paints dann in den allermeisten Faellen
-//wiederum zu einem sehr unguenstigen Zeitpunkt ankommen.
-//Nach dem Druck jeder Seite ein Update auf alle Fenster auszuloesen scheint
-//auch nicht angeraten, weil einerseits die edit-Windows nicht im direkten
-//Zugriff sind und anderseits das notwendige Update je nach Plattform extrem
-//teuer werden kann.
+/**
+ * Unfortunately we have some problems with processing more than one Paint()
+ * at a time. This happens especially often during printing.
+ *
+ * SwRootFrm::Paint() determines that it's called a second time and adds the
+ * rectangle and the corresponding Shell to the PaintCollector.
+ * The call sites that are causing the double Paint() only need to process the
+ * collected Paint()s at the right point in time.
+ * Doing this during printing (after having printed one page) is very suitable
+ * for doing that.
+ *
+ * Invalidating windows directly from the RootFrm::Paint was not a succesful
+ * approach, because the Paint()s arrive at a very unfavourable point in time.
+ * Triggering an update for all windows after printing each page does not seem
+ * appropriate either: on the one hand we don't have direct acces to the edit
+ * windows and on the other hand the updates can become very costly on some
+ * platforms.
+ */
class SwQueuedPaint;
class SwViewShell;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index fa4acdb17057..d8761d22ba4a 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -53,74 +53,77 @@ struct SwCrsrMoveState;
/// The root element of a Writer document layout.
class SwRootFrm: public SwLayoutFrm
{
- //Muss das Superfluous temporaer abschalten.
+ // Needs to disable the Superfluous temporarily
friend void AdjustSizeChgNotify( SwRootFrm *pRoot );
- //Pflegt pLastPage (Cut() und Paste() vom SwPageFrm
+ // Maintains the pLastPage (Cut() and Paste() of SwPageFrm
friend inline void SetLastPage( SwPageFrm* );
- // Fuer das Anlegen und Zerstoeren des virtuellen Outputdevice-Managers
- friend void _FrmInit(); //erzeugt pVout
- friend void _FrmFinit(); //loescht pVout
+ // For creating and destroying of the virtual output device manager
+ friend void _FrmInit(); // Creates pVout
+ friend void _FrmFinit(); // Destroys pVout
std::vector<SwRect> maPageRects;// returns the current rectangle for each page frame
// the rectangle is extended to the top/bottom/left/right
- // for pages located at the outer borders
+ // for pages located at the outer margins
SwRect maPagesArea; // the area covered by the pages
long mnViewWidth; // the current page layout bases on this view width
- sal_uInt16 mnColumns; // the current page layout bases on this number of columns
+ sal_uInt16 mnColumns; // the current page layout bases on this number of columns
bool mbBookMode; // the current page layout is in book view
bool mbSidebarChanged; // the notes sidebar state has changed
bool mbNeedGrammarCheck; // true when sth needs to be checked (not necessarily started yet!)
static SwLayVout *pVout;
- static bool bInPaint; //Schutz gegen doppelte Paints.
- static bool bNoVirDev; //Bei SystemPaints kein virt. Device
+ static bool bInPaint; // Protection against double Paints
+ static bool bNoVirDev;// No virt. Device for SystemPaints
- bool bCheckSuperfluous :1; //Leere Seiten suchen?
- bool bIdleFormat :1; //Idle-Formatierer anwerfen?
- bool bBrowseWidthValid :1; //Ist nBrowseWidth gueltig?
+ bool bCheckSuperfluous :1; // Search for empty Pages?
+ bool bIdleFormat :1; // Trigger Idle Formatter?
+ bool bBrowseWidthValid :1; // Is nBrowseWidth valid?
bool bTurboAllowed :1;
- bool bAssertFlyPages :1; //Ggf. weitere Seiten fuer Flys einfuegen?
- bool bIsVirtPageNum :1; //gibt es eine virtuelle Seitennummer ?
- bool bIsNewLayout :1; //Layout geladen oder neu erzeugt.
- bool bCallbackActionEnabled:1; //Keine Action in Benachrichtung erwuenscht
- //siehe dcontact.cxx, ::Changed()
- bool bLayoutFreezed;
-
- //Fuer den BrowseMode. nBrowseWidth ist die Aeussere Kante des am weitesten
- //rechts stehenden Objectes. Die rechte Kante der Seiten soll im BrowseMode
- //nicht kleiner werden als dieser Wert.
+ bool bAssertFlyPages :1; // Insert more Pages for Flys if needed?
+ bool bIsVirtPageNum :1; // Do we have a virtual pagenumber?
+ bool bIsNewLayout :1; // Layout loaded or newly created
+ bool bCallbackActionEnabled:1; // No Action in Notification desired
+ // @see dcontact.cxx, ::Changed()
+ bool bLayoutFreezed;
+
+ /**
+ * For BrowseMode
+ * nBrowseWidth is the outer margin of the object most to the right.
+ * The page's right edge should not be smaller than this value.
+ */
long nBrowseWidth;
- //Wenn nur _ein: CntntFrm zu formatieren ist, so steht dieser in pTurbo.
+ /// If we only have to format one CntntFrm, its in pTurbo
const SwCntntFrm *pTurbo;
- //Die letzte Seite wollen wir uns nicht immer muehsam zusammensuchen.
+ /// We should not need to always struggle to find the last page, so store it here
SwPageFrm *pLastPage;
- // [ Comment from the original StarOffice checkin ]:
- // The root takes care of the shell access. Via the document
- // it should be possible to get at the root frame, and thus always
- // have access to the shell.
- // the pointer pCurrShell is the pointer to any of the shells for
- // the document.
- // Because sometimes it matters which shell is used, it is necessary to
- // know the active shell.
- // this is approximated by setting the pointer pCurrShell when a
- // shell gets the focus (FEShell). Acditionally the pointer will be
- // set temporarily by SwCurrShell typically via SET_CURR_SHELL
- // The macro and class can be found in the SwViewShell. These object can
- // be created nested (also for different kinds of Shells). They are
- // collected into the Array pCurrShells.
- // Futhermore it can happen that a shell is activated while a curshell
- // object is still 'active'. This one will be entered into pWaitingCurrShell
- // and will be activated by the last d'tor of CurrShell.
- // One other problem is the destruction of a shell while it is active.
- // The pointer pCurrShell is then reset to an arbitrary other shell.
- // If at the time of the destruction of a shell, which is still referneced
- // by a curshell object, that will be cleaned up as well.
+ /** [ Comment from the original StarOffice checkin ]:
+ * The root takes care of the shell access. Via the document
+ * it should be possible to get at the root frame, and thus always
+ * have access to the shell.
+ * the pointer pCurrShell is the pointer to any of the shells for
+ * the document.
+ * Because sometimes it matters which shell is used, it is necessary to
+ * know the active shell.
+ * this is approximated by setting the pointer pCurrShell when a
+ * shell gets the focus (FEShell). Acditionally the pointer will be
+ * set temporarily by SwCurrShell typically via SET_CURR_SHELL
+ * The macro and class can be found in the SwViewShell. These object can
+ * be created nested (also for different kinds of Shells). They are
+ * collected into the Array pCurrShells.
+ * Futhermore it can happen that a shell is activated while a curshell
+ * object is still 'active'. This one will be entered into pWaitingCurrShell
+ * and will be activated by the last d'tor of CurrShell.
+ * One other problem is the destruction of a shell while it is active.
+ * The pointer pCurrShell is then reset to an arbitrary other shell.
+ * If at the time of the destruction of a shell, which is still referneced
+ * by a curshell object, that will be cleaned up as well.
+ */
friend class CurrShell;
friend void SetShell( SwViewShell *pSh );
friend void InitCurrShells( SwRootFrm *pRoot );
@@ -128,19 +131,19 @@ class SwRootFrm: public SwLayoutFrm
SwViewShell *pWaitingCurrShell;
SwCurrShells *pCurrShells;
- //Eine Page im DrawModel pro Dokument, hat immer die Groesse der Root.
+ /// One Page per DrawModel per Document; is always the size of the Root
SdrPage *pDrawPage;
SwDestroyList* pDestroy;
- sal_uInt16 nPhyPageNums; //Anzahl der Seiten.
- sal_uInt16 nAccessibleShells; // Number of accessible shells
+ sal_uInt16 nPhyPageNums; /// Page count
+ sal_uInt16 nAccessibleShells; // Number of accessible shells
void ImplCalcBrowseWidth();
void ImplInvalidateBrowseWidth();
- void _DeleteEmptySct(); // zerstoert ggf. die angemeldeten SectionFrms
- void _RemoveFromList( SwSectionFrm* pSct ); // entfernt SectionFrms aus der Delete-Liste
+ void _DeleteEmptySct(); // Destroys the registered SectionFrms
+ void _RemoveFromList( SwSectionFrm* pSct ); // Removes SectionFrms from the Delete List
protected:
@@ -148,7 +151,7 @@ protected:
public:
- //MasterObjekte aus der Page entfernen (von den Ctoren gerufen).
+ /// Remove MasterObjects from the Page (called by the ctors)
static void RemoveMasterObjs( SdrPage *pPg );
void AllCheckPageDescs() const;
@@ -156,9 +159,11 @@ public:
void AllAddPaintRect() const;
void AllRemoveFtns() ;
void AllInvalidateSmartTagsOrSpelling(bool bSmartTags) const;
- //Virtuelles Device ausgeben (z.B. wenn Animationen ins Spiel kommen)
+
+ /// Output virtual Device (e.g. for animations)
static bool FlushVout();
- //Clipping sparen, wenn im Vout eh genau das Cliprechteck ausgegeben wird
+
+ /// Save Clipping if exactly the ClipRect is outputted
static bool HasSameRect( const SwRect& rRect );
SwRootFrm( SwFrmFmt*, SwViewShell* );
@@ -168,17 +173,20 @@ public:
SwViewShell *GetCurrShell() const { return pCurrShell; }
void DeRegisterShell( SwViewShell *pSh );
- //Start-/EndAction fuer alle Shells auf moeglichst hoeher
- //(Shell-Ableitungs-)Ebene aufsetzen. Fuer die StarONE Anbindung, die
- //die Shells nicht dirkt kennt.
- //Der ChangeLinkd der CrsrShell (UI-Benachrichtigung) wird im EndAllAction
- //automatisch gecallt.
+ /**
+ * Set up Start-/EndAction for all Shells on a as high as possible
+ * (Shell section) level.
+ * For the StarONE binding, which does not know the Shells directly.
+ * The ChangeLinkd of the CrsrShell (UI notifications) is called
+ * automatically in the EndAllAction.
+ */
void StartAllAction();
void EndAllAction( bool bVirDev = false );
- // fuer bestimmte UNO-Aktionen (Tabellencursor) ist es notwendig, dass alle Actions
- // kurzfristig zurueckgesetzt werden. Dazu muss sich jede SwViewShell ihren alten Action-zaehler
- // merken
+ /**
+ * Certain UNO Actions (e.g. table cursor) require that all Actions are reset temporarily
+ * In order for that to work, every SwViewShell needs to remember its old Action counter
+ */
void UnoRemoveAllActions();
void UnoRestoreAllActions();
@@ -232,33 +240,36 @@ public:
}
}
- //Sorgt dafuer, dass alle gewuenschten Seitengebunden Flys eine Seite finden
+ /// Makes sure that all requested page-bound Flys find a Page
void SetAssertFlyPages() { bAssertFlyPages = true; }
void AssertFlyPages();
bool IsAssertFlyPages() { return bAssertFlyPages; }
- //Stellt sicher, dass ab der uebergebenen Seite auf allen Seiten die
- //Seitengebundenen Rahmen auf der richtigen Seite (Seitennummer) stehen.
+ /**
+ * Makes sure that, starting from the passed Page, all page-bound Frames
+ * are on the right Page (pagenumber).
+ */
void AssertPageFlys( SwPageFrm * );
- //Saemtlichen Inhalt invalidieren, Size oder PrtArea
+ /// Invalidate all Cntnt, Size or PrtArea
void InvalidateAllCntnt( sal_uInt8 nInvalidate = INV_SIZE );
- /** method to invalidate/re-calculate the position of all floating
- screen objects (Writer fly frames and drawing objects), which are
- anchored to paragraph or to character.
-
- OD 2004-03-16 #i11860#
+ /**
+ * Invalidate/re-calculate the position of all floating
+ * screen objects (Writer fly frames and drawing objects), which are
+ * anchored to paragraph or to character.
*/
void InvalidateAllObjPos();
- //Ueberfluessige Seiten entfernen.
+ /// Remove superfluous Pages
void SetSuperfluous() { bCheckSuperfluous = true; }
bool IsSuperfluous() const { return bCheckSuperfluous; }
void RemoveSuperfluous();
- //abfragen/setzen der aktuellen Seite und der Gesamtzahl der Seiten.
- //Es wird soweit wie notwendig Formatiert.
+ /**
+ * Query/set the current Page and the collective Page count
+ * We'll format as much as necessary
+ */
sal_uInt16 GetCurrPage( const SwPaM* ) const;
sal_uInt16 SetCurrPage( SwCursor*, sal_uInt16 nPageNum );
Point GetPagePos( sal_uInt16 nPageNum ) const;
@@ -269,18 +280,23 @@ public:
inline void SetVirtPageNum( const bool bOf ) const;
bool IsDummyPage( sal_uInt16 nPageNum ) const;
- // Point rPt: The point that should be used to find the page
- // Size pSize: If given, we return the (first) page that overlaps with the
- // rectangle defined by rPt and pSize
- // bool bExtend: Extend each page to the left/right/top/botton up to the
- // next page border
+ /**
+ * Point rPt: The point that should be used to find the page
+ * Size pSize: If given, we return the (first) page that overlaps with the
+ * rectangle defined by rPt and pSize
+ * bool bExtend: Extend each page to the left/right/top/botton up to the
+ * next page margin
+ */
const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
void CalcFrmRects( SwShellCrsr& );
- // Calculates the cells included from the current selection
- // false: There was no result because of an invalid layout
- // true: Everything worked fine.
+ /**
+ * Calculates the cells included from the current selection
+ *
+ * @returns false: There was no result because of an invalid layout
+ * @returns true: Everything worked fine.
+ */
bool MakeTblCrsrs( SwTableCursor& );
void DisallowTurbo() const { ((SwRootFrm*)this)->bTurboAllowed = false; }
@@ -290,10 +306,10 @@ public:
void ResetTurbo() { pTurbo = 0; }
const SwCntntFrm *GetTurbo() { return pTurbo; }
- //Fussnotennummern aller Seiten auf den neuesten Stand bringen.
- void UpdateFtnNums(); //nur bei Seitenweiser Nummerierung!
+ /// Update the footernumbers of all Pages
+ void UpdateFtnNums(); // Only for page by page numnbering!
- //Alle Fussnoten (nicht etwa die Referenzen) entfernen.
+ /// Remove all footnotes (but no references)
void RemoveFtns( SwPageFrm *pPage = 0, bool bPageOnly = false,
bool bEndNotes = false );
void CheckFtnPageDescs( bool bEndNote );
@@ -312,8 +328,10 @@ public:
bool IsNewLayout() const { return bIsNewLayout; }
void ResetNewLayout() { bIsNewLayout = false;}
- // Hier werden leere SwSectionFrms zur Zerstoerung angemeldet
- // und spaeter zerstoert oder wieder abgemeldet
+ /**
+ * Empty SwSectionFrms are registered here for deletion and
+ * destroyed later on or deregistered.
+ */
void InsertEmptySct( SwSectionFrm* pDel );
void DeleteEmptySct() { if( pDestroy ) _DeleteEmptySct(); }
void RemoveFromList( SwSectionFrm* pSct ) { if( pDestroy ) _RemoveFromList( pSct ); }
@@ -328,19 +346,17 @@ public:
void AddAccessibleShell() { ++nAccessibleShells; }
void RemoveAccessibleShell() { --nAccessibleShells; }
- /** get page frame by phyiscal page number
-
- OD 14.01.2003 #103492#
- looping through the lowers, which are page frame, in order to find the
- page frame with the given physical page number.
- if no page frame is found, 0 is returned.
- Note: Empty page frames are also returned.
-
- @param _nPageNum
- input parameter - physical page number of page frame to be searched and
- returned.
-
- @return pointer to the page frame with the given physical page number
+ /**
+ * Get page frame by phyiscal page number
+ * looping through the lowers, which are page frame, in order to find the
+ * page frame with the given physical page number.
+ * if no page frame is found, 0 is returned.
+ * Note: Empty page frames are also returned.
+ *
+ * @param _nPageNum: physical page number of page frame to be searched and
+ * returned.
+ *
+ * @return pointer to the page frame with the given physical page number
*/
SwPageFrm* GetPageByPageNum( sal_uInt16 _nPageNum ) const;
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index f4943a45147e..071a46c280d0 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -30,7 +30,7 @@ class SwBorderAttrs;
class SwRowFrm: public SwLayoutFrm
{
virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
- //Aendern nur die Framesize, nicht die PrtArea-SSize
+ /// Only change the Frame size, not the PrtArea SSize
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
@@ -55,16 +55,20 @@ public:
virtual void Cut() SAL_OVERRIDE;
- //Zum Anmelden der Flys nachdem eine Zeile erzeugt _und_ eingefuegt wurde.
- //Muss vom Erzeuger gerufen werden, denn erst nach dem Konstruieren wird
- //Das Teil gepastet; mithin ist auch erst dann die Seite zum Anmelden der
- //Flys erreichbar.
+ /**
+ * Register Flys after a line was created _AND_ inserted
+ * Must be called by the creator; the Fly is inserted _after_ it has
+ * been created; the same holds true for the Page at which the Flys
+ * are to be registered at.
+ */
void RegistFlys( SwPageFrm *pPage = 0 );
const SwTableLine *GetTabLine() const { return pTabLine; }
- //Passt die Zellen auf die aktuelle Hoehe an, invalidiert die Zellen
- //wenn die Direction nicht der Hoehe entspricht.
+ /**
+ * Adapts the Cells to the current height; invalidates the Cells if
+ * the Direction does not match the height
+ */
void AdjustCells( const SwTwips nHeight, const bool bHeight );
SwRowFrm* GetFollowRow() const { return pFollowRow; }
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index d5ffa3297654..69410103dddf 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -61,8 +61,8 @@ protected:
virtual void SwClientNotify( const SwModify&, const SfxHint& ) SAL_OVERRIDE;
public:
- SwSectionFrm( SwSection &, SwFrm* ); //Inhalt wird nicht erzeugt!
- SwSectionFrm( SwSectionFrm &, bool bMaster );//_Nur_ zum Erzeugen von Master/Follows
+ SwSectionFrm( SwSection &, SwFrm* ); // Content is not created!
+ SwSectionFrm( SwSectionFrm &, bool bMaster ); // _ONLY_ for creating Master/Follows!
virtual ~SwSectionFrm();
void Init();
@@ -89,33 +89,43 @@ public:
bool IsDescendantFrom( const SwSectionFmt* pSect ) const;
bool HasToBreak( const SwFrm* pFrm ) const;
void MergeNext( SwSectionFrm* pNxt );
- //Zerlegt den pFrm umgebenden SectionFrm in zwei Teile,
- //pFrm an den Anfang des 2. Teils
+
+ /**
+ * Splits the SectionFrm surrounding the pFrm up in two parts:
+ * pFrm and the start of the 2nd part
+ */
bool SplitSect( SwFrm* pFrm, bool bApres );
- void DelEmpty( bool bRemove ); // wie Cut(), Follow-Verkettung wird aber mitgepflegt
- bool IsToIgnore() const // Keine Groesse, kein Inhalt, muss ignoriert werden
+ void DelEmpty( bool bRemove ); // Like Cut(), except for that Follow chaining is maintained
+ bool IsToIgnore() const // No size, no content; need to be ignored
{ return !Frm().Height() && !ContainsCntnt(); }
SwFtnContFrm* ContainsFtnCont( const SwFtnContFrm* pCont = NULL ) const;
bool Growable() const;
SwTwips _Shrink( SwTwips, bool bTst );
SwTwips _Grow ( SwTwips, bool bTst );
- // A sectionfrm has to maximize, if he has a follow or a ftncontainer at
- // the end of the page. A superfluous follow will be ignored,
- // if bCheckFollow is set.
+ /**
+ * A sectionfrm has to maximize, if he has a follow or a ftncontainer at
+ * the end of the page. A superfluous follow will be ignored,
+ * if bCheckFollow is set.
+ */
bool ToMaximize( bool bCheckFollow ) const;
inline bool _ToMaximize() const
{ if( !pSection ) return false; return ToMaximize( false ); }
bool MoveAllowed( const SwFrm* ) const;
bool CalcMinDiff( SwTwips& rMinDiff ) const;
- // Uebergibt man kein bOverSize bzw. sal_False, so ist der Returnwert
- // >0 fuer Undersized-Frames, ==0 sonst.
- // Uebergibt man sal_True, so kann es auch einen negativen Returnwert geben,
- // wenn der SectionFrm nicht vollstaendig ausgefuellt ist, was z.B. bei
- // SectionFrm mit Follow meist vorkommt. Benoetigt wird dies im
- // FormatWidthCols, um "Luft" aus den Spalten zu lassen.
+
+ /**
+ * If we don't pass a @param bOverSize or false, the return value is > 0 for
+ * undersized Frames, or 0
+ *
+ * If @param bOverSize == true, we can also get a negative return value,
+ * if the SectionFrm is not completely filled, which happens often for
+ * e.g. SectionFrms with Follows.
+ * We need this in the FormatWidthCols to "deflate" columns there.
+ */
long Undersize( bool bOverSize = false );
- // Groesse an die Umgebung anpassen
+
+ /// Adapt size to surroundings
void _CheckClipping( bool bGrow, bool bMaximize );
void InvalidateFtnPos();
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 669fb0e6e3c4..4f4344c45877 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -31,19 +31,19 @@ class SvxMacroTableDtor;
class SwBlockName
{
friend class SwImpBlocks;
- sal_uInt16 nHashS, nHashL; // Hash-Codes zum Checken
+ sal_uInt16 nHashS, nHashL; // Hash codes for testing
public:
- OUString aShort; // Short name
- OUString aLong; // Long name
- OUString aPackageName; // Package name
- bool bIsOnlyTxtFlagInit : 1; // ist das Flag gueltig?
- bool bIsOnlyTxt : 1; // unformatted text
- bool bInPutMuchBlocks : 1; // put serveral block entries
+ OUString aShort; /// Shortname
+ OUString aLong; /// Longname
+ OUString aPackageName; /// Package name
+ bool bIsOnlyTxtFlagInit : 1; /// Is the Flag valid?
+ bool bIsOnlyTxt : 1; /// Unformatted text
+ bool bInPutMuchBlocks : 1; /// Put serveral block entries
SwBlockName( const OUString& rShort, const OUString& rLong );
SwBlockName( const OUString& rShort, const OUString& rLong, const OUString& rPackageName );
- // fuer das Einsortieren in das Array
+ /// For sorting in the array
bool operator==( const SwBlockName& r ) const { return aShort == r.aShort; }
bool operator< ( const SwBlockName& r ) const { return aShort < r.aShort; }
};
@@ -54,48 +54,48 @@ class SwImpBlocks
{
friend class SwTextBlocks;
protected:
- OUString aFile; // physikalischer Dateiname
- OUString aName; // logischer Name der Datei
- OUString aCur; // aktueller Text
- OUString aShort, aLong; // Kurz- und Langname (PutDoc)
- OUString sBaseURL; // base URL - has to be set at the Readers and Writers
- SwBlockNames aNames; // Liste aller Bausteine
- Date aDateModified; // fuers abgleichen bei den Aktionen
+ OUString aFile; // Physical file name
+ OUString aName; // Logical file name
+ OUString aCur; // Current text
+ OUString aShort, aLong; // Short- and longname (PutDoc)
+ OUString sBaseURL; // Base URL - has to be set at the Readers and Writers
+ SwBlockNames aNames; // List of all Blocks
+ Date aDateModified; // For aligning the Actions
tools::Time aTimeModified;
- SwDoc* pDoc; // Austauschdokument
- sal_uInt16 nCur; // aktueller Index
+ SwDoc* pDoc; // Document to be switched
+ sal_uInt16 nCur; // Current Index
bool bReadOnly : 1;
- bool bInPutMuchBlocks : 1; // put serveral block entries
- bool bInfoChanged : 1; // any Info of TextBlock is changed
+ bool bInPutMuchBlocks : 1; // Put serveral block entries
+ bool bInfoChanged : 1; // Whether any info of TextBlock changed
SwImpBlocks( const OUString&, bool = false );
virtual ~SwImpBlocks();
static short GetFileType( const OUString& );
virtual short GetFileType() const = 0;
-#define SWBLK_NO_FILE 0 // nicht da
-#define SWBLK_NONE 1 // keine TB-Datei
-#define SWBLK_SW2 2 // SW2-Datei
-#define SWBLK_SW3 3 // SW3-Datei
+#define SWBLK_NO_FILE 0 // Not present
+#define SWBLK_NONE 1 // No TB file
+#define SWBLK_SW2 2 // SW2 file
+#define SWBLK_SW3 3 // SW3 file
#define SWBLK_XML 4 // XML Block List
- virtual void ClearDoc(); // Doc-Inhalt loeschen
- SwPaM* MakePaM(); // PaM ueber Doc aufspannen
+ virtual void ClearDoc(); // Delete Doc content
+ SwPaM* MakePaM(); // Span PaM over Doc
virtual void AddName( const OUString&, const OUString&, bool bOnlyTxt = false );
bool IsFileChanged() const;
void Touch();
public:
- static sal_uInt16 Hash( const OUString& ); // Hashcode fuer Blocknamen
- sal_uInt16 GetCount() const; // Anzahl Textbausteine ermitteln
- sal_uInt16 GetIndex( const OUString& ) const; // Index fuer Kurznamen ermitteln
- sal_uInt16 GetLongIndex( const OUString& ) const; //Index fuer Langnamen ermitteln
- OUString GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck
- OUString GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck
- OUString GetPackageName( sal_uInt16 ) const; // Langname fuer Index zurueck
-
- OUString GetFileName() const {return aFile;} // phys. Dateinamen liefern
- void SetName( const OUString& rName ) // logic name
+ static sal_uInt16 Hash( const OUString& ); /// Hashcode for Block names
+ sal_uInt16 GetCount() const; /// Get count of Text Blocks
+ sal_uInt16 GetIndex( const OUString& ) const; /// Index for shortnames
+ sal_uInt16 GetLongIndex( const OUString& ) const; /// Index for longnames
+ OUString GetShortName( sal_uInt16 ) const; /// Return shortname for index
+ OUString GetLongName( sal_uInt16 ) const; /// Return longname for index
+ OUString GetPackageName( sal_uInt16 ) const; /// Return packagename for index
+
+ OUString GetFileName() const {return aFile;} /// Return physical file name
+ void SetName( const OUString& rName ) /// Logic name
{ aName = rName; bInfoChanged = true; }
OUString GetName( void )
{ return aName; }
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index c4eee1d91a29..0eee0c13f982 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -19,32 +19,28 @@
#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWCACHE_HXX
#define INCLUDED_SW_SOURCE_CORE_INC_SWCACHE_HXX
-/*
- * Es werden Pointer auf Objekte verwaltet. Diese werden in einem einfachen
- * PtrArray verwaltet.
- * Angelegt (new) werden die Objekte von Cache-Zugriffsklassen, zuerstoert
- * werden die Objekte vom Cache.
- *
- * Auf die Objekte kann wahlweise per Index in das Array oder per Suche
- * zugegriffen werden. Soll per Index zugegriffen werden, so obliegt die
- * Verwaltung des Index dem Anwender des Cache.
+/**
+ * Here, we manage pointers in a simple PtrArray to objects.
+ * These objects are created (using new) in cache access classes; they are
+ * destroyed by the cache.
*
- * Fuer die verwalteten Cache-Objekte gibt es eine Basisklasse, von dieser
- * sind spezifische Klassen abzuleiten.
- * In der Basisklasse werden die Cache-Objekte eines Cache doppelt verkettet,
- * das ermoeglich die Implementierung eines LRU-Algorithmus.
+ * One can access these objects by array index or by searching in the array
+ * If you access it by index, managing the index is the responsibility of
+ * the cache user.
*
- * Der LRU kann in der Cache-Basisklasse manipuliert werden, indem ein
- * virtueller First-Pointer gesetzt wird. Dieser kann auf den echten ersten
- * plus einem Ofst gesetzt werden. Dadurch kann man den Anfangsbereich des
- * Cache sichern und so dafuer sorgen, dass man waehrend bestimmter
- * Operationen nicht den Cache versaut. Beispiel: Der Idle-Handler sollte nicht
- * den Cache fuer den sichtbaren Bereich vernichten.
+ * The cached objects are derrived from the base class SwCacheObj.
+ * In it, the cache objects are doubly-linked which allows for the use of
+ * an LRU algorithm.
*
- * Der Cache kann in der Groesse erweitert und wieder verkleinert werden.
- * Beispiel: Fuer jede neue Shell wird der Cache fuer FormatInfo vergrossert
- * und beim Destruieren der Shell wieder verkleinert.
+ * The LRU algorithm can be changed in the base class, by setting a virtual
+ * First Pointer. It can be set to the first real one plus an offset.
+ * By doing so we can protect the start area of the cache and make sure we
+ * don't mess up the cache during some special operations.
+ * E.g.: the Idle Handler should not destroy the cache for the visible area.
*
+ * The cache can be grown and shrunk in size.
+ * E.g.: The cache for FormatInfo is grown for every new Shell and shrunk
+ * when destroying them.
*/
#include <vector>
@@ -57,16 +53,13 @@ typedef std::vector<SwCacheObj*> SwCacheObjArr;
class SwCache
{
SwCacheObjArr m_aCacheObjects;
- std::vector<sal_uInt16> aFreePositions; //Freie Positionen fuer das Insert wenn
- //die Maximalgrenze nicht erreicht ist.
- //Immer wenn ein Objekt ausgetragen wird,
- //so wird seine Position hier eingetragen.
-
- SwCacheObj *pRealFirst; //_immer_ der echte LRU-erste
- SwCacheObj *pFirst; //der virtuelle erste.
+ std::vector<sal_uInt16> aFreePositions; /// Free positions for the Insert if the maximum has not been reached
+ /// Every time an object is deregistered, its position is added here
+ SwCacheObj *pRealFirst; /// _ALWAYS_ the real first LRU
+ SwCacheObj *pFirst; /// The virtual first
SwCacheObj *pLast;
- sal_uInt16 nCurMax; //Mehr werden nicht aufgenommen.
+ sal_uInt16 nCurMax; // Maximum of accepted objects
void DeleteObj( SwCacheObj *pObj );
@@ -91,18 +84,18 @@ class SwCache
public:
- //nur sal_uInt8 hineinstecken!!!
+// Only add sal_uInt8!!!
#ifdef DBG_UTIL
SwCache( const sal_uInt16 nInitSize, const OString &rNm );
#else
SwCache( const sal_uInt16 nInitSize );
#endif
- // the destructor will free all objects still in the vector
+ /// The dtor will free all objects still in the vector
~SwCache();
void Flush( const sal_uInt8 nPercent = 100 );
- //bToTop == sal_False -> Keine LRU-Umsortierung!
+ //bToTop == false -> No LRU resorting!
SwCacheObj *Get( const void *pOwner, const bool bToTop = true );
SwCacheObj *Get( const void *pOwner, const sal_uInt16 nIndex,
const bool bToTop = true );
@@ -112,8 +105,7 @@ public:
void Delete( const void *pOwner );
// void Delete( const void *pOwner, const sal_uInt16 nIndex );
- void SetLRUOfst( const sal_uInt16 nOfst ); //nOfst sagt wieviele unangetastet
- //bleiben sollen.
+ void SetLRUOfst( const sal_uInt16 nOfst ); /// nOfst determines how many are not to be touched
void ResetLRUOfst() { pFirst = pRealFirst; }
inline void IncreaseMax( const sal_uInt16 nAdd );
@@ -126,7 +118,7 @@ public:
inline sal_uInt16 size() { return m_aCacheObjects.size(); }
};
-//Cache-Manipulation auf die sichere Art.
+/// Safely manipulate the cache
class SwSaveSetLRUOfst
{
SwCache &rCache;
@@ -137,17 +129,19 @@ public:
~SwSaveSetLRUOfst() { rCache.ResetLRUOfst(); }
};
-//Das allgemeine CacheObjekt. Anwender des Cache muessen eine Klasse vom
-//CacheObjekt ableiten und dort die Nutzdaten unterbringen.
-
+/**
+ * The Cache object base class
+ * Users of the Cache must derrive a class from the SwCacheObj and store
+ * their payload there
+ */
class SwCacheObj
{
- friend class SwCache; //Der darf alles
+ friend class SwCache; /// Can do everything
- SwCacheObj *pNext; //Fuer die LRU-Verkettung.
+ SwCacheObj *pNext; /// For the LRU chaining
SwCacheObj *pPrev;
- sal_uInt16 nCachePos; //Position im Cache-Array.
+ sal_uInt16 nCachePos; /// Position in the Cache array
sal_uInt8 nLock;
@@ -188,15 +182,17 @@ public:
};
-//Zugriffsklasse fuer den Cache. Im CTor wird das CacheObjekt erzeugt.
-//Wenn der Cache keines herausrueckt wird der Member zunaechst auf 0 gesetzt.
-//Beim Get wird dann eines erzeugt und, falls moeglich, in den Cache
-//eingetragen.
-//Anwender der des Cache muessen eine Klasse vom Access ableiten um
-//fuer Typsicherheit zu sorgen, die Basisklasse sollte fuer das Get aber immer
-//gerufen werden, ein Abgeleitetes Get sollte nur der Typsicherheit dienen.
-//Cache-Objekte werden stets gelockt solange die Instanz lebt.
-
+/**
+ * Access class for the Cache
+ *
+ * The Cache object is created in the ctor.
+ * If the Cache does not return one, the member is set to 0 and one is
+ * created on the Get() and added to the Cache (if possible).
+ * Cache users must derrive a class from SwCacheAccess in order to
+ * guarantee type safety. The base class should always be called for the
+ * Get(). A derrived Get() should only ever guarantee type safety.
+ * Cache objects are always locked for the instance's life time.
+ */
class SwCacheAccess
{
SwCache &rCache;
@@ -205,7 +201,7 @@ class SwCacheAccess
protected:
SwCacheObj *pObj;
- const void *pOwner; //Kann ggf. in NewObj benutzt werden.
+ const void *pOwner; /// Can be use in NewObj
virtual SwCacheObj *NewObj() = 0;
@@ -219,8 +215,7 @@ public:
virtual bool IsAvailable() const;
- //Abkuerzung fuer diejenigen, die wissen, das die Ableitung das IsAvailable
- //nicht ueberladen haben.
+ /// Shorthand for those who know, that they did not overload isAvailable()
bool IsAvail() const { return pObj != 0; }
};
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index d4471984de13..d232443011ab 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -38,45 +38,45 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
SwTable* pTable;
- bool bComplete :1; //Eintrage als Repaint ohne das CompletePaint
- //der Basisklasse gesetzt werden muss. Damit
- //sollen unertraegliche Tabellen-Repaints
- //vermieden werden.
- bool bCalcLowers :1; //Im MakeAll auf jedenfall auch fuer Stabilitaet
- //des Inhaltes sorgen.
- bool bLowersFormatted :1;//Kommunikation zwischen MakeAll und Layact
- bool bLockBackMove :1; //BackMove-Test hat der Master erledigt.
- bool bResizeHTMLTable :1; //Resize des HTMLTableLayout rufen im MakeAll
- //Zur Optimierung, damit dies nicht im
- //CntntFrm::Grow gerufen werden muss, denn dann
- //wird es ggf. fuer jede Zelle gerufen #47483#
- bool bONECalcLowers :1; //Primaer fuer die StarONE-SS. Beim MakeAll werden
- //die Cntnts auf jedenfall per Calc() formatiert.
- //es finden keine zusaetzlichen Invalidierungen
- //statt und dieser Weg kann auch kaum garantien
- //geben.
-
- bool bHasFollowFlowLine :1; // Means that the first line in the follow
- // is indented to contain content from a broken
- // cell
- bool bIsRebuildLastLine :1; // Means that currently the last line of the
- // TabFrame is rebuilded. In this case we
- // do not want any notification to the master
- // table
- bool bRestrictTableGrowth :1; // Usually, the table may grow infinite,
- // because the table can be split in
- // SwTabFrm::MakeAll. In MakeAll, this
- // flag is set to indicate that the table
- // may only grow inside its upper. This
- // is necessary, in order to let the text
- // flow into the FollowFlowLine
+ bool bComplete :1; /// Set entries for Repaint without needing to
+ /// set the base class' CompletePaint
+ /// With that we would want to avoid unnecessary
+ /// table repaints
+ bool bCalcLowers :1; /// For stability of the content in MakeAll
+ bool bLowersFormatted :1; /// Communication between MakeAll and Layact
+ bool bLockBackMove :1; /// The Master took care of the BackMove test
+ bool bResizeHTMLTable :1; /// Call the Resize of the HTMLTableLayout in the MakeAll
+ /// This is an optimization, so that we don't have to call
+ /// it in CntntFrm::Grow; there it might be called for
+ /// _every_ Cell
+
+ bool bONECalcLowers :1; /// Primarily for the StarONE SS
+ /// The Cntnts are formatted via Calc() on MakeAll in any
+ /// case. There are no further invalidations and that path can
+ /// hardly give any guarantees
+
+ bool bHasFollowFlowLine :1; /// Means that the first line in the follow
+ /// is indented to contain content from a broken
+ /// cell
+ bool bIsRebuildLastLine :1; /// Means that currently the last line of the
+ /// TabFrame is rebuilt. In this case we do not
+ // want any notification to the master table
+
+ bool bRestrictTableGrowth :1; // Usually, the table may grow infinitely,
+ // as the table can be split in SwTabFrm::MakeAll
+ // In MakeAll, this flag is set to indicate that
+ // the table may only grow inside its upper. This
+ // is necessary, in order to let the text flow into
+ // the FollowFlowLine
+
bool bRemoveFollowFlowLinePending :1;
+
// #i26945#
bool bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
- // are considered on the calculation
+ // are considered during the calculation
// for the minimal cell height.
- // For splitting table rows algorithm
- // it's needed not to consider floating
+ // For the splitting table rows algorithm
+ // we need not to consider floating
// screen object for the preparation
// of the re-calculation of the
// last table row.
@@ -86,9 +86,11 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
bool mbInRecalcLowerRow : 1;
- //Split() spaltet den Frm an der angegebenen Stelle, es wird ein
- //Follow erzeugt und aufgebaut und direkt hinter this gepastet.
- //Join() Holt sich den Inhalt aus dem Follow und vernichtet diesen.
+ /**
+ * Split() splits the Frm at the specified position: a Follow is
+ * created and constructed and insterted directly after this.
+ * Join() gets the Follow's content and destroys it.
+ */
bool Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep );
bool Join();
@@ -104,7 +106,7 @@ protected:
virtual void MakeAll() SAL_OVERRIDE;
virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
- // only changes the Framesize, not the PrtArea size
+ // only changes the Framesize, not the PrtArea size
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
public:
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index 8e243cd8cf72..158e7d79bb1f 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -53,11 +53,13 @@ SW_DLLPUBLIC void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo = 0
bool bCalcNewSize = true, const bool bCorrBorder = true,
SwShareBoxFmts* pShareFmts = 0 );
-// Klasse fuers SplitTable
-// sammelt von einer Line die Boxen aller obersten oder untersten Lines
-// in einem Array. Zusaetzlich werden die Positionen vermerkt.
-// ( die Implementierung steht im ndtbl.cxx)
-
+/**
+ * Class for SplitTable
+ * Collects the uppermost or lowermost Lines of a Box from a Line in an array.
+ * We also store their positions.
+ *
+ * @see implementation in im ndtbl.cxx
+ */
class SwCollectTblLineBoxes
{
std::vector<sal_uInt16> aPosArr;
@@ -82,7 +84,7 @@ public:
size_t Count() const { return m_Boxes.size(); }
const SwTableBox& GetBox( std::size_t nPos, sal_uInt16* pWidth = 0 ) const
{
- // hier wird die EndPos der Spalte benoetigt!
+ // We need the EndPos of the column here!
if( pWidth )
*pWidth = (nPos+1 == aPosArr.size()) ? nWidth
: aPosArr[ nPos+1 ];
@@ -103,8 +105,10 @@ bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara );
void sw_BoxSetSplitBoxFmts( SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara );
-// This structure is needed by Undo to restore row span attributes
-// when a table has been splitted into two tables
+/**
+ * This structure is needed by Undo to restore row span attributes
+ * when a table has been split into two tables
+ */
struct SwSaveRowSpan
{
sal_uInt16 mnSplitLine; // the line number where the table has been splitted
@@ -136,8 +140,10 @@ public:
void SetBorder( const editeng::SvxBorderLine& rBorderLine )
{ pBrdLn = &rBorderLine; bAnyBorderFnd = false; }
- // checke, ob die linke Border dieselbe wie die gesetzte ist
- // returnt false falls gar keine Border gesetzt ist
+ /**
+ * Check whether the left Border is the same as the set one
+ * @returns false if no Border was set
+ */
bool CheckLeftBorderOfFormat( const SwFrmFmt& rFmt );
bool IsAnyBorderFound() const { return bAnyBorderFnd; }
@@ -160,7 +166,7 @@ public:
SwFrmFmt* GetFormat( long nWidth ) const;
SwFrmFmt* GetFormat( const SfxPoolItem& rItem ) const;
void AddFormat( SwFrmFmt& rFmt );
- // returnt sal_True, wenn geloescht werden kann
+ /// @returns true, if we can delete
bool RemoveFormat( const SwFrmFmt& rFmt );
};
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index 38da0f486be7..d2d550ac383e 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -115,7 +115,9 @@ public:
inline bool IsNumeric( const OUString& rStr ) const;
};
-// Beschreibung: Klassen fuer die Sortierung der Verzeichnisse
+/**
+ * Class for sorting directories
+ */
struct SW_DLLPUBLIC SwTOXSortTabBase
{
SwTOXSources aTOXSources;
@@ -172,7 +174,9 @@ inline const ::com::sun::star::lang::Locale& SwTOXSortTabBase::GetLocale() const
return aLocale;
}
-// Beschreibung: fuer Sortierung nach Text
+/**
+ * For sorting by text
+ */
struct SwTOXIndex : public SwTOXSortTabBase
{
SwTOXIndex( const SwTxtNode&, const SwTxtTOXMark*, sal_uInt16 nOptions, sal_uInt8 nKeyLevel,
@@ -209,7 +213,9 @@ private:
sal_uInt16 nLev;
};
-// Beschreibung: fuer Sortierung nach Position
+/**
+ * For sorting by position
+ */
struct SwTOXContent : public SwTOXSortTabBase
{
SwTOXContent( const SwTxtNode&, const SwTxtTOXMark*,
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 3cdc4419ccec..1845d5ed8d8f 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -53,15 +53,15 @@ class SwTxtFrm: public SwCntntFrm
friend class SwTxtIter;
friend class SwTestFormat;
friend class WidowsAndOrphans;
- friend class SwTxtFrmLocker; // duerfen Lock()/Unlock()
+ friend class SwTxtFrmLocker; // May Lock()/Unlock()
friend bool sw_ChangeOffset( SwTxtFrm* pFrm, sal_Int32 nNew );
- static SwCache *pTxtCache; //Pointer auf den Line-Cache
- static long nMinPrtLine; //Diese Linie darf beim Drucken nicht
- //unterschritten werden, Hack fuer Tabellenzellen ueber mehrere Seiten
+ static SwCache *pTxtCache; // Pointer to the Line Cache
+ static long nMinPrtLine; // This Line must not be underrun when printing
+ // Hack for table cells stretching multiple pages
- sal_uLong nAllLines :24;//Anzahl der Zeilen fuer das Paint (inkl. nThisLines)
- sal_uLong nThisLines :8; //Anzahl der Zeilen dieses Frames
+ sal_uLong nAllLines :24; // Line count for the Paint (including nThisLines)
+ sal_uLong nThisLines :8; // Count of Lines of the Frame
// The x position for flys anchored at this paragraph.
// These values are calculated in SwTxtFrm::CalcBaseOfstForFly()
@@ -78,26 +78,23 @@ class SwTxtFrm: public SwCntntFrm
// It is NOT used for the determination of printing area.
SwTwips mnAdditionalFirstLineOffset;
- sal_Int32 nOfst; //nOfst gibt den Offset im Cntnt (Anzahl Zeichen) an.
+ sal_Int32 nOfst; // Is the offset in the Cntnt (character count)
- sal_uInt16 nCacheIdx; //Index in den Cache, USHRT_MAX wenn definitiv
- //kein passendes Objekt im Cache steht.
+ sal_uInt16 nCacheIdx; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
- //Teilt den Master ab und erzeugt einen Follow oder passt die
- //Daten im Follow an.
- void _AdjustFollow( SwTxtFormatter &rLine, const sal_Int32 nOffset,
+ // Separates the Master and creates a Follow or adjusts the data in the Follow
+ void _AdjustFollow( SwTxtFormatter &rLine, const sal_Int32 nOffset,
const sal_Int32 nStrEnd, const sal_uInt8 nMode );
inline void AdjustFollow( SwTxtFormatter &rLine, const sal_Int32 nOffset,
const sal_Int32 nStrEnd, const sal_uInt8 nMode );
- //Iteriert ueber alle Zeilen und stellt das Linespacing
- //entsprechend dem Attribut ein.
+ // Iterates all Lines and sets the line spacing using the attribute
void CalcLineSpace();
- // Wird nur in Format gerufen:
+ // Only called in Format
void AdjustFrm( const SwTwips nChgHeight, bool bHasToFit = false );
- // wertet in Format() die Preps aus.
+ // Evaluates the Preps in Format()
bool CalcPreps();
void PrepWidows( const sal_uInt16 nNeed, bool bNotify = true );
void _InvalidateRange( const SwCharRange &, const long = 0);
@@ -107,18 +104,18 @@ class SwTxtFrm: public SwCntntFrm
void FormatAdjust( SwTxtFormatter &rLine, WidowsAndOrphans &rFrmBreak,
const sal_Int32 nStrLen, const bool bDummy );
- bool bLocked : 1; // im Format?
- bool bWidow : 1; // sind wir ein Widow
- bool bJustWidow : 1; // haben wir soeben Widow angefordert
- bool bEmpty : 1; // sind wir ein leerer Absatz
- bool bInFtnConnect : 1; // Steht gerade im Connect
- bool bFtn : 1; // Hat mindestens eine Fussnote
- bool bRepaint : 1; // TxtFrm: Repaint steht zur Abholung bereit
- bool bBlinkPor : 1; // enthaelt Blink-Portions
- bool bFieldFollow : 1; // beginne mit Feldrest des Masters
- bool bHasAnimation : 1; // enthaelt animierte SwGrfNumPortion
+ bool bLocked : 1; // In the Format?
+ bool bWidow : 1; // Are we a Widow?
+ bool bJustWidow : 1; // Did we just request to be a Widow?
+ bool bEmpty : 1; // Are we an empty paragraph?
+ bool bInFtnConnect : 1; // Is in Connect at the moment
+ bool bFtn : 1; // Has at least one footnote
+ bool bRepaint : 1; // TxtFrm: Repaint is ready to be fetched
+ bool bBlinkPor : 1; // Contains Blink Portions
+ bool bFieldFollow : 1; // Start with Field rest of the Master
+ bool bHasAnimation : 1; // Contains animated SwGrfNumPortion
bool bIsSwapped : 1; // during text formatting we swap the
- // width and height for vertical formatting
+ // width and height for vertical formatting
// OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
// method <CalcFollow(..)>.
// E.g., avoid formatting of follow, if method <SwLayoutFrm::FormatWidthCols(..)>
@@ -135,35 +132,35 @@ class SwTxtFrm: public SwCntntFrm
bool IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const;
- // Wechselt den Frame oder auch nicht (vgl. FlyCnt)
+ // Changes the Frame or not (cf. FlyCnt)
bool _GetCrsrOfst(SwPosition *pPos, const Point &rPoint,
const bool bChgFrm, SwCrsrMoveState* = 0 ) const;
void FillCrsrPos( SwFillData &rFill ) const;
- // formatiert genau eine Zeile ...
+ // Format exactly one Line
bool FormatLine( SwTxtFormatter &rLine, const bool bPrev );
- // Um Stack einzusparen aufgeteilt ...
- // _Format ruft _Format mit Parametern
+ // In order to safe stack space, we split this method:
+ // _Format calls _Format with parameters
void _Format( SwParaPortion *pPara );
void _Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
const bool bAdjust = false );
void FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf );
- // formatiert den Follow und sorgt fuer die Entsorgung bei Orphans
+ // Formats the Follow and ensures disposing on orphans
bool CalcFollow( const sal_Int32 nTxtOfst );
- // korrigiert die Stelle ab der formatiert werden muss.
+ // Corrects the position from which we need to format
sal_Int32 FindBrk(const OUString &rTxt, const sal_Int32 nStart,
const sal_Int32 nEnd) const;
- // inline-Weiche
+ // inline branch
SwTwips _GetFtnFrmHeight() const;
- // Aus CalcPreps ausgelagert.
+ // Outsourced to CalcPreps
bool CalcPrepFtnAdjust();
- // Fuer Ftn und WidOrp: Zwangsvalidierung
+ // For Ftn and WidOrp: Forced validation
void ValidateFrm();
void ValidateBodyFrm();
@@ -173,17 +170,17 @@ class SwTxtFrm: public SwCntntFrm
bool _IsFtnNumFrm() const;
- // 6995: Formatinformationen auffrischen
+ // Refresh formatting information
bool FormatQuick( bool bForceQuickFormat );
- // Opt: Leere Absaetze formatieren
+ // Opt: Format empty paragraphs
bool FormatEmpty();
SwTwips EmptyHeight() const;
- // Opt: Leere Absaetze painten
+
+ // Opt: Paint empty paragraphs
bool PaintEmpty( const SwRect &, bool bCheck ) const;
- void ChgThisLines();//Muss immer gerufen werden, wenn sich die Zeilenazahl
- //veraendert haben kann.
+ void ChgThisLines(); // Must always be called if the Line count could have changed
// required for 'new' relative anchor position
void CalcBaseOfstForFly();
@@ -213,71 +210,88 @@ protected:
public:
com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) SAL_OVERRIDE;
- //public, weil der eine oder andere die Methode rufen darf um das
- //Prepare zu sparen - mit Vorsicht zu geniessen!
+
+ /**
+ * This is public, as it needs to be called by some methods in order to save the Prepare
+ * USE WITH CAUTION!
+ */
void Init();
- // Wird von FormatSpelling( ) gerufen
+ /// Is called by FormatSpelling()
SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, sal_Int32 );
- // is called from the FormatSpelling( ) method
+
+ /// Is called by FormatSpelling()
SwRect SmartTagScan( SwCntntNode* , sal_Int32 );
- // Wird vom CollectAutoCmplWords gerufen
+
+ /// Is called by CollectAutoCmplWords()
void CollectAutoCmplWrds( SwCntntNode* , sal_Int32 );
- // Returns the screen position of rPos. The values are relative to the upper
- // left position of the page frame.
- // Additional information can be obtained by passing an SwCrsrMoveState object.
- // Returns false if rPos > number of character is string
+ /**
+ * Returns the screen position of rPos. The values are relative to the upper
+ * left position of the page frame.
+ * Additional information can be obtained by passing an SwCrsrMoveState object.
+ * Returns false if rPos > number of character is string
+ */
virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
SwCrsrMoveState* pCMS = 0 ) const SAL_OVERRIDE;
- // Eine etwas abgespeckte GetCharRect-Version fuer autopositionierte Rahmen
- bool GetAutoPos( SwRect &, const SwPosition& ) const;
-
- /** determine top of line for given position in the text frame
-
- OD 11.11.2003 #i22341#
- Assumption: given position exists in the text frame or in a follow of it
- OD 2004-02-02 - adjustment
- Top of first paragraph line is the top of the paragraph.
- OD 2004-03-18 #i11860# - Consider upper space amount considered for
- previous frame and the page grid.
- @param _onTopOfLine
- output parameter - top of line, if the given position is found in the
- text frame.
-
- @param _rPos
- input parameter - reference to the position in the text frame
+ /// A slimmer version of GetCharRect for autopositioning Frames
+ bool GetAutoPos( SwRect &, const SwPosition& ) const;
- @return boolean indicating, if the top of line for the given position
- has been determined or not.
- */
+ /**
+ * Determine top of line for given position in the text frame
+ *
+ * OD 11.11.2003 #i22341#
+ * Assumption: given position exists in the text frame or in a follow of it
+ * OD 2004-02-02 - adjustment
+ * Top of first paragraph line is the top of the paragraph.
+ * OD 2004-03-18 #i11860# - Consider upper space amount considered for
+ * previous frame and the page grid.
+ *
+ * @param _onTopOfLine
+ * output parameter - top of line, if the given position is found in the
+ * text frame.
+ *
+ * @param _rPos
+ * input parameter - reference to the position in the text frame
+ *
+ * @return boolean indicating, if the top of line for the given position
+ * has been determined or not.
+ */
bool GetTopOfLine( SwTwips& _onTopOfLine,
const SwPosition& _rPos ) const;
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const SAL_OVERRIDE;
- //Liefert in nOffset den Offset des Characters innerhalb des
- //gesetzten Textbuffers zurueck, welcher der durch aPoint
- //gegebenen Position innerhalb der SSize des Layout am
- //naechsten ist. Wenn der SPoint ausserhalb der SSize liegt,
- //liefert die Funktion false, true sonst.
+ /**
+ * In nOffset returns the offset of the char within the set
+ * text buffer, which is closest to the position provided by
+ * aPoint within the layout's SSize.
+ *
+ * @returns false if the SPoint is outside of the SSize else
+ * returns true
+ */
virtual bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0, bool bTestBackground = false ) const SAL_OVERRIDE;
- // GetKeyCrsrOfst sorgt dafuer, dass der Frame nicht gewechselt wird
- // (z.B. Wechsel in den zeichengebundenen Frame).
+ /**
+ * Makes sure that the Frame is not switched (e.g. switched for a
+ * character-bound Frame)
+ */
inline bool GetKeyCrsrOfst(SwPosition *pPos, const Point &rPoint ) const
{ return _GetCrsrOfst( pPos, rPoint, false ); }
- void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
+ void PaintExtraData( const SwRect & rRect ) const; /// Page number etc.
SwRect Paint();
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual bool GetInfo( SfxPoolItem & ) const SAL_OVERRIDE;
- //Layoutorientiertes Cursortravelling: Linker, rechter Rand,
- //vorhergehende/naechste Zeile, gleiche horizontale Position.
+ /**
+ * Layout oriented cursor travelling:
+ * Left border, right border, previous Line, following Line,
+ * same horizontal position
+ */
virtual bool LeftMargin(SwPaM *) const SAL_OVERRIDE;
virtual bool RightMargin(SwPaM *, bool bAPI = false) const SAL_OVERRIDE;
@@ -290,27 +304,28 @@ public:
bool _UnitDown(SwPaM *, const SwTwips nOffset = 0,
bool bSetInReadOnly = false ) const;
- // Prepares the cursor position for a visual cursor move (BiDi).
- // The behaviour is different for insert and overwrite cursors
+ /**
+ * Prepares the cursor position for a visual cursor move (BiDi).
+ * The behaviour is different for insert and overwrite cursors
+ */
void PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
bool& bRight, bool bInsertCrsr );
- // Methoden zur Verwaltung von FolgeFrames
- SwCntntFrm *SplitFrm( const sal_Int32 nTxtPos );
- SwCntntFrm *JoinFrm();
+ /// Methods to manage the FollowFrame
+ SwCntntFrm *SplitFrm( const sal_Int32 nTxtPos );
+ SwCntntFrm *JoinFrm();
inline sal_Int32 GetOfst() const { return nOfst; }
void _SetOfst( const sal_Int32 nNewOfst );
inline void SetOfst ( const sal_Int32 nNewOfst );
inline void ManipOfst ( const sal_Int32 nNewOfst ){ nOfst = nNewOfst; }
SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos);
inline const SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos) const;
- // OD 07.10.2003 #110978# - return <reference> instead of <pointer>
SwTxtFrm& GetFrmAtOfst( const sal_Int32 nOfst );
- // Wenn es einen Follow gibt und wir selbst keinen Text enthalten:
+ /// If there's a Follow and we don't contain text ourselves
inline bool IsEmptyMaster() const
{ return GetFollow() && !GetFollow()->GetOfst(); }
- // Liefert den zu bearbeitenden Textausschnitt zurueck (inline, s.u.)
+ /// Returns the text portion we want to edit (for inline see underneath)
const OUString& GetTxt() const;
inline SwTxtNode *GetTxtNode()
{ return static_cast< SwTxtNode* >( SwCntntFrm::GetNode()); }
@@ -320,35 +335,43 @@ public:
SwTxtFrm(SwTxtNode * const, SwFrm* );
virtual ~SwTxtFrm();
- // SwCntntFrm: der "kurze Dienstweg" fuer die Frames.
- // Wer den void* falsch casted ist selbst Schuld!
- // Auf jedenfall muss der void* auf 0 geprueft werden.
+ /**
+ * SwCntntFrm: the shortcut for the Frames
+ * If the void* casts wrongly, it's its own fault!
+ * The void* must be checked for 0 in any case!
+ */
virtual void Prepare( const PrepareHint ePrep = PREP_CLEAR,
const void *pVoid = 0, bool bNotify = true ) SAL_OVERRIDE;
- // nMaxHeight is the required height
- // bSplit indicates, that the paragraph has to be split
- // bTst indicates, that we are currently doing a test formatting
+ /**
+ * nMaxHeight is the required height
+ * bSplit indicates, that the paragraph has to be split
+ * bTst indicates, that we are currently doing a test formatting
+ */
virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ) SAL_OVERRIDE;
- // Hier das WouldFit-Aequivalent fuer mal kurz probeweise
- // umgehaengte TextFrames, auch hier liefert
- // nMaxHeight die benoetigte Hoehe,
- // und bSplit sagt, obj der Absatz gesplittet werden muss.
- // Uebergeben wird der potentielle Vorgaenger fuer die Abstandsberechnung
+ /**
+ * The WouldFit equivalent for temporarily rewired TextFrames
+ * nMaxHeight returns the required size here too and bSplit
+ * determines whether the paragraph needs to be split.
+ * We pass the potential predecessor for the distance calculation
+ */
bool TestFormat( const SwFrm* pPrv, SwTwips &nMaxHeight, bool &bSplit );
- // Wir formatieren eine Zeile fuer die interaktive Trennung
- // Return: found
+ /**
+ * We format a Line for interactive hyphenation
+ * @return found
+ */
bool Hyphenate( SwInterHyphInfo &rInf );
- // Probegrow
+ /// Test grow
inline SwTwips GrowTst( const SwTwips nGrow );
SwParaPortion *GetPara();
inline const SwParaPortion *GetPara() const;
inline bool HasPara() const;
bool _HasPara() const;
+
// If there are any hanging punctuation portions in the margin
// the offset will be returned.
SwTwips HangingMargin() const;
@@ -379,28 +402,26 @@ public:
inline bool IsSwapped() const { return bIsSwapped; }
- // Hat der Frm eine lokale Fussnote (in diesem Frm bzw. Follow)?
+ /// Does the Frm have a local footnote (in this Frm or Follow)?
#ifdef DBG_UTIL
- void CalcFtnFlag( sal_Int32 nStop = COMPLETE_STRING );//For testing SplitFrm
+ void CalcFtnFlag( sal_Int32 nStop = COMPLETE_STRING ); //For testing SplitFrm
#else
void CalcFtnFlag();
#endif
- // Hidden
+ /// Hidden
bool IsHiddenNow() const; // bHidden && pOut == pPrt
- void HideHidden(); // Anhaengsel entfernen wenn Hidden
+ void HideHidden(); // Remove appendage if Hidden
void HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd );
- /** method to hide/show objects
-
- OD 2004-01-15 #110582#
- method hides respectively shows objects, which are anchored at paragraph,
- at/as a character of the paragraph, corresponding to the paragraph and
- paragraph portion visibility.
- */
+ /**
+ * Hides respectively shows objects, which are anchored at paragraph,
+ * at/as a character of the paragraph, corresponding to the paragraph and
+ * paragraph portion visibility.
+ */
void HideAndShowObjects();
- // Ftn
+ /// Ftn
void RemoveFtn( const sal_Int32 nStart = 0,
const sal_Int32 nLen = COMPLETE_STRING );
inline SwTwips GetFtnFrmHeight() const;
@@ -409,46 +430,53 @@ public:
{ return FindFtnRef( pFtn ); }
void ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine );
- // Wenn wir eine Ftn sind, die auf ihre Referenz zu waechst...
- // public weil von SwCntntFrm::MakeAll benoetigt.
+ /**
+ * If we're a Ftn that grows towards its reference ...
+ * public, because it's needed by SwCntntFrm::MakeAll
+ */
SwTwips GetFtnLine( const SwTxtFtn *pFtn ) const;
- // Liefern den linken und den rechten Rand in
- // Dokumentkoordinaten (unter Beachtung der Absatzattribute).
+ /**
+ * Returns the left and the right margin document coordinates
+ * (taking the paragraph attributes into account)
+ */
inline SwTwips GetLeftMargin() const;
inline SwTwips GetRightMargin() const;
virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void CheckDirection( bool bVert ) SAL_OVERRIDE;
- // Liefert die Summe der Zeilenhoehen in pLine zurueck.
+ /// Returns the sum of line height in pLine
sal_uInt16 GetParHeight() const;
- // Liefert die Resthoehe zurueck
+ /// Returns the remaining height
inline SwTwips GetRstHeight() const;
inline SwTxtFrm *GetFollow();
inline const SwTxtFrm *GetFollow() const;
- // Suche die Seitennummer von ErgoSum und QuoVadis
+ /// Find the page number of ErgoSum and QuoVadis
SwTxtFrm *FindQuoVadisFrm();
- // holt die Formatierug nach, wenn der Idle-Handler zugeschlagen hat.
- // #i29062# GetFormatted() can trigger a full formatting
- // of the paragraph, causing other layout frames to become invalid. This
- // has to be avoided during painting. Therefore we need to pass the
- // information that we are currently in the paint process.
+ /**
+ * Makes up for formatting if the Idle Handler has struck
+ *
+ * #i29062# GetFormatted() can trigger a full formatting
+ * of the paragraph, causing other layout frames to become invalid. This
+ * has to be avoided during painting. Therefore we need to pass the
+ * information that we are currently in the paint process.
+ */
SwTxtFrm* GetFormatted( bool bForceQuickFormat = false );
- // wird demnaechst uebertragen
+ /// Will be moved soon
inline void SetFtn( const bool bNew ) { bFtn = bNew; }
- // Beruecksichtigung der Follows
+ /// Respect the Follows
inline bool IsInside( const sal_Int32 nPos ) const;
const SwBodyFrm *FindBodyFrm() const;
- // DropCaps und Selektionen
+ /// DropCaps and selections
inline bool GetDropRect( SwRect &rRect ) const
{ return HasPara() && _GetDropRect( rRect ); }
@@ -461,22 +489,25 @@ public:
inline sal_uInt16 GetCacheIdx() const { return nCacheIdx; }
inline void SetCacheIdx( const sal_uInt16 nNew ) { nCacheIdx = nNew; }
- //Entfert die Line-Informationen aus dem Cache.
+ /// Removes the Line information from the Cache
void ClearPara();
- // Bin ich ein FtnFrm, der eine Nummer am Absatzanfang hat?
+ /// Am I a FtnFrm, with a number at the start of the paragraph?
inline bool IsFtnNumFrm() const
{ return IsInFtn() && !GetIndPrev() && _IsFtnNumFrm(); }
- // simuliert eine Formatierung, als wenn es keinen rechten Rand und
- // keine Flys oder andere Hindernisse gaebe und liefert die Breite.
+ /**
+ * Simulates a formatting as if there were not right margin or Flys or other
+ * obstacles and returns the width
+ */
SwTwips CalcFitToContent();
- /** simulate format for a list item paragraph, whose list level attributes
- are in LABEL_ALIGNMENT mode, in order to determine additional first
- line offset for the real text formatting due to the value of label
- adjustment attribute of the list level.
- */
+ /**
+ * Simulate format for a list item paragraph, whose list level attributes
+ * are in LABEL_ALIGNMENT mode, in order to determine additional first
+ * line offset for the real text formatting due to the value of label
+ * adjustment attribute of the list level.
+ */
void CalcAdditionalFirstLineOffset();
inline SwTwips GetAdditionalFirstLineOffset() const
@@ -484,83 +515,115 @@ public:
return mnAdditionalFirstLineOffset;
}
- // liefert den zusaetzlichen Zeilenabstand fuer den naechsten Absatz
- // 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
+ /**
+ * Returns the additional line spacing for the next paragraph
+ * @param _bNoPropLineSpacing: control, whether the value of a
+ * proportional line spacing is returned or not
+ */
long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
- // liefert die erste Zeilenhoehe zurueck
+ /// Returns the first line height
sal_uInt16 FirstLineHeight() const;
- // Haengt FlyInCntFrm um, wenn nEnd > Index >= nStart ist.
+ /// Rewires FlyInCntFrm, if nEnd > Index >= nStart
void MoveFlyInCnt( SwTxtFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd );
- // Berechnet die Position von FlyInCntFrms
+ /// Calculates the position of FlyInCntFrms
sal_Int32 CalcFlyPos( SwFrmFmt* pSearch );
- // Ermittelt die Startposition und Schrittweite des Registers
+ /// Determines the start position and step size of the register
bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
- sal_uInt16 GetLineCount( sal_Int32 nPos ); //Ermittelt die Zeilenanzahl
+ /// Determines the line count
+ sal_uInt16 GetLineCount( sal_Int32 nPos );
- //Fuer die Anzeige der Zeilennummern.
+ /// For displaying the line numbers
sal_uLong GetAllLines() const { return nAllLines; }
sal_uLong GetThisLines() const { return nThisLines;}
void RecalcAllLines();
- // Stoppt Animationen innerhalb von Numerierungen
+ /// Stops the animations within numberings
void StopAnimation( OutputDevice *pOut );
- // visit all portions for Accessibility
+ /// Visit all portions for Accessibility
void VisitPortions( SwPortionHandler& rPH ) const;
- // returns the script info stored at the paraportion
+ /// Returns the script info stored at the paraportion
const SwScriptInfo* GetScriptInfo() const;
- // Swaps width and height of the text frame
+ /// Swaps width and height of the text frame
void SwapWidthAndHeight();
- // Calculates the coordinates of a rectangle when switching from
- // horizontal to vertical layout.
+
+ /**
+ * Calculates the coordinates of a rectangle when switching from
+ * horizontal to vertical layout
+ */
void SwitchHorizontalToVertical( SwRect& rRect ) const;
- // Calculates the coordinates of a point when switching from
- // horizontal to vertical layout.
+
+ /**
+ * Calculates the coordinates of a point when switching from
+ * horizontal to vertical layout
+ */
void SwitchHorizontalToVertical( Point& rPoint ) const;
- // Calculates the a limit value when switching from
- // horizontal to vertical layout.
+
+ /**
+ * Calculates the a limit value when switching from
+ * horizontal to vertical layout
+ */
long SwitchHorizontalToVertical( long nLimit ) const;
- // Calculates the coordinates of a rectangle when switching from
- // vertical to horizontal layout.
+
+ /**
+ * Calculates the coordinates of a rectangle when switching from
+ * vertical to horizontal layout
+ */
void SwitchVerticalToHorizontal( SwRect& rRect ) const;
- // Calculates the coordinates of a point when switching from
- // vertical to horizontal layout.
+
+ /**
+ * Calculates the coordinates of a point when switching from
+ * vertical to horizontal layout
+ */
void SwitchVerticalToHorizontal( Point& rPoint ) const;
- // Calculates the a limit value when switching from
- // vertical to horizontal layout.
+
+ /**
+ * Calculates the a limit value when switching from
+ * vertical to horizontal layout
+ */
long SwitchVerticalToHorizontal( long nLimit ) const;
- // Calculates the coordinates of a rectangle when switching from
- // LTR to RTL layout
+ /**
+ * Calculates the coordinates of a rectangle when switching from
+ * LTR to RTL layout
+ */
void SwitchLTRtoRTL( SwRect& rRect ) const;
- // Calculates the coordinates of a point when switching from
- // LTR to RTL layout.
+
+ /**
+ * Calculates the coordinates of a point when switching from
+ * LTR to RTL layout
+ */
void SwitchLTRtoRTL( Point& rPoint ) const;
- // Calculates the coordinates of a rectangle when switching from
- // RTL to LTR layout
+
+ /**
+ * Calculates the coordinates of a rectangle when switching from
+ * RTL to LTR layout
+ */
inline void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
- // Calculates the coordinates of a point when switching from
- // RTL to LTR layout.
+
+ /**
+ * Calculates the coordinates of a point when switching from
+ * RTL to LTR layout
+ */
inline void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
- // OD 14.03.2003 #i11760# - access to new member <mbNoFollowFormat>
inline bool FollowFormatAllowed() const
{
return mbFollowFormatAllowed;
}
+
inline void AllowFollowFormat()
{
mbFollowFormatAllowed = true;
}
+
inline void ForbidFollowFormat()
{
mbFollowFormatAllowed = false;
@@ -573,7 +636,6 @@ public:
mnFlyAnchorOfstNoWrap );
}
- // OD 2004-03-17 #i11860#
inline SwTwips GetHeightOfLastLine() const
{
return mnHeightOfLastLine;
@@ -605,7 +667,7 @@ inline bool SwTxtFrm::HasPara() const
return nCacheIdx!=USHRT_MAX && _HasPara();
}
-// 9104: Frm().Height() - Prt().Height(), siehe widorp.cxx und 7455, 6114, 7908
+/// 9104: Frm().Height() - Prt().Height(), see widorp.cxx and 7455, 6114, 7908
inline SwTwips SwTxtFrm::GetRstHeight() const
{
return !GetUpper() ? 0 : ((const SwFrm*)GetUpper())->Frm().Top()
@@ -714,8 +776,10 @@ inline void SwTxtFrm::ResetBlinkPor() const
if ( bUndoSwap )\
((SwTxtFrm*)pFrm)->SwapWidthAndHeight();
-// Helper class which can be used instead of the macros if a function
-// has too many returns
+/**
+ * Helper class which can be used instead of the macros if a function
+ * has too many returns
+ */
class SwFrmSwapper
{
const SwTxtFrm* pFrm;
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index f6f86843249b..66a652510944 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -55,47 +55,45 @@ class SwViewImp
{
friend class SwViewShell;
- friend class SwLayAction; //Lay- und IdleAction tragen sich ein und aus.
+ friend class SwLayAction; // Lay- and IdleAction register and deregister
friend class SwLayIdle;
// for paint of page preview
friend class SwPagePreviewLayout;
- SwViewShell *pSh; //Falls jemand einen Imp durchreicht und doch
- //mal eine SwViewShell braucht hier die
- //Rueckwaertsverkettung.
+ SwViewShell *pSh; // If someone passes an Imp, but needs a SwViewShell, we
+ // keep a backlink here
- SwDrawView *pDrawView; //Unsere DrawView
- SdrPageView *pSdrPageView; //Genau eine Seite fuer unsere DrawView
+ SwDrawView *pDrawView; // Our DrawView
+ SdrPageView *pSdrPageView; // Exactly one Page for our DrawView
- SwPageFrm *pFirstVisPage;//Zeigt immer auf die erste sichtbare Seite.
- SwRegionRects *pRegion; //Sammler fuer Paintrects aus der LayAction.
+ SwPageFrm *pFirstVisPage; // Always points to the first visible Page
+ SwRegionRects *pRegion; // Collector of Paintrects from the LayAction
- SwLayAction *pLayAct; //Ist gesetzt wenn ein Action-Objekt existiert
- //Wird vom SwLayAction-CTor ein- und vom DTor
- //ausgetragen.
- SwLayIdle *pIdleAct; //Analog zur SwLayAction fuer SwLayIdle.
+ SwLayAction *pLayAct; // Is set if an Action object exists
+ // Is registered by the SwLayAction ctor and deregistered by the dtor
+ SwLayIdle *pIdleAct; // The same as SwLayAction for SwLayIdle
- SwAccessibleMap *pAccMap; // Accessible Wrappers
+ SwAccessibleMap *pAccMap; // Accessible wrappers
mutable const SdrObject * pSdrObjCached;
mutable OUString sSdrObjCachedComment;
- bool bFirstPageInvalid : 1; //Pointer auf erste Seite ungueltig?
- bool bResetHdlHiddenPaint : 1;// -- "" --
- bool bSmoothUpdate : 1; //Meber fuer SmoothScroll
+ bool bFirstPageInvalid : 1; // Pointer to the first Page invalid?
+ bool bResetHdlHiddenPaint : 1; // Ditto
+ bool bSmoothUpdate : 1; // For SmoothScroll
bool bStopSmooth : 1;
- sal_uInt16 nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
+ sal_uInt16 nRestoreActions ; // Count for the Action that need to be restored (UNO)
SwRect aSmoothRect;
SwPagePreviewLayout* mpPgPreviewLayout;
- void SetFirstVisPage(); //Neue Ermittlung der ersten sichtbaren Seite
+ void SetFirstVisPage(); // Recalculate the first visible Page
- void StartAction(); //Henkel Anzeigen und verstecken.
- void EndAction(); //gerufen von SwViewShell::ImplXXXAction
- void LockPaint(); //dito, gerufen von SwViewShell::ImplLockPaint
+ void StartAction(); // Show handle and hide
+ void EndAction(); // Called by SwViewShell::ImplXXXAction
+ void LockPaint(); // Ditto; called by SwViewShell::ImplLockPaint
void UnlockPaint();
private:
@@ -140,14 +138,14 @@ private:
public:
SwViewImp( SwViewShell * );
~SwViewImp();
- void Init( const SwViewOption * ); //nur fuer SwViewShell::Init()
+ void Init( const SwViewOption * ); /// Only for SwViewShell::Init()
const SwViewShell *GetShell() const { return pSh; }
SwViewShell *GetShell() { return pSh; }
Color GetRetoucheColor() const;
- //Verwaltung zur ersten sichtbaren Seite
+ /// Management of the first visible Page
inline const SwPageFrm *GetFirstVisPage() const;
inline SwPageFrm *GetFirstVisPage();
void SetFirstVisPageInvalid() { bFirstPageInvalid = true; }
@@ -156,7 +154,7 @@ public:
SwRegionRects *GetRegion() { return pRegion; }
void DelRegion();
- // neues Interface fuer StarView Drawing
+ /// New Interface for StarView Drawing
bool HasDrawView() const { return 0 != pDrawView; }
SwDrawView* GetDrawView() { return pDrawView; }
const SwDrawView* GetDrawView() const { return pDrawView; }
@@ -164,16 +162,14 @@ public:
const SdrPageView*GetPageView() const { return pSdrPageView; }
void MakeDrawView();
- // add 3rd parameter <const Color* pPageBackgrdColor> for setting this
- // color as the background color at the outliner of the draw view
- // for painting layers <hell> and <heaven>
-
- // add 4th parameter for the horizontal text
- // direction of the page in order to set the default horizontal text
- // direction at the outliner of the draw view for painting layers <hell>
- // and <heaven>.
-
- // #i76669# - added parameter <pRedirector>
+ /**
+ * @param _pPageBackgrdColor for setting this color as the background color
+ * at the outliner of the draw view for painting layers "hell" and "heaven"
+ *
+ * @param _bIsPageRightToLeft for the horizontal text direction of the page
+ * in order to set the default horizontal text direction at the outliner of
+ * the draw view for painting layers "hell" and "heaven"
+ */
void PaintLayer( const SdrLayerID _nLayerID,
SwPrintData const*const pPrintData,
const SwRect& _rRect,
@@ -181,14 +177,16 @@ public:
const bool _bIsPageRightToLeft = false,
sdr::contact::ViewObjectContactRedirector* pRedirector = 0 ) const;
- //wird als Link an die DrawEngine uebergeben, entscheidet was wie
- //gepaintet wird oder nicht.
+ /**
+ * Is passed to the DrawEngine as a Link and decides what is painted
+ * or not and in what way
+ */
// Interface Drawing
bool IsDragPossible( const Point &rPoint );
void NotifySizeChg( const Size &rNewSz );
- //SS Fuer die Lay- bzw. IdleAction und verwandtes
+ /// SS for the Lay-/IdleAction and relatives
bool IsAction() const { return pLayAct != 0; }
bool IsIdleAction() const { return pIdleAct != 0; }
SwLayAction &GetLayAction() { return *pLayAct; }
@@ -196,12 +194,20 @@ public:
SwLayIdle &GetIdleAction() { return *pIdleAct;}
const SwLayIdle &GetIdleAction() const { return *pIdleAct;}
- //Wenn eine Aktion laueft wird diese gebeten zu pruefen ob es
- //an der zeit ist den WaitCrsr einzuschalten.
+ /**
+ * If an Action is running we ask it to check whether it's time
+ * to enable the WaitCrsr
+ */
void CheckWaitCrsr();
- bool IsCalcLayoutProgress() const; //Fragt die LayAction wenn vorhanden.
- //true wenn eine LayAction laeuft, dort wird dann auch das Flag fuer
- //ExpressionFields gesetzt.
+
+ /// Asks the LayAction if present
+ bool IsCalcLayoutProgress() const;
+
+ /**
+ * @returns true if a LayAction is running
+ *
+ * There we also set the Flag for ExpressionFields
+ */
bool IsUpdateExpFlds();
void SetRestoreActions(sal_uInt16 nSet){nRestoreActions = nSet;}
@@ -214,47 +220,47 @@ public:
return mpPgPreviewLayout;
}
- // Is this view accessible?
+ /// Is this view accessible?
bool IsAccessible() const { return pAccMap != 0; }
inline SwAccessibleMap& GetAccessibleMap();
- // Update (this) accessible view
+ /// Update (this) accessible view
void UpdateAccessible();
- // Remove a frame from the accessible view
+ /// Remove a frame from the accessible view
void DisposeAccessible( const SwFrm *pFrm, const SdrObject *pObj,
bool bRecursive );
inline void DisposeAccessibleFrm( const SwFrm *pFrm,
bool bRecursive = false );
inline void DisposeAccessibleObj( const SdrObject *pObj );
- // Move a frame's position in the accessible view
+ /// Move a frame's position in the accessible view
void MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
const SwRect& rOldFrm );
inline void MoveAccessibleFrm( const SwFrm *pFrm, const SwRect& rOldFrm );
- // Add a frame in the accessible view
+ /// Add a frame in the accessible view
inline void AddAccessibleFrm( const SwFrm *pFrm );
inline void AddAccessibleObj( const SdrObject *pObj );
- // Invalidate accessible frame's frame's content
+ /// Invalidate accessible frame's frame's content
void InvalidateAccessibleFrmContent( const SwFrm *pFrm );
- // Invalidate accessible frame's cursor position
+ /// Invalidate accessible frame's cursor position
void InvalidateAccessibleCursorPosition( const SwFrm *pFrm );
- // Invalidate editable state for all accessible frames
+ /// Invalidate editable state for all accessible frames
void InvalidateAccessibleEditableState( bool bAllShells = true,
const SwFrm *pFrm=0 );
- // Invalidate frame's relation set (for chained frames)
+ /// Invalidate frame's relation set (for chained frames)
void InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
const SwFlyFrm *pFollow );
- // update data for accessible preview
- // change method signature due to new page preview functionality
+ /// update data for accessible preview
+ /// change method signature due to new page preview functionality
void UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,
@@ -262,7 +268,7 @@ public:
void InvalidateAccessiblePreviewSelection( sal_uInt16 nSelPage );
- // Fire all accessible events that have been collected so far
+ /// Fire all accessible events that have been collected so far
void FireAccessibleEvents();
};