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

2023-10-25 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/data/tdf157132.odt |binary
 sw/qa/extras/uiwriter/uiwriter8.cxx  |   42 +++
 sw/source/core/table/swtable.cxx |2 +
 3 files changed, 44 insertions(+)

New commits:
commit 0c008ab081aa5bbf53f8562e95e547deae5afc2e
Author: Xisco Fauli 
AuthorDate: Wed Oct 25 18:07:18 2023 +0200
Commit: Xisco Fauli 
CommitDate: Thu Oct 26 08:48:23 2023 +0200

tdf#157132: restore behaviour for TBL_RELBOXNAME

Regression from 8a3dc12a13a3b9e99dbd5000ca6a1d541cf472f7
"8a3dc12a13a3b9e99dbd5000ca6a1d541cf472f7"
TBL_RELBOXNAME was no longer calling ToRelBoxNm

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

diff --git a/sw/qa/extras/uiwriter/data/tdf157132.odt 
b/sw/qa/extras/uiwriter/data/tdf157132.odt
new file mode 100644
index ..ddb9522bf835
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf157132.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index 8e4869c5d694..7cef16f032bf 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -1480,6 +1480,48 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146573)
 CPPUNIT_ASSERT_EQUAL(OUString("204"), xCellA4->getString());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf157132)
