RTL_CONSTASCII_USTRINGPARAM and ::rtl:: removals

All RTL_CONSTASCII_USTRINGPARAMs removed from canvas

Change-Id: Ie62d080eb58a05f7bb18aa1cc2f518c951145460
Reviewed-on: https://gerrit.libreoffice.org/2283
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
Krisztian Pinter
2013-02-19 19:49:47 +01:00
committed by Michael Stahl
parent d05287a9f1
commit 73f866aa61
9 changed files with 48 additions and 73 deletions

View File

@@ -585,9 +585,7 @@ namespace dxcanvas
if(!(create(rWindow)))
{
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Could not create DirectX device!") ),NULL);
throw lang::NoSupportException( "Could not create DirectX device!" ,NULL);
}
// allocate a single texture surface which can be used later.
@@ -606,9 +604,7 @@ namespace dxcanvas
(aPageSize.getY() < MIN_TEXTURE_SIZE))
{
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Could not create DirectX device - "
"insufficient texture space!") ),NULL);
"Could not create DirectX device - insufficient texture space!", NULL );
}
}
maPageSize=aPageSize;
@@ -623,8 +619,7 @@ namespace dxcanvas
NULL)) )
{
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Could not create DirectX device - out of memory!")),NULL);
"Could not create DirectX device - out of memory!", NULL );
}
mpVertexBuffer=COMReference<IDirect3DVertexBuffer9>(pVB);
@@ -905,8 +900,7 @@ namespace dxcanvas
NULL)) )
{
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Could not create offscreen surface - out of mem!") ),NULL);
"Could not create offscreen surface - out of mem!", NULL );
}
return COMReference<IDirect3DSurface9>(pSurface);
@@ -960,8 +954,7 @@ namespace dxcanvas
NULL)) )
{
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Could not create DirectX device - out of memory!")),NULL);
"Could not create DirectX device - out of memory!", NULL );
}
mpVertexBuffer=COMReference<IDirect3DVertexBuffer9>(pVB);

View File

@@ -96,10 +96,7 @@ namespace dxcanvas
const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
if( !pSysData || !pSysData->hDC )
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Passed SystemGraphicsData or HDC invalid!")),
NULL);
throw lang::NoSupportException( "Passed SystemGraphicsData or HDC invalid!" ), NULL);
// setup helper
maDeviceHelper.init( pSysData->hDC,
@@ -123,9 +120,9 @@ namespace dxcanvas
CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (uno::RuntimeException)
OUString SAL_CALL Canvas::getServiceName( ) throw (uno::RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CANVAS_SERVICE_NAME ) );
return OUString( CANVAS_SERVICE_NAME );
}
BitmapCanvas::BitmapCanvas( const uno::Sequence< uno::Any >& aArguments,
@@ -156,10 +153,7 @@ namespace dxcanvas
const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
if( !pSysData || !pSysData->hDC )
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Passed SystemGraphicsData or HDC invalid!")),
NULL);
throw lang::NoSupportException( "Passed SystemGraphicsData or HDC invalid!", NULL);
// setup helper
maDeviceHelper.init( pSysData->hDC,
@@ -173,10 +167,7 @@ namespace dxcanvas
hBmp=(HBITMAP)GetCurrentObject(pSysData->hDC, OBJ_BITMAP);
if( !hBmp || GetObjectType(pSysData->hDC) != OBJ_MEMDC )
{
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Passed HDC is no mem DC/has no bitmap selected!")),
NULL);
throw lang::NoSupportException( "Passed HDC is no mem DC/has no bitmap selected!", NULL);
}
mpTarget.reset( new DXBitmap(
@@ -201,9 +192,9 @@ namespace dxcanvas
BitmapCanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL BitmapCanvas::getServiceName( ) throw (uno::RuntimeException)
OUString SAL_CALL BitmapCanvas::getServiceName( ) throw (uno::RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( BITMAPCANVAS_SERVICE_NAME ) );
return OUString( BITMAPCANVAS_SERVICE_NAME );
}
IBitmapSharedPtr BitmapCanvas::getBitmap() const

View File

@@ -246,20 +246,20 @@ namespace dxcanvas
#define IMPLEMENTATION_NAME "DXCanvas.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 OUString& ServiceName ) throw (uno::RuntimeException)
{
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] = SERVICE_NAME;
return aRet;
}

