[Libreoffice-commits] .: 4 commits - sw/source

Philipp Weissenbacher p.weissenbacher at kemper.freedesktop.org
Wed Jun 13 11:35:18 PDT 2012


 sw/source/core/inc/dflyobj.hxx                 |    1 
 sw/source/core/inc/fieldhint.hxx               |    1 
 sw/source/core/inc/finalthreadmanager.hxx      |    5 
 sw/source/core/inc/flowfrm.hxx                 |  132 ++++++++++++-------------
 sw/source/core/inc/flyfrm.hxx                  |  121 ++++++++++++----------
 sw/source/core/inc/fntcache.hxx                |    4 
 sw/source/core/inc/frame.hxx                   |    4 
 sw/source/core/inc/frmtool.hxx                 |    1 
 sw/source/core/inc/ifinishedthreadlistener.hxx |    7 -
 sw/source/core/inc/ithreadlistenerowner.hxx    |    9 -
 sw/source/core/inc/laycache.hxx                |    4 
 sw/source/core/inc/layouter.hxx                |    1 
 12 files changed, 146 insertions(+), 144 deletions(-)

New commits:
commit 1dc9da9c8ebe931f3859381353001107520c449c
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Wed Jun 13 20:34:39 2012 +0200

    Fix last line whitespace problem
    
    Change-Id: I9df71fd2db17cda15a19b41b0ff389bc2e49eecc

diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 3158a13..d22ca41 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -295,4 +295,3 @@ public:
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-
commit 44087de2c00fb63e637e551e929a203cb7f80b19
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Wed Jun 13 15:08:58 2012 +0200

    translate German comments in (and minor clean up of) sw/source/core/inc/{flowfrm,flyfrm}.hxx

diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index c10e7b3..4b8db8b 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -25,29 +25,10 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _FLOWFRM_HXX
 #define _FLOWFRM_HXX
 
-//Der FlowFrm gibt die Funktionalitaet fuer alle Frms vor, die fliessen und
-//die sich aufspalten koennen (wie CntntFrm oder TabFrm).
-//Teile der Funktionalitaet sind im FlowFrm implementiert, andere Teile werden
-//von den spezifischen Frms implementiert.
-//Der FlowFrm ist kein eigenstaender Frm, es kann also auch niemals eine
-//eigenstaendige Instanz vom FlowFrm existieren.
-//Der FlowFrm ist nicht einmal ein echter Frm. Die naheliegende Implementierung
-//waere ein FlowFrm der virtual vom SwFrm abgeleitet ist und direkt auf den
-//eigenen Instanzdaten arbeitet. Abgeleitete Klassen muessten sich
-//vom FlowFrm und (ueber mehrere Basisklassen weil der Klassenbaum sich direkt
-//vom SwFrm zu SwCntntFrm und zum SwLayoutFrm spaltet) virtual vom SwFrm
-//ableiten.
-//Leider entstehen dadurch - neben Problemen mit Compilern und Debuggern -
-//erhebliche zusaetzliche Kosten, die wir uns heutzutage IMHO nicht erlauben
-//koennen.
-//Ich greife deshalb auf eine andere Technik zurueck: Der FlowFrm hat eine
-//Referenz auf den SwFrm - der er genau betrachtet selbst ist - und ist mit
-//diesem befreundet. So kann der FlowFrm anstelle des this-Pointer mit der
-//Referenz auf den SwFrm arbeiten.
-
 class SwPageFrm;
 class SwRect;
 class SwBorderAttrs;
@@ -58,10 +39,32 @@ class SwObjectFormatterTxtFrm;
 
 void MakeFrms( SwDoc *, const SwNodeIndex &, const SwNodeIndex & );
 
