[Libreoffice-commits] core.git: sw/source

Philipp Riemer ruderphilipp at gmail.com
Sat Sep 7 15:25:28 PDT 2013


 sw/source/core/docnode/finalthreadmanager.cxx          |    8 -
 sw/source/core/docnode/ndtbl.cxx                       |    3 
 sw/source/core/docnode/ndtbl1.cxx                      |   41 ++----
 sw/source/core/docnode/node.cxx                        |  115 ++++++-----------
 sw/source/core/docnode/node2lay.cxx                    |   18 +-
 sw/source/core/docnode/observablethread.cxx            |    4 
 sw/source/core/docnode/pausethreadstarting.cxx         |    4 
 sw/source/core/docnode/retrievedinputstreamdata.cxx    |    6 
 sw/source/core/docnode/retrieveinputstream.cxx         |    4 
 sw/source/core/docnode/retrieveinputstreamconsumer.cxx |    4 
 sw/source/core/docnode/swthreadjoiner.cxx              |    4 
 11 files changed, 78 insertions(+), 133 deletions(-)

New commits:
commit 3a33d89c9728e8947f60bc6b574bf876875dc507
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun Aug 11 00:13:50 2013 +0200

    work on comments in sw/source/core/docnode/
    
    Change-Id: Ie988076dc73f80fa962daa2e9d8e05132ed7180b
    Reviewed-on: https://gerrit.libreoffice.org/5869
    Reviewed-by: Philipp Riemer <ruderphilipp at gmail.com>
    Tested-by: Philipp Riemer <ruderphilipp at gmail.com>

diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx
index 7008e7a3..7ad4b57 100644
--- a/sw/source/core/docnode/finalthreadmanager.cxx
+++ b/sw/source/core/docnode/finalthreadmanager.cxx
@@ -30,8 +30,6 @@
 /** thread to cancel a give list of cancellable jobs
 
     helper class for FinalThreadManager
-
-    @author OD
 */
 class CancelJobsThread : public osl::Thread
 {
@@ -144,8 +142,6 @@ void SAL_CALL CancelJobsThread::run()
 /** thread to terminate office, when all jobs are cancelled.
 
     helper class for FinalThreadManager
-
-    @author OD
 */
 class TerminateOfficeThread : public osl::Thread
 {
@@ -229,10 +225,6 @@ void SAL_CALL TerminateOfficeThread::onTerminated()
         delete this;
 }
 
-/** class FinalThreadManager
-
-    @author OD
-*/
 FinalThreadManager::FinalThreadManager(css::uno::Reference< css::uno::XComponentContext > const & context)
     : m_xContext(context),
       maMutex(),
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 988cae6..cc6cd9c 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1339,12 +1339,10 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
    new SwEndNode( aInsertIndex, *pTblNd );
 
 #if OSL_DEBUG_LEVEL > 1
-    /**debug**/
     const SwNodeRange& rStartRange = *rTableNodes.begin()->begin();
     const SwNodeRange& rEndRange = *rTableNodes.rbegin()->rbegin();
     (void) rStartRange;
     (void) rEndRange;
-    /**debug**/
 #endif
 
     SwDoc* pDoc = GetDoc();
@@ -2533,7 +2531,6 @@ static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes )
     return false;
 }
 
-// SwDoc::GetTabRows()
 void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
                         const SwCellFrm* pBoxFrm ) const
 {
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 754f63b..f8d797a 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -143,21 +143,6 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
     return !rBoxes.empty();
 }
 
-/**
- * Class:  SwDoc
- * Methods:  SetRowHeight(), GetRowHeight()
- *
- * The line height is calculated from the Selection.
- * Starting with every Cell within the Selection, all Cells are iterated
- * through in an upwards fashion.
- *
- * The topmost Line gets the requested value, all Lines below it get
- * a respective value that is calculated from the relation of the old and
- * new size of the topmost Line in the lower line's own size.
- *
- * All changed Lines may get an own FrmFmt.
- * Of course we can only touch every Line once.
- */
 inline void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine )
 {
     if( rLineArr.end() == std::find( rLineArr.begin(), rLineArr.end(), pLine ) )
@@ -358,6 +343,21 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const
     }
 }
 
