[Libreoffice-commits] core.git: Branch 'distro/collabora/lof-4.3' - 52 commits - avmedia/source bin/unpack-sources chart2/source configure.ac cppuhelper/source download.lst external/coinmp external/collada2gltf external/freetype external/glew external/icu external/lcms2 external/libgltf external/libxml2 external/libxmlsec external/libxslt external/nss external/python3 filter/source i18npool/Library_localedata_euro.mk i18npool/source officecfg/registry oox/CustomTarget_generated.mk oox/source scp2/Module_scp2.mk sc/source sd/qa sd/source sfx2/source sfx2/util svx/Library_svxcore.mk svx/source sw/CppunitTest_sw_ooxmlimport.mk sw/Library_sw.mk sw/qa sw/source vcl/generic writerfilter/source

Katarina Behrens bubli at bubli.org
Thu Oct 9 04:09:16 PDT 2014


 avmedia/source/framework/modeltools.cxx                      |    3 
 bin/unpack-sources                                           |   10 
 chart2/source/controller/dialogs/res_ErrorBar.cxx            |   20 
 chart2/source/controller/inc/res_ErrorBar.hxx                |    2 
 configure.ac                                                 |   25 
 cppuhelper/source/servicemanager.cxx                         |    1 
 download.lst                                                 |    6 
 external/coinmp/UnpackedTarball_coinmp.mk                    |    1 
 external/coinmp/coinmp-msvc-disable-sse2.patch.1             |   10 
 external/collada2gltf/StaticLibrary_collada2gltf.mk          |    1 
 external/collada2gltf/UnpackedTarball_collada2gltf.mk        |    1 
 external/collada2gltf/patches/kill_c++11_code.patch.1        | 5824 +++++++++++
 external/freetype/UnpackedTarball_freetype.mk                |    1 
 external/freetype/freetype-msvc-disable-sse2.patch.1         |   26 
 external/glew/UnpackedTarball_glew.mk                        |    1 
 external/glew/glew-msvc-disable-sse2.patch.1                 |   10 
 external/icu/ExternalProject_icu.mk                          |    2 
 external/lcms2/UnpackedTarball_lcms2.mk                      |    1 
 external/lcms2/lcms2-msvc-disable-sse2.patch.1               |   10 
 external/libgltf/UnpackedTarball_libgltf.mk                  |    1 
 external/libgltf/libgltf-msvc-disable-sse2.patch.1           |   10 
 external/libxml2/libxml2-vc10.patch                          |    2 
 external/libxmlsec/xmlsec1-vc.patch                          |    2 
 external/libxslt/libxslt-vc10.patch                          |    2 
 external/nss/ExternalProject_nss.mk                          |    2 
 external/python3/UnpackedTarball_python3.mk                  |    1 
 external/python3/python-msvc-disable-sse2.patch.1            |   12 
 filter/source/config/fragments/filters/draw8.xcu             |    2 
 filter/source/config/fragments/filters/draw8_template.xcu    |    2 
 filter/source/config/fragments/filters/impress8.xcu          |    2 
 filter/source/config/fragments/filters/impress8_draw.xcu     |    2 
 filter/source/config/fragments/filters/impress8_template.xcu |    2 
 i18npool/Library_localedata_euro.mk                          |    1 
 i18npool/source/localedata/data/ca_ES_valencia.xml           |   43 
 i18npool/source/localedata/data/es_CR.xml                    |    7 
 i18npool/source/localedata/localedata.cxx                    |    1 
 i18npool/source/search/textsearch.cxx                        |    4 
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs  |    2 
 oox/CustomTarget_generated.mk                                |    1 
 oox/source/drawingml/color.cxx                               |   30 
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx          |   10 
 oox/source/token/properties.txt                              |    1 
 oox/source/vml/vmlshape.cxx                                  |   27 
 sc/source/core/tool/token.cxx                                |    2 
 sc/source/ui/dbgui/validate.cxx                              |   12 
 sc/source/ui/view/cellsh2.cxx                                |    2 
 sc/source/ui/view/tabvwshb.cxx                               |    5 
 scp2/Module_scp2.mk                                          |    1 
 sd/qa/unit/data/pptx/bnc584721_4.pptx                        |binary
 sd/qa/unit/import-tests.cxx                                  |   41 
 sd/source/filter/html/pubdlg.cxx                             |    2 
 sd/source/ui/docshell/docshel4.cxx                           |   22 
 sd/source/ui/remotecontrol/Server.cxx                        |    6 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx                  |   26 
 sfx2/source/appl/shutdownicon.cxx                            |  196 
 sfx2/source/appl/shutdownicon.hxx                            |    8 
 sfx2/source/appl/shutdowniconunx.cxx                         |    1 
 sfx2/util/sfx.component                                      |    1 
 svx/Library_svxcore.mk                                       |    1 
 svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx     |    2 
 svx/source/form/dbtoolsclient.cxx                            |    3 
 sw/CppunitTest_sw_ooxmlimport.mk                             |    1 
 sw/Library_sw.mk                                             |    1 
 sw/qa/core/data/ooxml/pass/fdo73608-1.docx                   |binary
 sw/qa/core/data/ooxml/pass/fdo73608-2.docx                   |binary
 sw/qa/core/data/ooxml/pass/fdo79129.docx                     |binary
 sw/qa/core/data/ooxml/pass/fdo79131.docx                     |binary
 sw/qa/core/data/rtf/pass/fdo84536.rtf                        |   16 
 sw/qa/extras/odfimport/data/fdo79269.odt                     |binary
 sw/qa/extras/odfimport/data/fdo79269_header.odt              |binary
 sw/qa/extras/odfimport/odfimport.cxx                         |   35 
 sw/qa/extras/ooxmlexport/data/bnc884615-mso-position.docx    |binary
 sw/qa/extras/ooxmlexport/data/fdo78907.docx                  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx                     |   50 
 sw/qa/extras/ooxmlimport/data/bnc821804.docx                 |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx                     |  111 
 sw/source/core/bastyp/breakit.cxx                            |    2 
 sw/source/core/crsr/crstrvl.cxx                              |   34 
 sw/source/core/doc/doc.cxx                                   |   49 
 sw/source/core/txtnode/txtedt.cxx                            |    6 
 sw/source/core/uibase/dbui/swdbtoolsclient.cxx               |    2 
 sw/source/core/uibase/docvw/edtwin.cxx                       |   41 
 sw/source/core/uibase/inc/view.hxx                           |    4 
 sw/source/core/uibase/misc/redlndlg.cxx                      |    2 
 sw/source/core/uibase/shells/basesh.cxx                      |    6 
 sw/source/core/uibase/shells/textfld.cxx                     |    1 
 sw/source/core/unocore/unoredline.cxx                        |    1 
 sw/source/core/unocore/unostyle.cxx                          |   35 
 sw/source/filter/ww8/docxattributeoutput.cxx                 |  168 
 sw/source/filter/ww8/wrtww8.cxx                              |    8 
 sw/source/filter/ww8/ww8atr.cxx                              |    2 
 sw/source/ui/frmdlg/column.cxx                               |    7 
 vcl/generic/glyphs/gcach_ftyp.cxx                            |   11 
 writerfilter/source/dmapper/DomainMapper.cxx                 |   37 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx     |   16 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx            |  113 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx            |   25 
 writerfilter/source/dmapper/PropertyMap.hxx                  |   18 
 writerfilter/source/ooxml/model.xml                          |   10 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx               |    9 
 writerfilter/source/rtftok/rtfsdrimport.cxx                  |    5 
 101 files changed, 6830 insertions(+), 451 deletions(-)

New commits:
commit fbb89892255ebc3157adfe867be50dcf4c0504ff
Author: Katarina Behrens <bubli at bubli.org>
Date:   Thu Jul 17 22:35:46 2014 +0200

    fdo#77319: set spinbox value AFTER adjusting no. of decimal places
    
    Doing it the other way round truncates the values
    
    Change-Id: Ieb14c9d1b9dde496eac24737aced7c8da8ce1346
    Reviewed-on: https://gerrit.libreoffice.org/11865
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 60b4987..8157301 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -93,6 +93,8 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa
         m_eErrorBarType( eType ),
         m_nConstDecimalDigits( 1 ),
         m_nConstSpinSize( 1 ),
+        m_fPlusValue(0.0),
+        m_fMinusValue(0.0),
         m_pParentDialog( pParentDialog ),
         m_pCurrentRangeChoosingField( 0 ),
         m_bHasInternalDataProvider( true ),
@@ -271,6 +273,13 @@ void ErrorBarResources::UpdateControlStates()
         m_pMfNegative->SetDecimalDigits( m_nConstDecimalDigits );
         m_pMfNegative->SetSpinSize( m_nConstSpinSize );
     }
+
+    sal_Int32 nPlusValue = static_cast< sal_Int32 >( m_fPlusValue * pow(10.0,m_pMfPositive->GetDecimalDigits()) );
+    sal_Int32 nMinusValue = static_cast< sal_Int32 >( m_fMinusValue * pow(10.0,m_pMfNegative->GetDecimalDigits()) );
+
+    m_pMfPositive->SetValue( nPlusValue );
+    m_pMfNegative->SetValue( nMinusValue );
+
     m_pMfPositive->SetCustomUnitText( aCustomUnit );
     m_pMfNegative->SetCustomUnitText( aCustomUnit );
 
@@ -530,24 +539,19 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
     // parameters
     aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, true, &pPoolItem );
     m_bPlusUnique = ( aState != SFX_ITEM_DONTCARE );
-    double fPlusValue = 0.0;
     if( aState == SFX_ITEM_SET )
     {
-        fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
-        sal_Int32 nPlusValue = static_cast< sal_Int32 >( fPlusValue * pow(10.0,m_pMfPositive->GetDecimalDigits()) );
-        m_pMfPositive->SetValue( nPlusValue );
+        m_fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
     }
 
     aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem );
     m_bMinusUnique = ( aState != SFX_ITEM_DONTCARE );
     if( aState == SFX_ITEM_SET )
     {
-        double fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
-        sal_Int32 nMinusValue = static_cast< sal_Int32 >( fMinusValue * pow(10.0,m_pMfNegative->GetDecimalDigits()) );
-        m_pMfNegative->SetValue( nMinusValue );
+        m_fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
 
         if( m_eErrorKind != CHERROR_RANGE &&
-            fPlusValue == fMinusValue )
+            m_fPlusValue == m_fMinusValue )
             m_pCbSyncPosNeg->Check();
     }
 
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 7851418..95706bc 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -114,6 +114,8 @@ private:
     tErrorBarType        m_eErrorBarType;
     sal_uInt16           m_nConstDecimalDigits;
     sal_Int64            m_nConstSpinSize;
+    double               m_fPlusValue;
+    double               m_fMinusValue;
 
     Dialog *             m_pParentDialog;
     boost::scoped_ptr< RangeSelectionHelper >  m_apRangeSelectionHelper;
commit 704e914fd8237ec43128ea6a81e5cb6f946258b8
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Wed Oct 1 13:09:36 2014 +0200

    fix docx redline import (bnc#821804)
    
    This is a squash of commits b6969634..fd26de3b.
    
    Change-Id: I8984001d7f85c00eb9b9943b25b8abb6e2ee28d3
    Reviewed-on: https://gerrit.libreoffice.org/11789
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk
index 2c4682b..a77787e 100644
--- a/sw/CppunitTest_sw_ooxmlimport.mk
+++ b/sw/CppunitTest_sw_ooxmlimport.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport, \
     unotest \
     utl \
     sw \
+    tl \
     vcl \
 	$(gb_UWINAPI) \
 ))
diff --git a/sw/qa/extras/ooxmlimport/data/bnc821804.docx b/sw/qa/extras/ooxmlimport/data/bnc821804.docx
new file mode 100644
index 0000000..9ec2e07
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/bnc821804.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 07761dd..900a25e 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -54,11 +54,13 @@
 #include <com/sun/star/style/CaseMap.hpp>
 #include <com/sun/star/style/PageStyleLayout.hpp>
 #include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/util/DateTime.hpp>
 #include <vcl/svapp.hxx>
 #include <unotools/fltrcfg.hxx>
 #include <comphelper/sequenceashashmap.hxx>
 #include <com/sun/star/text/GraphicCrop.hpp>
 #include <swtypes.hxx>
+#include <tools/datetimeutils.hxx>
 
 #include <bordertest.hxx>
 
@@ -2284,6 +2286,115 @@ DECLARE_OOXMLIMPORT_TEST(testBnc891663, "bnc891663.docx")
     CPPUNIT_ASSERT( textNextRowTop >= imageTop + imageHeight );
 }
 
+static OString dateTimeToString( const util::DateTime& dt )
+{
+    return DateTimeToOString( DateTime( Date( dt.Day, dt.Month, dt.Year ), Time( dt.Hours, dt.Minutes, dt.Seconds )));
+}
+
+DECLARE_OOXMLIMPORT_TEST(testBnc821804, "bnc821804.docx")
+{
+    CPPUNIT_ASSERT_EQUAL( OUString( "TITLE" ), getRun( getParagraph( 1 ), 1 )->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 1), "RedlineType"));
+    // Redline information (SwXRedlinePortion) are separate "runs" apparently.
+    CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 2), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(1), 2), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(1), 2), "RedlineDateTime")));
+    // So only the 3rd run is actual text (and the two runs have been merged into one, not sure why, but that shouldn't be a problem).
+    CPPUNIT_ASSERT_EQUAL(OUString(" (1st run of an insert) (2nd run of an insert)"), getRun(getParagraph(1),3)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 3), "RedlineType"));
+    // And the end SwXRedlinePortion of the redline.
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(1), 4), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty<OUString>(getRun(getParagraph(1), 4), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(1), 4), "RedlineDateTime")));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(1), 4), "IsStart"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(2),1)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(3), 1), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown2"),getProperty<OUString>(getRun(getParagraph(3), 1), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:47:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(3), 1), "RedlineDateTime")));
+    CPPUNIT_ASSERT_EQUAL(OUString("Deleted"), getRun(getParagraph(3),2)->getString());
+
+    // This is both inserted and formatted, so there are two SwXRedlinePortion "runs". Given that the redlines overlap and Writer core
+    // doesn't officially expect that (even though it copes, the redline info will be split depending on how Writer deal with it).
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(4), 1), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(4), 1), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(4), 2), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(4), 2), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Inserted and formatted"), getRun(getParagraph(4),3)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(4), 4), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(4), 4), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString(" and this is only formatted"), getRun(getParagraph(4),5)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(4), 6), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(4), 6), "IsStart"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(5),1)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(5), 1), "RedlineType"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Format"),getProperty<OUString>(getRun(getParagraph(6), 1), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(6), 1), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown5"),getProperty<OUString>(getRun(getParagraph(6), 1), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T10:02:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(6), 1), "RedlineDateTime")));
+    CPPUNIT_ASSERT_EQUAL(OUString("Formatted run"), getRun(getParagraph(6),2)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Format"),getProperty<OUString>(getRun(getParagraph(6), 3), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(6), 3), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString(" and normal text here "), getRun(getParagraph(6),4)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(6), 4), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(6), 5), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(6), 5), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown6"),getProperty<OUString>(getRun(getParagraph(6), 5), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:48:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(6), 5), "RedlineDateTime")));
+    CPPUNIT_ASSERT_EQUAL(OUString("and inserted again"), getRun(getParagraph(6),6)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(6), 7), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(6), 7), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString(" and normal text again "), getRun(getParagraph(6),8)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(6), 8), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Format"),getProperty<OUString>(getRun(getParagraph(6), 9), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(6), 9), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown7"),getProperty<OUString>(getRun(getParagraph(6), 9), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OUString("and formatted"), getRun(getParagraph(6),10)->getString());
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(6), 11), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString(" and normal."), getRun(getParagraph(6),12)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(6), 12), "RedlineType"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 1), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(7), 1), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown8"),getProperty<OUString>(getRun(getParagraph(7), 1), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OUString("One insert."), getRun(getParagraph(7),2)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 3), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(7), 3), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 4), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(7), 4), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("unknown9"),getProperty<OUString>(getRun(getParagraph(7), 4), "RedlineAuthor"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Second insert."), getRun(getParagraph(7),5)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 6), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(7), 6), "IsStart"));
+
+    // Overlapping again.
+    CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(8), 1), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(8), 1), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(8), 2), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(8), 2), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("Deleted and formatted"), getRun(getParagraph(8),3)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(8), 4), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(8), 4), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString(" and this is only formatted"), getRun(getParagraph(8),5)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(8), 6), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(8), 6), "IsStart"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(9),1)->getString());
+    CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(9), 1), "RedlineType"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(10), 1), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(10), 1), "IsStart"));
+    CPPUNIT_ASSERT_EQUAL(OUString("This is only formatted."), getRun(getParagraph(10),2)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(10), 3), "RedlineType"));
+    CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(10), 3), "IsStart"));
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/uibase/misc/redlndlg.cxx b/sw/source/core/uibase/misc/redlndlg.cxx
index d3dc31f..3a062a4 100644
--- a/sw/source/core/uibase/misc/redlndlg.cxx
+++ b/sw/source/core/uibase/misc/redlndlg.cxx
@@ -338,6 +338,7 @@ OUString SwRedlineAcceptDlg::GetActionText(const SwRangeRedline& rRedln, sal_uIn
         case nsRedlineType_t::REDLINE_INSERT:   return sInserted;
         case nsRedlineType_t::REDLINE_DELETE:   return sDeleted;
         case nsRedlineType_t::REDLINE_FORMAT:   return sFormated;
+        case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:   return sFormated;
         case nsRedlineType_t::REDLINE_TABLE:    return sTableChgd;
         case nsRedlineType_t::REDLINE_FMTCOLL:  return sFmtCollSet;
         default:;//prevent warning
@@ -1092,6 +1093,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
                             nResId = STR_REDLINE_DELETED;
                             break;
                         case nsRedlineType_t::REDLINE_FORMAT:
+                        case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
                             nResId = STR_REDLINE_FORMATED;
                             break;
                         case nsRedlineType_t::REDLINE_TABLE:
diff --git a/sw/source/core/uibase/shells/textfld.cxx b/sw/source/core/uibase/shells/textfld.cxx
index ce20366..cace5c5 100644
--- a/sw/source/core/uibase/shells/textfld.cxx
+++ b/sw/source/core/uibase/shells/textfld.cxx
@@ -82,6 +82,7 @@ static OUString& lcl_AppendRedlineStr( OUString& rStr, sal_uInt16 nRedlId )
     case nsRedlineType_t::REDLINE_INSERT:   nResId = STR_REDLINE_INSERTED;      break;
     case nsRedlineType_t::REDLINE_DELETE:   nResId = STR_REDLINE_DELETED;       break;
     case nsRedlineType_t::REDLINE_FORMAT:   nResId = STR_REDLINE_FORMATED;      break;
+    case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:   nResId = STR_REDLINE_FORMATED;      break;
     case nsRedlineType_t::REDLINE_TABLE:        nResId = STR_REDLINE_TABLECHG;      break;
     case nsRedlineType_t::REDLINE_FMTCOLL:  nResId = STR_REDLINE_FMTCOLLSET;    break;
     }
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 314178d..855d11b 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -209,6 +209,7 @@ static OUString lcl_RedlineTypeToOUString(RedlineType_t eType)
         case nsRedlineType_t::REDLINE_INSERT: sRet = "Insert"; break;
         case nsRedlineType_t::REDLINE_DELETE: sRet = "Delete"; break;
         case nsRedlineType_t::REDLINE_FORMAT: sRet = "Format"; break;
+        case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: sRet = "ParagraphFormat"; break;
         case nsRedlineType_t::REDLINE_TABLE:  sRet = "TextTable"; break;
         case nsRedlineType_t::REDLINE_FMTCOLL:sRet = "Style"; break;
     }
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index d97f471..90ae6e9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2169,9 +2169,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
     }
     break;
     case NS_ooxml::LN_endtrackchange:
-        m_pImpl->RemoveCurrentRedline( );
+        m_pImpl->RemoveTopRedline();
     break;
     case NS_ooxml::LN_CT_RPrChange_rPr:
+    {
         // Push all the current 'Character' properties to the stack, so that we don't store them
         // as 'tracked changes' by mistake
         m_pImpl->PushProperties(CONTEXT_CHARACTER);
@@ -2179,19 +2180,19 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
         // Resolve all the properties that are under the 'rPrChange'->'rPr' XML node
         resolveSprmProps(*this, rSprm );
 
-        if (m_pImpl->GetTopContext())
-        {
-            // Get all the properties that were processed in the 'rPrChange'->'rPr' XML node
-            uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues();
-
-            // Store these properties in the current redline object
-            m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties );
-        }
+        // Get all the properties that were processed in the 'rPrChange'->'rPr' XML node
+        uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues();
 
         // Pop back out the character properties that were on the run
         m_pImpl->PopProperties(CONTEXT_CHARACTER);
+
+        // Store these properties in the current redline object (do it after the PopProperties() above, since
+        // otherwise it'd be stored in the content dropped there).
+        m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties );
+    }
     break;
     case NS_ooxml::LN_CT_PPrChange_pPr:
+    {
         // Push all the current 'Paragraph' properties to the stack, so that we don't store them
         // as 'tracked changes' by mistake
         m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
@@ -2199,17 +2200,16 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
         // Resolve all the properties that are under the 'pPrChange'->'pPr' XML node
         resolveSprmProps(*this, rSprm );
 
-        if (m_pImpl->GetTopContext())
-        {
-            // Get all the properties that were processed in the 'pPrChange'->'pPr' XML node
-            uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues();
-
-            // Store these properties in the current redline object
-            m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties );
-        }
+        // Get all the properties that were processed in the 'pPrChange'->'pPr' XML node
+        uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues();
 
         // Pop back out the character properties that were on the run
         m_pImpl->PopProperties(CONTEXT_PARAGRAPH);
+
+        // Store these properties in the current redline object (do it after the PopProperties() above, since
+        // otherwise it'd be stored in the content dropped there).
+        m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties );
+    }
     break;
     case NS_ooxml::LN_object:
     {
@@ -3288,7 +3288,7 @@ void DomainMapper::HandleRedline( Sprm& rSprm )
 {
     sal_uInt32 nSprmId = rSprm.getId();
 
-    m_pImpl->AddNewRedline( );
+    m_pImpl->AddNewRedline( nSprmId );
 
     if (nSprmId == NS_ooxml::LN_CT_PPr_pPrChange)
     {
@@ -3328,6 +3328,7 @@ void DomainMapper::HandleRedline( Sprm& rSprm )
         default: OSL_FAIL( "redline token other than mod, ins, del or table row" ); break;
     }
     m_pImpl->EndParaMarkerChange( );
+    m_pImpl->SetCurrentRedlineIsRead();
 }
 
 } //namespace dmapper
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 23b976b..ffa4bae 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1625,7 +1625,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
     }
 }
 
