[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 254 commits - android/sdremote basctl/source basic/qa basic/source canvas/source comphelper/source configure.ac connectivity/source cui/source dbaccess/source download.lst drawinglayer/inc drawinglayer/source editeng/inc editeng/source filter/source i18npool/inc i18npool/qa i18npool/source libcdr/libcdr-0.0.11-encoding.patch libcdr/UnpackedTarball_cdr.mk libvisio/ExternalProject_libvisio.mk libvisio/prj libvisio/UnpackedTarball_visio.mk odk/pack officecfg/registry oox/source package/source reportbuilder/java scaddins/source scp2/source sc/source sd/source sfx2/inc sfx2/Library_sfx.mk sfx2/Package_inc.mk sfx2/source solenv/gbuild starmath/source svl/inc svl/source svtools/source svx/inc svx/Package_inc.mk svx/source sw/inc sw/qa sw/source vcl/aqua vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Package_inc.mk vcl/source vcl/unx vcl/win writerfilter/source xmloff/inc xmloff/source

Petr Mladek pmladek at suse.cz
Wed May 1 04:07:37 PDT 2013


 android/sdremote/AndroidManifest.xml                                                       |    5 
 android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java                |    1 
 android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java               |    6 
 android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java               |   33 
 android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java                   |    1 
 android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java                   |    1 
 android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java                  |   11 
 android/sdremote/src/org/libreoffice/impressremote/communication/Client.java               |    2 
 android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java |    2 
 android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java             |    6 
 android/sdremote/src/org/libreoffice/impressremote/communication/Server.java               |    2 
 android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java         |    2 
 android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java            |   38 
 basctl/source/basicide/baside2b.cxx                                                        |    8 
 basic/qa/cppunit/test_vba.cxx                                                              |    7 
 basic/qa/vba_tests/ole_dfltObjDflMethod.vb                                                 |   24 
 basic/source/runtime/methods.cxx                                                           |   10 
 basic/source/runtime/runtime.cxx                                                           |    8 
 basic/source/runtime/step2.cxx                                                             |   14 
 canvas/source/factory/cf_service.cxx                                                       |    5 
 comphelper/source/container/embeddedobjectcontainer.cxx                                    |   15 
 configure.ac                                                                               |    1 
 connectivity/source/drivers/mozab/MDriver.cxx                                              |    5 
 connectivity/source/drivers/odbcbase/OTools.cxx                                            |   12 
 connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx                            |   11 
 connectivity/source/drivers/postgresql/pq_statement.cxx                                    |    2 
 connectivity/source/drivers/postgresql/pq_tools.cxx                                        |   14 
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx                          |    3 
 cui/source/options/personalization.cxx                                                     |   34 
 dbaccess/source/core/dataaccess/documentcontainer.cxx                                      |    5 
 download.lst                                                                               |    8 
 drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx                       |    3 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx                                 |   25 
 drawinglayer/source/processor2d/vclprocessor2d.cxx                                         |    6 
 editeng/inc/editeng/outliner.hxx                                                           |    2 
 editeng/inc/editeng/svxenum.hxx                                                            |   16 
 editeng/source/editeng/eerdll.cxx                                                          |    6 
 editeng/source/editeng/impedit3.cxx                                                        |   25 
 editeng/source/outliner/outliner.cxx                                                       |   38 
 editeng/source/uno/unonrule.cxx                                                            |    3 
 filter/source/msfilter/escherex.cxx                                                        |    9 
 filter/source/msfilter/svdfppt.cxx                                                         |   72 -
 i18npool/inc/i18npool/languagetag.hxx                                                      |   24 
 i18npool/qa/cppunit/test_textsearch.cxx                                                    |    2 
 i18npool/source/languagetag/languagetag.cxx                                                |    7 
 i18npool/source/localedata/data/es_PE.xml                                                  |   36 
 i18npool/source/localedata/data/es_PY.xml                                                  |    2 
 i18npool/source/localedata/data/es_VE.xml                                                  |    4 
 i18npool/source/search/textsearch.cxx                                                      |  136 +
 libcdr/UnpackedTarball_cdr.mk                                                              |    6 
 libcdr/libcdr-0.0.11-encoding.patch                                                        |   36 
 libvisio/ExternalProject_libvisio.mk                                                       |   10 
 libvisio/UnpackedTarball_visio.mk                                                          |    2 
 libvisio/prj/build.lst                                                                     |    2 
 odk/pack/copying/makefile.mk                                                               |    2 
 officecfg/registry/data/org/openoffice/Office/UI/MathWindowState.xcu                       |    2 
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs                                   |    2 
 oox/source/drawingml/textparagraph.cxx                                                     |    3 
 package/source/zippackage/ZipPackage.cxx                                                   |    2 
 reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java                          |   10 
 reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java     |   14 
 sc/source/core/data/attarray.cxx                                                           |   39 
 sc/source/core/data/column2.cxx                                                            |    2 
 sc/source/core/data/conditio.cxx                                                           |   21 
 sc/source/core/data/dpoutput.cxx                                                           |   73 -
 sc/source/core/data/global.cxx                                                             |   21 
 sc/source/core/tool/addincol.cxx                                                           |    3 
 sc/source/core/tool/interpr1.cxx                                                           |   14 
 sc/source/core/tool/scmatrix.cxx                                                           |   15 
 sc/source/filter/oox/stylesbuffer.cxx                                                      |    2 
 sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx                                  |   91 -
 sc/source/ui/dbgui/dapitype.cxx                                                            |    4 
 sc/source/ui/dbgui/dapitype.src                                                            |    2 
 sc/source/ui/dbgui/tpsort.cxx                                                              |   13 
 sc/source/ui/vba/vbaapplication.cxx                                                        |   15 
 sc/source/ui/vba/vbavalidation.cxx                                                         |    3 
 sc/source/ui/view/cellsh1.cxx                                                              |   77 -
 sc/source/ui/view/cellsh2.cxx                                                              |    2 
 sc/source/ui/view/drawvie4.cxx                                                             |    7 
 sc/source/ui/view/tabvwsha.cxx                                                             |   19 
 scaddins/source/analysis/analysishelper.cxx                                                |  208 +-
 scaddins/source/analysis/analysishelper.hxx                                                |    5 
 scp2/source/ooo/module_hidden_ooo.scp                                                      |   48 
 sd/source/core/drawdoc4.cxx                                                                |    3 
 sd/source/core/sdpage.cxx                                                                  |    2 
 sd/source/core/stlpool.cxx                                                                 |    5 
 sd/source/filter/eppt/epptso.cxx                                                           |    5 
 sd/source/filter/eppt/pptx-text.cxx                                                        |   52 
 sd/source/ui/annotations/annotationwindow.cxx                                              |    5 
 sfx2/Library_sfx.mk                                                                        |   15 
 sfx2/Package_inc.mk                                                                        |    1 
 sfx2/inc/sfx2/doctempl.hxx                                                                 |    2 
 sfx2/inc/sfx2/templateabstractview.hxx                                                     |   68 
 sfx2/inc/sfx2/templatecontaineritem.hxx                                                    |    1 
 sfx2/inc/sfx2/templatelocalview.hxx                                                        |   37 
 sfx2/inc/sfx2/templateproperties.hxx                                                       |    1 
 sfx2/inc/sfx2/templateremoteview.hxx                                                       |    8 
 sfx2/inc/sfx2/templateview.hxx                                                             |   65 
 sfx2/inc/sfx2/thumbnailview.hxx                                                            |   22 
 sfx2/inc/templatedlg.hxx                                                                   |   27 
 sfx2/source/control/templateabstractview.cxx                                               |  204 +-
 sfx2/source/control/templatelocalview.cxx                                                  |  553 +++++--
 sfx2/source/control/templateremoteview.cxx                                                 |   36 
 sfx2/source/control/templatesearchview.cxx                                                 |    9 
 sfx2/source/control/templateview.cxx                                                       |  117 -
 sfx2/source/control/templateview.src                                                       |    8 
 sfx2/source/control/templateviewitem.cxx                                                   |    3 
 sfx2/source/control/thumbnailview.cxx                                                      |  628 ++++++--
 sfx2/source/control/thumbnailviewacc.cxx                                                   |    4 
 sfx2/source/dialog/templdlg.cxx                                                            |   56 
 sfx2/source/doc/doc.hrc                                                                    |    1 
 sfx2/source/doc/doctempl.cxx                                                               |   18 
 sfx2/source/doc/templatedlg.cxx                                                            |  719 +++++-----
 sfx2/source/doc/templatedlg.src                                                            |  136 +
 sfx2/source/inc/templatesearchview.hxx                                                     |    2 
 sfx2/source/inc/templatesearchviewitem.hxx                                                 |    3 
 sfx2/source/inc/templdgi.hxx                                                               |    2 
 solenv/gbuild/Deliver.mk                                                                   |    2 
 solenv/gbuild/platform/unxgcc.mk                                                           |    2 
 starmath/source/ooxmlexport.cxx                                                            |    7 
 starmath/source/ooxmlimport.cxx                                                            |   26 
 svl/inc/svl/style.hrc                                                                      |    1 
 svl/source/numbers/zforfind.hxx                                                            |    4 
 svl/source/numbers/zforlist.cxx                                                            |    2 
 svl/source/numbers/zformat.cxx                                                             |   79 -
 svtools/source/control/valueset.cxx                                                        |    3 
 svx/Package_inc.mk                                                                         |    1 
 svx/inc/svx/itextprovider.hxx                                                              |   42 
 svx/inc/svx/sdr/properties/textproperties.hxx                                              |    4 
 svx/inc/svx/svdotext.hxx                                                                   |    3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx                                    |    4 
 svx/source/fmcomp/gridctrl.cxx                                                             |    2 
 svx/source/sdr/properties/textproperties.cxx                                               |   38 
 svx/source/table/cell.cxx                                                                  |   52 
 svx/source/table/tablelayouter.cxx                                                         |    2 
 svx/source/table/viewcontactoftableobj.cxx                                                 |    8 
 sw/inc/IDocumentContentOperations.hxx                                                      |    2 
 sw/inc/doc.hxx                                                                             |    3 
 sw/inc/docary.hxx                                                                          |    5 
 sw/inc/docufld.hxx                                                                         |    4 
 sw/inc/ndtxt.hxx                                                                           |    1 
 sw/inc/numrule.hxx                                                                         |    7 
 sw/qa/extras/ooxmlimport/data/fdo59273.docx                                                |binary
 sw/qa/extras/ooxmlimport/data/fdo60922.docx                                                |binary
 sw/qa/extras/ooxmlimport/data/n780645.docx                                                 |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx                                                   |   20 
 sw/qa/extras/rtfexport/data/fdo30983.rtf                                                   |   43 
 sw/qa/extras/rtfexport/rtfexport.cxx                                                       |   13 
 sw/qa/extras/rtfimport/data/fdo37716.rtf                                                   |    5 
 sw/qa/extras/rtfimport/data/fdo51916.rtf                                                   |  319 ++++
 sw/qa/extras/rtfimport/data/fdo61193.rtf                                                   |    1 
 sw/qa/extras/rtfimport/data/fdo61909.rtf                                                   |   28 
 sw/qa/extras/rtfimport/data/fdo62288.rtf                                                   |   23 
 sw/qa/extras/rtfimport/data/hello.rtf                                                      |    1 
 sw/qa/extras/rtfimport/rtfimport.cxx                                                       |   74 +
 sw/source/core/crsr/crsrsh.cxx                                                             |   12 
 sw/source/core/crsr/findtxt.cxx                                                            |   43 
 sw/source/core/doc/docfld.cxx                                                              |   14 
 sw/source/core/doc/docfmt.cxx                                                              |   54 
 sw/source/core/doc/number.cxx                                                              |    4 
 sw/source/core/docnode/ndtbl.cxx                                                           |   57 
 sw/source/core/fields/docufld.cxx                                                          |   22 
 sw/source/core/fields/reffld.cxx                                                           |   13 
 sw/source/core/text/inftxt.cxx                                                             |   14 
 sw/source/core/txtnode/thints.cxx                                                          |   70 
 sw/source/core/unocore/unoportenum.cxx                                                     |   24 
 sw/source/filter/inc/fltshell.hxx                                                          |   25 
 sw/source/filter/inc/rtf.hxx                                                               |    4 
 sw/source/filter/ww1/fltshell.cxx                                                          |   91 +
 sw/source/filter/ww8/attributeoutputbase.hxx                                               |    3 
 sw/source/filter/ww8/docxattributeoutput.cxx                                               |    3 
 sw/source/filter/ww8/docxattributeoutput.hxx                                               |    3 
 sw/source/filter/ww8/docxexport.cxx                                                        |    5 
 sw/source/filter/ww8/docxexport.hxx                                                        |    2 
 sw/source/filter/ww8/escher.hxx                                                            |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx                                                |   23 
 sw/source/filter/ww8/rtfattributeoutput.hxx                                                |    3 
 sw/source/filter/ww8/rtfexport.cxx                                                         |    6 
 sw/source/filter/ww8/rtfexport.hxx                                                         |    3 
 sw/source/filter/ww8/writerhelper.cxx                                                      |   46 
 sw/source/filter/ww8/writerhelper.hxx                                                      |   15 
 sw/source/filter/ww8/wrtw8esh.cxx                                                          |   56 
 sw/source/filter/ww8/wrtw8nds.cxx                                                          |   24 
 sw/source/filter/ww8/wrtw8num.cxx                                                          |   18 
 sw/source/filter/ww8/wrtww8.cxx                                                            |  123 +
 sw/source/filter/ww8/wrtww8.hxx                                                            |   16 
 sw/source/filter/ww8/wrtww8gr.cxx                                                          |  139 +
 sw/source/filter/ww8/ww8attributeoutput.hxx                                                |    3 
 sw/source/filter/ww8/ww8par.cxx                                                            |  149 ++
 sw/source/filter/ww8/ww8par.hxx                                                            |   18 
 sw/source/filter/ww8/ww8par3.cxx                                                           |   57 
 sw/source/ui/docvw/PostItMgr.cxx                                                           |   27 
 sw/source/ui/docvw/SidebarWin.cxx                                                          |    5 
 sw/source/ui/wrtsh/wrtsh1.cxx                                                              |    5 
 vcl/Library_vcl.mk                                                                         |    1 
 vcl/Package_inc.mk                                                                         |    1 
 vcl/aqua/source/gdi/salvd.cxx                                                              |   18 
 vcl/aqua/source/window/salframe.cxx                                                        |    7 
 vcl/headless/svpframe.cxx                                                                  |    4 
 vcl/inc/aqua/salframe.h                                                                    |    1 
 vcl/inc/headless/svpframe.hxx                                                              |    7 
 vcl/inc/salframe.hxx                                                                       |    2 
 vcl/inc/unx/gtk/gtkframe.hxx                                                               |    2 
 vcl/inc/unx/saldisp.hxx                                                                    |    2 
 vcl/inc/unx/salframe.h                                                                     |    1 
 vcl/inc/vcl/sound.hxx                                                                      |   39 
 vcl/inc/win/salframe.h                                                                     |    1 
 vcl/source/app/sound.cxx                                                                   |   40 
 vcl/source/control/tabctrl.cxx                                                             |    3 
 vcl/source/gdi/outdev6.cxx                                                                 |    3 
 vcl/source/window/dlgctrl.cxx                                                              |   46 
 vcl/source/window/tabpage.cxx                                                              |    2 
 vcl/unx/generic/app/saldisp.cxx                                                            |    6 
 vcl/unx/generic/window/salframe.cxx                                                        |    6 
 vcl/unx/gtk/app/gtksys.cxx                                                                 |   12 
 vcl/unx/gtk/window/gtkframe.cxx                                                            |   16 
 vcl/win/source/window/salframe.cxx                                                         |    8 
 writerfilter/source/dmapper/ConversionHelper.cxx                                           |    4 
 writerfilter/source/dmapper/DomainMapper.cxx                                               |    4 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx                                   |   10 
 writerfilter/source/dmapper/DomainMapperTableManager.hxx                                   |    7 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                                          |   10 
 writerfilter/source/dmapper/TablePropertiesHandler.cxx                                     |    8 
 writerfilter/source/ooxml/model.xml                                                        |   19 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx                                             |  130 +
 writerfilter/source/rtftok/rtfdocumentimpl.hxx                                             |    9 
 writerfilter/source/rtftok/rtffly.hxx                                                      |    4 
 xmloff/inc/EnhancedCustomShapeToken.hxx                                                    |    2 
 xmloff/inc/xmloff/xmltoken.hxx                                                             |    1 
 xmloff/source/core/xmltoken.cxx                                                            |    1 
 xmloff/source/draw/EnhancedCustomShapeToken.cxx                                            |    2 
 xmloff/source/draw/shapeexport4.cxx                                                        |   42 
 xmloff/source/draw/ximpcustomshape.cxx                                                     |   68 
 xmloff/source/draw/ximpshap.cxx                                                            |    2 
 234 files changed, 4961 insertions(+), 1927 deletions(-)

New commits:
commit 1b46ee96fac64988c4809359851bbcf6cd0d0cf2
Author: Petr Mladek <pmladek at suse.cz>
Date:   Wed May 1 13:05:31 2013 +0200

    updated dictionaries and helpcontent from 4.0.3.2 tag
    
    Change-Id: I453cf8cad1a651d1e1ec0c69da0d75a862359128

diff --git a/dictionaries b/dictionaries
index d5b2c69..e8ed1b3 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit d5b2c697408bbdda73e67fc47e2793a2e6f0ec13
+Subproject commit e8ed1b39dd1d5911395bb70c8ea375bba96f417c
diff --git a/helpcontent2 b/helpcontent2
index a2d98ee..b182589 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a2d98ee85fdba62d727c122bbcb9ca9c701f65c9
+Subproject commit b182589dc00d4890dadb8a6c8d4d1901847fb0bf
commit 93e11e4fb697aaea63c99308f980e4c932bd1efa
Merge: a5b6a37 c6786ad
Author: Petr Mladek <pmladek at suse.cz>
Date:   Wed May 1 13:05:06 2013 +0200

    Merge tag 'libreoffice-4.0.3.2' into suse-4.0
    
    Tag libreoffice-4.0.3.2
    
    Conflicts:
    	basic/qa/cppunit/test_vba.cxx
    	basic/source/runtime/step2.cxx
    	dictionaries
    	helpcontent2
    	instsetoo_native/util/openoffice.lst
    	libvisio/UnpackedTarball_visio.mk
    	sc/source/ui/vba/vbaapplication.cxx
    	sc/source/ui/vba/vbavalidation.cxx
    	solenv/inc/minor.mk
    	sw/qa/extras/ooxmlimport/ooxmlimport.cxx
    	translations
    
    Change-Id: Ic1f06489175f3db92d6bbcebb9732fadc1c61fed

diff --cc libvisio/UnpackedTarball_visio.mk
index 98313c1,59c29ac..492f857
--- a/libvisio/UnpackedTarball_visio.mk
+++ b/libvisio/UnpackedTarball_visio.mk
@@@ -11,10 -11,5 +11,10 @@@ $(eval $(call gb_UnpackedTarball_Unpack
  
  $(eval $(call gb_UnpackedTarball_set_tarball,visio,$(VISIO_TARBALL)))
  
- $(eval $(call gb_UnpackedTarball_set_patchlevel,visio,1))
+ 
 +
 +$(eval $(call gb_UnpackedTarball_add_patches,visio,\
 +       libvisio/libvisio-0.0.25.patch \
 +))
 +
  # vim: set noet sw=4 ts=4:
diff --cc sc/source/ui/vba/vbaapplication.cxx
index 67b02ab,db8bcaf..d39b45f
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@@ -1366,24 -1303,15 +1366,39 @@@ void SAL_CALL ScVbaApplication::OnKey( 
      {
          // Perhaps we can catch some excel specific
          // related behaviour here
 +        VbaApplicationBase::OnKey( Key, Procedure );
 +    }
 +    catch( container::NoSuchElementException& )
 +    {
 +        // #TODO special handling for unhandled
 +        // bindings
 +    }
 +}
 +
 +void SAL_CALL ScVbaApplication::Undo() throw (uno::RuntimeException)
 +{
 +    uno::Reference< frame::XModel > xModel( getThisExcelDoc( mxContext ), uno::UNO_SET_THROW );
 +
 +    ScTabViewShell* pViewShell = excel::getBestViewShell( xModel );
 +    if ( pViewShell )
 +        dispatchExecute( pViewShell, SID_UNDO );
 +}
 +
++void SAL_CALL ScVbaApplication::OnKey( const ::rtl::OUString& Key, const uno::Any& Procedure ) throw (uno::RuntimeException)
++{
++    try
++    {
++        // Perhaps we can catch some excel specific
++        // related behaviour here
+         VbaApplicationBase::OnKey( Key, Procedure );
+     }
+     catch( container::NoSuchElementException& )
+     {
+         // #TODO special handling for unhandled
+         // bindings
+     }
+ }
+ 
  rtl::OUString
  ScVbaApplication::getServiceImplName()
  {
diff --cc sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 54a1478,aeda333..29f3889
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@@ -114,8 -114,8 +114,10 @@@ public
      void testFdo53985();
      void testFdo59638();
      void testFdo61343();
+     void testFdo60922();
+     void testFdo59273();
 +    void testN592908_Frame();
 +    void testN592908_Picture();
  
      CPPUNIT_TEST_SUITE(Test);
  #if !defined(MACOSX) && !defined(WNT)
@@@ -182,8 -182,8 +184,10 @@@ void Test::run(
          {"fdo53985.docx", &Test::testFdo53985},
          {"fdo59638.docx", &Test::testFdo59638},
          {"fdo61343.docx", &Test::testFdo61343},
+         {"fdo60922.docx", &Test::testFdo60922},
+         {"fdo59273.docx", &Test::testFdo59273},
 +        {"n592908-frame.docx", &Test::testN592908_Frame},
 +        {"n592908-picture.docx", &Test::testN592908_Picture},
      };
      for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
      {
@@@ -1136,26 -1136,22 +1140,42 @@@ void Test::testFdo61343(
      CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount());
  }
  
+ void Test::testFdo60922()
+ {
+     // This was 0, not 100, due to wrong import of w:position w:val="0"
+     CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraph(1), 1), "CharEscapementHeight"));
+ }
+ 
+ void Test::testFdo59273()
+ {
+     uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+     uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+     uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+     uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY);
+     // Was 9997, so the 4th column had ~zero width
+     CPPUNIT_ASSERT_EQUAL(sal_Int16(7498), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position);
+ }
+ 
 +void Test::testN592908_Frame()
 +{
 +    uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
 +    uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
 +    uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY);
 +    text::WrapTextMode eValue;
 +    xPropertySet->getPropertyValue("Surround") >>= eValue;
 +    CPPUNIT_ASSERT_EQUAL(eValue, text::WrapTextMode_PARALLEL);
 +}
 +
 +void Test::testN592908_Picture()
 +{
 +    uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
 +    uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
 +    uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY);
 +    text::WrapTextMode eValue;
 +    xPropertySet->getPropertyValue("Surround") >>= eValue;
 +    CPPUNIT_ASSERT_EQUAL(eValue, text::WrapTextMode_PARALLEL);
 +}
 +
  CPPUNIT_TEST_SUITE_REGISTRATION(Test);
  
  CPPUNIT_PLUGIN_IMPLEMENT();
