[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 4 commits - editeng/source sc/source solenv/clang-format sw/CppunitTest_sw_ooxmlexport15.mk sw/Module_sw.mk sw/qa sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 27 06:45:53 UTC 2020
dev/null |binary
editeng/source/editeng/impedit2.cxx | 13 +++-
sc/source/core/data/dpshttab.cxx | 28 ----------
sc/source/ui/view/cellsh1.cxx | 30 +----------
solenv/clang-format/blacklist | 1
sw/CppunitTest_sw_ooxmlexport15.mk | 14 +++++
sw/Module_sw.mk | 1
sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 38 ++++++++++++++
sw/qa/extras/ww8export/ww8export3.cxx | 9 ---
sw/source/filter/ww8/ww8atr.cxx | 2
sw/source/uibase/docvw/PostItMgr.cxx | 6 +-
12 files changed, 74 insertions(+), 68 deletions(-)
New commits:
commit c4617fe203ace1239f7aed866c74fa957b71b0df
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Mon May 25 13:40:09 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed May 27 08:44:56 2020 +0200
Revert "tdf#104017 DOC export: be less aggressive with merging page styles"
This reverts LO 6.3.4 commit 5d1709a7c4184eb31cfc4c2d3acadff3a4a68189,
which tdf#133334 shows is wrong. How this made it past QA
is a mystery to me. There should be lots of examples.
Change-Id: I17be6e4bab44057f4535d4728825e12d068b65d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94782
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit 42a37f8ce27ad8fca222f50b712a8fed52dbda95)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94683
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 6f092e83d27b..92dbb233e9d4 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -14840,6 +14840,7 @@ sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
diff --git a/sw/CppunitTest_sw_ooxmlexport15.mk b/sw/CppunitTest_sw_ooxmlexport15.mk
new file mode 100644
index 000000000000..ede4d05e4c38
--- /dev/null
+++ b/sw/CppunitTest_sw_ooxmlexport15.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call sw_ooxmlexport_test,15))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 5e74ddde0e31..9f0f41eb0a13 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_ooxmlexport12 \
CppunitTest_sw_ooxmlexport13 \
CppunitTest_sw_ooxmlexport14 \
+ CppunitTest_sw_ooxmlexport15 \
CppunitTest_sw_ooxmlexport_template \
CppunitTest_sw_ooxmlfieldexport \
CppunitTest_sw_ooxmllinks \
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt b/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt
new file mode 100644
index 000000000000..56f21545a095
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
new file mode 100644
index 000000000000..dedad4d00eab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -0,0 +1,38 @@
+/* -*- 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/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text") {}
+
+protected:
+ /**
+ * Blacklist handling
+ */
+ bool mustTestImportOf(const char* filename) const override {
+ // If the testcase is stored in some other format, it's pointless to test.
+ return OString(filename).endsWith(".docx");
+ }
+};
+
+DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.odt")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ww8export/data/tdf104017.doc b/sw/qa/extras/ww8export/data/tdf104017.doc
deleted file mode 100644
index 878cbe25f863..000000000000
Binary files a/sw/qa/extras/ww8export/data/tdf104017.doc and /dev/null differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index c8bbe96a1b9d..116dedb03579 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -496,15 +496,6 @@ DECLARE_WW8EXPORT_TEST(testPresetDash, "tdf127166_prstDash_Word97.doc")
}
}
-DECLARE_WW8EXPORT_TEST(testTdf104017, "tdf104017.doc")
-{
- // Without the accompanying fix in place, this test would have failed with:
- // - Expected: 2
- // - Actual : 1
- // i.e. the tables on the two pages were merged together to a single one on export.
- CPPUNIT_ASSERT_EQUAL(2, getPages());
-}
-
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 2f487133997d..8f3b6850bef4 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -510,7 +510,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
}
}
}
- else if (m_pCurrentPageDesc->GetPoolFormatId() != RES_POOLPAGE_FIRST || !sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster()))
+ else if (!sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster()))
{
bBreakSet = true;
bNewPageDesc = true;
commit 652db25e342cbe710c3b5ae671dce2ec4b3ee09e
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun May 24 10:47:28 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed May 27 08:44:47 2020 +0200
Revert "tdf#37268: use also sheet local range in Pivot"
This reverts commit 73af06a6a7fcb2d92d36a45bbe54395bcba8dfb0.
The patch is wrong according to:
https://bugs.documentfoundation.org/show_bug.cgi?id=37268#c24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94748
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 818af4717bd7d4fbb6f622128c99259efb0714c9)
Change-Id: I63dd69afa3fc324930cd16ccc3458372d7745531
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94684
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 673a1301cac1..67ff3a1d1e69 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -232,39 +232,13 @@ const ScRange& ScSheetSourceDesc::GetSourceRange() const
{
// Obtain the source range from the range name first.
maSourceRange = ScRange();
-
- // Range names referring a sheet contain a .
- // See comment of ScCellShell::ExecuteDataPilotDialog
- // paragraph "Populate named ranges"
- sal_Int32 nAfterSheetName = ScGlobal::FindUnquoted( maRangeName, '.');
-
- // let's consider the range name is global to the doc by default
ScRangeName* pRangeName = mpDoc->GetRangeName();
- OUString searchRangeName(maRangeName);
-
- // the range name concerns a specificsheet
- if (nAfterSheetName != -1)
- {
- OUString sheetName = maRangeName.copy(0, nAfterSheetName);
- ScGlobal::EraseQuotes( sheetName, '\'', false);
- searchRangeName = maRangeName.copy(nAfterSheetName+1);
-
- SCTAB nTab = 0;
- if (!mpDoc->GetTable(sheetName, nTab))
- {
- // the sheetname should exist
- assert(false);
- return maSourceRange;
- }
- pRangeName = mpDoc->GetRangeName(nTab);
- }
-
do
{
if (!pRangeName)
break;
- OUString aUpper = ScGlobal::pCharClass->uppercase(searchRangeName);
+ OUString aUpper = ScGlobal::pCharClass->uppercase(maRangeName);
const ScRangeData* pData = pRangeName->findByUpperName(aUpper);
if (!pData)
break;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 44ef3d49c330..5873272f1dfe 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <globalnames.hxx>
#include <config_features.h>
#include <com/sun/star/i18n/TextConversionOption.hpp>
@@ -2808,31 +2807,12 @@ void ScCellShell::ExecuteDataPilotDialog()
pTabViewShell->GetFrameWeld(), bEnableExt));
// Populate named ranges (if any).
- // We must take into account 2 types of scope : global doc and sheets
- // for global doc: <name of the range>
- // for sheets: <sheetname>.<name of the range>
- std::map<OUString, ScRangeName*> aRangeMap;
- pDoc->GetRangeNameMap(aRangeMap);
- for (auto const& elemRangeMap : aRangeMap)
+ ScRangeName* pRangeName = pDoc->GetRangeName();
+ if (pRangeName)
{
- ScRangeName* pRangeName = elemRangeMap.second;
- if (pRangeName)
- {
- if (elemRangeMap.first == STR_GLOBAL_RANGE_NAME)
- {
- for (auto const& elem : *pRangeName)
- pTypeDlg->AppendNamedRange(elem.second->GetName());
- }
- else
- {
- OUString aScope(elemRangeMap.first);
- ScGlobal::AddQuotes(aScope, '\'');
- for (auto const& elem : *pRangeName)
- {
- pTypeDlg->AppendNamedRange(aScope + "." + elem.second->GetName());
- }
- }
- }
+ ScRangeName::const_iterator itr = pRangeName->begin(), itrEnd = pRangeName->end();
+ for (; itr != itrEnd; ++itr)
+ pTypeDlg->AppendNamedRange(itr->second->GetName());
}
if ( pTypeDlg->Execute() == RET_OK )
commit a1a39b5444842d092b1931cf42a5303bb7c1bb92
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun May 24 22:56:28 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed May 27 08:44:39 2020 +0200
tdf#133348 remove from list before calling SetActiveSidebarWin
so GetNextPostIt won't deal with mvPostItFields containing empty unique_ptr
See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=161242
Change-Id: I7c9a3e91d5186492cb185f799b60d1dcc5edf7af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94766
(cherry picked from commit b0bbfdf89d6496ffda4dc409ec5f2add8c94fe2a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 73950af7db24..88f917a923ea 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -316,12 +316,14 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
if (i != mvPostItFields.end())
{
std::unique_ptr<SwSidebarItem> p = std::move(*i);
- if (GetActiveSidebarWin() == p->pPostIt)
- SetActiveSidebarWin(nullptr);
// tdf#120487 remove from list before dispose, so comment window
// won't be recreated due to the entry still in the list if focus
// transferring from the pPostIt triggers relayout of postits
+ // tdf#133348 remove from list before calling SetActiveSidebarWin
+ // so GetNextPostIt won't deal with mvPostItFields containing empty unique_ptr
mvPostItFields.erase(i);
+ if (GetActiveSidebarWin() == p->pPostIt)
+ SetActiveSidebarWin(nullptr);
p->pPostIt.disposeAndClear();
}
mbLayout = true;
commit 344fd7aaa967ae304f60def3ba92b25c4f0334f0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 18 12:21:09 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed May 27 08:44:32 2020 +0200
Resolves: tdf#129620 crash because there is no associated window
only an outputdevice in this editeng-in-a-widget case
Change-Id: Idf054872a48befba652012cd511e4f9df4437166
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94282
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 607664c0f3d0..dc1730a72a94 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -496,13 +496,17 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
if ( nInputEnd > rLine.GetEnd() )
nInputEnd = rLine.GetEnd();
tools::Rectangle aR2 = PaMtoEditCursor( EditPaM( aPaM.GetNode(), nInputEnd ), GetCursorFlags::EndOfLine );
- tools::Rectangle aRect = pView->GetImpEditView()->GetWindowPos( aR1 );
- pView->GetWindow()->SetCursorRect( &aRect, aR2.Left()-aR1.Right() );
+ if (vcl::Window* pWindow = pView->GetWindow())
+ {
+ tools::Rectangle aRect = pView->GetImpEditView()->GetWindowPos( aR1 );
+ pWindow->SetCursorRect( &aRect, aR2.Left()-aR1.Right() );
+ }
}
}
else
{
- pView->GetWindow()->SetCursorRect();
+ if (vcl::Window* pWindow = pView->GetWindow())
+ pWindow->SetCursorRect();
}
}
else if ( rCEvt.GetCommand() == CommandEventId::SelectionChange )
@@ -563,7 +567,8 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
tools::Rectangle aR2 = GetEditCursor( pParaPortion, nInputPos );
aRects[ i ] = pView->GetImpEditView()->GetWindowPos( aR2 );
}
- pView->GetWindow()->SetCompositionCharRect( aRects.get(), mpIMEInfos->nLen );
+ if (vcl::Window* pWindow = pView->GetWindow())
+ pWindow->SetCompositionCharRect( aRects.get(), mpIMEInfos->nLen );
}
}
}
More information about the Libreoffice-commits
mailing list