+{
+createSwDoc("tdf157132.odt");
+
+SwDoc* pDoc = getSwDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+// Go to cell A2
+pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+
+// Select A2 and A3 and copy
+pWrtShell->Down(/*bSelect=*/true, /*nCount=*/1);
+
+dispatchCommand(mxComponent, ".uno:Copy", {});
+
+// Go to A4 and paste
+pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+
+dispatchCommand(mxComponent, ".uno:Paste", {});
+
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(),
+uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+uno::Reference xTextTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+
+uno::Reference xCellA2(xTextTable->getCellByName("A2"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("2"), xCellA2->getString());
+uno::Reference xCellA3(xTextTable->getCellByName("A3"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("3"), xCellA3->getString());
+uno::Reference xCellA4(xTextTable->getCellByName("A4"), 
uno::UNO_QUERY);
+
+// Without the fix in place, this test would have failed with
+// - Expected: 6
+// - Actual  : 2
+CPPUNIT_ASSERT_EQUAL(OUString("6"), xCellA4->getString());
+uno::Reference xCellA5(xTextTable->getCellByName("A5"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("7"), xCellA5->getString());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf147938)
 {
 createSwDoc("tdf147938.fodt");
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 3d53ef518903..d50c493079a2 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1727,6 +1727,8 @@ void SwTable::UpdateFields(TableFormulaUpdateFlags eFlags)
 {
 if(eFlags == TBL_BOXPTR)
 pBoxFormula->TryBoxNmToPtr();
+else if(eFlags == TBL_RELBOXNAME)
+pBoxFormula->ToRelBoxNm(this);
 else
 pBoxFormula->ChangeState();
 }


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

2023-10-25 Thread Miklos Vajna (via logerrit)
 sw/source/core/layout/tabfrm.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d6527f127622f23ac529ce667fac5ff69ea33ea4
Author: Miklos Vajna 
AuthorDate: Wed Oct 25 09:45:05 2023 +0200
Commit: Miklos Vajna 
CommitDate: Thu Oct 26 08:26:21 2023 +0200

Related: tdf#157590 sw floattable: avoid a bit of not needed work

See

,
we only need to work out if this row has spans in case the row would
split, can skip this otherwise.

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

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 688f1e9770a2..b671e2248550 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2645,10 +2645,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 auto pUpperFly = static_cast(GetUpper());
 bFlySplit = pUpperFly->IsFlySplitAllowed();
 
-if (bFlySplit)
+if (bFlySplit && bTryToSplit)
 {
-// See if this is a nested split fly where the inner 
table also has
-// rowspans.
+// This is a split fly that wants to split the row 
itself. See if it's also
+// nested. If so, we'll want to know if the row split 
has rowspans.
 SwTextFrame* pAnchorCharFrame = 
pUpperFly->FindAnchorCharFrame();
 if (pAnchorCharFrame && pAnchorCharFrame->IsInFly())
 {


[Libreoffice-commits] core.git: cui/UITest_cui_tabpages.mk solenv/gbuild sw/UITest_sw_sidebar.mk

2023-10-25 Thread Miklos Vajna (via logerrit)
 cui/UITest_cui_tabpages.mk |2 --
 solenv/gbuild/UITest.mk|2 +-
 sw/UITest_sw_sidebar.mk|2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 8c39af455c4dee53c6f3c918b0497f80a4fb0f21
Author: Miklos Vajna 
AuthorDate: Wed Oct 25 20:55:40 2023 +0200
Commit: Miklos Vajna 
CommitDate: Thu Oct 26 08:12:20 2023 +0200

uitest oneprocess mode: default to this and clean up one test

Now that all UITests either use gb_UITest_use_oneprocess or
gb_UITest_avoid_oneprocess, it's possible to change the default to use
oneprocess mode out of the box.

Also clean up one test depend on this default. A later commit can clean
up all other uses of gb_UITest_use_oneprocess, which is now redundant.

Finally fix a typo in sw/UITest_sw_sidebar.mk.

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

diff --git a/cui/UITest_cui_tabpages.mk b/cui/UITest_cui_tabpages.mk
index 61bcba9d1ca1..4458e9859e23 100644
--- a/cui/UITest_cui_tabpages.mk
+++ b/cui/UITest_cui_tabpages.mk
@@ -13,6 +13,4 @@ $(eval $(call 
gb_UITest_add_modules,cui_tabpages,$(SRCDIR)/cui/qa/uitest,\
tabpages/ \
 ))
 
-$(eval $(call gb_UITest_use_oneprocess,cui_tabpages))
-
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index cb7720f55b0c..648d1d4f62a1 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -106,7 +106,7 @@ $(call gb_UITest_get_target,$(1)) : MODULES :=
 $(eval $(call gb_TestHelpers_use_more_fonts,$(call gb_UITest_get_target,$(1
 $(eval $(call gb_Module_register_target,$(call 
gb_UITest_get_target,$(1)),$(call gb_UITest_get_clean_target,$(1
 $(call gb_Helper_make_userfriendly_targets,$(1),UITest)
-$(call gb_UITest_get_target,$(1)) : ONEPROCESS := $(false)
+$(call gb_UITest_get_target,$(1)) : ONEPROCESS := $(true)
 
 endef
 
diff --git a/sw/UITest_sw_sidebar.mk b/sw/UITest_sw_sidebar.mk
index 3d73a4cf20ec..b395a206b969 100644
--- a/sw/UITest_sw_sidebar.mk
+++ b/sw/UITest_sw_sidebar.mk
@@ -15,6 +15,6 @@ $(eval $(call gb_UITest_set_defs,sw_sidebar, \
 TDOC="$(SRCDIR)/sw/qa/uitest/data" \
 ))
 
-$(eval $(call gb_UITest_avoid_oneprocess,sw_findReplace))
+$(eval $(call gb_UITest_avoid_oneprocess,sw_sidebar))
 
 # vim: set noet sw=4 ts=4:


Minutes from the UX/design meeting 2023-Oct-25

2023-10-25 Thread Heiko Tietze

Present: John, Bogdan, Heiko
Comments: Eike, Eyal

Tickets/Topics

 * feature [Draw] Color option to identify the layer
   + https://bugs.documentfoundation.org/show_bug.cgi?id=157255
   + currently we show italic for locked, underline for non-printing
 and blue font color for invisible, and a bold bar for the active
 layer
   + a) just use bold for the active layer and icons for states
 + drawback is a jumping UI and larger tabs
   + b) use a thin bar to indicate the object's layer
 + hard to distinguish from the active layer
   + c) colorize the layer of the object with highlight color
 + could use the system highlight color (and invert the blue
   font of disabled)
   + like option a) (John)
   + competitors? draw.io uses kind of a Navigator and draws a tiny
 dot for the object's layer
   + ideally improve the Navigator
   => comment

 * Re-initialize autofill rather than overwriting content
   + https://bugs.documentfoundation.org/show_bug.cgi?id=157731
   + re-initialize autofill rather than overwriting content when
 pressing ctrl (Heiko)
   + take care of shift being pressed (just copies the content)
   + no harm in adding this function (John)
   => do it

 * Paste number format only
   + https://bugs.documentfoundation.org/show_bug.cgi?id=157627
   + paste special without format should not alter the
 target format (Eike)
   + would be a random choice of attributes and bloats the
 dialog (John, Heiko)
   + workflow is unclear and sounds very specific
   + using proper cell style might be a good alternative
   + Excel provides an option to paste "Formulas and number formats"
 or alternatively "Values and number formats"; we should consider
 adding this (John)
   + just adding the number format could be a checkbox under Options
 labeled "Number format" disabled if "[x] Format" is checked (and
 otherwise allowing to overwrite the target number format)
   => do it

 * Print or export to PDF by chapters/sections
   + https://bugs.documentfoundation.org/show_bug.cgi?id=157346
   + nice shortcut (Heiko)
   + should be called heading; and agree with the request (Eyal)
   + makes the print dialog more complicated and is quite unusual;
 reading first/last page from the document is simple enough (John)
   => resolve WF


OpenPGP_signature.asc
Description: OpenPGP digital signature


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

2023-10-25 Thread Andras Timar (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2e09ecc3de6463feddfc75b63a0166a2e0e88002
Author: Andras Timar 
AuthorDate: Wed Oct 25 21:03:33 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Oct 25 21:03:33 2023 +0200

Update git submodules

* Update translations from branch 'distro/collabora/co-23.05'
  to 0a5170ea2c5c2e7d6b69284a5372695d7dbfb41a
  - Fix translations of two strings (regression from core 24e67e179aa)

Change-Id: I687c335b6192dfb7e75722e568d652c3d8017861

diff --git a/translations b/translations
index c0ce8e817a0e..0a5170ea2c5c 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit c0ce8e817a0ef78f00ea9d4d59faaf9d05a3572c
+Subproject commit 0a5170ea2c5c2e7d6b69284a5372695d7dbfb41a


[Libreoffice-commits] translations.git: Branch 'distro/collabora/co-23.05' - source/ab source/af source/am source/an source/ar source/as source/ast source/az source/be source/bg source/bn source/bn-IN

2023-10-25 Thread Andras Timar (via logerrit)
 source/ab/formula/messages.po  |4 ++--
 source/af/formula/messages.po  |4 ++--
 source/am/formula/messages.po  |4 ++--
 source/an/formula/messages.po  |4 ++--
 source/ar/formula/messages.po  |4 ++--
 source/as/formula/messages.po  |4 ++--
 source/ast/formula/messages.po |4 ++--
 source/az/formula/messages.po  |4 ++--
 source/be/formula/messages.po  |4 ++--
 source/bg/formula/messages.po  |4 ++--
 source/bn-IN/formula/messages.po   |4 ++--
 source/bn/formula/messages.po  |4 ++--
 source/bo/formula/messages.po  |4 ++--
 source/br/formula/messages.po  |4 ++--
 source/brx/formula/messages.po |4 ++--
 source/bs/formula/messages.po  |4 ++--
 source/ca-valencia/formula/messages.po |4 ++--
 source/ca/formula/messages.po  |4 ++--
 source/ckb/formula/messages.po |4 ++--
 source/cs/formula/messages.po  |4 ++--
 source/cy/formula/messages.po  |4 ++--
 source/da/formula/messages.po  |4 ++--
 source/de/formula/messages.po  |4 ++--
 source/dgo/formula/messages.po |4 ++--
 source/dsb/formula/messages.po |4 ++--
 source/dz/formula/messages.po  |4 ++--
 source/el/formula/messages.po  |4 ++--
 source/en-GB/formula/messages.po   |4 ++--
 source/en-ZA/formula/messages.po   |4 ++--
 source/eo/formula/messages.po  |4 ++--
 source/es/formula/messages.po  |4 ++--
 source/et/formula/messages.po  |4 ++--
 source/eu/formula/messages.po  |4 ++--
 source/fa/formula/messages.po  |4 ++--
 source/fi/formula/messages.po  |4 ++--
 source/fr/formula/messages.po  |4 ++--
 source/fur/formula/messages.po |4 ++--
 source/fy/formula/messages.po  |4 ++--
 source/ga/formula/messages.po  |4 ++--
 source/gd/formula/messages.po  |4 ++--
 source/gl/formula/messages.po  |4 ++--
 source/gu/formula/messages.po  |4 ++--
 source/gug/formula/messages.po |4 ++--
 source/he/formula/messages.po  |4 ++--
 source/hi/formula/messages.po  |4 ++--
 source/hr/formula/messages.po  |4 ++--
 source/hsb/formula/messages.po |4 ++--
 source/hu/formula/messages.po  |4 ++--
 source/id/formula/messages.po  |4 ++--
 source/is/formula/messages.po  |4 ++--
 source/it/formula/messages.po  |4 ++--
 source/ja/formula/messages.po  |4 ++--
 source/jv/formula/messages.po  |4 ++--
 source/ka/formula/messages.po  |4 ++--
 source/kab/formula/messages.po |4 ++--
 source/kk/formula/messages.po  |4 ++--
 source/kl/formula/messages.po  |4 ++--
 source/km/formula/messages.po  |4 ++--
 source/kmr-Latn/formula/messages.po|4 ++--
 source/kn/formula/messages.po  |4 ++--
 source/ko/formula/messages.po  |4 ++--
 source/kok/formula/messages.po |4 ++--
 source/ks/formula/messages.po  |4 ++--
 source/ky/formula/messages.po  |4 ++--
 source/lb/formula/messages.po  |4 ++--
 source/lo/formula/messages.po  |4 ++--
 source/lt/formula/messages.po  |4 ++--
 source/lv/formula/messages.po  |4 ++--
 source/mai/formula/messages.po |4 ++--
 source/mk/formula/messages.po  |4 ++--
 source/ml/formula/messages.po  |4 ++--
 source/mn/formula/messages.po  |4 ++--
 source/mni/formula/messages.po |4 ++--
 source/mr/formula/messages.po  |4 ++--
 source/my/formula/messages.po  |4 ++--
 source/nb/formula/messages.po  |4 ++--
 source/ne/formula/messages.po  |4 ++--
 source/nl/formula/messages.po  |4 ++--
 source/nn/formula/messages.po  |4 ++--
 source/nr/formula/messages.po  |4 ++--
 source/nso/formula/messages.po |4 ++--
 source/oc/formula/messages.po  |4 ++--
 source/om/formula/messages.po  |4 ++--
 source/or/formula/messages.po  |4 ++--
 source/pa-IN/formula/messages.po   |4 ++--
 source/pl/formula/messages.po  |4 ++--
 source/pt-BR/formula/messages.po   |4 ++--
 source/pt/formula/messages.po  |4 ++--
 source/ro/formula/messages.po  |4 ++--
 source/ru/formula/messages.po  |4 ++--
 source/rw/formula/messages.po  |4 ++--
 source/sa-IN/formula/messages.po   |4 ++--
 source/sah/formula/messages.po |4 ++--
 source/sat/formula/messages.po |4 ++--
 source/sd/formula/messages.po  |4 ++--
 source/si/formula/messages.po  |4 ++--
 source

[Libreoffice-commits] core.git: download.lst external/IAccessible2 external/Module_external.mk Makefile.fetch winaccessibility/CustomTarget_ia2_idl.mk winaccessibility/source

2023-10-25 Thread Michael Weghorn (via logerrit)
 Makefile.fetch|1 
 download.lst  |5 
 external/IAccessible2/ExternalProject_IAccessible2.mk |   26 
 external/IAccessible2/Module_IAccessible2.mk  |   17 
 external/IAccessible2/README  |5 
 external/IAccessible2/UnpackedTarball_IAccessible2.mk |   14 
 external/Module_external.mk   |1 
 winaccessibility/CustomTarget_ia2_idl.mk  |   21 
 winaccessibility/source/UAccCOMIDL/ia2_api_all.idl| 5476 --
 9 files changed, 90 insertions(+), 5476 deletions(-)

New commits:
commit 809409ca845ff1269d3d8f516678048404d8fea8
Author: Michael Weghorn 
AuthorDate: Wed Oct 25 16:19:33 2023 +0200
Commit: Michael Weghorn 
CommitDate: Wed Oct 25 20:48:07 2023 +0200

tdf#135586 a11y: Make IAccessible2 an external and update it

So far, there was an internal copy of the IAccessible2
IDL file added in 2013, and never updated since then
(except for cosmetic changes like formatting and typo
fixes), and therefore it e.g. doesn't have the
`IA2_ROLE_BLOCK_QUOTE` role needed for tdf#135586.

Drop the outdated internal copy and integrate an up to
date upstream version (current git master) instead.

Instead of duplicating things in an internal copy,
switch to using the usual mechanism for externals.

The IAccessible2 source contains separate .idl files
for the different interfaces, while the previous
interal copy was already the merged IDL file.

Call the IAccessible2 `./concatidl.sh` script to generate
the merged `ia2_api_all.idl`
(s. external/IAccessible2/ExternalProject_IAccessible2.mk)
and adapt the winaccessibility make files to use that
version instead of the internal copy.
(Add a dependency to the target that generates
`ia2_api_all.idl`.)

The tarball was generated from the master branch of the
IAccessible2 git repo [1] as of

commit 3d8c7f0b833453f761ded6b12d8be431507bfe0b (HEAD -> master, 
origin/master, origin/HEAD, mygithub/master)
Author: Michael Weghorn 
Date:   Fri Oct 13 04:16:03 2023 +0300

Update no longer working links (#26)

* Update link to Linux Foundation Trademark Policy
* Update link to Object Attributes specification

Signed-off-by: Michael Weghorn 

using this command:

$ git archive -o ../IAccessible2-1.3+git20231013.3d8c7f0.tar.gz 
--prefix=IAccessible2-1.3+git20231013.3d8c7f0/ master

Andrea Gelmini's typo fixes have been upstreamed in [2].

[1] https://github.com/LinuxA11y/IAccessible2
[2] https://github.com/LinuxA11y/IAccessible2/pull/21

Change-Id: I9f19ff55694da5d3a9a8750be8de387cbf6da785
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158427
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/Makefile.fetch b/Makefile.fetch
index 41d6a85d13c0..8cd2c543891f 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -134,6 +134,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk 
$(SRCDIR)/download.lst $(S
$(call fetch_Optional,HSQLDB,HSQLDB_TARBALL) \
$(call fetch_Optional,HUNSPELL,HUNSPELL_TARBALL) \
$(call fetch_Optional,HYPHEN,HYPHEN_TARBALL) \
+   $(if $(filter WNT,$(OS)),IACCESSIBLE2_TARBALL) \
$(call fetch_Optional,ICU,ICU_TARBALL) \
$(call fetch_Optional,ICU,ICU_DATA_TARBALL) \
$(call fetch_Optional,JAVA_WEBSOCKET,JAVA_WEBSOCKET_TARBALL) \
diff --git a/download.lst b/download.lst
index 5aeeb74a6cdc..f1f1ed87e036 100644
--- a/download.lst
+++ b/download.lst
@@ -307,6 +307,11 @@ HYPHEN_TARBALL := 
5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
+IACCESSIBLE2_SHA256SUM := 
0e279003f5199f80031c6dcd08f79d6f65a0505139160e7df0d09b226bff4023
+IACCESSIBLE2_TARBALL := IAccessible2-1.3+git20231013.3d8c7f0.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
 ICU_SHA256SUM := 
818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1
 ICU_TARBALL := icu4c-73_2-src.tgz
 ICU_DATA_SHA256SUM := 
ca1ee076163b438461e484421a7679fc33a64cd0a54f9d4b401893fa1eb42701
diff --git a/external/IAccessible2/ExternalProject_IAccessible2.mk 
b/external/IAccessible2/ExternalProject_IAccessible2.mk
new file mode 100644
index ..0ef6c8fc6014
--- /dev/null
+++ b/external/IAccessible2/ExternalProject_IAccessible2.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozill

Re: Request for tarball upload (IAccessible2)

2023-10-25 Thread Michael Weghorn

On 2023-10-25 17:44, Stephan Bergmann wrote:

On 10/25/23 16:40, Michael Weghorn wrote:

Could someone please upload the following tarball to
dev-www.libreoffice.org?

https://nextcloud.documentfoundation.org/s/tpKW89gmd5zLzNH/download/IAccessible2-1.3+git20231013.3d8c7f0.tar.gz


done,


Thanks a lot, Stephan!


$ sha256sum IAccessible2-1.3+git20231013.3d8c7f0.tar.gz
0e279003f5199f80031c6dcd08f79d6f65a0505139160e7df0d09b226bff4023  
IAccessible2-1.3+git20231013.3d8c7f0.tar.gz


That's the correct checksum.


OpenPGP_signature.asc
Description: OpenPGP digital signature


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

2023-10-25 Thread Seth Chaiklin (via logerrit)
 sw/uiconfig/swriter/ui/tocindexpage.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9f3e8b2546563cdabbe01838a72ed542c7f58875
Author: Seth Chaiklin 
AuthorDate: Wed Oct 25 12:27:55 2023 +0200
Commit: Seth Chaiklin 
CommitDate: Wed Oct 25 18:11:35 2023 +0200

tdf#157908   "Evaluate" -> "Include" in outline level option

Change-Id: Ida8f753175eeb818378160d481a4d71e09054e62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158432
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins

diff --git a/sw/uiconfig/swriter/ui/tocindexpage.ui 
b/sw/uiconfig/swriter/ui/tocindexpage.ui
index bb7cecb457fa..d43f291fe208 100644
--- a/sw/uiconfig/swriter/ui/tocindexpage.ui
+++ b/sw/uiconfig/swriter/ui/tocindexpage.ui
@@ -268,7 +268,7 @@
   
 True
 False
-Evaluate up to level:
+Include up to level:
 True
 level
 0


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

2023-10-25 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/04120211.xhp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3ae6c825415ce74ed8f0487acc043fd3a41c46e4
Author: Seth Chaiklin 
AuthorDate: Wed Oct 25 13:33:52 2023 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Oct 25 18:06:37 2023 +0200

tdf#157908 update label change to "Include up to level"

  * correction to explanation of "Include up to level"
  * simplify explanation of Additional Styles, and add
mention of "Include up to level"
  + add link to "Apply Styles" help page

Change-Id: If72b7b1df5e3e5a3f18cfda86a875345866fa471
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158435
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/swriter/01/04120211.xhp 
b/source/text/swriter/01/04120211.xhp
index e8dfb74082..aebb2d5129 100644
--- a/source/text/swriter/01/04120211.xhp
+++ b/source/text/swriter/01/04120211.xhp
@@ -53,19 +53,19 @@
 Select whether to create the index 
for the document or for the current chapter.
   
 
-Evaluate up to level
-  Enter the number of outline levels 
to include in the index.
+Include up to level
+  Specify the maximum outline level 
for a paragraph, specified in Create from, to be included 
in the index.
   Create from
   Use this area to specify 
which information to include in an index.
 
 Outline
-  Creates the index using 
outline levels. Any paragraph with an outline level less than or equal to the 
outline level specified in Evaluate up to level is 
included in the index.
+  Creates the index using 
outline levels. Any paragraph with an outline level less than or equal to the 
outline level specified in Include up to level is included 
in the index.
Paragraphs 
formatted with one of the predefined paragraph styles (“Heading 1–10”) have an 
outline level that corresponds to the number in the paragraph style. You can 
also assign outline levels to paragraphs in the Outline & List tab page of the 
Format - Paragraph dialog.
   
 
 Additional Styles
-  Includes 
the paragraph styles that you specify in the Assign Styles dialog 
as index entries. To select the paragraph styles that you want to include in 
the index, click the Assign Styles (...) button to the right of 
this box.
-
+  Includes 
paragraphs with the paragraph styles specified in the Assign Styles 
dialog as index entries. To select paragraph styles, click the Assign 
Styles button to the right of this option.
+Assigned paragraph styles must have an outline level less than or 
equal to the value specified in Include up to level to be 
included in the index.
 Use “Additional Styles” to 
include paragraphs in the Table of Contents with the “Figure Index Heading” or 
“Bibliography Heading” paragraph style, as well as any other relevant paragraph 
style.
   
 


[Libreoffice-commits] core.git: helpcontent2

2023-10-25 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7eb1b3f3e9644a4e7ab96dded9f134cfa1df7228
Author: Seth Chaiklin 
AuthorDate: Wed Oct 25 18:06:37 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Oct 25 18:06:37 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 3ae6c825415ce74ed8f0487acc043fd3a41c46e4
  - tdf#157908 update label change to "Include up to level"

  * correction to explanation of "Include up to level"
  * simplify explanation of Additional Styles, and add
mention of "Include up to level"
  + add link to "Apply Styles" help page

Change-Id: If72b7b1df5e3e5a3f18cfda86a875345866fa471
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158435
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 69f85cbf17c5..3ae6c825415c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 69f85cbf17c5acb8fb9b38772139c34eea96a772
+Subproject commit 3ae6c825415ce74ed8f0487acc043fd3a41c46e4


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - helpcontent2

2023-10-25 Thread Ilmari Lauhakangas (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 138a441b108ea97f7873b633eb579b779f2cf748
Author: Ilmari Lauhakangas 
AuthorDate: Wed Oct 25 19:05:55 2023 +0300
Commit: Gerrit Code Review 
CommitDate: Wed Oct 25 18:05:55 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-6'
  to 4f4db70a67558885482ba33892910f8123f00c03
  - Improve accessibility of dropdown menus

Now the opened menus can be closed with Esc key, so we conform
to the dismissible success criterion in WCAG 2.1:

https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html

To simplify things, now the navigation lists are populated upon
page load in all cases.

Change-Id: I0a7daaea122d3e03de36c322ccb012c546b271e0
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158429
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit 69f85cbf17c5acb8fb9b38772139c34eea96a772)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158436
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index c10e043fdaf6..4f4db70a6755 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c10e043fdaf6ed01727d99dfa3bcccd49ba9c527
+Subproject commit 4f4db70a67558885482ba33892910f8123f00c03


[Libreoffice-commits] help.git: Branch 'libreoffice-7-6' - help3xsl/a11y-toggle.js help3xsl/default.css help3xsl/help2.js help3xsl/help.js help3xsl/online_transform.xsl help3xsl/xap_templ_query.xsl

2023-10-25 Thread Ilmari Lauhakangas (via logerrit)
 help3xsl/a11y-toggle.js   |  146 ++
 help3xsl/default.css  |6 -
 help3xsl/help.js  |1 
 help3xsl/help2.js |   27 ---
 help3xsl/online_transform.xsl |8 +-
 help3xsl/xap_templ_query.xsl  |4 -
 6 files changed, 75 insertions(+), 117 deletions(-)

New commits:
commit 4f4db70a67558885482ba33892910f8123f00c03
Author: Ilmari Lauhakangas 
AuthorDate: Wed Oct 25 18:20:13 2023 +0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Oct 25 18:05:54 2023 +0200

Improve accessibility of dropdown menus

Now the opened menus can be closed with Esc key, so we conform
to the dismissible success criterion in WCAG 2.1:
https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html

To simplify things, now the navigation lists are populated upon
page load in all cases.

Change-Id: I0a7daaea122d3e03de36c322ccb012c546b271e0
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158429
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit 69f85cbf17c5acb8fb9b38772139c34eea96a772)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158436
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/help3xsl/a11y-toggle.js b/help3xsl/a11y-toggle.js
index 821a8e0272..62e1032b02 100644
--- a/help3xsl/a11y-toggle.js
+++ b/help3xsl/a11y-toggle.js
@@ -1,100 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
-MIT License
-
-Copyright (c) 2016 Edenspiekermann
-
-*/
-
-(function () {
-  'use strict';
-
-  var internalId = 0;
-  var togglesMap = {};
-  var targetsMap = {};
-
-  function $ (selector, context) {
-return Array.prototype.slice.call(
-  (context || document).querySelectorAll(selector)
-);
-  }
-
-  function getClosestToggle (element) {
-if (element.closest) {
-  return element.closest('[data-a11y-toggle]');
-}
-
-while (element) {
-  if (element.nodeType === 1 && element.hasAttribute('data-a11y-toggle')) {
-return element;
-  }
-
-  element = element.parentNode;
-}
-
-return null;
-  }
-
-  function handleToggle (toggle) {
-var target = toggle && targetsMap[toggle.getAttribute('aria-controls')];
-
-if (!target) {
-  return false;
-}
-
-var toggles = togglesMap['#' + target.id];
-var isExpanded = target.getAttribute('aria-hidden') === 'false';
-
-target.setAttribute('aria-hidden', isExpanded);
-toggles.forEach(function (toggle) {
-  toggle.setAttribute('aria-expanded', !isExpanded);
+ * 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/.
+ */
+
+function hideNavs() {
+let navs = document.querySelectorAll('[data-a11y-toggle] + nav');
+navs.forEach((nav) => {
+if (!nav.hasAttribute('hidden')) {
+nav.previousElementSibling.setAttribute('aria-expanded', 'false');
+nav.setAttribute('hidden', 'true');
+}
 });
-  }
-
-  var initA11yToggle = function (context) {
-togglesMap = $('[data-a11y-toggle]', context).reduce(function (acc, 
toggle) {
-  var selector = '#' + toggle.getAttribute('data-a11y-toggle');
-  acc[selector] = acc[selector] || [];
-  acc[selector].push(toggle);
-  return acc;
-}, togglesMap);
-
-var targets = Object.keys(togglesMap);
-targets.length && $(targets).forEach(function (target) {
-  var toggles = togglesMap['#' + target.id];
-  var isExpanded = target.hasAttribute('data-a11y-toggle-open');
-  var labelledby = [];
-
-  toggles.forEach(function (toggle) {
-toggle.id || toggle.setAttribute('id', 'a11y-toggle-' + internalId++);
-toggle.setAttribute('aria-controls', target.id);
-toggle.setAttribute('aria-expanded', isExpanded);
-labelledby.push(toggle.id);
-  });
-
-  target.setAttribute('aria-hidden', !isExpanded);
-  target.hasAttribute('aria-labelledby') || 
target.setAttribute('aria-labelledby', labelledby.join(' '));
-
-  targetsMap[target.id] = target;
-});
-  };
-
-  document.addEventListener('DOMContentLoaded', function () {
-initA11yToggle();
-  });
-
-  document.addEventListener('click', function (event) {
-var toggle = getClosestToggle(event.target);
-handleToggle(toggle);
-  });
-
-  document.addEventListener('keyup', function (event) {
-if (event.which === 13 || event.which === 32) {
-  var toggle = getClosestToggle(event.target);
-  if (toggle && toggle.getAttribute('role') === 'button') {
-handleToggle(toggle);
-  }
+}
+const navToggle = document.querySelectorAll('[data-a11y-toggle]');
+navToggle.forEach((toggle) => {
+  let navList = toggle.nextElementSibling;
+  let navLinks = navList.query

[Libreoffice-commits] core.git: helpcontent2

2023-10-25 Thread Ilmari Lauhakangas (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 725c543c3b1c91d6656e6ed58006d886f83456dc
Author: Ilmari Lauhakangas 
AuthorDate: Wed Oct 25 18:53:36 2023 +0300
Commit: Gerrit Code Review 
CommitDate: Wed Oct 25 17:53:36 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 69f85cbf17c5acb8fb9b38772139c34eea96a772
  - Improve accessibility of dropdown menus

Now the opened menus can be closed with Esc key, so we conform
to the dismissible success criterion in WCAG 2.1:

https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html

To simplify things, now the navigation lists are populated upon
page load in all cases.

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

diff --git a/helpcontent2 b/helpcontent2
index 3c0331071035..69f85cbf17c5 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3c0331071035ec78359ec8a4e5919164a31ec879
+Subproject commit 69f85cbf17c5acb8fb9b38772139c34eea96a772


[Libreoffice-commits] help.git: help3xsl/a11y-toggle.js help3xsl/default.css help3xsl/help2.js help3xsl/help.js help3xsl/online_transform.xsl help3xsl/xap_templ_query.xsl

2023-10-25 Thread Ilmari Lauhakangas (via logerrit)
 help3xsl/a11y-toggle.js   |  146 ++
 help3xsl/default.css  |6 -
 help3xsl/help.js  |1 
 help3xsl/help2.js |   27 ---
 help3xsl/online_transform.xsl |8 +-
 help3xsl/xap_templ_query.xsl  |4 -
 6 files changed, 75 insertions(+), 117 deletions(-)

New commits:
commit 69f85cbf17c5acb8fb9b38772139c34eea96a772
Author: Ilmari Lauhakangas 
AuthorDate: Wed Oct 25 18:20:13 2023 +0300
Commit: Olivier Hallot 
CommitDate: Wed Oct 25 17:53:36 2023 +0200

Improve accessibility of dropdown menus

Now the opened menus can be closed with Esc key, so we conform
to the dismissible success criterion in WCAG 2.1:
https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html

To simplify things, now the navigation lists are populated upon
page load in all cases.

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

diff --git a/help3xsl/a11y-toggle.js b/help3xsl/a11y-toggle.js
index 821a8e0272..62e1032b02 100644
--- a/help3xsl/a11y-toggle.js
+++ b/help3xsl/a11y-toggle.js
@@ -1,100 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
-MIT License
-
-Copyright (c) 2016 Edenspiekermann
-
-*/
-
-(function () {
-  'use strict';
-
-  var internalId = 0;
-  var togglesMap = {};
-  var targetsMap = {};
-
-  function $ (selector, context) {
-return Array.prototype.slice.call(
-  (context || document).querySelectorAll(selector)
-);
-  }
-
-  function getClosestToggle (element) {
-if (element.closest) {
-  return element.closest('[data-a11y-toggle]');
-}
-
-while (element) {
-  if (element.nodeType === 1 && element.hasAttribute('data-a11y-toggle')) {
-return element;
-  }
-
-  element = element.parentNode;
-}
-
-return null;
-  }
-
-  function handleToggle (toggle) {
-var target = toggle && targetsMap[toggle.getAttribute('aria-controls')];
-
-if (!target) {
-  return false;
-}
-
-var toggles = togglesMap['#' + target.id];
-var isExpanded = target.getAttribute('aria-hidden') === 'false';
-
-target.setAttribute('aria-hidden', isExpanded);
-toggles.forEach(function (toggle) {
-  toggle.setAttribute('aria-expanded', !isExpanded);
+ * 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/.
+ */
+
+function hideNavs() {
+let navs = document.querySelectorAll('[data-a11y-toggle] + nav');
+navs.forEach((nav) => {
+if (!nav.hasAttribute('hidden')) {
+nav.previousElementSibling.setAttribute('aria-expanded', 'false');
+nav.setAttribute('hidden', 'true');
+}
 });
-  }
-
-  var initA11yToggle = function (context) {
-togglesMap = $('[data-a11y-toggle]', context).reduce(function (acc, 
toggle) {
-  var selector = '#' + toggle.getAttribute('data-a11y-toggle');
-  acc[selector] = acc[selector] || [];
-  acc[selector].push(toggle);
-  return acc;
-}, togglesMap);
-
-var targets = Object.keys(togglesMap);
-targets.length && $(targets).forEach(function (target) {
-  var toggles = togglesMap['#' + target.id];
-  var isExpanded = target.hasAttribute('data-a11y-toggle-open');
-  var labelledby = [];
-
-  toggles.forEach(function (toggle) {
-toggle.id || toggle.setAttribute('id', 'a11y-toggle-' + internalId++);
-toggle.setAttribute('aria-controls', target.id);
-toggle.setAttribute('aria-expanded', isExpanded);
-labelledby.push(toggle.id);
-  });
-
-  target.setAttribute('aria-hidden', !isExpanded);
-  target.hasAttribute('aria-labelledby') || 
target.setAttribute('aria-labelledby', labelledby.join(' '));
-
-  targetsMap[target.id] = target;
-});
-  };
-
-  document.addEventListener('DOMContentLoaded', function () {
-initA11yToggle();
-  });
-
-  document.addEventListener('click', function (event) {
-var toggle = getClosestToggle(event.target);
-handleToggle(toggle);
-  });
-
-  document.addEventListener('keyup', function (event) {
-if (event.which === 13 || event.which === 32) {
-  var toggle = getClosestToggle(event.target);
-  if (toggle && toggle.getAttribute('role') === 'button') {
-handleToggle(toggle);
-  }
+}
+const navToggle = document.querySelectorAll('[data-a11y-toggle]');
+navToggle.forEach((toggle) => {
+  let navList = toggle.nextElementSibling;
+  let navLinks = navList.querySelectorAll('a');
+  toggle.addEventListener('click', (event) => {
+  if (navList.hasAttribute('hidden')) {
+  toggle.setAttribute('aria-expanded', 'true');
+  

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

2023-10-25 Thread Skyler Grey (via logerrit)
 sw/qa/core/fields/data/styleref-flags.docx |binary
 sw/qa/core/fields/data/styleref.odt|binary
 sw/qa/core/fields/data/suppress-non-numerical.docx |binary
 sw/qa/core/fields/fields.cxx   |  224 -
 4 files changed, 172 insertions(+), 52 deletions(-)

New commits:
commit 5f4bbf5b8e9af5e98c34ce67d2a8b521ffcf50c6
Author: Skyler Grey 
AuthorDate: Mon Oct 23 09:17:23 2023 +
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 17:52:20 2023 +0200

Improve and extend STYLEREF tests

- I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19,
  Ib664fec059aa1f7f130acc76c253d5d298fa59f7 and
  Iad8e8001807f5ceeaedc9665838672695174a936 added STYLEREF flags. This
  commit adds tests for them
- The tests in I35dc36197b62fa53def4745da1d4755ece79ed22 were partly
  broken due to the fields occasionally being inserted in the wrong
  place (i.e. at the end of the document), this commit makes sure to
  move the cursor before inserting a field
- The tests in I35dc36197b62fa53def4745da1d4755ece79ed22 were not
  separated into sections which made it difficult to tell what was being
  tested. All STYLEREF tests that create documents are now clearly split
  into arrange/act/assert steps with comments denoting the sections
- The tests in I35dc36197b62fa53def4745da1d4755ece79ed22 had a lot of
  repetition, particularly in creating the document, adding headings,
  etc. This has been refactored into some helper functions
- I35dc36197b62fa53def4745da1d4755ece79ed22 was missing an ODF import
  test. This commit adds one

Follow-Up-To: I25dd7a6940abee5651a784b9059fe23b32547d6c
Follow-Up-To: I35dc36197b62fa53def4745da1d4755ece79ed22
Follow-Up-To: I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19
Follow-Up-To: Ib664fec059aa1f7f130acc76c253d5d298fa59f7
Follow-Up-To: Iad8e8001807f5ceeaedc9665838672695174a936
Follow-Up-To: Iecd3e83a6bd3f8c2c6adba5c7eba9ee55b773510
Follow-Up-To: Ifaa67fbc2d53b0d4fb85e7305b2dbdf78cf0a1ad
Follow-Up-To: Id991c92b9aeaa054b136f7a3d9c7c8ea0026e514
Change-Id: I941b477c8e860270a400869cb9ea15e5561e402a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158342
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/core/fields/data/styleref-flags.docx 
b/sw/qa/core/fields/data/styleref-flags.docx
new file mode 100644
index ..443624a575e0
Binary files /dev/null and b/sw/qa/core/fields/data/styleref-flags.docx differ
diff --git a/sw/qa/core/fields/data/styleref.odt 
b/sw/qa/core/fields/data/styleref.odt
new file mode 100644
index ..27af5aae1f06
Binary files /dev/null and b/sw/qa/core/fields/data/styleref.odt differ
diff --git a/sw/qa/core/fields/data/suppress-non-numerical.docx 
b/sw/qa/core/fields/data/suppress-non-numerical.docx
new file mode 100644
index ..439e048b9f93
Binary files /dev/null and b/sw/qa/core/fields/data/suppress-non-numerical.docx 
differ
diff --git a/sw/qa/core/fields/fields.cxx b/sw/qa/core/fields/fields.cxx
index 4a3dd3af1593..934518d5b9f9 100644
--- a/sw/qa/core/fields/fields.cxx
+++ b/sw/qa/core/fields/fields.cxx
@@ -7,8 +7,9 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+#include "reffld.hxx"
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -19,16 +20,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -40,9 +36,7 @@
 #include 
 
 #include 
-#include 
 #include 
-
 #include 
 
 #include 
@@ -191,27 +185,52 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf86790)
 CPPUNIT_ASSERT_EQUAL(sValue.first, xField->getPresentation(true));
 CPPUNIT_ASSERT_EQUAL(sValue.second, xField->getPresentation(false));
 }
+CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
+namespace
+{
+void InsertParagraphBreak(uno::Reference xCursor)
+{
+uno::Reference xText = xCursor->getText();
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::PARAGRAPH_BREAK, false);
+}
+void InsertHeading(uno::Reference xCursor, OUString content)
+{
+uno::Reference xCursorPropertySet(xCursor, 
uno::UNO_QUERY);
+uno::Reference xText = xCursor->getText();
+
+xCursorPropertySet->setPropertyValue("ParaStyleName", 
uno::Any(OUString("Heading 1")));
+xText->insertString(xCursor, content, false);
+InsertParagraphBreak(xCursor);
+}
 }
 
 /// If there is referenced text both above and below, STYLEREF searches up
 CPPUNIT_TEST_FIXTURE(Test, testStyleRefSearchUp)
 {
+// Arrange
+// Create a document with headings both above and below a cursor
 createSwDoc();
 
 uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xText = xTextDocument->getText();
 
 uno::Reference xCursor = xText->createTextCursor();
-uno::Reference xCursorPropertySet(xCursor, 

Re: Request for tarball upload (IAccessible2)

2023-10-25 Thread Stephan Bergmann

On 10/25/23 16:40, Michael Weghorn wrote:

Could someone please upload the following tarball to
dev-www.libreoffice.org?

https://nextcloud.documentfoundation.org/s/tpKW89gmd5zLzNH/download/IAccessible2-1.3+git20231013.3d8c7f0.tar.gz


done,


$ sha256sum IAccessible2-1.3+git20231013.3d8c7f0.tar.gz
0e279003f5199f80031c6dcd08f79d6f65a0505139160e7df0d09b226bff4023  
IAccessible2-1.3+git20231013.3d8c7f0.tar.gz





Request for tarball upload (IAccessible2)

2023-10-25 Thread Michael Weghorn

Could someone please upload the following tarball to
dev-www.libreoffice.org?

https://nextcloud.documentfoundation.org/s/tpKW89gmd5zLzNH/download/IAccessible2-1.3+git20231013.3d8c7f0.tar.gz

(needed for https://gerrit.libreoffice.org/c/core/+/158427
"tdf#135586 a11y: Make IAccessible2 an external and update it";
tarball generated from current IAccessible2 git master as described in 
the commit message)


OpenPGP_signature.asc
Description: OpenPGP digital signature


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

2023-10-25 Thread Skyler Grey (via logerrit)
 sw/source/core/fields/reffld.cxx |   21 +
 sw/uiconfig/swriter/ui/fldrefpage.ui |2 +-
 2 files changed, 6 insertions(+), 17 deletions(-)

New commits:
commit 60c111838da81697a49b3011eebe8b1e05ad08bb
Author: Skyler Grey 
AuthorDate: Tue Oct 24 10:19:52 2023 +
Commit: Skyler Grey 
CommitDate: Wed Oct 25 16:36:51 2023 +0200

Improve STYLE_FROM_BOTTOM compatability with Word

From my testing in Word, it doesn't honor the "search from bottom" flag
when it is in the body, only in marginals. Additionally, it doesn't
continue searching in the opposite order if the referenced content is
not found on the current page, instead it searches in the same order as
it would normally (i.e. pages above then pages below). This commit
changes the behavior and UI of our from bottom flag to match.

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

diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 3a7bc4ae4e70..1f8aae4e3506 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1385,8 +1385,6 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 case REF_STYLE:
 if (!pSelf) break;
 
-bool bFlagFromBottom = (nFlags & REFFLDFLAG_STYLE_FROM_BOTTOM) == 
REFFLDFLAG_STYLE_FROM_BOTTOM;
-
 const SwNodes& nodes = pDoc->GetNodes();
 
 StyleRefElementType elementType = StyleRefElementType::Default;
@@ -1435,6 +1433,8 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 // For marginals, styleref tries to act on the current 
page first
 // 1. Get the page we're on, search it from top to bottom
 
+bool bFlagFromBottom = (nFlags & 
REFFLDFLAG_STYLE_FROM_BOTTOM) == REFFLDFLAG_STYLE_FROM_BOTTOM;
+
 Point aPt;
 std::pair const tmp(aPt, false);
 
@@ -1500,10 +1500,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 
 if (beforeStart)
 {
-if (bFlagFromBottom)
-pSearchThird.push_front(nodes[n]);
-else
-pSearchSecond.push_front(nodes[n]);
+pSearchSecond.push_front(nodes[n]);
 }
 else if (beforeEnd)
 {
@@ -1517,8 +1514,6 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 beforeEnd = false;
 }
 }
-else if (bFlagFromBottom)
-pSearchSecond.push_back(nodes[n]);
 else
 pSearchThird.push_back(nodes[n]);
 }
@@ -1580,20 +1575,14 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 {
 if (beforeElement)
 {
-if (bFlagFromBottom)
-pSearchSecond.push_front(nodes[n]);
-else
-pSearchFirst.push_front(nodes[n]);
+pSearchFirst.push_front(nodes[n]);
 
 if (*pReference == *nodes[n])
 {
 beforeElement = false;
 }
 }
-else if (bFlagFromBottom)
-pSearchFirst.push_back(nodes[n]);
-else
-pSearchSecond.push_back(nodes[n]);
+pSearchSecond.push_back(nodes[n]);
 }
 
 // 1. Search up until we hit the top of the document
diff --git a/sw/uiconfig/swriter/ui/fldrefpage.ui 
b/sw/uiconfig/swriter/ui/fldrefpage.ui
index 635cbb35fb41..8592211ef10e 100644
--- a/sw/uiconfig/swriter/ui/fldrefpage.ui
+++ b/sw/uiconfig/swriter/ui/fldrefpage.ui
@@ -201,7 +201,7 @@
 top
 
   
-Search from bottom to top
+Search this page from bottom to 
top
 True
 True
 False


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

2023-10-25 Thread Skyler Grey (via logerrit)
 sw/inc/numrule.hxx   |4 -
 sw/inc/reffld.hxx|5 -
 sw/source/core/doc/number.cxx|  121 ++-
 sw/source/core/fields/reffld.cxx |   44 +++---
 sw/source/core/txtnode/ndtxt.cxx |1 
 sw/source/ui/fldui/fldref.cxx|   48 +--
 sw/source/ui/fldui/fldref.hxx|1 
 7 files changed, 152 insertions(+), 72 deletions(-)

New commits:
commit 6d2871efaebc9c36ba1d225e2f149e35d32db1d6
Author: Skyler Grey 
AuthorDate: Tue Oct 24 16:22:30 2023 +
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 16:16:39 2023 +0200

Improve HIDE_NON_NUMERICAL compatibility with Word

The previous implementation of REFFLDFLAG_STYLE_HIDE_NON_NUMERICAL had
some major incompatibilites with Word. In particular, it stripped
letters even if they were included in the "numbering" system.

This commit fixes a lot of the flaws in the previous implementation, so
it's now a lot closer to Word.

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

diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index f642e21e746c..b21cc5259656 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -169,11 +169,13 @@ public:
 OUString MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
   const bool bInclStrings = true,
   const unsigned int _nRestrictToThisLevel = MAXLEVEL,
+  const bool bHideNonNumerical = false,
   Extremities* pExtremities = nullptr,
   LanguageType nLang = LANGUAGE_SYSTEM) const;
 OUString MakeRefNumString( const SwNodeNum& rNodeNum,
  const bool bInclSuperiorNumLabels,
- const int nRestrictInclToThisLevel ) const;
+ const int nRestrictInclToThisLevel,
+ const bool bHideNonNumerical ) const;
 OUString MakeParagraphStyleListString() const;
 
 /** @return list of associated text nodes */
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 3c1e3c63b5e6..b65e8c209633 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -117,11 +117,6 @@ private:
 
 virtual OUStringExpandImpl(SwRootFrame const* pLayout) const override;
 virtual std::unique_ptr Copy() const override;
-
-/// Strip out text that is not either a number or a delimiter. Used in 
STYLEREF for when you
-/// have chapters labelled "Chapter X.Y" and want to just keep the "X.Y". 
Distinct from
-/// GetExpandedTextOfReferencedTextNode so you can run it after any other 
processing
-void StylerefStripNonnumerical(OUString& rText) const;
 public:
 SwGetRefField( SwGetRefFieldType*, OUString aSetRef, OUString 
aReferenceLanguage,
 sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uInt16 nFlags, 
sal_uLong nFormat );
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 3ab36c63c160..fffa5ea2a92c 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -648,9 +648,51 @@ OUString SwNumRule::MakeNumString( const SwNodeNum& rNum, 
bool bInclStrings ) co
 return OUString();
 }
 
+namespace {
+/// Strip out text that is not a delimiter. Used in STYLEREF for when you
+/// have chapters labelled "Chapter X.Y" and want to just keep the "X.Y"
+/// Only used on the prefix/infix/suffix, so the numbers are not modified
+void StripNonDelimiter(OUString& rText)
+{
+std::vector charactersToKeep;
+
+for (int i = 0; i < rText.getLength(); i++) {
+auto character = rText[i];
+
+ // tdf#86790# for Word compatibility: I haven't found any better way 
to determine whether a
+ // character is a delimiter than testing in Word and listing them 
out. Furthermore, I haven't
+ // found a list so I can't be certain this is the complete set- if 
there's a compatibility issue
+ // with this in the future, here's the first place to look...
+ if (
+character == '.'
+|| character == ','
+|| character == ':'
+|| character == ';'
+|| character == '-'
+|| character == '('
+|| character == ')'
+|| character == '['
+|| character == ']'
+|| character == '{'
+|| character == '}'
+|| character == '/'
+|| character == '\\'
+|| character == '|'
+)
+charactersToKeep.push_back(character);
+}
+
+if (charactersToKeep.size())
+rText = OUString(&charactersToKeep[0], charactersToKeep.size());
+else
+rText = OUString();
+}
+}
+
 OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & 
rNumVector,
  

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

2023-10-25 Thread Mike Kaganski (via logerrit)
 sw/qa/core/text/data/placeholder.fodt |9 +
 sw/qa/core/text/text.cxx  |   28 
 sw/source/core/text/itrform2.cxx  |2 
 sw/source/core/text/porfld.cxx|   69 ++-
 sw/source/core/text/porfld.hxx|   24 +++
 sw/source/core/text/txtfld.cxx|  210 +-
 6 files changed, 184 insertions(+), 158 deletions(-)

New commits:
commit 9299afbbd6bd264ba90e5e0ac21a700e88f56c0f
Author: Mike Kaganski 
AuthorDate: Tue Oct 24 23:20:30 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Oct 25 15:54:59 2023 +0200

Export text placeholder fields as PDF form fields

Inspired by commit 82d90529dc2b3cb8359dec78852cbd910a66d275
(sw content controls, rich text: add initial PDF export, 2022-09-12).

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

diff --git a/sw/qa/core/text/data/placeholder.fodt 
b/sw/qa/core/text/data/placeholder.fodt
new file mode 100644
index ..01cb60437618
--- /dev/null
+++ b/sw/qa/core/text/data/placeholder.fodt
@@ -0,0 +1,9 @@
+
+
+
+ 
+  
+   
+  
+ 
+
\ No newline at end of file
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 8a48b75a03e4..496c14006539 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -1174,6 +1174,34 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testRichContentControlPDF)
 CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testPlaceholderFieldPDF)
+{
+std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
+if (!pPDFium)
+return;
+
+// Given a file with a text-type placeholder field:
+createSwDoc("placeholder.fodt");
+
+// When exporting to PDF (default setting is "create a PDF form"):
+save("writer_pdf_Export");
+
+// Then make sure that a fillable form widget is emitted:
+std::unique_ptr pPdfDocument = parsePDFExport();
+std::unique_ptr pPage = pPdfDocument->openPage(0);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 0
+// i.e. the placeholder field was just exported as normal text.
+CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+std::unique_ptr pAnnotation = 
pPage->getAnnotation(0);
+CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, 
pAnnotation->getSubType());
+
+// Also verify that the widget description is correct:
+CPPUNIT_ASSERT_EQUAL(OUString("reference text"),
+ 
pAnnotation->getFormFieldAlternateName(pPdfDocument.get()));
+}
+
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testNumberPortionFormat)
 {
 // Given a document with a single paragraph, direct formatting asks 24pt 
font size for the
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index c3e718871189..b5077e6c775f 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1182,7 +1182,7 @@ SwTextPortion *SwTextFormatter::WhichTextPor( 
SwTextFormatInfo &rInf ) const
 }
 }
 assert(2 <= sal_Int32(nFieldLen));
-pPor = new SwFieldPortion(aFieldName, nullptr, false, nFieldLen);
+pPor = new SwFieldPortion(aFieldName, nullptr, nFieldLen);
 }
 else
 {
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 66f39644ffed..580b4a2635a7 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -22,10 +22,14 @@
 #include 
 #include 
 #include 
+
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include "porlay.hxx"
@@ -44,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -59,7 +64,7 @@ SwFieldPortion *SwFieldPortion::Clone( const OUString 
&rExpand ) const
 }
 // #i107143#
 // pass placeholder property to created  instance.
-SwFieldPortion* pClone = new SwFieldPortion( rExpand, std::move(pNewFnt), 
m_bPlaceHolder );
+SwFieldPortion* pClone = new SwFieldPortion(rExpand, std::move(pNewFnt));
 pClone->SetNextOffset( m_nNextOffset );
 pClone->m_bNoLength = m_bNoLength;
 return pClone;
@@ -73,13 +78,13 @@ void SwFieldPortion::TakeNextOffset( const SwFieldPortion* 
pField )
 m_bFollow = true;
 }
 
-SwFieldPortion::SwFieldPortion(OUString aExpand, std::unique_ptr 
pFont, bool bPlaceHold, TextFrameIndex const nFieldLen)
+SwFieldPortion::SwFieldPortion(OUString aExpand, std::unique_ptr 
pFont, TextFrameIndex const nFieldLen)
 : m_aExpand(std::move(aExpand)), m_pFont(std::move(pFont)), 
m_nNextOffset(0)
 , m_nNextScriptChg(COMPLETE_STRING), m_nFieldLen(nFieldLen), 
m_nViewWidth(0)
 , m_bFollow( false ), m_bLeft( false), m_bHide( false)
 , m_bCenter (false), m_b

ESC meeting agenda: 2023-10-26 16:00 CEST

2023-10-25 Thread Miklos Vajna

Hi,

The prototype agenda is below. Extra items are appreciated either in
this document or as a reply to this mail:

https://pad.documentfoundation.org/p/esc

You can join using Jitsi here:

https://jitsi.documentfoundation.org/esc

Regards,

Miklos

---

* Present:
+

* Completed Action Items:

* Pending Action Items:
+ Set up a daily tinderbox for the python-based windows installer (Cloph)

* Release Engineering update (Cloph)
+ 7.6 status: 7.6.3 rc1 in 1 week?
+ 7.5 status: 7.5.8 rc2 this week?
+ 24.2: end of Nov, in week 47, first alpha
  + feature freeze in early Dec
  + see https://wiki.documentfoundation.org/ReleasePlan/24.2 for details
  + might be some small shifts of 1-2 weeks in either direction

* Documentation (Olivier)
+ Bugzilla Documentation statistics
274(274) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 5(1) 25(5)  61(-5) 292(0)
 commented 9(0) 47(4) 182(-30)   1080(0)
  resolved 0(-2) 5(0)  23(-6) 156(-1)
+ top 10 contributors:
  Olivier Hallot made 16 changes in 1 month, and 436 changes in 1 year
  Ilmari Lauhakangas made 15 changes in 1 month, and 128 changes in 1 
year
  Kaganski, Mike made 11 changes in 1 month, and 80 changes in 1 year
  Stéphane Guillou made 11 changes in 1 month, and 352 changes in 1 year
  Heiko Tietze made 4 changes in 1 month, and 111 changes in 1 year
  Xisco Fauli made 4 changes in 1 month, and 14 changes in 1 year
  aswath t made 2 changes in 1 month, and 7 changes in 1 year
  Rathke, Eike made 2 changes in 1 month, and 10 changes in 1 year
  Jérôme made 2 changes in 1 month, and 2 changes in 1 year
  Adolfo Jayme Barrientos made 1 changes in 1 month, and 22 changes in 
1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
254(254) (topicUI) bugs open, 57(57) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
 added  7(6) 17(0) 19(0)   40(-2)
 commented 69(28)   183(42)   428(28)2212(43)
   removed  0(-1) 2(0)  3(0)   19(-1)
  resolved  9(-2)27(-3)84(-2) 328(4)
+ top 10 contributors:
  Heiko Tietze made 112 changes in 1 month, and 1385 changes in 1 year
  Stéphane Guillou made 95 changes in 1 month, and 552 changes in 1 year
  Justin Luth made 25 changes in 1 month, and 120 changes in 1 year
  Eyal Rozenberg made 23 changes in 1 month, and 250 changes in 1 year
  Ilmari Lauhakangas made 21 changes in 1 month, and 232 changes in 1 
year
  Bogdan B made 17 changes in 1 month, and 116 changes in 1 year
  Amin Irgaliev made 17 changes in 1 month, and 17 changes in 1 year
  Balazs Varga made 16 changes in 1 month, and 16 changes in 1 year
  Kelemen, Gabor made 16 changes in 1 month, and 22 changes in 1 year
  m.a.riosv made 15 changes in 1 month, and 84 changes in 1 year

* Crash Testing (Caolan)
+ 9(+3) import failure, 0(+0) export failures
+ ??? coverity issues
+ Google / ossfuzz: ?? fuzzers active now

* Crash Reporting (Xisco)
+ 7.6.0.2111(+1)
+ 7.6.0.313851(+1051)
+ 7.6.1.26778(+638)
+ 7.6.2.17283(+2935)

* Mentoring (Hossein)
  committer...   1 week 1 month 3 months12 months
  open 104(52) 141(58) 172(30)  198(-1)
   reviews 408(76)1154(168)   3290(-16)   11692(42)
merged 294(50)1048(139)   2981(32)12812(61)
 abandoned  13(-11) 48(6)  161(5)   647(-4)
   own commits 232(55) 766(128)   2082(17) 9707(7)
review commits  48(-16)221(15) 605(-21)3001(-36)
contributor...   1 week 1 month 3 months12 months
  open  69(28)  98(28) 122(19)  139(1)
   reviews 922(218)   2644(420)   7038(140)   30580(38)
merged  20(4)   58(10) 181(3)  2018(-15)
 abandoned   2(-5)  26(-11)212(1)   613(-6)
   own commits  19(-2)  75(1)  209(3)  1100(2)
review commits   0(0)0(0)0(0) 0(0)
+ easyHack statistics:
   needsDevEval 8(8)   needsUXEval 1(1)   cleanup_comments 318(318)
   total 398(398)   assigned 21(21)   open 352(352)
+ top 10 contributors:
  Bogdan B made 5 patches in 1 month, and 100 patches in 1 year
  Sahil Gautam made 5 patches in 1 month, and 14 patches in 1 year
  Omkar Acharekar  made 4 patches in 1 month, and 6 patches in 1 year
  Stéphane Guillou made 4 patches in 1 month, and 37 patches in 1 year
  Ankit Kuma

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

2023-10-25 Thread Mike Kaganski (via logerrit)
 sw/source/filter/html/css1atr.cxx|   17 ++--
 sw/source/filter/html/htmlatr.cxx|   25 ++--
 sw/source/filter/html/htmldrawreader.cxx |   15 ++-
 sw/source/filter/html/htmldrawwriter.cxx |6 --
 sw/source/filter/html/htmlflywriter.cxx  |   64 +++
 sw/source/filter/html/htmlform.cxx   |   44 -
 sw/source/filter/html/htmlforw.cxx   |   14 --
 sw/source/filter/html/htmlgrin.cxx   |   15 +++
 sw/source/filter/html/htmlnumreader.cxx  |4 -
 sw/source/filter/html/htmlplug.cxx   |   19 ++---
 sw/source/filter/html/htmlsect.cxx   |   12 +
 sw/source/filter/html/htmltab.cxx|   14 +-
 sw/source/filter/html/htmltabw.cxx   |   60 ++---
 sw/source/filter/html/svxcss1.cxx|   11 -
 sw/source/filter/html/swhtml.cxx |   24 +--
 sw/source/filter/html/wrthtml.cxx|6 --
 sw/source/filter/html/wrthtml.hxx|5 +-
 17 files changed, 90 insertions(+), 265 deletions(-)

New commits:
commit e36ccfcdf0488ea2219af7e721af4963244f3d8f
Author: Mike Kaganski 
AuthorDate: Sat Aug 5 06:59:26 2023 +0300
Commit: Xisco Fauli 
CommitDate: Wed Oct 25 15:25:03 2023 +0200

Define px as 1/96 in in HTML filter

Ref: https://www.w3.org/TR/css3-values/#absolute-lengths

Change-Id: Idf1def9497b35f67ef1554220d1abbe640840f22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155366
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158419

diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index 3af5f38498e4..a922be479841 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -466,10 +466,9 @@ void SwHTMLWriter::OutCSS1_UnitProperty( std::string_view 
pProp, tools::Long nVa
 OutCSS1_PropertyAscii(pProp, sOut);
 }
 
-void SwHTMLWriter::OutCSS1_PixelProperty( std::string_view pProp, tools::Long 
nVal,
-  bool bVert )
+void SwHTMLWriter::OutCSS1_PixelProperty( std::string_view pProp, tools::Long 
nTwips )
 {
-OString sOut(OString::number(ToPixel(nVal,bVert)) + sCSS1_UNIT_px);
+OString sOut(OString::number(ToPixel(nTwips)) + sCSS1_UNIT_px);
 OutCSS1_PropertyAscii(pProp, sOut);
 }
 
@@ -1965,16 +1964,14 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const 
SwFrameFormat& rFrameFormat
 if( nFrameOpts & HtmlFrmOpts::SWidth )
 {
 if( nFrameOpts & HtmlFrmOpts::SPixSize )
-OutCSS1_PixelProperty( sCSS1_P_width, aTwipSz.Width(),
-   false );
+OutCSS1_PixelProperty( sCSS1_P_width, aTwipSz.Width() 
);
 else
 OutCSS1_UnitProperty( sCSS1_P_width, aTwipSz.Width() );
 }
 if( nFrameOpts & HtmlFrmOpts::SHeight )
 {
 if( nFrameOpts & HtmlFrmOpts::SPixSize )
-OutCSS1_PixelProperty( sCSS1_P_height, 
aTwipSz.Height(),
-   true );
+OutCSS1_PixelProperty( sCSS1_P_height, 
aTwipSz.Height() );
 else
 OutCSS1_UnitProperty( sCSS1_P_height, aTwipSz.Height() 
);
 }
@@ -2780,7 +2777,7 @@ static SwHTMLWriter& OutCSS1_SwFormatFrameSize( 
SwHTMLWriter& rWrt, const SfxPoo
 else if( nMode & Css1FrameSize::Pixel )
 {
 rWrt.OutCSS1_PixelProperty( sCSS1_P_width,
-rFSItem.GetSize().Width(), false );
+rFSItem.GetSize().Width() );
 }
 else
 {
@@ -3235,9 +3232,7 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rWrt,
 sal_Int32 nWidth = pLine->GetWidth();
 
 OStringBuffer sOut;
-if( Application::GetDefaultDevice() &&
-nWidth <= Application::GetDefaultDevice()->PixelToLogic(
-Size( 1, 1 ), MapMode( MapUnit::MapTwip) ).Width() )
+if( nWidth <= o3tl::convert(1, o3tl::Length::px, o3tl::Length::twip) )
 {
 // If the width is smaller than one pixel, then export as 1px
 // so that Netscape and IE show the line.
diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 62460cc2be90..13db3a1ceac6 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2074,7 +2074,7 @@ SwHTMLWriter& OutHTML_SwTextNode( SwHTMLWriter& rWrt, 
const SwContentNode& rNode
 nPageWidth = 
pBox->GetFrameFormat()->GetFrameSize().GetWidth();
 }
 
-OString sWidth = 
OString::number(SwHTMLWriter::ToPixel(nPageWidth - nLeft - nRight, false));
+  

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

2023-10-25 Thread Mike Kaganski (via logerrit)
 sw/source/core/text/porfld.cxx |2 --
 sw/source/core/text/porfld.hxx |1 -
 sw/source/core/text/txtfld.cxx |   10 --
 3 files changed, 13 deletions(-)

New commits:
commit 3a87f9b67f3274fe4a02b003c49f893c87291c3d
Author: Mike Kaganski 
AuthorDate: Wed Oct 25 11:51:13 2023 +0200
Commit: Mike Kaganski 
CommitDate: Wed Oct 25 14:28:47 2023 +0200

Drop unused SwFieldPortion::m_nAttrFieldType

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

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index e07747ff8a22..66f39644ffed 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -81,7 +81,6 @@ SwFieldPortion::SwFieldPortion(OUString aExpand, 
std::unique_ptr pFont,
 , m_bAnimated( false), m_bNoPaint( false)
 , m_bReplace( false), m_bPlaceHolder( bPlaceHold )
 , m_bNoLength( false )
-, m_nAttrFieldType(0)
 {
 SetWhichPor( PortionType::Field );
 }
@@ -103,7 +102,6 @@ SwFieldPortion::SwFieldPortion( const SwFieldPortion& 
rField )
 , m_bReplace( rField.m_bReplace )
 , m_bPlaceHolder( rField.m_bPlaceHolder )
 , m_bNoLength( rField.m_bNoLength )
-, m_nAttrFieldType( rField.m_nAttrFieldType)
 {
 if ( rField.HasFont() )
 m_pFont.reset( new SwFont( *rField.GetFont() ) );
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 39a08a5db665..e1c18fc9bd18 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -63,7 +63,6 @@ public:
 SwFieldPortion(OUString aExpand, std::unique_ptr pFnt = nullptr, 
bool bPlaceHolder = false, TextFrameIndex nLen = TextFrameIndex(1));
 virtual ~SwFieldPortion() override;
 
-sal_uInt16 m_nAttrFieldType;
 void TakeNextOffset( const SwFieldPortion* pField );
 void CheckScript( const SwTextSizeInfo &rInf );
 bool HasFont() const { return nullptr != m_pFont; }
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index a728c36aec8b..462c9085036b 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -142,7 +142,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
 : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
 pRet = new SwFieldPortion( aStr );
 }
-static_cast(pRet)->m_nAttrFieldType= 
ATTR_PAGECOUNTFLD;
 break;
 
 case SwFieldIds::PageNumber:
@@ -170,7 +169,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
 : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
 pRet = new SwFieldPortion( aStr );
 }
-static_cast(pRet)->m_nAttrFieldType= 
ATTR_PAGENUMBERFLD;
 break;
 }
 case SwFieldIds::GetExp:
@@ -250,10 +248,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
 : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
 pRet = new SwFieldPortion(str);
 }
-if( subType == REF_BOOKMARK  )
-static_cast(pRet)->m_nAttrFieldType = 
ATTR_BOOKMARKFLD;
-else if( subType == REF_SETREFATTR )
-static_cast(pRet)->m_nAttrFieldType = 
ATTR_SETREFATTRFLD;
 }
 break;
 case SwFieldIds::DateTime:
@@ -264,10 +258,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
 : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
 pRet = new SwFieldPortion(str);
 }
-if( subType & DATEFLD  )
-static_cast(pRet)->m_nAttrFieldType= 
ATTR_DATEFLD;
-else if( subType & TIMEFLD )
-static_cast(pRet)->m_nAttrFieldType = 
ATTR_TIMEFLD;
 break;
 default:
 {


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

2023-10-25 Thread Michael Stahl (via logerrit)
 sw/source/core/text/itrpaint.cxx   |9 +++--
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |9 ++---
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5dfae9e00f245da78613224ed8e0dbd8b6633192
Author: Michael Stahl 
AuthorDate: Wed Oct 25 12:03:53 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 25 13:37:10 2023 +0200

tdf#157703 sw: PDF/UA export: export heading labels as text

Been advised that a Lbl element is not much use in practice.

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

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 31bd418e94e2..4f0d412f2597 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -412,6 +412,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
 if ((pPor->InNumberGrp() // also footnote label
 // weird special case, bullet with soft hyphen
  || (pPor->InHyphGrp() && pNext && pNext->InNumberGrp()))
+&& 
!GetInfo().GetTextFrame()->GetTextNodeForParaProps()->IsOutline()
 && !roTaggedLabel) // note: CalcPaintOfst may skip some portions
 {
 assert(isPDFTaggingEnabled);
@@ -435,14 +436,18 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
 // note: numbering portion may be split if it has multiple scripts
 && !static_cast(pPor)->HasFollow()) // so 
wait for the last one
 {
-assert(roTaggedLabel);
-roTaggedLabel.reset(); // close Lbl
 if 
(!GetInfo().GetTextFrame()->GetTextNodeForParaProps()->IsOutline())
 {
+assert(roTaggedLabel);
+roTaggedLabel.reset(); // close Lbl
 assert(!roTaggedParagraph);
 Frame_Info aFrameInfo(*m_pFrame, false); // open LBody
 roTaggedParagraph.emplace(nullptr, &aFrameInfo, nullptr, 
*pOut);
 }
+else
+{
+assert(!roTaggedLabel);
+}
 }
 
 // reset underline font
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 70da866889aa..10881186be42 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3954,13 +3954,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157703)
 CPPUNIT_ASSERT(pKidsD0);
 auto pKidsD0v = pKidsD0->GetElements();
 auto pRefKidD00 = 
dynamic_cast(pKidsD0v[0]);
-CPPUNIT_ASSERT(pRefKidD00);
-auto pObjectD00 = pRefKidD00->LookupObject();
-CPPUNIT_ASSERT(pObjectD00);
-auto pTypeD00 = 
dynamic_cast(pObjectD00->Lookup("Type"));
-CPPUNIT_ASSERT_EQUAL(OString("StructElem"), pTypeD00->GetValue());
-auto pSD00 = 
dynamic_cast(pObjectD00->Lookup("S"));
-CPPUNIT_ASSERT_EQUAL(OString("Lbl"), pSD00->GetValue());
+// MCID for label
+CPPUNIT_ASSERT(!pRefKidD00);
 
 // MCID for text
 auto pRefKidD01 = 
dynamic_cast(pKidsD0v[1]);


[Libreoffice-commits] core.git: helpcontent2

2023-10-25 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04a208bf5eb112b0f018f1d9f7e07784c14f584b
Author: Seth Chaiklin 
AuthorDate: Wed Oct 25 13:33:19 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Oct 25 13:33:19 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 3c0331071035ec78359ec8a4e5919164a31ec879
  - remove xml-lang

Change-Id: Ib512a2d5d587da2bb8e459ab90eb5a42d2424be8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158434
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/helpcontent2 b/helpcontent2
index 2250a507ab35..3c0331071035 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2250a507ab35df482392e9f1fe297bb57f300af9
+Subproject commit 3c0331071035ec78359ec8a4e5919164a31ec879


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

2023-10-25 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/04120211.xhp |   50 ++--
 1 file changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 3c0331071035ec78359ec8a4e5919164a31ec879
Author: Seth Chaiklin 
AuthorDate: Wed Oct 25 13:16:28 2023 +0200
Commit: Seth Chaiklin 
CommitDate: Wed Oct 25 13:33:19 2023 +0200

remove xml-lang

Change-Id: Ib512a2d5d587da2bb8e459ab90eb5a42d2424be8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/158434
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/source/text/swriter/01/04120211.xhp 
b/source/text/swriter/01/04120211.xhp
index 6a79c3760c..e8dfb74082 100644
--- a/source/text/swriter/01/04120211.xhp
+++ b/source/text/swriter/01/04120211.xhp
@@ -20,62 +20,62 @@
 
 
   
- Index (table of contents)
+ Index (table of contents)
  /text/swriter/01/04120211.xhp
   


-
-
+
+
 Index (table of 
contents)
-  The following options are available 
when you select Table of Contents as the index type.
+  The following options are available when you select 
Table of Contents as the index type.
 
   
  
   
   
  Type and Title
- Specify the type and title of the index.
-
+ Specify the type and 
title of the index.
+
 Title
- Enter a 
title for the selected index.
-
+ Enter a title for the selected 
index.
+
 Type
- Select the 
type of index that you want to insert or edit. The options available on 
this tab depend on the index type that you select. If the cursor is in an index 
when you choose the Insert - Table of Contents and Index - Table of 
Contents, Index or Bibliography, you can then edit that 
index.
-
+ Select the type of index that you 
want to insert or edit. The options available on this tab depend on the 
index type that you select. If the cursor is in an index when you choose the 
Insert - Table of Contents and Index - Table of Contents, Index or 
Bibliography, you can then edit that index.
+
 Protected against manual changes
- Prevents 
the contents of the index from being changed. Manual changes that you 
make to an index are lost when the index is refreshed. If you want the cursor 
to scroll through a protected area, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Formatting Aids, and then select the Enable cursor check 
box in the Protected Areas section.
+ Prevents the contents of the 
index from being changed. Manual changes that you make to an index are 
lost when the index is refreshed. If you want the cursor to scroll through a 
protected area, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Formatting Aids, and then select the Enable cursor check 
box in the Protected Areas section.
   
   
-
+
 Create Index or Table of Contents
 For
-Select whether to create the index 
for the document or for the current chapter.
+Select whether to create the index 
for the document or for the current chapter.
   
-
+
 Evaluate up to level
-  Enter the number of outline levels 
to include in the index.
+  Enter the number of outline levels 
to include in the index.
   Create from
-  Use this 
area to specify which information to include in an index.
-
+  Use this area to specify 
which information to include in an index.
+
 Outline
-  Creates the index using 
outline levels. Any paragraph with an outline level less than or equal to the 
outline level specified in Evaluate up to level is 
included in the index.
-   Paragraphs formatted with one of the predefined paragraph 
styles (“Heading 1–10”) have an outline level that corresponds to the number in 
the paragraph style. You can also assign outline levels to paragraphs in the 
Outline & List tab page of 
the Format - Paragraph dialog.
+  Creates the index using 
outline levels. Any paragraph with an outline level less than or equal to the 
outline level specified in Evaluate up to level is 
included in the index.
+   Paragraphs 
formatted with one of the predefined paragraph styles (“Heading 1–10”) have an 
outline level that corresponds to the number in the paragraph style. You can 
also assign outline levels to paragraphs in the Outline & List tab page of the 
Format - Paragraph dialog.
   
-
+
 Additional Styles
-  Includes the paragraph styles 
that you specify in the Assign Styles dialog as index entries. To 
select the paragraph styles that you want to include in the index, click the 
Assign Styles (...) button to the right of this box.
+  Includes 
the paragraph styles that you specify in the Assign Styles dialog 
as index entries. To select the paragraph styles that you want to include in 
the index, click the Assign Styles (...) button to the right of 
this box.
 
 Use “Additional Styles” to 
include paragraphs in the Table of Contents with the “Figure Index Heading” or 
“Bibliography Heading”

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

2023-10-25 Thread Mike Kaganski (via logerrit)
 sw/source/core/text/txtfld.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 09e04efc7c33407271819c1fe7d4d500ca8fff2a
Author: Mike Kaganski 
AuthorDate: Wed Oct 25 11:47:56 2023 +0200
Commit: Mike Kaganski 
CommitDate: Wed Oct 25 13:30:47 2023 +0200

Simplify a bit

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

diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index a912e169995b..a728c36aec8b 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -64,14 +64,10 @@ static bool lcl_IsInBody( SwFrame const *pFrame )
 {
 if ( pFrame->IsInDocBody() )
 return true;
-else
-{
-const SwFrame *pTmp = pFrame;
-const SwFlyFrame *pFly;
-while ( nullptr != (pFly = pTmp->FindFlyFrame()) )
-pTmp = pFly->GetAnchorFrame();
-return pTmp->IsInDocBody();
-}
+
+while (const SwFlyFrame* pFly = pFrame->FindFlyFrame())
+pFrame = pFly->GetAnchorFrame();
+return pFrame->IsInDocBody();
 }
 
 SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,


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

2023-10-25 Thread Noel Grandin (via logerrit)
 include/vcl/uitest/uiobject.hxx |6 +-
 sw/qa/uitest/navigator/movechapterupdown.py |   10 
 sw/qa/uitest/navigator/tdf151051.py |   10 
 sw/qa/uitest/navigator/tdf154212.py |   10 
 sw/qa/uitest/writer_tests7/tdf135938.py |   19 
 vcl/source/treelist/uiobject.cxx|   66 +---
 6 files changed, 45 insertions(+), 76 deletions(-)

New commits:
commit dd0190eee2b7415b91932f28cc87f481389e551e
Author: Noel Grandin 
AuthorDate: Tue Oct 24 15:22:49 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 25 12:48:38 2023 +0200

tdf#153519 make TreeListEntryUIObject safer

Do not store a raw pointer to an object that go away.
Consequently we can remove the various sleep() hacks

Change-Id: I3200c26b3a2a4eb7592cb2e5c6af64d6b739d1f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158390
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158415

diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index 293471add9b5..d27140b2c21b 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -492,7 +492,7 @@ class TreeListEntryUIObject final : public UIObject
 {
 public:
 
-TreeListEntryUIObject(const VclPtr& xTreeList, 
SvTreeListEntry* pEntry);
+TreeListEntryUIObject(const VclPtr& xTreeList, 
std::vector nTreePath);
 
 virtual StringMap get_state() override;
 
@@ -507,9 +507,11 @@ public:
 
 private:
 
+SvTreeListEntry* getEntry() const;
+
 VclPtr mxTreeList;
 
-SvTreeListEntry* const mpEntry;
+std::vector maTreePath;
 };
 
 class IconViewUIObject final : public TreeListUIObject
diff --git a/sw/qa/uitest/navigator/movechapterupdown.py 
b/sw/qa/uitest/navigator/movechapterupdown.py
index c9e41a0971cd..6bcda9b3d4bb 100644
--- a/sw/qa/uitest/navigator/movechapterupdown.py
+++ b/sw/qa/uitest/navigator/movechapterupdown.py
@@ -10,7 +10,6 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-import time
 
 class movechapterupdown(UITestCase):
 
@@ -26,15 +25,6 @@ class movechapterupdown(UITestCase):
 # wait until the navigator panel is available
 xNavigatorPanel = 
self.ui_test.wait_until_child_is_available('NavigatorPanel')
 
-# HACK, see the `m_aUpdTimer.SetTimeout(1000)` in the 
SwContentTree ctor in
-# sw/source/uibase/utlui/content.cxx, where that m_aUpdTimer is 
started by
-# SwContentTree::ShowTree triggered from the SIDEBAR action above, 
and which can
-# invalidate the TreeListEntryUIObjects used by the below code (see
-# 2798430c8a711861fdcdfbf9ac00a0527abd3bfc "Mark the uses of 
TreeListEntryUIObject as
-# dubious"); lets double that 1000 ms timeout value here to 
hopefully be on the safe
-# side:
-time.sleep(2)
-
 # Given the document chapter structure:
 # 1. One H1
 #   1.1. one_A (H2)
diff --git a/sw/qa/uitest/navigator/tdf151051.py 
b/sw/qa/uitest/navigator/tdf151051.py
index d0fb4ef0e708..1778cc94fe68 100644
--- a/sw/qa/uitest/navigator/tdf151051.py
+++ b/sw/qa/uitest/navigator/tdf151051.py
@@ -10,7 +10,6 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-import time
 
 class tdf151051(UITestCase):
 
@@ -26,15 +25,6 @@ class tdf151051(UITestCase):
 # wait until the navigator panel is available
 xNavigatorPanel = 
self.ui_test.wait_until_child_is_available('NavigatorPanel')
 
-# HACK, see the `m_aUpdTimer.SetTimeout(1000)` in the 
SwContentTree ctor in
-# sw/source/uibase/utlui/content.cxx, where that m_aUpdTimer is 
started by
-# SwContentTree::ShowTree triggered from the SIDEBAR action above, 
and which can
-# invalidate the TreeListEntryUIObjects used by the below code (see
-# 2798430c8a711861fdcdfbf9ac00a0527abd3bfc "Mark the uses of 
TreeListEntryUIObject as
-# dubious"); lets double that 1000 ms timeout value here to 
hopefully be on the safe
-# side:
-time.sleep(2)
-
 xContentTree = xNavigatorPanel.getChild("contenttree")
 
 xHeadings = xContentTree.getChild('0')
diff --git a/sw/qa/uitest/navigator/tdf154212.py 
b/sw/qa/uitest/navigator/tdf154212.py
index e7222b3d9097..2637780e2f4e 100644
--- a/sw/qa/uitest/navigator/tdf154212.py
+++ b/sw/qa/uitest/navigator/tdf154212.py
@@ -10,7 +10,6 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict, get_url_for

[Libreoffice-commits] core.git: setup_native/Library_inst_msu_msi.mk setup_native/Library_instooofiltmsi.mk setup_native/Library_qslnkmsi.mk setup_native/Library_reg4allmsdoc.mk setup_native/Library_r

2023-10-25 Thread Noel Grandin (via logerrit)
 setup_native/Library_inst_msu_msi.mk   |1 +
 setup_native/Library_instooofiltmsi.mk |1 +
 setup_native/Library_qslnkmsi.mk   |1 +
 setup_native/Library_reg4allmsdoc.mk   |1 +
 setup_native/Library_reg_dlls.mk   |1 +
 setup_native/Library_regactivex.mk |1 +
 setup_native/Library_sdqsmsi.mk|1 +
 setup_native/Library_sellangmsi.mk |1 +
 setup_native/Library_shlxtmsi.mk   |1 +
 setup_native/Library_sn_tools.mk   |1 +
 setup_native/StaticLibrary_quickstarter.mk |1 +
 setup_native/StaticLibrary_seterror.mk |1 +
 12 files changed, 12 insertions(+)

New commits:
commit 505c5821d6d4849cb793584a7775ded24c791590
Author: Noel Grandin 
AuthorDate: Wed Oct 25 10:29:44 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 25 12:48:28 2023 +0200

small steps to getting ASAN on Windows working

Change-Id: Ie8941a7cc87cb5c5dba62e9356e960e45f5560d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158416
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/setup_native/Library_inst_msu_msi.mk 
b/setup_native/Library_inst_msu_msi.mk
index d423b5168697..1a6646f2fa30 100644
--- a/setup_native/Library_inst_msu_msi.mk
+++ b/setup_native/Library_inst_msu_msi.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,inst_msu_msi,\
 
 $(eval $(call gb_Library_add_cxxflags,inst_msu_msi,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,inst_msu_msi,\
diff --git a/setup_native/Library_instooofiltmsi.mk 
b/setup_native/Library_instooofiltmsi.mk
index 36e2e2a6b81c..785fda3f35e6 100644
--- a/setup_native/Library_instooofiltmsi.mk
+++ b/setup_native/Library_instooofiltmsi.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,instooofiltmsi,\
 
 $(eval $(call gb_Library_add_cxxflags,instooofiltmsi,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,instooofiltmsi,\
diff --git a/setup_native/Library_qslnkmsi.mk b/setup_native/Library_qslnkmsi.mk
index f958534f07b1..f2246a1b6395 100644
--- a/setup_native/Library_qslnkmsi.mk
+++ b/setup_native/Library_qslnkmsi.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,qslnkmsi,\
 
 $(eval $(call gb_Library_add_cxxflags,qslnkmsi,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,qslnkmsi,\
diff --git a/setup_native/Library_reg4allmsdoc.mk 
b/setup_native/Library_reg4allmsdoc.mk
index 816ebbb3f06a..0e67147dfe49 100644
--- a/setup_native/Library_reg4allmsdoc.mk
+++ b/setup_native/Library_reg4allmsdoc.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,reg4allmsdoc,\
 
 $(eval $(call gb_Library_add_cxxflags,reg4allmsdoc,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,reg4allmsdoc,\
diff --git a/setup_native/Library_reg_dlls.mk b/setup_native/Library_reg_dlls.mk
index f0ac9a875c60..d4decdcce2a4 100644
--- a/setup_native/Library_reg_dlls.mk
+++ b/setup_native/Library_reg_dlls.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,reg_dlls,\
 
 $(eval $(call gb_Library_add_cxxflags,reg_dlls,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,reg_dlls,\
diff --git a/setup_native/Library_regactivex.mk 
b/setup_native/Library_regactivex.mk
index 7142b8ee0a7d..0789da0dbd03 100644
--- a/setup_native/Library_regactivex.mk
+++ b/setup_native/Library_regactivex.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,regactivex,\
 
 $(eval $(call gb_Library_add_cxxflags,regactivex,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,regactivex,\
diff --git a/setup_native/Library_sdqsmsi.mk b/setup_native/Library_sdqsmsi.mk
index ff9a1bd586a7..bc769c65b85c 100644
--- a/setup_native/Library_sdqsmsi.mk
+++ b/setup_native/Library_sdqsmsi.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,sdqsmsi,\
 
 $(eval $(call gb_Library_add_cxxflags,sdqsmsi,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
+$(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \
 ))
 
 $(eval $(call gb_Library_add_ldflags,sdqsmsi,\
diff --git a/setup_native/Library_sellangmsi.mk 
b/setup_native/Library_sellangmsi.mk
index 04f8f6edbc46..962ebf7639c0 100644
--- a/setup_native/Library_sellangmsi.mk
+++ b/setup_native/Library_sellangmsi.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_add_defs,sellangmsi,\
 
 $(eval $(call gb_Library_add_cxxflags

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

2023-10-25 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/PNGExportTests.cxx |   49 ++
 sd/qa/unit/data/odp/tdf157795.odp |binary
 2 files changed, 49 insertions(+)

New commits:
commit 33f158d96c5782a862345736bc6561afe3d583b5
Author: Xisco Fauli 
AuthorDate: Wed Oct 25 10:33:01 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Oct 25 12:28:08 2023 +0200

tdf#157795: sd_png_export: Add unittest

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

diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index af48ecbdd713..513d7a1e8cf9 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -301,6 +301,55 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf156808)
 CPPUNIT_ASSERT_GREATER(9000, nBlackCount);
 }
 
+CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157795)
+{
+loadFromURL(u"odp/tdf157795.odp");
+uno::Reference xContext = getComponentContext();
+CPPUNIT_ASSERT(xContext.is());
+uno::Reference xGraphicExporter
+= drawing::GraphicExportFilter::create(xContext);
+
+uno::Sequence aFilterData{
+comphelper::makePropertyValue("PixelWidth", sal_Int32(100)),
+comphelper::makePropertyValue("PixelHeight", sal_Int32(100)),
+comphelper::makePropertyValue("Translucent", sal_Int32(1)),
+};
+
+uno::Sequence aDescriptor{
+comphelper::makePropertyValue("URL", maTempFile.GetURL()),
+comphelper::makePropertyValue("FilterName", OUString("PNG")),
+comphelper::makePropertyValue("FilterData", aFilterData)
+};
+
+uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+   uno::UNO_QUERY);
+xGraphicExporter->setSourceDocument(xPage);
+xGraphicExporter->filter(aDescriptor);
+
+SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ);
+vcl::PngImageReader aPNGReader(aFileStream);
+BitmapEx aBMPEx = aPNGReader.read();
+
+// make sure the bitmap is not empty and correct size (PNG export->import 
was successful)
+Size aSize = aBMPEx.GetSizePixel();
+CPPUNIT_ASSERT_EQUAL(Size(100, 100), aSize);
+Bitmap aBMP = aBMPEx.GetBitmap();
+Bitmap::ScopedReadAccess pReadAccess(aBMP);
+for (tools::Long nX = 1; nX < aSize.Width() - 1; ++nX)
+{
+for (tools::Long nY = 1; nY < aSize.Height() - 1; ++nY)
+{
+const Color aColor = pReadAccess->GetColor(nY, nX);
+
+// Without the fix in place, this test would have failed with
+// - Expected: rgba[00ff]
+// - Actual  : rgba[010101ff]
+CPPUNIT_ASSERT_EQUAL(COL_BLACK, aColor);
+}
+}
+}
+
 CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105362)
 {
 loadFromURL(u"odp/tdf105362.odp");
diff --git a/sd/qa/unit/data/odp/tdf157795.odp 
b/sd/qa/unit/data/odp/tdf157795.odp
new file mode 100644
index ..abfe29bb7940
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf157795.odp differ


[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/qa sw/sdi sw/source sw/uiconfig

2023-10-25 Thread Xisco Fauli (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |   20 
+
 sw/inc/cmdid.h  |   20 
+++--
 sw/qa/uibase/shells/shells.cxx  |8 --
 sw/sdi/_textsh.sdi  |   14 
 sw/sdi/swriter.sdi  |   34 
++
 sw/source/uibase/shells/textfld.cxx |4 +
 sw/uiconfig/sglobal/popupmenu/insertfield.xml   |2 
 sw/uiconfig/sweb/popupmenu/insertfield.xml  |2 
 sw/uiconfig/swform/popupmenu/insertfield.xml|2 
 sw/uiconfig/swreport/popupmenu/insertfield.xml  |2 
 sw/uiconfig/swriter/popupmenu/insertfield.xml   |2 
 sw/uiconfig/swxform/popupmenu/insertfield.xml   |2 
 12 files changed, 96 insertions(+), 16 deletions(-)

New commits:
commit 6c073a180b6af61963fcce0da63ba66b97357ccb
Author: Xisco Fauli 
AuthorDate: Tue Oct 24 15:25:13 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Oct 25 12:25:53 2023 +0200

tdf#139141: Add UNO commands for variable date/time fields

Impress already has both options in the menu
Also re-enable test disable with fa569930a0968cdeba4441e19a68e7d78aa25cb4
"Revert "Resolves tdf#139141 - Make variable date/time field the
default""

Change-Id: I1cec89b5901073555ffa31d2be24e1e62fbbdcb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158391
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 44a98e183ccc..dc4d4dbdb399 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -1076,7 +1076,15 @@
   
   
 
-  ~Date
+  ~Date (fix)
+
+
+  1
+
+  
+  
+
+  ~Date (variable)
 
 
   1
@@ -1092,7 +1100,15 @@
   
   
 
-  ~Time
+  ~Time (fix)
+
+
+  1
+
+  
+  
+
+  ~Time (variable)
 
 
   1
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 08f239b3d8d0..74ab5cf8c554 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -267,18 +267,20 @@ class SwUINumRuleItem;
 #define FN_MAILMERGE_PRINT_DOCUMENTS (FN_INSERT + 79) /* mail merge toolbar - 
print merged documents */
 #define FN_MAILMERGE_EMAIL_DOCUMENTS (FN_INSERT + 80) /* mail merge toolbar - 
email merged documents */
 
-#define FN_TOOL_ANCHOR_CHAR (FN_INSERT + 84)/* anchor Draw object to 
character */
+#define FN_TOOL_ANCHOR_CHAR (FN_INSERT + 82)/* anchor Draw object to 
character */
 
-#define FN_QRY_INSERT   (FN_INSERT + 86)/* insert record selection 
in to text */
-#define FN_QRY_MERGE_FIELD  (FN_INSERT + 87)/* insert record selection 
into fields */
-#define FN_QRY_INSERT_FIELD (FN_INSERT + 88)/* insert database field */
+#define FN_QRY_INSERT   (FN_INSERT + 83)/* insert record selection 
in to text */
+#define FN_QRY_MERGE_FIELD  (FN_INSERT + 84)/* insert record selection 
into fields */
+#define FN_QRY_INSERT_FIELD (FN_INSERT + 86)/* insert database field */
 
-#define FN_INSERT_CTRL  (FN_INSERT + 89)/* toolbar controller 
insert*/
-#define FN_INSERT_OBJ_CTRL  (FN_INSERT + 90)/* toolbar controller 
(insert/object) */
-#define FN_INSERT_FIELD_CTRL(FN_INSERT + 91)/* toolbar controller 
insert/field commands */
+#define FN_INSERT_CTRL  (FN_INSERT + 87)/* toolbar controller 
insert*/
+#define FN_INSERT_OBJ_CTRL  (FN_INSERT + 88)/* toolbar controller 
(insert/object) */
+#define FN_INSERT_FIELD_CTRL(FN_INSERT + 89)/* toolbar controller 
insert/field commands */
 
-#define FN_INSERT_FLD_DATE  (FN_INSERT + 92)
-#define FN_INSERT_FLD_TIME  (FN_INSERT + 93)
+#define FN_INSERT_FLD_DATE  (FN_INSERT + 90)
+#define FN_INSERT_FLD_DATE_VAR  (FN_INSERT + 91)
+#define FN_INSERT_FLD_TIME  (FN_INSERT + 92)
+#define FN_INSERT_FLD_TIME_VAR  (FN_INSERT + 93)
 #define FN_INSERT_FLD_PGNUMBER  (FN_INSERT + 94)
 #define FN_INSERT_FLD_PGCOUNT   (FN_INSERT + 95)
 #define FN_INSERT_FLD_TOPIC (FN_INSERT + 96)
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index 88f90e909698..8551ef685e1f 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -1049,9 +1049,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testInsertTextFormFieldEndnote)
 // Then this was empty: the fieldmark was inserted before the note anchor, 
not in the note body.
 CPPUNIT_ASSERT_EQUAL(OUStrin

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

2023-10-25 Thread Skyler Grey (via logerrit)
 sw/inc/reffld.hxx|1 
 sw/source/core/doc/DocumentFieldsManager.cxx |5 
 sw/source/core/fields/reffld.cxx |   29 ++-
 3 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 8c8682ddd62d7144ded88acde99aa7b0b0e1978b
Author: Skyler Grey 
AuthorDate: Mon Oct 23 16:17:17 2023 +
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 12:23:24 2023 +0200

Fix incorrect marginal STYLEREF content in docx

STYLEREF fields were previously not importing with the correct content
when loading a docx document. This is because they were not updating
when the document had finished loading- only partway through, and where
a STYLEREF field is in relation to everything else in the document can
change its content.

This commit fixes that issue by adding STYLEREF fields to be refreshed
whenever other fields that can change based on pages (e.g. page number)
fields are updated. I suspect this could lead to double updates in some
cases where both reference and page fields are being updated. I consider
this a relatively minor issue in comparison to incorrect field content
when specific documents are loaded, but a followup could be made
improving this.

This commit also fixes a minor typo in reffld.cxx where m_sText is
always the filtered text when updating fields, even if we are updating
m_sTextRLHidden instead.

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

diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 293b913c406b..3c1e3c63b5e6 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -100,6 +100,7 @@ public:
 SwRootFrame const* pLayout = nullptr,
 SwTextNode* pSelf = nullptr, SwFrame* 
pFrame = nullptr);
 void UpdateGetReferences();
+void UpdateStyleReferences();
 };
 
 class SW_DLLPUBLIC SwGetRefField final : public SwField
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index fc604900a139..204803ffb870 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -1351,6 +1351,11 @@ void DocumentFieldsManager::UpdatePageFields( 
SfxPoolItem* pMsgHint )
 case SwFieldIds::DocStat:
 pFieldType->CallSwClientNotify(sw::LegacyModifyHint(nullptr, 
nullptr));
 break;
+case SwFieldIds::GetRef:
+
static_cast(pFieldType)->UpdateStyleReferences();
+// Style references can vary across different pages (e.g. in 
header/footer)
+// so they must be updated when page fields are
+break;
 default: break;
 }
 }
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 2720550795ff..552bded828d4 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -707,7 +707,7 @@ void SwGetRefField::UpdateField(const SwTextField* 
pFieldTextAttr, SwFrame* pFra
 rText = pTextNd->GetExpandText(pLayout, nStart, nEnd - 
nStart, false, false,
false, ExpandMode(0));
 }
-FilterText(m_sText, GetLanguage(), m_sSetReferenceLanguage);
+FilterText(rText, GetLanguage(), m_sSetReferenceLanguage);
 }
 }
 break;
@@ -1168,6 +1168,33 @@ void SwGetRefFieldType::UpdateGetReferences()
 CallSwClientNotify(sw::LegacyModifyHint(nullptr, nullptr));
 }
 
+void SwGetRefFieldType::UpdateStyleReferences()
+{
+std::vector vFields;
+GatherFields(vFields, false);
+bool bModified = false;
+for(auto pFormatField: vFields)
+{
+// update only the GetRef fields which are also STYLEREF fields
+SwGetRefField* pGRef = 
static_cast(pFormatField->GetField());
+
+if (pGRef->GetSubType() != REF_STYLE) continue;
+
+const SwTextField* pTField;
+if(!pGRef->GetLanguage() &&
+nullptr != (pTField = pFormatField->GetTextField()) &&
+pTField->GetpTextNode())
+{
+
pGRef->SetLanguage(pTField->GetpTextNode()->GetLang(pTField->GetStart()));
+}
+
+pGRef->UpdateField(pFormatField->GetTextField(), nullptr);
+bModified = true;
+}
+if (bModified)
+CallSwClientNotify(sw::LegacyModifyHint(nullptr, nullptr));
+}
+
 void SwGetRefFieldType::SwClientNotify(const SwModify&, const SfxHint& rHint)
 {
 if (rHint.GetId() != SfxHintId::SwLegacyModify)


[Libreoffice-commits] core.git: bin/list-dispatch-commands.py

2023-10-25 Thread Xisco Fauli (via logerrit)
 bin/list-dispatch-commands.py |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 5a8011372f4c8e849fa1e56246d793dcadffe3af
Author: Xisco Fauli 
AuthorDate: Tue Oct 24 13:34:41 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Oct 25 12:02:33 2023 +0200

list-dispatch-commands: do not ignore aliases

For instance, .uno:ViewTrackChanges should also be listed

Change-Id: Ifdaaa91b053a28d5ba9a6926d81194d92c6ca65f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158386
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/bin/list-dispatch-commands.py b/bin/list-dispatch-commands.py
index c5860c193bc4..50599e59dcdf 100755
--- a/bin/list-dispatch-commands.py
+++ b/bin/list-dispatch-commands.py
@@ -127,7 +127,6 @@ def analyze_xcu(all_commands):
 cmdln = ln
 tmp = line.split('"')
 command_name = tmp[1]
-command_ok = True
 
 while '' not in line:
 try:
@@ -145,10 +144,8 @@ def analyze_xcu(all_commands):
 label = 'tooltiplabel'
 elif '' in line:
 labeltext = line.replace('', 
'').replace('', '').strip()
-elif '

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - .vscode/vs-code-template.code-workspace.in

2023-10-25 Thread Christian Lohmaier (via logerrit)
 .vscode/vs-code-template.code-workspace.in |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1173c80a053d24f2681722030b0447e4d1058958
Author: Christian Lohmaier 
AuthorDate: Mon Oct 23 15:36:13 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Oct 25 11:59:49 2023 +0200

vscode-ide-integration: editor.renderFinalNewline is not boolean

…but tri-state (on/off/dimmed). Also fix missing comma in the debugger
config.

Change-Id: Iee4de01ccb5c0bb714b78a4fbbcb865b5e8d5b0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158358
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit c853679a9f5965ade68280db13597e2f5d3388eb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158284
Reviewed-by: Xisco Fauli 

diff --git a/.vscode/vs-code-template.code-workspace.in 
b/.vscode/vs-code-template.code-workspace.in
index 52f83afc15cc..28198ba70104 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -53,7 +53,7 @@
],
// files in the repo should in general have a newline at 
end-of-file
"files.insertFinalNewline": true,
-   "editor.renderFinalNewline": false,
+   "editor.renderFinalNewline": "off",
"gitlens.autolinks": [
{
"prefix": "tdf#",
@@ -152,7 +152,7 @@
"externalConsole": false,
"linux": {
"MIMode": "gdb",
-   "miDebuggerPath": "gdb"
+   "miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable 
pretty-printing for gdb",
@@ -210,7 +210,7 @@
"externalConsole": false,
"linux": {
"MIMode": "gdb",
-   "miDebuggerPath": "gdb"
+   "miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable 
pretty-printing for gdb",


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

2023-10-25 Thread Michael Stahl (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   45 ++---
 vcl/source/gdi/pdfwriter_impl.cxx  |   35 ++---
 2 files changed, 28 insertions(+), 52 deletions(-)

New commits:
commit 35b5672e52676a92c3888c9066a754e4eebffe45
Author: Michael Stahl 
AuthorDate: Tue Oct 24 15:58:14 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 11:43:11 2023 +0200

tdf#157028 vcl: PDF export: inline attribute dictionaries

There seems to be no reason why SE attribute dictionaries are separate
objects, they could just be inline, which saves a little space (1%)
and more importantly the PDF file is easier to read with less clutter.

Change-Id: Iaaea2432313c0b710edabecae32545205f4f495e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158392
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 049f458143cbd02ab915271418625cda1299f4b1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158287
Reviewed-by: Miklos Vajna 

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 85a7bf215454..8b06e41be74d 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3439,11 +3439,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf149140)
 CPPUNIT_ASSERT(pAttrs != nullptr);
 for (const auto& rAttrRef : pAttrs->GetElements())
 {
-auto pARef = 
dynamic_cast(rAttrRef);
-CPPUNIT_ASSERT(pARef != nullptr);
-auto pAttr = pARef->LookupObject();
-CPPUNIT_ASSERT(pAttr != nullptr);
-auto pAttrDict = pAttr->GetDictionary();
+auto pAttrDict = 
dynamic_cast(rAttrRef);
 CPPUNIT_ASSERT(pAttrDict != nullptr);
 auto pOwner
 = 
dynamic_cast(pAttrDict->LookupElement("O"));
@@ -3805,11 +3801,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf135638)
 auto pS = 
dynamic_cast(pObject->Lookup("S"));
 if (pS && pS->GetValue() == "Figure")
 {
-auto pARef = 
dynamic_cast(pObject->Lookup("A"));
-CPPUNIT_ASSERT(pARef != nullptr);
-auto pAttr = pARef->LookupObject();
-CPPUNIT_ASSERT(pAttr != nullptr);
-auto pAttrDict = pAttr->GetDictionary();
+auto pAttrDict
+= 
dynamic_cast(pObject->Lookup("A"));
 CPPUNIT_ASSERT(pAttrDict != nullptr);
 auto pOwner
 = 
dynamic_cast(pAttrDict->LookupElement("O"));
@@ -4279,12 +4272,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testSpans)
 auto pS103101
 = 
dynamic_cast(pObject103101->Lookup("S"));
 CPPUNIT_ASSERT_EQUAL(OString("Span"), pS103101->GetValue());
-auto pA103101
-= 
dynamic_cast(pObject103101->Lookup("A"));
-CPPUNIT_ASSERT(pA103101);
-auto pObjectA103101 = pA103101->LookupObject();
-CPPUNIT_ASSERT(pObjectA103101);
-auto pDictA103101 = pObjectA103101->GetDictionary();
+auto pDictA103101
+= 
dynamic_cast(pObject103101->Lookup("A"));
 CPPUNIT_ASSERT(pDictA103101 != nullptr);
 CPPUNIT_ASSERT_EQUAL(OString("Layout"), 
dynamic_cast(
 
pDictA103101->LookupElement("O"))
@@ -4846,13 +4835,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157397)
 CPPUNIT_ASSERT_EQUAL(OString("StructElem"), pType160->GetValue());
 auto pS160 = 
dynamic_cast(pObject160->Lookup("S"));
 CPPUNIT_ASSERT_EQUAL(OString("Form"), pS160->GetValue());
-auto pA160 = 
dynamic_cast(pObject160->Lookup("A"));
-CPPUNIT_ASSERT(pA160);
-auto pA160Obj = pA160->LookupObject();
-auto pA160O = 
dynamic_cast(pA160Obj->Lookup("O"));
+auto pA160Dict = 
dynamic_cast(pObject160->Lookup("A"));
+CPPUNIT_ASSERT(pA160Dict);
+auto pA160O = 
dynamic_cast(pA160Dict->LookupElement("O"));
 CPPUNIT_ASSERT(pA160O);
 CPPUNIT_ASSERT_EQUAL(OString("PrintField"), pA160O->GetValue());
-auto pA160Role = 
dynamic_cast(pA160Obj->Lookup("Role"));
+auto pA160Role = 
dynamic_cast(pA160Dict->LookupElement("Role"));
 CPPUNIT_ASSERT(pA160Role);
 CPPUNIT_ASSERT_EQUAL(OString("tv"), pA160Role->GetValue());
 
@@ -4971,13 +4959,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf135192)
 for (const auto& 
rAttrRef :
  
pAttrs->GetElements())
 {
-auto pARef = 
dynamic_cast<
- 

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

2023-10-25 Thread Mike Kaganski (via logerrit)
 sw/inc/fldbas.hxx|5 +
 sw/source/core/fields/fldbas.cxx |   10 --
 2 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 6448c83a8740711172b3c59175a2abd15c00114b
Author: Mike Kaganski 
AuthorDate: Wed Oct 25 09:59:51 2023 +0200
Commit: Mike Kaganski 
CommitDate: Wed Oct 25 11:42:13 2023 +0200

DBG_UTIL implementation differs only by never-wrong assert

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

diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 4aa874c3021d..7518c47582f3 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -349,13 +349,10 @@ public:
 
 /// ResId
 SwFieldIds  Which() const
-#ifdef DBG_UTIL
-;   // implemented in fldbas.cxx
-#else
 {
+assert(m_pType);
 return m_pType->Which();
 }
-#endif
 
 // TYP_ID
 SwFieldTypesEnumGetTypeId() const;
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index c528f2a0d65a..b3fab811f1c2 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -257,16 +257,6 @@ SwField::~SwField()
 {
 }
 
-// instead of indirectly via the type
-
-#ifdef DBG_UTIL
-SwFieldIds SwField::Which() const
-{
-assert(m_pType);
-return m_pType->Which();
-}
-#endif
-
 SwFieldTypesEnum SwField::GetTypeId() const
 {
 


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

2023-10-25 Thread Michael Stahl (via logerrit)
 include/vcl/pdfwriter.hxx   |6 +
 sw/inc/EnhancedPDFExportHelper.hxx  |   14 ++-
 sw/source/core/text/EnhancedPDFExportHelper.cxx |  107 +++-
 sw/source/core/text/itrpaint.cxx|4 
 sw/source/core/text/pormulti.cxx|   32 ++-
 vcl/source/gdi/pdfwriter_impl.cxx   |   38 
 6 files changed, 192 insertions(+), 9 deletions(-)

New commits:
commit 949f0d9cf2fe7953691160103139a16473dd3171
Author: Michael Stahl 
AuthorDate: Tue Oct 24 20:05:37 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 25 11:31:01 2023 +0200

vcl,sw: PDF/UA export: produce Ruby and Warichu SEs

These need to generate multiple elements in
SwTextPainter::PaintMultiPortion() and it's not altogether obvious.

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

diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index acc491efdfa9..cd8be2a50581 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -132,6 +132,7 @@ public:
 
 // inline level elements
 Span, Quote, Note, Reference, BibEntry, Code, Link, Annot,
+Ruby, RB, RT, RP, Warichu, WT, WP,
 
 // illustration elements
 Figure, Formula, Form
@@ -146,6 +147,7 @@ public:
 TextIndent, TextAlign, Width, Height, BlockAlign, InlineAlign,
 LineHeight, BaselineShift, TextDecorationType, ListNumbering,
 RowSpan, ColSpan, Scope, Role,
+RubyAlign, RubyPosition,
 
 // link destination is an artificial attribute that sets
 // the link annotation ID of a Link element
@@ -186,6 +188,10 @@ public:
 Row, Column, Both,
 // Role
 Rb, Cb, Pb, Tv,
+// RubyAlign
+RStart, RCenter, REnd, RJustify, RDistribute,
+// RubyPosition
+RBefore, RAfter, RWarichu, RInline,
 // ListNumbering
 Disc, Circle, Square, Decimal, UpperRoman, LowerRoman, UpperAlpha, 
LowerAlpha
 };
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx 
b/sw/inc/EnhancedPDFExportHelper.hxx
index 542138157d2f..be3c45383061 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -113,10 +113,15 @@ struct Por_Info
 {
 const SwLinePortion& mrPor;
 const SwTextPainter& mrTextPainter;
-bool const m_isNumberingLabel;
-
-Por_Info(const SwLinePortion& rPor, const SwTextPainter& rTextPainer, bool 
const isNumberingLabel)
-: mrPor(rPor), mrTextPainter(rTextPainer), 
m_isNumberingLabel(isNumberingLabel) {};
+/** this can be used to generate multiple different SE for the same 
portion:
+  FootnoteNum: 0-> Link 1-> Lbl
+  Double: 0-> Warichu 1-> WP 2-> WT
+  Ruby: 0-> Ruby 1-> RT 2-> RB
+*/
+int const m_Mode;
+
+Por_Info(const SwLinePortion& rPor, const SwTextPainter& rTextPainer, int 
const nMode)
+: mrPor(rPor), mrTextPainter(rTextPainer), m_Mode(nMode) {};
 };
 
 struct lt_TableColumn
@@ -160,6 +165,7 @@ class SwTaggedPDFHelper
 void BeginInlineStructureElements();
 void EndStructureElements();
 
+void EndCurrentAll();
 void EndCurrentSpan();
 void CreateCurrentSpan(SwTextPaintInfo const& rInf, OUString const& 
rStyleName);
 bool CheckContinueSpan(SwTextPaintInfo const& rInf, std::u16string_view 
rStyleName, SwTextAttr const* pInetFormatAttr);
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 999e599b4478..f9702e28b19a 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include "porfld.hxx"
+#include "pormulti.hxx"
 #include 
 #include "itrpaint.hxx"
 #include 
@@ -935,6 +936,51 @@ void SwTaggedPDFHelper::SetAttributes( 
vcl::PDFWriter::StructElement eType )
 bLanguage = true;
 break;
 
+case vcl::PDFWriter::RT:
+{
+SwRubyPortion const*const pRuby(static_cast(pPor));
+vcl::PDFWriter::StructAttributeValue nAlign = {};
+switch (pRuby->GetAdjustment())
+{
+case text::RubyAdjust_LEFT:
+nAlign = vcl::PDFWriter::RStart;
+break;
+case text::RubyAdjust_CENTER:
+nAlign = vcl::PDFWriter::RCenter;
+break;
+case text::RubyAdjust_RIGHT:
+nAlign = vcl::PDFWriter::REnd;
+break;
+case text::RubyAdjust_BLOCK:
+nAlign = vcl::PDFWriter::RJustify;
+break;
+case text:

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

2023-10-25 Thread Michael Stahl (via logerrit)
 sw/inc/EnhancedPDFExportHelper.hxx  |3 
 sw/source/core/text/EnhancedPDFExportHelper.cxx |   49 ++-
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |  102 ++--
 3 files changed, 141 insertions(+), 13 deletions(-)

New commits:
commit bc3d8776a49c898710fd689f2d8ba7abf0db9954
Author: Michael Stahl 
AuthorDate: Tue Oct 24 13:51:39 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 11:28:35 2023 +0200

tdf#156565 sw: PDF/UA export: only one Link ILSE per link

The problem is that for a hyperlink, multiple Link SEs are created, but
only one Link annotation; the Link SEs all point to the annotation but
the annotation can only point to one Link SE.

So try to create only one Link SE for a hyperlink, similar to commit
ee3c3fcf5c48964f7bc1d64484409f072c614866.  This could be
further subdivided by Spans when formatting properties change but it
looks complicated and rarely needed.

Change-Id: I7d158b599ec744b03e78eeca88d717183f2ba1dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158387
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 4c5283a3a11008a06a995c49ed34dc1f6066)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158286
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/EnhancedPDFExportHelper.hxx 
b/sw/inc/EnhancedPDFExportHelper.hxx
index 1ab0f8868af4..542138157d2f 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -39,6 +39,7 @@ class SwPrintData;
 class SwTextPainter;
 class SwEditShell;
 class StringRangeEnumerator;
+class SwTextAttr;
 class SwTextNode;
 class SwTable;
 class SwNumberTreeNode;
@@ -161,7 +162,7 @@ class SwTaggedPDFHelper
 
 void EndCurrentSpan();
 void CreateCurrentSpan(SwTextPaintInfo const& rInf, OUString const& 
rStyleName);
-bool CheckContinueSpan(SwTextPaintInfo const& rInf, std::u16string_view 
rStyleName);
+bool CheckContinueSpan(SwTextPaintInfo const& rInf, std::u16string_view 
rStyleName, SwTextAttr const* pInetFormatAttr);
 
 bool CheckReopenTag();
 void CheckRestoreTag() const;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 9f99c58b4a35..1abd288b787d 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -156,6 +156,7 @@ struct SwEnhancedPDFState
 };
 
 ::std::optional m_oCurrentSpan;
+::std::optional m_oCurrentLink;
 
 SwEnhancedPDFState(LanguageType const eLanguageDefault)
 : m_eLanguageDefault(eLanguageDefault)
@@ -1597,13 +1598,18 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
 
 void SwTaggedPDFHelper::EndStructureElements()
 {
-if (mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan)
+if (mpFrameInfo != nullptr)
 {
-if (mpFrameInfo != nullptr)
+if (mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan)
 {   // close span at end of paragraph
 mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan.reset();
 ++m_nEndStructureElement;
 }
+if (mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink)
+{   // close link at end of paragraph
+mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink.reset();
+++m_nEndStructureElement;
+}
 }
 
 while ( m_nEndStructureElement > 0 )
@@ -1640,8 +1646,32 @@ void SwTaggedPDFHelper::CreateCurrentSpan(
 }
 
 bool SwTaggedPDFHelper::CheckContinueSpan(
-SwTextPaintInfo const& rInf, std::u16string_view const rStyleName)
+SwTextPaintInfo const& rInf, std::u16string_view const rStyleName,
+SwTextAttr const*const pInetFormatAttr)
 {
+// for now, don't create span inside of link - this should be very rare
+// situation and it looks complicated to implement.
+assert(!mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan
+|| !mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink);
+if (mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink)
+{
+if (pInetFormatAttr && pInetFormatAttr == 
*mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink)
+{
+return true;
+}
+else
+{
+mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink.reset();
+EndTag();
+return false;
+}
+}
+if (mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan && pInetFormatAttr)
+{
+EndCurrentSpan();
+return false;
+}
+
 if (!mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan)
 return false;
 
@@ -1691,7 +1721,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
 }
 
 // note: ILSE may be nested, so only end the span if needed to start new 
one
-bool const isContinueSpan(CheckContinueSpan(rInf, sStyleName));
+bool const isContinueSpan(CheckContinueSpan(rInf, sStyleName, 
pInetFormatAttr)

[Libreoffice-commits] core.git: 2 commits - include/vcl sc/source sw/qa vcl/source

2023-10-25 Thread sahil (via logerrit)
 include/vcl/seleng.hxx   |   12 ++--
 sc/source/ui/inc/select.hxx  |2 +-
 sc/source/ui/view/select.cxx |   12 ++--
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   15 +++
 sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt  |binary
 vcl/source/window/seleng.cxx |2 +-
 6 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit e558cbed9b350f2e6cbe948d648471499e0deffc
Author: sahil 
AuthorDate: Wed Aug 23 22:03:34 2023 +0530
Commit: Hossein 
CommitDate: Wed Oct 25 11:27:28 2023 +0200

tdf#114441 - Convert use of sal_uLong to better integer types

nUpdateInterval (sal_uLong --> sal_uInt64) because it is passed as
argument to Timer::SetTimeout function that takes a sal_uInt64

func CalcUpdateInterval (sal_uLong --> sal_uInt64 return type) because
this function is only being called once, and in that call, the
return value is passed to a function which takes sal_uInt64 type
int. line 412

(https://opengrok.libreoffice.org/xref/core/sc/source/ui/view/select.cxx?r=b6b26421#412)
two lines after which it is passed to a function ...

and the function changed in vcl/source/window/seleng.cxx is the one to
which the value of nUpdateInterval is being passed as explained in
the lines above.

Change-Id: I73441c2d3520a222ddb39b8c0c205b4dd61d4751
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156015
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx
index 580ae74177bf..a0f069e04c1e 100644
--- a/include/vcl/seleng.hxx
+++ b/include/vcl/seleng.hxx
@@ -33,10 +33,10 @@ namespace vcl {
 }
 
 // Timerticks
-#define SELENG_DRAGDROP_TIMEOUT 400
-#define SELENG_AUTOREPEAT_INTERVAL  50
-#define SELENG_AUTOREPEAT_INTERVAL_MIN 25
-#define SELENG_AUTOREPEAT_INTERVAL_MAX 300
+constexpr sal_uInt64 SELENG_DRAGDROP_TIMEOUT = 400;
+constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL =  50;
+constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL_MIN  = 25;
+constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL_MAX  = 300;
 
 class VCL_DLLPUBLIC FunctionSet
 {
@@ -84,7 +84,7 @@ private:
 Timer   aWTimer; // generate fake mouse moves
 MouseEvent  aLastMove;
 SelectionMode   eSelMode;
-sal_uLong   nUpdateInterval;
+sal_uInt64   nUpdateInterval;
 sal_uInt16  nLockedMods;
 SelectionEngineFlagsnFlags;
 DECL_DLLPRIVATE_LINK( ImpWatchDog, Timer*, void );
@@ -159,7 +159,7 @@ public:
 boolHasAnchor() const;
 voidSetAnchor( bool bAnchor );
 
-voidSetUpdateInterval( sal_uLong nInterval );
+voidSetUpdateInterval( sal_uInt64 nInterval );
 
 // is switched on in the Ctor
 voidExpandSelectionOnMouseMove( bool bExpand = true )
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index e1223f91e793..299463afddd2 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -49,7 +49,7 @@ private:
 
 ScSplitPos  GetWhich() const;
 
-sal_uLong   CalcUpdateInterval( const Size& rWinSize, const Point& 
rEffPos,
+sal_uInt64   CalcUpdateInterval( const Size& rWinSize, const 
Point& rEffPos,
 bool bLeftScroll, bool bTopScroll, 
bool bRightScroll, bool bBottomScroll );
 
 public:
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 961f511131ba..d972c9b4eb8d 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -60,10 +60,10 @@ ScSplitPos ScViewFunctionSet::GetWhich() const
 return m_pViewData->GetActivePart();
 }
 
-sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const 
Point& rEffPos,
+sal_uInt64 ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const 
Point& rEffPos,
  bool bLeftScroll, bool 
bTopScroll, bool bRightScroll, bool bBottomScroll )
 {
-sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
+sal_uInt64 nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
 vcl::Window* pWin = m_pEngine->GetWindow();
 AbsoluteScreenPixelRectangle aScrRect = pWin->GetDesktopRectPixel();
 AbsoluteScreenPixelPoint aRootPos = 
pWin->OutputToAbsoluteScreenPixel(Point(0,0));
@@ -77,7 +77,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& 
rWinSize, const Poi
 if (nHAccelRate > 1.0)
 nHAccelRate = 1.0;
 
-nUpdateInterval = 
static_cast(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
+nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate);
 }
 
 if (bLeftScroll)
@@ -104,7 +104,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const 

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

2023-10-25 Thread Michael Stahl (via logerrit)
 sw/source/core/text/EnhancedPDFExportHelper.cxx |   13 
 vcl/qa/cppunit/pdfexport/data/SimpleTOC.fodt|  323 
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |  128 +
 3 files changed, 463 insertions(+), 1 deletion(-)

New commits:
commit eeba703a36aa1e1adcd8dc8b6f87e267ee38aae7
Author: Michael Stahl 
AuthorDate: Fri Oct 20 20:03:11 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 11:17:08 2023 +0200

tdf#157817 sw: PDF/UA export: fix ToX header sections

The problem was that a P or equivalent element is not allowed as child
of a TOC; previously the P was outside/before the TOC because the ToX
header was completely ignored but now it starts a SE for the ToC content
section before being ignored.

Tagged PDF Best Practice Guide suggests putting the header inside a
Caption element.

Another problem is that if the ToX header is on one page but the first
entry in the ToX content section is on the next page, BeginTag() created
a new SE for the ToX content section.

(regression from commit 033e37b49b5712df19dbfd2c307a102bce620de1)

Change-Id: I3c1f8fdda81c1f10198f5eaefc10bcd14f277a8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158298
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a5851d0a6fdc3e08e93daf8cf0ae7f6fc2d73ef6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158285
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 9ebc233dc687..9f99c58b4a35 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -524,6 +524,7 @@ void SwTaggedPDFHelper::BeginTag( 
vcl::PDFWriter::StructElement eType, const OUS
 
 if ( ( rFrame.IsPageFrame() && !static_cast(rFrame).GetPrev() ) ||
  ( rFrame.IsFlowFrame() && 
!SwFlowFrame::CastFlowFrame(&rFrame)->IsFollow() && 
SwFlowFrame::CastFlowFrame(&rFrame)->HasFollow() ) ||
+ rFrame.IsSctFrame() || // all of them, so that opening parent 
sections works
  ( rFrame.IsTextFrame() && rFrame.GetDrawObjs() ) ||
  (rFrame.IsFootnoteFrame() && static_cast(rFrame).GetFollow()) ||
  ( rFrame.IsRowFrame() && rFrame.IsInSplitTableRow() ) ||
@@ -665,6 +666,12 @@ void SwTaggedPDFHelper::SetAttributes( 
vcl::PDFWriter::StructElement eType )
 bRowSpan = true;
 break;
 
+case vcl::PDFWriter::Caption:
+if (pFrame->IsSctFrame())
+{
+break;
+}
+[[fallthrough]];
 case vcl::PDFWriter::H1 :
 case vcl::PDFWriter::H2 :
 case vcl::PDFWriter::H3 :
@@ -673,7 +680,6 @@ void SwTaggedPDFHelper::SetAttributes( 
vcl::PDFWriter::StructElement eType )
 case vcl::PDFWriter::H6 :
 case vcl::PDFWriter::Paragraph :
 case vcl::PDFWriter::Heading :
-case vcl::PDFWriter::Caption :
 case vcl::PDFWriter::BlockQuote :
 
 bPlacement =
@@ -1271,6 +1277,11 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
 OpenTagImpl(pSection);
 break;
 }
+else if (SectionType::ToxHeader == pSection->GetType())
+{
+nPDFType = vcl::PDFWriter::Caption;
+aPDFType = aCaptionString;
+}
 else if (SectionType::ToxContent == pSection->GetType())
 {
 const SwTOXBase* pTOXBase = pSection->GetTOXBase();
diff --git a/vcl/qa/cppunit/pdfexport/data/SimpleTOC.fodt 
b/vcl/qa/cppunit/pdfexport/data/SimpleTOC.fodt
new file mode 100644
index ..6e7e88ffe9bc
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/SimpleTOC.fodt
@@ -0,0 +1,323 @@
+
+http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; x

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

2023-10-25 Thread Samuel Mehrbrodt (via logerrit)
 oox/source/export/drawingml.cxx|2 +-
 sd/qa/unit/data/odp/tdf150316.odp  |binary
 sd/qa/unit/export-tests-ooxml1.cxx |9 +
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 23c2df654f11dac0d701d154bd16a35c3e11585e
Author: Samuel Mehrbrodt 
AuthorDate: Fri Aug 25 15:05:42 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 25 11:11:18 2023 +0200

tdf#150316 Fix missing first line indent in pptx export

Change-Id: Ib2cac800b151823b77e44831100c2de9bbda8a16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156107
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 480f9f1805e9f9161a7428afc2a587d35c67)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156008
Reviewed-by: Patrick Luby 
Reviewed-by: Michael Stahl 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index de7644ee4c54..e021354a4f0a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3442,7 +3442,7 @@ bool DrawingML::WriteParagraphProperties(const 
Reference& rParagra
 mpFS->startElementNS( XML_a, nElement,
XML_lvl, 
sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0),
XML_marL, 
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)),
 nParaLeftMargin > 0),
-   XML_indent, 
sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? 
oox::drawingml::convertHmmToEmu(nParaFirstLineIndent) : 0), (bForceZeroIndent 
|| (nParaFirstLineIndent != 0))),
+   XML_indent, 
sax_fastparser::UseIf(OString::number((bForceZeroIndent && nParaFirstLineIndent 
== 0) ? 0 : oox::drawingml::convertHmmToEmu(nParaFirstLineIndent)), 
(bForceZeroIndent || nParaFirstLineIndent != 0)),
XML_algn, GetAlignment( nAlignment ),
XML_defTabSz, 
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaDefaultTabSize)),
 nParaDefaultTabSize > 0),
XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), 
bRtl));
diff --git a/sd/qa/unit/data/odp/tdf150316.odp 
b/sd/qa/unit/data/odp/tdf150316.odp
new file mode 100644
index ..dab2971711f8
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf150316.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 5f08adb09e74..17a5ce94cbf6 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -1588,6 +1588,15 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, 
testNarrationMimeType)
 assertXPath(pSlideDoc, "//p:childTnLst/p:audio", "isNarration", "1");
 }
 
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf150316)
+{
+createSdImpressDoc("odp/tdf150316.odp");
+save("Impress Office Open XML");
+
+xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:pPr", 
"indent", "-343080");
+}
+
 CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf140865Wordart3D)
 {
 createSdImpressDoc("pptx/tdf140865Wordart3D.pptx");


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

2023-10-25 Thread Henry Castro (via logerrit)
 connectivity/source/parse/sqliterator.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 442d1b22fd74a6be623e52e7236d8b15210b4885
Author: Henry Castro 
AuthorDate: Wed Aug 30 10:25:51 2023 -0400
Commit: Michael Stahl 
CommitDate: Wed Oct 25 11:08:28 2023 +0200

connectiviy: fix to detect column data type

if Base SQL query:

SELECT COUNT("test"."id") from Test

If changed to Spanish UI, detect the column type
from a neutral context parser.

Signed-off-by: Henry Castro 
Change-Id: I1faa8ff8417a0fc4996b289bd2ce0baad52fc00c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156298
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156425
Tested-by: Jenkins
(cherry picked from commit 6896c46567c571a7ae6eb60268de962e3d4ae8bb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158275
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index 1a205953f7aa..683391f66f6a 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -2109,7 +2109,11 @@ sal_Int32 
OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNo
 nType = DataType::DOUBLE;
 }
 else
+{
 nType = ::connectivity::OSQLParser::getFunctionReturnType( 
sFunctionName, &m_rParser.getContext() );
+if (nType == DataType::SQLNULL)
+nType = ::connectivity::OSQLParser::getFunctionReturnType( 
sFunctionName, m_rParser.getNeutral() );
+}
 }
 
 return nType;


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - 2 commits - connectivity/source dbaccess/source include/connectivity include/svx svx/source

2023-10-25 Thread Henry Castro (via logerrit)
 connectivity/source/parse/sqlnode.cxx  |5 -
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |2 +-
 dbaccess/source/core/inc/SingleSelectQueryComposer.hxx |1 +
 include/connectivity/sqlparse.hxx  |   10 +++---
 include/svx/ParseContext.hxx   |   11 +--
 svx/source/form/ParseContext.cxx   |   16 
 6 files changed, 38 insertions(+), 7 deletions(-)

New commits:
commit 8f705a714b57ef3a8086fd8750cf271616e051a8
Author: Henry Castro 
AuthorDate: Wed Aug 30 10:23:31 2023 -0400
Commit: Michael Stahl 
CommitDate: Wed Oct 25 11:08:18 2023 +0200

connectivity: add neutral context parser

Signed-off-by: Henry Castro 
Change-Id: I12b0fe811d141873aaa64af5b6c457051c3356b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156297
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156424
Tested-by: Jenkins
(cherry picked from commit ae951137fae8afca65f695a5ca789ee1b9811629)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158274
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqlnode.cxx 
b/connectivity/source/parse/sqlnode.cxx
index 052b6b15cb05..b523e370a7a1 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1305,8 +1305,11 @@ std::unique_ptr 
OSQLParser::predicateTree(OUString& rErrorMessage
 }
 
 
-OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > 
xContext, const IParseContext* _pContext)
+OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > 
xContext,
+   const IParseContext* _pContext,
+   const IParseContext* _pNeutral)
 :m_pContext(_pContext)
+,m_pNeutral(_pNeutral)
 ,m_pData( new OSQLParser_Data )
 ,m_nFormatKey(0)
 ,m_nDateFormatKey(0)
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 4e37188e7231..895657475f25 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -217,7 +217,7 @@ 
OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
const Reference& _rContext )
 :OSubComponent(m_aMutex,_xConnection)
 ,OPropertyContainer(m_aBHelper)
-,m_aSqlParser( _rContext, &m_aParseContext )
+,m_aSqlParser( _rContext, &m_aParseContext, &m_aNeutralContext )
 ,m_aSqlIterator( _xConnection, _rxTables, m_aSqlParser )
 ,m_aAdditiveIterator( _xConnection, _rxTables, m_aSqlParser )
 ,m_aElementaryParts( size_t(SQLPartCount) )
diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx 
b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
index a0edfd195a69..fdde2d451d17 100644
--- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
+++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
@@ -76,6 +76,7 @@ namespace dbaccess
 typedef std::function
 TGetParseNode;
 ::svxform::OSystemParseContext  m_aParseContext;
+::svxform::ONeutralParseContext m_aNeutralContext;
 ::connectivity::OSQLParser  m_aSqlParser;
 ::connectivity::OSQLParseTreeIterator   m_aSqlIterator; // the 
iterator for the complete statement
 ::connectivity::OSQLParseTreeIterator   m_aAdditiveIterator;// the 
iterator for the "additive statement" (means without the clauses of the 
elementary statement)
diff --git a/include/connectivity/sqlparse.hxx 
b/include/connectivity/sqlparse.hxx
index c3314c470c6b..1bcfd272ad86 100644
--- a/include/connectivity/sqlparse.hxx
+++ b/include/connectivity/sqlparse.hxx
@@ -123,7 +123,8 @@ namespace connectivity
 static sal_Int32s_nRefCount;
 
 // information on the current parse action
-const IParseContext*m_pContext;
+const IParseContext* m_pContext;
+const IParseContext* m_pNeutral;
 std::unique_ptr m_pParseTree;   // result from parsing
 ::std::unique_ptr< OSQLParser_Data >
 m_pData;
@@ -155,7 +156,9 @@ namespace connectivity
 public:
 // if NULL, a default context will be used
 // the context must live as long as the parser
-OSQLParser(css::uno::Reference< css::uno::XComponentContext > 
xContext, const IParseContext* _pContext = nullptr);
+OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext,
+   const IParseContext* _pContext = nullptr,
+   const IParseContext* _pNeutral = nullptr);
 ~OSQLParser();
 
 // Parsing an SQLStatement
@@ -172,7 +175,8 @@ namespace connectivity
 

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

2023-10-25 Thread Henry Castro (via logerrit)
 connectivity/source/parse/sqlnode.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc0d4b6292901d783b4678fddca0d821e927e4d4
Author: Henry Castro 
AuthorDate: Wed Aug 30 10:09:05 2023 -0400
Commit: Michael Stahl 
CommitDate: Wed Oct 25 11:03:27 2023 +0200

connectivity: fix return column type "DataType::SQLNULL"

The Base SQL query:

SELECT COUNT( "Test"."id" ) FROM "Test"

And the UI language is set to Spanish, the function
"getFunctionReturnType" returns misleading column type.

Signed-off-by: Henry Castro 
Change-Id: I2b57d1dfc005711374d7ae0de66b412f4f551d89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156295
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156422
Tested-by: Jenkins
(cherry picked from commit 50f36b75cee6591a00102c6e9fa71ba91df5bbd8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158272
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqlnode.cxx 
b/connectivity/source/parse/sqlnode.cxx
index 4f213bf4f902..052b6b15cb05 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2494,7 +2494,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, 
const SQLParseNodeParamet
 
 sal_Int32 OSQLParser::getFunctionReturnType(std::u16string_view 
_sFunctionName, const IParseContext* pContext)
 {
-sal_Int32 nType = DataType::VARCHAR;
+sal_Int32 nType = DataType::SQLNULL;
 OString 
sFunctionName(OUStringToOString(_sFunctionName,RTL_TEXTENCODING_UTF8));
 
 
if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_ASCII,pContext))) 
nType = DataType::INTEGER;


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

2023-10-25 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx |   23 
++
 writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx  |binary
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |4 +
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit e2076cf7a92694bc94bdc9f3173c2bddbe881a89
Author: Miklos Vajna 
AuthorDate: Wed Oct 25 08:33:18 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 25 11:01:23 2023 +0200

tdf#155682 sw floattable: fix DOCX with big pictures causes endless loop

The bugdoc had a floating table in the header that overlapped with
full-page, as-char anchored images in the body text, leading to a layout
loop.

The trouble is that the body text was broken into 2 lines: the first
line just had fly portions for the area where the in-header floating
table was rendered and then the second line hosted the actual image. But
then this image didn't fit the remaining space, so it moves to the next
page. And this happened again and again.

Fix the problem by keeping in-header anchored floating tables inside the
boundary of the header, this way the body text still doesn't overlap
with the floating table, but the space available to the body text
doesn't have to contain fly portions. Which means we don't try to move
the image to a next page, so there is no loop.

Note that the IsFollowingTextFlow flag is already ignored in some cases
(e.g. sw/qa/extras/ww8export/data/tdf128700_relativeTableWidth.doc), so
this doesn't break the use-case when a footer provides an anchor
position for some text on the left/right margin. In that case the footer
height is still unchanged as it should be.

Change-Id: Id9e80140af3123d52b0fea2f96fc19c150c8e736
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158413
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 9704f61982360ce35983a61cca3fd00bbdf51ab6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158289
Reviewed-by: Michael Stahl 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
index fa1567c5a577..6d732ec5edc1 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
@@ -17,6 +17,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -160,6 +162,27 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableNested)
 // split.
 CPPUNIT_ASSERT(bIsSplitAllowed);
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableHeader)
+{
+// Given a document with a header that has a floating table and some large 
images in the body
+// text:
+loadFromURL(u"floattable-header.docx");
+
+// When breaking that document into pages:
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+uno::Reference xTextViewCursorSupplier(
+xModel->getCurrentController(), uno::UNO_QUERY);
+uno::Reference 
xCursor(xTextViewCursorSupplier->getViewCursor(),
+  uno::UNO_QUERY);
+xCursor->jumpToLastPage();
+
+// Then make sure we get 2 pages:
+sal_Int32 nLastPage = xCursor->getPage();
+// Without the accompanying fix in place, this test would have failed, the 
page count went to
+// 2233 pages and then there was a layout loop.
+CPPUNIT_ASSERT_EQUAL(static_cast(2), nLastPage);
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx 
b/writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx
new file mode 100644
index ..1042dfc0616d
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 9e131376cb35..7a7fb78f4e15 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1584,9 +1584,11 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel)
 xTableProperties->setPropertyValue("BreakType", 
uno::Any(style::BreakType_NONE));
 }
 
-if (nestedTableLevel >= 2)
+if (nestedTableLevel >= 2 || m_rDMapper_Impl.IsInHeaderFooter())
 {
 // Floating tables inside a table always stay inside the cell.
+// Also extend the header/footer area if needed, so an 
in-header floating table
+// typically doesn't overlap with body test.
 aFrameProperties.push_back(
 comphelper::makePropertyValue("IsFollowingTextFlow", 
true));
 }


[Libreoffice-commits] core.git: include/o3tl sw/inc

2023-10-25 Thread Stephan Bergmann (via logerrit)
 include/o3tl/concepts.hxx |   45 +
 sw/inc/nodeoffset.hxx |9 +++--
 2 files changed, 48 insertions(+), 6 deletions(-)

New commits:
commit dcaa2c4870e0b2662c597f53c46b1df347183e7c
Author: Stephan Bergmann 
AuthorDate: Tue Oct 24 22:07:26 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 25 10:27:26 2023 +0200

Use std::signed_integral concept

...which, unlike std::is_signed, also requires that T is an integer type, 
not
just any arithmetic type, but which appears to fit well here anyway.

But LLVM 12 libc++, which is apparently used by Android builds, only 
provides a
bare-bones  that lacks std::signed_integral (among others), so 
for now
introduce o3tl/concepts.hxx providing what's missing (incl. std::integral 
and
std::unsigned_integral, for some kind of consistency).

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

diff --git a/include/o3tl/concepts.hxx b/include/o3tl/concepts.hxx
new file mode 100644
index ..261d063ebca2
--- /dev/null
+++ b/include/o3tl/concepts.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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 
+
+#include 
+
+// LLVM 12 libc++ only provides a bare-bones  that lacks most of its 
C++20 content, so
+// replicate here fore now what we need:
+
+#if defined __cpp_lib_concepts
+
+namespace o3tl
+{
+using std::integral;
+using std::signed_integral;
+using std::unsigned_integral;
+}
+
+#else
+
+#include 
+
+namespace o3tl
+{
+// Taken from the C++20 spec:
+
+template  concept integral = std::is_integral_v;
+
+template  concept signed_integral = integral&& 
std::is_signed_v;
+
+template  concept unsigned_integral = integral && 
!signed_integral;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/inc/nodeoffset.hxx b/sw/inc/nodeoffset.hxx
index 035925855b31..f6deac6609b0 100644
--- a/sw/inc/nodeoffset.hxx
+++ b/sw/inc/nodeoffset.hxx
@@ -10,23 +10,20 @@
 
 #include 
 #include "swdllapi.h"
+#include 
 #include 
 #include 
 
 typedef o3tl::strong_int SwNodeOffset;
 
 /* Just to make it easier to write arithmetic with these types */
-template 
-inline typename std::enable_if::value, SwNodeOffset>::type
-operator+(SwNodeOffset a, T n)
+template  inline SwNodeOffset operator+(SwNodeOffset 
a, T n)
 {
 return a + SwNodeOffset(n);
 }
 
 /* Just to make it easier to write arithmetic with these types */
-template 
-inline typename std::enable_if::value, SwNodeOffset>::type
-operator-(SwNodeOffset a, T n)
+template  inline SwNodeOffset operator-(SwNodeOffset 
a, T n)
 {
 return a - SwNodeOffset(n);
 }


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

2023-10-25 Thread Attila Szűcs (via logerrit)
 include/xmloff/txtimp.hxx   |2 
 include/xmloff/xmltoken.hxx |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |9 
 sw/inc/IDocumentContentOperations.hxx   |2 
 sw/inc/crsrsh.hxx   |2 
 sw/inc/docary.hxx   |8 
 sw/inc/redline.hxx  |   21 
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/layout/layout2.cxx |7 
 sw/qa/extras/uiwriter/data/tdf157663_redlineMove.odt|binary
 sw/qa/extras/uiwriter/uiwriter5.cxx |  134 +
 sw/source/core/doc/DocumentContentOperationsManager.cxx |9 
 sw/source/core/doc/DocumentRedlineManager.cxx   |  201 ---
 sw/source/core/doc/doccomp.cxx  |4 
 sw/source/core/doc/docnum.cxx   |8 
 sw/source/core/doc/docredln.cxx |  302 +---
 sw/source/core/inc/DocumentContentOperationsManager.hxx |2 
 sw/source/core/inc/DocumentRedlineManager.hxx   |   14 
 sw/source/core/unocore/unocrsrhelper.cxx|   11 
 sw/source/core/unocore/unoredline.cxx   |4 
 sw/source/filter/basflt/fltshell.cxx|1 
 sw/source/filter/ww8/writerhelper.cxx   |2 
 sw/source/filter/xml/XMLRedlineImportHelper.cxx |   15 
 sw/source/filter/xml/XMLRedlineImportHelper.hxx |1 
 sw/source/filter/xml/xmltexti.cxx   |3 
 sw/source/filter/xml/xmltexti.hxx   |1 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |   45 +
 writerfilter/source/dmapper/DomainMapper_Impl.hxx   |4 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/text/XMLChangeInfoContext.cxx |7 
 xmloff/source/text/XMLChangeInfoContext.hxx |1 
 xmloff/source/text/XMLChangedRegionImportContext.cxx|5 
 xmloff/source/text/XMLChangedRegionImportContext.hxx|3 
 xmloff/source/text/XMLRedlineExport.cxx |9 
 xmloff/source/text/txtimp.cxx   |1 
 xmloff/source/token/tokens.txt  |1 
 36 files changed, 663 insertions(+), 179 deletions(-)

New commits:
commit bf5cbc6adfd7cfcd0d59277a8b1899642038ac88
Author: Attila Szűcs 
AuthorDate: Tue Oct 17 09:31:22 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Oct 25 09:43:16 2023 +0200

tdf#157663 SW: Tracked change improve move

Made accept/reject handle move redlines other pair, (moveto-movefrom)
and handle the whole move redline, even if it is split into small pieces
that separated from each other.

Added unique ID to every move redline to help find their other parts.
This move ID is generated in case of:
move recognition
moveing a paragraph. (directly create move redline with unique id without
calling the recognition it is faster and more stable)

(there are other cases that could be improved to not use recognition,
but generate ID directly, like moveing selected partial text with mouse)

Implemented the odt export/import of this move ID.
it is a tag like this: "4"
next to creator/date

Improved the docx import to generate this move ID, so move redlines can
find their other parts
(Not changed Docx export... it works a bit, but far from perfect)

Improved move reckognition:
It can find them even if they are split into multiple parts differently.
(like "ab"+"cd" == "a"+"bcd")
Disabled this because of probably performance issue.

made a complex unit test for it.

Note: Left the move recognition on every place, to avoid as much
regressions as possible.. but in the future, we may can disable it
in some cases.
Note2: We will have to keep move recognitnion, because there are documents
from past, saved without any move informations in the file, and users
expect to see move redlines there. (generated by the recognition.)

Change-Id: If968d4235b676c5e538cfaf4187a4482a86eae9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157740
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index 218db6fa7acd..0320c5360aa6 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -381,6 +381,8 @@ public:
 const OUString& rComment,
 /// date+time
 const css::util::DateTime& rDateTime,
+/// move id, to find other parts (moveFrom/MoveTo)
+const OUString& rMoveId,
  

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

2023-10-25 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx |   23 
++
 writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx  |binary
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |4 +
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 9704f61982360ce35983a61cca3fd00bbdf51ab6
Author: Miklos Vajna 
AuthorDate: Wed Oct 25 08:33:18 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 25 09:34:28 2023 +0200

tdf#155682 sw floattable: fix DOCX with big pictures causes endless loop

The bugdoc had a floating table in the header that overlapped with
full-page, as-char anchored images in the body text, leading to a layout
loop.

The trouble is that the body text was broken into 2 lines: the first
line just had fly portions for the area where the in-header floating
table was rendered and then the second line hosted the actual image. But
then this image didn't fit the remaining space, so it moves to the next
page. And this happened again and again.

Fix the problem by keeping in-header anchored floating tables inside the
boundary of the header, this way the body text still doesn't overlap
with the floating table, but the space available to the body text
doesn't have to contain fly portions. Which means we don't try to move
the image to a next page, so there is no loop.

Note that the IsFollowingTextFlow flag is already ignored in some cases
(e.g. sw/qa/extras/ww8export/data/tdf128700_relativeTableWidth.doc), so
this doesn't break the use-case when a footer provides an anchor
position for some text on the left/right margin. In that case the footer
height is still unchanged as it should be.

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

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
index 34fee71efff3..5046be81e98e 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
@@ -17,6 +17,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -160,6 +162,27 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableNested)
 // split.
 CPPUNIT_ASSERT(bIsSplitAllowed);
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableHeader)
+{
+// Given a document with a header that has a floating table and some large 
images in the body
+// text:
+loadFromURL(u"floattable-header.docx");
+
+// When breaking that document into pages:
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+uno::Reference xTextViewCursorSupplier(
+xModel->getCurrentController(), uno::UNO_QUERY);
+uno::Reference 
xCursor(xTextViewCursorSupplier->getViewCursor(),
+  uno::UNO_QUERY);
+xCursor->jumpToLastPage();
+
+// Then make sure we get 2 pages:
+sal_Int32 nLastPage = xCursor->getPage();
+// Without the accompanying fix in place, this test would have failed, the 
page count went to
+// 2233 pages and then there was a layout loop.
+CPPUNIT_ASSERT_EQUAL(static_cast(2), nLastPage);
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx 
b/writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx
new file mode 100644
index ..1042dfc0616d
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/floattable-header.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 2d1c4f3b44ba..2092ba4096ae 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1580,9 +1580,11 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel)
 xTableProperties->setPropertyValue("BreakType", 
uno::Any(style::BreakType_NONE));
 }
 
-if (nestedTableLevel >= 2)
+if (nestedTableLevel >= 2 || m_rDMapper_Impl.IsInHeaderFooter())
 {
 // Floating tables inside a table always stay inside the cell.
+// Also extend the header/footer area if needed, so an 
in-header floating table
+// typically doesn't overlap with body test.
 aFrameProperties.push_back(
 comphelper::makePropertyValue("IsFollowingTextFlow", 
true));
 }