[Libreoffice-commits] core.git: comphelper/source framework/source include/comphelper include/unotools sdext/source sd/source ucb/source unotools/source vcl/source wizards/com

Stephan Bergmann sbergman at redhat.com
Tue Sep 5 16:00:01 UTC 2017


 comphelper/source/misc/configurationhelper.cxx                |    6 -
 framework/source/uiconfiguration/globalsettings.cxx           |    3 
 framework/source/uiconfiguration/windowstateconfiguration.cxx |    3 
 include/comphelper/configurationhelper.hxx                    |    4 -
 include/unotools/confignode.hxx                               |    5 -
 sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx      |    3 
 sd/source/ui/tools/ConfigurationAccess.cxx                    |    3 
 sdext/source/minimizer/configurationaccess.cxx                |    3 
 sdext/source/presenter/PresenterConfigurationAccess.cxx       |    3 
 ucb/source/core/ucbstore.cxx                                  |    5 -
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx              |   35 ----------
 unotools/source/config/confignode.cxx                         |   13 +--
 vcl/source/filter/FilterConfigItem.cxx                        |    8 --
 wizards/com/sun/star/wizards/common/Configuration.java        |   12 ---
 wizards/com/sun/star/wizards/common/Configuration.py          |   11 ---
 15 files changed, 21 insertions(+), 96 deletions(-)

New commits:
commit cb2550750386f51ef7a46a8a664a4ab9de614f8d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Sep 5 17:57:18 2017 +0200

    Drop lazywrite property, which is silently ignored by configmgr anyway
    
    ...at least ever since the "new" configmgr reimplementation,
    6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e "#i101955# initial work in progress of
    a configmgr reimplementation (for now in an extra module 'configmgr2')" et al
    
    Change-Id: I43430d991647fb2e26762463d51175247db0604b

diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx
index 7e8dbb52e24b..f15651f0db0b 100644
--- a/comphelper/source/misc/configurationhelper.cxx
+++ b/comphelper/source/misc/configurationhelper.cxx
@@ -53,12 +53,6 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons
         lParams.push_back(css::uno::Any(aParam));
     }
 
-    // enable lazy writing
-    bool bLazy(eMode & EConfigurationModes::LazyWrite);
-    aParam.Name    = "lazywrite";
-    aParam.Value   <<= bLazy;
-    lParams.push_back(css::uno::Any(aParam));
-
     // open it
     css::uno::Reference< css::uno::XInterface > xCFG;
 
diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx
index 0af47f622d2b..948b432a3de4 100644
--- a/framework/source/uiconfiguration/globalsettings.cxx
+++ b/framework/source/uiconfiguration/globalsettings.cxx
@@ -200,8 +200,7 @@ void GlobalSettings_Access::impl_initConfigAccess()
 
             uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence(
             {
-                {"nodepath", uno::Any(OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars"))},
-                {"lazywrite", uno::Any(true)}
+                {"nodepath", uno::Any(OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars"))}
             }));
             m_xConfigAccess.set(xConfigProvider->createInstanceWithArguments(
                                     SERVICENAME_CFGREADACCESS, aArgs ),
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 036a12f40ce2..024fa761e823 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1214,8 +1214,7 @@ void ConfigurationAccess_WindowState::impl_initializeConfigAccess()
     {
         Sequence<Any> aArgs(comphelper::InitAnyPropertySequence(
         {
-            {"nodepath", Any(m_aConfigWindowAccess)},
-            {"lazywrite", Any(true)}
+            {"nodepath", Any(m_aConfigWindowAccess)}
         }));
         m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments(
                     "com.sun.star.configuration.ConfigurationUpdateAccess", aArgs ), UNO_QUERY );
diff --git a/include/comphelper/configurationhelper.hxx b/include/comphelper/configurationhelper.hxx
index 916ee016c151..48b1e240f104 100644
--- a/include/comphelper/configurationhelper.hxx
+++ b/include/comphelper/configurationhelper.hxx
@@ -47,9 +47,7 @@ namespace comphelper
         /// configuration will be opened readonly
         ReadOnly = 1,
         /// all localized nodes will be interpreted as XInterface instead of interpreting it as atomic value nodes
-        AllLocales = 2,
-        /// enable lazy writing
-        LazyWrite = 4
+        AllLocales = 2
     };
 
 
diff --git a/include/unotools/confignode.hxx b/include/unotools/confignode.hxx
index d813af86a616..09c9bb266308 100644
--- a/include/unotools/confignode.hxx
+++ b/include/unotools/confignode.hxx
@@ -244,8 +244,7 @@ namespace utl
                 const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxConfProvider,
                 const OUString& _rPath,
                 sal_Int32 _nDepth,
-                CREATION_MODE _eMode,
-                bool _bLazyWrite = true
+                CREATION_MODE _eMode
             );
 
         /** open a new top-level configuration node<p/>
@@ -261,7 +260,7 @@ namespace utl
             @param      _eMode          specifies which privileges should be applied when retrieving the node
         */
         static OConfigurationTreeRoot createWithComponentContext(const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
-            const OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_UPDATABLE, bool _bLazyWrite = true);
+            const OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_UPDATABLE);
 
         /** tolerant version of the <member>createWithServiceFactory</member>
 
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
index 8d2be1ddcafb..5f044aaded4f 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
@@ -83,8 +83,7 @@ CacheConfiguration::CacheConfiguration()
         Sequence<Any> aCreationArguments(comphelper::InitAnyPropertySequence(
         {
             {"nodepath", makeAny(sPathToImpressConfigurationRoot)},
-            {"depth", makeAny((sal_Int32)-1)},
-            {"lazywrite", makeAny(true)}
+            {"depth", makeAny((sal_Int32)-1)}
         }));
 
         Reference<XInterface> xRoot (xProvider->createInstanceWithArguments(
diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx
index 306c8f4016eb..2b9285c6ebc2 100644
--- a/sd/source/ui/tools/ConfigurationAccess.cxx
+++ b/sd/source/ui/tools/ConfigurationAccess.cxx
@@ -63,8 +63,7 @@ void ConfigurationAccess::Initialize (
         Sequence<Any> aCreationArguments(comphelper::InitAnyPropertySequence(
         {
             {"nodepath", makeAny(rsRootName)},
-            {"depth", makeAny((sal_Int32)-1)},
-            {"lazywrite", makeAny(true)}
+            {"depth", makeAny((sal_Int32)-1)}
         }));
 
         OUString sAccessService;
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 389bbecc1176..d9b58d0a7fc8 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -292,8 +292,7 @@ Reference< XInterface > ConfigurationAccess::OpenConfiguration( bool bReadOnly )
         Reference< lang::XMultiServiceFactory > xProvider = configuration::theDefaultProvider::get( mxContext );
         uno::Sequence<uno::Any> aCreationArguments(comphelper::InitAnyPropertySequence(
         {
-            {"nodepath",  uno::Any(GetPathToConfigurationRoot())},
-            {"lazywrite", uno::Any(true)}
+            {"nodepath",  uno::Any(GetPathToConfigurationRoot())}
         }));
         OUString sAccessService;
         if ( bReadOnly )
diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx
index f6ce8b4421ba..afde60c20a34 100644
--- a/sdext/source/presenter/PresenterConfigurationAccess.cxx
+++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx
@@ -49,8 +49,7 @@ PresenterConfigurationAccess::PresenterConfigurationAccess (
             uno::Sequence<uno::Any> aCreationArguments(comphelper::InitAnyPropertySequence(
             {
                 {"nodepath", uno::Any(rsRootName)},
-                {"depth", uno::Any((sal_Int32)-1)},
-                {"lazywrite", uno::Any(true)}
+                {"depth", uno::Any((sal_Int32)-1)}
             }));
 
             OUString sAccessService;
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 712ef0ae4fc1..23aa09b0a48f 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -103,8 +103,6 @@ OUString makeHierarchalNameSegment( const OUString & rIn  )
 
 // describe path of cfg entry
 #define CFGPROPERTY_NODEPATH        "nodepath"
-// true->async. update; false->sync. update
-#define CFGPROPERTY_LAZYWRITE       "lazywrite"
 
 // PropertySetMap_Impl.
 typedef std::unordered_map
@@ -998,8 +996,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
             {
                 Sequence<Any> aArguments(comphelper::InitAnyPropertySequence(
                 {
-                    {CFGPROPERTY_NODEPATH,  Any(OUString( STORE_CONTENTPROPERTIES_KEY ))},
-                    {CFGPROPERTY_LAZYWRITE, Any(true)}
+                    {CFGPROPERTY_NODEPATH,  Any(OUString( STORE_CONTENTPROPERTIES_KEY ))}
                 }));
 
                 m_pImpl->m_bTriedToGetRootWriteAccess = true;
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 091870e0a8a3..41a22de0b61e 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -44,8 +44,6 @@ using namespace hierarchy_ucp;
 
 // describe path of cfg entry
 #define CFGPROPERTY_NODEPATH    "nodepath"
-// true->async. update; false->sync. update
-#define CFGPROPERTY_LAZYWRITE   "lazywrite"
 
 #define READ_SERVICE_NAME      "com.sun.star.ucb.HierarchyDataReadAccess"
 #define READWRITE_SERVICE_NAME "com.sun.star.ucb.HierarchyDataReadWriteAccess"
@@ -355,8 +353,6 @@ HierarchyDataSource::createInstanceWithArguments(
 
     uno::Sequence< uno::Any > aNewArgs( Arguments );
 
-    bool bHasLazyWriteProp = bReadOnly; // property must be added only if
-                                        // a writable view is requested.
     if ( bCheckArgs )
     {
         // Check arguments.
@@ -389,8 +385,7 @@ HierarchyDataSource::createInstanceWithArguments(
                         // Set new path in arguments.
                         aNewArgs[ n ] <<= aProp;
 
-                        if ( bHasLazyWriteProp )
-                            break;
+                        break;
                     }
                     else
                     {
@@ -399,22 +394,6 @@ HierarchyDataSource::createInstanceWithArguments(
                         return uno::Reference< uno::XInterface >();
                     }
                 }
-                else if ( aProp.Name == CFGPROPERTY_LAZYWRITE )
-                {
-                    if ( aProp.Value.getValueType() == cppu::UnoType<bool>::get() )
-                    {
-                        bHasLazyWriteProp = true;
-
-                        if ( bHasNodePath )
-                            break;
-                    }
-                    else
-                    {
-                        OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
-                            "Invalid type for property 'lazywrite'!" );
-                        return uno::Reference< uno::XInterface >();
-                    }
-                }
             }
         }
 
@@ -443,18 +422,6 @@ HierarchyDataSource::createInstanceWithArguments(
         }
         else
         {
-            // Append 'lazywrite' property value, if not already present.
-            if ( !bHasLazyWriteProp )
-            {
-                sal_Int32 nLen = aNewArgs.getLength();
-                aNewArgs.realloc( nLen + 1 );
-
-                beans::PropertyValue aProp;
-                aProp.Name = CFGPROPERTY_LAZYWRITE;
-                aProp.Value <<= true;
-                aNewArgs[ nLen ] <<= aProp;
-            }
-
             // Create configuration read-write access object.
             xConfigAccess = xProv->createInstanceWithArguments(
                                 "com.sun.star.configuration.ConfigurationUpdateAccess",
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index f90a94d6dbf6..42ee97c7707b 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -474,14 +474,13 @@ namespace utl
         }
 
         Reference< XInterface > lcl_createConfigurationRoot( const Reference< XMultiServiceFactory >& i_rxConfigProvider,
-            const OUString& i_rNodePath, const bool i_bUpdatable, const sal_Int32 i_nDepth, const bool i_bLazyWrite )
+            const OUString& i_rNodePath, const bool i_bUpdatable, const sal_Int32 i_nDepth )
         {
             ENSURE_OR_RETURN( i_rxConfigProvider.is(), "invalid provider", nullptr );
             try
             {
                 ::comphelper::NamedValueCollection aArgs;
                 aArgs.put( "nodepath", i_rNodePath );
-                aArgs.put( "lazywrite", i_bLazyWrite );
                 aArgs.put( "depth", i_nDepth );
 
                 OUString sAccessService( i_bUpdatable ?
@@ -510,7 +509,7 @@ namespace utl
 
     OConfigurationTreeRoot::OConfigurationTreeRoot( const Reference<XComponentContext> & i_rContext, const OUString& i_rNodePath, const bool i_bUpdatable )
         :OConfigurationNode( lcl_createConfigurationRoot( lcl_getConfigProvider( i_rContext ),
-            i_rNodePath, i_bUpdatable, -1, false ).get() )
+            i_rNodePath, i_bUpdatable, -1 ).get() )
         ,m_xCommitter()
     {
         if ( i_bUpdatable )
@@ -547,18 +546,18 @@ namespace utl
         return false;
     }
 
-    OConfigurationTreeRoot OConfigurationTreeRoot::createWithProvider(const Reference< XMultiServiceFactory >& _rxConfProvider, const OUString& _rPath, sal_Int32 _nDepth, CREATION_MODE _eMode, bool _bLazyWrite)
+    OConfigurationTreeRoot OConfigurationTreeRoot::createWithProvider(const Reference< XMultiServiceFactory >& _rxConfProvider, const OUString& _rPath, sal_Int32 _nDepth, CREATION_MODE _eMode)
     {
         Reference< XInterface > xRoot( lcl_createConfigurationRoot(
-            _rxConfProvider, _rPath, _eMode != CM_READONLY, _nDepth, _bLazyWrite ) );
+            _rxConfProvider, _rPath, _eMode != CM_READONLY, _nDepth ) );
         if ( xRoot.is() )
             return OConfigurationTreeRoot( xRoot );
         return OConfigurationTreeRoot();
     }
 
-    OConfigurationTreeRoot OConfigurationTreeRoot::createWithComponentContext( const Reference< XComponentContext >& _rxContext, const OUString& _rPath, sal_Int32 _nDepth, CREATION_MODE _eMode, bool _bLazyWrite )
+    OConfigurationTreeRoot OConfigurationTreeRoot::createWithComponentContext( const Reference< XComponentContext >& _rxContext, const OUString& _rPath, sal_Int32 _nDepth, CREATION_MODE _eMode )
     {
-        return createWithProvider( lcl_getConfigProvider( _rxContext ), _rPath, _nDepth, _eMode, _bLazyWrite );
+        return createWithProvider( lcl_getConfigProvider( _rxContext ), _rPath, _nDepth, _eMode );
     }
 
     OConfigurationTreeRoot OConfigurationTreeRoot::tryCreateWithComponentContext( const Reference< XComponentContext >& rxContext,
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index b0458df5430f..ffdd00a15fe9 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -115,14 +115,8 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
         aPathArgument.Name = "nodepath";
         aPathArgument.Value <<= sTree;
 
-        // creation arguments: commit mode
-        PropertyValue aModeArgument;
-        aModeArgument.Name = "lazywrite";
-        aModeArgument.Value <<= true;
-
-        Sequence< Any > aArguments( 2 );
+        Sequence< Any > aArguments( 1 );
         aArguments[ 0 ] <<= aPathArgument;
-        aArguments[ 1 ] <<= aModeArgument;
 
         try
         {
diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java
index 378ad9f3fa8d..c206a4014b3b 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.java
+++ b/wizards/com/sun/star/wizards/common/Configuration.java
@@ -48,7 +48,7 @@ public abstract class Configuration
 
         final String sView = updateable ? "com.sun.star.configuration.ConfigurationUpdateAccess" : "com.sun.star.configuration.ConfigurationAccess";
 
-        Object args[] = new Object[updateable ? 2 : 1];
+        Object args[] = new Object[1];
 
         PropertyValue aPathArgument = new PropertyValue();
         aPathArgument.Name = "nodepath";
@@ -56,16 +56,6 @@ public abstract class Configuration
 
         args[0] = aPathArgument;
 
-        if (updateable)
-        {
-
-            PropertyValue aModeArgument = new PropertyValue();
-            aModeArgument.Name = "lazywrite";
-            aModeArgument.Value = Boolean.FALSE;
-
-            args[1] = aModeArgument;
-        }
-
         return confMsf.createInstanceWithArguments(sView, args);
     }
 
diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py
index dbaf6ddc1766..95816ca6c071 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ b/wizards/com/sun/star/wizards/common/Configuration.py
@@ -33,15 +33,8 @@ class Configuration(object):
         aPathArgument.Value = sPath
 
         args.append(aPathArgument)
-        if updateable:
-            sView = "com.sun.star.configuration.ConfigurationUpdateAccess"
-            aModeArgument = uno.createUnoStruct(
-                'com.sun.star.beans.PropertyValue')
-            aModeArgument.Name = "lazywrite"
-            aModeArgument.Value = False
-            args.append(aModeArgument)
-        else:
-            sView = "com.sun.star.configuration.ConfigurationAccess"
+
+        sView = "com.sun.star.configuration.ConfigurationAccess"
 
         return oConfigProvider.createInstanceWithArguments(sView, tuple(args))
 


More information about the Libreoffice-commits mailing list