+/* Class:  SwDoc
+ * Methods:  SetRowHeight(), GetRowHeight()
+ *
+ * The line height is calculated from the Selection.
+ * Starting with every Cell within the Selection, all Cells are iterated
+ * through in an upwards fashion.
+ *
+ * The topmost Line gets the requested value, all Lines below it get
+ * a respective value that is calculated from the relation of the old and
+ * new size of the topmost Line in the lower line's own size.
+ *
+ * All changed Lines may get an own FrmFmt.
+ * Of course we can only touch every Line once.
+ */
+
 void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew )
 {
     SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
@@ -509,10 +509,6 @@ sal_Bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill
     return bRet;
 }
 
-/**
- * Class: SwDoc
- * Methods: SetTabBorders(), GetTabBorders()
- */
 inline void InsertCell( std::vector<SwCellFrm*>& rCellArr, SwCellFrm* pCellFrm )
 {
     if( rCellArr.end() == std::find( rCellArr.begin(), rCellArr.end(), pCellFrm ) )
@@ -1259,10 +1255,6 @@ sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
     return nAlign;
 }
 
-/**
- * Class: SwDoc
- * Methods: AdjustCellWidth()
- */
 static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
 {
     SwTwips nRet = 0;
@@ -1291,8 +1283,7 @@ static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
     return (sal_uInt16)std::max( long(MINLAY), nRet );
 }
 
-/**
- * The Line is within the Selection but not outlined by the TabCols.
+/* The Line is within the Selection but not outlined by the TabCols.
  *
  * That means that the Line has been "split" by other Cells due to the
  * two-dimensional representation used. Thus, we have to distribute the cell's
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index cde428a2..c5d61cb 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -249,18 +249,17 @@ sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
 
 }
 
-/*******************************************************************
-|* Returns the section level at the position given by aIndex.
-|*
-|* We use the following logic:
-|* S = Start, E = End, C = CntntNode
-|* Level   0 = E
-|*         1 = S E
-|*         2 = SC
-|*
-|* All EndNodes of the BaseSection have level 0
-|* All StartNodes of the BaseSection have level 1
-*******************************************************************/
+/** Returns the section level at the position given by aIndex.
+ *
+ * We use the following logic:
+ * S = Start, E = End, C = CntntNode
+ * Level   0 = E
+ *         1 = S E
+ *         2 = SC
+ *
+ * All EndNodes of the BaseSection have level 0
+ * All StartNodes of the BaseSection have level 1
+ */
 sal_uInt16 SwNode::GetSectionLevel() const
 {
     // EndNode of a BaseSection? They are always 0!
@@ -274,21 +273,6 @@ sal_uInt16 SwNode::GetSectionLevel() const
     return IsEndNode() ? nLevel-1 : nLevel;
 }
 
-/*******************************************************************
-|* Inserts a node into the rNodes array at the rWhere position
-|* For the theEndOfSection it is passed the EndOfSection index of
-|* the preceding node. If it is at position 0 of the variable array
-|* theEndOfSection becomes 0 (itsef the new one).
-|*
-|* Parameters
-|*      IN
-|*      rNodes is the variable array in which the node will be
-|*      inserted
-|*      IN
-|*      rWhere is the position within the array where the node will
-|*      be inserted
-*******************************************************************/
-
 #ifdef DBG_UTIL
 long SwNode::s_nSerial = 0;
 #endif
@@ -325,6 +309,12 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
     }
 }
 
+/** Inserts a node into the rNodes array at the rWhere position
+ *
+ * @param rNodes the variable array in that the node will be inserted
+ * @param nPos position within the array where the node will be inserted
+ * @param nNdType the type of node to insert
+ */
 SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
     : nNodeType( nNdType )
     , nAFmtNumLvl( 0 )
@@ -360,8 +350,8 @@ SwNode::~SwNode()
 {
 }
 
