[Libreoffice-commits] core.git: desktop/source

Tor Lillqvist tml at collabora.com
Fri Nov 15 08:07:48 PST 2013


 desktop/source/lib/init.cxx |   44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 4837353ed445fb0b89398a7f2ae2b6cde3dea347
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 15 18:00:05 2013 +0200

    WaE: C4190 for extern "C" functions returning C++ type
    
    Change-Id: Ic1ac345781782bc4333ae2634f8f819914a0ca6e

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6fa9211..9f65dd7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -97,6 +97,28 @@ aImpressExtensionMap[] = {
     { NULL, NULL }
 };
 
+static OUString getUString( const char *str )
+{
+    if( !str )
+        return OUString( "" );
+    return OStringToOUString( OString( str, strlen (str) ),
+                              RTL_TEXTENCODING_UTF8 );
+}
+
+// Try to convert a relative URL to an absolute one
+static OUString getAbsoluteURL( const char *pURL )
+{
+    OUString aURL( getUString( pURL ) );
+    OUString sAbsoluteDocUrl, sWorkingDir, sDocPathUrl;
+
+    // FIXME: this would appear to kill non-file URLs.
+    osl_getProcessWorkingDir(&sWorkingDir.pData);
+    osl::FileBase::getFileURLFromSystemPath( aURL, sDocPathUrl );
+    osl::FileBase::getAbsoluteFileURL(sWorkingDir, sDocPathUrl, sAbsoluteDocUrl);
+
+    return sAbsoluteDocUrl;
+}
+
 extern "C" {
 
 SAL_DLLPUBLIC_EXPORT LibreOffice *liblibreoffice_hook(void);
@@ -151,28 +173,6 @@ static uno::Reference<css::uno::XComponentContext> xContext;
 static uno::Reference<css::lang::XMultiServiceFactory> xSFactory;
 static uno::Reference<css::lang::XMultiComponentFactory> xFactory;
 
-static OUString getUString( const char *str )
-{
-    if( !str )
-        return OUString( "" );
-    return OStringToOUString( OString( str, strlen (str) ),
-                              RTL_TEXTENCODING_UTF8 );
-}
-
-// Try to convert a relative URL to an absolute one
-static OUString getAbsoluteURL( const char *pURL )
-{
-    OUString aURL( getUString( pURL ) );
-    OUString sAbsoluteDocUrl, sWorkingDir, sDocPathUrl;
-
-    // FIXME: this would appear to kill non-file URLs.
-    osl_getProcessWorkingDir(&sWorkingDir.pData);
-    osl::FileBase::getFileURLFromSystemPath( aURL, sDocPathUrl );
-    osl::FileBase::getAbsoluteFileURL(sWorkingDir, sDocPathUrl, sAbsoluteDocUrl);
-
-    return sAbsoluteDocUrl;
-}
-
 static LibreOfficeDocument *
 lo_documentLoad( LibreOffice *pThis, const char *pURL )
 {


More information about the Libreoffice-commits mailing list