[Libreoffice-commits] core.git: Branch 'distro/collabora/lof-4.3' - 22 commits - chart2/uiconfig configure.ac download.lst drawinglayer/source filter/source icon-themes/sifr include/filter include/svx officecfg/registry sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_scqahelper.mk sc/qa sc/source sd/source sfx2/inc sfx2/source sfx2/uiconfig svx/source sw/CppunitTest_sw_htmlexport.mk sw/qa sw/source vcl/source writerfilter/source

Tor Lillqvist tml at collabora.com
Tue Oct 28 23:32:33 PDT 2014


 chart2/uiconfig/ui/tp_DataSource.ui                       |   62 
 configure.ac                                              |    2 
 dev/null                                                  |binary
 download.lst                                              |    3 
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx |    5 
 filter/source/graphicfilter/ios2met/ios2met.cxx           |   16 
 filter/source/graphicfilter/ipcx/ipcx.cxx                 |    7 
 filter/source/msfilter/msdffimp.cxx                       |   89 
 filter/source/msfilter/svdfppt.cxx                        |    5 
 filter/source/svg/svgexport.cxx                           |   18 
 filter/source/svg/svgfilter.hxx                           |    1 
 icon-themes/sifr/cmd/lc_spacepara15.png                   |binary
 icon-themes/sifr/cmd/lc_spacepara2.png                    |binary
 icon-themes/sifr/cmd/sc_spacepara15.png                   |binary
 icon-themes/sifr/cmd/sc_spacepara2.png                    |binary
 include/filter/msfilter/svdfppt.hxx                       |    2 
 include/svx/svdmodel.hxx                                  |    2 
 officecfg/registry/data/org/openoffice/Office/Common.xcu  |    2 
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs  |   10 
 sc/CppunitTest_sc_ucalc.mk                                |    1 
 sc/Library_scqahelper.mk                                  |    2 
 sc/inc/document.hxx                                       |    5 
 sc/inc/inputopt.hxx                                       |    3 
 sc/inc/sc.hrc                                             |    1 
 sc/inc/sortparam.hxx                                      |    1 
 sc/inc/table.hxx                                          |    8 
 sc/qa/unit/filters-test.cxx                               |    9 
 sc/qa/unit/helper/sorthelper.hxx                          |   55 
 sc/qa/unit/ucalc.cxx                                      |  491 ----
 sc/qa/unit/ucalc.hxx                                      |   21 
 sc/qa/unit/ucalc_sort.cxx                                 | 1478 ++++++++++++++
 sc/source/core/data/documen3.cxx                          |    5 
 sc/source/core/data/table2.cxx                            |    7 
 sc/source/core/data/table3.cxx                            |  122 -
 sc/source/core/tool/inputopt.cxx                          |   34 
 sc/source/core/tool/token.cxx                             |   47 
 sc/source/ui/app/scmod.cxx                                |    9 
 sc/source/ui/docshell/dbdocfun.cxx                        |    5 
 sc/source/ui/undo/undosort.cxx                            |    5 
 sd/source/ui/animations/SlideTransitionPane.cxx           |    5 
 sd/source/ui/inc/ViewShell.hxx                            |    1 
 sd/source/ui/view/viewshe2.cxx                            |   27 
 sd/source/ui/view/viewshel.cxx                            |    1 
 sfx2/inc/templatedlg.hxx                                  |    4 
 sfx2/source/doc/templatedlg.cxx                           |    2 
 sfx2/uiconfig/ui/templatedlg.ui                           |    3 
 svx/source/inc/svdoutlinercache.hxx                       |    7 
 svx/source/svdraw/svdmodel.cxx                            |   11 
 svx/source/svdraw/svdoutlinercache.cxx                    |    2 
 sw/CppunitTest_sw_htmlexport.mk                           |    1 
 sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc     |binary
 sw/qa/extras/htmlexport/htmlexport.cxx                    |   24 
 sw/qa/extras/rtfimport/data/fdo83464.rtf                  |   24 
 sw/qa/extras/rtfimport/data/fdo85179.rtf                  |   33 
 sw/qa/extras/rtfimport/rtfimport.cxx                      |   16 
 sw/source/filter/html/htmlforw.cxx                        |    5 
 sw/source/filter/ww8/ww8par.cxx                           |   13 
 vcl/source/filter/wmf/winwmf.cxx                          |  159 +
 vcl/source/fontsubset/sft.cxx                             |   31 
 writerfilter/source/dmapper/GraphicImport.cxx             |   32 
 writerfilter/source/dmapper/GraphicImport.hxx             |    2 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx            |    2 
 62 files changed, 2220 insertions(+), 718 deletions(-)

New commits:
commit 0eed8d987295d71170121e872d4c1564bd240cb8
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Oct 29 08:30:47 2014 +0200

    Bump version to 4.3.4.1 for next submission attempt
    
    Change-Id: I7b2a64b7788090beda529cb01d1fcf2aa80a6058

diff --git a/configure.ac b/configure.ac
index 0d80786..63911b5 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.4.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[4.3.4.1],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 0cf8c6df522a2af39f1231ec8f483ca15ea15e3a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun Oct 26 14:43:14 2014 -0700

    fdo#85215: Don't adjust references wrt cell position when disabled.
    
    Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788
    (cherry picked from commit 10fc138307afb4b39baddb0d56eb8e986e5d29ea)
    Reviewed-on: https://gerrit.libreoffice.org/12106
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index ce17bb9..05285d8 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -856,8 +856,11 @@ void ScTable::SortReorderByRow(
                     ScAddress aOldPos = rCell.maCell.mpFormula->aPos;
 
                     ScFormulaCell* pNew = rCell.maCell.mpFormula->Clone( aCellPos, SC_CLONECELL_DEFAULT);
-                    pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
-                    pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+                    if (pArray->IsUpdateRefs())
+                    {
+                        pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
+                        pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+                    }
 
                     sc::CellStoreType::iterator itBlk = rCellStore.push_back(pNew);
                 }
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index 36156fe..4a00707 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -46,8 +46,7 @@ void UndoSort::Execute( bool bUndo )
 
     ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange);
 
-    pDocShell->PostPaint(maParam.maSortRange, PAINT_GRID);
-    pDocShell->PostDataChanged();
+    rDoc.SetDirty(maParam.maSortRange);
     if (!aParam.mbUpdateRefs)
         rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
 }
commit cf310a6900c3ca9ae4759c677b63da718044418e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 23 17:09:25 2014 +0200

    fdo#85179 RTF filter: import image border
    
    Also adjust CppunitTest_sw_htmlexport that implicitly tested that there
    is no color around the image.
    
    (cherry picked from commit 01a32b7d074511bed24044dc94e1159aea62722b)
    
    Conflicts:
    	writerfilter/source/dmapper/GraphicImport.cxx
    
    Change-Id: I8e14dfa7e7be80c4f8c492999071decae6a492e8
    Reviewed-on: https://gerrit.libreoffice.org/12092
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index a59515e..faa3d4f 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -122,7 +122,7 @@ DECLARE_HTMLEXPORT_TEST(testExportOfImages, "textAndImage.docx")
     CPPUNIT_ASSERT(pDoc);
 
     assertXPath(pDoc, "/html/body", 1);
-    assertXPath(pDoc, "/html/body/p/img", 1);
+    assertXPath(pDoc, "/html/body/p/font/img", 1);
 }
 
 DECLARE_HTMLEXPORT_TEST(testExportOfImagesWithSkipImageEnabled, "textAndImage.docx")
@@ -131,7 +131,7 @@ DECLARE_HTMLEXPORT_TEST(testExportOfImagesWithSkipImageEnabled, "textAndImage.do
     CPPUNIT_ASSERT(pDoc);
 
     assertXPath(pDoc, "/html/body", 1);
-    assertXPath(pDoc, "/html/body/p/img", 0);
+    assertXPath(pDoc, "/html/body/p/font/img", 0);
 }
 
 DECLARE_HTMLEXPORT_TEST(testSkipImageEmbedded, "skipimage-embedded.doc")
diff --git a/sw/qa/extras/rtfimport/data/fdo85179.rtf b/sw/qa/extras/rtfimport/data/fdo85179.rtf
new file mode 100644
index 0000000..fb9bcfa
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo85179.rtf
@@ -0,0 +1,33 @@
+{\rtf1
+\pard\plain
+{\*\shppict
+{\pict
+{\*\picprop\shplid1025
+{\sp
+{\sn shapeType}
+{\sv 75}
+}
+{\sp
+{\sn lineColor}
+{\sv 65535}
+}
+{\sp
+{\sn lineWidth}
+{\sv 50800}
+}
+}
+\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw1806\pich1806\picwgoal1024\pichgoal1024\pngblip
+89504e470d0a1a0a0000000d49484452000000400000004008040000000060b9550000000467414d410000b18f0bfc6105000000017352474200aece1ce90000
+00206348524d00007a26000080840000fa00000080e8000075300000ea6000003a98000017709cba513c00000002624b47440000aa8d2332000000096f464673
+0000000600000000000c7355d3000000097048597300000dd700000dd70142289b7800000009767041670000004c00000040009d31381b000001cd4944415468
+deedd93d4fc24018c0f17f89c6cdc44940e3e222be2c0e7e0417e3a8113571707632514012a320c6f84d34be2c2ec2b750f40be8e6e4a00113cfe14a5b69b108
+f4589ee71652eefafce0b9f42e3d7063822aaac3f641d173a75d3efee85b6582c0c8749c5eb7332cfb4e6f213d336ed29807304477b1c7a94db80ae9e9c934d0
+fcdd12e7ffcefcc9168f9a0059143b8cb0d2de581f609854073fbecc220f60b18722479d0d14abed8c8cb5d3293ce2949903b0d8a7047cb1c98541008cba840c
+a736e1d2200046b967567f740961d3b197008873cf74835002eaac7363100009ca0d4296121675d2dc1a0440d2256428625163ed2f42cf011e8245d621b42c44
+0400485261a699706d1000092fa100d4490713220240dc25e438b1090185880ca09f8ece5c28d9843b009e82471ca25069d5cb785529bd007fdbfb8541b65b2f
+531100947a51530d42c1d92f9829818e31ca4ce9421c70e427440e80712a7a89b7c8fb0906003046a5311df31cf501a01f4d0ee1b80f00bd4c398558ee0340ff
+0b939a30df17002459f05d330a080a0108400002108000042000010840000210800004200001f8ce0ddf798e30dd7b38e0ce7ea16d2abc25a819cbda225337c7
+f7ff69bf8eef7f0084e08d42bdf8a03e00000025744558746372656174652d6461746500323031302d31322d32305431373a30383a33362b30313a30307ae51b1c00000025744558746d6f646966792d6461746500323031302d31322d32305431373a30383a33372b30313a30308323669c0000000049454e44ae4260820a}
+}
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 24afe98..d4cb897 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1907,6 +1907,13 @@ DECLARE_RTFIMPORT_TEST(testFdo83464, "fdo83464.rtf")
     CPPUNIT_ASSERT_EQUAL(OUString("Verdana"), getProperty<OUString>(getRun(getParagraphOfText(1, xFrameText->getText()), 1), "CharFontName"));
 }
 
+DECLARE_RTFIMPORT_TEST(testFdo85179, "fdo85179.rtf")
+{
+    // This was 0, border around the picture was ignored on import.
+    // 360: EMU -> MM100
+    CPPUNIT_ASSERT_EQUAL(sal_uInt32(50800/360), getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 4c68904..f53f7f3 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -176,6 +176,11 @@ struct GraphicBorderLine
         ,bHasShadow(false)
         {}
 
+    bool isEmpty()
+    {
+        return nLineWidth == 0 && nLineColor == 0 && bHasShadow == false;
+    }
+
 };
 
 class GraphicImport_Impl
@@ -679,7 +684,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
 
                         // fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation
                         if ( nRotation == 0 && !bContainsEffects )
-                            m_xGraphicObject = createGraphicObject( aMediaProperties );
+                            m_xGraphicObject = createGraphicObject( aMediaProperties, xShapeProps );
 
                         bUseShape = !m_xGraphicObject.is( );
 
@@ -1089,7 +1094,7 @@ void lcl_CalcCrop( sal_Int32& nCrop, sal_Int32 nRef )
        + (((nCrop & 0xffff) * nRef ) >> 16);
 }
 
-uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const beans::PropertyValues& aMediaProperties )
+uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const beans::PropertyValues& aMediaProperties, const uno::Reference<beans::XPropertySet>& xShapeProps )
 {
     uno::Reference< text::XTextContent > xGraphicObject;
     try
@@ -1117,10 +1122,22 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
             {
                 if( m_pImpl->eGraphicImportType == IMPORT_AS_GRAPHIC || !nBorder )
                 {
-                    aBorderLine.Color = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder) ].nLineColor;
-                    aBorderLine.InnerLineWidth = 0;
-                    aBorderLine.OuterLineWidth = (sal_Int16)m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder) ].nLineWidth;
-                    aBorderLine.LineDistance = 0;
+                    GraphicBorderLine& rBorderLine = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder)];
+                    if (rBorderLine.isEmpty() && xShapeProps.is())
+                    {
+                        // In case we got no border tokens and we have the
+                        // original shape, then use its line properties as the
+                        // border.
+                        aBorderLine.Color = xShapeProps->getPropertyValue("LineColor").get<sal_Int32>();
+                        aBorderLine.LineWidth = xShapeProps->getPropertyValue("LineWidth").get<sal_Int32>();
+                    }
+                    else
+                    {
+                        aBorderLine.Color = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder) ].nLineColor;
+                        aBorderLine.InnerLineWidth = 0;
+                        aBorderLine.OuterLineWidth = (sal_Int16)m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder) ].nLineWidth;
+                        aBorderLine.LineDistance = 0;
+                    }
                 }
                 PropertyIds aBorderProps[4] =
                 {
@@ -1350,7 +1367,8 @@ void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Referen
         uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len, m_pImpl->bIsBitmap );
         aMediaProperties[0].Value <<= xIStream;
 
-        m_xGraphicObject = createGraphicObject( aMediaProperties );
+        uno::Reference<beans::XPropertySet> xPropertySet;
+        m_xGraphicObject = createGraphicObject( aMediaProperties, xPropertySet );
 }
 
 
diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx
index 21612c0..dd0d000 100644
--- a/writerfilter/source/dmapper/GraphicImport.hxx
+++ b/writerfilter/source/dmapper/GraphicImport.hxx
@@ -76,7 +76,7 @@ class GraphicImport : public LoggedProperties, public LoggedTable
     css::uno::Reference<css::drawing::XShape> m_xShape;
     void ProcessShapeOptions(Value & val);
 
-    css::uno::Reference<css::text::XTextContent > createGraphicObject(const css::beans::PropertyValues& aMediaProperties );
+    css::uno::Reference<css::text::XTextContent > createGraphicObject(const css::beans::PropertyValues& aMediaProperties, const css::uno::Reference<css::beans::XPropertySet>& xShapeProps);
 
     void putPropertyToFrameGrabBag( const OUString& sPropertyName, const css::uno::Any& aPropertyValue );
 
commit 940807fe0275637c2fe9d3155cff48e512be1633
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Oct 22 22:46:24 2014 +0200

    Resolves fdo#71781: CMIS: Default Alfresco 4 URL not working
    
    See https://bugs.freedesktop.org/show_bug.cgi?id=71781#c5
    Badfully Alfresco server test doesn't follow this (their own?) rule since the url is:
    http://cmis.alfresco.com/cmisatom
    and not http://cmis.alfresco.com/alfresco/cmisatom
    
    Cherry-picked from 6e9d99332c241cf20204d9dfb772bc0168bfc460
    
    Change-Id: I3712993db96f8544381065c71a36697207ce66e0
    Reviewed-on: https://gerrit.libreoffice.org/12071
    Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat at free.fr>
    Tested-by: Bosdonnat Cedric <cedric.bosdonnat at free.fr>
    Reviewed-on: https://gerrit.libreoffice.org/12090
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index dcb3f70..6225b9e 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -575,7 +575,7 @@
     </prop>
     <prop oor:name="CmisServersUrls">
       <value>
-        <it>http://<host>/alfresco/cmisws/RepositoryService?wsdl</it>
+        <it>http://<host:port>/alfresco/cmisatom</it>
         <it>https://api.alfresco.com/cmis/versions/1.0/atom/</it>
         <it>http://<host>/p8cmis/wsdl</it>
         <it>https://apps.lotuslive.com/files/basic/cmis/my/servicedoc</it>
commit 188bc87d2a17488f38ed128e3ce8bcb894fd0c66
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 15:10:15 2014 +0100

    Resolves: fdo#84729 buffer cache grows to over 9000 unused entries
    
    regression from
    
    commit a5351434fbea1126961f5dbaa986e7c9e686c24e
    Author: tsahi glik <tsahi.glik at cloudon.com>
    Date:   Thu Jan 16 12:51:44 2014 -0800
        fix rendering issues in iOS with aqua
    
    because now the cache just fills up because nothing will have
    a depth of "0" and a new entry is created every time.
    
    0 could be seen to mean "whatever is a good non-1bit depth" or auto or
    something. (Do the uses of "8" really mean 8)
    
    0 passed to new VirtualDevice under Linux/X ends up using the depth of the
    outputdev, so here set nBits to that value to start with and the problem
    goes away
    
    Change-Id: I4390d6f7edef9dc7430cc77e3518dc751a5f479d
    (cherry picked from commit e25a020d59b019893d2e04ac61e4ed25ef0a6e61)
    Reviewed-on: https://gerrit.libreoffice.org/12087
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index 2f98e71..d812d93 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -85,6 +85,9 @@ namespace
         ::osl::MutexGuard aGuard(m_aMutex);
         VirtualDevice* pRetval = 0;
 
+        if (nBits == 0)
+            nBits = rOutDev.GetBitCount();
+
         if(!maFreeBuffers.empty())
         {
             bool bOkay(false);
@@ -183,6 +186,8 @@ namespace
 
         maUsedBuffers.erase(aUsedFound);
         maFreeBuffers.push_back(&rDevice);
+        SAL_WARN_IF(maFreeBuffers.size() > 1000, "drawinglayer", "excessive cached buffers, "
+            << maFreeBuffers.size() << " entries!");
         Start();
     }
 
commit 1c1afe0982b794348e56eb000f73f1d73d065cfc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 21 16:15:45 2014 +0100

    Resolves: fdo#83588 Revert "center slide after changing zoom"
    
    This reverts commit b179235f702e474b115ca479b603052f422346fd.
    
    (cherry picked from commit d1e9aa23a7b74e153479e0e23aac1c02cca48177)
    
    Change-Id: Ifb9444e77a28ac17e4dcc17725a4393ea0aa294e
    Reviewed-on: https://gerrit.libreoffice.org/12064
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 87edbc5..ce5ea31 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -206,7 +206,6 @@ public:
     virtual void UpdateScrollBars (void);
     void    Scroll(long nX, long nY);
     void    ScrollLines(long nX, long nY);
-    void    ScrollCenter();
     virtual void    SetZoom(long nZoom);
     virtual void    SetZoomRect(const Rectangle& rZoomRect);
     void    InitWindows(const Point& rViewOrigin, const Size& rViewSize,
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 8f91d6c..5f98d68 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -365,33 +365,6 @@ void ViewShell::SetZoom(long nZoom)
     UpdateScrollBars();
 }
 
