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

Philipp Riemer ruderphilipp at gmail.com
Sun May 5 11:35:05 PDT 2013


 sw/source/core/draw/dcontact.cxx          |  139 ++++++++++------------
 sw/source/core/draw/dflyobj.cxx           |   73 ++++--------
 sw/source/core/draw/dpage.cxx             |   18 --
 sw/source/core/draw/drawdoc.cxx           |   15 +-
 sw/source/core/draw/dview.cxx             |   39 ------
 sw/source/core/graphic/grfatr.cxx         |   49 ++------
 sw/source/core/graphic/ndgrf.cxx          |  182 ++++++++++--------------------
 sw/source/core/view/pagepreviewlayout.cxx |   88 ++------------
 sw/source/core/view/printdata.cxx         |   23 ---
 sw/source/core/view/vdraw.cxx             |   17 --
 sw/source/core/view/viewimp.cxx           |   18 --
 sw/source/core/view/viewpg.cxx            |   16 --
 sw/source/core/view/viewsh.cxx            |   82 ++-----------
 sw/source/core/view/vnew.cxx              |   72 +++--------
 sw/source/core/view/vprint.cxx            |  151 +++++-------------------
 15 files changed, 284 insertions(+), 698 deletions(-)

New commits:
commit f7fdcc15317b2711f33f3b8dc19fd3044de54323
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 20:22:31 2013 +0200

    remove commented-out code in sw/source/core/view
    
    Change-Id: Ib94be6370549c6a71879a5af1eb60808fba762e8

diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index fca15fe..e614499 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -529,14 +529,12 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
 
     Size aSize;
     if ( mbDoesLayoutColsFitIntoWindow )
-        //aSize.Width() = mnPrevwLayoutWidth;
         aSize.Width() = std::min( mnPrevwLayoutWidth,
                              maPreviewDocRect.GetWidth() - aTopLeftPos.X() );
     else
         aSize.Width() = std::min( maPreviewDocRect.GetWidth() - aTopLeftPos.X(),
                              maWinSize.Width() - maAdditionalPaintOffset.X() );
     if ( mbDoesLayoutRowsFitIntoWindow )
-        //aSize.Height() = mnPrevwLayoutHeight;
         aSize.Height() = std::min( mnPrevwLayoutHeight,
                               maPreviewDocRect.GetHeight() - aTopLeftPos.Y() );
     else
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index f4e533d..4b0481e 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -456,9 +456,6 @@ bool SwPrintUIOptions::IsPrintTables() const
     // take care of different property names currently in use for this option.
     // for compatibility the old name should win (may still be used for PDF export or via Uno API)
 