commit c6786add5a58268e11aa027c47054344040db1bc
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Apr 30 14:54:23 2013 +0200

    Version 4.0.3.2, tag libreoffice-4.0.3.2
    
    Change-Id: I302bf984363c10f59c3d2232c47b2404662a30b3

diff --git a/dictionaries b/dictionaries
index dea3552..d5b2c69 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit dea3552baa813eeed8e797381a215df8e474a576
+Subproject commit d5b2c697408bbdda73e67fc47e2793a2e6f0ec13
diff --git a/helpcontent2 b/helpcontent2
index 3178346..a2d98ee 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3178346c51ed6b78f62caaa95060959ce2b78b59
+Subproject commit a2d98ee85fdba62d727c122bbcb9ca9c701f65c9
diff --git a/translations b/translations
index acec6a1..2fb8ed1 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit acec6a171fc07b4c18ad94981cd613ddd3f128f1
+Subproject commit 2fb8ed13472b1501531d0891eb1014c2fdeee34a
commit b031dff0c326848b3fbca48358dccc146bc8f09b
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Apr 30 14:49:47 2013 +0200

    bump product version to 4.0.3.2, release number to 2
    
    Change-Id: Ifa6c055daa75355fad59126b7217c6af6998481f

diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 1a2945d..525ae59 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -4,7 +4,7 @@ Globals
     {
         variables
         {
-            UREPACKAGEVERSION 4.0.3.1
+            UREPACKAGEVERSION 4.0.3.2
             URELAYERVERSION 1
             REFERENCEOOOMAJORMINOR 3.4
             UNIXBASISROOTNAME libreoffice4.0
@@ -50,13 +50,13 @@ LibreOffice
         {
             PRODUCTNAME LibreOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             POSTVERSIONEXTENSION
             POSTVERSIONEXTENSIONUNIX
             BRANDPACKAGEVERSION 4.0
             USERDIRPRODUCTVERSION 4
-            ABOUTBOXPRODUCTVERSION 4.0.3.1
-            ABOUTBOXPRODUCTVERSIONSUFFIX +
+            ABOUTBOXPRODUCTVERSION 4.0.3.2
+            ABOUTBOXPRODUCTVERSIONSUFFIX
             BASEPRODUCTVERSION 4.0
             PCPFILENAME libreoffice.pcp
             UPDATEURL http://update.libreoffice.org/check.php
@@ -65,7 +65,7 @@ LibreOffice
             FILEFORMATNAME OpenOffice.org
             FILEFORMATVERSION 1.0
             WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             LICENSENAME LGPL
             GLOBALFILEGID gid_File_Lib_Vcl
@@ -100,14 +100,14 @@ LibreOffice_Dev
         {
             PRODUCTNAME LOdev
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             UNIXBASISROOTNAME lodev4.0
             POSTVERSIONEXTENSION
             POSTVERSIONEXTENSIONUNIX
             BRANDPACKAGEVERSION 4.0
             USERDIRPRODUCTVERSION 4
-            ABOUTBOXPRODUCTVERSION 4.0.3.1
-            ABOUTBOXPRODUCTVERSIONSUFFIX +
+            ABOUTBOXPRODUCTVERSION 4.0.3.2
+            ABOUTBOXPRODUCTVERSIONSUFFIX
             BASEPRODUCTVERSION 4.0
             DEVELOPMENTPRODUCT 1
             BASISPACKAGEPREFIX lodevbasis
@@ -121,7 +121,7 @@ LibreOffice_Dev
             FILEFORMATNAME OpenOffice.org
             FILEFORMATVERSION 1.0
             WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             LICENSENAME LGPL
             GLOBALFILEGID gid_File_Lib_Vcl
@@ -159,9 +159,9 @@ URE
         {
             PRODUCTNAME URE
             PRODUCTVERSION 4.0
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION 1
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             BRANDPACKAGEVERSION 4.0
             LICENSENAME LGPL
             NOVERSIONINDIRNAME 1
@@ -192,11 +192,11 @@ LibreOffice_SDK
         {
             PRODUCTNAME LibreOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             POSTVERSIONEXTENSION SDK
             POSTVERSIONEXTENSIONUNIX sdk
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             PACK_INSTALLED 1
             DMG_VOLUMEEXTENSION SDK
@@ -231,12 +231,12 @@ LibreOffice_Dev_SDK
         {
             PRODUCTNAME LOdev
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             UNIXBASISROOTNAME lodev4.0
             POSTVERSIONEXTENSION SDK
             POSTVERSIONEXTENSIONUNIX sdk
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             BASISPACKAGEPREFIX lodevbasis
             UREPACKAGEPREFIX lodev
@@ -276,11 +276,11 @@ LibreOffice_Test
         {
             PRODUCTNAME LibreOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             POSTVERSIONEXTENSION TEST
             POSTVERSIONEXTENSIONUNIX test
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             PACK_INSTALLED 1
             DMG_VOLUMEEXTENSION TEST
@@ -315,12 +315,12 @@ LibreOffice_Dev_Test
         {
             PRODUCTNAME LOdev
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             UNIXBASISROOTNAME lodev4.0
             POSTVERSIONEXTENSION TEST
             POSTVERSIONEXTENSIONUNIX test
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             BASISPACKAGEPREFIX lodevbasis
             UREPACKAGEPREFIX lodev
@@ -359,13 +359,13 @@ OxygenOffice
         {
             PRODUCTNAME OxygenOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.1
+            PRODUCTEXTENSION .3.2
             POSTVERSIONEXTENSION
             POSTVERSIONEXTENSIONUNIX
             BRANDPACKAGEVERSION 4.0
             USERDIRPRODUCTVERSION 4
-            ABOUTBOXPRODUCTVERSION 4.0.3.1
-            ABOUTBOXPRODUCTVERSIONSUFFIX +
+            ABOUTBOXPRODUCTVERSION 4.0.3.2
+            ABOUTBOXPRODUCTVERSIONSUFFIX
             BASEPRODUCTVERSION 4.0
             PCPFILENAME openoffice.pcp
             UPDATEURL http://update.libreoffice.org/check.php
@@ -374,7 +374,7 @@ OxygenOffice
             FILEFORMATNAME OpenOffice.org
             FILEFORMATVERSION 1.0
             WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
-            PACKAGEVERSION 4.0.3.1
+            PACKAGEVERSION 4.0.3.2
             PACKAGEREVISION {buildid}
             LICENSENAME LGPL
             SERVICESPROJEKT 1
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index c90c87b..d2cdffd 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,6 +1,6 @@
 RSCVERSION=400
-RSCREVISION=400m1(Build:1)
-BUILD=1
+RSCREVISION=400m1(Build:2)
+BUILD=2
 LAST_MINOR=m0
 SOURCEVERSION=OOO400
 
commit 791a8f2a4ca97302dd89ebda00f1eea83392a8b1
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Tue Apr 30 11:19:56 2013 +0100

    fdo#62815 - tolerate crazy / out-of-bound ScreenNumbers for FullScreen
    
    Thus making the gtk+ backend more similar to the generic backend
    in this regard; also be more strict about invalid monitors -> empty
    screens.
    
    Change-Id: Ia4f2e1205cb1d309fb1bb01f9631167339a3478e
    Signed-off-by: Petr Mladek <pmladek at suse.cz>
    Reviewed-on: https://gerrit.libreoffice.org/3695
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index bc06b25..c822fd2 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -70,6 +70,13 @@ struct GdkRectangleEqual
 
 }
 
+/**
+ * GtkSalSystem::countScreenMonitors()
+ *
+ * This method builds the vector which allows us to map from VCL's
+ * idea of linear integer ScreenNumber to to gtk+'s rather more
+ * complicated screen + monitor concept.
+ */
 void
 GtkSalSystem::countScreenMonitors()
 {
@@ -134,6 +141,11 @@ GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
             break;
     }
     nMonitor = nIdx;
+
+    // handle invalid monitor indexes as non-existent screens
+    if (nMonitor < 0 || (pScreen && nMonitor >= gdk_screen_get_n_monitors (pScreen)))
+        pScreen = NULL;
+
     return pScreen;
 }
 
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 03f8c59..61d3f78 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2059,7 +2059,15 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
         return;
 
     gint nMonitor;
+    bool bSameMonitor = false;
     GdkScreen *pScreen = getDisplay()->getSystem()->getScreenMonitorFromIdx( nNewScreen, nMonitor );
+    if (!pScreen)
+    {
+        g_warning ("Attempt to move GtkSalFrame to invalid screen %d => "
+                   "fallback to current\n", nNewScreen);
+        pScreen = gtk_widget_get_screen( m_pWindow );
+        bSameMonitor = true;
+    }
 
     // Heavy lifting, need to move screen ...
     if( pScreen != gtk_widget_get_screen( m_pWindow ))
@@ -2067,6 +2075,9 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
 
     gint nOldMonitor = gdk_screen_get_monitor_at_window(
                             pScreen, widget_get_window( m_pWindow ) );
+    if (bSameMonitor)
+        nMonitor = nOldMonitor;
+
 #if OSL_DEBUG_LEVEL > 1
     if( nMonitor == nOldMonitor )
         g_warning( "An apparently pointless SetScreen - should we elide it ?" );
commit 800b17fd80433163e323775862a528fbebe60a11
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Fri Apr 26 11:46:57 2013 +0200

    fdo#58949 EmbeddedObjectContainer: guard against embed::WrongStateException
    
    The problem was that in case an exception was thrown, it was only caught
    outside the loop, so in case any error occurred, we didn't even try to
    export the remaining objects. At least in case of
    embed::WrongStateException, this is safe to do.
    
    (cherry picked from commit 6238cfe27f0a202f3fbf482cde2b0a3189adc86f)
    
    Change-Id: I71a7abc45a89bebc667664bc001245bb886a8d83
    Reviewed-on: https://gerrit.libreoffice.org/3624
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-on: https://gerrit.libreoffice.org/3658
    Tested-by: Petr Mladek <pmladek at suse.cz>
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: Petr Mladek <pmladek at suse.cz>

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index ca0e4f1..935bf33 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -1415,10 +1415,14 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo
                         aArgs[2].Value <<= xStream;
                     }
 
-                    xPersist->storeAsEntry( _xStorage,
-                                            xPersist->getEntryName(),
-                                            uno::Sequence< beans::PropertyValue >(),
-                                            aArgs );
+                    try
+                    {
+                        xPersist->storeAsEntry( _xStorage, xPersist->getEntryName(), uno::Sequence< beans::PropertyValue >(), aArgs );
+                    }
+                    catch (const embed::WrongStateException& e)
+                    {
+                        SAL_WARN("comphelper", "failed to store '" << *pIter << "'");
+                    }
                 }
 
                 if ( bSwitchBackToLoaded )
@@ -1430,10 +1434,11 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo
         bResult = aCnt.CommitImageSubStorage();
 
     }
-    catch (const uno::Exception&)
+    catch (const uno::Exception& e)
     {
         // TODO/LATER: error handling
         bResult = sal_False;
+        SAL_WARN("comphelper", "failed. Message: " << e.Message);
     }
 
     // the old SO6 format does not store graphical replacements
commit c7027a046fdd2aa19aa8d7bc80a59ed1559bbe4b
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Apr 23 18:09:43 2013 +0200

    fixed out of bounds vector access
    
    in ScColumn::FindNextVisibleRowWithContent() if starting from the
    position all including the last present cell of a column are blank
    
    Change-Id: I0270331444f1707b6ad413f6127ae4c2cf0b1984
    (cherry picked from commit 3874bad70ea48deed91b9966b3d35782b5584f7d)
    Reviewed-on: https://gerrit.libreoffice.org/3585
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Petr Mladek <pmladek at suse.cz>
    Reviewed-by: Petr Mladek <pmladek at suse.cz>

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2bdb401..c782f89 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1347,7 +1347,7 @@ SCROW ScColumn::FindNextVisibleRowWithContent(SCROW nRow, bool bForward) const
             bool bThere = Search( nRow, nIndex );
             if( bThere && !maItems[nIndex].pCell->IsBlank())
                 return nRow;
-            else if(nIndex >= maItems.size())
+            else if((bThere ? nIndex+1 : nIndex) >= maItems.size())
                 return MAXROW;
             else
             {
commit 36a186821a17cd44d9581452c34f7863f6b5fcf9
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Mon Apr 22 11:53:32 2013 +0200

    Uploading new fresh wonderful libvisio-0.0.26
    
    The release fixes several instances of data loss during conversion:
      * Fix missing WMFs in some Visio files
      * Don't truncate end of the text
    and some problems with text encoding and display:
      * Use ICU for text encoding conversions
      * Honour the "HideText" property
    
    (cherry picked from commit 105bb26e53049a317a43c13ebd9f706df760f27f)
    
    Conflicts:
    	download.lst
    	libvisio/ExternalProject_libvisio.mk
    
    Reviewed-on: https://gerrit.libreoffice.org/3552
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Tested-by: Michael Meeks <michael.meeks at suse.com>
    (cherry picked from commit 0deb04fb8613c8aaf1ca9154b5ac53c0e0889d40)
    
    Change-Id: I00f18e64f60358f826720cc8d6af36c77a98a062
    Reviewed-on: https://gerrit.libreoffice.org/3601
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>

diff --git a/download.lst b/download.lst
index e0026dd..36c4fe9 100644
--- a/download.lst
+++ b/download.lst
@@ -2,8 +2,8 @@ CDR_MD5SUM := 6db2c96a4ae5977da8b84893c1441038
 export CDR_TARBALL := libcdr-0.0.12.tar.bz2
 MSPUB_MD5SUM := 881c4628ec5f54d47f35d5d19e335662
 export MSPUB_TARBALL := libmspub-0.0.5.tar.bz2
-VISIO_MD5SUM := 92bde158f249b9b27f76f48cc65a0242
-export VISIO_TARBALL := libvisio-0.0.25.tar.bz2
+VISIO_MD5SUM := 2f638cf6f92cec59c9205ac3cbf1702e
+export VISIO_TARBALL := libvisio-0.0.26.tar.bz2
 
 export AFMS_TARBALL := 1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
 export APACHE_COMMONS_CODEC_TARBALL := af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz
diff --git a/libvisio/ExternalProject_libvisio.mk b/libvisio/ExternalProject_libvisio.mk
index 3862799..940d3cd 100644
--- a/libvisio/ExternalProject_libvisio.mk
+++ b/libvisio/ExternalProject_libvisio.mk
@@ -31,6 +31,7 @@ $(call gb_ExternalProject_get_state_target,libvisio,build) :
 	&& export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& export LIBXML_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+	&& export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& $(COMPATH)/vcpackages/vcbuild.exe libvisio.vcproj "Release|Win32" \
 	&& touch $@
 else ifeq ($(VCVER),100)
@@ -41,6 +42,7 @@ $(call gb_ExternalProject_get_state_target,libvisio,build) :
 	&& export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& export LIBXML_INCLUDE_DIR=$(OUTDIR)/inc/extrenal \
 	&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+	&& export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& msbuild.exe libvisio.vcxproj /p:Configuration=Release \
 	&& touch $@
 else
@@ -51,6 +53,7 @@ $(call gb_ExternalProject_get_state_target,libvisio,build) :
 	&& export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& export LIBXML_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+	&& export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
 	&& msbuild.exe libvisio.vcxproj /p:PlatformToolset=v110 /p:Configuration=Release \
 	&& touch $@
 endif
@@ -59,8 +62,11 @@ else
 
 $(call gb_ExternalProject_get_state_target,libvisio,build) :
 	cd $(EXTERNAL_WORKDIR) \
-	&& PKG_CONFIG="" \
-	./configure \
+	&& export PKG_CONFIG="" \
+	&& export ICU_LIBS=" " \
+	$(if $(filter NO,$(SYSTEM_ICU)),&& export ICU_CFLAGS="-I$(OUTDIR)/inc/external") \
+	$(if $(filter YES,$(SYSTEM_ICU)),&& export ICU_CFLAGS=" ") \
+	&& ./configure \
 		--with-pic \
 		--enable-static \
 		--disable-shared \
diff --git a/libvisio/UnpackedTarball_visio.mk b/libvisio/UnpackedTarball_visio.mk
index 98313c1..59c29ac 100644
--- a/libvisio/UnpackedTarball_visio.mk
+++ b/libvisio/UnpackedTarball_visio.mk
@@ -11,10 +11,5 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,visio))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,visio,$(VISIO_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_set_patchlevel,visio,1))
-
-$(eval $(call gb_UnpackedTarball_add_patches,visio,\
-       libvisio/libvisio-0.0.25.patch \
-))
 
 # vim: set noet sw=4 ts=4:
diff --git a/libvisio/libvisio-0.0.25.patch b/libvisio/libvisio-0.0.25.patch
deleted file mode 100644
index 6294548..0000000
--- a/libvisio/libvisio-0.0.25.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/src/lib/VSDContentCollector.cpp
-+++ b/src/lib/VSDContentCollector.cpp
-@@ -2920,10 +2920,8 @@ void libvisio::VSDContentCollector::appendCharacters(WPXString &text, const std:
-     while (true)
-     {
-       if (iter == characters.end())
--      {
--        fail = true;
-         break;
--      }
-+
-       uint16_t character = *iter++;
-       character |= (uint16_t)(*iter++) << 8;
-       if (character == 0xfffc)
diff --git a/libvisio/prj/build.lst b/libvisio/prj/build.lst
index 5fdc953..3bb2b3e 100644
--- a/libvisio/prj/build.lst
+++ b/libvisio/prj/build.lst
@@ -1,2 +1,2 @@
-vsd	libvisio	: LIBWPD:libwpd LIBWPD:libwpg BOOST:boost LIBXML2:libxml2 ZLIB:zlib soltools NULL
+vsd	libvisio	: LIBWPD:libwpd LIBWPD:libwpg BOOST:boost ICU:icu LIBXML2:libxml2 ZLIB:zlib soltools NULL
 vsd	libvisio\prj	nmake	-	all	vsd_libvisio NULL
commit b92192c0a6e2569bdb809f58f3c49b925330e9e7
Author: Andras Timar <atimar at suse.com>
Date:   Mon Apr 29 10:59:40 2013 +0200

    Updated core
    Project: translations  acec6a171fc07b4c18ad94981cd613ddd3f128f1

diff --git a/translations b/translations
index d258129..acec6a1 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit d258129309c9676e2aa0d909058cfc5d123346b0
+Subproject commit acec6a171fc07b4c18ad94981cd613ddd3f128f1
commit e8e94a05fcc4906e06f0f283432b73470974d588
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Apr 24 16:15:19 2013 +0200

    fdo#59259: Suppress the expensive parts when we are only writing to metafile.
    
    When we are launching the printing dialog, we first draw the page using
    drawinglayer to a metafile, and then render the metafile.  Unfortunately, here
    we did the real operation of allocating large bitmaps, and destroying them
    again; all that just to throw all that away at the end of the operation.
    
    The preview sets the mbOutput to false correctly, so we can just skip the
    expensive parts.
    
    Change-Id: Ice77d83100eba339602bbdf374fec8546d4d1e12
    Reviewed-on: https://gerrit.libreoffice.org/3597
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 46eb689..85f6ce5 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -614,6 +614,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
     if( mpMetaFile )
         mpMetaFile->AddAction( new MetaFloatTransparentAction( rMtf, rPos, rSize, rTransparenceGradient ) );
 
+    if ( !IsDeviceOutputNecessary() )
+        return;
+
     if( ( rTransparenceGradient.GetStartColor() == aBlack && rTransparenceGradient.GetEndColor() == aBlack ) ||
         ( mnDrawMode & ( DRAWMODE_NOTRANSPARENCY ) ) )
     {
commit 63397e1e699845e92e3046fd50bbbdcba6512a32
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Apr 23 22:27:57 2013 +0200

    fdo#60280: sw: restore anti-aliasing for all OLE objects
    
    The OLE case in SwNoTxtFrm::PaintPicture() was mis-merged to modify the
    anti-aliasing always but reset it only for Charts.
    
    (regression from 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70)
    
    Change-Id: I0d740e621c3fd71f308d980581edb3c16308c06e
    (cherry picked from commit 954d695827431a5badd1a993d8f364c669ca9c9c)
    Reviewed-on: https://gerrit.libreoffice.org/3589
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    (cherry picked from commit f3e8a9649ac653eafaf8c5fa57e20d3dbe90d82c)
    Reviewed-on: https://gerrit.libreoffice.org/3594
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 914e189..a839420 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -1143,8 +1143,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
         }
 
         // see #i99665#
-        if ( pOLENd->IsChart() &&
-                pShell->Imp()->GetDrawView()->IsAntiAliasing() )
+        if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
         {
             pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
         }
commit 00609ef4d2ef46700a6411ac0f93114005153a4a
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Apr 22 23:06:50 2013 +0200

    fixed a mess of out of bounds string accesses
    
    (cherry picked from commit 5cd4300f7ffc24d6bc0ed5704f37a04852fd322b)
    
    Conflicts:
    	svl/source/numbers/zformat.cxx
    
    Change-Id: I800840e1b3c0d97a049b3ceba0ec244365dc8e6b
    Reviewed-on: https://gerrit.libreoffice.org/3563
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Andras Timar <atimar at suse.com>
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 1b12669..545d6cc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1412,6 +1412,21 @@ SvNumberformat::LocaleType SvNumberformat::ImpGetLocaleType(const OUString& rStr
     return (cToken == ']' || nPos == nLen) ? LocaleType(nNum) : LocaleType();
 }
 
+static bool lcl_matchKeywordAndGetNumber( const OUString & rString, const sal_Int32 nPos,
+        const OUString & rKeyword, sal_Int32 & nNumber )
+{
+    if (0 <= nPos && nPos + rKeyword.getLength() < rString.getLength() && rString.matchIgnoreAsciiCase( rKeyword, nPos))
+    {
+        nNumber = rString.copy( nPos + rKeyword.getLength()).toInt32();
+        return true;
+    }
+    else
+    {
+        nNumber = 0;
+        return false;
+    }
+}
+
 short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
                                     sal_Int32& nPos,
                                     OUString& sSymbol)
@@ -1514,43 +1529,47 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
             {
                 const OUString aNatNum("NATNUM");
                 const OUString aDBNum("DBNUM");
-                OUString aUpperNatNum( rChrCls().uppercase( rString.toString(), nPos-1, aNatNum.getLength() ) );
-                OUString aUpperDBNum( rChrCls().uppercase( rString.toString(), nPos-1, aDBNum.getLength() ) );
-                sal_Unicode cUpper = aUpperNatNum[0];
-                sal_Int32 nNatNumNum = rString.toString().copy( nPos - 1 + aNatNum.getLength() ).toInt32();
-                sal_Unicode cDBNum = rString[ nPos - 1 + aDBNum.getLength()];
-                if ( aUpperNatNum == aNatNum && 0 <= nNatNumNum && nNatNumNum <= 19 )
+                const OUString aBufStr( rString.toString());
+                sal_Int32 nNatNumNum;
+                sal_Int32 nDBNum;
+                if ( lcl_matchKeywordAndGetNumber( aBufStr, nPos-1, aNatNum, nNatNumNum) &&
+                        0 <= nNatNumNum && nNatNumNum <= 19 )
                 {
                     sBuffSymbol.stripStart((sal_Unicode)'[');
-                    sBuffSymbol.append( rString.toString().copy( --nPos, aNatNum.getLength()+1 ));
+                    sBuffSymbol.append( aBufStr.copy( --nPos, aNatNum.getLength()+1 ));
                     nPos += aNatNum.getLength()+1;
                     //! SymbolType is negative
                     eSymbolType = (short) (BRACKET_SYMBOLTYPE_NATNUM0 - nNatNumNum);
                     eState = SsGetPrefix;
                 }
-                else if ( aUpperDBNum == aDBNum && '1' <= cDBNum && cDBNum <= '9' )
+                else if ( lcl_matchKeywordAndGetNumber( aBufStr, nPos-1, aDBNum, nDBNum) &&
+                        '1' <= nDBNum && nDBNum <= '9' )
                 {
                     sBuffSymbol.stripStart((sal_Unicode)'[');
                     sBuffSymbol.append(rString.toString().copy( --nPos, aDBNum.getLength()+1 ));
                     nPos += aDBNum.getLength()+1;
                     //! SymbolType is negative
-                    eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (cDBNum - '1'));
+                    eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - '1'));
                     eState = SsGetPrefix;
                 }
-                else if (cUpper == rKeywords[NF_KEY_H][0] ||  // H
-                         cUpper == rKeywords[NF_KEY_MI][0] ||  // M
-                         cUpper == rKeywords[NF_KEY_S][0] )   // S
-                {
-                    sBuffSymbol.append(cToken);
-                    eState = SsGetTime;
-                    cLetter = cToken;
-                }
                 else
                 {
-                    sBuffSymbol.stripStart((sal_Unicode)'[');
-                    sBuffSymbol.append(cToken);
-                    eSymbolType = BRACKET_SYMBOLTYPE_COLOR;
-                    eState = SsGetPrefix;
+                    sal_Unicode cUpper = rChrCls().uppercase( aBufStr, nPos-1, 1)[0];
+                    if (    cUpper == rKeywords[NF_KEY_H][0] ||     // H
+                            cUpper == rKeywords[NF_KEY_MI][0] ||    // M
+                            cUpper == rKeywords[NF_KEY_S][0] )      // S
+                    {
+                        sBuffSymbol.append(cToken);
+                        eState = SsGetTime;
+                        cLetter = cToken;
+                    }
+                    else
+                    {
+                        sBuffSymbol.stripStart((sal_Unicode)'[');
+                        sBuffSymbol.append(cToken);
+                        eSymbolType = BRACKET_SYMBOLTYPE_COLOR;
+                        eState = SsGetPrefix;
+                    }
                 }
             }
             }
