Kaydet (Commit) 58ae10ed authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

RTL_CONSTASCII_(U)STRINGPARAM removed in canvas (WIP)

Change-Id: Id8db06826b77a2b59df51dc0829cd9e7539045fa
üst 6eb05223
...@@ -101,8 +101,7 @@ namespace vclcanvas ...@@ -101,8 +101,7 @@ namespace vclcanvas
OutputDevice* pOutDev = reinterpret_cast<OutputDevice*>(nPtr); OutputDevice* pOutDev = reinterpret_cast<OutputDevice*>(nPtr);
if( !pOutDev ) if( !pOutDev )
throw lang::NoSupportException( throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ::rtl::OUString( "Passed OutDev invalid!" ),
"Passed OutDev invalid!")),
NULL); NULL);
OutDevProviderSharedPtr pOutdevProvider( new OutDevHolder(*pOutDev) ); OutDevProviderSharedPtr pOutdevProvider( new OutDevHolder(*pOutDev) );
...@@ -134,7 +133,7 @@ namespace vclcanvas ...@@ -134,7 +133,7 @@ namespace vclcanvas
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException) ::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CANVAS_SERVICE_NAME ) ); return ::rtl::OUString( CANVAS_SERVICE_NAME );
} }
bool Canvas::repaint( const GraphicObjectSharedPtr& rGrf, bool Canvas::repaint( const GraphicObjectSharedPtr& rGrf,
......
...@@ -74,9 +74,9 @@ namespace vclcanvas ...@@ -74,9 +74,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas.CanvasBitmap" #define IMPLEMENTATION_NAME "VCLCanvas.CanvasBitmap"
#define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap" #define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap"
::rtl::OUString SAL_CALL CanvasBitmap::getImplementationName( ) throw (uno::RuntimeException) OUString SAL_CALL CanvasBitmap::getImplementationName( ) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CanvasBitmap::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException) sal_Bool SAL_CALL CanvasBitmap::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException)
...@@ -84,10 +84,10 @@ namespace vclcanvas ...@@ -84,10 +84,10 @@ namespace vclcanvas
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CanvasBitmap::getSupportedServiceNames( ) throw (uno::RuntimeException) uno::Sequence< OUString > SAL_CALL CanvasBitmap::getSupportedServiceNames( ) throw (uno::RuntimeException)
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = OUString( SERVICE_NAME );
return aRet; return aRet;
} }
......
...@@ -121,9 +121,9 @@ namespace vclcanvas ...@@ -121,9 +121,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas.CanvasCustomSprite" #define IMPLEMENTATION_NAME "VCLCanvas.CanvasCustomSprite"
#define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite" #define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite"
::rtl::OUString SAL_CALL CanvasCustomSprite::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL CanvasCustomSprite::getImplementationName() throw( uno::RuntimeException )
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CanvasCustomSprite::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL CanvasCustomSprite::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException )
...@@ -131,10 +131,10 @@ namespace vclcanvas ...@@ -131,10 +131,10 @@ namespace vclcanvas
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CanvasCustomSprite::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL CanvasCustomSprite::getSupportedServiceNames() throw( uno::RuntimeException )
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = OUString( SERVICE_NAME );
return aRet; return aRet;
} }
......
...@@ -153,9 +153,9 @@ namespace vclcanvas ...@@ -153,9 +153,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas::CanvasFont" #define IMPLEMENTATION_NAME "VCLCanvas::CanvasFont"
#define SERVICE_NAME "com.sun.star.rendering.CanvasFont" #define SERVICE_NAME "com.sun.star.rendering.CanvasFont"
::rtl::OUString SAL_CALL CanvasFont::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL CanvasFont::getImplementationName() throw( uno::RuntimeException )
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CanvasFont::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL CanvasFont::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException )
...@@ -163,10 +163,10 @@ namespace vclcanvas ...@@ -163,10 +163,10 @@ namespace vclcanvas
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CanvasFont::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL CanvasFont::getSupportedServiceNames() throw( uno::RuntimeException )
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = OUString( SERVICE_NAME );
return aRet; return aRet;
} }
......
...@@ -149,9 +149,9 @@ namespace vclcanvas ...@@ -149,9 +149,9 @@ namespace vclcanvas
mbSurfaceDirty); mbSurfaceDirty);
} }
::rtl::OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException) OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SPRITECANVAS_SERVICE_NAME ) ); return OUString( SPRITECANVAS_SERVICE_NAME );
} }
bool SpriteCanvas::repaint( const GraphicObjectSharedPtr& rGrf, bool SpriteCanvas::repaint( const GraphicObjectSharedPtr& rGrf,
......
...@@ -591,15 +591,15 @@ namespace vclcanvas ...@@ -591,15 +591,15 @@ namespace vclcanvas
const double denominator( maLastUpdate.getElapsedTime() ); const double denominator( maLastUpdate.getElapsedTime() );
maLastUpdate.reset(); maLastUpdate.reset();
::rtl::OUString text( ::rtl::math::doubleToUString( denominator == 0.0 ? 100.0 : 1.0/denominator, OUString text( ::rtl::math::doubleToUString( denominator == 0.0 ? 100.0 : 1.0/denominator,
rtl_math_StringFormat_F, rtl_math_StringFormat_F,
2,'.',NULL,' ') ); 2,'.',NULL,' ') );
// pad with leading space // pad with leading space
while( text.getLength() < 6 ) while( text.getLength() < 6 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text; text = " " + text;
text += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" fps")); text += " fps";
renderInfoText( rOutDev, renderInfoText( rOutDev,
text, text,
...@@ -648,9 +648,9 @@ namespace vclcanvas ...@@ -648,9 +648,9 @@ namespace vclcanvas
// pad with leading space // pad with leading space
while( text.getLength() < 3 ) while( text.getLength() < 3 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text; text = " " + text;
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Sprites: ")) + text; text = "Sprites: " + text;
renderInfoText( rOutDev, renderInfoText( rOutDev,
text, text,
...@@ -684,17 +684,15 @@ namespace vclcanvas ...@@ -684,17 +684,15 @@ namespace vclcanvas
rVDevSize.Width()*rVDevSize.Height() * BYTES_PER_PIXEL + rVDevSize.Width()*rVDevSize.Height() * BYTES_PER_PIXEL +
rBackBufferSize.Width()*rBackBufferSize.Height() * BYTES_PER_PIXEL ); rBackBufferSize.Width()*rBackBufferSize.Height() * BYTES_PER_PIXEL );
::rtl::OUString text( ::rtl::math::doubleToUString( nMemUsage / 1048576.0, OUString text( ::rtl::math::doubleToUString( nMemUsage / 1048576.0,
rtl_math_StringFormat_F, rtl_math_StringFormat_F,
2,'.',NULL,' ') ); 2,'.',NULL,' ') );
// pad with leading space // pad with leading space
while( text.getLength() < 4 ) while( text.getLength() < 4 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text; text = " " + text;
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Mem: ")) + text = "Mem: " + text + "MB";
text +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("MB"));
renderInfoText( rOutDev, renderInfoText( rOutDev,
text, text,
......
...@@ -466,9 +466,9 @@ namespace vclcanvas ...@@ -466,9 +466,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas::TextLayout" #define IMPLEMENTATION_NAME "VCLCanvas::TextLayout"
#define SERVICE_NAME "com.sun.star.rendering.TextLayout" #define SERVICE_NAME "com.sun.star.rendering.TextLayout"
::rtl::OUString SAL_CALL TextLayout::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL TextLayout::getImplementationName() throw( uno::RuntimeException )
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL TextLayout::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL TextLayout::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException )
...@@ -476,10 +476,10 @@ namespace vclcanvas ...@@ -476,10 +476,10 @@ namespace vclcanvas
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL TextLayout::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL TextLayout::getSupportedServiceNames() throw( uno::RuntimeException )
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = OUString( SERVICE_NAME );
return aRet; return aRet;
} }
......
...@@ -34,8 +34,7 @@ namespace vclcanvas ...@@ -34,8 +34,7 @@ namespace vclcanvas
Window* pWindow = VCLUnoHelper::GetWindow(xWin); Window* pWindow = VCLUnoHelper::GetWindow(xWin);
if( !pWindow ) if( !pWindow )
throw lang::NoSupportException( throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Parent window not VCL window, or canvas out-of-process!",
"Parent window not VCL window, or canvas out-of-process!")),
NULL); NULL);
return *pWindow; return *pWindow;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment