[Libreoffice-commits] core.git: Branch 'private/jmux/kde4-vcl-5-0-fix' - 122 commits - accessibility/inc basegfx/qa basegfx/source basic/source bean/com canvas/source chart2/source compilerplugins/clang config_host/config_dconf.h.in config_host.mk.in configmgr/CppunitTest_configmgr_unit.mk configmgr/Library_configmgr.mk configmgr/qa configmgr/source configure.ac connectivity/source cppuhelper/source cui/source dbaccess/source desktop/source distro-configs/LibreOfficeLinux.conf drawinglayer/source dtrans/source editeng/source extensions/source external/libcmis external/libxml2 external/libxslt filter/source forms/qa fpicker/source framework/source helpcontent2 i18nlangtag/qa i18npool/source icon-themes/galaxy idl/inc idl/source include/basegfx include/basic include/com include/drawinglayer include/editeng include/framework include/package include/rtl include/sal include/sfx2 include/svl include/svtools include/svx include/tools include/vcl instsetoo_native/CustomTarget_setup.mk libreofficekit/sour ce lotuswordpro/source odk/examples package/inc package/source qadevOOo/runner qadevOOo/tests readlicense_oo/license registry/inc reportbuilder/java RepositoryExternal.mk sal/osl sal/qa sal/rtl sc/inc scp2/source sc/qa scripting/source sc/source sdext/README sdext/source sd/qa sd/source sfx2/qa sfx2/source sfx2/uiconfig shell/source slideshow/qa solenv/gbuild sot/source stoc/source svl/source svtools/source svx/source sw/inc sw/qa sw/source tools/source ucb/source unoxml/source vcl/CppunitTest_vcl_lifecycle.mk vcl/generic vcl/headless vcl/inc vcl/opengl vcl/qa vcl/quartz vcl/source vcl/unx vcl/win winaccessibility/source wizards/com wizards/source writerfilter/source xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmloff/source xmlsecurity/source

Jan-Marek Glogowski glogow at fbihome.de
Wed Jul 8 06:58:18 PDT 2015


Rebased ref, commits from common ancestor:
commit dfe72b7c885e1e4db7cf90e05c8605716401ffd2
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Jul 8 13:41:54 2015 +0000

    tdf#92115 KDE4 workaround combo boxes
    
    Actually most combo boxes seem to be list boxes.
    
    Once I understand the correct subControl drawing, the button will be
    replaced. So this uses LO drop down drawing...
    
    Change-Id: I76c0c62b35158b20f5aabed1d97907063a99ccc7

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index a843269..cc320ae 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -100,7 +100,6 @@ bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
         case CTRL_EDITBOX:
         case CTRL_COMBOBOX:
         case CTRL_TOOLBAR:
-        case CTRL_LISTBOX:
         case CTRL_FRAME:
         case CTRL_SCROLLBAR:
         case CTRL_WINDOW_BACKGROUND:
@@ -108,6 +107,10 @@ bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
         case CTRL_FIXEDLINE:
             return true;
 
+        case CTRL_LISTBOX:
+            return (part == PART_ENTIRE_CONTROL
+                 || part == PART_SUB_EDIT);
+
         case CTRL_SPINBOX:
             return (part == PART_ENTIRE_CONTROL || part == HAS_BACKGROUND_TEXTURE);
 
@@ -643,6 +646,12 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
                                              const OUString&,
                                              Rectangle &nativeBoundingRegion, Rectangle &nativeContentRegion )
 {
+    bool nativeSupport = IsNativeControlSupported( type, part );
+    if( ! nativeSupport ) {
+        assert( ! nativeSupport && "drawNativeControl called without native support!" );
+        return false;
+    }
+
     bool retVal = false;
 
     QRect boundingRect = region2QRect( controlRegion );
@@ -724,8 +733,6 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
             {
                 case PART_ENTIRE_CONTROL:
                 {
-                    int size = QApplication::style()->pixelMetric(QStyle::PM_ComboBoxFrameWidth) - 2;
-
                     // find out the minimum size that should be used
                     // assume contents is a text ling
                     int nHeight = QApplication::fontMetrics().height();
@@ -738,8 +745,10 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
                     // FIXME: why this difference between comboboxes and listboxes ?
                     // because a combobox has a sub edit and that is positioned
                     // inside the outer bordered control ?
-                    if( type == CTRL_COMBOBOX )
+                    if( type == CTRL_COMBOBOX ) {
+                        int size = QApplication::style()->pixelMetric(QStyle::PM_ComboBoxFrameWidth) - 2;
                         contentRect.adjust(-size,-size,size,size);
+                    }
                     retVal = true;
                     break;
                 }
commit 7b3bb98517fdf626b31765fb7c925e63a6687327
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Jul 8 07:51:57 2015 +0000

    KDE4: cleanup IsNativeControlSupported
    
    Be (more) correct about the widgets and parts, we actually can draw
    natively in KDE4.
    
    Also add an assert, so drawNativeControl won't be called with values
    not supported by IsNativeControlSupported.
    
    Fixes tdf#92110
    Fixes tdf#91808
    
    Change-Id: Iac6c78194191a9cd059ace560c285263ce7c1045

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 1fa06fd..a843269 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -85,47 +85,38 @@ KDESalGraphics::~KDESalGraphics()
 
 bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
 {
-    if (type == CTRL_PUSHBUTTON) return true;
-
-    if (type == CTRL_MENUBAR) return true;
-
-    if (type == CTRL_MENU_POPUP) return true;
-
-    if (type == CTRL_EDITBOX) return true;
-
-    if (type == CTRL_COMBOBOX) return true;
-
-    if (type == CTRL_TOOLBAR) return true;
-
-    if (type == CTRL_CHECKBOX) return true;
-
-    if (type == CTRL_LISTBOX) return true;
-
-    if (type == CTRL_LISTNODE) return true;
-
-    if (type == CTRL_FRAME) return true;
-
-    if (type == CTRL_SCROLLBAR) return true;
-
-    if (type == CTRL_WINDOW_BACKGROUND) return true;
-
-    if (type == CTRL_SPINBOX && (part == PART_ENTIRE_CONTROL || part == HAS_BACKGROUND_TEXTURE) ) return true;
-
-    // no spinbuttons for KDE, paint spinbox complete
-    //if (type == CTRL_SPINBUTTONS) return true;
-
-    if (type == CTRL_GROUPBOX) return true;
-
-    if (type == CTRL_FIXEDLINE) return true;
+    switch (type)
+    {
+        case CTRL_PUSHBUTTON:
+        case CTRL_RADIOBUTTON:
+        case CTRL_CHECKBOX:
+        case CTRL_TOOLTIP:
+        case CTRL_PROGRESS:
+        case CTRL_LISTNODE:
+            return (part == PART_ENTIRE_CONTROL);
 
-    if (type == CTRL_TOOLTIP) return true;
+        case CTRL_MENUBAR:
+        case CTRL_MENU_POPUP:
+        case CTRL_EDITBOX:
+        case CTRL_COMBOBOX:
+        case CTRL_TOOLBAR:
+        case CTRL_LISTBOX:
+        case CTRL_FRAME:
+        case CTRL_SCROLLBAR:
+        case CTRL_WINDOW_BACKGROUND:
+        case CTRL_GROUPBOX:
+        case CTRL_FIXEDLINE:
+            return true;
 
-    if (type == CTRL_RADIOBUTTON) return true;
+        case CTRL_SPINBOX:
+            return (part == PART_ENTIRE_CONTROL || part == HAS_BACKGROUND_TEXTURE);
 
-    if (type == CTRL_SLIDER && (part == PART_TRACK_HORZ_AREA || part == PART_TRACK_VERT_AREA) )
-        return true;
+        case CTRL_SLIDER:
+            return (part == PART_TRACK_HORZ_AREA || part == PART_TRACK_VERT_AREA);
 
-    if ( (type == CTRL_PROGRESS) && (part == PART_ENTIRE_CONTROL) ) return true;
+        default:
+            break;
+    }
 
     return false;
 }
@@ -221,15 +212,15 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
                                         const ImplControlValue& value,
                                         const OUString& )
 {
-    if( lastPopupRect.isValid() && ( type != CTRL_MENU_POPUP || part != PART_MENU_ITEM ))
-        lastPopupRect = QRect();
-
-    // put not implemented types here
-    if (type == CTRL_SPINBUTTONS)
-    {
+    bool nativeSupport = IsNativeControlSupported( type, part );
+    if( ! nativeSupport ) {
+        assert( ! nativeSupport && "drawNativeControl called without native support!" );
         return false;
     }
 
+    if( lastPopupRect.isValid() && ( type != CTRL_MENU_POPUP || part != PART_MENU_ITEM ))
+        lastPopupRect = QRect();
+
     bool returnVal = true;
 
     QRect widgetRect = region2QRect(rControlRegion);
commit 6793eaa4fa77292b23e9b86221e598f438d45b8e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 14:23:55 2015 +0100

    coverity#1311335 Uncaught exception
    
    Change-Id: Idd654a49457c89598e45e0eb17336297b6745703

diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index f1cf9fc..2135014 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1066,7 +1066,7 @@ void lclIntersectRanges( ListOfScRange& rList, const uno::Any& rArg )
 uno::Reference< excel::XRange > lclCreateVbaRange(
         const uno::Reference< uno::XComponentContext >& rxContext,
         const uno::Reference< frame::XModel >& rxModel,
-        const ListOfScRange& rList ) throw (uno::RuntimeException)
+        const ListOfScRange& rList ) throw (uno::RuntimeException, std::exception)
 {
     ScDocShell* pDocShell = excel::getDocShell( rxModel );
     if( !pDocShell ) throw uno::RuntimeException();
commit 1e40c6459fd0dd64cd27c7b2ffc093045cdbe78d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 14:23:26 2015 +0100

    coverity#1311334 Uncaught exception
    
    Change-Id: I70c8fb0a30eb8185a5fe326d0ce11fcac7aa7e4f

diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index ea428c1..e471839 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -858,7 +858,7 @@ uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rA
 }
 
 uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
-        throw (lang::IllegalArgumentException, uno::RuntimeException)
+        throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
 {
     // it is possible to pass an existing VBA Range object
     uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index e9020b0..7a86674 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -57,7 +57,7 @@ private:
     /** Creates a VBA Worksheet object (the argument must contain a sheet index). */
     css::uno::Any createWorksheet( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
     /** Creates a VBA Range object (the argument must contain a UNO range or UNO range list). */
-    css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
     /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). */
     css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
     /** Creates a VBA Window object (the argument must contain a model controller). */
commit 856583492785d3c332f5ad4092a8196d590f930b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 14:22:29 2015 +0100

    coverity#1311333 Uncaught exception
    
    Change-Id: I692712d7a5a84efdec383c5d1ec7bd492a2e1aca

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index ef83fae..dc5b1f2 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1235,7 +1235,7 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRang
 }
 
 ScVbaRange*
-getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException )
+getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException, std::exception )
 {
     ScRangeList aCellRanges;
     ScRange refRange;
commit ca55180d74d9e6f40071f453c4b0280ae768e5a0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 14:21:20 2015 +0100

    coverity#1311332 Uncaught exception
    
    Change-Id: I96fbdb219fa59db54a7a2fc496e6d41f5d34385f

diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index c841469..ea428c1 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -886,7 +886,7 @@ uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs,
 }
 
 uno::Any ScVbaEventsHelper::createHyperlink( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
-        throw (lang::IllegalArgumentException, uno::RuntimeException)
+        throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
 {
     uno::Reference< table::XCell > xCell = getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
     uno::Sequence< uno::Any > aArgs( 2 );
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index 2ea89fb..e9020b0 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -59,7 +59,7 @@ private:
     /** Creates a VBA Range object (the argument must contain a UNO range or UNO range list). */
     css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
     /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). */
-    css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
     /** Creates a VBA Window object (the argument must contain a model controller). */
     css::uno::Any createWindow( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
 
commit 9c54c5c0b3ee934bffeb3bb52a84c08c09a0dcdc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 14:20:17 2015 +0100

    coverity#1311331 Uncaught exception
    
    Change-Id: Ic5a42560e30bac18c90f4008eb593357f3539ee1

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 50df307..ef83fae 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -4188,7 +4188,7 @@ ScVbaRange::getWorksheet() throw (uno::RuntimeException, std::exception)
 // #TODO remove this ugly application processing
 // Process an application Range request e.g. 'Range("a1,b2,a4:b6")
 uno::Reference< excel::XRange >
-ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException)
+ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException, std::exception)
 {
     // Although the documentation seems clear that Range without a
     // qualifier then it's a shortcut for ActiveSheet.Range
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 254a5bc..35faac7 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -287,7 +287,7 @@ public:
 //     * or a list of address ( multi-area )
 //     * object should be a lightweight as possible
 //     * we shouldn't need hacks like this below
-    static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
+    static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException, std::exception);
     static bool getCellRangesForAddress( sal_uInt16& rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 );
     virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue)