commit 73623e57b50c461ab3df95065d56908825144009
Author: Winfried Donkers <osc at dci-electronics.nl>
Date:   Sat Apr 13 19:47:10 2013 +0200

    fdo#40100 make function YEARFRAC comply with ODFF Version1.2
    
    Reviewed-on: https://gerrit.libreoffice.org/3375
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 275e68d141179272258d03194d799495fa3dec4a)
    
    Conflicts:
    	scaddins/source/analysis/analysishelper.cxx
    	scaddins/source/analysis/analysishelper.hxx
    
    Change-Id: Ief5e5c89b7fb69fb9849cf2d6efe2b4c5b7f5391
    Signed-off-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit bd9238f3fe4bd004cb77e89813eb730e1e865667)
    Reviewed-on: https://gerrit.libreoffice.org/3554
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 8fddc7b..b540a88 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -333,78 +333,6 @@ sal_Int32 GetDaysInYears( sal_uInt16 nYear1, sal_uInt16 nYear2 )
 }
 
 
-void GetDiffParam( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode,
-    sal_uInt16& rYears, sal_Int32& rDayDiffPart, sal_Int32& rDaysInYear ) THROWDEF_RTE_IAE
-{
-    if( nStartDate > nEndDate )
-    {
-        sal_Int32   n = nEndDate;
-        nEndDate = nStartDate;
-        nStartDate = n;
-    }
-
-    sal_Int32   nDate1 = nStartDate + nNullDate;
-    sal_Int32   nDate2 = nEndDate + nNullDate;
-
-    sal_uInt16  nDay1, nDay2;
-    sal_uInt16  nMonth1, nMonth2;
-    sal_uInt16  nYear1, nYear2;
-
-    DaysToDate( nDate1, nDay1, nMonth1, nYear1 );
-    DaysToDate( nDate2, nDay2, nMonth2, nYear2 );
-
-    sal_uInt16  nYears;
-
-    sal_Int32   nDayDiff, nDaysInYear;
-
-    switch( nMode )
-    {
-        case 0:         // 0=USA (NASD) 30/360
-        case 4:         // 4=Europe 30/360
-            nDaysInYear = 360;
-            nYears = nYear2 - nYear1;
-            nDayDiff = GetDiffDate360( nDay1, nMonth1, nYear1, IsLeapYear( nYear1 ),
-                                        nDay2, nMonth2, nYear2, nMode == 0 ) - nYears * nDaysInYear;
-            break;
-        case 1:         // 1=exact/exact
-            nYears = nYear2 - nYear1;
-
-            nDaysInYear = IsLeapYear( nYear1 )? 366 : 365;
-
-            if( nYears && ( nMonth1 > nMonth2 || ( nMonth1 == nMonth2 && nDay1 > nDay2 ) ) )
-                nYears--;
-
-            if( nYears )
-                nDayDiff = nDate2 - DateToDays( nDay1, nMonth1, nYear2 );
-            else
-                nDayDiff = nDate2 - nDate1;
-
-            if( nDayDiff < 0 )
-                nDayDiff += nDaysInYear;
-
-            break;
-        case 2:         // 2=exact/360
-            nDaysInYear = 360;
-            nYears = sal_uInt16( ( nDate2 - nDate1 ) / nDaysInYear );
-            nDayDiff = nDate2 - nDate1;
-            nDayDiff %= nDaysInYear;
-            break;
-        case 3:         //3=exact/365
-            nDaysInYear = 365;
-            nYears = sal_uInt16( ( nDate2 - nDate1 ) / nDaysInYear );
-            nDayDiff = nDate2 - nDate1;
-            nDayDiff %= nDaysInYear;
-            break;
-        default:
-            THROW_IAE;
-    }
-
-    rYears = nYears;
-    rDayDiffPart = nDayDiff;
-    rDaysInYear = nDaysInYear;
-}
-
-
 sal_Int32 GetDiffDate( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode,
     sal_Int32* pOptDaysIn1stYear ) THROWDEF_RTE_IAE
 {
@@ -509,17 +437,143 @@ sal_Int32 GetDaysInYear( sal_Int32 nNullDate, sal_Int32 nDate, sal_Int32 nMode )
 }
 
 
