135360
From 4c85fb2dfb79b09598d8196d134398a8bb688b20 Mon Sep 17 00:00:00 2001
135360
From: Stephan Bergmann <sbergman@redhat.com>
135360
Date: Tue, 10 Nov 2015 10:09:37 +0100
135360
Subject: [PATCH 291/398] loplugin:nullptr (automatic rewrite)
135360
135360
Change-Id: Ifbab1c3bdf0bb481477e600978c640cdc052be74
135360
(cherry picked from commit ebc194c696e5c9b1acf320cfc582b4ab56c14900)
135360
---
135360
 include/LibreOfficeKit/LibreOfficeKit.hxx | 20 ++++++++++----------
135360
 1 file changed, 10 insertions(+), 10 deletions(-)
135360
135360
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
135360
index c51339fa3ba8..dde371ddc95b 100644
135360
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
135360
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
135360
@@ -47,7 +47,7 @@ public:
135360
      * @param pFormat the format to use while exporting, when omitted, then deducted from pURL's extension
135360
      * @param pFilterOptions options for the export filter, e.g. SkipImages.
135360
      */
135360
-    inline bool saveAs(const char* pUrl, const char* pFormat = NULL, const char* pFilterOptions = NULL)
135360
+    inline bool saveAs(const char* pUrl, const char* pFormat = nullptr, const char* pFilterOptions = nullptr)
135360
     {
135360
         return mpDoc->pClass->saveAs(mpDoc, pUrl, pFormat, pFilterOptions) != 0;
135360
     }
135360
@@ -220,7 +220,7 @@ public:
135360
      * @param pCommand uno command to be posted to the document, like ".uno:Bold"
135360
      * @param pArguments arguments of the uno command.
135360
      */
135360
-    inline void postUnoCommand(const char* pCommand, const char* pArguments = 0, bool bNotifyWhenFinished = false)
135360
+    inline void postUnoCommand(const char* pCommand, const char* pArguments = nullptr, bool bNotifyWhenFinished = false)
135360
     {
135360
         mpDoc->pClass->postUnoCommand(mpDoc, pCommand, pArguments, bNotifyWhenFinished);
135360
     }
135360
@@ -243,7 +243,7 @@ public:
135360
      * @param pMimeType suggests the return format, for example text/plain;charset=utf-8.
135360
      * @param pUsedMimeType output parameter to inform about the determined format (suggested one or plain text).
135360
      */
135360
-    inline char* getTextSelection(const char* pMimeType, char** pUsedMimeType = 0)
135360
+    inline char* getTextSelection(const char* pMimeType, char** pUsedMimeType = nullptr)
135360
     {
135360
         return mpDoc->pClass->getTextSelection(mpDoc, pMimeType, pUsedMimeType);
135360
     }
135360
@@ -361,17 +361,17 @@ public:
135360
      * @param pUrl the URL of the document to load
135360
      * @param pFilterOptions options for the import filter, e.g. SkipImages.
135360
      */
135360
-    inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = NULL)
135360
+    inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = nullptr)
135360
     {
135360
-        LibreOfficeKitDocument* pDoc = NULL;
135360
+        LibreOfficeKitDocument* pDoc = nullptr;
135360
 
135360
         if (LIBREOFFICEKIT_HAS(mpThis, documentLoadWithOptions))
135360
             pDoc = mpThis->pClass->documentLoadWithOptions(mpThis, pUrl, pFilterOptions);
135360
         else
135360
             pDoc = mpThis->pClass->documentLoad(mpThis, pUrl);
135360
 
135360
-        if (pDoc == NULL)
135360
-            return NULL;
135360
+        if (pDoc == nullptr)
135360
+            return nullptr;
135360
 
135360
         return new Document(pDoc);
135360
     }
135360
@@ -405,11 +405,11 @@ public:
135360
 };
135360
 
135360
 /// Factory method to create a lok::Office instance.
135360
-inline Office* lok_cpp_init(const char* pInstallPath, const char* pUserProfilePath = NULL)
135360
+inline Office* lok_cpp_init(const char* pInstallPath, const char* pUserProfilePath = nullptr)
135360
 {
135360
     LibreOfficeKit* pThis = lok_init_2(pInstallPath, pUserProfilePath);
135360
-    if (pThis == NULL || pThis->pClass->nSize == 0)
135360
-        return NULL;
135360
+    if (pThis == nullptr || pThis->pClass->nSize == 0)
135360
+        return nullptr;
135360
     return new ::lok::Office(pThis);
135360
 }
135360
 
135360
-- 
135360
2.12.0
135360