Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Am 01.04.2011 09:22, schrieb Tor Lillqvist:
Thanks for the translations, and thanks for pushing! A few notes:

/*-----------------------------------------------------------------------


-    Beschreibung: Uebernahme der aktualisierten Werte aus dem Set
+    Description: acquisition of the updates values from the set 
-----------------------------------------------------------------------*/


I think that while editing comments like these we want to cut down
the excessive ASCII graphics, too. Or do we? Also, the word
"Description:" here is pointless, what else are comments if not
descriptive?

I am not sure if there is any consensus here, but personally, if I
edit a comment that is formatted like that, at the same time I drop
the ASCII graphics and end up with simply:

// Acquisition of the updates values from the set

Thus saving two lines of vertical space, a very scarce resource.


That would be more efficient indeed. But I'll save that for a later
task. I really focused on translating _only_ here. There are tons of
those ASCII graphics that I could clean up seperately "in one go" when I
get to it.

+        // Orientation and Size from PageItem +        // set left
and right border +    // evaluate header-attributes

Just nitpicking, but do try to avoid German capitalization of Nouns
and overuse of hyphenized-words. Use consistent capitalization of the
first word of a comment that isn't a complete sentence, either always
just lower case or always initial capital. (Comments that are one or
several complete sentences should always be properly capitalized.)

Thanks for bringing that up! I should have been more consistent and want
to be from now on. I cleaned up what I could find and the already
_pushed_ changes are attached below.

// PRIVATE METHODES
------------------------------------------------------ 
/*------------------------------------------------------------------------


More ASCII graphics that can be removed, and the " PRIVATE METHODES"
should either be lowercased and its spelling corrected (no e in
methods). Or just dropped, why would this source file need such a
comment telling that private methods follow? Is it even true?

+    Description: ctor +    Description:  static data +
Description: Now as TabPage + Description:   Initialisation

Fairly useless comments.  I would just remove them. Constructors are
recognizable by their signature, static data is also obvious, "Now as
TabPage" doesn't really tell much without knowledge of the history of
the code anyway, and it is very obvious that a method called "Init"
does initialisation.

I'll think about doing that seperately as well. Thanks for the advice. I
really appreciate them!

-- 
/```````````````````````````````````````````````````````\
|                    Martin Kepplinger                  |
|                                                       |
| diaspora handle    martinkepplinger@joindiaspora.com  |
|                                                       |
| E-Mail & IM        martinkepplinger@eml.cc            |
|                                                       |
|   7346 FE02 27C3 3958 813A C351 C100 D7B5 7F2A 1E26   |
\,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/
From 8a245026fdd9aa155440862bb13c31c1878c2ac0 Mon Sep 17 00:00:00 2001
From: Martin Kepplinger <martinkepplinger@eml.cc>
Date: Fri, 1 Apr 2011 13:39:21 +0200
Subject: [PATCH] Cleanup of code comments

Correct and improve some issues about code comments that reviewers brought up.
Thanks for reviewing!

This is contributed under the terms of the MPL 1.1 / GPLv3+ / LGPLv3+ triple
license.
---
 sw/source/ui/fmtui/tmpdlg.cxx   |   14 +++++++-------
 sw/source/ui/frmdlg/colex.cxx   |    4 ++--
 sw/source/ui/frmdlg/colmgr.cxx  |    4 ++--
 sw/source/ui/frmdlg/frmmgr.cxx  |    4 ++--
 sw/source/ui/frmdlg/frmpage.cxx |   14 +++++++-------
 sw/source/ui/frmdlg/wrap.cxx    |   10 +++++-----
 6 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index e88c26b..ec3b136 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -117,7 +117,7 @@ SwTemplateDlg::SwTemplateDlg(Window*                        pParent,
     // tinker TabPages together
     switch( nRegion )
     {
-        // character templates
+        // character styles
         case SFX_STYLE_FAMILY_CHAR:
         {
             OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 
"GetTabPageCreatorFunc fail!");
@@ -145,7 +145,7 @@ SwTemplateDlg::SwTemplateDlg(Window*                        pParent,
                 RemoveTabPage(TP_CHAR_TWOLN);
         }
         break;
-        // paragraph templates
+        // paragraph styles
         case SFX_STYLE_FAMILY_PARA:
         {
                 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), 
"GetTabPageCreatorFunc fail!");
@@ -230,7 +230,7 @@ SwTemplateDlg::SwTemplateDlg(Window*                        pParent,
             }
         }
         break;
-        // frame templates
+        // frame styles
         case SFX_STYLE_FAMILY_FRAME:
         {
             AddTabPage(TP_FRM_STD,             SwFrmPage::Create,
@@ -253,7 +253,7 @@ SwTemplateDlg::SwTemplateDlg(Window*                        pParent,
 
         break;
         }
-        // page templates
+        // page styles
         case SFX_STYLE_FAMILY_PAGE:
         {
             OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 
"GetTabPageCreatorFunc fail!");
@@ -298,7 +298,7 @@ SwTemplateDlg::SwTemplateDlg(Window*                        pParent,
 
         }
         break;
-        // numbering templates
+        // numbering styles
         case SFX_STYLE_FAMILY_PSEUDO:
         {
             AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM );
@@ -370,7 +370,7 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
 
 void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
 {
-    // set template's and metric's names
+    // set style's and metric's names
     String sNumCharFmt, sBulletCharFmt;
     SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFmt);
     SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFmt);
@@ -551,7 +551,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
 
             aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
             aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
-            // collect character templates
+            // collect character styles
             ListBox rCharFmtLB(this);
             rCharFmtLB.Clear();
             rCharFmtLB.InsertEntry( ViewShell::GetShellRes()->aStrNone );
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index b1ec601..c198c5a 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -52,7 +52,7 @@
 #include "colmgr.hxx"
 
 /*-----------------------------------------------------------------------
-    Description: acquisition of the updates values from the set
+    Description: Taking the updated values from the set
  -----------------------------------------------------------------------*/
 void SwPageExample::UpdateExample( const SfxItemSet& rSet )
 {
@@ -73,7 +73,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
 
     if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
     {
-        // Orientation and Size from PageItem
+        // orientation and size from PageItem
         const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich );
         SetSize( rSize.GetSize() );
     }
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index bb8d1d2..6d9f0f9 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -39,7 +39,7 @@
 #include "colmgr.hxx"
 
 
