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
OutputDevice* pOutDev = reinterpret_cast<OutputDevice*>(nPtr);
if( !pOutDev )
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Passed OutDev invalid!")),
::rtl::OUString( "Passed OutDev invalid!" ),
NULL);
OutDevProviderSharedPtr pOutdevProvider( new OutDevHolder(*pOutDev) );
......@@ -134,7 +133,7 @@ namespace vclcanvas
::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,
......
......@@ -74,9 +74,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas.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)
......@@ -84,10 +84,10 @@ namespace vclcanvas
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = OUString( SERVICE_NAME );
return aRet;
}
......
......@@ -121,9 +121,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas.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 )
......@@ -131,10 +131,10 @@ namespace vclcanvas
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = OUString( SERVICE_NAME );
return aRet;
}
......
......@@ -153,9 +153,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas::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 )
......@@ -163,10 +163,10 @@ namespace vclcanvas
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = OUString( SERVICE_NAME );
return aRet;
}
......
......@@ -149,9 +149,9 @@ namespace vclcanvas
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,
......
......@@ -591,15 +591,15 @@ namespace vclcanvas
const double denominator( maLastUpdate.getElapsedTime() );
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,
2,'.',NULL,' ') );
// pad with leading space
while( text.getLength() < 6 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text;
text = " " + text;
text += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" fps"));
text += " fps";
renderInfoText( rOutDev,
text,
......@@ -648,9 +648,9 @@ namespace vclcanvas
// pad with leading space
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,
text,
......@@ -684,17 +684,15 @@ namespace vclcanvas
rVDevSize.Width()*rVDevSize.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,
2,'.',NULL,' ') );
// pad with leading space
while( text.getLength() < 4 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text;
text = " " + text;
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Mem: ")) +
text +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("MB"));
text = "Mem: " + text + "MB";
renderInfoText( rOutDev,
text,
......
......@@ -466,9 +466,9 @@ namespace vclcanvas
#define IMPLEMENTATION_NAME "VCLCanvas::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 )
......@@ -476,10 +476,10 @@ namespace vclcanvas
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = OUString( SERVICE_NAME );
return aRet;
}
......
......@@ -34,8 +34,7 @@ namespace vclcanvas
Window* pWindow = VCLUnoHelper::GetWindow(xWin);
if( !pWindow )
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);
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