-//    bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
-//    bRes = getBoolValue( "PrintTables", bRes );
-//    return bRes;
     // for now it was decided that tables should always be printed
     return true;
 }
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 5e2a0e1..61d82f1 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -97,8 +97,6 @@ void ViewShell::PrintProspect(
 
     std::pair< sal_Int32, sal_Int32 > rPagesToPrint =
             rPrintData.GetRenderData().GetPagePairsForProspectPrinting()[ nRenderer ];
-// const USHORT nPageMax = static_cast< USHORT >(rPagesToPrint.first > rPagesToPrint.second ?
-//            rPagesToPrint.first : rPagesToPrint.second);
     OSL_ENSURE( rPagesToPrint.first  == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
     OSL_ENSURE( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
 
@@ -213,7 +211,6 @@ void ViewShell::PrintProspect(
 
             Point aPos( aSttPt );
             aPos -= aShell.maVisArea.Pos();
-//            aPos -= aPrtOff;
             aMapMode.SetOrigin( aPos );
             pPrinter->SetMapMode( aMapMode );
             pStPage->GetUpper()->Paint( pStPage->Frm() );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 809a7a7..6cea260 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -293,7 +293,6 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
     SET_CURR_SHELL( this );
 
     SwRootFrm* pMyLayout = GetLayout();
-    // ULONG nStatMax = pLayout->GetPageNum();
 
     const SwFrm *pPage = pMyLayout->Lower();
     SwLayAction aAction( pMyLayout, Imp() );
@@ -314,7 +313,6 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
 
         maVisArea = aOldVis; //reset due to the paints
         Imp()->SetFirstVisPageInvalid();
-//       SwPaintQueue::Repaint();
     }
 
     pMyLayout->EndAllAction();
@@ -324,10 +322,6 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
 {
     OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
     SwFEShell* pFESh = (SwFEShell*)this;
-    // Let's create a new document
-//    SwDoc *pPrtDoc = new SwDoc;
-//    pPrtDoc->acquire();
-//    pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
     pPrtDoc->LockExpFlds();
 
     // use given printer
@@ -392,9 +386,6 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
             ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
     }
 
-    // a new one has been created in CORE (copying OLE objects)
-//      if( aDocShellRef.Is() )
-//          SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
     // fill it with the selected content
     pFESh->Copy( pPrtDoc );
 
@@ -511,18 +502,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
 
         ::SetSwVisArea( pViewSh2, pStPage->Frm() );
 
-// FIXME disabled because rPrintData.aOffset is always (0,0)
-#if 0
-        //  consider offset when printing an envelope
-        if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
-        {
-            Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
-            aNewOrigin += rPrintData.aOffset;
-            MapMode aTmp( pOutDev->GetMapMode() );
-            aTmp.SetOrigin( aNewOrigin );
-            pOutDev->SetMapMode( aTmp );
-        }
-#endif
         pShell->InitPrt( pOutDev );
 
         ::SetSwVisArea( pViewSh2, pStPage->Frm() );
@@ -572,13 +551,11 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
         // Removing this gives us a performance gain during saving the
         // document because the thumbnail creation will not trigger a complete
         // formatting of the document.
-        // Format pages for printing
-        // pSh->CalcPagesForPrint( SHRT_MAX );
+
         //#39275# now Meyer wants again a Clipping
         pOleOut->Push( PUSH_CLIPREGION );
         pOleOut->IntersectClipRegion( aSwRect.SVRect() );
         pSh->GetLayout()->Paint( aSwRect );
-//      SFX_APP()->SpoilDemoOutput( *pOleOut, rRect );
 
         pOleOut->Pop();
         // first the CurrShell object needs to be destroyed!
commit b9008dfbef5c744e351c6bb1edbfc30f364731c8
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 20:19:50 2013 +0200

    fdo#62475 - remove visual noise in sw/source/core/view
    
    - ASCII art
    - method comments without further info
    - multiple blank lines
    
    Change-Id: Iec6fac8ce28a82b2ce15a72ed7ffa5fc38d4e218

diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 3ba9196..fca15fe 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -43,9 +43,8 @@
 // Note: method defined in '/sw/source/core/layout/paintfrm.cxx'
 extern void SwCalcPixStatics( OutputDevice *pOut );
 
-// =============================================================================
 // methods to initialize page preview layout
-// =============================================================================
+
 SwPagePreviewLayout::SwPagePreviewLayout( ViewShell& _rParentViewShell,
                                           const SwRootFrm& _rLayoutRootFrm )
     : mnXFree ( 4*142 ),
@@ -284,9 +283,7 @@ bool SwPagePreviewLayout::ReInit()
     return true;
 }
 
-// =============================================================================
 // methods to prepare paint of page preview
-// =============================================================================
 
 /** prepare paint of page preview
 
@@ -742,10 +739,8 @@ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
     return bRet;
 }
 
-// =============================================================================
 // methods to determine new data for changing the current shown part of the
 // document preview.
-// =============================================================================
 
 /** calculate start position for new scale
 
@@ -1011,9 +1006,7 @@ SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
     return nScrollAmount;
 }
 
-// =============================================================================
 // methods to paint page preview layout
-// =============================================================================
 
 /** paint prepared preview
 
@@ -1331,9 +1324,7 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
         _PaintSelectMarkAtPage( pNewSelectedPrevwPage );
 }
 
-// =============================================================================
 // helper methods
-// =============================================================================
 
 /** get preview page by physical page number
 
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index b775fc0..f4e533d 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <printdata.hxx>
 
 #include <globals.hrc>
@@ -34,27 +33,22 @@
 #include <unotools/moduleoptions.hxx>
 #include <vcl/outdev.hxx>
 
-
 extern bool sw_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst );
 
-
 using namespace ::com::sun::star;
 
-
-//////////////////////////////////////////////////////////////////////
+// SwRenderData
 
 SwRenderData::SwRenderData()
 {
 }
 
-
 SwRenderData::~SwRenderData()
 {
     OSL_ENSURE( !m_pPostItShell, "m_pPostItShell should already have been deleted" );
     OSL_ENSURE( !m_pPostItFields, " should already have been deleted" );
 }
 
-
 void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev )
 {
     DeletePostItData();
@@ -70,7 +64,6 @@ void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt,
     m_pPostItShell.reset(new ViewShell(*new SwDoc, 0, &aViewOpt, pOutDev));
 }
 
-
 void SwRenderData::DeletePostItData()
 {
     if (HasPostItData())
@@ -86,6 +79,7 @@ SfxObjectShellLock const& SwRenderData::GetTempDocShell() const
 {
     return m_xTempDocShell;
 }
+
 void SwRenderData::SetTempDocShell(SfxObjectShellLock const& xShell)
 {
     m_xTempDocShell = xShell;
@@ -96,7 +90,6 @@ bool SwRenderData::NeedNewViewOptionAdjust( const ViewShell& rCompare ) const
     return m_pViewOptionAdjust ? ! m_pViewOptionAdjust->checkShell( rCompare ) : true;
 }
 
-
 void SwRenderData::ViewOptionAdjustStart(
         ViewShell &rSh, const SwViewOption &rViewOptions)
 {
@@ -108,13 +101,11 @@ void SwRenderData::ViewOptionAdjustStart(
             new SwViewOptionAdjust_Impl( rSh, rViewOptions ));
 }
 
-
 void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions)
 {
     m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions );
 }
 
-
 void SwRenderData::ViewOptionAdjustStop()
 {
     m_pViewOptionAdjust.reset();
@@ -125,7 +116,6 @@ void SwRenderData::ViewOptionAdjustCrashPreventionKludge()
     m_pViewOptionAdjust->DontTouchThatViewShellItSmellsFunny();
 }
 
-
 void SwRenderData::MakeSwPrtOptions(
     SwDocShell const*const pDocShell,
     SwPrintUIOptions const*const pOpt,
@@ -169,8 +159,7 @@ void SwRenderData::MakeSwPrtOptions(
     rOptions.SetRenderData( this );
 }
 
-
-//////////////////////////////////////////////////////////////////////
+// SwPrintUIOptions
 
 SwPrintUIOptions::SwPrintUIOptions(
     sal_uInt16 nCurrentPage,
@@ -423,7 +412,6 @@ SwPrintUIOptions::SwPrintUIOptions(
     assert(nIdx == nNumProps);
 }
 
-
 SwPrintUIOptions::~SwPrintUIOptions()
 {
 }
@@ -516,6 +504,4 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea
     return bChanged;
 }
 
-//////////////////////////////////////////////////////////////////////
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 58a3103..9ede6c5 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -42,7 +42,6 @@
 
 #include <IDocumentDrawModelAccess.hxx>
 
-
 void SwViewImp::StartAction()
 {
     if ( HasDrawView() )
@@ -53,7 +52,6 @@ void SwViewImp::StartAction()
     }
 }
 
-
 void SwViewImp::EndAction()
 {
     if ( HasDrawView() )
@@ -64,7 +62,6 @@ void SwViewImp::EndAction()
     }
 }
 
-
 void SwViewImp::LockPaint()
 {
     if ( HasDrawView() )
@@ -78,14 +75,12 @@ void SwViewImp::LockPaint()
     }
 }
 
-
 void SwViewImp::UnlockPaint()
 {
     if ( bResetHdlHiddenPaint )
         GetDrawView()->showMarkHandles();
 }
 
-
 void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
                             SwPrintData const*const pPrintData,
                             const SwRect& aPaintRect,
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 7e1d664..8dcf216 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -107,7 +107,6 @@ SwViewImp::SwViewImp( ViewShell *pParent ) :
     bFirstPageInvalid = sal_True;
 }
 
-
 SwViewImp::~SwViewImp()
 {
     delete pAccMap;
@@ -127,13 +126,11 @@ SwViewImp::~SwViewImp()
     OSL_ENSURE( !pIdleAct,"Be idle for the rest of your life." );
 }
 
-
 void SwViewImp::DelRegion()
 {
     DELETEZ(pRegion);
 }
 
-
 sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
 {
     if ( rRect.IsOver( pSh->VisArea() ) )
@@ -146,14 +143,12 @@ sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
     return sal_False;
 }
 
-
 void SwViewImp::CheckWaitCrsr()
 {
     if ( pLayAct )
         pLayAct->CheckWaitCrsr();
 }
 
-
 sal_Bool SwViewImp::IsCalcLayoutProgress() const
 {
     if ( pLayAct )
@@ -161,7 +156,6 @@ sal_Bool SwViewImp::IsCalcLayoutProgress() const
     return sal_False;
 }
 
-
 sal_Bool SwViewImp::IsUpdateExpFlds()
 {
     if ( pLayAct && pLayAct->IsCalcLayout() )
@@ -172,8 +166,6 @@ sal_Bool SwViewImp::IsUpdateExpFlds()
      return sal_False;
 }
 
-
-
 void SwViewImp::SetFirstVisPage()
 {
     if ( pSh->mbDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() )
@@ -210,7 +202,6 @@ void SwViewImp::SetFirstVisPage()
     bFirstPageInvalid = sal_False;
 }
 
-
 void SwViewImp::MakeDrawView()
 {
     IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
@@ -257,7 +248,6 @@ void SwViewImp::MakeDrawView()
     }
 }
 
-
 Color SwViewImp::GetRetoucheColor() const
 {
     Color aRet( COL_TRANSPARENT );
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 96a83df..5e2a0e1 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <com/sun/star/uno/Sequence.hxx>
 
 #include <hintids.hxx>
@@ -44,10 +43,8 @@
 #include <IDocumentFieldsAccess.hxx>
 #include <IDocumentDeviceAccess.hxx>
 
-
 using namespace ::com::sun::star;
 
-
 SwPageFrm const*
 sw_getPage(SwRootFrm const& rLayout, sal_Int32 const nPage); // vprint.cxx
 
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 9f4d56b..b1ac5c3 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -101,7 +101,6 @@ void ViewShell::ToggleHeaderFooterEdit()
     GetWin()->Invalidate();
 }
 
-//////////////////////////////////////////////////////////////////////////////
 // #i72754# 2nd set of Pre/PostPaints
 // This time it uses the lock counter (mPrePostPaintRegions empty/non-empty) to allow only one activation
 // and deactivation and mpPrePostOutDev to remember the OutDev from the BeginDrawLayers
@@ -180,9 +179,7 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
         mpTargetPaintWindow = 0;
     }
 }
-
-//////////////////////////////////////////////////////////////////////////////
-
+// end of Pre/PostPaints
 
 void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
 {
@@ -416,7 +413,6 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
     ViewShell::mbLstAct = sal_False;
     Imp()->EndAction();
 
-
     //We artificially end the action here to enable the automatic scrollbars
     //to adjust themselves correctly
     //EndAction sends a Notify, and that must call Start-/EndAction to
@@ -429,14 +425,12 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
         Imp()->FireAccessibleEvents();
 }
 
-
 void ViewShell::ImplStartAction()
 {
     mbPaintWorks = sal_False;
     Imp()->StartAction();
 }
 
-
 void ViewShell::ImplLockPaint()
 {
     if ( GetWin() && GetWin()->IsVisible() )
@@ -444,7 +438,6 @@ void ViewShell::ImplLockPaint()
     Imp()->LockPaint();
 }
 
-
 void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
 {
     SET_CURR_SHELL( this );
@@ -500,7 +493,6 @@ void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
         Imp()->UnlockPaint();
 }
 
-
 sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
 {
     sal_Bool bRet = sal_False;
@@ -519,7 +511,6 @@ sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
     return bRet;
 }
 
-
 void ViewShell::InvalidateWindows( const SwRect &rRect )
 {
     if ( !Imp()->IsCalcLayoutProgress() )
@@ -540,7 +531,6 @@ void ViewShell::InvalidateWindows( const SwRect &rRect )
     }
 }
 
-
 void ViewShell::MakeVisible( const SwRect &rRect )
 {
     if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) )
@@ -571,7 +561,6 @@ void ViewShell::MakeVisible( const SwRect &rRect )
     }
 }
 
-
 Window* ViewShell::CareChildWin(ViewShell& rVSh)
 {
     if(rVSh.mpSfxViewShell)
@@ -586,13 +575,11 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
     return NULL;
 }
 
-
 Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
 {
     return GetLayout()->GetPagePos( nPageNum );
 }
 
-
 sal_uInt16 ViewShell::GetNumPages()
 {
     //It is possible that no layout exists when the method from
@@ -656,7 +643,6 @@ sal_Bool ViewShell::HasCharts() const
     return bRet;
 }
 
-
 void ViewShell::LayoutIdle()
 {
 #ifdef TCOVER
@@ -701,7 +687,6 @@ void ViewShell::LayoutIdle()
     }
 }
 
-
 static void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
 {
     sal_Bool bCrsr = rSh.ISA(SwCrsrShell);
@@ -836,7 +821,6 @@ void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
     }
 }
 
-
 /**
  * Sets IDocumentSettingAccess if former object positioning should be used.
  * #i11860#
@@ -853,7 +837,6 @@ void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
     }
 }
 
-
 // #i28701#
 void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
 {
@@ -866,7 +849,6 @@ void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
     }
 }
 
-
 void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
 {
     IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -879,7 +861,6 @@ void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
     }
 }
 
-
 // #i45491#
 void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak )
 {
@@ -893,7 +874,6 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
     }
 }
 
-
 void ViewShell::Reformat()
 {
     SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
@@ -973,7 +953,6 @@ void ViewShell::CalcLayout()
         ::EndProgress( GetDoc()->GetDocShell() );
 }
 
-
 void ViewShell::SetFirstVisPageInvalid()
 {
     ViewShell *pSh = this;
@@ -986,7 +965,6 @@ void ViewShell::SetFirstVisPageInvalid()
     } while ( pSh != this );
 }
 
-
 void ViewShell::SizeChgNotify()
 {
     if ( !mpWin )
@@ -1015,7 +993,6 @@ void ViewShell::SizeChgNotify()
     }
 }
 
-
 void ViewShell::VisPortChgd( const SwRect &rRect)
 {
     OSL_ENSURE( GetWin(), "VisPortChgd ohne Window." );
@@ -1183,10 +1160,8 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
 
     if( Imp()->IsAccessible() )
         Imp()->UpdateAccessible();
-
 }
 
-
 sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
 {
 #if !defined(MACOSX) && !defined(ANDROID) && !defined(IOS)
@@ -1420,7 +1395,6 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
     return sal_False;
 }
 
-
 void ViewShell::PaintDesktop( const SwRect &rRect )
 {
     if ( !GetWin() && !GetOut()->GetConnectMetaFile() )
@@ -1502,7 +1476,6 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
         _PaintDesktop( aRegion );
 }
 
-
 // PaintDesktop is split in two, this part is also used by PreViewPage
 void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
 {
@@ -1555,7 +1528,6 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
     GetOut()->Pop();
 }
 
-
 sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
 {
     if ( !GetWin() )
@@ -1657,7 +1629,6 @@ sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
     return bRet;
 }
 
-
 void ViewShell::Paint(const Rectangle &rRect)
 {
     if ( mnLockPaint )
@@ -1783,7 +1754,6 @@ void ViewShell::Paint(const Rectangle &rRect)
     }
 }
 
-
 void ViewShell::SetBrowseBorder( const Size& rNew )
 {
     if( rNew != maBrowseBorder )
@@ -1813,7 +1783,6 @@ sal_Int32 ViewShell::GetBrowseWidth() const
         return maVisArea.Width() - 2 * GetOut()->PixelToLogic(maBrowseBorder).Width();
 }
 
-
 void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
 {
     if ( !bBrowseChgd && !GetViewOptions()->getBrowseMode() )
@@ -1870,12 +1839,10 @@ void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
     UnlockPaint();
 }
 
-
 SwRootFrm *ViewShell::GetLayout() const
 {
     return mpLayout.get();
 }
-/***********************************************************************/
 
 OutputDevice& ViewShell::GetRefDev() const
 {
@@ -1897,12 +1864,10 @@ const SwNodes& ViewShell::GetNodes() const
     return mpDoc->GetNodes();
 }
 
-
 void ViewShell::DrawSelChanged()
 {
 }
 
-
 Size ViewShell::GetDocSize() const
 {
     Size aSz;
@@ -1913,13 +1878,11 @@ Size ViewShell::GetDocSize() const
     return aSz;
 }
 
-
 SfxItemPool& ViewShell::GetAttrPool()
 {
     return GetDoc()->GetAttrPool();
 }
 
-
 void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
 {
 
@@ -2096,7 +2059,6 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
 
 }
 
-
 void ViewShell::SetUIOptions( const SwViewOption &rOpt )
 {
     mpOpt->SetUIOptions(rOpt);
@@ -2108,7 +2070,6 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
     mpOpt->SetSymbolFont(rOpt.GetSymbolFont());
 }
 
-
 void ViewShell::SetReadonlyOption(sal_Bool bSet)
 {
     //JP 01.02.99: at readonly flag query properly
@@ -2139,7 +2100,6 @@ void ViewShell::SetReadonlyOption(sal_Bool bSet)
     }
 }
 
-
 void  ViewShell::SetPDFExportOption(sal_Bool bSet)
 {
     if( bSet != mpOpt->IsPDFExport() )
@@ -2150,7 +2110,6 @@ void  ViewShell::SetPDFExportOption(sal_Bool bSet)
     }
 }
 
-
 void  ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
 {
     if( bSet != mpOpt->IsSelectionInReadonly() )
@@ -2159,13 +2118,11 @@ void  ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
     }
 }
 
-
 void ViewShell::SetPrtFormatOption( sal_Bool bSet )
 {
     mpOpt->SetPrtFormat( bSet );
 }
 
-
 void ViewShell::UISizeNotify()
 {
     if ( mbDocSizeChgd )
@@ -2178,7 +2135,6 @@ void ViewShell::UISizeNotify()
     }
 }
 
-
 void    ViewShell::SetRestoreActions(sal_uInt16 nSet)
 {
     OSL_ENSURE(!GetRestoreActions()||!nSet, "multiple restore of the Actions ?");
@@ -2279,7 +2235,6 @@ SwAccessibleMap* ViewShell::GetAccessibleMap()
     return 0;
 }
 
-
 void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
 {
     if(mpOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
@@ -2335,7 +2290,6 @@ const Size ViewShell::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) c
     return aSize;
 }
 