-namespace
-{
-    void CenterScrollBar(ScrollBar *pBar)
-    {
-        long nVisSize = pBar->GetVisibleSize();
-        long nMin = pBar->GetRangeMin();
-        long nMax = pBar->GetRangeMax();
-        long nLen = nMax - nMin - nVisSize;
-        long nPos = nMin + nLen/2;
-        pBar->DoScroll(nPos);
-    }
-}
-
-void ViewShell::ScrollCenter()
-{
-    if (mpHorizontalScrollBar.get() != NULL)
-        CenterScrollBar(mpHorizontalScrollBar.get());
-
-    //zoom mode with no panning of the current slide, i.e. the
-    //scrollbar is in change slide mode not pan slide mode
-    if (IsPageFlipMode())
-        return;
-
-    if (mpVerticalScrollBar.get() != NULL)
-        CenterScrollBar(mpVerticalScrollBar.get());
-}
-
 /**
  * Set zoom rectangle for active window. Sets all split windows to the same zoom
  * factor.
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 17bcf5f..28e272e 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -683,7 +683,6 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
                             nNewZoom = std::min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom ));
 
                         SetZoom( nNewZoom );
-                        ScrollCenter(); //center slide after changing zoom
                         Invalidate( SID_ATTR_ZOOM );
                         Invalidate( SID_ATTR_ZOOMSLIDER );
 
commit e75a02e222b23589a056b2605e950fa6ffd65159
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 21 14:33:57 2014 +0100

    Resolves: fdo#84417 restore focus window after preview
    
    regression due to changes of sd/source/ui/slideshow/slideshow.cxx
    in cc5518ca61b209408a9d5262bbdcc39efccdd72d
    
    commit cc5518ca61b209408a9d5262bbdcc39efccdd72d
    Author: Steve Yin <steve_y at apache.org>
    Date:   Thu Nov 28 12:09:19 2013 +0000
        Integrate branch of IAccessible2
    
    Change-Id: I6b399d68c1f3ef32b702135b981100a23760569b
    (cherry picked from commit 92360e7413daf35d6b3acf2e77cf3c6063c5f11f)
    Reviewed-on: https://gerrit.libreoffice.org/12062
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 2e7f4db..8b85613 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -859,6 +859,8 @@ void SlideTransitionPane::applyToSelectedPages()
 {
     if( ! mbUpdatingControls )
     {
+        Window *pFocusWindow = Application::GetFocusWindow();
+
         ::sd::slidesorter::SharedPageSelection pSelectedPages( getSelectedPages());
         impl::TransitionEffect aEffect = getTransitionEffectFromControls();
         if( ! pSelectedPages->empty())
@@ -875,6 +877,9 @@ void SlideTransitionPane::applyToSelectedPages()
             else
                 stopEffects();
         }
+
+        if (pFocusWindow)
+            pFocusWindow->GrabFocus();
     }
 }
 
commit 865507ad0c8d345cf02f5fb736fd7d718d077a78
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 20 14:22:40 2014 +0100

    Resolves: fdo#84885 chart wizard dialog cut off
    
    Change-Id: Ie24687cd1c54b1fed04745c83f507c17a5574175
    (cherry picked from commit f9c242674094eba7ac19bd279f611dba0a8e5571)
    Reviewed-on: https://gerrit.libreoffice.org/12052
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/chart2/uiconfig/ui/tp_DataSource.ui b/chart2/uiconfig/ui/tp_DataSource.ui
index f7bed1d..69e7262 100644
--- a/chart2/uiconfig/ui/tp_DataSource.ui
+++ b/chart2/uiconfig/ui/tp_DataSource.ui
@@ -167,12 +167,13 @@
           </packing>
         </child>
         <child>
-          <object class="GtkBox" id="box3">
+          <object class="GtkGrid" id="grid2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="valign">start</property>
             <property name="hexpand">True</property>
-            <property name="orientation">vertical</property>
-            <property name="spacing">6</property>
+            <property name="vexpand">True</property>
+            <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="FT_ROLE">
                 <property name="visible">True</property>
@@ -183,9 +184,10 @@
                 <property name="mnemonic_widget">LB_ROLE:border</property>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -193,16 +195,18 @@
                 <property name="width_request">440</property>
                 <property name="height_request">100</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
                 <child internal-child="selection">
-                  <object class="GtkTreeSelection" id="Tab List-selection1"/>
+                  <object class="GtkTreeSelection" id="Tab List-selection"/>
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -215,9 +219,10 @@
                 <property name="mnemonic_widget">EDT_RANGE</property>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -229,7 +234,7 @@
                 <child>
                   <object class="GtkEntry" id="EDT_RANGE">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="invisible_char">•</property>
                   </object>
@@ -243,7 +248,7 @@
                   <object class="GtkButton" id="IMB_RANGE_MAIN">
                     <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="image">imageIMB_RANGE_MAIN</property>
                   </object>
@@ -255,9 +260,10 @@
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -296,9 +302,10 @@
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">4</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">4</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -310,7 +317,7 @@
                 <child>
                   <object class="GtkEntry" id="EDT_CATEGORIES">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="invisible_char">•</property>
                   </object>
@@ -324,7 +331,7 @@
                   <object class="GtkButton" id="IMB_RANGE_CAT">
                     <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="image">imageIMB_RANGE_CAT</property>
                   </object>
@@ -336,9 +343,10 @@
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">5</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">5</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
           </object>
commit b2f1f59ebc388567e5eaf032ec48c553c549fa49
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 17 15:03:34 2014 +0100

    Resolves: fdo#62682 crash on second export of svg
    
    because the first export has left "dangling" CalcFieldValueHdl Links in
    Outliners that got created based on the Drawing Outliner while it had a
    temporary CalcFieldValueHdl installed, and didn't get the old CalcFieldValueHdl
    installed when the old Drawing Outliner one was re-installed.
    
    (cherry picked from commit 5bdfa8c12472eb9ff6ca054c2ada7150b1869fff)
    
    Change-Id: I064a154ece488c9a4c3467b753451df7e73ae883
    Reviewed-on: https://gerrit.libreoffice.org/12009
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 07cf0a4..7dc2419 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -602,7 +602,8 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
                                     SdrOutliner& rOutl = mpSdrModel->GetDrawOutliner(NULL);
 
                                     maOldFieldHdl = rOutl.GetCalcFieldValueHdl();
-                                    rOutl.SetCalcFieldValueHdl( LINK( this, SVGFilter, CalcFieldHdl) );
+                                    maNewFieldHdl = LINK(this, SVGFilter, CalcFieldHdl);
+                                    rOutl.SetCalcFieldValueHdl(maNewFieldHdl);
                                 }
                             }
                             bRet = implExportDocument();
@@ -615,7 +616,20 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
                     }
 
                     if( mpSdrModel )
-                        mpSdrModel->GetDrawOutliner( NULL ).SetCalcFieldValueHdl( maOldFieldHdl );
+                    {
+                        //fdo#62682 The maNewFieldHdl can end up getting copied
+                        //into various other outliners which live past this
+                        //method, so get the full list of outliners and restore
+                        //the maOldFieldHdl for all that have ended up using
+                        //maNewFieldHdl
+                        std::vector<SdrOutliner*> aOutliners(mpSdrModel->GetActiveOutliners());
+                        for (std::vector<SdrOutliner*>::iterator aIter = aOutliners.begin(); aIter != aOutliners.end(); ++aIter)
+                        {
+                            SdrOutliner* pOutliner = *aIter;
+                            if (maNewFieldHdl == pOutliner->GetCalcFieldValueHdl())
+                                pOutliner->SetCalcFieldValueHdl(maOldFieldHdl);
+                        }
+                    }
 
                     delete mpSVGWriter, mpSVGWriter = NULL;
                     mpSVGExport = NULL; // pointed object is released by xSVGExport dtor at the end of this scope
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 7b68c2b..0c6371f 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -265,6 +265,7 @@ private:
     XDrawPageSequence                   mMasterPageTargets;
 
     Link                                maOldFieldHdl;
+    Link                                maNewFieldHdl;
 
     bool                            implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException);
 
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index e982cb5..5aeeb70 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -233,6 +233,8 @@ public:
     sal_uIntPtr         nSwapGraphicsMode;
 
     SdrOutlinerCache* mpOutlinerCache;
+    //get a vector of all the SdrOutliner belonging to the model
+    std::vector<SdrOutliner*> GetActiveOutliners() const;
     SdrModelImpl*   mpImpl;
     sal_uInt16          mnCharCompressType;
     sal_uInt16          mnHandoutPageCount;
diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx
index 6dbf728..03572fc 100644
--- a/svx/source/inc/svdoutlinercache.hxx
+++ b/svx/source/inc/svdoutlinercache.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SVX_SOURCE_INC_SVDOUTLINERCACHE_HXX
 
 #include <sal/types.h>
+#include <vector>
 
 class SdrModel;
 class SdrOutliner;
@@ -33,12 +34,18 @@ private:
 
     SdrOutliner*    mpModeOutline;
     SdrOutliner*    mpModeText;
+
+    std::vector<SdrOutliner*> maActiveOutliners;
 public:
     SdrOutlinerCache( SdrModel* pModel );
     ~SdrOutlinerCache();
 
     SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
     void disposeOutliner( SdrOutliner* pOutliner );
+    std::vector<SdrOutliner*> GetActiveOutliners() const
+    {
+        return maActiveOutliners;
+    }
 };
 
 #endif
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index f3fc337..0735d14 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1929,6 +1929,17 @@ SdrOutliner* SdrModel::createOutliner( sal_uInt16 nOutlinerMode )
     return mpOutlinerCache->createOutliner( nOutlinerMode );
 }
 
+std::vector<SdrOutliner*> SdrModel::GetActiveOutliners() const
+{
+    std::vector<SdrOutliner*> aRet(mpOutlinerCache ?
+        mpOutlinerCache->GetActiveOutliners() : std::vector<SdrOutliner*>());
+
+    aRet.push_back(pDrawOutliner);
+    aRet.push_back(pHitTestOutliner);
+
+    return aRet;
+}
+
 void SdrModel::disposeOutliner( SdrOutliner* pOutliner )
 {
     if( mpOutlinerCache )
diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx
index 8f9eba8..810034a 100644
--- a/svx/source/svdraw/svdoutlinercache.cxx
+++ b/svx/source/svdraw/svdoutlinercache.cxx
@@ -49,6 +49,7 @@ SdrOutliner* SdrOutlinerCache::createOutliner( sal_uInt16 nOutlinerMode )
         pOutliner = SdrMakeOutliner( nOutlinerMode, mpModel );
         Outliner& aDrawOutliner = mpModel->GetDrawOutliner();
         pOutliner->SetCalcFieldValueHdl( aDrawOutliner.GetCalcFieldValueHdl() );
+        maActiveOutliners.push_back(pOutliner);
     }
 
     return pOutliner;
@@ -95,6 +96,7 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
         }
         else
         {
+            maActiveOutliners.erase(std::remove(maActiveOutliners.begin(), maActiveOutliners.end(), pOutliner), maActiveOutliners.end());
             delete pOutliner;
         }
     }
commit 2d67c668e076600e068a0e9cde7088b9d8914d68
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 20 09:59:28 2014 +0100

    various untrusted loop bounds
    
    coverity#1242704 Untrusted loop bound
    
    Change-Id: Ib2e00c0cd269dc7ae55b206713fe07e5326072f2
    (cherry picked from commit d615d83381a0830a815fe2879ce761f1b00b04e9)
    
    coverity#1242606 Untrusted loop bound
    
    Change-Id: Iafa03d4dd65eb343a80996880bc1ed846d1b7491
    (cherry picked from commit 1361dfc0aa835dcb134d5de4bac594519aa16efe)
    
    coverity#1242582 Untrusted loop bound
    
    Change-Id: I72d2c4979b62a025d212ce5ee3b7141c40376fa7
    (cherry picked from commit 6118c11a0c5122169979547e8c27136cf58a54a7)
    
    coverity#1242778 Untrusted value as argument
    
    Change-Id: I34d5a5e7c5f0eef51d941c65ab73d5421d5a36cb
    (cherry picked from commit be31503ef86d2ad3291ced8fddb9c4da4d324c46)
    
    coverity#1242724 Untrusted value as argument
    
    Change-Id: I6041d09ef0a4ed4af5f1bf93f31a1eac60be1af7
    (cherry picked from commit bbe264a19fb82f50d859fc72a47312db0527640f)
    
    coverity#1242717 Untrusted loop bound
    
    Change-Id: I983bba075ab9626c90555fa41f9d473ae60fafea
    (cherry picked from commit cf63ebe0f005513c1e989682459bcd0688eb190b)
    
    coverity#1242624 Untrusted loop bound
    
    Change-Id: If2ae1982eec100f5602a13d648beec247ced6aa2
    (cherry picked from commit 711e74544d70b108e9bc70772b31f386dbf1c2a4)
    
    coverity#1222238 Untrusted loop bound
    
    Change-Id: I1a4dec8727d0a27f7fd0396fd22d955f61daaee4
    (cherry picked from commit 5a89092d5fe43638832ea8f86df34f81869337d9)
    
    coverity#1242573 Untrusted loop bound
    
    Change-Id: Id2847c55ccab7272919e76542bc0e0570bc9af12
    (cherry picked from commit 5e2d089f763963e6ce7d3d183bd1bf7932aeaaaf)
    
    coverity#1242573 Untrusted loop bound
    
    (cherry picked from commit 11a514e06bf38c70f2364c8535782aa3f33d6206)
    
    Conflicts:
    	vcl/source/filter/wmf/winwmf.cxx
    
    Change-Id: Ic84e57fbfa2b532409865c4364b91be594d252cf
    
    pass sfntLen to DumpSfnts etc so sfntP reads can be checked
    
    Change-Id: I5d8092eceb31ba251e75fe2c51b87890b8adcbf2
    (cherry picked from commit b4a0104849eeecb7779fda41116c92c362759882)
    
    coverity#1242908 Untrusted value as argument
    
    Change-Id: If9dd92c361d406c435329d29870dc8bb07a8ba7b
    (cherry picked from commit d0be09322d127e7d517851db38c764d57fbab2dc)
    Reviewed-on: https://gerrit.libreoffice.org/12067
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index aed623e..2b3d25b 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -1010,6 +1010,8 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
         else
             nLen = nOrderLen-4;
     }
+    if (nLen > pOS2MET->remainingSize())
+        throw css::uno::Exception("attempt to read past end of input", 0);
     boost::scoped_array<char> pChr(new char[nLen+1]);
     for (i=0; i<nLen; i++)
         pOS2MET->ReadChar( pChr[i] );
@@ -2750,12 +2752,18 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
     GDIMetaFile     aMTF;
     bool            bRet = false;
 
-    aOS2METReader.ReadOS2MET( rStream, aMTF );
+    try
+    {
+        aOS2METReader.ReadOS2MET( rStream, aMTF );
 
-    if ( !rStream.GetError() )
+        if ( !rStream.GetError() )
+        {
+            rGraphic=Graphic( aMTF );
+            bRet = true;
+        }
+    }
+    catch (const css::uno::Exception&)
     {
-        rGraphic=Graphic( aMTF );
-        bRet = true;
     }
 
     return bRet;
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 32dc0d9..f6fc871 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -222,6 +222,13 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
     sal_uLong   nLastPercent = 0;
     sal_uInt8   nDat = 0, nCol = 0;
 
+    //sanity check there is enough data before trying allocation
+    if (nPlanes > m_rPCX.remainingSize() / nBytesPerPlaneLin)
+    {
+        nStatus = false;
+        return;
+    }
+
     for( np = 0; np < nPlanes; np++ )
         pPlane[ np ] = new sal_uInt8[ nBytesPerPlaneLin ];
 
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index dc72ec7..12ef20a 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1064,14 +1064,20 @@ void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& r
     sal_uInt32 nPos = rIn.Tell();
     if ( rProperties.IsProperty( DFF_Prop_fillShadeColors ) )
     {
-        if ( rProperties.SeekToContent( DFF_Prop_fillShadeColors, rIn ) )
+        sal_uInt16 i = 0, nNumElem = 0, nNumElemReserved = 0, nSize = 0;
+        bool bOk = false;
+        if (rProperties.SeekToContent(DFF_Prop_fillShadeColors, rIn))
         {
-            sal_uInt16 i = 0, nNumElem = 0, nNumElemReserved = 0, nSize = 0;
             rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemReserved ).ReadUInt16( nSize );
+            //sanity check that the stream is long enough to fulfill nNumElem * 2 sal_Int32s
+            bOk = rIn.remainingSize() / (2*sizeof(sal_Int32)) >= nNumElem;
+        }
+        if (bOk)
+        {
             for ( ; i < nNumElem; i++ )
             {
-                sal_Int32   nColor;
-                sal_Int32   nDist;
+                sal_Int32 nColor(0);
+                sal_Int32 nDist(0);
 
                 rIn.ReadInt32( nColor ).ReadInt32( nDist );
                 rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( nColor, DFF_Prop_fillColor ), 1.0 - ( nDist / 65536.0 ) ) );
@@ -1897,7 +1903,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
             sal_uInt16 nNumElemMem = 0;
             rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
         }
-        if ( nElemSize == 36 )
+        bool bImport = false;
+        if (nElemSize == 36)
+        {
+            //sanity check that the stream is long enough to fulfill nNumElem * nElemSize;
+            bImport = rIn.remainingSize() / nElemSize >= nNumElem;
+        }
+        if (bImport)
         {
             uno::Sequence< beans::PropertyValues > aHandles( nNumElem );
             for ( sal_uInt16 i = 0; i < nNumElem; i++ )
@@ -2309,12 +2321,19 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
                 sal_uInt16 nNumElemMem = 0;
                 rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
             }
-            if ( nElemSize == 16 )
+            bool bImport = false;
+            if (nElemSize == 16)
+            {
+                //sanity check that the stream is long enough to fulfill nNumElem * nElemSize;
+                bImport = rIn.remainingSize() / nElemSize >= nNumElem;
+            }
+            if (bImport)
             {
-                sal_Int32 nLeft, nTop, nRight, nBottom;
                 com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrames( nNumElem );
-                for ( sal_uInt16 i = 0; i < nNumElem; i++ )
+                for (sal_uInt16 i = 0; i < nNumElem; ++i)
                 {
+                    sal_Int32 nLeft(0), nTop(0), nRight(0), nBottom(0);
+
                     rIn.ReadInt32( nLeft )
                        .ReadInt32( nTop )
                        .ReadInt32( nRight )
@@ -2342,26 +2361,37 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
             if ( SeekToContent( DFF_Prop_connectorPoints, rIn ) )
                 rIn.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
 
-            sal_Int32 nX, nY;
-            sal_Int16 nTmpA, nTmpB;
-            aGluePoints.realloc( nNumElemVert );
-            for ( sal_uInt16 i = 0; i < nNumElemVert; i++ )
+            bool bImport = false;
+            if (nNumElemVert)
             {
-                if ( nElemSizeVert == 8 )
-                {
-                    rIn.ReadInt32( nX )
-                       .ReadInt32( nY );
-                }
-                else
+                //sanity check that the stream is long enough to fulfill nNumElemVert * nElemSizeVert;
+                bImport = rIn.remainingSize() / nElemSizeVert >= nNumElemVert;
+            }
+
+            if (bImport)
+            {
+                aGluePoints.realloc( nNumElemVert );
+                for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
                 {
-                    rIn.ReadInt16( nTmpA )
-                       .ReadInt16( nTmpB );
+                    sal_Int32 nX(0), nY(0);
+                    if ( nElemSizeVert == 8 )
+                    {
+                        rIn.ReadInt32( nX )
+                           .ReadInt32( nY );
+                    }
+                    else
+                    {
+                        sal_Int16 nTmpA(0), nTmpB(0);
 
-                    nX = nTmpA;
-                    nY = nTmpB;
+                        rIn.ReadInt16( nTmpA )
+                           .ReadInt16( nTmpB );
+
+                        nX = nTmpA;
+                        nY = nTmpB;
+                    }
+                    EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].First,  nX );
+                    EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].Second, nY );
                 }
-                EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].First,  nX );
-                EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].Second, nY );
             }
             const OUString sGluePoints( "GluePoints" );
             aProp.Name = sGluePoints;
@@ -5319,19 +5349,24 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
         {
             delete pTextImpRec->pWrapPolygon;
             pTextImpRec->pWrapPolygon = NULL;
-            sal_uInt16 nNumElemVert, nNumElemMemVert, nElemSizeVert;
+            sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0);
             rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
+            bool bOk = false;
             if (nNumElemVert && ((nElemSizeVert == 8) || (nElemSizeVert == 4)))
             {
+                bOk = rSt.remainingSize() / nElemSizeVert >= nNumElemVert;
+            }
+            if (bOk)
+            {
                 pTextImpRec->pWrapPolygon = new Polygon(nNumElemVert);
                 for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
                 {
-                    sal_Int32 nX, nY;
+                    sal_Int32 nX(0), nY(0);
                     if (nElemSizeVert == 8)
                         rSt.ReadInt32( nX ).ReadInt32( nY );
                     else
                     {
-                        sal_Int16 nSmallX, nSmallY;
+                        sal_Int16 nSmallX(0), nSmallY(0);
                         rSt.ReadInt16( nSmallX ).ReadInt16( nSmallY );
                         nX = nSmallX;
                         nY = nSmallY;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 7458873..27400f8 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3841,7 +3841,7 @@ PPTParaSheet::PPTParaSheet( const PPTParaSheet& rSheet )
     *this = rSheet;
 }
 
-void PPTParaSheet::Read( SdrPowerPointImport&
+bool PPTParaSheet::Read( SdrPowerPointImport&
 #ifdef DBG_UTIL
                     rManager
 #endif
@@ -3898,6 +3898,8 @@ void PPTParaSheet::Read( SdrPowerPointImport&
         {
             // number of tabulators
             rIn.ReadUInt16( nVal16 );
+            if (rIn.remainingSize() / sizeof(nVal32) < nVal16)
+                return false;
             for ( i = 0; i < nVal16; i++ )
                 rIn.ReadUInt32( nVal32 );      // reading the tabulators
         }
@@ -3968,6 +3970,7 @@ void PPTParaSheet::Read( SdrPowerPointImport&
         }
         nPMask >>= 1;
     }
+    return true;
 }
 
 void PPTParaSheet::UpdateBulletRelSize(  sal_uInt32 nLevel, sal_uInt16 nFontHeight )
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 809b96a..a9bb623 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -791,7 +791,7 @@ public:
                     explicit PPTParaSheet( sal_uInt32 nInstance );
                     PPTParaSheet( const PPTParaSheet& rParaSheet );
 
-    void            Read(
+    bool            Read(
                         SdrPowerPointImport& rMan,
                         SvStream& rIn,
                         bool bMasterStyle,
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 72b24bd..0bf4265 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1039,19 +1039,26 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
             delete pImpRec->pWrapPolygon;
             pImpRec->pWrapPolygon = NULL;
 
-            sal_uInt16 nNumElemVert, nNumElemMemVert, nElemSizeVert;
+            sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0);
             rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
+            bool bOk = false;
             if (nNumElemVert && ((nElemSizeVert == 8) || (nElemSizeVert == 4)))
             {
+                //check if there is enough data in the file to make the
+                //record sane
+                bOk = rSt.remainingSize() / nElemSizeVert >= nNumElemVert;
+            }
+            if (bOk)
+            {
                 pImpRec->pWrapPolygon = new Polygon(nNumElemVert);
                 for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
                 {
-                    sal_Int32 nX, nY;
+                    sal_Int32 nX(0), nY(0);
                     if (nElemSizeVert == 8)
                         rSt.ReadInt32( nX ).ReadInt32( nY );
                     else
                     {
-                        sal_Int16 nSmallX, nSmallY;
+                        sal_Int16 nSmallX(0), nSmallY(0);
                         rSt.ReadInt16( nSmallX ).ReadInt16( nSmallY );
                         nX = nSmallX;
                         nY = nSmallY;
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 4c2c95c..545d09a 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -328,12 +328,32 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
 
         case W_META_POLYGON:
         {
-            sal_uInt16 nPoints = 0;
-            pWMF->ReadUInt16( nPoints );
-            Polygon aPoly( nPoints );
-            for( sal_uInt16 i = 0; i < nPoints; i++ )
-                aPoly[ i ] = ReadPoint();
-            pOut->DrawPolygon( aPoly );
+            bool bRecordOk = true;
+
+            sal_uInt16 nPoints(0);
+            pWMF->ReadUInt16(nPoints);
+
+            if (nPoints > pWMF->remainingSize() / (2 * sizeof(sal_uInt16)))
+            {
+                bRecordOk = false;
+            }
+            else
+            {
+                Polygon aPoly(nPoints);
+                for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i)
+                    aPoly[ i ] = ReadPoint();
+                pOut->DrawPolygon(aPoly);
+            }
+
+            SAL_WARN_IF(!bRecordOk, "vcl.filter", "polygon record has more points than we can handle");
+
+            bRecordOk &= pWMF->good();
+
+            if (!bRecordOk)
+            {
+                pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
+                break;
+            }
         }
         break;
 
@@ -403,12 +423,32 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
 
         case W_META_POLYLINE:
         {
-            sal_uInt16 nPoints = 0;
-            pWMF->ReadUInt16( nPoints );
-            Polygon aPoly( nPoints );
-            for(sal_uInt16 i = 0; i < nPoints; i++ )
-                aPoly[ i ] = ReadPoint();
-            pOut->DrawPolyLine( aPoly );
+            bool bRecordOk = true;
+
+            sal_uInt16 nPoints(0);
+            pWMF->ReadUInt16(nPoints);
+
+            if (nPoints > pWMF->remainingSize() / (2 * sizeof(sal_uInt16)))
+            {
+                bRecordOk = false;
+            }
+            else
+            {
+                Polygon aPoly(nPoints);
+                for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i)
+                    aPoly[ i ] = ReadPoint();
+                pOut->DrawPolyLine( aPoly );
+            }
+
+            SAL_WARN_IF(!bRecordOk, "vcl.filter", "polyline record has more points than we can handle");
+
+            bRecordOk &= pWMF->good();
+
+            if (!bRecordOk)
+            {
+                pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
+                break;
+            }
         }
         break;
 
@@ -1449,28 +1489,56 @@ bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
 
                 case W_META_POLYGON:
                 {
-                    sal_uInt16 nPoints;
+                    bool bRecordOk = true;
+
+                    sal_uInt16 nPoints(0);
                     pStm->ReadUInt16( nPoints );
-                    for(sal_uInt16 i = 0; i < nPoints; i++ )
-                        GetWinExtMax( ReadPoint(), aBound, nMapMode );
+
+                    if (nPoints > pStm->remainingSize() / (2 * sizeof(sal_uInt16)))
+                    {
+                        bRecordOk = false;
+                    }
+                    else
+                    {
+                        for(sal_uInt16 i = 0; i < nPoints; i++ )
+                        {
+                            GetWinExtMax( ReadPoint(), aBound, nMapMode );
+                        }
+                    }
+
+                    SAL_WARN_IF(!bRecordOk, "vcl.wmf", "polyline record claimed more points than the stream can provide");
+
+                    if (!bRecordOk)
+                    {
+                        pStm->SetError( SVSTREAM_FILEFORMAT_ERROR );
+                        bRet = false;
+                        break;
+                    }
                 }
                 break;
 
                 case W_META_POLYPOLYGON:
                 {
                     bool bRecordOk = true;
-                    sal_uInt16 nPoly, nPoints = 0;
-                    pStm->ReadUInt16( nPoly );
-                    for(sal_uInt16 i = 0; i < nPoly; i++ )
+                    sal_uInt16 nPoly(0), nPoints(0);
+                    pStm->ReadUInt16(nPoly);
+                    if (nPoly > pStm->remainingSize() / sizeof(sal_uInt16))
+                    {
+                        bRecordOk = false;
+                    }
+                    else
                     {
-                        sal_uInt16 nP = 0;
-                        pStm->ReadUInt16( nP );
-                        if (nP > SAL_MAX_UINT16 - nPoints)
+                        for(sal_uInt16 i = 0; i < nPoly; i++ )
                         {
-                            bRecordOk = false;
-                            break;
+                            sal_uInt16 nP = 0;
+                            pStm->ReadUInt16( nP );
+                            if (nP > SAL_MAX_UINT16 - nPoints)
+                            {
+                                bRecordOk = false;
+                                break;
+                            }
+                            nPoints += nP;
                         }
-                        nPoints += nP;
                     }
 
                     SAL_WARN_IF(!bRecordOk, "vcl.wmf", "polypolygon record has more polygons than we can handle");
@@ -1484,8 +1552,19 @@ bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
                         break;
                     }
 
-                    for (sal_uInt16 i = 0; i < nPoints; i++ )
-                        GetWinExtMax( ReadPoint(), aBound, nMapMode );
+                    if (nPoints > pStm->remainingSize() / (2 * sizeof(sal_uInt16)))
+                    {
+                        bRecordOk = false;
+                    }
+                    else
+                    {
+                        for (sal_uInt16 i = 0; i < nPoints; i++ )
+                        {
+                            GetWinExtMax( ReadPoint(), aBound, nMapMode );
+                        }
+                    }
+
+                    SAL_WARN_IF(!bRecordOk, "vcl.wmf", "polypolygon record claimed more points than the stream can provide");
 
                     bRecordOk &= pStm->good();
 
@@ -1500,10 +1579,30 @@ bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
 
                 case W_META_POLYLINE:
                 {
-                    sal_uInt16 nPoints;
-                    pStm->ReadUInt16( nPoints );
-                    for(sal_uInt16 i = 0; i < nPoints; i++ )
-                        GetWinExtMax( ReadPoint(), aBound, nMapMode );
+                    bool bRecordOk = true;
+
+                    sal_uInt16 nPoints(0);
+                    pStm->ReadUInt16(nPoints);
+                    if (nPoints > pStm->remainingSize() / (2 * sizeof(sal_uInt16)))
+                    {
+                        bRecordOk = false;
+                    }
+                    else
+                    {
+                        for (sal_uInt16 i = 0; i < nPoints; ++i)
+                        {
+                            GetWinExtMax( ReadPoint(), aBound, nMapMode );
+                        }
+                    }
+
+                    SAL_WARN_IF(!bRecordOk, "vcl.wmf", "polyline record claimed more points than the stream can provide");
+
+                    if (!bRecordOk)
+                    {
+                        pStm->SetError( SVSTREAM_FILEFORMAT_ERROR );
+                        bRet = false;
+                        break;
+                    }
                 }
                 break;
 
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index a72627b..9cc8811 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2027,7 +2027,7 @@ int  CreateTTFromTTGlyphs(TrueTypeFont  *ttf,
 #endif
 
 #ifndef NO_TYPE42
-static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP)
+static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP, sal_uInt32 sfntLen)
 {
     GlyphOffsets* res = (GlyphOffsets*)smalloc(sizeof(GlyphOffsets));
     sal_uInt8 *loca = NULL;
@@ -2035,10 +2035,27 @@ static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP)
     sal_uInt32 locaLen = 0;
     sal_Int16 indexToLocFormat = 0;
 
+    sal_uInt32 nMaxPossibleTables = sfntLen / (3*sizeof(sal_uInt32)); /*the three GetUInt32 calls*/
+    if (numTables > nMaxPossibleTables)
+    {
+        SAL_WARN( "vcl.fonts", "GlyphOffsetsNew claimed to have "
+            << numTables  << " tables, but that's impossibly large");
+        numTables = nMaxPossibleTables;
+    }
+
     for (i = 0; i < numTables; i++) {
-        sal_uInt32 tag = GetUInt32(sfntP + 12, 16 * i, 1);
-        sal_uInt32 off = GetUInt32(sfntP + 12, 16 * i + 8, 1);
-        sal_uInt32 len = GetUInt32(sfntP + 12, 16 * i + 12, 1);
+        sal_uInt32 nLargestFixedOffsetPos = 12 + 16 * i + 12;
+        sal_uInt32 nMinSize = nLargestFixedOffsetPos + sizeof(sal_uInt32);
+        if (nMinSize > sfntLen)
+        {
+            SAL_WARN( "vcl.fonts", "GlyphOffsetsNew claimed to have "
+                << numTables  << " tables, but only space for " << i);
+            break;
+        }
+
+        sal_uInt32 tag = GetUInt32(sfntP, 12 + 16 * i, 1);
+        sal_uInt32 off = GetUInt32(sfntP, 12 + 16 * i + 8, 1);
+        sal_uInt32 len = GetUInt32(sfntP, nLargestFixedOffsetPos, 1);
 
         if (tag == T_loca) {
             loca = sfntP + off;
@@ -2070,11 +2087,11 @@ static void GlyphOffsetsDispose(GlyphOffsets *_this)
     }
 }
 
