[Libreoffice-commits] .: bridges/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 7 04:09:49 PST 2012


 bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx |    2 -
 bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx   |    4 +--
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx   |    4 ---
 bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx   |    4 +--
 bridges/source/cpp_uno/shared/unointerfaceproxy.cxx   |    4 +--
 bridges/source/cpp_uno/shared/vtablefactory.cxx       |   20 +++++++++---------
 6 files changed, 16 insertions(+), 22 deletions(-)

New commits:
commit 595771d00dd7993ad34f38bcb6dfee880e75dffd
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date:   Sat Nov 3 18:44:29 2012 -0200

    More ::rtl::OUString -> OUString in bridges
    
    Change-Id: Ibd29c68077dd8f27c95cd4cb62cd8dad0e18aacf
    Reviewed-on: https://gerrit.libreoffice.org/976
    Reviewed-by: Radek Doulík <rodo at novell.com>
    Tested-by: Radek Doulík <rodo at novell.com>

diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
index 6b80c02..ee7efc2 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
@@ -42,8 +42,6 @@
 
 using namespace com::sun::star::uno;
 
-using ::rtl::OUString;
-
 namespace
 {
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
index 7957b91..be59df5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
@@ -255,7 +255,7 @@ static typelib_TypeClass cpp_mediate(
                  "### illegal vtable index!" );
     if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
     {
-        throw RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )), (XInterface *)pCppI );
+        throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
     }
 
     // determine called method
@@ -350,7 +350,7 @@ static typelib_TypeClass cpp_mediate(
     }
     default:
     {
-        throw RuntimeException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )), (XInterface *)pCppI );
+        throw RuntimeException( "no member description found!", (XInterface *)pCppI );
     }
     }
     return eRet;
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
index 149a2e3..eaf0045 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
@@ -39,10 +39,6 @@
 
 using namespace com::sun::star::uno;
 
-using ::rtl::OUString;
-using ::rtl::OString;
-using ::rtl::OUStringToOString;
-
 namespace
 {
 //==================================================================================================
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index cc8c4d9..35b2f2c 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -106,7 +106,7 @@ void freeCppInterfaceProxy(uno_ExtEnvironment * pEnv, void * pInterface)
 
 com::sun::star::uno::XInterface * CppInterfaceProxy::create(
     bridges::cpp_uno::shared::Bridge * pBridge, uno_Interface * pUnoI,
-    typelib_InterfaceTypeDescription * pTypeDescr, rtl::OUString const & rOId)
+    typelib_InterfaceTypeDescription * pTypeDescr, OUString const & rOId)
     SAL_THROW(())
 {
     typelib_typedescription_complete(
@@ -153,7 +153,7 @@ void CppInterfaceProxy::releaseProxy() SAL_THROW(())
 
 CppInterfaceProxy::CppInterfaceProxy(
     bridges::cpp_uno::shared::Bridge * pBridge_, uno_Interface * pUnoI_,
-    typelib_InterfaceTypeDescription * pTypeDescr_, rtl::OUString const & rOId_)
+    typelib_InterfaceTypeDescription * pTypeDescr_, OUString const & rOId_)
     SAL_THROW(())
     : nRef( 1 )
     , pBridge( pBridge_ )
diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
index 81353cf..b82ebfd 100644
--- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
@@ -91,7 +91,7 @@ UnoInterfaceProxy * UnoInterfaceProxy::create(
     bridges::cpp_uno::shared::Bridge * pBridge,
     com::sun::star::uno::XInterface * pCppI,
     typelib_InterfaceTypeDescription * pTypeDescr,
-    rtl::OUString const & rOId) SAL_THROW(())
+    OUString const & rOId) SAL_THROW(())
 {
     return new UnoInterfaceProxy(pBridge, pCppI, pTypeDescr, rOId);
 }
@@ -99,7 +99,7 @@ UnoInterfaceProxy * UnoInterfaceProxy::create(
 UnoInterfaceProxy::UnoInterfaceProxy(
     bridges::cpp_uno::shared::Bridge * pBridge_,
     com::sun::star::uno::XInterface * pCppI_,
-    typelib_InterfaceTypeDescription * pTypeDescr_, rtl::OUString const & rOId_)
+    typelib_InterfaceTypeDescription * pTypeDescr_, OUString const & rOId_)
     SAL_THROW(())
     : nRef( 1 )
     , pBridge( pBridge_ )
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index d44c2e6..ffa8e7d 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -156,14 +156,14 @@ class VtableFactory::BaseOffset {
 public:
     BaseOffset(typelib_InterfaceTypeDescription * type) { calculate(type, 0); }
 
-    sal_Int32 getFunctionOffset(rtl::OUString const & name) const
+    sal_Int32 getFunctionOffset(OUString const & name) const
     { return m_map.find(name)->second; }
 
 private:
     sal_Int32 calculate(
         typelib_InterfaceTypeDescription * type, sal_Int32 offset);
 
-    typedef boost::unordered_map< rtl::OUString, sal_Int32, rtl::OUStringHash > Map;
+    typedef boost::unordered_map< OUString, sal_Int32, OUStringHash > Map;
 
     Map m_map;
 };
@@ -171,7 +171,7 @@ private:
 sal_Int32 VtableFactory::BaseOffset::calculate(
     typelib_InterfaceTypeDescription * type, sal_Int32 offset)
 {
-    rtl::OUString name(type->aBase.pTypeName);
+    OUString name(type->aBase.pTypeName);
     if (m_map.find(name) == m_map.end()) {
         for (sal_Int32 i = 0; i < type->nBaseTypes; ++i) {
             offset = calculate(type->ppBaseTypes[i], offset);
@@ -211,7 +211,7 @@ VtableFactory::~VtableFactory() {
 VtableFactory::Vtables VtableFactory::getVtables(
     typelib_InterfaceTypeDescription * type)
 {
-    rtl::OUString name(type->aBase.pTypeName);
+    OUString name(type->aBase.pTypeName);
     osl::MutexGuard guard(m_mutex);
     Map::iterator i(m_map.find(name));
     if (i == m_map.end()) {
@@ -243,18 +243,18 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
     block.fd = -1;
 
     osl::Security aSecurity;
-    rtl::OUString strDirectory;
-    rtl::OUString strURLDirectory;
+    OUString strDirectory;
+    OUString strURLDirectory;
     if (aSecurity.getHomeDir(strURLDirectory))
         osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory);
 
     for (int i = strDirectory.isEmpty() ? 1 : 0; i < 2; ++i)
     {
         if (strDirectory.isEmpty())
-            strDirectory = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/tmp" ));
+            strDirectory = "/tmp";
 
-        strDirectory += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.execoooXXXXXX" ));
-        rtl::OString aTmpName = rtl::OUStringToOString(strDirectory, osl_getThreadTextEncoding());
+        strDirectory += "/.execoooXXXXXX";
+        rtl::OString aTmpName = OUStringToOString(strDirectory, osl_getThreadTextEncoding());
         char *tmpfname = new char[aTmpName.getLength()+1];
         strncpy(tmpfname, aTmpName.getStr(), aTmpName.getLength()+1);
         if ((block.fd = mkstemp(tmpfname)) == -1)
@@ -297,7 +297,7 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
 
         freeBlock(block);
 
-        strDirectory = rtl::OUString();
+        strDirectory = OUString();
     }
     if (!block.start || !block.exec || block.fd == -1)
     {


More information about the Libreoffice-commits mailing list