-
 // #i12836# enhanced pdf export
 sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const
 {
@@ -2366,7 +2320,6 @@ sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwR
     return nRet;
 }
 
-
 // --> PB 2007-05-30 #146850#
 const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
 {
@@ -2434,6 +2387,7 @@ const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
 {
     return mpDoc;
 }
+
 const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
 {
     return mpDoc;
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 62bbee6..a8b293e 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -37,15 +37,6 @@
 #include <accessibilityoptions.hxx>
 #include <switerator.hxx>
 
-
-/*************************************************************************
-|*
-|*  ViewShell::Init()
-|*
-|*  Letzte Aenderung    MA 14. Jun. 96
-|*
-|*************************************************************************/
-
 void ViewShell::Init( const SwViewOption *pNewOpt )
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "ViewShell::Init" );
@@ -313,15 +304,6 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
 
 }
 
-/******************************************************************************
-|*
-|*  ViewShell::~ViewShell()
-|*
-|*  Ersterstellung      MA ??
-|*  Letzte Aenderung    MA 10. May. 95
-|*
-******************************************************************************/
-
 ViewShell::~ViewShell()
 {
     {
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 5d2d841..809a7a7 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -70,10 +70,8 @@
 #include <fmtpdsc.hxx>      // SwFmtPageDesc
 #include <globals.hrc>
 
-
 using namespace ::com::sun::star;
 
-//--------------------------------------------------------------------
 /// Painting buffer
 class SwQueuedPaint
 {
@@ -102,7 +100,6 @@ public:
     ~SwDrawViewSave();
 };
 
-
 void SwPaintQueue::Add( ViewShell *pNew, const SwRect &rNew )
 {
     SwQueuedPaint *pPt;
@@ -123,8 +120,6 @@ void SwPaintQueue::Add( ViewShell *pNew, const SwRect &rNew )
         pQueue = pNQ;
 }
 
-
-
 void SwPaintQueue::Repaint()
 {
     if ( !SwRootFrm::IsInPaint() && pQueue )
@@ -155,8 +150,6 @@ void SwPaintQueue::Repaint()
     }
 }
 
-
-
 void SwPaintQueue::Remove( ViewShell *pSh )
 {
     SwQueuedPaint *pPt;
@@ -179,13 +172,6 @@ void SwPaintQueue::Remove( ViewShell *pSh )
     }
 }
 
-/******************************************************************************
- *  Methode     :   void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ...
- *  Beschreibung:
- *  Erstellt    :   OK 04.11.94 16:27
- *  Aenderung   :
- ******************************************************************************/
-
 void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/ )
 {
     OSL_ENSURE( !pSh->GetWin(), "Drucken mit Window?" );
@@ -206,8 +192,6 @@ void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/
     pOut->SetMapMode( aMapMode );
 }
 
-/******************************************************************************/
-
 void ViewShell::InitPrt( OutputDevice *pOutDev )
 {
     // For printing we use a negative offset (exactly the offset of OutputSize).
@@ -231,13 +215,6 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
         mpOut = pOutDev;
 }
 
-/******************************************************************************
- *  Methode     :   void ViewShell::ChgAllPageOrientation
- *  Erstellt    :   MA 08. Aug. 95
- *  Aenderung   :
- ******************************************************************************/
-
-
 void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
 {
     OSL_ENSURE( mnStartAction, "missing an Action" );
@@ -277,13 +254,6 @@ void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
     }
 }
 
-/******************************************************************************
- *  Methode     :   void ViewShell::ChgAllPageOrientation
- *  Erstellt    :   MA 08. Aug. 95
- *  Aenderung   :
- ******************************************************************************/
-
-
 void ViewShell::ChgAllPageSize( Size &rSz )
 {
     OSL_ENSURE( mnStartAction, "missing an Action" );
@@ -318,7 +288,6 @@ void ViewShell::ChgAllPageSize( Size &rSz )
     }
 }
 
-
 void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
 {
     SET_CURR_SHELL( this );
@@ -351,8 +320,6 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
     pMyLayout->EndAllAction();
 }
 
-/******************************************************************************/
-
 SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
 {
     OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
@@ -485,9 +452,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
     SwPrintData const& rPrintData,
     sal_Int32 nRenderer     /* the index in the vector of pages to be printed */ )
 {
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-// CAUTION: Do also always update the printing routines in viewpg.cxx (PrintProspect)!
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    // CAUTION: Do also always update the printing routines in viewpg.cxx (PrintProspect)!
 
     const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagesToPrint().size() - 1;
     OSL_ENSURE( 0 <= nRenderer && nRenderer <= nMaxRenderer, "nRenderer out of bounds");
@@ -558,7 +523,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
             pOutDev->SetMapMode( aTmp );
         }
 #endif
-
         pShell->InitPrt( pOutDev );
 
         ::SetSwVisArea( pViewSh2, pStPage->Frm() );
@@ -577,15 +541,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
     return sal_True;
 }
 
-/******************************************************************************
- *  Methode     :   PrtOle2()
- *  Beschreibung:
- *  Erstellt    :   PK 07.12.94
- *  Aenderung   :   MA 16. Feb. 95
- ******************************************************************************/
-
-
-
 void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
                          OutputDevice* pOleOut, const Rectangle& rRect )
 {
@@ -668,7 +623,6 @@ SwDrawViewSave::~SwDrawViewSave()
     }
 }
 
-
 // OD 09.01.2003 #i6467# - method also called for page preview
 void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
 {
commit c1d5e765dbc78de252cb94a66bb5ed49f15218ff
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 20:15:21 2013 +0200

    work on comments in sw/source/core/view
    
    Change-Id: I3934487475df1da7fe6cf68656c4c38881d1a394

diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index dab357d..3ba9196 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -122,8 +122,6 @@ void SwPagePreviewLayout::_ClearPrevwPageData()
 /** calculate page preview layout sizes
 
     OD 18.12.2002 #103492#
-
-    @author OD
 */
 void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
 {
@@ -176,12 +174,11 @@ void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
 
     OD 11.12.2002 #103492#
     initialize the page preview settings for a given layout.
+
     side effects:
     (1) If parameter <_bCalcScale> is true, mapping mode with calculated
     scaling is set at the output device and the zoom at the view options of
     the given view shell is set with the calculated scaling.
-
-    @author OD
 */
 bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
                                 const sal_uInt16 _nRows,
@@ -252,12 +249,7 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
     return true;
 }
 
-/** apply new zoom at given view shell
-
-    OD 11.12.2002 #103492# - implementation of <_ApplyNewZoomAtViewShell>
-
-    @author OD
-*/
+/** apply new zoom at given view shell */
 void SwPagePreviewLayout::_ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom )
 {
     SwViewOption aNewViewOptions = *(mrParentViewShell.GetViewOptions());
@@ -274,8 +266,6 @@ void SwPagePreviewLayout::_ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom )
 /** method to adjust page preview layout to document changes
 
     OD 18.12.2002 #103492#
-
-    @author OD
 */
 bool SwPagePreviewLayout::ReInit()
 {
@@ -297,12 +287,13 @@ bool SwPagePreviewLayout::ReInit()
 // =============================================================================
 // methods to prepare paint of page preview
 // =============================================================================
+
 /** prepare paint of page preview
 
     OD 12.12.2002 #103492#
     OD 21.03.2003 #108282# - delete parameter _onStartPageVirtNum
 
-    @author OD, _nProposedStartPageNum, _onStartPageNum are absolute
+    @note _nProposedStartPageNum, _onStartPageNum are absolute
 */
 bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
                                    const Point      _aProposedStartPos,
@@ -502,8 +493,6 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
 /** calculate additional paint offset
 
     OD 12.12.2002 #103492#
-
-    @author OD
 */
 void SwPagePreviewLayout::_CalcAdditionalPaintOffset()
 {
@@ -535,8 +524,6 @@ void SwPagePreviewLayout::_CalcAdditionalPaintOffset()
 /** calculate painted preview document rectangle
 
     OD 12.12.2002 #103492#
-
-    @author OD
 */
 void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
 {
@@ -564,8 +551,6 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
 /** calculate preview pages
 
     OD 12.12.2002 #103492#
-
-    @author OD
 */
 void SwPagePreviewLayout::_CalcPreviewPages()
 {
@@ -681,8 +666,6 @@ void SwPagePreviewLayout::_CalcPreviewPages()
 /** determines preview data for a given page and a given preview offset
 
     OD 13.12.2002 #103492#
-
-    @author OD
 */
 bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage,
                                                    const Point& _rPrevwOffset,
@@ -725,8 +708,6 @@ bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage,
 /** enable/disable book preview
 
     OD 2004-03-04 #i18143#
-
-    @author OD
 */
 bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
                                               sal_uInt16& _onStartPageNum,
@@ -765,11 +746,10 @@ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
 // methods to determine new data for changing the current shown part of the
 // document preview.
 // =============================================================================
+
 /** calculate start position for new scale
 
     OD 12.12.2002 #103492#
-
-    @author OD
 */
 Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
                           const Fraction& _aNewScale,
@@ -830,7 +810,7 @@ Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
 
 /** determines, if page with given page number is visible in preview
 
-    @author OD, _nPageNum is absolut!
+    @note _nPageNum is absolut!
 */
 bool SwPagePreviewLayout::IsPageVisible( const sal_uInt16 _nPageNum ) const
 {
@@ -840,7 +820,7 @@ bool SwPagePreviewLayout::IsPageVisible( const sal_uInt16 _nPageNum ) const
 
 /** calculate data to bring new selected page into view.
 
-    @author OD, IN/OUT parameters are absolute page numbers!!!
+    @note IN/OUT parameters are absolute page numbers!!!
 */
 bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
                                 const sal_Int16  _nHoriMove,
@@ -934,10 +914,7 @@ bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
     return true;
 }
 
-/** checks, if given position is inside a shown document page
-
-    @author OD
-*/
+/** checks, if given position is inside a shown document page */
 struct PrevwPosInsidePagePred
 {
     const Point mnPrevwPos;
@@ -996,10 +973,7 @@ bool SwPagePreviewLayout::IsPrevwPosInDocPrevwPage( const Point  _aPrevwPos,
     return bIsPosInsideDoc;
 }
 
-/** determine window page scroll amount
-
-    @author OD
-*/
+/** determine window page scroll amount */
 SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
                                 const sal_Int16 _nWinPagesToScroll ) const
 {
@@ -1040,11 +1014,10 @@ SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
 // =============================================================================
 // methods to paint page preview layout
 // =============================================================================
+
 /** paint prepared preview
 
     OD 12.12.2002 #103492#
-
-    @author OD
 */
 bool SwPagePreviewLayout::Paint( const Rectangle  _aOutRect ) const
 {
@@ -1209,8 +1182,6 @@ bool SwPagePreviewLayout::Paint( const Rectangle  _aOutRect ) const
 /** repaint pages on page preview
 
     OD 18.12.2002 #103492#
-
-    @author OD
 */
 void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
 {
@@ -1260,8 +1231,6 @@ void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
 /** paint selection mark at page
 
     OD 17.12.2002 #103492#
-
-    @author OD
 */
 void SwPagePreviewLayout::_PaintSelectMarkAtPage(
                                     const PrevwPage* _aSelectedPrevwPage ) const
@@ -1321,7 +1290,7 @@ void SwPagePreviewLayout::_PaintSelectMarkAtPage(
     Perform paint for current selected page in order to unmark it.
     Set new selected page and perform paint to mark this page.
 
-    @author OD, _nSelectedPage, mnSelectedPage are absolut
+    @note _nSelectedPage, mnSelectedPage are absolut
 */
 void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
 {
@@ -1362,15 +1331,13 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
         _PaintSelectMarkAtPage( pNewSelectedPrevwPage );
 }
 
-
 // =============================================================================
 // helper methods
 // =============================================================================
+
 /** get preview page by physical page number
 
     OD 17.12.2002 #103492#
-
-    @author OD
 */
 struct EqualsPageNumPred
 {
@@ -1398,7 +1365,7 @@ const PrevwPage* SwPagePreviewLayout::_GetPrevwPageByPageNum( const sal_uInt16 _
 
     OD 17.01.2003 #103492#
 
-    @author OD, _nPageNum is relative
+    @note _nPageNum is relative
 */
 sal_uInt16 SwPagePreviewLayout::GetRowOfPage( sal_uInt16 _nPageNum ) const
 {
@@ -1422,7 +1389,7 @@ sal_uInt16 SwPagePreviewLayout::GetRowOfPage( sal_uInt16 _nPageNum ) const
 
     OD 17.01.2003 #103492#
 
-    @author OD, _nPageNum is relative
+    @note _nPageNum is relative
 */
 sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const
 {
@@ -1451,8 +1418,6 @@ Size SwPagePreviewLayout::GetPrevwDocSize() const
 /** get size of a preview page by its physical page number
 
     OD 15.01.2003 #103492#
-
-    @author OD
 */
 Size SwPagePreviewLayout::GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const
 {
@@ -1470,8 +1435,6 @@ Size SwPagePreviewLayout::GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) cons
 /** get virtual page number by its physical page number
 
     OD 21.03.2003 #108282#
-
-    @author OD
 */
 sal_uInt16 SwPagePreviewLayout::GetVirtPageNumByPageNum( sal_uInt16 _nPageNum ) const
 {
@@ -1486,10 +1449,7 @@ sal_uInt16 SwPagePreviewLayout::GetVirtPageNumByPageNum( sal_uInt16 _nPageNum )
     }
 }
 
-/** Convert absolute to relative page numbers (see PrintEmptyPages)
-
-    @author FME
-*/
+/** Convert absolute to relative page numbers (see PrintEmptyPages) */
 sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nAbsPageNum ) const
 {
     if ( mbBookPreview || mbPrintEmptyPages || !_nAbsPageNum )
@@ -1512,10 +1472,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nA
     return nRet;
 }
 
-/** Convert relative to absolute page numbers (see PrintEmptyPages)
-
-    @author FME
-*/
+/** Convert relative to absolute page numbers (see PrintEmptyPages) */
 sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nRelPageNum ) const
 {
     if ( mbBookPreview || mbPrintEmptyPages || !_nRelPageNum )
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 8acd581..7e1d664 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -87,7 +87,7 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
     pDrawView->SetMarkHdlSizePixel(9);
 }
 
-// SwViewImp::SwViewImp()  CTor for the core internals
+/// CTor for the core internals
 SwViewImp::SwViewImp( ViewShell *pParent ) :
     pSh( pParent ),
     pDrawView( 0 ),
@@ -379,7 +379,7 @@ void SwViewImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
     } while ( pTmp != pVSh );
 }
 
-// invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
+/// invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
 void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
                                                        const SwTxtFrm* _pToTxtFrm )
 {
@@ -410,7 +410,7 @@ void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxt
     } while ( pTmp != pVSh );
 }
 
-// invalidate text selection for paragraphs
+/// invalidate text selection for paragraphs
 void SwViewImp::_InvalidateAccessibleParaTextSelection()
 {
     ViewShell* pVSh = GetShell();
@@ -426,7 +426,7 @@ void SwViewImp::_InvalidateAccessibleParaTextSelection()
     } while ( pTmp != pVSh );
 }
 
-// invalidate attributes for paragraphs
+/// invalidate attributes for paragraphs
 void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
 {
     ViewShell* pVSh = GetShell();
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 40065dd..96a83df 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -79,7 +79,7 @@ void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions)
     return;
 }
 
-// print brochure
+/// print brochure
 // OD 05.05.2003 #i14016# - consider empty pages on calculation of the scaling
 // for a page to be printed.
 void ViewShell::PrintProspect(
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 1ade18f..9f4d56b 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1171,14 +1171,12 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
     }
     GetWin()->Update();
 
-    // --> OD 2010-02-11 #i88070#
-    if ( pPostItMgr )
+    if ( pPostItMgr ) // #i88070#
     {
         pPostItMgr->Rescale();
         pPostItMgr->CalcRects();
         pPostItMgr->LayoutPostIts();
     }
-    // <--
 
     if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
         pPostItMgr->CorrectPositions();
@@ -2237,7 +2235,7 @@ void ViewShell::InvalidateAccessibleFocus()
         Imp()->GetAccessibleMap().InvalidateFocus();
 }
 
-/*
+/**
  * invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs #i27138#
  */
 void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
@@ -2249,7 +2247,7 @@ void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtF
     }
 }
 