commit f596abe5b2ce4009e3339919292e74ba7c2dc4c0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 14:07:04 2015 +0100

    test-case for crash loading a page name field
    
    Change-Id: I5ef8fbf8b6711ca8950b5a0a210bc0c74ae1bd53

diff --git a/sd/qa/unit/data/odp/pass/test-slide-name-fields.odp b/sd/qa/unit/data/odp/pass/test-slide-name-fields.odp
new file mode 100644
index 0000000..3de53f9
Binary files /dev/null and b/sd/qa/unit/data/odp/pass/test-slide-name-fields.odp differ
commit a88bf8fd10c42a15e5d6e66da656889c82b4933a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 13:43:40 2015 +0100

    coverity#1308596 Uncaught exception
    
    Change-Id: I1a59d18546eab664d5148af544cd3657df2d5318

diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 055eb16..c42b9cd 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -263,7 +263,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) thro
 }
 
 uno::Reference< XHelperInterface >
-getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException )
+getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException, std::exception )
 {
     uno::Reference< container::XEnumerationAccess > xEnumAccess( xRanges, uno::UNO_QUERY_THROW );
     uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index e11c104..82ac810 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -51,7 +51,7 @@ css::uno::Reference< css::sheet::XUnnamedDatabaseRanges > GetUnnamedDataBaseRang
 
 css::uno::Reference< css::sheet::XDatabaseRange > GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( css::uno::RuntimeException );
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet ) throw ( css::uno::RuntimeException, std::exception );
-css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException, std::exception );
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException, std::exception );
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCell >& xCell ) throw ( css::uno::RuntimeException, std::exception );
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::frame::XModel >& xModel, SCTAB nTab ) throw ( css::uno::RuntimeException, std::exception );
commit cc97d4ff08d65a96121296836629f39d7c0bf0e8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 13:37:29 2015 +0100

    coverity#1311336 Uninitialized scalar field
    
    Change-Id: I112e57bd6938d601e01dcd1f8b318db73a43b00c

diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 38941bb..2d74ce2 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -65,6 +65,7 @@ struct UserData
     explicit UserData( OUString const & rPropertyPath )
         : bIsPropertyPath( true )
         , sPropertyPath(rPropertyPath)
+        , aLineage(0)
     {}
 
     explicit UserData( Reference<XNameAccess> const & rXNameAccess, int rIndex = 0 )
commit 57e5bf760fa84ec84abd3a93e1623aa045d410e1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 12:32:10 2015 +0100

    when skipping hidden pages to pdf adjust dest page indexes
    
    when setting the page bookmarks.
    
    three slides, set second to hidden, export to pdf (without toggling
    on include hidden slides), in evince/acroread click on the "slide 3"
    title, and the viewers will not jump to that slide, seeing as the
    index is mis-calculated assuming 1-1 export-import pages
    
    Change-Id: I5784100c2444ca480984914e67c8b7e376a2ec47

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index dd71a82..04c61c1 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1855,6 +1855,25 @@ bool ImplRenderPaintProc::IsPrintable( const SdrObject* pObj ) const
     return bPrintable;
 
 }
+
+namespace
+{
+    sal_Int16 CalcOutputPageNum(vcl::PDFExtOutDevData* pPDFExtOutDevData, SdDrawDocument *pDoc, sal_Int16 nPageNumber)
+    {
+        //export all pages, simple one to one case
+        if (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides())
+            return nPageNumber-1;
+        //check all preceding pages, and only count non-hidden ones
+        sal_Int16 nRet = 0;
+        for (sal_Int16 i = 0; i < nPageNumber-1; ++i)
+        {
+           if (!(pDoc->GetSdPage(i, PK_STANDARD))->IsExcluded())
+                ++nRet;
+        }
+        return nRet;
+    }
+}
+
 void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& rSelection,
                                           const uno::Sequence< beans::PropertyValue >& rxOptions )
     throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