-// Find the TableNode in which it is located.
-// If we're not in a table: return 0
+/// Find the TableNode in which it is located.
+/// If we're not in a table: return 0
 SwTableNode* SwNode::FindTableNode()
 {
     if( IsTableNode() )
@@ -372,7 +362,7 @@ SwTableNode* SwNode::FindTableNode()
     return pTmp->GetTableNode();
 }
 
-// Is the node located in the visible area of the Shell?
+/// Is the node located in the visible area of the Shell?
 sal_Bool SwNode::IsInVisibleArea( ViewShell* pSh ) const
 {
     sal_Bool bRet = sal_False;
@@ -424,9 +414,9 @@ bool SwNode::IsInProtectSect() const
     return pSectNd && pSectNd->GetSection().IsProtectFlag();
 }
 
-// Does the node contain anything protected?
-// I.e.: Area/Frame/Table rows/... including the Anchor for
-// Frames/Footnotes/...
+/// Does the node contain anything protected?
+/// I.e.: Area/Frame/Table rows/... including the Anchor for
+/// Frames/Footnotes/...
 sal_Bool SwNode::IsProtect() const
 {
     const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
@@ -469,8 +459,8 @@ sal_Bool SwNode::IsProtect() const
     return sal_False;
 }
 
-// Find the PageDesc that is used to format this node. If the Layout is available,
-// we search through that. Else we can only do it the hard way by searching onwards through the nodes.
+/// Find the PageDesc that is used to format this node. If the Layout is available,
+/// we search through that. Else we can only do it the hard way by searching onwards through the nodes.
 const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
                                         sal_uInt32* pPgDescNdIdx ) const
 {
@@ -499,7 +489,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
             pPgDesc = ((SwFmtPageDesc&)pNode->GetAttr( RES_PAGEDESC )).GetPageDesc();
     }
 
-    // Are we going through the Layout?
+    // Are we going through the layout?
     if( !pPgDesc )
     {
         const SwFrm* pFrm;
@@ -598,7 +588,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
             }
             else
             {
-                // Find the Body Textnode
+                // Find the Body text node
                 if( 0 != ( pSttNd = pNd->FindHeaderStartNode() ) ||
                     0 != ( pSttNd = pNd->FindFooterStartNode() ))
                 {
@@ -648,7 +638,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
                 }
                 else if( 0 != ( pSttNd = pNd->FindFootnoteStartNode() ))
                 {
-                    // iThe Anchor can only be in the Bodytext
+                    // the Anchor can only be in the Body text
                     const SwTxtFtn* pTxtFtn;
                     const SwFtnIdxs& rFtnArr = pDoc->GetFtnIdxs();
                     for( sal_uInt16 n = 0; n < rFtnArr.size(); ++n )
@@ -663,7 +653,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
                 else
                 {
                     // Can only be a page-bound Fly (or something newer).
-                    // WE can only return the standard here
+                    // we can only return the standard here
                     OSL_ENSURE( pNd->FindFlyStartNode(),
                             "Where is this Node?" );
 
@@ -713,7 +703,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
     return pPgDesc;
 }
 
-// If the node is located in a Fly, we return it formatted accordingly
+/// If the node is located in a Fly, we return it formatted accordingly
 SwFrmFmt* SwNode::GetFlyFmt() const
 {
     SwFrmFmt* pRet = 0;
@@ -855,13 +845,6 @@ sal_uInt8 SwNode::HasPrevNextLayNode() const
     return nRet;
 }
 
-/*******************************************************************
-|* Retruns the node's StartOfSection
-|*
-|* Parameters
-|*      IN
-|*      rNodes is the variable array in which the node is contained
-*******************************************************************/
 SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
                             SwStartNodeType eSttNd )
     : SwNode( rWhere, nNdType ), eSttNdTyp( eSttNd )
@@ -889,19 +872,15 @@ void SwStartNode::CheckSectionCondColl() const
 //FEATURE::CONDCOLL
 }
 
