update to 4.3.4 rc1

f41
David Tardon 10 years ago
parent 4cbde20e9a
commit 16164b63f3

3
.gitignore vendored

@ -107,3 +107,6 @@
/libreoffice-4.3.3.2.tar.xz
/libreoffice-help-4.3.3.2.tar.xz
/libreoffice-translations-4.3.3.2.tar.xz
/libreoffice-4.3.4.1.tar.xz
/libreoffice-help-4.3.4.1.tar.xz
/libreoffice-translations-4.3.4.1.tar.xz

@ -1,248 +0,0 @@
From 77c6ce66696a997269b9fe4dfed1dc2e51ecd00e Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@collabora.com>
Date: Fri, 10 Oct 2014 13:00:35 +0100
Subject: [PATCH] Adapt sorting unit tests for new default.
Change-Id: I9885e2712753390f0597233c404ab80c0ad2b537
Reviewed-on: https://gerrit.libreoffice.org/11904
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
---
sc/Library_scqahelper.mk | 2 +-
sc/qa/unit/filters-test.cxx | 9 +++++++
sc/qa/unit/helper/sorthelper.hxx | 55 ++++++++++++++++++++++++++++++++++++++++
sc/qa/unit/ucalc_sort.cxx | 26 ++++++++++++++-----
4 files changed, 85 insertions(+), 7 deletions(-)
create mode 100644 sc/qa/unit/helper/sorthelper.hxx
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);
--
1.9.3

@ -1,162 +0,0 @@
From 0bb29affae83d0410f745f46267527e10777fcd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 17 Oct 2014 15:03:34 +0100
Subject: [PATCH] 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@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
---
filter/source/svg/svgexport.cxx | 18 ++++++++++++++++--
filter/source/svg/svgfilter.hxx | 1 +
include/svx/svdmodel.hxx | 2 ++
svx/source/inc/svdoutlinercache.hxx | 7 +++++++
svx/source/svdraw/svdmodel.cxx | 11 +++++++++++
svx/source/svdraw/svdoutlinercache.cxx | 2 ++
6 files changed, 39 insertions(+), 2 deletions(-)
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;
}
}
--
1.9.3