-void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange, RedlineParamsPtr& pRedline )
+void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange, RedlineParamsPtr pRedline )
 {
     if ( pRedline.get( ) )
     {
@@ -1679,21 +1679,25 @@ void DomainMapper_Impl::CheckParaMarkerRedline( uno::Reference< text::XTextRange
 
 void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > xRange )
 {
-    vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( );
-    vector< RedlineParamsPtr > aCleaned;
+    // Writer core "officially" does not like overlapping redlines, and its UNO interface is stupid enough
+    // to not prevent that. However, in practice in fact everything appears to work fine (except for the debug warnings
+    // about redline table corruption, which may possibly be harmless in reality). So leave this as it is, since this
+    // is a better representation of how the changes happened. If this will ever become a problem, overlapping redlines
+    // will need to be merged into one, just like doing the changes in the UI does, which will lose some information
+    // (and so if that happens, it may be better to fix Writer).
+    // Create the redlines here from lowest (formats) to highest (inserts/removals) priority, since the last one is
+    // what Writer presents graphically, so this will show deletes as deleted text and not as just formatted text being there.
+    if( GetTopContextOfType(CONTEXT_PARAGRAPH) != NULL )
+        for( std::vector<RedlineParamsPtr>::const_iterator it = GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().begin();
+             it != GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().end(); ++it )
+            CreateRedline( xRange, *it );
+    if( GetTopContextOfType(CONTEXT_CHARACTER) != NULL )
+        for( std::vector<RedlineParamsPtr>::const_iterator it = GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().begin();
+             it != GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().end(); ++it )
+            CreateRedline( xRange, *it );
+    std::vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( );
     for (; pIt != m_aRedlines.top().end( ); ++pIt )
-    {
         CreateRedline( xRange, *pIt );
-
-        // Adding the non-mod redlines to the temporary vector
-        if ( pIt->get( ) )
-        {
-            if (((*pIt)->m_nToken & 0xffff) != OOXML_mod && ((*pIt)->m_nToken & 0xffff) != OOXML_ParagraphFormat)
-                aCleaned.push_back(*pIt);
-        }
-    }
-
-    m_aRedlines.top().swap( aCleaned );
 }
 
 void DomainMapper_Impl::StartParaMarkerChange( )
@@ -1704,6 +1708,7 @@ void DomainMapper_Impl::StartParaMarkerChange( )
 void DomainMapper_Impl::EndParaMarkerChange( )
 {
     m_bIsParaMarkerChange = false;
+    m_currentRedline.reset();
 }
 
 
@@ -4495,36 +4500,43 @@ bool DomainMapper_Impl::ExecuteFrameConversion()
     return bRet;
 }
 
-void DomainMapper_Impl::AddNewRedline(  )
+void DomainMapper_Impl::AddNewRedline( sal_uInt32 sprmId )
 {
     RedlineParamsPtr pNew( new RedlineParams );
     pNew->m_nToken = OOXML_mod;
     if ( !m_bIsParaMarkerChange )
     {
-        m_aRedlines.top().push_back( pNew );
+        // <w:rPrChange> applies to the whole <w:r>, <w:pPrChange> applies to the whole <w:p>,
+        // so keep those two in CONTEXT_CHARACTERS and CONTEXT_PARAGRAPH, which will take
+        // care of their scope (i.e. when they should be used and discarded).
+        // Let's keep the rest the same way they used to be handled (explictly dropped
+        // from a global stack by endtrackchange), but quite possibly they should not be handled
+        // that way either (I don't know).
+        if( sprmId == NS_ooxml::LN_EG_RPrContent_rPrChange )
+            GetTopContextOfType( CONTEXT_CHARACTER )->Redlines().push_back( pNew );
+        else if( sprmId == NS_ooxml::LN_CT_PPr_pPrChange )
+            GetTopContextOfType( CONTEXT_PARAGRAPH )->Redlines().push_back( pNew );
+        else
+            m_aRedlines.top().push_back( pNew );
     }
     else
     {
-        m_pParaMarkerRedline.swap( pNew );
+        m_pParaMarkerRedline = pNew;
     }
+    // Newly read data will go into this redline.
+    m_currentRedline = pNew;
 }
 
-RedlineParamsPtr DomainMapper_Impl::GetTopRedline(  )
+void DomainMapper_Impl::SetCurrentRedlineIsRead()
 {
-    RedlineParamsPtr pResult;
-    if ( !m_bIsParaMarkerChange && m_aRedlines.top().size(  ) > 0 )
-        pResult = m_aRedlines.top().back(  );
-    else if ( m_bIsParaMarkerChange )
-        pResult = m_pParaMarkerRedline;
-    return pResult;
+    m_currentRedline.reset();
 }
 
 sal_Int32 DomainMapper_Impl::GetCurrentRedlineToken(  )
 {
     sal_Int32 nToken = 0;
-    RedlineParamsPtr pCurrent( GetTopRedline(  ) );
-    if ( pCurrent.get(  ) )
-        nToken = pCurrent->m_nToken;
+    assert( m_currentRedline.get());
+    nToken = m_currentRedline->m_nToken;
     return nToken;
 }
 
@@ -4532,9 +4544,8 @@ void DomainMapper_Impl::SetCurrentRedlineAuthor( const OUString& sAuthor )
 {
     if (!m_xAnnotationField.is())
     {
-        RedlineParamsPtr pCurrent( GetTopRedline(  ) );
-        if ( pCurrent.get(  ) )
-            pCurrent->m_sAuthor = sAuthor;
+        assert( m_currentRedline.get());
+        m_currentRedline->m_sAuthor = sAuthor;
     }
     else
         m_xAnnotationField->setPropertyValue("Author", uno::makeAny(sAuthor));
@@ -4550,9 +4561,8 @@ void DomainMapper_Impl::SetCurrentRedlineDate( const OUString& sDate )
 {
     if (!m_xAnnotationField.is())
     {
-        RedlineParamsPtr pCurrent( GetTopRedline(  ) );
-        if ( pCurrent.get(  ) )
-            pCurrent->m_sDate = sDate;
+        assert( m_currentRedline.get());
+        m_currentRedline->m_sDate = sDate;
     }
     else
         m_xAnnotationField->setPropertyValue("DateTimeValue", uno::makeAny(ConversionHelper::ConvertDateStringToDateTime(sDate)));
@@ -4566,46 +4576,46 @@ void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId )
     }
     else
     {
-        RedlineParamsPtr pCurrent( GetTopRedline(  ) );
-        if ( pCurrent.get(  ) )
-            pCurrent->m_nId = sId;
+        // This should be an assert, but somebody had the smart idea to reuse this function also for comments and whatnot,
+        // and in some cases the id is actually not handled, which may be in fact a bug.
+        SAL_WARN( "writerfilter", !m_currentRedline.get());
+        if( m_currentRedline.get())
+            m_currentRedline->m_nId = sId;
     }
 }
 
 void DomainMapper_Impl::SetCurrentRedlineToken( sal_Int32 nToken )
 {
-    RedlineParamsPtr pCurrent( GetTopRedline(  ) );
-    if ( pCurrent.get(  ) )
-        pCurrent->m_nToken = nToken;
+    assert( m_currentRedline.get());
+    m_currentRedline->m_nToken = nToken;
 }
 
 void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties )
 {
-    RedlineParamsPtr pCurrent( GetTopRedline(  ) );
-    if ( pCurrent.get(  ) )
-        pCurrent->m_aRevertProperties = aProperties;
+    assert( m_currentRedline.get());
+    m_currentRedline->m_aRevertProperties = aProperties;
 }
 
 
-void DomainMapper_Impl::RemoveCurrentRedline( )
+// This removes only the last redline stored here, those stored in contexts are automatically removed when
+// the context is destroyed.
+void DomainMapper_Impl::RemoveTopRedline( )
 {
-    if ( m_aRedlines.top().size( ) > 0 )
-    {
-        m_aRedlines.top().pop_back( );
-    }
+    assert( m_aRedlines.top().size( ) > 0 );
+    m_aRedlines.top().pop_back( );
+    m_currentRedline.reset();
 }
 
 void DomainMapper_Impl::ResetParaMarkerRedline( )
 {
     if ( m_pParaMarkerRedline.get( ) )
     {
-        RedlineParamsPtr pEmpty;
-        m_pParaMarkerRedline.swap( pEmpty );
+        m_pParaMarkerRedline.reset();
+        m_currentRedline.reset();
     }
 }
 
 
-
 void DomainMapper_Impl::ApplySettingsTable()
 {
     if (m_pSettingsTable && m_xTextFactory.is())
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 3f62129..e60eab4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -243,20 +243,6 @@ struct AnnotationPosition
 };
 typedef boost::unordered_map< sal_Int32, AnnotationPosition > AnnotationPositions_t;
 
-struct RedlineParams
-{
-    OUString m_sAuthor;
-    OUString m_sDate;
-    sal_Int32       m_nId;
-    sal_Int32       m_nToken;
-
-    /// This can hold properties of runs that had formatted 'track changes' properties
-    css::uno::Sequence<css::beans::PropertyValue> m_aRevertProperties;
-};
-typedef boost::shared_ptr< RedlineParams > RedlineParamsPtr;
-
-
-
 struct LineNumberSettings
 {
     bool        bIsOn;
@@ -377,6 +363,8 @@ private:
 
     // Redline stack
     std::stack< std::vector< RedlineParamsPtr > > m_aRedlines;
+    // The redline currently read, may be also stored by a context instead of m_aRedlines.
+    RedlineParamsPtr                m_currentRedline;
     RedlineParamsPtr                m_pParaMarkerRedline;
     bool                            m_bIsParaMarkerChange;
 
@@ -449,7 +437,7 @@ public:
     }
     void SetDocumentSettingsProperty( const OUString& rPropName, const css::uno::Any& rValue );
 
-    void CreateRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange, RedlineParamsPtr& pRedline  );
+    void CreateRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange, RedlineParamsPtr pRedline  );
 
     void CheckParaMarkerRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange );
 
@@ -704,9 +692,7 @@ public:
         );
     bool ExecuteFrameConversion();
 
-    void AddNewRedline( );
-
-    RedlineParamsPtr GetTopRedline( );
+    void AddNewRedline( sal_uInt32 sprmId );
 
     sal_Int32 GetCurrentRedlineToken( );
     void SetCurrentRedlineAuthor( const OUString& sAuthor );
@@ -714,7 +700,8 @@ public:
     void SetCurrentRedlineId( sal_Int32 nId );
     void SetCurrentRedlineToken( sal_Int32 nToken );
     void SetCurrentRedlineRevertProperties( const css::uno::Sequence<css::beans::PropertyValue>& aProperties );
-    void RemoveCurrentRedline( );
+    void SetCurrentRedlineIsRead();
+    void RemoveTopRedline( );
     void ResetParaMarkerRedline( );
     void SetCurrentRedlineInitials( const OUString& sInitials );
     bool IsFirstRun() { return m_bIsFirstRun;}
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 5c12df2..58487d6 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -71,6 +71,18 @@ enum GrabBagType
     CHAR_GRAB_BAG
 };
 