-static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP)
+static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
 {
     HexFmt *h = HexFmtNew(outf);
     sal_uInt16 i, numTables = GetUInt16(sfntP, 4, 1);
-    GlyphOffsets *go = GlyphOffsetsNew(sfntP);
+    GlyphOffsets *go = GlyphOffsetsNew(sfntP, sfntLen);
     sal_uInt8 pad[] = {0,0,0,0};                     /* zeroes                       */
 
     assert(numTables <= 9);                                 /* Type42 has 9 required tables */
@@ -2208,7 +2225,7 @@ int  CreateT42FromTTGlyphs(TrueTypeFont  *ttf,
     }
     fprintf(outf, "/XUID [103 0 1 16#%08X %d 16#%08X 16#%08X] def\n", (unsigned int)rtl_crc32(0, ttf->ptr, ttf->fsize), (unsigned int)nGlyphs, (unsigned int)rtl_crc32(0, glyphArray, nGlyphs * 2), (unsigned int)rtl_crc32(0, encoding, nGlyphs));
 
-    DumpSfnts(outf, sfntP);
+    DumpSfnts(outf, sfntP, sfntLen);
 
     /* dump charstrings */
     fprintf(outf, "/CharStrings %d dict dup begin\n", nGlyphs);
commit 8f501aefc89f7911f46e0e1d1f00276e7186a3c3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Oct 22 17:30:54 2014 +0200

    error: 'fprintf' was not declared in this scope
    
    Change-Id: Ib7730481bdefdd33fd8354ff6f5bba36fc27c2fd

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 94457a8..3db225e 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -183,8 +183,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(Window *parent)
       mbIsSynced(false),
       maRepositories()
 {
-    fprintf(stderr, "SfxTemplateManagerDlg::SfxTemplateManagerDlg\n");
-
     get(mpTabControl, "tab_control");
     get(mpSearchEdit, "search_edit");
     get(mpViewBar, "action_view");
commit 034eb048857aeb905b72779bd37a63dfc206fd84
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sat Oct 18 20:22:53 2014 -0400

    fdo#82047: Correctly adjust references in range names on row deletion.
    
    Change-Id: Iac924b0b6932863f7f9cc088f996e0b07c340d2c
    (cherry picked from commit 281847613bd3ae472523822f4be9c21cc353867e)
    Reviewed-on: https://gerrit.libreoffice.org/12025
    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 916a88e..84c8ccc 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3170,6 +3170,53 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName(
                     if (adjustDoubleRefInName(rRef, rCxt, rPos))
                         aRes.mbReferenceModified = true;
                 }
+                else if (rCxt.mnRowDelta < 0)
+                {
+                    // row(s) deleted.
+                    if (rRef.Ref1.IsRowRel() || rRef.Ref2.IsRowRel())
+                        // Don't modify relative references in names.
+                        break;
+
+                    if (aAbs.aStart.Col() < rCxt.maRange.aStart.Col() || rCxt.maRange.aEnd.Col() < aAbs.aEnd.Col())
+                        // column range of the reference is not entirely in the deleted column range.
+                        break;
+
+                    ScRange aDeleted = rCxt.maRange;
+                    aDeleted.aStart.IncRow(rCxt.mnRowDelta);
+                    aDeleted.aEnd.SetRow(aDeleted.aStart.Row()-rCxt.mnRowDelta-1);
+
+                    if (aAbs.aEnd.Row() < aDeleted.aStart.Row() || aDeleted.aEnd.Row() < aAbs.aStart.Row())
+                        // reference range doesn't intersect with the deleted range.
+                        break;
+
+                    if (aDeleted.aStart.Row() <= aAbs.aStart.Row() && aAbs.aEnd.Row() <= aDeleted.aEnd.Row())
+                    {
+                        // This reference is entirely deleted.
+                        rRef.Ref1.SetRowDeleted(true);
+                        rRef.Ref2.SetRowDeleted(true);
+                        aRes.mbReferenceModified = true;
+                        break;
+                    }
+
+                    if (aAbs.aStart.Row() < aDeleted.aStart.Row())
+                    {
+                        if (aDeleted.aEnd.Row() < aAbs.aEnd.Row())
+                            // Deleted in the middle.  Make the reference shorter.
+                            rRef.Ref2.IncRow(rCxt.mnRowDelta);
+                        else
+                            // Deleted at tail end.  Cut off the lower part.
+                            rRef.Ref2.SetAbsRow(aDeleted.aStart.Row()-1);
+                    }
+                    else
+                    {
+                        // Deleted at the top.  Cut the top off and shift up.
+                        rRef.Ref1.SetAbsRow(aDeleted.aEnd.Row()+1);
+                        rRef.Ref1.IncRow(rCxt.mnRowDelta);
+                        rRef.Ref2.IncRow(rCxt.mnRowDelta);
+                    }
+
+                    aRes.mbReferenceModified = true;
+                }
                 else if (rCxt.maRange.Intersects(aAbs))
                 {
                     if (rCxt.mnColDelta && rCxt.maRange.aStart.Row() <= aAbs.aStart.Row() && aAbs.aEnd.Row() <= rCxt.maRange.aEnd.Row())
commit 859158410ef57cd007d5cc74e34199f967b07749
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Oct 17 21:48:31 2014 -0400

    fdo#80284: Avoid broadcasting during cell delete & shift.
    
    Broadcasting it here and marking formula cells dirty prevents them
    from being entered into the formula tree at the end.  They get marked
    "postponed dirty" during reference update, and are supposed to be
    set dirty at the end.
    
    Change-Id: I65977300ee4ee26b6166d170acd2145abcbbf288
    (cherry picked from commit 7fef943114b9184e69c8c714bf158116b8d9caf7)
    Reviewed-on: https://gerrit.libreoffice.org/12014
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9abd954..9b4fd02 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -391,11 +391,8 @@ void ScTable::DeleteCol(
         }
     }
 
-    {   // scope for bulk broadcast
-        ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM());
-        for (SCSIZE i = 0; i < nSize; i++)
-            aCol[nStartCol + i].DeleteArea(nStartRow, nEndRow, IDF_ALL);
-    }
+    for (SCSIZE i = 0; i < nSize; i++)
+        aCol[nStartCol + i].DeleteArea(nStartRow, nEndRow, IDF_ALL, false);
 
     if ((nStartRow == 0) && (nEndRow == MAXROW))
     {
commit b39ccfe29fed6946fba7a68e0b0cb57c2a4255ff
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Oct 20 18:13:34 2014 +0200

    Fix build breakage.

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 9e666a8..a59515e 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -173,15 +173,15 @@ DECLARE_HTMLEXPORT_TEST(testExportCheckboxRadioButtonState, "checkbox-radiobutto
     assertXPath(pDoc, "/html/body/p[1]/input", "type", "checkbox");
     assertXPath(pDoc, "/html/body/p[1]/input", "checked", "checked");
     assertXPath(pDoc, "/html/body/p[2]/input", "type", "checkbox");
-    assertXPathNoAttribute(pDoc, "/html/body/p[2]/input", "checked");
+    // FIXME not in 4.3 assertXPathNoAttribute(pDoc, "/html/body/p[2]/input", "checked");
     assertXPath(pDoc, "/html/body/form/p[1]/input", "type", "checkbox");
     assertXPath(pDoc, "/html/body/form/p[1]/input", "checked", "checked");
     assertXPath(pDoc, "/html/body/form/p[2]/input", "type", "checkbox");
-    assertXPathNoAttribute(pDoc, "/html/body/form/p[2]/input", "checked");
+    // FIXME not in 4.3 assertXPathNoAttribute(pDoc, "/html/body/form/p[2]/input", "checked");
     assertXPath(pDoc, "/html/body/form/p[3]/input", "type", "radio");
     assertXPath(pDoc, "/html/body/form/p[3]/input", "checked", "checked");
     assertXPath(pDoc, "/html/body/form/p[4]/input", "type", "radio");
-    assertXPathNoAttribute(pDoc, "/html/body/form/p[4]/input", "checked");
+    // FIXME not in 4.3 assertXPathNoAttribute(pDoc, "/html/body/form/p[4]/input", "checked");
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 531d5d3c53992c4e91d8e2a9ea55b479c6a039d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 14 17:25:18 2014 +0100

    Resolves: fdo#72587 make template dialog Modal
    
    (cherry picked from commit 60126254eba8a6a6b94c60b2101ee90986161e24)
    
    Change-Id: Ifb6d7ebbe297d17fc99426b501c92daf8577dd20
    Reviewed-on: https://gerrit.libreoffice.org/11978
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx
index 58d18cf..6731b71 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/sfx2/inc/templatedlg.hxx
@@ -39,13 +39,13 @@ namespace com {
     }   }   }
 }
 