-/*
+/**
  * invalidate text selection for paragraphs #i27301#
  */
 void ViewShell::InvalidateAccessibleParaTextSelection()
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 0371018..5d2d841 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -649,14 +649,7 @@ sal_Bool ViewShell::IsAnyFieldInDoc() const
     return sal_False;
 }
 
-
-
-/******************************************************************************
- *  SwDrawViewSave
- *
- *  Saves some settings at the draw view
- ******************************************************************************/
-
+///  Saves some settings at the draw view
 SwDrawViewSave::SwDrawViewSave( SdrView* pSdrView )
     : pDV( pSdrView )
 {
commit 66e47a5cfd177571dc0811abda4e0a5a6ae8c56a
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 20:00:24 2013 +0200

    fix indentation
    
    Change-Id: If17defd0a64c0b6b4e2c1faf60601199a978e2e9

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 4516f17..1ade18f 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -916,14 +916,13 @@ void ViewShell::Reformat()
     }
 }
 
- void ViewShell::ChgNumberDigits()
- {
-     SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
-     if ( pTmpDrawModel )
-            pTmpDrawModel->ReformatAllTextObjects();
-     Reformat();
- }
-
+void ViewShell::ChgNumberDigits()
+{
+    SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
+    if ( pTmpDrawModel )
+           pTmpDrawModel->ReformatAllTextObjects();
+    Reformat();
+}
 
 void ViewShell::CalcLayout()
 {
@@ -1087,8 +1086,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
                     aPageRect.SSize() = rFormatPage.GetBoundRect().SSize();
                 }
 
-                    // OD 12.02.2003 #i9719#, #105645# - consider new border
-                    // and shadow width
+                // OD 12.02.2003 #i9719#, #105645# - consider new border and shadow width
                 if ( aPageRect.IsOver( aBoth ) )
                 {
                     SwTwips nPageLeft = 0;
@@ -1120,7 +1118,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
                             if (pObj->IsFormatPossible())
                             {
                                 const Rectangle &rBound = pObj->GetObjRect().SVRect();
-                            // OD 03.03.2003 #107927# - use correct datatype
+                                // OD 03.03.2003 #107927# - use correct datatype
                                 const SwTwips nL = std::max( 0L, rBound.Left() - nOfst );
                                 if ( nL < nMinLeft )
                                     nMinLeft = nL;
commit 688f72e3a2c3ef923389bbd21f6aea3afe1114db
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 19:58:10 2013 +0200

    fdo#39468: Translate German comments in sw/source/core/view
    
    Change-Id: Icc9249ec66ea10ae0ceea6b5e611cf774474c7c2

diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 7b5009b..58a3103 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -156,8 +156,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
     }
 }
 
-
-#define WIEDUWILLST 400
+#define FUZZY_EDGE 400
 
 sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
 {
@@ -181,14 +180,13 @@ sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
     else
         aRect = GetShell()->GetLayout()->Frm();
 
-    aRect.Top(    aRect.Top()    - WIEDUWILLST );
-    aRect.Bottom( aRect.Bottom() + WIEDUWILLST );
-    aRect.Left(   aRect.Left()   - WIEDUWILLST );
-    aRect.Right(  aRect.Right()  + WIEDUWILLST );
+    aRect.Top(    aRect.Top()    - FUZZY_EDGE );
+    aRect.Bottom( aRect.Bottom() + FUZZY_EDGE );
+    aRect.Left(   aRect.Left()   - FUZZY_EDGE );
+    aRect.Right(  aRect.Right()  + FUZZY_EDGE );
     return aRect.IsInside( rPoint );
 }
 