@ -1,334 +0,0 @@
From 5ae6072774ab544fdfdfebf2364e97ca2fa2326a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 3 Nov 2014 09:49:37 +0000
Subject: [PATCH] Resolves: fdo#68347 fix word count with recorded changes
also see fdo#46757
a) We need to ignore redline-deleted text, but count redline-added text
b) each block of text is denoted by its end position in the model
and where that maps to in the view so a hidden portion
should record its end point not its starting point, and a non-hidden
deleted portion should always record its end point
c) when mapping a model position to the view we take the offset of
the model pos arg from the block end and use that to offset the
mapped block-end view pos to get the final view pos. But for
hidden portions that won't make a whole lot of sense, and
end up offsetting into prior portions, so map all positions within a
hidden portion to the same block-end view pos
add regression tests for these cases
(cherry picked from commit fa430e6b4e6f5d096bdf59db26e5d7393ca2297b)
Conflicts:
sw/qa/core/uwriter.cxx
Change-Id: I45c76bba47fd430bc3bccb5f919502660d415d9e
Reviewed-on: https://gerrit.libreoffice.org/12219
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
---
sw/inc/modeltoviewhelper.hxx | 25 +++++++---
sw/qa/core/uwriter.cxx | 34 ++++++++++----
sw/source/core/text/porlay.cxx | 5 +-
sw/source/core/txtnode/modeltoviewhelper.cxx | 70 +++++++++++++++++-----------
sw/source/core/txtnode/txtedt.cxx | 2 +-
5 files changed, 93 insertions(+), 43 deletions(-)
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
index 018b67c..d99c9db 100644
--- a/sw/inc/modeltoviewhelper.hxx
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -65,19 +65,30 @@ class SwTxtNode;
#define EXPANDFIELDS 0x0001
#define EXPANDFOOTNOTE 0x0002
#define HIDEINVISIBLE 0x0004
-#define HIDEREDLINED 0x0008
+#define HIDEDELETIONS 0x0008
/// do not expand to content, but replace with ZWSP
#define REPLACEMODE 0x0010
class ModelToViewHelper
{
- /** For each field in the model string, there is an entry in the conversion
- map. The first value of the ConversionMapEntry points to the field
- position in the model string, the second value points to the associated
- position in the view string. The last entry in the conversion map
- denotes the lengths of the model resp. view string.
+ /** For each expanded/hidden portion in the model string, there is an entry in
+ the conversion map. The first value of the ConversionMapEntry points to
+ the start position in the model string, the second value points to the
+ associated start position in the view string. The last entry in the
+ conversion map denotes the lengths of the model resp. view string.
*/
- typedef std::pair< sal_Int32 , sal_Int32 > ConversionMapEntry;
+ struct ConversionMapEntry
+ {
+ ConversionMapEntry(sal_Int32 nModelPos, sal_Int32 nViewPos, bool bVisible)
+ : m_nModelPos(nModelPos)
+ , m_nViewPos(nViewPos)
+ , m_bVisible(bVisible)
+ {
+ }
+ sal_Int32 m_nModelPos;
+ sal_Int32 m_nViewPos;
+ bool m_bVisible;
+ };
typedef std::vector< ConversionMapEntry > ConversionMap;
typedef std::vector<sal_Int32> Positions;
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index bd6e000..1297c65 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -321,7 +321,7 @@ void SwDocTest::testModelToViewHelper()
}
{
- ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEREDLINED);
+ ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEDELETIONS);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB " + OUString(CH_TXTATR_BREAKWORD) + " CCCCC " + OUString(CH_TXTATR_BREAKWORD) + " DDDDD"),
@@ -349,14 +349,14 @@ void SwDocTest::testModelToViewHelper()
}
{
- ModelToViewHelper aModelToViewHelper(*pTxtNode, EXPANDFIELDS | HIDEREDLINED | EXPANDFOOTNOTE);
+ ModelToViewHelper aModelToViewHelper(*pTxtNode, EXPANDFIELDS | HIDEDELETIONS | EXPANDFOOTNOTE);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB foo CCCCC foo DDDDD"), sViewText);
}
{
ModelToViewHelper aModelToViewHelper(*pTxtNode,
- EXPANDFIELDS | HIDEREDLINED | EXPANDFOOTNOTE | REPLACEMODE);
+ EXPANDFIELDS | HIDEDELETIONS | EXPANDFOOTNOTE | REPLACEMODE);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB " + OUString(CHAR_ZWSP) + " CCCCC " + OUString(CHAR_ZWSP) + " DDDDD"),
@@ -372,7 +372,7 @@ void SwDocTest::testModelToViewHelper()
}
{
- ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE | HIDEREDLINED);
+ ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE | HIDEDELETIONS);
OUString sViewText = aModelToViewHelper.getViewText();
OUStringBuffer aBuffer;
aBuffer.append("AAAACCCCC ");
@@ -382,13 +382,13 @@ void SwDocTest::testModelToViewHelper()
}
{
- ModelToViewHelper aModelToViewHelper(*pTxtNode, EXPANDFIELDS | HIDEINVISIBLE | HIDEREDLINED | EXPANDFOOTNOTE);
+ ModelToViewHelper aModelToViewHelper(*pTxtNode, EXPANDFIELDS | HIDEINVISIBLE | HIDEDELETIONS | EXPANDFOOTNOTE);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAACCCCC foo DDDDD"), sViewText);
}
{
ModelToViewHelper aModelToViewHelper(*pTxtNode,
- EXPANDFIELDS | HIDEINVISIBLE | HIDEREDLINED | EXPANDFOOTNOTE | REPLACEMODE);
+ EXPANDFIELDS | HIDEINVISIBLE | HIDEDELETIONS | EXPANDFOOTNOTE | REPLACEMODE);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(sViewText,
OUString("AAAACCCCC " + OUString(CHAR_ZWSP) + " DDDDD"));
@@ -669,8 +669,26 @@ void SwDocTest::testSwScanner()
aDocStat.Reset();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len()); //word-counting the text should only count the non-deleted text, and this whole chunk should be ignored
- CPPUNIT_ASSERT_EQUAL(aDocStat.nWord, static_cast<sal_uLong>(0));
- CPPUNIT_ASSERT_EQUAL(aDocStat.nChar, static_cast<sal_uLong>(0));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(0), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(0), aDocStat.nChar);
+
+ // https://bugs.libreoffice.org/show_bug.cgi?id=68347 we do want to count
+ // redline *added* text though
+ m_pDoc->SetRedlineMode(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_DELETE|nsRedlineMode_t::REDLINE_SHOW_INSERT);
+ aPaM.DeleteMark();
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 0);
+ m_pDoc->InsertString(aPaM, "redline-new-text ");
+ aDocStat.Reset();
+ pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode->SetWordCountDirty(true);
+ pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nWord);
+ //redline-new-text Lorem ipsum
+ //+++++++++++++++++ ------
+ //select start of original text and part of deleted text
+ aDocStat.Reset();
+ pTxtNode->CountWords(aDocStat, 17, 25);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(5), aDocStat.nChar);
}
//See https://bugs.libreoffice.org/show_bug.cgi?id=38983
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 40e3a58..214bbe5 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2107,9 +2107,12 @@ void SwScriptInfo::selectRedLineDeleted(const SwTxtNode& rNode, MultiSelection &
{
const SwRangeRedline* pRed = rIDRA.GetRedlineTbl()[ nAct ];
- if ( pRed->Start()->nNode > rNode.GetIndex() )
+ if (pRed->Start()->nNode > rNode.GetIndex())
break;
+ if (pRed->GetType() != nsRedlineType_t::REDLINE_DELETE)
+ continue;
+
sal_Int32 nRedlStart;
sal_Int32 nRedlnEnd;
pRed->CalcStartEnd( rNode.GetIndex(), nRedlStart, nRedlnEnd );
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index bd1a3ae..875ea1e 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -94,7 +94,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, sal_uInt16 eMode)
if (eMode & HIDEINVISIBLE)
SwScriptInfo::selectHiddenTextProperty(rNode, aHiddenMulti);
- if (eMode & HIDEREDLINED)
+ if (eMode & HIDEDELETIONS)
SwScriptInfo::selectRedLineDeleted(rNode, aHiddenMulti);
std::vector<block> aBlocks;
@@ -203,43 +203,55 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, sal_uInt16 eMode)
}
}
+ //store the end of each range in the model and where that end of range
+ //maps to in the view
sal_Int32 nOffset = 0;
for (std::vector<block>::iterator i = aBlocks.begin(); i != aBlocks.end(); ++i)
{
+ const sal_Int32 nBlockLen = i->m_nLen;
+ if (!nBlockLen)
+ continue;
+ const sal_Int32 nBlockStart = i->m_nStart;
+ const sal_Int32 nBlockEnd = nBlockStart + nBlockLen;
+
if (!i->m_bVisible)
{
- const sal_Int32 nHiddenStart = i->m_nStart;
- const sal_Int32 nHiddenLen = i->m_nLen;
+ sal_Int32 const modelBlockPos(nBlockEnd);
+ sal_Int32 const viewBlockPos(nBlockStart + nOffset);
+ m_aMap.push_back(ConversionMapEntry(modelBlockPos, viewBlockPos, false));
- m_aRetText = m_aRetText.replaceAt( nOffset + nHiddenStart, nHiddenLen, OUString() );
- m_aMap.push_back( ConversionMapEntry( nHiddenStart, nOffset + nHiddenStart ) );
- nOffset -= nHiddenLen;
+ m_aRetText = m_aRetText.replaceAt(nOffset + nBlockStart, nBlockLen, OUString());
+ nOffset -= nBlockLen;
}
else
{
for (FieldResultSet::iterator j = i->m_aAttrs.begin(); j != i->m_aAttrs.end(); ++j)
{
- sal_Int32 const viewPos(nOffset + j->m_nFieldPos);
- m_aRetText = m_aRetText.replaceAt(viewPos, 1, j->m_sExpand);
- m_aMap.push_back( ConversionMapEntry(j->m_nFieldPos, viewPos) );
+ sal_Int32 const modelFieldPos(j->m_nFieldPos);
+ sal_Int32 const viewFieldPos(j->m_nFieldPos + nOffset);
+ m_aMap.push_back( ConversionMapEntry(modelFieldPos, viewFieldPos, true) );
+
+ m_aRetText = m_aRetText.replaceAt(viewFieldPos, 1, j->m_sExpand);
+ nOffset += j->m_sExpand.getLength() - 1;
+
switch (j->m_eType)
{
case FieldResult::FIELD:
- m_FieldPositions.push_back(viewPos);
+ m_FieldPositions.push_back(viewFieldPos);
break;
case FieldResult::FOOTNOTE:
- m_FootnotePositions.push_back(viewPos);
+ m_FootnotePositions.push_back(viewFieldPos);
break;
case FieldResult::NONE: /*ignore*/
break;
}
- nOffset += j->m_sExpand.getLength() - 1;
}
+
+ sal_Int32 const modelEndBlock(nBlockEnd);
+ sal_Int32 const viewFieldPos(nBlockEnd + nOffset);
+ m_aMap.push_back(ConversionMapEntry(modelEndBlock, viewFieldPos, true));
}
}
-
- if ( !m_aMap.empty() )
- m_aMap.push_back( ConversionMapEntry( rNodeText.getLength()+1, m_aRetText.getLength()+1 ) );
}
/** Converts a model position into a view position
@@ -248,15 +260,21 @@ sal_Int32 ModelToViewHelper::ConvertToViewPosition( sal_Int32 nModelPos ) const
{
// Search for entry after nPos:
ConversionMap::const_iterator aIter;
+
for ( aIter = m_aMap.begin(); aIter != m_aMap.end(); ++aIter )
{
- if ( (*aIter).first >= nModelPos )
+ if (aIter->m_nModelPos >= nModelPos)
{
- const sal_Int32 nPosModel = (*aIter).first;
- const sal_Int32 nPosExpand = (*aIter).second;
-
- const sal_Int32 nDistToNextModel = nPosModel - nModelPos;
- return nPosExpand - nDistToNextModel;
+ //if it's an invisible portion, map all contained positions
+ //to the anchor viewpos
+ if (!aIter->m_bVisible)
+ return aIter->m_nViewPos;
+
+ //if it's a visible portion, then the view position is the anchor
+ //viewpos - the offset of the input modelpos from the anchor
+ //modelpos
+ const sal_Int32 nOffsetFromEnd = aIter->m_nModelPos - nModelPos;
+ return aIter->m_nViewPos - nOffsetFromEnd;
}
}
@@ -274,10 +292,10 @@ ModelToViewHelper::ModelPosition ModelToViewHelper::ConvertToModelPosition( sal_
ConversionMap::const_iterator aIter;
for ( aIter = m_aMap.begin(); aIter != m_aMap.end(); ++aIter )
{
- if ( (*aIter).second > nViewPos )
+ if (aIter->m_nViewPos > nViewPos)
{
- const sal_Int32 nPosModel = (*aIter).first;
- const sal_Int32 nPosExpand = (*aIter).second;
+ const sal_Int32 nPosModel = aIter->m_nModelPos;
+ const sal_Int32 nPosExpand = aIter->m_nViewPos;
// If nViewPos is in front of first field, we are finished.
if ( aIter == m_aMap.begin() )
@@ -286,8 +304,8 @@ ModelToViewHelper::ModelPosition ModelToViewHelper::ConvertToModelPosition( sal_
--aIter;
// nPrevPosModel is the field position
- const sal_Int32 nPrevPosModel = (*aIter).first;
- const sal_Int32 nPrevPosExpand = (*aIter).second;
+ const sal_Int32 nPrevPosModel = aIter->m_nModelPos;
+ const sal_Int32 nPrevPosExpand = aIter->m_nViewPos;
const sal_Int32 nLengthModel = nPosModel - nPrevPosModel;
const sal_Int32 nLengthExpand = nPosExpand - nPrevPosExpand;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index aa6f7d6..f9f19e2 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1986,7 +1986,7 @@ bool SwTxtNode::CountWords( SwDocStat& rStat,
}
// ConversionMap to expand fields, remove invisible and redline deleted text for scanner
- const ModelToViewHelper aConversionMap(*this, EXPANDFIELDS | EXPANDFOOTNOTE | HIDEINVISIBLE | HIDEREDLINED);
+ const ModelToViewHelper aConversionMap(*this, EXPANDFIELDS | EXPANDFOOTNOTE | HIDEINVISIBLE | HIDEDELETIONS);
OUString aExpandText = aConversionMap.getViewText();
if (aExpandText.isEmpty() && !bCountNumbering)
--
1.9.3

@ -1,58 +0,0 @@
From 6b379995697f8ac25f8f3871c9c91e8dc009afa8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 24 Oct 2014 15:10:15 +0100
Subject: [PATCH] Resolves: fdo#84729 buffer cache grows to over 9000 unused
entries
regression from
commit a5351434fbea1126961f5dbaa986e7c9e686c24e
Author: tsahi glik <tsahi.glik@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@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 5 +++++
1 file changed, 5 insertions(+)
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();
}
--
1.9.3

@ -1,168 +0,0 @@
From fb2ed3e17623476c1b772826f0ed4468350baf59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 20 Oct 2014 14:22:40 +0100
Subject: [PATCH] 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@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
chart2/uiconfig/ui/tp_DataSource.ui | 62 +++++++++++++++++++++----------------
1 file changed, 35 insertions(+), 27 deletions(-)
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>
--
1.9.3

@ -1,53 +0,0 @@
From 1aa560ce6516556703e2ece183354f606b602897 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 29 Oct 2014 17:12:40 +0000
Subject: [PATCH] Resolves: rhbz#1146169 a11y frames label dies before frame
Change-Id: I2bc45dcb92b8e68bf4ae4df72c0fbd4e3b535604
---
include/vcl/layout.hxx | 1 +
vcl/source/window/layout.cxx | 13 ++++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index d758d63..8bad8e7 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -458,6 +458,7 @@ private:
private:
friend class VclBuilder;
void designate_label(Window *pWindow);
+ DECL_LINK(WindowEventListener, VclSimpleEvent*);
public:
VclFrame(Window *pParent)
: VclBin(pParent)
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 06f387b..6db0f15 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1338,10 +1338,21 @@ void VclFrame::setAllocation(const Size &rAllocation)
setLayoutAllocation(*pChild, aChildPos, aAllocation);
}
+IMPL_LINK(VclFrame, WindowEventListener, VclSimpleEvent*, pEvent)
+{
+ if (pEvent && pEvent->GetId() == VCLEVENT_OBJECT_DYING)
+ designate_label(NULL);
+ return 0;
+}
+
void VclFrame::designate_label(Window *pWindow)
{
- assert(pWindow->GetParent() == this);
+ assert(!pWindow || pWindow->GetParent() == this);
+ if (m_pLabel)
+ m_pLabel->RemoveEventListener(LINK(this, VclFrame, WindowEventListener));
m_pLabel = pWindow;
+ if (m_pLabel)
+ m_pLabel->AddEventListener(LINK(this, VclFrame, WindowEventListener));
}
const Window *VclFrame::get_label_widget() const
--
1.9.3

@ -1,240 +0,0 @@
From cff2323e10161d3cbbdba088e8ec74aee3839c62 Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Thu, 30 Oct 2014 15:12:33 +0100
Subject: [PATCH] fdo#79602: sw: add new compatibiltiy flag
PropLineSpacingShrinksFirstLine
This is enabled by default, to get the new formatting where the first
line of a paragraph is shrunk if a proportional line spacing < 100% is
applied; existing OOo documents get the previous (before LO 3.3)
formatting. Since the formatting in LO releases is broken anyway, it
does not matter much which way documents written by old LO get
formatted.
(cherry picked from commit 9605763e3dc8c85137787c77c31e8639553a35ed)
Conflicts:
sw/source/filter/ww8/ww8par.cxx
Change-Id: I0952f568a933c137bd03070759989cac3517d8b9
Reviewed-on: https://gerrit.libreoffice.org/12157
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
sw/inc/IDocumentSettingAccess.hxx | 3 ++-
sw/source/core/doc/DocumentSettingManager.cxx | 6 ++++++
sw/source/core/inc/DocumentSettingManager.hxx | 1 +
sw/source/core/text/itrform2.cxx | 3 ++-
sw/source/core/uibase/uno/SwXDocumentSettings.cxx | 21 ++++++++++++++++++++-
sw/source/filter/ww8/ww8par.cxx | 1 +
sw/source/filter/xml/xmlimp.cxx | 10 ++++++++++
writerfilter/source/filter/ImportFilter.cxx | 1 +
8 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 4e94a1e..a67d469 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -79,6 +79,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
TAB_OVER_MARGIN,
// MS Word still wraps text around objects with less space than LO would.
SURROUND_TEXT_WRAP_SMALL,
+ PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
// COMPATIBILITY FLAGS END
BROWSE_MODE,
@@ -93,7 +94,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
FLOATTABLE_NOMARGINS,
EMBED_FONTS,
EMBED_SYSTEM_FONTS,
- APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
+ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
};
public:
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index 68ff997..184b242 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -75,6 +75,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
mbBackgroundParaOverDrawings(false),
mbTabOverMargin(false),
mbSurroundTextWrapSmall(false),
+ mbPropLineSpacingShrinksFirstLine(true),
mApplyParagraphMarkFormatToNumbering(false),
mbLastBrowseMode( false )
@@ -149,6 +150,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const
case BACKGROUND_PARA_OVER_DRAWINGS: return mbBackgroundParaOverDrawings;
case TAB_OVER_MARGIN: return mbTabOverMargin;
case SURROUND_TEXT_WRAP_SMALL: return mbSurroundTextWrapSmall;
+ case PROP_LINE_SPACING_SHRINKS_FIRST_LINE: return mbPropLineSpacingShrinksFirstLine;
case BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the SwViewShell has to be asked!
case HTML_MODE: return mbHTMLMode;
@@ -311,6 +313,10 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo
mbSurroundTextWrapSmall = value;
break;
+ case PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
+ mbPropLineSpacingShrinksFirstLine = value;
+ break;
+
// COMPATIBILITY FLAGS END
case BROWSE_MODE: //can be used temporary (load/save) when no SwViewShell is available
diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx
index 2e8ab4b..3226278 100644
--- a/sw/source/core/inc/DocumentSettingManager.hxx
+++ b/sw/source/core/inc/DocumentSettingManager.hxx
@@ -85,6 +85,7 @@ class DocumentSettingManager :
bool mbBackgroundParaOverDrawings;
bool mbTabOverMargin;
bool mbSurroundTextWrapSmall;
+ bool mbPropLineSpacingShrinksFirstLine; // fdo#79602
bool mApplyParagraphMarkFormatToNumbering;
bool mbLastBrowseMode : 1;
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 4880013..9dfa8ad 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1743,7 +1743,8 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
case SVX_LINE_SPACE_AUTO:
// shrink first line of paragraph too on spacing < 100%
if (IsParaLine() &&
- pSpace->GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP)
+ pSpace->GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP
+ && GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::PROP_LINE_SPACING_SHRINKS_FIRST_LINE))
{
long nTmp = pSpace->GetPropLineSpace();
// Word will render < 50% too but it's just not readable
diff --git a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
index 6ab7e54..fb64d02 100644
--- a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
@@ -123,7 +123,8 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_EMBED_SYSTEM_FONTS,
HANDLE_TAB_OVER_MARGIN,
HANDLE_SURROUND_TEXT_WRAP_SMALL,
- HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
+ HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
+ HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
};
static MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -195,6 +196,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
{ OUString("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, cppu::UnoType<bool>::get(), 0, 0},
{ OUString("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, cppu::UnoType<bool>::get(), 0, 0},
{ OUString("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, cppu::UnoType<bool>::get(), 0, 0},
+ { OUString("PropLineSpacingShrinksFirstLine"), HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE, cppu::UnoType<bool>::get(), 0, 0},
/*
* As OS said, we don't have a view when we need to set this, so I have to
* find another solution before adding them to this property set - MTG
@@ -802,6 +804,16 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
mpDoc->set(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, bTmp);
}
break;
+ case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
+ {
+ bool bTmp;
+ if (rValue >>= bTmp)
+ {
+ mpDoc->set(
+ IDocumentSettingAccess::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, bTmp);
+ }
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -1230,6 +1242,13 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue.setValue( &bTmp, ::getBooleanCppuType() );
}
break;
+ case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
+ {
+ sal_Bool const bTmp(mpDoc->get(
+ IDocumentSettingAccess::PROP_LINE_SPACING_SHRINKS_FIRST_LINE));
+ rValue <<= bTmp;
+ }
+ break;
default:
throw UnknownPropertyException();
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0bf4265..cb2a23f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1927,6 +1927,7 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::CLIPPED_PICTURES, true);
rDoc.set(IDocumentSettingAccess::TAB_OVER_MARGIN, true);
rDoc.set(IDocumentSettingAccess::SURROUND_TEXT_WRAP_SMALL, true);
+ rDoc.set(IDocumentSettingAccess::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, true);
// COMPATIBILITY FLAGS END
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 3af249c..b04cfbd 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1055,6 +1055,9 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
GetTextImport()->SetShowChanges( bShowRedlineChanges );
}
+// Note: this will be called only if there are OOo elements in settings.xml.
+// So if a setting is missing there we can assume that it was written
+// by an OOo/LO version that is older than the introduction of the setting!
void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aConfigProps)
{
// this method will modify the document directly -> lock SolarMutex
@@ -1104,6 +1107,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
aSet.insert("ClippedPictures");
aSet.insert("BackgroundParaOverDrawings");
aSet.insert("TabOverMargin");
+ aSet.insert("PropLineSpacingShrinksFirstLine");
sal_Int32 nCount = aConfigProps.getLength();
const PropertyValue* pValues = aConfigProps.getConstArray();
@@ -1138,6 +1142,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bool bClippedPictures = false;
bool bBackgroundParaOverDrawings = false;
bool bTabOverMargin = false;
+ bool bPropLineSpacingShrinksFirstLine = false;
const PropertyValue* currentDatabaseDataSource = NULL;
const PropertyValue* currentDatabaseCommand = NULL;
@@ -1225,6 +1230,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bBackgroundParaOverDrawings = true;
else if ( pValues->Name == "TabOverMargin" )
bTabOverMargin = true;
+ else if ( pValues->Name == "PropLineSpacingShrinksFirstLine" )
+ bPropLineSpacingShrinksFirstLine = true;
}
catch( Exception& )
{
@@ -1400,6 +1407,9 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if ( !bTabOverMargin )
xProps->setPropertyValue("TabOverMargin", makeAny( false ) );
+ if (!bPropLineSpacingShrinksFirstLine)
+ xProps->setPropertyValue("PropLineSpacingShrinksFirstLine", makeAny(false));
+
SwDoc *pDoc = getDoc();
SfxPrinter *pPrinter = pDoc->getPrinter( false );
if( pPrinter )
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index 277f2da..51a6d55 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -225,6 +225,7 @@ void WriterFilter::setTargetDocument( const uno::Reference< lang::XComponent >&
xSettings->setPropertyValue( "ClippedPictures", uno::makeAny( sal_True ) );
xSettings->setPropertyValue( "BackgroundParaOverDrawings", uno::makeAny( sal_True ) );
xSettings->setPropertyValue( "TabOverMargin", uno::makeAny( sal_True ) );
+ xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(sal_True));
}
void WriterFilter::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc )
--
1.9.3

@ -1,81 +0,0 @@
From 7ca9c060155b79a037861a972843a70b8a518c4f Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Wed, 29 Oct 2014 23:50:21 +0100
Subject: [PATCH] fdo#79602: sw: fix text formatting of proportional line space
< 100%
SwTxtFormatter::CalcRealHeight(): Apply the special treatment of < 100%
line space shrinking the Height() of the line only to the first line
in a paragraph; the subsequent ones are shrunk again (to the square of
the desired proportion) 30 lines later.
Also set the Ascent of the line, as the wrong base-line causes the lower
part of the line to be clipped.
(regression from 42532d42bfcdb12df86376cda009e8e315a82153)
(cherry picked from commit 4e223fab04279c3583689e69fa1342966e81de36)
Conflicts:
sw/source/core/text/itrform2.cxx
Change-Id: I0424396263293deaa318c80eedc2237cdb01b22b
Reviewed-on: https://gerrit.libreoffice.org/12156
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
sw/source/core/text/itrform2.cxx | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 2738b9b..4880013 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1741,24 +1741,30 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
switch( pSpace->GetLineSpaceRule() )
{
case SVX_LINE_SPACE_AUTO:
- if (pSpace->GetInterLineSpaceRule()==SVX_INTER_LINE_SPACE_PROP) {
+ // shrink first line of paragraph too on spacing < 100%
+ if (IsParaLine() &&
+ pSpace->GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP)
+ {
long nTmp = pSpace->GetPropLineSpace();
+ // Word will render < 50% too but it's just not readable
+ if( nTmp < 50 )
+ nTmp = nTmp ? 50 : 100;
if (nTmp<100) { // code adaped from fixed line height
nTmp *= nLineHeight;
nTmp /= 100;
if( !nTmp )
++nTmp;
nLineHeight = (KSHORT)nTmp;
- /*
- //@TODO figure out how WW maps ascent and descent
- //in case of prop line spacing <100%
KSHORT nAsc = ( 4 * nLineHeight ) / 5; // 80%
+#if 0
+ // could do clipping here (like Word does)
+ // but at 0.5 its unreadable either way...
if( nAsc < pCurr->GetAscent() ||
nLineHeight - nAsc < pCurr->Height() -
pCurr->GetAscent() )
pCurr->SetClipping( true );
+#endif
pCurr->SetAscent( nAsc );
- */
pCurr->Height( nLineHeight );
pInf->GetParaPortion()->SetFixLineHeight();
}
@@ -1784,6 +1790,8 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
break;
default: OSL_FAIL( ": unknown LineSpaceRule" );
}
+ // Note: for the _first_ line the line spacing of the previous
+ // paragraph is applied in SwFlowFrm::CalcUpperSpace()
if( !IsParaLine() )
switch( pSpace->GetInterLineSpaceRule() )
{
--
1.9.3

@ -1,40 +0,0 @@
From b35c51d15189835bd388411f9ab4baefacd7b460 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Fri, 17 Oct 2014 21:48:31 -0400
Subject: [PATCH] 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@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
---
sc/source/core/data/table2.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
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))
{
--
1.9.3

@ -1,80 +0,0 @@
From eb5f25984307cd9e63e9cc88cbdb09228d66b097 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Sat, 11 Oct 2014 14:18:10 -0400
Subject: [PATCH] fdo#80846: Broadcast changes before EndUndo().
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
EndUndo() calls PostDataChanged(), which renders the recalculated formula
cells. Not broadcasting before EndUndo causes some dependent formula
cells to not get recalculated.
This one unfortunately is not currently unit-testable as this behavior
depends on the presence of ScTabViewShell....
Change-Id: I86288608b7f2627cda7c74be27a18029832775ef
(cherry picked from commit 424bfaa773e58d6b609ac7f64907db4b542d1315)
Reviewed-on: https://gerrit.libreoffice.org/11927
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
sc/source/ui/undo/undoblk3.cxx | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 03edabf..6784134 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -170,12 +170,20 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
SetChangeTrack();
}
+ if (nFlags & IDF_CONTENTS)
+ {
+ // Broadcast only when the content changes. fdo#74687
+ if (mpDataSpans)
+ BroadcastChanges(*mpDataSpans);
+ else
+ BroadcastChanges(aRange);
+ }
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
- pDocShell->PostDataChanged();
if (pViewShell)
pViewShell->CellContentChanged();
@@ -188,15 +196,6 @@ void ScUndoDeleteContents::Undo()
DoChange( true );
EndUndo();
- if (nFlags & IDF_CONTENTS)
- {
- // Broadcast only when the content changes. fdo#74687
- if (mpDataSpans)
- BroadcastChanges(*mpDataSpans);
- else
- BroadcastChanges(aRange);
- }
-
HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
}
@@ -206,10 +205,6 @@ void ScUndoDeleteContents::Redo()
DoChange( false );
EndRedo();
- if (nFlags & IDF_CONTENTS)
- // Broadcast only when the content changes. fdo#74687
- BroadcastChanges(aRange);
-
HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
}
--
1.9.3