-class SfxTemplateManagerDlg : public ModelessDialog
+class SfxTemplateManagerDlg : public ModalDialog
 {
     typedef bool (*selection_cmp_fn)(const ThumbnailViewItem*,const ThumbnailViewItem*);
 
 public:
 
-    SfxTemplateManagerDlg (Window *parent = DIALOG_NO_PARENT);
+    SfxTemplateManagerDlg(Window *parent = NULL);
 
     virtual ~SfxTemplateManagerDlg ();
 
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2f91796..94457a8 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -175,7 +175,7 @@ static bool cmpSelectionItems (const ThumbnailViewItem *pItem1, const ThumbnailV
 }
 
 SfxTemplateManagerDlg::SfxTemplateManagerDlg(Window *parent)
-    : ModelessDialog(parent, "TemplateDialog", "sfx/ui/templatedlg.ui"),
+    : ModalDialog(parent, "TemplateDialog", "sfx/ui/templatedlg.ui"),
       maSelTemplates(cmpSelectionItems),
       maSelFolders(cmpSelectionItems),
       mbIsSaveMode(false),
@@ -183,6 +183,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(Window *parent)
       mbIsSynced(false),
       maRepositories()
 {
+    fprintf(stderr, "SfxTemplateManagerDlg::SfxTemplateManagerDlg\n");
+
     get(mpTabControl, "tab_control");
     get(mpSearchEdit, "search_edit");
     get(mpViewBar, "action_view");
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index b6ecee8..f6bcdff 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -7,6 +7,7 @@
     <property name="width_request">800</property>
     <property name="height_request">560</property>
     <property name="can_focus">False</property>
+    <property name="modal">True</property>
     <child>
       <object class="GtkBox" id="box1">
         <property name="visible">True</property>
@@ -326,6 +327,7 @@
                   <object class="sfxlo-TemplateSearchView" id="search_view">
                     <property name="can_focus">True</property>
                     <property name="no_show_all">True</property>
+                    <property name="margin">0</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
                   </object>
@@ -339,6 +341,7 @@
                   <object class="sfxlo-TemplateRemoteView" id="remote_view">
                     <property name="can_focus">True</property>
                     <property name="no_show_all">True</property>
+                    <property name="margin">0</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
                   </object>
commit cd85ff0a814ce38d4704b4b808269d89cdaf0d11
Author: Marco Cecchetti <mrcekets at gmail.com>
Date:   Fri Oct 3 15:45:17 2014 +0200

    html export: Fix export of checked checkbox and radiobutton.
    
    Change-Id: Ia77f9840df7508d96292aac63e65714a7892342f
    Reviewed-on: https://gerrit.libreoffice.org/12049
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sw/CppunitTest_sw_htmlexport.mk b/sw/CppunitTest_sw_htmlexport.mk
index d190050..72a9fda 100644
--- a/sw/CppunitTest_sw_htmlexport.mk
+++ b/sw/CppunitTest_sw_htmlexport.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_htmlexport,\
 	canvas/source/factory/canvasfactory \
     comphelper/util/comphelp \
     configmgr/source/configmgr \
+    dbaccess/util/dba \
     embeddedobj/util/embobj \
     filter/source/config/cache/filterconfig1 \
     filter/source/storagefilterdetect/storagefd \
diff --git a/sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc b/sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc
new file mode 100644
index 0000000..17162a4
Binary files /dev/null and b/sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 94fb667..9e666a8 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -164,6 +164,26 @@ DECLARE_HTMLEXPORT_TEST(testSkipImageEmbeddedDocument, "skipimage-embedded-docum
 
 #endif
 
+DECLARE_HTMLEXPORT_TEST(testExportCheckboxRadioButtonState, "checkbox-radiobutton.doc")
+{
+    htmlDocPtr pDoc = parseHtml(maTempFile);
+    CPPUNIT_ASSERT(pDoc);
+
+    assertXPath(pDoc, "/html/body", 1);
+    assertXPath(pDoc, "/html/body/p[1]/input", "type", "checkbox");
+    assertXPath(pDoc, "/html/body/p[1]/input", "checked", "checked");
+    assertXPath(pDoc, "/html/body/p[2]/input", "type", "checkbox");
+    assertXPathNoAttribute(pDoc, "/html/body/p[2]/input", "checked");
+    assertXPath(pDoc, "/html/body/form/p[1]/input", "type", "checkbox");
+    assertXPath(pDoc, "/html/body/form/p[1]/input", "checked", "checked");
+    assertXPath(pDoc, "/html/body/form/p[2]/input", "type", "checkbox");
+    assertXPathNoAttribute(pDoc, "/html/body/form/p[2]/input", "checked");
+    assertXPath(pDoc, "/html/body/form/p[3]/input", "type", "radio");
+    assertXPath(pDoc, "/html/body/form/p[3]/input", "checked", "checked");
+    assertXPath(pDoc, "/html/body/form/p[4]/input", "type", "radio");
+    assertXPathNoAttribute(pDoc, "/html/body/form/p[4]/input", "checked");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 91eec2d..7b226e9 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -760,6 +760,9 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
             TRISTATE_FALSE != *(sal_Int16*) aTmp.getValue() )
         {
             sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_checked);
+            sOptions += "=\"";
+            sOptions += OString(OOO_STRING_SVTOOLS_HTML_O_checked);
+            sOptions += "\"";
         }
 
         aTmp = xPropSet->getPropertyValue(
@@ -987,7 +990,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
         sOut = "\"";
     }
 
-    sOut = sOptions;
+    sOut += " " + sOptions;
 
     if( TYPE_IMAGE == eType )
     {
commit 5a7cc32576bc401e0aee96d2f4a015e740d20ba2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Oct 19 10:35:45 2014 +0200

    fdo#83464 RTF import: \plain should reset \rtlch and \hich as well
    
    Regression from 36246aa9fb57c9fe4e546c91a8274d8828b1424e (RTF import:
    fix handling of \loch \hich \dbch \ltrch \rtlch, 2014-06-03), now that
    \f no longer means the ascii font name, \plain should reset a few more
    parser state members.
    
    (cherry picked from commit 69bf37136c1386c7220f38a896aa9865bdae665f)
    
    Conflicts:
    	sw/qa/extras/rtfimport/rtfimport.cxx
    	writerfilter/source/rtftok/rtfdocumentimpl.cxx
    
    Change-Id: Ia6b0bdf25563dd5300e108b46731751f0886f67d
    Reviewed-on: https://gerrit.libreoffice.org/12034
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sw/qa/extras/rtfimport/data/fdo83464.rtf b/sw/qa/extras/rtfimport/data/fdo83464.rtf
new file mode 100644
index 0000000..28c9202
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo83464.rtf
@@ -0,0 +1,24 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs1025
+{\fonttbl
+{\f0\fbidi \froman\fcharset0\fprq2 Times New Roman;}
+{\f39\fbidi \fswiss\fcharset0\fprq2 Verdana;}
+}
+{\stylesheet
+{\s43\ql \f39\fs16 Table Text;}
+}
+\pard\plain \ltrpar\ql \li0\ri0\sb60\sa60\widctlpar\tx360\jclisttab\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10449364 \rtlch\fcs1 \af0\afs18\alang1037 \ltrch\fcs0 \fs16\lang1024\langfe1024\loch\af2\hich\af2\dbch\af35\cgrid\noproof\langnp1033\langfenp1033 
+\par
+{\rtlch\fcs1 \ltrch\fcs0 \insrsid11419963 
+{\shp
+{\*\shpinst\shpleft-90\shptop720\shpright9405\shpbottom2940\shpfhdr0\shpbxcolumn\shpbxignore\shpbymargin\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz2\shplid1027
+{\sp
+{\sn shapeType}
+{\sv 202}
+}
+{\shptxt \pard\plain\f39\fs16 Hello\par
+}
+}
+}
+}
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index cc51a42..24afe98 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1898,6 +1898,15 @@ DECLARE_RTFIMPORT_TEST(testFdo84679, "fdo84679.rtf")
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
 }
 
+DECLARE_RTFIMPORT_TEST(testFdo83464, "fdo83464.rtf")
+{
+    // Problem was that the text in the textfrme had wrong font.
+    uno::Reference<text::XTextRange> xFrameText(getShape(1), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xFrameText->getString());
+    // This was Times New Roman.
+    CPPUNIT_ASSERT_EQUAL(OUString("Verdana"), getProperty<OUString>(getRun(getParagraphOfText(1, xFrameText->getText()), 1), "CharFontName"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 3fdc5ef..9339c51 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2812,6 +2812,8 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         m_aStates.top().aCharacterSprms = getDefaultState().aCharacterSprms;
         m_aStates.top().nCurrentEncoding = getEncoding(getFontIndex(m_nDefaultFontIndex));
         m_aStates.top().aCharacterAttributes = getDefaultState().aCharacterAttributes;
+        m_aStates.top().isRightToLeft = false;
+        m_aStates.top().eRunType = RTFParserState::LOCH;
     }
     break;
     case RTF_PARD:
commit c818e0e3f8e6255858522fa608ae0fae1f7194fc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 17 11:32:25 2014 +0100

    bump openssl to 1.0.1j
    
    Reviewed-on: https://gerrit.libreoffice.org/12004
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 39d4fe7aea6b32a6c17c325b2b1c282c2975c02c)
    
    Conflicts:
    	download.lst
    
    Change-Id: Id2092489723b3f1f643ee0161cb0d8bcbd04a847
    Reviewed-on: https://gerrit.libreoffice.org/12006
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/download.lst b/download.lst
index 6f26f2e..4a9dc39 100644
--- a/download.lst
+++ b/download.lst
@@ -109,7 +109,8 @@ export ODFGEN_TARBALL := libodfgen-0.1.1.tar.bz2
 export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
 export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
 export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
-export OPENSSL_TARBALL := 8d6d684a9430d5cc98a62a5d8fbda8cf-openssl-1.0.1h.tar.gz
+export OPENSSL_MD5SUM := f7175c9cd3c39bb1907ac8bba9df8ed3
+export OPENSSL_TARBALL := openssl-1.0.1j.tar.gz
 export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
 export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
 export PNG_MD5SUM := 5266905cef49d1224437465ad4d67fd9
commit 285e51b89059e8b8d5f1149ac4f17c79015991f5
Author: Yousuf Philips <philipz85 at hotmail.com>
Date:   Sat Oct 18 12:03:36 2014 +0400

    fdo#75359 - SIFR: Line Spacing 1.5 icon missing (4.3)
    
    Change-Id: Id5064943eb430ad9d3b2014ff4482f9bb36cdac3
    Reviewed-on: https://gerrit.libreoffice.org/12016
    Reviewed-by: Matthew Francis <mjay.francis at gmail.com>
    Tested-by: Matthew Francis <mjay.francis at gmail.com>

diff --git a/icon-themes/sifr/cmd/lc_spacepara15.png b/icon-themes/sifr/cmd/lc_spacepara15.png
new file mode 100644
index 0000000..ba8a88e
Binary files /dev/null and b/icon-themes/sifr/cmd/lc_spacepara15.png differ
diff --git a/icon-themes/sifr/cmd/lc_spacepara2.png b/icon-themes/sifr/cmd/lc_spacepara2.png
index ba8a88e..cf93d33 100644
Binary files a/icon-themes/sifr/cmd/lc_spacepara2.png and b/icon-themes/sifr/cmd/lc_spacepara2.png differ
diff --git a/icon-themes/sifr/cmd/lc_spacepara3.png b/icon-themes/sifr/cmd/lc_spacepara3.png
deleted file mode 100644
index cf93d33..0000000
Binary files a/icon-themes/sifr/cmd/lc_spacepara3.png and /dev/null differ
diff --git a/icon-themes/sifr/cmd/sc_spacepara15.png b/icon-themes/sifr/cmd/sc_spacepara15.png
new file mode 100644
index 0000000..67840dc
Binary files /dev/null and b/icon-themes/sifr/cmd/sc_spacepara15.png differ
diff --git a/icon-themes/sifr/cmd/sc_spacepara2.png b/icon-themes/sifr/cmd/sc_spacepara2.png
index 67840dc..167e511b 100644
Binary files a/icon-themes/sifr/cmd/sc_spacepara2.png and b/icon-themes/sifr/cmd/sc_spacepara2.png differ
diff --git a/icon-themes/sifr/cmd/sc_spacepara3.png b/icon-themes/sifr/cmd/sc_spacepara3.png
deleted file mode 100644
index 167e511b..0000000
Binary files a/icon-themes/sifr/cmd/sc_spacepara3.png and /dev/null differ
commit 7062f7f8a44fb4b67161f1aae1d907444e60b9c3
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Oct 10 13:00:35 2014 +0100

    Adapt sorting unit tests for new default.
    
    Change-Id: I9885e2712753390f0597233c404ab80c0ad2b537
    Reviewed-on: https://gerrit.libreoffice.org/11904
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/Library_scqahelper.mk b/sc/Library_scqahelper.mk
index 351b115..912d5f8 100644
--- a/sc/Library_scqahelper.mk
+++ b/sc/Library_scqahelper.mk
@@ -46,7 +46,7 @@ $(eval $(call gb_Library_use_libraries,scqahelper,\
 	svl \
 	svt \
 	svx \
-        svxcore \
+	svxcore \
 	test \
 	tl \
 	unotest \
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 0ea9f85..596f3fa 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -21,6 +21,7 @@
 #include <svl/stritem.hxx>
 
 #include "helper/qahelper.hxx"
+#include "helper/sorthelper.hxx"
 
 #include "docsh.hxx"
 #include "postit.hxx"
@@ -549,6 +550,13 @@ void ScFiltersTest::testEnhancedProtectionXLSX()
 
 void ScFiltersTest::testSortWithSharedFormulasODS()
 {
+#if 0
+    // This guy is a nightmare - he requires a ton of internal /
+    // private API from sc - that has a huge knock-on effect on
+    // filters-test linking etc. etc. - urgh ... surely we should
+    // test this just in ucalc - review appreciated Eike ...
+    SortRefUpdateSetter aUpdateSet;
+
     ScDocShellRef xDocSh = loadDoc("shared-formula/sort-crash.", ODS, true);
     CPPUNIT_ASSERT(xDocSh.Is());
     ScDocument* pDoc = xDocSh->GetDocument();
@@ -594,6 +602,7 @@ void ScFiltersTest::testSortWithSharedFormulasODS()
     CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(15), pFC->GetSharedLength());
 
     xDocSh->DoClose();
+#endif
 }
 
 ScFiltersTest::ScFiltersTest()
diff --git a/sc/qa/unit/helper/sorthelper.hxx b/sc/qa/unit/helper/sorthelper.hxx
new file mode 100644
index 0000000..e82b8c2
--- /dev/null
+++ b/sc/qa/unit/helper/sorthelper.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SC_QA_SORT_HELPER_QAHELPER_HXX
+#define INCLUDED_SC_QA_SORT_HELPER_QAHELPER_HXX
+
+// Unfortunately requires linkage to sc/ internals so
+// can't live in qahelper itself.
+#include "inputopt.hxx"
+
+/**
+ * Temporarily set the sorting type.
+ */
+class SortTypeSetter {
+    bool mbSortRefUpdate;
+public:
+    SortTypeSetter(bool bSortRefUpdate)
+    {
+        mbSortRefUpdate = changeTo(bSortRefUpdate);
+    }
+    bool changeTo(bool bSortRefUpdate)
+    {
+        ScInputOptions aInputOptions = SC_MOD()->GetInputOptions();
+        bool bRet = aInputOptions.GetSortRefUpdate();
+        aInputOptions.SetSortRefUpdate(bSortRefUpdate);
+        SC_MOD()->SetInputOptions(aInputOptions);
+        return bRet;
+    }
+    virtual ~SortTypeSetter()
+    {
+        changeTo(mbSortRefUpdate);
+    }
+};
+
+class SortRefNoUpdateSetter : private SortTypeSetter
+{
+public:
+    SortRefNoUpdateSetter() : SortTypeSetter(false) {}
+};
+
+class SortRefUpdateSetter : private SortTypeSetter
+{
+public:
+    SortRefUpdateSetter() : SortTypeSetter(true) {}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index f81a394..ce6b9b3 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -8,6 +8,7 @@
  */
 
 #include "ucalc.hxx"
+#include "helper/sorthelper.hxx"
 
 #include <postit.hxx>
 #include <sortparam.hxx>
@@ -18,7 +19,6 @@
 #include <globalnames.hxx>
 #include <dbdocfun.hxx>
 #include <scitems.hxx>
-#include <inputopt.hxx>
 #include <editutil.hxx>
 
 #include <sal/config.h>
@@ -117,6 +117,8 @@ void Test::testSort()
 
 void Test::testSortHorizontal()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     ScFormulaOptions aOptions;
     aOptions.SetFormulaSepArg(";");
     aOptions.SetFormulaSepArrayCol(";");
@@ -361,6 +363,8 @@ void Test::testSortSingleRow()
 // if cells in the sort are referenced by formulas
 void Test::testSortWithFormulaRefs()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     m_pDoc->InsertTab(0, "List1");
     m_pDoc->InsertTab(1, "List2");
 
@@ -460,6 +464,8 @@ void Test::testSortWithStrings()
 
 void Test::testSortInFormulaGroup()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     static struct {
         SCCOL nCol;
         SCROW nRow;
@@ -691,6 +697,8 @@ void Test::testSortWithCellFormats()
 
 void Test::testSortRefUpdate()
 {
+    SortTypeSetter aSortTypeSet(true);
+
     sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
     FormulaGrammarSwitch aFGSwitch(m_pDoc, formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1);
 
@@ -811,8 +819,7 @@ void Test::testSortRefUpdate()
         m_pDoc->SetString(ScAddress(2,1+i,0), "=RC[-2]");
 
     // Turn off reference update on sort.
-    ScInputOptions aInputOption = SC_MOD()->GetInputOptions();
-    aInputOption.SetSortRefUpdate(false);
+    aSortTypeSet.changeTo(false);
 
     bSorted = aFunc.Sort(0, aSortData, true, true, true);
     CPPUNIT_ASSERT(bSorted);
@@ -837,14 +844,13 @@ void Test::testSortRefUpdate()
         CPPUNIT_ASSERT_EQUAL(fCheck, m_pDoc->GetValue(ScAddress(2,i+1,0))); // column C
     }
 
-    // Turn it back on.
-    aInputOption.SetSortRefUpdate(true);
-
     m_pDoc->DeleteTab(0);
 }
 
 void Test::testSortRefUpdate2()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
     FormulaGrammarSwitch aFGSwitch(m_pDoc, formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1);
 
@@ -932,6 +938,8 @@ void Test::testSortRefUpdate2()
 
 void Test::testSortRefUpdate3()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
     m_pDoc->InsertTab(0, "Sort");
 
@@ -1020,6 +1028,8 @@ void Test::testSortRefUpdate3()
 // testRefInterne.ods
 void Test::testSortRefUpdate4()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
     m_pDoc->InsertTab(0, "Sort");
     m_pDoc->InsertTab(1, "Lesson1");
@@ -1217,6 +1227,8 @@ void Test::testSortRefUpdate4()
  * before midnight, ermm.. */
 void Test::testSortRefUpdate5()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
     m_pDoc->InsertTab(0, "Sort");
 
@@ -1388,6 +1400,8 @@ void Test::testSortOutOfPlaceResult()
 
 void Test::testSortPartialFormulaGroup()
 {
+    SortRefUpdateSetter aUpdateSet;
+
     sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
     FormulaGrammarSwitch aFGSwitch(m_pDoc, formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1);
 
commit fbb958af719ae808d0de3aa1bf7406545ac79600
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Oct 9 17:30:42 2014 +0100

    Back-port Kohei's comprehensive sorting unit tests from master.
    
    As of master commit fab88063281761dbdac7ea550072660fe0f8c863.
    
    Change-Id: I45ee0021c727281ba5590ceead6d8c5848e25169
    Reviewed-on: https://gerrit.libreoffice.org/11903
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 9b3c498..2054f19 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_ucalc, \
     sc/qa/unit/ucalc_formula \
     sc/qa/unit/ucalc_pivottable \
     sc/qa/unit/ucalc_sharedformula \
+    sc/qa/unit/ucalc_sort \
 ))
 
 $(eval $(call gb_CppunitTest_use_library_objects,sc_ucalc, \
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8e19f2f..2bb0889 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4724,497 +4724,6 @@ void Test::testFindAreaPosColRight()
     m_pDoc->DeleteTab(0);
 }
 
-// regression test fo fdo#53814, sorting doens't work as expected
-// if cells in the sort are referenced by formulas
-void Test::testSortWithFormulaRefs()
-{
-    m_pDoc->InsertTab(0, "List1");
-    m_pDoc->InsertTab(1, "List2");
-
-    const char* aFormulaData[6] = {
-        "=IF($List1.A2<>\"\";$List1.A2;\"\")",
-        "=IF($List1.A3<>\"\";$List1.A3;\"\")",
-        "=IF($List1.A4<>\"\";$List1.A4;\"\")",
-        "=IF($List1.A5<>\"\";$List1.A5;\"\")",
-        "=IF($List1.A6<>\"\";$List1.A6;\"\")",
-        "=IF($List1.A7<>\"\";$List1.A7;\"\")",
-    };
-
-    const char* aTextData[4] = {
-        "bob",
-        "tim",
-        "brian",
-        "larry",
-    };
-
-    const char* aResults[6] = {
-        "bob",
-        "brian",
-        "larry",
-        "tim",
-        "",
-        "",
-    };
-
-    // Insert data to sort in A2:A5 on the 1st sheet.
-    for (SCROW i = 1; i <= 4; ++i)
-        m_pDoc->SetString( 0, i, 0, OUString::createFromAscii(aTextData[i-1]) );
-
-    // Insert forumulas in A1:A6 on the 2nd sheet.
-    for (size_t i = 0; i < SAL_N_ELEMENTS(aFormulaData); ++i)
-        m_pDoc->SetString( 0, i, 1, OUString::createFromAscii(aFormulaData[i]) );
-
-    // Sort data in A2:A8 on the 1st sheet. No column header.
-    ScSortParam aSortData;
-    aSortData.nCol1 = 0;
-    aSortData.nCol2 = 0;
-    aSortData.nRow1 = 1;
-    aSortData.nRow2 = 7;
-    aSortData.maKeyState[0].bDoSort = true;
-    aSortData.maKeyState[0].nField = 0;
-
-    m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
-
-    for (size_t i = 0; i < SAL_N_ELEMENTS(aResults); ++i)
-    {
-        OUString sResult = m_pDoc->GetString(0, i + 1, 0);
-        CPPUNIT_ASSERT_EQUAL( OUString::createFromAscii( aResults[i] ), sResult );
-    }
-    m_pDoc->DeleteTab(1);
-    m_pDoc->DeleteTab(0);
-}
-
-void Test::testSortWithStrings()
-{
-    m_pDoc->InsertTab(0, "Test");
-
-    ScFieldEditEngine& rEE = m_pDoc->GetEditEngine();
-    rEE.SetText("Val1");
-    m_pDoc->SetString(ScAddress(1,1,0), "Header");
-    m_pDoc->SetString(ScAddress(1,2,0), "Val2");
-    m_pDoc->SetEditText(ScAddress(1,3,0), rEE.CreateTextObject());
-
-    CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,2,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,3,0)));
-
-    ScSortParam aParam;
-    aParam.nCol1 = 1;
-    aParam.nCol2 = 1;
-    aParam.nRow1 = 1;
-    aParam.nRow2 = 3;
-    aParam.bHasHeader = true;
-    aParam.maKeyState[0].bDoSort = true;
-    aParam.maKeyState[0].bAscending = true;
-    aParam.maKeyState[0].nField = 1;
-
-    m_pDoc->Sort(0, aParam, false, true, NULL, NULL);
-
-    CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,2,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,3,0)));
-
-    aParam.maKeyState[0].bAscending = false;
-
-    m_pDoc->Sort(0, aParam, false, true, NULL, NULL);
-
-    CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,2,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,3,0)));
-
-    m_pDoc->DeleteTab(0);
-}
-
-void Test::testSort()
-{
-    m_pDoc->InsertTab(0, "test1");
-
-    ScRange aDataRange;
-    ScAddress aPos(0,0,0);
-    {
-        const char* aData[][2] = {
-            { "2", "4" },
-            { "4", "1" },
-            { "1", "2" },
-            { "1", "23" },
-        };
-
-        clearRange(m_pDoc, ScRange(0, 0, 0, 1, SAL_N_ELEMENTS(aData), 0));
-        aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
-        CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aDataRange.aStart == aPos);
-    }
-
-    // Insert note in cell B2.
-    ScAddress rAddr(1, 1, 0);
-    ScPostIt* pNote = m_pDoc->GetOrCreateNote(rAddr);
-    pNote->SetText(rAddr, "Hello");
-    pNote->SetAuthor("Jim Bob");
-
-    ScSortParam aSortData;
-    aSortData.nCol1 = 1;
-    aSortData.nCol2 = 1;
-    aSortData.nRow1 = 0;
-    aSortData.nRow2 = 2;
-    aSortData.maKeyState[0].bDoSort = true;
-    aSortData.maKeyState[0].nField = 1;
-    aSortData.maKeyState[0].bAscending = true;
-
-    m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
-
-    double nVal = m_pDoc->GetValue(1,0,0);
-    ASSERT_DOUBLES_EQUAL(nVal, 1.0);
-
-    // check that note is also moved after sorting
-    pNote = m_pDoc->GetNote(1, 0, 0);
-    CPPUNIT_ASSERT(pNote);
-
-    clearRange(m_pDoc, ScRange(0, 0, 0, 1, 9, 0)); // Clear A1:B10.
-    {
-        // 0 = empty cell
-        const char* aData[][1] = {
-            { "Title" },
-            { 0 },
-            { 0 },
-            { "12" },
-            { "b" },
-            { "1" },
-            { "9" },
-            { "123" }
-        };
-
-        aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
-        CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aDataRange.aStart == aPos);
-    }
-
-    aSortData.nCol1 = aDataRange.aStart.Col();
-    aSortData.nCol2 = aDataRange.aEnd.Col();
-    aSortData.nRow1 = aDataRange.aStart.Row();
-    aSortData.nRow2 = aDataRange.aEnd.Row();
-    aSortData.bHasHeader = true;
-    aSortData.maKeyState[0].nField = 0;
-    m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
-
-    // Title should stay at the top, numbers should be sorted numerically,
-    // numbers always come before strings, and empty cells always occur at the
-    // end.
-    CPPUNIT_ASSERT_EQUAL(OUString("Title"), m_pDoc->GetString(aPos));
-    aPos.IncRow();
-    CPPUNIT_ASSERT_EQUAL(OUString("1"), m_pDoc->GetString(aPos));
-    aPos.IncRow();
-    CPPUNIT_ASSERT_EQUAL(OUString("9"), m_pDoc->GetString(aPos));
-    aPos.IncRow();
-    CPPUNIT_ASSERT_EQUAL(OUString("12"), m_pDoc->GetString(aPos));
-    aPos.IncRow();
-    CPPUNIT_ASSERT_EQUAL(OUString("123"), m_pDoc->GetString(aPos));
-    aPos.IncRow();
-    CPPUNIT_ASSERT_EQUAL(OUString("b"), m_pDoc->GetString(aPos));
-    aPos.IncRow();
-    CPPUNIT_ASSERT_EQUAL(CELLTYPE_NONE, m_pDoc->GetCellType(aPos));
-
-    m_pDoc->DeleteTab(0);
-}
-
-void Test::testSortHorizontal()
-{
-    ScFormulaOptions aOptions;
-    aOptions.SetFormulaSepArg(";");
-    aOptions.SetFormulaSepArrayCol(";");
-    aOptions.SetFormulaSepArrayRow("|");
-    getDocShell().SetFormulaOptions(aOptions);
-
-    sc::AutoCalcSwitch aACSwitch(*m_pDoc, true);
-    m_pDoc->InsertTab(0, "Sort");
-
-    // Test case from fdo#78079.
-
-    // 0 = empty cell
-    const char* aData[][4] = {
-        { "table", "has UNIQUE", "Publish to EC2", "flag" },
-        { "w2gi.mobilehit", "Yes", "No", "=CONCATENATE(B2;\"-\";C2)" },
-        { "w2gi.visitors", "No", "No", "=CONCATENATE(B3;\"-\";C3)" },
-        { "w2gi.pagedimension", "Yes", "Yes", "=CONCATENATE(B4;\"-\";C4)" },
-    };
-
-    // Insert raw data into A1:D4.
-    ScRange aDataRange = insertRangeData(m_pDoc, ScAddress(0,0,0), aData, SAL_N_ELEMENTS(aData));
-    CPPUNIT_ASSERT_EQUAL(OUString("A1:D4"), aDataRange.Format(SCA_VALID));
-
-    // Check the formula values.
-    CPPUNIT_ASSERT_EQUAL(OUString("Yes-No"), m_pDoc->GetString(ScAddress(3,1,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("No-No"), m_pDoc->GetString(ScAddress(3,2,0)));
-    CPPUNIT_ASSERT_EQUAL(OUString("Yes-Yes"), m_pDoc->GetString(ScAddress(3,3,0)));
-
-    // Define A1:D4 as sheet-local anonymous database range.
-    m_pDoc->SetAnonymousDBData(
-        0, new ScDBData(STR_DB_LOCAL_NONAME, 0, 0, 0, 3, 3));
-
-    // Sort A1:D4 horizontally, ascending by row 1.
-    ScDBDocFunc aFunc(getDocShell());
-
-    ScSortParam aSortData;
-    aSortData.nCol1 = 0;
-    aSortData.nCol2 = 3;
-    aSortData.nRow1 = 0;
-    aSortData.nRow2 = 3;
-    aSortData.bHasHeader = true;
-    aSortData.bByRow = false; // Sort by column (in horizontal direction).
-    aSortData.bIncludePattern = true;
-    aSortData.maKeyState[0].bDoSort = true;
-    aSortData.maKeyState[0].nField = 0;
-    aSortData.maKeyState[0].bAscending = true;
-    bool bSorted = aFunc.Sort(0, aSortData, true, true, true);
-    CPPUNIT_ASSERT(bSorted);
-
-    {
-        // Expected output table content.  0 = empty cell
-        const char* aOutputCheck[][4] = {
-            { "table", "flag", "has UNIQUE", "Publish to EC2" },
-            { "w2gi.mobilehit",     "Yes-No",  "Yes", "No" },
-            { "w2gi.visitors",      "No-No",   "No",  "No" },
-            { "w2gi.pagedimension", "Yes-Yes", "Yes", "Yes" },
-        };
-
-        bool bSuccess = checkOutput<4>(m_pDoc, aDataRange, aOutputCheck, "Sorted by column with formula");
-        CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
-    }
-
-    if (!checkFormula(*m_pDoc, ScAddress(1,1,0), "CONCATENATE(C2;\"-\";D2)"))
-        CPPUNIT_FAIL("Wrong formula!");
-    if (!checkFormula(*m_pDoc, ScAddress(1,2,0), "CONCATENATE(C3;\"-\";D3)"))
-        CPPUNIT_FAIL("Wrong formula!");
-    if (!checkFormula(*m_pDoc, ScAddress(1,3,0), "CONCATENATE(C4;\"-\";D4)"))
-        CPPUNIT_FAIL("Wrong formula!");
-
-    m_pDoc->DeleteTab(0);
-}
-
-void Test::testSortInFormulaGroup()
-{
-    static struct {
-        SCCOL nCol;
-        SCROW nRow;
-        const char *pData;
-    } aEntries[] = {
-        { 0, 0, "3" },   { 1, 0, "=A1" },
-        { 0, 1, "1" },   { 1, 1, "=A2" },
-        { 0, 2, "20" },  { 1, 2, "=A3" },
-        { 0, 3, "10" },  { 1, 3, "=A4+1" }, // swap across groups
-        { 0, 4, "2"  },  { 1, 4, "=A5+1" },
-        { 0, 5, "101" }, { 1, 5, "=A6" }, // swap inside contiguious group
-        { 0, 6, "100" }, { 1, 6, "=A7" },
-        { 0, 7, "102" }, { 1, 7, "=A8" },
-        { 0, 8, "104" }, { 1, 8, "=A9" },
-        { 0, 9, "103" }, { 1, 9, "=A10" },
-    };
-
-    m_pDoc->InsertTab(0, "sorttest");
-
-    for ( SCROW i = 0; i < (SCROW) SAL_N_ELEMENTS( aEntries ); ++i )
-        m_pDoc->SetString( aEntries[i].nCol, aEntries[i].nRow, 0,
-                           OUString::createFromAscii( aEntries[i].pData) );
-
-    ScSortParam aSortData;
-    aSortData.nCol1 = 0;
-    aSortData.nCol2 = 1;
-    aSortData.nRow1 = 0;
-    aSortData.nRow2 = 9;
-    aSortData.maKeyState[0].bDoSort = true;
-    aSortData.maKeyState[0].nField = 0;
-    aSortData.maKeyState[0].bAscending = true;
-
-    m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
-
-    static struct {
-        SCCOL nCol;
-        SCROW nRow;
-        double fValue;
-    } aResults[] = {
-        { 0, 0, 1.0 },   { 1, 0, 1.0 },
-        { 0, 1, 2.0 },   { 1, 1, 3.0 },
-        { 0, 2, 3.0 },   { 1, 2, 3.0 },
-        { 0, 3, 10.0 },  { 1, 3, 11.0 },
-        { 0, 4, 20.0 },  { 1, 4, 20.0 },
-        { 0, 5, 100.0 }, { 1, 5, 100.0 },
-        { 0, 6, 101.0 }, { 1, 6, 101.0 },

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list