-
 void SwViewImp::NotifySizeChg( const Size &rNewSz )
 {
     if ( !HasDrawView() )
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 12bf9ba..40065dd 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -105,7 +105,7 @@ void ViewShell::PrintProspect(
     OSL_ENSURE( rPagesToPrint.first  == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
     OSL_ENSURE( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
 
-    // eine neue Shell fuer den Printer erzeugen
+    // create a new shell for the printer
     ViewShell aShell( *this, 0, pPrinter );
 
     SET_CURR_SHELL( &aShell );
@@ -179,7 +179,7 @@ void ViewShell::PrintProspect(
         nMaxRowSz = std::max( aNxtPageSize.Height(), aSttPageSize.Height() );
     }
 
-    // den MapMode einstellen
+    // set the MapMode
     aMapMode.SetOrigin( Point() );
     {
         Fraction aScX( aPrtSize.Width(), nMaxColSz );
@@ -188,8 +188,7 @@ void ViewShell::PrintProspect(
             aScY = aScX;
 
         {
-            // fuer Drawing, damit diese ihre Objecte vernuenftig Painten
-            // koennen, auf "glatte" Prozentwerte setzen
+            // Round percentages for Drawings so that these can paint their objects properly
             aScY *= Fraction( 1000, 1 );
             long nTmp = (long)aScY;
             if( 1 < nTmp )
@@ -238,5 +237,4 @@ void ViewShell::PrintProspect(
     pPrinter->Pop();
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 9786ba6..4516f17 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -563,7 +563,7 @@ void ViewShell::MakeVisible( const SwRect &rRect )
             else
             {
                 //MA: 04. Nov. 94, no one needs this, does one?
-                OSL_ENSURE( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
+                OSL_ENSURE( !this, "Is MakeVisible still needed for printers?" );
             }
 
 #endif
@@ -1028,7 +1028,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
     if ( mbInEndAction )
     {
         //Is someone rescheduling again?
-        OSL_ENSURE( !this, "Scroll waehrend einer EndAction." );
+        OSL_ENSURE( !this, "Scrolling during EndAction." );
     }
 #endif
 
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 3b27367..62bbee6 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -52,24 +52,23 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
 
     mbDocSizeChgd = sal_False;
 
-    // Wir gehen auf Nummer sicher:
-    // Wir muessen die alten Fontinformationen wegschmeissen,
-    // wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
-    // Init() und Reformat() sind die sichersten Stellen.
+    // We play it save: Remove old font information whenever the printer
+    // resolution or the zoom factor changes. For that, Init() and Reformat()
+    // are the most secure places.
      pFntCache->Flush( );
 
-    // ViewOptions werden dynamisch angelegt
+    // ViewOptions are created dynamically
 
     if( !mpOpt )
     {
         mpOpt = new SwViewOption;
 
-        // Ein ApplyViewOptions braucht nicht gerufen zu werden
+        // ApplyViewOptions() does not need to be called
         if( pNewOpt )
         {
             *mpOpt = *pNewOpt;
-            // Der Zoomfaktor muss eingestellt werden, weil in der CTOR-
-            // phase aus Performancegruenden kein ApplyViewOptions gerufen wird.
+            // Zoom factor needs to be set because there is no call to ApplyViewOptions() during
+            // CTOR for performance reasons.
             if( GetWin() && 100 != mpOpt->GetZoom() )
             {
                 MapMode aMode( mpWin->GetMapMode() );
@@ -83,9 +82,8 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
 
     SwDocShell* pDShell = mpDoc->GetDocShell();
     mpDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode( pDShell ) );
-    // JP 02.02.99: Bug 61335 - Readonly-Flag an den ViewOptions setzen,
-    //              bevor das Layout angelegt wird. Ansonsten muesste man
-    //              nochmals durchformatieren!!
+    // JP 02.02.99: Bug 61335 - set readonly flag at ViewOptions before creating layout. Otherwise,
+    //                          one would have to reformat again.
 
     if( pDShell && pDShell->IsReadOnly() )
         mpOpt->SetReadonly( sal_True );
@@ -166,14 +164,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
     // <-- #i31958#
 }
 
-/*************************************************************************
-|*
-|*  ViewShell::ViewShell()  CTor fuer die erste Shell.
-|*
-|*  Letzte Aenderung    MA 29. Aug. 95
-|*
-|*************************************************************************/
-
+/// CTor for the first Shell.
 ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
                         const SwViewOption *pNewOpt, OutputDevice *pOutput,
                         long nFlags )
@@ -231,7 +222,7 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
     ((SwHiddenTxtFieldType*)mpDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
         SetHiddenFlag( !mpOpt->IsShowHiddenField() );
 
-    //In Init wird ein Standard-FrmFmt angelegt.
+    // In Init a standard FrmFmt is created.
     // --> OD 2005-02-11 #i38810#
     if (   !mpDoc->GetIDocumentUndoRedo().IsUndoNoResetModified()
         && !bIsDocModified )
@@ -240,7 +231,7 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
         mpDoc->ResetModified();
     }
 
-    //Format-Cache erweitern.
+    // extend format cache.
     if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
         SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
     if( mpOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
@@ -250,14 +241,7 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
     mbInConstructor = false;
 }
 
-/*************************************************************************
-|*
-|*  ViewShell::ViewShell()  CTor fuer weitere Shells auf ein Dokument.
-|*
-|*  Letzte Aenderung    MA 29. Aug. 95
-|*
-|*************************************************************************/
-
+/// CTor for further Shells on a document.
 ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
                         OutputDevice *pOutput, long nFlags ) :
     Ring( &rShell ),
@@ -302,7 +286,7 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
     sal_Bool bModified = mpDoc->IsModified();
 
     pOutput = mpOut;
-    Init( rShell.GetViewOptions() );    //verstellt ggf. das Outdev (InitPrt())
+    Init( rShell.GetViewOptions() ); // might change Outdev (InitPrt())
     mpOut = pOutput;
 
     // OD 12.12.2002 #103492#
@@ -312,13 +296,13 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
     ((SwHiddenTxtFieldType*)mpDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
             SetHiddenFlag( !mpOpt->IsShowHiddenField() );
 
-    // in Init wird ein Standard-FrmFmt angelegt
+    // In Init a standard FrmFmt is created.
     if( !bModified && !mpDoc->GetIDocumentUndoRedo().IsUndoNoResetModified() )
     {
         mpDoc->ResetModified();
     }
 
-    //Format-Cache erweitern.
+    // extend format cache.
     if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
         SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
     if( mpOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
@@ -375,7 +359,7 @@ ViewShell::~ViewShell()
             GetDoc()->StopNumRuleAnimations( mpOut );
         }
 
-        delete mpImp; //Erst loeschen, damit die LayoutViews vernichtet werden.
+        delete mpImp; // Delete first, so that the LayoutViews are destroyed.
         mpImp = 0;   // Set to zero, because ~SwFrm relies on it.
 
         if ( mpDoc )
@@ -388,11 +372,11 @@ ViewShell::~ViewShell()
 
         delete mpOpt;
 
-        //Format-Cache zurueckschrauben.
+        // resize format cache.
         if ( SwTxtFrm::GetTxtCache()->GetCurMax() > 250 )
             SwTxtFrm::GetTxtCache()->DecreaseMax( 100 );
 
-        //Ggf. aus der PaintQueue entfernen lassen
+        // Remove from PaintQueue if necessary
         SwPaintQueue::Remove( this );
 
         OSL_ENSURE( !mnStartAction, "EndAction() pending." );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 85c8ea7..0371018 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -60,8 +60,8 @@
 #include <viewopt.hxx>
 #include <printdata.hxx>    // SwPrintData
 #include <pagedesc.hxx>
-#include <poolfmt.hxx>      // fuer RES_POOLPAGE_JAKET
-#include <mdiexp.hxx>       // Ansteuern der Statusleiste
+#include <poolfmt.hxx>      // for RES_POOLPAGE_JAKET
+#include <mdiexp.hxx>       // for accessing status bar
 #include <statstr.hrc>      //      -- " --
 #include <ptqueue.hxx>
 #include <tabfrm.hxx>
@@ -74,7 +74,7 @@
 using namespace ::com::sun::star;
 
 //--------------------------------------------------------------------
-//Klasse zum Puffern von Paints
+/// Painting buffer
 class SwQueuedPaint
 {
 public:
@@ -137,8 +137,7 @@ void SwPaintQueue::Repaint()
             {
                 if ( pSh->GetWin() )
                 {
-                    //Fuer PreView aussenherum, weil im PaintHdl (UI) die
-                    //Zeilen/Spalten bekannt sind.
+                    // for previewing, since rows/columns are known in PaintHdl (UI)
                     pSh->GetWin()->Invalidate();
                     pSh->GetWin()->Update();
                 }
@@ -211,11 +210,9 @@ void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/
 
 void ViewShell::InitPrt( OutputDevice *pOutDev )
 {
-    //Fuer den Printer merken wir uns einen negativen Offset, der
-    //genau dem Offset de OutputSize entspricht. Das ist notwendig,
-    //weil unser Ursprung der linken ober Ecke der physikalischen
-    //Seite ist, die Ausgaben (SV) aber den Outputoffset als Urstprung
-    //betrachten.
+    // For printing we use a negative offset (exactly the offset of OutputSize).
+    // This is necessary because the origin is in the upper left corner of the
+    // physical page while the output uses OutputOffset as origin.
     if ( pOutDev )
     {
         maPrtOffst = Point();
@@ -231,7 +228,7 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
         maPrtOffst.X() = maPrtOffst.Y() = 0;
 
     if ( !mpWin )
-        mpOut = pOutDev;    //Oder was sonst?
+        mpOut = pOutDev;
 }
 
 /******************************************************************************
@@ -263,10 +260,10 @@ void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
             aNew.SetLandscape( bNewOri );
             SwFrmFmt& rFmt = aNew.GetMaster();
             SwFmtFrmSize aSz( rFmt.GetFrmSize() );
-            // Groesse anpassen.
-            // PORTRAIT  -> Hoeher als Breit
-            // LANDSCAPE -> Breiter als Hoch
-            // Hoehe ist die VarSize, Breite ist die FixSize (per Def.)
+            // adjust size
+            // PORTRAIT  -> higher than wide
+            // LANDSCAPE -> wider than high
+            // Height is the VarSize, width the FixSize (per Def.)
             if( bNewOri ? aSz.GetHeight() > aSz.GetWidth()
                         : aSz.GetHeight() < aSz.GetWidth() )
             {
@@ -346,7 +343,7 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
 
         aAction.Action();
 
-        maVisArea = aOldVis;             //Zuruecksetzen wg. der Paints!
+        maVisArea = aOldVis; //reset due to the paints
         Imp()->SetFirstVisPageInvalid();
 //       SwPaintQueue::Repaint();
     }
@@ -360,13 +357,13 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
 {
     OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
     SwFEShell* pFESh = (SwFEShell*)this;
-    // Wir bauen uns ein neues Dokument
+    // Let's create a new document
 //    SwDoc *pPrtDoc = new SwDoc;
 //    pPrtDoc->acquire();
 //    pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
     pPrtDoc->LockExpFlds();
 
-    // Der Drucker wird uebernommen
+    // use given printer
     //! Make a copy of it since it gets destroyed with the temporary document
     //! used for PDF export
     if (pPrt)
@@ -384,12 +381,12 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
 
     SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
     SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
-    if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
+    if( !pActCrsr->HasMark() ) // with a multi-selection the current cursor might be empty
     {
         pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
     }
 
-    // Die Y-Position der ersten Selektion
+    // Y-position of the first selection
     Point aSelPoint;
     if( pFESh->IsTableMode() )
     {
@@ -428,16 +425,16 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
             ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
     }
 
-    // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+    // a new one has been created in CORE (copying OLE objects)
 //      if( aDocShellRef.Is() )
 //          SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
-    // und fuellen es mit dem selektierten Bereich
+    // fill it with the selected content
     pFESh->Copy( pPrtDoc );
 
-    //Jetzt noch am ersten Absatz die Seitenvorlage setzen
+    // set the page template at the first paragraph
     {
         SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
-        SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
+        SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // go to 1st ContentNode
         if( pFESh->IsTableMode() )
         {
             SwTableNode* pTNd = pCNd->FindTableNode();
@@ -454,7 +451,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
                 {
                     SwCntntNode *pFirstNd =
                         pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
-                    // Hier werden die Absatzattribute des ersten Absatzes uebertragen
+                    // copy paragraph attributes of the first paragraph
                     if( pFirstNd && pFirstNd->IsTxtNode() )
                         ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
                 }
@@ -489,7 +486,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
     sal_Int32 nRenderer     /* the index in the vector of pages to be printed */ )
 {
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//Immer die Druckroutinen in viewpg.cxx (PrintProspect) mitpflegen!!
+// CAUTION: Do also always update the printing routines in viewpg.cxx (PrintProspect)!
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
     const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagesToPrint().size() - 1;
@@ -516,12 +513,11 @@ sal_Bool ViewShell::PrintOrPDFExport(
         pDrawView->SetBufferedOverlayAllowed( false );
     }
 
-    {   //Zusaetzlicher Scope, damit die CurrShell vor dem zerstoeren der
-        //Shell zurueckgesetzt wird.
+    {   // additional scope so that the CurrShell is reset before destroying the shell
 
         SET_CURR_SHELL( pShell );
 
-        //JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
+        //JP 01.02.99: Bug 61335 - the ReadOnly flag is never copied
         if( mpOpt->IsReadonly() )
             pShell->mpOpt->SetReadonly( sal_True );
 
@@ -552,7 +548,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
 
 // FIXME disabled because rPrintData.aOffset is always (0,0)
 #if 0
-        //  wenn wir einen Umschlag drucken wird ein Offset beachtet
+        //  consider offset when printing an envelope
         if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
         {
             Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
@@ -570,7 +566,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
         pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
 
         SwPaintQueue::Repaint();
-    }  //Zus. Scope wg. CurShell!
+    }
 
     delete pShell;
 
@@ -593,9 +589,8 @@ sal_Bool ViewShell::PrintOrPDFExport(
 void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
                          OutputDevice* pOleOut, const Rectangle& rRect )
 {
-  //Wir brauchen eine Shell fuer das Drucken. Entweder hat das Doc schon
-    //eine, dann legen wir uns eine neue Sicht an, oder das Doc hat noch
-    //keine, dann erzeugen wir die erste Sicht.
+    // For printing a shell is needed. Either the Doc already has one, than we
+    // create a new view, or it has none, than we create the first view.
     ViewShell *pSh;
     if( pDoc->GetCurrentViewShell() )
         pSh = new ViewShell( *pDoc->GetCurrentViewShell(), 0, pOleOut,VSHELLFLAG_SHARELAYOUT );//swmod 080129
@@ -622,29 +617,21 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
         // Removing this gives us a performance gain during saving the
         // document because the thumbnail creation will not trigger a complete
         // formatting of the document.
-        // Seiten fuers Drucken formatieren
+        // Format pages for printing
         // pSh->CalcPagesForPrint( SHRT_MAX );
-        //#39275# jetzt will der Meyer doch ein Clipping
+        //#39275# now Meyer wants again a Clipping
         pOleOut->Push( PUSH_CLIPREGION );
         pOleOut->IntersectClipRegion( aSwRect.SVRect() );
         pSh->GetLayout()->Paint( aSwRect );
 //      SFX_APP()->SpoilDemoOutput( *pOleOut, rRect );
 
         pOleOut->Pop();
-        // erst muss das CurrShell Object zerstoert werden!!
+        // first the CurrShell object needs to be destroyed!
     }
     delete pSh;
 }
 
-/******************************************************************************
- *  Methode     :   IsAnyFieldInDoc()
- *  Beschreibung:   Stellt fest, ob im DocNodesArray Felder verankert sind
- *  Erstellt    :   JP 27.07.95
- *  Aenderung   :   JP 10.12.97
- ******************************************************************************/
-
-
-
+/// Check if the DocNodesArray contains fields.
 sal_Bool ViewShell::IsAnyFieldInDoc() const
 {
     const SfxPoolItem* pItem;
commit 68334b7c3f2c0654d28661d56e492922deef55cd
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 18:49:24 2013 +0200

    work on comments and remove commented-out code in sw/source/core/graphic
    
    Change-Id: I2b1b29d469277998dafed41fb7c0bb33e8064a16

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index b95da0f..5a1eea5 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -209,9 +209,7 @@ sal_Bool SwGrfNode::ReRead(
                     SwMsgPoolItem aMsgHint( RES_GRF_REREAD_AND_INCACHE );
                     ModifyNotification( &aMsgHint, &aMsgHint );
                 }
-                // #i59688#
-                // do not load linked graphic, if it isn't a new linked graphic.
-//                else {
+                // #i59688# - do not load linked graphic, if it isn't a new linked graphic.
                 else if ( bNewGrf )
                 {
                     //TODO refLink->setInputStream(getInputStream());
@@ -224,7 +222,7 @@ sal_Bool SwGrfNode::ReRead(
     }
     else if( pGraphic && !rGrfName.Len() )
     {
-        // MIB 27.02.2001: Old stream must be deleted before the new one is set.
+        // Old stream must be deleted before the new one is set.
         if( HasStreamName() )
             DelStreamName();
 
@@ -234,7 +232,7 @@ sal_Bool SwGrfNode::ReRead(
     }
     else if( pGrfObj && !rGrfName.Len() )
     {
-        // MIB 27.02.2001: Old stream must be deleted before the new one is set.
+        // Old stream must be deleted before the new one is set.
         if( HasStreamName() )
             DelStreamName();
 
@@ -322,17 +320,15 @@ SwGrfNode::~SwGrfNode()
     }
     else
     {
-        // #i40014# - A graphic node, which are in linked
-        // section, whose link is another section is the document, doesn't
+        // #i40014# - A graphic node, which is in a linked
+        // section, whose link is another section in the document, doesn't
         // have to remove the stream from the storage.
         // Because it's hard to detect this case here and it would only fix
         // one problem with shared graphic files - there are also problems,
         // a certain graphic file is referenced by two independent graphic nodes,
         // brush item or drawing objects, the stream isn't no longer removed here.
-        // To do this stuff correct, a reference counting on shared streams
-        // inside one document have to be implemented.
-//        if( !pDoc->IsInDtor() && HasStreamName() )
-//          DelStreamName();
+        // To do this stuff correctly, a reference counting on shared streams
+        // inside one document has to be implemented.
     }
     //#39289# delete frames already here since the Frms' dtor needs the graphic for its StopAnimation
     if( GetDepends() )
@@ -376,13 +372,6 @@ void SwGrfNode::onGraphicChanged()
             }
         }
 
-        // do not use this currently; it seems that this name has to be unique in
-        // the writer model and is already set to some default
-        //if(aName.Len() && pFlyFmt)
-        //{
-        //    pFlyFmt->SetName(aName);
-        //}
-
         if(aTitle.Len())
         {
             SetTitle(aTitle);
@@ -494,7 +483,6 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
             GRAPHIC_DEFAULT == maGrfObj.GetType() )
         {
             // link was not loaded yet
-            //TODO pLink->setInputStream(getInputStream());
             if( pLink->SwapIn( bWaitForData ) )
                 nRet = -1;
             else if( GRAPHIC_DEFAULT == maGrfObj.GetType() )
@@ -511,7 +499,6 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
         }
         else if( maGrfObj.IsSwappedOut() ) {
             // link to download
-            //TODO pLink->setInputStream(getInputStream());
             nRet = pLink->SwapIn( bWaitForData ) ? 1 : 0;
         }
         else
@@ -524,11 +511,8 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
             nRet = (short)maGrfObj.SwapIn();
         else
         {
-
-            // #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
             try
             {
-                // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
                 String aStrmName, aPicStgName;
                 _GetStreamStorageNames( aStrmName, aPicStgName );
                 uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -634,14 +618,12 @@ sal_Bool SwGrfNode::SavePersistentData()
     // Do not delete graphic file in storage, because the graphic file could
     // be referenced by other graphic nodes.
     // Because it's hard to detect this case here and it would only fix
-    // one problem with shared graphic files - there are also problems,
+    // one problem with shared graphic files - there are also problems, if
     // a certain graphic file is referenced by two independent graphic nodes,
     // brush item or drawing objects, the stream isn't no longer removed here.
     // To do this stuff correct, a reference counting on shared streams
-    // inside one document have to be implemented.
+    // inside one document has to be implemented.
     // Important note: see also fix for #i40014#
-//    if( HasStreamName() )
-//        DelStreamName();
 
     // swap out into temp file
     return (sal_Bool) SwapOut();
@@ -699,7 +681,6 @@ void SwGrfNode::ReleaseLink()
         {
             bInSwapIn = sal_True;
             SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
-            //TODO pLink->setInputStream(getInputStream());
             pLink->SwapIn( sal_True, sal_True );
             bInSwapIn = sal_False;
         }
@@ -843,8 +824,6 @@ uno::Reference< embed::XStorage > SwGrfNode::_GetDocSubstorageOrRoot( const Stri
     provided via parameter. Otherwise the returned stream will be closed
     after the method returns, because its parent stream is closed and deleted.
     Proposed name of embedded graphic stream is also provided by parameter.
-
-    @author OD
 */
 SvStream* SwGrfNode::_GetStreamForEmbedGrf(
             const uno::Reference< embed::XStorage >& _refPics,
@@ -889,8 +868,6 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
     return pStrm;
 }
 
-// #i53025# - stream couldn't be in a 3.1 - 5.2 storage any more.
-// Thus, removing corresponding code.
 void SwGrfNode::_GetStreamStorageNames( String& rStrmName,
                                         String& rStorName ) const
 {
@@ -940,10 +917,8 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
     SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
     if( !pLink && HasStreamName() )
     {
-        // #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
         try
         {
-            // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
             String aStrmName, aPicStgName;
             _GetStreamStorageNames( aStrmName, aPicStgName );
             uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -1022,10 +997,8 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
 
         if( HasStreamName() )
         {
-            // #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
             try
             {
-                // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
                 String aStrmName, aPicStgName;
                 _GetStreamStorageNames( aStrmName, aPicStgName );
                 uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -1079,7 +1052,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc )
     }
 }
 
-// returns the with our graphic attributes filled Graphic-Attr-Structure
+/// returns the Graphic-Attr-Structure filled with our graphic attributes
 GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
                                         const SwFrm* pFrm ) const
 {
@@ -1214,10 +1187,8 @@ void SwGrfNode::ApplyInputStream(
 
 void SwGrfNode::UpdateLinkWithInputStream()
 {
-    // --> OD #i85105#
     // do not work on link, if a <SwapIn> has been triggered.
     if ( !bInSwapIn && IsLinkedFile() )
-    // <--
     {
         GetLink()->setStreamToLoadFrom( mxInputStream, mbIsStreamReadOnly );
         GetLink()->Update();
commit e89804f1fcb323712ba35033ee9839d8a1f9f271
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 18:47:23 2013 +0200

    fdo#39468: Translate German comments in sw/source/core/graphic
    
    Change-Id: Ic78269f73b31125d7326b9aa1bfca76d7e881177

diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index b5f2d2e..2ab9fe8 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -79,7 +79,7 @@ bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
 {
     bool bRet = true;
     sal_Bool bVal;
-    // Vertikal und Horizontal sind mal getauscht worden!
+    // vertical and horizontal were swapped at some point
     nMemberId &= ~CONVERT_TWIPS;
     switch ( nMemberId )
     {
@@ -105,7 +105,7 @@ bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 {
     bool bRet = true;
     sal_Bool bVal = *(sal_Bool*)rVal.getValue();
-    // Vertikal und Horizontal sind mal getauscht worden!
+    // vertical and horizontal were swapped at some point
     nMemberId &= ~CONVERT_TWIPS;
     switch ( nMemberId )
     {
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 51797e7..b95da0f 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -94,8 +94,12 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
     bGrafikArrived = sal_True;
 }
 
-// Konstruktor fuer den SW/G-Reader. Dieser ctor wird verwendet,
-// wenn eine gelinkte Grafik gelesen wird. Sie liest diese NICHT ein.
+/** Create new SW/G reader.
+ *
+ * Use this ctor if you want to read a linked graphic.
+ *
+ * @note Does not read/open the image itself!
+ */
 SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
                       const String& rGrfName, const String& rFltName,
                       SwGrfFmtColl *pGrfColl,
@@ -123,7 +127,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
         if( INET_PROT_FILE == aUrl.GetProtocol() &&
             FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::NO_DECODE ) ))
         {
-            // File vorhanden, Verbindung herstellen ohne ein Update
+            // file exists, so create connection without an update
             ((SwBaseLink*)&refLink)->Connect();
         }
     }
@@ -141,15 +145,14 @@ sal_Bool SwGrfNode::ReRead(
     OSL_ENSURE( pGraphic || pGrfObj || rGrfName.Len(),
             "GraphicNode without a name, Graphic or GraphicObject" );
 
-    // ReadRead mit Namen
+    // with name
     if( refLink.Is() )
     {
-        OSL_ENSURE( !bInSwapIn, "ReRead: stehe noch im SwapIn" );
+        OSL_ENSURE( !bInSwapIn, "ReRead: I am still in SwapIn" );
 
         if( rGrfName.Len() )
         {
-            // Besonderheit: steht im FltNamen DDE, handelt es sich um eine
-            //                  DDE-gelinkte Grafik
+            // Note: If there is DDE in the FltName, than it is a DDE-linked graphic
             String sCmd( rGrfName );
             if( rFltName.Len() )
             {
@@ -171,7 +174,7 @@ sal_Bool SwGrfNode::ReRead(
 
             refLink->SetLinkSourceName( sCmd );
         }
-        else        // kein Name mehr, Link aufheben
+        else // no name anymore, so remove link
         {
             GetDoc()->GetLinkManager().Remove( refLink );
             refLink.Clear();
@@ -194,9 +197,8 @@ sal_Bool SwGrfNode::ReRead(
         }
         else
         {
-            // MIB 25.02.97: Daten der alten Grafik zuruecksetzen, damit
-            // die korrekte Ersatz-Darstellung erscheint, wenn die
-            // der neue Link nicht geladen werden konnte.
+            // reset data of the old graphic so that the correct placeholder is
+            // shown in case the new link could not be loaded
             Graphic aGrf; aGrf.SetDefaultType();
             maGrfObj.SetGraphic( aGrf, rGrfName );
 
@@ -242,17 +244,15 @@ sal_Bool SwGrfNode::ReRead(
             maGrfObj.SetSwapState();
         bReadGrf = sal_True;
     }
-        // Import einer Grafik:
-        // Ist die Grafik bereits geladen?
+    // Was the graphic already loaded?
     else if( !bNewGrf && GRAPHIC_NONE != maGrfObj.GetType() )
         return sal_True;
-
     else
     {
         if( HasStreamName() )
             DelStreamName();
 
-        // einen neuen Grafik-Link anlegen
+        // create new link for the graphic object
         InsertLink( rGrfName, rFltName );
 
         if( GetNodes().IsDocNodes() )
@@ -262,7 +262,7 @@ sal_Bool SwGrfNode::ReRead(
                 maGrfObj.SetGraphic( *pGraphic, rGrfName );
                 onGraphicChanged();
                 bReadGrf = sal_True;
-                // Verbindung herstellen ohne ein Update; Grafik haben wir!
+                // create connection without update, as we have the graphic
                 ((SwBaseLink*)&refLink)->Connect();
             }
             else if( pGrfObj )
@@ -271,14 +271,13 @@ sal_Bool SwGrfNode::ReRead(
                 maGrfObj.SetLink( rGrfName );
                 onGraphicChanged();
                 bReadGrf = sal_True;
-                // Verbindung herstellen ohne ein Update; Grafik haben wir!
+                // create connection without update, as we have the graphic
                 ((SwBaseLink*)&refLink)->Connect();
             }
             else
             {
-                // MIB 25.02.97: Daten der alten Grafik zuruecksetzen, damit
-                // die korrekte Ersatz-Darstellung erscheint, wenn die
-                // der neue Kink nicht geladen werden konnte.
+                // reset data of the old graphic so that the correct placeholder is
+                // shown in case the new link could not be loaded
                 Graphic aGrf; aGrf.SetDefaultType();
                 maGrfObj.SetGraphic( aGrf, rGrfName );
                 onGraphicChanged();
@@ -291,12 +290,12 @@ sal_Bool SwGrfNode::ReRead(
         }
     }
 
-    // Bug 39281: Size nicht sofort loeschen - Events auf ImageMaps
-    //            sollten nicht beim Austauschen nicht ins "leere greifen"
+    // Bug 39281: Do not delete Size immediately - Events on ImageMaps should have
+    // something to work with when swapping
     if( bSetTwipSize )
         SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), 0 ) );
 
-    // erzeuge noch einen Update auf die Frames
+    // create an updates for the frames
     if( bReadGrf && bNewGrf )
     {
         SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
@@ -317,7 +316,7 @@ SwGrfNode::~SwGrfNode()
     SwDoc* pDoc = GetDoc();
     if( refLink.Is() )
     {
-        OSL_ENSURE( !bInSwapIn, "DTOR: stehe noch im SwapIn" );
+        OSL_ENSURE( !bInSwapIn, "DTOR: I am still in SwapIn" );
         pDoc->GetLinkManager().Remove( refLink );
         refLink->Disconnect();
     }
@@ -335,8 +334,7 @@ SwGrfNode::~SwGrfNode()
 //        if( !pDoc->IsInDtor() && HasStreamName() )
 //          DelStreamName();
     }
-    //#39289# Die Frames muessen hier bereits geloescht weil der DTor der
-    //Frms die Grafik noch fuer StopAnimation braucht.
+    //#39289# delete frames already here since the Frms' dtor needs the graphic for its StopAnimation
     if( GetDepends() )
         DelFrms();
 }
@@ -433,7 +431,7 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
 {
     OSL_ENSURE( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
     SwGrfNode *pNode;
-    // Delayed erzeugen nur aus dem SW/G-Reader
+    // create object delayed, only from a SW/G-reader
     if( bDelayed )
         pNode = new SwGrfNode( rWhere, rGrfName,
                                 rFltName, pGrfColl, pAutoAttr );
@@ -476,14 +474,14 @@ sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
     return sal_False;
 }
 
-// Returnwert:
-// -1 : ReRead erfolgreich
-//  0 : nicht geladen
-//  1 : Einlesen erfolgreich
-
+/**
+ * @return -1 if ReRead successful,
+ *          1 if reading successful,
+ *          0 if not loaded
+ */
 short SwGrfNode::SwapIn( sal_Bool bWaitForData )
 {
-    if( bInSwapIn )                 // nicht rekuriv!!
+    if( bInSwapIn ) // not recursively!
         return !maGrfObj.IsSwappedOut();
 
     short nRet = 0;
@@ -495,13 +493,13 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
         if( GRAPHIC_NONE == maGrfObj.GetType() ||
             GRAPHIC_DEFAULT == maGrfObj.GetType() )
         {
-            // noch nicht geladener Link
+            // link was not loaded yet
             //TODO pLink->setInputStream(getInputStream());
             if( pLink->SwapIn( bWaitForData ) )
                 nRet = -1;
             else if( GRAPHIC_DEFAULT == maGrfObj.GetType() )
             {
-                // keine default Bitmap mehr, also neu Painten!
+                // no default bitmap anymore, thus re-paint
                 delete mpReplacementGraphic;
                 mpReplacementGraphic = 0;
 
@@ -512,7 +510,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
             }
         }
         else if( maGrfObj.IsSwappedOut() ) {
-            // nachzuladender Link
+            // link to download
             //TODO pLink->setInputStream(getInputStream());
             nRet = pLink->SwapIn( bWaitForData ) ? 1 : 0;
         }
@@ -521,7 +519,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
     }
     else if( maGrfObj.IsSwappedOut() )
     {
-        // Die Grafik ist im Storage oder im TempFile drin
+        // graphic is in storage or in a temp file
         if( !HasStreamName() )
             nRet = (short)maGrfObj.SwapIn();
         else
@@ -557,7 +555,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
     }
     else
         nRet = 1;
-    OSL_ENSURE( nRet, "Grafik kann nicht eingeswapt werden" );
+    OSL_ENSURE( nRet, "Cannot swap in graphic" );
 
     if( nRet )
     {
@@ -576,15 +574,14 @@ short SwGrfNode::SwapOut()
     {
         if( !refLink.Is() )
         {
-            // Das Swapping brauchen wir nur fuer Embedded Pictures
-            // Die Grafik wird in eine TempFile geschrieben, wenn
-            // sie frisch eingefuegt war, d.h. wenn es noch keinen
-            // Streamnamen im Storage gibt.
+            // Swapping is only needed for embedded pictures.
+            // The graphic will be written into a temp file if it is new, i.e.
+            // if there is no stream name in the storage yet
             if( !HasStreamName() )
                 if( !maGrfObj.SwapOut() )
                     return 0;
         }
-        // Geschriebene Grafiken oder Links werden jetzt weggeschmissen
+        // written graphics and links are removed here
         return (short) maGrfObj.SwapOut( NULL );
     }
     return 1;
@@ -616,18 +613,20 @@ bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
     return bRet;
 }
 
-// Eine Grafik Undo-faehig machen. Falls sie sich bereits in
-// einem Storage befindet, muss sie geladen werden.
+/** Make a graphic object ready for UNDO.
+ *
+ * If it is already in storage, it needs to be loaded.
+ */
 sal_Bool SwGrfNode::SavePersistentData()
 {
     if( refLink.Is() )
     {
-        OSL_ENSURE( !bInSwapIn, "SavePersistentData: stehe noch im SwapIn" );
+        OSL_ENSURE( !bInSwapIn, "SavePersistentData: I am still in SwapIn" );
         GetDoc()->GetLinkManager().Remove( refLink );
         return sal_True;
     }
 
-    // Erst mal reinswappen, falls sie im Storage ist
+    // swap in first if already in storage
     if( HasStreamName() && !SwapIn() )
         return sal_False;
 
@@ -644,7 +643,7 @@ sal_Bool SwGrfNode::SavePersistentData()
 //    if( HasStreamName() )
 //        DelStreamName();
 
-    // Und in TempFile rausswappen
+    // swap out into temp file
     return (sal_Bool) SwapOut();
 }
 
@@ -710,16 +709,15 @@ void SwGrfNode::ReleaseLink()
     }
 }
 
-
 void SwGrfNode::SetTwipSize( const Size& rSz )
 {
     nGrfSize = rSz;
     if( IsScaleImageMap() && nGrfSize.Width() && nGrfSize.Height() )
     {
-        // Image-Map an Grafik-Groesse anpassen
+        // resize Image-Map to size of the graphic
         ScaleImageMap();
 
-        // Image-Map nicht noch einmal skalieren
+        // do not re-scale Image-Map
         SetScaleImageMap( sal_False );
     }
 }
@@ -729,7 +727,7 @@ void SwGrfNode::ScaleImageMap()
     if( !nGrfSize.Width() || !nGrfSize.Height() )
         return;
 
-    // dann die Image-Map skalieren
+    // re-scale Image-Map
     SwFrmFmt* pFmt = GetFlyFmt();
 
     if( !pFmt )
@@ -753,7 +751,7 @@ void SwGrfNode::ScaleImageMap()
         nWidth -= rBox.CalcLineSpace(BOX_LINE_LEFT) +
                   rBox.CalcLineSpace(BOX_LINE_RIGHT);
 
-        OSL_ENSURE( nWidth>0, "Gibt es 0 twip breite Grafiken!?" );
+        OSL_ENSURE( nWidth>0, "Do any 0 twip wide graphics exist!?" );
 
         if( nGrfSize.Width() != nWidth )
         {
@@ -768,7 +766,7 @@ void SwGrfNode::ScaleImageMap()
         nHeight -= rBox.CalcLineSpace(BOX_LINE_TOP) +
                    rBox.CalcLineSpace(BOX_LINE_BOTTOM);
 
-        OSL_ENSURE( nHeight>0, "Gibt es 0 twip hohe Grafiken!?" );
+        OSL_ENSURE( nHeight>0, "Do any 0 twip high graphics exist!?" );
 
         if( nGrfSize.Height() != nHeight )
         {
@@ -784,12 +782,11 @@ void SwGrfNode::ScaleImageMap()
     }
 }
 
-
 void SwGrfNode::DelStreamName()
 {
     if( HasStreamName() )
     {
-        // Dann die Grafik im Storage loeschen
+        // then remove graphic from storage
         uno::Reference < embed::XStorage > xDocStg = GetDoc()->GetDocStorage();
         if( xDocStg.is() )
         {
@@ -936,7 +933,7 @@ void SwGrfNode::_GetStreamStorageNames( String& rStrmName,
 
 SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
 {
-    // kopiere die Formate in das andere Dokument:
+    // copy formats into the other document
     SwGrfFmtColl* pColl = pDoc->CopyGrfColl( *GetGrfColl() );
 
     Graphic aTmpGrf;
@@ -1058,12 +1055,12 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
     return (long)pRet;
 }
 
-// alle QuickDraw-Bitmaps eines speziellen Docs loeschen
+/// delete all QuickDraw-Bitmaps in the specified document
 void DelAllGrfCacheEntries( SwDoc* pDoc )
 {
     if( pDoc )
     {
-        // alle Graphic-Links mit dem Namen aus dem Cache loeschen
+        // delete all Graphic-Links with this name from cache
         const sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager();
         const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
         SwGrfNode* pGrfNd;
commit 24c3a58a0782f81eed3902c3aa16868229d24628
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 18:39:59 2013 +0200

    fdo#62475 - remove ASCII art in sw/source/core/graphic
    
    Change-Id: Ie37dbb1c0c5d01c958d168d15ec5285c36bbf28d

diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index 4169f2f..b5f2d2e 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -43,9 +43,7 @@ using namespace ::com::sun::star;
 TYPEINIT1_AUTOFACTORY(SwCropGrf, SfxPoolItem)
 TYPEINIT1_AUTOFACTORY(SwGammaGrf, SfxPoolItem)
 
-/******************************************************************************
- *  Implementierung     class SwMirrorGrf
- ******************************************************************************/
+// SwMirrorGrf
 
 SfxPoolItem* SwMirrorGrf::Clone( SfxItemPool* ) const
 {
@@ -69,12 +67,14 @@ static sal_Bool lcl_IsHoriOnEvenPages(int nEnum, sal_Bool bToggle)
                    nEnum == RES_MIRROR_GRAPH_BOTH;
             return bEnum != bToggle;
 }
+
 static sal_Bool lcl_IsHoriOnOddPages(int nEnum)
 {
     sal_Bool bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
                    nEnum == RES_MIRROR_GRAPH_BOTH;
             return bEnum;
 }
+
 bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
 {
     bool bRet = true;
@@ -149,10 +149,7 @@ bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
     return bRet;
 }
 
-
-/******************************************************************************
- *  Implementierung     class SwCropGrf
- ******************************************************************************/
+// SwCropGrf
 
 SwCropGrf::SwCropGrf()
     : SvxGrfCrop( RES_GRFATR_CROPGRF )
@@ -167,21 +164,19 @@ SfxPoolItem* SwCropGrf::Clone( SfxItemPool* ) const
     return new SwCropGrf( *this );
 }
 
-// ------------------------------------------------------------------
+// SwRotationGrf
 
 SfxPoolItem* SwRotationGrf::Clone( SfxItemPool * ) const
 {
     return new SwRotationGrf( GetValue(), aUnrotatedSize );
 }
 
-
 int SwRotationGrf::operator==( const SfxPoolItem& rCmp ) const
 {
     return SfxUInt16Item::operator==( rCmp ) &&
         GetUnrotatedSize() == ((SwRotationGrf&)rCmp).GetUnrotatedSize();
 }
 
-
 bool SwRotationGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
 {
     // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
@@ -206,48 +201,40 @@ bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
     return false;
 }
 
-// ------------------------------------------------------------------
+// Sw___Grf::Clone(..)
 
 SfxPoolItem* SwLuminanceGrf::Clone( SfxItemPool * ) const
 {
     return new SwLuminanceGrf( *this );
 }
 
-// ------------------------------------------------------------------
-
 SfxPoolItem* SwContrastGrf::Clone( SfxItemPool * ) const
 {
     return new SwContrastGrf( *this );
 }
 
-// ------------------------------------------------------------------
-
 SfxPoolItem* SwChannelRGrf::Clone( SfxItemPool * ) const
 {
     return new SwChannelRGrf( *this );
 }
 
-// ------------------------------------------------------------------
-
 SfxPoolItem* SwChannelGGrf::Clone( SfxItemPool * ) const
 {
     return new SwChannelGGrf( *this );
 }
 
-// ------------------------------------------------------------------
-
 SfxPoolItem* SwChannelBGrf::Clone( SfxItemPool * ) const
 {
     return new SwChannelBGrf( *this );
 }
 
-// ------------------------------------------------------------------
-
 SfxPoolItem* SwGammaGrf::Clone( SfxItemPool * ) const
 {
     return new SwGammaGrf( *this );
 }
 
+// SwGammaGrf
+
 int SwGammaGrf::operator==( const SfxPoolItem& rCmp ) const
 {
     return SfxPoolItem::operator==( rCmp ) &&
@@ -265,20 +252,20 @@ bool SwGammaGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
     return rVal >>= nValue;
 }
 
-// ------------------------------------------------------------------
+// Sw___Grf::Clone(..) cont'd
 
 SfxPoolItem* SwInvertGrf::Clone( SfxItemPool * ) const
 {
     return new SwInvertGrf( *this );
 }
 
-// ------------------------------------------------------------------
-
 SfxPoolItem* SwTransparencyGrf::Clone( SfxItemPool * ) const
 {
     return new SwTransparencyGrf( *this );
 }
-// ------------------------------------------------------------------
+
+// SwTransparencyGrf
+
 bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
                                         sal_uInt8 ) const
 {
@@ -288,7 +275,7 @@ bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
     rVal <<= nRet;
     return true;
 }
-// ------------------------------------------------------------------
+
 bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
                                         sal_uInt8 )
 {
@@ -309,13 +296,15 @@ bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
     return true;
 }
 
-// ------------------------------------------------------------------
+// Sw___Grf::Clone(..) cont'd
 
 SfxPoolItem* SwDrawModeGrf::Clone( SfxItemPool * ) const
 {
     return new SwDrawModeGrf( *this );
 }
 
+// SwDrawModeGrf
+
 sal_uInt16 SwDrawModeGrf::GetValueCount() const
 {
     return GRAPHICDRAWMODE_WATERMARK + 1;
@@ -341,6 +330,4 @@ bool SwDrawModeGrf::PutValue( const uno::Any& rVal,
     return false;
 }
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 0c15ce7..51797e7 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -55,9 +55,6 @@
 
 using namespace com::sun::star;
 
-// --------------------
-// SwGrfNode
-// --------------------
 SwGrfNode::SwGrfNode(
         const SwNodeIndex & rWhere,
         const String& rGrfName, const String& rFltName,
@@ -99,8 +96,6 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
 
 // Konstruktor fuer den SW/G-Reader. Dieser ctor wird verwendet,
 // wenn eine gelinkte Grafik gelesen wird. Sie liest diese NICHT ein.
-
-
 SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
                       const String& rGrfName, const String& rFltName,
                       SwGrfFmtColl *pGrfColl,
@@ -311,7 +306,6 @@ sal_Bool SwGrfNode::ReRead(
     return bReadGrf;
 }
 
-
 SwGrfNode::~SwGrfNode()
 {
     delete mpReplacementGraphic;
@@ -429,7 +423,6 @@ SwCntntNode *SwGrfNode::SplitCntntNode( const SwPosition & )
     return this;
 }
 
-
 SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
                                 const String& rGrfName,
                                 const String& rFltName,
@@ -459,7 +452,6 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
     return new SwGrfNode( rWhere, rGrfObj, pGrfColl, pAutoAttr );
 }
 
-
 Size SwGrfNode::GetTwipSize() const
 {
     return nGrfSize;
@@ -576,7 +568,6 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
     return nRet;
 }
 
-
 short SwGrfNode::SwapOut()
 {
     if( maGrfObj.GetType() != GRAPHIC_DEFAULT &&
@@ -599,7 +590,6 @@ short SwGrfNode::SwapOut()
     return 1;
 }
 
-
 bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
 {
     bool bRet = false;
@@ -626,10 +616,8 @@ bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
     return bRet;
 }
 
-
 // Eine Grafik Undo-faehig machen. Falls sie sich bereits in
 // einem Storage befindet, muss sie geladen werden.
-
 sal_Bool SwGrfNode::SavePersistentData()
 {
     if( refLink.Is() )
@@ -660,7 +648,6 @@ sal_Bool SwGrfNode::SavePersistentData()
     return (sal_Bool) SwapOut();
 }
 
-
 sal_Bool SwGrfNode::RestorePersistentData()
 {
     if( refLink.Is() )
@@ -674,7 +661,6 @@ sal_Bool SwGrfNode::RestorePersistentData()
     return sal_True;
 }
 
-
 void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName )
 {
     refLink = new SwBaseLink( sfx2::LINKUPDATE_ONCALL, FORMAT_GDIMETAFILE, this );
@@ -707,7 +693,6 @@ void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName )
     maGrfObj.SetLink( rGrfName );
 }
 
-
 void SwGrfNode::ReleaseLink()
 {
     if( refLink.Is() )
@@ -907,7 +892,6 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
     return pStrm;
 }
 
-
 // #i53025# - stream couldn't be in a 3.1 - 5.2 storage any more.
 // Thus, removing corresponding code.
 void SwGrfNode::_GetStreamStorageNames( String& rStrmName,
@@ -1074,7 +1058,6 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
     return (long)pRet;
 }
 
-
 // alle QuickDraw-Bitmaps eines speziellen Docs loeschen
 void DelAllGrfCacheEntries( SwDoc* pDoc )
 {
@@ -1164,7 +1147,6 @@ sal_Bool SwGrfNode::IsTransparent() const
     return bRet;
 }
 
-
 sal_Bool SwGrfNode::IsSelected() const
 {
     sal_Bool bRet = sal_False;
commit 6ecf802cc7ff72784fd0160295180f74d32b59ad
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 17:43:48 2013 +0200

    fix indentation of a comment
    
    Change-Id: I4528725cdfe2bdd0ae071d5719d4e8e082d88e5b

diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index f97a77f..cee0e0d 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -195,7 +195,7 @@ sal_Bool SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
                 }
                 else
                 {
-            // then display the help:
+                    // then display the help:
                     Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) );
                     Help::ShowQuickHelp( pWindow, aRect, sTxt );
                 }
commit 7f8e8aa828f18ce384839c08e2d082d9d4d92eb3
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sun May 5 17:43:19 2013 +0200

    fdo#62475 - remove pointless comments and ASCII art in sw/source/core/draw
    
    Change-Id: I223cdd6d3bfddf0216453406efc32beee2489ae4

diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 941bf6c..cc6f1a5 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -126,13 +126,7 @@ sal_Bool HasWrap( const SdrObject* pObj )
     return sal_False;
 }
 
-/*****************************************************************************
- *
- * GetBoundRect returns the BoundRect _inclusive_ distance of the object.
- *
- *****************************************************************************/
-
-// #i68520# - change naming
+/// returns the BoundRect _inclusive_ distance of the object.
 SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj )
 {
     SwRect aRet( pObj->GetCurrentBoundRect() );
@@ -476,8 +470,6 @@ void SwFlyDrawContact::SetMaster( SdrObject* _pNewMaster )
     mpMasterObj = static_cast<SwFlyDrawObj *>(_pNewMaster);
 }
 
-// SwFlyDrawContact::Modify()
-
 void SwFlyDrawContact::Modify( const SfxPoolItem*, const SfxPoolItem * )
 {
 }
@@ -979,8 +971,6 @@ SdrObject* SwDrawContact::GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm )
     return pRetDrawObj;
 }
 
-// SwDrawContact::Changed
-
 void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
 {
     for ( std::list<SwDrawVirtObj*>::iterator aDrawVirtObjIter = maDrawVirtObjs.begin();
@@ -1434,8 +1424,6 @@ namespace
     }
 }
 
-// SwDrawContact::Modify()
-
 void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
 {
     OSL_ENSURE( !mbDisconnectInProgress,
@@ -1585,8 +1573,6 @@ void SwDrawContact::_InvalidateObjs( const bool _bUpdateSortedObjsList )
     }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list