+struct RedlineParams
+{
+    OUString m_sAuthor;
+    OUString m_sDate;
+    sal_Int32       m_nId;
+    sal_Int32       m_nToken;
+
+    /// This can hold properties of runs that had formatted 'track changes' properties
+    css::uno::Sequence<css::beans::PropertyValue> m_aRevertProperties;
+};
+typedef boost::shared_ptr< RedlineParams > RedlineParamsPtr;
+
 class PropValue
 {
     css::uno::Any m_aValue;
@@ -101,6 +113,9 @@ class PropertyMap : public _PropertyMap
     OUString                                                             m_sFootnoteFontName;
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote >       m_xFootnote;
 
+
+    std::vector< RedlineParamsPtr > m_aRedlines;
+
 protected:
     void Invalidate()
     {
@@ -133,6 +148,9 @@ public:
 
     virtual void insertTableProperties( const PropertyMap* );
 
+    const std::vector< RedlineParamsPtr >& Redlines() const { return m_aRedlines; }
+    std::vector< RedlineParamsPtr >& Redlines() { return m_aRedlines; }
+
 #if OSL_DEBUG_LEVEL > 1
     virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const;
 #endif
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 36a37f6..b3f25af 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -24263,19 +24263,16 @@
     </resource>
     <resource name="CT_RPrChange" resource="Properties" tag="character">
       <element name="rPr" tokenid="ooxml:CT_RPrChange_rPr"/>
-      <action name="end" action="tokenproperty"/>
-      <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/>
-      <action name="end" action="clearProps"/>
     </resource>
     <resource name="CT_ParaRPrChange" resource="Properties" tag="character">
       <element name="rPr" tokenid="ooxml:CT_ParaRPrChange_rPr"/>
     </resource>
     <resource name="CT_RunTrackChange" resource="Stream" tag="redlines">
       <action name="start" action="tokenproperty"/>
-      <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:trackchange"/>
+      <action name="start" action="sendPropertiesWithId" sendtokenid="ooxml:trackchange"/>
       <action name="start" action="clearProps"/>
       <action name="end" action="tokenproperty"/>
-      <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/>
+      <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:endtrackchange"/>
       <action name="end" action="clearProps"/>
     </resource>
     <resource name="EG_RangeMarkupElements" resource="Properties" tag="redlines">
@@ -24479,6 +24476,7 @@
       <element name="checkBox" tokenid="ooxml:CT_FFData_checkBox"/>
       <element name="ddList" tokenid="ooxml:CT_FFData_ddList"/>
       <element name="textInput" tokenid="ooxml:CT_FFData_textInput"/>
+      <!-- TODO: This is possibly wrong and should be sendPropertiesWithId -->
       <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/>
       <action name="end" action="clearProps"/>
     </resource>
@@ -24934,7 +24932,7 @@
     </resource>
     <resource name="CT_ParaTrackChange" resource="Properties" tag="redline">
       <action name="start" action="tokenproperty"/>
-      <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:paratrackchange"/>
+      <action name="start" action="sendPropertiesWithId" sendtokenid="ooxml:paratrackchange"/>
       <action name="start" action="clearProps"/>
     </resource>
     <resource name="ST_RubyAlign" resource="List" generated="yes">
commit c1ac2501b1f13f1628e94797cf0b4c5d73b2e9e0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Oct 8 07:27:16 2014 +0200

    sfx2: missing semicolon
    
    Change-Id: Id1c6357c84e03c71136eb92434002e5e0a4b71d7
    (cherry picked from commit 86c4762790823c338f018fb2f06c4a5fa4497916)
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 55e1c5e..1b41f68 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -172,7 +172,7 @@ bool LoadModule()
 #  endif // UNX
 #else
         pInitSystray = disabled_initSystray;
-        pDeInitSystray = disabled_deInitSystray
+        pDeInitSystray = disabled_deInitSystray;
         loaded = false;
 #endif // ENABLE_QUICKSTART_APPLET
     }
commit fcb27f2ce5a1f2a78bc0dd34eadc7ac8d95d91d2
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Thu Oct 9 03:27:06 2014 +0200

    Revert "dos2unix on SSE2 patch files"
    
    content need to be dos, otherwise patch fails to apply
    
    This reverts commit 089b243c8b48aecfd25c79a70b4209a2399dbafa.

diff --git a/external/coinmp/coinmp-msvc-disable-sse2.patch.1 b/external/coinmp/coinmp-msvc-disable-sse2.patch.1
index c099494..0f518d6 100644
--- a/external/coinmp/coinmp-msvc-disable-sse2.patch.1
+++ b/external/coinmp/coinmp-msvc-disable-sse2.patch.1
@@ -1,10 +1,10 @@
 --- coinmp/BuildTools/MSVisualStudio/v10/Release.props.orig	2014-10-02 14:22:21.497268171 +0200
 +++ coinmp/BuildTools/MSVisualStudio/v10/Release.props	2014-10-02 14:22:30.193267497 +0200
 @@ -6,6 +6,7 @@
-   <ItemDefinitionGroup>
-     <ClCompile>
-       <StringPooling>true</StringPooling>
-+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
-     </ClCompile>
-   </ItemDefinitionGroup>
-   <ItemGroup />
+   <ItemDefinitionGroup>
+     <ClCompile>
+       <StringPooling>true</StringPooling>
++      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+     </ClCompile>
+   </ItemDefinitionGroup>
+   <ItemGroup />
diff --git a/external/lcms2/lcms2-msvc-disable-sse2.patch.1 b/external/lcms2/lcms2-msvc-disable-sse2.patch.1
index 9bfad08..37ef773 100644
--- a/external/lcms2/lcms2-msvc-disable-sse2.patch.1
+++ b/external/lcms2/lcms2-msvc-disable-sse2.patch.1
@@ -1,10 +1,10 @@
 --- lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj.orig	2014-10-02 15:15:40.228020086 +0200
 +++ lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj	2014-10-02 15:15:42.243019930 +0200
 @@ -133,6 +133,7 @@
-   </ItemDefinitionGroup>
-   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-     <ClCompile>
-+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
-       <Optimization>Full</Optimization>
-       <IntrinsicFunctions>true</IntrinsicFunctions>
-       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+   </ItemDefinitionGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+     <ClCompile>
++      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+       <Optimization>Full</Optimization>
+       <IntrinsicFunctions>true</IntrinsicFunctions>
+       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
commit d01e6061da2fc7b51fad0b81b1b3610cd7117466
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 9 14:07:29 2014 +0300

    Bump version to 4.3.4.0
    
    Change-Id: Ic93243e06f4fd95b8078e7558f3a97f2059902b9

diff --git a/configure.ac b/configure.ac
index 183eb49..af8021f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([LibreOffice],[4.3.3.1],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[4.3.4.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit d6d39666f98b3e9acc3c3b40a88aeefb225df88e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 7 17:41:32 2014 +0100

    Resolves: fdo#84757 1~ instead of ~1 and 10~ instead of 1~0
    
    regression from 3351ebde48a31173c2fea9f7270224017e1f4412
    Date:   Sat Mar 29 22:22:42 2014 +0100
        OUString: remove temporaries and repeated expressions
    
    but understandable as it was unreadable goo originally
    
    (cherry picked from commit 4289c346de432cc94f05aab78a9464350334b11f)
    
    Change-Id: I3ce161bd2628f3a49b14df886ee8d684b248db1c
    Reviewed-on: https://gerrit.libreoffice.org/11847
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index d32551a..ff71b0b 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -914,16 +914,17 @@ void SwColumnPage::UpdateCols()
 
 void SwColumnPage::SetLabels( sal_uInt16 nVis )
 {
+    //insert ~ before the last character, e.g. 1 -> ~1, 10 -> 1~0
     const OUString sLbl( '~' );
 
     const OUString sLbl1(OUString::number( nVis + 1 ));
-    m_pLbl1->SetText(sLbl1 + sLbl);
+    m_pLbl1->SetText(sLbl1.replaceAt(sLbl1.getLength()-1, 0, sLbl));
 
     const OUString sLbl2(OUString::number( nVis + 2 ));
-    m_pLbl2->SetText(sLbl2 + sLbl);
+    m_pLbl2->SetText(sLbl2.replaceAt(sLbl2.getLength()-1, 0, sLbl));
 
     const OUString sLbl3(OUString::number( nVis + 3 ));
-    m_pLbl3->SetText(sLbl3 + sLbl);
+    m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl));
 
     const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
     aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1));
commit 277a11f927d273049256395f0d1b1dec24e2e538
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Aug 7 14:49:36 2014 +0200

    fdo#81750 MM: correctly convert inline-edit fields
    
    The new inline-editable input fields contain real content in the
    node, therefore a single SwPaM::Move isn't sufficient to select
    the field or move after the field.
    For the input fields we can directly go to the end of the field.
    
    Reviewed-on: https://gerrit.libreoffice.org/10834
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 2579adb13188d276701b1504b4a10bed4d8d4b6f)
    
    Conflicts:
    
    	sw/source/core/doc/doc.cxx
    
    Change-Id: Ic1bce415ce45e49456121b6db003ded0733e195c
    Reviewed-on: https://gerrit.libreoffice.org/11782
    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/doc.cxx b/sw/source/core/doc/doc.cxx
index 1c419fe..3079d8e 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -112,6 +112,7 @@
 
 #include <wdocsh.hxx>
 #include <prtopt.hxx>
+#include <wrtsh.hxx>
 
 #include <vector>
 #include <map>
@@ -2027,21 +2028,47 @@ bool SwDoc::ConvertFieldsToText()
                         nWhich != RES_REFPAGESETFLD))
                 {
                     OUString sText = pField->ExpandField(true);
-                    //database fields should not convert their command into text
+
+                    // database fields should not convert their command into text
                     if( RES_DBFLD == pCurType->Which() && !static_cast<const SwDBField*>(pField)->IsInitialized())
                         sText = "";
 
-                    //now remove the field and insert the string
-                    SwPaM aPam1(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
-                    aPam1.Move();
-                    //insert first to keep the field's attributes
+                    SwPaM aInsertPam(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
+                    aInsertPam.SetMark();
+
+                    // go to the end of the field
+                    const SwTxtFld *pTxtField = GetTxtFldAtPos( *aInsertPam.End() );
+                    if (pTxtField && pTxtField->Which() == RES_TXTATR_INPUTFIELD)
+                    {
+                        SwPosition &rEndPos = *aInsertPam.GetPoint();
+                        rEndPos.nContent = GetDocShell()->GetWrtShell()->EndOfInputFldAtPos( *aInsertPam.End() );
+                    }
+                    else
+                    {
+                        aInsertPam.Move();
+                    }
+
+                    // first insert the text after field to keep the field's attributes,
+                    // then delete the field
                     if (!sText.isEmpty())
-                        InsertString( aPam1, sText );
-                    SwPaM aPam2(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
-                    aPam2.SetMark();
-                    aPam2.Move();
-                    DeleteAndJoin(aPam2);//remove the field
-                    bRet=true;
+                    {
+                        // to keep the position after insert
+                        SwPaM aDelPam( *aInsertPam.GetMark(), *aInsertPam.GetPoint() );
+                        aDelPam.Move( fnMoveBackward );
+                        aInsertPam.DeleteMark();
+
+                        InsertString( aInsertPam, sText );
+
+                        aDelPam.Move();
+                        // finally remove the field
+                        DeleteAndJoin( aDelPam );
+                    }
+                    else
+                    {
+                        DeleteAndJoin( aInsertPam );
+                    }
+
+                    bRet = true;
                 }
             }
             ++aBegin;
commit 3bb53bc977ed02e3dc15376e8ed245df46313c31
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Aug 8 11:21:14 2014 +0200

    Fix input field tab handling
    
    When searching for the current field in the field list to find the
    previous or next one, we check the field start and compare it with
    the cursor position.
    But with the new input fields, the cursor can actually be anywhere
    in the field, so we actually have to search for the start position
    of the input field at the cursor position.
    
    Change-Id: I26526524eccfdbea41c6bf69a460fa64248f50ca
    Reviewed-on: https://gerrit.libreoffice.org/10837
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit d33db207e27198df7af9fc007d7532ec76c80991)
    Reviewed-on: https://gerrit.libreoffice.org/11781

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 80febe1..c9b11c0 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -670,6 +670,8 @@ bool SwCrsrShell::MoveFldType(
 
         SwTxtFld * pTxtFld = pTNd->GetFldTxtAttrAt( rPos.nContent.GetIndex(), true );
         const bool bDelFld = ( pTxtFld == NULL );
+        sal_Int32 nContentOffset = -1;
+
         if( bDelFld )
         {
             // create dummy for the search
@@ -680,23 +682,47 @@ bool SwCrsrShell::MoveFldType(
                         mpDoc->IsClipBoard() );
             pTxtFld->ChgTxtNode( pTNd );
         }
+        else
+        {
+            // the cursor might be anywhere inside the input field,
+            // but we will be searching for the field start
+            if (pTxtFld->Which() == RES_TXTATR_INPUTFIELD
+                    && rPos.nContent.GetIndex() != *pTxtFld->GetStart())
+                nContentOffset = *pTxtFld->GetStart();
+        }
+
+        _SetGetExpFld *pSrch = NULL;
+        SwIndex *pIndex = NULL;
+        if( -1 == nContentOffset )
+        {
+            pSrch = new _SetGetExpFld( rPos.nNode, pTxtFld, &rPos.nContent );
+        }
+        else
+        {
+            pIndex = new SwIndex( rPos.nNode.GetNode().GetCntntNode(), nContentOffset );
+            pSrch = new _SetGetExpFld( rPos.nNode, pTxtFld, pIndex );
+        }
 
-        _SetGetExpFld aSrch( rPos.nNode, pTxtFld, &rPos.nContent );
         if( rPos.nNode.GetIndex() < mpDoc->GetNodes().GetEndOfExtras().GetIndex() )
         {
             // also at collection use only the first frame
             Point aPt;
-            aSrch.SetBodyPos( *pTNd->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) );
+            pSrch->SetBodyPos( *pTNd->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) );
         }
 
-        it = aSrtLst.lower_bound( &aSrch );
+        it = aSrtLst.lower_bound( pSrch );
+
+        bool isSrch = (**it == *pSrch);
+        delete pIndex;
+        delete pSrch;
+
         if( bDelFld )
         {
             delete (SwFmtFld*)&pTxtFld->GetAttr();
             delete pTxtFld;
         }
 
