diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 40 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 24 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 12 | ||||
-rw-r--r-- | libreofficekit/source/shim.c | 4 |
4 files changed, 40 insertions, 40 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index bbcac7fef613..512cfb3654c2 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -144,18 +144,18 @@ static OUString getAbsoluteURL(const char* pURL) extern "C" { -static void doc_destroy(LibreOfficeDocument* pThis); -static int doc_saveAs(LibreOfficeDocument* pThis, const char* pUrl, const char* pFormat); -static int doc_saveAsWithOptions(LibreOfficeDocument* pThis, const char* pUrl, const char* pFormat, const char* pFilterOptions); +static void doc_destroy(LibreOfficeKitDocument* pThis); +static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* pUrl, const char* pFormat); +static int doc_saveAsWithOptions(LibreOfficeKitDocument* pThis, const char* pUrl, const char* pFormat, const char* pFilterOptions); -struct LibLODocument_Impl : public _LibreOfficeDocument +struct LibLODocument_Impl : public _LibreOfficeKitDocument { uno::Reference<css::lang::XComponent> mxComponent; LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent) : mxComponent( xComponent ) { - nSize = sizeof(LibreOffice); + nSize = sizeof(LibreOfficeKit); destroy = doc_destroy; saveAs = doc_saveAs; @@ -168,24 +168,24 @@ struct LibLODocument_Impl : public _LibreOfficeDocument } }; -static void doc_destroy(LibreOfficeDocument *pThis) +static void doc_destroy(LibreOfficeKitDocument *pThis) { LibLODocument_Impl *pDocument = static_cast<LibLODocument_Impl*>(pThis); delete pDocument; } -static void lo_destroy (LibreOffice* pThis); -static int lo_initialize (LibreOffice* pThis, const char* pInstallPath); -static LibreOfficeDocument* lo_documentLoad (LibreOffice* pThis, const char* pURL); -static char * lo_getError (LibreOffice* pThis); +static void lo_destroy (LibreOfficeKit* pThis); +static int lo_initialize (LibreOfficeKit* pThis, const char* pInstallPath); +static LibreOfficeKitDocument* lo_documentLoad (LibreOfficeKit* pThis, const char* pURL); +static char * lo_getError (LibreOfficeKit* pThis); -struct LibLibreOffice_Impl : public _LibreOffice +struct LibLibreOffice_Impl : public _LibreOfficeKit { OUString maLastExceptionMsg; LibLibreOffice_Impl() { - nSize = sizeof(LibreOfficeDocument); + nSize = sizeof(LibreOfficeKitDocument); destroy = lo_destroy; initialize = lo_initialize; @@ -199,7 +199,7 @@ static uno::Reference<css::uno::XComponentContext> xContext; static uno::Reference<css::lang::XMultiServiceFactory> xSFactory; static uno::Reference<css::lang::XMultiComponentFactory> xFactory; -static LibreOfficeDocument* lo_documentLoad(LibreOffice* pThis, const char* pURL) +static LibreOfficeKitDocument* lo_documentLoad(LibreOfficeKit* pThis, const char* pURL) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); @@ -230,12 +230,12 @@ static LibreOfficeDocument* lo_documentLoad(LibreOffice* pThis, const char* pURL return NULL; } -static int doc_saveAs(LibreOfficeDocument* pThis, const char* sUrl, const char* pFormat) +static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const char* pFormat) { return doc_saveAsWithOptions(pThis, sUrl, pFormat, NULL); } -static int doc_saveAsWithOptions(LibreOfficeDocument* pThis, const char* sUrl, const char* pFormat, const char* pFilterOptions) +static int doc_saveAsWithOptions(LibreOfficeKitDocument* pThis, const char* sUrl, const char* pFormat, const char* pFilterOptions) { LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis); @@ -321,7 +321,7 @@ static int doc_saveAsWithOptions(LibreOfficeDocument* pThis, const char* sUrl, c return false; } -static char* lo_getError (LibreOffice *pThis) +static char* lo_getError (LibreOfficeKit *pThis) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); OString aString = OUStringToOString(pLib->maLastExceptionMsg, RTL_TEXTENCODING_UTF8); @@ -376,7 +376,7 @@ static void initialize_uno(const OUString &aAppURL) // configmgr setup ? } -static int lo_initialize(LibreOffice* pThis, const char* pAppPath) +static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath) { (void) pThis; @@ -416,17 +416,17 @@ static int lo_initialize(LibreOffice* pThis, const char* pAppPath) return bInitialized; } -SAL_DLLPUBLIC_EXPORT LibreOffice *liblibreoffice_hook(void) +SAL_DLLPUBLIC_EXPORT LibreOfficeKit *liblibreoffice_hook(void) { if (!gImpl) { fprintf(stderr, "create libreoffice object\n"); gImpl = new LibLibreOffice_Impl(); } - return static_cast<LibreOffice*>(gImpl); + return static_cast<LibreOfficeKit*>(gImpl); } -static void lo_destroy(LibreOffice *pThis) +static void lo_destroy(LibreOfficeKit *pThis) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); delete pLib; diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 9176eba0ae38..97acbab80821 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -15,34 +15,34 @@ extern "C" { #endif -typedef struct _LibreOffice LibreOffice; -typedef struct _LibreOfficeDocument LibreOfficeDocument; +typedef struct _LibreOfficeKit LibreOfficeKit; +typedef struct _LibreOfficeKitDocument LibreOfficeKitDocument; -struct _LibreOffice +struct _LibreOfficeKit { int nSize; - void (*destroy) (LibreOffice *pThis); - int (*initialize) (LibreOffice *pThis, const char *pInstallPath); - LibreOfficeDocument* (*documentLoad) (LibreOffice *pThis, const char *pURL); - char* (*getError) (LibreOffice *pThis); + void (*destroy) (LibreOfficeKit *pThis); + int (*initialize) (LibreOfficeKit *pThis, const char *pInstallPath); + LibreOfficeKitDocument* (*documentLoad) (LibreOfficeKit *pThis, const char *pURL); + char* (*getError) (LibreOfficeKit *pThis); }; -struct _LibreOfficeDocument +struct _LibreOfficeKitDocument { int nSize; - void (*destroy) (LibreOfficeDocument* pThis); - int (*saveAs) (LibreOfficeDocument* pThis, + void (*destroy) (LibreOfficeKitDocument* pThis); + int (*saveAs) (LibreOfficeKitDocument* pThis, const char *pUrl, const char *pFormat); - int (*saveAsWithOptions) (LibreOfficeDocument* pThis, + int (*saveAsWithOptions) (LibreOfficeKitDocument* pThis, const char *pUrl, const char *pFormat, const char *pFilterOptions); }; -LibreOffice* lo_init (const char* pInstallPath); +LibreOfficeKit* lok_init (const char* pInstallPath); #ifdef __cplusplus } diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index d689e4b9bc97..de8224c4e0b6 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -22,10 +22,10 @@ class LODocument { private: - LibreOfficeDocument* mpDoc; + LibreOfficeKitDocument* mpDoc; public: - inline LODocument(LibreOfficeDocument* pDoc) : + inline LODocument(LibreOfficeKitDocument* pDoc) : mpDoc(pDoc) {} @@ -53,10 +53,10 @@ public: class LibLibreOffice { private: - LibreOffice* mpThis; + LibreOfficeKit* mpThis; public: - inline LibLibreOffice(LibreOffice* pThis) : + inline LibLibreOffice(LibreOfficeKit* pThis) : mpThis(pThis) {} @@ -72,7 +72,7 @@ public: inline LODocument* documentLoad(const char* pUrl) { - LibreOfficeDocument* pDoc = mpThis->documentLoad(mpThis, pUrl); + LibreOfficeKitDocument* pDoc = mpThis->documentLoad(mpThis, pUrl); if (pDoc == NULL) return NULL; return new LODocument(pDoc); @@ -87,7 +87,7 @@ public: inline LibLibreOffice* lo_cpp_init(const char* pInstallPath) { - LibreOffice* pThis = lo_init(pInstallPath); + LibreOfficeKit* pThis = lok_init(pInstallPath); if (pThis == NULL || pThis->nSize == 0) return NULL; return new LibLibreOffice(pThis); diff --git a/libreofficekit/source/shim.c b/libreofficekit/source/shim.c index e863dd516b85..325695f00313 100644 --- a/libreofficekit/source/shim.c +++ b/libreofficekit/source/shim.c @@ -23,9 +23,9 @@ #define TARGET_LIB SAL_MODULENAME( "sofficeapp" ) -typedef LibreOffice *(HookFunction)(void); +typedef LibreOfficeKit *(HookFunction)(void); -SAL_DLLPUBLIC_EXPORT LibreOffice *lo_init( const char *install_path ) +SAL_DLLPUBLIC_EXPORT LibreOfficeKit *lok_init( const char *install_path ) { char *imp_lib; void *dlhandle; |