@ -1,593 +0,0 @@
From 2554bd33ebc74644b906ff7c0253ddf82a9789e2 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Thu, 9 Oct 2014 16:21:59 +0100
Subject: [PATCH] fdo#81633: Add a hidden configuration option to toggle ref
update on sort.
This option is defaulted to off for 4.3 for back-compatibility.
Change-Id: I5ac686e96742df40f7d8ba5ffec23806db2988a6
Reviewed-on: https://gerrit.libreoffice.org/11902
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
---
.../registry/schema/org/openoffice/Office/Calc.xcs | 10 ++
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/ucalc.cxx | 12 +--
sc/source/core/data/documen3.cxx | 5 +-
sc/source/core/data/table3.cxx | 115 ++++++++++++---------
sc/source/core/tool/inputopt.cxx | 34 +++---
sc/source/ui/app/scmod.cxx | 9 +-
sc/source/ui/docshell/dbdocfun.cxx | 5 +-
sc/source/ui/undo/undosort.cxx | 2 +
13 files changed, 136 insertions(+), 74 deletions(-)
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index d2b9692..9878f53 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -678,6 +678,16 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="UpdateReferenceOnSort" oor:type="xs:boolean" oor:nillable="false">
+ <!-- OldPath: Calc/Input -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options -Spreadsheets - Input - [Section] Input -->
+ <info>
+ <desc>Specifies whether references get updated when performing sort on a range of cells.</desc>
+ <label>Update references when sorting range of cells</label>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="HighlightSelection" oor:type="xs:boolean" oor:nillable="false">
<!-- OldPath: Calc/Input -->
<!-- OldLocation: Soffice.cfg -->
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index c8ca888..1052e6c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1678,7 +1678,10 @@ public:
SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
SC_DLLPUBLIC SvNumberFormatter* CreateFormatTable() const;
- void Sort( SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* pProgress, sc::ReorderParam* pUndo );
+ void Sort(
+ SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery, bool bUpdateRefs,
+ ScProgress* pProgress, sc::ReorderParam* pUndo );
+
void Reorder( const sc::ReorderParam& rParam, ScProgress* pProgress );
SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx
index bc25992..37bfbc4 100644
--- a/sc/inc/inputopt.hxx
+++ b/sc/inc/inputopt.hxx
@@ -31,6 +31,7 @@ private:
bool bExtendFormat;
bool bRangeFinder;
bool bExpandRefs;
+ bool mbSortRefUpdate;
bool bMarkHeader;
bool bUseTabCol;
bool bTextWysiwyg;
@@ -56,6 +57,8 @@ public:
bool GetRangeFinder() const { return bRangeFinder; }
void SetExpandRefs(bool bSet) { bExpandRefs = bSet; }
bool GetExpandRefs() const { return bExpandRefs; }
+ void SetSortRefUpdate(bool bSet) { mbSortRefUpdate = bSet; }
+ bool GetSortRefUpdate() const { return mbSortRefUpdate; }
void SetMarkHeader(bool bSet) { bMarkHeader = bSet; }
bool GetMarkHeader() const { return bMarkHeader; }
void SetUseTabCol(bool bSet) { bUseTabCol = bSet; }
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 5204efb..a191f7b 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -86,6 +86,7 @@
// TabPage entry - Legacy selection
#define SID_SC_INPUT_LEGACY_CELL_SELECTION (SC_VIEW_START + 15)
+#define SID_SC_OPT_SORT_REF_UPDATE (SC_VIEW_START + 16)
// Format options
#define SID_SCFORMULAOPTIONS (SC_VIEW_START + 20)
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx
index e61528b..6f6364a 100644
--- a/sc/inc/sortparam.hxx
+++ b/sc/inc/sortparam.hxx
@@ -97,6 +97,7 @@ struct SC_DLLPUBLIC ReorderParam
bool mbByRow;
bool mbPattern;
bool mbHiddenFiltered;
+ bool mbUpdateRefs;
/**
* Reorder the position indices such that it can be used to undo the
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 537846d..fe36dac 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -826,7 +826,9 @@ public:
void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
void Sort(
- const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* pProgress, sc::ReorderParam* pUndo );
+ const ScSortParam& rSortParam, bool bKeepQuery, bool bUpdateRefs,
+ ScProgress* pProgress, sc::ReorderParam* pUndo );
+
void Reorder( const sc::ReorderParam& rParam, ScProgress* pProgress );
bool ValidQuery(
@@ -1023,7 +1025,9 @@ private:
short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const;
short Compare( ScSortInfoArray*, SCCOLROW nIndex1, SCCOLROW nIndex2) const;
ScSortInfoArray* CreateSortInfoArray( const sc::ReorderParam& rParam );
- ScSortInfoArray* CreateSortInfoArray( const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2, bool bKeepQuery );
+ ScSortInfoArray* CreateSortInfoArray(
+ const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2,
+ bool bKeepQuery, bool bUpdateRefs );
void QuickSort( ScSortInfoArray*, SCsCOLROW nLo, SCsCOLROW nHi);
void SortReorderByColumn( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress );
void SortReorderByRow( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2, ScProgress* pProgress );
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8f22cf4..8e19f2f 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4773,7 +4773,7 @@ void Test::testSortWithFormulaRefs()
aSortData.maKeyState[0].bDoSort = true;
aSortData.maKeyState[0].nField = 0;
- m_pDoc->Sort(0, aSortData, false, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
for (size_t i = 0; i < SAL_N_ELEMENTS(aResults); ++i)
{
@@ -4808,7 +4808,7 @@ void Test::testSortWithStrings()
aParam.maKeyState[0].bAscending = true;
aParam.maKeyState[0].nField = 1;
- m_pDoc->Sort(0, aParam, false, NULL, NULL);
+ 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)));
@@ -4816,7 +4816,7 @@ void Test::testSortWithStrings()
aParam.maKeyState[0].bAscending = false;
- m_pDoc->Sort(0, aParam, false, NULL, NULL);
+ 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)));
@@ -4859,7 +4859,7 @@ void Test::testSort()
aSortData.maKeyState[0].nField = 1;
aSortData.maKeyState[0].bAscending = true;
- m_pDoc->Sort(0, aSortData, false, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
double nVal = m_pDoc->GetValue(1,0,0);
ASSERT_DOUBLES_EQUAL(nVal, 1.0);
@@ -4892,7 +4892,7 @@ void Test::testSort()
aSortData.nRow2 = aDataRange.aEnd.Row();
aSortData.bHasHeader = true;
aSortData.maKeyState[0].nField = 0;
- m_pDoc->Sort(0, aSortData, false, NULL, NULL);
+ 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
@@ -5022,7 +5022,7 @@ void Test::testSortInFormulaGroup()
aSortData.maKeyState[0].nField = 0;
aSortData.maKeyState[0].bAscending = true;
- m_pDoc->Sort(0, aSortData, false, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
static struct {
SCCOL nCol;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 73cb7ad..ef39f33 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1366,13 +1366,14 @@ bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, b
}
void ScDocument::Sort(
- SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* pProgress, sc::ReorderParam* pUndo )
+ SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery, bool bUpdateRefs,
+ ScProgress* pProgress, sc::ReorderParam* pUndo )
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
{
bool bOldEnableIdle = IsIdleEnabled();
EnableIdle(false);
- maTabs[nTab]->Sort(rSortParam, bKeepQuery, pProgress, pUndo);
+ maTabs[nTab]->Sort(rSortParam, bKeepQuery, bUpdateRefs, pProgress, pUndo);
EnableIdle(bOldEnableIdle);
}
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index c5bfe75..ce17bb9 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -262,6 +262,7 @@ private:
std::vector<SCCOLROW> maOrderIndices;
bool mbKeepQuery;
+ bool mbUpdateRefs;
public:
ScSortInfoArray( sal_uInt16 nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
@@ -309,6 +310,10 @@ public:
bool IsKeepQuery() const { return mbKeepQuery; }
+ void SetUpdateRefs( bool b ) { mbUpdateRefs = b; }
+
+ bool IsUpdateRefs() const { return mbUpdateRefs; }
+
/**
* Call this only during normal sorting, not from reordering.
*/
@@ -472,6 +477,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( const sc::ReorderParam& rParam )
pArray = new ScSortInfoArray(0, nRow1, nRow2);
pArray->SetKeepQuery(rParam.mbHiddenFiltered);
+ pArray->SetUpdateRefs(rParam.mbUpdateRefs);
initDataRows(
*pArray, *this, aCol, nCol1, nRow1, nCol2, nRow2,
@@ -484,19 +490,22 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( const sc::ReorderParam& rParam )
pArray = new ScSortInfoArray(0, nCol1, nCol2);
pArray->SetKeepQuery(rParam.mbHiddenFiltered);
+ pArray->SetUpdateRefs(rParam.mbUpdateRefs);
}
return pArray;
}
ScSortInfoArray* ScTable::CreateSortInfoArray(
- const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2, bool bKeepQuery )
+ const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2,
+ bool bKeepQuery, bool bUpdateRefs )
{
sal_uInt16 nUsedSorts = 1;
while ( nUsedSorts < rSortParam.GetSortKeyCount() && rSortParam.maKeyState[nUsedSorts].bDoSort )
nUsedSorts++;
ScSortInfoArray* pArray = new ScSortInfoArray( nUsedSorts, nInd1, nInd2 );
pArray->SetKeepQuery(bKeepQuery);
+ pArray->SetUpdateRefs(bUpdateRefs);
if ( rSortParam.bByRow )
{
@@ -738,16 +747,19 @@ void ScTable::SortReorderByColumn(
}
}
- for (SCCOL nCol = nStart; nCol <= nLast; ++nCol)
- aCol[nCol].CollectListeners(aListeners, nRow1, nRow2);
+ if (pArray->IsUpdateRefs())
+ {
+ for (SCCOL nCol = nStart; nCol <= nLast; ++nCol)
+ aCol[nCol].CollectListeners(aListeners, nRow1, nRow2);
- // Remove any duplicate listener entries and notify all listeners
- // afterward. We must ensure that we notify each unique listener only
- // once.
- std::sort(aListeners.begin(), aListeners.end());
- aListeners.erase(std::unique(aListeners.begin(), aListeners.end()), aListeners.end());
- ColReorderNotifier aFunc(aColMap, nTab, nRow1, nRow2);
- std::for_each(aListeners.begin(), aListeners.end(), aFunc);
+ // Remove any duplicate listener entries and notify all listeners
+ // afterward. We must ensure that we notify each unique listener only
+ // once.
+ std::sort(aListeners.begin(), aListeners.end());
+ aListeners.erase(std::unique(aListeners.begin(), aListeners.end()), aListeners.end());
+ ColReorderNotifier aFunc(aColMap, nTab, nRow1, nRow2);
+ std::for_each(aListeners.begin(), aListeners.end(), aFunc);
+ }
// Re-start area listeners on the reordered columns.
{
@@ -1002,39 +1014,51 @@ void ScTable::SortReorderByRow(
}
}
- // Collect listeners of cell broadcasters.
- for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
- aCol[nCol].CollectListeners(aListeners, nRow1, nRow2);
+ if (pArray->IsUpdateRefs())
+ {
+ // Collect listeners of cell broadcasters.
+ for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
+ aCol[nCol].CollectListeners(aListeners, nRow1, nRow2);
- // Remove any duplicate listener entries. We must ensure that we notify
- // each unique listener only once.
- std::sort(aListeners.begin(), aListeners.end());
- aListeners.erase(std::unique(aListeners.begin(), aListeners.end()), aListeners.end());
+ // Remove any duplicate listener entries. We must ensure that we notify
+ // each unique listener only once.
+ std::sort(aListeners.begin(), aListeners.end());
+ aListeners.erase(std::unique(aListeners.begin(), aListeners.end()), aListeners.end());
- // Collect positions of all shared formula cells outside the sorted range,
- // and make them unshared before notifying them.
- sc::RefQueryFormulaGroup aFormulaGroupPos;
- aFormulaGroupPos.setSkipRange(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab));
+ // Collect positions of all shared formula cells outside the sorted range,
+ // and make them unshared before notifying them.
+ sc::RefQueryFormulaGroup aFormulaGroupPos;
+ aFormulaGroupPos.setSkipRange(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab));
- std::for_each(aListeners.begin(), aListeners.end(), FormulaGroupPosCollector(aFormulaGroupPos));
- const sc::RefQueryFormulaGroup::TabsType& rGroupTabs = aFormulaGroupPos.getAllPositions();
- sc::RefQueryFormulaGroup::TabsType::const_iterator itGroupTab = rGroupTabs.begin(), itGroupTabEnd = rGroupTabs.end();
- for (; itGroupTab != itGroupTabEnd; ++itGroupTab)
- {
- const sc::RefQueryFormulaGroup::ColsType& rCols = itGroupTab->second;
- sc::RefQueryFormulaGroup::ColsType::const_iterator itCol = rCols.begin(), itColEnd = rCols.end();
- for (; itCol != itColEnd; ++itCol)
+ std::for_each(aListeners.begin(), aListeners.end(), FormulaGroupPosCollector(aFormulaGroupPos));
+ const sc::RefQueryFormulaGroup::TabsType& rGroupTabs = aFormulaGroupPos.getAllPositions();
+ sc::RefQueryFormulaGroup::TabsType::const_iterator itGroupTab = rGroupTabs.begin(), itGroupTabEnd = rGroupTabs.end();
+ for (; itGroupTab != itGroupTabEnd; ++itGroupTab)
+ {
+ const sc::RefQueryFormulaGroup::ColsType& rCols = itGroupTab->second;
+ sc::RefQueryFormulaGroup::ColsType::const_iterator itCol = rCols.begin(), itColEnd = rCols.end();
+ for (; itCol != itColEnd; ++itCol)
+ {
+ const sc::RefQueryFormulaGroup::ColType& rCol = itCol->second;
+ std::vector<SCROW> aBounds(rCol);
+ pDocument->UnshareFormulaCells(itGroupTab->first, itCol->first, aBounds);
+ }
+ }
+
+ // Notify the listeners.
+ RowReorderNotifier aFunc(aRowMap, nTab, nCol1, nCol2);
+ std::for_each(aListeners.begin(), aListeners.end(), aFunc);
+
+ // Re-group formulas in affected columns.
+ for (itGroupTab = rGroupTabs.begin(); itGroupTab != itGroupTabEnd; ++itGroupTab)
{
- const sc::RefQueryFormulaGroup::ColType& rCol = itCol->second;
- std::vector<SCROW> aBounds(rCol);
- pDocument->UnshareFormulaCells(itGroupTab->first, itCol->first, aBounds);
+ const sc::RefQueryFormulaGroup::ColsType& rCols = itGroupTab->second;
+ sc::RefQueryFormulaGroup::ColsType::const_iterator itCol = rCols.begin(), itColEnd = rCols.end();
+ for (; itCol != itColEnd; ++itCol)
+ pDocument->RegroupFormulaCells(itGroupTab->first, itCol->first);
}
}
- // Notify the listeners.
- RowReorderNotifier aFunc(aRowMap, nTab, nCol1, nCol2);
- std::for_each(aListeners.begin(), aListeners.end(), aFunc);
-
// Re-start area listeners on the reordered rows.
{
std::vector<sc::AreaListener>::iterator it = aAreaListeners.begin(), itEnd = aAreaListeners.end();
@@ -1051,15 +1075,6 @@ void ScTable::SortReorderByRow(
}
}
- // Re-group formulas in affected columns.
- for (itGroupTab = rGroupTabs.begin(); itGroupTab != itGroupTabEnd; ++itGroupTab)
- {
- const sc::RefQueryFormulaGroup::ColsType& rCols = itGroupTab->second;
- sc::RefQueryFormulaGroup::ColsType::const_iterator itCol = rCols.begin(), itColEnd = rCols.end();
- for (; itCol != itColEnd; ++itCol)
- pDocument->RegroupFormulaCells(itGroupTab->first, itCol->first);
- }
-
// Re-group columns in the sorted range too.
for (SCCOL i = nCol1; i <= nCol2; ++i)
aCol[i].RegroupFormulaCells();
@@ -1282,7 +1297,8 @@ void ScTable::DecoladeRow( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2 )
}
void ScTable::Sort(
- const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* pProgress, sc::ReorderParam* pUndo )
+ const ScSortParam& rSortParam, bool bKeepQuery, bool bUpdateRefs,
+ ScProgress* pProgress, sc::ReorderParam* pUndo )
{
aSortParam = rSortParam;
InitSortCollator( rSortParam );
@@ -1294,6 +1310,7 @@ void ScTable::Sort(
pUndo->mbByRow = rSortParam.bByRow;
pUndo->mbPattern = rSortParam.bIncludePattern;
pUndo->mbHiddenFiltered = bKeepQuery;
+ pUndo->mbUpdateRefs = bUpdateRefs;
}
if (rSortParam.bByRow)
@@ -1309,7 +1326,7 @@ void ScTable::Sort(
if(pProgress)
pProgress->SetState( 0, nLastRow-nRow1 );
- boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, nLastRow, bKeepQuery));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, nLastRow, bKeepQuery, bUpdateRefs));
if ( nLastRow - nRow1 > 255 )
DecoladeRow(pArray.get(), nRow1, nLastRow);
@@ -1338,7 +1355,7 @@ void ScTable::Sort(
if(pProgress)
pProgress->SetState( 0, nLastCol-nCol1 );
- boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nCol1, nLastCol, bKeepQuery));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nCol1, nLastCol, bKeepQuery, bUpdateRefs));
QuickSort(pArray.get(), nCol1, nLastCol);
SortReorderByColumn(pArray.get(), aSortParam.nRow1, aSortParam.nRow2, aSortParam.bIncludePattern, pProgress);
@@ -2370,7 +2387,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
bSortCollatorInitialized = true;
InitSortCollator( aLocalSortParam );
}
- boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, rParam.nRow2, bGlobalKeepQuery));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, rParam.nRow2, bGlobalKeepQuery, false));
DecoladeRow( pArray.get(), nRow1, rParam.nRow2 );
QuickSort( pArray.get(), nRow1, rParam.nRow2 );
ScSortInfo** ppInfo = pArray->GetFirstArray();
diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx
index ccedff6..27c9fb8 100644
--- a/sc/source/core/tool/inputopt.cxx
+++ b/sc/source/core/tool/inputopt.cxx
@@ -55,6 +55,7 @@ void ScInputOptions::SetDefaults()
bExtendFormat = false;
bRangeFinder = true;
bExpandRefs = false;
+ mbSortRefUpdate = true;
bMarkHeader = true;
bUseTabCol = false;
bTextWysiwyg = false;
@@ -70,6 +71,7 @@ const ScInputOptions& ScInputOptions::operator=( const ScInputOptions& rCpy )
bExtendFormat = rCpy.bExtendFormat;
bRangeFinder = rCpy.bRangeFinder;
bExpandRefs = rCpy.bExpandRefs;
+ mbSortRefUpdate = rCpy.mbSortRefUpdate;
bMarkHeader = rCpy.bMarkHeader;
bUseTabCol = rCpy.bUseTabCol;
bTextWysiwyg = rCpy.bTextWysiwyg;
@@ -83,18 +85,19 @@ const ScInputOptions& ScInputOptions::operator=( const ScInputOptions& rCpy )
#define CFGPATH_INPUT "Office.Calc/Input"
-#define SCINPUTOPT_MOVEDIR 0
-#define SCINPUTOPT_MOVESEL 1
-#define SCINPUTOPT_EDTEREDIT 2
-#define SCINPUTOPT_EXTENDFMT 3
-#define SCINPUTOPT_RANGEFIND 4
-#define SCINPUTOPT_EXPANDREFS 5
-#define SCINPUTOPT_MARKHEADER 6
-#define SCINPUTOPT_USETABCOL 7
-#define SCINPUTOPT_TEXTWYSIWYG 8
-#define SCINPUTOPT_REPLCELLSWARN 9
-#define SCINPUTOPT_LEGACY_CELL_SELECTION 10
-#define SCINPUTOPT_COUNT 11
+#define SCINPUTOPT_MOVEDIR 0
+#define SCINPUTOPT_MOVESEL 1
+#define SCINPUTOPT_EDTEREDIT 2
+#define SCINPUTOPT_EXTENDFMT 3
+#define SCINPUTOPT_RANGEFIND 4
+#define SCINPUTOPT_EXPANDREFS 5
+#define SCINPUTOPT_SORT_REF_UPDATE 6
+#define SCINPUTOPT_MARKHEADER 7
+#define SCINPUTOPT_USETABCOL 8
+#define SCINPUTOPT_TEXTWYSIWYG 9
+#define SCINPUTOPT_REPLCELLSWARN 10
+#define SCINPUTOPT_LEGACY_CELL_SELECTION 11
+#define SCINPUTOPT_COUNT 12
Sequence<OUString> ScInputCfg::GetPropertyNames()
{
@@ -106,6 +109,7 @@ Sequence<OUString> ScInputCfg::GetPropertyNames()
"ExpandFormatting", // SCINPUTOPT_EXTENDFMT
"ShowReference", // SCINPUTOPT_RANGEFIND
"ExpandReference", // SCINPUTOPT_EXPANDREFS
+ "UpdateReferenceOnSort", // SCINPUTOPT_SORT_REF_UPDATE
"HighlightSelection", // SCINPUTOPT_MARKHEADER
"UseTabCol", // SCINPUTOPT_USETABCOL
"UsePrinterMetrics", // SCINPUTOPT_TEXTWYSIWYG
@@ -157,6 +161,9 @@ ScInputCfg::ScInputCfg() :
case SCINPUTOPT_EXPANDREFS:
SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
break;
+ case SCINPUTOPT_SORT_REF_UPDATE:
+ SetSortRefUpdate(ScUnoHelpFunctions::GetBoolFromAny(pValues[nProp]));
+ break;
case SCINPUTOPT_MARKHEADER:
SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
break;
@@ -206,6 +213,9 @@ void ScInputCfg::Commit()
case SCINPUTOPT_EXPANDREFS:
ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], GetExpandRefs() );
break;
+ case SCINPUTOPT_SORT_REF_UPDATE:
+ ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], GetSortRefUpdate() );
+ break;
case SCINPUTOPT_MARKHEADER:
ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], GetMarkHeader() );
break;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 9f4a7e9..a0f222e 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1242,6 +1242,12 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
pInputCfg->SetExpandRefs( ((const SfxBoolItem*)pItem)->GetValue() );
bSaveInputOptions = true;
}
+ if (rOptSet.HasItem(SID_SC_OPT_SORT_REF_UPDATE, &pItem))
+ {
+ pInputCfg->SetSortRefUpdate(static_cast<const SfxBoolItem*>(pItem)->GetValue());
+ bSaveInputOptions = true;
+ }
+
if ( rOptSet.HasItem(SID_SC_INPUT_MARK_HEADER,&pItem) )
{
pInputCfg->SetMarkHeader( ((const SfxBoolItem*)pItem)->GetValue() );
@@ -1999,7 +2005,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
SID_SC_INPUT_SELECTION,SID_SC_INPUT_MARK_HEADER,
SID_SC_INPUT_TEXTWYSIWYG,SID_SC_INPUT_TEXTWYSIWYG,
SID_SC_INPUT_REPLCELLSWARN,SID_SC_INPUT_REPLCELLSWARN,
- SID_SC_INPUT_LEGACY_CELL_SELECTION,SID_SC_INPUT_LEGACY_CELL_SELECTION,
+ SID_SC_INPUT_LEGACY_CELL_SELECTION,SID_SC_OPT_SORT_REF_UPDATE,
// TP_USERLISTS:
SCITEM_USERLIST, SCITEM_USERLIST,
// TP_PRINT:
@@ -2062,6 +2068,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
rInpOpt.GetRangeFinder() ) );
pRet->Put( SfxBoolItem( SID_SC_INPUT_REF_EXPAND,
rInpOpt.GetExpandRefs() ) );
+ pRet->Put( SfxBoolItem(SID_SC_OPT_SORT_REF_UPDATE, rInpOpt.GetSortRefUpdate()));
pRet->Put( SfxBoolItem( SID_SC_INPUT_MARK_HEADER,
rInpOpt.GetMarkHeader() ) );
pRet->Put( SfxBoolItem( SID_SC_INPUT_TEXTWYSIWYG,
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 7469578..2ca4808 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -48,6 +48,7 @@
#include "markdata.hxx"
#include "progress.hxx"
#include <undosort.hxx>
+#include <inputopt.hxx>
#include <set>
#include <memory>
@@ -514,8 +515,10 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
// don't call ScDocument::Sort with an empty SortParam (may be empty here if bCopy is set)
if (aLocalParam.GetSortKeyCount() && aLocalParam.maKeyState[0].bDoSort)
{
+ ScInputOptions aInputOption = SC_MOD()->GetInputOptions();
+ bool bUpdateRefs = aInputOption.GetSortRefUpdate();
ScProgress aProgress(&rDocShell, ScGlobal::GetRscString(STR_PROGRESS_SORTING), 0);
- pDoc->Sort(nTab, aLocalParam, bRepeatQuery, &aProgress, &aUndoParam);
+ pDoc->Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam);
}
if (bRecord)
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index 4ff0960..36156fe 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -48,6 +48,8 @@ void UndoSort::Execute( bool bUndo )
pDocShell->PostPaint(maParam.maSortRange, PAINT_GRID);
pDocShell->PostDataChanged();
+ if (!aParam.mbUpdateRefs)
+ rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
}
}
--
1.9.3