-        if( it != aSrtLst.end() && **it == aSrch ) // found
+        if( it != aSrtLst.end() && isSrch ) // found
         {
             if( bNext )
             {
commit 2460d70d403c25b4704a92c11411a1084a5e6dcf
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Aug 7 15:18:19 2014 +0200

    fdo#76565 Allow pasting into input fields
    
    Reviewed-on: https://gerrit.libreoffice.org/10835
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 3f26ab24e0bfd27645c97ff7915fba2db409930a)
    
    Conflicts:
    
    	sw/source/uibase/shells/basesh.cxx
    
    Change-Id: If996284aeea4b430cceaaf264035aa9e4ec0f2f0
    Reviewed-on: https://gerrit.libreoffice.org/11780
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/uibase/shells/basesh.cxx b/sw/source/core/uibase/shells/basesh.cxx
index e7dba76..0ec0312 100644
--- a/sw/source/core/uibase/shells/basesh.cxx
+++ b/sw/source/core/uibase/shells/basesh.cxx
@@ -267,8 +267,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
                 TransferableDataHelper aDataHelper(
                     TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin() ) );
                 if( aDataHelper.GetXTransferable().is()
-                    && SwTransferable::IsPaste( rSh, aDataHelper )
-                    && !rSh.CrsrInsideInputFld() )
+                    && SwTransferable::IsPaste( rSh, aDataHelper ) )
                 {
                     // Temporary variables, because the shell could already be
                     // destroyed after the paste.
@@ -416,8 +415,7 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
             break;
 
         case SID_PASTE:
-            if( !GetView().IsPasteAllowed()
-                || rSh.CrsrInsideInputFld() )
+            if( !GetView().IsPasteAllowed() )
             {
                 rSet.DisableItem( nWhich );
             }
commit 211601b1bc9543f98d5230ca42f5aff782cb7c64
Author: Andras Timar <andras.timar at collabora.com>
Date:   Wed Oct 8 05:46:07 2014 -0700

    Revert "fdo#80927 - quickstart causing trouble on windows, disable it"
    
    This reverts commit e10e1b06cbbf337e8277063651b6e48011df5fd4.
    The real solution to fdo#80927 is available now.
    
    Change-Id: I25166a348cb0a76cccfa49c82190aad88deb3c47
    Reviewed-on: https://gerrit.libreoffice.org/11853
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/scp2/Module_scp2.mk b/scp2/Module_scp2.mk
index 767e443..be02cd8 100644
--- a/scp2/Module_scp2.mk
+++ b/scp2/Module_scp2.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Module_add_targets,scp2,\
 	) \
 	$(if $(filter WNT,$(OS)),\
 		$(if $(DISABLE_ACTIVEX),,InstallModule_activex) \
+		InstallModule_quickstart \
 		InstallModule_windows \
 		$(if $(filter MSC,$(COM)),\
 			InstallModule_winexplorerext \
commit 05fa5bb669dfc4af43b2773071a6b8dcc1bf5e29
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Oct 1 16:45:03 2014 +0200

    fdo#84536 RTF import: don't try to rotate TextFrames
    
    Regression from 818d80eb0cee65d1bcc4fdb74b32a7c42cc1336e (RTF import:
    support shapes inside tables, 2013-06-28).
    
    (cherry picked from commit 53b9a9bc7c84738545b5c7b791cea1e3d6a16c72)
    
    Change-Id: I05eb2f4f2e3467e35f96b280e3a79f69906a56de
    Reviewed-on: https://gerrit.libreoffice.org/11746
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/core/data/rtf/pass/fdo84536.rtf b/sw/qa/core/data/rtf/pass/fdo84536.rtf
new file mode 100644
index 0000000..a8eaacf
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/fdo84536.rtf
@@ -0,0 +1,16 @@
+{\rtf1
+{\shp
+{\*\shpinst\shpleft0\shptop0\shpright10557\shpbottom2639\shpfhdr0\shpbxmargin\shpbxignore\shpbymargin\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz2\shplid2054
+{\sp
+{\sn shapeType}
+{\sv 202}
+}
+{\sp
+{\sn rotation}
+{\sv -2949120}
+}
+{\shptxt hello\par}
+}
+}
+\par
+}
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 19353fb..3d62a447 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -15,6 +15,7 @@
 #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
 #include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/RelOrientation.hpp>
@@ -195,7 +196,9 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, const O
         // See DffPropertyReader::Fix16ToAngle(): in RTF, positive rotation angles are clockwise, we have them as counter-clockwise.
         // Additionally, RTF type is 0..360*2^16, our is 0..360*100.
         sal_Int32 nRotation = aValue.toInt32()*100/65536;
-        xPropertySet->setPropertyValue("RotateAngle", uno::makeAny(sal_Int32(NormAngle360(nRotation * -1))));
+        uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY);
+        if (!xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
+            xPropertySet->setPropertyValue("RotateAngle", uno::makeAny(sal_Int32(NormAngle360(nRotation * -1))));
     }
 
     if (nHoriOrient != 0 && xPropertySet.is())
commit 2d9508b7cd2176e5d91283351473901df2cb41b2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Oct 6 23:37:18 2014 +0200

    fdo#79604: sw: fix clicking on hyper-links in Draw objects
    
    The URL is dispatched in MouseButtonUp(), but this relies on
    MouseButtonDown() not selecting the drawing object when the cursor is
    over an URL field.
    
    (probably regression from commit 7e2f98d0a0c4a0f36a94353a256e7cc5caa3113b
     and commit 5ed14025645200c77249da364870f5772c01df17)
    
    Change-Id: Ib1504baff5d1fffd6ce53b41d3ff726d8e4d5c9d
    (cherry picked from commit 5284e44ed0594a79b0cc22090a9a82b19962f6c2)
    Reviewed-on: https://gerrit.libreoffice.org/11834
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/uibase/docvw/edtwin.cxx b/sw/source/core/uibase/docvw/edtwin.cxx
index d4294af..e35b688 100644
--- a/sw/source/core/uibase/docvw/edtwin.cxx
+++ b/sw/source/core/uibase/docvw/edtwin.cxx
@@ -3114,8 +3114,27 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
             case MOUSE_LEFT + KEY_MOD2:
             {
 
+                // fdo#79604: first, check if a link has been clicked - do not
+                // select fly in this case!
+                if (1 == nNumberOfClicks)
+                {
+                    UpdatePointer( aDocPos, rMEvt.GetModifier() );
+                    SwEditWin::m_nDDStartPosY = aDocPos.Y();
+                    SwEditWin::m_nDDStartPosX = aDocPos.X();
+
+                    // hit an URL in DrawText object?
+                    if (bExecHyperlinks && pSdrView)
+                    {
+                        SdrViewEvent aVEvt;
+                        pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
+
+                        if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
+                            bExecDrawTextLink = true;
+                    }
+                }
+
                 bool bHandledFlyClick = false;
-                if ( nNumberOfClicks == nNbFlyClicks )
+                if (!bExecDrawTextLink && nNumberOfClicks == nNbFlyClicks)
                 {
                     bHandledFlyClick = true;
                     // only try to select frame, if pointer already was
@@ -3238,22 +3257,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
                 switch ( nNumberOfClicks )
                 {
                     case 1:
-                    {
-                        UpdatePointer( aDocPos, rMEvt.GetModifier() );
-                        SwEditWin::m_nDDStartPosY = aDocPos.Y();
-                        SwEditWin::m_nDDStartPosX = aDocPos.X();
-
-                        // hit an URL in DrawText object?
-                        if (bExecHyperlinks && pSdrView)
-                        {
-                            SdrViewEvent aVEvt;
-                            pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
-
-                            if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
-                                bExecDrawTextLink = true;
-                        }
                         break;
-                    }
                     case 2:
                     {
                         bFrmDrag = false;
@@ -3650,7 +3654,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
 
                     bNoInterrupt = bTmpNoInterrupt;
                 }
-                if ( !bOverURLGrf && !bOnlyText )
+                if (!bOverURLGrf && !bExecDrawTextLink && !bOnlyText)
                 {
                     const int nSelType = rSh.GetSelectionType();
                     // Check in general, if an object is selectable at given position.
commit ccd6beee2c799df460bb586db8f490def94befaa
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Oct 3 08:00:37 2014 +0200

    fdo#82144 fix unpacking of additional tarballs
    
    Change-Id: I74a61005fa9534b3f96cd392c6e38c54c5fd35e1
    (cherry picked from commit 0ad5604c91cdd593739b4af5dd3168d9b23b016b)
    Reviewed-on: https://gerrit.libreoffice.org/11783
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/bin/unpack-sources b/bin/unpack-sources
index a6a14ab..f7b5225 100644
--- a/bin/unpack-sources
+++ b/bin/unpack-sources
@@ -52,7 +52,7 @@ if test -z "$start_dir" ; then
     echo "Error: Please, define where to unpack sources, try --help"
 fi
 
-if ! test -f $start_dir/Repository.mk -a -f $start_dir/solenv/inc/target.mk ; then
+if ! test -f $start_dir/Repository.mk ; then
     echo "Error: $start_dir is not a valid LibreOffice core source directory"
     exit 1;
 fi
@@ -74,8 +74,12 @@ for tarball in $tarballs ; do
     fi
 
     echo "Unpacking $tarname..."
-    echo tar -xf "$tarball" -C "$lo_src_dir"
-    if ! tar -xf "$tarball" -C "$lo_src_dir"; then
+    echo mkdir -p "$lo_src_dir/$tarname"
+    if ! mkdir -p "$lo_src_dir/$tarname" ; then
+        echo "Error: could not create directory $lo_src_dir/$tarname"
+    fi
+    echo tar -xf "$tarball" -C "$lo_src_dir/$tarname" --strip-components=1
+    if ! tar -xf "$tarball" -C "$lo_src_dir/$tarname" --strip-components=1; then
         echo "Error: could not unpack $tarname"
         exit 1
     fi
commit aff06b866fa078f186c4fbe693d5373790b3455c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Oct 7 16:39:03 2014 +0200

    oox: fix spurious rebuilds of namespacemap.cxx
    
    There is a missing dependency on one of the generated header files.
    
    Change-Id: Id3fa2ccf2c2a31527b795861afdf557882f56972
    (cherry picked from commit 63e6cbc3180047000787a9071513152fdd9ce942)
    Reviewed-on: https://gerrit.libreoffice.org/11844
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/oox/CustomTarget_generated.mk b/oox/CustomTarget_generated.mk
index 70aa0d2..640f4e4 100644
--- a/oox/CustomTarget_generated.mk
+++ b/oox/CustomTarget_generated.mk
@@ -63,6 +63,7 @@ $(call gb_CustomTarget_get_target,oox/generated) : \
 	$(oox_INC)/tokenhash.inc \
 	$(oox_INC)/tokennames.inc \
 	$(oox_INC)/namespacenames.inc \
+	$(oox_INC)/namespaces-strictnames.inc \
 	$(oox_INC)/propertynames.inc \
 	$(oox_GENHEADERPATH)/tokens.hxx \
 	$(oox_GENHEADERPATH)/namespaces.hxx \
commit eabce6537cffe8ed435ed71efad0c241426d4827
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Oct 8 13:48:02 2014 +0200

    add missing legacyOnly currency, fdo#84260
    
    aa33dd16b0e3075f28c56656678c0f5cb7642222 changed the currency symbol
    from ¢ to ₡ but changed only the symbol. Actually changing the number
    format codes wasn't necessary at all, but changing only the symbol is
    wrong, see also the ATTLIST Currency  legacyOnly description in
    i18npool/source/localedata/data/locale.dtd
    
    Hopefully nothing relies on the actual symbol used in the number format
    codes ...
    
    Change-Id: I92e79403fbb80f18c44dc3ecf5a3830a52fd2ff8
    (cherry picked from commit aa1c549e65d103910904a75d19672240da10cc54)
    Reviewed-on: https://gerrit.libreoffice.org/11849
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/i18npool/source/localedata/data/es_CR.xml b/i18npool/source/localedata/data/es_CR.xml
index 6a04a8e..ff0d73a 100644
--- a/i18npool/source/localedata/data/es_CR.xml
+++ b/i18npool/source/localedata/data/es_CR.xml
@@ -185,6 +185,13 @@
       <CurrencyName>Colon</CurrencyName>
       <DecimalPlaces>2</DecimalPlaces>
     </Currency>
+    <Currency default="false" usedInCompatibleFormatCodes="false" legacyOnly="true">
+      <CurrencyID>CRC</CurrencyID>
+      <CurrencySymbol>¢</CurrencySymbol>
+      <BankSymbol>CRC</BankSymbol>
+      <CurrencyName>Colon</CurrencyName>
+      <DecimalPlaces>2</DecimalPlaces>
+    </Currency>
   </LC_CURRENCY>
   <LC_TRANSLITERATION ref="en_US"/>
   <LC_MISC ref="es_ES"/>
commit 54291d6bf931fde03a313cf254c8d65a0bbce33a
Author: Andras Timar <andras.timar at collabora.com>
Date:   Wed Oct 8 07:33:11 2014 -0700

    dos2unix on SSE2 patch files
    
    Change-Id: I3e71333647f3cec3a7c014cd4d245d2b8fdc4fc8
    Reviewed-on: https://gerrit.libreoffice.org/11856
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/external/coinmp/coinmp-msvc-disable-sse2.patch.1 b/external/coinmp/coinmp-msvc-disable-sse2.patch.1
index 0f518d6..c099494 100644
--- a/external/coinmp/coinmp-msvc-disable-sse2.patch.1
+++ b/external/coinmp/coinmp-msvc-disable-sse2.patch.1
@@ -1,10 +1,10 @@
 --- coinmp/BuildTools/MSVisualStudio/v10/Release.props.orig	2014-10-02 14:22:21.497268171 +0200
 +++ coinmp/BuildTools/MSVisualStudio/v10/Release.props	2014-10-02 14:22:30.193267497 +0200
 @@ -6,6 +6,7 @@
-   <ItemDefinitionGroup>
-     <ClCompile>
-       <StringPooling>true</StringPooling>
-+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
-     </ClCompile>
-   </ItemDefinitionGroup>
-   <ItemGroup />
+   <ItemDefinitionGroup>
+     <ClCompile>
+       <StringPooling>true</StringPooling>
++      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+     </ClCompile>
+   </ItemDefinitionGroup>
+   <ItemGroup />
diff --git a/external/lcms2/lcms2-msvc-disable-sse2.patch.1 b/external/lcms2/lcms2-msvc-disable-sse2.patch.1
index 37ef773..9bfad08 100644
--- a/external/lcms2/lcms2-msvc-disable-sse2.patch.1
+++ b/external/lcms2/lcms2-msvc-disable-sse2.patch.1
@@ -1,10 +1,10 @@
 --- lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj.orig	2014-10-02 15:15:40.228020086 +0200
 +++ lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj	2014-10-02 15:15:42.243019930 +0200
 @@ -133,6 +133,7 @@
-   </ItemDefinitionGroup>
-   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-     <ClCompile>
-+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
-       <Optimization>Full</Optimization>
-       <IntrinsicFunctions>true</IntrinsicFunctions>
-       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+   </ItemDefinitionGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+     <ClCompile>
++      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+       <Optimization>Full</Optimization>
+       <IntrinsicFunctions>true</IntrinsicFunctions>
+       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
commit e6634274644469333020ca725e44855debd466e4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 6 16:00:35 2014 +0100

    Resolves: fdo#80101 inserting non-chart as chart -> unhandled exception
    
    Change-Id: I4d5438292d9a5c49f1336304ebd3dc4e155dd212
    (cherry picked from commit 76d4db3181dfd1524620377bb12a8e0332ae8ab0)
    Reviewed-on: https://gerrit.libreoffice.org/11833
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 3871bc8..b8ae65b 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -311,6 +311,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
             break;
 
         case SID_INSERT_DIAGRAM_FROM_FILE:
+            try
             {
                 sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
                         0, OUString("com.sun.star.chart2.ChartDocument"));
@@ -321,6 +322,10 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
                     FuInsertChartFromFile(this, pWin, pView, pDrModel, rReq, aURL);
                 }
             }
+            catch (const uno::Exception& e)
+            {
+                SAL_WARN( "sc", "Cannot Insert Chart: " << e.Message);
+            }
             break;
 
         case SID_OBJECTRESIZE:
commit d1413ef5393fc4c6d3c174a8f555669a014f3675
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Oct 6 20:24:52 2014 +0200

    avoid use of ref. to possibly deleted object
    
    Change-Id: If5977b280fed8d8b053f59852d3984a59ce61a69
    (cherry picked from commit ce5cc7afb0f1c99237d04e0c754527c725d8491c)
    Reviewed-on: https://gerrit.libreoffice.org/11831
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 8263380..916a88e 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2396,9 +2396,9 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
                     sal_uInt16 nFileId;
                     GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId);
                     //replace with ScExternalSingleRefToken and adjust references
-                    pCode[j]->DecRef();
                     ScExternalSingleRefToken* pToken = new ScExternalSingleRefToken(nFileId, aTabName, rRef);
                     pToken->IncRef();
+                    pCode[j]->DecRef(); // ATTENTION: rRef can't be used after this point
                     pCode[j] = pToken;
                 }
             }
