UnoControls/source/base/basecontainercontrol.cxx                               
                   |    2 
 UnoControls/source/base/basecontrol.cxx                                        
                   |    2 
 UnoControls/source/controls/framecontrol.cxx                                   
                   |   10 
 UnoControls/source/controls/progressbar.cxx                                    
                   |    2 
 UnoControls/source/controls/progressmonitor.cxx                                
                   |   12 
 UnoControls/source/controls/statusindicator.cxx                                
                   |    6 
 UnoControls/source/inc/progressmonitor.hxx                                     
                   |    4 
 accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx              
                   |    2 
 accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx                 
                   |    4 
 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx                 
                   |    6 
 accessibility/source/extended/AccessibleGridControlHeader.cxx                  
                   |    6 
 accessibility/source/extended/AccessibleGridControlTable.cxx                   
                   |    2 
 accessibility/source/extended/AccessibleGridControlTableCell.cxx               
                   |    6 
 accessibility/source/extended/accessibleiconchoicectrlentry.cxx                
                   |    6 
 accessibility/source/extended/accessiblelistbox.cxx                            
                   |    2 
 accessibility/source/extended/accessiblelistboxentry.cxx                       
                   |    6 
 accessibility/source/extended/accessibletablistboxtable.cxx                    
                   |    2 
 accessibility/source/standard/vclxaccessiblebutton.cxx                         
                   |    2 
 accessibility/source/standard/vclxaccessiblecheckbox.cxx                       
                   |    2 
 accessibility/source/standard/vclxaccessibleedit.cxx                           
                   |    2 
 accessibility/source/standard/vclxaccessiblelistitem.cxx                       
                   |    4 
 accessibility/source/standard/vclxaccessiblemenuitem.cxx                       
                   |    6 
 accessibility/source/standard/vclxaccessibleradiobutton.cxx                    
                   |    4 
 accessibility/source/standard/vclxaccessiblestatusbaritem.cxx                  
                   |    4 
 accessibility/source/standard/vclxaccessibletabpage.cxx                        
                   |    4 
 accessibility/source/standard/vclxaccessibletextcomponent.cxx                  
                   |    2 
 accessibility/source/standard/vclxaccessibletoolbox.cxx                        
                   |    4 
 accessibility/source/standard/vclxaccessibletoolboxitem.cxx                    
                   |    6 
 avmedia/source/framework/mediaitem.cxx                                         
                   |    2 
 avmedia/source/quicktime/player.mm                                             
                   |    2 
 avmedia/source/viewer/mediawindow.cxx                                          
                   |    4 
 avmedia/source/win/player.cxx                                                  
                   |    4 
 basctl/source/basicide/baside2.cxx                                             
                   |    2 
 basctl/source/basicide/baside3.cxx                                             
                   |    4 
 basegfx/source/tools/canvastools.cxx                                           
                   |    2 
 basic/source/basmgr/basmgr.cxx                                                 
                   |    6 
 bean/Jar_officebean.mk                                                         
                   |    1 
 bean/com/sun/star/beans/ContainerFactory.java                                  
                   |    9 
 bean/com/sun/star/beans/LocalOfficeConnection.java                             
                   |   14 
 bean/com/sun/star/beans/LocalOfficeWindow.java                                 
                   |    2 
 bean/com/sun/star/beans/OfficeConnection.java                                  
                   |   21 
 bean/com/sun/star/beans/OfficeWindow.java                                      
                   |   46 +
 bean/com/sun/star/comp/beans/ContainerFactory.java                             
                   |    9 
 bean/com/sun/star/comp/beans/Controller.java                                   
                   |    8 
 bean/com/sun/star/comp/beans/LocalOfficeConnection.java                        
                   |   35 
 bean/com/sun/star/comp/beans/OOoBean.java                                      
                   |  252 ++++++
 bean/com/sun/star/comp/beans/OfficeConnection.java                             
                   |    8 
 chart2/source/view/charttypes/GL3DBarChart.cxx                                 
                   |    2 
 compilerplugins/clang/literaltoboolconversion.cxx                              
                   |   16 
 compilerplugins/clang/salbool.cxx                                              
                   |   65 -
 configure.ac                                                                   
                   |    8 
 connectivity/source/drivers/macab/MacabAddressBook.cxx                         
                   |   12 
 connectivity/source/drivers/macab/MacabAddressBook.hxx                         
                   |    2 
 connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx                    
                   |   10 
 connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx                    
                   |    2 
 connectivity/source/drivers/macab/MacabGroup.cxx                               
                   |    6 
 connectivity/source/drivers/macab/MacabHeader.cxx                              
                   |    4 
 connectivity/source/drivers/macab/MacabHeader.hxx                              
                   |    4 
 connectivity/source/drivers/macab/MacabPreparedStatement.cxx                   
                   |    2 
 connectivity/source/drivers/macab/MacabPreparedStatement.hxx                   
                   |    2 
 connectivity/source/drivers/macab/MacabRecord.cxx                              
                   |   18 
 connectivity/source/drivers/macab/MacabRecord.hxx                              
                   |    4 
 connectivity/source/drivers/macab/MacabRecords.cxx                             
                   |   36 
 connectivity/source/drivers/macab/MacabRecords.hxx                             
                   |    6 
 connectivity/source/drivers/macab/MacabResultSet.cxx                           
                   |    2 
 connectivity/source/drivers/macab/MacabResultSet.hxx                           
                   |    2 
 connectivity/source/drivers/macab/MacabServices.cxx                            
                   |    2 
 connectivity/source/drivers/macab/MacabStatement.cxx                           
                   |    8 
 connectivity/source/drivers/macab/macabcondition.cxx                           
                   |   80 -
 connectivity/source/drivers/macab/macabcondition.hxx                           
                   |   42 -
 connectivity/source/drivers/macab/macaborder.cxx                               
                   |    2 
 connectivity/source/drivers/macab/macaborder.hxx                               
                   |    4 
 connectivity/source/drivers/odbc/OTools.cxx                                    
                   |   32 
 external/boost/UnpackedTarball_boost.mk                                        
                   |    1 
 external/boost/boost.boost_static_assert_unused_attribute.patch.0              
                   |   11 
 fpicker/source/aqua/ControlHelper.hxx                                          
                   |    2 
 fpicker/source/aqua/ControlHelper.mm                                           
                   |   18 
 fpicker/source/aqua/FilterHelper.hxx                                           
                   |    8 
 fpicker/source/aqua/FilterHelper.mm                                            
                   |   30 
 i18nlangtag/source/isolang/isolang.cxx                                         
                   |    4 
 i18npool/source/search/levdis.cxx                                              
                   |   14 
 i18npool/source/search/levdis.hxx                                              
                   |    6 
 include/com/sun/star/uno/Reference.h                                           
                   |    4 
 include/o3tl/heap_ptr.hxx                                                      
                   |    4 
 include/sot/storage.hxx                                                        
                   |    2 
 include/vcl/menu.hxx                                                           
                   |   34 
 lingucomponent/source/spellcheck/macosxspell/macspellimp.mm                    
                   |    8 
 o3tl/qa/test-heap_ptr.cxx                                                      
                   |    1 
 odk/CppunitTest_odk_checkapi.mk                                                
                   |    9 
 odk/config/configure.pl                                                        
                   |    2 
 odk/config/setsdkenv_unix.sh.in                                                
                   |    4 
 odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java   
                   |   73 +
 odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java                     
                   |   23 
 odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java          
                   |   13 
 odk/examples/java/Inspector/Inspector.java                                     
                   |   14 
 odk/examples/java/Spreadsheet/CalcAddins.java                                  
                   |   20 
 odk/qa/checkapi/checkapi.cxx                                                   
                   |   40 
 odk/qa/checkapi/strings.cxx                                                    
                   |   31 
 reportdesign/source/ui/inc/ColorListener.hxx                                   
                   |    2 
 reportdesign/source/ui/inc/DesignView.hxx                                      
                   |    2 
 reportdesign/source/ui/inc/StartMarker.hxx                                     
                   |    2 
 reportdesign/source/ui/misc/ColorListener.cxx                                  
                   |    4 
 reportdesign/source/ui/report/DesignView.cxx                                   
                   |    2 
 reportdesign/source/ui/report/StartMarker.cxx                                  
                   |    2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx                           
                   |    1 
 scripting/java/com/sun/star/script/framework/container/ParcelContainer.java    
                   |   19 
 
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
   |    2 
 
scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
             |    2 
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
 |    2 
 sd/source/ui/controller/slidelayoutcontroller.cxx                              
                   |   16 
 sd/source/ui/controller/slidelayoutcontroller.hxx                              
                   |    4 
 sd/source/ui/inc/FrameView.hxx                                                 
                   |    4 
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx                               
                   |   28 
 sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx                               
                   |   28 
 sd/source/ui/slideshow/slideshowimpl.cxx                                       
                   |    2 
 sd/source/ui/slideshow/slideshowimpl.hxx                                       
                   |    2 
 sd/source/ui/view/frmview.cxx                                                  
                   |    4 
 solenv/gbuild/CppunitTest.mk                                                   
                   |    3 
 solenv/gbuild/Executable.mk                                                    
                   |    1 
 solenv/gbuild/Library.mk                                                       
                   |    1 
 solenv/gbuild/LinkTarget.mk                                                    
                   |   19 
 solenv/gbuild/StaticLibrary.mk                                                 
                   |    1 
 solenv/gbuild/platform/com_GCC_class.mk                                        
                   |    6 
 solenv/gbuild/platform/com_GCC_defs.mk                                         
                   |   12 
 solenv/gbuild/platform/com_MSC_class.mk                                        
                   |    2 
 solenv/gbuild/platform/com_MSC_defs.mk                                         
                   |    3 
 sot/source/sdstor/storage.cxx                                                  
                   |    5 
 starmath/inc/view.hxx                                                          
                   |    2 
 starmath/source/view.cxx                                                       
                   |    2 
 sw/inc/dbfld.hxx                                                               
                   |    3 
 sw/inc/dbmgr.hxx                                                               
                   |   14 
 sw/qa/extras/odfexport/odfexport.cxx                                           
                   |    2 
 sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx                         
                   |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx                                       
                   |   12 
 sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx                                    
                   |    2 
 sw/qa/extras/uiwriter/uiwriter.cxx                                             
                   |   12 
 sw/source/core/doc/DocumentFieldsManager.cxx                                   
                   |    9 
 sw/source/core/fields/dbfld.cxx                                                
                   |   83 +-
 sw/source/filter/ww8/docxattributeoutput.cxx                                   
                   |    5 
 sw/source/ui/dbui/mailmergewizard.cxx                                          
                   |   16 
 sw/source/uibase/dbui/dbmgr.cxx                                                
                   |  406 ++--------
 vcl/Library_vcl.mk                                                             
                   |    2 
 vcl/osx/printaccessoryview.mm                                                  
                   |    8 
 vcl/source/window/menu.cxx                                                     
                   |  169 +---
 vcl/source/window/menubarwindow.cxx                                            
                   |   12 
 vcl/source/window/menubarwindow.hxx                                            
                   |   34 
 vcl/source/window/menufloatingwindow.cxx                                       
                   |    4 
 vcl/source/window/menufloatingwindow.hxx                                       
                   |    2 
 vcl/source/window/menuwindow.hxx                                               
                   |   35 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx                       
                   |    2 
 150 files changed, 1404 insertions(+), 913 deletions(-)

New commits:
commit 9bd221abfb198fcdf51873e91201a2e717331ae0
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 15:03:27 2014 +0200

    config.guess is apparently not supposed to be called directly
    
    (if you look at how it is used by generated configure scripts); this fixes 
the
    inadvertent loss of executable flag in 
3379a4d028a77de5a50e305175d80f65560d5688
    "Update config.{guess,sub}"
    
    Change-Id: I29b3467970093006c994af63cb5f5bf087831ae6

diff --git a/odk/config/configure.pl b/odk/config/configure.pl
index dde3a94..f86a4f0 100755
--- a/odk/config/configure.pl
+++ b/odk/config/configure.pl
@@ -34,7 +34,7 @@ $main::OO_MINORVERSION =~ s#[^\d]+(\d).(\d).+#$2#go;
 
 $main::OO_SDK_CONFIG_HOME= "$ENV{HOME}/$main::OO_SDK_NAME";
 
-$main::operatingSystem = `$main::sdkpath/config.guess | cut -d"-" -f3,4`;
+$main::operatingSystem = `/bin/sh $main::sdkpath/config.guess | cut -d"-" 
-f3,4`;
 chomp ($main::operatingSystem);
 
 $main::OO_SDK_HOME = $main::sdkpath;
diff --git a/odk/config/setsdkenv_unix.sh.in b/odk/config/setsdkenv_unix.sh.in
index b721e27..4ab9d62 100644
--- a/odk/config/setsdkenv_unix.sh.in
+++ b/odk/config/setsdkenv_unix.sh.in
@@ -89,7 +89,7 @@ then
 fi
 
 # Get the operating system.
-sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`
+sdk_platform=`/bin/sh ${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`
 
 # Set the directory name.
 programdir=program
@@ -143,7 +143,7 @@ fi
 # Set the directory name.
 case ${sdk_platform} in
   solaris*)
-    sdk_proctype=`${OO_SDK_HOME}/config.guess | cut -d"-" -f1`
+    sdk_proctype=`/bin/sh ${OO_SDK_HOME}/config.guess | cut -d"-" -f1`
     if [ "${sdk_proctype}" = "sparc" ]
     then
         directoryname=solsparc
commit bd968717c9ca5a6fe8347f93014ac0553ec6d19a
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Tue Sep 16 14:57:27 2014 +0200

    Revert "Use system ODBC on MS Windows unless specifically overriden"
    
    This reverts commit a00b92fa20da1820987f654a2ea9a1f830355738.

diff --git a/configure.ac b/configure.ac
index c2f00fe..07ff996 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1822,7 +1822,7 @@ AC_ARG_WITH(libbase-jar,
 AC_ARG_WITH(system-odbc,
     AS_HELP_STRING([--with-system-odbc],
         [Use the odbc headers already on system.]),,
-    [with_system_odbc="auto"])
+    [with_system_odbc="$with_system_headers"])
 
 AC_ARG_WITH(system-sane,
     AS_HELP_STRING([--with-system-sane],
@@ -8607,7 +8607,7 @@ dnl 
===================================================================
 dnl Check for system odbc
 dnl ===================================================================
 AC_MSG_CHECKING([which odbc headers to use])
-if test "$with_system_odbc" = "yes" -o '(' "$with_system_headers" = "yes" -a 
"$with_system_odbc" = "auto" ')' -o '(' "$_os" = "WINNT" -a  
"$with_system_odbc" != "no" ')'; then
+if test "$with_system_odbc" = "yes" ; then
     AC_MSG_RESULT([external])
     SYSTEM_ODBC_HEADERS=TRUE
 
commit be36698f60d459cc88b703a007e3bf4209842492
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 14:23:21 2014 +0200

    Revert bean part of "java: remove dead methods"
    
    ...34bcf9b498bccb5c924f4cec850ff15d88df6f07; bean is a client API, not dead
    code.
    
    Change-Id: Iea17b6306152b9a4f2968bed550a44917803d9ec

diff --git a/bean/Jar_officebean.mk b/bean/Jar_officebean.mk
index d7883a5..85278831 100644
--- a/bean/Jar_officebean.mk
+++ b/bean/Jar_officebean.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Jar_add_sourcefiles,officebean,\
        bean/com/sun/star/beans/NativeConnection \
        bean/com/sun/star/beans/NativeService \
        bean/com/sun/star/beans/OfficeConnection \
+       bean/com/sun/star/beans/OfficeWindow \
        bean/com/sun/star/comp/beans/ContainerFactory \
        bean/com/sun/star/comp/beans/Controller \
        bean/com/sun/star/comp/beans/Frame \
diff --git a/bean/com/sun/star/beans/ContainerFactory.java 
b/bean/com/sun/star/beans/ContainerFactory.java
index 28e8d0d..e3c0c9d 100644
--- a/bean/com/sun/star/beans/ContainerFactory.java
+++ b/bean/com/sun/star/beans/ContainerFactory.java
@@ -18,6 +18,8 @@
 
 package com.sun.star.beans;
 
+import java.awt.Container;
+
 /**
  * This interface reprecents an AWT container factory.
  *
@@ -27,5 +29,10 @@ package com.sun.star.beans;
 
 public interface ContainerFactory
 {
-
+    /**
+     * Creates an AWT container.
+     *
+     * @return An AWT container.
+     */
+    Container createContainer();
 }
diff --git a/bean/com/sun/star/beans/LocalOfficeConnection.java 
b/bean/com/sun/star/beans/LocalOfficeConnection.java
index 0dfd0af..af2be37 100644
--- a/bean/com/sun/star/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/beans/LocalOfficeConnection.java
@@ -18,6 +18,7 @@
 
 package com.sun.star.beans;
 
+import java.awt.Container;
 import java.io.File;
 import java.util.Iterator;
 import java.util.List;
@@ -158,6 +159,19 @@ public class LocalOfficeConnection
     }
 
     /**
+     * Creates an office window.
+     * The window is either a sub-class of java.awt.Canvas (local) or
+     * java.awt.Container (RVP).
+     *
+     * @param container This is an AWT container.
+     * @return The office window instance.
+     */
+    public OfficeWindow createOfficeWindow(Container container)
+    {
+        return new LocalOfficeWindow(this);
+    }
+
+    /**
      * Closes the connection.
      */
     public void dispose()
diff --git a/bean/com/sun/star/beans/LocalOfficeWindow.java 
b/bean/com/sun/star/beans/LocalOfficeWindow.java
index d7356f8..e9e05ed 100644
--- a/bean/com/sun/star/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/beans/LocalOfficeWindow.java
@@ -42,7 +42,7 @@ import com.sun.star.uno.XComponentContext;
  */
 public class LocalOfficeWindow
     extends java.awt.Canvas
-    implements XEventListener
+    implements OfficeWindow, XEventListener
 {
     private transient OfficeConnection  mConnection;
     private transient XWindowPeer       mParentProxy;
diff --git a/bean/com/sun/star/beans/OfficeConnection.java 
b/bean/com/sun/star/beans/OfficeConnection.java
index 91f0554..911fae5 100644
--- a/bean/com/sun/star/beans/OfficeConnection.java
+++ b/bean/com/sun/star/beans/OfficeConnection.java
@@ -20,6 +20,7 @@ package com.sun.star.beans;
 
 import com.sun.star.lang.XComponent;
 import com.sun.star.uno.XComponentContext;
+import java.awt.Container;
 
 /**
  * This abstract class reprecents a connection to the office
@@ -37,7 +38,13 @@ public interface OfficeConnection
     void setUnoUrl(String url)
         throws java.net.MalformedURLException;
 
-
+    /**
+     * Sets an AWT container catory.
+     *
+     * @param containerFactory This is a application provided AWT container
+     *  factory.
+     */
+    void setContainerFactory(ContainerFactory containerFactory);
 
     /**
      * Retrieves the UNO component context.
@@ -48,5 +55,15 @@ public interface OfficeConnection
      */
     XComponentContext getComponentContext();
 
-
+    /**
+     * Creates an office window.
+     * The window is either a sub-class of java.awt.Canvas (local) or
+     * java.awt.Container (RVP).
+     *
+     * This method does not add add the office window to its container.
+     *
+     * @param container This is an AWT container.
+     * @return The office window instance.
+     */
+    OfficeWindow createOfficeWindow(Container container);
 }
diff --git a/bean/com/sun/star/beans/OfficeWindow.java 
b/bean/com/sun/star/beans/OfficeWindow.java
new file mode 100644
index 0000000..ebc46b8
--- /dev/null
+++ b/bean/com/sun/star/beans/OfficeWindow.java
@@ -0,0 +1,46 @@
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+package com.sun.star.beans;
+
+import java.awt.Component;
+
+import com.sun.star.awt.XWindowPeer;
+
+/**
+ * The concreate implementation of the OfficeWindow extends an
+ * approperate type of visual component (java.awt.Canvas for local
+ * and java.awt.Container for remote).
+ * @deprecated
+ */
+public interface OfficeWindow
+{
+    /**
+     * Retrieves an AWT component object associated with the OfficeWindow.
+     *
+     * @return The AWT component object associated with the OfficeWindow.
+     */
+    Component getAWTComponent();
+
+    /**
+     * Retrieves an UNO XWindowPeer object associated with the OfficeWindow.
+     *
+     * @return The UNO XWindowPeer object associated with the OfficeWindow.
+     */
+    XWindowPeer getUNOWindowPeer();
+}
diff --git a/bean/com/sun/star/comp/beans/ContainerFactory.java 
b/bean/com/sun/star/comp/beans/ContainerFactory.java
index bd0e48a..d06a082 100644
--- a/bean/com/sun/star/comp/beans/ContainerFactory.java
+++ b/bean/com/sun/star/comp/beans/ContainerFactory.java
@@ -18,6 +18,8 @@
 
 package com.sun.star.comp.beans;
 
+import java.awt.Container;
+
 /**
  * This interface represents an AWT container factory.
  *
@@ -27,5 +29,10 @@ package com.sun.star.comp.beans;
 
 public interface ContainerFactory
 {
-
+    /**
+     * Creates an AWT container.
+     *
+     * @return An AWT container.
+     */
+    Container createContainer();
 }
diff --git a/bean/com/sun/star/comp/beans/Controller.java 
b/bean/com/sun/star/comp/beans/Controller.java
index 4a68980..9e93c58 100644
--- a/bean/com/sun/star/comp/beans/Controller.java
+++ b/bean/com/sun/star/comp/beans/Controller.java
@@ -83,7 +83,13 @@ public class Controller
     // com.sun.star.frame.XDispatchProvider
 
 
-
+    public com.sun.star.frame.XDispatch queryDispatch(
+            /*IN*/ com.sun.star.util.URL aURL,
+            /*IN*/ String aTargetFrameName,
+            /*IN*/ int nSearchFlags )
+    {
+        return xDispatchProvider.queryDispatch( aURL, aTargetFrameName, 
nSearchFlags );
+    }
 
     public com.sun.star.frame.XDispatch[] queryDispatches(
             /*IN*/ com.sun.star.frame.DispatchDescriptor[] aRequests )
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java 
b/bean/com/sun/star/comp/beans/OOoBean.java
index 2ffe5ee..0d1e34e 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -181,7 +181,25 @@ public class OOoBean
         xConnectionListener = this.new EventListener("setOOoConnection");
     }
 
+    // @requirement FUNC.CON.STRT/0.4
+    /** Starts a connection to an OOo instance which is lauched if not running.
 
+        @throws HasConnectionException
+            if a connection was already established.
+
+        @throws NoConnectionException
+            if the specified connection cannot be established
+     */
+    public void startOOoConnection( String aConnectionURL )
+        throws  java.net.MalformedURLException,
+            HasConnectionException,
+            NoConnectionException
+    {
+        // create a new connection from the given connection URL
+        LocalOfficeConnection aConnection = new LocalOfficeConnection();
+        aConnection.setUnoUrl( aConnectionURL );
+        setOOoConnection( aConnection );
+    }
 
     // @requirement FUNC.CON.CHK/0.7
     /** Returns true if this OOoBean is connected to an OOo instance,
@@ -313,7 +331,31 @@ public class OOoBean
         return xDesktop;
     }
 
+    /** Resets this bean to an empty document.
+
+       If a document is loaded and the content modified,
+       the changes are dismissed.  Otherwise nothing happens.
 
+       This method is intended to be overridden in derived classes.
+       This implementation simply calls clear.
+
+       @param bClearStateToo
+           Not only the document content but also the state of the bean,
+        like visibility of child components is cleared.
+
+        @deprecated There is currently no way to dismiss changes, except for 
loading
+        of the unchanged initial document. Furthermore it is unclear how 
derived classes
+        handle this and what exactly their state is (e.g. what members make up 
their state).
+        Calling this method on a derived class requires knowledge about their 
implementation.
+        Therefore a deriving class should declare their own clearDocument if 
needed. Clients
+        should call the clearDocument of the deriving class or {@link #clear} 
which discards
+        the currently displayed document.
+     */
+    public synchronized void clearDocument( boolean bClearStateToo )
+    {
+        // TBD
+        clear();
+    }
 
     /** Resets the OOoBean to an empty status.
 
@@ -654,9 +696,219 @@ public class OOoBean
         }
     }
 
+    /** Loads a document from a Java stream.
+
+           See loadFromURL() for further information.
+     */
+    public void loadFromStream(
+            final java.io.InputStream iInStream,
+            final com.sun.star.beans.PropertyValue aArguments[] )
+        throws
+            // @requirement FUNC.CON.LOST/0.2
+            NoConnectionException,
+            java.io.IOException,
+            com.sun.star.lang.IllegalArgumentException,
+            com.sun.star.util.CloseVetoException
+    {
+        // wrap Java stream into UNO stream
+
+                 // copy stream....
+                 int s = 4096;
+                 int r=0 ,n = 0;
+                 byte[] buffer = new byte[s];
+                 byte[] newBuffer = null;
+                 while ((r = iInStream.read(buffer, n, buffer.length-n))>0) {
+                     n += r;
+                     if (iInStream.available() > buffer.length - n) {
+                         newBuffer = new byte[buffer.length*2];
+                         System.arraycopy(buffer, 0, newBuffer, 0, n);
+                         buffer = newBuffer;
+                     }
+                }
+                if (buffer.length != n) {
+                    newBuffer = new byte[n];
+                    System.arraycopy(buffer, 0, newBuffer, 0, n);
+                    buffer = newBuffer;
+                }
+                com.sun.star.io.XInputStream xStream =
+                    new 
com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter(buffer);
+
+        // add stream to arguments
+        com.sun.star.beans.PropertyValue[] aExtendedArguments =
+            addArgument( aArguments, new com.sun.star.beans.PropertyValue(
+                "InputStream", -1, xStream, 
com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
+
+        // call normal load method
+        loadFromURL( "private:stream", aExtendedArguments );
+    }
+
+    /** Loads a document from a byte array.
 
+           See loadFromURL() for further information.
+     */
+    public void loadFromByteArray(
+            final byte aInBuffer[],
+            final com.sun.star.beans.PropertyValue aArguments[] )
+        throws
+            // @requirement FUNC.CON.LOST/0.2
+            NoConnectionException,
+            java.io.IOException,
+            com.sun.star.lang.IllegalArgumentException,
+            com.sun.star.util.CloseVetoException
+    {
+        // wrap byte arrray into UNO stream
+        com.sun.star.io.XInputStream xStream =
+                new 
com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter(
+                    aInBuffer );
+
+        // add stream to arguments
+        com.sun.star.beans.PropertyValue[] aExtendedArguments =
+            addArgument( aArguments, new com.sun.star.beans.PropertyValue(
+                "InputStream", -1, xStream, 
com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
+
+        // call normal load method
+        loadFromURL( "private:stream", aExtendedArguments );
+    }
 
+    /** Stores a document to the given URL.
+        <p>
+        Due due a bug (50651) calling this method may cause the office to 
crash,
+        when at the same time the office writes a backup of the document. This 
bug
+        also affects {@link #storeToByteArray storeToByteArray} and
+        {@link #storeToStream storeToStream}. The workaround
+        is to start the office with the option --norestore, which disables the 
automatic
+        backup and recovery mechanism. OOoBean offers currently no supported 
way of providing
+        startup options for OOo. But it is possible to set a Java property 
when starting
+        Java, which is examined by OOoBean:
+        <pre>
+            java -Dcom.sun.star.officebean.Options=--norestore  ...
+        </pre>
+        It is planned to offer a way of specifying startup options in a future 
version.
+        The property can be used until then. When using this property only one 
option
+        can be provided.
+
+        @throws IllegalArgumentException
+            if either of the arguments is out of the specified range.
 
+        @throws java.io.IOException
+            if an IO error occurs reading the resource specified by the URL.
+
+        @throws com.sun.star.lang.NoConnectionException
+            if no connection is established.
+
+        @throws NoDocumentException
+            if no document is loaded
+     */
+    private void storeToURL(
+            final String aURL,
+            final com.sun.star.beans.PropertyValue aArguments[] )
+        throws
+            // @requirement FUNC.CON.LOST/0.2
+            NoConnectionException,
+            java.io.IOException,
+            com.sun.star.lang.IllegalArgumentException,
+            NoDocumentException
+    {
+        // no document available?
+        if ( aDocument == null )
+            throw new NoDocumentException();
+
+        try
+        {
+            // start runtime timeout
+            CallWatchThread aCallWatchThread =
+                new CallWatchThread( nOOoCallTimeOut, "storeToURL" );
+
+            // store the document
+            try { aDocument.storeToURL( aURL, aArguments ); }
+            catch ( com.sun.star.io.IOException aExc )
+            { throw new java.io.IOException(); }
+
+            // end runtime timeout
+            aCallWatchThread.cancel();
+        }
+        catch ( java.lang.InterruptedException aExc )
+        { throw new NoConnectionException(); }
+    }
+
+    /** Stores a document to a stream.
+
+           See {@link #storeToURL storeToURL} for further information.
+        @see #storeToURL storeToURL
+     */
+    public java.io.OutputStream storeToStream(
+            java.io.OutputStream aOutStream,
+            final com.sun.star.beans.PropertyValue aArguments[] )
+        throws
+            // @requirement FUNC.CON.LOST/0.2
+            NoConnectionException,
+            NoDocumentException,
+            java.io.IOException,
+            com.sun.star.lang.IllegalArgumentException
+
+    {
+        // wrap Java stream into UNO stream
+        com.sun.star.lib.uno.adapter.OutputStreamToXOutputStreamAdapter 
aStream =
+                new 
com.sun.star.lib.uno.adapter.OutputStreamToXOutputStreamAdapter(
+                    aOutStream );
+
+        // add stream to arguments
+        com.sun.star.beans.PropertyValue[] aExtendedArguments =
+            addArgument( aArguments, new com.sun.star.beans.PropertyValue(
+                "OutputStream", -1, aStream, 
com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
+
+        // call normal store method
+        storeToURL( "private:stream", aExtendedArguments );
+
+        // get byte array from document stream
+        try { aStream.closeOutput(); }
+        catch ( com.sun.star.io.NotConnectedException aExc )
+        { /* TDB */ }
+        catch ( com.sun.star.io.BufferSizeExceededException aExc )
+        { /* TDB */ }
+        catch ( com.sun.star.io.IOException aExc )
+        { throw new java.io.IOException(); }
+        return aOutStream;
+    }
+
+    /** Stores a document to a byte array.
+
+           See {@link #storeToURL storeToURL} for further information.
+        @see #storeToURL storeToURL
+     */
+    public byte[] storeToByteArray(
+            byte aOutBuffer[],
+            final com.sun.star.beans.PropertyValue aArguments[] )
+        throws
+            // @requirement FUNC.CON.LOST/0.2
+            NoConnectionException,
+            NoDocumentException,
+            java.io.IOException,
+            com.sun.star.lang.IllegalArgumentException
+    {
+        // wrap byte arrray into UNO stream
+        com.sun.star.lib.uno.adapter.XOutputStreamToByteArrayAdapter aStream =
+                new 
com.sun.star.lib.uno.adapter.XOutputStreamToByteArrayAdapter(
+                    aOutBuffer );
+
+        // add stream to arguments
+        com.sun.star.beans.PropertyValue[] aExtendedArguments =
+            addArgument( aArguments, new com.sun.star.beans.PropertyValue(
+                "OutputStream", -1, aStream, 
com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
+
+        // call normal store method
+        storeToURL( "private:stream", aExtendedArguments );
+
+        // get byte array from document stream
+        try { aStream.closeOutput(); }
+        catch ( com.sun.star.io.NotConnectedException aExc )
+        { /* TDB */ }
+        catch ( com.sun.star.io.BufferSizeExceededException aExc )
+        { /* TDB */ }
+        catch ( com.sun.star.io.IOException aExc )
+        { throw new java.io.IOException(); }
+        return aStream.getBuffer();
+    }
 
     // @requirement FUNC.BEAN.PROG/0.5
     // @requirement API.SIM.SEAP/0.2
diff --git a/bean/com/sun/star/comp/beans/OfficeConnection.java 
b/bean/com/sun/star/comp/beans/OfficeConnection.java
index ec239d4..2786810 100644
--- a/bean/com/sun/star/comp/beans/OfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/OfficeConnection.java
@@ -40,7 +40,13 @@ public interface OfficeConnection
     void setUnoUrl(String url)
         throws java.net.MalformedURLException;
 
-
+    /**
+     * Sets an AWT container catory.
+     *
+     * @param containerFactory This is a application provided AWT container
+     *  factory.
+     */
+    void setContainerFactory(ContainerFactory containerFactory);
 
     /**
      * Retrieves the UNO component context.
commit 3ff2e4dc1d0ba922e06f0d5c90c85fee33623784
Author: Eike Rathke <er...@redhat.com>
Date:   Tue Sep 16 13:50:27 2014 +0200

    fdo#81357 no fallback for special codes without country
    
    Thanks to Justin Luth for the hint.
    
    Change-Id: I97bde18814368e589e2a1c275457489a0d7392d4

diff --git a/i18nlangtag/source/isolang/isolang.cxx 
b/i18nlangtag/source/isolang/isolang.cxx
index 141d913..e91b09e 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -1105,6 +1105,10 @@ com::sun::star::lang::Locale 
MsLangId::Conversion::getLocale( const IsoLanguageS
                     case LANGUAGE_USER_LOJBAN:
                     case LANGUAGE_KASHMIRI:
                     case LANGUAGE_USER_KEYID:
+                    // And the special codes without country.
+                    case LANGUAGE_MULTIPLE:
+                    case LANGUAGE_UNDETERMINED:
+                    case LANGUAGE_NONE:
                         return getLocale( pEntry);  // may override
                     default:
                         ;   // nothing
commit a3ed215584a9347f63739966c19a7dcb39c07b01
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 13:17:53 2014 +0200

    Add back XTestDialogHandler methods
    
    ...erroneously removed by 34bcf9b498bccb5c924f4cec850ff15d88df6f07 "java: 
remove
    dead methods," plus fix-up of d5a31b221510a506a9c43d2c9f44c55405ce13fd 
"java:
    remove unused parameters" regression.
    
    Change-Id: I2913af8f35b89ebc580ab5f4f0025b595ad8cd0f

diff --git 
a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java 
b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
index 4004a50..f814deb 100644
--- 
a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ 
b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
@@ -32,16 +32,23 @@
  *
  *************************************************************************/
 
+import com.sun.star.beans.XPropertySet;
 import com.sun.star.uno.Type;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XComponentContext;
+import com.sun.star.lang.XMultiComponentFactory;
 import com.sun.star.lang.XTypeProvider;
 import com.sun.star.lang.XServiceInfo;
 import com.sun.star.lang.XSingleComponentFactory;
 import com.sun.star.lib.uno.helper.Factory;
+import com.sun.star.awt.XControl;
+import com.sun.star.awt.XControlContainer;
+import com.sun.star.awt.XControlModel;
 import com.sun.star.awt.XDialog;
 import com.sun.star.awt.XDialogEventHandler;
+import com.sun.star.awt.XDialogProvider2;
 import com.sun.star.frame.XFrame;
+import com.sun.star.frame.XModel;
 
 import com.sun.star.awt.XToolkit;
 import com.sun.star.awt.XWindowPeer;
@@ -84,13 +91,79 @@ public class DialogComponent {
             }
         }
 
+        // XTestDialogHandler
+        public String createDialog( String DialogURL, XModel xModel, XFrame 
xFrame ) {
+            m_xFrame = xFrame;
 
+            try {
+                XMultiComponentFactory xMCF = m_xCmpCtx.getServiceManager();
+                Object obj;
+
+                // If valid we must pass the XModel when creating a 
DialogProvider object
+                if( xModel != null ) {
+                    Object[] args = new Object[1];
+                    args[0] = xModel;
+
+                    obj = xMCF.createInstanceWithArgumentsAndContext(
+                        "com.sun.star.awt.DialogProvider2", args, m_xCmpCtx );
+                }
+                else {
+                    obj = xMCF.createInstanceWithContext(
+                        "com.sun.star.awt.DialogProvider2", m_xCmpCtx );
+                }
+
+                XDialogProvider2 xDialogProvider = UnoRuntime.queryInterface( 
XDialogProvider2.class, obj );
 
+                XDialog xDialog = xDialogProvider.createDialogWithHandler( 
DialogURL, this );
+                if( xDialog != null )
+                    xDialog.execute();
+            }
+            catch (Exception e) {
+                e.printStackTrace();
+            }
+            return "Created dialog \"" + DialogURL + "\"";
+        }
 
+        public void copyText( XDialog xDialog, Object aEventObject ) {
+            XControlContainer xControlContainer = UnoRuntime.queryInterface(
+                XControlContainer.class, xDialog );
+            String aTextPropertyStr = "Text";
+            String aText = "";
+            XControl xTextField1Control = xControlContainer.getControl( 
"TextField1" );
+            XControlModel xControlModel1 = xTextField1Control.getModel();
+            XPropertySet xPropertySet1 = UnoRuntime.queryInterface(
+                XPropertySet.class, xControlModel1 );
+            try
+            {
+                aText = (String)xPropertySet1.getPropertyValue( 
aTextPropertyStr );
+            }
+            catch (Exception e) {
+                e.printStackTrace();
+            }
 
+            XControl xTextField2Control = xControlContainer.getControl( 
"TextField2" );
+            XControlModel xControlModel2 = xTextField2Control.getModel();
+            XPropertySet xPropertySet2 = UnoRuntime.queryInterface(
+                XPropertySet.class, xControlModel2 );
+            try
+            {
+                xPropertySet2.setPropertyValue( aTextPropertyStr, aText );
+            }
+            catch (Exception e) {
+                e.printStackTrace();
+            }
 
+            showMessageBox( "DialogComponent", "copyText() called" );
+        }
 
+        public void handleEvent() {
+            showMessageBox( "DialogComponent", "handleEvent() called" );
+        }
 
+        public void handleEventWithArguments( XDialog xDialog, Object 
aEventObject ) {
+            showMessageBox( "DialogComponent", "handleEventWithArguments() 
called\n\n" +
+                "Event Object = " + aEventObject );
+        }
 
         private final String aHandlerMethod1 = "doit1";
         private final String aHandlerMethod2 = "doit2";
commit d3886f87789c880a662eecc5986ac03e76ca13b6
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 13:02:06 2014 +0200

    Add back XExampleAddIn methods
    
    ...erroneously removed by 34bcf9b498bccb5c924f4cec850ff15d88df6f07 "java: 
remove
    dead methods"
    
    Change-Id: I3a6dc7b08af2097f15779a5116d04dd0c80429ec

diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java 
b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index 513bfa1..109335f 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -163,9 +163,30 @@ public class ExampleAddIn
 
         //  XExampleAddIn
 
+        public int getIncremented( int nValue )
+        {
+            return nValue + 1;
+        }
 
+        public com.sun.star.sheet.XVolatileResult getCounter(String aName)
+        {
+            if ( aResults == null )
+            {
+                // create the table of results, and start a thread to increment
+                // all counters
+                aResults = new java.util.HashMap<String, ExampleAddInResult>();
+                ExampleAddInThread aThread = new ExampleAddInThread( aResults 
);
+                aThread.start();
+            }
 
-
+            ExampleAddInResult aResult = aResults.get(aName);
+            if ( aResult == null )
+            {
+                aResult = new ExampleAddInResult(aName);
+                aResults.put( aName, aResult );
+            }
+            return aResult;
+        }
 
         //  XAddIn
 
commit 31c379041c6a40a7ef3862349ccb9f4f9ac23260
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 12:57:50 2014 +0200

    ScriptProvider implementations need to be accessible
    
    ...from com.sun.star.comp.loader.FactoryHelper.  Regression introduced with
    70f56bc22fe952c75ec714e05e1bb5296491a36a "java: reduce scope, make member
    classes private."
    
    Change-Id: Iabf41a5eca2df25408e90428c60736b4a73db4c3

diff --git 
a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
 
b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
index 1fc0d46..da534d6 100644
--- 
a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
+++ 
b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
@@ -49,7 +49,7 @@ import com.sun.star.script.framework.container.ScriptMetaData;
 
 public class ScriptProviderForBeanShell
 {
-    private static class ScriptProviderForBeanShell_2 extends ScriptProvider
+    public static class ScriptProviderForBeanShell_2 extends ScriptProvider
     {
         public ScriptProviderForBeanShell_2(XComponentContext ctx)
         {
diff --git 
a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
 
b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
index b3b0055..9bac3b7 100644
--- 
a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
+++ 
b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
@@ -43,7 +43,7 @@ import com.sun.star.script.framework.log.LogUtils;
 
 public class ScriptProviderForJava
 {
-    private static class _ScriptProviderForJava extends ScriptProvider
+    public static class _ScriptProviderForJava extends ScriptProvider
     {
         private Resolver m_resolutionPolicy = new StrictResolver();
 
diff --git 
a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
 
b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
index 2a70d59..1ef1ad7 100644
--- 
a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
+++ 
b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
@@ -50,7 +50,7 @@ import org.mozilla.javascript.JavaScriptException;
 
 public class ScriptProviderForJavaScript
 {
-    private static class ScriptProviderForJavaScript_2 extends ScriptProvider
+    public static class ScriptProviderForJavaScript_2 extends ScriptProvider
     {
         public ScriptProviderForJavaScript_2(XComponentContext ctx)
         {
commit 28114b8d5da8a03c59a6ed51a63fe7706433ca89
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 12:49:30 2014 +0200

    There is no com.sun.star.lib.util.ExceptionHelper
    
    Regression introduced with 6884ef6317ddc29a713a342fb102e28ebc8fa5cc "java: 
don't
    catch and then just rethrow an exception."
    
    Change-Id: I626eaefc7846e152dfb4cc105d665c9ccca68c08

diff --git 
a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java 
b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
index e51ed23..cca0c94 100644
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
+++ b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
@@ -32,7 +32,6 @@ import com.sun.star.io.XTruncate;
 import com.sun.star.lang.XComponent;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.lib.util.ExceptionHelper;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XComponentContext;
@@ -116,7 +115,9 @@ public final class OwnEmbeddedObject extends WeakBase
             }
             catch( com.sun.star.uno.Exception e )
             {
-                throw ExceptionHelper.initCause(new 
com.sun.star.io.IOException( "Error while switching object storage!" ), e);
+                com.sun.star.io.IOException e2 = new 
com.sun.star.io.IOException( "Error while switching object storage!" );
+                e2.initCause(e);
+                throw e2;
             }
         }
     }
@@ -173,7 +174,9 @@ public final class OwnEmbeddedObject extends WeakBase
         }
         catch( com.sun.star.uno.Exception e )
         {
-            throw ExceptionHelper.initCause(new com.sun.star.io.IOException( 
"Error while switching object storage!" ), e);
+            com.sun.star.io.IOException e2 = new com.sun.star.io.IOException( 
"Error while switching object storage!" );
+            e2.initCause(e);
+            throw e2;
         }
     }
 
@@ -265,7 +268,9 @@ public final class OwnEmbeddedObject extends WeakBase
         }
         catch( com.sun.star.uno.Exception e )
         {
-            throw ExceptionHelper.initCause(new com.sun.star.io.IOException( 
"Error while reading one of object streams!" ), e);
+            com.sun.star.io.IOException e2 = new com.sun.star.io.IOException( 
"Error while reading one of object streams!" );
+            e2.initCause(e);
+            throw e2;
         }
     }
 
commit 2217eefca975e202ce17c71f1a5b07bd588114a7
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 12:35:27 2014 +0200

    Add back getMyFirst/SecondValue methods
    
    ...erroneously removed by 34bcf9b498bccb5c924f4cec850ff15d88df6f07 "java: 
remove
    dead methods"
    
    Change-Id: Ic8e34eadb0d2f4d6abaa7ee243788dfcdffa7d1f

diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java 
b/odk/examples/java/Spreadsheet/CalcAddins.java
index afe636e..555ddde 100644
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ b/odk/examples/java/Spreadsheet/CalcAddins.java
@@ -89,11 +89,23 @@ public class CalcAddins {
         private static final short shortGETMYFIRSTVALUE = 0;
         private static final short shortGETMYSECONDVALUE = 1;
 
+/** TO DO:
+ * This is where you implement all methods of your interface. The parameters 
have to
+ * be the same as in your IDL file and their types have to be the correct
+ * IDL-to-Java mappings of their types in the IDL file.
+ */
+        public int getMyFirstValue(
+            com.sun.star.beans.XPropertySet xOptions
+        ) {
+            return 1;
+        }
 
-
-
-
-
+        public int getMySecondValue(
+            com.sun.star.beans.XPropertySet xOptions,
+            int intDummy
+        ) {
+            return( 2 + intDummy );
+        }
 
         // Implement method from interface XServiceName
         public String getServiceName() {
commit 474db92a1ab4dd1265b01c6247eeb5570acf7608
Author: Takeshi Abe <t...@fixedpoint.jp>
Date:   Fri Sep 12 15:36:34 2014 +0900

    fdo#75757: remove inheritance to std::vector
    
    from RecentlyUsedMasterPages::MasterPageList.
    
    Change-Id: Ifeb62d141a6394c7bd79a047a4904c372a8ebe66
    Reviewed-on: https://gerrit.libreoffice.org/11413
    Reviewed-by: David Tardon <dtar...@redhat.com>
    Tested-by: David Tardon <dtar...@redhat.com>

diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx 
b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 1ce3780..591b578 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -59,38 +59,10 @@ static const OUString& GetPathToSetNode (void)
     return sPathToSetNode;
 }
 
-class Descriptor
-{
-public:
-    OUString msURL;
-    OUString msName;
-    ::sd::sidebar::MasterPageContainer::Token maToken;
-    Descriptor (::sd::sidebar::MasterPageContainer::Token aToken,
-        const OUString& rsURL, const OUString& rsName)
-        : msURL(rsURL),
-          msName(rsName),
-          maToken(aToken)
-    {}
-    class TokenComparator
-    { public:
-        TokenComparator(::sd::sidebar::MasterPageContainer::Token aToken)
-            : maToken(aToken) {}
-        bool operator () (const Descriptor& rDescriptor)
-        { return maToken==rDescriptor.maToken; }
-    private: ::sd::sidebar::MasterPageContainer::Token maToken;
-    };
-};
-
 } // end of anonymous namespace
 
 namespace sd { namespace sidebar {
 
-class RecentlyUsedMasterPages::MasterPageList : public 
::std::vector<Descriptor>
-{
-public:
-    MasterPageList (void) {}
-};
-
 RecentlyUsedMasterPages* RecentlyUsedMasterPages::mpInstance = NULL;
 
 RecentlyUsedMasterPages&  RecentlyUsedMasterPages::Instance (void)
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx 
b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
index 8be36cb..aba7fe3 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
@@ -53,6 +53,32 @@ public:
     MasterPageContainer::Token GetTokenForIndex (sal_uInt32 nIndex) const;
 
 private:
+    class Descriptor
+    {
+    public:
+        OUString msURL;
+        OUString msName;
+        ::sd::sidebar::MasterPageContainer::Token maToken;
+        Descriptor (::sd::sidebar::MasterPageContainer::Token aToken,
+                    const OUString& rsURL, const OUString& rsName)
+            : msURL(rsURL),
+              msName(rsName),
+              maToken(aToken)
+        {}
+
+        class TokenComparator
+        {
+        public:
+            TokenComparator(::sd::sidebar::MasterPageContainer::Token aToken)
+                : maToken(aToken) {}
+            bool operator () (const Descriptor& rDescriptor)
+            { return maToken==rDescriptor.maToken; }
+
+        private:
+            ::sd::sidebar::MasterPageContainer::Token maToken;
+        };
+    };
+
     /** The single instance of this class.  It is created on demand when
         Instance() is called for the first time.
     */
@@ -60,7 +86,7 @@ private:
 
     ::std::vector<Link> maListeners;
 
-    class MasterPageList;
+    typedef ::std::vector<Descriptor> MasterPageList;
     ::std::auto_ptr<MasterPageList> mpMasterPages;
     unsigned long int mnMaxListSize;
     ::boost::shared_ptr<MasterPageContainer> mpContainer;
commit a00b92fa20da1820987f654a2ea9a1f830355738
Author: Lionel Elie Mamane <lio...@mamane.lu>
Date:   Tue Sep 16 12:25:29 2014 +0200

    Use system ODBC on MS Windows unless specifically overriden
    
    Change-Id: I11abb53486e45d9c7058c42011df41b5fad0fcde

diff --git a/configure.ac b/configure.ac
index 07ff996..c2f00fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1822,7 +1822,7 @@ AC_ARG_WITH(libbase-jar,
 AC_ARG_WITH(system-odbc,
     AS_HELP_STRING([--with-system-odbc],
         [Use the odbc headers already on system.]),,
-    [with_system_odbc="$with_system_headers"])
+    [with_system_odbc="auto"])
 
 AC_ARG_WITH(system-sane,
     AS_HELP_STRING([--with-system-sane],
@@ -8607,7 +8607,7 @@ dnl 
===================================================================
 dnl Check for system odbc
 dnl ===================================================================
 AC_MSG_CHECKING([which odbc headers to use])
-if test "$with_system_odbc" = "yes" ; then
+if test "$with_system_odbc" = "yes" -o '(' "$with_system_headers" = "yes" -a 
"$with_system_odbc" = "auto" ')' -o '(' "$_os" = "WINNT" -a  
"$with_system_odbc" != "no" ')'; then
     AC_MSG_RESULT([external])
     SYSTEM_ODBC_HEADERS=TRUE
 
commit 92dd751af9be372dc887dac91ebdfac44c13a171
Author: Lionel Elie Mamane <lio...@mamane.lu>
Date:   Tue Sep 16 12:24:58 2014 +0200

    that's probably what was intended
    
    Change-Id: Ie6628db43b8a0dc4913508040e79ee5b4cf10c51

diff --git a/configure.ac b/configure.ac
index ceba123..07ff996 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10687,8 +10687,8 @@ if test "$ENABLE_MEDIAWIKI" = "TRUE" -o 
"$ENABLE_REPORTBUILDER" = "TRUE"; then
         fi
         if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = 
"TRUE"; then
             if test -z $COMMONS_LOGGING_JAR; then
-                
AC_CHECK_FILE(/usr/share/java/commons-logging-$(COMMONS_LOGGING_VERSION).jar,
-                   [ 
COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-$(COMMONS_LOGGING_VERSION).jar
 ],
+                
AC_CHECK_FILE(/usr/share/java/commons-logging-${COMMONS_LOGGING_VERSION}.jar,
+                   [ 
COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-${COMMONS_LOGGING_VERSION}.jar
 ],
                    [
                         AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
                             [ 
COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
commit cb8a6709d1526f6ff9d2a3edbbcba12155048373
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 12:29:26 2014 +0200

    Add back __writeRegistryServiceInfo method
    
    ...erroneously removed by 34bcf9b498bccb5c924f4cec850ff15d88df6f07 "java: 
remove
    dead methods"
    
    Change-Id: I4a687bc83dd1c9d26d146fe0423b603f27ee2845

diff --git a/odk/examples/java/Inspector/Inspector.java 
b/odk/examples/java/Inspector/Inspector.java
index 1139b30..a537d9c 100644
--- a/odk/examples/java/Inspector/Inspector.java
+++ b/odk/examples/java/Inspector/Inspector.java
@@ -54,6 +54,7 @@ import com.sun.star.lang.XServiceInfo;
 import com.sun.star.lang.XSingleComponentFactory;
 import com.sun.star.lib.uno.helper.Factory;
 import com.sun.star.lib.uno.helper.WeakBase;
+import com.sun.star.registry.XRegistryKey;
 import com.sun.star.ui.dialogs.XExecutableDialog;
 import com.sun.star.ui.dialogs.XFolderPicker2;
 import com.sun.star.uno.UnoRuntime;
@@ -440,6 +441,17 @@ public class Inspector{
         return xFactory;
     }
 
-
+    /**
+     * Writes the service information into the given registry key.
+     * This method is called by the <code>JavaLoader</code>
+     * <p>
+     * @return  returns true if the operation succeeded
+     * @param   regKey the registryKey
+     * @see     com.sun.star.comp.loader.JavaLoader
+     */
+    public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
+        return (Factory.writeRegistryServiceInfo(_Inspector.class.getName(), 
_Inspector.getServiceNames(), regKey)
+                && InspectorAddon.__writeRegistryServiceInfo(regKey));
+    }
 }
 
commit 7d9d7ed9eccb1b887e6e0f84a33ffac0438aecd9
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Tue Sep 16 12:13:47 2014 +0200

    fdo#83518: We need the GL context when rendering text.
    
    Change-Id: I5e14dbb4f74000fe49aae9d864fa69266c131d53

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 6245b5f..5e95b42 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -423,6 +423,7 @@ void RenderBenchMarkThread::UpdateScreenText()
 {
     if (mpChart->mbScreenTextNewRender)
     {
+        mpChart->mpWindow->getContext().makeCurrent();
         mpChart->mpRenderer->ReleaseScreenTextTexture();
         for(boost::ptr_vector<opengl3D::Renderable3DObject>::iterator itr = 
mpChart->maScreenTextShapes.begin(),
                 itrEnd = mpChart->maScreenTextShapes.end(); itr != itrEnd; 
++itr)
@@ -430,6 +431,7 @@ void RenderBenchMarkThread::UpdateScreenText()
             itr->render();
         }
         mpChart->mbScreenTextNewRender = false;
+        mpChart->mpWindow->getContext().resetCurrent();
     }
 }
 
commit 9222f3c208e22f504b5bc05ae8e336fbe7af1652
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Tue Sep 16 11:54:46 2014 +0200

    Try to fix MacOSX-10.8_21-10.7SDK build
    
    Change-Id: I459098f3a9eeef21f63b324fc600aa51c7acdb0b

diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index b428b47..4eeccd8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1529,7 +1529,7 @@ DECLARE_OOXMLEXPORT_TEST(testLockedCanvas, 
"fdo78658.docx")
     if (!pXmlDoc)
         return;
     // Checking for lockedCanvas tag
-    assertXPath(pXmlDoc, "//lc:lockedCanvas[1]", 1);
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/lc:lockedCanvas",
 1);
 }
 
 DECLARE_OOXMLEXPORT_TEST(fdo78474, "fdo78474.docx")
commit 93410b5ba13749cf3663d3d696fe1a14474bf696
Author: Niklas Johansson <sleeping.pil...@gmail.com>
Date:   Mon Sep 15 08:57:01 2014 +0200

    fdo#81264 Calc is not accessible to screen readers if sheet is modified 
[a11y]
    
    When the IA2 changes was merged it removed the call to CommitFocusGained
    and thereby stopped sending a STATE_CHANGED FOCUSED. A big thank you to
    Joanmarie Diggs for noticing the lack of that event.
    
    I only tested the patch on Fedora, but I will have a look at Windows with
    NVDA as soon as the patch gets included in the daily builds.
    
    Change-Id: Ic616d1b367ad8b8ed5d243e0ba124764082e96f1
    Reviewed-on: https://gerrit.libreoffice.org/11451
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx 
b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 896d2bd..a1e9b8b 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -362,6 +362,7 @@ void ScAccessibleSpreadsheet::LostFocus()
 
 void ScAccessibleSpreadsheet::GotFocus()
 {
+    CommitFocusGained();
     AccessibleEventObject aEvent;
     aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
     aEvent.Source = uno::Reference< XAccessibleContext >(this);
commit c16f45db0ea20db6ca3906551c01fb18f9258c84
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 11:37:20 2014 +0200

    -Werror,-Wunused-function, loplugin:bodynotinblock
    
    Change-Id: I4bf0b36524d7372ab4b63b5646bead55a1b93122

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index b28cfc5..cf6683d 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -168,31 +168,6 @@ const sal_Char cActiveConnection[] = "ActiveConnection";
 namespace
 {
 
-bool lcl_getCountFromResultSet( sal_Int32& rCount, const 
uno::Reference<XResultSet>& xResultSet )
-{
-    uno::Reference<XPropertySet> xPrSet(xResultSet, UNO_QUERY);
-    if(xPrSet.is())
-    {
-        try
-        {
-            bool bFinal = false;
-            Any aFinal = xPrSet->getPropertyValue("IsRowCountFinal");
-            aFinal >>= bFinal;
-            if(!bFinal)
-            {
-                xResultSet->last();
-                xResultSet->first();
-            }
-            Any aCount = xPrSet->getPropertyValue("RowCount");
-            if( aCount >>= rCount )
-                return true;
-        }
-        catch(const Exception&)
-        {
-        }
-    }
-    return false;
-}
 // copy compatibility options
 void lcl_CopyCompatibilityOptions( SwWrtShell& rSourceShell, SwWrtShell& 
rTargetShell)
 {
@@ -1126,7 +1101,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                             else
                                 pTargetPageDesc = 
pTargetShell->FindPageDescByName( sModifiedStartingPageDesc );
 
-                                sal_uInt16 nStartPage = 
pTargetShell->GetPageCnt();
+                            sal_uInt16 nStartPage = pTargetShell->GetPageCnt();
 #ifdef DBG_UTIL
                             if ( nDocNo <= MAX_DOC_DUMP )
                                 lcl_SaveDoc( xWorkDocSh, "WorkDoc", nDocNo );
commit 6e92279a6e2a52d3e609d2f4690c3d5ef1a21059
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 11:28:54 2014 +0200

    -Werror,-Wsometimes-uninitialized
    
    Change-Id: I24baf1f0e559c92dfac1337cd70feb737155fe3b

diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index a7f9380..0247008 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -333,9 +333,9 @@ void SwDBField::Evaluate()
         SetFormat( nFmt = pMgr->GetColumnFmt( aTmpData.sDataSource, 
aTmpData.sCommand,
                                         aColNm, pDocFormatter, GetLanguage() 
));
 
-    sal_Int32 nColumnType;
-    if( DBL_MAX != nValue )
-        nColumnType = pMgr->GetColumnType(aTmpData.sDataSource, 
aTmpData.sCommand, aColNm);
+    sal_Int32 nColumnType = nValue == DBL_MAX
+        ? 0
+        : pMgr->GetColumnType(aTmpData.sDataSource, aTmpData.sCommand, aColNm);
 
     bValidValue = FormatValue( pDocFormatter, aContent, nFmt, nValue, 
nColumnType, this );
 
commit 7d34479c74eddaad90fc491210a7cd6eddcc4286
Author: Michael Jaumann <meta_...@yahoo.com>
Date:   Mon Sep 15 07:16:13 2014 +0000

    renamed function names from german to english
    
    Change-Id: I201dc723a22097709858b0a3489ac8a562cfccc2
    Reviewed-on: https://gerrit.libreoffice.org/11450
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/i18npool/source/search/levdis.cxx 
b/i18npool/source/search/levdis.cxx
index d23a278..7b5fe6e 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -276,10 +276,10 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool 
bRelaxed )
         if ( 0 == (nMid = Mid3( nX, nY, nZ )) )     // even two 0
             nLimit = nMax;  // either 0 or the only one >0
         else        // one is 0
-            nLimit = KGV( nMid, nMax );
+            nLimit = LCM( nMid, nMax );
     }
     else        // all three of them are not 0
-        nLimit = KGV( KGV( nX, nY ), nZ );
+        nLimit = LCM( LCM( nX, nY ), nZ );
     nRepP0 = ( nX ? nLimit / nX : nLimit + 1 );
     nInsQ0 = ( nY ? nLimit / nY : nLimit + 1 );
     nDelR0 = ( nZ ? nLimit / nZ : nLimit + 1 );
@@ -289,7 +289,7 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool 
bRelaxed )
 
 // greatest common divisior according to  Euklid (chaindivision)
 // special case: 0 plus anything produces 1
-int WLevDistance::GGT( int a, int b )
+int WLevDistance::GCD( int a, int b )
 {
     if ( !a || !b )
         return 1;
@@ -305,13 +305,13 @@ int WLevDistance::GGT( int a, int b )
     return( a ? a : b);
 }
 
-// least common multiple : a * b / GGT(a,b)
-int WLevDistance::KGV( int a, int b )
+// least common multiple : a * b / GCD(a,b)
+int WLevDistance::LCM( int a, int b )
 {
     if ( a > b )    // decrease owerflow chance
-        return( (a / GGT(a,b)) * b );
+        return( (a / GCD(a,b)) * b );
     else
-        return( (b / GGT(a,b)) * a );
+        return( (b / GCD(a,b)) * a );
 }
 
 // Minimum of three values
diff --git a/i18npool/source/search/levdis.hxx 
b/i18npool/source/search/levdis.hxx
index 74d4678..94200af 100644
--- a/i18npool/source/search/levdis.hxx
+++ b/i18npool/source/search/levdis.hxx
@@ -37,7 +37,7 @@
 
  Wertebereich fuer X,Y,Z ist 0..33 um mit Limit sicher unter
  16-bit-signed-int-max zu bleiben, 31*32*33 gibt das Maximum
- KGV(31,32,33) == 32736
+ LCM(31,32,33) == 32736
  */
 
 #define LEVDISDEFAULT_XOTHER    2
@@ -132,8 +132,8 @@ class WLevDistance
     inline int Min3( int x, int y, int z );     // inline wegen Schleife
     int Mid3( int x, int y, int z );
     int Max3( int x, int y, int z );
-    int GGT( int a, int b );     // Groesster Gemeinsamer Teiler
-    int KGV( int a, int b );     // Kleinstes Gemeinsames Vielfaches
+    int GCD( int a, int b );     // Groesster Gemeinsamer Teiler
+    int LCM( int a, int b );     // Kleinstes Gemeinsames Vielfaches
 
 public:
     // CToren mit Userangaben, danach mit GetLimit() Limit holen
commit 9922931ae62accdf70e734fc392125c0ed5d01c2
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Tue Sep 16 10:30:33 2014 +0200

    DOCX export: avoid inline shape inside shape text
    
    Drawing objects inside text boxes are supported by Writer, but not by
    Word. Such a document model is still created by the DOCX import for
    floating tables.  Till we recognize floating tables on export, at least
    make sure that inline shapes are delayed till the end of the floating
    table to avoid invalid output.
    
    That matches the behavior of handling anchored shapes inside shape text.
    
    Change-Id: I2fc4e2df009e0d70c369c1fea30b657af0697039

diff --git a/sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx 
b/sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx
new file mode 100644
index 0000000..46af8618
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index de91ec1..20b1301 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -219,6 +219,18 @@ DECLARE_OOXMLEXPORT_TEST(testfdo83428, "fdo83428.docx")
      CPPUNIT_ASSERT_EQUAL(OUString("Document"), 
getProperty<OUString>(xUDProps, "Testing"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testShapeInFloattable, "shape-in-floattable.docx")
+{
+    if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
+    {
+        // No nested drawingML w:txbxContent.
+        assertXPath(pXmlDoc, "//mc:Choice//w:txbxContent//w:txbxContent", 0);
+        // Instead, make sure we have a separate shape and group shape:
+        assertXPath(pXmlDoc, 
"//mc:AlternateContent//mc:Choice[@Requires='wps']", 1);
+        assertXPath(pXmlDoc, 
"//mc:AlternateContent//mc:Choice[@Requires='wpg']", 1);
+    }
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index eaa85be..33d3134 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4887,8 +4887,6 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const 
sw::Frame &rFrame, const Po
                     }
                     else
                     {
-                        uno::Reference<drawing::XShape> 
xShape(const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY_THROW);
-                        OUString sShapeType = xShape->getShapeType();
                         if ( m_postponedDMLDrawing == NULL )
                         {
                             bool bStartedParaSdt = m_bStartedParaSdt;
@@ -4908,8 +4906,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const 
sw::Frame &rFrame, const Po
                         }
                         // IsAlternateContentChoiceOpen() : check is to ensure 
that only one object is getting added. Without this check, plus one obejct gets 
added
                         // m_bParagraphFrameOpen : Check if the frame is open.
-                        // sShapeType : This check is to ensure that if the 
custom shape is within a text frame then only we should postpone it.
-                        else if (IsAlternateContentChoiceOpen() && 
m_bParagraphFrameOpen && sShapeType == "com.sun.star.drawing.CustomShape")
+                        else if (IsAlternateContentChoiceOpen() && 
m_bParagraphFrameOpen)
                         {
                             
m_postponedCustomShape->push_back(PostponedDrawing(pSdrObj, 
&(rFrame.GetFrmFmt()), &rNdTopLeft));
                         }
commit 9f1920e7062c958593c2d2eca590cd8b9e3c5027
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Sep 16 11:00:36 2014 +0200

    loplugin:saloverride
    
    Change-Id: Id88a0130bf6468013e2d7441ec79131fe115d13b

diff --git a/vcl/source/window/menubarwindow.hxx 
b/vcl/source/window/menubarwindow.hxx
index f5da956..52d0820 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -109,7 +109,7 @@ public:
                     MenuBarWindow( Window* pParent );
                     virtual ~MenuBarWindow();
 
-    virtual void    ShowButtons(bool bClose, bool bFloat, bool bHide);
+    virtual void    ShowButtons(bool bClose, bool bFloat, bool bHide) 
SAL_OVERRIDE;
 
     virtual void    MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
commit 126b4407bade85298f983f545d6f507534fab61d
Author: Eilidh McAdam <eilidh.mca...@gmail.com>
Date:   Fri Jul 25 20:38:08 2014 +0100

    Remove superfluous merge function.
    
    The only caller of MergeDocuments now uses MergeMailFiles instead,
    so MergeDocuments can be removed.
    
    Change-Id: I03903a7f85c8328ab3f28cb1d23130557a1be7b4
    Reviewed-on: https://gerrit.libreoffice.org/10982
    Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 18105cf..61eb740 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -367,8 +367,6 @@ public:
                             sal_Int32 _nCommandType,
                             const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>& _xConnection
                             );
-    //merge into one document - returns the number of merged docs
-    sal_Int32 MergeDocuments( SwMailMergeConfigItem& rMMConfig, SwView& 
rSourceView );
 };
 
 #endif
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index fdd8e69..b28cfc5 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2772,258 +2772,6 @@ uno::Reference<XResultSet> 
SwDBManager::createCursor(const OUString& _sDataSourc
     return xResultSet;
 }
 
-// merge all data into one resulting document and return the number of merged 
documents
-sal_Int32 SwDBManager::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
-                            SwView& rSourceView )
-{
-#ifdef DBG_UTIL
-    lcl_SaveDoc( rSourceView.GetDocShell(), "MergeSource" );
-#endif
-
-    // check the availability of all data in the config item
-    uno::Reference< XResultSet> xResultSet = rMMConfig.GetResultSet();
-    if(!xResultSet.is())
-        return 0;
-    bInMerge = true;
-    sal_Int32 nRet  = 0;
-    pImpl->pMergeData = new SwDSParam(
-        rMMConfig.GetCurrentDBData(), xResultSet, rMMConfig.GetSelection());
-
-    try{
-        //set to start position
-        if(pImpl->pMergeData->aSelection.getLength())
-        {
-            sal_Int32 nPos = 0;
-            pImpl->pMergeData->aSelection.getConstArray()[ 
pImpl->pMergeData->nSelectionIndex++ ] >>= nPos;
-            pImpl->pMergeData->bEndOfDB = 
!pImpl->pMergeData->xResultSet->absolute( nPos );
-            pImpl->pMergeData->CheckEndOfDB();
-            if(pImpl->pMergeData->nSelectionIndex >= 
pImpl->pMergeData->aSelection.getLength())
-                pImpl->pMergeData->bEndOfDB = true;
-        }
-        else
-        {
-            pImpl->pMergeData->bEndOfDB = 
!pImpl->pMergeData->xResultSet->first();
-            pImpl->pMergeData->CheckEndOfDB();
-        }
-    }
-    catch(const Exception&)
-    {
-        pImpl->pMergeData->bEndOfDB = true;
-        pImpl->pMergeData->CheckEndOfDB();
-        OSL_FAIL("exception in MergeNew()");
-    }
-
-    //bCancel is set from the PrintMonitor
-    bCancel = false;
-
-    CreateMonitor aMonitorDlg(&rSourceView.GetEditWin());
-    aMonitorDlg.SetCancelHdl(LINK(this, SwDBManager, PrtCancelHdl));
-    if (!IsMergeSilent())
-    {
-        aMonitorDlg.Show();
-        aMonitorDlg.Invalidate();
-        aMonitorDlg.Update();
-        // the print monitor needs some time to act
-        for( sal_uInt16 i = 0; i < 25; i++)
-            Application::Reschedule();
-    }
-
-    SwWrtShell& rSourceShell = rSourceView.GetWrtShell();
-    bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && 
rSourceShell.GetSectionFmtCount() > 1;
-
-    //determine the page style and number used at the start of the source 
document
-    rSourceShell.SttEndDoc(true);
-    sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum();
-    OUString sModifiedStartingPageDesc;
-    OUString sStartingPageDesc = sModifiedStartingPageDesc = 
rSourceShell.GetPageDesc(
-                                rSourceShell.GetCurPageDesc()).GetName();
-
-    try
-    {
-        // create a target docshell to put the merged document into
-        SfxObjectShellRef xTargetDocShell( new SwDocShell( 
SFX_CREATE_MODE_STANDARD ) );
-        xTargetDocShell->DoInitNew( 0 );
-#ifdef DBG_UTIL
-        lcl_SaveDoc( xTargetDocShell, "MergeDoc" );
-#endif
-        SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( 
*xTargetDocShell, 0 );
-
-        //the created window has to be located at the same position as the 
source window
-        Window& rTargetWindow = pTargetFrame->GetFrame().GetWindow();
-        Window& rSourceWindow = 
rSourceView.GetViewFrame()->GetFrame().GetWindow();
-        rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel());
-
-        SwView* pTargetView = static_cast<SwView*>( 
pTargetFrame->GetViewShell() );
-        rMMConfig.SetTargetView(pTargetView);
-
-        //initiate SelectShell() to create sub shells
-        pTargetView->AttrChangedNotify( &pTargetView->GetWrtShell() );
-        SwWrtShell* pTargetShell = pTargetView->GetWrtShellPtr();
-        SwDoc* pTargetDoc = pTargetShell->GetDoc();
-
-        //copy the styles from the source to the target document
-        pTargetView->GetDocShell()->_LoadStyles( *rSourceView.GetDocShell(), 
true );
-
-        // #i63806#
-        const SwPageDesc* pSourcePageDesc = rSourceShell.FindPageDescByName( 
sStartingPageDesc );
-        const SwFrmFmt& rMaster = pSourcePageDesc->GetMaster();
-        bool bPageStylesWithHeaderFooter = rMaster.GetHeader().IsActive()  ||
-                                        rMaster.GetFooter().IsActive();
-
-        // copy compatibility options
-        lcl_CopyCompatibilityOptions( rSourceShell, *pTargetShell);
-        // #72821# copy dynamic defaults
-        lcl_CopyDynamicDefaults( *rSourceShell.GetDoc(), 
*pTargetShell->GetDoc() );
-
-        long nStartRow, nEndRow;
-        sal_uLong nDocNo = 1;
-        sal_Int32 nDocCount = 0;
-        if( !IsMergeSilent() && lcl_getCountFromResultSet( nDocCount, 
pImpl->pMergeData->xResultSet ) )
-            aMonitorDlg.SetTotalCount( nDocCount );
-
-        do
-        {
-            nStartRow = pImpl->pMergeData->xResultSet->getRow();
-            if (!IsMergeSilent())
-            {
-                aMonitorDlg.SetCurrentPosition( nDocNo );
-                aMonitorDlg.Invalidate();
-                aMonitorDlg.Update();
-                // the print monitor needs some time to act
-                for( sal_uInt16 i = 0; i < 25; i++)
-                    Application::Reschedule();
-            }
-
-            // copy the source document
-            // the copy will be closed later, but it is more safe to use 
SfxObjectShellLock here
-            SfxObjectShellLock xWorkDocSh = 
rSourceView.GetDocShell()->GetDoc()->CreateCopy(true);
-#ifdef DBG_UTIL
-            if ( nDocNo <= MAX_DOC_DUMP )
-                lcl_SaveDoc( xWorkDocSh, "WorkDoc", nDocNo );
-#endif
-
-            //create a ViewFrame
-            SwView* pWorkView = static_cast< SwView* >( 
SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() );
-            SwWrtShell& rWorkShell = pWorkView->GetWrtShell();
-            pWorkView->AttrChangedNotify( &rWorkShell );// in order for 
SelectShell to be called
-
-                // merge the data
-                SwDoc* pWorkDoc = rWorkShell.GetDoc();
-                SwDBManager* pWorkDBManager = pWorkDoc->GetDBManager();
-                pWorkDoc->SetDBManager( this );
-                pWorkDoc->getIDocumentLinksAdministration().EmbedAllLinks();
-
-                SwUndoId nLastUndoId(UNDO_EMPTY);
-                if (rWorkShell.GetLastUndoInfo(0, & nLastUndoId))
-                {
-                    if (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId)
-                    {
-                        rWorkShell.Undo();
-                    }
-                }
-
-                // #i69458# lock fields to prevent access to the result set 
while calculating layout
-                rWorkShell.LockExpFlds();
-                // create a layout
-                rWorkShell.CalcLayout();
-                rWorkShell.UnlockExpFlds();
-
-            SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, 
SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE), 
rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
-            rWorkShell.SwViewShell::UpdateFlds();
-            
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, 
SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE_FINISHED), 
rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
-
-            // strip invisible content and convert fields to text
-            rWorkShell.RemoveInvisibleContent();
-            rWorkShell.ConvertFieldsToText();
-            rWorkShell.SetNumberingRestart();
-            if( bSynchronizedDoc )
-            {
-                lcl_RemoveSectionLinks( rWorkShell );
-            }
-
-            // insert the document into the target document
-
-            //#i63806# put the styles to the target document
-            //if the source uses headers or footers each new copy need to copy 
a new page styles
-            SwPageDesc* pTargetPageDesc;
-            if(bPageStylesWithHeaderFooter)
-            {
-                //create a new pagestyle
-                //copy the pagedesc from the current document to the new 
document and change the name of the to-be-applied style
-                OUString sNewPageDescName = lcl_FindUniqueName(pTargetShell, 
sStartingPageDesc, nDocNo );
-                pTargetPageDesc = pTargetDoc->MakePageDesc( sNewPageDescName );
-                const SwPageDesc* pWorkPageDesc = 
rWorkShell.FindPageDescByName( sStartingPageDesc );
-
-                if(pWorkPageDesc && pTargetPageDesc)
-                {
-                    pTargetDoc->CopyPageDesc( *pWorkPageDesc, 
*pTargetPageDesc, false );
-                    sModifiedStartingPageDesc = sNewPageDescName;
-                    lcl_CopyFollowPageDesc( *pTargetShell, *pWorkPageDesc, 
*pTargetPageDesc, nDocNo );
-                }
-            }
-            else
-                pTargetPageDesc = pTargetShell->FindPageDescByName( 
sModifiedStartingPageDesc );
-
-            sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt();
-            OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with 
a table - paragraph should be appended");
-
-#ifdef DBG_UTIL
-            if ( nDocNo <= MAX_DOC_DUMP )
-                lcl_SaveDoc( xWorkDocSh, "WorkDoc", nDocNo );
-#endif
-            pTargetDoc->AppendDoc(*rWorkShell.GetDoc(),
-                    nStartingPageNo, pTargetPageDesc, nDocNo == 1);
-
-            // #i72820# calculate layout to be able to find the correct page 
index
-            pTargetShell->CalcLayout();
-#ifdef DBG_UTIL
-            if ( nDocNo <= MAX_DOC_DUMP )
-                lcl_SaveDoc( xTargetDocShell, "MergeDoc" );
-#endif
-
-            // add the document info to the config item
-            SwDocMergeInfo aMergeInfo;
-            aMergeInfo.nStartPageInTarget = nPageCountBefore;
-            aMergeInfo.nEndPageInTarget = pTargetShell->GetPageCnt();
-            aMergeInfo.nDBRow = nStartRow;
-            rMMConfig.AddMergedDocument( aMergeInfo );
-            ++nRet;
-
-            // the print monitor needs some time to act
-            for( sal_uInt16 i = 0; i < 25; i++)
-                Application::Reschedule();
-
-            // restore the old DBManager
-            pWorkDoc->SetDBManager( pWorkDBManager );
-            // close the temporary document
-            xWorkDocSh->DoClose();
-
-            nEndRow = pImpl->pMergeData->xResultSet->getRow();
-            ++nDocNo;
-        } while( !bCancel &&
-                (bSynchronizedDoc && (nStartRow != nEndRow)? 
ExistsNextRecord() : ToNextMergeRecord()));
-
-        // deselect all, go out of the frame and go to the beginning of the 
document
-        Point aPt(LONG_MIN, LONG_MIN);
-        pTargetShell->SelectObj(aPt, SW_LEAVE_FRAME);
-        if (pTargetShell->IsSelFrmMode())
-        {
-            pTargetShell->UnSelectFrm();
-            pTargetShell->LeaveSelFrmMode();
-        }
-        pTargetShell->EnterStdMode();
-        pTargetShell->SttDoc();
-
-    }
-    catch(const Exception&)
-    {
-        OSL_FAIL("exception caught in SwDBManager::MergeDocuments");
-    }
-    DELETEZ(pImpl->pMergeData);
-    bInMerge = false;
-    return nRet;
-}
-
 
SwConnectionDisposedListener_Impl::SwConnectionDisposedListener_Impl(SwDBManager&
 rMgr) :
     rDBManager(rMgr)
 {
commit 636718c960a36bc28d37a69ac102dd6cb696bfba
Author: Eilidh McAdam <eilidh.mca...@gmail.com>
Date:   Fri Jul 25 20:35:43 2014 +0100

    Make UNO and wizard mail merge use same function.
    
    Instead of MergeDocuments and MergeMailFiles duplicating largely the
    same functionality, the only user of MergeDocuments (MM wizard) now
    uses MergeMailFiles.
    
    Change-Id: Ifad183bdeabf5ca1eb08b4b1df557404a54a9fdd
    Reviewed-on: https://gerrit.libreoffice.org/10981
    Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 29fa03b..18105cf 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -79,8 +79,9 @@ enum DBManagerOptions
     DBMGR_MERGE,             ///< Data records in fields.
     DBMGR_MERGE_MAILMERGE,   ///< Print mail merge.
     DBMGR_MERGE_MAILING,     ///< Send mail merge as email.
-    DBMGR_MERGE_MAILFILES,   ///< Save mail merg as files.
-    DBMGR_MERGE_SINGLE_FILE  ///< Save merge as single file.
+    DBMGR_MERGE_MAILFILES,   ///< Save mail merge as files.
+    DBMGR_MERGE_SINGLE_FILE, ///< Save merge as single file.
+    DBMGR_MERGE_ONLY         ///< Create merge doc w/o save/print.
 };
 
 // Administration of (new) logical databases.
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx 
b/sw/source/ui/dbui/mailmergewizard.cxx
index 677717d..d2ac379 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -34,6 +34,7 @@
 #include <sfx2/viewfrm.hxx>
 #include <wrtsh.hxx>
 #include <vcl/msgbox.hxx>
+#include <svx/dataaccessdescriptor.hxx>
 
 #include <helpid.h>
 
@@ -269,8 +270,19 @@ void SwMailMergeWizard::UpdateRoadmap()
 // enables/disables pages in the roadmap depending on the current page and 
state
 void SwMailMergeWizard::CreateTargetDocument()
 {
-    GetSwView()->GetWrtShell().GetDBManager()->
-                MergeDocuments( m_rConfigItem, *GetSwView() );
+    svx::ODataAccessDescriptor aDescriptor;
+    aDescriptor.setDataSource( m_rConfigItem.GetCurrentDBData().sDataSource );
+    aDescriptor[ svx::daConnection ]  <<= 
m_rConfigItem.GetConnection().getTyped();
+    aDescriptor[ svx::daCursor ]      <<= m_rConfigItem.GetResultSet();
+    aDescriptor[ svx::daCommand ]     <<= 
m_rConfigItem.GetCurrentDBData().sCommand;
+    aDescriptor[ svx::daCommandType ] <<= 
m_rConfigItem.GetCurrentDBData().nCommandType;
+
+    SwMergeDescriptor aMergeDesc( DBMGR_MERGE_ONLY, GetSwView()->GetWrtShell(),
+        aDescriptor);
+    aMergeDesc.pMailMergeConfigItem = &m_rConfigItem;
+    aMergeDesc.bCreateSingleFile = true;
+
+    GetSwView()->GetWrtShell().GetDBManager()->MergeNew( aMergeDesc );
     m_rConfigItem.SetMergeDone();
     if( m_rConfigItem.GetTargetView() )
         m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame().Appear();
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index fcb47c6..fdd8e69 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -318,7 +318,7 @@ static bool lcl_GetColumnCnt(SwDSParam* pParam,
 };
 
 // import data
-bool SwDBManager::MergeNew(const SwMergeDescriptor& rMergeDesc )
+bool SwDBManager::MergeNew( const SwMergeDescriptor& rMergeDesc )
 {
     OSL_ENSURE(!bInMerge && !pImpl->pMergeData, "merge already activated!");
 
@@ -434,6 +434,7 @@ bool SwDBManager::MergeNew(const SwMergeDescriptor& 
rMergeDesc )
         case DBMGR_MERGE_MAILING:
         case DBMGR_MERGE_MAILFILES:
         case DBMGR_MERGE_SINGLE_FILE:
+        case DBMGR_MERGE_ONLY:
             // save files and send them as e-Mail if required
             bRet = MergeMailFiles(&rMergeDesc.rSh,
                     rMergeDesc);
@@ -849,13 +850,14 @@ static void lcl_SaveDoc( SfxObjectShell *xTargetDocShell,
 #endif
 
 bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
-        const SwMergeDescriptor& rMergeDescriptor)
+                                 const SwMergeDescriptor& rMergeDescriptor)
 {
     //check if the doc is synchronized and contains at least one linked section
     bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && 
pSourceShell->GetSectionFmtCount() > 1;
     bool bNoError = true;
     bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
     const bool bAsSingleFile = rMergeDescriptor.nMergeType == 
DBMGR_MERGE_SINGLE_FILE;
+    bool bMergeOnly = rMergeDescriptor.nMergeType == DBMGR_MERGE_ONLY;
 
     ::rtl::Reference< MailDispatcher >          xMailDispatcher;
     OUString sBodyMimeType;
@@ -925,9 +927,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
             SwWrtShell* pTargetShell = 0;
             SwDoc* pTargetDoc = 0;
 
-            // the shell will be explicitly closed at the end of the method, 
but it is
-            // still more safe to use SfxObjectShellLock here
-            SfxObjectShellLock xTargetDocShell;
+            SfxObjectShellRef xTargetDocShell;
 
             SwView* pTargetView = 0;
             boost::scoped_ptr< utl::TempFile > aTempFile;
@@ -1126,6 +1126,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                             else
                                 pTargetPageDesc = 
pTargetShell->FindPageDescByName( sModifiedStartingPageDesc );
 
+                                sal_uInt16 nStartPage = 
pTargetShell->GetPageCnt();
 #ifdef DBG_UTIL
                             if ( nDocNo <= MAX_DOC_DUMP )
                                 lcl_SaveDoc( xWorkDocSh, "WorkDoc", nDocNo );
@@ -1139,6 +1140,15 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* 
pSourceShell,
                             if ( nDocNo <= MAX_DOC_DUMP )
                                 lcl_SaveDoc( xTargetDocShell, "MergeDoc" );
 #endif
+                            if (bMergeOnly)
+                            {
+                                SwDocMergeInfo aMergeInfo;
+                                aMergeInfo.nStartPageInTarget = nStartPage;
+                                aMergeInfo.nEndPageInTarget =
+                                    nStartPage + pSourceShell->GetPageCnt() - 
1;
+                                aMergeInfo.nDBRow = nStartRow;
+                                
rMergeDescriptor.pMailMergeConfigItem->AddMergedDocument( aMergeInfo );
+                            }
                         }
                         else
                         {
@@ -1278,7 +1288,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* 
pSourceShell,
             aPrtMonDlg.Show( false );
 
             // save the single output document
-            if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
+            if (bMergeOnly)
+            {
+                rMergeDescriptor.pMailMergeConfigItem->SetTargetView( 
pTargetView );
+            }
+            else if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
             {
                 if( rMergeDescriptor.nMergeType != DBMGR_MERGE_MAILMERGE )
                 {
@@ -1347,7 +1361,10 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* 
pSourceShell,
 
                         pTargetView->ExecPrint( aOptions, IsMergeSilent(), 
rMergeDescriptor.bPrintAsync );
                 }
-                xTargetDocShell->DoClose();
+
+                // Leave docshell available for caller (e.g. MM wizard)
+                if (!bMergeOnly)
+                    xTargetDocShell->DoClose();
             }
 
             //remove the temporary files
@@ -2770,7 +2787,7 @@ sal_Int32 SwDBManager::MergeDocuments( 
SwMailMergeConfigItem& rMMConfig,
     bInMerge = true;
     sal_Int32 nRet  = 0;
     pImpl->pMergeData = new SwDSParam(
-                rMMConfig.GetCurrentDBData(), xResultSet, 
rMMConfig.GetSelection());
+        rMMConfig.GetCurrentDBData(), xResultSet, rMMConfig.GetSelection());
 
     try{
         //set to start position
commit 4851cde7b98226b0f82ae2b191c290173e9b06c6
Author: Jan-Marek Glogowski <glo...@fbihome.de>
Date:   Sat Jul 12 23:17:31 2014 +0200

    fdo#70346 MM: add mail merge data to condition dict
    
    Currently section hide conditions are just evaluated based on
    document field data.
    
    This adds the current mail merge dataset to the condition
    dictionary, so this can be used in the condition evaluation.
    
    The dataset values are named from their columns and added initially,
    therefore DB fields with identical names will overwrite the values
    in the dictionary!
    
    Change-Id: I82a5f9f6962628a76c836e8e2a7c9e264fdc16e0
    Reviewed-on: https://gerrit.libreoffice.org/10978
    Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 8677265..d9d92f0 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -109,6 +109,9 @@ public:
     inline const SwDBData&  GetDBData() const { return 
((SwDBFieldType*)GetTyp())->GetDBData(); }
     virtual bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 
nWhich ) const SAL_OVERRIDE;
     virtual bool        PutValue( const com::sun::star::uno::Any& rVal, 
sal_uInt16 nWhich ) SAL_OVERRIDE;
+
+    static bool FormatValue( SvNumberFormatter* pDocFormatter, OUString 
&aString, sal_uInt32 nFmt,
+                             double &aNumber, sal_Int32 nColumnType, SwDBField 
*pField = NULL );
 };
 
 inline  void SwDBField::SetExpansion(const OUString& rStr)
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 6d9d7fe..29fa03b 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
+
 namespace com{namespace sun{namespace star{
     namespace sdbc{
         class XConnection;
@@ -71,6 +72,7 @@ class SvNumberFormatter;
 class SwDbtoolsClient;
 class SwXMailMerge;
 class SwMailMergeConfigItem;
+class SwCalc;
 
 enum DBManagerOptions
 {
@@ -264,7 +266,6 @@ public:
                           const OUString& rColNm );
 
     inline bool     IsInMerge() const   { return bInMerge; }
-    void            EndMerge();
 
     void            ExecuteFormLetter(SwWrtShell& rSh,
                         const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue>& rProperties,
@@ -297,7 +298,9 @@ public:
     void            CloseAll(bool bIncludingMerge = true);
 
     bool            GetMergeColumnCnt(const OUString& rColumnName, sal_uInt16 
nLanguage,
-                                OUString &rResult, double *pNumber, sal_uInt32 
*pFormat);
+                                      OUString &rResult, double *pNumber, 
sal_uInt32 *pFormat);
+    bool            FillCalcWithMergeData(SvNumberFormatter *pDocFormatter,
+                                          sal_uInt16 nLanguage, bool asString, 
SwCalc &aCalc);
     bool            ToNextMergeRecord();
     bool            ToNextRecord(const OUString& rDataSource, const OUString& 
rTableOrQuery, sal_Int32 nCommandType = -1);
 
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index 95e51f8..728f349 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -895,7 +895,12 @@ void DocumentFieldsManager::UpdateExpFlds( SwTxtFld* 
pUpdtFld, bool bUpdRefFlds
 
     // already set the current record number
     SwDBManager* pMgr = m_rSwdoc.GetDBManager();
-    pMgr->CloseAll(false);
+    pMgr->CloseAll( false );
+
+    SvtSysLocale aSysLocale;
+    const LocaleDataWrapper* pLclData = aSysLocale.GetLocaleDataPtr();
+    const long nLang = pLclData->getLanguageTag().getLanguageType();
+    bool bCanFill = pMgr->FillCalcWithMergeData( 
m_rSwdoc.GetNumberFormatter(), nLang, true, aCalc );
 #endif
 
     // Make sure we don't hide all sections, which would lead to a crash. 
First, count how many of them do we have.
@@ -990,6 +995,8 @@ void DocumentFieldsManager::UpdateExpFlds( SwTxtFld* 
pUpdtFld, bool bUpdRefFlds
 #if HAVE_FEATURE_DBCONNECTIVITY
         {
             UpdateDBNumFlds( *(SwDBNameInfField*)pFld, aCalc );
+            if( bCanFill )
+                bCanFill = pMgr->FillCalcWithMergeData( 
m_rSwdoc.GetNumberFormatter(), nLang, true, aCalc );
         }
 #endif
         break;
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 9318e09..a7f9380 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -263,6 +263,52 @@ SwFieldType* SwDBField::ChgTyp( SwFieldType* pNewType )
     return pOld;
 }
 
+bool SwDBField::FormatValue( SvNumberFormatter* pDocFormatter, OUString 
&aString, sal_uInt32 nFmt,
+                             double &aNumber, sal_Int32 nColumnType, SwDBField 
*pField )
+{
+    bool bValidValue = false;
+
+    if( DBL_MAX != aNumber )
+    {
+        if( DataType::DATE == nColumnType || DataType::TIME == nColumnType ||
+            DataType::TIMESTAMP  == nColumnType )
+        {
+            Date aStandard( 1, 1, 1900 );
+            if( *pDocFormatter->GetNullDate() != aStandard )
+                aNumber += (aStandard - *pDocFormatter->GetNullDate());
+        }
+        bValidValue = true;
+        if( pField )
+            pField->SetValue( aNumber );
+    }
+    else
+    {
+        SwSbxValue aVal;
+        aVal.PutString( aString );
+
+        if (aVal.IsNumeric())
+        {
+            if( pField )
+                pField->SetValue(aVal.GetDouble());
+            else
+                aNumber = aVal.GetDouble();
+
+            if (nFmt && nFmt != SAL_MAX_UINT32 && 
!pDocFormatter->IsTextFormat(nFmt))
+                bValidValue = true; // because of bug #60339 not for all 
strings
+        }
+        else
+        {
+            // if string length > 0 then true, else false
+            if( pField )
+                pField->SetValue(aString.isEmpty() ? 0 : 1);
+            else
+                aNumber = aString.isEmpty() ? 0 : 1;
+        }
+    }
+
+    return bValidValue;
+}
+
 /// get current field value and cache it
 void SwDBField::Evaluate()
 {
@@ -287,40 +333,15 @@ void SwDBField::Evaluate()
         SetFormat( nFmt = pMgr->GetColumnFmt( aTmpData.sDataSource, 
aTmpData.sCommand,
                                         aColNm, pDocFormatter, GetLanguage() 
));
 
+    sal_Int32 nColumnType;
     if( DBL_MAX != nValue )
-    {
-        sal_Int32 nColumnType = pMgr->GetColumnType(aTmpData.sDataSource, 
aTmpData.sCommand, aColNm);
-        if( DataType::DATE == nColumnType  || DataType::TIME == nColumnType  ||
-                 DataType::TIMESTAMP  == nColumnType)
+        nColumnType = pMgr->GetColumnType(aTmpData.sDataSource, 
aTmpData.sCommand, aColNm);
 
-        {
-            Date aStandard(1,1,1900);
-            if (*pDocFormatter->GetNullDate() != aStandard)
-                nValue += (aStandard - *pDocFormatter->GetNullDate());
-        }
-        bValidValue = true;
-        SetValue(nValue);
-        aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(nValue, 
GetFormat(), GetLanguage());
-    }
-    else
-    {
-        SwSbxValue aVal;
-        aVal.PutString( aContent );
+    bValidValue = FormatValue( pDocFormatter, aContent, nFmt, nValue, 
nColumnType, this );
 
-        if (aVal.IsNumeric())
-        {
-            SetValue(aVal.GetDouble());
+    if( DBL_MAX != nValue )
+        aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(nValue, 
GetFormat(), GetLanguage());
 
-            SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
-            if (nFmt && nFmt != SAL_MAX_UINT32 && 
!pFormatter->IsTextFormat(nFmt))
-                bValidValue = true; // because of bug #60339 not for all 
strings
-        }
-        else
-        {
-            // if string length > 0 then true, else false
-            SetValue(aContent.isEmpty() ? 0 : 1);
-        }
-    }
     bInitialized = true;
 }
 
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 9171bcd..fcb47c6 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -128,6 +128,10 @@
 #include <unomid.h>
 #include <section.hxx>
 #include <rootfrm.hxx>
+#include <fmtpdsc.hxx>
+#include <ndtxt.hxx>
+#include <calc.hxx>
+#include <dbfld.hxx>
 
 #include <boost/scoped_ptr.hpp>
 
@@ -442,7 +446,15 @@ bool SwDBManager::MergeNew(const SwMergeDescriptor& 
rMergeDesc )
             break;
     }
 
-    EndMerge();
+    DELETEZ( pImpl->pMergeData );
+
+    // Recalculate original section visibility states, as field changes aren't
+    // tracked (not undo-able).  Has to be done, after pImpl->pMergeData is
+    //  gone, otherwise merge data is used for calculation!
+    rMergeDesc.rSh.SwViewShell::UpdateFlds();
+
+    bInMerge = false;
+
     return bRet;
 }
 
@@ -1060,7 +1072,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                         pWorkDoc->SetDBManager( this );
                         
pWorkDoc->getIDocumentLinksAdministration().EmbedAllLinks();
 
-                        // #i69485# lock fields to prevent access to the 
result set while calculating layout
+                        // #i69458# lock fields to prevent access to the 
result set while calculating layout
                         rWorkShell.LockExpFlds();
                         rWorkShell.CalcLayout();
                         rWorkShell.UnlockExpFlds();
@@ -1729,15 +1741,6 @@ OUString 
SwDBManager::GetDBField(uno::Reference<XPropertySet> xColumnProps,
     return sRet;
 }
 
-// releases the merge data source table or query after merge is completed
-void    SwDBManager::EndMerge()
-{
-    OSL_ENSURE(bInMerge, "merge is not active");
-    bInMerge = false;
-    delete pImpl->pMergeData;
-    pImpl->pMergeData = 0;
-}
-
 // checks if a desired data source table or query is open
 bool    SwDBManager::IsDataSourceOpen(const OUString& rDataSource,
                                   const OUString& rTableOrQuery, bool 
bMergeOnly)
@@ -1849,6 +1852,79 @@ bool SwDBManager::ToNextMergeRecord()
     return ToNextRecord(pImpl->pMergeData);
 }
 
+bool SwDBManager::FillCalcWithMergeData( SvNumberFormatter *pDocFormatter,
+                                         sal_uInt16 nLanguage, bool asString, 
SwCalc &rCalc )
+{
+    if (!(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is()))
+        return false;
+
+    uno::Reference< XColumnsSupplier > xColsSupp( 
pImpl->pMergeData->xResultSet, UNO_QUERY );
+    if(xColsSupp.is())
+    {
+        uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
+        const Sequence<OUString> aColNames = xCols->getElementNames();
+        const OUString* pColNames = aColNames.getConstArray();
+        OUString aString;
+
+        const bool bExistsNextRecord = ExistsNextRecord();
+
+        for( int nCol = 0; nCol < aColNames.getLength(); nCol++ )
+        {
+            const OUString &rColName = pColNames[nCol];
+
+            // empty variables, if no more records;
+            if( !bExistsNextRecord )
+            {
+                rCalc.VarChange( rColName, 0 );
+                continue;
+            }
+
+            double aNumber = DBL_MAX;
+            if( lcl_GetColumnCnt(pImpl->pMergeData, rColName, nLanguage, 
aString, &aNumber) )
+            {
+                // get the column type
+                sal_Int32 nColumnType;
+                Any aCol = xCols->getByName( pColNames[nCol] );
+                uno::Reference<XPropertySet> xCol;
+                aCol >>= xCol;
+                Any aType = xCol->getPropertyValue( "Type" );
+                aType >>= nColumnType;
+
+                sal_uInt32 nFmt;
+                if( !GetMergeColumnCnt(pColNames[nCol], nLanguage, aString, 
&aNumber, &nFmt) )
+                    continue;
+
+                // aNumber is overwritten by SwDBField::FormatValue, so store 
initial status
+                bool colIsNumber = aNumber != DBL_MAX;
+                bool bValidValue = SwDBField::FormatValue( pDocFormatter, 
aString, nFmt,
+                                                           aNumber, 
nColumnType, NULL );
+                if( colIsNumber )
+                {
+                    if( bValidValue )
+                    {
+                        SwSbxValue aValue;
+                        if( !asString )
+                            aValue.PutDouble( aNumber );
+                        else
+                            aValue.PutString( aString );
+                        SAL_INFO( "sw.dbmgr", "'" << pColNames[nCol] << "': " 
<< aNumber << " / " << aString );
+                        rCalc.VarChange( pColNames[nCol], aValue );
+                    }
+                }
+                else
+                {
+                    SwSbxValue aValue;
+                    aValue.PutString( aString );
+                    SAL_INFO( "sw.dbmgr", "'" << pColNames[nCol] << "': " << 
aString );
+                    rCalc.VarChange( pColNames[nCol], aValue );
+                }
+            }
+        }
+        return bExistsNextRecord;
+    }
+    return false;
+}
+
 bool SwDBManager::ToNextRecord(
     const OUString& rDataSource, const OUString& rCommand, sal_Int32 
/*nCommandType*/)
 {
@@ -2829,7 +2905,7 @@ sal_Int32 SwDBManager::MergeDocuments( 
SwMailMergeConfigItem& rMMConfig,
                     }
                 }
 
-                // #i69485# lock fields to prevent access to the result set 
while calculating layout
+                // #i69458# lock fields to prevent access to the result set 
while calculating layout
                 rWorkShell.LockExpFlds();
                 // create a layout
                 rWorkShell.CalcLayout();
commit 7dc81077cf1cfe5175f0437092f13b389c8017ab
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Tue Sep 16 10:13:55 2014 +0200

    CppunitTest_sw_ooxmlsdrexport: clean up testLockedCanvas XPath expression
    
    Change-Id: I0b9373d4e523c7ef7f1f90d165702021528f21eb

diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index fc1bcfd..b428b47 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1529,7 +1529,7 @@ DECLARE_OOXMLEXPORT_TEST(testLockedCanvas, 
"fdo78658.docx")
     if (!pXmlDoc)
         return;
     // Checking for lockedCanvas tag
-    assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/lc:lockedCanvas[1]",
 1);
+    assertXPath(pXmlDoc, "//lc:lockedCanvas[1]", 1);
 }
 
 DECLARE_OOXMLEXPORT_TEST(fdo78474, "fdo78474.docx")
commit cd8b5cbe1a2655f2e31effcd34d504f46b3f36db
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Tue Sep 16 09:24:29 2014 +0200

    vcl: Order.
    
    Change-Id: Ibf8ee4bd79dfca237096172f8b23d13bac986ab3

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 560687f..dea1d8d 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -132,6 +132,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/window/dockingarea \
     vcl/source/window/dockmgr \
     vcl/source/window/dockwin \
+    vcl/source/window/event \
     vcl/source/window/floatwin \
     vcl/source/window/introwin \
     vcl/source/window/keycod \
@@ -146,7 +147,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/window/mnemonicengine \
     vcl/source/window/mouse \
     vcl/source/window/mouseevent \
-    vcl/source/window/event \
     vcl/source/window/msgbox \
     vcl/source/window/popupmenuwindow \
     vcl/source/window/printdlg \
commit fdffaef6ea21d165f1026940d5150a694dc85c46
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Tue Sep 16 06:43:27 2014 +0200

    vcl menu: More abstraction around MenuBar to get dynamic_cast to one place.
    
    Change-Id: Idbefee0e4230a3c75646e87143f5c3042221aee9

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index ec49165..de5dea0 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -45,6 +45,7 @@ class KeyEvent;
 class MenuFloatingWindow;
 class Window;
 class SalMenu;
+class IMenuBarWindow;
 struct SystemMenuData;
 
 namespace com {
@@ -410,6 +411,11 @@ class VCL_DLLPUBLIC MenuBar : public Menu
     SAL_DLLPRIVATE static void      ImplDestroy( MenuBar* pMenu, bool bDelete 
);
     SAL_DLLPRIVATE bool         ImplHandleKeyEvent( const KeyEvent& rKEvent, 
bool bFromMenu = true );
 
+protected:
+
+    /// Return the IMenuBarWindow interface.
+    IMenuBarWindow* getMenuBarWindow();
+
 public:
                         MenuBar();
                         MenuBar( const MenuBar& rMenu );
@@ -439,7 +445,7 @@ public:
     bool                HandleMenuDeActivateEvent(Menu *pMenu) const;
     bool                HandleMenuHighlightEvent(Menu *pMenu, sal_uInt16 
nEventId) const;
     bool                HandleMenuCommandEvent(Menu *pMenu, sal_uInt16 
nEventId) const;
-    bool                HandleMenuButtonEvent(Menu *pMenu, sal_uInt16 
nEventId) const;
+    bool                HandleMenuButtonEvent(Menu *pMenu, sal_uInt16 
nEventId);
 
     void                SetCloseButtonClickHdl( const Link& rLink ) { 
maCloseHdl = rLink; }
     const Link&         GetCloseButtonClickHdl() const              { return 
maCloseHdl; }
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 01ee162..28fb6fa 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2386,6 +2386,15 @@ void Menu::HighlightItem( sal_uInt16 nItemPos )
 
 // - MenuBar -
 
+IMenuBarWindow* MenuBar::getMenuBarWindow()
+{
+    // so far just a dynamic_cast, hopefully to be turned into something saner
+    // at some stage
+    IMenuBarWindow *pWin = dynamic_cast<IMenuBarWindow*>(pWindow);
+    assert(pWin);
+    return pWin;
+}
+
 MenuBar::MenuBar()
     : Menu(),
       mbCloseBtnVisible(false),
@@ -2414,17 +2423,15 @@ MenuBar::~MenuBar()
 
 void MenuBar::ClosePopup(Menu *pMenu)
 {
-    MenuBarWindow* p = dynamic_cast<MenuBarWindow*>(ImplGetWindow());
-    if (p)
-        p->PopupClosed(pMenu);
+    getMenuBarWindow()->PopupClosed(pMenu);
 }
 
 sal_uLong MenuBar::DeactivateMenuBar(sal_uLong nFocusId)
 {
-    nFocusId = dynamic_cast<MenuBarWindow*>(ImplGetWindow())->GetFocusId();
+    nFocusId = getMenuBarWindow()->GetFocusId();
     if (nFocusId)
     {
-        dynamic_cast<MenuBarWindow*>(ImplGetWindow())->SetFocusId(0);
+        getMenuBarWindow()->SetFocusId(0);
         ImplGetSVData()->maWinData.mbNoDeactivate = false;
     }
 
@@ -2433,7 +2440,7 @@ sal_uLong MenuBar::DeactivateMenuBar(sal_uLong nFocusId)
 
 void MenuBar::MenuBarKeyInput(const KeyEvent& rEvent)
 {
-    
((MenuBarWindow*)(dynamic_cast<MenuBar*>(this))->ImplGetWindow())->KeyInput(rEvent);
+    pWindow->KeyInput(rEvent);
 }
 
 void MenuBar::ShowCloseButton(bool bShow)
@@ -2450,8 +2457,7 @@ void MenuBar::ShowButtons( bool bClose, bool bFloat, bool 
bHide )
         mbCloseBtnVisible = bClose;
         mbFloatBtnVisible = bFloat;
         mbHideBtnVisible = bHide;
-        if ( ImplGetWindow() )
-            ((MenuBarWindow*)ImplGetWindow())->ShowButtons( bClose, bFloat, 
bHide );
+        getMenuBarWindow()->ShowButtons(bClose, bFloat, bHide);
     }
 }
 
@@ -2460,20 +2466,21 @@ void MenuBar::SetDisplayable( bool bDisplayable )
     if( bDisplayable != mbDisplayable )
     {
         mbDisplayable = bDisplayable;
-        MenuBarWindow* pMenuWin = (MenuBarWindow*) ImplGetWindow();
-        if( pMenuWin )
-            pMenuWin->ImplLayoutChanged();
+        getMenuBarWindow()->LayoutChanged();
     }
 }
 
 Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu )
 {
-    if ( !pWindow )
-        pWindow = new MenuBarWindow( pParent );
+    MenuBarWindow *pMenuBarWindow = dynamic_cast<MenuBarWindow*>(pWindow);
+    if (!pMenuBarWindow)
+    {
+        pWindow = pMenuBarWindow = new MenuBarWindow( pParent );
+    }
 
     pMenu->pStartedFrom = 0;
     pMenu->pWindow = pWindow;
-    ((MenuBarWindow*)pWindow)->SetMenu( pMenu );
+    pMenuBarWindow->SetMenu(pMenu);
     long nHeight = pMenu->ImplCalcSize( pWindow ).Height();
 
     // depending on the native implementation or the displayable flag
@@ -2488,10 +2495,10 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* 
pWindow, MenuBar* pMenu )
 
 void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
 {
-    MenuBarWindow* pWindow = (MenuBarWindow*) pMenu->ImplGetWindow();
-    if ( pWindow && bDelete )
+    Window *pWindow = pMenu->ImplGetWindow();
+    if (pWindow && bDelete)
     {
-        pWindow->KillActivePopup();
+        pMenu->getMenuBarWindow()->KillActivePopup();
         delete pWindow;
     }
     pMenu->pWindow = NULL;
@@ -2509,27 +2516,27 @@ bool MenuBar::ImplHandleKeyEvent( const KeyEvent& 
rKEvent, bool bFromMenu )
     // check for enabled, if this method is called from another window...
     Window* pWin = ImplGetWindow();
     if ( pWin && pWin->IsEnabled() && pWin->IsInputEnabled()  && ! 
pWin->IsInModalMode() )
-        bDone = ((MenuBarWindow*)pWin)->ImplHandleKeyEvent( rKEvent, bFromMenu 
);
+        bDone = getMenuBarWindow()->HandleKeyEvent( rKEvent, bFromMenu );
     return bDone;
 }
 
 void MenuBar::SelectItem(sal_uInt16 nId)
 {

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to