-/// Base class for frames that are allowed at page breaks and shall continue on the next page, e.g. paragraphs, tables.
+/** Base class that provides the general functionalities for frames that are
+    allowed at page breaks (flow) and shall continue on the next page (can be
+    split), e.g. paragraphs (CntntFrm) or tables (TabFrm).
+
+    Some parts of these functionalities are implemented in FlowFrm while the
+    specific ones are done in the corresponding Frm classes. The FlowFrm has to
+    be seen as a base class. As such it is no Frm by itself and thus no direct
+    instances of FlowFrm can exist.
+
+    Actually it is not even a real Frm. The obvious implementation would be a
+    FlowFrm that is virtually inherited from SwFrm and that works with its own
+    member data. Further classes would need to inherit from FlowFrm and (via
+    multiple base classes since the class tree splits exactly at the branch
+    from SwFrm to SwCntntFrm and SwLayoutFrm) also virtually from SwFrm as
+    well. Unfortunately, this leads - besides problems with compilers and
+    debugging programs - to high additional costs, that we IMHO are not able to
+    afford nowadays.
+
+    Hence, we use another technique: A FlowFrm keeps a reference to a SwFrm
+    - which it is actually itself - and they are friends. As a result, the
+    FlowFrm can work with the reference to the SwFrm instead of working with
+    its own this-pointer.
+ */
 class SwFlowFrm
 {
-    //PrepareMake darf Locken/Unlocken (Robustheit)
+    // PrepareMake is allowed to lock/unlock (robustness)
     friend inline void PrepareLock  ( SwFlowFrm * );
     friend inline void PrepareUnlock( SwFlowFrm * );
     friend inline void TableSplitRecalcLock( SwFlowFrm * );
@@ -69,7 +72,7 @@ class SwFlowFrm
     // #i44049#
     friend class SwObjectFormatterTxtFrm;
 
-    //TblSel darf das Follow-Bit zuruecksetzen.
+    // TblSel is allowed to reset the follow-bit
     friend inline void UnsetFollow( SwFlowFrm *pFlow );
 
     friend void MakeFrms( SwDoc *, const SwNodeIndex &, const SwNodeIndex & );
@@ -78,13 +81,16 @@ class SwFlowFrm
 
     SwFrm &rThis;
 
-    //Hilfsfunktionen fuer MoveSubTree()
+    // helper methods for MoveSubTree()
     static SwLayoutFrm *CutTree( SwFrm* );
     static sal_Bool   PasteTree( SwFrm *, SwLayoutFrm *, SwFrm *, SwFrm* );
 
-    //Wird fuer das Zusammenspiel von _GetPrevxxx und MoveBwd gebraucht, damit
-    //mehrere Blaetter gleichzeitig uebersprungen werden koennen.
-    //Wird auch vom MoveBwd des TabFrm ausgewertet!
+    /** indicates that a backward move was done over multiple pages
+
+        Needed for the interaction of _GetPrevxxx and MoveBwd so that multiple
+        pages can be skipped at the same time. In addition, it is evaluated by
+        the MoveBwd() method in TabFrm.
+    */
     static sal_Bool bMoveBwdJump;
 
     /** helper method to determine previous frame for calculation of the
@@ -114,43 +120,44 @@ class SwFlowFrm
                                 const SwTwips _nUpperSpaceWithoutGrid ) const;
 
 protected:
-
     SwFlowFrm *m_pFollow;
     SwFlowFrm *m_pPrecede;
 
-    sal_Bool bLockJoin  :1; //Join (und damit deleten) verboten wenn sal_True!
-    sal_Bool bUndersized:1; // wir sind kleiner als gewuenscht
-    sal_Bool bFlyLock   :1; //  Stop positioning of at-character flyframes
+    sal_Bool bLockJoin  :1; // if sal_True than joins (and thus deletes) are prohibited!
+    sal_Bool bUndersized:1; // I am smaller than needed
+    sal_Bool bFlyLock   :1; // stop positioning of at-character flyframes
 
-    //Prueft ob Vorwaertsfluss noch Sinn macht Endloswanderschaften (unterbinden)
+    // checks if forward flow makes sense to prevent infinite moves
     inline sal_Bool IsFwdMoveAllowed();
     // #i44049# - method <CalcCntnt(..)> has to check this property.
     friend void CalcCntnt( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow );
-    sal_Bool IsKeepFwdMoveAllowed();    //Wie oben, Move fuer Keep.
+    sal_Bool IsKeepFwdMoveAllowed();    // like above, forward flow for Keep.
+
+    /** method to determine overlapping of an object that requests floating
 
-    //Prueft ob ein Obj das Umlauf wuenscht ueberlappt.
-    //eine Null bedeutet, kein Objekt ueberlappt,
-    // 1 heisst, Objekte, die am FlowFrm selbst verankert sind, ueberlappen
-    // 2 heisst, Objekte, die woanders verankert sind, ueberlappen
-    // 3 heistt, beiderlei verankerte Objekte ueberlappen
+        0: no overlapping
+        1: objects that are anchored at the FlowFrm overlap
+        2: objects that are anchored somewhere else overlap
+        3: both types of objects overlap
+    */
     sal_uInt8 BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect );
 
     void LockJoin()   { bLockJoin = sal_True;  }
     void UnlockJoin() { bLockJoin = sal_False; }
 
