[Libreoffice-commits] core.git: desktop/source include/unotools lingucomponent/config lingucomponent/source postprocess/CustomTarget_registry.mk unotools/source

2023-07-11 Thread Xisco Fauli (via logerrit)
 desktop/source/lib/init.cxx|  195 
+++---
 include/unotools/lingucfg.hxx  |2 
 lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu |   30 -
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx  |   59 +--
 postprocess/CustomTarget_registry.mk   |1 
 unotools/source/config/lingucfg.cxx|   21 -
 6 files changed, 186 insertions(+), 122 deletions(-)

New commits:
commit 94e6049b6467d9bc1e52a1a80c7cf1a5f138e82d
Author: Xisco Fauli 
AuthorDate: Wed Jul 12 07:03:15 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 12 08:57:41 2023 +0200

Revert recent LanguageTool commits

Reason for revert: See discussion in 
https://gerrit.libreoffice.org/c/core/+/154302
- it's causing CppunitTest_sw_layoutwriter2 to fail on Windows.
- it's causing CppunitTest_sw_layoutwriter to fail on Linux.
- Probably other recent CI failures are also related.
- A similar commit was reverted one year ago for similar reasons -> 
https://gerrit.libreoffice.org/c/core/+/135859

This commit contains the following commits:

Revert "lok: remove old hack for LanguageTool locales"

This reverts commit 9a5329a266bd74abc4794f1fcbae3db07582dbde.

Revert "lok: LanguageTool provides list of languages"

This reverts commit 21d0489a5efa970e975ce1a70dfda2fd9e2c186d.

Revert "lok: remove duplicated locales for LanguageTool"

This reverts commit a0865169ab62508a7b933ed4634defa57b25f7b7.

Revert "Load the locales from config file for languagetool"

This reverts commit 81b0d9a951c9b15f4f1a76d45d0bd955b4dfc95b.

Change-Id: I3dc48097615f510e33e233e868b6b10704d81e67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154342
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4f1b5287130f..dbd236858ce8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -117,7 +117,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -228,8 +227,6 @@ using namespace vcl;
 using namespace desktop;
 using namespace utl;
 
-using LanguageToolCfg = 
officecfg::Office::Linguistic::GrammarChecking::LanguageTool;
-
 static LibLibreOffice_Impl *gImpl = nullptr;
 static bool lok_preinit_2_called = false;
 static std::weak_ptr< LibreOfficeKitClass > gOfficeClass;
@@ -5620,6 +5617,132 @@ static void 
doc_setGraphicSelection(LibreOfficeKitDocument* pThis, int nType, in
 pDoc->setGraphicSelection(nType, nX, nY);
 }
 
+static void getDocLanguages(LibreOfficeKitDocument* pThis, 
uno::Sequence& rSeq)
+{
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
+
+SfxDispatcher* pDispatcher = pViewFrame->GetBindings().GetDispatcher();
+if (!pDispatcher)
+return;
+
+css::uno::Any aLangStatus;
+pDispatcher->QueryState(SID_LANGUAGE_STATUS, aLangStatus);
+
+OUString sCurrent;
+OUString sKeyboard;
+OUString sGuessText;
+SvtScriptType eScriptType = SvtScriptType::LATIN | SvtScriptType::ASIAN
+| SvtScriptType::COMPLEX;
+
+Sequence aSeqLang;
+if (aLangStatus >>= aSeqLang)
+{
+if (aSeqLang.getLength() == 4)
+{
+sCurrent = aSeqLang[0];
+eScriptType = static_cast(aSeqLang[1].toInt32());
+sKeyboard = aSeqLang[1];
+sGuessText = aSeqLang[2];
+}
+}
+else
+{
+aLangStatus >>= sCurrent;
+}
+
+LanguageType nLangType;
+std::set aLangItems;
+
+if (!sCurrent.isEmpty())
+{
+nLangType = SvtLanguageTable::GetLanguageType(sCurrent);
+if (nLangType != LANGUAGE_DONTKNOW)
+{
+aLangItems.insert(nLangType);
+}
+}
+
+const AllSettings& rAllSettings = Application::GetSettings();
+nLangType = rAllSettings.GetLanguageTag().getLanguageType();
+if (nLangType != LANGUAGE_DONTKNOW &&
+(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType)))
+{
+aLangItems.insert(nLangType);
+}
+
+nLangType = rAllSettings.GetUILanguageTag().getLanguageType();
+if (nLangType != LANGUAGE_DONTKNOW &&
+(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType)))
+{
+aLangItems.insert(nLangType);
+}
+
+if (!sKeyboard.isEmpty())
+{
+nLangType = SvtLanguageTable::GetLanguageType(sKeyboard);
+if (nLangType != LANGUAGE_DONTKNOW &&
+(eScriptType & 
SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType)))
+{
+aLangItems.insert(nLangType);
+}
+}
+
+if (!sGuessText.isEmpty())
+{
+Reference xLangGuesser;
+try
+{
+xLangGuesser = linguistic2::LanguageGuessing::create(xContext);
+  

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - desktop/source

2023-07-11 Thread Rene Engelhard (via logerrit)
 desktop/source/deployment/misc/dp_platform.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 39ef35d69d1c4c5d6a3964997acb1c53c9501c58
Author: Rene Engelhard 
AuthorDate: Tue Jul 11 16:56:02 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 12 08:22:54 2023 +0200

add linux_riscv64 and linux_loongarch64 to dp_platform.cxx

forgotten in bc9487f745befde6534fd46058e119256952323d and 
d3625d968901eb93a9680db8d1165f70de3fd64e

Change-Id: I7f33c1db54b8f66e797a29cd1ccf96d19a88cc60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154333
Tested-by: Jenkins
Reviewed-by: René Engelhard 
(cherry picked from commit 5d70ee0b3fd53438eb8a8d92ce49e9f9a4926dfb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154316
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/deployment/misc/dp_platform.cxx 
b/desktop/source/deployment/misc/dp_platform.cxx
index ad1b5ea13fed..b2af59f9b926 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -126,6 +126,10 @@ namespace
 ret = checkOSandCPU(u"Linux", u"ALPHA");
 else if (token == u"linux_aarch64")
 ret = checkOSandCPU(u"Linux", u"AARCH64");
+else if (token == u"linux_riscv64")
+ret = checkOSandCPU(u"Linux", u"RISCV64");
+else if (token == u"linux_loongarch64")
+ret = checkOSandCPU(u"Linux", u"LOONGARCH64");
 else if (token == u"freebsd_x86")
 ret = checkOSandCPU(u"FreeBSD", u"x86");
 else if (token == u"freebsd_x86_64")


[Libreoffice-commits] core.git: pyuno/qa sd/inc sd/source

2023-07-11 Thread Szymon Kłos (via logerrit)
 pyuno/qa/pytests/testcollections_XNameAccess.py |   25 +-
 sd/inc/strings.hrc  |1 
 sd/source/ui/inc/unomodel.hxx   |   69 +
 sd/source/ui/unoidl/unomodel.cxx|  298 +++-
 4 files changed, 324 insertions(+), 69 deletions(-)

New commits:
commit e78f60a369146774ca2a38ca121f294b562b2be5
Author: Szymon Kłos 
AuthorDate: Tue May 30 14:09:25 2023 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jul 12 07:56:37 2023 +0200

Categories for link targets in Impress

Writer and Calc presented possible link targets inside
documents as a Tree, with items under their categories.
This patch makes the same for Impress so we don't mix
master pages with regular pages.

Change-Id: Ifd98300b0d609c28d6c1880332fff7e750b5e1b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152389
Reviewed-by: Gülşah Köse 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153985
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/pyuno/qa/pytests/testcollections_XNameAccess.py 
b/pyuno/qa/pytests/testcollections_XNameAccess.py
index 79d66a2e1bc2..5c5ad6890be2 100644
--- a/pyuno/qa/pytests/testcollections_XNameAccess.py
+++ b/pyuno/qa/pytests/testcollections_XNameAccess.py
@@ -28,10 +28,14 @@ class TestXNameAccess(CollectionsTestBase):
 drw = self.createBlankDrawing()
 
 # When
-length = len(drw.Links)
+length_categories = len(drw.Links)
+length_slides = len(drw.Links['Slide'].Links)
+length_master = len(drw.Links['Master Page'].Links)
 
 # Then
-self.assertEqual(2, length)
+self.assertEqual(4, length_categories)
+self.assertEqual(1, length_slides)
+self.assertEqual(1, length_master)
 
 drw.close(True)
 
@@ -45,7 +49,7 @@ class TestXNameAccess(CollectionsTestBase):
 drw.DrawPages[0].Name = 'foo'
 
 # When
-link = drw.Links['foo']
+link = drw.Links['Slide'].Links['foo']
 
 # Then
 self.assertEqual('foo', link.getName())
@@ -62,7 +66,7 @@ class TestXNameAccess(CollectionsTestBase):
 
 # When / Then
 with self.assertRaises(KeyError):
-link = drw.Links['foo']
+link = drw.Links['Slide'].Links['foo']
 
 drw.close(True)
 
@@ -146,7 +150,7 @@ class TestXNameAccess(CollectionsTestBase):
 drw.DrawPages[0].Name = 'foo'
 
 # When
-present = 'foo' in drw.Links
+present = 'foo' in drw.Links['Slide'].Links
 
 # Then
 self.assertTrue(present)
@@ -161,17 +165,17 @@ class TestXNameAccess(CollectionsTestBase):
 # Given
 drw = self.createBlankDrawing()
 i = 0
-for name in drw.Links.getElementNames():
-drw.Links.getByName(name).Name = 'foo' + str(i)
+for name in drw.Links['Slide'].Links.getElementNames():
+drw.Links['Slide'].Links.getByName(name).Name = 'foo' + str(i)
 i += 1
 
 # When
 read_links = []
-for link in drw.Links:
+for link in drw.Links['Slide'].Links:
 read_links.append(link)
 
 # Then
-self.assertEqual(['foo0', 'foo1'], read_links)
+self.assertEqual(['foo0'], read_links)
 
 drw.close(True)
 
@@ -184,11 +188,10 @@ class TestXNameAccess(CollectionsTestBase):
 drw = self.createBlankDrawing()
 
 # When
-itr = iter(drw.Links)
+itr = iter(drw.Links['Slide'].Links)
 
 # Then
 self.assertIsNotNone(next(itr))
-self.assertIsNotNone(next(itr))
 with self.assertRaises(StopIteration):
 next(itr)
 
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 3e1ddd1542e7..0d9303e18bea 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -95,6 +95,7 @@
 #define STR_VOC_FILENC_("STR_VOC_FILE", 
"Creative Labs Audio")
 #define STR_AIFF_FILE   NC_("STR_AIFF_FILE", 
"Apple/SGI Audio")
 #define STR_SVX_FILENC_("STR_SVX_FILE", 
"Amiga SVX Audio")
+#define STR_SD_PAGE NC_("STR_SD_PAGE", 
"Slide")
 #define STR_SD_PAGE_COUNT   
NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2")
 #define STR_SD_PAGE_COUNT_CUSTOM
NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)")
 #define STR_SD_PAGE_COUNT_DRAW  
NC_("STR_SD_PAGE_COUNT_DRAW", "Page %1 of %2")
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index f31d93b97420..eba78ce17fb7 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -380,11 +380,21 @@ public:
 *  *
 ***/
 
+enum SdLink

[Libreoffice-commits] core.git: sc/source

2023-07-11 Thread Szymon Kłos (via logerrit)
 sc/source/ui/view/viewfun3.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 43c564da59d7d951ee9a903b80e82fd1159d0c71
Author: Szymon Kłos 
AuthorDate: Mon Jul 10 11:27:17 2023 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jul 12 07:55:12 2023 +0200

lok: copy simple selection even when filtered

when selected cells contain data filtered with autofilter
and regular cells after that - we get different type
of selection called SC_MARK_SIMPLE_FILTERED

allow copying that too

