Re: Arch-specific test failures
On Mon, 12 Feb 2024 08:55:36 +0100 Miklos Vajna wrote: > Hi Gwyn, > > On Fri, Feb 09, 2024 at 09:34:07PM +, Gwyn Ciesla > wrote: > > s390x > > > > CppunitTest_dbaccess_RowSetClones: SwMacrosTest::testVba > > > > CustomTarget_uno_test: > > https://bugs.documentfoundation.org/show_bug.cgi?id=125978 > > > > CppunitTest_basic_macros: testTdf149402_vba > > > > CppunitTest_vcl_svm_test > > CppunitTest_sw_core_layout > > CppunitTest_desktop_lib: > > https://bugs.documentfoundation.org/show_bug.cgi?id=158722 > > CppunitTest_vcl_png_test: > > https://bugs.documentfoundation.org/show_bug.cgi?id=159184 > > CppunitTest_sd_png_export_tests: > > https://bugs.documentfoundation.org/show_bug.cgi?id=159211 > > > > Please let me know if you submit a patch to gerrit for any of these, and > > I'll help test. > > Is it correct to assume that most of these will be around big-endian and > not s390x specifically? I believe so, I have already looked at some of these and they were most likely big endian related. Dan
core.git: include/svtools sc/qa sc/source svtools/source
include/svtools/htmlkywd.hxx|1 + include/svtools/htmltokn.h |1 + sc/qa/filter/html/data/formula.html |7 +++ sc/qa/filter/html/html.cxx | 25 + sc/source/filter/html/htmlpars.cxx | 14 ++ sc/source/filter/inc/eeparser.hxx |2 ++ sc/source/filter/rtf/eeimpars.cxx |5 + svtools/source/svhtml/htmlkywd.cxx |1 + 8 files changed, 56 insertions(+) New commits: commit 7812adb2ed11a3e08be24d3f2f94d14bfd740c55 Author: Miklos Vajna AuthorDate: Mon Feb 12 08:16:20 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 12 09:20:19 2024 +0100 tdf#159483 sc HTML paste: handle data-sheets-formula attribute When a formula cell gets copied from google docs, the value of the element only contains the formula result. This means once value cells and formula cells gets copied together, the pasted formula cell won't updated anymore when the input values change. Turns out there is a data-sheets-formula attribute on that contains the formula, it seems it uses the R1C1 format. Fix the problem by extending ScHTMLLayoutParser::TableDataOn() to parse this attribute and set a formula on the target cell (rather than a value) if the formula is available. This required also extending ScEEImport a bit, since the HTML paste builds on top of the RTF one in Calc. Change-Id: I720df96ce74a5e865b7329d06f3b719551f31b96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163234 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 80e47b100187..36e853960feb 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -448,6 +448,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" #define OOO_STRING_SVTOOLS_HTML_O_DSnum "data-sheets-numberformat" +#define OOO_STRING_SVTOOLS_HTML_O_DSformula "data-sheets-formula" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index 21fcec800a9a..89d8ee868535 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -347,6 +347,7 @@ STRING_START= BOOL_END, DSVAL, SDNUM, // StarDiv NumberFormat DSNUM, +DSFORMULA, SDLIBRARY, SDMODULE, STRING_END, diff --git a/sc/qa/filter/html/data/formula.html b/sc/qa/filter/html/data/formula.html new file mode 100644 index ..f6c9245d4c02 --- /dev/null +++ b/sc/qa/filter/html/data/formula.html @@ -0,0 +1,7 @@ + + +1 +2 +3 + + diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx index b66976396f99..83e35d9f8281 100644 --- a/sc/qa/filter/html/html.cxx +++ b/sc/qa/filter/html/html.cxx @@ -143,6 +143,31 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormattedNumber) CPPUNIT_ASSERT_EQUAL(static_cast(1000), pDoc->GetValue(/*col=*/0, /*row=*/0, /*tab=*/0)); } + +CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormula) +{ +// Given an empty document: +createScDoc(); + +// When pasting HTML with cells containing a formula: +ScDocument* pDoc = getScDoc(); +ScAddress aCellPos(/*nColP=*/0, /*nRowP=*/0, /*nTabP=*/0); +ScImportExport aImporter(*pDoc, aCellPos); +SvFileStream aFile(createFileURL(u"formula.html"), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +aMemory.Seek(0); +CPPUNIT_ASSERT(aImporter.ImportStream(aMemory, OUString(), SotClipboardFormatId::HTML)); + +// Then make sure C1 is a sum and it evaluates to 3: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: =SUM(A1:B1) +// - Actual : +// i.e. only the formula result was imported, not the formula. +CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A1:B1)"), + pDoc->GetFormula(/*col=*/2, /*row=*/0, /*tab=*/0)); +CPPUNIT_ASSERT_EQUAL(static_cast(3), pDoc->GetValue(/*col=*/2, /*row=*/0, /*tab=*/0)); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 78aaafdad70b..5db879db75dd 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -155,6 +155,14 @@ void ParseDataSheetsNumberformat(const OUString& rDataSheetsValue, std::optional } } } + +/// data-sheets-formula from google sheets, grammar is R1C1 reference style. +void ParseDataSheetsFormula(const OUString& rDataSheetsFormula, std::optional& rVal, +std::optional& rGrammar) +{ +rVal = rDataSheetsFormula; +rGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1; +} } ScHTMLStyles::ScHTMLStyles() : maEmpty() {} @@
core.git: Branch 'distro/collabora/co-23.05' - include/svtools sc/qa sc/source svtools/source
include/svtools/htmlkywd.hxx |1 include/svtools/htmltokn.h |1 sc/qa/filter/html/data/numberformat.html |8 + sc/qa/filter/html/html.cxx | 27 + sc/source/filter/html/htmlpars.cxx | 47 ++- svtools/source/svhtml/htmlkywd.cxx |1 6 files changed, 84 insertions(+), 1 deletion(-) New commits: commit c687ebfb0868840d321a44b420083f7619e181c6 Author: Miklos Vajna AuthorDate: Fri Feb 9 12:01:39 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Feb 12 09:48:06 2024 +0100 tdf#159483 sc HTML import: handle data-sheets-value attribute for the num case E.g. have "1,000.00" and "2,000.00" in two cells, paste that into calc, and try to do a SUM() on them, which will fail because the cell content is text. Just data-sheets-value itself would not be good solution, because then we would lose the number format, so the paste result would be like 1000, which is bad for readability if you don't want further operations on the value. Fix the problem by also parsing the data-sheets-numberformat attribute, so far what's clear is that the "2" JSON key there provides a number format string which matches the syntax of Excel/Calc. This gives the best of the two worlds: the output looks like the original, but SUM() works on the cells as well. (cherry picked from commit 789964785a61daab5f8065f006dd7aaf843c7236) Change-Id: Ic7c09ba55a51852f285ad0c05ed42c6771b0f500 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163193 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 1c0360404ced..a515ec497e32 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -447,6 +447,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_SDval "sdval" #define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" +#define OOO_STRING_SVTOOLS_HTML_O_DSnum "data-sheets-numberformat" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index b18acd6dcb87..bc8734ddd56d 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -346,6 +346,7 @@ STRING_START= BOOL_END, SDVAL, // StarDiv NumberValue DSVAL, SDNUM, // StarDiv NumberFormat +DSNUM, SDLIBRARY, SDMODULE, STRING_END, diff --git a/sc/qa/filter/html/data/numberformat.html b/sc/qa/filter/html/data/numberformat.html new file mode 100644 index ..3f7b3f56d6bd --- /dev/null +++ b/sc/qa/filter/html/data/numberformat.html @@ -0,0 +1,8 @@ + + +1,000.00 + + +2,000.00 + + diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx index 6ab2cc7fb0b7..b66976396f99 100644 --- a/sc/qa/filter/html/html.cxx +++ b/sc/qa/filter/html/html.cxx @@ -116,6 +116,33 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsBools) CPPUNIT_ASSERT_EQUAL(OUString("BOOLEAN"), pNumberFormat->GetFormatstring()); CPPUNIT_ASSERT_EQUAL(static_cast(0), pDoc->GetValue(/*col=*/0, /*row=*/1, /*tab=*/0)); } + +CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormattedNumber) +{ +// Given an empty document: +createScDoc(); + +// When pasting HTML with cells containing formatted numbers: +ScDocument* pDoc = getScDoc(); +ScAddress aCellPos(/*nColP=*/0, /*nRowP=*/0, /*nTabP=*/0); +ScImportExport aImporter(*pDoc, aCellPos); +SvFileStream aFile(createFileURL(u"numberformat.html"), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +aMemory.Seek(0); +CPPUNIT_ASSERT(aImporter.ImportStream(aMemory, OUString(), SotClipboardFormatId::HTML)); + +// Then make sure A1's type is a formatted number, value is 1000: +sal_uInt32 nNumberFormat = pDoc->GetNumberFormat(/*col=*/0, /*row=*/0, /*tab=*/0); +const SvNumberformat* pNumberFormat = pDoc->GetFormatTable()->GetEntry(nNumberFormat); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: #,##0.00 +// - Actual : General +// i.e. the number was wasted without a matching number format. +CPPUNIT_ASSERT_EQUAL(OUString("#,##0.00"), pNumberFormat->GetFormatstring()); +CPPUNIT_ASSERT_EQUAL(static_cast(1000), + pDoc->GetValue(/*col=*/0, /*row=*/0, /*tab=*/0)); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index ac48799549cd..e70252602af1 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -79,7 +79,6 @@ namespace /// data-sheets-value from google sheets, value is a JSON. void ParseDataSheetsVal
core.git: i18npool/Library_collator_data.mk i18npool/Library_i18npool.mk i18npool/Module_i18npool.mk Repository.mk
Repository.mk |1 - i18npool/Library_collator_data.mk | 23 --- i18npool/Library_i18npool.mk | 10 ++ i18npool/Module_i18npool.mk |1 - 4 files changed, 10 insertions(+), 25 deletions(-) New commits: commit 70cc059b7b9fbb38cbbdd04832dd6c87553c8672 Author: Noel Grandin AuthorDate: Fri Feb 9 13:58:52 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 12 09:55:40 2024 +0100 merge collator_data library into i18npool they are both small libraries and this is one less library to dynamically link in at startup time Change-Id: I1b36ba1b11b9d69deea3fe0d91b512328d0a42a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163165 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/Repository.mk b/Repository.mk index f39f9dc656df..8c9923bcc6c2 100644 --- a/Repository.mk +++ b/Repository.mk @@ -699,7 +699,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ )) $(eval $(call gb_Helper_register_plugins_for_install,PLAINLIBS_OOO,ooo, \ -collator_data \ dict_ja \ dict_zh \ index_data \ diff --git a/i18npool/Library_collator_data.mk b/i18npool/Library_collator_data.mk deleted file mode 100644 index 5aaadcb1d20b.. --- a/i18npool/Library_collator_data.mk +++ /dev/null @@ -1,23 +0,0 @@ -# -*- 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/. -# - -i18npool_ICULT53 := $(filter 1, $(shell expr $(ICU_MAJOR) \< 53)) -i18npool_LCDALL := $(wildcard $(SRCDIR)/i18npool/source/collator/data/*.txt) -i18npool_LCDTXTS := $(if $(i18npool_ICULT53), $(i18npool_LCDALL), $(filter-out %/ko_charset.txt, $(i18npool_LCDALL))) - -$(eval $(call gb_Library_Library,collator_data)) - -$(eval $(call gb_Library_set_plugin_for_nodep,collator_data,i18npool)) - -$(eval $(call gb_Library_add_generated_exception_objects,collator_data,\ - $(foreach txt,$(i18npool_LCDTXTS),\ - CustomTarget/i18npool/collator/collator_$(notdir $(basename $(txt \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk index 97a79be3910b..b7f28f67d8f4 100644 --- a/i18npool/Library_i18npool.mk +++ b/i18npool/Library_i18npool.mk @@ -7,6 +7,10 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +i18npool_ICULT53 := $(filter 1, $(shell expr $(ICU_MAJOR) \< 53)) +i18npool_LCDALL := $(wildcard $(SRCDIR)/i18npool/source/collator/data/*.txt) +i18npool_LCDTXTS := $(if $(i18npool_ICULT53), $(i18npool_LCDALL), $(filter-out %/ko_charset.txt, $(i18npool_LCDALL))) + $(eval $(call gb_Library_Library,i18npool)) ifeq ($(WITH_LOCALES),en) @@ -119,6 +123,12 @@ $(eval $(call gb_Library_add_exception_objects,i18npool,\ i18npool/source/transliteration/transliteration_OneToOne \ )) +# collator data +$(eval $(call gb_Library_add_generated_exception_objects,i18npool,\ + $(foreach txt,$(i18npool_LCDTXTS),\ + CustomTarget/i18npool/collator/collator_$(notdir $(basename $(txt \ +)) + ifeq ($(DISABLE_DYNLOADING),TRUE) $(call gb_CxxObject_get_target,i18npool/source/localedata/localedata): $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx diff --git a/i18npool/Module_i18npool.mk b/i18npool/Module_i18npool.mk index 3de7643264cc..97c77a014389 100644 --- a/i18npool/Module_i18npool.mk +++ b/i18npool/Module_i18npool.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Module_add_targets,i18npool,\ CustomTarget_indexentry \ CustomTarget_localedata \ CustomTarget_textconversion \ - Library_collator_data \ $(if $(filter-out iOS ANDROID,$(OS)), \ Library_dict_ja \ Library_dict_zh) \
core.git: Branch 'libreoffice-7-6' - vcl/source
vcl/source/treelist/svimpbox.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 923a590803913e8989e99b5e724d246bedfb8922 Author: Noel Grandin AuthorDate: Fri Feb 9 10:55:18 2024 +0200 Commit: Xisco Fauli CommitDate: Mon Feb 12 10:29:08 2024 +0100 tdf#159641 TreeView repaint problem with PgUp in kf5/gen regression from commit be53f32655973c7a18824d5145eed992be788d2f Author: Noel Grandin Date: Thu Mar 12 13:55:55 2020 +0200 rename vcl::Window::Update to PaintImmediately Change-Id: I74fc87e984e1f085d2351cbae033e51920608e3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163154 Reviewed-by: Michael Weghorn Tested-by: Jenkins (cherry picked from commit 30fb8cde7579fb5da15c1d8da9611198f2f5ce78) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163170 Reviewed-by: Xisco Fauli diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index c61fec0f001a..9c46af6cb266 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -387,6 +387,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta ) ShowCursor( false ); m_nFlags &= ~LBoxFlags::Filling; +m_pView->PaintImmediately(); m_pStartEntry = pNext; if( nRealDelta >= m_nVisibleCount ) @@ -424,6 +425,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta ) m_nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); +m_pView->PaintImmediately(); m_pStartEntry = pPrev; if( nRealDelta >= m_nVisibleCount ) {
core.git: include/svx svx/source
include/svx/svdhlpln.hxx | 16 svx/source/svdraw/svdhlpln.cxx |6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 207501b8385818a5d413b9f4001e0d24aaa4f2a9 Author: Miklos Vajna AuthorDate: Mon Feb 12 08:17:14 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 12 10:34:34 2024 +0100 svx: prefix members of SdrHelpLineList See tdf#94879 for motivation. Change-Id: I172aad9fe63589a6a6bbbce77173a6fe24291ae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163235 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/include/svx/svdhlpln.hxx b/include/svx/svdhlpln.hxx index 0eed874adf3a..218f36e46bf8 100644 --- a/include/svx/svdhlpln.hxx +++ b/include/svx/svdhlpln.hxx @@ -59,7 +59,7 @@ public: #define SDRHELPLINE_NOTFOUND 0x class SVXCORE_DLLPUBLIC SdrHelpLineList { -std::vector> aList; +std::vector> m_aList; public: SdrHelpLineList() {} @@ -67,21 +67,21 @@ public: SdrHelpLineList& operator=(const SdrHelpLineList& rSrcList); bool operator==(const SdrHelpLineList& rCmp) const; bool operator!=(const SdrHelpLineList& rCmp) const { return !operator==(rCmp); } -sal_uInt16 GetCount() const{ return sal_uInt16(aList.size()); } -void Insert(const SdrHelpLine& rHL) { aList.emplace_back(new SdrHelpLine(rHL)); } +sal_uInt16 GetCount() const{ return sal_uInt16(m_aList.size()); } +void Insert(const SdrHelpLine& rHL) { m_aList.emplace_back(new SdrHelpLine(rHL)); } void Insert(const SdrHelpLine& rHL, sal_uInt16 nPos) { if(nPos==0x) -aList.emplace_back(new SdrHelpLine(rHL)); +m_aList.emplace_back(new SdrHelpLine(rHL)); else -aList.emplace(aList.begin() + nPos, new SdrHelpLine(rHL)); +m_aList.emplace(m_aList.begin() + nPos, new SdrHelpLine(rHL)); } void Delete(sal_uInt16 nPos) { -aList.erase(aList.begin() + nPos); +m_aList.erase(m_aList.begin() + nPos); } -SdrHelpLine& operator[](sal_uInt16 nPos) { return *aList[nPos]; } -const SdrHelpLine& operator[](sal_uInt16 nPos) const { return *aList[nPos]; } +SdrHelpLine& operator[](sal_uInt16 nPos) { return *m_aList[nPos]; } +const SdrHelpLine& operator[](sal_uInt16 nPos) const { return *m_aList[nPos]; } sal_uInt16 HitTest(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevice& rOut) const; }; diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx index c42aefd4e816..58d0eb10c400 100644 --- a/svx/source/svdraw/svdhlpln.cxx +++ b/svx/source/svdraw/svdhlpln.cxx @@ -73,7 +73,7 @@ tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const SdrHelpLineList& SdrHelpLineList::operator=(const SdrHelpLineList& rSrcList) { -aList.clear(); +m_aList.clear(); sal_uInt16 nCount=rSrcList.GetCount(); for (sal_uInt16 i=0; i0;) { i--; -if (aList[i]->IsHit(rPnt,nTolLog,rOut)) return i; +if (m_aList[i]->IsHit(rPnt,nTolLog,rOut)) return i; } return SDRHELPLINE_NOTFOUND; }
core.git: basctl/source chart2/source cui/qa cui/source dbaccess/source editeng/inc editeng/source extensions/source forms/source include/editeng include/svl include/svx reportdesign/source sc/source
basctl/source/dlged/dlged.cxx |1 chart2/source/controller/drawinglayer/ViewElementListProvider.cxx |1 chart2/source/controller/main/DrawCommandDispatch.cxx |2 chart2/source/view/main/ChartItemPool.cxx | 310 ++-- chart2/source/view/main/ChartItemPool.hxx |3 chart2/source/view/main/DrawModelWrapper.cxx |1 cui/qa/unit/cui-dialogs-test.cxx |1 cui/source/tabpages/tpline.cxx|2 dbaccess/source/ui/dlg/dbadmin.cxx| 264 +-- dbaccess/source/ui/inc/dbadmin.hxx|4 dbaccess/source/ui/inc/unoadmin.hxx |3 dbaccess/source/ui/misc/UITools.cxx | 47 dbaccess/source/ui/uno/unoadmin.cxx |7 editeng/inc/editdoc.hxx |2 editeng/inc/eerdll2.hxx | 13 editeng/source/editeng/editdoc.cxx| 68 editeng/source/editeng/eerdll.cxx | 213 +- extensions/source/propctrlr/controlfontdialog.cxx |7 extensions/source/propctrlr/controlfontdialog.hxx |3 extensions/source/propctrlr/fontdialog.cxx| 136 - extensions/source/propctrlr/fontdialog.hxx|4 extensions/source/propctrlr/formcomponenthandler.cxx |5 forms/source/richtext/richtextengine.cxx |2 include/editeng/eerdll.hxx|3 include/svl/itempool.hxx | 158 +- include/svl/poolitem.hxx | 26 include/svx/svdpool.hxx |8 include/svx/xpool.hxx | 51 reportdesign/source/core/api/ReportDefinition.cxx |1 reportdesign/source/ui/misc/UITools.cxx | 263 +-- reportdesign/source/ui/report/ReportController.cxx| 202 +- reportdesign/source/ui/report/ReportSection.cxx |3 sc/source/core/data/docpool.cxx | 394 ++--- sc/source/core/data/drwlayer.cxx |2 sc/source/core/data/poolhelp.cxx |4 sc/source/filter/rtf/eeimpars.cxx |1 sc/source/ui/Accessibility/AccessibleText.cxx |4 sc/source/ui/app/msgpool.cxx | 73 sc/source/ui/app/scmod.cxx|1 sc/source/ui/drawfunc/fuconcustomshape.cxx|2 sc/source/ui/inc/msgpool.hxx | 12 sc/source/ui/unoobj/editsrc.cxx |1 sc/source/ui/unoobj/textuno.cxx |4 sc/source/ui/view/notemark.cxx|1 sd/source/core/drawdoc.cxx|1 sd/source/ui/func/fuconcs.cxx |2 sfx2/source/explorer/nochaos.cxx | 95 - solenv/clang-format/excludelist |1 svl/qa/unit/items/stylepool.cxx | 43 svl/source/items/itempool.cxx | 746 -- svl/source/items/itemset.cxx | 42 svl/source/items/poolitem.cxx |1 svx/Library_svxcore.mk|1 svx/qa/unit/svdraw.cxx|6 svx/source/dialog/dlgctl3d.cxx|1 svx/source/dialog/dlgctrl.cxx |2 svx/source/dialog/graphctl.cxx|1 svx/source/dialog/imapwnd.cxx | 26 svx/source/dialog/imapwnd.hxx |1 svx/source/form/fmtextcontrolshell.cxx|1 svx/source/svdraw/svdattr.cxx | 640 +--- svx/source/svdraw/svdobj.cxx |1 svx/source/tbxctrls/fontworkgallery.cxx |1 svx/source/toolbars/fontworkbar.cxx |2 svx/source/unodraw/unopool.cxx|1 svx/source/unogallery/unogalitem.cxx |2 svx/s
Re: Latest (2024) Afrikaans Hunspell
On 12.2.2024 4.43, kris wrote: Every few years I submit an update to the spellchecker: Hunspell files for Afrikaans. I have created an improved Afrikaans Hunspell af_ZA.aff and af_ZA.dic files in attached zip file. It would be appreciated if someone could submit the af_ZA updates on my behalf. I once tried to register on gerrit, but could never get the authentication to work. If you can log into https://user.documentfoundation.org/ and can see Gerrit there, it means you have an account. An authentication problem can be related to cookies, so you might try clearing them in your browser for documentfoundation.org If all else fails, you can email hostmas...@documentfoundation.org More about the login system: https://wiki.documentfoundation.org/Infra/SingleSignOn Ilmari
Re: Arch-specific test failures
On Fri, 2024-02-09 at 21:34 +, Gwyn Ciesla wrote: > ppc64le > CppunitTest_dbaccess_RowSetClones I think this one has been around for ages in the fedora build. But I don't know if we even have a backtrace for that failure?
core.git: Branch 'distro/collabora/co-24.04' - include/svtools sc/qa sc/source svtools/source
include/svtools/htmlkywd.hxx|1 + include/svtools/htmltokn.h |1 + sc/qa/filter/html/data/formula.html |7 +++ sc/qa/filter/html/html.cxx | 25 + sc/source/filter/html/htmlpars.cxx | 14 ++ sc/source/filter/inc/eeparser.hxx |2 ++ sc/source/filter/rtf/eeimpars.cxx |5 + svtools/source/svhtml/htmlkywd.cxx |1 + 8 files changed, 56 insertions(+) New commits: commit d6f7e30a317e3c239cb0ba8f7e92ea1bac8cb3fc Author: Miklos Vajna AuthorDate: Mon Feb 12 08:16:20 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 12 10:58:35 2024 +0100 tdf#159483 sc HTML paste: handle data-sheets-formula attribute When a formula cell gets copied from google docs, the value of the element only contains the formula result. This means once value cells and formula cells gets copied together, the pasted formula cell won't updated anymore when the input values change. Turns out there is a data-sheets-formula attribute on that contains the formula, it seems it uses the R1C1 format. Fix the problem by extending ScHTMLLayoutParser::TableDataOn() to parse this attribute and set a formula on the target cell (rather than a value) if the formula is available. This required also extending ScEEImport a bit, since the HTML paste builds on top of the RTF one in Calc. (cherry picked from commit 7812adb2ed11a3e08be24d3f2f94d14bfd740c55) Change-Id: I720df96ce74a5e865b7329d06f3b719551f31b96 diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 80e47b100187..36e853960feb 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -448,6 +448,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" #define OOO_STRING_SVTOOLS_HTML_O_DSnum "data-sheets-numberformat" +#define OOO_STRING_SVTOOLS_HTML_O_DSformula "data-sheets-formula" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index 21fcec800a9a..89d8ee868535 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -347,6 +347,7 @@ STRING_START= BOOL_END, DSVAL, SDNUM, // StarDiv NumberFormat DSNUM, +DSFORMULA, SDLIBRARY, SDMODULE, STRING_END, diff --git a/sc/qa/filter/html/data/formula.html b/sc/qa/filter/html/data/formula.html new file mode 100644 index ..f6c9245d4c02 --- /dev/null +++ b/sc/qa/filter/html/data/formula.html @@ -0,0 +1,7 @@ + + +1 +2 +3 + + diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx index b66976396f99..83e35d9f8281 100644 --- a/sc/qa/filter/html/html.cxx +++ b/sc/qa/filter/html/html.cxx @@ -143,6 +143,31 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormattedNumber) CPPUNIT_ASSERT_EQUAL(static_cast(1000), pDoc->GetValue(/*col=*/0, /*row=*/0, /*tab=*/0)); } + +CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormula) +{ +// Given an empty document: +createScDoc(); + +// When pasting HTML with cells containing a formula: +ScDocument* pDoc = getScDoc(); +ScAddress aCellPos(/*nColP=*/0, /*nRowP=*/0, /*nTabP=*/0); +ScImportExport aImporter(*pDoc, aCellPos); +SvFileStream aFile(createFileURL(u"formula.html"), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +aMemory.Seek(0); +CPPUNIT_ASSERT(aImporter.ImportStream(aMemory, OUString(), SotClipboardFormatId::HTML)); + +// Then make sure C1 is a sum and it evaluates to 3: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: =SUM(A1:B1) +// - Actual : +// i.e. only the formula result was imported, not the formula. +CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A1:B1)"), + pDoc->GetFormula(/*col=*/2, /*row=*/0, /*tab=*/0)); +CPPUNIT_ASSERT_EQUAL(static_cast(3), pDoc->GetValue(/*col=*/2, /*row=*/0, /*tab=*/0)); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 78aaafdad70b..5db879db75dd 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -155,6 +155,14 @@ void ParseDataSheetsNumberformat(const OUString& rDataSheetsValue, std::optional } } } + +/// data-sheets-formula from google sheets, grammar is R1C1 reference style. +void ParseDataSheetsFormula(const OUString& rDataSheetsFormula, std::optional& rVal, +std::optional& rGrammar) +{ +rVal = rDataSheetsFormula; +rGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1; +} } ScHTMLStyles::ScHTMLStyles() : maEmpty() {} @@ -1074,6 +1082,12 @@ void ScHTMLLayoutPar
Re: Arch-specific test failures
On Mon, 12 Feb 2024 09:49:31 + Caolán McNamara wrote: > On Fri, 2024-02-09 at 21:34 +, Gwyn Ciesla wrote: > > ppc64le > > CppunitTest_dbaccess_RowSetClones > > I think this one has been around for ages in the fedora build. But I > don't know if we even have a backtrace for that failure? > https://github.com/sharkcz/LibreOffice-core/commit/be0e8e6205734784c7957e1f3520ada878572d8a contains my notes about the issue. IIRC I was able to get a backtrace, but the Java inside makes it difficult to understand ... Dan
core.git: sw/qa sw/source writerfilter/source
sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf | 49 +++ sw/qa/extras/rtfexport/rtfexport2.cxx|3 - sw/qa/extras/rtfexport/rtfexport8.cxx| 25 ++- sw/source/core/unocore/unotext.cxx |3 + writerfilter/source/rtftok/rtfdispatchsymbol.cxx |3 - writerfilter/source/rtftok/rtfdocumentimpl.cxx |6 ++ writerfilter/source/rtftok/rtfsdrimport.hxx |1 7 files changed, 85 insertions(+), 5 deletions(-) New commits: commit 582ef812702413dbe7fb0f132bca3e3e4c2e1d40 Author: Michael Stahl AuthorDate: Fri Feb 9 17:51:03 2024 +0100 Commit: Michael Stahl CommitDate: Mon Feb 12 11:05:45 2024 +0100 tdf#158983 writerfilter: RTF import: fix page breaks and shape anchors Somehow, not sure why, the added import of \wrapdefault in commit 86c0f58b6f9f392865196606173d1b98a6897f32 caused the page break in fdo55504-1.rtf to get lost. The first problem is that there is a \sbknone before the first \sect - this should not have any effect before \sect because \sbk* affect the *previous* section break, but it's not an option to simply ignore it (even if it works for this bugdoc) because it may be that there is no \sectd after \sect and then it will have an effect for the later section. The problem was in handling \page: here the premature \sbknone caused a sectBreak() which ate the page break; ignore it here by checking m_bHadSect. The second problem then was that now all but the first shape were anchored on page 2. This was because RTFDocumentImpl::beforePopState() for \shape of the 1st shape called parBreak() and that set the bIsFirstParaInSection flag. This flag prevented DomainMapper::lcl_utext() in the "if (m_pImpl->isBreakDeferred(PAGE_BREAK)) if (GetSplitPgBreakAndParaMark())" branch from inserting another paragraph break that is necessary to preserve the already inserted shapes anchored to the 2nd paragraph on page 1. (This is how it works for the equivalent DOCX document, with settings.xml edited to add w:splitPgBreakAndParaMark and remove "compatibilityMode" etc. because Word 2013 doesn't set these correctly.) The consequence is that when the second SwTextNode is converted to a text frame, all the shape anchors move to the next paragraph, the one with the RES_BREAK on it. Fix this by limiting the parBreak() handling in RTFDocumentImpl::beforePopState() to when the shape is a SwGrfNode, which is the scenario in the commit 0d9132c5046e15540abc20e45d64080708626441 "fdo#47036 fix RTF import of shapes inside text frames at the start of the doc" - the testFdo47036 fails if the block is removed completely. This caused 2 test failures, but both cases look the same as in Word 2013 now: Test name: (anonymous namespace)::testTdf158826_extraCR::Load_Verify_Reload_Verify An uncaught exception of type com.sun.star.uno.RuntimeException - unsatisfied query for interface of type com.sun.star.text.XTextTable! rtfexport2.cxx:537:Assertion Test name: (anonymous namespace)::testFdo47495::Load_Verify_Reload_Verify equality assertion failed - Expected: 2 - Actual : 1 Change-Id: I43fa9431721650a6d748d1f4bda9aeaa7a9c6b45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163200 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf new file mode 100644 index ..6e7667629969 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf @@ -0,0 +1,49 @@ +{ tf1deflang1025nsinsicpg1251\uc1deff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1049\deflangfe1049{ onttbl{0romancharset204prq2{\*\panose 02020603050405020304}Times New Roman;}{1swisscharset204prq2{\*\panose 020b0604020202020204}Arial;}{39 romancharset0prq2 Times New Roman;} +{37romancharset238prq2 Times New Roman CE;}{40romancharset161prq2 Times New Roman Greek;}{41romancharset162prq2 Times New Roman Tur;}{42 bidi romancharset177prq2 Times New Roman (Hebrew);} +{43bidi romancharset178prq2 Times New Roman (Arabic);}{44roman charset186prq2 Times New Roman Baltic;}{45romancharset163prq2 Times New Roman (Vietnamese);}{49swisscharset0prq2 Arial;} +{47swisscharset238prq2 Arial CE;}{50swisscharset161prq2 Arial Greek;}{ 51swisscharset162prq2 Arial Tur;}{52bidi swisscharset177prq2 Arial (Hebrew);}{53bidi swisscharset178prq2 Arial (Arabic);} +{54swisscharset186prq2 Arial Baltic;}{55swisscharset163prq2 Arial (Vietnamese);}}{+ ed255\green255lue0; ed255\green255lue255; ed0\green0lue128; ed0\green128lue128; ed0\green128lue0; ed128\green0lue128; ed128\green0lue0; ed128\green128lue0; ed128\green128lue128; ed192\gr
core.git: drawinglayer/inc drawinglayer/qa drawinglayer/source include/drawinglayer include/svx svx/inc svx/qa svx/source sw/source
drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx|5 drawinglayer/inc/primitive2d/textlineprimitive2d.hxx |2 drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx |4 drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx |2 drawinglayer/qa/unit/border.cxx |8 drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx | 17 drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx|7 drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx | 12 drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D.cxx|9 drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx |7 drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D.cxx |9 drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx |8 drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D.cxx |9 drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx| 14 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx | 17 drawinglayer/source/primitive2d/controlprimitive2d.cxx| 10 drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx |8 drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx |8 drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx |4 drawinglayer/source/primitive2d/epsprimitive2d.cxx|7 drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx | 28 - drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx| 14 drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx | 12 drawinglayer/source/primitive2d/graphicprimitive2d.cxx| 12 drawinglayer/source/primitive2d/gridprimitive2d.cxx | 23 - drawinglayer/source/primitive2d/helplineprimitive2d.cxx | 24 - drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx| 11 drawinglayer/source/primitive2d/mediaprimitive2d.cxx |4 drawinglayer/source/primitive2d/metafileprimitive2d.cxx |8 drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx|8 drawinglayer/source/primitive2d/patternfillprimitive2d.cxx| 14 drawinglayer/source/primitive2d/polygonprimitive2d.cxx| 60 +- drawinglayer/source/primitive2d/primitivetools2d.cxx | 28 - drawinglayer/source/primitive2d/sceneprimitive2d.cxx | 23 - drawinglayer/source/primitive2d/svggradientprimitive2d.cxx| 50 +- drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx | 134 +++--- drawinglayer/source/primitive2d/texteffectprimitive2d.cxx | 39 - drawinglayer/source/primitive2d/textlineprimitive2d.cxx | 16 drawinglayer/source/primitive2d/textprimitive2d.cxx | 17 drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx | 17 drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx |9 drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx |4 drawinglayer/source/processor2d/baseprocessor2d.cxx |3 drawinglayer/source/tools/wmfemfhelper.cxx|8 include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx | 11 include/drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx|5 include/drawinglayer/primitive2d/PolyPolygonHairlinePrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolygonMarkerPrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolygonStrokeArrowPrimitive2D.hxx|5 include/drawinglayer/primitive2d/PolygonStrokePrimitive2D.hxx |5 include/drawinglayer/primitive2d/PolygonWavePrimitive2D.hxx |5 include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx |5 include/drawinglayer/primitive2d/borderlineprimitive2d.hxx|5 include/drawinglayer/primitive2d/controlprimitive2d.hxx |5 include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx|2 include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx|2 include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx|2 include/drawinglayer/primitive2d/epsprimitive2d.hxx |2 incl
core.git: Branch 'libreoffice-24-2' - svx/source
svx/source/sdr/contact/viewcontactofsdrpage.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit f05bc0cf6c9fdba682a0aee4e3a06b093ae345da Author: Regina Henschel AuthorDate: Fri Feb 9 15:02:41 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 11:48:37 2024 +0100 tdf#156993 use correct count for ViewContactOfSdrPage The count is used as upper limit in a for-loop in ViewObjectContact::getPrimitive2DSequenceSubHierarchy(). That calls ViewContactOfSdrPage::GetViewContact(). With the wrong count the case 10 was not reached and thus the helplines were not drawn. Change-Id: If606bbb718b1f78a874862217d1e03b02287e848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163192 Tested-by: Jenkins Reviewed-by: Regina Henschel (cherry picked from commit 56517d8a38459f5a9e67327c1ac0dc8bcd07bcb8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163180 Reviewed-by: Xisco Fauli diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 43ca1fd5c06f..dfef01d30410 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -515,10 +515,10 @@ sal_uInt32 ViewContactOfSdrPage::GetObjectCount() const { // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, // then - depending on if the page has a MasterPage - either MasterPage Hierarchy -// or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines -// (for front and back) which internally are visible or not depending on the current +// or MPBGO. Also OuterPageBorder, InnerPageBorder, PageHierarchy and two pairs of Grid and +// Helplines (for front and back) which internally are visible or not depending on the current // front/back setting for those. -return 10; +return 11; } ViewContact& ViewContactOfSdrPage::GetViewContact(sal_uInt32 nIndex) const
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/uibase/dochdl/swdtflvr.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 0750cacbb165b733ab76bb54a6c0116e8266a01f Author: Michael Weghorn AuthorDate: Fri Feb 9 21:02:59 2024 +0100 Commit: Michael Stahl CommitDate: Mon Feb 12 12:14:07 2024 +0100 tdf#158947 sw: Don't unrelatedly overwrite system clipboard on paste In `SwTransferable::RemoveDDELinkFormat`, only update the clipboard content with this `SwTransferable` after removing the `SotClipboardFormatId::LINK` from the supported formats if the `SwTransferable` was the clipboard content before already. Doing so always would unrelatedly overwrite what was previously copied from another application to the clipboard for the tdf#158947 scenario of pasting clipboard content of another application over a selection when using the Qt-based VCL plugins on Wayland (s. backtrace below that shows how the clipboard content was overwritten, frame #17 is the method changed in this commit). My assumption why the clipboard content is explicitly overwritten at all is to make sure that the system clipboard on some platforms gets notified about the change in supported formats/mime types after removing one. But that isn't necessary when the transfer data modified here aren't the current clipboard content in the first place. Backtrace for how clipboard content was previously overwritten for the tdf#158947 scenario with the qt6 VCL plugin on Wayland: ~"#0 QtClipboard::handleChanged(QClipboard::Mode) (this=0x557f90457770, aMode=QClipboard::Clipboard) at .../libreoffice/vcl/qt6/../qt5/QtClipboard.cxx:156 " ~"#1 0x7f26f08844ff in QtPrivate::FunctorCall, QtPrivate::List, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}::operator()() const (__closure=0x7ffe889a2c20) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:153 " ~"#2 0x7f26f0884ffb in QtPrivate::FunctorCallBase::call_internal, QtPrivate::List, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall, QtPrivate::List, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**)::{lambda()#1}&&) (args=0x7ffe889a2ed0, fn=...) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:72 " ~"#3 0x7f26f088456f in QtPrivate::FunctorCall, QtPrivate::List, void, void (QtClipboard::*)(QClipboard::Mode)>::call(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e , o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:152 " ~"#4 0x7f26f08833de in QtPrivate::FunctionPointer::call, void>(void (QtClipboard::*)(QClipboard::Mode), QtClipboard*, void**) (f=(void (QtClipboard::*)(QtClipboard * const, QClipboard::Mode)) 0x7f26f087a76e , o=0x557f90457770, arg=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:200 " ~"#5 0x7f26f0881f71 in QtPrivate::QCallableObject, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0, ret=0x0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:571 " ~"#6 0x7f26efdb863f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x557f904555f0, r=0x557f90457770, a=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:487 " ~"#7 0x7f26efe5772e in doActivate(QObject*, int, void**) (sender=0x557f8d510fd0, signal_index=3, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4116 " ~"#8 0x7f26efe4cdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x557f8d510fd0, m=0x7f26efa47cc0 , local_signal_index=0, argv=0x7ffe889a2ed0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:4176 " ~"#9 0x7f26eede9fcc in QClipboard::changed(QClipboard::Mode) (this=0x557f8d510fd0, _t1=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/Gui_autogen/include/moc_qclipboard.cpp:182 " ~"#10 0x7f26eede9bc1 in QClipboard::emitChanged(QClipboard::Mode) (this=0x557f8d510fd0, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qclipboard.cpp:558 " ~"#11 0x7f26eee4ed69 in QPlatformClipboard::emitChanged(QClipboard::Mode) (this=0x557f88019c20, mode=QClipboard::Clipboard) at .../qt5/qtbase/src/gui/kernel/qplatformclipboard.cpp:89 " ~"#12 0x7f26ed78809e in QtWaylandClient::QWaylandClipboard::setMimeData(QMimeData*, QClipboard::Mode) (this=0x557f88019c20, data=0x557f8fb87930, mode=QClipboard::Clipboard) at .../qt5/qtwayland/src/client/qwa
core.git: Branch 'libreoffice-24-2' - include/test sw/qa sw/source test/source
include/test/xmltesttools.hxx |3 sw/qa/extras/odfexport/data/bookmark_order.fodt |9 + sw/qa/extras/odfexport/odfexport2.cxx | 96 sw/qa/extras/uiwriter/uiwriter4.cxx | 15 +-- sw/source/core/unocore/unoportenum.cxx | 112 ++-- test/source/xmltesttools.cxx| 13 ++ 6 files changed, 193 insertions(+), 55 deletions(-) New commits: commit 3af133c23544839bcad6592c910e5f04e8f85c38 Author: Mike Kaganski AuthorDate: Tue Jan 30 17:15:07 2024 +0600 Commit: Xisco Fauli CommitDate: Mon Feb 12 12:41:39 2024 +0100 tdf#159438: when there's no frame, close previous bookmark first Commit 260d6cc6471444b4ef20ed6673831b0b12f96333 (INTEGRATION: CWS mtg2 (1.30.120); FILE MERGED, 2005-12-21) for #i58438# made sure to process previously opened bookmarks that close at this node, before opening the bookmarks that start here. Commit 76a4305d1e90b6617054dd33036e64f005dbcf04 (sw: fix inconsistent bookmark behavior around at-char/as-char anchored frames, 2017-12-21) re-introduced the problem accidentally: it only intended to handle case when there is an anchored frame here. This change re-instates the correct order (close bookmarks first; then process collapsed ones; then open new bookmarks) in case there's no anchored frames here. To avoid a problem when a non-collapsed bookmark starts and ends at the same point (e.g., its text was deleted), it gets converted to collapsed in lcl_FillBookmark. Thus, testRemoveBookmarkText was fixed in sw/qa/extras/uiwriter/uiwriter4.cxx. There is no reason to keep the separate -begin/-end elements, especially since on the following open/save round-trip, it will become collapsed anyway. Change-Id: Ib555a76f6f776001e12908a1299c24eebf591f6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162743 Tested-by: Jenkins Reviewed-by: Mike Kaganski Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162804 diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx index d18b5d51e813..bf91c5b20151 100644 --- a/include/test/xmltesttools.hxx +++ b/include/test/xmltesttools.hxx @@ -104,6 +104,9 @@ protected: * Assert that rXPath exists, has exactly 1 result set nodes and does *not* have an attribute named rAttribute. */ void assertXPathNoAttribute(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rAttribute); +// Assert that the node name of the single node returned by an XPath is as specified, +// e.g. to check order of elements, where getXPathPosition is unapplicable +void assertXPathNodeName(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rExpectedName); static void registerODFNamespaces(xmlXPathContextPtr& pXmlXpathCtx); static void registerOOXMLNamespaces(xmlXPathContextPtr& pXmlXpathCtx); diff --git a/sw/qa/extras/odfexport/data/bookmark_order.fodt b/sw/qa/extras/odfexport/data/bookmark_order.fodt new file mode 100644 index ..c7eac58758ff --- /dev/null +++ b/sw/qa/extras/odfexport/data/bookmark_order.fodt @@ -0,0 +1,9 @@ + + + + + + foobar + + + \ No newline at end of file diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 37e744e9c852..49836082907c 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -1247,6 +1247,102 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382) } } +CPPUNIT_TEST_FIXTURE(Test, testTdf159438) +{ +// Given a text with bookmarks, where an end of one bookmark is the position of another, +// and the start of a third +loadAndReload("bookmark_order.fodt"); +auto xPara = getParagraph(1); + +// Check that the order of runs is correct (bookmarks don't overlap) + +{ +auto run = getRun(xPara, 1); +CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty(run, "TextPortionType")); +CPPUNIT_ASSERT_EQUAL(true, getProperty(run, "IsStart")); +CPPUNIT_ASSERT_EQUAL(false, getProperty(run, "IsCollapsed")); +auto named = getProperty>(run, "Bookmark"); +CPPUNIT_ASSERT_EQUAL(u"bookmark1"_ustr, named->getName()); +} + +{ +auto run = getRun(xPara, 2); +CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, getProperty(run, "TextPortionType")); +CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, run->getString()); +} + +{ +auto run = getRun(xPara, 3); +CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty(run, "TextPortionType")); +CPPUNIT_ASSERT_EQUAL(false, getProperty(run, "IsStart")); +CPPUNIT_ASSERT_EQUAL(false, getProperty(run, "IsCollapsed")); +auto named = getProperty>(run, "Bookmark"); +CPPUNIT_ASSERT_EQUAL(u"bookmark1"_ustr, named->getName()); +} + +{ +auto
core.git: sc/source sc/uiconfig
sc/source/ui/cctrl/checklistmenu.cxx | 150 + sc/source/ui/inc/checklistmenu.hxx |6 + sc/uiconfig/scalc/ui/filterdropdown.ui | 24 - 3 files changed, 139 insertions(+), 41 deletions(-) New commits: commit d4c34206bcf64b94eac4f0761aeacc285e08af55 Author: Sahil AuthorDate: Wed Dec 27 16:01:07 2023 +0530 Commit: Heiko Tietze CommitDate: Mon Feb 12 12:53:39 2024 +0100 tdf#133836 Autofilter allow adding up members to the current selection Added a new checkbox [x] Lock, which if checked locks the current selection, and further items then can be added to that locked selection Change-Id: If8a5da308443458abfed59b303ee25feffa0aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159737 Tested-by: Heiko Tietze Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index d11d5405347e..60078c335437 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -474,6 +474,8 @@ ScCheckListMenuControl::Config::Config() : ScCheckListMember::ScCheckListMember() : mnValue(0.0) , mbVisible(true) +, mbMarked(false) +, mbCheck(true) , mbHiddenByOtherFilter(false) , mbDate(false) , mbLeaf(false) @@ -504,6 +506,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData , mxListChecks(mxBuilder->weld_tree_view("check_list_box")) , mxTreeChecks(mxBuilder->weld_tree_view("check_tree_box")) , mxChkToggleAll(mxBuilder->weld_check_button("toggle_all")) +, mxChkLockChecked(mxBuilder->weld_check_button("lock_checked")) , mxBtnSelectSingle(mxBuilder->weld_button("select_current")) , mxBtnUnselectSingle(mxBuilder->weld_button("unselect_current")) , mxButtonBox(mxBuilder->weld_box("buttonbox")) @@ -536,6 +539,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData mxListChecks->connect_popup_menu(LINK(this, ScCheckListMenuControl, CommandHdl)); mxTreeChecks->connect_popup_menu(LINK(this, ScCheckListMenuControl, CommandHdl)); mxChkToggleAll->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); +mxChkLockChecked->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnSelectSingle->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnUnselectSingle->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnOk->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); @@ -601,6 +605,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData mxListChecks->connect_toggled(LINK(this, ScCheckListMenuControl, CheckHdl)); mxListChecks->connect_key_press(LINK(this, ScCheckListMenuControl, KeyInputHdl)); mxChkToggleAll->connect_toggled(LINK(this, ScCheckListMenuControl, TriStateHdl)); +mxChkLockChecked->connect_toggled(LINK(this, ScCheckListMenuControl, LockCheckedHdl)); mxBtnSelectSingle->connect_clicked(LINK(this, ScCheckListMenuControl, ButtonHdl)); mxBtnUnselectSingle->connect_clicked(LINK(this, ScCheckListMenuControl, ButtonHdl)); @@ -745,6 +750,104 @@ IMPL_LINK(ScCheckListMenuControl, ButtonHdl, weld::Button&, rBtn, void) } } +namespace +{ +void insertMember(weld::TreeView& rView, const weld::TreeIter& rIter, const ScCheckListMember& rMember, bool bChecked, bool bLock=false) +{ +OUString aLabel = rMember.maName; +if (aLabel.isEmpty()) +aLabel = ScResId(STR_EMPTYDATA); +rView.set_toggle(rIter, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE); +rView.set_text(rIter, aLabel, 0); + +if (bLock) +rView.set_sensitive(rIter, !rMember.mbHiddenByOtherFilter && !rMember.mbMarked); +else +rView.set_sensitive(rIter, !rMember.mbHiddenByOtherFilter); +} + +void loadSearchedMembers(std::vector& rSearchedMembers, std::vector& rMembers, + const OUString& rSearchText, bool bLock=false) +{ +const OUString aSearchText = ScGlobal::getCharClass().lowercase( rSearchText ); + +for (size_t i = 0; i < rMembers.size(); ++i) +{ +assert(!rMembers[i].mbDate); + +OUString aLabelDisp = rMembers[i].maName; +if ( aLabelDisp.isEmpty() ) +aLabelDisp = ScResId( STR_EMPTYDATA ); + +bool bPartialMatch = ScGlobal::getCharClass().lowercase( aLabelDisp ).indexOf( aSearchText ) != -1; + +if (!bPartialMatch) +continue; +if (!bLock || (!rMembers[i].mbMarked && !rMembers[i].mbHiddenByOtherFilter)) +rSearchedMembers.push_back(i); +} + +if (bLock) +for (size_t i = 0; i < rMembers.size(); ++i) +if (rMembers[i].mbMarked && !rMem
core.git: cui/inc cui/source cui/uiconfig icon-themes/breeze_dark icon-themes/colibre icon-themes/colibre_dark icon-themes/colibre_dark_svg icon-themes/colibre_svg icon-themes/sifr_dark icon-themes/su
cui/inc/bitmaps.hlst|2 cui/source/inc/numpages.hxx |6 cui/source/inc/swpossizetabpage.hxx |7 cui/source/inc/transfrm.hxx |7 cui/source/tabpages/numpages.cxx| 23 cui/source/tabpages/swpossizetabpage.cxx| 26 cui/source/tabpages/transfrm.cxx| 26 cui/uiconfig/ui/bulletandposition.ui| 100 ++- cui/uiconfig/ui/numberingoptionspage.ui | 606 +++- cui/uiconfig/ui/possizetabpage.ui | 110 ++- cui/uiconfig/ui/swpossizepage.ui| 368 ++-- icon-themes/breeze_dark/res/locked.png |binary icon-themes/breeze_dark/res/unlocked.png|binary icon-themes/colibre/res/locked.png |binary icon-themes/colibre/res/unlocked.png|binary icon-themes/colibre_dark/res/locked.png |binary icon-themes/colibre_dark/res/unlocked.png |binary icon-themes/colibre_dark_svg/res/unlocked.svg | 43 + icon-themes/colibre_svg/res/unlocked.svg|4 icon-themes/sifr_dark/res/locked.png|binary icon-themes/sifr_dark/res/unlocked.png |binary icon-themes/sukapura_dark/res/locked.png|binary icon-themes/sukapura_dark/res/unlocked.png |binary include/svx/dlgutil.hxx | 19 sd/inc/bitmaps.hlst |3 sd/source/ui/dlg/BulletAndPositionDlg.cxx | 25 sd/source/ui/inc/BulletAndPositionDlg.hxx |6 svx/inc/bitmaps.hlst|3 svx/source/dialog/dlgutil.cxx | 24 svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 29 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |7 svx/uiconfig/ui/sidebarpossize.ui | 128 +++- sw/inc/bitmaps.hlst |3 sw/source/ui/frmdlg/frmpage.cxx | 20 sw/source/uibase/inc/frmpage.hxx|9 sw/uiconfig/swriter/ui/frmtypepage.ui | 127 +++- 36 files changed, 1201 insertions(+), 530 deletions(-) New commits: commit fe4e750d32cb88a9ce7a7539af6c6883d4194220 Author: Heiko Tietze AuthorDate: Fri Dec 8 12:18:47 2023 +0100 Commit: Heiko Tietze CommitDate: Mon Feb 12 12:56:05 2024 +0100 Resolves tdf#158531 - Connector lines for Keep Ratio setting Icons taken from https://thenounproject.com/icon/lock-89649/ and https://thenounproject.com/icon/unlock-89647/ (licensed PD) Change-Id: I7efd25e83726ced7dee4f876cf4bb4c8f54408df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160460 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/cui/inc/bitmaps.hlst b/cui/inc/bitmaps.hlst index 6e0a1877588e..aab916827507 100644 --- a/cui/inc/bitmaps.hlst +++ b/cui/inc/bitmaps.hlst @@ -53,6 +53,8 @@ inline constexpr OUString RID_SVXBMP_TOPLOCK = u"svx/res/lo02.png"_ustr; inline constexpr OUString RID_SVXBMP_CELLLOCK = u"svx/res/lo03.png"_ustr; inline constexpr OUString RID_SVXBMP_LOCK = u"res/lock.png"_ustr; +inline constexpr OUString RID_SVXBMP_LOCKED = u"res/locked.png"_ustr; +inline constexpr OUString RID_SVXBMP_UNLOCKED = u"res/unlocked.png"_ustr; inline constexpr OUString RID_SVXBMP_THEME_NORMAL_BIG = u"svx/res/galnorl.png"_ustr; inline constexpr OUString RID_SVXBMP_THEME_READONLY_BIG = u"svx/res/galrdol.png"_ustr; diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index ec7b72ac71fb..7c34d49fcc62 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -28,6 +28,7 @@ #include #include #include +#include #define MN_GALLERY_ENTRY 100 @@ -218,6 +219,8 @@ class SvxNumOptionsTabPage : public SfxTabPage TypedWhichId nNumItemId; MapUnit eCoreUnit; +SvxRatioConnector m_aRatioTop; +SvxRatioConnector m_aRatioBottom; SvxNumberingPreview m_aPreviewWIN; std::unique_ptr m_xGrid; std::unique_ptr m_xLevelLB; @@ -247,6 +250,9 @@ class SvxNumOptionsTabPage : public SfxTabPage std::unique_ptr m_xHeightFT; std::unique_ptr m_xHeightMF; std::unique_ptr m_xRatioCB; +std::unique_ptr m_xCbxScaleImg; +std::unique_ptr m_xImgRatioTop; +std::unique_ptr m_xImgRatioBottom; std::unique_ptr m_xOrientFT; std::unique_ptr m_xOrientLB; std::unique_ptr m_xAllLevelsFrame; diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index eb73196986bf..2e5a15fbebbb 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -21,6 +21,7 @@ #include #include #include +#include // SvxSwPosSizeTabPage - position and size page for Writer drawing objects struct FrmMap; @@ -55,10 +56,15 @@ class SvxSwPosSizeTabPage : public SfxT
core.git: comphelper/source
comphelper/source/misc/asyncnotification.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2220b3718fd831e78485cba2a272e9af08907ddd Author: varshneydevansh AuthorDate: Thu Feb 8 21:06:25 2024 +0530 Commit: Hossein CommitDate: Mon Feb 12 13:28:36 2024 +0100 tdf#158337 use std::erase instead of std::remove followed by erase Change-Id: I36043cd3aa234f98bd0b7cc2868e9094976472b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163123 Reviewed-by: Hossein Tested-by: Hossein diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index cb8a2f251164..72c6414e7281 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -91,7 +91,7 @@ namespace comphelper std::scoped_lock aGuard( m_xImpl->aMutex ); // remove all events for this processor -m_xImpl->aEvents.erase(std::remove_if( m_xImpl->aEvents.begin(), m_xImpl->aEvents.end(), EqualProcessor( _xProcessor ) ), m_xImpl->aEvents.end()); +std::erase_if( m_xImpl->aEvents, EqualProcessor( _xProcessor ) ); }
core.git: lotuswordpro/inc sc/source slideshow/source sw/source
lotuswordpro/inc/xfilter/xfinputlist.hxx |4 ++-- sc/source/ui/view/viewfun2.cxx|9 ++--- slideshow/source/engine/opengl/TransitionImpl.cxx | 16 sw/source/uibase/utlui/uitool.cxx |4 +--- 4 files changed, 17 insertions(+), 16 deletions(-) New commits: commit 5dadcd1ea9e63bcbc0a5d4c4cd95d7d8b37edef9 Author: Keldin Maldonado (KNM) AuthorDate: Sat Feb 3 04:41:08 2024 -0800 Commit: Hossein CommitDate: Mon Feb 12 13:30:40 2024 +0100 tdf#145538 use range based for loops using range based for loops instead of index based to increase readability in codebase Change-Id: Ib8c3ec3796fce9228cee1d90beb924128b0dea3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162950 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/lotuswordpro/inc/xfilter/xfinputlist.hxx b/lotuswordpro/inc/xfilter/xfinputlist.hxx index 6e9719f21155..85dae8836e56 100644 --- a/lotuswordpro/inc/xfilter/xfinputlist.hxx +++ b/lotuswordpro/inc/xfilter/xfinputlist.hxx @@ -99,10 +99,10 @@ inline void XFInputList::ToXml(IXFStream *pStrm) pAttrList->AddAttribute( "text:value", " " ); pStrm->StartElement( "text:label" ); pStrm->EndElement( "text:label" ); -for(size_t i=0; i< m_list.size();i++) +for(const OUString& rLabel : m_list) { pAttrList->Clear(); -pAttrList->AddAttribute( "text:value", m_list[i] ); +pAttrList->AddAttribute( "text:value", rLabel); pStrm->StartElement( "text:label" ); pStrm->EndElement( "text:label" ); } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 2b5343d3bdb0..249105efd843 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2563,11 +2563,14 @@ bool ScViewFunc::DeleteTables(const vector &TheTabs, bool bRecord ) SCTAB nCount = rDoc.GetTableCount(); OUString aOldName; -for(size_t i=0; iInitUndo( rDoc, nTab,nTab, true,true ); // incl. column/fow flags +isFirstTab = false; +} else pUndoDoc->AddUndoTab( nTab,nTab, true,true ); // incl. column/fow flags diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx index ba43acddc38c..99adca7f7bea 100644 --- a/slideshow/source/engine/opengl/TransitionImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionImpl.cxx @@ -144,8 +144,8 @@ bool OGLTransitionImpl::prepare( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteri CHECK_GL_ERROR(); const SceneObjects_t& rSceneObjects(maScene.getSceneObjects()); -for(size_t i(0); i != rSceneObjects.size(); ++i) { -rSceneObjects[i]->prepare(m_nProgramObject); +for(const auto& rSceneObject : rSceneObjects) { +rSceneObject->prepare(m_nProgramObject); } GLint location = glGetUniformLocation( m_nProgramObject, "leavingSlideTexture" ); @@ -208,8 +208,8 @@ bool OGLTransitionImpl::prepare( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteri void OGLTransitionImpl::finish() { const SceneObjects_t& rSceneObjects(maScene.getSceneObjects()); -for(size_t i(0); i != rSceneObjects.size(); ++i) { -rSceneObjects[i]->finish(); +for(const auto& rSceneObject : rSceneObjects) { +rSceneObject->finish(); } finishTransition(); @@ -278,8 +278,8 @@ void OGLTransitionImpl::applyOverallOperations( double nTime, double SlideWidthS { const Operations_t& rOverallOperations(maScene.getOperations()); glm::mat4 matrix; -for(size_t i(0); i != rOverallOperations.size(); ++i) -rOverallOperations[i]->interpolate(matrix, nTime, SlideWidthScale, SlideHeightScale); +for(const auto& rOperation : rOverallOperations) +rOperation->interpolate(matrix, nTime, SlideWidthScale, SlideHeightScale); CHECK_GL_ERROR(); if (m_nOperationsTransformLocation != -1) { glUniformMatrix4fv(m_nOperationsTransformLocation, 1, false, glm::value_ptr(matrix)); @@ -340,8 +340,8 @@ void OGLTransitionImpl::displayScene( double nTime, double SlideWidth, double Sl { const SceneObjects_t& rSceneObjects(maScene.getSceneObjects()); CHECK_GL_ERROR(); -for(size_t i(0); i != rSceneObjects.size(); ++i) -rSceneObjects[i]->display(m_nSceneTransformLocation, m_nPrimitiveTransformLocation, nTime, SlideWidth, SlideHeight, DispWidth, DispHeight); +for(const auto& rSceneObject : rSceneObjects) +rSceneObject->display(m_nSceneTransformLocation, m_nPrimitiveTransformLocation, nTime, SlideWidth, SlideHeight, DispWidth, DispHeight); CHECK_GL_ERROR(); } diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index fd50bf6678b5..17e24de51caa 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -803,10 +803,8 @@ void FillCharStyleListBox(weld::ComboBox& rToFill, SwD
Re: Latest (2024) Afrikaans Hunspell
Heya, It is me who updates the English dictionaries twice a year in Gerrit: May and November (for the next major release of LibreOffice). Where can the ZA dictionary be found? Do you have examples of how long it has been under development and the number of users it has? This is my dictionaries GitHub: https://github.com/marcoagpinto/aoo-mozilla-en-dict And the tool I use to improve GB: https://proofingtoolgui.org Thanks! Kind regards from, >Marco A.G.Pinto -- On 12/02/2024 02:43, kris wrote: Every few years I submit an update to the spellchecker: Hunspell files for Afrikaans. I have created an improved Afrikaans Hunspell af_ZA.aff and af_ZA.dic files in attached zip file. It would be appreciated if someone could submit the af_ZA updates on my behalf. I once tried to register on gerrit, but could never get the authentication to work. Please let me know Regards Kris van der Merwe --
core.git: Branch 'distro/collabora/co-23.05' - include/svtools sc/qa sc/source svtools/source
include/svtools/htmlkywd.hxx|1 + include/svtools/htmltokn.h |1 + sc/qa/filter/html/data/formula.html |7 +++ sc/qa/filter/html/html.cxx | 25 + sc/source/filter/html/htmlpars.cxx | 14 ++ sc/source/filter/inc/eeparser.hxx |2 ++ sc/source/filter/rtf/eeimpars.cxx |5 + svtools/source/svhtml/htmlkywd.cxx |1 + 8 files changed, 56 insertions(+) New commits: commit c6ce873dae97d5271c320cd61558cd40762f Author: Miklos Vajna AuthorDate: Mon Feb 12 08:16:20 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Feb 12 13:55:54 2024 +0100 tdf#159483 sc HTML paste: handle data-sheets-formula attribute When a formula cell gets copied from google docs, the value of the element only contains the formula result. This means once value cells and formula cells gets copied together, the pasted formula cell won't updated anymore when the input values change. Turns out there is a data-sheets-formula attribute on that contains the formula, it seems it uses the R1C1 format. Fix the problem by extending ScHTMLLayoutParser::TableDataOn() to parse this attribute and set a formula on the target cell (rather than a value) if the formula is available. This required also extending ScEEImport a bit, since the HTML paste builds on top of the RTF one in Calc. (cherry picked from commit 7812adb2ed11a3e08be24d3f2f94d14bfd740c55) Change-Id: I720df96ce74a5e865b7329d06f3b719551f31b96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163238 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index a515ec497e32..0a080a56987c 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -448,6 +448,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" #define OOO_STRING_SVTOOLS_HTML_O_DSnum "data-sheets-numberformat" +#define OOO_STRING_SVTOOLS_HTML_O_DSformula "data-sheets-formula" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index bc8734ddd56d..6c0e7dca53c2 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -347,6 +347,7 @@ STRING_START= BOOL_END, DSVAL, SDNUM, // StarDiv NumberFormat DSNUM, +DSFORMULA, SDLIBRARY, SDMODULE, STRING_END, diff --git a/sc/qa/filter/html/data/formula.html b/sc/qa/filter/html/data/formula.html new file mode 100644 index ..f6c9245d4c02 --- /dev/null +++ b/sc/qa/filter/html/data/formula.html @@ -0,0 +1,7 @@ + + +1 +2 +3 + + diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx index b66976396f99..83e35d9f8281 100644 --- a/sc/qa/filter/html/html.cxx +++ b/sc/qa/filter/html/html.cxx @@ -143,6 +143,31 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormattedNumber) CPPUNIT_ASSERT_EQUAL(static_cast(1000), pDoc->GetValue(/*col=*/0, /*row=*/0, /*tab=*/0)); } + +CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormula) +{ +// Given an empty document: +createScDoc(); + +// When pasting HTML with cells containing a formula: +ScDocument* pDoc = getScDoc(); +ScAddress aCellPos(/*nColP=*/0, /*nRowP=*/0, /*nTabP=*/0); +ScImportExport aImporter(*pDoc, aCellPos); +SvFileStream aFile(createFileURL(u"formula.html"), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +aMemory.Seek(0); +CPPUNIT_ASSERT(aImporter.ImportStream(aMemory, OUString(), SotClipboardFormatId::HTML)); + +// Then make sure C1 is a sum and it evaluates to 3: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: =SUM(A1:B1) +// - Actual : +// i.e. only the formula result was imported, not the formula. +CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A1:B1)"), + pDoc->GetFormula(/*col=*/2, /*row=*/0, /*tab=*/0)); +CPPUNIT_ASSERT_EQUAL(static_cast(3), pDoc->GetValue(/*col=*/2, /*row=*/0, /*tab=*/0)); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index e70252602af1..c9f0474e3cf8 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -154,6 +154,14 @@ void ParseDataSheetsNumberformat(const OUString& rDataSheetsValue, std::optional } } } + +/// data-sheets-formula from google sheets, grammar is R1C1 reference style. +void ParseDataSheetsFormula(const OUString& rDataSheetsFormula, std::optional& rVal, +std::optional& rGrammar) +{ +rVal = rDataSheetsFormula; +rGrammar = fo
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source writerfilter/source
sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf | 49 +++ sw/qa/extras/rtfexport/rtfexport2.cxx|3 - sw/qa/extras/rtfexport/rtfexport8.cxx| 25 ++- sw/source/core/unocore/unotext.cxx |3 + writerfilter/source/rtftok/rtfdispatchsymbol.cxx |3 - writerfilter/source/rtftok/rtfdocumentimpl.cxx |6 ++ writerfilter/source/rtftok/rtfsdrimport.hxx |1 7 files changed, 85 insertions(+), 5 deletions(-) New commits: commit 14d1ec9a26248f2023a697fc4458ec6422a2ae71 Author: Michael Stahl AuthorDate: Fri Feb 9 17:51:03 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 14:07:29 2024 +0100 tdf#158983 writerfilter: RTF import: fix page breaks and shape anchors Somehow, not sure why, the added import of \wrapdefault in commit 86c0f58b6f9f392865196606173d1b98a6897f32 caused the page break in fdo55504-1.rtf to get lost. The first problem is that there is a \sbknone before the first \sect - this should not have any effect before \sect because \sbk* affect the *previous* section break, but it's not an option to simply ignore it (even if it works for this bugdoc) because it may be that there is no \sectd after \sect and then it will have an effect for the later section. The problem was in handling \page: here the premature \sbknone caused a sectBreak() which ate the page break; ignore it here by checking m_bHadSect. The second problem then was that now all but the first shape were anchored on page 2. This was because RTFDocumentImpl::beforePopState() for \shape of the 1st shape called parBreak() and that set the bIsFirstParaInSection flag. This flag prevented DomainMapper::lcl_utext() in the "if (m_pImpl->isBreakDeferred(PAGE_BREAK)) if (GetSplitPgBreakAndParaMark())" branch from inserting another paragraph break that is necessary to preserve the already inserted shapes anchored to the 2nd paragraph on page 1. (This is how it works for the equivalent DOCX document, with settings.xml edited to add w:splitPgBreakAndParaMark and remove "compatibilityMode" etc. because Word 2013 doesn't set these correctly.) The consequence is that when the second SwTextNode is converted to a text frame, all the shape anchors move to the next paragraph, the one with the RES_BREAK on it. Fix this by limiting the parBreak() handling in RTFDocumentImpl::beforePopState() to when the shape is a SwGrfNode, which is the scenario in the commit 0d9132c5046e15540abc20e45d64080708626441 "fdo#47036 fix RTF import of shapes inside text frames at the start of the doc" - the testFdo47036 fails if the block is removed completely. This caused 2 test failures, but both cases look the same as in Word 2013 now: Test name: (anonymous namespace)::testTdf158826_extraCR::Load_Verify_Reload_Verify An uncaught exception of type com.sun.star.uno.RuntimeException - unsatisfied query for interface of type com.sun.star.text.XTextTable! rtfexport2.cxx:537:Assertion Test name: (anonymous namespace)::testFdo47495::Load_Verify_Reload_Verify equality assertion failed - Expected: 2 - Actual : 1 Change-Id: I43fa9431721650a6d748d1f4bda9aeaa7a9c6b45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163200 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 582ef812702413dbe7fb0f132bca3e3e4c2e1d40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163181 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf new file mode 100644 index ..6e7667629969 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf @@ -0,0 +1,49 @@ +{ tf1deflang1025nsinsicpg1251\uc1deff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1049\deflangfe1049{ onttbl{0romancharset204prq2{\*\panose 02020603050405020304}Times New Roman;}{1swisscharset204prq2{\*\panose 020b0604020202020204}Arial;}{39 romancharset0prq2 Times New Roman;} +{37romancharset238prq2 Times New Roman CE;}{40romancharset161prq2 Times New Roman Greek;}{41romancharset162prq2 Times New Roman Tur;}{42 bidi romancharset177prq2 Times New Roman (Hebrew);} +{43bidi romancharset178prq2 Times New Roman (Arabic);}{44roman charset186prq2 Times New Roman Baltic;}{45romancharset163prq2 Times New Roman (Vietnamese);}{49swisscharset0prq2 Arial;} +{47swisscharset238prq2 Arial CE;}{50swisscharset161prq2 Arial Greek;}{ 51swisscharset162prq2 Arial Tur;}{52bidi swisscharset177prq2 Arial (Hebrew);}{53bidi swisscharset178prq2 Arial (Arabic);} +{54swisscharset186prq2 Arial Baltic;}{55swisscharset163prq2 Arial (Vietnamese);}}{+ ed255\green255lue0; ed255\green2
core.git: sc/qa
sc/qa/uitest/autofilter2/tdf158440.py | 52 + sc/qa/uitest/data/autofilter/tdf158440.ods |binary 2 files changed, 52 insertions(+) New commits: commit cca29491a338cb7d43c373107bb73822e1d4e4a4 Author: Xisco Fauli AuthorDate: Mon Feb 12 12:16:29 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 14:10:44 2024 +0100 tdf#158440: sc: Add UItest Based on https://gerrit.libreoffice.org/c/core/+/163021/comments/ff5eb7d3_2426919e Change-Id: I579dce86775599dc215395b93b15bc9a2f510cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163243 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli diff --git a/sc/qa/uitest/autofilter2/tdf158440.py b/sc/qa/uitest/autofilter2/tdf158440.py new file mode 100644 index ..df0b17c6706e --- /dev/null +++ b/sc/qa/uitest/autofilter2/tdf158440.py @@ -0,0 +1,52 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/. +# +from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file +from libreoffice.uno.propertyvalue import mkPropertyValues +from libreoffice.calc.document import get_cell_by_position + +class tdf158440(UITestCase): + +def test_tdf158440(self): + +with self.ui_test.load_file(get_url_for_data_file("tdf158440.ods")) as calc_doc: + +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xAll = xFloatWindow.getChild("toggle_all") +xAll.executeAction("CLICK", tuple()) + +xCheckListMenu = xFloatWindow.getChild("FilterDropDown") +xList = xCheckListMenu.getChild("check_list_box") +self.assertEqual(529, len(xList.getChildren())) + +xFirstEntry = xList.getChild("1") +xFirstEntry.executeAction("CLICK", tuple()) + +xOkBtn = xFloatWindow.getChild("ok") +xOkBtn.executeAction("CLICK", tuple()) + +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) + +self.assertEqual("111", get_state_as_dict(gridwin)["CurrentRow"]) +self.assertEqual("0", get_state_as_dict(gridwin)["CurrentColumn"]) + +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) + +# Without the fix in place, this test would have failed with +# AssertionError: '535' != '111' +self.assertEqual("535", get_state_as_dict(gridwin)["CurrentRow"]) +self.assertEqual("0", get_state_as_dict(gridwin)["CurrentColumn"]) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/data/autofilter/tdf158440.ods b/sc/qa/uitest/data/autofilter/tdf158440.ods new file mode 100644 index ..128b876a6526 Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf158440.ods differ
Re: Attention Windows developers: do not upgrade Cygwin to version 3.5.0
Hi Andras, *, On Tue, Feb 6, 2024 at 4:08 PM Andras Timar wrote: > > Hi Ilmari, > > Thanks for the info. Although I have Cygwin 3.4.10, I still have a problem > with building help. > assertion "bc_ctl.arg_max >= LINE_MAX" failed: file > "/mnt/c/Users/bwi/src/cygwin/findutils/findutils-4.9.0-1.x86_64/src/findutils-4.9.0/xargs/xargs.c", > line 511, function: main > Has anyone seen this? Not after cleaning up exports from download.lst and config_host.mk ( https://gerrit.libreoffice.org/c/core/+/144217 and https://gerrit.libreoffice.org/c/core/+/144343 and related ones). Or in other words: lots of environment variables can cause trouble with command-length limits and xargs specifically. While that wasn't a problem for normal builds, CI also sets tons of additional variables from the gerrit trigger, so the daily build jobs that create full installsets for all langs/that also build help just unset a bunch: unset BUILD_CAUSE BUILD_CAUSE_MANUALTRIGGER BUILD_DISPLAY_NAME BUILD_ID BUILD_NUMBER BUILD_TAG BUILD_URL unset EXECUTOR_NUMBER HUDSON_HOME HUDSON_SERVER_COOKIE HUDSON_URL unset JENKINS_HOME JENKINS_SERVER_COOKIE JENKINS_URL JOB_BASE_NAME JOB_NAME JOB_URL LODE_NATIVE_HOME NODE_LABELS NODE_NAME NUMBER_OF_PROCESSORS unset ORIGINAL_PATH ROOT_BUILD_CAUSE ROOT_BUILD_CAUSE_MANUALTRIGGER RUN_ARTIFACTS_DISPLAY_URL RUN_CHANGES_DISPLAY_URL RUN_DISPLAY_URL RUN_TESTS_DISPLAY_URL unset VS110COMNTOOLS VS120COMNTOOLS ciao Christian
core.git: svx/source
svx/source/svdraw/svdhdl.cxx | 101 +-- 1 file changed, 51 insertions(+), 50 deletions(-) New commits: commit bac09f76fd903c109b591a7bc15883e5653715ee Author: Noel Grandin AuthorDate: Mon Feb 12 12:54:06 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 12 14:58:49 2024 +0100 tdf#159666 Crash when table and line object are selected at the same time before commit e3077168072452fb8f1c0a8afb2992877cb96d1c Author: Noel Grandin Date: Thu Jun 17 09:49:37 2021 +0200 loplugin:finalclasses the cast in const SdrEdgeObj* pEdge = static_cast(m_pObj); would incorrectly cast a SdrTableObj, but it happened to do nothing problematic. After the above commit, the vtable layout changed and it started crashing. Work around it by use dynamic_cast and ignoring objects that are not SdrEdgeObj. Change-Id: Ibe03d4935b8eeb182e037b1648d841e26fa23ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163242 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index ad50c7680a5e..d32d01edb4bc 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1604,66 +1604,67 @@ ImpEdgeHdl::~ImpEdgeHdl() void ImpEdgeHdl::CreateB2dIAObject() { -if(m_nObjHdlNum <= 1 && m_pObj) +if(m_nObjHdlNum > 1 || !m_pObj) { -// first throw away old one -GetRidOfIAObject(); +// call parent +SdrHdl::CreateB2dIAObject(); +return; +} -BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; -BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; +// first throw away old one +GetRidOfIAObject(); -if(m_pHdlList) -{ -SdrMarkView* pView = m_pHdlList->GetView(); +BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; +BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; -if(pView && !pView->areMarkHandlesHidden()) -{ -const SdrEdgeObj* pEdge = static_cast(m_pObj); +if(!m_pHdlList) +return; -if(pEdge->GetConnectedNode(m_nObjHdlNum == 0) != nullptr) -eColIndex = BitmapColorIndex::LightRed; +SdrMarkView* pView = m_pHdlList->GetView(); -if(m_nPPntNum < 2) -{ -// Handle with plus sign inside -eKindOfMarker = BitmapMarkerKind::Circ_7x7; -} +if(!pView || pView->areMarkHandlesHidden()) +return; -SdrPageView* pPageView = pView->GetSdrPageView(); +// tdf#159666 Crash when table and line object are selected at the same time +auto pEdge = dynamic_cast(m_pObj); +if (!pEdge) +return; -if(pPageView) -{ -for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) -{ -const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); - -if(rPageWindow.GetPaintWindow().OutputToWindow()) -{ -const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager(); -if (xManager.is()) -{ -basegfx::B2DPoint aPosition(m_aPos.X(), m_aPos.Y()); -std::unique_ptr pNewOverlayObject(CreateOverlayObject( -aPosition, -eColIndex, -eKindOfMarker)); - -// OVERLAYMANAGER -insertNewlyCreatedOverlayObjectForSdrHdl( -std::move(pNewOverlayObject), -rPageWindow.GetObjectContact(), -*xManager); -} -} -} -} -} -} +if(pEdge->GetConnectedNode(m_nObjHdlNum == 0) != nullptr) +eColIndex = BitmapColorIndex::LightRed; + +if(m_nPPntNum < 2) +{ +// Handle with plus sign inside +eKindOfMarker = BitmapMarkerKind::Circ_7x7; } -else + +SdrPageView* pPageView = pView->GetSdrPageView(); +if(!pPageView) +return; + +for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) { -// call parent -SdrHdl::CreateB2dIAObject(); +const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); + +if(rPageWindow.GetPaintWindow().OutputToWindow()) +{ +const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager(); +if (xManager.is()) +
Re: Attention Windows developers: do not upgrade Cygwin to version 3.5.0
Hi Cloph, On Mon, Feb 12, 2024 at 2:53 PM Christian Lohmaier wrote: > Hi Andras, *, > > On Tue, Feb 6, 2024 at 4:08 PM Andras Timar wrote: > > > > Hi Ilmari, > > > > Thanks for the info. Although I have Cygwin 3.4.10, I still have a > problem with building help. > > assertion "bc_ctl.arg_max >= LINE_MAX" failed: file > "/mnt/c/Users/bwi/src/cygwin/findutils/findutils-4.9.0-1.x86_64/src/findutils-4.9.0/xargs/xargs.c", > line 511, function: main > > Has anyone seen this? > > Not after cleaning up exports from download.lst and config_host.mk ( > https://gerrit.libreoffice.org/c/core/+/144217 and > https://gerrit.libreoffice.org/c/core/+/144343 and related ones). > Or in other words: lots of environment variables can cause trouble > with command-length limits and xargs specifically. > > While that wasn't a problem for normal builds, CI also sets tons of > additional variables from the gerrit trigger, so the daily build jobs > that create full installsets for all langs/that also build help just > unset a bunch: > unset BUILD_CAUSE BUILD_CAUSE_MANUALTRIGGER BUILD_DISPLAY_NAME > BUILD_ID BUILD_NUMBER BUILD_TAG BUILD_URL > unset EXECUTOR_NUMBER HUDSON_HOME HUDSON_SERVER_COOKIE HUDSON_URL > unset JENKINS_HOME JENKINS_SERVER_COOKIE JENKINS_URL JOB_BASE_NAME > JOB_NAME JOB_URL LODE_NATIVE_HOME NODE_LABELS NODE_NAME > NUMBER_OF_PROCESSORS > unset ORIGINAL_PATH ROOT_BUILD_CAUSE ROOT_BUILD_CAUSE_MANUALTRIGGER > RUN_ARTIFACTS_DISPLAY_URL RUN_CHANGES_DISPLAY_URL RUN_DISPLAY_URL > RUN_TESTS_DISPLAY_URL > unset VS110COMNTOOLS VS120COMNTOOLS > > ciao > Christian > Exactly, Jenkins adds a lot, also in my case there was a big fat environment variable (2.5k) from Digicert. Anyhow, my final take on this was https://gerrit.libreoffice.org/c/help/+/163117 Cheers, Andras
core.git: external/pdfium
external/pdfium/UnpackedTarball_pdfium.mk |2 ++ external/pdfium/include.patch | 10 ++ 2 files changed, 12 insertions(+) New commits: commit 8a52cc8972efc428e67f323cd3d5646d9970ce22 Author: Stephan Bergmann AuthorDate: Mon Feb 12 10:08:47 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 12 15:31:38 2024 +0100 external/pdfium: Missing include (std::abs) Change-Id: Ia265f425cae86c671824ad355d6b91001c49adca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163236 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index f8d95d2785c7..340036822e88 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -18,6 +18,8 @@ pdfium_patches += constexpr-template.patch pdfium_patches += system-abseil.diff +pdfium_patches += include.patch + $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) $(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL))) diff --git a/external/pdfium/include.patch b/external/pdfium/include.patch new file mode 100644 index ..0ea8b14c0ed8 --- /dev/null +++ b/external/pdfium/include.patch @@ -0,0 +1,10 @@ +--- core/fxge/dib/blend.cpp core/fxge/dib/blend.cpp +@@ -7,6 +7,7 @@ + #include "core/fxge/dib/blend.h" + + #include ++#include + + #include "core/fxge/dib/fx_dib.h" + #include "third_party/base/check_op.h"
core.git: Branch 'libreoffice-24-2' - sw/qa
sw/qa/extras/accessibility/dialogs.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 57f365222bc6d99f2314b95e14381422b4b9c40f Author: Xisco Fauli AuthorDate: Mon Feb 12 12:48:04 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 15:52:56 2024 +0100 CppunitTest_sw_a11y: disable second test on Win ( 24.2 only ) Similar to 968e815ec7fb2ff11bfae2c027fe26c45d4bcee0 "CppunitTest_sw_a11y: disable test on Win ( 24.2 only )" Change-Id: Id3abf22351b06cdaaccbe4dcb5243f946eb2e73a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163244 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/accessibility/dialogs.cxx b/sw/qa/extras/accessibility/dialogs.cxx index 091e6729c9f8..665e76c9bc88 100644 --- a/sw/qa/extras/accessibility/dialogs.cxx +++ b/sw/qa/extras/accessibility/dialogs.cxx @@ -89,6 +89,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestSpecialCharactersDialogFocu CPPUNIT_ASSERT_EQUAL(u"!"_ustr, collectText()); } +#if !defined(_WIN32) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) { load(u"private:factory/swriter"_ustr); @@ -112,6 +113,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) CPPUNIT_ASSERT_EQUAL(rtl::OUString("https://libreoffice.org/"), collectText()); } +#endif //defined(_WIN32) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) {
core.git: Branch 'libreoffice-7-6' - 2 commits - sw/qa sw/source writerfilter/source
sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf | 49 +++ sw/qa/extras/rtfexport/rtfexport2.cxx|3 - sw/qa/extras/rtfexport/rtfexport8.cxx| 21 + sw/qa/extras/rtfimport/data/fdo52052.rtf |2 sw/source/core/unocore/unotext.cxx |3 + writerfilter/source/rtftok/rtfdispatchsymbol.cxx |5 +- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 ++-- writerfilter/source/rtftok/rtfdocumentimpl.hxx |5 -- writerfilter/source/rtftok/rtfsdrimport.hxx |1 9 files changed, 88 insertions(+), 11 deletions(-) New commits: commit c1395f10459f186b99d2740b0880f6a8c3c840dd Author: Michael Stahl AuthorDate: Fri Feb 9 17:51:03 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 15:59:30 2024 +0100 tdf#158983 writerfilter: RTF import: fix page breaks and shape anchors Somehow, not sure why, the added import of \wrapdefault in commit 86c0f58b6f9f392865196606173d1b98a6897f32 caused the page break in fdo55504-1.rtf to get lost. The first problem is that there is a \sbknone before the first \sect - this should not have any effect before \sect because \sbk* affect the *previous* section break, but it's not an option to simply ignore it (even if it works for this bugdoc) because it may be that there is no \sectd after \sect and then it will have an effect for the later section. The problem was in handling \page: here the premature \sbknone caused a sectBreak() which ate the page break; ignore it here by checking m_bHadSect. The second problem then was that now all but the first shape were anchored on page 2. This was because RTFDocumentImpl::beforePopState() for \shape of the 1st shape called parBreak() and that set the bIsFirstParaInSection flag. This flag prevented DomainMapper::lcl_utext() in the "if (m_pImpl->isBreakDeferred(PAGE_BREAK)) if (GetSplitPgBreakAndParaMark())" branch from inserting another paragraph break that is necessary to preserve the already inserted shapes anchored to the 2nd paragraph on page 1. (This is how it works for the equivalent DOCX document, with settings.xml edited to add w:splitPgBreakAndParaMark and remove "compatibilityMode" etc. because Word 2013 doesn't set these correctly.) The consequence is that when the second SwTextNode is converted to a text frame, all the shape anchors move to the next paragraph, the one with the RES_BREAK on it. Fix this by limiting the parBreak() handling in RTFDocumentImpl::beforePopState() to when the shape is a SwGrfNode, which is the scenario in the commit 0d9132c5046e15540abc20e45d64080708626441 "fdo#47036 fix RTF import of shapes inside text frames at the start of the doc" - the testFdo47036 fails if the block is removed completely. This caused 2 test failures, but both cases look the same as in Word 2013 now: Test name: (anonymous namespace)::testTdf158826_extraCR::Load_Verify_Reload_Verify An uncaught exception of type com.sun.star.uno.RuntimeException - unsatisfied query for interface of type com.sun.star.text.XTextTable! rtfexport2.cxx:537:Assertion Test name: (anonymous namespace)::testFdo47495::Load_Verify_Reload_Verify equality assertion failed - Expected: 2 - Actual : 1 Change-Id: I43fa9431721650a6d748d1f4bda9aeaa7a9c6b45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163200 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 582ef812702413dbe7fb0f132bca3e3e4c2e1d40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163241 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf new file mode 100644 index ..6e7667629969 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf @@ -0,0 +1,49 @@ +{ tf1deflang1025nsinsicpg1251\uc1deff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1049\deflangfe1049{ onttbl{0romancharset204prq2{\*\panose 02020603050405020304}Times New Roman;}{1swisscharset204prq2{\*\panose 020b0604020202020204}Arial;}{39 romancharset0prq2 Times New Roman;} +{37romancharset238prq2 Times New Roman CE;}{40romancharset161prq2 Times New Roman Greek;}{41romancharset162prq2 Times New Roman Tur;}{42 bidi romancharset177prq2 Times New Roman (Hebrew);} +{43bidi romancharset178prq2 Times New Roman (Arabic);}{44roman charset186prq2 Times New Roman Baltic;}{45romancharset163prq2 Times New Roman (Vietnamese);}{49swisscharset0prq2 Arial;} +{47swisscharset238prq2 Arial CE;}{50swisscharset161prq2 Arial Greek;}{ 51swisscharset162prq2 Arial Tur;}{52bidi swisscharset177prq2 Arial (Hebrew);}{53bidi swisscharset178prq2 Arial (Arabic);} +{54s
core.git: Branch 'libreoffice-7-6' - sw/inc sw/source
sw/inc/IDocumentMarkAccess.hxx |7 +++ sw/source/core/doc/docbm.cxx | 10 ++ sw/source/core/inc/MarkManager.hxx |1 + sw/source/filter/writer/writer.cxx |6 +++--- 4 files changed, 21 insertions(+), 3 deletions(-) New commits: commit d022e6a702639d38fe296fd0e8f057c0204e42aa Author: Noel Grandin AuthorDate: Wed Feb 7 14:52:05 2024 +0200 Commit: Xisco Fauli CommitDate: Mon Feb 12 16:08:31 2024 +0100 tdf#158279 TOC links lost when converting .doc to HTML regression from commit 8ce36e943f0e50970925b2dd77729ef6036b4a49 Author: Noel Grandin Date: Sun May 26 15:15:41 2019 +0200 move some searching inside IDocumentMarkAccess where I called the wrong method from inside Writer::FindPos_Bkmk The code was then removed in commit 7bad1516c5f2a85b5bae3f49261ac2494cbb7162 Author: Noel Grandin Date: Wed Jul 17 05:41:08 2019 +0200 loplugin:unusedmethods Change-Id: I3f1e14a1e3ae2dd134738363e6b2679d2a2f418a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163095 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 0a32def8b519461b35b1e249d71ae9961b04400a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163134 Reviewed-by: Xisco Fauli diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index d63b58f606c4..bc8f2e1c03d6 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -279,6 +279,13 @@ class IDocumentMarkAccess */ virtual const_iterator_t findMark(const OUString& rMark) const =0; +/** Find the first Mark that does not start before. + +@returns +an iterator pointing to the mark, or pointing to getAllMarksEnd() if nothing was found. +*/ +virtual const_iterator_t findFirstMarkNotStartsBefore(const SwPosition& rPos) const =0; + // interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK ) /** check if the selection would delete a BOOKMARK */ diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index bb8e75969239..0a88f3b3e44a 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1410,6 +1410,16 @@ namespace sw::mark return IDocumentMarkAccess::iterator(ret); } +// find the first Mark that does not start before +IDocumentMarkAccess::const_iterator_t MarkManager::findFirstMarkNotStartsBefore(const SwPosition& rPos) const +{ +return std::lower_bound( +m_vAllMarks.begin(), +m_vAllMarks.end(), +rPos, +CompareIMarkStartsBefore()); +} + IDocumentMarkAccess::const_iterator_t MarkManager::getAllMarksBegin() const { return m_vAllMarks.begin(); } diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index ef0e79d74c11..dd7eb9f6f18b 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -81,6 +81,7 @@ namespace sw::mark { virtual const_iterator_t getAllMarksEnd() const override; virtual sal_Int32 getAllMarksCount() const override; virtual const_iterator_t findMark(const OUString& rName) const override; +virtual const_iterator_t findFirstMarkNotStartsBefore(const SwPosition& rPos) const override; // bookmarks virtual bool isBookmarkDeleted(SwPaM const& rPaM, bool isReplace) const override; diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 6c7565e5dcc4..efc9d875f9c8 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -160,9 +160,9 @@ bool Writer::CopyNextPam( SwPaM ** ppPam ) sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const { const IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); -const IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findFirstBookmarkStartsAfter(rPos); -if(ppBkmk != pMarkAccess->getBookmarksEnd()) -return ppBkmk - pMarkAccess->getBookmarksBegin(); +const IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findFirstMarkNotStartsBefore(rPos); +if(ppBkmk != pMarkAccess->getAllMarksEnd()) +return ppBkmk - pMarkAccess->getAllMarksBegin(); return -1; }
core.git: Branch 'libreoffice-7-6' - sw/qa
sw/qa/extras/accessibility/dialogs.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 01eab76f35e40abe3a5cdcbc28196786458b7b97 Author: Xisco Fauli AuthorDate: Mon Feb 12 12:48:04 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 16:38:00 2024 +0100 CppunitTest_sw_a11y: disable second test on Win ( 24.2 and 7.6 only ) Similar to 968e815ec7fb2ff11bfae2c027fe26c45d4bcee0 "CppunitTest_sw_a11y: disable test on Win ( 24.2 only )" Change-Id: Id3abf22351b06cdaaccbe4dcb5243f946eb2e73a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163244 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 57f365222bc6d99f2314b95e14381422b4b9c40f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163186 Tested-by: Xisco Fauli diff --git a/sw/qa/extras/accessibility/dialogs.cxx b/sw/qa/extras/accessibility/dialogs.cxx index 7fd23ae2247d..f3a43e976025 100644 --- a/sw/qa/extras/accessibility/dialogs.cxx +++ b/sw/qa/extras/accessibility/dialogs.cxx @@ -89,6 +89,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestSpecialCharactersDialogFocu CPPUNIT_ASSERT_EQUAL(rtl::OUString(u"!"), collectText()); } +#if !defined(_WIN32) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) { load(u"private:factory/swriter"); @@ -112,6 +113,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) CPPUNIT_ASSERT_EQUAL(rtl::OUString("https://libreoffice.org/"), collectText()); } +#endif //defined(_WIN32) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) {
core.git: Branch 'libreoffice-24-2' - sc/qa sc/source
sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataInSync.xlsx |binary sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithCacheData.xlsx |binary sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithoutCacheData.xlsx |binary sc/qa/unit/pivottable_filters_test.cxx | 63 ++ sc/source/filter/oox/pivottablebuffer.cxx | 18 ++ 5 files changed, 78 insertions(+), 3 deletions(-) New commits: commit 12c69942fb80fcd4cd4a5a4ca4c76f1e050ca20c Author: Tomaž Vajngerl AuthorDate: Sat Feb 10 00:38:35 2024 +0900 Commit: Xisco Fauli CommitDate: Mon Feb 12 17:09:55 2024 +0100 sc: pivot table not correct when data and PT cache is not in sync It can happen that the pivot table is not updated and the sheet data is changed so much that it doesn't match the pivot table cached definitions. This is a perfectly valid scenario and nothing should be wrong (the pivot table can just be updated once loaded). At XLSX import we should always check the cached definitions, because the pivot table description is made using the cached data, not the actual data. The issue can occur when looking up the name of a PT field we however didn't check the cached definition but checked the sheet data, so because the indices changed so much (many columns were removed in the sheet data) we can not find the actual field name. The solution is simple - get the field name from the cached pivot table definition. Change-Id: I3b5b33f33f3c484f0b66b97ac97200d9913edcfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163197 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 9af4b5254cbe6a6770ebe78ba14074266b05471e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163178 Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataInSync.xlsx b/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataInSync.xlsx new file mode 100644 index ..f425f978cb50 Binary files /dev/null and b/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataInSync.xlsx differ diff --git a/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithCacheData.xlsx b/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithCacheData.xlsx new file mode 100644 index ..0cb21cd3259c Binary files /dev/null and b/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithCacheData.xlsx differ diff --git a/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithoutCacheData.xlsx b/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithoutCacheData.xlsx new file mode 100644 index ..91297320b985 Binary files /dev/null and b/sc/qa/unit/data/xlsx/PivotTable_CachedDefinitionAndDataNotInSync_SheetColumnsRemoved_WithoutCacheData.xlsx differ diff --git a/sc/qa/unit/pivottable_filters_test.cxx b/sc/qa/unit/pivottable_filters_test.cxx index 8d6b1ad5d39e..31fb49351c8c 100644 --- a/sc/qa/unit/pivottable_filters_test.cxx +++ b/sc/qa/unit/pivottable_filters_test.cxx @@ -2647,6 +2647,69 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableCompactLayoutXLSX) testThis(*getScDoc()); } +CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, + testPivotTableXLSX_OutOfSyncPivotTableCachedDefinitionImport) +{ +// This tests that a out-of-sync sheet data and pivot table cached definitions +// still get imported correctly as expected. + +// It is perfectly valid that the sheet data and pivot table are out-of-sync, +// but even if the sheet data is heavily modified, the pivot table should still +// be imported. + +// The test document has columns named A-K where only A and K are used in the +// pivot table. The columns B-J were removed in the sheet data, but the pivot table +// was not updated, so the cached data still has those and the pivot table +// description still relies on those columns to be present. + +auto testThis = [](ScDocument& rDocument) { +ScDPCollection* pDPs = rDocument.GetDPCollection(); +CPPUNIT_ASSERT_MESSAGE("Failed to get a live ScDPCollection instance.", pDPs); +CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one pivot table instance.", size_t(1), + pDPs->GetCount()); + +const ScDPObject* pDPObj = &(*pDPs)[0]; +CPPUNIT_ASSERT(pDPObj); +ScDPSaveData* pSaveData = pDPObj->GetSaveData(); +CPPUNIT_ASSERT(pSaveData); + +// Do we have a dim named "A" +ScDPSaveDim
core.git: Branch 'libreoffice-24-2' - include/svtools sc/qa sc/source svtools/source
include/svtools/htmlkywd.hxx |1 include/svtools/htmltokn.h |1 sc/qa/filter/html/data/numberformat.html |8 + sc/qa/filter/html/html.cxx | 27 + sc/source/filter/html/htmlpars.cxx | 47 ++- svtools/source/svhtml/htmlkywd.cxx |1 6 files changed, 84 insertions(+), 1 deletion(-) New commits: commit bffed7030955240b516e3ebb06b1772cffe27295 Author: Miklos Vajna AuthorDate: Fri Feb 9 12:01:39 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 17:19:52 2024 +0100 tdf#159483 sc HTML import: handle data-sheets-value attribute for the num case E.g. have "1,000.00" and "2,000.00" in two cells, paste that into calc, and try to do a SUM() on them, which will fail because the cell content is text. Just data-sheets-value itself would not be good solution, because then we would lose the number format, so the paste result would be like 1000, which is bad for readability if you don't want further operations on the value. Fix the problem by also parsing the data-sheets-numberformat attribute, so far what's clear is that the "2" JSON key there provides a number format string which matches the syntax of Excel/Calc. This gives the best of the two worlds: the output looks like the original, but SUM() works on the cells as well. Change-Id: Ic7c09ba55a51852f285ad0c05ed42c6771b0f500 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163152 Reviewed-by: Miklos Vajna Tested-by: Jenkins Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163245 diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 23e836ea7cea..80e47b100187 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -447,6 +447,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_SDval "sdval" #define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" +#define OOO_STRING_SVTOOLS_HTML_O_DSnum "data-sheets-numberformat" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index 27370e5cb869..21fcec800a9a 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -346,6 +346,7 @@ STRING_START= BOOL_END, SDVAL, // StarDiv NumberValue DSVAL, SDNUM, // StarDiv NumberFormat +DSNUM, SDLIBRARY, SDMODULE, STRING_END, diff --git a/sc/qa/filter/html/data/numberformat.html b/sc/qa/filter/html/data/numberformat.html new file mode 100644 index ..3f7b3f56d6bd --- /dev/null +++ b/sc/qa/filter/html/data/numberformat.html @@ -0,0 +1,8 @@ + + +1,000.00 + + +2,000.00 + + diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx index 6ab2cc7fb0b7..b66976396f99 100644 --- a/sc/qa/filter/html/html.cxx +++ b/sc/qa/filter/html/html.cxx @@ -116,6 +116,33 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsBools) CPPUNIT_ASSERT_EQUAL(OUString("BOOLEAN"), pNumberFormat->GetFormatstring()); CPPUNIT_ASSERT_EQUAL(static_cast(0), pDoc->GetValue(/*col=*/0, /*row=*/1, /*tab=*/0)); } + +CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormattedNumber) +{ +// Given an empty document: +createScDoc(); + +// When pasting HTML with cells containing formatted numbers: +ScDocument* pDoc = getScDoc(); +ScAddress aCellPos(/*nColP=*/0, /*nRowP=*/0, /*nTabP=*/0); +ScImportExport aImporter(*pDoc, aCellPos); +SvFileStream aFile(createFileURL(u"numberformat.html"), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +aMemory.Seek(0); +CPPUNIT_ASSERT(aImporter.ImportStream(aMemory, OUString(), SotClipboardFormatId::HTML)); + +// Then make sure A1's type is a formatted number, value is 1000: +sal_uInt32 nNumberFormat = pDoc->GetNumberFormat(/*col=*/0, /*row=*/0, /*tab=*/0); +const SvNumberformat* pNumberFormat = pDoc->GetFormatTable()->GetEntry(nNumberFormat); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: #,##0.00 +// - Actual : General +// i.e. the number was wasted without a matching number format. +CPPUNIT_ASSERT_EQUAL(OUString("#,##0.00"), pNumberFormat->GetFormatstring()); +CPPUNIT_ASSERT_EQUAL(static_cast(1000), + pDoc->GetValue(/*col=*/0, /*row=*/0, /*tab=*/0)); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index be957b1851a5..14cd34b985aa 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -77,7 +77,6 @@ namespace /// data-sheets-value from google sheets, value is a JSON. void ParseDataSheetsValue(con
core.git: Branch 'libreoffice-24-2' - include/svtools sc/qa sc/source svtools/source
include/svtools/htmlkywd.hxx|1 + include/svtools/htmltokn.h |1 + sc/qa/filter/html/data/formula.html |7 +++ sc/qa/filter/html/html.cxx | 25 + sc/source/filter/html/htmlpars.cxx | 14 ++ sc/source/filter/inc/eeparser.hxx |2 ++ sc/source/filter/rtf/eeimpars.cxx |5 + svtools/source/svhtml/htmlkywd.cxx |1 + 8 files changed, 56 insertions(+) New commits: commit 0e6c93253c4ec5ef2e9c72a12c0331ff5a5e8051 Author: Miklos Vajna AuthorDate: Mon Feb 12 08:16:20 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 17:20:16 2024 +0100 tdf#159483 sc HTML paste: handle data-sheets-formula attribute When a formula cell gets copied from google docs, the value of the element only contains the formula result. This means once value cells and formula cells gets copied together, the pasted formula cell won't updated anymore when the input values change. Turns out there is a data-sheets-formula attribute on that contains the formula, it seems it uses the R1C1 format. Fix the problem by extending ScHTMLLayoutParser::TableDataOn() to parse this attribute and set a formula on the target cell (rather than a value) if the formula is available. This required also extending ScEEImport a bit, since the HTML paste builds on top of the RTF one in Calc. Change-Id: I720df96ce74a5e865b7329d06f3b719551f31b96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163234 Reviewed-by: Miklos Vajna Tested-by: Jenkins Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163246 diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 80e47b100187..36e853960feb 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -448,6 +448,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" #define OOO_STRING_SVTOOLS_HTML_O_DSnum "data-sheets-numberformat" +#define OOO_STRING_SVTOOLS_HTML_O_DSformula "data-sheets-formula" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index 21fcec800a9a..89d8ee868535 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -347,6 +347,7 @@ STRING_START= BOOL_END, DSVAL, SDNUM, // StarDiv NumberFormat DSNUM, +DSFORMULA, SDLIBRARY, SDMODULE, STRING_END, diff --git a/sc/qa/filter/html/data/formula.html b/sc/qa/filter/html/data/formula.html new file mode 100644 index ..f6c9245d4c02 --- /dev/null +++ b/sc/qa/filter/html/data/formula.html @@ -0,0 +1,7 @@ + + +1 +2 +3 + + diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx index b66976396f99..83e35d9f8281 100644 --- a/sc/qa/filter/html/html.cxx +++ b/sc/qa/filter/html/html.cxx @@ -143,6 +143,31 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormattedNumber) CPPUNIT_ASSERT_EQUAL(static_cast(1000), pDoc->GetValue(/*col=*/0, /*row=*/0, /*tab=*/0)); } + +CPPUNIT_TEST_FIXTURE(Test, testPasteTdAsFormula) +{ +// Given an empty document: +createScDoc(); + +// When pasting HTML with cells containing a formula: +ScDocument* pDoc = getScDoc(); +ScAddress aCellPos(/*nColP=*/0, /*nRowP=*/0, /*nTabP=*/0); +ScImportExport aImporter(*pDoc, aCellPos); +SvFileStream aFile(createFileURL(u"formula.html"), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +aMemory.Seek(0); +CPPUNIT_ASSERT(aImporter.ImportStream(aMemory, OUString(), SotClipboardFormatId::HTML)); + +// Then make sure C1 is a sum and it evaluates to 3: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: =SUM(A1:B1) +// - Actual : +// i.e. only the formula result was imported, not the formula. +CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A1:B1)"), + pDoc->GetFormula(/*col=*/2, /*row=*/0, /*tab=*/0)); +CPPUNIT_ASSERT_EQUAL(static_cast(3), pDoc->GetValue(/*col=*/2, /*row=*/0, /*tab=*/0)); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 14cd34b985aa..917a690c7090 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -152,6 +152,14 @@ void ParseDataSheetsNumberformat(const OUString& rDataSheetsValue, std::optional } } } + +/// data-sheets-formula from google sheets, grammar is R1C1 reference style. +void ParseDataSheetsFormula(const OUString& rDataSheetsFormula, std::optional& rVal, +std::optional& rGrammar) +{ +rVal = rDataSheetsFormula; +rGrammar = formula:
core.git: Branch 'libreoffice-24-2' - svx/source
svx/source/svdraw/svdhdl.cxx | 101 +-- 1 file changed, 51 insertions(+), 50 deletions(-) New commits: commit bcf75e6f07daa7e5444071d87b469f443aa7ef83 Author: Noel Grandin AuthorDate: Mon Feb 12 12:54:06 2024 +0200 Commit: Xisco Fauli CommitDate: Mon Feb 12 17:21:12 2024 +0100 tdf#159666 Crash when table and line object are selected at the same time before commit e3077168072452fb8f1c0a8afb2992877cb96d1c Author: Noel Grandin Date: Thu Jun 17 09:49:37 2021 +0200 loplugin:finalclasses the cast in const SdrEdgeObj* pEdge = static_cast(m_pObj); would incorrectly cast a SdrTableObj, but it happened to do nothing problematic. After the above commit, the vtable layout changed and it started crashing. Work around it by use dynamic_cast and ignoring objects that are not SdrEdgeObj. Change-Id: Ibe03d4935b8eeb182e037b1648d841e26fa23ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163242 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit bac09f76fd903c109b591a7bc15883e5653715ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163187 Reviewed-by: Xisco Fauli diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 867afa6a90b8..c8f1fa3159b7 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1604,66 +1604,67 @@ ImpEdgeHdl::~ImpEdgeHdl() void ImpEdgeHdl::CreateB2dIAObject() { -if(m_nObjHdlNum <= 1 && m_pObj) +if(m_nObjHdlNum > 1 || !m_pObj) { -// first throw away old one -GetRidOfIAObject(); +// call parent +SdrHdl::CreateB2dIAObject(); +return; +} -BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; -BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; +// first throw away old one +GetRidOfIAObject(); -if(m_pHdlList) -{ -SdrMarkView* pView = m_pHdlList->GetView(); +BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; +BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; -if(pView && !pView->areMarkHandlesHidden()) -{ -const SdrEdgeObj* pEdge = static_cast(m_pObj); +if(!m_pHdlList) +return; -if(pEdge->GetConnectedNode(m_nObjHdlNum == 0) != nullptr) -eColIndex = BitmapColorIndex::LightRed; +SdrMarkView* pView = m_pHdlList->GetView(); -if(m_nPPntNum < 2) -{ -// Handle with plus sign inside -eKindOfMarker = BitmapMarkerKind::Circ_7x7; -} +if(!pView || pView->areMarkHandlesHidden()) +return; -SdrPageView* pPageView = pView->GetSdrPageView(); +// tdf#159666 Crash when table and line object are selected at the same time +auto pEdge = dynamic_cast(m_pObj); +if (!pEdge) +return; -if(pPageView) -{ -for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) -{ -const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); - -if(rPageWindow.GetPaintWindow().OutputToWindow()) -{ -const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager(); -if (xManager.is()) -{ -basegfx::B2DPoint aPosition(m_aPos.X(), m_aPos.Y()); -std::unique_ptr pNewOverlayObject(CreateOverlayObject( -aPosition, -eColIndex, -eKindOfMarker)); - -// OVERLAYMANAGER -insertNewlyCreatedOverlayObjectForSdrHdl( -std::move(pNewOverlayObject), -rPageWindow.GetObjectContact(), -*xManager); -} -} -} -} -} -} +if(pEdge->GetConnectedNode(m_nObjHdlNum == 0) != nullptr) +eColIndex = BitmapColorIndex::LightRed; + +if(m_nPPntNum < 2) +{ +// Handle with plus sign inside +eKindOfMarker = BitmapMarkerKind::Circ_7x7; } -else + +SdrPageView* pPageView = pView->GetSdrPageView(); +if(!pPageView) +return; + +for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) { -// call parent -SdrHdl::CreateB2dIAObject(); +const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); + +if(rPageWindow.GetPaintWindow().OutputToWindow())
core.git: Branch 'libreoffice-7-6' - sw/qa writerfilter/source
sw/qa/extras/rtfexport/data/tdf158826_extraCR.rtf | 23 ++ sw/qa/extras/rtfexport/rtfexport8.cxx | 14 + writerfilter/source/rtftok/rtfdispatchflag.cxx|4 ++- 3 files changed, 40 insertions(+), 1 deletion(-) New commits: commit f2ebcfc09a9d2bac9792b0215f5d97bd990ffcef Author: Justin Luth AuthorDate: Wed Dec 27 18:58:33 2023 -0500 Commit: Xisco Fauli CommitDate: Mon Feb 12 17:35:28 2024 +0100 tdf#158826 rtfimport: ignore page break before document starts This avoids a 24.2 exposed bug from my commit 016f779ee6c7f601be3ae19dc57497e63a5bf817 RTF import simply cannot be relied upon to create paragraphs where they need to be. A side effect of fixing frames is that spurious paragraphs can be created, and if a frame starts the document, then an otherwise ignored page break can be attached to the second paragraph and thus become exposed. This seems pretty much like the RTF implementation of what was done for DOC and DOCX for tdf#118711. At least it is related. make CppunitTest_sw_rtfexport8 CPPUNIT_TEST_NAME=testTdf158826_extraCR The following unit tests trigger this code (with no visible change) abi10076.odt tdf121623.rtf tdf129513.rtf tdf131963.docx Change-Id: I21afa826b6f6fbb735591603a0620b8b47de517e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161374 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161395 (cherry picked from commit 8d37b8e6430715860934ccaec8c0d1b448ac4d8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163188 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/rtfexport/data/tdf158826_extraCR.rtf b/sw/qa/extras/rtfexport/data/tdf158826_extraCR.rtf new file mode 100644 index ..5461327da3ca --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf158826_extraCR.rtf @@ -0,0 +1,23 @@ +{ tf1 +\landscape\paperh5953\paperw8391\margl720\margr720\margt432\margb1728\gutter0\ltrsect + + +\pagebb +\intbl +\pvpg\phpg + +\posx720\posy432 +\dxfrtext187\dfrmtxtx187\dfrmtxty0 +\wraparoundspalphaspnum +aautodjustright + in0\lin0bsnoovrlp1\pararsid5332093\yts39 + + +\shp + + +a +++ +} diff --git a/sw/qa/extras/rtfexport/rtfexport8.cxx b/sw/qa/extras/rtfexport/rtfexport8.cxx index 97968caba437..0f01f4f36193 100644 --- a/sw/qa/extras/rtfexport/rtfexport8.cxx +++ b/sw/qa/extras/rtfexport/rtfexport8.cxx @@ -36,6 +36,8 @@ using namespace css; +namespace +{ class Test : public SwModelTestBase { public: @@ -141,6 +143,18 @@ DECLARE_RTFEXPORT_TEST(testAnnotationPar, "tdf136445-1-min.rtf") .isEmpty()); } +DECLARE_RTFEXPORT_TEST(testTdf158826_extraCR, "tdf158826_extraCR.rtf") +{ +// Note: this is a hand-minimized sample, and very likely doesn't follow RTF { } rules... + +// The page break defined before the document content should not cause a page break +CPPUNIT_ASSERT_EQUAL(1, getPages()); + +// There is a two-column floating table +uno::Reference xTable(getParagraphOrTable(1), uno::UNO_QUERY_THROW); +} + +} // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx index 23d8f5d1f59f..49e82d3b9a88 100644 --- a/writerfilter/source/rtftok/rtfdispatchflag.cxx +++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx @@ -520,7 +520,9 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) } break; case RTFKeyword::PAGEBB: -nParam = NS_ooxml::LN_CT_PPrBase_pageBreakBefore; +// ignore a page break that is defined before the document content has even started +if (!m_bFirstRun) +nParam = NS_ooxml::LN_CT_PPrBase_pageBreakBefore; break; default: break;
help.git: source/text
source/text/sbasic/shared/03/sf_datasheet.xhp |1 - 1 file changed, 1 deletion(-) New commits: commit 9e7c3f2c9147f60b6b9ba0a328951c094e133097 Author: Alain Romedenne AuthorDate: Mon Feb 12 11:27:38 2024 +0100 Commit: Alain Romedenne CommitDate: Mon Feb 12 17:40:42 2024 +0100 DataSheet help correction Change-Id: I3570ad7818df85f2dda3bbe81ecea59c9f16527f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/163182 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure Reviewed-by: Alain Romedenne diff --git a/source/text/sbasic/shared/03/sf_datasheet.xhp b/source/text/sbasic/shared/03/sf_datasheet.xhp index 803c7e694b..c503d35a4b 100644 --- a/source/text/sbasic/shared/03/sf_datasheet.xhp +++ b/source/text/sbasic/shared/03/sf_datasheet.xhp @@ -449,7 +449,6 @@ GoToCell Moves the cursor to the specified row and column. -This method does not change the position of the cursor in the data view window. svc.GoToCell(opt row: int, opt column: any): bool
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f6f325d58d74e95c5c173a88a0a7a0de10bb0f8b Author: Alain Romedenne AuthorDate: Mon Feb 12 17:40:43 2024 +0100 Commit: Gerrit Code Review CommitDate: Mon Feb 12 17:40:43 2024 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 9e7c3f2c9147f60b6b9ba0a328951c094e133097 - DataSheet help correction Change-Id: I3570ad7818df85f2dda3bbe81ecea59c9f16527f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/163182 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure Reviewed-by: Alain Romedenne diff --git a/helpcontent2 b/helpcontent2 index 84b2341aeb07..9e7c3f2c9147 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 84b2341aeb073ecc7d29228d9ddedc1ee0677a32 +Subproject commit 9e7c3f2c9147f60b6b9ba0a328951c094e133097
core.git: Branch 'libreoffice-7-6' - svgio/qa svgio/source
svgio/qa/cppunit/SvgImportTest.cxx | 21 ++--- svgio/qa/cppunit/data/tdf159594.svg |7 +++ svgio/source/svgreader/svgsymbolnode.cxx |8 +++- 3 files changed, 28 insertions(+), 8 deletions(-) New commits: commit 81454c1c3a98860a82fa54fd3a417d3bcb72f8ae Author: Xisco Fauli AuthorDate: Tue Feb 6 12:50:59 2024 +0100 Commit: Michael Weghorn CommitDate: Mon Feb 12 18:13:58 2024 +0100 tdf#159601, tdf#159594: reuse target for symbols' children Regression from e7186b49a9a0b24ddc3b1c5384b5d9facb03518c "tdf#158445: support viewBox in symbol elements" Change-Id: Ie2198c47149def17fa3cb612046b61bf32e873bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163046 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 8b7dbf40a06bc900562887889c17606ae5ef0587) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163015 Tested-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163127 Reviewed-by: Michael Weghorn diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index a97f5084cb38..90b62bcce7ff 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -1601,9 +1601,24 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158445) CPPUNIT_ASSERT (pDocument); -assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/polypolygoncolor", "color", "#00"); -assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/polypolygoncolor/polypolygon", "height", "8.052"); -assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/polypolygoncolor/polypolygon", "width", "5.328"); +assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor", "color", "#00"); +assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor/polypolygon", "height", "8.052"); +assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor/polypolygon", "width", "5.328"); +} + +CPPUNIT_TEST_FIXTURE(Test, testTdf159594) +{ +Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf159594.svg"); +CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength())); + +drawinglayer::Primitive2dXmlDump dumper; +xmlDocUniquePtr pDocument = dumper.dumpAndParse(Primitive2DContainer(aSequence)); + +CPPUNIT_ASSERT (pDocument); + +assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "color", "#00"); +assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor/polypolygon", "height", "11.671875"); +assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor/polypolygon", "width", "7.5"); } CPPUNIT_TEST_FIXTURE(Test, testTdf97663) diff --git a/svgio/qa/cppunit/data/tdf159594.svg b/svgio/qa/cppunit/data/tdf159594.svg new file mode 100644 index ..c2b470ec0fdc --- /dev/null +++ b/svgio/qa/cppunit/data/tdf159594.svg @@ -0,0 +1,7 @@ + +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; viewBox="0 0 100 100" version="1.1"> + + + + + diff --git a/svgio/source/svgreader/svgsymbolnode.cxx b/svgio/source/svgreader/svgsymbolnode.cxx index b5125357f61c..222880d1cba2 100644 --- a/svgio/source/svgreader/svgsymbolnode.cxx +++ b/svgio/source/svgreader/svgsymbolnode.cxx @@ -126,12 +126,10 @@ namespace svgio::svgreader void SvgSymbolNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const { -drawinglayer::primitive2d::Primitive2DContainer aNewTarget; - // decompose children -SvgNode::decomposeSvgNode(aNewTarget, bReferenced); +SvgNode::decomposeSvgNode(rTarget, bReferenced); -if(aNewTarget.empty()) +if (rTarget.empty()) return; if(getViewBox()) @@ -157,7 +155,7 @@ namespace svgio::svgreader const drawinglayer::primitive2d::Primitive2DReference xRef( new drawinglayer::primitive2d::TransformPrimitive2D( aEmbeddingTransform, -std::move(aNewTarget))); + drawinglayer::primitive2d::Primitive2DContainer(rTarget))); rTarget.push_back(xRef); }
core.git: 2 commits - configure.ac include/svx sw/inc sw/sdi sw/source sw/uiconfig
configure.ac|2 include/svx/relfld.hxx |1 sw/inc/cmdid.h |5 sw/inc/strings.hrc |7 + sw/sdi/_tabsh.sdi | 20 +++ sw/sdi/swriter.sdi | 50 + sw/source/uibase/shells/tabsh.cxx | 144 +++ sw/source/uibase/sidebar/TableEditPanel.cxx | 147 +++- sw/source/uibase/sidebar/TableEditPanel.hxx | 11 ++ sw/uiconfig/swriter/ui/sidebartableedit.ui | 115 + 10 files changed, 493 insertions(+), 9 deletions(-) New commits: commit 828d2637fd3120bfd342b41548caf9c55fc0f603 Author: Oliver Specht AuthorDate: Tue Jan 30 17:07:46 2024 +0100 Commit: Gabor Kelemen CommitDate: Mon Feb 12 18:17:18 2024 +0100 tdf#159662 Add table alignment and left/right spacing to sidebar in Writer Change-Id: I12d898f21ca8c7d581aaa1c587c5b6434a35f516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162769 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/include/svx/relfld.hxx b/include/svx/relfld.hxx index 8bc4c05580ec..85cec451cb94 100644 --- a/include/svx/relfld.hxx +++ b/include/svx/relfld.hxx @@ -46,6 +46,7 @@ public: voidEnableNegativeMode() {bNegativeEnabled = true;} void set_sensitive(bool sensitive) { m_xSpinButton->set_sensitive(sensitive); } +bool get_sensitive() const { return m_xSpinButton->get_sensitive(); } void set_value(int nValue, FieldUnit eValueUnit) { m_xSpinButton->set_value(nValue, eValueUnit); } int get_value(FieldUnit eDestUnit) const { return m_xSpinButton->get_value(eDestUnit); } int get_min(FieldUnit eValueUnit) const { return m_xSpinButton->get_min(eValueUnit); } diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 4773f173d603..e8521380c62c 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -520,7 +520,10 @@ class SwUINumRuleItem; #define FN_FORMAT_APPLY_DEFAULT (FN_FORMAT2 + 157) #define FN_FORMAT_APPLY_TEXTBODY(FN_FORMAT2 + 158) #define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159) -//free (160) +#define SID_ATTR_TABLE_ALIGNMENT(FN_FORMAT2 + 160) +#define SID_ATTR_TABLE_LEFT_SPACE (FN_FORMAT2 + 161) +#define SID_ATTR_TABLE_RIGHT_SPACE (FN_FORMAT2 + 162) +//free (163 except 194 already used above) // Region: Extras #define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* */ diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 8f3eadcab6d8..b3e9a9370bfc 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -1492,6 +1492,13 @@ #define STR_COMPAT_OPT_USEVARIABLEWIDTHNBSP NC_("STR_COMPAT_OPT_USEVARIABLEWIDTHNBSP", "Render non-breaking spaces (NBSP) as standard-space-width (off for fixed size)") #define STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER NC_("STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER", "Do not add an extra space after number in footnotes / endnotes with hanging first line") +#define STR_TABLE_PANEL_ALIGN_AUTO NC_("sidebartableedit|alignautolabel", "Automatic") +#define STR_TABLE_PANEL_ALIGN_LEFT NC_("sidebartableedit|alignleftlabel", "Left") +#define STR_TABLE_PANEL_ALIGN_FROM_LEFT NC_("sidebartableedit|alignfromleftlabel", "From left") +#define STR_TABLE_PANEL_ALIGN_RIGHT NC_("sidebartableedit|alignrightlabel", "Right") +#define STR_TABLE_PANEL_ALIGN_CENTER NC_("sidebartableedit|aligncenterlabel", "Center") +#define STR_TABLE_PANEL_ALIGN_MANUAL NC_("sidebartableedit|alignmanuallabel", "Manual") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/sdi/_tabsh.sdi b/sw/sdi/_tabsh.sdi index e4b6b9a2dd6c..7596d2c29bda 100644 --- a/sw/sdi/_tabsh.sdi +++ b/sw/sdi/_tabsh.sdi @@ -446,5 +446,25 @@ interface BaseTextTable StateMethod = GetState ; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + +SID_ATTR_TABLE_ALIGNMENT +[ +ExecMethod = Execute ; +StateMethod = GetState ; +DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; +] + +SID_ATTR_TABLE_LEFT_SPACE +[ +StateMethod = GetState ; +DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; +] + +SID_ATTR_TABLE_RIGHT_SPACE +[ +StateMethod = GetState ; +DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; +] + } diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 861d5ccec21a..16d939a8903d 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -8693,6 +8693,56 @@ SfxUInt32Item TableColumWidth SID_ATTR_TABLE_COLUMN_WIDTH GroupId = SfxGroupId::Table; ] +SfxUInt32Item TableAlignment SID_ATTR_TABLE_ALIGNMENT +(SfxInt32Item TableLeftSpace SID_ATTR_TABLE_LEFT_SPACE, SfxInt32Item TableRightSpace SID_ATTR_TABLE_RIGHT_SPACE) +[ +AutoUpdate = TRUE, +FastCall = FALSE, +ReadOnlyDoc =
core.git: 2 commits - bridges/IwyuFilter_bridges.yaml vcl/qt5
bridges/IwyuFilter_bridges.yaml |3 +++ vcl/qt5/QtFrame.cxx | 14 ++ 2 files changed, 17 insertions(+) New commits: commit cea0371ac77145ad1f3db7e558c279aeed6f4d00 Author: Michael Weghorn AuthorDate: Mon Feb 12 14:09:45 2024 +0100 Commit: Michael Weghorn CommitDate: Mon Feb 12 18:19:03 2024 +0100 tdf#125934 qt: Support module-specific window icons on Wayland As discussed in QTBUG-77182 [1], Qt currently doesn't provide API to directly set the app_id for a single window/toplevel on Wayland, but the one set for the application is used when the window gets shown. Make use of that by temporarily setting the app's desktop file name and doing a hide/show cycle in `QtFrame::SetIcon` on Wayland. A big thanks for David Redondo for mentioning that possibility in QTBUG-77182! An alternative would be to use private Qt API and low-level wayland API to set the app_id directly, s. discussion in QTBUG-77182. [1] https://bugreports.qt.io/browse/QTBUG-77182 Change-Id: I2a93cd39756e2ebf55b91486927d73d3896245b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163249 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 24dcb5ff6f61..6aff814aacd2 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -376,6 +376,20 @@ void QtFrame::SetIcon(sal_uInt16 nIcon) QIcon aIcon = QIcon::fromTheme(appicon); m_pQWidget->window()->setWindowIcon(aIcon); + +if (QGuiApplication::platformName() == "wayland" && m_pQWidget->window()->isVisible()) +{ +// Qt currently doesn't provide API to directly set the app_id for a single +// window/toplevel on Wayland, but the one set for the application is picked up +// on hide/show, so do that. +// An alternative would be to use private Qt API and low-level wayland API to set the +// app_id directly, s. discussion in QTBUG-77182. +const QString sOrigDesktopFileName = QGuiApplication::desktopFileName(); +QGuiApplication::setDesktopFileName(appicon); +m_pQWidget->window()->hide(); +m_pQWidget->window()->show(); +QGuiApplication::setDesktopFileName(sOrigDesktopFileName); +} } void QtFrame::SetMenu(SalMenu*) {} commit 9d994e7ba64588d144f028d8873bedae42f3d021 Author: Gabor Kelemen AuthorDate: Fri Feb 9 12:49:02 2024 +0100 Commit: Gabor Kelemen CommitDate: Mon Feb 12 18:18:59 2024 +0100 Fix IwyuFilter in bridges after commit b3fa6e6e65031f92d7f13b44f8422fe4aa07e2f9 Change-Id: I79e99d13d982f2190473904db4d63886c479b4f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163167 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/bridges/IwyuFilter_bridges.yaml b/bridges/IwyuFilter_bridges.yaml index 071db0504370..00fbd47b3e87 100644 --- a/bridges/IwyuFilter_bridges.yaml +++ b/bridges/IwyuFilter_bridges.yaml @@ -7,6 +7,9 @@ excludelist: bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx: # No .hxx -> .h replacement in URE headers - typelib/typedescription.hxx +bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx: +# Actually needed for ifdefs to work in all cases +- share.hxx bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx: # Actually needed - callvirtualmethod.hxx
core.git: config_host/config_options.h.in config_host.mk.in configure.ac solenv/gbuild
config_host.mk.in |1 config_host/config_options.h.in|2 configure.ac | 31 ++-- solenv/gbuild/extensions/pre_MergedLibsList.mk | 60 + 4 files changed, 87 insertions(+), 7 deletions(-) New commits: commit b663d94cf67a5af4fd89c1ac8bdffd6059f6bf85 Author: Noel Grandin AuthorDate: Mon Feb 5 08:50:24 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 12 18:52:42 2024 +0100 create --enable-mergelibs=more The existing --enable-mergelibs is in use by Linux distro people, who do not want any further mergeing because they want to be able to split libreoffice up into things like nogui, calc, writer, dbaccess, etc. So this work is to enable combining even more into libmerged for platforms like Windows and macOS and COOL, where we really want everything in one big lump of code. Change-Id: I4b268864955747d9859e16ebb569debbfc32fa78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162999 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/config_host.mk.in b/config_host.mk.in index ddca2a41ca05..04745d508fc3 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -479,6 +479,7 @@ export BUNDLE_MARIADB_CONNECTOR_C=@BUNDLE_MARIADB_CONNECTOR_C@ export MDDS_CFLAGS=$(gb_SPACE)@MDDS_CFLAGS@ export MDDS_LIBS=$(gb_SPACE)@MDDS_LIBS@ export MERGELIBS=@MERGELIBS@ +export MERGELIBS_MORE=@MERGELIBS_MORE@ export ML_EXE=@ML_EXE@ export MOC5=@MOC5@ export MOC6=@MOC6@ diff --git a/config_host/config_options.h.in b/config_host/config_options.h.in index 37f044f1b493..abce3417e45a 100644 --- a/config_host/config_options.h.in +++ b/config_host/config_options.h.in @@ -7,6 +7,8 @@ #define ENABLE_MERGELIBS 0 +#define ENABLE_MERGELIBS_MORE 0 + #define ENABLE_RUNTIME_OPTIMIZATIONS 0 // Used to turn off visibility for some classes/symbols when linking with --enable-mergelibs diff --git a/configure.ac b/configure.ac index 6440f1f734dc..48b325790b80 100644 --- a/configure.ac +++ b/configure.ac @@ -1525,8 +1525,11 @@ libo_FUZZ_ARG_ENABLE(skia, dnl -- *** -- libo_FUZZ_ARG_ENABLE(mergelibs, -AS_HELP_STRING([--enable-mergelibs], -[Merge several of the smaller libraries into one big, "merged", one.]) +AS_HELP_STRING([--enable-mergelibs=yes/no/more], +[Merge several of the smaller libraries into one big "merged" library. + The "more" option will link even more of the smaller libraries. + "more" not appropriate for distros which split up LibreOffice into multiple packages. + It is only appropriate for situations where all of LO is delivered in a single install/package. ]) ) libo_FUZZ_ARG_ENABLE(breakpad, @@ -14815,6 +14818,7 @@ AC_LANG_POP([C++]) # === AC_MSG_CHECKING([whether to create huge library]) MERGELIBS= +MERGELIBS_MORE= if test $_os = iOS -o $_os = Android; then # Never any point in mergelibs for these as we build just static @@ -14823,16 +14827,29 @@ if test $_os = iOS -o $_os = Android; then fi if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then -if test $_os != Linux -a $_os != WINNT; then -add_warning "--enable-mergelibs is not tested for this platform" +if test "$enable_mergelibs" = "more"; then +if test $_os != Linux; then +add_warning "--enable-mergelibs=more is not tested for this platform" +fi +MERGELIBS="TRUE" +MERGELIBS_MORE="TRUE" +AC_MSG_RESULT([yes (more)]) +AC_DEFINE(ENABLE_MERGELIBS) +elif test "$enable_mergelibs" = "yes" -o "$enable_mergelibs" = ""; then +if test $_os != Linux -a $_os != WINNT; then +add_warning "--enable-mergelibs is not tested for this platform" +fi +MERGELIBS="TRUE" +AC_MSG_RESULT([yes]) +AC_DEFINE(ENABLE_MERGELIBS) +else +AC_MSG_ERROR([unknown value --enable-mergelibs=$enable_mergelibs]) fi -MERGELIBS="TRUE" -AC_MSG_RESULT([yes]) -AC_DEFINE(ENABLE_MERGELIBS) else AC_MSG_RESULT([no]) fi AC_SUBST([MERGELIBS]) +AC_SUBST([MERGELIBS_MORE]) dnl === dnl icerun is a wrapper that stops us spawning tens of processes diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk index 2763929de360..c2ec1e3b083b 100644 --- a/solenv/gbuild/extensions/pre_MergedLibsList.mk +++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk @@ -113,6 +113,66 @@ gb_MERGE_LIBRARY_LIST := \ xsltfilter \ xstor \ +# if we have --enable-mergelibs=more +ifneq ($(MERGELIBS_MORE),) + +gb_MERGE_LIBRARY_LIST += \ + analysis \ + animcore \ + $(call gb_Helper_optional,AVMEDIA, \ + $(if $(filter MACOSX,$(OS)),\ +
core.git: include/rtl sal/rtl
include/rtl/bootstrap.h | 14 +++--- sal/rtl/bootstrap.cxx | 112 ++-- 2 files changed, 89 insertions(+), 37 deletions(-) New commits: commit 8b53fa726e0d496f18228b0ca9ce2f61196f6a57 Author: Stephan Bergmann AuthorDate: Tue Jan 16 14:41:21 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 12 19:02:13 2024 +0100 Introduce a fundamental.override.ini for bootstrap variables ...that is looked for next to the application and, when present, overrides all the other ways of setting bootstrap variables. LibreOffice itself does not bring along such a fundamental.override.ini, but it can be convenient for an administrator to place one in the installation (which can then not be modified or overridden by end users). (For convenience, the naming of this ini-file starts to deviate from the old and rather pointless tradition of naming our ini-files *rc vs. *.ini on different platforms.) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162187 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann (cherry picked from commit f4d376e9a10a8c66f7f6ecfe6a1f4763c1927b52) Conflicts: sal/rtl/bootstrap.cxx Change-Id: I057cc67b1af1d806587c3a4dc0bc31c28e79d22b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163251 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/include/rtl/bootstrap.h b/include/rtl/bootstrap.h index e532cd0e3dac..b4d85305987b 100644 --- a/include/rtl/bootstrap.h +++ b/include/rtl/bootstrap.h @@ -45,27 +45,29 @@ extern "C" { the next level is tried. Every query starts at the first level again, so that one setting may be taken from the 3rd and one from the 1st level. - 1st level: explicitly set variables via rtl_bootstrap_set() + 1st level: a fundamental.override.ini next to the application - 2nd level: command line arguments. A `-env:SETTINGNAME=value` is given on + 2nd level: explicitly set variables via rtl_bootstrap_set() + + 3rd level: command line arguments. A `-env:SETTINGNAME=value` is given on command line. This allows giving an application a certain setting, even if an ini-file exists (especially useful for e.g. daemons that want to start an executable with dynamical changing settings). - 3rd level: environment variables. The application tries to get the + 4th level: environment variables. The application tries to get the setting from the environment. - 4th level: executable ini-file. Every application looks for an ini-file. + 5th level: executable ini-file. Every application looks for an ini-file. The filename defaults to `/absolute/path/to/executable[rc|.ini]` without .bin or .exe suffix. The ini-filename can be set by the special command line parameter `-env:INIFILENAME=/absolute/path/to/inifile` at runtime or it may be set at compile time by an API-call. - 5th level: URE_BOOTSTRAP ini-file. If the bootstrap variable URE_BOOTSTRAP + 6th level: URE_BOOTSTRAP ini-file. If the bootstrap variable URE_BOOTSTRAP expands to the URL of an ini-file, that ini-file is searched. - 6th level: default. An application can have some default settings decided + 7th level: default. An application can have some default settings decided at compile time, which allow the application to run even with no deployment settings. diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index a3ada36a4439..27773e8a3b42 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -207,37 +207,44 @@ static void getExecutableDirectory_Impl(rtl_uString ** ppDirURL) rtl_uString_newFromStr_WithLength(ppDirURL,fileName.getStr(),nDirEnd); } -static OUString & getIniFileName_Impl() -{ -static OUString aStaticName = []() { -OUString fileName; +static OUString getIniFileName(bool overriding) { +OUString fileName; #if defined IOS -// On iOS hardcode the inifile as "rc" in the .app -// directory. Apps are self-contained anyway, there is no -// possibility to have several "applications" in the same -// installation location with different inifiles. -const char *inifile = [[@"vnd.sun.star.pathname:" stringByAppendingString: [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: @"rc"]] UTF8String]; -fileName = OUString(inifile, strlen(inifile), RTL_TEXTENCODING_UTF8); -resolvePathnameUrl(&fileName); +// On iOS hardcode the inifile as "rc" in the .app +// directory. Apps are self-contained anyway, there is no +// possibility to have several "applications" in the same +// installation location with different inifiles. +const char *inifile = [[@"vnd.sun.star.pathname:" stringByAppendingString: [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: (overriding ? @"fundamental.override.ini" : @"rc")]] UTF8String]; +fi
core.git: sal/rtl
sal/rtl/bootstrap.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit a993b2823a106d15a50005567266acfe2f65e28f Author: Stephan Bergmann AuthorDate: Fri Jan 26 12:43:37 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 12 19:43:06 2024 +0100 Log uses of fundamental.override.ini Change-Id: I36fa44b063a439edf5411a89f76ec342b1388351 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162601 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann (cherry picked from commit 6d553405101090ef7a7ff5270e5ef32aa41bd9b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163254 Tested-by: Jenkins diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index 27773e8a3b42..485d582cc875 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -479,7 +479,10 @@ bool Bootstrap_Impl::getValue( if (_override_base_ini != nullptr && _override_base_ini->getDirectValue(key, value, mode, requestStack)) +{ +SAL_INFO("sal.bootstrap", "getValue(" << key << ") from fundamental.override.ini"); return true; +} if (key == "_OS") {
core.git: bin/find-mergedlib-can-be-private.classes.results chart2/inc chart2/source include/basegfx include/comphelper include/docmodel include/drawinglayer include/editeng include/filter include/fra
bin/find-mergedlib-can-be-private.classes.results | 351 -- chart2/inc/ChartModel.hxx | 2 chart2/inc/ChartTypeManager.hxx| 3 chart2/inc/ChartView.hxx | 2 chart2/source/inc/Axis.hxx | 2 chart2/source/inc/AxisHelper.hxx | 3 chart2/source/inc/BaseGFXHelper.hxx| 23 chart2/source/inc/CharacterProperties.hxx | 8 chart2/source/inc/ChartModelHelper.hxx | 3 chart2/source/inc/ChartType.hxx| 2 chart2/source/inc/ChartTypeHelper.hxx | 3 chart2/source/inc/ChartTypeTemplate.hxx| 2 chart2/source/inc/ChartViewHelper.hxx | 9 chart2/source/inc/ColorPerPointHelper.hxx | 3 chart2/source/inc/ControllerLockGuard.hxx | 7 chart2/source/inc/DataSeries.hxx | 2 chart2/source/inc/DataSeriesHelper.hxx | 72 +- chart2/source/inc/DataSource.hxx | 3 chart2/source/inc/DataSourceHelper.hxx | 3 chart2/source/inc/DataTable.hxx| 4 chart2/source/inc/Diagram.hxx | 2 chart2/source/inc/DiagramHelper.hxx| 2 chart2/source/inc/ErrorBar.hxx | 3 chart2/source/inc/ExplicitCategoriesProvider.hxx | 3 chart2/source/inc/FillProperties.hxx | 4 chart2/source/inc/GridProperties.hxx | 2 chart2/source/inc/LabeledDataSequence.hxx | 3 chart2/source/inc/Legend.hxx | 2 chart2/source/inc/LegendHelper.hxx | 3 chart2/source/inc/LifeTime.hxx | 3 chart2/source/inc/LinePropertiesHelper.hxx | 4 chart2/source/inc/MediaDescriptorHelper.hxx| 3 chart2/source/inc/ModifyListenerCallBack.hxx | 3 chart2/source/inc/NumberFormatterWrapper.hxx | 3 chart2/source/inc/OPropertySet.hxx | 4 chart2/source/inc/ObjectIdentifier.hxx | 2 chart2/source/inc/PopupRequest.hxx | 3 chart2/source/inc/PropertyHelper.hxx | 17 chart2/source/inc/ReferenceSizeProvider.hxx| 2 chart2/source/inc/RegressionCurveHelper.hxx| 61 - chart2/source/inc/RelativePositionHelper.hxx | 3 chart2/source/inc/RelativeSizeHelper.hxx | 3 chart2/source/inc/SceneProperties.hxx | 5 chart2/source/inc/StatisticsHelper.hxx | 25 chart2/source/inc/ThreeDHelper.hxx | 3 chart2/source/inc/Title.hxx| 2 chart2/source/inc/TitleHelper.hxx | 2 chart2/source/inc/UserDefinedProperties.hxx| 3 chart2/source/inc/WrappedDefaultProperty.hxx | 2 chart2/source/inc/WrappedDirectStateProperty.hxx | 2 chart2/source/inc/WrappedIgnoreProperty.hxx| 4 chart2/source/inc/WrappedProperty.hxx | 3 chart2/source/inc/WrappedPropertySet.hxx | 3 chart2/source/inc/chartview/DataPointSymbolSupplier.hxx| 2 chart2/source/inc/chartview/DrawModelWrapper.hxx | 2 chart2/source/inc/chartview/ExplicitScaleValues.hxx| 5 chart2/source/inc/chartview/ExplicitValueProvider.hxx | 3 include/basegfx/color/bcolormodifier.hxx | 2 include/basegfx/utils/systemdependentdata.hxx
core.git: vcl/win
vcl/win/window/salframe.cxx | 39 ++- 1 file changed, 6 insertions(+), 33 deletions(-) New commits: commit 6047341fd5933ba96a07a0fc7c4b8ae1fb0e73d5 Author: Stephan Bergmann AuthorDate: Tue Jan 16 14:59:16 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 12 20:29:08 2024 +0100 EnableAttachThreadInputHack can be a normal bootstrap variable (For simplicity, only treat a value of exactly "true" as enabling it, not whatever else the original Boost property_tree code might have considered as equivalent to "true".) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162189 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann (cherry picked from commit b5ed6906bd215f1338ae49e33d484350a26cb25f) Conflicts: vcl/win/window/salframe.cxx Change-Id: I616c5d838d2b9046b3a92e01ebb68fc6deb37024 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163253 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 313ae0ffcf2d..121596eb5b8c 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -32,12 +32,7 @@ #include -#include -#include -#include -#include -#include - +#include #include #include #include @@ -1951,33 +1946,11 @@ void WinSalFrame::SetAlwaysOnTop( bool bOnTop ) static bool EnableAttachThreadInputHack() { -OUString aBootstrapUri; -if (osl_getProcessWorkingDir(&aBootstrapUri.pData) != osl_Process_E_None) -return false; -aBootstrapUri += "/bootstrap.ini"; - -OUString aSystemFileName; -if (osl::FileBase::getSystemPathFromFileURL(aBootstrapUri, aSystemFileName) != osl::FileBase::E_None) -return false; -if (aSystemFileName.getLength() > MAX_PATH) -return false; - -// this uses the Boost ini parser, instead of tools::Config, as we already use it to read other -// values from bootstrap.ini in desktop/win32/source/loader.cxx, because that watchdog process -// can't access LO libs. This way the handling is consistent. -try -{ -boost::property_tree::ptree pt; -std::ifstream aFile(o3tl::toW(aSystemFileName.getStr())); -boost::property_tree::ini_parser::read_ini(aFile, pt); -const bool bEnabled = pt.get("Win32.EnableAttachThreadInputHack", false); -SAL_WARN_IF(bEnabled, "vcl", "AttachThreadInput hack is enabled. Watch out for deadlocks!"); -return bEnabled; -} -catch (...) -{ -return false; -} +OUString s("$EnableAttachThreadInputHack"); +rtl::Bootstrap::expandMacros(s); +const bool bEnabled = s == "true"; +SAL_WARN_IF(bEnabled, "vcl", "AttachThreadInput hack is enabled. Watch out for deadlocks!"); +return bEnabled; } static void ImplSalToTop( HWND hWnd, SalFrameToTop nFlags )
core.git: desktop/win32
desktop/win32/source/loader.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit c84e8a14e476a70989e66df142e7b2426df02617 Author: Stephan Bergmann AuthorDate: Tue Jan 16 14:55:03 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 12 20:37:52 2024 +0100 Search for load-time variables in fundamental.override.ini ...instead of arbitrarily cramming them into bootstrap.ini. (And don't force those ini-files to have an additional [Win32] section, when include/rtl/bootstrap.h demands that "An ini-file is only allowed to have one section, which must be named `[Bootstrap]` with the square brackets.") Change-Id: I732bf9d771ea309eccd35b6db0f565a0c56a3c3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162188 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann (cherry picked from commit 50b14f26de63d22b9ad05ca51d9edc53e024e75e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163252 Tested-by: Jenkins diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index b730d4119695..998eb189effc 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -215,11 +215,11 @@ int officeloader_impl(bool bAllowConsole) bool fSuccess = false; bool bFirst = true; -// read limit values from bootstrap.ini +// read limit values from fundamental.override.ini unsigned int nMaxMemoryInMB = 0; bool bExcludeChildProcesses = true; -const WCHAR* szIniFile = L"\bootstrap.ini"; +const WCHAR* szIniFile = L"\fundamental.override.ini"; const size_t nDirLen = wcslen(szIniDirectory); if (wcslen(szIniFile) + nDirLen < MAX_PATH) { @@ -232,8 +232,8 @@ int officeloader_impl(bool bAllowConsole) boost::property_tree::ptree pt; std::ifstream aFile(szBootstrapIni); boost::property_tree::ini_parser::read_ini(aFile, pt); -nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", nMaxMemoryInMB); -bExcludeChildProcesses = pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses); +nMaxMemoryInMB = pt.get("Bootstrap.LimitMaximumMemoryInMB", nMaxMemoryInMB); +bExcludeChildProcesses = pt.get("Bootstrap.ExcludeChildProcessesFromLimit", bExcludeChildProcesses); } catch (...) {
core.git: Branch 'libreoffice-24-2' - sd/qa
sd/qa/unit/data/tdf159666.odg |binary sd/qa/unit/uiimpress.cxx | 21 + 2 files changed, 21 insertions(+) New commits: commit 98af2dc233f6ac154afe4a8e53ff97062577c21c Author: Xisco Fauli AuthorDate: Mon Feb 12 16:35:49 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 21:00:45 2024 +0100 tdf#159666: sd_uiimpress: Add unittest Change-Id: Id5e35e1514695bffeced718d48dcfeffc4a4d4d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163271 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sd/qa/unit/data/tdf159666.odg b/sd/qa/unit/data/tdf159666.odg new file mode 100644 index ..6b407597f7ca Binary files /dev/null and b/sd/qa/unit/data/tdf159666.odg differ diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 41c685feef36..d03e85dab6c8 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -288,6 +288,27 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf124708) CPPUNIT_ASSERT_EQUAL(static_cast(16), pActualPage->GetObjCount()); } +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf159666) +{ +createSdDrawDoc("tdf159666.odg"); + +auto pXImpressDocument = dynamic_cast(mxComponent.get()); +sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); +SdPage* pActualPage = pViewShell->GetActualPage(); +CPPUNIT_ASSERT_EQUAL(static_cast(12), pActualPage->GetObjCount()); + +// Without the fix in place, this test would have crashed here +dispatchCommand(mxComponent, ".uno:SelectAll", {}); + +dispatchCommand(mxComponent, ".uno:Delete", {}); + +CPPUNIT_ASSERT_EQUAL(static_cast(0), pActualPage->GetObjCount()); + +dispatchCommand(mxComponent, ".uno:Undo", {}); + +CPPUNIT_ASSERT_EQUAL(static_cast(12), pActualPage->GetObjCount()); +} + CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf143412) { createSdImpressDoc();
core.git: sd/qa
sd/qa/unit/data/tdf159666.odg |binary sd/qa/unit/uiimpress.cxx | 21 + 2 files changed, 21 insertions(+) New commits: commit 0ac4f5130e823bb64c0519838ebe3aab1da97aaf Author: Xisco Fauli AuthorDate: Mon Feb 12 16:35:49 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 12 21:00:39 2024 +0100 tdf#159666: sd_uiimpress: Add unittest Change-Id: Id5e35e1514695bffeced718d48dcfeffc4a4d4d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163250 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sd/qa/unit/data/tdf159666.odg b/sd/qa/unit/data/tdf159666.odg new file mode 100644 index ..6b407597f7ca Binary files /dev/null and b/sd/qa/unit/data/tdf159666.odg differ diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 41c685feef36..d03e85dab6c8 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -288,6 +288,27 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf124708) CPPUNIT_ASSERT_EQUAL(static_cast(16), pActualPage->GetObjCount()); } +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf159666) +{ +createSdDrawDoc("tdf159666.odg"); + +auto pXImpressDocument = dynamic_cast(mxComponent.get()); +sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); +SdPage* pActualPage = pViewShell->GetActualPage(); +CPPUNIT_ASSERT_EQUAL(static_cast(12), pActualPage->GetObjCount()); + +// Without the fix in place, this test would have crashed here +dispatchCommand(mxComponent, ".uno:SelectAll", {}); + +dispatchCommand(mxComponent, ".uno:Delete", {}); + +CPPUNIT_ASSERT_EQUAL(static_cast(0), pActualPage->GetObjCount()); + +dispatchCommand(mxComponent, ".uno:Undo", {}); + +CPPUNIT_ASSERT_EQUAL(static_cast(12), pActualPage->GetObjCount()); +} + CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf143412) { createSdImpressDoc();
core.git: Branch 'distro/collabora/co-23.05' - sc/qa sc/source
sc/qa/unit/tiledrendering/tiledrendering.cxx | 26 +++--- sc/source/ui/inc/tabview.hxx |2 ++ sc/source/ui/view/tabview3.cxx | 14 +- sc/source/ui/view/tabview5.cxx | 22 -- 4 files changed, 38 insertions(+), 26 deletions(-) New commits: commit 9f3ee2b27ceeab175fb865a55cfeabd66fbb128d Author: Caolán McNamara AuthorDate: Sun Jan 14 16:29:56 2024 + Commit: Michael Meeks CommitDate: Mon Feb 12 21:36:55 2024 +0100 don't invalidate when switching tabs Change-Id: If013bb2a2d4de32da21ef6a86cc2237c6e75c0e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162049 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 7ec0d730180d..7dc38facfa8e 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -141,7 +141,7 @@ public: void testVbaRangeCopyPaste(); void testInvalidationLoop(); void testPageDownInvalidation(); -void testSheetChangeInvalidation(); +void testSheetChangeNoInvalidation(); void testInsertDeletePageInvalidation(); void testGetRowColumnHeadersInvalidation(); void testJumpHorizontallyInvalidation(); @@ -213,7 +213,7 @@ public: CPPUNIT_TEST(testVbaRangeCopyPaste); CPPUNIT_TEST(testInvalidationLoop); CPPUNIT_TEST(testPageDownInvalidation); -CPPUNIT_TEST(testSheetChangeInvalidation); +CPPUNIT_TEST(testSheetChangeNoInvalidation); CPPUNIT_TEST(testInsertDeletePageInvalidation); CPPUNIT_TEST(testGetRowColumnHeadersInvalidation); CPPUNIT_TEST(testJumpHorizontallyInvalidation); @@ -2011,13 +2011,12 @@ void ScTiledRenderingTest::testPageDownInvalidation() CPPUNIT_ASSERT_EQUAL(tools::Rectangle(15, 15, 1230, 225), aView1.m_aInvalidations[0]); } -void ScTiledRenderingTest::testSheetChangeInvalidation() +void ScTiledRenderingTest::testSheetChangeNoInvalidation() { const bool oldPartInInvalidation = comphelper::LibreOfficeKit::isPartInInvalidation(); comphelper::LibreOfficeKit::setPartInInvalidation(true); ScModelObj* pModelObj = createDoc("two_sheets.ods"); -ScDocument* pDoc = pModelObj->GetDocument(); ScViewData* pViewData = ScDocShell::GetViewData(); CPPUNIT_ASSERT(pViewData); @@ -2033,19 +2032,8 @@ void ScTiledRenderingTest::testSheetChangeInvalidation() pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | KEY_MOD1); pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | KEY_MOD1); Scheduler::ProcessEventsToIdle(); -CPPUNIT_ASSERT(aView1.m_bInvalidateTiles); -CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidations.size()); -const ScSheetLimits& rLimits = pDoc->GetSheetLimits(); -CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1280 * rLimits.GetMaxColCount(), - 256 * rLimits.GetMaxRowCount()), - aView1.m_aInvalidations[0]); -CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 10, 10), aView1.m_aInvalidations[1]); -CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidationsParts.size()); -CPPUNIT_ASSERT_EQUAL(pModelObj->getPart(), aView1.m_aInvalidationsParts[0]); -CPPUNIT_ASSERT_EQUAL(pModelObj->getPart(), aView1.m_aInvalidationsParts[1]); -CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidationsMode.size()); -CPPUNIT_ASSERT_EQUAL(pModelObj->getEditMode(), aView1.m_aInvalidationsMode[0]); -CPPUNIT_ASSERT_EQUAL(pModelObj->getEditMode(), aView1.m_aInvalidationsMode[1]); +// switching sheets should trigger no invalidations +CPPUNIT_ASSERT(!aView1.m_bInvalidateTiles); comphelper::LibreOfficeKit::setPartInInvalidation(oldPartInInvalidation); } @@ -2072,7 +2060,7 @@ void ScTiledRenderingTest::testInsertDeletePageInvalidation() dispatchCommand(mxComponent, ".uno:Insert", aArgs); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(aView1.m_bInvalidateTiles); -CPPUNIT_ASSERT_EQUAL(size_t(6), aView1.m_aInvalidations.size()); +CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidations.size()); CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 10, 10), aView1.m_aInvalidations[0]); CPPUNIT_ASSERT_EQUAL(2, pModelObj->getParts()); @@ -2085,7 +2073,7 @@ void ScTiledRenderingTest::testInsertDeletePageInvalidation() dispatchCommand(mxComponent, ".uno:Remove", aArgs2); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(aView1.m_bInvalidateTiles); -CPPUNIT_ASSERT_EQUAL(size_t(5), aView1.m_aInvalidations.size()); +CPPUNIT_ASSERT_EQUAL(size_t(1), aView1.m_aInvalidations.size()); CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 10, 10), aView1.m_aInvalidations[0]); CPPUNIT_ASSERT_EQUAL(1, pModelObj->getParts()); } diff --git a/sc/source/
core.git: Branch 'libreoffice-7-6' - svx/source
svx/source/svdraw/svdhdl.cxx | 101 +-- 1 file changed, 51 insertions(+), 50 deletions(-) New commits: commit da4ed866e4434f4c0c3487a983bd97879d197076 Author: Noel Grandin AuthorDate: Mon Feb 12 12:54:06 2024 +0200 Commit: Xisco Fauli CommitDate: Mon Feb 12 22:27:49 2024 +0100 tdf#159666 Crash when table and line object are selected at the same time before commit e3077168072452fb8f1c0a8afb2992877cb96d1c Author: Noel Grandin Date: Thu Jun 17 09:49:37 2021 +0200 loplugin:finalclasses the cast in const SdrEdgeObj* pEdge = static_cast(m_pObj); would incorrectly cast a SdrTableObj, but it happened to do nothing problematic. After the above commit, the vtable layout changed and it started crashing. Work around it by use dynamic_cast and ignoring objects that are not SdrEdgeObj. Change-Id: Ibe03d4935b8eeb182e037b1648d841e26fa23ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163242 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit bac09f76fd903c109b591a7bc15883e5653715ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163187 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163256 diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 64f29976f5ca..62851f9b6331 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1604,66 +1604,67 @@ ImpEdgeHdl::~ImpEdgeHdl() void ImpEdgeHdl::CreateB2dIAObject() { -if(nObjHdlNum <= 1 && pObj) +if(nObjHdlNum > 1 || !pObj) { -// first throw away old one -GetRidOfIAObject(); +// call parent +SdrHdl::CreateB2dIAObject(); +return; +} -BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; -BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; +// first throw away old one +GetRidOfIAObject(); -if(pHdlList) -{ -SdrMarkView* pView = pHdlList->GetView(); +BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; +BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; -if(pView && !pView->areMarkHandlesHidden()) -{ -const SdrEdgeObj* pEdge = static_cast(pObj); +if(!pHdlList) +return; -if(pEdge->GetConnectedNode(nObjHdlNum == 0) != nullptr) -eColIndex = BitmapColorIndex::LightRed; +SdrMarkView* pView = pHdlList->GetView(); -if(nPPntNum < 2) -{ -// Handle with plus sign inside -eKindOfMarker = BitmapMarkerKind::Circ_7x7; -} +if(!pView || pView->areMarkHandlesHidden()) +return; -SdrPageView* pPageView = pView->GetSdrPageView(); +// tdf#159666 Crash when table and line object are selected at the same time +auto pEdge = dynamic_cast(pObj); +if (!pEdge) +return; -if(pPageView) -{ -for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) -{ -const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); - -if(rPageWindow.GetPaintWindow().OutputToWindow()) -{ -const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager(); -if (xManager.is()) -{ -basegfx::B2DPoint aPosition(aPos.X(), aPos.Y()); -std::unique_ptr pNewOverlayObject(CreateOverlayObject( -aPosition, -eColIndex, -eKindOfMarker)); - -// OVERLAYMANAGER -insertNewlyCreatedOverlayObjectForSdrHdl( -std::move(pNewOverlayObject), -rPageWindow.GetObjectContact(), -*xManager); -} -} -} -} -} -} +if(pEdge->GetConnectedNode(nObjHdlNum == 0) != nullptr) +eColIndex = BitmapColorIndex::LightRed; + +if(nPPntNum < 2) +{ +// Handle with plus sign inside +eKindOfMarker = BitmapMarkerKind::Circ_7x7; } -else + +SdrPageView* pPageView = pView->GetSdrPageView(); +if(!pPageView) +return; + +for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) { -// call parent -SdrHdl::CreateB2dIAObject(); +const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(
core.git: vcl/jsdialog
vcl/jsdialog/enabled.cxx |4 1 file changed, 4 insertions(+) New commits: commit b34c69dd09069c4bb34fe4fe3225d304317999f1 Author: Szymon Kłos AuthorDate: Sun Jan 28 22:28:40 2024 +0100 Commit: Szymon Kłos CommitDate: Mon Feb 12 22:48:02 2024 +0100 jsdialog: enable animation properties in impress to test: 1. click on any shape in Impress 2. go to Animation tab in sidebar 3. "add" animation 4. double-click on added animation on the list Signed-off-by: Szymon Kłos Change-Id: I009cbdd295fac4f4533101c89d5c0268fbbe633a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162725 Tested-by: Jenkins diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index beb12b5dd081..6d5acc3dc538 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -167,6 +167,10 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/sdraw/ui/drawpagedialog.ui" || rUIFile == u"modules/sdraw/ui/drawparadialog.ui" // simpress +|| rUIFile == u"modules/simpress/ui/customanimationeffecttab.ui" +|| rUIFile == u"modules/simpress/ui/customanimationproperties.ui" +|| rUIFile == u"modules/simpress/ui/customanimationtexttab.ui" +|| rUIFile == u"modules/simpress/ui/customanimationtimingtab.ui" || rUIFile == u"modules/simpress/ui/headerfooterdialog.ui" || rUIFile == u"modules/simpress/ui/headerfootertab.ui" // swriter
dictionaries.git: af_ZA/af_ZA.aff af_ZA/af_ZA.dic af_ZA/description.xml
af_ZA/af_ZA.aff | 175 af_ZA/af_ZA.dic |30255 -- af_ZA/description.xml |2 3 files changed, 12710 insertions(+), 17722 deletions(-) New commits: commit 892f0f402cf8347aa3273f774365c094c310cf1b Author: Kris van der Merwe AuthorDate: Tue Feb 13 00:31:19 2024 +0100 Commit: Andras Timar CommitDate: Tue Feb 13 00:32:39 2024 +0100 Updated Afrikaans dictionary Change-Id: Ief9cb53fdcbf794d1c54f4f5008f80b9975453d8 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/163265 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/af_ZA/af_ZA.aff b/af_ZA/af_ZA.aff index e8bb7de..33348f4 100644 --- a/af_ZA/af_ZA.aff +++ b/af_ZA/af_ZA.aff @@ -1,8 +1,7 @@ # af_ZA.aff - Afrikaans (af) affix file for use in hunspell # -# Copyright (C) 2020 Kris van der Merwe -# ... created from the Afrikaans ispell affix file by Dwayne Bailey -# ... created from the Afrikaans ispell affix file by Reinier de Vos +# Copyright (C) 2024 Kris van der Merwe +# ... created from the original Afrikaans ispell affix file by Dwayne Bailey and by Reinier de Vos # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -40,8 +39,8 @@ NOSPLITSUGS COMPOUNDMIN 1 ONLYINCOMPOUND c # nommer verbuiging reëls: -# ([23456789]|1?[0-9])de -# ([018]?|[2-9][0-9]+|[1-9]{3,})ste +# ([23456789]|1?[0-9])de +# ([018]?|[2-9][0-9]+|[1-9]{3,})ste # # COMPOUNDRULE het foute, eenvoudige reëls word dus gebruik @@ -73,12 +72,12 @@ MAP yÿý # kennis van wat maklik verwar word. # # Byvoorbeeld: -# g<->ch, vir foute soos gemikus of nongalant -# y<->ui<->ei, uu<->ie, vir oorronding en ontronding, en y/ei-verwarring -# ij -> y, lijk -> lik, vir foutiewe Nederlandse spellings -# kuste -> ci, kuste -> kusse, vir politikuste -> politici/politikusse -# ui oeï, vir foute soos Hinduisme -> Hindoeïsme -# ch->tj, sh -> sj, vir foute soos chips (tjips) en shoe (sjoe) +# g<->ch, vir foute soos gemikus of nongalant +# y<->ui<->ei, uu<->ie, vir oorronding en ontronding, en y/ei-verwarring +# ij -> y, lijk -> lik, vir foutiewe Nederlandse spellings +# kuste -> ci, kuste -> kusse, vir politikuste -> politici/politikusse +# ui oeï, vir foute soos Hinduisme -> Hindoeïsme +# ch->tj, sh -> sj, vir foute soos chips (tjips) en shoe (sjoe) # REP 27 REP g ch @@ -107,7 +106,7 @@ REP sh sj REP kie djie REP kie tjie REP ntjie nkie -REP aaitjie aadjie +REP aitjie adjie BREAK 2 BREAK - @@ -124,98 +123,113 @@ PFX A Y 1 PFX A 0 aan . PFX B Y 1 -PFX B 0 be . +PFX B 0 be .. PFX C Y 1 -PFX C 0 in . +PFX C 0 in .. SFX E N 2 -SFX E 0 e [^aeiou] +SFX E 0 e [^aeou] SFX E 0 'e [ghc]e PFX F Y 1 -PFX F 0 af . +PFX F 0 af .. PFX G Y 1 -PFX G 0 ge . +PFX G 0 ge .. SFX H N 2 SFX H 0 heid [^ëe] SFX H 0 nheid [ëe] SFX J N 16 -SFX J 0 tjie .[aeiouy] -SFX J 0 tjies .[aeiouy] -SFX J 0 tjie .[aeiouyëê][lnr] -SFX J 0 tjies .[aeiouyëê][lnr] -SFX J 0 etjie ^.{1,3}[aeiouyëê]ng -SFX J 0 etjies ^.{1,3}[aeiouyëê]ng -SFX J 0 pie .[aeiou]m -SFX J 0 pies .[aeiou]m -SFX J 0 jie .[aeioun][dt] -SFX J 0 jies .[aeioun][dt] -SFX J 0 'tjies .+[^aeiouyëêlngrmdtp] -SFX J 0 'tjie .+[^aeiouyëêlngrmdtp] -SFX J 0 'etjies ^[flmnrsx] -SFX J 0 'etjie ^[flmnrsx] -SFX J 0 'tjies ^[^flmnrsx] -SFX J 0 'tjie ^[^flmnrsx] +SFX J 0 tjie .[aeiouy] +SFX J 0 tjies .[aeiouy] +SFX J 0 tjie .[aeiouyëê][lnr] +SFX J 0 tjies .[aeiouyëê][lnr] +SFX J 0 etjie [aeiouyëê]ng +SFX J 0 etjies [aeiouyëê]ng +SFX J 0 pie .[aeiou]m +SFX J 0 pies .[aeiou]m +SFX J 0 jie .[aeioun][dt] +SFX J 0 jies .[aeioun][dt] +SFX J 0 'tjies .+[^aeiouyëêlngrmdtp] +SFX J 0 'tjie .+[^aeiouyëêlngrmdtp] +SFX J 0 'etjies ^[flmnrsx] +SFX J 0 'etjie ^[flmnrsx] +SFX J 0 'tjies ^[^flmnrsx] +SFX J 0 'tjie ^[^flmnrsx] PFX K Y 1 PFX K 0 op . SFX L N 1 -SFX L 0 te . +SFX L 0 te . PFX M Y 1 PFX M 0 oor . SFX N N 1 -SFX N 0 de . +SFX N 0 de . PFX O Y 1 PFX O 0 on . SFX P N 32 -SFX P ad de aad -SFX P ag e aag -SFX P ak ke aak -SFX P al le aal -SFX P am me aam -SFX P an ne aan -SFX P ap pe aap -SFX P ar re aar -SFX P as se aas -SFX P at te aat -SFX P ed de eed -SFX P eg ge eeg -SFX P ek ke eek -SFX P el le eel -SFX P em me eem -SFX P id de heid -SFX P en ne [eï]en -SFX P ep pe eep -SFX P er re eer -SFX P es se ees -SFX P et te eet -SFX P od de ood -SFX P og ë oog -SFX P ok ke ook -SFX P ol le ool -SFX P om me oom -SFX P on ne oon -SFX P op pe oop -SFX P or re oor -SFX P ot te oot -SFX P un ne uun -SFX P ur re uur +SFX P ad de aad +SFX P ag e aag +SFX P ak ke aak +SFX P al le aal +SFX P am me aam +SFX P an ne aan +SFX P ap pe aap +SFX P ar re aar +SFX P as se aas +SFX P at te aat +SFX P ed de eed +SFX P eg ge eeg +SFX P ek ke eek +SFX P el le eel +SFX P em me eem +SFX P en ne [eï]en +SFX P ep pe eep +SFX P er re eer +SFX P es se ees +SFX P et te eet +SFX P od
core.git: dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ffccbf4762a9ae810bcdd21c41fccdd436e7bfc9 Author: Kris van der Merwe AuthorDate: Tue Feb 13 00:32:39 2024 +0100 Commit: Gerrit Code Review CommitDate: Tue Feb 13 00:32:39 2024 +0100 Update git submodules * Update dictionaries from branch 'master' to 892f0f402cf8347aa3273f774365c094c310cf1b - Updated Afrikaans dictionary Change-Id: Ief9cb53fdcbf794d1c54f4f5008f80b9975453d8 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/163265 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/dictionaries b/dictionaries index 208a9fd80b2a..892f0f402cf8 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 208a9fd80b2a182fe20f224cd615119c6323ae2e +Subproject commit 892f0f402cf8347aa3273f774365c094c310cf1b
Steven Casey license statement
All of my past and future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license.
core.git: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5121c1f8a3dc1e326a4195393f463f5c0383859b Author: Mike Kaganski AuthorDate: Mon Feb 12 12:50:05 2024 +0100 Commit: Mike Kaganski CommitDate: Tue Feb 13 05:09:43 2024 +0100 tdf#159689: trailing newline before "endstream" must not count in Length Change-Id: Ic1e636c9d4e5a531113f26e147427fb75ce3591c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163185 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 11a62a156bb0..321f628cbf7a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2775,7 +2775,7 @@ bool PDFWriterImpl::emitType3Font(const vcl::font::PhysicalFontFace* pFace, aLine.setLength(0); aLine.append(OString::number(nStream) + " 0 obj <> stream "); if (!writeBuffer(aLine)) return false;
core.git: basic/source
basic/source/runtime/methods.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 95dace2eb1ae7ce2fc000cc67e134b7bfadf2c35 Author: Adam Seskunas AuthorDate: Thu Feb 8 21:41:13 2024 -0800 Commit: Mike Kaganski CommitDate: Tue Feb 13 05:51:04 2024 +0100 tdf#154285 Check upper bound of arguments in SbRtl_CurDir The LibreOffice Basic specification says CurDir should accept one argument and in the case of a non-Windows system, ignore that argument and simply return the current directory. So check that SbRtl_CurDir accepts a maximum of two arguments. Change-Id: Ia60114fac31aa4261c8251e26ef172a0370e6abc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163150 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index d58a2cef9ee0..34d959669747 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -371,6 +371,9 @@ void SbRtl_CurDir(StarBASIC *, SbxArray & rPar, bool) // there's no possibility to detect the current one in a way that a virtual URL // could be delivered. +if (rPar.Count() > 2) + return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); + #if defined(_WIN32) int nCurDir = 0; // Current dir // JSM if (rPar.Count() == 2)
core.git: desktop/win32 vcl/win
desktop/win32/source/loader.cxx | 33 + vcl/win/window/salframe.cxx | 39 ++- 2 files changed, 71 insertions(+), 1 deletion(-) New commits: commit ebd3f0971b843527ed493a35b2303c8c15b94109 Author: Stephan Bergmann AuthorDate: Fri Jan 26 13:45:01 2024 +0100 Commit: Stephan Bergmann CommitDate: Tue Feb 13 08:11:57 2024 +0100 Fall back to old bootstrap.ini [Win32] section, for backwards compatibility Change-Id: I629b2a16bc889f16595cd1718d2ee4535f31aed7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162602 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann (cherry picked from commit fe459b9595c851d00a861d595c8dd50b35c90be3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163255 Tested-by: Jenkins diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 998eb189effc..bbc97a462724 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -218,6 +218,8 @@ int officeloader_impl(bool bAllowConsole) // read limit values from fundamental.override.ini unsigned int nMaxMemoryInMB = 0; bool bExcludeChildProcesses = true; +bool fallbackForMaxMemoryInMB = true; +bool fallbackForExcludeChildProcesses = true; const WCHAR* szIniFile = L"\fundamental.override.ini"; const size_t nDirLen = wcslen(szIniDirectory); @@ -233,13 +235,44 @@ int officeloader_impl(bool bAllowConsole) std::ifstream aFile(szBootstrapIni); boost::property_tree::ini_parser::read_ini(aFile, pt); nMaxMemoryInMB = pt.get("Bootstrap.LimitMaximumMemoryInMB", nMaxMemoryInMB); +fallbackForMaxMemoryInMB = !pt.get_child_optional("Bootstrap.LimitMaximumMemoryInMB"); bExcludeChildProcesses = pt.get("Bootstrap.ExcludeChildProcessesFromLimit", bExcludeChildProcesses); +fallbackForExcludeChildProcesses += !pt.get_child_optional("Bootstrap.ExcludeChildProcessesFromLimit"); } catch (...) { nMaxMemoryInMB = 0; } } +// For backwards compatibility, for now also try to read the values from bootstrap.ini if +// fundamental.override.ini does not provide them: +if (fallbackForMaxMemoryInMB || fallbackForExcludeChildProcesses) { +const WCHAR* szFallbackIniFile = L"\bootstrap.ini"; +const size_t nFallbackDirLen = wcslen(szIniDirectory); +if (wcslen(szFallbackIniFile) + nFallbackDirLen < MAX_PATH) +{ +WCHAR szBootstrapIni[MAX_PATH]; +wcscpy(szBootstrapIni, szIniDirectory); +wcscpy(&szBootstrapIni[nFallbackDirLen], szFallbackIniFile); + +try +{ +boost::property_tree::ptree pt; +std::ifstream aFile(szBootstrapIni); +boost::property_tree::ini_parser::read_ini(aFile, pt); +if (fallbackForMaxMemoryInMB) { +nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", nMaxMemoryInMB); +} +if (fallbackForExcludeChildProcesses) { +bExcludeChildProcesses = pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses); +} +} +catch (...) +{ +} +} +} // create a Windows JobObject with a memory limit HANDLE hJobObject = nullptr; diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 121596eb5b8c..797b5a80fc14 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -32,6 +32,12 @@ #include +#include +#include +#include +#include +#include + #include #include #include @@ -1948,7 +1954,38 @@ static bool EnableAttachThreadInputHack() { OUString s("$EnableAttachThreadInputHack"); rtl::Bootstrap::expandMacros(s); -const bool bEnabled = s == "true"; +bool bEnabled; +if (!s.isEmpty()) { +bEnabled = s == "true"; +} else { +// For backwards compatibility, for now also try to read the value from a [Win32] section of +// bootstrap.ini if it is not set as a boostrap variable: +bEnabled = false; +OUString aBootstrapUri; +if (osl_getProcessWorkingDir(&aBootstrapUri.pData) == osl_Process_E_None) { +aBootstrapUri += "/bootstrap.ini"; + +OUString aSystemFileName; +if (osl::FileBase::getSystemPathFromFileURL(aBootstrapUri, aSystemFileName) +== osl::FileBase::E_None +&& aSystemFileName.getLength() <= MAX_PATH) +{ +// this uses the Boost ini parser, instead of tools::Config, as we already use it to +// read other values from bootstrap.ini in desktop/win32/source/loader.cxx, because +// that watchdog process can't access LO libs. This way t
core.git: vcl/inc
vcl/inc/jsdialog/jsdialogbuilder.hxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 199b8ef1dffd3ef46b2319d9992c83ab47ccea05 Author: Szymon Kłos AuthorDate: Mon Feb 12 22:11:25 2024 +0100 Commit: Szymon Kłos CommitDate: Tue Feb 13 08:14:52 2024 +0100 jsdialog: use action for set_sensitive This will reduce protocol volume as we will send short message instead of JSON for the complete widget. Signed-off-by: Szymon Kłos Change-Id: I5e7541915f7e2da4bf822b99a05cc3066073334e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163279 Tested-by: Jenkins diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index e4fdd266851a..e24ff1589655 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -422,7 +422,12 @@ public: bool bIsSensitive = BaseInstanceClass::get_sensitive(); BaseInstanceClass::set_sensitive(sensitive); if (bIsSensitive != sensitive) -sendUpdate(); +{ +std::unique_ptr pMap += std::make_unique(); +(*pMap)[ACTION_TYPE ""_ostr] = (sensitive ? u"enable" : u"disable"); +sendAction(std::move(pMap)); +} } virtual css::uno::Reference get_drop_target() override
core.git: Branch 'distro/collabora/co-23.05' - sc/source
sc/source/ui/docshell/docfunc.cxx | 24 +++- sc/source/ui/inc/docsh.hxx|2 +- sc/source/ui/inc/viewdata.hxx |3 +++ sc/source/ui/view/tabview3.cxx|6 -- sc/source/ui/view/viewfun3.cxx|4 ++-- sc/source/ui/view/viewfunc.cxx| 32 +--- 6 files changed, 42 insertions(+), 29 deletions(-) New commits: commit 85db2b8338392525bb138f41a3175203c703bf73 Author: Caolán McNamara AuthorDate: Mon Feb 12 15:55:22 2024 + Commit: Miklos Vajna CommitDate: Tue Feb 13 08:16:08 2024 +0100 pass width hint around as twips and convert to pixel at the end reuse the device setup and twip calculation that GetOptimalColWidth uses and convert to pixel at the end with ViewData::toPixel Change-Id: Ie24a66dda2e642c23ae63ff915829dd910ee44dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163259 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 750fa3e01b18..71bb31545df4 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -671,24 +671,22 @@ bool ScDocFunc::DeleteContents( return true; } -tools::Long ScDocShell::GetPixelWidthHint(const ScAddress& rPos) +tools::Long ScDocShell::GetTwipWidthHint(const ScAddress& rPos) { ScViewData* pViewData = GetViewData(); if (!pViewData) return -1; ScSizeDeviceProvider aProv(this); -OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode -double nPPTX = aProv.GetPPTX(); -double nPPTY = aProv.GetPPTY(); +Fraction aZoomX, aZoomY; +double nPPTX, nPPTY; +pViewData->setupSizeDeviceProviderForColWidth(aProv, aZoomX, aZoomY, nPPTX, nPPTY); ScDocument& rDoc = GetDocument(); -Fraction aInvX(pViewData->GetZoomX().GetDenominator(), - pViewData->GetZoomX().GetNumerator()); -Fraction aInvY(pViewData->GetZoomY().GetDenominator(), - pViewData->GetZoomY().GetNumerator()); -return rDoc.GetNeededSize(rPos.Col(), rPos.Row(), rPos.Tab(), pDev, - nPPTX, nPPTY, aInvX, aInvY, true /*bWidth*/); +tools::Long nWidth = rDoc.GetNeededSize(rPos.Col(), rPos.Row(), rPos.Tab(), aProv.GetDevice(), +nPPTX, nPPTY, aZoomX, aZoomY, true /*bWidth*/); + +return (nWidth + 2) / nPPTX; // same as ScColumn::GetOptimalColWidth } bool ScDocFunc::DeleteCell( @@ -739,7 +737,7 @@ bool ScDocFunc::DeleteCell( pDataSpans = sc::DocFuncUtil::getNonEmptyCellSpans(rDoc, rMark, rPos); } -tools::Long nBefore(rDocShell.GetPixelWidthHint(rPos)); +tools::Long nBefore(rDocShell.GetTwipWidthHint(rPos)); rDoc.DeleteArea(rPos.Col(), rPos.Row(), rPos.Col(), rPos.Row(), rMark, nFlags); if (bRecord) @@ -854,9 +852,9 @@ bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, con aOldValues.push_back(aOldValue); } -tools::Long nBefore(rDocShell.GetPixelWidthHint(rPos)); +tools::Long nBefore(rDocShell.GetTwipWidthHint(rPos)); o_rbNumFmtSet = rDoc.SetString( rPos.Col(), rPos.Row(), rPos.Tab(), rText ); -tools::Long nAfter(rDocShell.GetPixelWidthHint(rPos)); +tools::Long nAfter(rDocShell.GetTwipWidthHint(rPos)); if (bUndo) { diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index b4a016d8fd68..be8f551fcab0 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -315,7 +315,7 @@ public: voidPostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos ); -tools::Long GetPixelWidthHint(const ScAddress& rPos); +tools::Long GetTwipWidthHint(const ScAddress& rPos); voidPostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index abe93954f774..b5265299462a 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -115,6 +115,7 @@ class ScExtDocOptions; class ScViewData; class ScMarkData; class ScGridWindow; +class ScSizeDeviceProvider; class ScPositionHelper { @@ -696,6 +697,8 @@ public: static void AddPixelsWhileBackward( tools::Long & rScrY, tools::Long nEndPixels, SCROW & rPosY, SCROW nStartRow, double nPPTY, const ScDocument * pDoc, SCTAB nTabNo ); + +void setupSizeDeviceProviderForColWidth(ScSizeDeviceProvider& rProv, Fraction& rZoomX, Fraction& rZoomY, double& rPPTX, double &rPPTY); }; inline tools::Long ScViewData::ToPixel( sal_uInt16 nTwips, double nFactor ) diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 7ffa5c0d0138..15e