-            sal_Bool CheckMoveFwd( bool& rbMakePage, sal_Bool bKeep, sal_Bool bMovedBwd );
-            sal_Bool MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways = sal_False );
+    sal_Bool CheckMoveFwd( bool& rbMakePage, sal_Bool bKeep, sal_Bool bMovedBwd );
+    sal_Bool MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways = sal_False );
+    sal_Bool MoveBwd( sal_Bool &rbReformat );
     virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat )=0;
-            sal_Bool MoveBwd( sal_Bool &rbReformat );
 
 public:
     SwFlowFrm( SwFrm &rFrm );
     virtual ~SwFlowFrm();
 
-    const SwFrm *GetFrm() const            { return &rThis; }
-          SwFrm *GetFrm()                  { return &rThis; }
+    const SwFrm *GetFrm() const { return &rThis; }
+          SwFrm *GetFrm()       { return &rThis; }
 
-    static sal_Bool IsMoveBwdJump()            { return bMoveBwdJump; }
+    static sal_Bool IsMoveBwdJump() { return bMoveBwdJump; }
     static void SetMoveBwdJump( sal_Bool bNew ){ bMoveBwdJump = bNew; }
 
     inline void SetUndersized( const sal_Bool bNew ) { bUndersized = bNew; }
@@ -158,20 +165,18 @@ public:
 
     sal_Bool IsPrevObjMove() const;
 
-    //Die Kette mit minimalen Operationen und Benachrichtigungen unter den
-    //neuen Parent Moven.
+    /** hook tree onto new parent with minimal operations and notifications */
     void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 );
 
-           sal_Bool       HasFollow() const    { return m_pFollow ? sal_True : sal_False; }
-           sal_Bool       IsFollow()     const { return 0 != m_pPrecede; }
-    const  SwFlowFrm *GetFollow() const    { return m_pFollow;   }
-           SwFlowFrm *GetFollow()          { return m_pFollow;   }
-           sal_Bool       IsAnFollow( const SwFlowFrm *pFlow ) const;
-           void       SetFollow(SwFlowFrm *const pFollow);
-
-    const  SwFlowFrm *GetPrecede() const   { return m_pPrecede;   }
-           SwFlowFrm *GetPrecede()         { return m_pPrecede;   }
+    sal_Bool HasFollow() const { return m_pFollow ? sal_True : sal_False; }
+    sal_Bool IsFollow() const { return 0 != m_pPrecede; }
+    sal_Bool IsAnFollow( const SwFlowFrm *pFlow ) const;
+    const SwFlowFrm *GetFollow() const { return m_pFollow; }
+          SwFlowFrm *GetFollow()       { return m_pFollow; }
+    void SetFollow(SwFlowFrm *const pFollow);
 