Change-Id: I69f91a674f427a7b956fd87b8dc56937b3b55e86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154239
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154309
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 8a9b489833fc..651724209946 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -430,7 +430,8 @@ bool ScViewFunc::CopyToClipMultiRange( const ScDocument* 
pInputClipDoc, const Sc
 rtl::Reference ScViewFunc::CopyToTransferable()
 {
 ScRange aRange;
-if ( GetViewData().GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
+auto eMarkType = GetViewData().GetSimpleArea( aRange );
+if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED )
 {
 ScDocument& rDoc = GetViewData().GetDocument();
 ScMarkData& rMark = GetViewData().GetMarkData();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sw/qa sw/source

2023-07-11 Thread Miklos Vajna (via logerrit)
 sw/qa/filter/ww8/data/floattable-then-floattable.doc |binary
 sw/qa/filter/ww8/ww8.cxx |   23 +++
 sw/source/filter/ww8/ww8par6.cxx |   17 ++
 3 files changed, 40 insertions(+)

New commits:
commit 2529a44931a2646af6f8beeecd18abb710c6d2e5
Author: Miklos Vajna 
AuthorDate: Tue Jul 11 08:21:20 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 12 07:18:44 2023 +0200

sw floattable: make sure floattable after floattable gets own anch pos from 
DOC

The bugdoc has 2 floating tables next to each other, which overlap in
Writer, but not in Word.

This looks quite similar to the DOCX case, which was solved in commit
01ad8ec4bb5425446e95dbada81de435646824b4 (sw floattable: fix lost tables
around a floating table from DOCX, 2023-06-05).

Fix the problem by improving SwWW8ImplReader::StartApo() so it inserts a
fake paragraph when a floating table is immediately followed by a
floating table. A similar case, floating table followed immediately by
an inline table was already handled like this in
WW8TabDesc::CreateSwTable().

Creating a reproducer document from scratch is quite tricky, as Word
will also insert a fake paragraph on the first save of the DOC test file
(so the doc model will be floattable-para-floattable-para) and manual
edit of binary DOC files is also not easy. So the compromise is that the
testcase file has 2 floating tables anchored to the same paragraph, but
they don't overlap visually, while they do overlap in the original,
internal bugdoc. With this, finally the bnc#816603 DOC bugdoc renders
without overlaps, which was the case before my multi-page floating table
changes.

Change-Id: Ib1b4c7c80833db5a7bde38092c8c3ed6fd1d2462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154290
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 663db89378aa1f0425e795ef5d471f134e658dc4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154262
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/filter/ww8/data/floattable-then-floattable.doc 
b/sw/qa/filter/ww8/data/floattable-then-floattable.doc
new file mode 100644
index ..6e694140740b
Binary files /dev/null and 
b/sw/qa/filter/ww8/data/floattable-then-floattable.doc differ
diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx
index d7af2b675f24..68bbc28fcfc3 100644
--- a/sw/qa/filter/ww8/ww8.cxx
+++ b/sw/qa/filter/ww8/ww8.cxx
@@ -387,6 +387,29 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCVerticalFlyOffset)
 // Page 2 starts with an inline table:
 CPPUNIT_ASSERT(pTable2->IsTabFrame());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableThenFloattable)
+{
+// Given a document that contains a floating table, immediately followed 
by an other floating
+// table:
+// When importing the document & laying it out:
+createSwDoc("floattable-then-floattable.doc");
+calcLayout();
+
+// Then make sure that the two floating table has different anchors:
+SwDoc* pDoc = getSwDoc();
+auto& rFlys = *pDoc->GetSpzFrameFormats();
+auto pFly1 = rFlys[0];
+SwNodeOffset nFly1Anchor = 
pFly1->GetAttrSet().GetAnchor().GetAnchorContentNode()->GetIndex();
+auto pFly2 = rFlys[1];
+SwNodeOffset nFly2Anchor = 
pFly2->GetAttrSet().GetAnchor().GetAnchorContentNode()->GetIndex();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 42
+// - Actual  : 41
+// i.e. the two anchor positions were the same instead of first anchor 
followed by the second
+// anchor.
+CPPUNIT_ASSERT_EQUAL(nFly1Anchor + 1, nFly2Anchor);
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index ca3a2ed1f101..0043678affb3 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2516,6 +2516,23 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults 
&rApo, const WW8_TablePos *p
 
 if (pTabPos)
 {
+if (m_xFormatOfJustInsertedApo)
+{
+// We just inserted a floating table and we'll insert a next 
one.
+SwFrameFormat* pFormat = 
m_xFormatOfJustInsertedApo->GetFormat();
+if (pFormat)
+{
+const SwNode* pAnchorNode = 
pFormat->GetAnchor().GetAnchorNode();
+SwPosition* pPoint = m_pPaM->GetPoint();
+if (pAnchorNode && *pAnchorNode == pPoint->GetNode())
+{
+// The two fly frames would have the same anchor 
position, leading to
+// potentially overlapping text, prevent that.
+AppendTextNode(*pPoint);
+}
+}
+}
+
 // Map a positioned table to a split fly.
 aFlySe

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/inc sc/Library_sc.mk sc/source

2023-07-11 Thread Tomaž Vajngerl (via logerrit)
 sc/Library_sc.mk  |1 
 sc/inc/globstr.hrc|2 
 sc/source/ui/inc/undo/UndoThemeChange.hxx |   36 +
 sc/source/ui/theme/ThemeColorChanger.cxx  |  209 +-
 sc/source/ui/undo/UndoThemeChange.cxx |   75 ++
 5 files changed, 293 insertions(+), 30 deletions(-)

New commits:
commit abd071a20033a808aa42d5f6721b55407716b757
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 11 16:02:02 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 12 06:47:14 2023 +0200

sc: Theme color change undo/redo - styles and direct format

This adds the code for undo/redo for change of theme colors in
styles and direct formatting.

Change-Id: I58568b18ab18562e6148ec8530d3d22c62ef2b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154305
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 6f77ed620bbff11a1232b593be97e7d6f29aa8ac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154317

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 75e9a1743d12..2b4082d3688e 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -569,6 +569,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/undo/UndoUngroupSparklines \
 sc/source/ui/undo/UndoGroupSparklines \
 sc/source/ui/undo/UndoEditSparkline \
+sc/source/ui/undo/UndoThemeChange \
 sc/source/ui/unoobj/ChartRangeSelectionListener \
 sc/source/ui/unoobj/addruno \
 sc/source/ui/unoobj/afmtuno \
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 600cf9354fc0..5e6880d973d1 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -564,6 +564,8 @@
 #define STR_UNDO_GROUP_SPARKLINES   
NC_("STR_UNDO_GROUP_SPARKLINES", "Group Sparklines")
 #define STR_UNDO_UNGROUP_SPARKLINES 
NC_("STR_UNDO_UNGROUP_SPARKLINES", "Ungroup Sparklines")
 #define STR_UNDO_EDIT_SPARKLINE NC_("STR_UNDO_EDIT_SPARKLINE", 
"Edit Sparkline")
+#define STR_UNDO_THEME_CHANGE   NC_("STR_UNDO_THEME_CHANGE", 
"Theme Change")
+#define STR_UNDO_THEME_COLOR_CHANGE 
NC_("STR_UNDO_THEME_COLOR_CHANGE", "Theme Color Change")
 
 #endif
 
diff --git a/sc/source/ui/inc/undo/UndoThemeChange.hxx 
b/sc/source/ui/inc/undo/UndoThemeChange.hxx
new file mode 100644
index ..6c0558df8a7f
--- /dev/null
+++ b/sc/source/ui/inc/undo/UndoThemeChange.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+namespace sc
+{
+class UndoThemeChange : public ScSimpleUndo
+{
+private:
+std::shared_ptr mpOldColorSet;
+std::shared_ptr mpNewColorSet;
+
+public:
+UndoThemeChange(ScDocShell& rDocShell, std::shared_ptr 
const& pOldColorSet,
+std::shared_ptr const& pNewColorSet);
+virtual ~UndoThemeChange() override;
+
+void Undo() override;
+void Redo() override;
+bool CanRepeat(SfxRepeatTarget& rTarget) const override;
+void Repeat(SfxRepeatTarget& rTarget) override;
+OUString GetComment() const override;
+};
+
+} // namespace sc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/theme/ThemeColorChanger.cxx 
b/sc/source/ui/theme/ThemeColorChanger.cxx
index 8eaa6ed0fcb6..66683adbd682 100644
--- a/sc/source/ui/theme/ThemeColorChanger.cxx
+++ b/sc/source/ui/theme/ThemeColorChanger.cxx
@@ -20,12 +20,20 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+
+#include 
 
 namespace sc
 {
@@ -58,10 +66,10 @@ bool changeBorderLine(editeng::SvxBorderLine* pBorderLine, 
model::ColorSet const
 return false;
 }
 
-void changeCellItems(SfxItemSet& rItemSet, model::ColorSet const& rColorSet)
+bool changeCellItems(SfxItemSet& rItemSet, model::ColorSet const& rColorSet)
 {
 const SfxPoolItem* pItem = nullptr;
-
+bool bChanged = false;
 if (rItemSet.HasItem(ATTR_FONT_COLOR, &pItem))
 {
 auto const* pColorItem = static_cast(pItem);
@@ -77,6 +85,7 @@ void changeCellItems(SfxItemSet& rItemSet, model::ColorSet 
const& rColorSet)
 SvxColorItem aColorItem(*pColorItem);
 aColorItem.setColor(aColor);
 rItemSet.Put(aColorItem);
+bChanged = true;
 }
 }
 }
@@ -95,6 +104,7 @@ void changeCellItems(SfxItemSet& rItemSet, model::ColorSet 
const& rColorSet)
 SvxBrushItem aNewBrushItem(*pBrushItem);
 aNewBrushItem.SetColor(aColor);
 rItemSet.Put(aNewBrushItem);
+bChanged = true;
 

[Libreoffice-commits] core.git: svgio/qa svgio/source

2023-07-11 Thread Xisco Fauli (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx |   20 ++--
 svgio/qa/cppunit/data/tdf156236.svg|7 +++
 svgio/source/svgreader/svgrectnode.cxx |   11 +++
 3 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit f7af4c311ad04ce5e54e08b9d7ccd71b75b7a32d
Author: Xisco Fauli 
AuthorDate: Tue Jul 11 16:08:38 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 12 06:35:20 2023 +0200

tdf#156236: For the rx or ry properties, "0" is valid

Change-Id: I32c865e409a339c40e00ee0f624c45380773
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154307
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 0f8b31d4b1cc..9f0b8ff7b9d7 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -1048,11 +1048,11 @@ CPPUNIT_TEST_FIXTURE(Test, testClipRule)
 // - Actual  : 10
 assertXPath(pDocument, 
"/primitive2D/transform/mask[1]/polypolygon/polygon/point", 5);
 assertXPath(pDocument, "/primitive2D/transform/mask[1]/polypolygoncolor", 
"color", "#ff");
-assertXPath(pDocument, 
"/primitive2D/transform/mask[1]/polypolygoncolor/polypolygon/polygon/point", 5);
+assertXPath(pDocument, 
"/primitive2D/transform/mask[1]/polypolygoncolor/polypolygon/polygon/point", 4);
 
 assertXPath(pDocument, 
"/primitive2D/transform/mask[2]/polypolygon/polygon/point", 5);
 assertXPath(pDocument, "/primitive2D/transform/mask[2]/polypolygoncolor", 
"color", "#ff");
-assertXPath(pDocument, 
"/primitive2D/transform/mask[2]/polypolygoncolor/polypolygon/polygon/point", 5);
+assertXPath(pDocument, 
"/primitive2D/transform/mask[2]/polypolygoncolor/polypolygon/polygon/point", 4);
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testi125329)
@@ -1271,6 +1271,22 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94765)
 assertXPath(pDocument, 
"/primitive2D/transform/transform/svglineargradient[2]", "endy", "0");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf156236)
+{
+Primitive2DSequence aSequenceTdf94765 = 
parseSvg(u"/svgio/qa/cppunit/data/tdf156236.svg");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequenceTdf94765.getLength()));
+
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(Primitive2DContainer(aSequenceTdf94765));
+
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor[1]/polypolygon", "path", "m50 
180h-30v-60h60v60z");
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor[2]/polypolygon", "path", "m150 
180h15c8.2842712474619 0 15-6.7157287525381 
15-15v-30c0-8.2842712474619-6.7157287525381-15-15-15h-30c-8.2842712474619 0-15 
6.7157287525381-15 15v30c0 8.2842712474619 6.7157287525381 15 15 15z");
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor[3]/polypolygon", "path", "m250 
180h15c8.2842712474619 0 15-6.7157287525381 
15-15v-30c0-8.2842712474619-6.7157287525381-15-15-15h-30c-8.2842712474619 0-15 
6.7157287525381-15 15v30c0 8.2842712474619 6.7157287525381 15 15 15z");
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor[4]/polypolygon", "path", "m350 
180c16.5685424949238 0 30-6.7157287525381 
30-15v-30c0-8.2842712474619-13.4314575050762-15-30-15s-30 6.7157287525381-30 
15v30c0 8.2842712474619 13.4314575050762 15 30 15z");
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testBehaviourWhenWidthAndHeightIsOrIsNotSet)
 {
 // This test checks the behaviour when width and height attributes
diff --git a/svgio/qa/cppunit/data/tdf156236.svg 
b/svgio/qa/cppunit/data/tdf156236.svg
new file mode 100644
index ..12268652c03b
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf156236.svg
@@ -0,0 +1,7 @@
+http://www.w3.org/2000/svg";>
+  
+  
+  
+  
+
+
diff --git a/svgio/source/svgreader/svgrectnode.cxx 
b/svgio/source/svgreader/svgrectnode.cxx
index 291d8540912f..c063ecf87195 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -32,9 +32,7 @@ namespace svgio::svgreader
 maX(0),
 maY(0),
 maWidth(0),
-maHeight(0),
-maRx(0),
-maRy(0)
+maHeight(0)
 {
 }
 
@@ -176,14 +174,11 @@ namespace svgio::svgreader
 double frX(getRx().isSet() ? getRx().solve(*this, 
NumberType::xcoordinate) : 0.0);
 double frY(getRy().isSet() ? getRy().solve(*this, 
NumberType::ycoordinate) : 0.0);
 
-frX = std::max(0.0, frX);
-frY = std::max(0.0, frY);
-
-if(0.0 == frY && frX > 0.0)
+if(!getRy().isSet() && 0.0 == frY && frX > 0.0)
 {
 frY = frX;
 }
-else if(0.0 == frX && frY > 0.0)
+else if(!getRx().isSet() && 0.0 == frX && frY > 0.0)
 {
 frX = frY;
 }


[Libreoffice-commits] core.git: sc/inc sc/Library_sc.mk sc/source

2023-07-11 Thread Tomaž Vajngerl (via logerrit)
 sc/Library_sc.mk  |1 
 sc/inc/globstr.hrc|2 
 sc/source/ui/inc/undo/UndoThemeChange.hxx |   36 +
 sc/source/ui/theme/ThemeColorChanger.cxx  |  209 +-
 sc/source/ui/undo/UndoThemeChange.cxx |   75 ++
 5 files changed, 293 insertions(+), 30 deletions(-)

New commits:
commit 6f77ed620bbff11a1232b593be97e7d6f29aa8ac
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 11 16:02:02 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 12 04:04:45 2023 +0200

sc: Theme color change undo/redo - styles and direct format

This adds the code for undo/redo for change of theme colors in
styles and direct formatting.

Change-Id: I58568b18ab18562e6148ec8530d3d22c62ef2b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154305
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 75e9a1743d12..2b4082d3688e 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -569,6 +569,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/undo/UndoUngroupSparklines \
 sc/source/ui/undo/UndoGroupSparklines \
 sc/source/ui/undo/UndoEditSparkline \
+sc/source/ui/undo/UndoThemeChange \
 sc/source/ui/unoobj/ChartRangeSelectionListener \
 sc/source/ui/unoobj/addruno \
 sc/source/ui/unoobj/afmtuno \
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 600cf9354fc0..5e6880d973d1 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -564,6 +564,8 @@
 #define STR_UNDO_GROUP_SPARKLINES   
NC_("STR_UNDO_GROUP_SPARKLINES", "Group Sparklines")
 #define STR_UNDO_UNGROUP_SPARKLINES 
NC_("STR_UNDO_UNGROUP_SPARKLINES", "Ungroup Sparklines")
 #define STR_UNDO_EDIT_SPARKLINE NC_("STR_UNDO_EDIT_SPARKLINE", 
"Edit Sparkline")
+#define STR_UNDO_THEME_CHANGE   NC_("STR_UNDO_THEME_CHANGE", 
"Theme Change")
+#define STR_UNDO_THEME_COLOR_CHANGE 
NC_("STR_UNDO_THEME_COLOR_CHANGE", "Theme Color Change")
 
 #endif
 
diff --git a/sc/source/ui/inc/undo/UndoThemeChange.hxx 
b/sc/source/ui/inc/undo/UndoThemeChange.hxx
new file mode 100644
index ..6c0558df8a7f
--- /dev/null
+++ b/sc/source/ui/inc/undo/UndoThemeChange.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+namespace sc
+{
+class UndoThemeChange : public ScSimpleUndo
+{
+private:
+std::shared_ptr mpOldColorSet;
+std::shared_ptr mpNewColorSet;
+
+public:
+UndoThemeChange(ScDocShell& rDocShell, std::shared_ptr 
const& pOldColorSet,
+std::shared_ptr const& pNewColorSet);
+virtual ~UndoThemeChange() override;
+
+void Undo() override;
+void Redo() override;
+bool CanRepeat(SfxRepeatTarget& rTarget) const override;
+void Repeat(SfxRepeatTarget& rTarget) override;
+OUString GetComment() const override;
+};
+
+} // namespace sc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/theme/ThemeColorChanger.cxx 
b/sc/source/ui/theme/ThemeColorChanger.cxx
index 8eaa6ed0fcb6..66683adbd682 100644
--- a/sc/source/ui/theme/ThemeColorChanger.cxx
+++ b/sc/source/ui/theme/ThemeColorChanger.cxx
@@ -20,12 +20,20 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+
+#include 
 
 namespace sc
 {
@@ -58,10 +66,10 @@ bool changeBorderLine(editeng::SvxBorderLine* pBorderLine, 
model::ColorSet const
 return false;
 }
 
-void changeCellItems(SfxItemSet& rItemSet, model::ColorSet const& rColorSet)
+bool changeCellItems(SfxItemSet& rItemSet, model::ColorSet const& rColorSet)
 {
 const SfxPoolItem* pItem = nullptr;
-
+bool bChanged = false;
 if (rItemSet.HasItem(ATTR_FONT_COLOR, &pItem))
 {
 auto const* pColorItem = static_cast(pItem);
@@ -77,6 +85,7 @@ void changeCellItems(SfxItemSet& rItemSet, model::ColorSet 
const& rColorSet)
 SvxColorItem aColorItem(*pColorItem);
 aColorItem.setColor(aColor);
 rItemSet.Put(aColorItem);
+bChanged = true;
 }
 }
 }
@@ -95,6 +104,7 @@ void changeCellItems(SfxItemSet& rItemSet, model::ColorSet 
const& rColorSet)
 SvxBrushItem aNewBrushItem(*pBrushItem);
 aNewBrushItem.SetColor(aColor);
 rItemSet.Put(aNewBrushItem);
+bChanged = true;
 }
 }
 }
@@ -102,60 +112,199 @@ void changeCellItems(SfxItemSet& rItemSet, 
model::ColorSet const& rColorSet)
 {
 

[Libreoffice-commits] core.git: svx/source

2023-07-11 Thread Justin Luth (via logerrit)
 svx/source/inc/StylesPreviewToolBoxControl.hxx  |2 -
 svx/source/inc/StylesPreviewWindow.hxx  |   15 ++--
 svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx |7 -
 svx/source/tbxctrls/StylesPreviewWindow.cxx |   24 +---
 4 files changed, 25 insertions(+), 23 deletions(-)

New commits:
commit 42ee261d01983c94d8be60fccae37ae5af53bf5e
Author: Justin Luth 
AuthorDate: Thu Jul 6 16:29:02 2023 -0400
Commit: Justin Luth 
CommitDate: Wed Jul 12 02:21:48 2023 +0200

tdf#125504 StylesPreviewWindow: don't use disposed DispatchProvider

.uno:StylesPreview in the notebookbar was doing nothing
because the view switching from print preview caused
the saved XDispatchProvider to become disposed.

Thanks to Maxim, my patch is completely re-written.
I think I have implemented the method he has suggested.

Change-Id: Iae01116c742bc27ed2c14d983e7347d39c9acaf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154148
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Maxim Monastirsky 

diff --git a/svx/source/inc/StylesPreviewToolBoxControl.hxx 
b/svx/source/inc/StylesPreviewToolBoxControl.hxx
index d8d12a0f20a8..f1f943dfffbe 100644
--- a/svx/source/inc/StylesPreviewToolBoxControl.hxx
+++ b/svx/source/inc/StylesPreviewToolBoxControl.hxx
@@ -32,8 +32,6 @@ class StylesPreviewToolBoxControl final
 VclPtr m_xVclBox;
 std::unique_ptr m_xWeldBox;
 
-css::uno::Reference m_xDispatchProvider;
-
 std::vector> m_aDefaultStyles;
 
 public:
diff --git a/svx/source/inc/StylesPreviewWindow.hxx 
b/svx/source/inc/StylesPreviewWindow.hxx
index 1e9b01a6df1b..76b385c084d2 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class StylesPreviewWindow_Base;
@@ -95,7 +96,7 @@ class StylesPreviewWindow_Base
 protected:
 static constexpr unsigned STYLES_COUNT = 6;
 
-css::uno::Reference m_xDispatchProvider;
+css::uno::Reference m_xFrame;
 
 std::unique_ptr m_xStylesView;
 
@@ -115,9 +116,9 @@ protected:
 DECL_LINK(DoJsonProperty, const weld::json_prop_query&, bool);
 
 public:
-StylesPreviewWindow_Base(
-weld::Builder& xBuilder, std::vector>&& 
aDefaultStyles,
-const css::uno::Reference& 
xDispatchProvider);
+StylesPreviewWindow_Base(weld::Builder& xBuilder,
+ std::vector>&& 
aDefaultStyles,
+ const css::uno::Reference& 
xFrame);
 ~StylesPreviewWindow_Base();
 
 void Select(const OUString& rStyleName);
@@ -134,9 +135,9 @@ private:
 class StylesPreviewWindow_Impl final : public InterimItemWindow, public 
StylesPreviewWindow_Base
 {
 public:
-StylesPreviewWindow_Impl(
-vcl::Window* pParent, std::vector>&& 
aDefaultStyles,
-const css::uno::Reference& 
xDispatchProvider);
+StylesPreviewWindow_Impl(vcl::Window* pParent,
+ std::vector>&& 
aDefaultStyles,
+ const css::uno::Reference& 
xFrame);
 ~StylesPreviewWindow_Impl();
 
 void dispose();
diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx 
b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
index 64e6ed7822fe..d26063d5447e 100644
--- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
+++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
@@ -35,12 +35,7 @@ StylesPreviewToolBoxControl::initialize(const 
css::uno::Sequence&
 svt::ToolboxController::initialize(rArguments);
 
 if (m_xFrame.is())
-{
 InitializeStyles(m_xFrame->getController()->getModel());
-
-m_xDispatchProvider = 
css::uno::Reference(
-m_xFrame->getController(), css::uno::UNO_QUERY);
-}
 }
 
 void SAL_CALL StylesPreviewToolBoxControl::dispose()
@@ -156,7 +151,7 @@ StylesPreviewToolBoxControl::createItemWindow(const 
css::uno::Reference::Create(
-pParent, std::vector(m_aDefaultStyles), m_xDispatchProvider);
+pParent, std::vector(m_aDefaultStyles), m_xFrame);
 xItemWindow = VCLUnoHelper::GetInterface(m_xVclBox);
 }
 }
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index c5215cba4a6d..27e992c92059 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -208,7 +208,9 @@ bool StylesPreviewWindow_Base::Command(const CommandEvent& 
rEvent)
 {
 css::uno::Sequence aArgs(0);
 
-SfxToolBoxControl::Dispatch(m_xDispatchProvider,
+const css::uno::Reference 
xProvider(m_xFrame,
+   
css::uno::UNO_QUERY);
+SfxToolBoxControl::Dispatch(xProvider,
 rIdent == "update" ? 
OUString(".uno:StyleUpdateByExample")
  

[Libreoffice-commits] core.git: download.lst external/harfbuzz

2023-07-11 Thread Taichi Haradaguchi (via logerrit)
 download.lst  |4 ++--
 external/harfbuzz/UnpackedTarball_harfbuzz.mk |2 --
 external/harfbuzz/tdf137553.patch.1   |   16 
 3 files changed, 2 insertions(+), 20 deletions(-)

New commits:
commit 21d0534d8ca6ec5362848fb29b6f1ead7d1643d6
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sun Jul 9 13:56:23 2023 +0900
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Wed Jul 12 02:20:53 2023 +0200

Upgrade Harfbuzz to 8.0.0

Change-Id: I04d81509c50f0335d201b5286460989f526b58f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154233
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/download.lst b/download.lst
index 903cae0237e8..0d5deef073aa 100644
--- a/download.lst
+++ b/download.lst
@@ -222,8 +222,8 @@ GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-HARFBUZZ_SHA256SUM := 
20770789749ac9ba846df33983dbda22db836c70d9f5d050cb9aa5347094a8fb
-HARFBUZZ_TARBALL := harfbuzz-7.3.0.tar.xz
+HARFBUZZ_SHA256SUM := 
1f98b5e3d06a344fe667d7e8210094ced458791499839bddde98c167ce6a7c79
+HARFBUZZ_TARBALL := harfbuzz-8.0.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk 
b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index b2e1f5145dc7..9bc9e326b426 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -15,9 +15,7 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,harfbuzz))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
 
-# https://github.com/harfbuzz/harfbuzz/pull/4314
 $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
-   external/harfbuzz/tdf137553.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/harfbuzz/tdf137553.patch.1 
b/external/harfbuzz/tdf137553.patch.1
deleted file mode 100644
index 807001e497b2..
--- a/external/harfbuzz/tdf137553.patch.1
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -ur harfbuzz.org/src/hb-graphite2.cc harfbuzz/src/hb-graphite2.cc
 harfbuzz.org/src/hb-graphite2.cc   2023-07-08 12:33:00
-+++ harfbuzz/src/hb-graphite2.cc   2023-07-08 12:37:46
-@@ -363,9 +363,10 @@
-   }
-   else
-   {
-+  auto origin_X = gr_slot_origin_X (is) * xscale;
-   c->advance = 0;
--  clusters[ci].advance += gr_slot_origin_X(is) * xscale - curradv;
--  curradv += clusters[ci].advance;
-+  clusters[ci].advance += origin_X - curradv;
-+  curradv = origin_X;
-   }
-   ci++;
- }