-// PRIVATE METHODES ------------------------------------------------------
+// private methods
 /*------------------------------------------------------------------------
  Description:  set column width to current width
 ------------------------------------------------------------------------*/
@@ -54,7 +54,7 @@ void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
     rCol.SetWishWidth(nWidth);
 }
 
-// PUBLIC METHODES -------------------------------------------------------
+// public methods
 /*------------------------------------------------------------------------
  Description:  set column quantity and Gutterwidth
 ------------------------------------------------------------------------*/
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index 52db350..80a89d8 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -75,7 +75,7 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nTyp
 {
     if ( bNewFrm )
     {
-        // set Defaults:
+        // set defaults:
         sal_uInt16 nId = 0;
         switch ( nType )
         {
@@ -192,7 +192,7 @@ sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm()
 }
 
 /*------------------------------------------------------------------------
- Description:   insert frames of type eAnchorType. Position and size are
+ Description:   Insert frames of type eAnchorType. Position and size are
                 being set explicitely.
                 Not-allowed values of the enumeration type get corrected.
 ------------------------------------------------------------------------*/
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 814c36d..5cccb59 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -889,7 +889,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
         aHeightED.SetRefValue( nSpace );
     }
 
-    // General Initialisation part
+    // general initialisation part
     switch(rAnchor.GetAnchorId())
     {
         case FLY_AT_PAGE: aAnchorAtPageRB.Check(); break;
@@ -1146,7 +1146,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
                 (aSz.GetWidth() > 0 || aSz.GetWidthPercent() > 0) &&
                     (aSz.GetHeight() > 0 || aSz.GetHeightPercent() > 0)))
     {
-        if (aSz.GetHeightSizeType() == ATT_VAR_SIZE)    // VAR_SIZE gibts nicht bei Rahmen
+        if (aSz.GetHeightSizeType() == ATT_VAR_SIZE)    // there is no VAR_SIZE in frames
             aSz.SetHeightSizeType(ATT_MIN_SIZE);
 
         bRet |= 0 != rSet.Put( aSz );
@@ -1247,7 +1247,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
     sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
     FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT);
 
-    // Vertikal
+    // vertical
     if ( nV == USHRT_MAX )
     {
         nV       = nOldV;
@@ -1412,7 +1412,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
                     for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
                     {
                         RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
-                        if (pEntry->nLBRelation == LB_REL_CHAR)        // Default
+                        if (pEntry->nLBRelation == LB_REL_CHAR)        // default
                         {
                             _rLB.SelectEntryPos(i);
                             break;
@@ -2062,7 +2062,7 @@ void SwFrmPage::UpdateExample()
         aExampleWN.SetVertRel(nRel);
     }
 
-    // Size
+    // size
     long nXPos = static_cast< long >(aAtHorzPosED.Denormalize(aAtHorzPosED.GetValue(FUNIT_TWIP)));
     long nYPos = static_cast< long >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
     aExampleWN.SetRelPos(Point(nXPos, nYPos));
@@ -2077,7 +2077,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
     {
         SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
 
-        // Size
+        // size
         const sal_Bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
 
         aWidthED .Enable( !bSizeFixed );
@@ -2231,7 +2231,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
                 rVert.GetPos());
     }
 
-    // Transparent for example 
+    // transparent for example 
     // circulation for example
     const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND);
     aExampleWN.SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) );
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 213cc95..3f25410 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -178,7 +178,7 @@ SfxTabPage* SwWrapTabPage::Create(Window *pParent, const SfxItemSet &rSet)
 
 void SwWrapTabPage::Reset(const SfxItemSet &rSet)
 {
-    //Contour for Draw, Graphic and OLE (Insert/Graphic/Properties still missing!)
+    // contour for Draw, Graphic and OLE (Insert/Graphic/Properties still missing!)
     if( bDrawMode )
     {
         aWrapOutlineCB.Show();
@@ -415,7 +415,7 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
  --------------------------------------------------------------------*/
 void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
 {
-    // Anchor
+    // anchor
     const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
     nAnchorId = rAnch.GetAnchorId();
     sal_Bool bEnable = (nAnchorId != FLY_AS_CHAR);
@@ -426,11 +426,11 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
         SwFlyFrmAttrMgr aMgr( bNew, pSh, (const SwAttrSet&)GetItemSet() );
         SvxSwFrameValidation aVal;
 
-        // Size
+        // size
         const SwFmtFrmSize& rFrmSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE);
         Size aSize = rFrmSize.GetSize();
 
-        // Margin
+        // margin
         const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rSet.Get(RES_UL_SPACE);
         const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
         nOldLeftMargin  = static_cast< sal_uInt16 >(rLR.GetLeft());
@@ -438,7 +438,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
         nOldUpperMargin = static_cast< sal_uInt16 >(rUL.GetUpper());
         nOldLowerMargin = static_cast< sal_uInt16 >(rUL.GetLower());
 
-        // Position
+        // position
         const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
         const SwFmtVertOrient& rVert = (const SwFmtVertOrient&)rSet.Get(RES_VERT_ORIENT);
 
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.