@ -1,76 +0,0 @@
From ab5ff775b5b197a11a76a5e91859c31421ff559f Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Sat, 18 Oct 2014 20:22:53 -0400
Subject: [PATCH] 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@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
---
sc/source/core/tool/token.cxx | 47 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
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())
--
1.9.3

@ -1,54 +0,0 @@
From 4b2f0915f9f3bff7d2476ec41a272e5263fbb312 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Sun, 12 Oct 2014 10:18:09 -0400
Subject: [PATCH] fdo#83901: ROW() and COLUMN() to be properly recalculated on
cell move.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For cases where ROW or COLUMN references another cell that has shifted.
Change-Id: Ic4bef8672dab811ceff6886d9af0388306a66485
(cherry picked from commit 0b29a16d1dcffd75e49bd7ad3da867b0d0ebfa38)
Reviewed-on: https://gerrit.libreoffice.org/11934
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
sc/source/core/data/column.cxx | 6 ++++++
sc/source/core/data/formulacell.cxx | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 1676e1b..42da658 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2096,6 +2096,12 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
if (pCode->IsRecalcModeOnRefMove())
aRes.mbValueChanged = true;
}
+ else if (aRes.mbReferenceModified && pCode->IsRecalcModeOnRefMove())
+ {
+ // The cell itself hasn't shifted. But it may have ROW or COLUMN
+ // referencing another cell that has.
+ aRes.mbValueChanged = true;
+ }
if (aRes.mbNameModified)
recompileTokenArray(*pTop);
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 2059aee..96eb323 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2758,7 +2758,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
if (bOnRefMove)
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
- bOnRefMove = (bValChanged || (aPos != aOldPos));
+ bOnRefMove = (bValChanged || (aPos != aOldPos) || bRefModified);
bool bNewListening = false;
bool bInDeleteUndo = false;
--
1.9.3