+    const SwFlowFrm *GetPrecede() const { return m_pPrecede; }
+          SwFlowFrm *GetPrecede()       { return m_pPrecede; }
 
     sal_Bool IsJoinLocked() const { return bLockJoin; }
     sal_Bool IsAnyJoinLocked() const { return bLockJoin || HasLockedFollow(); }
@@ -179,7 +184,7 @@ public:
     sal_Bool IsPageBreak( sal_Bool bAct ) const;
     sal_Bool IsColBreak( sal_Bool bAct ) const;
 
-    //Ist ein Keep zu beruecksichtigen (Breaks!)
+    /** method to determine if a Keep needs to be considered (Breaks!) */
     sal_Bool IsKeep( const SwAttrSet& rAttrs, bool bBreakCheck = false ) const;
 
     sal_Bool HasLockedFollow() const;
@@ -188,9 +193,10 @@ public:
 
     /** method to determine the upper space hold by the frame
 
-        #i11860# - add 3rd parameter <_bConsiderGrid> to get
-        the upper space with and without considering the page grid
-        (default value: <sal_True>)
+        #i11860#
+
+        @param _bConsiderGrid
+        optional input parameter - consider the page grid while calculating?
     */
     SwTwips CalcUpperSpace( const SwBorderAttrs *pAttrs = NULL,
                             const SwFrm* pPr = NULL,
@@ -204,8 +210,7 @@ public:
     */
     SwTwips GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const;
 
-    /** calculation of lower space
-    */
+    /** calculation of lower space */
     SwTwips CalcLowerSpace( const SwBorderAttrs* _pAttrs = 0L ) const;
 
     /** calculation of the additional space to be considered, if flow frame
@@ -228,8 +233,8 @@ public:
     void SetFlyLock( sal_Bool bNew ){ bFlyLock = bNew; }
     sal_Bool IsFlyLock() const {    return bFlyLock; }
 
-    //casten einen Frm auf einen FlowFrm - wenns denn einer ist, sonst 0
-    //Diese Methoden muessen fuer neue Ableitungen geaendert werden!
+    // Casting of a Frm into a FlowFrm (if it is one, otherwise 0)
+    // These methods need to be customized in subclasses!
     static       SwFlowFrm *CastFlowFrm( SwFrm *pFrm );
     static const SwFlowFrm *CastFlowFrm( const SwFrm *pFrm );
 };
@@ -238,7 +243,6 @@ inline sal_Bool SwFlowFrm::IsFwdMoveAllowed()
 {
     return rThis.GetIndPrev() != 0;
 }
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 170064e..3158a13 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef SW_FLYFRM_HXX
 #define SW_FLYFRM_HXX
 
@@ -46,27 +47,32 @@ class SwFmt;
 
 #include <anchoredobject.hxx>
 
-//Sucht ausgehend von pOldAnch einen Anker fuer Absatzgebundene Rahmen.
-//Wird beim Draggen von Absatzgebundenen Objekten zur Ankeranzeige sowie
-//fuer Ankerwechsel benoetigt.
-//implementiert in layout/flycnt.cxx
+/** search an anchor for paragraph bound frames starting from pOldAnch
+
+    needed for dragging of objects bound to a paragraph for showing an anchor
+    indicator as well as for changing the anchor.
+
+    implemented in layout/flycnt.cxx
+ */
 const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
                               const sal_Bool bBody = sal_False );
 
-// berechnet das Rechteck, in dem das Objekt bewegt bzw. resized werden darf
+/** calculate rectangle in that the object can be moved or rather be resized */
 sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove = sal_True );
 