commit 629c7fa7d528d52dcc9f5892e0f7c34892fdf97f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 8 12:57:00 2014 +0200

    Do not terminate desktop from a Timer
    
    <sberg> kendy, as you recently changed Timer handling on Windows: debugging why
     quickstarter no longer works on Windows, I run into the phenomenon that
     IdleTerminate::Timeout (sfx2/source/appl/shutdownicon.cxx) executes on the main
     thread, and from within the m_xDesktop->terminate() call Timer::ImplDeInitTimer
     is called which deletes the pTimerData corresponding to our IldeTerminate, so
     that Timer::ImplTimerCallbackProc, after the return from
     IdleTerminate::Timeout, will operate on a stale pTimerData and crash; could
     that be related to those recent changes?
    <kendy> sberg: I think mst told that we were previously never deleting the
     timer, and that he did some changes there [...]
    <mst__> sberg, IdleTerminate needs a different implementation
    <mst__> sberg, does it work to do this via PostUserEvent, as
     "Application::Quit()" does?
    <sberg> mst__, do you think calling terminate from a Timer did work in the past?
     [...]
    <mst__> sberg, perhaps it did before [a recent] commit but i would guess it
     would be more by accident than by design
    
    Change-Id: I23b14ba59a963cc2209a261a1459d532a88acdc0
    (cherry picked from commit d8a0ecc94bfbfc1d9c8403f0e894d3b7e40384f2)
    Reviewed-on: https://gerrit.libreoffice.org/11852
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 1ed8c9c..55e1c5e 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -63,7 +63,6 @@
 #include <unistd.h>
 #include <errno.h>
 #endif
-#include <vcl/timer.hxx>
 
 #include <sfx2/sfxresid.hxx>
 
@@ -183,22 +182,6 @@ bool LoadModule()
 
 }
 