-double GetYearFrac( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode ) THROWDEF_RTE_IAE
+//fdo40100 toDo: make function fully compliant with ODFF1.2
+/**
+ * Function GetYearFrac implements YEARFRAC as defined in:
+ *   Open Document Format for Office Applications version 1.2 Part 2, par. 6.10.24
+ *   The calculations are defined in:
+ *   Open Document Format for Office Applications version 1.2 Part 2, par. 4.11.7
+ */
+double GetYearFrac( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode ) throw( uno::RuntimeException, lang::IllegalArgumentException )
 {
     if( nStartDate == nEndDate )
         return 0.0;     // nothing to do...
 
-    sal_uInt16  nYears;
-    sal_Int32   nDayDiff, nDaysInYear;
+    if( nStartDate > nEndDate )
+    {
+        sal_Int32   n = nEndDate;
+        nEndDate = nStartDate;
+        nStartDate = n;
+    }
+
+    sal_Int32 nDate1 = nStartDate + nNullDate;
+    sal_Int32 nDate2 = nEndDate + nNullDate;
+
+    sal_uInt16  nDay1, nDay2;
+    sal_uInt16  nMonth1, nMonth2;
+    sal_uInt16  nYear1, nYear2;
+
+    DaysToDate( nDate1, nDay1, nMonth1, nYear1 );
+    DaysToDate( nDate2, nDay2, nMonth2, nYear2 );
+
+    // calculate days between nDate1 and nDate2
+    sal_Int32 nDayDiff;
+    switch( nMode )
+    {
+        case 0:         // 0=USA (NASD) 30/360
+            if ( nDay1 == 31 )
+            {
+                nDay1--;
+            }
+            if ( nDay1 == 30 && nDay2 == 31 )
+            {
+                nDay2--;
+            }
+            else
+            {
+                if ( nMonth1 == 2 && nDay1 == ( IsLeapYear( nYear1 ) ? 29 : 28 ) )
+                {
+                    nDay1 = 30;
+                    if ( nMonth2 == 2 && nDay2 == ( IsLeapYear( nYear2 ) ? 29 : 28 ) )
+                    {
+                        nDay2 = 30;
+                    }
+                }
+            }
+            nDayDiff = ( nYear2 - nYear1 ) * 360 + ( nMonth2 - nMonth1 ) * 30 + ( nDay2 - nDay1 );
+            break;
+        case 1:         // 1=exact/exact
+        case 2:         // 2=exact/360
+        case 3:         // 3=exact/365
+            nDayDiff = nDate2 - nDate1;
+            break;
+        case 4:         // 4=Europe 30/360
+            if ( nDay1 == 31 )
+            {
+                nDay1--;
+            }
+            if ( nDay2 == 31 )
+            {
+                nDay2--;
+            }
+            nDayDiff = ( nYear2 - nYear1 ) * 360 + ( nMonth2 - nMonth1 ) * 30 + ( nDay2 - nDay1 );
+            break;
+        default:
+            throw lang::IllegalArgumentException();
+    }
 
-    GetDiffParam( nNullDate, nStartDate, nEndDate, nMode, nYears, nDayDiff, nDaysInYear );
+    //calculate days in year
+    double nDaysInYear;
+    switch( nMode )
+    {
+        case 0:         // 0=USA (NASD) 30/360
+        case 2:         // 2=exact/360
+        case 4:         // 4=Europe 30/360
+            nDaysInYear = 360;
+            break;
+        case 1:         // 1=exact/exact
+            {
+                bool isYearDifferent = ( nYear1 != nYear2 );
+                if ( isYearDifferent &&
+                     ( ( nYear2 != nYear1 + 1 ) ||
+                       ( nMonth1 < nMonth2 ) ||
+                       ( nMonth1 == nMonth2 && nDay1 < nDay2 ) ) )
+                {
+                    // return average of days in year between nDate1 and nDate2, inclusive
+                    sal_Int32 nDayCount = 0;
+                    for ( sal_Int16 i = nYear1; i <= nYear2; i++ )
+                        nDayCount += ( IsLeapYear( i ) ? 366 : 365 );
+
+                    nDaysInYear = ( double ) nDayCount / ( double ) ( nYear2 - nYear1 + 1 );
+                }
+                else
+                {
+                    if ( isYearDifferent && IsLeapYear( nYear1 ) )
+                    {
+                        nDaysInYear = 366;
+                    }
+                    else
+                    {
+                        //if Feb 29 is between nDate1 and ndate2, inclusive
+                        if ( ( IsLeapYear( nYear1 ) && nMonth1 <= 2 && nDay1 <= 29 ) ||
+                             ( IsLeapYear( nYear2 ) && ( nMonth2 > 3 || ( nMonth2 == 2 && nDay1 == 29 ) ) ) )
+                        {
+                            nDaysInYear = 366;
+                        }
+                        else
+                        {
+                            nDaysInYear = 365;
+                            for ( sal_Int16 i = nYear1; i <= nYear2; i++ )
+                            {
+                                if ( IsLeapYear( i ) )
+                                {
+                                    nDaysInYear = 366;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            break;
+        case 3:         // 3=exact/365
+            nDaysInYear = 365;
+            break;
+        default:
+            throw lang::IllegalArgumentException();
+    }
 
-    return double( nYears ) + double( nDayDiff ) / double( nDaysInYear );
+    return double( nDayDiff ) / nDaysInYear;
 }
 
 double BinomialCoefficient( double n, double k )
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 395348c..ceb3fe2 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -79,11 +79,6 @@ sal_Int32           GetDiffDate360( sal_Int32 nNullDate, sal_Int32 nDate1, sal_I
 
 sal_Int32           GetDaysInYears( sal_uInt16 nYear1, sal_uInt16 nYear2 );
 inline sal_Int16    GetDayOfWeek( sal_Int32 nDate );
-void                GetDiffParam( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode,
-                        sal_uInt16& rYears, sal_Int32& rDayDiffPart, sal_Int32& rDaysInYear ) THROWDEF_RTE_IAE;
-                        // rYears = full num of years
-                        // rDayDiffPart = num of days for last year
-                        // rDaysInYear = num of days in first year
 sal_Int32           GetDiffDate( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode,
                                 sal_Int32* pOptDaysIn1stYear = NULL ) THROWDEF_RTE_IAE;
 double              GetYearDiff( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode )
commit 86c58a8109ad0695c91f86c3689df9dc01938386
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Apr 19 15:56:38 2013 +0200

    Personas: Now they are called 'Themes', and changed location.
    
    Updated the URL's + the code that works with them & parses the page
    accordingly.
    
    Change-Id: Iba1414c749bdf227b3945162da83e3d35ce86244
    Reviewed-on: https://gerrit.libreoffice.org/3483
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 10ee48b..0878db4 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -33,7 +33,7 @@ using namespace com::sun::star;
 /** Dialog that will allow the user to choose a Persona to use.
 
 So far there is no better possibility than just to paste the URL from
-http://www.getpersona.com ...
+https://addons.mozilla.org/firefox/themes ...
 */
 class SelectPersonaDialog : public ModalDialog
 {
@@ -59,34 +59,24 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
     pButton->SetClickHdl( LINK( this, SelectPersonaDialog, VisitPersonas ) );
 
     get( m_pEdit, "persona_url" );
-    m_pEdit->SetPlaceholderText( "http://www.getpersonas.com/persona/" );
+    m_pEdit->SetPlaceholderText( "https://addons.mozilla.org/firefox/themes/" );
 }
 
 OUString SelectPersonaDialog::GetPersonaURL() const
 {
     OUString aText( m_pEdit->GetText() );
 
-    if ( !aText.startsWith( "http://www.getpersonas.com/" ) &&
-         !aText.startsWith( "https://www.getpersonas.com/" ) )
-    {
-        return OUString();
-    }
-
-    // canonicalize the URL
-    OUString aPersona( "persona/" );
-    sal_Int32 nPersona = aText.lastIndexOf( aPersona );
-
-    if ( nPersona < 0 )
-        return OUString();
+    if ( aText.startsWith( "https://addons.mozilla.org/" ) )
+        return aText;
 
-    return "http://www.getpersonas.com/persona/" + aText.copy( nPersona + aPersona.getLength() );
+    return OUString();
 }
 
 IMPL_LINK( SelectPersonaDialog, VisitPersonas, PushButton*, /*pButton*/ )
 {
     uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShell( com::sun::star::system::SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
 
-    xSystemShell->execute( "http://www.getpersonas.com", OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
+    xSystemShell->execute( "https://addons.mozilla.org/firefox/themes/", OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
 
     return 0;
 }
@@ -291,7 +281,7 @@ static OUString searchValue( const OString &rBuffer, sal_Int32 from, const OStri
 
     where += rIdentifier.getLength();
 
-    sal_Int32 end = rBuffer.indexOf( """, where );
+    sal_Int32 end = rBuffer.indexOf( """, where );
     if ( end < 0 )
         return OUString();
 
@@ -305,24 +295,24 @@ static OUString searchValue( const OString &rBuffer, sal_Int32 from, const OStri
 static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, OUString *pFooterURL, OUString *pTextColor, OUString *pAccentColor )
 {
     // it is the first attribute that contains "persona="
-    sal_Int32 persona = rBuffer.indexOf( "persona=\"{" );
+    sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
     if ( persona < 0 )
         return false;
 
     // now search inside
-    *pHeaderURL = searchValue( rBuffer, persona, ""headerURL":"" );
+    *pHeaderURL = searchValue( rBuffer, persona, ""headerURL":"" );
     if ( pHeaderURL->isEmpty() )
         return false;
 
-    *pFooterURL = searchValue( rBuffer, persona, ""footerURL":"" );
+    *pFooterURL = searchValue( rBuffer, persona, ""footerURL":"" );
     if ( pFooterURL->isEmpty() )
         return false;
 
-    *pTextColor = searchValue( rBuffer, persona, ""textcolor":"" );
+    *pTextColor = searchValue( rBuffer, persona, ""textcolor":"" );
     if ( pTextColor->isEmpty() )
         return false;
 
-    *pAccentColor = searchValue( rBuffer, persona, ""accentcolor":"" );
+    *pAccentColor = searchValue( rBuffer, persona, ""accentcolor":"" );
     if ( pAccentColor->isEmpty() )
         return false;
 
commit 6d9374ca1555a32b94735fc9f66589340a12407a
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Apr 18 22:53:00 2013 +0200

    Revert "svformatter already accept OUString input", fdo#63306
    
    This reverts commit c5e5699c80cfb32a164696a2c5144b5ccb0a91a9.
    
    And adapts to OUString.
    
    Conflicts:
    	basic/source/runtime/runtime.cxx
    
    Change-Id: Icd7c1e1e57162eefb1f3631aa5509fd3a09c9b08
    (cherry picked from commit 1ef2cce787df3d254a78ebdb469fb06668f350f4)
    Reviewed-on: https://gerrit.libreoffice.org/3469
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Andras Timar <atimar at suse.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 1223577..ed1e5d1 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -392,12 +392,14 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
     case YMD: aDateStr = "JJJJ.MM.TT"; break;
     default:  aDateStr = "MM.TT.JJJJ"; break;
     }
-    rpNumberFormatter->PutandConvertEntry( aDateStr, nCheckPos, nType,
-                                           rnStdDateIdx, LANGUAGE_GERMAN, eLangType );
+    OUString aStr( aDateStr );      // PutandConvertEntry() modifies string!
+    rpNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
+        rnStdDateIdx, LANGUAGE_GERMAN, eLangType );
     nCheckPos = 0;
     OUString aStrHHMMSS(" HH:MM:SS");
     aDateStr += aStrHHMMSS;
-    rpNumberFormatter->PutandConvertEntry( aDateStr, nCheckPos, nType,
+    aStr = aDateStr;
+    rpNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
         rnStdDateTimeIdx, LANGUAGE_GERMAN, eLangType );
 }
 
commit 1d933d4533c9eb10f4456ec8a8a8468e6ff086d5
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Mon Apr 15 21:30:18 2013 -0400

    Remove the 4th option from the pivot table source selection dialog.
    
    Change-Id: I39ed1a9fd0476506cac0852af63182075f433ffd
    Reviewed-on: https://gerrit.libreoffice.org/3402
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>
    Reviewed-on: https://gerrit.libreoffice.org/3419
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx
index cad3532..e17d1e0 100644
--- a/sc/source/ui/dbgui/dapitype.cxx
+++ b/sc/source/ui/dbgui/dapitype.cxx
@@ -62,6 +62,10 @@ ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bE
     aBtnNamedRange.Disable();
 
     FreeResource();
+
+     // Intentionally hide this to see if someone complains. Eventually we'll
+     // remove this option.
+    aBtnExternal.Show(false);
 }
 
 ScDataPilotSourceTypeDlg::~ScDataPilotSourceTypeDlg()
diff --git a/sc/source/ui/dbgui/dapitype.src b/sc/source/ui/dbgui/dapitype.src
index 569023d..4a388d6 100644
--- a/sc/source/ui/dbgui/dapitype.src
+++ b/sc/source/ui/dbgui/dapitype.src
@@ -26,7 +26,7 @@ ModalDialog RID_SCDLG_DAPITYPE
     OutputSize = TRUE ;
     HelpId = HID_DATAPILOT_TYPE ;
     SVLook = TRUE ;
-    Size = MAP_APPFONT ( 241 , 76 ) ;
+    Size = MAP_APPFONT ( 241 , 63 ) ;
     Moveable = TRUE ;
     Closeable = FALSE ;
 
commit 64391b3f693b2f2e8e633b124108ca0290393f9f
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Apr 16 16:20:03 2013 +0200

    bump product version to 4.0.3.1+, release number to 1
    
    Change-Id: I72da57cfba66c0fabbe991c0a74466abfd669b37

diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 2a5c91d..1a2945d 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -4,7 +4,7 @@ Globals
     {
         variables
         {
-            UREPACKAGEVERSION 4.0.3.0
+            UREPACKAGEVERSION 4.0.3.1
             URELAYERVERSION 1
             REFERENCEOOOMAJORMINOR 3.4
             UNIXBASISROOTNAME libreoffice4.0
@@ -50,12 +50,12 @@ LibreOffice
         {
             PRODUCTNAME LibreOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             POSTVERSIONEXTENSION
             POSTVERSIONEXTENSIONUNIX
             BRANDPACKAGEVERSION 4.0
             USERDIRPRODUCTVERSION 4
-            ABOUTBOXPRODUCTVERSION 4.0.3.0
+            ABOUTBOXPRODUCTVERSION 4.0.3.1
             ABOUTBOXPRODUCTVERSIONSUFFIX +
             BASEPRODUCTVERSION 4.0
             PCPFILENAME libreoffice.pcp
@@ -65,7 +65,7 @@ LibreOffice
             FILEFORMATNAME OpenOffice.org
             FILEFORMATVERSION 1.0
             WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             LICENSENAME LGPL
             GLOBALFILEGID gid_File_Lib_Vcl
@@ -100,13 +100,13 @@ LibreOffice_Dev
         {
             PRODUCTNAME LOdev
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             UNIXBASISROOTNAME lodev4.0
             POSTVERSIONEXTENSION
             POSTVERSIONEXTENSIONUNIX
             BRANDPACKAGEVERSION 4.0
             USERDIRPRODUCTVERSION 4
-            ABOUTBOXPRODUCTVERSION 4.0.3.0
+            ABOUTBOXPRODUCTVERSION 4.0.3.1
             ABOUTBOXPRODUCTVERSIONSUFFIX +
             BASEPRODUCTVERSION 4.0
             DEVELOPMENTPRODUCT 1
@@ -121,7 +121,7 @@ LibreOffice_Dev
             FILEFORMATNAME OpenOffice.org
             FILEFORMATVERSION 1.0
             WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             LICENSENAME LGPL
             GLOBALFILEGID gid_File_Lib_Vcl
@@ -159,9 +159,9 @@ URE
         {
             PRODUCTNAME URE
             PRODUCTVERSION 4.0
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION 1
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             BRANDPACKAGEVERSION 4.0
             LICENSENAME LGPL
             NOVERSIONINDIRNAME 1
@@ -192,11 +192,11 @@ LibreOffice_SDK
         {
             PRODUCTNAME LibreOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             POSTVERSIONEXTENSION SDK
             POSTVERSIONEXTENSIONUNIX sdk
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             PACK_INSTALLED 1
             DMG_VOLUMEEXTENSION SDK
@@ -231,12 +231,12 @@ LibreOffice_Dev_SDK
         {
             PRODUCTNAME LOdev
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             UNIXBASISROOTNAME lodev4.0
             POSTVERSIONEXTENSION SDK
             POSTVERSIONEXTENSIONUNIX sdk
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             BASISPACKAGEPREFIX lodevbasis
             UREPACKAGEPREFIX lodev
@@ -276,11 +276,11 @@ LibreOffice_Test
         {
             PRODUCTNAME LibreOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             POSTVERSIONEXTENSION TEST
             POSTVERSIONEXTENSIONUNIX test
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             PACK_INSTALLED 1
             DMG_VOLUMEEXTENSION TEST
@@ -315,12 +315,12 @@ LibreOffice_Dev_Test
         {
             PRODUCTNAME LOdev
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             UNIXBASISROOTNAME lodev4.0
             POSTVERSIONEXTENSION TEST
             POSTVERSIONEXTENSIONUNIX test
             BRANDPACKAGEVERSION 4.0
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             BASISPACKAGEPREFIX lodevbasis
             UREPACKAGEPREFIX lodev
@@ -359,12 +359,12 @@ OxygenOffice
         {
             PRODUCTNAME OxygenOffice
             PRODUCTVERSION 4.0
-            PRODUCTEXTENSION .3.0
+            PRODUCTEXTENSION .3.1
             POSTVERSIONEXTENSION
             POSTVERSIONEXTENSIONUNIX
             BRANDPACKAGEVERSION 4.0
             USERDIRPRODUCTVERSION 4
-            ABOUTBOXPRODUCTVERSION 4.0.3.0
+            ABOUTBOXPRODUCTVERSION 4.0.3.1
             ABOUTBOXPRODUCTVERSIONSUFFIX +
             BASEPRODUCTVERSION 4.0
             PCPFILENAME openoffice.pcp
@@ -374,7 +374,7 @@ OxygenOffice
             FILEFORMATNAME OpenOffice.org
             FILEFORMATVERSION 1.0
             WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
-            PACKAGEVERSION 4.0.3.0
+            PACKAGEVERSION 4.0.3.1
             PACKAGEREVISION {buildid}
             LICENSENAME LGPL
             SERVICESPROJEKT 1
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index ddf2926..c90c87b 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,6 +1,6 @@
 RSCVERSION=400
-RSCREVISION=400m1(Build:0)
-BUILD=0
+RSCREVISION=400m1(Build:1)
+BUILD=1
 LAST_MINOR=m0
 SOURCEVERSION=OOO400
 
commit d6952f110d49a62984d2959256386aff5f6e23e1
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Apr 16 15:08:05 2013 +0200

    Branch libreoffice-4-0-3
    
    This is 'libreoffice-4-0-3' - the stable branch for the 4.0.3 release.
    Only very safe changes, reviewed by three people are allowed.
    
    If you want to commit more complicated fix for the next 4.0.x release,
    please use the 'libreoffice-4-0' branch.
    
    If you want to build something cool, unstable, and risky, use master.
    
    Change-Id: I1f6ff6d731a7237d38f310e09c9c6c237f41e493

diff --git a/dictionaries b/dictionaries
index ed53356..dea3552 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit ed5335630cc99820e55cf3808b09c7e1458f875f
+Subproject commit dea3552baa813eeed8e797381a215df8e474a576
diff --git a/helpcontent2 b/helpcontent2
index b568649..3178346 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b56864919adc5b2c36b354e365c93964bb611dab
+Subproject commit 3178346c51ed6b78f62caaa95060959ce2b78b59
diff --git a/translations b/translations
index a2cdadb..d258129 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit a2cdadbfe89f544f7a5d0c9e0259ed7dbafd5bc6
+Subproject commit d258129309c9676e2aa0d909058cfc5d123346b0
commit df4b1b9be4f818ef912bfb58b514bab1acdd6e71
Author: Noel Power <noel.power at suse.com>
Date:   Tue Mar 19 15:59:21 2013 +0000

    follow on fix for fdo#62090 ensure out of range startpos is handled
    
    Change-Id: Ic1f57480a36415998748faeea3b606a47d277181
    (cherry picked from commit 0054b438013ef412c2df3b7ebe93dd1935ec07af)
    Reviewed-on: https://gerrit.libreoffice.org/3409
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 7f724b1..666dbba 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1261,8 +1261,12 @@ RTLFUNC(Mid)
                 else
                 {
                     aResultStr = aArgStr;
-                    aResultStr.remove( nStartPos, nLen );
-                    aResultStr.insert( nStartPos, rPar.Get(4)->GetOUString().getStr(), std::min(nLen, rPar.Get(4)->GetOUString().getLength()));
+                    sal_Int32 nTmpStartPos = nStartPos;
+                    if ( nTmpStartPos > aArgStr.getLength() )
+                        nTmpStartPos =  aArgStr.getLength();
+                    else
+                        aResultStr.remove( nTmpStartPos, nLen );
+                    aResultStr.insert( nTmpStartPos, rPar.Get(4)->GetOUString().getStr(), std::min(nLen, rPar.Get(4)->GetOUString().getLength()));
                 }
 
                 rPar.Get(1)->PutString( aResultStr.makeStringAndClear() );
commit 69371d3fae481adb2b21701952570f829fcd8311
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Mar 19 15:43:07 2013 +0000

    fix for fdo#62090 Mid function regression
    
    Change-Id: Ia6a73d6a44a34345b512922037d01b8b40ac24a8
    (cherry picked from commit 14d452d0c2874f47f0b6ac1cd1c725195d5d69a9)
    Reviewed-on: https://gerrit.libreoffice.org/3408
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 858f844..7f724b1 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1262,7 +1262,7 @@ RTLFUNC(Mid)
                 {
                     aResultStr = aArgStr;
                     aResultStr.remove( nStartPos, nLen );
-                    aResultStr.insert( nStartPos, rPar.Get(4)->GetOUString().getStr(), nLen);
+                    aResultStr.insert( nStartPos, rPar.Get(4)->GetOUString().getStr(), std::min(nLen, rPar.Get(4)->GetOUString().getLength()));
                 }
 
                 rPar.Get(1)->PutString( aResultStr.makeStringAndClear() );
commit dfe4974119bcd17fa65a5f0600fd12af02425c56
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Mon Apr 15 20:37:52 2013 +0200

    fdo#61193 fix crash on RTF paste of footnote
    
    Regression from 232ad2f2588beff50cb5c1f3b689c581ba317583.
    
    (cherry picked from commit e7664052d6693598e773f4c9dd6b819213d80d60)
    
    Change-Id: Ia0873851979df5bba0a4693f044aab2aeff2b8e4
    Reviewed-on: https://gerrit.libreoffice.org/3404
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>

diff --git a/sw/qa/extras/rtfimport/data/fdo61193.rtf b/sw/qa/extras/rtfimport/data/fdo61193.rtf
new file mode 100644
index 0000000..6618bda
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo61193.rtf
@@ -0,0 +1 @@
+{\rtf1\ansi text.{\footnote footnote}}
diff --git a/sw/qa/extras/rtfimport/data/hello.rtf b/sw/qa/extras/rtfimport/data/hello.rtf
new file mode 100644
index 0000000..472817d
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/hello.rtf
@@ -0,0 +1 @@
+{\rtf1 Hello world!\par}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 6a70ad7..246358e 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -145,6 +145,7 @@ public:
     void testFdo62288();
     void testFdo37716();
     void testFdo51916();
+    void testFdo61193();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -156,6 +157,26 @@ private:
     void run();
     /// Get page count.
     int getPages();
+    /// Copy&paste helper.
+    void paste(OUString aFilename, uno::Reference<text::XTextRange> xTextRange = uno::Reference<text::XTextRange>())
+    {
+        uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.star.comp.Writer.RtfFilter"), uno::UNO_QUERY_THROW);
+        uno::Reference<document::XImporter> xImporter(xFilter, uno::UNO_QUERY_THROW);
+        xImporter->setTargetDocument(mxComponent);
+        uno::Sequence<beans::PropertyValue> aDescriptor(xTextRange.is() ? 3 : 2);
+        aDescriptor[0].Name = "InputStream";
+        SvStream* pStream = utl::UcbStreamHelper::CreateStream(getURLFromSrc("/sw/qa/extras/rtfimport/data/") + aFilename, STREAM_WRITE);
+        uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream));
+        aDescriptor[0].Value <<= xStream;
+        aDescriptor[1].Name = "IsNewDoc";
+        aDescriptor[1].Value <<= sal_False;
+        if (xTextRange.is())
+        {
+            aDescriptor[2].Name = "TextInsertModeRange";
+            aDescriptor[2].Value <<= xTextRange;
+        }
+        xFilter->filter(aDescriptor);
+    }
 };
 
 void Test::run()
@@ -240,6 +261,7 @@ void Test::run()
         {"fdo62288.rtf", &Test::testFdo62288},
         {"fdo37716.rtf", &Test::testFdo37716},
         {"fdo51916.rtf", &Test::testFdo51916},
+        {"hello.rtf", &Test::testFdo61193},
     };
     for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
     {
@@ -906,6 +928,15 @@ void Test::testCopyPasteFootnote()
     CPPUNIT_ASSERT_EQUAL(OUString("bbb"), xTextRange->getString());
 }
 
+void Test::testFdo61193()
+{
+    // Pasting content that contained a footnote caused a crash.
+    uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xText(xTextDocument->getText(), uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xEnd = xText->getEnd();
+    paste("fdo61193.rtf", xEnd);
+}
+
 void Test::testShptxtPard()
 {
     // The problem was that \pard inside \shptxt caused loss of shape text
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 6074add..deda4f1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -726,6 +726,8 @@ void lcl_AddRangeAndStyle(
 void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
 {
     PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
+    if (m_aTextAppendStack.empty())
+        return;
     TextAppendContext& rAppendContext = m_aTextAppendStack.top();
     // n#779642: ignore fly frame inside table as it could lead to messy situations
     if( rAppendContext.pLastParagraphProperties.get() && rAppendContext.pLastParagraphProperties->IsFrameMode()
@@ -969,6 +971,8 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
 #endif
 
     ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pPropertyMap.get() );
+    if (!m_aTextAppendStack.size())
+        return;
     TextAppendContext& rAppendContext = m_aTextAppendStack.top();
     uno::Reference< text::XTextAppend >  xTextAppend;
     if (!m_aTextAppendStack.empty())
@@ -1453,14 +1457,14 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
         }
         appendTextContent( uno::Reference< text::XTextContent >( xFootnoteText, uno::UNO_QUERY_THROW ), aFontProperties );
         m_aTextAppendStack.push(TextAppendContext(uno::Reference< text::XTextAppend >( xFootnoteText, uno::UNO_QUERY_THROW ),
-                    m_bIsNewDoc ? uno::Reference<text::XTextCursor>() : m_xBodyText->createTextCursorByRange(xFootnoteText->getStart())));
+                    m_bIsNewDoc ? uno::Reference<text::XTextCursor>() : xFootnoteText->createTextCursorByRange(xFootnoteText->getStart())));
 
         // Redlines for the footnote anchor
         CheckRedline( xFootnote->getAnchor( ) );
     }
-    catch( const uno::Exception& )
+    catch( const uno::Exception& e )
     {
-        OSL_FAIL( "exception in PushFootOrEndnote" );
+        SAL_WARN("writerfilter", "exception in PushFootOrEndnote: " << e.Message);
     }
 }
 
commit eb5a62e4f435e8f8bc79b308f12ec8ed43853200
Author: Andras Timar <atimar at suse.com>
Date:   Mon Apr 15 18:39:22 2013 +0200

    Updated core
    Project: translations  a2cdadbfe89f544f7a5d0c9e0259ed7dbafd5bc6

diff --git a/translations b/translations
index 1029459..a2cdadb 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 1029459c30d7c8b6672961ae83f407acca8ced71
+Subproject commit a2cdadbfe89f544f7a5d0c9e0259ed7dbafd5bc6
commit dd2d5a5529095c42ab14c339a029462ca5df110a
Author: Andras Timar <atimar at suse.com>
Date:   Mon Apr 15 16:44:07 2013 +0200

    Updated core
    Project: translations  1029459c30d7c8b6672961ae83f407acca8ced71

diff --git a/translations b/translations
index 78ffe85..1029459 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 78ffe851c7f86318bd0e21f93caf3ccb7d1b98b9
+Subproject commit 1029459c30d7c8b6672961ae83f407acca8ced71
commit 93301cf7ca8fff91b594d2ebe7bb24510acfdd3c
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Apr 14 09:37:00 2013 +0200

    fdo#52179 on copy kb-shortcut, from *current* row, not last painted row (!)
    
    Change-Id: I39be862abb7c72234adad9c517d4a0570a1d71ae
    Reviewed-on: https://gerrit.libreoffice.org/3378
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 9a40816..2663b8f 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3397,7 +3397,7 @@ void DbGridControl::KeyInput( const KeyEvent& rEvt )
         {
             size_t Location = GetModelColumnPos( nColId );
             DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL;
-            OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), this );
+            OStringTransfer::CopyString( GetCurrentRowCellText( pColumn, m_xCurrentRow ), this );
             return;
         }
     }
commit c15217f477f0a9810811746796d778a5d20b89d5
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 10 17:15:23 2013 +0200

    pgsql-sdbc: ResultSetMetaData::getTableName return tablename (without schema)
    
    Change-Id: I319ba91045fa43922d7b694a4f13322295590c81
    Reviewed-on: https://gerrit.libreoffice.org/3343
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
index f6089cc..6d9abf9 100644
--- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
@@ -407,16 +407,7 @@ sal_Int32 ResultSetMetaData::getScale( sal_Int32 column )
 {
     (void) column;
 // LEM TODO This is very fishy.. Should probably return the table to which that column belongs!
-    rtl::OUString ret;
-    if( m_tableName.getLength() )
-    {
-        OUStringBuffer buf( 128 );
-        buf.append( m_schemaName );
-        buf.appendAscii( "." );
-        buf.append( m_tableName );
-        ret = buf.makeStringAndClear();
-    }
-    return ret;
+    return m_tableName;
 }
 
 ::rtl::OUString ResultSetMetaData::getCatalogName( sal_Int32 column )
commit 3695b86bc35fc8c1011ca6d629cdd28bcd7c15aa
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 10 17:16:27 2013 +0200

    pgsql-sdbc: set tablename even if we do not know the schema
    
    Change-Id: I74c04e1262cc413696a12aca9af603beded7b07f
    Reviewed-on: https://gerrit.libreoffice.org/3342
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 7304b15..edf7dc3 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -654,7 +654,7 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data
             }
 
         }
-        else if( sourceTable.getLength() && -1 != sourceTable.indexOf( '.' ) )
+        else if( sourceTable.getLength() > 0)
         {
             splitConcatenatedIdentifier( sourceTable, &schema, &table );
         }
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 84d9741..86872a7 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -673,10 +673,20 @@ void splitConcatenatedIdentifier( const rtl::OUString & source, rtl::OUString *f
 {
     OStringVector vec;
     tokenizeSQL( rtl::OUStringToOString( source, RTL_TEXTENCODING_UTF8 ), vec );
-    if( vec.size() == 3 )
+    switch (vec.size())
     {
-        *first = rtl::OStringToOUString( vec[0] , RTL_TEXTENCODING_UTF8 );
+    case 1:
+        *first  = OUString();
+        *second = rtl::OStringToOUString( vec[0], RTL_TEXTENCODING_UTF8 );
+        break;
+    case 3:
+        *first  = rtl::OStringToOUString( vec[0], RTL_TEXTENCODING_UTF8 );
         *second = rtl::OStringToOUString( vec[2], RTL_TEXTENCODING_UTF8 );
+        break;
+    default:
+         SAL_WARN("connectivity.drivers.postgresql",
+                  "pq_tools::splitConcatenatedIdentifier unexpected number of tokens in identifier: "
+                  << vec.size());
     }
 }
 
commit 8bd84f28561a68aebcf59384de0f6b07819ede99
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 10 18:03:58 2013 +0200

    reportbuilder: do not use empty tablename
    
    Change-Id: I03ed5e810468ee206820a250c740b80c0ceda432
    Reviewed-on: https://gerrit.libreoffice.org/3341
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
index d0168a6..d940718 100644
--- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
@@ -253,7 +253,15 @@ public class SDBCReportDataFactory implements DataSourceFactory
                             try
                             {
                                 column = UnoRuntime.queryInterface(XPropertySet.class, columns.getByName(expression));
-                                expression = quote + column.getPropertyValue("TableName") + quote + "." + quote + expression + quote;
+                                String prefix;
+                                prefix = (String)column.getPropertyValue("TableName");
+                                if (prefix == null)
+                                    prefix = "";
+                                if (prefix.length() > 0)
+                                {
+                                    prefix = quote + prefix + quote + ".";
+                                }
+                                expression = prefix + quote + expression + quote;
                             }
                             catch (Exception ex)
                             {
commit 94cb2604ea75a504ecab5f500701099e00859b7c
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Wed Apr 10 10:36:09 2013 -0430

    Remove thumbnail from local view if we erase it throught the search view.
    
    Change-Id: I3ec486313bedcc633b020a2feea3d30730da98f0
    Reviewed-on: https://gerrit.libreoffice.org/3354
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 884897c..f1a3421 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -352,7 +352,11 @@ bool TemplateLocalView::removeTemplate (const sal_uInt16 nItemId, const sal_uInt
 
                     pIter = pItem->maTemplates.erase(pIter);
 
-                    RemoveItem(nItemId);
+                    if (maRegions[i]->mnRegionId == mnCurRegionId-1)
+                    {
+                        RemoveItem(nItemId);
+                        Invalidate();
+                    }
 
                     // Update Doc Idx for all templates that follow
                     for (; pIter != pItem->maTemplates.end(); ++pIter)
commit 7e16f5c0e8409aba10149501629b05bbcdd8939a
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Wed Apr 10 10:25:31 2013 -0430

    Set Template Manager dialog minimum size.
    
    Change-Id: I2d30bf2c3fb33b8297477f80704aa057911a2bba
    Reviewed-on: https://gerrit.libreoffice.org/3353
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a5edb7b..82289ba 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -244,6 +244,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
         mpViewBar->RemoveItem(nPos);
     }
 
+    SetMinOutputSizePixel(GetOutputSizePixel());
+
     mpViewBar->Show();
     mpActionBar->Show();
 
commit 91021f11a30b1a2da4f878e9f245675ef6da17a1
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Apr 12 18:54:45 2013 +0200

    fdo#36858
    
    1) No valueType (Format/Number/General) is like float valueType (Format/Number/any other)
    2) We use 1/1/1900 as startdate for number-from-date, stick to it more consistently
    
    Change-Id: Ib1008d1c30be602d8173457738c915087ed17391
    Reviewed-on: https://gerrit.libreoffice.org/3363
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
index ad303af..8c9e986 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
@@ -126,9 +126,10 @@ public class FormatValueUtility
         }
         else if (value instanceof java.sql.Date)
         {
-            if ("float".equals(valueType))//@see http://qa.openoffice.org/issues/show_bug.cgi?id=108954
+            if ("float".equals(valueType) || valueType == null)
             {
-                variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, HSSFDateUtil.getExcelDate((Date) value, false, 2).toString());
+                // This is to work around fdo#63478
+                variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, HSSFDateUtil.getExcelDate((Date) value, false, 0).toString());
             }
             else
             {
@@ -137,8 +138,12 @@ public class FormatValueUtility
         }
         else if (value instanceof Date)
         {
+            // This is what we *should* do, but see fdo#63478
+            // variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "date");
+            // variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value));
+            // so we do that instead to work around:
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
-            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, HSSFDateUtil.getExcelDate((Date) value, false, 2).toString());
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, HSSFDateUtil.getExcelDate((Date) value, false, 0).toString());
         }
         else if (value instanceof BigDecimal)
         {
commit a580678e8719d08ef9355b714f840837e89bd5b3
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Apr 13 16:15:24 2013 +0200

    resolved fdo#63421 crash in pivot table with accessibility
    
    The scenario of fdo#63421 (loading data and re-dragging the same field)
    is not needed, simple data is sufficient and crash happened also when
    dragging (removing) a field from a pane and dropping it anywhere else.
    
    Multiple errors:
    * getAccessibleChildCount() must return the real current count of
      children, not what mpFieldWindow says; AtkListener::updateChildList()
      uses this value to repopulate its own list; a child is added after it
      is added to mpFieldWindow but removed before it is removed from
      mpFieldWindow;
    * LostFocus() uses an index of -1 if the last child was already removed
      and the field was dropped after dragging it away from a pane, handle
      that but it still does not look right
    * RemoveField() called CommitChange() with
      AccessibleEventObject::NewValue set instead of OldValue, leading to
      AtkListener::handleChildAdded() being called instead of
      handleChildRemoved()
    
    Apparently this never worked since 2002.
    
    Change-Id: Idfb59d947002d2212bc67b414daecb65c55edae8
    (cherry picked from commit 26114dcdf9d55a5a2490de6de619337e9733b0e2)
    Reviewed-on: https://gerrit.libreoffice.org/3372
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index 035004ae..8490572 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -259,7 +259,7 @@ void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
         AccessibleEventObject aEvent;
         aEvent.EventId = AccessibleEventId::CHILD;
         aEvent.Source = uno::Reference< XAccessibleContext >(this);
-        aEvent.NewValue <<= xTempAcc;
+        aEvent.OldValue <<= xTempAcc;
 
         CommitChange(aEvent); // gone child - event
 
@@ -270,25 +270,41 @@ void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
 
 void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex)
 {
-    OSL_ENSURE(static_cast<size_t>(nOldIndex) < maChildren.size() &&
-                static_cast<size_t>(nNewIndex) < maChildren.size(), "did not recognize a child count change");
-
-    uno::Reference < XAccessible > xTempAcc = maChildren[nOldIndex].xWeakAcc;
-    if (xTempAcc.is() && maChildren[nOldIndex].pAcc)
-        maChildren[nOldIndex].pAcc->ResetFocused();
+    if (0 <= nOldIndex && static_cast<size_t>(nOldIndex) < maChildren.size())
+    {
+        uno::Reference < XAccessible > xTempAcc = maChildren[nOldIndex].xWeakAcc;
+        if (xTempAcc.is() && maChildren[nOldIndex].pAcc)
+            maChildren[nOldIndex].pAcc->ResetFocused();
+    }
+    else
+    {
+        SAL_WARN( "sc", "ScAccessibleDataPilotControl::FieldFocusChange() old index out of bounds: " << nOldIndex);
+    }
 
-    xTempAcc = maChildren[nNewIndex].xWeakAcc;
-    if (xTempAcc.is() && maChildren[nNewIndex].pAcc)
-        maChildren[nNewIndex].pAcc->SetFocused();
+    if (0 <= nNewIndex && static_cast<size_t>(nNewIndex) < maChildren.size())
+    {
+        uno::Reference < XAccessible > xTempAcc = maChildren[nNewIndex].xWeakAcc;
+        if (xTempAcc.is() && maChildren[nNewIndex].pAcc)
+            maChildren[nNewIndex].pAcc->SetFocused();
+    }
+    else
+    {
+        SAL_WARN( "sc", "ScAccessibleDataPilotControl::FieldFocusChange() new index out of bounds: " << nNewIndex);
+    }
 }
 
 void ScAccessibleDataPilotControl::FieldNameChange(sal_Int32 nIndex)
 {
-    OSL_ENSURE(static_cast<size_t>(nIndex) < maChildren.size(), "did not recognize a child count change");
-
-    uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
-    if (xTempAcc.is() && maChildren[nIndex].pAcc)
-        maChildren[nIndex].pAcc->ChangeName();
+    if (0 <= nIndex && static_cast<size_t>(nIndex) < maChildren.size())
+    {
+        uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
+        if (xTempAcc.is() && maChildren[nIndex].pAcc)
+            maChildren[nIndex].pAcc->ChangeName();
+    }
+    else
+    {
+        SAL_WARN( "sc", "ScAccessibleDataPilotControl::FieldNameChange() index out of bounds: " << nIndex);
+    }
 }
 
 void ScAccessibleDataPilotControl::GotFocus()
@@ -298,9 +314,16 @@ void ScAccessibleDataPilotControl::GotFocus()
         OSL_ENSURE(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
 
         sal_Int32 nIndex(mpFieldWindow->GetSelectedField());
-        uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
-        if (xTempAcc.is() && maChildren[nIndex].pAcc)
-            maChildren[nIndex].pAcc->SetFocused();
+        if (0 <= nIndex && static_cast<size_t>(nIndex) < maChildren.size())
+        {
+            uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
+            if (xTempAcc.is() && maChildren[nIndex].pAcc)
+                maChildren[nIndex].pAcc->SetFocused();
+        }
+        else
+        {
+            SAL_WARN( "sc", "ScAccessibleDataPilotControl::GotFocus() field index out of bounds: " << nIndex);
+        }
     }
 }
 
@@ -311,9 +334,21 @@ void ScAccessibleDataPilotControl::LostFocus()
         OSL_ENSURE(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
 
         sal_Int32 nIndex(mpFieldWindow->GetSelectedField());
-        uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
-        if (xTempAcc.is() && maChildren[nIndex].pAcc)
-            maChildren[nIndex].pAcc->ResetFocused();
+        if (0 <= nIndex && static_cast<size_t>(nIndex) < maChildren.size())
+        {
+            uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
+            if (xTempAcc.is() && maChildren[nIndex].pAcc)
+                maChildren[nIndex].pAcc->ResetFocused();
+        }
+        else
+        {
+            // This may actually happen if the last field is dropped somewhere
+            // and was already removed from the pane by dragging it away. This
+            // is odd.. looks like all LostFocus() are called for the previous
+            // field of the same original pane in the remove case?
+            SAL_WARN_IF( nIndex != -1 || !maChildren.empty(), "sc",
+                    "ScAccessibleDataPilotControl::LostFocus() field index out of bounds: " << nIndex);
+        }
     }
 }
 
@@ -390,10 +425,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getAccessibleChildCount(void)
 {
     SolarMutexGuard aGuard;
     IsObjectValid();
-    if (mpFieldWindow)
-        return mpFieldWindow->GetFieldCount();
-    else
-        return 0;
+    return static_cast<sal_Int32>(maChildren.size());
 }
 
 uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibleChild(sal_Int32 nIndex)
@@ -404,14 +436,19 @@ uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibl
     uno::Reference<XAccessible> xAcc;
     if (mpFieldWindow)
     {
-        if (nIndex < 0 || static_cast< size_t >( nIndex ) >= mpFieldWindow->GetFieldCount())
+        if (nIndex < 0 || static_cast< size_t >( nIndex ) >= maChildren.size())
             throw lang::IndexOutOfBoundsException();
 
-        OSL_ENSURE(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
+        OSL_ENSURE( mpFieldWindow->GetFieldCount() == maChildren.size()         // all except ...
+                ||  mpFieldWindow->GetFieldCount() == maChildren.size() + 1,    // in CommitChange during RemoveField
+                "did not recognize a child count change");
 
         uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
         if (!xTempAcc.is())
         {
+            if (static_cast< size_t >( nIndex ) >= mpFieldWindow->GetFieldCount())
+                throw lang::IndexOutOfBoundsException();
+
             maChildren[nIndex].pAcc = new ScAccessibleDataPilotButton(this, mpFieldWindow, nIndex);
             xTempAcc = maChildren[nIndex].pAcc;
             maChildren[nIndex].xWeakAcc = xTempAcc;
commit b475a63edea91daccfc179506b53a5f2ae7fc12b
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Mon Apr 15 01:27:39 2013 +0200

    fdo#61142 mixup between size and length
    
    Change-Id: Ia2903d5139378e97bb2e8d00ccb2c213d3e1dee6
    Reviewed-on: https://gerrit.libreoffice.org/3385
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index d568b7f..7165c4d 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -424,11 +424,15 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection,
         // we assume everyone (LibO & ODBC) uses UTF-16; see OPreparedStatement::setParameter
         BOOST_STATIC_ASSERT(sizeof(sal_Unicode) == 2);
         BOOST_STATIC_ASSERT(sizeof(SQLWCHAR)    == 2);
+        BOOST_STATIC_ASSERT(sizeof(waCharArray) % 2 == 0);
+        // Size == number of bytes, Len == number of UTF-16 code units
+        const SQLLEN nMaxSize = sizeof(waCharArray);
+        const SQLLEN nMaxLen  = sizeof(waCharArray) / sizeof(sal_Unicode);
+        BOOST_STATIC_ASSERT(nMaxLen * sizeof(sal_Unicode) == nMaxSize);
+
         // read the unicode data
-        const SQLLEN nMaxLen = sizeof(waCharArray) / sizeof(sal_Unicode);
         SQLLEN pcbValue = SQL_NO_TOTAL;
-
-        while ((pcbValue == SQL_NO_TOTAL ) || (pcbValue >= nMaxLen) )
+        while ((pcbValue == SQL_NO_TOTAL ) || (pcbValue >= nMaxSize) )
         {
             OTools::ThrowException(_pConnection,
                                    (*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(
@@ -446,7 +450,7 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection,
             SQLLEN nReadChars;
             OSL_ENSURE( (pcbValue < 0) || (pcbValue % 2 == 0),
                         "ODBC: SQLGetData of SQL_C_WCHAR returned odd number of bytes");
-            if ( (pcbValue == SQL_NO_TOTAL) || (pcbValue >= nMaxLen) )
+            if ( (pcbValue == SQL_NO_TOTAL) || (pcbValue >= nMaxSize) )
             {
                 // we filled the buffer; remove the terminating null character
                 nReadChars = nMaxLen-1;
commit 7fcfe8817c0cc896cb29de2613d9f43381d7b6ad
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Fri Mar 29 07:18:05 2013 +0100

    Initialize nFilter
    
    Change-Id: I9a8606a0d6ca36fd6f51267ea385f7fbe874d6d5
    (cherry picked from commit 9f27436b84a1ae0ce2689ef27f81698ab9f3642e)
    
    Signed-off-by: Eike Rathke <erack at redhat.com>

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 3097f1f..a5edb7b 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -363,7 +363,7 @@ void SfxTemplateManagerDlg::readSettings ()
 
     if ( aViewSettings.Exists() )
     {
-        sal_uInt16 nFilter;
+        sal_uInt16 nFilter = 0;
         aViewSettings.GetUserItem(TM_SETTING_LASTFOLDER) >>= aLastFolder;
         aViewSettings.GetUserItem(TM_SETTING_FILTER) >>= nFilter;
 
commit 1666281eeafa9e3299c85dfca5d92d53bac40cad
Author: Noel Power <noel.power at suse.com>
Date:   Fri Apr 5 21:02:16 2013 +0100

    somewhat blind wae fix ( doesn't happen for me )
    
    Change-Id: Ia9b260c8bf2dc948f155fb89f0b5d960f9aada6f
    (cherry picked from commit 9c79ec29dba9dbdc6dc56f6e83b09f5176821768)
    
    Signed-off-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 7431370..b318c8d 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -369,6 +369,9 @@ ScVbaValidation::getType() throw (uno::RuntimeException)
             case sheet::ValidationType_TEXT_LEN:
                 nExcelType = excel::XlDVType::xlValidateTextLength;
                 break;
+            case sheet::ValidationType_MAKE_FIXED_SIZE:
+            default:
+                break;
         };
     }
     return nExcelType;
commit 6f504b6307179f00075bd1dadd722ff2e8855ea9
Author: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
Date:   Wed Apr 10 20:41:54 2013 +0200

    fdo#47018 Impress crashes when modifying bullet
    
    Default numbering rules shouldn't be left zero nor hard-coded.
    
    Reviewed-on: https://gerrit.libreoffice.org/3312
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 5785db93c5739846fb0a84b138be485044d4bda5)
    
    Conflicts:
    	sd/source/core/drawdoc4.cxx
    	sd/source/core/stlpool.cxx
    
    Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04

diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 740de3a..0ae4491 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -36,6 +36,7 @@
 #include <editeng/flditem.hxx>
 #include <editeng/emphitem.hxx>
 #include <editeng/scriptspaceitem.hxx>
+#include <editeng/numdef.hxx>
 #include <svl/itempool.hxx>
 #include <vcl/virdev.hxx>
 
@@ -98,14 +99,15 @@ SfxPoolItem** GlobalEditData::GetDefItems()
         ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
 
         // Paragraph attributes:
-        SvxNumRule aTmpNumRule( 0, 0, sal_False );
+        SvxNumRule aDefaultNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE,
+                                    SVX_MAX_NUM, sal_False );
 
         ppDefItems[0]  = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
         ppDefItems[1]  = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
         ppDefItems[2]  = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, sal_False );
         ppDefItems[3]  = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True );
         ppDefItems[4]  = new SvxScriptSpaceItem( sal_True, EE_PARA_ASIANCJKSPACING );
-        ppDefItems[5]  = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET );
+        ppDefItems[5]  = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET );
         ppDefItems[6]  = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False );
         ppDefItems[7]  = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True );
         ppDefItems[8]  = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE );
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 749dad5..52262c8 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -34,6 +34,7 @@
 #include <editeng/unofdesc.hxx>
 #include <editeng/unonrule.hxx>
 #include <editeng/editids.hrc>
+#include <editeng/numdef.hxx>
 
 using ::rtl::OUString;
 using ::com::sun::star::util::XCloneable;
@@ -494,7 +495,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
     }
     else
     {
-        SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
+        SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , sal_False);
         return new SvxUnoNumberingRules( aDefaultRule );
     }
 }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 306309d..beb774b 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -47,6 +47,7 @@
 #include <svx/svdocapt.hxx>
 #include <svx/svdotable.hxx>
 #include <editeng/outlobj.hxx>
+#include <editeng/numdef.hxx>
 #include <svx/svdattr.hxx>
 #include "svx/xattr.hxx"
 #include "svx/svditext.hxx"
@@ -4283,20 +4284,20 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
                 eNumRuleType = SVX_RULETYPE_NUMBERING;
             break;
             case TSS_TYPE_SUBTITLE :
-                nLevels = 10;
+                nLevels = SVX_MAX_NUM;
                 eNumRuleType = SVX_RULETYPE_NUMBERING;
             break;
             case TSS_TYPE_BODY :
             case TSS_TYPE_HALFBODY :
             case TSS_TYPE_QUARTERBODY :
-                nLevels = 10;
+                nLevels = SVX_MAX_NUM;
                 eNumRuleType = SVX_RULETYPE_PRESENTATION_NUMBERING;
             break;
             default :
             case TSS_TYPE_NOTES :
             case TSS_TYPE_UNUSED :
             case TSS_TYPE_TEXT_IN_SHAPE :
-                nLevels = 10;
+                nLevels = SVX_MAX_NUM;
                 eNumRuleType = SVX_RULETYPE_NUMBERING;
             break;
         }
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3e1b1e1..56b8f08 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -40,6 +40,7 @@
 #include <editeng/ulspitem.hxx>
 #include <editeng/lspcitem.hxx>
 #include <editeng/adjitem.hxx>
+#include <editeng/numdef.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>                  // SVX_RESSTR
 #include <editeng/bulitem.hxx>
@@ -1302,7 +1303,7 @@ void SdDrawDocument::SetTextDefaults() const
     aNumberFormat.SetStart(1);
     aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
 
-    SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, sal_False);
+    SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, sal_False);
 
     aNumberFormat.SetLSpace( 0 );
     aNumberFormat.SetAbsLSpace( 0 );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index cfe6c82..7c06d27 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -49,6 +49,7 @@
 #include <editeng/bulitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/adjitem.hxx>
+#include <editeng/numdef.hxx>
 #include <svl/itempool.hxx>
 
 #include "stlpool.hxx"
@@ -994,7 +995,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
             aNumberFormat.SetStart(1);
             aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
 
-            SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
+            SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , sal_False);
 
             for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
             {
@@ -1050,7 +1051,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
             aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
 
             SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list