-//allg. Basisklasse fuer alle Freifliegenden Rahmen
-// #i26791# - inherit also from <SwAnchoredFlyFrm>
+/** general base class for all free-flowing frames
+
+    #i26791# - inherit also from <SwAnchoredFlyFrm>
+*/
 class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject
 {
-    //darf Locken. Definiert in frmtool.cxx
+    // is allowed to lock, implemented in frmtool.cxx
     friend void AppendObjs   ( const SwSpzFrmFmts *, sal_uLong, SwFrm *, SwPageFrm * );
     friend void Notify( SwFlyFrm *, SwPageFrm *pOld, const SwRect &rOld,
                         const SwRect* pOldPrt );
 
-    void InitDrawObj( sal_Bool bNotify );   //Wird von den CToren gerufen.
-    void FinitDrawObj();                //Wird vom CTor gerufen.
+    void InitDrawObj( sal_Bool bNotify ); // these to methods are called in the
+    void FinitDrawObj();                  // constructors
 
     void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
                       SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
@@ -77,51 +83,50 @@ class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject
     SwVirtFlyDrawObj* CreateNewRef( SwFlyDrawContact* );
 
 protected:
-
-    SwFlyFrm *pPrevLink,        // Vorgaenger/Nachfolger fuer Verkettung mit
-             *pNextLink;        // Textfluss
-
-    // #i26791# - moved to <SwAnchoredObject>
-//    Point aRelPos;   //Die Relative Position zum Master
+    // Predecessor/Successor for chaining with text flow
+    SwFlyFrm *pPrevLink, *pNextLink;
 
 private:
-    sal_Bool bLocked    :1; //Cntnt-gebundene Flys muessen derart blockiert werden
-                        //koennen, dass sie nicht Formatiert werden; :MakeAll
-                        //returnt dann sofort. Dies ist bei Seitenwechseln
-                        //waehrend der Formatierung notwendig.
-                        //Auch wahrend des RootCTors ist dies notwendig da
-                        //sonst der Anker formatiert wird obwohl die Root noch
-                        //nicht korrekt an der Shell haengt und weil sonst
-                        //initial zuviel Formatiert wuerde.
-    sal_Bool bNotifyBack:1; //sal_True wenn am Ende eines MakeAll() der Background
-                        //vom NotifyDTor benachrichtigt werden muss.
-protected:
+    // It must be possible to block Cntnt-bound flys so that they will be not
+    // formatted; in this case MakeAll() returns immediately. This is necessary
+    // for page changes during formattting. In addition, it is needed during
+    // the constructor call of the root object since otherwise the anchor will
+    // be formatted before the root is anchored correctly to a shell and
+    // because too much would be formatted as a result.
+    sal_Bool bLocked :1;
+    // sal_True if the background of NotifyDTor needs to be notified at the end
+    // of a MakeAll() call.
+    sal_Bool bNotifyBack :1;
 
-    sal_Bool bInvalid :1;   //Pos, PrtArea od. SSize wurden Invalidiert, sie werden
-                        //gleich wieder Validiert, denn sie muessen _immer_
-                        //gueltig sein. Damit in LayAction korrekt gearbeitet
-                        //werden kann muss hier festgehalten werden, dass sie
-                        //invalidiert wurden. Ausnahmen bestaetigen die Regelt!
-    sal_Bool bMinHeight:1;  //sal_True wenn die vom Attribut vorgegebene Hoehe eine
-                        //eine Minimalhoehe ist (der Frm also bei Bedarf
-                        //darueberhinaus wachsen kann).
-    sal_Bool bHeightClipped :1; //sal_True wenn der Fly nicht die Pos/Size anhand der Attrs
-    sal_Bool bWidthClipped  :1; //formatieren konnte, weil z.B. nicht genug Raum vorh.
-                            //war.
-    sal_Bool bFormatHeightOnly  :1; //Damit nach einer Anpassung der Breite
-                                //(CheckClip) nur das Format aufgerufen wird;
-                                //nicht aber die Breite anhand der Attribute
-                                //wieder bestimmt wird.
-    sal_Bool bInCnt         :1; // FLY_AS_CHAR, anchored as character
-    sal_Bool bAtCnt         :1; // FLY_AT_PARA, anchored at paragraph
-    sal_Bool bLayout        :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
-    sal_Bool bAutoPosition  :1; // FLY_AT_CHAR, anchored at character
-    sal_Bool bNoShrink      :1; // temporary forbud of shrinking to avoid loops
-    sal_Bool bLockDeleteContent :1;           // If the flag is set, the content of the
-                                        // fly frame is not deleted if moved to
-                                        // invisible layer.
-
-    friend class SwNoTxtFrm; // Darf NotifyBackground rufen
+protected:
+    // Pos, PrtArea or SSize have been invalidated - they will be evaluated
+    // again immediately because they have to be valid _at all time_.
+    // The invalidation is tracked here so that LayAction knows about it and
+    // can handle it properly. Exceptions prove the rule.
+    sal_Bool bInvalid :1;
+
+    // sal_True if the proposed height of an attribute is a minimal height
+    // (this means that the frame can grow higher if needed)
+    sal_Bool bMinHeight :1;
+    // sal_True if the fly frame could not format position/size based on its
+    // attributes, e.g. because there was not enough space.
+    sal_Bool bHeightClipped :1;
+    sal_Bool bWidthClipped :1;
+    // If sal_True call only the format after adjusting the width (CheckClip);
+    // but the width will not be re-evaluated based on the attributes.
+    sal_Bool bFormatHeightOnly :1;
+
+    sal_Bool bInCnt :1;        //< FLY_AS_CHAR, anchored as character
+    sal_Bool bAtCnt :1;        //< FLY_AT_PARA, anchored at paragraph
+    sal_Bool bLayout :1;       //< FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
+    sal_Bool bAutoPosition :1; //< FLY_AT_CHAR, anchored at character
+
+    sal_Bool bNoShrink :1;     //< temporary forbid shrinking to avoid loops
+    // If sal_True, the content of the fly frame will not be deleted when it
+    // is moved to an invisible layer.
+    sal_Bool bLockDeleteContent :1;
+
+    friend class SwNoTxtFrm; // is allowed to call NotifyBackground
 
     virtual void Format( const SwBorderAttrs *pAttrs = 0 );
     void MakePrtArea( const SwBorderAttrs &rAttrs );
@@ -157,7 +162,7 @@ public:
     TYPEINFO();
 
     virtual ~SwFlyFrm();
-        // erfrage vom Client Informationen
+    // get client information
     virtual sal_Bool GetInfo( SfxPoolItem& ) const;
     virtual void Paint( SwRect const&,
                         SwPrintData const*const pPrintData = NULL ) const;
@@ -230,12 +235,13 @@ public:
                      const sal_Bool _bForPaint = sal_False ) const;
 
 