-class IdleTerminate : Timer
-{
-    ::com::sun::star::uno::Reference< XDesktop2 > m_xDesktop;
-public:
-    IdleTerminate (::com::sun::star::uno::Reference< XDesktop2 > xDesktop)
-    {
-        m_xDesktop = xDesktop;
-        Start();
-    }
-    virtual void Timeout() SAL_OVERRIDE
-    {
-        m_xDesktop->terminate();
-        delete this;
-    }
-};
-
 void ShutdownIcon::initSystray()
 {
     if (m_bInitialized)
@@ -564,7 +547,7 @@ void ShutdownIcon::terminateDesktop()
     // terminate desktop only if no tasks exist
     ::com::sun::star::uno::Reference< XIndexAccess > xTasks ( xDesktop->getFrames(), UNO_QUERY );
     if( xTasks.is() && xTasks->getCount() < 1 )
-        new IdleTerminate( xDesktop );
+        Application::Quit();
 
     // remove the instance pointer
     ShutdownIcon::pShutdownIcon = 0;
commit 94db331190f48333ff4963dfe57d0f88f79ddba5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 7 17:57:10 2014 +0200

    Don't even attempt to unload libqstart_gtklo.so again
    
    ...for no apparent gain.  IdleUnloader introduced in
    a8b42ddd66bba4b6f26a4d2d793051752989938e "Fix i#101245#" was probably a
    misguided reaction to osl::Module's dtor starting to call dlclose back then.
    
    (cherry picked from commit 73aaa3cf5e18d008268f4b67bbb60070b2cafc6a)
    Conflicts:
            sfx2/source/appl/shutdownicon.cxx
            sfx2/source/appl/shutdowniconunx.cxx
    
    Change-Id: I9a5e99d8cfba13e3750331597d64f58135537e9b
    Reviewed-on: https://gerrit.libreoffice.org/11851
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 11058e2..1ed8c9c 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -17,8 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_folders.h>
+#include <sal/config.h>
+
+#include <cassert>
 
+#include <boost/logic/tribool.hpp>
+#include <config_folders.h>
 #include <shutdownicon.hxx>
 #include <app.hrc>
 #include <sfx2/app.hxx>
@@ -80,10 +84,6 @@ extern "C" { static void SAL_CALL thisModule() {} }
 # endif
 #endif
 
-#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK) && !defined(PLUGIN_NAME)
-#define PLUGIN_NAME "libqstart_gtklo.so"
-#endif
-
 class SfxNotificationListener_Impl : public cppu::WeakImplHelper1< XDispatchResultListener >
 {
 public:
@@ -123,7 +123,7 @@ css::uno::Sequence<OUString> SAL_CALL ShutdownIcon::getSupportedServiceNames()
 bool ShutdownIcon::bModalMode = false;
 ShutdownIcon* ShutdownIcon::pShutdownIcon = NULL;
 
-#if !defined( ENABLE_QUICKSTART_APPLET ) || defined( UNX )
+#if !defined( ENABLE_QUICKSTART_APPLET )
 // To remove conditionals
 extern "C" {
     static void disabled_initSystray() { }
@@ -131,100 +131,57 @@ extern "C" {
 }
 #endif
 
-bool ShutdownIcon::LoadModule( osl::Module **pModule,
-                               oslGenericFunction *pInit,
-                               oslGenericFunction *pDeInit )
+namespace {
+
+boost::logic::tribool loaded(boost::logic::indeterminate);
+oslGenericFunction pInitSystray(0);
+oslGenericFunction pDeInitSystray(0);
+
+bool LoadModule()
 {
-    if ( pModule )
+    if (boost::logic::indeterminate(loaded))
     {
-        OSL_ASSERT ( pInit && pDeInit );
-        *pInit = *pDeInit = NULL;
-        *pModule = NULL;
-    }
-
 #ifdef ENABLE_QUICKSTART_APPLET
 #  ifdef WIN32
-    if ( pModule )
-    {
-        *pInit = win32_init_sys_tray;
-        *pDeInit = win32_shutdown_sys_tray;
-    }
-    return true;
+        pInitSystray = win32_init_sys_tray;
+        pDeInitSystray = win32_shutdown_sys_tray;
+        loaded = true;
 #  elif defined MACOSX
-    *pInit = aqua_init_systray;
-    *pDeInit = aqua_shutdown_systray;
-    return true;
+        pInitSystray = aqua_init_systray;
+        pDeInitSystray = aqua_shutdown_systray;
+        loaded = true;
 #  else // UNX
-    osl::Module *pPlugin;
-    pPlugin = new osl::Module();
-
-    oslGenericFunction pTmpInit = NULL;
-    oslGenericFunction pTmpDeInit = NULL;
-
-#define DOSTRING( x )                       #x
-#define STRING( x )                         DOSTRING( x )
-
-    if ( pPlugin->loadRelative( &thisModule, OUString (STRING( PLUGIN_NAME  ) ) ) )
-    {
-        pTmpInit = pPlugin->getFunctionSymbol(
-            OUString( "plugin_init_sys_tray"  ) );
-        pTmpDeInit = pPlugin->getFunctionSymbol(
-            OUString( "plugin_shutdown_sys_tray"  ) );
-    }
-    if ( !pTmpInit || !pTmpDeInit )
-    {
-        delete pPlugin;
-        pPlugin = NULL;
-    }
-    if ( pModule )
-    {
-        *pModule = pPlugin;
-        *pInit = pTmpInit;
-        *pDeInit = pTmpDeInit;
-    }
-    else
-    {
-        bool bRet = pPlugin != NULL;
-        delete pPlugin;
-        return bRet;
-    }
+        osl::Module plugin;
+        oslGenericFunction pTmpInit = NULL;
+        oslGenericFunction pTmpDeInit = NULL;
+        if ( plugin.loadRelative( &thisModule, "libqstart_gtklo.so" ) )
+        {
+            pTmpInit = plugin.getFunctionSymbol( "plugin_init_sys_tray" );
+            pTmpDeInit = plugin.getFunctionSymbol( "plugin_shutdown_sys_tray" );
+        }
+        if ( !pTmpInit || !pTmpDeInit )
+        {
+            loaded = false;
+        }
+        else
+        {
+            plugin.release();
+            pInitSystray = pTmpInit;
+            pDeInitSystray = pTmpDeInit;
+            loaded = true;
+        }
 #  endif // UNX
+#else
+        pInitSystray = disabled_initSystray;
+        pDeInitSystray = disabled_deInitSystray
+        loaded = false;
 #endif // ENABLE_QUICKSTART_APPLET
-
-#if !defined( ENABLE_QUICKSTART_APPLET ) || defined( UNX )
-    // Avoid unreachable code. In the ENABLE_QUICKSTART_APPLET && !UNX
-    // case, we have already returned.
-    if ( pModule )
-    {
-        if ( !*pInit )
-            *pInit = disabled_initSystray;
-        if ( !*pDeInit )
-            *pDeInit = disabled_deInitSystray;
     }
-
-    return true;
-#endif // !ENABLE_QUICKSTART_APPLET || UNX
+    assert(!boost::logic::indeterminate(loaded));
+    return loaded;
 }
 
-// These two timeouts are necessary to avoid there being
-// plugin frames still on the stack, after unloading that
-// code, causing a crash during disabling / termination.
-class IdleUnloader : Timer
-{
-    ::osl::Module *m_pModule;
-public:
-    IdleUnloader (::osl::Module **pModule) :
-        m_pModule (*pModule)
-    {
-        *pModule = NULL;
-        Start();
-    }
-    virtual void Timeout() SAL_OVERRIDE
-    {
-        delete m_pModule;
-        delete this;
-    }
-};
+}
 
 class IdleTerminate : Timer
 {
@@ -248,9 +205,9 @@ void ShutdownIcon::initSystray()
         return;
     m_bInitialized = true;
 
-    (void) LoadModule( &m_pPlugin, &m_pInitSystray, &m_pDeInitSystray );
+    (void) LoadModule();
     m_bVeto = true;
-    m_pInitSystray();
+    pInitSystray();
 }
 
 void ShutdownIcon::deInitSystray()
@@ -258,13 +215,12 @@ void ShutdownIcon::deInitSystray()
     if (!m_bInitialized)
         return;
 
-    if (m_pDeInitSystray)
-        m_pDeInitSystray();
+    if (pDeInitSystray)
+        pDeInitSystray();
 
     m_bVeto = false;
-    m_pInitSystray = 0;
-    m_pDeInitSystray = 0;
-    new IdleUnloader (&m_pPlugin);
+    pInitSystray = 0;
+    pDeInitSystray = 0;
 
     delete m_pFileDlg;
     m_pFileDlg = NULL;
@@ -280,9 +236,6 @@ ShutdownIcon::ShutdownIcon( const ::com::sun::star::uno::Reference< XComponentCo
     m_pResMgr( NULL ),
     m_pFileDlg( NULL ),
     m_xContext( rxContext ),
-    m_pInitSystray( 0 ),
-    m_pDeInitSystray( 0 ),
-    m_pPlugin( 0 ),
     m_bInitialized( false )
 {
     m_bSystemDialogs = SvtMiscOptions().UseSystemFileDialog();
@@ -291,7 +244,6 @@ ShutdownIcon::ShutdownIcon( const ::com::sun::star::uno::Reference< XComponentCo
 ShutdownIcon::~ShutdownIcon()
 {
     deInitSystray();
-    new IdleUnloader (&m_pPlugin);
 }
 
 
@@ -774,7 +726,7 @@ bool ShutdownIcon::IsQuickstarterInstalled()
     return false;
 #else // !ENABLE_QUICKSTART_APPLET
 #ifdef UNX
-    return LoadModule( NULL, NULL, NULL);
+    return LoadModule();
 #endif // UNX
 #endif // !ENABLE_QUICKSTART_APPLET
 }
diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx
index d91ded5..d09bcab3 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -29,7 +29,6 @@
 #include <rtl/string.hxx>
 #include <rtl/ustring.hxx>
 #include <osl/mutex.hxx>
-#include <osl/module.hxx>
 #include <sfx2/sfxuno.hxx>
 #include <cppuhelper/compbase4.hxx>
 #include <sfx2/dllapi.h>
@@ -69,17 +68,10 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase
 
         static ShutdownIcon *pShutdownIcon; // one instance
 
-        oslGenericFunction m_pInitSystray;
-        oslGenericFunction m_pDeInitSystray;
-        ::osl::Module  *m_pPlugin;
-
         bool m_bInitialized;
         void initSystray();
         void deInitSystray();
 
-        static bool LoadModule( osl::Module **pModule,
-                                oslGenericFunction *pInit,
-                                oslGenericFunction *pDeInit );
         static void EnterModalMode();
         static void LeaveModalMode();
         static OUString getShortcutName();
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index d48b5b1..3a24ca0 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -25,6 +25,7 @@
 
 #include <gtk/gtk.h>
 #include <glib.h>
+#include <osl/module.hxx>
 #include <osl/mutex.hxx>
 #include <vcl/bitmapex.hxx>
 #include <vcl/bmpacc.hxx>
commit f9aa26af2524a5c7d8fe660b0f922c32cd1a879a
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Oct 2 15:15:28 2014 +0200

    fdo#80927: css.office.Quickstart should be single-instance service.
    
    Incorrectly converted in a384b21cc40818bf3c918951a086a30b5d9d8022
    where SFX_IMPL_ONEINSTANCEFACTORY was used.
    
    AFAICS it's the first converted single-instance service which implements
    css::lang::XInitialization. That's kind of strange but can do its job.
    
    sbergman at redhat.com:  Three things were necessary in order to not call the
    ~ShutdownIcon code too late during exit now:
    
    * Move the relevant code from ~ShutdownIcon to ShutdownIcon::disposing.
    
    * Add a dummy <singleton name="com.sun.star.office.theQuickstart"/> so the
      service manager will eventually dispose the (single) instance.
    
    * In
      cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments
      do not shortcut updateDisposeSingleton in that odd case of calling
      createInstanceWithArguments on an implementation that (effectively) is a
      singleton (as otherwise the service manager would still not dispose it).  It
      looks to me like that "return inst;" was an inadvertent leftover in
      874c481801434d4fac3c50f076bff0fe3a3988b6 "Simplify service manager's tracking
      of singletons" and wasn't intended to serve some subtle purpose.
    
    Change-Id: Icd4d3168ec0bbb820b17ac321fe897ac9f9ce7fc
    (cherry picked from commit 98bb53a5609f8651b0841e8326d7aa53fd56ab3b)
    Reviewed-on: https://gerrit.libreoffice.org/11850
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 94d2ec5..20471b7 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -734,7 +734,6 @@ cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments(
         if (init.is()) {
             init->initialize(arguments);
         }
-        return inst;
     } else if (factory1.is()) {
         inst = factory1->createInstanceWithArgumentsAndContext(
             arguments, context);
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 9a5c9e4..11058e2 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -665,6 +665,8 @@ void SAL_CALL ShutdownIcon::disposing()
 {
     m_xContext.clear();
     m_xDesktop.clear();
+
+    deInitSystray();
 }
 
 
@@ -968,12 +970,31 @@ void SAL_CALL ShutdownIcon::setFastPropertyValue(       ::sal_Int32
     return aValue;
 }
 
+namespace {
+
+struct Instance {
+    explicit Instance(
+        css::uno::Reference<css::uno::XComponentContext> const & context):
+        instance(static_cast<cppu::OWeakObject *>(new ShutdownIcon(context)))
+    {}
+
+    rtl::Reference<css::uno::XInterface> instance;
+};
+
+struct Singleton:
+    public rtl::StaticWithArg<
+        Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton>
+{};
+
+}
+
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
 com_sun_star_comp_desktop_QuickstartWrapper_get_implementation(
     css::uno::XComponentContext *context,
     css::uno::Sequence<css::uno::Any> const &)
 {
-    return cppu::acquire(new ShutdownIcon(context));
+    return cppu::acquire(static_cast<cppu::OWeakObject *>(
+                Singleton::get(context).instance.get()));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component
index 203acc8..91002da 100644
--- a/sfx2/util/sfx.component
+++ b/sfx2/util/sfx.component
@@ -35,6 +35,7 @@
   <implementation name="com.sun.star.comp.desktop.QuickstartWrapper"
       constructor="com_sun_star_comp_desktop_QuickstartWrapper_get_implementation">
     <service name="com.sun.star.office.Quickstart"/>
+    <singleton name="com.sun.star.office.theQuickstart"/>
   </implementation>
   <implementation name="com.sun.star.comp.document.OwnSubFilter"
       constructor="com_sun_star_comp_document_OwnSubFilter_get_implementation">
commit a52ed06ade9cc3a1d89e8d200dd94d01989dad08
Author: Andras Timar <andras.timar at collabora.com>
Date:   Thu Oct 2 23:10:13 2014 +0200

    fdo#83292 add stub locale data for Catalan (Valencian)
    
    Change-Id: I569d203178668a2d63f4a53baca51ac16bf2361a
    Reviewed-on: https://gerrit.libreoffice.org/11776
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 99fa3b7df7c97b7adc97092baf3f147e165d8576)

diff --git a/i18npool/Library_localedata_euro.mk b/i18npool/Library_localedata_euro.mk
index d199466..7150ba1 100644
--- a/i18npool/Library_localedata_euro.mk
+++ b/i18npool/Library_localedata_euro.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,localedata_euro,\
 	CustomTarget/i18npool/localedata/localedata_br_FR \
 	CustomTarget/i18npool/localedata/localedata_bs_BA \
 	CustomTarget/i18npool/localedata/localedata_ca_ES \
+	CustomTarget/i18npool/localedata/localedata_ca_ES_valencia \
 	CustomTarget/i18npool/localedata/localedata_cs_CZ \
 	CustomTarget/i18npool/localedata/localedata_cv_RU \
 	CustomTarget/i18npool/localedata/localedata_cy_GB \
diff --git a/i18npool/source/localedata/data/ca_ES_valencia.xml b/i18npool/source/localedata/data/ca_ES_valencia.xml
new file mode 100644
index 0000000..96a34c2
--- /dev/null
+++ b/i18npool/source/localedata/data/ca_ES_valencia.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.2">
+  <LC_INFO>
+    <Language>
+      <LangID>qlt</LangID>
+      <DefaultName>Catalan (Valencian)</DefaultName>
+    </Language>
+    <Country>
+      <CountryID>ES</CountryID>
+      <DefaultName>Spain</DefaultName>
+    </Country>
+    <Variant>ca-ES-valencia</Variant>
+  </LC_INFO>
+  <LC_CTYPE ref="ca_ES"/>
+  <LC_FORMAT ref="ca_ES" replaceFrom="[CURRENCY]" replaceTo="[$₧-803]"/>
+  <LC_COLLATION ref="ca_ES"/>
+  <LC_SEARCH ref="en_US"/>
+  <LC_INDEX ref="en_US"/>
+  <LC_CALENDAR ref="ca_ES"/>
+  <LC_CURRENCY ref="ca_ES"/>
+  <LC_TRANSLITERATION ref="en_US"/>
+  <LC_MISC ref="ca_ES"/>
+  <LC_NumberingLevel ref="en_US"/>
+  <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 212b626..b3a8dea 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -113,6 +113,7 @@ static const struct {
     { "sv_SE",  lcl_DATA_EURO },
     { "sv_FI",  lcl_DATA_EURO },
     { "ca_ES",  lcl_DATA_EURO },
+    { "ca_ES_valencia",  lcl_DATA_EURO },
     { "cs_CZ",  lcl_DATA_EURO },
     { "sk_SK",  lcl_DATA_EURO },
     { "da_DK",  lcl_DATA_EURO },
commit 690de9ea76a9ac519b9354d3b153e12d31f11313
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date:   Tue Oct 7 01:51:37 2014 +0800

    Avoid accessing 1 character after a string
    
    Found while trying to reproduce fdo#83141, but not related to
    that - it just happened to trigger the relevant assert on a dbgutil
    build.
    
    The change to TextSearch::NSrchFrwrd() fixes the crash triggered
    by reproducing the above bug.
    The change to TextSearch::NSrchBkwrd() is by analogy but seems an
    equally good idea.
    
    Change-Id: I68c2c87b632dd53453f92394519a06f62e41bbad
    Reviewed-on: https://gerrit.libreoffice.org/11830
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 555a7a601b33c18472be7e99b0f9c8acb05a82d7)
    Reviewed-on: https://gerrit.libreoffice.org/11846

diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index d95600d..e2d424f 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -615,7 +615,7 @@ SearchResult TextSearch::NSrchFrwrd( const OUString& searchStr, sal_Int32 startP
                     bool bAtStart = !nCmpIdx;
                     bool bAtEnd = nFndEnd == endPos;
                     bool bDelimBefore = bAtStart || IsDelimiter( aStr, nCmpIdx-1 );
-                    bool bDelimBehind = IsDelimiter(  aStr, nFndEnd );
+                    bool bDelimBehind = bAtEnd || IsDelimiter(  aStr, nFndEnd );
                     //  *       1 -> only one word in the paragraph
                     //  *       2 -> at begin of paragraph
                     //  *       3 -> at end of paragraph
@@ -686,7 +686,7 @@ SearchResult TextSearch::NSrchBkwrd( const OUString& searchStr, sal_Int32 startP
                     sal_Int32 nFndStt = nCmpIdx - sSearchKey.getLength();
                     bool bAtStart = !nFndStt;
                     bool bAtEnd = nCmpIdx == startPos;
-                    bool bDelimBehind = IsDelimiter( aStr, nCmpIdx );
+                    bool bDelimBehind = bAtEnd || IsDelimiter( aStr, nCmpIdx );
                     bool bDelimBefore = bAtStart || // begin of paragraph
                         IsDelimiter( aStr, nFndStt-1 );
                     //  *       1 -> only one word in the paragraph
commit 64125db96d1f332b7f1c13961f255c4372a3e85f
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Oct 2 15:41:41 2014 +0200

    fdo#84315: quick fix for sw too
    
    Similar to 08f33ca66559dfafd29ab0c6073232cf05a6d4e5
    
    (cherry picked from commit 3c6f3290955cfaeaff4d1e38cb1b9d125eac4d61
    and commit 37c00bff114fe39e553ea6f1b8e68d6c6ff93eba)
    
    Change-Id: I04f11a3821cb3793e5f993995b0c10fc7a62420b
    Reviewed-on: https://gerrit.libreoffice.org/11765
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index d10fbcf..d6ec49f 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_sdk_api,sw))
 
 $(eval $(call gb_Library_add_defs,sw,\
     -DSW_DLLIMPLEMENTATION \
+	-DDBTOOLS_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,dbtools))\" \
 ))
 
 $(eval $(call gb_Library_use_libraries,sw,\
diff --git a/sw/source/core/uibase/dbui/swdbtoolsclient.cxx b/sw/source/core/uibase/dbui/swdbtoolsclient.cxx
index 2c1ce9a..a7bc6d9 100644
--- a/sw/source/core/uibase/dbui/swdbtoolsclient.cxx
+++ b/sw/source/core/uibase/dbui/swdbtoolsclient.cxx
@@ -102,7 +102,7 @@ void SwDbtoolsClient::registerClient()
 
 #if HAVE_FEATURE_DESKTOP
 #ifndef DISABLE_DYNLOADING
-        const OUString sModuleName(SVLIBRARY("dbtools"));
+        const OUString sModuleName(DBTOOLS_DLL_NAME);
 
         // load the dbtools library
         getDbToolsClientModule() = osl_loadModuleRelative(
commit cf862fa57f08240f9c41a636832b05ad69afa713
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Wed Oct 1 20:48:15 2014 +0200

    Upgrade libgltf to 0.0.2
    
    News in this version:
     - Better positioning of the models (fdo#81181)
     - Increased robustness (some additional check and coverity scan)
    
    Reviewed-on: https://gerrit.libreoffice.org/11749
    Reviewed-by: Zolnai Tamás <tamas.zolnai at collabora.com>
    Tested-by: Zolnai Tamás <tamas.zolnai at collabora.com>
    (cherry picked from commit 8ff9b1c2ca65f1e5ac41f3ccf15d9ddadda4c240)
    
    Conflicts:
    	download.lst
    
    Change-Id: I5be6a99eb925881ed84c8791ef39390e29cbb88b
    Reviewed-on: https://gerrit.libreoffice.org/11757
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/download.lst b/download.lst
index 5a7c385..9c0de03 100644
--- a/download.lst
+++ b/download.lst
@@ -87,8 +87,8 @@ export LIBATOMIC_OPS_TARBALL := libatomic_ops-7_2d.zip
 export LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
 export LIBEOT_TARBALL := libeot-0.01.tar.bz2
 export LIBEXTTEXTCAT_TARBALL := ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
-export LIBGLTF_MD5SUM := 03821c9c827e647fb5fedb12496e0067
-export LIBGLTF_TARBALL := libgltf-0.0.1.tar.bz2
+export LIBGLTF_MD5SUM := d63a9f47ab048f5009d90693d6aa6424
+export LIBGLTF_TARBALL := libgltf-0.0.2.tar.bz2
 export LIBLANGTAG_TARBALL := 36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
 export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz
commit 1c1764be170c136ad20f1b1487156af01161312e
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Tue Sep 30 19:55:25 2014 +0200

    bnc#584721: invisible text because of wrong color (white)
    
    Color::getColor() method uses some caching mechanism which
    works wrong when the result depend on one of the input parameters.
    So avoid caching in these cases.
    
    (cherry picked from commit cfe658c289de030dc3a8fecd3bac0a0004a18061)
    
    Conflicts:
    	sd/qa/unit/import-tests.cxx
    
    Change-Id: Ifa9221e21e685715454de86d5cec09ff6c266307
    Reviewed-on: https://gerrit.libreoffice.org/11724
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 5933449..4d05857 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -452,13 +452,10 @@ void Color::clearTransparence()
 
 sal_Int32 Color::getColor( const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
 {
-    /*  Special handling for theme style list placeholder colors (state
-        COLOR_PH), Color::getColor() may be called with different placeholder
-        colors in the nPhClr parameter. Therefore, the resolved color will not
-        be stored in this object, thus the state COLOR_FINAL will not be
-        reached and the transformation container will not be cleared, but the
-        original COLOR_PH state will be restored instead. */
-    bool bIsPh = false;
+    const sal_Int32 nTempC1 = mnC1;
+    const sal_Int32 nTempC2 = mnC2;
+    const sal_Int32 nTempC3 = mnC3;
+    const ColorMode eTempMode = meMode;
 
     switch( meMode )
     {
@@ -471,7 +468,7 @@ sal_Int32 Color::getColor( const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr
         case COLOR_SCHEME:  setResolvedRgb( rGraphicHelper.getSchemeColor( mnC1 ) );        break;
         case COLOR_PALETTE: setResolvedRgb( rGraphicHelper.getPaletteColor( mnC1 ) );       break;
         case COLOR_SYSTEM:  setResolvedRgb( rGraphicHelper.getSystemColor( mnC1, mnC2 ) );  break;
-        case COLOR_PH:      setResolvedRgb( nPhClr ); bIsPh = true;                         break;
+        case COLOR_PH:      setResolvedRgb( nPhClr );                                       break;
 
         case COLOR_FINAL:   return mnC1;
     }
@@ -607,10 +604,23 @@ sal_Int32 Color::getColor( const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr
         mnC1 = API_RGB_TRANSPARENT;
     }
 
-    meMode = bIsPh ? COLOR_PH : COLOR_FINAL;
+    sal_Int32 nRet = mnC1;
+    // Restore the original values when the color depends on one of the input
+    // parameters (rGraphicHelper or nPhClr)
+    if( eTempMode >= COLOR_SCHEME && eTempMode <= COLOR_PH )
+    {
+        mnC1 = nTempC1;
+        mnC2 = nTempC2;
+        mnC3 = nTempC3;
+        meMode = eTempMode;
+    }
+    else
+    {
+        meMode = COLOR_FINAL;
+    }
     if( meMode == COLOR_FINAL )
         maTransforms.clear();
-    return mnC1;
+    return nRet;
 }
 
 bool Color::hasTransparency() const
diff --git a/sd/qa/unit/data/pptx/bnc584721_4.pptx b/sd/qa/unit/data/pptx/bnc584721_4.pptx
new file mode 100644
index 0000000..102ee0b
Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc584721_4.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index f9fc0dd..640063a 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -90,6 +90,7 @@ public:
     void testBnc862510_5();
     void testBnc480256();
     void testCreationDate();
+    void testBnc584721_4();
 
     CPPUNIT_TEST_SUITE(SdFiltersTest);
     CPPUNIT_TEST(testDocumentLayout);
@@ -121,6 +122,7 @@ public:
     CPPUNIT_TEST(testBnc862510_5);
     CPPUNIT_TEST(testBnc480256);
     CPPUNIT_TEST(testCreationDate);
+    CPPUNIT_TEST(testBnc584721_4);
 
     CPPUNIT_TEST_SUITE_END();
 };
@@ -1064,6 +1066,45 @@ void SdFiltersTest::testBnc480256()
     xDocShRef->DoClose();
 }
 
+void SdFiltersTest::testBnc584721_4()
+{
+    // Black text was imported as white because of wrong caching mechanism
+
+    ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_4.pptx"));
+
+    uno::Reference< drawing::XDrawPagesSupplier > xDoc(
+        xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+
+    uno::Reference< drawing::XDrawPage > xPage(
+        xDoc->getDrawPages()->getByIndex(1), uno::UNO_QUERY_THROW );
+
+    uno::Reference< beans::XPropertySet > xShape(
+        xPage->getByIndex(1), uno::UNO_QUERY );
+    CPPUNIT_ASSERT_MESSAGE( "no text shape", xShape.is() );
+
+    // Get first paragraph of the text
+    uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY)->getText();
+    CPPUNIT_ASSERT_MESSAGE( "no text shape", xText.is() );
+    uno::Reference<container::XEnumerationAccess> paraEnumAccess;
+    paraEnumAccess.set(xText, uno::UNO_QUERY);
+    uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration();
+    uno::Reference<text::XTextRange> const xParagraph(paraEnum->nextElement(),
+                uno::UNO_QUERY_THROW);
+
+    // Get first run of the paragraph
+    uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParagraph, uno::UNO_QUERY);
+    uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+    uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY);
+    uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW );
+    sal_Int32 nCharColor;
+    xPropSet->getPropertyValue( "CharColor" ) >>= nCharColor;
+
+    // Color should be black
+    CPPUNIT_ASSERT_EQUAL( sal_Int32(COL_BLACK), nCharColor );
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 5ccafe77395e1fac0e46bca51a96c171f2d118cd
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Tue Sep 30 11:13:47 2014 +0200

    fdo#84008: kill c++11 code from collada2gltf
    
    ... so older compliers can deal with it.
    
    Change-Id: I7ecfa37601cae2979a5285436596175d2ebe1fe4
    Reviewed-on: https://gerrit.libreoffice.org/11706
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list