summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2013-03-23 15:55:18 +1100
committerThomas Arnhold <thomas@arnhold.org>2013-03-23 09:11:56 +0000
commit444afc083500c3a4c2d2010f4886df49e75b7773 (patch)
tree9087fa93eb865af1e67ebd83311922927fe60bcd /vcl/workben
parent73e74680d8c0cbf8baf869cc8bbc58dae432a0ef (diff)
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@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/outdevgrind.cxx18
-rw-r--r--vcl/workben/svdem.cxx12
-rw-r--r--vcl/workben/svpclient.cxx18
-rw-r--r--vcl/workben/svptest.cxx15
-rw-r--r--vcl/workben/vcldemo.cxx12
5 files changed, 0 insertions, 75 deletions
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index bec832a0c1fa..703bb00bdadb 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 58b9836adcc7..a77bcb1171cc 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 12ce0cc25d46..60c9659f96ed 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 bf1a44de7570..ef95b371f756 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 fb9f220594c8..32cd9a21059e 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()
{