@@ -2139,9 +2158,12 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
                                 OUString aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName();
                                 if( !aPageName.isEmpty() )
                                 {
+                                    // Destination PageNum
+                                    const sal_Int32 nDestPageNum = CalcOutputPageNum(pPDFExtOutDevData, mpDoc, nPageNumber);
+
                                     // insert the bookmark to this page into the NamedDestinations
                                     if( pPDFExtOutDevData->GetIsExportNamedDestinations() )
-                                        pPDFExtOutDevData->CreateNamedDest( aPageName, aPageRect,  nPageNumber - 1 );
+                                        pPDFExtOutDevData->CreateNamedDest(aPageName, aPageRect, nDestPageNum);
 
                                     // add the name to the outline, (almost) same code as in sc/source/ui/unoobj/docuno.cxx
                                     // issue #i40318.
@@ -2150,7 +2172,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
                                     {
                                         // Destination Export
                                         const sal_Int32 nDestId =
-                                            pPDFExtOutDevData->CreateDest( aPageRect , nPageNumber - 1 );
+                                            pPDFExtOutDevData->CreateDest(aPageRect , nDestPageNum);
 
                                         // Create a new outline item:
                                         pPDFExtOutDevData->CreateOutlineItem( -1 , aPageName, nDestId );
commit 3e8cb7da52e84b03b309b68708889fc42789b722
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jul 8 21:51:05 2015 +0900

    Fix typo
    
    Change-Id: Iec20cfa243e336d36e12e13d36564eacc9db1435

diff --git a/sdext/README b/sdext/README
index ed9aa33..b43d62b 100644
--- a/sdext/README
+++ b/sdext/README
@@ -5,7 +5,7 @@ source/pdfimport/ - PDF import
 	Uses an external poppler process to parse and handle PDF
 	import as draw shapes.
 
-source/minimizer/ - Presentation Minizer
+source/minimizer/ - Presentation Minimizer
 
 	Shrinks presentations by down-scaling images, and removing
 	extraneous eg. embedded OLE content.
commit f3c687a87c4c238286c35adcec54592c2e8cdffa
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Wed Jul 8 14:44:09 2015 +0200

    tdf#90351: server response does not always contain cmis:baseTypeId
    
    So if we know which object we just created, don't rely on the server
    response to tell us. Improvement on the fix from
    5c10e8cd0eedefc2dcc905154c4daa142561aef3.
    
    Change-Id: Iddf706fb3b8bef38217a406c806963ba4496c7c9

diff --git a/external/libcmis/tdf90351.patch b/external/libcmis/tdf90351.patch
index fe0e5c5..65d630a 100644
--- a/external/libcmis/tdf90351.patch
+++ b/external/libcmis/tdf90351.patch
@@ -1,10 +1,109 @@
+From 2b85882048847a3d2076a8ac0ed63d905aeea1dd Mon Sep 17 00:00:00 2001
+From: Thorsten Behrens <Thorsten.Behrens at CIB.de>
+Date: Wed, 8 Jul 2015 14:26:01 +0200
+Subject: [PATCH] tdf#90351: response does not always contain cmis:baseTypeId
+
+So if we know which object we just created, don't rely on the server
+response to tell us.
+---
+ src/libcmis/atom-document.cxx | 4 ++--
+ src/libcmis/atom-folder.cxx   | 4 ++--
+ src/libcmis/atom-session.cxx  | 6 +++---
+ src/libcmis/atom-session.hxx  | 3 ++-
+ 4 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/src/libcmis/atom-document.cxx b/src/libcmis/atom-document.cxx
+index b7f28b3..49cfd45 100644
+--- src/libcmis/atom-document.cxx
++++ src/libcmis/atom-document.cxx
+@@ -280,7 +280,7 @@ libcmis::DocumentPtr AtomDocument::checkOut( ) throw ( libcmis::Exception )
+     if ( NULL == doc )
+         throw libcmis::Exception( "Failed to parse object infos" );
+ 
+-    libcmis::ObjectPtr created = getSession( )->createObjectFromEntryDoc( doc );
++    libcmis::ObjectPtr created = getSession( )->createObjectFromEntryDoc( doc, AtomPubSession::RESULT_DOCUMENT );
+     xmlFreeDoc( doc );
+ 
+     libcmis::DocumentPtr pwc = boost::dynamic_pointer_cast< libcmis::Document >( created );
+@@ -377,7 +377,7 @@ libcmis::DocumentPtr AtomDocument::checkIn( bool isMajor, string comment,
+         throw libcmis::Exception( "Failed to parse object infos" );
+ 
+ 
+-    libcmis::ObjectPtr newVersion = getSession( )->createObjectFromEntryDoc( doc );
++    libcmis::ObjectPtr newVersion = getSession( )->createObjectFromEntryDoc( doc, AtomPubSession::RESULT_DOCUMENT );
+ 
+     if ( newVersion->getId( ) == getId( ) )
+         refreshImpl( doc );
+diff --git a/src/libcmis/atom-folder.cxx b/src/libcmis/atom-folder.cxx
+index 7947883..55ac2a9 100644
+--- src/libcmis/atom-folder.cxx
++++ src/libcmis/atom-folder.cxx
+@@ -170,7 +170,7 @@ libcmis::FolderPtr AtomFolder::createFolder( const PropertyPtrMap& properties )
+     if ( NULL == doc )
+         throw libcmis::Exception( "Failed to parse object infos" );
+ 
+-    libcmis::ObjectPtr created = getSession( )->createObjectFromEntryDoc( doc );
++    libcmis::ObjectPtr created = getSession( )->createObjectFromEntryDoc( doc, AtomPubSession::RESULT_FOLDER );
+     xmlFreeDoc( doc );
+ 
+     libcmis::FolderPtr newFolder = boost::dynamic_pointer_cast< libcmis::Folder >( created );
+@@ -244,7 +244,7 @@ libcmis::DocumentPtr AtomFolder::createDocument( const PropertyPtrMap& propertie
+             throw libcmis::Exception( "Missing expected response from server" );
+     }
+ 
+-    libcmis::ObjectPtr created = getSession( )->createObjectFromEntryDoc( doc );
++    libcmis::ObjectPtr created = getSession( )->createObjectFromEntryDoc( doc, AtomPubSession::RESULT_DOCUMENT );
+     xmlFreeDoc( doc );
+ 
+     libcmis::DocumentPtr newDocument = boost::dynamic_pointer_cast< libcmis::Document >( created );
+diff --git a/src/libcmis/atom-session.cxx b/src/libcmis/atom-session.cxx
+index ffa93a7..e470884 100644
 --- src/libcmis/atom-session.cxx
 +++ src/libcmis/atom-session.cxx
-@@ -233,6 +233,7 @@ libcmis::ObjectPtr AtomPubSession::createObjectFromEntryDoc( xmlDocPtr doc )
-                 else
+@@ -201,7 +201,7 @@ bool AtomPubSession::setRepository( string repositoryId )
+     return found;
+ }
+ 
+-libcmis::ObjectPtr AtomPubSession::createObjectFromEntryDoc( xmlDocPtr doc )
++libcmis::ObjectPtr AtomPubSession::createObjectFromEntryDoc( xmlDocPtr doc, ResultObjectType res )
+ {
+     libcmis::ObjectPtr cmisObject;
+ 
+@@ -222,11 +222,11 @@ libcmis::ObjectPtr AtomPubSession::createObjectFromEntryDoc( xmlDocPtr doc )
+                 string baseType = libcmis::getXPathValue( xpathCtx, baseTypeReq );
+ 
+                 xmlNodePtr node = xpathObj->nodesetval->nodeTab[0];
+-                if ( baseType == "cmis:folder" )
++                if ( res == RESULT_FOLDER || baseType == "cmis:folder" )
                  {
-                     // Not a valid CMIS atom entry... weird
-+                    cmisObject.reset( new AtomDocument( this, node ) );
+                     cmisObject.reset( new AtomFolder( this, node ) );
                  }
-             }
-             xmlXPathFreeObject( xpathObj );
+-                else if ( baseType == "cmis:document" )
++                else if ( res == RESULT_DOCUMENT || baseType == "cmis:document" )
+                 {
+                     cmisObject.reset( new AtomDocument( this, node ) );
+                 }
+diff --git a/src/libcmis/atom-session.hxx b/src/libcmis/atom-session.hxx
+index c887b6d..953aa17 100644
+--- src/libcmis/atom-session.hxx
++++ src/libcmis/atom-session.hxx
+@@ -37,6 +37,7 @@ class AtomPubSession : public BaseSession
+         AtomRepositoryPtr m_repository;
+ 
+     public:
++        enum ResultObjectType { RESULT_DYNAMIC, RESULT_FOLDER, RESULT_DOCUMENT };
+         AtomPubSession( std::string sAtomPubUrl, std::string repositoryId,
+                         std::string username, std::string password, bool noSslCheck = false,
+                         libcmis::OAuth2DataPtr oauth2 = libcmis::OAuth2DataPtr(),
+@@ -58,7 +59,7 @@ class AtomPubSession : public BaseSession
+ 
+         // Utility methods
+ 
+-        libcmis::ObjectPtr createObjectFromEntryDoc( xmlDocPtr doc );
++        libcmis::ObjectPtr createObjectFromEntryDoc( xmlDocPtr doc, ResultObjectType res=RESULT_DYNAMIC );
+ 
+         std::vector< libcmis::ObjectTypePtr > getChildrenTypes( std::string url )
+             throw ( libcmis::Exception );
+-- 
+2.1.4
+
commit f0c4130746e7b61029ce90f24e69a3203b547e54
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 8 14:30:27 2015 +0200

    Use OUString::starts/endsWith
    
    Change-Id: I88effbf6f88dfb286f85f8fbd06bab8033aca6b0

diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 9f061ae..e6b9110 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1972,12 +1972,9 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                             continue;
 
                         // Ist es eine get-Methode?
-                        OUString aStartStr = aMethName.copy( 0, 3 );
-                        if( aStartStr == "get" )
+                        OUString aPropName;
+                        if( aMethName.startsWith("get", &aPropName) )
                         {
-                            // Namen der potentiellen Property
-                            OUString aPropName = aMethName.copy( 3 );
-
                             // get-Methode darf keinen Parameter haben
                             Sequence< Reference<XIdlClass> > getParams = rxMethod_i->getParameterTypes();
                             if( getParams.getLength() > 0 )
@@ -2044,13 +2041,9 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
 
                                 // Name holen und auswerten
                                 OUString aMethName2 = rxMethod_k->getName();
-                                OUString aStartStr2 = aMethName2.copy( 0, 3 );
-                                if( aStartStr2 != "set" )
-                                    continue;
-
-                                // Ist es denn der gleiche Name?
-                                OUString aPropName2 = aMethName2.copy( 3 );
-                                if( aPropName != aPropName2 )
+                                OUString aPropName2;
+                                if (!(aMethName2.startsWith("set", &aPropName2)
+                                      && aPropName2 == aPropName))
                                     continue;
 
                                 // set-Methode muss void returnen
@@ -2092,22 +2085,13 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                         }
 
                         // Ist es eine addListener-Methode?
-                        else if( aStartStr == "add" )
+                        else if( aMethName.startsWith("add", &aPropName) )
                         {
-                            OUString aListenerStr( "Listener" );
-
-                            // Namen der potentiellen Property
-                            sal_Int32 nStrLen = aMethName.getLength();
-                            sal_Int32 nCopyLen = nStrLen - aListenerStr.getLength();
-                            OUString aEndStr = aMethName.copy( nCopyLen > 0 ? nCopyLen : 0 );
-
                             // Endet das Teil auf Listener?
-                            if( aEndStr != aListenerStr )
+                            OUString aListenerName;
+                            if( !aPropName.endsWith("Listener", &aListenerName) )
                                 continue;
 
-                            // Welcher Listener?
-                            OUString aListenerName = aMethName.copy( 3, nStrLen - aListenerStr.getLength() - 3 );
-
                             // TODO: Hier koennten noch genauere Pruefungen vorgenommen werden
                             // - Rueckgabe-Typ
                             // - Anzahl und Art der Parameter
@@ -2126,19 +2110,12 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
 
                                 // Name holen und auswerten
                                 OUString aMethName2 = rxMethod_k->getName();
-                                sal_Int32 nNameLen = aMethName2.getLength();
-                                sal_Int32 nCopyLen2 = (nNameLen < 6) ? nNameLen : 6;
-                                OUString aStartStr2 = aMethName2.copy( 0, nCopyLen2 );
-                                OUString aRemoveStr("remove" );
-                                if( aStartStr2 != aRemoveStr )
-                                    continue;
-
-                                // Ist es denn der gleiche Listener?
-                                if( aMethName2.getLength() - aRemoveStr.getLength() <= aListenerStr.getLength() )
-                                    continue;
-                                OUString aListenerName2 = aMethName2.copy
-                                      ( 6, aMethName2.getLength() - aRemoveStr.getLength() - aListenerStr.getLength() );
-                                if( aListenerName != aListenerName2 )
+                                OUString aListenerName2;
+                                if (!(aMethName2.startsWith(
+                                          "remove", &aPropName)
+                                      && aPropName.endsWith(
+                                          "Listener", &aListenerName2)
+                                      && aListenerName2 == aListenerName))
                                     continue;
 
                                 // TODO: Hier koennten noch genauere Pruefungen vorgenommen werden
@@ -2177,12 +2154,9 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                             continue;
 
                         // Ist es eine set-Methode ohne zugehoerige get-Methode?
-                        OUString aStartStr = aMethName.copy( 0, 3 );
-                        if( aStartStr == "set" )
+                        OUString aPropName;
+                        if( aMethName.startsWith("set", &aPropName) )
                         {
-                            // Namen der potentiellen Property
-                            OUString aPropName = aMethName.copy( 3 );
-
                             // set-Methode muss void returnen
                             Reference<XIdlClass> xSetRetType = rxMethod_i->getReturnType();
                             if( xSetRetType->getTypeClass() != TypeClass_VOID )
commit 4ec7f1d7a82e13532b07acb5da6bb17cfd550ee2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 8 12:28:53 2015 +0200

    Whatever that "SDL-Bug" was supposed to be, it is clearly irrelevant by now
    
    Change-Id: Iaa3482e0895b1ccb1f1743893d64ae1941f3f396

diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index d5e3235..9f061ae 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -2045,14 +2045,12 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                                 // Name holen und auswerten
                                 OUString aMethName2 = rxMethod_k->getName();
                                 OUString aStartStr2 = aMethName2.copy( 0, 3 );
-                                // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
-                                if( !( aStartStr2 == "set" ) )
+                                if( aStartStr2 != "set" )
                                     continue;
 
                                 // Ist es denn der gleiche Name?
                                 OUString aPropName2 = aMethName2.copy( 3 );
-                                // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
-                                if( !( aPropName == aPropName2 ) )
+                                if( aPropName != aPropName2 )
                                     continue;
 
                                 // set-Methode muss void returnen
@@ -2104,8 +2102,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                             OUString aEndStr = aMethName.copy( nCopyLen > 0 ? nCopyLen : 0 );
 
                             // Endet das Teil auf Listener?
-                            // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
-                            if( !( aEndStr == aListenerStr ) )
+                            if( aEndStr != aListenerStr )
                                 continue;
 
                             // Welcher Listener?
@@ -2133,8 +2130,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                                 sal_Int32 nCopyLen2 = (nNameLen < 6) ? nNameLen : 6;
                                 OUString aStartStr2 = aMethName2.copy( 0, nCopyLen2 );
                                 OUString aRemoveStr("remove" );
-                                // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
-                                if( !( aStartStr2 == aRemoveStr ) )
+                                if( aStartStr2 != aRemoveStr )
                                     continue;
 
                                 // Ist es denn der gleiche Listener?
@@ -2142,8 +2138,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                                     continue;
                                 OUString aListenerName2 = aMethName2.copy
                                       ( 6, aMethName2.getLength() - aRemoveStr.getLength() - aListenerStr.getLength() );
-                                // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
-                                if( !( aListenerName == aListenerName2 ) )
+                                if( aListenerName != aListenerName2 )
                                     continue;
 
                                 // TODO: Hier koennten noch genauere Pruefungen vorgenommen werden
commit 1290ec321ccff4aeb5f9e3f7d12d84c72f128a04
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 8 12:09:29 2015 +0200

    Reduce variable scope
    
    Change-Id: Ia9e427dfbd6e7f87087f5df334ec68acbcdfc624

diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index ca8d99a..d5e3235 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1906,9 +1906,6 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                         pLocalMethodConcepts[ i ] = 0;
                     }
 
-                    OUString aMethName;
-                    OUString aPropName;
-                    OUString aStartStr;
                     for( i = 0 ; i < nSourceMethodCount ; i++ )
                     {
                         // Methode ansprechen
@@ -1916,7 +1913,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                         sal_Int32& rMethodConcept_i = pLocalMethodConcepts[ i ];
 
                         // Namen besorgen
-                        aMethName = rxMethod_i->getName();
+                        OUString aMethName = rxMethod_i->getName();
 
                         // Methoden katalogisieren
                         // Alle (?) Methoden von XInterface filtern, damit z.B. nicht
@@ -1975,11 +1972,11 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                             continue;
 
                         // Ist es eine get-Methode?
-                        aStartStr = aMethName.copy( 0, 3 );
+                        OUString aStartStr = aMethName.copy( 0, 3 );
                         if( aStartStr == "get" )
                         {
                             // Namen der potentiellen Property
-                            aPropName = aMethName.copy( 3 );
+                            OUString aPropName = aMethName.copy( 3 );
 
                             // get-Methode darf keinen Parameter haben
                             Sequence< Reference<XIdlClass> > getParams = rxMethod_i->getParameterTypes();
@@ -2178,18 +2175,18 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
                             continue;
 
                         // Namen besorgen
-                        aMethName = rxMethod_i->getName();
+                        OUString aMethName = rxMethod_i->getName();
 
                         // Wenn der Name zu kurz ist, wird's sowieso nichts
                         if( aMethName.getLength() <= 3 )
                             continue;
 
                         // Ist es eine set-Methode ohne zugehoerige get-Methode?
-                        aStartStr = aMethName.copy( 0, 3 );
+                        OUString aStartStr = aMethName.copy( 0, 3 );
                         if( aStartStr == "set" )
                         {
                             // Namen der potentiellen Property
-                            aPropName = aMethName.copy( 3 );
+                            OUString aPropName = aMethName.copy( 3 );
 
                             // set-Methode muss void returnen
                             Reference<XIdlClass> xSetRetType = rxMethod_i->getReturnType();
commit 5c10e8cd0eedefc2dcc905154c4daa142561aef3
Author: Andras Timar <andras.timar at collabora.com>
Date:   Wed Jul 8 14:16:55 2015 +0200

    tdf#90351 libcmis: prevent crash
    
    Change-Id: I2d9673bb261a2586e1802f025c900962249cfc42
    Reviewed-on: https://gerrit.libreoffice.org/16854
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk
index 16d4400..b4b596b 100644
--- a/external/libcmis/UnpackedTarball_cmis.mk
+++ b/external/libcmis/UnpackedTarball_cmis.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
 						external/libcmis/libcmis-libxml2_compatibility.patch \
+						external/libcmis/tdf90351.patch \
 ))
 
 ifeq ($(OS)$(COM),WNTMSC)
diff --git a/external/libcmis/tdf90351.patch b/external/libcmis/tdf90351.patch
new file mode 100644
index 0000000..fe0e5c5
--- /dev/null
+++ b/external/libcmis/tdf90351.patch
@@ -0,0 +1,10 @@
+--- src/libcmis/atom-session.cxx
++++ src/libcmis/atom-session.cxx
+@@ -233,6 +233,7 @@ libcmis::ObjectPtr AtomPubSession::createObjectFromEntryDoc( xmlDocPtr doc )
+                 else
+                 {
+                     // Not a valid CMIS atom entry... weird
++                    cmisObject.reset( new AtomDocument( this, node ) );
+                 }
+             }
+             xmlXPathFreeObject( xpathObj );
commit ecc617e797aa5ed329668114e54ec7ffa5c0e87b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 8 11:20:19 2015 +0200

    configmgr: support reading from a dconf layer (WIP)
    
    Work in progress to allow integration of LO with
    <https://wiki.gnome.org/Projects/FleetCommander>.
    
    During configuration, dconf support is implicitly enabled when available on the
    host (which is presumably only available on Linux).  It is explicitly disabled
    for TDF Linux builds for now, though, to avoid accidental dependencies of the
    distributed installation sets on system dconf libraries.
    
    A dconf layer is represented in the CONFIGURATION_LAYERS bootstrap variable with
    type "dconf" and an empty URL.  See the comment at the top of
    configmgr/source/readdconflayer.cxx for the encoding of component-data in dconf.
    
    All of this is still subject to change.
    
    Change-Id: I2d08d81c8ea43ba4a99040a8882ae75b91bcfdb9
    Reviewed-on: https://gerrit.libreoffice.org/16848
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a0a0d61..75f033f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3584,6 +3584,11 @@ endif # ENABLE_COLLADA
 
 endif # ENABLE_GLTF
 
+define gb_LinkTarget__use_dconf
+$(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
+$(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
+endef
+
 ### Jars ############################################################
 
 ifneq ($(SYSTEM_HSQLDB),)
diff --git a/config_host.mk.in b/config_host.mk.in
index 1d0702b..2a20b8b 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -91,6 +91,8 @@ export DBUSMENUGTK_CFLAGS=$(gb_SPACE)@DBUSMENUGTK_CFLAGS@
 export DBUSMENUGTK_LIBS=$(gb_SPACE)@DBUSMENUGTK_LIBS@
 export DBUS_CFLAGS=$(gb_SPACE)@DBUS_CFLAGS@
 export DBUS_LIBS=$(gb_SPACE)@DBUS_LIBS@
+export DCONF_CFLAGS=@DCONF_CFLAGS@
+export DCONF_LIBS=@DCONF_LIBS@
 export DEFAULT_BRAND_IMAGES=@DEFAULT_BRAND_IMAGES@
 export DIAGRAM_EXTENSION_PACK=@DIAGRAM_EXTENSION_PACK@
 export DICT_SYSTEM_DIR=@DICT_SYSTEM_DIR@
@@ -122,6 +124,7 @@ export ENABLE_CUPS=@ENABLE_CUPS@
 export ENABLE_CURL=@ENABLE_CURL@
 export ENABLE_DBGUTIL=@ENABLE_DBGUTIL@
 export ENABLE_DBUS=@ENABLE_DBUS@
+export ENABLE_DCONF=@ENABLE_DCONF@
 export ENABLE_DEBUG=@ENABLE_DEBUG@
 export ENABLE_DEBUGINFO_FOR=@ENABLE_DEBUGINFO_FOR@
 export ENABLE_DIRECTX=@ENABLE_DIRECTX@
diff --git a/config_host/config_dconf.h.in b/config_host/config_dconf.h.in
new file mode 100644
index 0000000..09608c4
--- /dev/null
+++ b/config_host/config_dconf.h.in
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CONFIG_DCONF_H
+#define INCLUDED_CONFIG_DCONF_H
+
+#define ENABLE_DCONF 0
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/CppunitTest_configmgr_unit.mk b/configmgr/CppunitTest_configmgr_unit.mk
index 1672c9f..e8bddc2 100644
--- a/configmgr/CppunitTest_configmgr_unit.mk
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -49,5 +49,6 @@ $(eval $(call gb_CppunitTest_use_components,configmgr_unit,\
 
 $(eval $(call gb_CppunitTest_use_externals,configmgr_unit,\
     boost_headers \
+    dconf \
     icu_headers \
 ))
diff --git a/configmgr/Library_configmgr.mk b/configmgr/Library_configmgr.mk
index 528b150..36c316a 100644
--- a/configmgr/Library_configmgr.mk
+++ b/configmgr/Library_configmgr.mk
@@ -38,15 +38,19 @@ $(eval $(call gb_Library_add_exception_objects,configmgr, \
     configmgr/source/type \
     configmgr/source/update \
     configmgr/source/valueparser \
-    $(if $(filter $(OS),WNT), configmgr/source/winreg ) \
     configmgr/source/writemodfile \
     configmgr/source/xcdparser \
     configmgr/source/xcsparser \
     configmgr/source/xcuparser \
     configmgr/source/xmldata \
+    $(if $(ENABLE_DCONF),configmgr/source/readdconflayer) \
+    $(if $(filter $(OS),WNT),configmgr/source/winreg) \
 ))
 
-$(eval $(call gb_Library_use_external,configmgr,boost_headers))
+$(eval $(call gb_Library_use_externals,configmgr, \
+    boost_headers \
+    dconf \
+))
 
 $(eval $(call gb_Library_use_sdk_api,configmgr))
 
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index dc0c4be..4b1eaea 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -36,6 +36,7 @@
 #include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/uno/XInterface.hpp>
+#include <config_dconf.h>
 #include <config_folders.h>
 #include <osl/conditn.hxx>
 #include <osl/file.hxx>
@@ -64,6 +65,10 @@
 #include "xcuparser.hxx"
 #include "xcsparser.hxx"
 
+#if ENABLE_DCONF
+#include <readdconflayer.hxx>
+#endif
+
 #if defined WNT
 #include "winreg.hxx"
 #endif
@@ -522,6 +527,15 @@ Components::Components(
             parseResLayer(layer, url);
             SAL_INFO("configmgr", "parseResLayer() took " << (osl_getGlobalTimer() - nStartTime) << " ms");
             ++layer; //TODO: overflow
+#if ENABLE_DCONF
+        } else if (type == "dconf") {
+            if (!url.isEmpty()) {
+                throw css::uno::RuntimeException(
+                    "CONFIGURATION_LAYERS: non-empty \"dconf\" URL");
+            }
+            readDconfLayer(data_, layer);
+            ++layer; //TODO: overflow
+#endif
 #if defined WNT
         } else if (type == "winreg") {
             if (!url.isEmpty()) {
diff --git a/configmgr/source/readdconflayer.cxx b/configmgr/source/readdconflayer.cxx
new file mode 100644
index 0000000..62e6a65
--- /dev/null
+++ b/configmgr/source/readdconflayer.cxx
@@ -0,0 +1,931 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <cassert>
+#include <cstddef>
+#include <cstring>
+#include <limits>
+#include <type_traits>
+
+#include <dconf/dconf.h>
+
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <data.hxx>
+#include <groupnode.hxx>
+#include <localizedpropertynode.hxx>
+#include <localizedvaluenode.hxx>
+#include <nodemap.hxx>
+#include <propertynode.hxx>
+#include <readdconflayer.hxx>
+#include <setnode.hxx>
+
+// component-data is encoded in dconf as follows:
+//
+// * The node hierarchy (starting at component nodes with names like
+//   "org.openoffice.Setup") maps to dconf paths underneath
+//   "/org/libreoffice/registry/".
+//
+// * Component, group, set, and localized property nodes map to dconf dirs
+//   (except for removal of set elements, see below), while property and
+//   localized value nodes map to dconf keys.
+//
+// * The names of nodes that are not set elements are used directly as dconf
+//   path segments.  (The syntax for node names is any non-empty sequences of
+//   any Unicode scalar values except U+0000--0008, U+000B--000C, U+000E--001F,
+//   U+002F SOLIDUS, and U+FFFE--FFFF.  TODO: "<aruiz> sberg, in general I think
+//   it'd be nice if you used path separators instead of dots though, they have
+//   meaning in dconf/gvdb world :-)"?)
+//
+// * Set element "fuse" and "replace" operations are encoded as dconf path
+//   segments as concatenations
+//
+//     N ; T ; O
+//
+//   where ";" represents U+003B SEMICOLON; N is an encoding of the node name,
+//   where each occurrence of U+003B SEMICOLON is replaced by the three
+//   characters "\3B" and each ocurrence of U+005C REVERSE SOLIDUS is replaced
+//   by the three characters "\5C"; T is an encoding of the full template name,
+//   where each occurrence of U+002F SOLIDUS is replaced by the three characters
+//   "\2F", each occurrence of U+003B SEMICOLON is replaced by the three
+//   characters "\3B", and each ocurrence of U+005C REVERSE SOLIDUS is replaced
+//   by the three characters "\5C"; and O is "fuse" or "replace", respectively.
+//
+// * Set element and property "remove" operations are encoded as dconf key path
+//   segments directly using the node name, and the associated value being a
+//   GVariant of empty tuple type.
+//
+// * Property and localized property value "fuse" operations map to GVariant
+//   instances as follows:
+//
+// ** Non-nillable boolean values map to GVariant boolean instances.
+//
+// ** Non-nillable short values map to GVariant int16 instances.
+//
+// ** Non-nillable int values map to GVariant int32 instances.
+//
+// ** Non-nillable long values map to GVariant int64 instances.
+//
+// ** Non-nillable double values map to GVariant double instances.
+//
+// ** Non-nillable string values map to GVariant string instances, with the
+//    following encoding: each occurrence of U+0000 NULL is replace by the three
+//    characters "\00" and each occurrence of U+005C REVERSE SOLIDUS is replaced
+//    by the three characters "\5C".
+//
+// ** Non-nillable hexbinary values map to GVariant byte array instances.
+//
+// ** Non-nillable list values recursively map to GVariant array instances.
+//
+// ** Nillable values recursively map to GVariant maybe instances.
+//
+// TODO: support "finalized", "mandatory", and "external"?
+
+namespace configmgr {
+
+namespace {
+
+template<typename T> class GObjectHolder {
+public:
+    explicit GObjectHolder(T * object): object_(object) {}
+
+    ~GObjectHolder() {
+        if (object_ != nullptr) {
+            g_object_unref(object_);
+        }
+    }
+
+    T * get() const { return object_; }
+
+private:
+    GObjectHolder(GObjectHolder &) = delete;
+    void operator =(GObjectHolder) = delete;
+
+    T * object_;
+};
+
+class GVariantHolder {
+public:
+    explicit GVariantHolder(GVariant * variant): variant_(variant) {}
+
+    ~GVariantHolder() { unref(); }
+
+    void reset(GVariant * variant) {
+        unref();
+        variant_ = variant;
+    }
+
+    GVariant * get() const { return variant_; }
+
+private:
+    GVariantHolder(GVariantHolder &) = delete;
+    void operator =(GVariantHolder) = delete;
+
+    void unref() {
+        if (variant_ != nullptr) {
+            g_variant_unref(variant_);
+        }
+    }
+
+    GVariant * variant_;
+};
+
+class StringArrayHolder {
+public:
+    explicit StringArrayHolder(gchar ** array): array_(array) {}
+
+    ~StringArrayHolder() { g_strfreev(array_); }
+
+    gchar ** get() const { return array_; }
+
+private:
+    StringArrayHolder(StringArrayHolder &) = delete;
+    void operator =(StringArrayHolder) = delete;
+
+    gchar ** array_;
+};
+
+bool decode(OUString * string, bool nul, bool slash, bool semicolon) {
+    for (sal_Int32 i = 0;; ++i) {
+        i = string->indexOf('\\', i);
+        if (i == -1) {
+            return true;
+        }
+        if (nul && string->match("00", i + 1)) {
+            *string = string->replaceAt(i, 3, OUString(sal_Unicode(0)));
+        } else if (slash && string->match("2F", i + 1)) {
+            *string = string->replaceAt(i, 3, "/");
+        } else if (semicolon && string->match("3B", i + 1)) {
+            *string = string->replaceAt(i, 3, ";");
+        } else if (string->match("5C", i + 1)) {
+            *string = string->replaceAt(i + 1, 2, "");
+        } else {
+            SAL_WARN("configmgr.dconf", "bad escape in " << *string);
+            return false;
+        }
+    }
+}
+
+bool getBoolean(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (!g_variant_is_of_type(variant.get(), G_VARIANT_TYPE_BOOLEAN)) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match boolean property");
+        return false;
+    }
+    *value <<= bool(g_variant_get_boolean(variant.get()));
+    return true;
+}
+
+bool getShort(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (!g_variant_is_of_type(variant.get(), G_VARIANT_TYPE_INT16)) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match short property");
+        return false;
+    }
+    *value <<= sal_Int16(g_variant_get_int16(variant.get()));
+    return true;
+}
+
+bool getInt(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (!g_variant_is_of_type(variant.get(), G_VARIANT_TYPE_INT32)) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match int property");
+        return false;
+    }
+    *value <<= sal_Int32(g_variant_get_int32(variant.get()));
+    return true;
+}
+
+bool getLong(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (!g_variant_is_of_type(variant.get(), G_VARIANT_TYPE_INT64)) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match long property");
+        return false;
+    }
+    *value <<= sal_Int64(g_variant_get_int64(variant.get()));
+    return true;
+}
+
+bool getDouble(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (!g_variant_is_of_type(variant.get(), G_VARIANT_TYPE_DOUBLE)) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match double property");
+        return false;
+    }
+    *value <<= double(g_variant_get_double(variant.get()));
+    return true;
+}
+
+bool getStringValue(
+    OString const & key, GVariantHolder const & variant, OUString * value)
+{
+    assert(value != nullptr);
+    if (!g_variant_is_of_type(variant.get(), G_VARIANT_TYPE_STRING)) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match string property");
+        return false;
+    }
+    gsize n;
+    char const * p = g_variant_get_string(variant.get(), &n);
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long string value for key " << key);
+        return false;
+    }
+    if (!rtl_convertStringToUString(
+            &value->pData, p, static_cast<sal_Int32>(n), RTL_TEXTENCODING_UTF8,
+            (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+             | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+             | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
+    {
+        SAL_WARN("configmgr.dconf", "non--UTF-8 string value for key " << key);
+        return false;
+    }
+    return decode(value, true, false, false);
+}
+
+bool getString(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    OUString v;
+    if (!getStringValue(key, variant, &v)) {
+        return false;
+    }
+    *value <<= v;
+    return true;
+}
+
+bool getHexbinaryValue(
+    OString const & key, GVariantHolder const & variant,
+    css::uno::Sequence<sal_Int8> * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "ay") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match hexbinary property");
+        return false;
+    }
+    gsize n;
+    gconstpointer p = g_variant_get_fixed_array(
+        variant.get(), &n, sizeof (guchar));
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long hexbinary value for key " << key);
+        return false;
+    }
+    value->realloc(static_cast<sal_Int32>(n));
+    static_assert(sizeof (sal_Int8) == sizeof (guchar), "size mismatch");
+    std::memcpy(value->getArray(), p, n * sizeof (guchar));
+        // assuming that n * sizeof (guchar) is small enough for std::size_t
+    return true;
+}
+
+bool getHexbinary(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    css::uno::Sequence<sal_Int8> v;
+    if (!getHexbinaryValue(key, variant, &v)) {
+        return false;
+    }
+    *value <<= v;
+    return true;
+}
+
+bool getBooleanList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "ab") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match boolean list property");
+        return false;
+    }
+    gsize n;
+    gconstpointer p = g_variant_get_fixed_array(
+        variant.get(), &n, sizeof (guchar));
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long boolean list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<sal_Bool> v(static_cast<sal_Int32>(n));
+    static_assert(sizeof (sal_Bool) == sizeof (guchar), "size mismatch");
+    std::memcpy(v.getArray(), p, n * sizeof (guchar));
+        // assuming that n * sizeof (guchar) is small enough for std::size_t
+    *value <<= v;
+    return true;
+}
+
+bool getShortList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "an") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match short list property");
+        return false;
+    }
+    gsize n;
+    gconstpointer p = g_variant_get_fixed_array(
+        variant.get(), &n, sizeof (gint16));
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long short list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<sal_Int16> v(static_cast<sal_Int32>(n));
+    static_assert(sizeof (sal_Int16) == sizeof (gint16), "size mismatch");
+    std::memcpy(v.getArray(), p, n * sizeof (gint16));
+        // assuming that n * sizeof (gint16) is small enough for std::size_t
+    *value <<= v;
+    return true;
+}
+
+bool getIntList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "ai") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match int list property");
+        return false;
+    }
+    gsize n;
+    gconstpointer p = g_variant_get_fixed_array(
+        variant.get(), &n, sizeof (gint32));
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long int list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<sal_Int32> v(static_cast<sal_Int32>(n));
+    static_assert(sizeof (sal_Int32) == sizeof (gint32), "size mismatch");
+    std::memcpy(v.getArray(), p, n * sizeof (gint32));
+        // assuming that n * sizeof (gint32) is small enough for std::size_t
+    *value <<= v;
+    return true;
+}
+
+bool getLongList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "ax") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match long list property");
+        return false;
+    }
+    gsize n;
+    gconstpointer p = g_variant_get_fixed_array(
+        variant.get(), &n, sizeof (gint64));
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long long list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<sal_Int64> v(static_cast<sal_Int32>(n));
+    static_assert(sizeof (sal_Int64) == sizeof (gint64), "size mismatch");
+    std::memcpy(v.getArray(), p, n * sizeof (gint64));
+        // assuming that n * sizeof (gint64) is small enough for std::size_t
+    *value <<= v;
+    return true;
+}
+
+bool getDoubleList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "ad") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match double list property");
+        return false;
+    }
+    gsize n;
+    gconstpointer p = g_variant_get_fixed_array(
+        variant.get(), &n, sizeof (gdouble));
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long double list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<double> v(static_cast<sal_Int32>(n));
+    static_assert(std::is_same<double, gdouble>::value, "type mismatch");
+    std::memcpy(v.getArray(), p, n * sizeof (gdouble));
+        // assuming that n * sizeof (gdouble) is small enough for std::size_t
+    *value <<= v;
+    return true;
+}
+
+bool getStringList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "as") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match string list property");
+        return false;
+    }
+    gsize n = g_variant_n_children(variant.get());
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long string list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<OUString> v(static_cast<sal_Int32>(n));
+    for (gsize i = 0; i != n; ++i) {
+        GVariantHolder c(g_variant_get_child_value(variant.get(), i));
+        if (!getStringValue(key, c, v.getArray() + i)) {
+            return false;
+        }
+    }
+    *value <<= v;
+    return true;
+}
+
+bool getHexbinaryList(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    if (std::strcmp(g_variant_get_type_string(variant.get()), "aay") != 0) {
+        SAL_WARN(
+            "configmgr.dconf",
+            "bad key " << key << " does not match hexbinary list property");
+        return false;
+    }
+    gsize n = g_variant_n_children(variant.get());
+    if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+            std::numeric_limits<sal_Int32>::max()))
+    {
+        SAL_WARN("configmgr.dconf", "too long hexbinary list for key " << key);
+        return false;
+    }
+    css::uno::Sequence<css::uno::Sequence<sal_Int8>> v(
+        static_cast<sal_Int32>(n));
+    for (gsize i = 0; i != n; ++i) {
+        GVariantHolder c(g_variant_get_child_value(variant.get(), i));
+        if (!getHexbinaryValue(key, c, v.getArray() + i)) {
+            return false;
+        }
+    }
+    *value <<= v;
+    return true;
+}
+
+bool getAny(
+    OString const & key, GVariantHolder const & variant, css::uno::Any * value)
+{
+    char const * t = g_variant_get_type_string(variant.get());
+    if (std::strcmp(t, "b") == 0) {
+        return getBoolean(key, variant, value);
+    }
+    if (std::strcmp(t, "n") == 0) {
+        return getShort(key, variant, value);
+    }
+    if (std::strcmp(t, "i") == 0) {
+        return getInt(key, variant, value);
+    }
+    if (std::strcmp(t, "x") == 0) {
+        return getLong(key, variant, value);
+    }
+    if (std::strcmp(t, "d") == 0) {
+        return getDouble(key, variant, value);
+    }
+    if (std::strcmp(t, "s") == 0) {
+        return getString(key, variant, value);
+    }
+    if (std::strcmp(t, "ay") == 0) {
+        return getHexbinary(key, variant, value);
+    }
+    if (std::strcmp(t, "ab") == 0) {
+        return getBooleanList(key, variant, value);
+    }
+    if (std::strcmp(t, "an") == 0) {
+        return getShortList(key, variant, value);
+    }
+    if (std::strcmp(t, "ai") == 0) {
+        return getIntList(key, variant, value);
+    }
+    if (std::strcmp(t, "ax") == 0) {
+        return getLongList(key, variant, value);
+    }
+    if (std::strcmp(t, "ad") == 0) {
+        return getDoubleList(key, variant, value);
+    }
+    if (std::strcmp(t, "as") == 0) {
+        return getStringList(key, variant, value);
+    }
+    if (std::strcmp(t, "aay") == 0) {
+        return getHexbinaryList(key, variant, value);
+    }
+    SAL_WARN(
+        "configmgr.dconf", "bad key " << key << " does not match any property");
+    return false;
+}
+
+enum class ReadValue { Error, Value, Remove };
+
+ReadValue readValue(
+    GObjectHolder<DConfClient> const & client, OString const & path, Type type,
+    bool nillable, bool removable, css::uno::Any * value)
+{
+    assert(value != nullptr);
+    assert(!value->hasValue());
+    assert(!path.endsWith("/"));
+    GVariantHolder v(dconf_client_read(client.get(), path.getStr()));
+    if (v.get() == nullptr) {
+        SAL_WARN("configmgr.dconf", "cannot read key " << path);
+        return ReadValue::Error;
+    }
+    if (removable && std::strcmp(g_variant_get_type_string(v.get()), "()") == 0)
+    {
+        return ReadValue::Remove;
+    }
+    bool nil;
+    if (nillable) {
+        if (g_variant_classify(v.get()) != G_VARIANT_CLASS_MAYBE) {
+            SAL_WARN(
+                "configmgr.dconf",
+                "bad key " << path << " does not match nillable property");
+        }
+        v.reset(g_variant_get_maybe(v.get()));
+        nil = v.get() == nullptr;
+    } else {
+        nil = false;
+    }
+    if (!nil) {
+        switch (type) {
+        case TYPE_ANY:
+            if (!getAny(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_BOOLEAN:
+            if (!getBoolean(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_SHORT:
+            if (!getShort(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_INT:
+            if (!getInt(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_LONG:
+            if (!getLong(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_DOUBLE:
+            if (!getDouble(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_STRING:
+            if (!getString(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_HEXBINARY:
+            if (!getHexbinary(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_BOOLEAN_LIST:
+            if (!getBooleanList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_SHORT_LIST:
+            if (!getShortList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_INT_LIST:
+            if (!getIntList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_LONG_LIST:
+            if (!getLongList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_DOUBLE_LIST:
+            if (!getDoubleList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_STRING_LIST:
+            if (!getStringList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        case TYPE_HEXBINARY_LIST:
+            if (!getHexbinaryList(path, v, value)) {
+                return ReadValue::Error;
+            }
+            break;
+        default:
+            assert(false); // cannot happen
+        }
+    }
+    return ReadValue::Value;
+}
+
+void readDir(
+    Data & data, int layer, rtl::Reference<Node> const & node,
+    NodeMap & members, GObjectHolder<DConfClient> const & client,
+    OString const & dir)
+{
+    StringArrayHolder a(dconf_client_list(client.get(), dir.getStr(), nullptr));
+    for (char const * const * p = a.get(); *p != nullptr; ++p) {
+        std::size_t n = std::strlen(*p);
+        if (n > static_cast<typename std::make_unsigned<sal_Int32>::type>(
+                std::numeric_limits<sal_Int32>::max()))
+        {
+            SAL_WARN("configmgr.dconf", "too long dir/key in dir " << dir);
+            continue;
+        }
+        OString s(*p, static_cast<sal_Int32>(n));
+        OString path(dir + s);
+        OUString seg;
+        if (!rtl_convertStringToUString(
+                &seg.pData, s.getStr(), s.getLength(), RTL_TEXTENCODING_UTF8,
+                (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+                 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+                 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
+        {
+            SAL_WARN("configmgr.dconf", "non--UTF-8 dir/key in dir " << dir);
+            continue;
+        }
+        bool isDir = seg.endsWith("/", &seg);
+        bool remove;
+        OUString name;
+        OUString templ;
+        bool replace;
+        if (node.is() && node->kind() == Node::KIND_SET) {
+            if (isDir) {
+                remove = false;
+                sal_Int32 i1 = seg.indexOf(';');
+                if (i1 == -1) {
+                    SAL_WARN(
+                        "configmgr.dconf", "bad set element syntax " << path);
+                    continue;
+                }
+                name = seg.copy(0, i1);
+                if (!decode(&name, false, false, true)) {
+                    continue;
+                }
+                ++i1;
+                sal_Int32 i2 = seg.indexOf(';', i1);
+                if (i2 == -1) {
+                    SAL_WARN(
+                        "configmgr.dconf", "bad set element syntax " << path);
+                    continue;
+                }
+                templ = seg.copy(i1, i2 - i1);
+                if (!decode(&templ, false, true, true)) {
+                    continue;
+                }
+                ++i2;
+                if (rtl_ustr_asciil_reverseCompare_WithLength(
+                        seg.getStr() + i2, seg.getLength() - i2, "fuse",
+                        std::strlen("fuse"))
+                    == 0)
+                {
+                    replace = false;
+                } else if (rtl_ustr_asciil_reverseCompare_WithLength(
+                               seg.getStr() + i2, seg.getLength() - i2,
+                               "replace", std::strlen("replace"))
+                           == 0)
+                {
+                    replace = true;
+                } else {
+                    SAL_WARN(
+                        "configmgr.dconf", "bad set element syntax " << path);
+                    continue;
+                }
+                rtl::Reference<SetNode> set(static_cast<SetNode *>(node.get()));
+                if (!set->isValidTemplate(templ)) {
+                    SAL_WARN(
+                        "configmgr.dconf",
+                        "bad " << path
+                            << " denotes unsupported set element template");
+                    continue;
+                }
+            } else {
+                remove = true;
+                name = seg;
+                replace = false;
+                assert(!path.endsWith("/"));
+                GVariantHolder v(
+                    dconf_client_read(client.get(), path.getStr()));
+                if (v.get() == nullptr) {
+                    SAL_WARN("configmgr.dconf", "cannot read key " << path);
+                    continue;
+                }
+                if (std::strcmp(g_variant_get_type_string(v.get()), "()") != 0)
+                {
+                    SAL_WARN(
+                        "configmgr.dconf",
+                        "bad " << path
+                            << " does not denote set element removal");
+                    continue;
+                }
+            }
+        } else {
+            remove = false;
+            name = seg;
+            replace = false;
+        }
+        rtl::Reference<Node> member(members.findNode(layer, name));
+        bool insert = !member.is();
+        if (!remove && (replace || insert)) {
+            if (!node.is()) {
+                SAL_WARN("configmgr.dconf", "bad unmatched " << path);
+                continue;
+            }
+            switch (node->kind()) {
+            case Node::KIND_LOCALIZED_PROPERTY:
+                member.set(new LocalizedValueNode(layer));
+                break;
+            case Node::KIND_GROUP:
+                if (!static_cast<GroupNode *>(node.get())->isExtensible()) {
+                    SAL_WARN("configmgr.dconf", "bad unmatched " << path);
+                    continue;
+                }
+                member.set(
+                    new PropertyNode(
+                        layer, TYPE_ANY, true, css::uno::Any(), true));
+                break;
+            case Node::KIND_SET:
+                assert(!templ.isEmpty());
+                member = data.getTemplate(layer, templ);
+                if (!member.is()) {
+                    SAL_WARN(
+                        "configmgr.dconf",
+                        "bad " << path << " denoting undefined template "
+                            << templ);
+                    continue;
+                }
+                break;
+            default:
+                assert(false); // cannot happen
+            }
+        } else if (!(templ.isEmpty()
+                     || (node.is() && templ == node->getTemplateName())))
+        {
+            SAL_WARN(
+                "configmgr.dconf",
+                "bad " << path
+                    << " denoting set element of non-matching template "
+                    << node->getTemplateName());
+            continue;
+        }
+        if (member->getFinalized() < layer) {
+            continue;
+        }
+        switch (member->kind()) {
+        case Node::KIND_PROPERTY:
+            {
+                if (isDir) {
+                    SAL_WARN(
+                        "configmgr.dconf",
+                        "bad dir " << path << " does not match property");
+                    continue;
+                }
+                rtl::Reference<PropertyNode> prop(
+                    static_cast<PropertyNode *>(member.get()));
+                css::uno::Any value;
+                switch (readValue(
+                            client, path, prop->getStaticType(),
+                            prop->isNillable(), prop->isExtension(), &value))
+                {
+                case ReadValue::Error:
+                    continue;
+                case ReadValue::Value:
+                    prop->setValue(layer, value);
+                    break;
+                case ReadValue::Remove:
+                    remove = true;
+                    break;
+                }
+                break;
+            }
+        case Node::KIND_LOCALIZED_VALUE:
+            {
+                if (isDir) {
+                    SAL_WARN(
+                        "configmgr.dconf",
+                        "bad dir " << path
+                            << " does not match localized value");
+                    continue;
+                }
+                assert(
+                    node.is() && node->kind() == Node::KIND_LOCALIZED_PROPERTY);
+                rtl::Reference<LocalizedPropertyNode> locProp(
+                    static_cast<LocalizedPropertyNode *>(node.get()));
+                css::uno::Any value;
+                if (readValue(
+                        client, path, locProp->getStaticType(),
+                        locProp->isNillable(), false, &value)
+                    == ReadValue::Error)
+                {
+                    continue;
+                }
+                static_cast<LocalizedValueNode *>(member.get())->setValue(
+                    layer, value);
+                break;
+            }
+        case Node::KIND_LOCALIZED_PROPERTY:
+        case Node::KIND_GROUP:
+        case Node::KIND_SET:
+            if (!isDir) {
+                SAL_WARN(
+                    "configmgr.dconf",
+                    "bad key " << path
+                        << " does not match localized property, group, or set,"
+                        " respectively");
+                continue;
+            }
+            assert(path.endsWith("/"));
+            readDir(data, layer, member, member->getMembers(), client, path);
+            break;
+        default:
+            assert(false); // cannot happen
+        }
+        if (remove) {
+            if (!member->getMandatory()) {
+                members.erase(name);
+            }
+        } else if (replace) {
+            members.erase(name);
+            members.insert(NodeMap::value_type(name, member));
+        } else if (insert) {
+            members.insert(NodeMap::value_type(name, member));
+        }
+    }
+}
+
+}
+
+void readDconfLayer(Data & data, int layer) {
+    GObjectHolder<DConfClient> client(dconf_client_new());
+    readDir(
+        data, layer, rtl::Reference<Node>(), data.getComponents(), client,
+        "/org/libreoffice/registry/");
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/readdconflayer.hxx b/configmgr/source/readdconflayer.hxx
new file mode 100644
index 0000000..63a4698
--- /dev/null
+++ b/configmgr/source/readdconflayer.hxx
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CONFIGMGR_SOURCE_READDCONFLAYER_HXX
+#define INCLUDED_CONFIGMGR_SOURCE_READDCONFLAYER_HXX
+
+#include <sal/config.h>
+
+namespace configmgr { struct Data; }
+
+namespace configmgr {
+
+void readDconfLayer(Data & data, int layer);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configure.ac b/configure.ac
index d061912..aaf1d6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1475,6 +1475,11 @@ AC_ARG_ENABLE(collada,
     AS_HELP_STRING([--disable-collada],
         [Disable collada support (Rendering 3D models stored in *.dae and *.kmz format).]))
 
+AC_ARG_ENABLE(dconf,
+    AS_HELP_STRING([--disable-dconf],
+        [Disable the dconf configuration backend (enabled by default where
+         available).]))
+
 dnl ===================================================================
 dnl Optional Packages (--with/without-)
 dnl ===================================================================
@@ -10493,6 +10498,29 @@ AC_SUBST([COLLADA2GLTF_CFLAGS])
 AC_SUBST([COLLADA2GLTF_LIBS])
 AC_SUBST([SYSTEM_COLLADA2GLTF])
 
+if test "$enable_dconf" != no; then
+    PKG_CHECK_MODULES([DCONF], [dconf], [], [
+        if test "$enable_dconf" = yes; then
+            AC_MSG_ERROR([dconf not found])
+        else
+            enable_dconf=no
+        fi])
+fi
+AC_MSG_CHECKING([whether to enable dconf])
+if test "$enable_dconf" = no; then
+    DCONF_CFLAGS=
+    DCONF_LIBS=
+    ENABLE_DCONF=
+    AC_MSG_RESULT([no])
+else
+    ENABLE_DCONF=TRUE
+    AC_DEFINE(ENABLE_DCONF)
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST([DCONF_CFLAGS])
+AC_SUBST([DCONF_LIBS])
+AC_SUBST([ENABLE_DCONF])
+
 # pdf import?
 AC_MSG_CHECKING([whether to build the PDF import feature])
 ENABLE_PDFIMPORT=
@@ -13112,6 +13140,7 @@ AC_CONFIG_FILES([config_host.mk
                  ios/lo.xcconfig])
 AC_CONFIG_HEADERS([config_host/config_buildid.h])
 AC_CONFIG_HEADERS([config_host/config_clang.h])
+AC_CONFIG_HEADERS([config_host/config_dconf.h])
 AC_CONFIG_HEADERS([config_host/config_eot.h])
 AC_CONFIG_HEADERS([config_host/config_extension_update.h])
 AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf
index 7c21ce7..2824fb6 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -33,6 +33,7 @@
 --enable-epm
 --enable-python=internal
 --enable-online-update
+--disable-dconf
 --disable-gio
 --disable-randr-link
 --disable-kde4
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index d734876..70f3456 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -491,6 +491,7 @@ certain functionality.
 @li @c basebmp
 @li @c binaryurp
 @li @c configmgr
+ at li @c configmgr.dconf
 @li @c cppcanvas
 @li @c cppcanvas.emf
 @li @c drawinglayer
diff --git a/instsetoo_native/CustomTarget_setup.mk b/instsetoo_native/CustomTarget_setup.mk
index 4217424..dd331af 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -48,7 +48,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
 		&& echo 'BRAND_BASE_DIR=$${ORIGIN}/..' \
 		&& echo 'BRAND_INI_DIR=$${ORIGIN}' \
 		&& echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
-		&& echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry $(if $(filter WNT,$(OS)),winreg: )bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu' \
+		&& echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry  $(if $(ENABLE_DCONF),dconf: )$(if $(filter WNT,$(OS)),winreg: )bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu' \
 		&& echo 'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \
 		&& echo 'LO_LIB_DIR=$${BRAND_BASE_DIR}/$(LIBO_LIB_FOLDER)' \
 		&& echo 'BAK_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index e79dab7..6bf7b30 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -29,6 +29,7 @@
 
 #include "AutoInstall/brand"
 
+#include "config_dconf.h"
 #include "config_folders.h"
 
 Module gid_Module_Root_Brand
@@ -1117,17 +1118,25 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_Bin_Dir
     Value = "${BRAND_BASE_DIR}/" LIBO_URE_BIN_FOLDER;
 End
 
+#if ENABLE_DCONF
+#define CONFIGURATION_LAYERS_DCONF " dconf:"
+#else
+#define CONFIGURATION_LAYERS_DCONF
+#endif
+#if defined WNT
+#define CONFIGURATION_LAYERS_WINREG " winreg:"
+#else
+#define CONFIGURATION_LAYERS_WINREG
+#endif
 ProfileItem gid_Brand_Profileitem_Fundamental_Configuration_Layers
     ProfileID = gid_Brand_Profile_Fundamental_Ini;
     ModuleID = gid_Module_Root_Brand;
     Section = "Bootstrap";
     Key = "CONFIGURATION_LAYERS";
-#if defined WNT
-    Value = "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry winreg: bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/user/registrymodifications.xcu";
-#else
-    Value = "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/user/registrymodifications.xcu";
-#endif
+    Value = "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry" CONFIGURATION_LAYERS_WINREG " bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/user/registrymodifications.xcu";
 End
+#undef CONFIGURATION_LAYERS_DCONF
+#undef CONFIGURATION_LAYERS_WINREG
 
 #if !defined MACOSX
 ProfileItem gid_Brand_Profileitem_Redirect_Ure_Bootstrap
commit 8caef148f4ce5f811588390c24bda41a1390093d
Author: Olivier Hallot <olivier.hallot at edx.srv.br>
Date:   Fri Jun 5 16:37:28 2015 -0300

    Updated core
    Project: help  fd9b00bd84e3fe1a0aa087f5355aa0fcd27ef95f
    
    Promote ODF Formula standard in Calc function help
    
    Insert ODF Formula standard citation in Calc functions where it applies. In this example, function TIMEVALUE is a standard ODF Formula 1.2 function.
    
    Many other functions qualify to be a ODFF function. But since Excel is changing its function names, not every Calc function is and ODFF funciton.
    
    Change-Id: Ib764d780f9f66c8a7adaba8954d91fc9b4d70410
    Reviewed-on: https://gerrit.libreoffice.org/16110
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/helpcontent2 b/helpcontent2
index f36f288..fd9b00b 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f36f2883973e4ba6d59ee8d0d9b3e98273aa1c44
+Subproject commit fd9b00bd84e3fe1a0aa087f5355aa0fcd27ef95f
commit 056066dfdb4e4a91aa742028f6a9c06eedeaa537
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 8 12:58:11 2015 +0200

    sw: remove boost::bind from accmap.cxx
    
    Change-Id: I9953cd58e4e285f655f11afccc1d6ee535f85d7e

diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index f14d1c9..576c721 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -43,7 +43,6 @@
 #include <basic/sbx.hxx>
 #include <basic/sbxobj.hxx>
 #include <basic/sbxvar.hxx>
-#include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/make_shared.hpp>
 #include <boost/noncopyable.hpp>
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index e682292..6a0883f 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -71,7 +71,6 @@
 #include <dflyobj.hxx>
 #include <prevwpage.hxx>
 #include <calbck.hxx>
-#include <boost/bind.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
@@ -3092,7 +3091,7 @@ void SwAccessibleMap::FireEvents()
             mpEvents->SetFiring();
             mpEvents->MoveInvalidXAccToEnd();
             ::std::for_each(mpEvents->begin(), mpEvents->end(),
-                            boost::bind(&SwAccessibleMap::FireEvent, this, _1));
+                [this] (SwAccessibleEvent_Impl const& rEvent) { this->FireEvent(rEvent); } );
 
             delete mpEventMap;
             mpEventMap = nullptr;
commit 1dca84e374898185851b5a90595a8b5b741431ad
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 8 12:53:45 2015 +0200

    sw: remove boost::bind from docbm.cxx
    
    Change-Id: I3e91817c5113a391668ef0f35d6b8df4702f9715

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 930312c..060c32f 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -19,7 +19,6 @@
 
 #include <MarkManager.hxx>
 #include <bookmrk.hxx>
-#include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <cntfrm.hxx>
 #include <crossrefbookmark.hxx>
@@ -168,7 +167,7 @@ namespace
             rMarks.begin(),
             pCandidatesEnd,
             back_inserter(vCandidates),
-            boost::bind( ::std::logical_not<bool>(), boost::bind( &IMark::EndsBefore, _1, rPos ) ) );
+            [&] (IDocumentMarkAccess::pMark_t const& rpMark) { return !rpMark->EndsBefore(rPos); } );
         // no candidate left => we are in front of the first mark or there are none
         if(vCandidates.empty()) return NULL;
         // return the highest (last) candidate using mark end ordering
@@ -269,7 +268,7 @@ namespace
         return find_if(
             ppMarksBegin,
             ppMarksEnd,
-            boost::bind(&OUString::equals, boost::bind(&IMark::GetName, _1), rName));
+            [&] (IDocumentMarkAccess::pMark_t const& rpMark) { return rpMark->GetName() == rName; } );
     }
 
 #if 0
@@ -960,7 +959,7 @@ namespace sw { namespace mark
             find_if(
                 pMarkLow,
                 pMarkHigh,
-                boost::bind( ::std::equal_to<const IMark*>(), boost::bind(&boost::shared_ptr<IMark>::get, _1), pMark ) );
+                [&] (pMark_t const& rpMark) { return rpMark.get() == pMark; } );
         if(pMarkFound != pMarkHigh)
             deleteMark(pMarkFound);
     }
@@ -1015,8 +1014,8 @@ namespace sw { namespace mark
     {
         const_iterator_t pFieldmark = find_if(
             m_vFieldmarks.begin(),
-            m_vFieldmarks.end( ),
-            boost::bind(&IMark::IsCoveringPosition, _1, rPos));
+            m_vFieldmarks.end(),
+            [&] (pMark_t const& rpMark) { return rpMark->IsCoveringPosition(rPos); } );
         if(pFieldmark == m_vFieldmarks.end()) return NULL;
         return dynamic_cast<IFieldmark*>(pFieldmark->get());
     }
@@ -1081,8 +1080,8 @@ namespace sw { namespace mark
     {
         const_iterator_t pAnnotationMark = find_if(
             m_vAnnotationMarks.begin(),
-            m_vAnnotationMarks.end( ),
-            boost::bind(&IMark::IsCoveringPosition, _1, rPos));
+            m_vAnnotationMarks.end(),
+            [&] (pMark_t const& rpMark) { return rpMark->IsCoveringPosition(rPos); } );
         if (pAnnotationMark == m_vAnnotationMarks.end())
             return NULL;
         return pAnnotationMark->get();
commit 84806f306114a038b4d5cc4eb6f34b90fbe71f9d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 8 12:46:37 2015 +0200

    sw: remove boost::bind from fmtatr2.cxx
    
    Change-Id: I4924251babfcea9a87e7e688c904264dd80f9359

diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 90a45b9..dcd698e 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -48,7 +48,6 @@
 #include <docsh.hxx>
 #include <svl/zforlist.hxx>
 
-#include <boost/bind.hpp>
 #include <algorithm>
 
 using namespace ::com::sun::star;
@@ -811,7 +810,7 @@ MetaFieldManager::getMetaFields()
     // erase deleted fields
     const MetaFieldList_t::iterator iter(
         ::std::remove_if(m_MetaFields.begin(), m_MetaFields.end(),
-            ::boost::bind(&::boost::weak_ptr<MetaField>::expired, _1)));
+            [] (::boost::weak_ptr<MetaField> const& rField) { return rField.expired(); }));
     m_MetaFields.erase(iter, m_MetaFields.end());
     // filter out fields in UNDO
     MetaFieldList_t filtered(m_MetaFields.size());
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index e1bdf2e..1610bd5 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -109,7 +109,6 @@
 #include <sortopt.hxx>
 #include <algorithm>
 #include <iterator>
-#include <boost/bind.hpp>
 #include <calbck.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
commit 737e392537d909f7915fb071230cc59ee1ff51e6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 8 11:02:08 2015 +0100


... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list