diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:09:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:14 +0100 |
commit | ebc194c696e5c9b1acf320cfc582b4ab56c14900 (patch) | |
tree | dfd14d99b1f2b440f3d2e7795d3eef0e41d92ce5 /include | |
parent | 3bf5bc03748a8f9a49bb286195a47e6a76d6464d (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: Ifbab1c3bdf0bb481477e600978c640cdc052be74
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 315889ad8e53..f506bb4ef307 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -47,7 +47,7 @@ public: * @param pFormat the format to use while exporting, when omitted, then deducted from pURL's extension * @param pFilterOptions options for the export filter, e.g. SkipImages. */ - inline bool saveAs(const char* pUrl, const char* pFormat = NULL, const char* pFilterOptions = NULL) + inline bool saveAs(const char* pUrl, const char* pFormat = nullptr, const char* pFilterOptions = nullptr) { return mpDoc->pClass->saveAs(mpDoc, pUrl, pFormat, pFilterOptions) != 0; } @@ -220,7 +220,7 @@ public: * @param pCommand uno command to be posted to the document, like ".uno:Bold" * @param pArguments arguments of the uno command. */ - inline void postUnoCommand(const char* pCommand, const char* pArguments = 0, bool bNotifyWhenFinished = false) + inline void postUnoCommand(const char* pCommand, const char* pArguments = nullptr, bool bNotifyWhenFinished = false) { mpDoc->pClass->postUnoCommand(mpDoc, pCommand, pArguments, bNotifyWhenFinished); } @@ -243,7 +243,7 @@ public: * @param pMimeType suggests the return format, for example text/plain;charset=utf-8. * @param pUsedMimeType output parameter to inform about the determined format (suggested one or plain text). */ - inline char* getTextSelection(const char* pMimeType, char** pUsedMimeType = 0) + inline char* getTextSelection(const char* pMimeType, char** pUsedMimeType = nullptr) { return mpDoc->pClass->getTextSelection(mpDoc, pMimeType, pUsedMimeType); } @@ -361,17 +361,17 @@ public: * @param pUrl the URL of the document to load * @param pFilterOptions options for the import filter, e.g. SkipImages. */ - inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = NULL) + inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = nullptr) { - LibreOfficeKitDocument* pDoc = NULL; + LibreOfficeKitDocument* pDoc = nullptr; if (LIBREOFFICEKIT_HAS(mpThis, documentLoadWithOptions)) pDoc = mpThis->pClass->documentLoadWithOptions(mpThis, pUrl, pFilterOptions); else pDoc = mpThis->pClass->documentLoad(mpThis, pUrl); - if (pDoc == NULL) - return NULL; + if (pDoc == nullptr) + return nullptr; return new Document(pDoc); } @@ -405,11 +405,11 @@ public: }; /// Factory method to create a lok::Office instance. -inline Office* lok_cpp_init(const char* pInstallPath, const char* pUserProfilePath = NULL) +inline Office* lok_cpp_init(const char* pInstallPath, const char* pUserProfilePath = nullptr) { LibreOfficeKit* pThis = lok_init_2(pInstallPath, pUserProfilePath); - if (pThis == NULL || pThis->pClass->nSize == 0) - return NULL; + if (pThis == nullptr || pThis->pClass->nSize == 0) + return nullptr; return new ::lok::Office(pThis); } |