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

Stephan Bergmann sbergman at redhat.com
Wed Jul 1 07:15:15 PDT 2015


 configmgr/source/components.cxx |   15 +++++++--------
 configmgr/source/components.hxx |    4 ++--
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit ba4759f61afff49d2c3b5d2756340c465235834e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 1 16:14:29 2015 +0200

    parseFileLeniently is always called with data_ as argument
    
    Change-Id: I1c4f5e468062ced7f76b877939f96435b00d05e3

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 7f3e41c..5c585ec 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -391,8 +391,7 @@ void Components::insertModificationXcuFile(
     Partial part(includedPaths, excludedPaths);
     try {
         parseFileLeniently(
-            &parseXcuFile, fileUri, Data::NO_LAYER, data_, &part, modifications,
-            0);
+            &parseXcuFile, fileUri, Data::NO_LAYER, &part, modifications, 0);
     } catch (css::container::NoSuchElementException & e) {
         SAL_WARN(
             "configmgr",
@@ -543,7 +542,7 @@ Components::Components(
             OUString aTempFileURL;
             if ( dumpWindowsRegistry(&aTempFileURL) )
             {
-                parseFileLeniently(&parseXcuFile, aTempFileURL, layer, data_, 0, 0, 0);
+                parseFileLeniently(&parseXcuFile, aTempFileURL, layer, 0, 0, 0);
                 layer++;
                 osl::File::remove(aTempFileURL);
             }
@@ -566,13 +565,13 @@ Components::~Components()
 }
 
 void Components::parseFileLeniently(
-    FileParser * parseFile, OUString const & url, int layer, Data & data,
+    FileParser * parseFile, OUString const & url, int layer,
     Partial const * partial, Modifications * modifications,
     Additions * additions)
 {
     assert(parseFile != 0);
     try {
-        (*parseFile)(url, layer, data, partial, modifications, additions);
+        (*parseFile)(url, layer, data_, partial, modifications, additions);
     } catch (css::container::NoSuchElementException &) {
         throw;
     } catch (css::uno::Exception & e) { //TODO: more specific exception catching
@@ -625,7 +624,7 @@ void Components::parseFiles(
             if (file.endsWith(extension)) {
                 try {
                     parseFileLeniently(
-                        parseFile, stat.getFileURL(), layer, data_, 0, 0, 0);
+                        parseFile, stat.getFileURL(), layer, 0, 0, 0);
                 } catch (css::container::NoSuchElementException & e) {
                     throw css::uno::RuntimeException(
                         "stat'ed file does not exist: " + e.Message);
@@ -647,7 +646,7 @@ void Components::parseFileList(
                 adds = data_.addExtensionXcuAdditions(url, layer);
             }
             try {
-                parseFileLeniently(parseFile, url, layer, data_, 0, 0, adds);
+                parseFileLeniently(parseFile, url, layer, 0, 0, adds);
             } catch (css::container::NoSuchElementException & e) {
                 SAL_WARN(
                     "configmgr", "file does not exist: \"" << e.Message << '"');
@@ -785,7 +784,7 @@ void Components::parseResLayer(int layer, OUString const & url) {
 
 void Components::parseModificationLayer(OUString const & url) {
     try {
-        parseFileLeniently(&parseXcuFile, url, Data::NO_LAYER, data_, 0, 0, 0);
+        parseFileLeniently(&parseXcuFile, url, Data::NO_LAYER, 0, 0, 0);
     } catch (css::container::NoSuchElementException &) {
         SAL_INFO(
             "configmgr", "user registrymodifications.xcu does not (yet) exist");
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 43b1e8f..d0c2536 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -119,9 +119,9 @@ public:
     ~Components();
 private:
 
-    static void parseFileLeniently(
+    void parseFileLeniently(
         FileParser * parseFile, OUString const & url, int layer,
-        Data & data, Partial const * partial, Modifications * modifications,
+        Partial const * partial, Modifications * modifications,
         Additions * additions);
 
     void parseFiles(


More information about the Libreoffice-commits mailing list