-/*******************************************************************
-|* Inserts a node into the array rNodes at the position aWhere.
-|* The theStartOfSection pointer is set accordingly.
-|* The EndOfSection pointer of the corresponding StartNodes (identified
-|* by rStartOfSection) is set to this node.
-|*
-|* Parameters
-|*      IN
-|*      rNodes is the variable array in which the node is contained
-|*      IN
-|*      aWhere is the position where the node is inserted
-|*      We pass a copy!
-*******************************************************************/
+/** Insert a node into the array
+ *
+ * The StartOfSection pointer is set to the given node.
+ *
+ * The EndOfSection pointer of the corresponding start node is set to this node.
+ *
+ * @param rWhere position where the node shoul be inserted
+ * @param rSttNd the start note of the section
+ */
 
 SwEndNode::SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd )
     : SwNode( rWhere, ND_ENDNODE )
@@ -1198,7 +1177,7 @@ sal_Bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
     return bRet;
 }
 
-/*
+/**
  * Creates all Views for the Doc for this Node.
  * The created ContentFrames are attached to the corresponding Layout.
  */
@@ -1240,7 +1219,7 @@ void SwCntntNode::MakeFrms( SwCntntNode& rNode )
     }
 }
 
-/*
+/**
  * Deletes all Views from the Doc for this Node.
  * The ContentFrames are removed from the corresponding Layout.
  */
@@ -1277,7 +1256,7 @@ SwCntntNode *SwCntntNode::JoinPrev()
     return this;
 }
 
-// Get info from Modify
+/// Get info from Modify
 bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
 {
     switch( rInfo.Which() )
@@ -1306,7 +1285,7 @@ bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
     return SwModify::GetInfo( rInfo );
 }
 
-// Set an Attribute
+/// @param rAttr the attribute to set
 sal_Bool SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
 {
     if( !GetpSwAttrSet() ) // Have the Nodes created by the corresponding AttrSets
@@ -1615,8 +1594,8 @@ static bool lcl_CheckMaxLength(SwNode const& rPrev, SwNode const& rNext)
     return (nSum <= TXTNODE_MAX);
 }
 
-// Can we join two Nodes?
-// We can return the 2nd position in pIdx.
+/// Can we join two Nodes?
+/// We can return the 2nd position in pIdx.
 int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
 {
     const SwNodes& rNds = GetNodes();
@@ -1639,8 +1618,8 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
     return sal_True;
 }
 
-// Can we join two Nodes?
-// We can return the 2nd position in pIdx.
+/// Can we join two Nodes?
+/// We can return the 2nd position in pIdx.
 int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
 {
     SwNodeIndex aIdx( *this, -1 );
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 87e2f1f..45b904a 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -57,15 +57,6 @@ public:
                     const sal_Bool bCalcFrm = sal_True ) const;
 };
 
-/**
- * The main purpose of this ctor is to find the right SwModify to iterate over.
- *
- * @param bSearch sal_True: find the next Content or TableNode which contains
- *                          Frames (to collect the pUpper).
- *                          Else we assume that rNode points already to such a
- *                          Content or TableNode.
- *                          We insert before or after it.
- */
 SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
 {
     if( pIdx->GetIndex() >= rNodes.Count() - 1 )
@@ -130,6 +121,15 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
     return pNd;
 }
 