[Libreoffice-commits] core.git: sc/uiconfig sd/uiconfig sw/uiconfig

2023-07-11 Thread Justin Luth (via logerrit)
 sc/uiconfig/scalc/ui/notebookbar.ui   |4 -
 sc/uiconfig/scalc/ui/notebookbar_compact.ui   |4 -
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui|   40 +-
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui   |   40 +-
 sc/uiconfig/scalc/ui/notebookbar_groups.ui|   26 +++---
 sd/uiconfig/sdraw/ui/notebookbar.ui   |   12 +--
 sd/uiconfig/sdraw/ui/notebookbar_compact.ui   |   12 +--
 sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui|   18 ++--
 sd/uiconfig/simpress/ui/notebookbar.ui|   26 +++---
 sd/uiconfig/simpress/ui/notebookbar_compact.ui|   20 ++---
 sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui |   28 +++
 sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui|   32 
 sw/uiconfig/swriter/ui/notebookbar.ui |8 +-
 sw/uiconfig/swriter/ui/notebookbar_compact.ui |8 +-
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui  |   54 +++---
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui |   54 +++---
 sw/uiconfig/swriter/ui/notebookbar_groups.ui  |   26 +++---
 17 files changed, 206 insertions(+), 206 deletions(-)

New commits:
commit 9a020a155eaad3f318ac44c6e54a502f64e6b982
Author: Justin Luth 
AuthorDate: Tue Jul 11 07:16:47 2023 -0400
Commit: Justin Luth 
CommitDate: Wed Jul 12 02:18:24 2023 +0200

tdf#141135 notebookbar: use radio buttons instead of checkboxes

I mean of course in the places where mutually exclusive options
are side by side.

I mainly searched in menu.xml where menu:style="radio",
and then changed the notebookbar menu items to do the same thing.
It was all done by hand, unfortunately.