@ -1,51 +0,0 @@
From 81e4dbe1adf196ee20f1a4bfbc50b54abfc79f4b Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Sun, 26 Oct 2014 14:43:14 -0700
Subject: [PATCH] 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@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
---
sc/source/core/data/table3.cxx | 7 +++++--
sc/source/ui/undo/undosort.cxx | 3 +--
2 files changed, 6 insertions(+), 4 deletions(-)
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);
}
--
1.9.3

@ -1,52 +0,0 @@
From fa08c98c485e0de34082f3d66c5e1b6609268be1 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Mon, 27 Oct 2014 08:52:38 -0700
Subject: [PATCH] fdo#85215: Ensure that formula broadcasting works after sort.
When the reference update on sort is turned off.
Change-Id: I547dd1525a638dd447fe331e22583af4a7947308
(cherry picked from commit 1eb82c78a223d9a0b2bb5c3f5c129c1ee8bdf303)
Reviewed-on: https://gerrit.libreoffice.org/12113
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
---
sc/source/core/data/table3.cxx | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 05285d8..f7589dd 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -803,6 +803,15 @@ void ScTable::SortReorderByRow(
ScSortInfoArray::RowsType* pRows = pArray->GetDataRows();
assert(pRows); // In sort-by-row mode we must have data rows already populated.
+ if (!pArray->IsUpdateRefs())
+ {
+ // When the update ref mode is disabled, we need to detach all formula
+ // cells in the sorted range before reordering, and re-start them
+ // afterward.
+ sc::EndListeningContext aCxt(*pDocument);
+ DetachFormulaCells(aCxt, nCol1, nRow1, nCol2, nRow2);
+ }
+
// Split formula groups at the sort range boundaries (if applicable).
std::vector<SCROW> aRowBounds;
aRowBounds.reserve(2);
@@ -1081,6 +1090,12 @@ void ScTable::SortReorderByRow(
// Re-group columns in the sorted range too.
for (SCCOL i = nCol1; i <= nCol2; ++i)
aCol[i].RegroupFormulaCells();
+
+ if (!pArray->IsUpdateRefs())
+ {
+ sc::StartListeningContext aCxt(*pDocument);
+ AttachFormulaCells(aCxt, nCol1, nRow1, nCol2, nRow2);
+ }
}
short ScTable::CompareCell(
--
1.9.3

@ -1,110 +0,0 @@
From bc38612d349b9efd877dec23f3e68a3f7b945cec Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Mon, 27 Oct 2014 07:32:32 -0700
Subject: [PATCH] fdo#85282: Correct adjustment of range reference on delete &
shift.
Change-Id: I6e01c160f77599dfa4a2e55b60e23d256184c822
(cherry picked from commit c3c16d5b74fb5707691283538a969a03c2f918b0)
Reviewed-on: https://gerrit.libreoffice.org/12111
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
---
sc/source/core/tool/token.cxx | 67 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 61 insertions(+), 6 deletions(-)
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 84c8ccc..b0a495a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2546,6 +2546,9 @@ void setRefDeleted( ScComplexRefData& rRef, const sc::RefUpdateContext& rCxt )
bool shrinkRange( const sc::RefUpdateContext& rCxt, ScRange& rRefRange, const ScRange& rDeletedRange )
{
+ if (!rDeletedRange.Intersects(rRefRange))
+ return false;
+
if (rCxt.mnColDelta < 0)
{
// Shifting left.
@@ -2553,9 +2556,35 @@ bool shrinkRange( const sc::RefUpdateContext& rCxt, ScRange& rRefRange, const Sc
// Deleted range is only partially overlapping in vertical direction. Bail out.
return false;
- // Move the last column position to the left.
- SCCOL nDelta = rDeletedRange.aStart.Col() - rDeletedRange.aEnd.Col() - 1;
- rRefRange.aEnd.IncCol(nDelta);
+ if (rDeletedRange.aStart.Col() <= rRefRange.aStart.Col())
+ {
+ if (rRefRange.aEnd.Col() <= rDeletedRange.aEnd.Col())
+ {
+ // Reference is entirely deleted.
+ rRefRange.SetInvalid();
+ }
+ else
+ {
+ // The reference range is truncated on the left.
+ SCCOL nOffset = rDeletedRange.aStart.Col() - rRefRange.aStart.Col();
+ SCCOL nDelta = rRefRange.aStart.Col() - rDeletedRange.aEnd.Col() - 1;
+ rRefRange.aStart.IncCol(nOffset);
+ rRefRange.aEnd.IncCol(nDelta+nOffset);
+ }
+ }
+ else if (rDeletedRange.aEnd.Col() < rRefRange.aEnd.Col())
+ {
+ // Reference is deleted in the middle. Move the last column
+ // position to the left.
+ SCCOL nDelta = rDeletedRange.aStart.Col() - rDeletedRange.aEnd.Col() - 1;
+ rRefRange.aEnd.IncCol(nDelta);
+ }
+ else
+ {
+ // The reference range is truncated on the right.
+ SCCOL nDelta = rDeletedRange.aStart.Col() - rRefRange.aEnd.Col() - 1;
+ rRefRange.aEnd.IncCol(nDelta);
+ }
return true;
}
else if (rCxt.mnRowDelta < 0)
@@ -2566,9 +2595,35 @@ bool shrinkRange( const sc::RefUpdateContext& rCxt, ScRange& rRefRange, const Sc
// Deleted range is only partially overlapping in horizontal direction. Bail out.
return false;
- // Move the last row position up.
- SCROW nDelta = rDeletedRange.aStart.Row() - rDeletedRange.aEnd.Row() - 1;
- rRefRange.aEnd.IncRow(nDelta);
+ if (rDeletedRange.aStart.Row() <= rRefRange.aStart.Row())
+ {
+ if (rRefRange.aEnd.Row() <= rDeletedRange.aEnd.Row())
+ {
+ // Reference is entirely deleted.
+ rRefRange.SetInvalid();
+ }
+ else
+ {
+ // The reference range is truncated on the top.
+ SCCOL nOffset = rDeletedRange.aStart.Row() - rRefRange.aStart.Row();
+ SCCOL nDelta = rRefRange.aStart.Row() - rDeletedRange.aEnd.Row() - 1;
+ rRefRange.aStart.IncRow(nOffset);
+ rRefRange.aEnd.IncRow(nDelta+nOffset);
+ }
+ }
+ else if (rDeletedRange.aEnd.Row() < rRefRange.aEnd.Row())
+ {
+ // Reference is deleted in the middle. Move the last row
+ // position upward.
+ SCCOL nDelta = rDeletedRange.aStart.Row() - rDeletedRange.aEnd.Row() - 1;
+ rRefRange.aEnd.IncRow(nDelta);
+ }
+ else
+ {
+ // The reference range is truncated on the bottom.
+ SCCOL nDelta = rDeletedRange.aStart.Row() - rRefRange.aEnd.Row() - 1;
+ rRefRange.aEnd.IncRow(nDelta);
+ }
return true;
}
--
1.9.3

@ -1,35 +0,0 @@
From e963f4ee14fdda118a54745dcfca46e6244f0999 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Mon, 3 Nov 2014 14:52:27 +0100
Subject: [PATCH] fdo#85403 broadcast changes after TextToColumn
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Regression introduced with 3d869cda8db03820dea8c4ba463eb155d05e933b for
fdo#74014
Change-Id: Ie8ca1e7c15609aaf80b4ecbb6ccffc30a3f79f0a
(cherry picked from commit 99cfc0f8a321c3fd3ef1a49d669ebc5744dbf606)
Reviewed-on: https://gerrit.libreoffice.org/12216
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
sc/source/ui/view/cellsh2.cxx | 1 +
1 file changed, 1 insertion(+)
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 9a0fc853..7b7189c 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -976,6 +976,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
pDlg->SaveParameters();
aImport.SetExtOptions( aOptions );
aImport.SetApi( false );
+ aImport.SetImportBroadcast( true );
aStream.Seek( 0 );
aImport.ImportStream( aStream, OUString(), FORMAT_STRING );
--
1.9.3

@ -0,0 +1,65 @@
From 4d687aec3c5ea0f18ab3f01f827cc544e677bae3 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 6 Nov 2014 10:20:00 +0100
Subject: [PATCH] just use ANSI C declarations
Change-Id: Iec50f3474b97497c50522eabb4435795b3ba3b56
---
vcl/source/filter/jpeg/transupp.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/vcl/source/filter/jpeg/transupp.h b/vcl/source/filter/jpeg/transupp.h
index 4448c9f..4dbbc2a 100644
--- a/vcl/source/filter/jpeg/transupp.h
+++ b/vcl/source/filter/jpeg/transupp.h
@@ -164,27 +164,27 @@ typedef struct {
/* Parse a crop specification (written in X11 geometry style) */
EXTERN(boolean) jtransform_parse_crop_spec
- JPP((jpeg_transform_info *info, const char *spec));
+ (jpeg_transform_info *info, const char *spec);
/* Request any required workspace */
EXTERN(boolean) jtransform_request_workspace
- JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
+ (j_decompress_ptr srcinfo, jpeg_transform_info *info);
/* Adjust output image parameters */
EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info));
+ jpeg_transform_info *info);
/* Execute the actual transformation, if any */
EXTERN(void) jtransform_execute_transform
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info));
+ jpeg_transform_info *info);
/* Determine whether lossless transformation is perfectly
* possible for a specified image and transformation.
*/
EXTERN(boolean) jtransform_perfect_transform
- JPP((JDIMENSION image_width, JDIMENSION image_height,
+ (JDIMENSION image_width, JDIMENSION image_height,
int MCU_width, int MCU_height,
- JXFORM_CODE transform));
+ JXFORM_CODE transform);
/* jtransform_execute_transform used to be called
* jtransform_execute_transformation, but some compilers complain about
@@ -209,8 +209,8 @@ typedef enum {
/* Setup decompression object to save desired markers in memory */
EXTERN(void) jcopy_markers_setup
- JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
+ (j_decompress_ptr srcinfo, JCOPY_OPTION option);
/* Copy markers saved in the given source object to the destination object */
EXTERN(void) jcopy_markers_execute
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- JCOPY_OPTION option));
+ (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ JCOPY_OPTION option);
--
2.1.0