+/**
+ * The main purpose of this ctor is to find the right SwModify to iterate over.
+ *
+ * @param bSearch sal_True: find the next Content or TableNode which contains
+ *                          Frames (to collect the pUpper).
+ *                          Else we assume that rNode points already to such a
+ *                          Content or TableNode.
+ *                          We insert before or after it.
+ */
 SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch )
     : pUpperFrms( NULL ), nIndex( nIdx ), bInit( false )
 {
diff --git a/sw/source/core/docnode/observablethread.cxx b/sw/source/core/docnode/observablethread.cxx
index 7b6931f..ab225eb 100644
--- a/sw/source/core/docnode/observablethread.cxx
+++ b/sw/source/core/docnode/observablethread.cxx
@@ -20,11 +20,9 @@
 #include <observablethread.hxx>
 #include <boost/shared_ptr.hpp>
 
-/** class for an observable thread
+/* class for an observable thread
 
    #i73788#
-
-    @author OD
 */
 ObservableThread::ObservableThread()
     : mnRefCount( 0 ),
diff --git a/sw/source/core/docnode/pausethreadstarting.cxx b/sw/source/core/docnode/pausethreadstarting.cxx
index 767cce3..005ace7 100644
--- a/sw/source/core/docnode/pausethreadstarting.cxx
+++ b/sw/source/core/docnode/pausethreadstarting.cxx
@@ -20,12 +20,10 @@
 #include <pausethreadstarting.hxx>
 #include <swthreadmanager.hxx>
 
-/** Helper class to pause starting of threads during existence of an instance
+/* Helper class to pause starting of threads during existence of an instance
     of this class
 
     #i73788#
-
-    @author OD
 */
 
 SwPauseThreadStarting::SwPauseThreadStarting()
diff --git a/sw/source/core/docnode/retrievedinputstreamdata.cxx b/sw/source/core/docnode/retrievedinputstreamdata.cxx
index bde75ed..0ff9752 100644
--- a/sw/source/core/docnode/retrievedinputstreamdata.cxx
+++ b/sw/source/core/docnode/retrievedinputstreamdata.cxx
@@ -21,10 +21,8 @@
 #include <retrieveinputstreamconsumer.hxx>
 #include <vcl/svapp.hxx>
 
-/** implementation of class <SwRetrievedInputStreamDataManager>
+// #i73788#
 
-    #i73788#
-*/
 SwRetrievedInputStreamDataManager::tDataKey SwRetrievedInputStreamDataManager::mnNextKeyValue = 1;
 
 namespace
@@ -123,8 +121,6 @@ bool SwRetrievedInputStreamDataManager::PopData( const tDataKey nDataKey,
 
     #i73788#
     Note: This method has to be run in the main thread.
-
-    @author OD
 */
 IMPL_LINK( SwRetrievedInputStreamDataManager,
            LinkedInputStreamReady,
diff --git a/sw/source/core/docnode/retrieveinputstream.cxx b/sw/source/core/docnode/retrieveinputstream.cxx
index e72a6e9..943d068 100644
--- a/sw/source/core/docnode/retrieveinputstream.cxx
+++ b/sw/source/core/docnode/retrieveinputstream.cxx
@@ -21,11 +21,9 @@
 #include <comphelper/mediadescriptor.hxx>
 #include <com/sun/star/io/XStream.hpp>
 
-/** class for a thread to retrieve an input stream given by an URL
+/* class for a thread to retrieve an input stream given by an URL
 
     #i73788#
-
-    @author OD
 */
 ::rtl::Reference< ObservableThread > SwAsyncRetrieveInputStreamThread::createThread(
                         const SwRetrievedInputStreamDataManager::tDataKey nDataKey,
diff --git a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
index 0beed7d..e5b0205 100644
--- a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
+++ b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
@@ -22,12 +22,10 @@
 #include <retrieveinputstream.hxx>
 #include <swthreadmanager.hxx>
 
-/** class to provide creation of a thread to retrieve an input stream given by
+/* class to provide creation of a thread to retrieve an input stream given by
     an URL and to consume the retrieved input stream.
 
     #i73788#
-
-    @author OD
 */
 SwAsyncRetrieveInputStreamThreadConsumer::SwAsyncRetrieveInputStreamThreadConsumer(
                                                             SwGrfNode& rGrfNode )
diff --git a/sw/source/core/docnode/swthreadjoiner.cxx b/sw/source/core/docnode/swthreadjoiner.cxx
index b572150..26870bc 100644
--- a/sw/source/core/docnode/swthreadjoiner.cxx
+++ b/sw/source/core/docnode/swthreadjoiner.cxx
@@ -24,10 +24,8 @@
 #include <osl/mutex.hxx>
 #include <rtl/instance.hxx>
 
-/** Testing
+// Testing
 
-    @author OD
-*/
 using namespace ::com::sun::star;
 
 uno::Reference< util::XJobManager > SwThreadJoiner::mpThreadJoiner;


More information about the Libreoffice-commits mailing list