[Libreoffice-commits] .: canvas/workben desktop/source desktop/unx slideshow/test svx/source ucb/source

Michael Meeks michael at kemper.freedesktop.org
Wed Oct 5 05:59:51 PDT 2011


 canvas/workben/canvasdemo.cxx          |    2 +-
 desktop/source/app/officeipcthread.cxx |    4 ++--
 desktop/unx/splash/unxsplash.cxx       |    2 +-
 slideshow/test/demoshow.cxx            |   11 +++++------
 svx/source/gengal/gengal.cxx           |    2 +-
 ucb/source/ucp/gvfs/gvfs_provider.cxx  |    4 ++--
 6 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 6c2d66e5257e46f8db438ae2151ba440870e2400
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Oct 5 14:00:00 2011 +0100

    remove const sal_Char * casts of rtl::OUStringToOString results, fixes ucb

diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index db72a7d..63a5652 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -634,7 +634,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
     catch (const uno::Exception &e)
     {
         fprintf( stderr, "Exception '%s' thrown\n" ,
-                 (const sal_Char *) ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ) );
+                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
     }
 }
 
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 6583e51..9d1ea0f 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -230,8 +230,8 @@ OfficeIPCThread*    OfficeIPCThread::pGlobalOfficeIPCThread = 0;
 String CreateMD5FromString( const OUString& aMsg )
 {
 #if (OSL_DEBUG_LEVEL > 2)
-    fprintf (stderr, "create md5 from '%s'\n",
-             (const sal_Char *)rtl::OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8));
+    fprintf( stderr, "create md5 from '%s'\n",
+             rtl::OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8).getStr() );
 #endif
 
     rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
diff --git a/desktop/unx/splash/unxsplash.cxx b/desktop/unx/splash/unxsplash.cxx
index 88d6906..85a9f80 100644
--- a/desktop/unx/splash/unxsplash.cxx
+++ b/desktop/unx/splash/unxsplash.cxx
@@ -130,7 +130,7 @@ UnxSplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::
             m_pOutFd = fdopen( fd, "w" );
 #if OSL_DEBUG_LEVEL > 1
             fprintf( stderr, "Got argument '--splash-pipe=%d ('%s') (%p)\n",
-                     fd, (const sal_Char *)rtl::OUStringToOString( aNum, RTL_TEXTENCODING_UTF8 ),
+                     fd, rtl::OUStringToOString( aNum, RTL_TEXTENCODING_UTF8 ).getStr(),
                      m_pOutFd );
 #endif
         }
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index 7e238da..d591537 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -370,8 +370,7 @@ void ChildWindow::init()
     catch (const uno::Exception &e)
     {
         OSL_TRACE( "Exception '%s' thrown\n" ,
-                   (const sal_Char*)::rtl::OUStringToOString( e.Message,
-                                                              RTL_TEXTENCODING_UTF8 ));
+                   ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
     }
 }
 
@@ -385,8 +384,8 @@ void ChildWindow::Paint( const Rectangle& /*rRect*/ )
     catch (const uno::Exception &e)
     {
         OSL_TRACE( "Exception '%s' thrown\n" ,
-                   (const sal_Char*)::rtl::OUStringToOString( e.Message,
-                                                              RTL_TEXTENCODING_UTF8 ));
+                   ::rtl::OUStringToOString( e.Message,
+                                             RTL_TEXTENCODING_UTF8 ).getStr() );
     }
 }
 
@@ -478,8 +477,8 @@ void DemoWindow::init()
     catch (const uno::Exception &e)
     {
         OSL_TRACE( "Exception '%s' thrown\n" ,
-                   (const sal_Char*)::rtl::OUStringToOString( e.Message,
-                                                              RTL_TEXTENCODING_UTF8 ));
+                   ::rtl::OUStringToOString( e.Message,
+                                             RTL_TEXTENCODING_UTF8 ).getStr() );
     }
 }
 
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index d8daa1c..21f687a 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -175,7 +175,7 @@ static void createTheme( rtl::OUString aThemeName,
         if( aGraphic.GetType() == GRAPHIC_NONE )
         {
             fprintf( stderr, "Failed to load '%s'\n",
-                     (const sal_Char *) rtl::OUStringToOString( *aIter, RTL_TEXTENCODING_UTF8 ) );
+                     rtl::OUStringToOString( *aIter, RTL_TEXTENCODING_UTF8 ).getStr() );
             continue;
         }
 
diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx b/ucb/source/ucp/gvfs/gvfs_provider.cxx
index ecd143f..9098a95 100644
--- a/ucb/source/ucp/gvfs/gvfs_provider.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx
@@ -113,8 +113,8 @@ ContentProvider::queryContent(
 {
 #ifdef DEBUG
     g_warning ("QueryContent: '%s'",
-               (const sal_Char *)rtl::OUStringToOString
-               (Identifier->getContentIdentifier(), RTL_TEXTENCODING_UTF8).getStr() );
+               rtl::OUStringToOString (Identifier->getContentIdentifier(),
+                                       RTL_TEXTENCODING_UTF8).getStr() );
 #endif
 
     osl::MutexGuard aGuard( m_aMutex );


More information about the Libreoffice-commits mailing list