@ -1,5 +1,5 @@
# download path contains version without the last (fourth) digit
%define libo_version 4.3.3
%define libo_version 4.3.4
# Should contain .alphaX / .betaX, if this is pre-release (actually
# pre-RC) version. The pre-release string is part of tarball file names,
# so we need a way to define it easily at one place.
@ -45,8 +45,8 @@
Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
Release: 6%{?libo_prerelease}%{?dist}
Version: %{libo_version}.1
Release: 1%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0
Group: Applications/Productivity
URL: http://www.libreoffice.org/
@ -330,33 +330,16 @@ Patch32: 0001-Resolves-fdo-68967-looping-layout.patch
Patch33: 0001-Remove-smb-from-X-KDE-Protocols-lines.patch
Patch34: 0001-libgcrypt-and-gnutls-are-only-used-by-our-internal-e.patch
Patch35: 0001-allow-to-build-with-system-opencollada.patch
Patch36: 0001-Resolves-rhbz-1146169-a11y-frames-label-dies-before-.patch
Patch37: 0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch
Patch38: 0001-Resolves-fdo-76581-copy-and-paste-slideshow-crash-in.patch
Patch39: 0001-Resolves-fdo-68347-fix-word-count-with-recorded-chan.patch
Patch40: 0001-fdo-81633-Add-a-hidden-configuration-option-to-toggl.patch
Patch41: 0001-fdo-85215-Ensure-that-formula-broadcasting-works-aft.patch
Patch42: 0001-fdo-85282-Correct-adjustment-of-range-reference-on-d.patch
Patch43: 0001-fdo-79602-sw-fix-text-formatting-of-proportional-lin.patch
Patch44: 0001-fdo-79602-sw-add-new-compatibiltiy-flag-PropLineSpac.patch
Patch45: 0001-Resolves-fdo-84729-buffer-cache-grows-to-over-9000-u.patch
Patch46: 0001-Resolves-fdo-84885-chart-wizard-dialog-cut-off.patch
Patch47: 0001-Resolves-fdo-62682-crash-on-second-export-of-svg.patch
Patch48: 0001-fdo-85247-copy-and-paste-of-a-slide-results-in-a-blu.patch
Patch49: 0001-fdo-60712-Inherits-cell-styles-in-inserting-rows-col.patch
Patch50: 0001-implement-toggling-off-removeable-master-elements-wi.patch
Patch51: 0001-Resolves-fdo-78151-change-style-on-toggling-bullets-.patch
Patch52: 0001-Resolves-rhbz-1161238-sync-PRESOBJ_OUTLINE-para-dept.patch
Patch53: 0001-fdo-83901-ROW-and-COLUMN-to-be-properly-recalculated.patch
Patch54: 0001-fdo-80846-Broadcast-changes-before-EndUndo.patch
Patch55: 0001-Back-port-Kohei-s-comprehensive-sorting-unit-tests-f.patch
Patch56: 0001-Adapt-sorting-unit-tests-for-new-default.patch
Patch57: 0001-fdo-80284-Avoid-broadcasting-during-cell-delete-shif.patch
Patch58: 0001-fdo-82047-Correctly-adjust-references-in-range-names.patch
Patch59: 0001-fdo-85215-Don-t-adjust-references-wrt-cell-position-.patch
Patch60: 0001-fdo-85403-broadcast-changes-after-TextToColumn.patch
Patch61: 0001-strip-off-hard-coded-numbering-from-outliner-preview.patch
Patch62: 0001-have-a-stab-at-improving-impossible-question.patch
Patch36: 0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch
Patch37: 0001-Resolves-fdo-76581-copy-and-paste-slideshow-crash-in.patch
Patch38: 0001-fdo-85247-copy-and-paste-of-a-slide-results-in-a-blu.patch
Patch39: 0001-fdo-60712-Inherits-cell-styles-in-inserting-rows-col.patch
Patch40: 0001-implement-toggling-off-removeable-master-elements-wi.patch
Patch41: 0001-Resolves-fdo-78151-change-style-on-toggling-bullets-.patch
Patch42: 0001-Resolves-rhbz-1161238-sync-PRESOBJ_OUTLINE-para-dept.patch
Patch43: 0001-strip-off-hard-coded-numbering-from-outliner-preview.patch
Patch44: 0001-have-a-stab-at-improving-impossible-question.patch
Patch45: 0001-just-use-ANSI-C-declarations.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -2323,10 +2306,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Tue Nov 11 2014 David Tardon <dtardon@redhat.com> - 1:4.3.4.1-1
- update to 4.3.4 rc1
* Tue Nov 11 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-6
- strip hard coded numbering off outline master previews
* Tue Nov 11 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-5
* Mon Nov 10 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-5
- Resolves: rhbz#1161238 sync PRESOBJ_OUTLINE para depth on load
* Thu Nov 06 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-4

@ -7,6 +7,6 @@ a7983f859eafb2677d7ff386a023bc40 a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.
0168229624cfac409e766913506961a8 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
12fb8b5b0d5132726e57b9b9fc7e22c4 libreoffice-multiliblauncher.sh
4b87018f7fff1d054939d19920b751a0 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2
a0c7f05fd2edb91e195adb2f4170d794 libreoffice-4.3.3.2.tar.xz
072a585981c9177e7930a193b357a4b2 libreoffice-help-4.3.3.2.tar.xz
5b735fd27b42af83cf83d483a5eb2b04 libreoffice-translations-4.3.3.2.tar.xz
98312fcb1e1ab37321f29f64f312160a libreoffice-4.3.4.1.tar.xz
71ed47d8148dd66275bd87699b31c242 libreoffice-help-4.3.4.1.tar.xz
6e405e2b499ce28bce1e926bcb7268da libreoffice-translations-4.3.4.1.tar.xz

Loading…
Cancel
Save