summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-11-15 18:00:05 +0200
committerTor Lillqvist <tml@collabora.com>2013-11-15 18:07:15 +0200
commit4837353ed445fb0b89398a7f2ae2b6cde3dea347 (patch)
treec6eeb1724301bdcac12714ee6304bab33c4b8bb1 /desktop
parent306a39ec0d2cde09d7e75e726ce47622939733d7 (diff)
WaE: C4190 for extern "C" functions returning C++ type
Change-Id: Ic1ac345781782bc4333ae2634f8f819914a0ca6e
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6fa921145a95..9f65dd74881f 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 )
{