[Libreoffice-commits] .: canvas/inc canvas/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 27 12:47:26 PST 2012


 canvas/inc/canvas/verifyinput.hxx                |    3 +--
 canvas/source/cairo/cairo_canvas.cxx             |   22 +++++++---------------
 canvas/source/cairo/cairo_canvasbitmap.cxx       |   12 ++++++------
 canvas/source/cairo/cairo_canvasbitmap.hxx       |    6 +++---
 canvas/source/cairo/cairo_canvascustomsprite.cxx |   12 ++++++------
 canvas/source/cairo/cairo_canvascustomsprite.hxx |    6 +++---
 canvas/source/cairo/cairo_canvasfont.cxx         |   12 ++++++------
 canvas/source/cairo/cairo_canvasfont.hxx         |    6 +++---
 8 files changed, 35 insertions(+), 44 deletions(-)

New commits:
commit 50a7098b2ee7047cda459e60720e5206eb3d4963
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date:   Mon Nov 26 13:36:00 2012 -0200

    More ::rtl::OUString -> OUString in canvas
    
    Change-Id: If99dfc98ace1bf62cd5ab05c596f4f6ffc5fbd2f
    Reviewed-on: https://gerrit.libreoffice.org/1175
    Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>
    Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>

diff --git a/canvas/inc/canvas/verifyinput.hxx b/canvas/inc/canvas/verifyinput.hxx
index 54ba161..07d72b3 100644
--- a/canvas/inc/canvas/verifyinput.hxx
+++ b/canvas/inc/canvas/verifyinput.hxx
@@ -396,8 +396,7 @@ namespace canvas
             {
 #if OSL_DEBUG_LEVEL > 0
                 throw ::com::sun::star::lang::IllegalArgumentException(
-                    ::rtl::OUString::createFromAscii(pStr) +
-                    ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": reference is NULL" )),
+                    OUString::createFromAscii(pStr) + ": reference is NULL",
                     xIf,
                     nArgPos );
 #else
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 54156c6..06dfa36 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -90,26 +90,18 @@ namespace cairocanvas
 
         const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
         if( !pSysData || !pSysData->nSize )
-            throw lang::NoSupportException(
-                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
-                                     "Passed SystemGraphicsData invalid!")),
-                NULL);
+            throw lang::NoSupportException( "Passed SystemGraphicsData invalid!", NULL);
 
         bool bHasXRender = IsCairoWorking(pOutDev);
-        ENSURE_ARG_OR_THROW( bHasXRender == true,
-                             "SpriteCanvas::SpriteCanvas: No RENDER extension" );
+        ENSURE_ARG_OR_THROW( bHasXRender == true, "SpriteCanvas::SpriteCanvas: No RENDER extension" );
 
         // setup helper
-        maDeviceHelper.init( *this,
-                             *pOutDev );
+        maDeviceHelper.init( *this, *pOutDev );
 
-        maCanvasHelper.init( basegfx::B2ISize(aBounds.Width, aBounds.Height),
-                             *this, this );
+        maCanvasHelper.init( basegfx::B2ISize(aBounds.Width, aBounds.Height), *this, this );
 
         // forward surface to render on to canvashelper
-        maCanvasHelper.setSurface(
-            maDeviceHelper.getSurface(),
-            false );
+        maCanvasHelper.setSurface( maDeviceHelper.getSurface(), false );
 
         maArguments.realloc(0);
     }
@@ -129,9 +121,9 @@ namespace cairocanvas
         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 );
     }
 
     bool Canvas::repaint( const SurfaceSharedPtr&       pSurface,
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 4b9302e..91f6194 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -254,20 +254,20 @@ namespace cairocanvas
 #define IMPLEMENTATION_NAME "CairoCanvas.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/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index 4a2b7ea..b1d669e 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -88,9 +88,9 @@ namespace cairocanvas
         DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasBitmap, CanvasBitmapBase_Base, ::cppu::WeakComponentImplHelperBase );
 
         // XServiceInfo
-        virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
-        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
-        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
 
         // SurfaceProvider
         virtual SurfaceSharedPtr getSurface();
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx b/canvas/source/cairo/cairo_canvascustomsprite.cxx
index c9d3e5b..d7e72c0 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.cxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx
@@ -144,20 +144,20 @@ namespace cairocanvas
 #define IMPLEMENTATION_NAME "CairoCanvas.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/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx
index 940626c..cfb6377 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.hxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx
@@ -112,9 +112,9 @@ namespace cairocanvas
         DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase );
 
         // XServiceInfo
-        virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
-        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
+        virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+        virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+        virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
 
         // Sprite
         virtual void redraw( const ::cairo::CairoSharedPtr& pCairo,
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 0e8e58f..5541e72 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -141,20 +141,20 @@ namespace cairocanvas
 #define IMPLEMENTATION_NAME "CairoCanvas::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 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/cairo/cairo_canvasfont.hxx b/canvas/source/cairo/cairo_canvasfont.hxx
index 90d1cca..3e5c1ff 100644
--- a/canvas/source/cairo/cairo_canvasfont.hxx
+++ b/canvas/source/cairo/cairo_canvasfont.hxx
@@ -71,9 +71,9 @@ namespace cairocanvas
         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties(  ) throw (::com::sun::star::uno::RuntimeException);
 
         // XServiceInfo
-        virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
-        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
+        virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+        virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+        virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
 
         ::Font getVCLFont() const;
 


More information about the Libreoffice-commits mailing list