Before testing, ensure you have no customized notebookbars:
rm instdir/user/config/soffice.cfg/modules/*/ui/*

git grep -B10 '.uno:NormalView\|.uno:BrowseView' *.ui | grep -A10 
GtkMenuItem
git grep -B10 '.uno:PageMode\|.uno:MasterPage' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:.uno:PagebreakMode\|.uno:NormalViewMode' *.ui | grep 
-A10 GtkMenuItem
git grep -B10 '.uno:DefaultCellStyles' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:CommonAlign' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:StyleApply' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:TextBodyParaStyle' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:NumberListStyle' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:OutputQuality' *.ui | grep -A10 GtkMenuItem
git grep -B10 '.uno:ParaRightToLeft\|.uno:ParaLeftToRight' *.ui | grep -A10 
GtkMenuItem
git grep -B10 .uno:SpacePara *.ui | grep -A10 GtkMenuItem

git log -p -1 | grep '^+' | grep -v GtkRadioMenuItem

Change-Id: Ia2e29a6541fed66f4bcb0936d715969994671e65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154337
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index b452ff536e5a..8ba17d99ee6c 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -1923,14 +1923,14 @@
 True
 False
 
-  
+  
 True
 False
 .uno:PagebreakMode
   
 
 
-  
+  
 True
 False
 .uno:NormalViewMode
diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
index fd66adf8541b..f05a344b02f9 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -2187,14 +2187,14 @@
 True
 False
 
-  
+  
 True
 False
 .uno:PagebreakMode
   
 
 
-  
+  
 True
 False
 .uno:NormalViewMode
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index 4b920ba7307f..8547ef8f3aec 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -1570,14 +1570,14 @@
 True
 False
 
-  
+  
 True
 False
 .uno:ParaLeftToRight
   
 
 
-  
+  
 True
 False
 .uno:ParaRightToLeft
@@ -1610,21 +1610,21 @@
   
 
 
-  
+  
 True
 False
 .uno:CommonAlignTop
   
 
 
-  
+  
 True
 False
 .uno:CommonAlignVerticalCenter
   
 
 
-  
+  
 True
 False
 .uno:CommonAlignBottom
@@ -1987,7 +1987,7 @@
 True
 False
 
-  
+  
 True
 False
 .uno:DefaultCellStyles
@@ -2000,21 +2000,21 @@
   
 
 
-  
+  
 True
 False
 .uno:Accent1CellStyle

[Libreoffice-commits] core.git: desktop/source

2023-07-11 Thread Rene Engelhard (via logerrit)
 desktop/source/deployment/misc/dp_platform.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 091eec9828c3cba728fb52924ad9a4103175e41f
Author: Rene Engelhard 
AuthorDate: Tue Jul 11 16:56:02 2023 +0200
Commit: René Engelhard 
CommitDate: Wed Jul 12 00:41:17 2023 +0200

add linux_riscv64 and linux_loongarch64 to dp_platform.cxx

forgotten in bc9487f745befde6534fd46058e119256952323d and 
d3625d968901eb93a9680db8d1165f70de3fd64e

Change-Id: I7f33c1db54b8f66e797a29cd1ccf96d19a88cc60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154333
Tested-by: Jenkins
Reviewed-by: René Engelhard 

diff --git a/desktop/source/deployment/misc/dp_platform.cxx 
b/desktop/source/deployment/misc/dp_platform.cxx
index ad1b5ea13fed..b2af59f9b926 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -126,6 +126,10 @@ namespace
 ret = checkOSandCPU(u"Linux", u"ALPHA");
 else if (token == u"linux_aarch64")
 ret = checkOSandCPU(u"Linux", u"AARCH64");
+else if (token == u"linux_riscv64")
+ret = checkOSandCPU(u"Linux", u"RISCV64");
+else if (token == u"linux_loongarch64")
+ret = checkOSandCPU(u"Linux", u"LOONGARCH64");
 else if (token == u"freebsd_x86")
 ret = checkOSandCPU(u"FreeBSD", u"x86");
 else if (token == u"freebsd_x86_64")


[Libreoffice-commits] core.git: sw/source

2023-07-11 Thread Miklos Vajna (via logerrit)
 sw/source/core/text/txtfrm.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 25d50f08a27ee28698226a44db9c74a66a260754
Author: Miklos Vajna 
AuthorDate: Tue Jul 11 11:51:45 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 11 22:00:21 2023 +0200

sw layout xml dump: don't crash when text frame length is -1

Of course this should not happen once the layout settles, but it can
happen in the middle of debugging and the dumper itself should never
result in an assertion failure.

Change-Id: I425b8758f6f6f948752d40d081c8ed61855f9bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154294
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 821c22f528cd..7f1c17691ccf 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -843,10 +843,13 @@ void SwTextFrame::dumpAsXml(xmlTextWriterPtr writer) const
 {
 nTextLength = static_cast(pTextFrameFollow->GetOffset() - 
GetOffset());
 }
-OString aText8
-= OUStringToOString(aText.subView(nTextOffset, nTextLength), 
RTL_TEXTENCODING_UTF8);
-(void)xmlTextWriterWriteString( writer,
-reinterpret_cast(aText8.getStr(  )) );
+if (nTextLength > 0)
+{
+OString aText8
+= OUStringToOString(aText.subView(nTextOffset, nTextLength), 
RTL_TEXTENCODING_UTF8);
+(void)xmlTextWriterWriteString( writer,
+reinterpret_cast(aText8.getStr(  )) );
+}
 if (const SwParaPortion* pPara = GetPara())
 {
 (void)xmlTextWriterStartElement(writer, BAD_CAST("SwParaPortion"));


[Libreoffice-commits] core.git: 2 commits - vcl/inc vcl/source

2023-07-11 Thread Szymon Kłos (via logerrit)
 vcl/inc/calendar.hxx|2 
 vcl/inc/salvtables.hxx  |   43 +++
 vcl/source/app/salvtables.cxx   |  114 ++--
 vcl/source/control/calendar.cxx |   13 
 4 files changed, 100 insertions(+), 72 deletions(-)

New commits:
commit 97c56d3d8912391d6151e99de27d91c1f0c4561f
Author: Szymon Kłos 
AuthorDate: Thu Jul 6 15:15:50 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 11 21:49:35 2023 +0200

jsdialog: dump calendar data

Change-Id: I51d5e553c5ec1ba9fa5fd63844621368f3cedbd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154133
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit b61b6fa6ee97a735ba30a4b725075b4c0fffbdd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154314
Tested-by: Jenkins

diff --git a/vcl/inc/calendar.hxx b/vcl/inc/calendar.hxx
index 5d757e056170..9c96b83708e5 100644
--- a/vcl/inc/calendar.hxx
+++ b/vcl/inc/calendar.hxx
@@ -220,6 +220,8 @@ public:
 
 voidSetSelectHdl( const Link& rLink ) { 
maSelectHdl = rLink; }
 voidSetActivateHdl( const Link& rLink ) { 
maActivateHdl = rLink; }
+
+virtual voidDumpAsPropertyTree(tools::JsonWriter&) override;
 };
 
 #endif // INCLUDED_VCL_CALENDAR_HXX
diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx
index 5f437ff0300e..cce0bce63a3a 100644
--- a/vcl/source/control/calendar.cxx
+++ b/vcl/source/control/calendar.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1521,6 +1522,18 @@ Size Calendar::GetOptimalSize() const
 return CalcWindowSizePixel();
 }
 
+void Calendar::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
+{
+Control::DumpAsPropertyTree(rJsonWriter);
+
+auto aDate = GetFirstSelectedDate();
+
+rJsonWriter.put("type", "calendar");
+rJsonWriter.put("day", aDate.GetDay());
+rJsonWriter.put("month", aDate.GetMonth());
+rJsonWriter.put("year", aDate.GetYear());
+}
+
 namespace
 {
 class ImplCFieldFloat final
commit 11d874ee2fc1aeaa468648027050d677ac664ef7
Author: Szymon Kłos 
AuthorDate: Fri Jul 7 17:56:46 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 11 21:49:30 2023 +0200

Move SalInstanceFormattedSpinButton decl to header

Change-Id: I64582387b9169efa700a0df5c89e042a9a150423
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154192
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 
(cherry picked from commit b0de1f5fc3b6170f562328de8abd3680f2382a7a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154313
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index d3949cd68590..04a42c3a8929 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -2207,4 +2207,47 @@ public:
 }
 };
 
+class SalInstanceFormattedSpinButton : public SalInstanceEntry,
+   public virtual weld::FormattedSpinButton
+{
+private:
+VclPtr m_xButton;
+weld::EntryFormatter* m_pFormatter;
+Link m_aLoseFocusHdl;
+
+DECL_LINK(UpDownHdl, SpinField&, void);
+DECL_LINK(LoseFocusHdl, Control&, void);
+
+public:
+SalInstanceFormattedSpinButton(FormattedField* pButton, 
SalInstanceBuilder* pBuilder,
+   bool bTakeOwnership);
+
+virtual void set_text(const OUString& rText) override;
+
+virtual void connect_changed(const Link& rLink) 
override;
+
+virtual void connect_focus_out(const Link& rLink) 
override;
+
+virtual void SetFormatter(weld::EntryFormatter* pFormatter) override;
+
+virtual void sync_value_from_formatter() override
+{
+// no-op for gen
+}
+
+virtual void sync_range_from_formatter() override
+{
+// no-op for gen
+}
+
+virtual void sync_increments_from_formatter() override
+{
+// no-op for gen
+}
+
+virtual Formatter& GetFormatter() override;
+
+virtual ~SalInstanceFormattedSpinButton() override;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4de845997375..bd1778308314 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5805,88 +5805,59 @@ IMPL_LINK(SalInstanceSpinButton, InputHdl, sal_Int64*, 
pResult, TriState)
 return eRet;
 }
 
-namespace
-{
-class SalInstanceFormattedSpinButton : public SalInstanceEntry,
-   public virtual weld::FormattedSpinButton
+SalInstanceFormattedSpinButton::SalInstanceFormattedSpinButton(FormattedField* 
pButton,
+   
SalInstanceBuilder* pBuilder,
+   bool 
bTakeOwnership)
+: SalInstanceEntry(pButton, pBuild

[Libreoffice-commits] core.git: sw/source

2023-07-11 Thread Justin Luth (via logerrit)
 sw/source/core/doc/docfmt.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f1ef3012fc7391d3dd4060a8f3108c60243dc45f
Author: Justin Luth 
AuthorDate: Mon Jul 10 08:01:45 2023 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 11 19:43:50 2023 +0200

document the unusal application of a style-property to define DF

One would expect the normal process of a style defining a property,
and direct formatting overriding the style.

However, in the case of a list level, ODF spec says that the
definition in the list level has no meaning at all,
except at the time when the style is applied to a paragraph.
At that time, the program can chose whether or not to set
the list level directly on the paragraph to the suggested level.

Change-Id: Ia415f7be438b5123127f292c9f02cb9b9cfe66fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154249
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index a882bac7bfd1..5f7b6d9d6c10 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1074,7 +1074,12 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* 
pArgs )
 }
 else
 {
-// forcing reset of list level from paragraph
+// The List Level must be applied as direct formatting. The 
spec says:
+// 19.495 The style:list-level attribute specifies the list 
level value
+// of a list style that may be applied to any paragraph style.
+// It does not directly specify the paragraph's list level 
value,
+// but consumers can change the paragraph's list level value 
to the specified value
+// when the paragraph style is applied.
 pCNd->SetAttr(pFormat->GetFormatAttr(RES_PARATR_LIST_LEVEL));
 }
 }


[Libreoffice-commits] core.git: sc/inc sc/qa sc/source

2023-07-11 Thread Justin Luth (via logerrit)
 sc/inc/dociter.hxx  |4 ++--
 sc/qa/unit/subsequent_filters_test2.cxx |7 ---
 sc/source/core/data/dociter.cxx |   11 +++
 sc/source/filter/oox/workbookhelper.cxx |1 +
 sc/source/ui/docshell/docsh5.cxx|   10 ++
 sc/source/ui/inc/docsh.hxx  |1 +
 6 files changed, 21 insertions(+), 13 deletions(-)

New commits:
commit d15c4caabaa21e0efe3a08ffbe145390e802bab9
Author: Justin Luth 
AuthorDate: Tue Sep 20 08:14:41 2022 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 11 19:38:07 2023 +0200

tdf#123026 xlsx import: recalc optimal row height on import

This patch depends on the previous patch for this bug report,
which allows each sheet to hold its own default row height.

The given height for the row might not be enough to fit
the content. If the row is set to use optimal height,
that will be corrected as soon as the row is edited.

Obviously, it should not require an edit to be correct
on FILEOPEN, so this patch recalculates after loading the document.

This might have a very negative effect on the time needed
to open a file. I couldn't duplicate the XLS method
because Library_scfilt.mk doesn't link to ScSizeDeviceProvider.
The existing UpdateAllRowHeights wasn't designed to
allow any performance improvements, so I made a new one.
The new one is based on the newer ScDocRowHeightUpdater
class - so perhaps the older method can be phased out.
This new UpdateAllRowHeights could replace the
XLS bSetRowHeights clause - with hopefully some performance
benefit.

I'm not sure I'm ready for the regression hate
that would come from the inevitable performance implications.

Testing however doesn't suggest a huge slowdown. I tested with
time make sc.check
before the fix I was getting 16m 4s +- 10s
after the fix I was getting 16m 25s +- 10s

Specific test showing the need for these patches:
make CppunitTest_sc_subsequent_filters_test2 \
CPPUNIT_TEST_NAME=testTdf123026_optimalRowHeight

Impacted unit tests (without the previous patch)
are documented in earlier patchsets.

make CppunitTest_sc_subsequent_export_test \
CPPUNIT_TEST_NAME=testMiscRowHeightExport

make CppunitTest_sc_subsequent_export_test2

make CppunitTest_sc_jumbosheets_test CPPUNIT_TEST_NAME=testTdf134553

Change-Id: I6d020c1a5137dd4f05e20e82b1764a102b7f56d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140260
Reviewed-by: Justin Luth 
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index b73d175a000f..6be5a77e5e5b 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -457,10 +457,10 @@ public:
 ScDocument& rDoc, OutputDevice* pOutDev, double fPPTX, double fPPTY,
 const ::std::vector* pTabRangesArray);
 
-void update();
+void update(const bool bOnlyUsedRows = false);
 
 private:
-void updateAll();
+void updateAll(const bool bOnlyUsedRows);
 
 private:
 ScDocument& mrDoc;
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index d5ce977b3a4e..790ab5c99057 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -148,13 +148,6 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest2, 
testOptimalHeightReset)
 CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testTdf123026_optimalRowHeight)
 {
 createScDoc("xlsx/tdf123026_optimalRowHeight.xlsx");
-
-dispatchCommand(mxComponent, ".uno:SelectColumn", {});
-dispatchCommand(
-mxComponent, ".uno:SetOptimalRowHeight",
-comphelper::InitPropertySequence({ { "aExtraHeight", 
uno::Any(sal_uInt16(0)) } }));
-Scheduler::ProcessEventsToIdle();
-
 SCTAB nTab = 0;
 SCROW nRow = 4;
 int nHeight = convertTwipToMm100(getScDoc()->GetRowHeight(nRow, nTab, 
false));
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index fd4fa7afe42f..267d814daf76 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1615,12 +1615,12 @@ 
ScDocRowHeightUpdater::ScDocRowHeightUpdater(ScDocument& rDoc, OutputDevice* pOu
 {
 }
 
-void ScDocRowHeightUpdater::update()
+void ScDocRowHeightUpdater::update(const bool bOnlyUsedRows)
 {
 if (!mpTabRangesArray || mpTabRangesArray->empty())
 {
 // No ranges defined. Update all rows in all tables.
-updateAll();
+updateAll(bOnlyUsedRows);
 return;
 }
 
@@ -1668,7 +1668,7 @@ void ScDocRowHeightUpdater::update()
 }
 }
 
-void ScDocRowHeightUpdater::updateAll()
+void ScDocRowHeightUpdater::updateAll(const bool bOnlyUsedRows)
 {
 sal_uInt64 nCellCount = 0;
 for (SCTAB nTab = 0; nTab < mrDoc.GetTableCount(); ++nTab)
@@ -1689,7 +1689,10 @@ void ScDocRowHeightUpdater::updateAll()
 if (!ValidTab(nTab) || !mrDoc

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - cui/source cui/uiconfig editeng/source include/editeng include/xmloff offapi/com schema/libreoffice sw/inc sw/qa sw/sou

2023-07-11 Thread Mike Kaganski (via logerrit)
 cui/source/inc/numpages.hxx |2 
 cui/source/tabpages/numpages.cxx|   27 ++
 cui/uiconfig/ui/numberingoptionspage.ui |   47 
 editeng/source/items/numitem.cxx|   17 +++-
 include/editeng/numitem.hxx |7 +
 include/xmloff/xmltoken.hxx |1 
 offapi/com/sun/star/style/NumberingLevel.idl|6 +
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   15 +++
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/odfexport/data/IsLegal.fodt|   28 +++
 sw/qa/extras/odfexport/odfexport2.cxx   |   22 +
 sw/qa/extras/ooxmlexport/data/listWithLgl.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx  |   20 +
 sw/source/core/doc/number.cxx   |4 -
 sw/source/core/unocore/unosett.cxx  |8 ++
 sw/source/filter/ww8/attributeoutputbase.hxx|3 
 sw/source/filter/ww8/docxattributeoutput.cxx|7 +
 sw/source/filter/ww8/docxattributeoutput.hxx|3 
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 
 sw/source/filter/ww8/rtfattributeoutput.hxx |   14 +--
 sw/source/filter/ww8/wrtw8num.cxx   |5 -
 sw/source/filter/ww8/ww8attributeoutput.hxx |3 
 writerfilter/source/dmapper/NumberingManager.cxx|6 +
 writerfilter/source/dmapper/NumberingManager.hxx|1 
 writerfilter/source/dmapper/PropertyIds.cxx |1 
 writerfilter/source/dmapper/PropertyIds.hxx |1 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/style/xmlnume.cxx |   10 ++
 xmloff/source/style/xmlnumi.cxx |8 ++
 xmloff/source/token/tokens.txt  |1 
 30 files changed, 235 insertions(+), 36 deletions(-)

New commits:
commit 0f9ebefd27eb7fbef951a960d9821ca646af3dda
Author: Mike Kaganski 
AuthorDate: Mon Jul 10 22:41:46 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Jul 11 19:07:57 2023 +0200

tdf#150408: Implement UI for "Legal" numbering

Change-Id: I16849a2d823539040ecb91416b5214d25851950a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154287
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154334
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 8f554722fa67..f6f01aadbcc3 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -235,6 +235,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 std::unique_ptr m_xBulRelSizeMF;
 std::unique_ptr m_xAllLevelFT;
 std::unique_ptr m_xAllLevelNF;
+std::unique_ptr m_xIsLegalCB;
 std::unique_ptr m_xStartFT;
 std::unique_ptr m_xStartED;
 std::unique_ptr m_xBulletFT;
@@ -273,6 +274,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
 DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void);
 DECL_LINK(AllLevelHdl_Impl, weld::SpinButton&, void);
+DECL_LINK(IsLegalHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void);
 DECL_LINK(SameLevelHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(BulColorHdl_Impl, ColorListBox&, void);
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 19a2b37ed82d..9b97d19460b5 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1037,6 +1037,7 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button("relsize", 
FieldUnit::PERCENT))
 , m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft"))
 , m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevels"))
+, m_xIsLegalCB(m_xBuilder->weld_check_button("islegal"))
 , m_xStartFT(m_xBuilder->weld_label("startatft"))
 , m_xStartED(m_xBuilder->weld_spin_button("startat"))
 , m_xBulletFT(m_xBuilder->weld_label("bulletft"))
@@ -1074,6 +1075,7 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 m_xPrefixED->connect_changed(LINK(this, SvxNumOptionsTabPage, 
EditModifyHdl_Impl));
 m_xSuffixED->connect_changed(LINK(this, SvxNumOptionsTabPage, 
EditModifyHdl_Impl));
 m_xAllLevelNF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, 
AllLevelHdl_Impl));
+m_xIsLegalCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, 
IsLegalHdl_Impl));
 m_xOrientLB->connect_changed(LINK(this, SvxNumOptionsTabPage, 

[Libreoffice-commits] core.git: svgio/source

2023-07-11 Thread Xisco Fauli (via logerrit)
 svgio/source/svgreader/svgtoken.cxx |8 
 svgio/source/svgreader/svgtools.cxx |4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit cf07373d84b0ad6d0110b62966705b3e101785b5
Author: Xisco Fauli 
AuthorDate: Tue Jul 11 10:52:40 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 11 16:44:07 2023 +0200

svgio: use frozen::make_unordered_map so no need to specify the count

Change-Id: Id8400cba4c00439b4f4b888782d68531f7a64617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154293
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/svgio/source/svgreader/svgtoken.cxx 
b/svgio/source/svgreader/svgtoken.cxx
index 0d77ca901ee8..d5222a2df125 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -25,7 +25,7 @@
 namespace svgio::svgreader
 {
 
-constexpr frozen::unordered_map 
aSVGTokenMapperList
+constexpr auto aSVGTokenMapperList = 
frozen::make_unordered_map(
 {
 { u"width", SVGToken::Width },
 { u"height", SVGToken::Height },
@@ -178,11 +178,11 @@ constexpr frozen::unordered_map aSVGTokenMap
 { u"text", SVGToken::Text },
 { u"baseline-shift", SVGToken::BaselineShift },
 { u"flowRoot", SVGToken::FlowRoot }
-};
+});
 
 // The same elements as the map above but lowercase. CSS is case insensitive
 // TODO: create separate maps for css and xml elements
-constexpr frozen::unordered_map 
aSVGLowerCaseTokenMapperList
+constexpr auto  aSVGLowerCaseTokenMapperList = 
frozen::make_unordered_map(
 {
 { u"width", SVGToken::Width },
 { u"height", SVGToken::Height },
@@ -335,7 +335,7 @@ constexpr frozen::unordered_map aSVGLowerCas
 { u"text", SVGToken::Text },
 { u"baseline-shift", SVGToken::BaselineShift },
 { u"flowroot", SVGToken::FlowRoot }
-};
+});
 
 static_assert(sizeof(aSVGTokenMapperList) == 
sizeof(aSVGLowerCaseTokenMapperList),
 "Number of elements in both maps must be the same");
diff --git a/svgio/source/svgreader/svgtools.cxx 
b/svgio/source/svgreader/svgtools.cxx
index ce8b4f99bd62..e76d8ae4b448 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -32,7 +32,7 @@
 
 namespace svgio::svgreader
 {
-constexpr frozen::unordered_map 
aColorTokenMapperList
+constexpr auto aColorTokenMapperList = 
frozen::make_unordered_map(
 {
 { u"aliceblue", Color(240, 248, 255) },
 { u"antiquewhite", Color(250, 235, 215) },
@@ -181,7 +181,7 @@ namespace svgio::svgreader
 { u"whitesmoke", Color(245, 245, 245) },
 { u"yellow", Color(255, 255, 0) },
 { u"yellowgreen", Color(154, 205, 50) }
-};
+});
 
 basegfx::B2DHomMatrix SvgAspectRatio::createLinearMapping(const 
basegfx::B2DRange& rTarget, const basegfx::B2DRange& rSource)
 {


[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry xmlsecurity/inc xmlsecurity/Module_xmlsecurity.mk xmlsecurity/source

2023-07-11 Thread TokieSan (via logerrit)
 cui/source/options/optinet2.cxx|   58 +
 cui/source/options/optinet2.hxx|4 
 cui/uiconfig/ui/optsecuritypage.ui |  391 +++--
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 
 xmlsecurity/Module_xmlsecurity.mk  |4 
 xmlsecurity/inc/digitalsignaturesdialog.hxx|2 
 xmlsecurity/inc/strings.hrc|1 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |  160 ++---
 8 files changed, 401 insertions(+), 225 deletions(-)

New commits:
commit 92b6ffcd9f687cc54a0fc3801ca85c7e4d77512f
Author: TokieSan 
AuthorDate: Fri Jun 30 11:22:01 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Tue Jul 11 16:30:59 2023 +0200

Allow selecting a custom certificate manager

Added a new option in Tools>Options>Security that allows choosing the
path of a different certificate manager.

Made Certificate Manager Button be disabled instead of hidden in case no
certificate manager is detected. Added a box notifying that the
certificate manager is opened (or not working in case it failed for some
reason).

Change-Id: I64a901766d4fb05c59c0f85fdf94c08a3ca4bdab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153798
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 95d0ec18346b..cf879d056824 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -493,6 +493,8 @@ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* 
pPage, weld::DialogContr
 , m_xTSAURLsFrame(m_xBuilder->weld_container("tsaurls"))
 , m_xTSAURLsPB(m_xBuilder->weld_button("tsas"))
 , m_xNoPasswordSaveFT(m_xBuilder->weld_label("nopasswordsave"))
+, m_xCertMgrPathLB(m_xBuilder->weld_button("browse"))
+, m_xParameterEdit(m_xBuilder->weld_entry("parameterfield"))
 {
 //fdo#65595, we need height-for-width support here, but for now we can
 //bodge it
@@ -516,10 +518,46 @@ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* 
pPage, weld::DialogContr
 m_xMacroSecPB->connect_clicked( LINK( this, SvxSecurityTabPage, 
MacroSecPBHdl ) );
 m_xCertPathPB->connect_clicked( LINK( this, SvxSecurityTabPage, 
CertPathPBHdl ) );
 m_xTSAURLsPB->connect_clicked( LINK( this, SvxSecurityTabPage, 
TSAURLsPBHdl ) );
+m_xCertMgrPathLB->connect_clicked( LINK( this, SvxSecurityTabPage, 
CertMgrPBHdl ) );
 
 ActivatePage( rSet );
 }
 
+IMPL_LINK_NOARG(SvxSecurityTabPage, CertMgrPBHdl, weld::Button&, void)
+{
+try
+{
+FileDialogHelper 
aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, nullptr);
+OUString sPath = m_xParameterEdit->get_text();
+if (sPath.isEmpty())
+sPath = "/usr/bin";
+
+OUString sUrl;
+osl::FileBase::getFileURLFromSystemPath(sPath, sUrl);
+aHelper.SetDisplayDirectory(sUrl);
+
+if (ERRCODE_NONE == aHelper.Execute())
+{
+sUrl = aHelper.GetPath();
+if (osl::FileBase::getSystemPathFromFileURL(sUrl, sPath) != 
osl::FileBase::E_None)
+{
+sPath.clear();
+}
+m_xParameterEdit->set_text(sPath);
+}
+std::shared_ptr pBatch(
+comphelper::ConfigurationChanges::create());
+OUString sCurCertMgr = m_xParameterEdit->get_text();
+
officecfg::Office::Common::Security::Scripting::CertMgrPath::set(sCurCertMgr, 
pBatch);
+pBatch->commit();
+}
+catch (const uno::Exception&)
+{
+TOOLS_WARN_EXCEPTION("cui.options", "CertMgrPBHdl");
+}
+}
+
 SvxSecurityTabPage::~SvxSecurityTabPage()
 {
 }
@@ -750,6 +788,17 @@ void SvxSecurityTabPage::InitControls()
 {
 m_xSavePasswordsCB->set_sensitive( false );
 }
+
+try
+{
+OUString sCurCertMgr = 
officecfg::Office::Common::Security::Scripting::CertMgrPath::get();
+
+if (!sCurCertMgr.isEmpty())
+m_xParameterEdit->set_text(sCurCertMgr);
+}
+catch (const uno::Exception&)
+{
+}
 }
 
 std::unique_ptr SvxSecurityTabPage::Create(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet* rAttrSet )
@@ -803,6 +852,15 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* )
 CheckAndSave( SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, 
m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
 }
 
+std::shared_ptr pBatch(
+comphelper::ConfigurationChanges::create());
+if (m_xParameterEdit->get_value_changed_from_saved())
+{
+OUString sCurCertMgr = m_xParameterEdit->get_text();
+
officecfg::Office::Common::Security::Scripting::CertMgrPath::set(sCurCertMgr, 
pBatch);
+pBatch->commit();
+}
+
 retu

[Libreoffice-commits] core.git: external/skia

2023-07-11 Thread Stephan Bergmann (via logerrit)
 external/skia/UnpackedTarball_skia.mk |1 +
 external/skia/incomplete.patch.0  |   18 ++
 2 files changed, 19 insertions(+)

New commits:
commit 254b90801d4af1b775447dc701c2f0d71fcfd773
Author: Stephan Bergmann 
AuthorDate: Tue Jul 11 08:35:55 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jul 11 16:04:15 2023 +0200

external/skia: Fix use of incomplete type

...as reported at least with --with-latest-c++ against recent LLVM 17 
libc++,

> In file included from 
workdir/UnpackedTarball/skia/src/gpu/ganesh/image/GrImageUtils.cpp:8:
> In file included from 
workdir/UnpackedTarball/skia/src/gpu/ganesh/image/GrImageUtils.h:12:
> In file included from 
workdir/UnpackedTarball/skia/include/core/SkSamplingOptions.h:13:
> In file included from ~/llvm/inst/bin/../include/c++/v1/algorithm:1778:
> In file included from 
~/llvm/inst/bin/../include/c++/v1/__algorithm/inplace_merge.h:28:
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:66:19: error: 
invalid application of 'sizeof' to an incomplete type 'GrFragmentProcessor'
>66 | static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete 
type");
>   |   ^~~
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:300:7: note: in 
instantiation of member function 
'std::default_delete::operator()' requested here
>   300 |   __ptr_.second()(__tmp);
>   |   ^
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:266:75: note: in 
instantiation of member function 'std::unique_ptr::reset' 
requested here
>   266 |   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 
~unique_ptr() { reset(); }
>   |   
^
> workdir/UnpackedTarball/skia/src/gpu/ganesh/image/GrImageUtils.h:106:12: 
note: in instantiation of member function 
'std::unique_ptr::~unique_ptr' requested here
>   106 | return AsFragmentProcessor(ctx, img.get(), opt, tm, m, 
subset, domain);
>   |^
> workdir/UnpackedTarball/skia/src/gpu/ganesh/SkGr.h:32:7: note: forward 
declaration of 'GrFragmentProcessor'
>32 | class GrFragmentProcessor;
>   |   ^

Change-Id: I181f7416c80fd97c505359f275dd61f69ee27ef8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154291
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/skia/UnpackedTarball_skia.mk 
b/external/skia/UnpackedTarball_skia.mk
index f6e97fb899e2..f4562ca31374 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -38,6 +38,7 @@ skia_patches := \
 redefinition-of-op.patch.0 \
 0001-Added-missing-include-cstdio.patch \
 fix-SkDebugf-link-error.patch.1 \
+incomplete.patch.0 \
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
 
diff --git a/external/skia/incomplete.patch.0 b/external/skia/incomplete.patch.0
new file mode 100644
index ..f8450b1c1da2
--- /dev/null
+++ b/external/skia/incomplete.patch.0
@@ -0,0 +1,18 @@
+--- src/gpu/ganesh/image/GrImageUtils.h
 src/gpu/ganesh/image/GrImageUtils.h
+@@ -12,6 +12,7 @@
+ #include "include/core/SkSamplingOptions.h"
+ #include "include/core/SkYUVAPixmaps.h"
+ #include "include/gpu/GrTypes.h"
++#include "src/gpu/ganesh/GrFragmentProcessor.h"
+ #include "src/gpu/ganesh/GrSurfaceProxyView.h"  // IWYU pragma: keep
+ #include "src/gpu/ganesh/SkGr.h"
+ 
+@@ -21,7 +22,6 @@
+ #include 
+ 
+ class GrCaps;
+-class GrFragmentProcessor;
+ class GrImageContext;
+ class GrRecordingContext;
+ class SkImage;


[Libreoffice-commits] core.git: vcl/inc vcl/source

2023-07-11 Thread Szymon Kłos (via logerrit)
 vcl/inc/salvtables.hxx|   29 +
 vcl/source/app/salvtables.cxx |   29 -
 2 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 16d600edcc33b72a9d09b7f2f496313612ffebd4
Author: Szymon Kłos 
AuthorDate: Thu Jul 6 15:36:39 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 11 15:51:11 2023 +0200

jsdialog: Move SalInstanceCalendar decl to header file

Change-Id: Ide9e685d724d646f0ab8825b1fce2b6fd130d3ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154135
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit d792875d79a63364dba02426ef75d696ae0f02ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154266
Tested-by: Jenkins

diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 7ac28808ce3d..d3949cd68590 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include "calendar.hxx"
 #include "iconview.hxx"
 #include "listbox.hxx"
 #include "messagedialog.hxx"
@@ -2178,4 +2179,32 @@ public:
 virtual ~SalInstanceScrolledWindow() override;
 };
 
+class SalInstanceCalendar : public SalInstanceWidget, public virtual 
weld::Calendar
+{
+private:
+VclPtr<::Calendar> m_xCalendar;
+
+DECL_LINK(SelectHdl, ::Calendar*, void);
+DECL_LINK(ActivateHdl, ::Calendar*, void);
+
+public:
+SalInstanceCalendar(::Calendar* pCalendar, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership)
+: SalInstanceWidget(pCalendar, pBuilder, bTakeOwnership)
+, m_xCalendar(pCalendar)
+{
+m_xCalendar->SetSelectHdl(LINK(this, SalInstanceCalendar, SelectHdl));
+m_xCalendar->SetActivateHdl(LINK(this, SalInstanceCalendar, 
ActivateHdl));
+}
+
+virtual void set_date(const Date& rDate) override { 
m_xCalendar->SetCurDate(rDate); }
+
+virtual Date get_date() const override { return 
m_xCalendar->GetFirstSelectedDate(); }
+
+virtual ~SalInstanceCalendar() override
+{
+m_xCalendar->SetSelectHdl(Link<::Calendar*, void>());
+m_xCalendar->SetActivateHdl(Link<::Calendar*, void>());
+}
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 71308484ed63..4de845997375 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -76,7 +76,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -3294,34 +3293,6 @@ public:
 
 virtual void set_text(const OUString& rText) override { 
m_xProgressBar->SetText(rText); }
 };
-
-class SalInstanceCalendar : public SalInstanceWidget, public virtual 
weld::Calendar
-{
-private:
-VclPtr<::Calendar> m_xCalendar;
-
-DECL_LINK(SelectHdl, ::Calendar*, void);
-DECL_LINK(ActivateHdl, ::Calendar*, void);
-
-public:
-SalInstanceCalendar(::Calendar* pCalendar, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership)
-: SalInstanceWidget(pCalendar, pBuilder, bTakeOwnership)
-, m_xCalendar(pCalendar)
-{
-m_xCalendar->SetSelectHdl(LINK(this, SalInstanceCalendar, SelectHdl));
-m_xCalendar->SetActivateHdl(LINK(this, SalInstanceCalendar, 
ActivateHdl));
-}
-
-virtual void set_date(const Date& rDate) override { 
m_xCalendar->SetCurDate(rDate); }
-
-virtual Date get_date() const override { return 
m_xCalendar->GetFirstSelectedDate(); }
-
-virtual ~SalInstanceCalendar() override
-{
-m_xCalendar->SetSelectHdl(Link<::Calendar*, void>());
-m_xCalendar->SetActivateHdl(Link<::Calendar*, void>());
-}
-};
 }
 
 IMPL_LINK_NOARG(SalInstanceCalendar, SelectHdl, ::Calendar*, void)


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa sw/source

2023-07-11 Thread Miklos Vajna (via logerrit)
 sw/qa/filter/ww8/data/floattable-then-floattable.doc |binary
 sw/qa/filter/ww8/ww8.cxx |   23 +++
 sw/source/filter/ww8/ww8par6.cxx |   17 ++
 3 files changed, 40 insertions(+)

New commits:
commit c6d3e6d17edd4cee58511cc65777393da127b78b
Author: Miklos Vajna 
AuthorDate: Tue Jul 11 08:21:20 2023 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 11 15:36:05 2023 +0200

sw floattable: make sure floattable after floattable gets own anch pos from 
DOC

The bugdoc has 2 floating tables next to each other, which overlap in
Writer, but not in Word.

This looks quite similar to the DOCX case, which was solved in commit
01ad8ec4bb5425446e95dbada81de435646824b4 (sw floattable: fix lost tables
around a floating table from DOCX, 2023-06-05).

Fix the problem by improving SwWW8ImplReader::StartApo() so it inserts a
fake paragraph when a floating table is immediately followed by a
floating table. A similar case, floating table followed immediately by
an inline table was already handled like this in
WW8TabDesc::CreateSwTable().

Creating a reproducer document from scratch is quite tricky, as Word
will also insert a fake paragraph on the first save of the DOC test file
(so the doc model will be floattable-para-floattable-para) and manual
edit of binary DOC files is also not easy. So the compromise is that the
testcase file has 2 floating tables anchored to the same paragraph, but
they don't overlap visually, while they do overlap in the original,
internal bugdoc. With this, finally the bnc#816603 DOC bugdoc renders
without overlaps, which was the case before my multi-page floating table
changes.

(cherry picked from commit 663db89378aa1f0425e795ef5d471f134e658dc4)

Conflicts:
sw/qa/filter/ww8/ww8.cxx

Change-Id: Ib1b4c7c80833db5a7bde38092c8c3ed6fd1d2462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154300
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/filter/ww8/data/floattable-then-floattable.doc 
b/sw/qa/filter/ww8/data/floattable-then-floattable.doc
new file mode 100644
index ..6e694140740b
Binary files /dev/null and 
b/sw/qa/filter/ww8/data/floattable-then-floattable.doc differ
diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx
index 7d4c4c2f730a..f91a518c44ee 100644
--- a/sw/qa/filter/ww8/ww8.cxx
+++ b/sw/qa/filter/ww8/ww8.cxx
@@ -333,6 +333,29 @@ CPPUNIT_TEST_FIXTURE(Test, 
testDOCFloatingTableHiddenAnchor)
 // i.e. the floating table was lost.
 assertXPath(pLayout, "//tab", 2);
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableThenFloattable)
+{
+// Given a document that contains a floating table, immediately followed 
by an other floating
+// table:
+// When importing the document & laying it out:
+createSwDoc("floattable-then-floattable.doc");
+calcLayout();
+
+// Then make sure that the two floating table has different anchors:
+SwDoc* pDoc = getSwDoc();
+auto& rFlys = *pDoc->GetSpzFrameFormats();
+auto pFly1 = rFlys[0];
+SwNodeOffset nFly1Anchor = 
pFly1->GetAttrSet().GetAnchor().GetAnchorContentNode()->GetIndex();
+auto pFly2 = rFlys[1];
+SwNodeOffset nFly2Anchor = 
pFly2->GetAttrSet().GetAnchor().GetAnchorContentNode()->GetIndex();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 42
+// - Actual  : 41
+// i.e. the two anchor positions were the same instead of first anchor 
followed by the second
+// anchor.
+CPPUNIT_ASSERT_EQUAL(nFly1Anchor + 1, nFly2Anchor);
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e2972105c560..a863c048e53a 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2497,6 +2497,23 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults 
&rApo, const WW8_TablePos *p
 
 if (pTabPos)
 {
+if (m_xFormatOfJustInsertedApo)
+{
+// We just inserted a floating table and we'll insert a next 
one.
+SwFrameFormat* pFormat = 
m_xFormatOfJustInsertedApo->GetFormat();
+if (pFormat)
+{
+const SwNode* pAnchorNode = 
pFormat->GetAnchor().GetAnchorNode();
+SwPosition* pPoint = m_pPaM->GetPoint();
+if (pAnchorNode && *pAnchorNode == pPoint->GetNode())
+{
+// The two fly frames would have the same anchor 
position, leading to
+// potentially overlapping text, prevent that.
+AppendTextNode(*pPoint);
+}
+}
+}
+
 // Map a positioned table to a split fly.
 aFlySet.Put(SwFo

[Libreoffice-commits] core.git: 2 commits - filter/source

2023-07-11 Thread Svante Schubert (via logerrit)
 filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl   |   71 
--
 filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl |   17 
+-
 filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl |5 
 3 files changed, 78 insertions(+), 15 deletions(-)

New commits:
commit 0ee798d3a4cc90629e96f0f6c780c2887ae521d0
Author: Svante Schubert 
AuthorDate: Mon Jul 10 22:33:13 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 11 15:22:53 2023 +0200

tdf#156093 filter: XHTML export: Enabling previous test files ...

... again and neglecting @draw:fill-color in base style to avoid
duplication of fo:background

Change-Id: I4905a7f8371d422944172140ab04c6bad6e7bd77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154296
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git 
a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl 
b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
index a120ab68052c..bdad6da4bf45 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
@@ -576,7 +576,7 @@
 

-
+
 
 
 
commit e2735d07e4bd9af0edfa561112393b9ae92ff923
Author: Svante Schubert 
AuthorDate: Mon Jul 10 20:31:32 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 11 15:22:48 2023 +0200

tdf#156093 filter: XHTML export: Enabled all three different ...

... influences for CSS background-color: fo:background-color,
draw:fill-color and draw:fill='none' the latter is the value
'transparent'

Change-Id: I8891bbaca224ad5f4340cded93182523e396223f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154295
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git 
a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl 
b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
index bac0c5963ccd..a120ab68052c 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
@@ -504,6 +504,8 @@
 
 
 
+
 
 
 
@@ -511,9 +513,59 @@

 
 
-
+
+
+
+
+
+
+transparent
+
+
+
+
+
+
+
+transparent
+
+
+
+
+
+
+
+
+
 
 
+
+
+
+transparent
+
+
+
+
+
+
+
+
+
+
+transparent
+
+
+
+
+
+
+
 
 
 
@@ -568,21 +620,20 @@
 
 
 
-
+all-doc-styles:start
 
-
+***style:end
 
-
+all-doc-styles:end
 
 
 
diff --git 
a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl 
b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
index 06e22d7e2fed..56b17331a0b9 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
@@ -22,11 +22,18 @@
 http://www.w3.org/1999/XSL/Transform"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:draw="urn:oasis:

[Libreoffice-commits] core.git: helpcontent2

2023-07-11 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fac0bae1b7da1145217aa7f9f864a784bf07ebb
Author: Olivier Hallot 
AuthorDate: Tue Jul 11 15:10:57 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Jul 11 15:10:57 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ee57bcddb3488d2eb046cacfc63f86f4a774e2ba
  - Fix typo

Change-Id: I94fc0b9b5571be5aa4ef00ea5b334d72f6fc0fec
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154268
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index ea59b72bfa1b..ee57bcddb348 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ea59b72bfa1b74e1b3a294778ec1d490d4e6962b
+Subproject commit ee57bcddb3488d2eb046cacfc63f86f4a774e2ba


[Libreoffice-commits] help.git: source/text

2023-07-11 Thread Olivier Hallot (via logerrit)
 source/text/shared/01/scrollbars.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee57bcddb3488d2eb046cacfc63f86f4a774e2ba
Author: Olivier Hallot 
AuthorDate: Tue Jul 11 15:06:40 2023 +0200
Commit: Olivier Hallot 
CommitDate: Tue Jul 11 15:10:57 2023 +0200

Fix typo

Change-Id: I94fc0b9b5571be5aa4ef00ea5b334d72f6fc0fec
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154268
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/scrollbars.xhp 
b/source/text/shared/01/scrollbars.xhp
index 9c575cc80f..9cb499afab 100644
--- a/source/text/shared/01/scrollbars.xhp
+++ b/source/text/shared/01/scrollbars.xhp
@@ -23,7 +23,7 @@
 
 
 
-choose 
View - Scroll Bars.
+Choose 
View - Scroll Bars.
 
 
 


[Libreoffice-commits] core.git: download.lst external/libtommath

2023-07-11 Thread Taichi Haradaguchi (via logerrit)
 download.lst  |4 ++--
 external/libtommath/README|2 +-
 external/libtommath/UnpackedTarball_libtommath.mk |2 --
 external/libtommath/clang-cl.patch|   16 
 external/libtommath/libtommath-msvc.patch |   12 
 5 files changed, 3 insertions(+), 33 deletions(-)

New commits:
commit 13bc0489d98b1f49a4f82fccb89d640439db4f4e
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Jul 3 17:27:57 2023 +0900
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Tue Jul 11 14:05:49 2023 +0200

LibTomMath: upgrade to release 1.2.0

* external/libtommath/clang-cl.patch: removed "typedef unsigned __int128
mp_word" from tommmath.h
* external/libtommath/libtommath-msvc.patch: fixed upstream

Change-Id: I38fe730ff0e9649c6a0ad8d64b723a27e3434012
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153871
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/download.lst b/download.lst
index 18cba62be184..903cae0237e8 100644
--- a/download.lst
+++ b/download.lst
@@ -329,8 +329,8 @@ LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.11.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483
-LIBTOMMATH_TARBALL := ltm-1.0.zip
+LIBTOMMATH_SHA256SUM := 
b7c75eecf680219484055fcedd686064409254ae44bc31a96c5032843c0e18b1
+LIBTOMMATH_TARBALL := ltm-1.2.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/libtommath/README b/external/libtommath/README
index a028ff733161..41f91970a71b 100644
--- a/external/libtommath/README
+++ b/external/libtommath/README
@@ -3,4 +3,4 @@ integer library written entirely in C.
 
 Used by embedded firebird (external/firebird).
 
-https://www.libtom.net/LibTomMath/
+From [https://www.libtom.net/LibTomMath/].
diff --git a/external/libtommath/UnpackedTarball_libtommath.mk 
b/external/libtommath/UnpackedTarball_libtommath.mk
index bb0b9e352930..8961a46162c5 100644
--- a/external/libtommath/UnpackedTarball_libtommath.mk
+++ b/external/libtommath/UnpackedTarball_libtommath.mk
@@ -14,8 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libtommath,$(LIBTOMMATH_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libtommath,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libtommath,\
-   external/libtommath/libtommath-msvc.patch \
-   external/libtommath/clang-cl.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libtommath/clang-cl.patch 
b/external/libtommath/clang-cl.patch
deleted file mode 100644
index 1cc92d380c62..
--- a/external/libtommath/clang-cl.patch
+++ /dev/null
@@ -1,16 +0,0 @@
 tommath.h
-+++ tommath.h
-@@ -15,6 +15,13 @@
- #ifndef BN_H_
- #define BN_H_
- 
-+// Work around clang-cl issue when mp_word is a typedef for unsigned 
__int128, see
-+//  "Clang-cl generates a call 
to an undefined symbol
-+// _udivti3":
-+#if defined _WIN32 && defined __clang__
-+#define MP_8BIT
-+#endif
-+
- #include 
- #include 
- #include 
diff --git a/external/libtommath/libtommath-msvc.patch 
b/external/libtommath/libtommath-msvc.patch
deleted file mode 100644
index 07884871aac9..
--- a/external/libtommath/libtommath-msvc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
 makefile.msvc  2016-02-05 23:25:32.0 +0100
-+++ makefile.msvc  2016-07-21 11:34:20.618390100 +0200
-@@ -38,3 +38,9 @@
- 
- library: $(OBJECTS)
-   lib /out:tommath.lib $(OBJECTS)
-+
-+.cc.obj:
-+  $(CC) /nologo $(CFLAGS) /c $<
-+
-+.c.obj:
-+  $(CC) /nologo $(CFLAGS) /c $<


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2023-07-11 Thread Mike Kaganski (via logerrit)
 cui/source/inc/numpages.hxx |2 +
 cui/source/tabpages/numpages.cxx|   27 ++
 cui/uiconfig/ui/numberingoptionspage.ui |   47 ++--
 3 files changed, 62 insertions(+), 14 deletions(-)

New commits:
commit b13a7112d89b402b41640a19f55ad9edb6433592
Author: Mike Kaganski 
AuthorDate: Mon Jul 10 22:41:46 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Jul 11 14:03:50 2023 +0200

tdf#150408: Implement UI for "Legal" numbering

Change-Id: I16849a2d823539040ecb91416b5214d25851950a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154287
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index dd1dfbaf31c6..d693b9e0324f 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -235,6 +235,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 std::unique_ptr m_xBulRelSizeMF;
 std::unique_ptr m_xAllLevelFT;
 std::unique_ptr m_xAllLevelNF;
+std::unique_ptr m_xIsLegalCB;
 std::unique_ptr m_xStartFT;
 std::unique_ptr m_xStartED;
 std::unique_ptr m_xBulletFT;
@@ -273,6 +274,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
 DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void);
 DECL_LINK(AllLevelHdl_Impl, weld::SpinButton&, void);
+DECL_LINK(IsLegalHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void);
 DECL_LINK(SameLevelHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(BulColorHdl_Impl, ColorListBox&, void);
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 2179ad2cf107..45ee580f1667 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1037,6 +1037,7 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button("relsize", 
FieldUnit::PERCENT))
 , m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft"))
 , m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevels"))
+, m_xIsLegalCB(m_xBuilder->weld_check_button("islegal"))
 , m_xStartFT(m_xBuilder->weld_label("startatft"))
 , m_xStartED(m_xBuilder->weld_spin_button("startat"))
 , m_xBulletFT(m_xBuilder->weld_label("bulletft"))
@@ -1074,6 +1075,7 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 m_xPrefixED->connect_changed(LINK(this, SvxNumOptionsTabPage, 
EditModifyHdl_Impl));
 m_xSuffixED->connect_changed(LINK(this, SvxNumOptionsTabPage, 
EditModifyHdl_Impl));
 m_xAllLevelNF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, 
AllLevelHdl_Impl));
+m_xIsLegalCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, 
IsLegalHdl_Impl));
 m_xOrientLB->connect_changed(LINK(this, SvxNumOptionsTabPage, 
OrientHdl_Impl));
 m_xSameLevelCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, 
SameLevelHdl_Impl));
 m_xBulRelSizeMF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, 
BulRelSizeHdl_Impl));
@@ -1271,6 +1273,7 @@ voidSvxNumOptionsTabPage::Reset( const SfxItemSet* 
rSet )
 bool bAllLevel = bContinuous && !bHTMLMode;
 m_xAllLevelFT->set_visible(bAllLevel);
 m_xAllLevelNF->set_visible(bAllLevel);
+m_xIsLegalCB->set_visible(bAllLevel);
 
 m_xAllLevelsFrame->set_visible(bContinuous);
 
@@ -1334,6 +1337,8 @@ void SvxNumOptionsTabPage::InitControls()
 bool bSameBulColor  = true;
 bool bSameBulRelSize= true;
 
+TriState isLegal = TRISTATE_INDET;
+
 const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
 OUString sFirstCharFmt;
 sal_Int16 eFirstOrient = text::VertOrientation::NONE;
@@ -1358,6 +1363,7 @@ void SvxNumOptionsTabPage::InitControls()
 eFirstOrient = aNumFmtArr[i]->GetVertOrient();
 if(bShowBitmap)
 aFirstSize = aNumFmtArr[i]->GetGraphicSize();
+isLegal = aNumFmtArr[i]->GetIsLegal() ? TRISTATE_TRUE : 
TRISTATE_FALSE;
 }
 if( i > nLvl)
 {
@@ -1367,6 +1373,8 @@ void SvxNumOptionsTabPage::InitControls()
 bSamePrefix = aNumFmtArr[i]->GetPrefix() == 
aNumFmtArr[nLvl]->GetPrefix();
 bSameSuffix = aNumFmtArr[i]->GetSuffix() == 
aNumFmtArr[nLvl]->GetSuffix();
 bAllLevel &= aNumFmtArr[i]->GetIncludeUpperLevels() == 
aNumFmtArr[nLvl]->GetIncludeUpperLevels();
+if (aNumFmtArr[i]->GetIsLegal() != 
aNumFmtArr[nLvl]->GetIsLegal())
+isLegal = TRISTATE_INDET;
 bSameCharFmt&= sFirstCharFmt == 
aNumFmtArr[i]->GetCharFormatName();
 bSameVOrient&= eFirstOrient == 
aNumFmtArr[i]->GetVertOrient();
 if(bShowBitmap && bSameSize)
@@ -1439,6 +1447,9 @@ void SvxNumOptionsTabPage::InitControls()
 m_xAllLevelNF->set_text("");
 }
 
+m_xIsLegalCB->s

[Libreoffice-commits] core.git: editeng/source include/editeng include/xmloff offapi/com schema/libreoffice sw/inc sw/qa sw/source writerfilter/source xmloff/source

2023-07-11 Thread Mike Kaganski (via logerrit)
 editeng/source/items/numitem.cxx|   17 +--
 include/editeng/numitem.hxx |7 ++-
 include/xmloff/xmltoken.hxx |1 
 offapi/com/sun/star/style/NumberingLevel.idl|6 ++
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   15 ++
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/odfexport/data/IsLegal.fodt|   28 
 sw/qa/extras/odfexport/odfexport2.cxx   |   22 +
 sw/qa/extras/ooxmlexport/data/listWithLgl.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport19.cxx  |   20 
 sw/source/core/doc/number.cxx   |4 -
 sw/source/core/unocore/unosett.cxx  |8 +++
 sw/source/filter/ww8/attributeoutputbase.hxx|3 -
 sw/source/filter/ww8/docxattributeoutput.cxx|7 ++-
 sw/source/filter/ww8/docxattributeoutput.hxx|3 -
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 
 sw/source/filter/ww8/rtfattributeoutput.hxx |   14 +++---
 sw/source/filter/ww8/wrtw8num.cxx   |5 +-
 sw/source/filter/ww8/ww8attributeoutput.hxx |3 -
 writerfilter/source/dmapper/NumberingManager.cxx|6 ++
 writerfilter/source/dmapper/NumberingManager.hxx|1 
 writerfilter/source/dmapper/PropertyIds.cxx |1 
 writerfilter/source/dmapper/PropertyIds.hxx |1 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/style/xmlnume.cxx |   10 
 xmloff/source/style/xmlnumi.cxx |8 +++
 xmloff/source/token/tokens.txt  |1 
 27 files changed, 173 insertions(+), 22 deletions(-)

New commits:
commit fd64b426bc6175841143714ccc16bad181fd088f
Author: Mike Kaganski 
AuthorDate: Fri Jun 30 18:19:27 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Jul 11 14:02:19 2023 +0200

tdf#150408: Implement "Legal" numbering (all levels using Arabic numbers)

Enabling this feature on a list level makes all numbered sublevels, that
constitute the number of this level, to use Arabic numerals. This doesn't
change the labels of other levels: e.g., if level 1 uses A,B,C; level 2
uses i,ii,iii; level 3 uses a,b,c, and is "Legal"; and level 4 uses 1,2,3;
then a list may look like

  A. Something
A.i. Some subitem
A.ii. Another subitem
  1.2.1. This is a "Legal" sub-subitem
A.ii.a.1. And its child

This improves interoperability with Word.

This change introduces document model, ODF and OOXML import and export.
In ODF, a new boolean attribute of 'text:outline-level-style' element,
'loext:is-legal', is introduced; its default value is "false".

Change-Id: I5ae9f970864854c7e84c4b2f7ce46634b3ef104e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154288
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index e8c1c4d9a77c..97f857547029 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -113,7 +113,13 @@ OUString SvxNumberType::GetNumStr( sal_Int32 nNo ) const
 return GetNumStr( nNo, aLang.getLocale() );
 }
 
-OUString SvxNumberType::GetNumStr( sal_Int32 nNo, const css::lang::Locale& 
rLocale ) const
+static bool isArabicNumberingType(SvxNumType t)
+{
+return t == SVX_NUM_ARABIC || t == SVX_NUM_ARABIC_ZERO || t == 
SVX_NUM_ARABIC_ZERO3
+   || t == SVX_NUM_ARABIC_ZERO4 || t == SVX_NUM_ARABIC_ZERO5;
+}
+
+OUString SvxNumberType::GetNumStr( sal_Int32 nNo, const css::lang::Locale& 
rLocale, bool bIsLegal ) const
 {
 lcl_getFormatter(xFormatter);
 if(!xFormatter.is())
@@ -133,11 +139,12 @@ OUString SvxNumberType::GetNumStr( sal_Int32 nNo, const 
css::lang::Locale& rLoca
 return OUString('0');
 else
 {
+SvxNumType nActType = !bIsLegal || 
isArabicNumberingType(nNumType) ? nNumType : SVX_NUM_ARABIC;
 static constexpr OUStringLiteral sNumberingType = 
u"NumberingType";
 static constexpr OUStringLiteral sValue = u"Value";
 Sequence< PropertyValue > aProperties
 {
-comphelper::makePropertyValue(sNumberingType, 
static_cast(nNumType)),
+comphelper::makePropertyValue(sNumberingType, 
static_cast(nActType)),
 comphelper::makePropertyValue(sValue, nNo)
 };
 
@@ -366,6 +373,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( c

[Libreoffice-commits] core.git: xmlsecurity/uiconfig

2023-07-11 Thread TokieSan (via logerrit)
 xmlsecurity/uiconfig/ui/selectcertificatedialog.ui |  101 +++--
 1 file changed, 54 insertions(+), 47 deletions(-)

New commits:
commit 6b0684b2c48bcd8fd6ded3817cbe12aa4e02b4dc
Author: TokieSan 
AuthorDate: Sun Jul 9 13:25:52 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Tue Jul 11 13:57:57 2023 +0200

Allow columns' sorting in certificate chooser dialog

Allowed native GTK TreeViewColumn sorting for the Certificate Chooser
Dialog (selectcertificatedialog.ui)

Change-Id: I4acba667ebd6fd5801730bf4413a00149b3b6528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154227
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Thorsten Behrens 

diff --git a/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui 
b/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui
index 3296173792f7..fde094088e91 100644
--- a/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui
+++ b/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -19,29 +19,29 @@
 
   
   
-False
-6
+False
+6
 Select 
Certificate
 False
 True
-dialog
+dialog
 
   
-False
+False
 vertical
 12
 
   
-False
-end
+False
+end
 
   
 _OK
 True
-True
-True
-True
-True
+True
+True
+True
+True
 True
   
   
@@ -54,8 +54,8 @@
   
 _Cancel
 True
-True
-True
+True
+True
 True
   
   
@@ -68,8 +68,8 @@
   
 _Help
 True
-True
-True
+True
+True
 True
   
   
@@ -83,58 +83,58 @@
   
 False
 True
-end
+end
 0
   
 
 
-  
+  
   
 True
-False
+False
 True
 True
-12
-12
+12
+12
 
   
-False
+False
 Select the certificate you want to use 
for signing:
 0
   
   
-0
-0
+0
+0
   
 
 
   
-False
+False
 Select the certificate you want to 
use for encryption:
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-True
+True
 True
 True
-in
+in
 
   
 True
-True
-True
+True
+True
 True
 True
 liststore3
-0
-False
+0
+False
 
   
 
@@ -143,6 +143,8 @@
 True
 6
 Issued to
+True
+0
 
   
   
@@ -156,6 +158,8 @@
 True
 6
 Issued by
+True
+1
 
   
   
@@ -169,6 +173,8 @@
 True
 6
 Type
+True
+2
 
   
   
@@ -182,6 +188,8 @@
 True
 6
 Expiration date
+True
+3
 
   
   
@@ -195,6 +203,8 @@
 True
 6
 Certificate usage
+True
+4
 
   
   
@@ -212,16 +222,16 @@
 
   
   
-0
- 

[Libreoffice-commits] core.git: drawinglayer/source

2023-07-11 Thread Michael Stahl (via logerrit)
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 41d8bb928231372f3ef08ce4ba3ea91b17e3ae29
Author: Michael Stahl 
AuthorDate: Mon Jul 10 20:42:07 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 11 12:51:40 2023 +0200

(related tdf#154777) drawinglayer: add BBox to Figure fallback of forms

PAC3 complains if the BBox is missing.

Change-Id: I2cd61b2d01b64ffe77f28c661a3bd6f713df134f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154283
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index eae5980bf56c..aba9444b72e1 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1176,6 +1176,11 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
 { // no corresponding PDF Form, use Figure instead
 mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::Figure);
 mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Placement, 
vcl::PDFWriter::Block);
+auto const 
range(rControlPrimitive.getB2DRange(getViewInformation2D()));
+tools::Rectangle const aLogicRect(
+basegfx::fround(range.getMinX()), basegfx::fround(range.getMinY()),
+basegfx::fround(range.getMaxX()), 
basegfx::fround(range.getMaxY()));
+mpPDFExtOutDevData->SetStructureBoundingBox(aLogicRect);
 OUString const& rAltText(rControlPrimitive.GetAltText());
 if (!rAltText.isEmpty())
 {


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - include/vcl vcl/inc vcl/jsdialog

2023-07-11 Thread Szymon Kłos (via logerrit)
 include/vcl/jsdialog/executor.hxx|5 +
 include/vcl/weld.hxx |2 ++
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   13 +
 vcl/jsdialog/executor.cxx|   12 
 vcl/jsdialog/jsdialogbuilder.cxx |   32 
 5 files changed, 64 insertions(+)

New commits:
commit 67208bed556329e45975afb862618d8e7acccaf4
Author: Szymon Kłos 
AuthorDate: Fri Jul 7 18:13:18 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 11 12:45:20 2023 +0200

jsdialog: formatted spin field

Change-Id: I5830dd523e0ccc736a686f38319a6c509e5650be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154193
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 

diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index a9873893e4a7..2f4ffd5aba6c 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -95,6 +95,11 @@ public:
 rSpinButton.signal_value_changed();
 }
 
+static void trigger_value_changed(weld::FormattedSpinButton& rSpinButton)
+{
+rSpinButton.signal_value_changed();
+}
+
 static void trigger_closed(weld::Popover& rPopover) { rPopover.popdown(); }
 
 static void trigger_key_press(weld::Widget& rWidget, const KeyEvent& 
rEvent)
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 4397018e2958..bf8feaa16ab5 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1851,6 +1851,8 @@ class EntryFormatter;
 // are managed by a more complex Formatter which can support doubles.
 class VCL_DLLPUBLIC FormattedSpinButton : virtual public Entry
 {
+friend class ::LOKTrigger;
+
 Link m_aValueChangedHdl;
 
 protected:
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 85f6c8140369..060a3e1bb72a 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -295,6 +295,8 @@ public:
 virtual std::unique_ptr weld_combo_box(const OString& id) 
override;
 virtual std::unique_ptr weld_notebook(const OString& id) 
override;
 virtual std::unique_ptr weld_spin_button(const OString& 
id) override;
+virtual std::unique_ptr
+weld_formatted_spin_button(const OString& id) override;
 virtual std::unique_ptr weld_check_button(const 
OString& id) override;
 virtual std::unique_ptr
 weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
@@ -643,6 +645,17 @@ public:
 virtual void set_value(sal_Int64 value) override;
 };
 
+class JSFormattedSpinButton final
+: public JSWidget
+{
+public:
+JSFormattedSpinButton(JSDialogSender* pSender, ::FormattedField* pSpin,
+  SalInstanceBuilder* pBuilder, bool bTakeOwnership);
+
+virtual void set_text(const OUString& rText) override;
+void set_text_without_notify(const OUString& rText);
+};
+
 class JSMessageDialog final : public JSWidget
 {
 std::unique_ptr m_pOwnedSender;
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index e509504db24c..01ab13d708d9 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -334,6 +334,18 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
 return true;
 }
 }
+
+auto pFormattedField = 
dynamic_cast(pWidget);
+if (pFormattedField)
+{
+if (sAction == "change")
+{
+pFormattedField->set_text(rData["data"]);
+LOKTrigger::trigger_changed(*pFormattedField);
+LOKTrigger::trigger_value_changed(*pFormattedField);
+return true;
+}
+}
 }
 else if (sControlType == "toolbox")
 {
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 9bb60861aadf..5740e300ae9a 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1069,6 +1069,20 @@ std::unique_ptr 
JSInstanceBuilder::weld_spin_button(const OStr
 return pWeldWidget;
 }
 
+std::unique_ptr
+JSInstanceBuilder::weld_formatted_spin_button(const OString& id)
+{
+FormattedField* pSpinButton = m_xBuilder->get(id);
+auto pWeldWidget = pSpinButton
+   ? std::make_unique(this, 
pSpinButton, this, false)
+   : nullptr;
+
+if (pWeldWidget)
+RememberWidget(id, pWeldWidget.get());
+
+return pWeldWidget;
+}
+
 std::unique_ptr JSInstanceBuilder::weld_check_button(const 
OString& id)
 {
 CheckBox* pCheckButton = m_xBuilder->get(id);
@@ -1687,6 +1701,24 @@ void JSSpinButton::set_value(sal_Int64 value)
 sendAction(std::move(pMap));
 }
 
+JSFormattedSpinButton::JSFormattedSpinButton(JSDialogSender* pSender, 
::FormattedField* pSpin,
+ SalInstanceBui

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - include/vcl svtools/source svtools/uiconfig vcl/inc vcl/jsdialog vcl/source

2023-07-11 Thread Szymon Kłos (via logerrit)
 include/vcl/jsdialog/executor.hxx |4 +
 include/vcl/weld.hxx  |2 
 svtools/source/brwbox/ebbcontrols.cxx |2 
 svtools/source/control/ctrlbox.cxx|4 -
 svtools/uiconfig/ui/datewindow.ui |2 
 vcl/inc/jsdialog/jsdialogbuilder.hxx  |8 ++
 vcl/inc/salvtables.hxx|   43 
 vcl/jsdialog/enabled.cxx  |1 
 vcl/jsdialog/executor.cxx |   21 ++
 vcl/jsdialog/jsdialogbuilder.cxx  |   19 +
 vcl/source/app/salvtables.cxx |  114 --
 11 files changed, 144 insertions(+), 76 deletions(-)

New commits:
commit b0de1f5fc3b6170f562328de8abd3680f2382a7a
Author: Szymon Kłos 
AuthorDate: Fri Jul 7 17:56:46 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 11 12:45:12 2023 +0200

Move SalInstanceFormattedSpinButton decl to header

Change-Id: I64582387b9169efa700a0df5c89e042a9a150423
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154192
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 

diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 7c246a9d9d72..bd1866df3f76 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -2198,4 +2198,47 @@ public:
 }
 };
 
+class SalInstanceFormattedSpinButton : public SalInstanceEntry,
+   public virtual weld::FormattedSpinButton
+{
+private:
+VclPtr m_xButton;
+weld::EntryFormatter* m_pFormatter;
+Link m_aLoseFocusHdl;
+
+DECL_LINK(UpDownHdl, SpinField&, void);
+DECL_LINK(LoseFocusHdl, Control&, void);
+
+public:
+SalInstanceFormattedSpinButton(FormattedField* pButton, 
SalInstanceBuilder* pBuilder,
+   bool bTakeOwnership);
+
+virtual void set_text(const OUString& rText) override;
+
+virtual void connect_changed(const Link& rLink) 
override;
+
+virtual void connect_focus_out(const Link& rLink) 
override;
+
+virtual void SetFormatter(weld::EntryFormatter* pFormatter) override;
+
+virtual void sync_value_from_formatter() override
+{
+// no-op for gen
+}
+
+virtual void sync_range_from_formatter() override
+{
+// no-op for gen
+}
+
+virtual void sync_increments_from_formatter() override
+{
+// no-op for gen
+}
+
+virtual Formatter& GetFormatter() override;
+
+virtual ~SalInstanceFormattedSpinButton() override;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 53d670b8537c..0b870a0cdd28 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5791,88 +5791,59 @@ IMPL_LINK(SalInstanceSpinButton, InputHdl, sal_Int64*, 
pResult, TriState)
 return eRet;
 }
 
-namespace
-{
-class SalInstanceFormattedSpinButton : public SalInstanceEntry,
-   public virtual weld::FormattedSpinButton
+SalInstanceFormattedSpinButton::SalInstanceFormattedSpinButton(FormattedField* 
pButton,
+   
SalInstanceBuilder* pBuilder,
+   bool 
bTakeOwnership)
+: SalInstanceEntry(pButton, pBuilder, bTakeOwnership)
+, m_xButton(pButton)
+, m_pFormatter(nullptr)
 {
-private:
-VclPtr m_xButton;
-weld::EntryFormatter* m_pFormatter;
-Link m_aLoseFocusHdl;
-
-DECL_LINK(UpDownHdl, SpinField&, void);
-DECL_LINK(LoseFocusHdl, Control&, void);
-
-public:
-SalInstanceFormattedSpinButton(FormattedField* pButton, 
SalInstanceBuilder* pBuilder,
-   bool bTakeOwnership)
-: SalInstanceEntry(pButton, pBuilder, bTakeOwnership)
-, m_xButton(pButton)
-, m_pFormatter(nullptr)
-{
-m_xButton->SetUpHdl(LINK(this, SalInstanceFormattedSpinButton, 
UpDownHdl));
-m_xButton->SetDownHdl(LINK(this, SalInstanceFormattedSpinButton, 
UpDownHdl));
-m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceFormattedSpinButton, 
LoseFocusHdl));
-}
-
-virtual void set_text(const OUString& rText) override
-{
-disable_notify_events();
-m_xButton->SpinField::SetText(rText);
-enable_notify_events();
-}
-
-virtual void connect_changed(const Link& rLink) 
override
-{
-if (!m_pFormatter) // once a formatter is set, it takes over "changed"
-{
-SalInstanceEntry::connect_changed(rLink);
-return;
-}
-m_pFormatter->connect_changed(rLink);
-}
-
-virtual void connect_focus_out(const Link& rLink) 
override
-{
-if (!m_pFormatter) // once a formatter is set, it takes over 
"focus-out"
-{
-m_aLoseFocusHdl = rLink;
-return;
-}
-m_pFormatter->connect_focus_out(rLink);
-}
+m_xButton->SetUp

[Libreoffice-commits] core.git: cui/source download.lst external/zxing

2023-07-11 Thread Taichi Haradaguchi (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx   |   11 ++-
 download.lst |4 ++--
 external/zxing/StaticLibrary_zxing.mk|   22 +++---
 external/zxing/UnpackedTarball_zxing.mk  |3 ---
 external/zxing/inc/pch/precompiled_zxing.hxx |3 ++-
 external/zxing/invalid_argument.patch.1  |   22 --
 external/zxing/no_sanitize_ignored.patch.0   |   24 
 external/zxing/undeprecate-warning.patch.0   |   14 --
 8 files changed, 25 insertions(+), 78 deletions(-)

New commits:
commit 09c6ef36f43a9c7cc594c7e2d4044fee41a96406
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Jul 8 23:50:10 2023 +0900
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Tue Jul 11 12:44:02 2023 +0200

zxing-cpp: upgrade to release 2.1.0

- remove external/zxing/invalid_argument.patch.1 and
  external/zxing/no_sanitize_ignored.patch.0, no longer needed in 2.1.0.

- If "Utf.h" can be included, use ZXing::FromUtf8() instaed of
  ZXing::TextUtfEncoding::FromUtf8().
  This makes external/zxing/undeprecate-warning.patch.0 unnecessary.

Change-Id: I06acebb623aa8b60c5d2e5f7f265998571d75a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154221
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 887ccaf44de4..0058ea362128 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -29,7 +29,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
@@ -39,6 +38,12 @@
 #include 
 #endif
 
+#if __has_include()
+#include 
+#else
+#include 
+#endif
+
 #endif // ENABLE_ZXING
 
 #include 
@@ -148,7 +153,11 @@ OString GenerateQRCode(std::u16string_view aQRText, 
tools::Long aQRECC, int aQRB
 ZXing::BarcodeFormat format = 
ZXing::BarcodeFormatFromString(GetBarCodeType(aQRType));
 auto writer = 
ZXing::MultiFormatWriter(format).setMargin(aQRBorder).setEccLevel(bqrEcc);
 writer.setEncoding(ZXing::CharacterSet::UTF8);
+#if __has_include()
+ZXing::BitMatrix bitmatrix = writer.encode(ZXing::FromUtf8(QRText), 0, 0);
+#else
 ZXing::BitMatrix bitmatrix = 
writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0);
+#endif
 #if HAVE_ZXING_TOSVG
 return OString(ZXing::ToSVG(bitmatrix));
 #else
diff --git a/download.lst b/download.lst
index 90d2341fefa7..18cba62be184 100644
--- a/download.lst
+++ b/download.lst
@@ -565,8 +565,8 @@ ZMF_TARBALL := libzmf-0.0.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ZXING_SHA256SUM := 
12b76b7005c30d34265fc20356d340da179b0b4d43d2c1b35bcca86776069f76
-ZXING_TARBALL := zxing-cpp-2.0.0.tar.gz
+ZXING_SHA256SUM := 
6d54e403592ec7a143791c6526c1baafddf4c0897bb49b1af72b70a0f0c4a3fe
+ZXING_TARBALL := zxing-cpp-2.1.0.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/zxing/StaticLibrary_zxing.mk 
b/external/zxing/StaticLibrary_zxing.mk
index 431d523a49b3..f9d031e35541 100644
--- a/external/zxing/StaticLibrary_zxing.mk
+++ b/external/zxing/StaticLibrary_zxing.mk
@@ -79,29 +79,29 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/oned/ODDataBarReader \
UnpackedTarball/zxing/core/src/oned/ODEAN8Writer \
UnpackedTarball/zxing/core/src/oned/ODEAN13Writer \
-   UnpackedTarball/zxing/core/src/oned/ODITFWriter \
UnpackedTarball/zxing/core/src/oned/ODITFReader \
+   UnpackedTarball/zxing/core/src/oned/ODITFWriter \
UnpackedTarball/zxing/core/src/oned/ODMultiUPCEANReader \
+   UnpackedTarball/zxing/core/src/oned/ODUPCEANCommon \
UnpackedTarball/zxing/core/src/oned/ODUPCAWriter \
UnpackedTarball/zxing/core/src/oned/ODUPCEWriter \
-   UnpackedTarball/zxing/core/src/oned/ODUPCEANCommon \
UnpackedTarball/zxing/core/src/oned/ODRowReader \
UnpackedTarball/zxing/core/src/oned/ODReader \
UnpackedTarball/zxing/core/src/oned/ODWriterHelper \
+   UnpackedTarball/zxing/core/src/pdf417/PDFBarcodeValue \
+   UnpackedTarball/zxing/core/src/pdf417/PDFBoundingBox \
UnpackedTarball/zxing/core/src/pdf417/PDFCodewordDecoder \
-   UnpackedTarball/zxing/core/src/pdf417/PDFHighLevelEncoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFDecoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFDetector \
+   UnpackedTarball/zxing/core/src/pdf417/PDFDetectionResult \
UnpackedTarball/zxing/core/src/pdf417/PDFDetectionResultColumn \
+   UnpackedTarball/zxing/core/src/pdf417/PDFEncoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFHighLevelEncoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFModulusGF \
+   UnpackedTarball/zxing/core/

[Libreoffice-commits] core.git: helpcontent2

2023-07-11 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e339b3dea0c48aa9598a4e202b18519a494e86c1
Author: Olivier Hallot 
AuthorDate: Tue Jul 11 07:38:50 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Tue Jul 11 12:38:50 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ea59b72bfa1b74e1b3a294778ec1d490d4e6962b
  - Add example on how to get user data from registry

Special thanks to Rafael Lima and and Mike Kaganski

Change-Id: I6bd04949680a2f11468debacd23be686e38fdf25
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154228
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 8bd42f2c52d4..ea59b72bfa1b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8bd42f2c52d4290b41ea5a0304184e2810098a09
+Subproject commit ea59b72bfa1b74e1b3a294778ec1d490d4e6962b


[Libreoffice-commits] help.git: source/text

2023-07-11 Thread Olivier Hallot (via logerrit)
 source/text/sbasic/shared/03/lib_tools.xhp | 1127 ++---
 1 file changed, 568 insertions(+), 559 deletions(-)

New commits:
commit ea59b72bfa1b74e1b3a294778ec1d490d4e6962b
Author: Olivier Hallot 
AuthorDate: Sun Jul 9 11:12:12 2023 -0300
Commit: Olivier Hallot 
CommitDate: Tue Jul 11 12:38:50 2023 +0200

Add example on how to get user data from registry

Special thanks to Rafael Lima and and Mike Kaganski

Change-Id: I6bd04949680a2f11468debacd23be686e38fdf25
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154228
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/sbasic/shared/03/lib_tools.xhp 
b/source/text/sbasic/shared/03/lib_tools.xhp
index 28982fe469..6ce490a599 100644
--- a/source/text/sbasic/shared/03/lib_tools.xhp
+++ b/source/text/sbasic/shared/03/lib_tools.xhp
@@ -11,828 +11,837 @@
 
 
 
-Tools Library
+Tools Library
 /text/sbasic/shared/03/lib_tools.xhp
 
 
 
 The Tools Library
-
+
 BASIC Tools library
 
 
 
 
-
-GlobalScope.BasicLibraries.LoadLibrary("Tools")
-Debug Module
-ListBox Module
-Misc Module
-ModuleControls Module
-Strings Module
-UCB Module
-
+
+GlobalScope.BasicLibraries.LoadLibrary("Tools")
+Debug Module
+ListBox Module
+Misc Module
+ModuleControls Module
+Strings Module
+UCB Module
+
 BASIC Tools library;Debug module
 
 
 Debug 
Module
-Functions and subroutines for debugging Basic 
macros.
-ActivateReadOnlyFlag
+Functions and 
subroutines for debugging Basic macros.
+ActivateReadOnlyFlag
 
-Sub ActivateReadOnlyFlag()
+Sub ActivateReadOnlyFlag()
 
-DeactivateReadOnlyFlag
+DeactivateReadOnlyFlag
 
-Sub DeactivateReadOnlyFlag()
+Sub DeactivateReadOnlyFlag()
 
-SetBasicReadOnlyFlag
+SetBasicReadOnlyFlag
 
-Sub SetBasicReadOnlyFlag(bReadOnly as 
Boolean)
+Sub SetBasicReadOnlyFlag(bReadOnly as Boolean)
 
-WritedbgInfo
+WritedbgInfo
 
-Sub WritedbgInfo(LocObject as 
Object)
+Sub WritedbgInfo(LocObject as Object)
 
-WriteDbgString
+WriteDbgString
 
-Sub WriteDbgString(LocString as 
String)
+Sub WriteDbgString(LocString as String)
 
-ShowArray
+ShowArray
 
-Sub ShowArray(LocArray())
+Sub ShowArray(LocArray())
 
-ShowPropertyValues
+ShowPropertyValues
 
-Sub ShowPropertyValues(oLocObject as 
Object)
+Sub ShowPropertyValues(oLocObject as Object)
 
-ShowNameValuePair
+ShowNameValuePair
 
-Sub ShowNameValuePair(Pair())
+Sub ShowNameValuePair(Pair())
 
-ShowElementNames
-' Retrieves all the Elements of 
aSequence of an object, with the
-' possibility to define a filter(sfilter <> 
"")
+ShowElementNames
+' Retrieves all the Elements of aSequence of an object, with 
the
+' possibility to define a filter(sfilter <> 
"")
 
-Sub ShowElementNames(
-oLocElements() as Object,
-Optional sFiltername as String)
+Sub ShowElementNames(
+oLocElements() as Object,
+Optional sFiltername as String)
 
-ShowSupportedServiceNames
-' Retrieves all the supported 
servicenames of an object, with the 
-' possibility to define a filter(sfilter 
<> "")
+ShowSupportedServiceNames
+' Retrieves all the supported servicenames of an object, with 
the 
+' possibility to define a filter(sfilter <> 
"")
 
-Sub ShowSupportedServiceNames(
-oLocObject as Object,
-Optional sFilterName as String)
+Sub ShowSupportedServiceNames(
+oLocObject as Object,
+Optional sFilterName as String)
 
-ShowAvailableServiceNames
-' Retrieves all the available 
Servicenames of an object, with the
-' possibility to define a filter(sfilter 
<> "")
+ShowAvailableServiceNames
+' Retrieves all the available Servicenames of an object, with 
the
+' possibility to define a filter(sfilter <> 
"")
 
-Sub ShowAvailableServiceNames(
-oLocObject as Object, 
-Optional sFilterName as String)
+Sub ShowAvailableServiceNames(
+oLocObject as Object, 
+Optional sFilterName as String)
 
-ShowCommands
+ShowCommands
 
-Sub ShowCommands(oLocObject as 
Object)
+Sub ShowCommands(o

[Libreoffice-commits] core.git: vcl/qa vcl/source

2023-07-11 Thread Michael Stahl (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |2 +-
 vcl/source/gdi/pdfwriter_impl.cxx  |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1ae1f76caeef35a0db7705dd0c330936a77b6a8c
Author: Michael Stahl 
AuthorDate: Mon Jul 10 20:38:25 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 11 12:17:07 2023 +0200

tdf#152234 vcl: Role values are lowercase

Old version 3 of PAC throws exceptions if these are capitalized;
presumably this is case sensitive, and all-lowercase unlike everything
else.

Change-Id: Ifc0cef38e333123e810376ab6a7630443d253841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154282
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index f5de0480e4d4..5e26c693197d 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -4260,7 +4260,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testFormControlAnnot)
 CPPUNIT_ASSERT_EQUAL(OString("PrintField"), pO->GetValue());
 auto pRole = 
dynamic_cast(pAObj->Lookup("Role"));
 CPPUNIT_ASSERT(pRole);
-CPPUNIT_ASSERT_EQUAL(OString("Cb"), pRole->GetValue());
+CPPUNIT_ASSERT_EQUAL(OString("cb"), pRole->GetValue());
 auto pKids = 
dynamic_cast(pStructElem->Lookup("K"));
 auto nMCID(0);
 auto nRef(0);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 75e74b4e1af9..9d957f0d113a 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1911,10 +1911,10 @@ const char* PDFWriterImpl::getAttributeValueTag( 
PDFWriter::StructAttributeValue
 aValueStrings[ PDFWriter::Header ]  = "Header";
 aValueStrings[ PDFWriter::Footer ]  = "Footer";
 aValueStrings[ PDFWriter::Watermark ]   = "Watermark";
-aValueStrings[ PDFWriter::Rb ]  = "Rb";
-aValueStrings[ PDFWriter::Cb ]  = "Cb";
-aValueStrings[ PDFWriter::Pb ]  = "Pb";
-aValueStrings[ PDFWriter::Tv ]  = "Tv";
+aValueStrings[ PDFWriter::Rb ]  = "rb";
+aValueStrings[ PDFWriter::Cb ]  = "cb";
+aValueStrings[ PDFWriter::Pb ]  = "pb";
+aValueStrings[ PDFWriter::Tv ]  = "tv";
 aValueStrings[ PDFWriter::Disc ]= "Disc";
 aValueStrings[ PDFWriter::Circle ]  = "Circle";
 aValueStrings[ PDFWriter::Square ]  = "Square";


[Libreoffice-commits] core.git: sw/source

2023-07-11 Thread Andrea Gelmini (via logerrit)
 sw/source/core/doc/docfmt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6048355f479174d8f27d569542400c7b34b07df6
Author: Andrea Gelmini 
AuthorDate: Mon Jul 10 22:23:16 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 11 11:41:21 2023 +0200

Fix typo

Change-Id: I31031adff2ebecba430b79e301ff7d628d9301a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154289
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 3f52628fed21..a882bac7bfd1 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1074,7 +1074,7 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* 
pArgs )
 }
 else
 {
-// forcing reset of list level from parapgaph
+// forcing reset of list level from paragraph
 pCNd->SetAttr(pFormat->GetFormatAttr(RES_PARATR_LIST_LEVEL));
 }
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - canvas/source

2023-07-11 Thread Khaled Hosny (via logerrit)
 canvas/source/vcl/canvasfont.cxx |   32 ++--
 canvas/source/vcl/canvasfont.hxx |3 +++
 canvas/source/vcl/impltools.cxx  |   27 +++
 canvas/source/vcl/impltools.hxx  |5 +
 canvas/source/vcl/textlayout.cxx |8 
 5 files changed, 53 insertions(+), 22 deletions(-)

New commits:
commit 2df481312ac949446684a5278a399ec178a89cf2
Author: Khaled Hosny 
AuthorDate: Mon Jul 10 13:40:28 2023 +
Commit: Michael Stahl 
CommitDate: Tue Jul 11 11:40:59 2023 +0200

tdf#147999: Fix canvas font width for fallback fonts on Windows

For some reason we are getting the wrong font width for fallback fonts, 
which
results in rendering them squished. This happens only with VCL canvas, but 
not
with DX one, so it shows when hardware acceleration is disabled (either
explicitly or implicitly when Skia is enabled).

Change-Id: I5a45b1c1d68f4c6e6dd6b43371602af3330a7cd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154272
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 199dbff478dacee0b1d65d521e5147ba88c96567)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154255
Reviewed-by: Michael Stahl 

diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index e7fab0492549..41b7da25016d 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -47,7 +47,8 @@ namespace vclcanvas
   Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
 maFontRequest( rFontRequest ),
 mpRefDevice( &rDevice ),
-mpOutDevProvider( rOutDevProvider )
+mpOutDevProvider( rOutDevProvider ),
+maFontMatrix( rFontMatrix )
 {
 maFont->SetAlignment( ALIGN_BASELINE );
 maFont->SetCharSet( 
(rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
@@ -63,27 +64,7 @@ namespace vclcanvas
 maFont->SetLanguage( LanguageTag::convertToLanguageType( 
rFontRequest.Locale, false));
 
 // adjust to stretched/shrunk font
-if( !::rtl::math::approxEqual( rFontMatrix.m00, rFontMatrix.m11) )
-{
-OutputDevice& rOutDev( rOutDevProvider->getOutDev() );
-
-const bool bOldMapState( rOutDev.IsMapModeEnabled() );
-rOutDev.EnableMapMode(false);
-
-const Size aSize = rOutDev.GetFontMetric( *maFont ).GetFontSize();
-
-const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
-double fStretch = rFontMatrix.m00 + rFontMatrix.m01;
-
-if( !::basegfx::fTools::equalZero( fDividend) )
-fStretch /= fDividend;
-
-const ::tools::Long nNewWidth = ::basegfx::fround( aSize.Width() * 
fStretch );
-
-maFont->SetAverageFontWidth( nNewWidth );
-
-rOutDev.EnableMapMode(bOldMapState);
-}
+tools::setupFontWidth(rFontMatrix, maFont.get(), 
rOutDevProvider->getOutDev());
 
 sal_uInt32 nEmphasisMark = 0;
 
@@ -172,6 +153,13 @@ namespace vclcanvas
 {
 return *maFont;
 }
+
+const css::geometry::Matrix2D& CanvasFont::getFontMatrix() const
+{
+SolarMutexGuard aGuard;
+
+return maFontMatrix;
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx
index fdfa870f5ed3..834df756e0b7 100644
--- a/canvas/source/vcl/canvasfont.hxx
+++ b/canvas/source/vcl/canvasfont.hxx
@@ -75,11 +75,14 @@ namespace vclcanvas
 
 vcl::Font const & getVCLFont() const;
 
+const css::geometry::Matrix2D& getFontMatrix() const;
+
 private:
 ::canvas::vcltools::VCLObject  
maFont;
 css::rendering::FontRequest   
maFontRequest;
 css::uno::Reference< css::rendering::XGraphicDevice>  
mpRefDevice;
 OutDevProviderSharedPtr   
mpOutDevProvider;
+css::geometry::Matrix2D   
maFontMatrix;
 };
 
 }
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 5539a92d1734..0a44f22096f0 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -135,6 +135,33 @@ namespace vclcanvas::tools
 return true;
 }
 
+void setupFontWidth(const css::geometry::Matrix2D& rFontMatrix,
+vcl::Font& rFont,
+OutputDevice&  rOutDev)
+{
+rFont.SetFontSize(Size(0, rFont.GetFontHeight()));
+
+if (!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
+{
+const bool bOldMapState(rOutDev.IsMapModeEnabled());
+rOutDev.EnableMapMode(false);
+
+

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - canvas/source

2023-07-11 Thread Khaled Hosny (via logerrit)
 canvas/source/vcl/canvasfont.cxx |   32 ++--
 canvas/source/vcl/canvasfont.hxx |3 +++
 canvas/source/vcl/impltools.cxx  |   27 +++
 canvas/source/vcl/impltools.hxx  |5 +
 canvas/source/vcl/textlayout.cxx |8 
 5 files changed, 53 insertions(+), 22 deletions(-)

New commits:
commit 7e6fa772f181c1e91d55cb25ce58a62ed7348b4d
Author: Khaled Hosny 
AuthorDate: Mon Jul 10 13:40:28 2023 +
Commit: Michael Stahl 
CommitDate: Tue Jul 11 11:40:45 2023 +0200

tdf#147999: Fix canvas font width for fallback fonts on Windows

For some reason we are getting the wrong font width for fallback fonts, 
which
results in rendering them squished. This happens only with VCL canvas, but 
not
with DX one, so it shows when hardware acceleration is disabled (either
explicitly or implicitly when Skia is enabled).

Change-Id: I5a45b1c1d68f4c6e6dd6b43371602af3330a7cd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154272
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 0f6d25d4768db060e823f726c7727aebbbfbff22)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154254
Reviewed-by: Michael Stahl 

diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index e7fab0492549..41b7da25016d 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -47,7 +47,8 @@ namespace vclcanvas
   Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
 maFontRequest( rFontRequest ),
 mpRefDevice( &rDevice ),
-mpOutDevProvider( rOutDevProvider )
+mpOutDevProvider( rOutDevProvider ),
+maFontMatrix( rFontMatrix )
 {
 maFont->SetAlignment( ALIGN_BASELINE );
 maFont->SetCharSet( 
(rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
@@ -63,27 +64,7 @@ namespace vclcanvas
 maFont->SetLanguage( LanguageTag::convertToLanguageType( 
rFontRequest.Locale, false));
 
 // adjust to stretched/shrunk font
-if( !::rtl::math::approxEqual( rFontMatrix.m00, rFontMatrix.m11) )
-{
-OutputDevice& rOutDev( rOutDevProvider->getOutDev() );
-
-const bool bOldMapState( rOutDev.IsMapModeEnabled() );
-rOutDev.EnableMapMode(false);
-
-const Size aSize = rOutDev.GetFontMetric( *maFont ).GetFontSize();
-
-const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
-double fStretch = rFontMatrix.m00 + rFontMatrix.m01;
-
-if( !::basegfx::fTools::equalZero( fDividend) )
-fStretch /= fDividend;
-
-const ::tools::Long nNewWidth = ::basegfx::fround( aSize.Width() * 
fStretch );
-
-maFont->SetAverageFontWidth( nNewWidth );
-
-rOutDev.EnableMapMode(bOldMapState);
-}
+tools::setupFontWidth(rFontMatrix, maFont.get(), 
rOutDevProvider->getOutDev());
 
 sal_uInt32 nEmphasisMark = 0;
 
@@ -172,6 +153,13 @@ namespace vclcanvas
 {
 return *maFont;
 }
+
+const css::geometry::Matrix2D& CanvasFont::getFontMatrix() const
+{
+SolarMutexGuard aGuard;
+
+return maFontMatrix;
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx
index fdfa870f5ed3..834df756e0b7 100644
--- a/canvas/source/vcl/canvasfont.hxx
+++ b/canvas/source/vcl/canvasfont.hxx
@@ -75,11 +75,14 @@ namespace vclcanvas
 
 vcl::Font const & getVCLFont() const;
 
+const css::geometry::Matrix2D& getFontMatrix() const;
+
 private:
 ::canvas::vcltools::VCLObject  
maFont;
 css::rendering::FontRequest   
maFontRequest;
 css::uno::Reference< css::rendering::XGraphicDevice>  
mpRefDevice;
 OutDevProviderSharedPtr   
mpOutDevProvider;
+css::geometry::Matrix2D   
maFontMatrix;
 };
 
 }
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 5539a92d1734..0a44f22096f0 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -135,6 +135,33 @@ namespace vclcanvas::tools
 return true;
 }
 
+void setupFontWidth(const css::geometry::Matrix2D& rFontMatrix,
+vcl::Font& rFont,
+OutputDevice&  rOutDev)
+{
+rFont.SetFontSize(Size(0, rFont.GetFontHeight()));
+
+if (!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
+{
+const bool bOldMapState(rOutDev.IsMapModeEnabled());
+rOutDev.EnableMapMode(false);
+
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa writerfilter/source

2023-07-11 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx   |9 -
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   26 +++
 2 files changed, 33 insertions(+), 2 deletions(-)

New commits:
commit 41f4e472a6bb76976164e5a6e975b111d954cd95
Author: Miklos Vajna 
AuthorDate: Thu Jul 6 08:13:40 2023 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 11 11:34:38 2023 +0200

tdf#156059 sw floattable: fix lost 0 bottom margin of anchor in ftn from 
DOCX

The bottom margin of floating table anchor paragraph in the footnotes
was non-zero, which meant that the document had 2 pages in Writer, but
only 1 in Word.

What happened here is that commit
d1ac8df139a2a65db45d1970ccc0b80e17d827f6 (tdf#146346 DOCX import: fix
table margins in footnotes, 2022-05-03) fixed this, but only for the
case when the floating table conversion was delayed and not in the
instant conversion case. Then later commit
c50bf5a5daaae3d40f89ea0784a75a8a571c208d (sw floattable: remove no
longer needed DOCX import heuristics, 2023-04-12) made all floating
table conversions instant, so the problem was re-introduced.

Fix the problem by now fixing the problem in
DomainMapperTableHandler::endTable(), restoring code that was removed
from SectionPropertyMap::CloseSectionGroup().

There was a disabled testcase for this, so just enable that.

(cherry picked from commit 9ac864159b241d2093e86f664ab6f4b76c69196d)

Change-Id: Ifb7c8fe2bdc70625d3e334cea0893b8e563664ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154238
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 5cc20d556853..805c75d5daf5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1356,8 +1356,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf146346, "tdf146346.docx")
 assertXPath(pXmlDoc, "/root/page[1]//anchored/fly", 8);
 assertXPath(pXmlDoc, "/root/page[1]//anchored/fly/tab", 8);
 
-// FIXME no second page (regression since multi-page floating tables?)
-//assertXPath(pXmlDoc, "/root/page[2]", 0);
+// No second page.
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 0
+// - Actual  : 1
+// i.e. unwanted lower margin in the floating table's anchor paragraph in 
the footnote created a
+// second page.
+assertXPath(pXmlDoc, "/root/page[2]", 0);
 }
 #endif
 
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 53c7c161743d..635f9ab94a93 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1620,6 +1620,32 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel, bool bTab
 uno::Reference xContent = 
xTextAppendAndConvert->convertToTextFrame(xStart, xEnd, 
comphelper::containerToSequence(aFrameProperties));
 xFrameAnchor.set(xContent->getAnchor(), uno::UNO_QUERY);
 
+bool bConvertToFloatingInFootnote = false;
+if (xContent.is() && xContent->getAnchor().is())
+{
+uno::Reference 
xText(xContent->getAnchor()->getText(), uno::UNO_QUERY);
+if (xText.is())
+{
+bConvertToFloatingInFootnote = 
xText->supportsService("com.sun.star.text.Footnote");
+}
+}
+
+// paragraph of the anchoring point of the floating table 
needs zero top and bottom
+// margins, if the table was a not floating table in the 
footnote, otherwise
+// docDefault margins could result bigger vertical spaces 
around the table
+if ( bConvertToFloatingInFootnote && xContent.is() )
+{
+uno::Reference xParagraph(
+xContent->getAnchor(), uno::UNO_QUERY);
+if ( xParagraph.is() )
+{
+xParagraph->setPropertyValue("ParaTopMargin",
+uno::Any(static_cast(0)));
+xParagraph->setPropertyValue("ParaBottomMargin",
+uno::Any(static_cast(0)));
+}
+}
+
 AfterConvertToTextFrame(m_rDMapper_Impl, aFramedRedlines, 
redPos, redLen, redCell, redTable);
 }
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - static/emscripten vcl/qt5 vcl/README.vars.md vcl/unx

2023-07-11 Thread Khaled Hosny (via logerrit)
 static/emscripten/environment.js |1 -
 vcl/README.vars.md   |6 +-
 vcl/qt5/QtInstance.cxx   |2 +-
 vcl/unx/kf5/KF5SalInstance.cxx   |2 +-
 4 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit eb9b5ec7620f236243636cd94f517fc80006b95a
Author: Khaled Hosny 
AuthorDate: Sat Jul 8 22:42:12 2023 +0300
Commit: Michael Stahl 
CommitDate: Tue Jul 11 11:33:44 2023 +0200

tdf#151273, tdf#151925: Don’t use QFont text layout by default

We were enabling QFont for qt5 VCL plugin by default, but it is buggy
and some distributions seem to enabled qt5 VCL plugin even if we don't
recommend it.

Since the QFont code is incomplete and no one is working on it, lets
make people’s life easier by making it always off by default.

This removed the SAL_VCL_QT5_USE_CAIRO envvar and replaces it with
SAL_VCL_QT_USE_QFONT that does the reverse. Also SAL_VCL_KF5_USE_QFONT
is dropped in favor of SAL_VCL_QT_USE_QFONT.

Change-Id: Id7471acd12fe277908f567140b63ae8d27b03033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154222
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit f9b16330f13d3ad43de6de026206577bfa1ac85d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154184
Reviewed-by: Michael Weghorn 
(cherry picked from commit 14fe410e0ab90e95141613b77de48063f518d9bb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154256
Reviewed-by: Michael Stahl 

diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js
index bc60fddcbbe3..7d04fd76b0f2 100644
--- a/static/emscripten/environment.js
+++ b/static/emscripten/environment.js
@@ -1,5 +1,4 @@
 if (!('preRun' in Module)) Module['preRun'] = [];
 Module.preRun.push(function() {
 ENV.SAL_LOG = "+WARN"
-ENV.SAL_VCL_QT5_USE_CAIRO = "1"
 });
diff --git a/vcl/README.vars.md b/vcl/README.vars.md
index c83ca657ef9f..5607dfaffda7 100644
--- a/vcl/README.vars.md
+++ b/vcl/README.vars.md
@@ -62,11 +62,7 @@ will be used to write the log under `instdir/uitest/`.
 * `QT_SCALE_FACTOR=2` - for HiDPI testing (also supports float)
 * `SAL_VCL_QT5_NO_FONTCONFIG` - ignore fontconfig provided font substitutions
 * `SAL_VCL_QT5_NO_NATIVE` - disable `QStyle`'d controls
-* `SAL_VCL_QT5_USE_CAIRO` - use cairo for text rendering and fonts (default 
for kf5, but not qt5)
-
-## Kf5
-
-* `SAL_VCL_KF5_USE_QFONT` - use `QFont` for text rendering (default for qt5, 
but not kf5)
+* `SAL_VCL_QT_USE_QFONT` - use `QFont` for text layout and rendering (default 
is to use cairo)
 
 ## Mac
 
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 9c4d3def970e..df3df5d17a74 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -751,7 +751,7 @@ void QtInstance::setActivePopup(QtFrame* pFrame)
 extern "C" {
 VCLPLUG_QT_PUBLIC SalInstance* create_SalInstance()
 {
-static const bool bUseCairo = (nullptr != getenv("SAL_VCL_QT5_USE_CAIRO"));
+static const bool bUseCairo = (nullptr == getenv("SAL_VCL_QT_USE_QFONT"));
 
 std::unique_ptr pFakeArgv;
 std::unique_ptr pFakeArgc;
diff --git a/vcl/unx/kf5/KF5SalInstance.cxx b/vcl/unx/kf5/KF5SalInstance.cxx
index de3e2fe4d6ee..df5108e147a1 100644
--- a/vcl/unx/kf5/KF5SalInstance.cxx
+++ b/vcl/unx/kf5/KF5SalInstance.cxx
@@ -70,7 +70,7 @@ 
KF5SalInstance::createPicker(css::uno::Reference co
 extern "C" {
 VCLPLUG_KF5_PUBLIC SalInstance* create_SalInstance()
 {
-static const bool bUseCairo = (nullptr == getenv("SAL_VCL_KF5_USE_QFONT"));
+static const bool bUseCairo = (nullptr == getenv("SAL_VCL_QT_USE_QFONT"));
 
 std::unique_ptr pFakeArgv;
 std::unique_ptr pFakeArgc;


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/qa

2023-07-11 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/ThemeImportExportTest.cxx |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 271aa44adad2bfb45c8b1eff535f20a404e49dd7
Author: Mike Kaganski 
AuthorDate: Tue Jul 4 11:50:01 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 11 11:31:08 2023 +0200

Fix build on Win64, where int != sal_Int32

Change-Id: Id835da668042a656ace0f09a7fa9bc852b968b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153926
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit b68e4a2d0179558180085bfe28a32a1510aeb3e1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154251
Reviewed-by: Michael Stahl 

diff --git a/sc/qa/unit/ThemeImportExportTest.cxx 
b/sc/qa/unit/ThemeImportExportTest.cxx
index c04a90dc6f54..b7dcce552d4d 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -111,9 +111,9 @@ void checkCellBackgroundThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(20, roundToPercent(rTransformations[0].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(20), 
roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(80, roundToPercent(rTransformations[1].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(80), 
roundToPercent(rTransformations[1].mnValue));
 }
 
 // A3
@@ -130,7 +130,7 @@ void checkCellBackgroundThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(1), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(50, roundToPercent(rTransformations[0].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(50), 
roundToPercent(rTransformations[0].mnValue));
 }
 }
 
@@ -172,9 +172,9 @@ void checkCellTextThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(60, roundToPercent(rTransformations[0].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(60), 
roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(40, roundToPercent(rTransformations[1].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(40), 
roundToPercent(rTransformations[1].mnValue));
 }
 
 // B3
@@ -191,7 +191,7 @@ void checkCellTextThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(1), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(50, roundToPercent(rTransformations[0].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(50), 
roundToPercent(rTransformations[0].mnValue));
 }
 }
 
@@ -247,9 +247,9 @@ void checkCellBorderThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(20, 
roundToPercent(rTransformations[0].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(20), 
roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(80, 
roundToPercent(rTransformations[1].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(80), 
roundToPercent(rTransformations[1].mnValue));
 }
 {
 auto* pTop = pBoxItem->GetRight();
@@ -260,9 +260,9 @@ void checkCellBorderThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(20, 
roundToPercent(rTransformations[0].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(20), 
roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(80, 
roundToPercent(rTransformations[1].mnValue));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(

[Libreoffice-commits] core.git: sw/inc sw/source vcl/qa

2023-07-11 Thread Michael Stahl (via logerrit)
 sw/inc/EnhancedPDFExportHelper.hxx |5 
 sw/source/core/layout/paintfrm.cxx |   14 
 sw/source/core/text/EnhancedPDFExportHelper.cxx|   45 ++-
 sw/source/core/text/frmpaint.cxx   |2 
 sw/source/core/text/itrpaint.cxx   |6 
 vcl/qa/cppunit/pdfexport/data/image-hyperlink-alttext.fodt |  195 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |  130 
 7 files changed, 381 insertions(+), 16 deletions(-)

New commits:
commit f2d5653a6792a19e9a45d34ac9dce22e717b8cbf
Author: Michael Stahl 
AuthorDate: Mon Jul 10 17:39:03 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 11 11:10:14 2023 +0200

tdf#154939 sw: PDF/UA export: produce Link StructElem inside Figure

... for a fly frame with a hyperlink set.

  Specification: ISO 14289-1:2014, Clause: 7.18.5, Test number: 1
  Links shall be tagged according to ISO 32000-1:2008, 14.8.4.4.2, Link 
Element.
  A Link annotation is nested within null tag instead of Link

Change-Id: I7a2bef8d6100adffb1f40085bba8f18fc68bd8d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154280
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sw/inc/EnhancedPDFExportHelper.hxx 
b/sw/inc/EnhancedPDFExportHelper.hxx
index e928e417a0f0..a52a03f786ae 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -103,7 +103,10 @@ struct Num_Info
 struct Frame_Info
 {
 const SwFrame& mrFrame;
-Frame_Info( const SwFrame& rFrame ) : mrFrame( rFrame ) {};
+bool const m_isLink;
+
+Frame_Info(const SwFrame& rFrame, bool const isLink)
+: mrFrame(rFrame), m_isLink(isLink) {}
 };
 
 struct Por_Info
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 47e56b390712..69f78db19c59 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3503,8 +3504,19 @@ SwShortCut::SwShortCut( const SwFrame& rFrame, const 
SwRect& rRect )
 void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect 
const& rRect, SwPrintData const*const) const
 {
 // #i16816# tagged pdf support
-Frame_Info aFrameInfo( *this );
+Frame_Info aFrameInfo(*this, false);
 SwTaggedPDFHelper aTaggedPDFHelper( nullptr, &aFrameInfo, nullptr, 
rRenderContext );
+::std::optional oTaggedLink;
+if (IsFlyFrame())
+{
+// tdf#154939 Link nested inside Figure
+auto const pItem(GetFormat()->GetAttrSet().GetItemIfSet(RES_URL));
+if (pItem && !pItem->GetURL().isEmpty())
+{
+Frame_Info linkInfo(*this, true);
+oTaggedLink.emplace(nullptr, &linkInfo, nullptr, rRenderContext);
+}
+}
 
 const SwFrame *pFrame = Lower();
 if ( !pFrame )
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 25be18e0d521..7b5732e925da 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -408,7 +408,7 @@ bool SwTaggedPDFHelper::CheckReopenTag()
 {
 pKeyFrame = &rFrame;
 }
-else if ( rFrame.IsFlyFrame() )
+else if (rFrame.IsFlyFrame() && !mpFrameInfo->m_isLink)
 {
 const SwFormatAnchor& rAnchor =
 static_cast(&rFrame)->GetFormat()->GetAnchor();
@@ -532,6 +532,23 @@ void SwTaggedPDFHelper::EndTag()
 #endif
 }
 
+namespace {
+
+// link the link annotation to the link structured element
+void LinkLinkLink(vcl::PDFExtOutDevData & rPDFExtOutDevData, SwRect const& 
rRect)
+{
+const LinkIdMap& rLinkIdMap = 
SwEnhancedPDFExportHelper::GetLinkIdMap();
+const Point aCenter = rRect.Center();
+auto aIter = std::find_if(rLinkIdMap.begin(), rLinkIdMap.end(),
+[&aCenter](const IdMapEntry& rEntry) { return 
rEntry.first.Contains(aCenter); });
+if (aIter != rLinkIdMap.end())
+{
+sal_Int32 nLinkId = (*aIter).second;
+
rPDFExtOutDevData.SetStructureAttributeNumerical(vcl::PDFWriter::LinkAnnotation,
 nLinkId);
+}
+}
+}
+
 // Sets the attributes according to the structure type.
 void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
 {
@@ -806,6 +823,12 @@ void SwTaggedPDFHelper::SetAttributes( 
vcl::PDFWriter::StructElement eType )
 }
 }
 }
+
+if (mpFrameInfo->m_isLink)
+{
+SwRect const aRect(mpFrameInfo->mrFrame.getFrameArea());
+LinkLinkLink(*mpPDFExtOutDevData, aRect);
+}
 }
 
 /*
@@ -906,17 +929,9 @@ void SwTaggedPDFHelper::SetAttributes( 
vcl::PDFWriter::StructElement eType )
 
 if ( bLinkAttribute )
 {
- 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - distro-configs/LibreOfficeFlatpak.conf solenv/flatpak-manifest.in

2023-07-11 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeFlatpak.conf |1 +
 solenv/flatpak-manifest.in |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit 510d079f114945ab36a56fbebc88fd49096abedf
Author: Stephan Bergmann 
AuthorDate: Mon Jul 10 13:54:35 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 11 10:40:07 2023 +0200

Flatpak build needs external/frozen

Change-Id: I701bf6999d29b54438c7cb47f73453aae3fbb457
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154246
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cd9ea34fbe89ac262069e6990cb8c0aa8ac55339)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154258
Reviewed-by: Xisco Fauli 

diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index 636d723b4c75..13d0edeece3c 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -20,6 +20,7 @@
 --without-system-cppunit
 --without-system-dragonbox
 --without-system-firebird
+--without-system-frozen
 --without-system-glm
 --without-system-gpgmepp
 --without-system-jfreereport
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 10b4001b5de6..16f8de42c5ca 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -674,6 +674,13 @@
 "dest": "external/tarballs",
 "dest-filename": "@ZXING_TARBALL@"
 },
+{
+"url": 
"https://dev-www.libreoffice.org/src/@FROZEN_TARBALL@";,
+"sha256": "@FROZEN_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@FROZEN_TARBALL@"
+},
 {
 "url": 
"https://dev-www.libreoffice.org/extern/@OPENSYMBOL_TTF@";,
 "sha256": "@OPENSYMBOL_SHA256SUM@",


[Libreoffice-commits] core.git: sw/qa sw/source

2023-07-11 Thread Miklos Vajna (via logerrit)
 sw/qa/filter/ww8/data/floattable-then-floattable.doc |binary
 sw/qa/filter/ww8/ww8.cxx |   23 +++
 sw/source/filter/ww8/ww8par6.cxx |   17 ++
 3 files changed, 40 insertions(+)

New commits:
commit 663db89378aa1f0425e795ef5d471f134e658dc4
Author: Miklos Vajna 
AuthorDate: Tue Jul 11 08:21:20 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 11 10:27:44 2023 +0200

sw floattable: make sure floattable after floattable gets own anch pos from 
DOC

The bugdoc has 2 floating tables next to each other, which overlap in
Writer, but not in Word.

This looks quite similar to the DOCX case, which was solved in commit
01ad8ec4bb5425446e95dbada81de435646824b4 (sw floattable: fix lost tables
around a floating table from DOCX, 2023-06-05).

Fix the problem by improving SwWW8ImplReader::StartApo() so it inserts a
fake paragraph when a floating table is immediately followed by a
floating table. A similar case, floating table followed immediately by
an inline table was already handled like this in
WW8TabDesc::CreateSwTable().

Creating a reproducer document from scratch is quite tricky, as Word
will also insert a fake paragraph on the first save of the DOC test file
(so the doc model will be floattable-para-floattable-para) and manual
edit of binary DOC files is also not easy. So the compromise is that the
testcase file has 2 floating tables anchored to the same paragraph, but
they don't overlap visually, while they do overlap in the original,
internal bugdoc. With this, finally the bnc#816603 DOC bugdoc renders
without overlaps, which was the case before my multi-page floating table
changes.

Change-Id: Ib1b4c7c80833db5a7bde38092c8c3ed6fd1d2462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154290
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/qa/filter/ww8/data/floattable-then-floattable.doc 
b/sw/qa/filter/ww8/data/floattable-then-floattable.doc
new file mode 100644
index ..6e694140740b
Binary files /dev/null and 
b/sw/qa/filter/ww8/data/floattable-then-floattable.doc differ
diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx
index d7af2b675f24..68bbc28fcfc3 100644
--- a/sw/qa/filter/ww8/ww8.cxx
+++ b/sw/qa/filter/ww8/ww8.cxx
@@ -387,6 +387,29 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCVerticalFlyOffset)
 // Page 2 starts with an inline table:
 CPPUNIT_ASSERT(pTable2->IsTabFrame());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableThenFloattable)
+{
+// Given a document that contains a floating table, immediately followed 
by an other floating
+// table:
+// When importing the document & laying it out:
+createSwDoc("floattable-then-floattable.doc");
+calcLayout();
+
+// Then make sure that the two floating table has different anchors:
+SwDoc* pDoc = getSwDoc();
+auto& rFlys = *pDoc->GetSpzFrameFormats();
+auto pFly1 = rFlys[0];
+SwNodeOffset nFly1Anchor = 
pFly1->GetAttrSet().GetAnchor().GetAnchorContentNode()->GetIndex();
+auto pFly2 = rFlys[1];
+SwNodeOffset nFly2Anchor = 
pFly2->GetAttrSet().GetAnchor().GetAnchorContentNode()->GetIndex();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 42
+// - Actual  : 41
+// i.e. the two anchor positions were the same instead of first anchor 
followed by the second
+// anchor.
+CPPUNIT_ASSERT_EQUAL(nFly1Anchor + 1, nFly2Anchor);
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 6619d775bdb8..6c0314cf7995 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2517,6 +2517,23 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults 
&rApo, const WW8_TablePos *p
 
 if (pTabPos)
 {
+if (m_xFormatOfJustInsertedApo)
+{
+// We just inserted a floating table and we'll insert a next 
one.
+SwFrameFormat* pFormat = 
m_xFormatOfJustInsertedApo->GetFormat();
+if (pFormat)
+{
+const SwNode* pAnchorNode = 
pFormat->GetAnchor().GetAnchorNode();
+SwPosition* pPoint = m_pPaM->GetPoint();
+if (pAnchorNode && *pAnchorNode == pPoint->GetNode())
+{
+// The two fly frames would have the same anchor 
position, leading to
+// potentially overlapping text, prevent that.
+AppendTextNode(*pPoint);
+}
+}
+}
+
 // Map a positioned table to a split fly.
 aFlySet.Put(SwFormatFlySplit(true));
 }