[Libreoffice-commits] core.git: vcl/workben

Chris Sherlock chris.sherlock79 at gmail.com
Sat Mar 23 02:12:17 PDT 2013


 vcl/workben/outdevgrind.cxx |   18 ------------------
 vcl/workben/svdem.cxx       |   12 ------------
 vcl/workben/svpclient.cxx   |   18 ------------------
 vcl/workben/svptest.cxx     |   15 ---------------
 vcl/workben/vcldemo.cxx     |   12 ------------
 5 files changed, 75 deletions(-)

New commits:
commit 444afc083500c3a4c2d2010f4886df49e75b7773
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Mar 23 15:55:18 2013 +1100

    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
    Reviewed-on: https://gerrit.libreoffice.org/2921
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>

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 @@ class TestWindow : public Dialog
         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;
@@ -141,17 +139,6 @@ void setupMethodStubs( functor_vector_type& res )
     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,
                                        xub_StrLen nIndex = 0,
@@ -792,7 +779,6 @@ void setupMethodStubs( functor_vector_type& res )
 
 }
 
-//----------------------------------------------------------------------------------
 
 void grindFunc( OutputDevice&                       rTarget,
                 functor_vector_type::const_iterator iter,
@@ -815,7 +801,6 @@ void grindFunc( OutputDevice&                       rTarget,
              pMsg );
 }
 
-//----------------------------------------------------------------------------------
 
 /** Call OutputDevice render methods repeatedly, and output elapsed
     time to stdout
@@ -879,7 +864,6 @@ void outDevGrind( OutputDevice& rTarget, sal_Int32 nTurns=100 )
     }
 }
 
-//----------------------------------------------------------------------------------
 
 void TestWindow::Paint( const Rectangle& )
 {
@@ -916,9 +900,7 @@ int GrindApp::Main()
         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 @@ SAL_IMPLEMENT_MAIN()
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -72,7 +69,6 @@ public:
     void        Resize();
 };
 
-// -----------------------------------------------------------------------
 
 void Main()
 {
@@ -83,56 +79,48 @@ void Main()
     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::OUStringToOString;
 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
     {
@@ -98,8 +93,6 @@ SAL_IMPLEMENT_MAIN()
     return 0;
 }
 
-// -----------------------------------------------------------------------
-
 class MyWin : public WorkWindow
 {
     PushButton      m_aListButton;
@@ -127,8 +120,6 @@ public:
     DECL_LINK( QuitHdl, Button* );
 };
 
-// -----------------------------------------------------------------------
-
 void Main()
 {
     MyWin aMainWin( NULL, WB_STDWORK );
@@ -138,8 +129,6 @@ void Main()
     Application::Execute();
 }
 
-// -----------------------------------------------------------------------
-
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     WorkWindow( pParent, nWinStyle ),
     m_aListButton( this, 0 ),
@@ -273,49 +262,42 @@ IMPL_LINK( MyWin, SelectHdl, ListBox*, )
     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 namespace ::com::sun::star::lang;
 
 using ::rtl::OUString;
 using ::rtl::OUStringBuffer;
-// -----------------------------------------------------------------------
 
 // Forward declaration
 void Main();
 
-// -----------------------------------------------------------------------
 
 SAL_IMPLEMENT_MAIN()
 {
@@ -66,7 +64,6 @@ SAL_IMPLEMENT_MAIN()
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -83,7 +80,6 @@ public:
     void        Resize();
 };
 
-// -----------------------------------------------------------------------
 
 void Main()
 {
@@ -94,7 +90,6 @@ void Main()
     Application::Execute();
 }
 
-// -----------------------------------------------------------------------
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     WorkWindow( pParent, nWinStyle ),
@@ -121,42 +116,36 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     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 @@ static Point project( const Point& rPoint )
     // transform planar coordinates to 3d
     double x = rPoint.X();
     double y = rPoint.Y();
-    //double z = 0;
 
     // rotate around X axis
     double x1 = x;
@@ -256,8 +244,6 @@ void MyWin::Paint( const Rectangle& rRect )
                          Size( aPaperSize.Width()-600,
                                aPaperSize.Height()-600 ) ) );
 
-    // AllSettings aSettings( Application::GetSettings() );
-
     const int nFontCount = GetDevFontCount();
     const int nFontSamples = (nFontCount<15) ? nFontCount : 15;
     for( int i = 0; i < nFontSamples; ++i )
@@ -361,7 +347,6 @@ void MyWin::Paint( const Rectangle& rRect )
     Pop();
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Resize()
 {
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index fb9f220..32cd9a2 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 @@ SAL_IMPLEMENT_MAIN()
     return 0;
 }
 
-// -----------------------------------------------------------------------
 
 class MyWin : public WorkWindow
 {
@@ -75,7 +72,6 @@ public:
     void        Resize();
 };
 
-// -----------------------------------------------------------------------
 
 void Main()
 {
@@ -86,21 +82,18 @@ void Main()
     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 )
 {
@@ -110,28 +103,24 @@ void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
     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 )
 {
@@ -157,7 +146,6 @@ void MyWin::Paint( const Rectangle& rRect )
     DrawText( Point( 20, 30 ), String( RTL_CONSTASCII_USTRINGPARAM( "Just a simple test text" ) ) );
 }
 
-// -----------------------------------------------------------------------
 
 void MyWin::Resize()
 {


More information about the Libreoffice-commits mailing list