View File

@@ -86,20 +86,20 @@ namespace dxcanvas
#define IMPLEMENTATION_NAME "DXCanvas.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 OUString& ServiceName ) throw( uno::RuntimeException )
{
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] = SERVICE_NAME;
return aRet;
}

View File

@@ -122,20 +122,20 @@ namespace dxcanvas
#define SERVICE_NAME "com.sun.star.rendering.CanvasFont"
#define IMPLEMENTATION_NAME "DXCanvas::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 OUString& ServiceName ) throw( uno::RuntimeException )
{
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] = SERVICE_NAME;
return aRet;
}

View File

@@ -32,8 +32,7 @@ namespace dxcanvas
{
DXCanvasItem::DXCanvasItem() :
ConfigItem(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "Office.Canvas/DXCanvas" )),
"Office.Canvas/DXCanvas",
CONFIG_MODE_IMMEDIATE_UPDATE ),
maValues(),
maMaxTextureSize(),
@@ -42,8 +41,8 @@ namespace dxcanvas
{
try
{
uno::Sequence< ::rtl::OUString > aName(1);
aName[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DeviceBlacklist" ));
uno::Sequence< OUString > aName(1);
aName[0] = "DeviceBlacklist";
uno::Sequence< uno::Any > aProps( GetProperties( aName ));
uno::Sequence< sal_Int32 > aValues;
@@ -68,12 +67,12 @@ namespace dxcanvas
}
}
aName[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BlacklistCurrentDevice" ));
aName[0] = "BlacklistCurrentDevice";
aProps = GetProperties( aName );
if( aProps.getLength() > 0 )
aProps[0] >>= mbBlacklistCurrentDevice;
aName[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextureSize" ));
aName[0] = "MaxTextureSize";
aProps = GetProperties( aName );
if( aProps.getLength() > 0 )
maMaxTextureSize.reset( aProps[0].get<sal_Int32>() );
@@ -95,8 +94,8 @@ namespace dxcanvas
try
{
uno::Sequence< ::rtl::OUString > aName(1);
aName[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DeviceBlacklist" ));
uno::Sequence< OUString > aName(1);
aName[0] = "DeviceBlacklist";
uno::Sequence< sal_Int32 > aValues( sizeof(DeviceInfo)/sizeof(sal_Int32)*maValues.size() );

View File

@@ -90,10 +90,7 @@ namespace dxcanvas
maArguments[4] >>= xParentWindow;
Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
if( !pParentWindow )
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Parent window not VCL window, or canvas out-of-process!")),
NULL);
throw lang::NoSupportException( "Parent window not VCL window, or canvas out-of-process!", NULL);
awt::Rectangle aRect;
maArguments[2] >>= aRect;
@@ -158,9 +155,9 @@ namespace dxcanvas
mbSurfaceDirty );
}
::rtl::OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (uno::RuntimeException)
OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (uno::RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SPRITECANVAS_SERVICE_NAME ) );
return OUString( SPRITECANVAS_SERVICE_NAME );
}
const IDXRenderModuleSharedPtr& SpriteCanvas::getRenderModule() const

View File

@@ -73,10 +73,7 @@ namespace dxcanvas
const SystemEnvData *pData = rWindow.GetSystemData();
const HWND hWnd = reinterpret_cast<HWND>(pData->hWnd);
if( !IsWindow( hWnd ) )
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Passed window has invalid system window, or canvas out-of-process!")),
NULL);
throw lang::NoSupportException( "Passed window has invalid system window, or canvas out-of-process!", NULL);
mpSpriteCanvas = &rSpriteCanvas;
@@ -87,9 +84,7 @@ namespace dxcanvas
}
catch (...) {
throw lang::NoSupportException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Could not create DirectX device!") ),
throw lang::NoSupportException( "Could not create DirectX device!",
static_cast< ::cppu::OWeakObject* >(&rSpriteCanvas) );
}

View File

@@ -250,20 +250,20 @@ namespace dxcanvas
#define SERVICE_NAME "com.sun.star.rendering.TextLayout"
#define IMPLEMENTATION_NAME "DXCanvas::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 OUString& ServiceName ) throw( uno::RuntimeException )
{
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] = SERVICE_NAME;
return aRet;
}