-    //Auf dieser Shell painten (PreView, Print-Flag usw. rekursiv beachten)?.
+    // Paint on this shell (consider PreView, print flag, etc. recursively)?
     static sal_Bool IsPaint( SdrObject *pObj, const ViewShell *pSh );
 
     /** SwFlyFrm::IsBackgroundTransparent
 
-        determines, if background of fly frame has to be drawn transparent
+        determines if background of fly frame has to be drawn transparently
+
         definition found in /core/layout/paintfrm.cxx
 
         @return true, if background color is transparent or a existing background
@@ -245,7 +251,8 @@ public:
 
     /** SwFlyFrm::IsShadowTransparent
 
-        determine, if shadow color of fly frame has to be drawn transparent
+        determine if shadow color of fly frame has to be drawn transparently
+
         definition found in /core/layout/paintfrm.cxx
 
         @return true, if shadow color is transparent.
@@ -267,7 +274,7 @@ public:
 
     virtual const SwRect GetObjRect() const;
 
-    /** method to determine, if a format on the Writer fly frame is possible
+    /** method to determine if a format on the Writer fly frame is possible
 
         #i28701#
         refine 'IsFormatPossible'-conditions of method
@@ -288,3 +295,4 @@ public:
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
commit fc1ca84b494c30ce0bf50f9025f56d4763b4a9ac
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Thu Jun 7 14:29:48 2012 +0200

    delete useless code in sw/source/code/inc
    
     - frame.hxx: git grep shows that variable is not used anywhere
     - dflyobj.hxx, frmtool.hxx: redundant visibility declaration
     - layouter.hxx: redundant include (once with "" and once with <>)

diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index f7b23d9..fed3aff 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -87,7 +87,6 @@ public:
     basegfx::B2DRange getOuterBound() const;
     basegfx::B2DRange getInnerBound() const;
 
-public:
     TYPEINFO();
 
     SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly);
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index b1ad339..218be38 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -368,9 +368,6 @@ protected:
     sal_Bool bCompletePaint : 1;
     sal_Bool bRetouche      : 1; // frame is responsible for retouching
 
-public:
-    sal_Bool bUnUsed2       : 1;
-
 protected:
     sal_Bool bInfInvalid    : 1;  // InfoFlags are invalid
     sal_Bool bInfBody       : 1;  // Frm is in document body
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index abf3d2b..e599d92 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -158,7 +158,6 @@ protected:
     sal_Bool     bHadFollow;
     sal_Bool     bInvaKeep;
     sal_Bool     bValidSize;
-protected:
     // #i49383#
     bool mbFrmDeleted;
 
diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx
index 4350b95..192364c 100644
--- a/sw/source/core/inc/layouter.hxx
+++ b/sw/source/core/inc/layouter.hxx
@@ -50,7 +50,6 @@ class SwAnchoredObject;
 #include <vector>
 class SwFrm;
 // --> #i65250#
-#include <swtypes.hxx>
 #include <boost/unordered_map.hpp>
 class SwFlowFrm;
 class SwLayoutFrm;
commit 74b5a0dd4bb150fe807e678d157149f607ca246d
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Thu Jun 7 14:15:00 2012 +0200

    minor code cleanups in sw/source/core/inc

diff --git a/sw/source/core/inc/fieldhint.hxx b/sw/source/core/inc/fieldhint.hxx
index 210cc74..165e404 100644
--- a/sw/source/core/inc/fieldhint.hxx
+++ b/sw/source/core/inc/fieldhint.hxx
@@ -34,6 +34,7 @@
 class SwFieldHint : public SfxHint
 {
     SwPaM* pPaM;
+
 public:
     SwFieldHint( SwPaM* p )
         : pPaM(p)
diff --git a/sw/source/core/inc/finalthreadmanager.hxx b/sw/source/core/inc/finalthreadmanager.hxx
index 19e902c..dc1c6e5 100644
--- a/sw/source/core/inc/finalthreadmanager.hxx
+++ b/sw/source/core/inc/finalthreadmanager.hxx
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _FINALTHREADMANAGER_HXX
 #define _FINALTHREADMANAGER_HXX
 
@@ -35,10 +36,7 @@
 #include "com/sun/star/lang/XServiceInfo.hpp"
 #include "com/sun/star/util/XJobManager.hpp"
 #include "com/sun/star/frame/XTerminateListener2.hpp"
-
-
 #include <osl/mutex.hxx>
-
 #include <list>
 
 class CancelJobsThread;
@@ -56,7 +54,6 @@ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL _crea
 
 } // closing service helper namespace
 
-
 class FinalThreadManager : public ::cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo,
                                                            com::sun::star::util::XJobManager,
                                                            com::sun::star::frame::XTerminateListener2 >
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index e0eeb50..7affcf1 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _FNTCACHE_HXX
 #define _FNTCACHE_HXX
 
@@ -37,7 +38,7 @@ class Printer;
 class OutputDevice;
 class FontMetric;
 class SwFntObj;
-class SwDrawTextInfo;   // DrawText
+class SwDrawTextInfo;
 class ViewShell;
 class SwSubFont;
 class MapMode;
@@ -45,7 +46,6 @@ class MapMode;
 class SwFntCache : public SwCache
 {
 public:
-
     inline SwFntCache() : SwCache(50
 #ifdef DBG_UTIL
     , rtl::OString(RTL_CONSTASCII_STRINGPARAM("Global Font-Cache pFntCache"))
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 544655a..b1ad339 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef SW_FRAME_HXX
 #define SW_FRAME_HXX
 
@@ -366,8 +367,10 @@ protected:
     // painted if <bCompletePaint> is sal_True.
     sal_Bool bCompletePaint : 1;
     sal_Bool bRetouche      : 1; // frame is responsible for retouching
+
 public:
     sal_Bool bUnUsed2       : 1;
+
 protected:
     sal_Bool bInfInvalid    : 1;  // InfoFlags are invalid
     sal_Bool bInfBody       : 1;  // Frm is in document body
diff --git a/sw/source/core/inc/ifinishedthreadlistener.hxx b/sw/source/core/inc/ifinishedthreadlistener.hxx
index fbf6099..257da22 100644
--- a/sw/source/core/inc/ifinishedthreadlistener.hxx
+++ b/sw/source/core/inc/ifinishedthreadlistener.hxx
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _IFINISHEDTHREADLISTENER_HXX
 #define _IFINISHEDTHREADLISTENER_HXX
 
@@ -39,16 +40,14 @@
 */
 class IFinishedThreadListener
 {
-    public:
-
+public:
         inline virtual ~IFinishedThreadListener()
         {
         };
 
         virtual void NotifyAboutFinishedThread( const oslInterlockedCount nThreadID ) = 0;
 
-    protected:
-
+protected:
         inline IFinishedThreadListener()
         {
         };
diff --git a/sw/source/core/inc/ithreadlistenerowner.hxx b/sw/source/core/inc/ithreadlistenerowner.hxx
index 8ba1657..dc40f34 100644
--- a/sw/source/core/inc/ithreadlistenerowner.hxx
+++ b/sw/source/core/inc/ithreadlistenerowner.hxx
@@ -25,11 +25,11 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _ITHREADLISTENEROWNER_HXX
 #define _ITHREADLISTENEROWNER_HXX
 
 #include <ifinishedthreadlistener.hxx>
-
 #include <boost/weak_ptr.hpp>
 
 /** interface class of the owner of a thread listener
@@ -40,18 +40,15 @@
 */
 class IThreadListenerOwner
 {
-    public:
-
+public:
         inline virtual ~IThreadListenerOwner()
         {
         };
 
         virtual boost::weak_ptr< IFinishedThreadListener > GetThreadListenerWeakRef() = 0;
-
         virtual void NotifyAboutFinishedThread( const oslInterlockedCount nThreadID ) = 0;
 
-    protected:
-
+protected:
         inline IThreadListenerOwner()
         {
         };
diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx
index e355f8b..05d6250 100644
--- a/sw/source/core/inc/laycache.hxx
+++ b/sw/source/core/inc/laycache.hxx
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _LAYCACHE_HXX
 #define _LAYCACHE_HXX
 
@@ -48,11 +49,11 @@ class SvStream;
  * during the Read(..) function the lock count will set to $8000.
  *
  **************************************************************************/
-
 class SwLayoutCache
 {
     SwLayCacheImpl *pImpl;
     sal_uInt16 nLockCount;
+
 public:
     SwLayoutCache() : pImpl( NULL ), nLockCount( 0 ) {}
     ~SwLayoutCache();
@@ -74,7 +75,6 @@ public:
     sal_Bool CompareLayout( const SwDoc& rDoc ) const;
 #endif
 };
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list