[Libreoffice-commits] .: canvas/source

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


 canvas/source/cairo/cairo_canvas.hxx            |    2 +-
 canvas/source/cairo/cairo_canvashelper_text.cxx |    2 +-
 canvas/source/cairo/cairo_devicehelper.cxx      |    6 +++---
 canvas/source/cairo/cairo_spritecanvas.cxx      |    8 +++-----
 canvas/source/cairo/cairo_spritecanvas.hxx      |    2 +-
 canvas/source/cairo/cairo_textlayout.cxx        |   24 ++++++++++++------------
 canvas/source/cairo/cairo_textlayout.hxx        |    6 +++---
 7 files changed, 24 insertions(+), 26 deletions(-)

New commits:
commit ad2eedc8eb9d2a6f2dd22a66290acbd0e755a73e
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date:   Tue Nov 27 13:53:06 2012 -0200

    ::rtl prefix removal in canvas
    
    Change-Id: Iab6aaa9f06dfe69c85db5e87f9512db0eb44caa8
    Reviewed-on: https://gerrit.libreoffice.org/1181
    Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>
    Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>

diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx
index 5272b18..12bf426 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -124,7 +124,7 @@ namespace cairocanvas
         DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase );
 
         // XServiceName
-        virtual ::rtl::OUString SAL_CALL getServiceName(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getServiceName(  ) throw (::com::sun::star::uno::RuntimeException);
 
         // RepaintTarget
         virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 3b61810..d65f2de 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -330,7 +330,7 @@ namespace cairocanvas
             // TODO(F2): alpha
             mpVirtualDevice->SetLayoutMode( nLayoutMode );
 
-            OSL_TRACE(":cairocanvas::CanvasHelper::drawText(O,t,f,v,r,d): %s", ::rtl::OUStringToOString( text.Text.copy( text.StartPosition, text.Length ),
+            OSL_TRACE(":cairocanvas::CanvasHelper::drawText(O,t,f,v,r,d): %s", OUStringToOString( text.Text.copy( text.StartPosition, text.Length ),
                                                                                                          RTL_TEXTENCODING_UTF8 ).getStr());
 
             TextLayout* pTextLayout = new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider);
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 9a674ca..057f913 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -252,9 +252,9 @@ namespace cairocanvas
 
         if( mpRefDevice )
         {
-            rtl::OUString aFilename("dbg_frontbuffer");
-            aFilename += rtl::OUString::valueOf(nFilePostfixCount);
-            aFilename += rtl::OUString(".bmp");
+            OUString aFilename("dbg_frontbuffer");
+            aFilename += OUString::valueOf(nFilePostfixCount);
+            aFilename += OUString(".bmp");
 
             SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
 
diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx
index 6ec0291..6ec9ecd 100644
--- a/canvas/source/cairo/cairo_spritecanvas.cxx
+++ b/canvas/source/cairo/cairo_spritecanvas.cxx
@@ -83,9 +83,7 @@ namespace cairocanvas
         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);
+                "Parent window not VCL window, or canvas out-of-process!", NULL);
 
         bool bHasXRender = IsCairoWorking(pParentWindow);
         ENSURE_ARG_OR_THROW( bHasXRender == true,
@@ -146,9 +144,9 @@ namespace cairocanvas
             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 );
     }
 
     SurfaceSharedPtr SpriteCanvas::getSurface()
diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx
index 6cb3546..1c2a6aa 100644
--- a/canvas/source/cairo/cairo_spritecanvas.hxx
+++ b/canvas/source/cairo/cairo_spritecanvas.hxx
@@ -130,7 +130,7 @@ namespace cairocanvas
         virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException);
 
         // XServiceName
-        virtual ::rtl::OUString SAL_CALL getServiceName(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getServiceName(  ) throw (::com::sun::star::uno::RuntimeException);
 
         // SurfaceProvider
         virtual SurfaceSharedPtr getSurface();
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 66b0f40..6075029 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -306,7 +306,7 @@ namespace cairocanvas
         rendering::FontRequest aFontRequest = mpFont->getFontRequest();
         rendering::FontInfo aFontInfo = aFontRequest.FontDescription;
 
-        cairo_select_font_face( pCairo, ::rtl::OUStringToOString( aFontInfo.FamilyName, RTL_TEXTENCODING_UTF8 ).getStr(), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL );
+        cairo_select_font_face( pCairo, OUStringToOString( aFontInfo.FamilyName, RTL_TEXTENCODING_UTF8 ).getStr(), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL );
         cairo_set_font_size( pCairo, aFontRequest.CellSize );
     }
 
@@ -400,8 +400,8 @@ namespace cairocanvas
                               aFontData.back().first.bAntialias ? "AA " : "",
                               aFontData.back().first.bFakeBold ? "FB " : "",
                               aFontData.back().first.bFakeItalic ? "FI " : "",
-                              ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
-                                                        RTL_TEXTENCODING_UTF8 ).getStr());
+                              OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
+                                                 RTL_TEXTENCODING_UTF8 ).getStr());
                     break;
                 }
             }
@@ -536,9 +536,9 @@ namespace cairocanvas
             cairo_set_font_matrix(pSCairo.get(), &m);
 
 #if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
-# define TEMP_TRACE_FONT ::rtl::OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr()
+# define TEMP_TRACE_FONT OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr()
 #else
-# define TEMP_TRACE_FONT ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr()
+# define TEMP_TRACE_FONT OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr()
 #endif
             OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s",
                       aFont.GetWidth(),
@@ -553,7 +553,7 @@ namespace cairocanvas
                       rSysFontData.bFakeBold ? "FB " : "",
                       rSysFontData.bFakeItalic ? "FI " : "",
                       TEMP_TRACE_FONT,
-                      ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
+                      OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
                                                 RTL_TEXTENCODING_UTF8 ).getStr()
                 );
 #undef TEMP_TRACE_FONT
@@ -642,20 +642,20 @@ namespace cairocanvas
 #define SERVICE_NAME "com.sun.star.rendering.TextLayout"
 #define IMPLEMENTATION_NAME "CairoCanvas::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] = OUString( SERVICE_NAME );
 
         return aRet;
     }
diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx
index e4ee966..42cc369 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -77,9 +77,9 @@ namespace cairocanvas
         virtual ::com::sun::star::rendering::StringContext SAL_CALL getText(  ) 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 );
 
         bool draw( SurfaceSharedPtr&                               pSurface,
                    OutputDevice&                                   rOutDev,


More information about the Libreoffice-commits mailing list