[PATCH] General comment cleanup for demo/test vcl apps

Chris Sherlock (via Code Review) gerrit at gerrit.libreoffice.org
Fri Mar 22 22:07:56 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2921

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/21/2921/1

General comment cleanup for demo/test vcl apps

Remove unnecessary commented out code, remove comment "spacer" lines,
in general tidy up this code to make it easier to read.

Change-Id: I37a19177795aa93d63f736e1933924605fbf2146
---
M vcl/workben/outdevgrind.cxx
M vcl/workben/svdem.cxx
M vcl/workben/svpclient.cxx
M vcl/workben/svptest.cxx
M vcl/workben/vcldemo.cxx
5 files changed, 0 insertions(+), 75 deletions(-)



diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index bec832a..703bb00 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -78,8 +78,6 @@
         virtual void Paint( const Rectangle& rRect );
 };
 
-//----------------------------------------------------------------------------------
-
 typedef boost::function1<void, OutputDevice*>   functor_type;
 typedef std::vector< std::pair<const char*,
                                functor_type> >  functor_vector_type;
@@ -140,17 +138,6 @@
     GDIMetaFile       aMtf;
     aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),sal_True) );
     aMtf.AddAction( new MetaRectAction(aRect) );
-
-    /* void DrawText( const Point& rStartPt, const XubString& rStr,
-                   xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
-                   MetricVector* pVector = NULL, String* pDisplayText = NULL );
-    */
-//    add(res,
-//        "DrawText",
-//        boost::bind(
-//            &OutputDevice::DrawText,
-//            _1,
-//            aPt1, aString, (sal_uInt16)0, aString.Len(), (MetricVector*)0, (String*)0, (vcl::ITextLayout*)0 ));
 
     /* void DrawTextArray( const Point& rStartPt, const XubString& rStr,
                                        const sal_Int32* pDXAry = NULL,
@@ -792,7 +779,6 @@
 
 }
 
-//----------------------------------------------------------------------------------
 
 void grindFunc( OutputDevice&                       rTarget,
                 functor_vector_type::const_iterator iter,
@@ -815,7 +801,6 @@
              pMsg );
 }
 
-//----------------------------------------------------------------------------------
 
 /** Call OutputDevice render methods repeatedly, and output elapsed
     time to stdout
@@ -879,7 +864,6 @@
     }
 }
 
-//----------------------------------------------------------------------------------
 
 void TestWindow::Paint( const Rectangle& )
 {
@@ -916,9 +900,7 @@
         return EXIT_SUCCESS;
     }
 
-    //-------------------------------------------------
     // create the global service-manager
-    //-------------------------------------------------
     uno::Reference< lang::XMultiServiceFactory > xFactory;
     try
     {
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index 58b9836..a77bcb1 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -33,12 +33,10 @@
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
-// -----------------------------------------------------------------------
 
 // Forward declaration
 void Main();
 
-// -----------------------------------------------------------------------
 
 SAL_IMPLEMENT_MAIN()
 {
@@ -56,7 +54,6 @@
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -72,7 +69,6 @@
     void        Resize();
 };
 
-// -----------------------------------------------------------------------
 
 void Main()
 {
@@ -83,56 +79,48 @@
     Application::Execute();
 }
 
-// -----------------------------------------------------------------------
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     WorkWindow( pParent, nWinStyle )
 {
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseMove( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseMove( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonDown( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonUp( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonUp( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyInput( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyInput( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyUp( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyUp( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Paint( const Rectangle& rRect )
 {
     WorkWindow::Paint( rRect );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Resize()
 {
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 12ce0cc2..60c9659 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -59,20 +59,15 @@
 using ::rtl::OStringToOUString;
 using ::rtl::OUStringBuffer;
 using ::rtl::OStringBuffer;
-// -----------------------------------------------------------------------
 
 // Forward declaration
 void Main();
-
-// -----------------------------------------------------------------------
 
 SAL_IMPLEMENT_MAIN()
 {
     tools::extendApplicationEnvironment();
 
-    //-------------------------------------------------
     // create the global service-manager
-    //-------------------------------------------------
     Reference< XMultiServiceFactory > xFactory;
     try
     {
@@ -97,8 +92,6 @@
 
     return 0;
 }
-
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -127,8 +120,6 @@
     DECL_LINK( QuitHdl, Button* );
 };
 
-// -----------------------------------------------------------------------
-
 void Main()
 {
     MyWin aMainWin( NULL, WB_STDWORK );
@@ -137,8 +128,6 @@
 
     Application::Execute();
 }
-
-// -----------------------------------------------------------------------
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     WorkWindow( pParent, nWinStyle ),
@@ -273,49 +262,42 @@
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseMove( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseMove( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonDown( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonUp( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonUp( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyInput( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyInput( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyUp( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyUp( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Paint( const Rectangle& rRect )
 {
     WorkWindow::Paint( rRect );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Resize()
 {
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index bf1a44d..ef95b37 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -43,12 +43,10 @@
 
 using ::rtl::OUString;
 using ::rtl::OUStringBuffer;
-// -----------------------------------------------------------------------
 
 // Forward declaration
 void Main();
 
-// -----------------------------------------------------------------------
 
 SAL_IMPLEMENT_MAIN()
 {
@@ -66,7 +64,6 @@
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -83,7 +80,6 @@
     void        Resize();
 };
 
-// -----------------------------------------------------------------------
 
 void Main()
 {
@@ -94,7 +90,6 @@
     Application::Execute();
 }
 
-// -----------------------------------------------------------------------
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     WorkWindow( pParent, nWinStyle ),
@@ -121,42 +116,36 @@
     m_aBitmap.ReleaseAccess( pAcc );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseMove( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseMove( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonDown( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonUp( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonUp( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyInput( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyInput( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyUp( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyUp( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 static Point project( const Point& rPoint )
 {
@@ -166,7 +155,6 @@
     // transform planar coordinates to 3d
     double x = rPoint.X();
     double y = rPoint.Y();
-    //double z = 0;
 
     // rotate around X axis
     double x1 = x;
@@ -255,8 +243,6 @@
     DrawRect( Rectangle( Point( 300,300 ),
                          Size( aPaperSize.Width()-600,
                                aPaperSize.Height()-600 ) ) );
-
-    // AllSettings aSettings( Application::GetSettings() );
 
     const int nFontCount = GetDevFontCount();
     const int nFontSamples = (nFontCount<15) ? nFontCount : 15;
@@ -361,7 +347,6 @@
     Pop();
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Resize()
 {
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 3d67d48..99d24a0 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -36,12 +36,10 @@
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
-// -----------------------------------------------------------------------
 
 // Forward declaration
 void Main();
 
-// -----------------------------------------------------------------------
 
 SAL_IMPLEMENT_MAIN()
 {
@@ -59,7 +57,6 @@
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -75,7 +72,6 @@
     void        Resize();
 };
 
-// -----------------------------------------------------------------------
 
 void Main()
 {
@@ -91,21 +87,18 @@
     Application::Execute();
 }
 
-// -----------------------------------------------------------------------
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     WorkWindow( pParent, nWinStyle )
 {
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseMove( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseMove( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
 {
@@ -115,28 +108,24 @@
     DrawRect( aRect );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::MouseButtonUp( const MouseEvent& rMEvt )
 {
     WorkWindow::MouseButtonUp( rMEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyInput( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyInput( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::KeyUp( const KeyEvent& rKEvt )
 {
     WorkWindow::KeyUp( rKEvt );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Paint( const Rectangle& rRect )
 {
@@ -162,7 +151,6 @@
     DrawText( Point( 20, 30 ), String( RTL_CONSTASCII_USTRINGPARAM( "Just a simple test text" ) ) );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Resize()
 {

-- 
To view, visit https://gerrit.libreoffice.org/2921
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37a19177795aa93d63f736e1933924605fbf2146
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock <chris.sherlock79 at gmail.com>



More information about the LibreOffice mailing list