[Libreoffice-commits] core.git: canvas/source
Krisztian Pinter
pin.terminator at gmail.com
Wed Feb 20 15:04:33 PST 2013
canvas/source/directx/dx_9rm.cxx | 17 +++++------------
canvas/source/directx/dx_canvas.cxx | 23 +++++++----------------
canvas/source/directx/dx_canvasbitmap.cxx | 12 ++++++------
canvas/source/directx/dx_canvascustomsprite.cxx | 12 ++++++------
canvas/source/directx/dx_canvasfont.cxx | 12 ++++++------
canvas/source/directx/dx_config.cxx | 15 +++++++--------
canvas/source/directx/dx_spritecanvas.cxx | 9 +++------
canvas/source/directx/dx_spritedevicehelper.cxx | 9 ++-------
canvas/source/directx/dx_textlayout.cxx | 12 ++++++------
9 files changed, 48 insertions(+), 73 deletions(-)
New commits:
commit 73f866aa6161146d2a96e3e9b65ce18ca25ca2c5
Author: Krisztian Pinter <pin.terminator at gmail.com>
Date: Tue Feb 19 19:49:47 2013 +0100
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 at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index b30b0a4..e62a29f 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -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);
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 6fa20be..602224b 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -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
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index b903081..64eb81d 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -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;
}
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx
index 62b6bf8..f2f50fe 100644
--- a/canvas/source/directx/dx_canvascustomsprite.cxx
+++ b/canvas/source/directx/dx_canvascustomsprite.cxx
@@ -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;
}
diff --git a/canvas/source/directx/dx_canvasfont.cxx b/canvas/source/directx/dx_canvasfont.cxx
index 27c44e8..57690d3 100644
--- a/canvas/source/directx/dx_canvasfont.cxx
+++ b/canvas/source/directx/dx_canvasfont.cxx
@@ -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;
}
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index ea50d6b..117d625 100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -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() );
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index b359797..d2dbc34 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -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
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index 366e0a5..f1fda28 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -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) );
}
diff --git a/canvas/source/directx/dx_textlayout.cxx b/canvas/source/directx/dx_textlayout.cxx
index 9a4129f..3afdc42 100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -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;
}
More information about the Libreoffice-commits
mailing list