core.git: external/mariadb-connector-c

2024-05-18 Thread Printf Debugging (via logerrit)
 external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cc389f64a500fde75a632173cba9b9e1ee5abb86
Author: Printf Debugging 
AuthorDate: Sat May 18 15:09:07 2024 +0530
Commit: Mike Kaganski 
CommitDate: Sun May 19 06:37:43 2024 +0200

tdf#150082 tdf#161141 fix typecasting error in Makefile

In patch https://gerrit.libreoffice.org/c/core/+/167057 , cast
to st_mysql_client_plugin instead of st_mysql_client_plugin_AUTHENTICATION

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

diff --git 
a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk 
b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
index 31515fd4ac7e..dbce7aec4bdd 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -46,7 +46,7 @@ $(eval $(call 
gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
(struct st_mysql_client_plugin 
*)\&pvio_socket_client_plugin$(COMMA) \
(struct st_mysql_client_plugin 
*)\&caching_sha2_password_client_plugin$(COMMA) \
(struct st_mysql_client_plugin 
*)\&mysql_native_password_client_plugin$(COMMA) \
-   (struct st_mysql_client_plugin_AUTHENTICATION 
*)\&auth_gssapi_client_client_plugin$(COMMA) \
+   (struct st_mysql_client_plugin 
*)\&auth_gssapi_client_client_plugin$(COMMA) \
$(if $(filter WNT,$(OS)), \
(struct st_mysql_client_plugin 
*)\&pvio_shmem_client_plugin$(COMMA) \
(struct st_mysql_client_plugin 
*)\&pvio_npipe_client_plugin$(COMMA) \


New Defects reported by Coverity Scan for LibreOffice

2024-05-18 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

2 new defect(s) introduced to LibreOffice found with Coverity Scan.
9 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1598293:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unotbl.cxx: 2716 in 
SwXTextTable::getPropertyValue(const rtl::OUString &)()



*** CID 1598293:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unotbl.cxx: 2716 in 
SwXTextTable::getPropertyValue(const rtl::OUString &)()
2710 }
2711 break;
2712 
2713 case  FN_UNO_ANCHOR_TYPES:
2714 case  FN_UNO_TEXT_WRAP:
2715 case  FN_UNO_ANCHOR_TYPE:
>>> CID 1598293:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetDefaultTextContentValue" without checking return value (as 
>>> is done elsewhere 8 out of 10 times).
2716 ::sw::GetDefaultTextContentValue(
2717 aRet, u"", pEntry->nWID);
2718 break;
2719 
2720 case FN_UNO_RANGE_ROW_LABEL:
2721 {

** CID 1598292:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unosect.cxx: 1610 in 
SwXTextSection::getPropertyDefault(const rtl::OUString &)()



*** CID 1598292:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unosect.cxx: 1610 in 
SwXTextSection::getPropertyDefault(const rtl::OUString &)()
1604 case WID_SECT_EDIT_IN_READONLY:
1605 aRet <<= false;
1606 break;
1607 case  FN_UNO_ANCHOR_TYPES:
1608 case  FN_UNO_TEXT_WRAP:
1609 case  FN_UNO_ANCHOR_TYPE:
>>> CID 1598292:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetDefaultTextContentValue" without checking return value (as 
>>> is done elsewhere 8 out of 10 times).
1610 ::sw::GetDefaultTextContentValue(aRet, u"", pEntry->nWID);
1611 break;
1612 default:
1613 if(pFormat && SfxItemPool::IsWhich(pEntry->nWID))
1614 {
1615 SwDoc *const pDoc = pFormat->GetDoc();



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D5zYB_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtKmWXHLXD2K1QR2E0we2gMn5wcMxInQlUK6dDYna68JKILfgHJ5fmdUrDHNAjyeGutssgC6UiOf3tTplNaaWmgR4ovfqIIraxT06EMYD0X41RbLLR5QRgxgg7vjSA-2F1Ed1jqyi5AINm1rErKe3iTaVZYIE5torCQxPe-2BzmomAgj4-3D



core.git: dictionaries

2024-05-18 Thread Marco A.G.Pinto (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 12d4e47155a52e17a5cc980e1ac41c16285430b3
Author: Marco A.G.Pinto 
AuthorDate: Sun May 19 04:35:08 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Sun May 19 05:35:08 2024 +0200

Update git submodules

* Update dictionaries from branch 'master'
  to 7272a82714ca91947b4573c09bce4938861a9877
  - Updated the English dictionaries: GB+ZA (2024.05.01)

Change-Id: Ie9586a0ff5a823893e059c0190f9239548448173
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/167028
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/dictionaries b/dictionaries
index 0ca7301c3c00..7272a82714ca 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 0ca7301c3c00d6e7936fd912ba775d0008f7fee4
+Subproject commit 7272a82714ca91947b4573c09bce4938861a9877


dictionaries.git: en/changelog.txt en/description.xml en/en_GB.aff en/en_GB.dic en/English.png en/en_ZA.aff en/package-description.txt en/README_en_GB.txt en/README_en_ZA.txt

2024-05-18 Thread Marco A.G.Pinto (via logerrit)
 en/English.png |binary
 en/README_en_GB.txt|4 
 en/README_en_ZA.txt|   38 +
 en/changelog.txt   |   30 +
 en/description.xml |2 
 en/en_GB.aff   |5 
 en/en_GB.dic   | 1267 +++--
 en/en_ZA.aff   |   60 +-
 en/package-description.txt |4 
 9 files changed, 765 insertions(+), 645 deletions(-)

New commits:
commit 7272a82714ca91947b4573c09bce4938861a9877
Author: Marco A.G.Pinto 
AuthorDate: Fri May 3 06:11:46 2024 +0100
Commit: Aron Budea 
CommitDate: Sun May 19 05:35:08 2024 +0200

Updated the English dictionaries: GB+ZA (2024.05.01)

Change-Id: Ie9586a0ff5a823893e059c0190f9239548448173
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/167028
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/en/English.png b/en/English.png
index 13ec15f..39f406b 100644
Binary files a/en/English.png and b/en/English.png differ
diff --git a/en/README_en_GB.txt b/en/README_en_GB.txt
index 821acd0..7dd301e 100644
--- a/en/README_en_GB.txt
+++ b/en/README_en_GB.txt
@@ -196,6 +196,10 @@ OOo Issue 63541 — remove *dessicated
 
 2023-10-26:
— Improved flag “J”, increasing the wordlist in 70 valid words.
+
+2024-04-02:
+   — Improved flag “S”, increasing the wordlist in 13 valid words.
+
 ---
 
 MARCO A.G.PINTO:
diff --git a/en/README_en_ZA.txt b/en/README_en_ZA.txt
index 436b56e..144797c 100644
--- a/en/README_en_ZA.txt
+++ b/en/README_en_ZA.txt
@@ -1,3 +1,41 @@
+Since 2021 that the ZA dictionary has been improved/fixed by Marco A.G.Pinto.
+
+2010-03-09 (nemeth AT OOo)
+   - UTF-8 encoded dictionary:
+   - fix em-dash problem of OOo 3.2 by BREAK
+   - suggesting words with typographical apostrophes
+   - recognizing words with Unicode f ligatures
+   - add phonetic suggestion (Copyright (C) 2000 Björn Jacke, see the 
end of the file)
+
+2021-02-15 (Marco A.G.Pinto)
+   - Fixed: concious + conciousness.
+
+2022-07-12 (Marco A.G.Pinto)
+   - Fixed: “!” flag at start of words;
+   - Removed duplicate words;
+   - Sorted alphabetically the dictionary.
+
+2023-01-01 (Marco A.G.Pinto)
+   - Added the: ICONV ’ ';
+   - Sorted alphabetically the tags of the .aff.
+
+2023-01-17 (Marco A.G.Pinto)
+   - Added: Czechia + Czechia's.
+
+2023-01-26 (Marco A.G.Pinto)
+   - Fixed/improved: flag “3”.
+
+2024-01-29 (Marco A.G.Pinto)
+   - Fix: Removed the: ICONV ’ ' because it was already at the end of 
the .aff;
+   - Fix: apostrophe handling, by adding: WORDCHARS 0123456789’ to the 
.aff;
+   - Improved flag “J” adding 424 words.
+
+2024-04-02 (Marco A.G.Pinto)
+   - Improved flag “S” adding 9 words (possessives).
+   - Improved flag “N” adding 1114 words (possessives).
+
+---
+
 MySpell English (South African) Spellchecker
 
 
diff --git a/en/changelog.txt b/en/changelog.txt
index 7873374..3844ae3 100644
--- a/en/changelog.txt
+++ b/en/changelog.txt
@@ -1,3 +1,33 @@
+MAGP 2024-05-01
+
+Updated the Dictionaries:
+- British (Marco A.G.Pinto)*
+  * British has 204 new words(1) (2024-05-01).
+(1) Added tons of plurals and possessives.
+- ZA
+  * Improved flag “S” adding 9 words (possessives).
+  * Improved flag “N” adding 1114 words (possessives).
+
+
+
+MAGP 2024-04-01
+
+Updated the Dictionaries:
+- British (Marco A.G.Pinto)*
+  * British has 191 new words(1) (2024-04-01).
+(1) Added tons of plurals and possessives.
+
+
+
+MAGP 2024-03-01
+
+Updated the Dictionaries:
+- British (Marco A.G.Pinto)*
+  * British has 199 new words(1) (2024-03-01).
+(1) Added tons of plurals and possessives.
+
+
+
 MAGP 2024-02-01
 
 Updated the Dictionaries:
diff --git a/en/description.xml b/en/description.xml
index 8a514f2..a9c5921 100644
--- a/en/description.xml
+++ b/en/description.xml
@@ -1,6 +1,6 @@
 
 http://openoffice.org/extensions/description/2006"; 
xmlns:d="http://openoffice.org/extensions/description/2006";  
xmlns:xlink="http://www.w3.org/1999/xlink";>
-
+
 
 
 English spelling dictionaries, hyphenation rules, 
thesaurus, and grammar checker
diff --git a/en/en_GB.aff b/en/en_GB.aff
index c0b778d..8816fec 100644
--- a/en/en_GB.aff
+++ b/en/en_GB.aff
@@ -14,7 +14,7 @@
 #   3) Plurals.
 #
 # David Bartlett, Andrew Brown, Marco A.G.Pinto.
-# V 3.2.9, 2024-02-01
+# V 3.3.2, 2024-05-01
 
 SET UTF-8
 
@@ -714,7 +714,7 @@ SFX r 0 lers [^aeio][aeiou]l
 SFX r 0 r e 
 SFX r 0 r's e 
 SFX r 0 rs e 
-SFX S Y 9
+SFX S Y 10
 SFX S 0 es [cs]h 
 SFX S 0 es [sxz] 
 SFX S y ies [^aeiou]y 
@@ -724,6 +724,7 @@ SFX S 0 s [^hsuxyz]
 SFX S 0 s [ae]u 
 SFX S 0 s [aeiou]y 
 SFX S 0 x [ae]u 
+SFX S 0 x's [ae]u 
 SFX P Y 9
 SFX P y iness [^aeiou]y 
 SFX P y iness's [^aeiou]y 
diff --git a/en/en_GB.dic b/en/en_GB.dic
index 6328ef2..9cde718 10

GSoC Project Introduction - .NET Bindings for UNO

2024-05-18 Thread Ritobroto Mukherjee
Hello everyone,

I'm Ritobroto Mukherjee, one of the GSoC contributors for LibreOffice
this year. I'll be working on updating UNO bindings for .NET languages
(C#, F# and VB.NET).

This project aims to update the original .NET Framework compatible
bindings, to use the newer .NET 8 SDK. This would not only make them
cross-platform, but also allow us to introduce newer C# syntax and
features such as generic types. Tests, examples, documentation and a
NuGet package for end users to consume the bindings are also planned.

I am eager to work under the guidance of Mr. Hossein and Mr. Thorsten,
along with the support of the entire LibreOffice community. 

Similar to my peers, I'll be sending weekly updates shortly. Also a big
congratulations to all my peers who were also selected as contributors.

Best regards,
Ritobroto


core.git: Branch 'libreoffice-24-2' - 2 commits - sw/inc sw/qa sw/source

2024-05-18 Thread Michael Stahl (via logerrit)
 sw/inc/doc.hxx  |   30 +-
 sw/qa/extras/uiwriter/data/stylewithlistandindents.fodt |  182 
 sw/qa/extras/uiwriter/uiwriter8.cxx |  121 ++
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   16 +
 sw/source/core/doc/docnum.cxx   |   98 +++-
 sw/source/core/edit/autofmt.cxx |2 
 sw/source/core/edit/ednumber.cxx|   12 -
 sw/source/core/undo/unnum.cxx   |4 
 sw/source/core/unocore/unocrsrhelper.cxx|8 
 sw/source/filter/basflt/fltshell.cxx|2 
 10 files changed, 433 insertions(+), 42 deletions(-)

New commits:
commit b01d89eaf473870281f6ecbdeb12aa3fcd79f9bb
Author: Michael Stahl 
AuthorDate: Fri May 17 13:58:41 2024 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:30:14 2024 +0200

tdf#161137 sw: AutoText or Paste should copy paragraph indents for lists

The first commit made the start and end node of the paste look like the
list it was inserted into, but the middle nodes may have different
paragraph styles and may have different left margin / first line indent.

In addition to the SwNumRule, also copy any left margin or first line
indent if it is effective on the node that the SwNumRule was taken from.

Now all the list labels should be in the same place.

Change-Id: Ia5794687ea0ff542f23289b1ca63ea99dae85bc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/16
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 2bcaa374ea418cd81f9dbf62cd7e896f5977992a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167810
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 84378f8521ea..946c96fd29db 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1073,7 +1073,9 @@ public:
  const SwNumRule&,
  SetNumRuleMode mode,
  SwRootFrame const* pLayout = nullptr,
- const OUString& sContinuedListId = OUString());
+ const OUString& sContinuedListId = OUString(),
+ SvxTextLeftMarginItem const* pTextLeftMarginToPropagate = 
nullptr,
+ SvxFirstLineIndentItem const* pFirstLineIndentToPropagate 
= nullptr);
 void SetCounted(const SwPaM&, bool bCounted, SwRootFrame const* pLayout);
 
 void MakeUniqueNumRules(const SwPaM & rPaM);
@@ -1150,7 +1152,9 @@ public:
 int nNonEmptyAllowed,
 OUString& sListId,
 SwRootFrame const* pLayout,
-const bool bInvestigateStartNode = false );
+const bool bInvestigateStartNode = false,
+SvxTextLeftMarginItem const** 
o_ppTextLeftMargin = nullptr,
+SvxFirstLineIndentItem const** 
o_ppFirstLineIndent = nullptr);
 
 // Paragraphs without numbering but with indents.
 bool NoNum( const SwPaM& );
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index 13e437e68d96..60b1bd8e9ce6 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -880,7 +881,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, 
testInsertAutoTextIntoListFromParaStyle)
 pWrtShell->FwdPara();
 pWrtShell->EndPara(/*bSelect=*/false);
 // expands autotext (via F3)
-pWrtShell->Insert(" dt");
+pWrtShell->Insert(" jacr");
 
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_F3);
@@ -889,6 +890,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, 
testInsertAutoTextIntoListFromParaStyle)
 pWrtShell->SttEndDoc(/*bStt=*/true);
 pWrtShell->FwdPara();
 
+SwNumRule* pNumRule;
+SvxTextLeftMarginItem const* pTextLeftMargin;
+SvxFirstLineIndentItem const* pFirstLineIndent;
+
 {
 SwTextNode& rNode{ 
*pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode() };
 // numrule from paragraph style, but not from direct formatting
@@ -905,7 +910,32 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, 
testInsertAutoTextIntoListFromParaStyle)
 CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, 
pSet->GetItemState(RES_MARGIN_TEXTLEFT, false));
 CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, 
pSet->GetItemState(RES_MARGIN_TEXTLEFT, true));
 CPPUNIT_ASSERT_EQUAL(u"ListAndIndents"_ustr, 
rNode.GetTextColl()->GetName());
-CPPUNIT_ASSERT(rNode.GetText().startsWith("Item He heard quiet 
steps"));
+CPPUNIT_ASSERT_EQUAL(u"Item We confirm receipt of your application 
material."_ustr,
+   

core.git: Branch 'libreoffice-24-2' - svgio/inc svgio/qa svgio/source

2024-05-18 Thread Xisco Fauli (via logerrit)
 svgio/inc/svgstyleattributes.hxx  |7 +
 svgio/qa/cppunit/SvgImportTest.cxx|8 +
 svgio/qa/cppunit/data/contextFill.svg |8 +
 svgio/source/svgreader/svgstyleattributes.cxx |   36 --
 4 files changed, 57 insertions(+), 2 deletions(-)

New commits:
commit e9cec488461b1610091f43b4a837e2338fd1cf91
Author: Xisco Fauli 
AuthorDate: Mon May 6 17:15:59 2024 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:29:28 2024 +0200

tdf#155651: Add support for "context-fill"

Change-Id: I6f96cc7c059ece5f9401fc0ae552cf279e53109c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167230
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins
(cherry picked from commit 3b0f96a0773f19f7d5bdb5725ff9667eb4809215)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167218
Reviewed-by: Caolán McNamara 

diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx
index 61a3816e82cb..30cbab965644 100644
--- a/svgio/inc/svgstyleattributes.hxx
+++ b/svgio/inc/svgstyleattributes.hxx
@@ -247,6 +247,9 @@ namespace svgio::svgreader
 // #121221# Defines if evtl. an empty array *is* set
 boolmbStrokeDasharraySet : 1;
 
+// tdf#155651 Defines if 'context-fill' is used in fill
+boolmbContextFill : 1;
+
 // tdf#155651 Defines if 'context-stroke' is used in stroke
 boolmbContextStroke : 1;
 
@@ -254,6 +257,7 @@ namespace svgio::svgreader
 OUStringmaNodeFillURL;
 OUStringmaNodeStrokeURL;
 
+const basegfx::BColor*  maContextFill;
 const basegfx::BColor*  maContextStroke;
 
 /// internal helpers
@@ -332,6 +336,9 @@ namespace svgio::svgreader
 /// stroke content
 const basegfx::BColor* getStroke() const;
 
+/// context fill content
+const basegfx::BColor* getContextFill() const;
+
 /// context stroke content
 const basegfx::BColor* getContextStroke() const;
 
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index b4aa5250f5ec..bc99c672b4b6 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -669,6 +669,14 @@ CPPUNIT_TEST_FIXTURE(Test, testMarkerOrient)
 assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, 
"xy33"_ostr, "1");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testContextFill)
+{
+xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/contextFill.svg");
+
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#ff");
+assertXPath(pDocument, 
"/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, 
"#ff");
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testContextStroke)
 {
 xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/contextStroke.svg");
diff --git a/svgio/qa/cppunit/data/contextFill.svg 
b/svgio/qa/cppunit/data/contextFill.svg
new file mode 100644
index ..399d3c16b09e
--- /dev/null
+++ b/svgio/qa/cppunit/data/contextFill.svg
@@ -0,0 +1,8 @@
+http://www.w3.org/2000/svg";>
+
+
+   
+
+
+
+
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index eee09889c226..42e19c51fcd5 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -817,6 +817,11 @@ namespace svgio::svgreader
 rMarkerTransform.identity();
 rClipRange.reset();
 
+// Set the current fill to the marker before calling 
getMarkerPrimitives,
+// which calls decomposeSvgNode to decompose the children of the 
marker.
+// If any of the children uses 'fill="context-fill"', then it will 
use it
+
const_cast(rMarker.getSvgStyleAttributes())->maContextFill 
= getFill();
+
 // Set the current stroke to the marker before calling 
getMarkerPrimitives,
 // which calls decomposeSvgNode to decompose the children of the 
marker.
 // If any of the children uses 'stroke="context-stroke"', then it 
will use it
@@ -1292,9 +1297,11 @@ namespace svgio::svgreader
 maBaselineShift(BaselineShift::Baseline),
 maBaselineShiftNumber(0),
 maDominantBaseline(DominantBaseline::Auto),
-maResolvingParent(33, 0),
+maResolvingParent(34, 0),
 mbStrokeDasharraySet(false),
+mbContextFill(false),
 mbContextStroke(false),
+maContextFill(nullptr),
 maContextStroke(nullptr)
 {
 }
@@ -1315,7 +1322,11 @@ namespace svgio::svgreader
 OUString aURL;
 SvgNumber aOpacity;
 
-  

core.git: Branch 'libreoffice-24-2' - sw/qa

2024-05-18 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter3.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 99ad44515c45e98635d382ebfec82b0a09217f9e
Author: Michael Stahl 
AuthorDate: Tue May 14 11:24:35 2024 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:28:58 2024 +0200

sw: make testTdf131963 less strict

Asserting number of pages is rather questionable because any number of
things can change that and you will spend days debugging that.

For some reason this test has 12 pages on my libreoffice-24-2 branch
build and 11 pages on my master build, either of which are clearly
better than the 2 pages result of the bug that was fixed there.

Change-Id: Ie1e97d5cc973f317a2d6ca8a7d13822385b134f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167627
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 9aa22abcbdfe42e516ecc791605e3a1b7ef80327)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167465
Reviewed-by: Caolán McNamara 

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index f705e881f1dd..ba8d03ae7e6c 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1333,7 +1333,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131963)
 {
 createSwDoc("tdf131963.docx");
 
-CPPUNIT_ASSERT_EQUAL(11, getPages());
+CPPUNIT_ASSERT(11 == getPages() || 12 == getPages());
 
 dispatchCommand(mxComponent, ".uno:SelectAll", {});
 
@@ -1348,7 +1348,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131963)
 // Without the fix in place, this test would have crashed here
 
 // tdf#133169: without the fix in place, it would have been 2 instead of 11
-CPPUNIT_ASSERT_EQUAL(11, getPages());
+CPPUNIT_ASSERT(11 == getPages() || 12 == getPages());
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132596)


core.git: Branch 'libreoffice-24-2' - writerfilter/source

2024-05-18 Thread Michael Stahl (via logerrit)
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit d632d86579467941ce8b3dda1dbd46c83a92877a
Author: Michael Stahl 
AuthorDate: Wed May 15 17:45:16 2024 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:28:27 2024 +0200

writerfilter: fix parsing of invalid STYLEREF field

forum-mso-en-3309.docx contains a funny field that doesn't follow
the grammar in the OOXML spec:

STYLEREF "Heading 1" \* MERGEFORMAT

Word can evaluate it and find the paragraph, so make the parser a bit
more flexible, by adding known switches that don't have arguments, so
that any argument following these becomes a field argument,
for now only for STYLEREF.

(regression from commit d4fdafa103bfea94a279d7069ddc50ba92f67d01)

Change-Id: Ic42cd2be58fd65a817946e21a9661d357b02a99a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167697
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 5ae1379fcdd00228e683ae90991e275f570cd92d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167733
Reviewed-by: Caolán McNamara 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 20aa003b4101..4c5dff02fcf7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5433,13 +5433,27 @@ std::tuple, 
std::vector > splitFieldCo
 OUString const token =
 lcl_ExtractToken(rCommand, nStartIndex, bHaveToken, bIsSwitch);
 assert(nStartIndex <= rCommand.size());
+static std::map> const noArgumentSwitches 
= {
+{ u"STYLEREF"_ustr,
+  { u"\l"_ustr, u"\n"_ustr, u"\p"_ustr, u"\r"_ustr, u"\t"_ustr, 
u"\w"_ustr } }
+};
 if (bHaveToken)
 {
 if (sType.isEmpty())
 {
 sType = token.toAsciiUpperCase();
 }
-else if (bIsSwitch || !switches.empty())
+else if (bIsSwitch)
+{
+switches.push_back(token);
+}
+// evidently Word evaluates 'STYLEREF   "Heading 1" \* 
MERGEFORMAT'
+// despite the grammar specifying that the style name must
+// precede switches like ' '; try to approximate that here
+// by checking for known switches that don't expect arguments
+else if (auto const it = noArgumentSwitches.find(sType);
+!switches.empty() && (it == noArgumentSwitches.end()
+|| 
it->second.find(switches.back().toAsciiLowerCase()) == it->second.end()))
 {
 switches.push_back(token);
 }


core.git: Branch 'distro/collabora/co-24.04' - desktop/source

2024-05-18 Thread Michael Meeks (via logerrit)
 desktop/source/lib/init.cxx |   78 +---
 1 file changed, 52 insertions(+), 26 deletions(-)

New commits:
commit 628f56a1802ad76cbe84a9a5590b04ed81a57a9e
Author: Michael Meeks 
AuthorDate: Fri May 17 21:25:29 2024 +0100
Commit: Noel Grandin 
CommitDate: Sat May 18 22:06:18 2024 +0200

lok: stop amazing waste of repeated font sizes in each font element.

These days all sensible fonts are scalable, so anything else is madness.

With the compact_fonts option we go from:

INCOMING: commandvalues: 
{"commandName":".uno:CharFontName","commandValues":
{"Albany 
AMT":["6","7","8","9","10","10.5","11","12","13","14","15","16",
"18","20","21","22","24","26","28","32","36","40","42","44","48","54",
"60","66","72","80","88","96"],"Amiri":["6","7"



INCOMING: commandvalues: { "commandName": ".uno:CharFontName", 
"FontNames":
[ "Albany AMT", "Amiri", "Amiri Quran", "Amiri Quran Colored", "Andale 
Mono",
"Andale Sans", "Andy MT", "AR PL UMing CN", "AR PL UMing HK", "AR PL 
UMing TW",
"AR PL UMing TW MBE", "Arial",

   

An 8x size win.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9608c5374da7..cb487d641ac8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -267,11 +267,12 @@ extern "C" {
 
 #endif
 
-
 using LanguageToolCfg = 
officecfg::Office::Linguistic::GrammarChecking::LanguageTool;
 
+
 static LibLibreOffice_Impl *gImpl = nullptr;
 static bool lok_preinit_2_called = false;
+static bool gUseCompactFonts = false;
 static std::weak_ptr< LibreOfficeKitClass > gOfficeClass;
 static std::weak_ptr< LibreOfficeKitDocumentClass > gDocumentClass;
 
@@ -6080,7 +6081,7 @@ static char* getLanguages(const char* pCommand)
 return pJson;
 }
 
-static char* getFonts (const char* pCommand)
+static char* getFonts (const char* pCommand, const bool 
bBloatWithRepeatedSizes)
 {
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 if (!pDocSh)
@@ -6089,36 +6090,59 @@ static char* getFonts (const char* pCommand)
 pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
 const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
 
-boost::property_tree::ptree aTree;
-aTree.put("commandName", pCommand);
-boost::property_tree::ptree aValues;
-if ( pList )
+if (!bBloatWithRepeatedSizes)
 {
-sal_uInt16 nFontCount = pList->GetFontNameCount();
-for (sal_uInt16 i = 0; i < nFontCount; ++i)
+tools::JsonWriter aJson;
+aJson.put("commandName", pCommand);
+{
+auto aFontNames = aJson.startArray("FontNames");
+
+sal_uInt16 nFontCount = pList->GetFontNameCount();
+for (sal_uInt16 i = 0; i < nFontCount; ++i)
+aJson.putSimpleValue(pList->GetFontName(i).GetFamilyName());
+}
 {
-boost::property_tree::ptree aChildren;
-const FontMetric& rFontMetric = pList->GetFontName(i);
+auto aFontSizes = aJson.startArray("FontSizes");
 const int* pAry = FontList::GetStdSizeAry();
-sal_uInt16 nSizeCount = 0;
-while (pAry[nSizeCount])
+for (sal_uInt16 i = 0; pAry[i]; ++i)
+
aJson.putSimpleValue(OUString::number(static_cast(pAry[i]) / 10));
+}
+
+return convertOString(aJson.finishAndGetAsOString());
+}
+else // FIXME: remove nonsensical legacy version
+{
+boost::property_tree::ptree aTree;
+aTree.put("commandName", pCommand);
+boost::property_tree::ptree aValues;
+if ( pList )
+{
+sal_uInt16 nFontCount = pList->GetFontNameCount();
+for (sal_uInt16 i = 0; i < nFontCount; ++i)
 {
-boost::property_tree::ptree aChild;
-aChild.put("", static_cast(pAry[nSizeCount]) / 10);
-aChildren.push_back(std::make_pair("", aChild));
-nSizeCount++;
+boost::property_tree::ptree aChildren;
+const FontMetric& rFontMetric = pList->GetFontName(i);
+const int* pAry = FontList::GetStdSizeAry();
+sal_uInt16 nSizeCount = 0;
+while (pAry[nSizeCount])
+{
+boost::property_tree::ptree aChild;
+aChild.put("", static_cast(pAry[nSizeCount]) / 10);
+aChildren.push_back(std::make_pair("", aChild));
+nSizeCount++;
+}
+
aValues.add_child(rFontMetric.GetFamilyName().toUtf8().getStr(), aChildren);
 }
-aValues.add_child(rFontMetric.GetFamilyName(

core.git: sd/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/drviewsk.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5e23cac5767c164b93491d46deef039409ea286c
Author: Caolán McNamara 
AuthorDate: Fri May 17 22:00:07 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:00:20 2024 +0200

Resolves: tdf#161057 draw/impress auto font color not updated on theme 
change

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

diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx
index 92a00d5d2ded..bdbb821e96b3 100644
--- a/sd/source/ui/view/drviewsk.cxx
+++ b/sd/source/ui/view/drviewsk.cxx
@@ -23,7 +23,9 @@ void DrawViewShell::ConfigurationChanged( 
utl::ConfigurationBroadcaster* pCb, Co
 {
 svtools::ColorConfig *pColorConfig = 
dynamic_cast(pCb);
 ConfigureAppBackgroundColor(pColorConfig);
-if (comphelper::LibreOfficeKit::isActive())
+if (!comphelper::LibreOfficeKit::isActive())
+maViewOptions.mnDocBackgroundColor = 
pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor;
+else
 {
 SfxViewShell* pCurrentShell = SfxViewShell::Current();
 ViewShellBase* pShellBase = 
dynamic_cast(pCurrentShell);


core.git: sd/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sd/source/ui/framework/module/NotesPaneModule.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64557ef9fa57507455f196dd3c96e8a25be64c53
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:36:45 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 21:23:41 2024 +0200

cid#1598235 Uninitialized pointer field

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

diff --git a/sd/source/ui/framework/module/NotesPaneModule.hxx 
b/sd/source/ui/framework/module/NotesPaneModule.hxx
index 69a74acbdf0c..229b61e71a89 100644
--- a/sd/source/ui/framework/module/NotesPaneModule.hxx
+++ b/sd/source/ui/framework/module/NotesPaneModule.hxx
@@ -73,7 +73,7 @@ private:
 
 std::set maActiveMainViewContainer;
 OUString msCurrentMainViewURL;
-ViewShellBase* mpViewShellBase;
+ViewShellBase* mpViewShellBase = nullptr;
 bool mbListeningEventMultiplexer = false;
 bool mbInMasterEditMode = false;
 


core.git: sw/source

2024-05-18 Thread Noel Grandin (via logerrit)
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |4 +-
 sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx |2 -
 sw/source/writerfilter/dmapper/PropertyMap.cxx   |   27 +--
 3 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 551c8230b495e8c0e0502b73445f6edd1510633e
Author: Noel Grandin 
AuthorDate: Fri May 17 14:57:56 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat May 18 16:59:15 2024 +0200

use more concrete UNO type in sw/../writerfilter

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

diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 0d6570997e82..2f46d3e977fb 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -3883,7 +3883,7 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType 
ePagePartType, PageTyp
 
 /** Prepares the header/footer text content by first removing the existing
  *  content and adding it to the text append stack. */
-void 
DomainMapper_Impl::prepareHeaderFooterContent(uno::Reference
 const& xPageStyle,
+void 
DomainMapper_Impl::prepareHeaderFooterContent(rtl::Reference 
const& xPageStyle,
PagePartType ePagePartType, 
PropertyIds ePropertyID,
bool 
bAppendToHeaderAndFooterTextStack)
 {
@@ -3921,7 +3921,7 @@ void 
DomainMapper_Impl::checkIfHeaderFooterIsEmpty(PagePartType ePagePartType, P
 
 bool bHeader = ePagePartType == PagePartType::Header;
 
-uno::Reference 
xPageStyle(pSectionContext->GetPageStyle(*this));
+rtl::Reference 
xPageStyle(pSectionContext->GetPageStyle(*this));
 
 if (!xPageStyle.is())
 return;
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
index 052a0a62c156..d54b42e719dd 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
@@ -744,7 +744,7 @@ public:
 void RemoveLastParagraph();
 
 void checkIfHeaderFooterIsEmpty(PagePartType ePagePartType, PageType 
eType);
-void 
prepareHeaderFooterContent(css::uno::Reference const& 
xPageStyle,
+void prepareHeaderFooterContent(rtl::Reference const& 
xPageStyle,
 PagePartType ePagePartType, PropertyIds 
eID,
 bool bAppendToHeaderAndFooterTextStack);
 
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx 
b/sw/source/writerfilter/dmapper/PropertyMap.cxx
index 913dde2bc84e..f52d37764402 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx
@@ -594,11 +594,10 @@ void SectionPropertyMap::SetBorder( BorderPosition ePos, 
sal_Int32 nLineDistance
 
 void SectionPropertyMap::ApplyPaperSource(DomainMapper_Impl& rDM_Impl)
 {
-uno::Reference xFirst;
 // todo: negative spacing (from ww8par6.cxx)
 if (!m_sPageStyleName.isEmpty())
 {
-xFirst = GetPageStyle(rDM_Impl);
+rtl::Reference xFirst = GetPageStyle(rDM_Impl);
 if ( xFirst.is() )
 try
 {
@@ -630,7 +629,7 @@ void SectionPropertyMap::ApplyBorderToPageStyles( 
DomainMapper_Impl& rDM_Impl,
 1 offset from edge of page
 */
 
-uno::Reference xFirst;
+rtl::Reference xFirst;
 // todo: negative spacing (from ww8par6.cxx)
 if (!m_sPageStyleName.isEmpty())
 xFirst = GetPageStyle(rDM_Impl);
@@ -895,8 +894,8 @@ namespace
 {
 
 // Copy the content of the header/footer property to the target style
-void copyHeaderFooterTextProperty(const uno::Reference& 
xSource,
-  const uno::Reference& 
xTarget,
+void copyHeaderFooterTextProperty(const rtl::Reference& xSource,
+  const rtl::Reference& xTarget,
   PropertyIds ePropId)
 {
 if (!xSource.is() || !xTarget.is())
@@ -923,8 +922,8 @@ void copyHeaderFooterTextProperty(const 
uno::Reference& xSo
 }
 
 // Copies all the header and footer content and relevant flags from the source 
style to the target.
-void completeCopyHeaderFooter(const uno::Reference& 
xSourceStyle,
-const uno::Reference& xTargetStyle,
+void completeCopyHeaderFooter(const rtl::Reference& xSourceStyle,
+const rtl::Reference& xTargetStyle,
 bool const bMissingHeader, bool const bMissingFooter)
 {
 if (!xSourceStyle.is() || !xTargetStyle.is())
@@ -994,8 +993,8 @@ void completeCopyHeaderFooter(const 
uno::Reference& xSource
 
 // Copy headers and footers from the previous page style.
 void copyHeaderFooter(const DomainMapper_Impl& rDM_Impl,
-  const uno::Reference< 

core.git: include/svtools svtools/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 include/svtools/editbrowsebox.hxx |2 ++
 svtools/source/brwbox/ebbcontrols.cxx |6 ++
 2 files changed, 8 insertions(+)

New commits:
commit 29ec8099d078182ea461e278c13d4ab869ae3cd9
Author: Caolán McNamara 
AuthorDate: Fri May 17 21:36:40 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 16:34:57 2024 +0200

Resolves: tdf#161133 read-only widget should have deactivated calendar

a problem since:

commit 6e7e19d9c300dbdd279789b09f94781e946fad52
Date:   Wed Jul 15 12:10:32 2020 +0100

weld DateControl

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

diff --git a/include/svtools/editbrowsebox.hxx 
b/include/svtools/editbrowsebox.hxx
index 9dcc6440bb81..8acd3fd760c9 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -829,6 +829,8 @@ namespace svt
 
 void SetDate(const Date& rDate);
 
+virtual void SetEditableReadOnly(bool bReadOnly) override;
+
 virtual void dispose() override;
 private:
 std::unique_ptr m_xMenuButton;
diff --git a/svtools/source/brwbox/ebbcontrols.cxx 
b/svtools/source/brwbox/ebbcontrols.cxx
index 06500b48e0d2..71fc13dde91f 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -586,6 +586,12 @@ namespace svt
 m_xCalendar->set_date(rDate);
 }
 
+void DateControl::SetEditableReadOnly(bool bReadOnly)
+{
+FormattedControlBase::SetEditableReadOnly(bReadOnly);
+m_xMenuButton->set_sensitive(!bReadOnly);
+}
+
 void DateControl::dispose()
 {
 m_xTodayBtn.reset();


core.git: canvas/workben

2024-05-18 Thread Caolán McNamara (via logerrit)
 canvas/workben/canvasdemo.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f0902472462334d76fb3773de7e769590603c0d3
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:38:48 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 16:27:04 2024 +0200

cid#1598237 Uncaught exception

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

diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 175a11222b2b..e910353dd5f4 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -624,7 +625,7 @@ int DemoApp::Main()
 }
 
 ScopedVclPtr aWindow = VclPtr::Create();
-aWindow->Show();
+suppress_fun_call_w_exception(aWindow->Show());
 
 Application::Execute();
 return 0;


Re: Build fail in mariadb on fedora 40

2024-05-18 Thread Julien Nabet

On 18/05/2024 14:51, Dr. David Alan Gilbert wrote:

...
It looks like others started hitting it; see:
   https://gerrit.libreoffice.org/c/core/+/167806
(I believe as a windows user)


Ok.

BTW, I could run a full build on Win10 with master sources updated today 
(but without enable-dbgutil).


I did a make clean and build again with enable-dbgutil.

Exception enable-dbgutil, the autogen.input contains only:

--with-visual-studio=2022

--with-parallelism=1

(this last one is mandatory for me because the build hangs regularly 
without it whereas I disabled Windows Defender on the whole cygwin 
directory).



Hmm I'm using gcc instead, but I don't see how the cast
would be valid:


I'm giving a try right now with gcc instead of clang and with a 
simplified autogen.input (compared with previous one):


-disable-compiler-plugins
--enable-dbus
--enable-werror
--enable-dependency-tracking
--enable-python=fully-internal
--enable-symbols
--with-referenced-git=/home/julien/lo/libreoffice
--with-external-tar=/home/julien/lo/libreoffice/external/tarballs
--enable-avahi
--with-lang=en-US fr



...
so those C_MODE_START/END make me think someone is doing something
funky with the compiler anyway.


Indeed!



core.git: Branch 'libreoffice-24-2' - vcl/qt5

2024-05-18 Thread Michael Weghorn (via logerrit)
 vcl/qt5/QtFrame.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 9497be2e668c19aedc588588bf9dfed9338afe54
Author: Michael Weghorn 
AuthorDate: Fri May 17 17:02:49 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat May 18 15:17:40 2024 +0200

tdf#160565 tdf#145735 qt: Avoid native window handles for Qt 6

Similar to the tdf#122293 scenario with Qt 5 on Wayland,
using native windows causes unresponsive UI even with
the xcb Qt QPA plugin when using Qt 6.

Therefore, don't call `QWidget::winId()` at all when
using Qt 6, but just refuse to resolve a native window
handle, the same way that is already done here for the
wayland Qt QPA plugin with qt5.

Add a comment based on the one originally added with

commit 0e3c3b842e14b9646d3697cf1266be21359e0f13
Author: Michael Weghorn 
Date:   Sat May 11 21:31:33 2019 +0200

tdf#122293 qt5: Use "alien widgets" by default on Wayland

that was later dropped during a refactoring.

This code path is triggered when trying to resolve the
parent window for a file picker (s. `QtFilePicker::initialize`).
In a quick test in a KDE Plasma 5 Wayland session on Debian testing,
the modality behavior was unchanged with or without this change in
place:

* With qt6 xcb, the main window nicely gets grayed out and is
  unresponsive while the file dialog gets shown  when using
  e.g. "File" -> "Open" in Writer.

* With qt6 wayland, the main window is not grayed out and looks
  more "active" still, but doesn't actually accept keyboard
  or mouse input.

This is basically the same in other Qt/KDE applications, e.g.
a self-compiled Kate from git master, so not LO-specific.

If resolving the parent for the file picker turns out to be necessary,
maybe something similar to what commit

commit 3ff4800fe400de916c97f587322104af06cc0879
Author: Caolán McNamara 
Date:   Wed Apr 4 10:22:34 2018 +0100

weld SvInsertOleDlg

and

weld SfxInsertFloatingFrameDialog

and smuggle in the parent widget for the Gtk File dialog via
an XWindow interface

did for gtk3 might be worth looking into.

However, I can at least not reproduce issues like the one described
for gtk3 in

commit 203d96787969f707c78101be18d51b44ace98f93
Author: Caolán McNamara 
Date:   Mon Jun 21 13:01:52 2021 +0100

give folderpicker an optional parent

so, like a file picker, it can make its parent modal while its
operating. Otherwise its possible to interact with the parent 
dialog in
undesirable ways, e.g. file, export as, export as epub, the folder
picker of 'media directory'

with the qt6 VCL plugin even with this commit in place.

Another scenario relying on a native window handle is video
playback with GStreamer's x11 video sink.

That still works for qt5 with the xcb plugin as the handle is
still returned for that one.

For qt6 with the xcb plugin, that didn't work properly
without this commit either (at least not in my tests with
current qtbase dev as of commit
70a2e7f32b9f9ce19d1538f14fbde7b0d1e77ffd), s.
tdf#145735 comment 7.
It's now broken a different way than before
(extra windows show up instead of no video being shown).
This will be further tracked together with a solution for
Wayland in tdf#125219.

As a side note, forcing native windows for everything
using `QT_USE_NATIVE_WINDOWS=1` as described at [1]
causes more sever brokenness with the qt6 xcb plugin
(mostly black window in Writer instead of showing the
actual content).

[1] https://doc.qt.io/qt-6/qwidget.html#native-widgets-vs-alien-widgets

Change-Id: I9718c680bd8bc4ff0574f171403d965c1beac781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167783
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins
(cherry picked from commit 2f4103da5625a9b90eb41d5c767a248a8d0b4255)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167813
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 6aff814aacd2..1c3839a287d9 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -35,6 +35,7 @@
 #include 
 #endif
 
+#include 
 #include 
 #include 
 #include 
@@ -1339,8 +1340,17 @@ void QtFrame::ResolveWindowHandle(SystemEnvData& rData) 
const
 if (!rData.pWidget)
 return;
 assert(rData.platform != SystemEnvData::Platform::Invalid);
-if (rData.platform != SystemEnvData::Platform::Wayland)
+// Calling QWidget::winId() implicitly enables native windows to be used 
instead
+// of "alien widgets" that don't have a native widget ass

core.git: vcl/win

2024-05-18 Thread Mike Kaganski (via logerrit)
 vcl/win/gdi/salprn.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 60600b5bc07487a5e31f643029357211d70c0481
Author: Mike Kaganski 
AuthorDate: Sat May 18 15:28:48 2024 +0500
Commit: Mike Kaganski 
CommitDate: Sat May 18 15:10:55 2024 +0200

WaE: Dereferencing NULL pointer

 C:/lo/core/vcl/win/gdi/salprn.cxx(180): error C2220: the following warning 
is treated as an error
 C:\lo
Change-Id: Id20f4bc308259a706cc55fc8331a5119b2172a14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167807
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 80ea56f2e9f8..6edcc9ac2938 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -166,6 +166,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* 
pList )
 PRINTER_INFO_4W* pWinInfo4 = 
static_cast(std::malloc( nBytes ));
 if ( EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, 
nullptr, 4, reinterpret_cast(pWinInfo4), nBytes, &nBytes, &nInfoPrn4 ) )
 {
+assert(pWinInfo4);
 for ( i = 0; i < nInfoPrn4; i++ )
 {
 std::unique_ptr pInfo(new 
SalPrinterQueueInfo);


Re: Build fail in mariadb on fedora 40

2024-05-18 Thread Dr. David Alan Gilbert
* Julien Nabet (serval2...@yahoo.fr) wrote:
> On 17/05/2024 15:47, Dr. David Alan Gilbert wrote:
> > Hi,
> >I'm getting:
> > 
> > workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.c:87:207:
> >  error: initialization of ‘struct st_mysql_client_plugin *’ from 
> > incompatible pointer type ‘struct st_mysql_client_plugin_AUTHENTICATION *’ 
> > [-Wincompatible-pointer-types]
> > 87 |(struct st_mysql_client_plugin *)&pvio_socket_client_plugin, 
> > (struct st_mysql_client_plugin *)&caching_sha2_password_client_plugin, 
> > (struct st_mysql_client_plugin *)&mysql_native_password_client_plugin, 
> > (struct st_mysql_client_plugin_AUTHENTICATION 
> > *)&auth_gssapi_client_client_plugin,
> >|
> > 
> >^
> > /discs/fast/core/workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.c:87:207:
> >  note: (near initialization for ‘mysql_client_builtins[3]’)
> > make[1]: *** [/discs/fast/core/solenv/gbuild/LinkTarget.mk:366: 
> > /discs/fast/core/workdir/GenCObject/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.o]
> >  Error 1
> > make[1]: *** Waiting for unfinished jobs
> > make: *** [Makefile:294: build] Error 2
> > 
> > Host: Fedora 40, x86-64
> > configured with:
> > ./configure --srcdir=/discs/fast/core --enable-option-checking=fatal 
> > --enable-debug
> > 
> > using --with-system-mariadb fixed it.
> 
> Hello David,

Hi Julien,
  Thanks for the reply.

> Sorry, I don't  know why you encounter this :-(

It looks like others started hitting it; see:
  https://gerrit.libreoffice.org/c/core/+/167806
(I believe as a windows user)

> If it can help, here's the content of my autogen.input:
> 
> CC=clang
> CXX=clang++

Hmm I'm using gcc instead, but I don't see how the cast
would be valid:

UnpackedTarball/mariadb-connector-c/include/mysql/client_plugin.h has:

#include 

struct st_mysql_client_plugin_AUTHENTICATION
{
  MYSQL_CLIENT_PLUGIN_HEADER
  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
};

although, hmm, that header also defines:
#define mysql_declare_client_plugin(X)  \
 struct st_mysql_client_plugin_ ## X\
_mysql_client_plugin_declaration_ = {   \
  MYSQL_CLIENT_ ## X ## _PLUGIN,\
  MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin }

which is curiously different from the system 
/usr/include/mysql/server/mysql/client_plugin.h

#define mysql_declare_client_plugin(X)  \
 C_MODE_START MYSQL_PLUGIN_EXPORT_C \
struct st_mysql_client_plugin_ ## X\
_mysql_client_plugin_declaration_ = {   \
  MYSQL_CLIENT_ ## X ## _PLUGIN,\
  MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin }; C_MODE_END

so those C_MODE_START/END make me think someone is doing something
funky with the compiler anyway.

Dave


> --enable-ld=lld
> --enable-online-update
> --enable-dbgutil
> --enable-evolution2
> --enable-gtk4
> --enable-qt5
> --enable-kf5
> --enable-gtk3-kde5
> --enable-skia=debug
> --enable-ext-nlpsolver
> --enable-ext-numbertext
> --enable-ext-wiki-publisher
> --enable-dbus
> --enable-werror
> --enable-dependency-tracking
> --enable-python=fully-internal
> --without-system-mariadb
> --enable-bundle-mariadb
> --enable-symbols
> --enable-avahi
> --enable-eot
> --enable-odk
> --with-lang=en-US de es fr hu it ja nl pt pt-BR ru nb nn
> --with-myspell-dicts
> 
> Julien
> 
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


core.git: sc/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit b2dc515e2a3c8420c7f39c0b4396632c2086126a
Author: Caolán McNamara 
AuthorDate: Fri May 17 21:05:56 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 14:02:35 2024 +0200

Related: tdf#146326 restore correct focus when on submenu launched

we still "cancel" a submenu if it never gets around to getting launched
so at least set the restore focus wiget to where we initially grab focus.

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 1d720cb3b0dd..45202de94fb4 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -686,11 +686,15 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData
 void ScCheckListMenuControl::GrabFocus()
 {
 if (mxEdSearch->get_visible())
+{
 mxEdSearch->grab_focus();
+meRestoreFocus = RestoreFocus::EdSearch;
+}
 else
 {
 mxMenu->set_cursor(0);
 mxMenu->grab_focus();
+meRestoreFocus = RestoreFocus::Menu;
 }
 }
 


core.git: desktop/source include/sfx2 include/vcl sfx2/source vcl/source

2024-05-18 Thread Michael Meeks (via logerrit)
 desktop/source/lib/init.cxx   |2 +-
 include/sfx2/viewsh.hxx   |1 +
 include/vcl/IDialogRenderable.hxx |3 +++
 include/vcl/svapp.hxx |2 +-
 sfx2/source/view/lokhelper.cxx|3 ++-
 sfx2/source/view/viewsh.cxx   |   23 +++
 vcl/source/app/svapp.cxx  |   16 
 7 files changed, 47 insertions(+), 3 deletions(-)

New commits:
commit e2aab0d02e7be66881f2ac0f08b6ac5007f65648
Author: Michael Meeks 
AuthorDate: Thu May 16 19:35:51 2024 +0100
Commit: Michael Meeks 
CommitDate: Sat May 18 12:34:59 2024 +0200

lok: dump more SfxViewShell state, and LOK notifier state on Windows.

This should help to associate the right view-ids, with the right
windows, and help to catch any stray / lingering windows from closed
sessions - hopefully.

Change-Id: I197a3280d5d2aeddd356ee037c51e4887f43278b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167765
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 8d979fae0c435b820302c76fcfdc2642b4820360)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167684
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2ab701cae3d2..3b4b9f11a4d4 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1637,7 +1637,7 @@ void 
CallbackFlushHandler::libreOfficeKitViewUpdatedCallbackPerViewId(int nType,
 void CallbackFlushHandler::dumpState(rtl::OStringBuffer &rState)
 {
 // NB. no locking
-rState.append("
View:   ");
+rState.append("
View:   ");
 rState.append(static_cast(m_viewId));
 rState.append("
DisableCallbacks:   ");
 rState.append(static_cast(m_nDisableCallbacks));
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index b7461b160af1..71380213b9c9 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -274,6 +274,7 @@ public:
 
 // ILibreOfficeKitNotifier
 virtual voidnotifyWindow(vcl::LOKWindowId nLOKWindowId, 
const OUString& rAction, const std::vector& rPayload = 
std::vector()) const override;
+virtual OString dumpNotifyState() const override;
 
 // Focus, KeyInput, Cursor
 virtual voidShowCursor( bool bOn = true );
diff --git a/include/vcl/IDialogRenderable.hxx 
b/include/vcl/IDialogRenderable.hxx
index 386ed1e865c8..d92eb88ed25c 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -41,6 +41,9 @@ public:
 
 /// Emits a LOK_CALLBACK_INVALIDATE_TILES.
 virtual void notifyInvalidation(tools::Rectangle const *) const = 0;
+
+/// Debugging
+virtual OString dumpNotifyState() const = 0;
 };
 
 } // namespace vcl
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index d5f1739be1ae..2725642763c0 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1326,7 +1326,7 @@ public:
   const std::vector& rPayload 
= std::vector()) const override;
 virtual void libreOfficeKitViewCallback(int nType, const OString& 
pPayload) const override;
 virtual void notifyInvalidation(tools::Rectangle const *) const override;
-
+virtual OString dumpNotifyState() const override;
 
 private:
 DECL_DLLPRIVATE_STATIC_LINK( Application, PostEventHandler, void*, void );
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 756fda428273..549f43906908 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -735,7 +735,8 @@ void 
SfxLokHelper::notifyPartSizeChangedAllViews(vcl::ITiledRenderable* pDoc, in
 SfxViewShell* pViewShell = SfxViewShell::GetFirst();
 while (pViewShell)
 {
-if (pViewShell->getPart() == nPart)
+if (// FIXME should really filter on pViewShell->GetDocId() too
+pViewShell->getPart() == nPart)
 SfxLokHelper::notifyDocumentSizeChanged(pViewShell, ""_ostr, pDoc, 
false);
 pViewShell = SfxViewShell::GetNext(*pViewShell);
 }
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index df122f41054f..b5f010e9b0be 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -3173,6 +3173,20 @@ SfxLokCallbackInterface* 
SfxViewShell::getLibreOfficeKitViewCallback() const
 
 void SfxViewShell::dumpLibreOfficeKitViewState(rtl::OStringBuffer &rState)
 {
+rState.append("
SfxViewShell: ");
+rState.append(OString::number(reinterpret_cast(this), 16));
+rState.append("
DocId:  ");
+auto nDocId = static_cast(GetDocId());
+rState.append(static_cast(nDocId));
+rState.append("
ViewId: ");
+rState.append(static_cast(GetViewShellId()));
+rState.append("
Part:   ");
+rState.append(static_cast(getPart()));
+rState.append("
Lang:   ");
+rState.append(OUStringToOSt

core.git: i18nlangtag/source

2024-05-18 Thread Noel Grandin (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit f1ef9379fd9679775eadeecc598aa8087d09bb77
Author: Noel Grandin 
AuthorDate: Fri May 17 15:59:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat May 18 12:29:08 2024 +0200

cool#8570 single-element cache in MsLangId::getScriptType

this method is hit pretty hard, so try a single element cache

Change-Id: I7c9f9285037a181ee24fbdf04cabc15b40a2ff03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167781
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 18102e3d7f832b8d5e445e427b55654f5bfd30b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167687
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index aa913a7f7ff4..a989fbed75f4 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -364,6 +364,13 @@ bool MsLangId::needsSequenceChecking( LanguageType nLang )
 // static
 sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 {
+// single-element cache
+static thread_local LanguageType nCachedLang = 
LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA;
+static thread_local sal_Int16 nCachedScript = 
css::i18n::ScriptType::COMPLEX;
+
+if (nCachedLang == nLang)
+return nCachedScript;
+
 sal_Int16 nScript;
 
 // CTL
@@ -475,6 +482,8 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 {
 nScript = css::i18n::ScriptType::LATIN;
 }
+nCachedLang = nLang;
+nCachedScript = nScript;
 return nScript;
 }
 


core.git: solenv/bin

2024-05-18 Thread kubak (via logerrit)
 solenv/bin/modules/installer/windows/directory.pm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8d1b7585fb019ea9f6f93be6a9b21cf8597fbfa5
Author: kubak 
AuthorDate: Sat May 4 21:27:37 2024 +0200
Commit: Mike Kaganski 
CommitDate: Sat May 18 12:09:12 2024 +0200

tdf#115357: Set Start Menu folder under Windows to \LibreOffice\

Enhancement request.

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

diff --git a/solenv/bin/modules/installer/windows/directory.pm 
b/solenv/bin/modules/installer/windows/directory.pm
index 659037652055..b0231e34063e 100644
--- a/solenv/bin/modules/installer/windows/directory.pm
+++ b/solenv/bin/modules/installer/windows/directory.pm
@@ -478,7 +478,7 @@ sub add_root_directories
 $baseproductversion = 
$allvariableshashref->{'BASEPRODUCTVERSION'};  # for example "2.0" for OOo
 }
 
-my $realproductkey = $productname . " " . $productversion;
+my $realproductkey = $productname;
 my $productkey = $productname . " " . $baseproductversion;
 
 if (( $allvariableshashref->{'POSTVERSIONEXTENSION'} ) && ( ! 
$allvariableshashref->{'DONTUSEEXTENSIONINDEFAULTDIR'} ))


core.git: sd/inc sd/source

2024-05-18 Thread Gabor Kelemen (via logerrit)
 sd/inc/sdattr.hrc |2 
 sd/source/ui/app/optsitem.cxx |  167 --
 sd/source/ui/app/sdmod2.cxx   |   10 --
 sd/source/ui/inc/optsitem.hxx |   69 -
 4 files changed, 2 insertions(+), 246 deletions(-)

New commits:
commit 563573068fe0835b1fa132d18b53f991be0e15a0
Author: Gabor Kelemen 
AuthorDate: Sun May 12 09:30:02 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Sat May 18 11:52:37 2024 +0200

Drop now unused SdOptionsSnap, SdOptionsSnapItem classes

Change-Id: Ifa2a7b7447e3659ea331ca4c3ec5c05dcc9a5841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167542
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc
index 35f53e47ca9d..20958e1b39d6 100644
--- a/sd/inc/sdattr.hrc
+++ b/sd/inc/sdattr.hrc
@@ -102,7 +102,7 @@ class XColorItem;
 #define ATTR_OPTIONS_START  ATTR_SNAPLINE_END + 1
 #define ATTR_OPTIONS_LAYOUT ATTR_OPTIONS_START + 1
 #define ATTR_OPTIONS_MISC   
TypedWhichId(ATTR_OPTIONS_START + 2)
-#define ATTR_OPTIONS_SNAP   
TypedWhichId(ATTR_OPTIONS_START + 3)
+#define ATTR_OPTIONS_SNAP   ATTR_OPTIONS_START + 3
 #define ATTR_OPTIONS_PRINT  
TypedWhichId(ATTR_OPTIONS_START + 4)
 #define ATTR_OPTIONS_ENDATTR_OPTIONS_PRINT
 
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index ac67a935e16d..9b1ec49f85a5 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -515,171 +515,6 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) 
const
 pOpts->SetDragThreshold( maOptionsMisc.GetDragThresholdPixels() );
 }
 
-/*
-|*
-|* SdOptionsSnap
-|*
-\/
-
-SdOptionsSnap::SdOptionsSnap( bool bImpress, bool bUseConfig ) :
-SdOptionsGeneric( bImpress, bUseConfig ?
-  ( bImpress ?
-OUString( "Office.Impress/Snap" ) :
-OUString( "Office.Draw/Snap" ) ) :
-  OUString() ),
-bSnapHelplines( true ),
-bSnapBorder( true ),
-bSnapFrame( false ),
-bSnapPoints( false ),
-bOrtho( false ),
-bBigOrtho( true ),
-bRotate( false ),
-nSnapArea( 5 ),
-nAngle( 1500 ),
-nBezAngle( 1500 )
-
-{
-EnableModify( true );
-}
-
-bool SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
-{
-return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
-IsSnapBorder() == rOpt.IsSnapBorder() &&
-IsSnapFrame() == rOpt.IsSnapFrame() &&
-IsSnapPoints() == rOpt.IsSnapPoints() &&
-IsOrtho() == rOpt.IsOrtho() &&
-IsBigOrtho() == rOpt.IsBigOrtho() &&
-IsRotate() == rOpt.IsRotate() &&
-GetSnapArea() == rOpt.GetSnapArea() &&
-GetAngle() == rOpt.GetAngle() &&
-GetEliminatePolyPointLimitAngle() == 
rOpt.GetEliminatePolyPointLimitAngle() );
-}
-
-void SdOptionsSnap::GetPropNameArray( const char**& ppNames, sal_uLong& rCount 
) const
-{
-static const char* aPropNames[] =
-{
-"Object/SnapLine",
-"Object/PageMargin",
-"Object/ObjectFrame",
-"Object/ObjectPoint",
-"Position/CreatingMoving",
-"Position/ExtendEdges",
-"Position/Rotating",
-"Object/Range",
-"Position/RotatingValue",
-"Position/PointReduction"
-};
-
-rCount = SAL_N_ELEMENTS(aPropNames);
-ppNames = aPropNames;
-}
-
-bool SdOptionsSnap::ReadData( const Any* pValues )
-{
-if( pValues[0].hasValue() ) SetSnapHelplines( 
*o3tl::doAccess(pValues[ 0 ]) );
-if( pValues[1].hasValue() ) SetSnapBorder( *o3tl::doAccess(pValues[ 
1 ]) );
-if( pValues[2].hasValue() ) SetSnapFrame( *o3tl::doAccess(pValues[ 2 
]) );
-if( pValues[3].hasValue() ) SetSnapPoints( *o3tl::doAccess(pValues[ 
3 ]) );
-if( pValues[4].hasValue() ) SetOrtho( *o3tl::doAccess(pValues[ 4 ]) 
);
-if( pValues[5].hasValue() ) SetBigOrtho( *o3tl::doAccess(pValues[ 5 
]) );
-if( pValues[6].hasValue() ) SetRotate( *o3tl::doAccess(pValues[ 6 ]) 
);
-if( pValues[7].hasValue() ) SetSnapArea( 
static_cast(*o3tl::doAccess(pValues[ 7 ])) );
-if( pValues[8].hasValue() ) SetAngle( 
Degree100(*o3tl::doAccess(pValues[ 8 ])) );
-if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( 
Degree100(*o3tl::doAccess(pValues[ 9 ])) );
-
-return true;
-}
-
-bool SdOptionsSnap::WriteData( Any* pValues ) const
-{
-pValues[ 0 ] <<= IsSnapHelplines();
-pValues[ 1 ] <<= IsSnapBorder();
-pValues[ 2 ] <<= IsSnapFrame();
-pValues[ 3 ] <<= IsSnapPoints();
-pValues[ 4 ] <<= IsOrtho();
-pValues[ 5 ] <<= IsBigOrtho();
-pValues[ 6 ] <<= IsRotate();
-pValues[ 7 ] <<= static_cast(GetSnapArea());
-pValues[ 8 ] <<= static_cast(GetAngle

core.git: Branch 'distro/vector/vector-7.5.9' - drawinglayer/source include/vcl vcl/source vcl/win

2024-05-18 Thread Mike Kaganski (via logerrit)
 drawinglayer/source/processor2d/vclprocessor2d.cxx |   24 -
 include/vcl/outdev.hxx |5 
 include/vcl/vcllayout.hxx  |6 +
 vcl/source/outdev/text.cxx |2 -
 vcl/win/gdi/DWriteTextRenderer.cxx |8 ---
 5 files changed, 31 insertions(+), 14 deletions(-)

New commits:
commit 368bc2b821dde56379c9a4c3acfcc3143efbdf6d
Author: Mike Kaganski 
AuthorDate: Fri May 17 20:40:37 2024 +0500
Commit: Mike Kaganski 
CommitDate: Sat May 18 14:46:38 2024 +0500

tdf#161154: pass "scaling is done externally" information down the stack

VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D does the
scaling, taking into account the font scaling. Before commit
8557ea84c9336ba8061246f1f46ddb6e02f413a1, D2DWriteTextOutRenderer was
doing own scaling in addition, but it seems that it somehow didn't
affect the result much. The said commit removed the scalng from
D2DWriteTextOutRenderer. As tdf#160901 demonstrated, the scaling is
necessary in different code paths - and it turns out, that we need to
know, if the caller does its own scaling or not, to make a decision,
if the scaling should be fone in D2DWriteTextOutRenderer.

This hack passes this from VclProcessor2D to D2DWriteTextOutRenderer
through OutputDevice. Thanks to Miklos for the isea. I still don't
understand, why all this seemingly doesn't affect other renderers.

Change-Id: I001036f4574898b8e7606652525638df43c35240

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 109be5cd40f9..f401c220f170 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -428,17 +428,21 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
 mpOutputDevice->SetFont(aFont);
 mpOutputDevice->SetTextColor(Color(aRGBFontColor));
 
-if (!aDXArray.empty())
 {
-const SalLayoutGlyphs* pGlyphs = 
SalLayoutGlyphsCache::self()->GetLayoutGlyphs(
-mpOutputDevice, aText, nPos, nLen);
-mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray,
-  
rTextCandidate.getKashidaArray(), nPos, nLen,
-  SalLayoutFlags::NONE, pGlyphs);
-}
-else
-{
-mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen);
+// For D2DWriteTextOutRenderer, we must pass a flag to not use 
font scaling
+auto guard = mpOutputDevice->ScopedNoFontScaling();
+if (!aDXArray.empty())
+{
+const SalLayoutGlyphs* pGlyphs = 
SalLayoutGlyphsCache::self()->GetLayoutGlyphs(
+mpOutputDevice, aText, nPos, nLen);
+mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray,
+  
rTextCandidate.getKashidaArray(), nPos, nLen,
+  SalLayoutFlags::NONE, 
pGlyphs);
+}
+else
+{
+mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen);
+}
 }
 
 if (rTextCandidate.getFontAttribute().getRTL())
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 098a5ccc5ef0..7142fee006df 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -258,6 +259,8 @@ private:
 mutable boolmbRefPoint : 1;
 mutable boolmbEnableRTL : 1;
 
+bool mbNoFontScaling = false; // Used only by D2DWriteTextOutRenderer
+
 protected:
 mutable std::shared_ptr 
mxFontCollection;
 mutable std::shared_ptr mxFontCache;
@@ -340,6 +343,8 @@ public:
 /// request XSpriteCanvas render interface
 css::uno::Reference< css::rendering::XSpriteCanvas > GetSpriteCanvas() 
const;
 
+auto ScopedNoFontScaling() { return 
comphelper::FlagRestorationGuard(mbNoFontScaling, true); }
+
 protected:
 
 /** Acquire a graphics device that the output device uses to draw on.
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index 887480ce3ee9..a70fdaaddc1c 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -110,6 +111,9 @@ public:
 
 virtual SalLayoutGlyphs GetGlyphs() const;
 
+auto ScopedFontScaling(bool v) { return 
comphelper::FlagRestorationGuard(mbScaleFont, v); }
+bool ScaleFont() const { return mbScaleFont; }
+
 protected:
 // used by layout engines
 SalLayout();
@@ -118,6 +1

core.git: sfx2/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objxtor.cxx  |6 +++---
 sfx2/source/view/viewfrm.cxx |8 
 sfx2/source/view/viewsh.cxx  |8 
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit fe599b2e081aa671d19ccbcea922c201f66eb955
Author: Caolán McNamara 
AuthorDate: Fri May 17 17:01:47 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 11:34:09 2024 +0200

drop SAL_RET_MAYBENULL from bodies

looks like we can get away without it and its tidier for us
if we don't need to do it

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

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index deb64e6186ac..592b1e7468a5 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -458,7 +458,7 @@ OUString SfxObjectShell::CreateShellID( const 
SfxObjectShell* pShell )
 
 // returns a pointer the first SfxDocument of specified type
 
-SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetFirst
+SfxObjectShell* SfxObjectShell::GetFirst
 (
 const std::function& isObjectShell,
 bool  bOnlyVisible
@@ -483,7 +483,7 @@ SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetFirst
 
 // returns a pointer to the next SfxDocument of specified type behind *pDoc
 
-SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetNext
+SfxObjectShell* SfxObjectShell::GetNext
 (
 const SfxObjectShell&   rPrev,
 const std::function& isObjectShell,
@@ -512,7 +512,7 @@ SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetNext
 return nullptr;
 }
 
-SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::Current()
+SfxObjectShell* SfxObjectShell::Current()
 {
 SfxViewFrame *pFrame = SfxViewFrame::Current();
 return pFrame ? pFrame->GetObjectShell() : nullptr;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1838700e9cb1..c77de75697fc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2067,14 +2067,14 @@ void SfxViewFrame::KillDispatcher_Impl()
 }
 }
 
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::Current()
+SfxViewFrame* SfxViewFrame::Current()
 {
 SfxApplication* pApp = SfxApplication::Get();
 return pApp ? pApp->Get_Impl()->pViewFrame : nullptr;
 }
 
 // returns the first window of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::GetFirst
+SfxViewFrame* SfxViewFrame::GetFirst
 (
 const SfxObjectShell*   pDoc,
 boolbOnlyIfVisible
@@ -2097,7 +2097,7 @@ SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::GetFirst
 }
 
 // returns the next window of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::GetNext
+SfxViewFrame* SfxViewFrame::GetNext
 (
 const SfxViewFrame& rPrev,
 const SfxObjectShell*   pDoc,
@@ -2448,7 +2448,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( 
SfxObjectShell const & i_rDoc, c
 );
 }
 
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::Get( const Reference< 
XController>& i_rController, const SfxObjectShell* i_pDoc )
+SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, 
const SfxObjectShell* i_pDoc )
 {
 if ( !i_rController.is() )
 return nullptr;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 5204f8306c67..df122f41054f 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -2835,7 +2835,7 @@ bool SfxViewShell::PrepareClose
 return true;
 }
 
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::Current()
+SfxViewShell* SfxViewShell::Current()
 {
 SfxViewFrame *pCurrent = SfxViewFrame::Current();
 return pCurrent ? pCurrent->GetViewShell() : nullptr;
@@ -2849,7 +2849,7 @@ bool SfxViewShell::IsCurrentLokViewReadOnly()
 return pCurrent && pCurrent->IsLokReadOnlyView();
 }
 
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::Get( const Reference< 
XController>& i_rController )
+SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
 {
 if ( !i_rController.is() )
 return nullptr;
@@ -3009,7 +3009,7 @@ void SfxViewShell::WriteUserDataSequence ( uno::Sequence 
< beans::PropertyValue
 
 
 // returns the first shell of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::GetFirst
+SfxViewShell* SfxViewShell::GetFirst
 (
 bool  bOnlyVisible,
 const std::function< bool ( const SfxViewShell& ) >& isViewShell
@@ -3038,7 +3038,7 @@ SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::GetFirst
 }
 
 // returns the next shell of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::GetNext
+SfxViewShell* SfxViewShell::GetNext
 (
 const SfxViewShell& rPrev,
 boolbOnlyVisible,


core.git: drawinglayer/source include/vcl vcl/source vcl/win

2024-05-18 Thread Mike Kaganski (via logerrit)
 drawinglayer/source/processor2d/vclprocessor2d.cxx |   24 -
 include/vcl/outdev.hxx |5 
 include/vcl/vcllayout.hxx  |6 +
 vcl/source/outdev/text.cxx |2 -
 vcl/win/gdi/DWriteTextRenderer.cxx |8 ---
 5 files changed, 31 insertions(+), 14 deletions(-)

New commits:
commit 2092df2a9044f1c2ae4379f48a3201e5867575a8
Author: Mike Kaganski 
AuthorDate: Fri May 17 20:40:37 2024 +0500
Commit: Mike Kaganski 
CommitDate: Sat May 18 11:03:58 2024 +0200

tdf#161154: pass "scaling is done externally" information down the stack

VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D does the
scaling, taking into account the font scaling. Before commit
8557ea84c9336ba8061246f1f46ddb6e02f413a1, D2DWriteTextOutRenderer was
doing own scaling in addition, but it seems that it somehow didn't
affect the result much. The said commit removed the scalng from
D2DWriteTextOutRenderer. As tdf#160901 demonstrated, the scaling is
necessary in different code paths - and it turns out, that we need to
know, if the caller does its own scaling or not, to make a decision,
if the scaling should be fone in D2DWriteTextOutRenderer.

This hack passes this from VclProcessor2D to D2DWriteTextOutRenderer
through OutputDevice. Thanks to Miklos for the isea. I still don't
understand, why all this seemingly doesn't affect other renderers.

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

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 3cfec4af8b8d..c245389fdcb5 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -439,17 +439,21 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
 mpOutputDevice->SetFont(aFont);
 mpOutputDevice->SetTextColor(Color(aRGBFontColor));
 
-if (!aDXArray.empty())
 {
-const SalLayoutGlyphs* pGlyphs = 
SalLayoutGlyphsCache::self()->GetLayoutGlyphs(
-mpOutputDevice, aText, nPos, nLen);
-mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray,
-  
rTextCandidate.getKashidaArray(), nPos, nLen,
-  SalLayoutFlags::NONE, pGlyphs);
-}
-else
-{
-mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen);
+// For D2DWriteTextOutRenderer, we must pass a flag to not use 
font scaling
+auto guard = mpOutputDevice->ScopedNoFontScaling();
+if (!aDXArray.empty())
+{
+const SalLayoutGlyphs* pGlyphs = 
SalLayoutGlyphsCache::self()->GetLayoutGlyphs(
+mpOutputDevice, aText, nPos, nLen);
+mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray,
+  
rTextCandidate.getKashidaArray(), nPos, nLen,
+  SalLayoutFlags::NONE, 
pGlyphs);
+}
+else
+{
+mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen);
+}
 }
 
 if (rTextCandidate.getFontAttribute().getRTL())
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index ab1758835ce1..6dbb9acf7f32 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -260,6 +261,8 @@ private:
 mutable boolmbRefPoint : 1;
 mutable boolmbEnableRTL : 1;
 
+bool mbNoFontScaling = false; // Used only by D2DWriteTextOutRenderer
+
 protected:
 mutable std::shared_ptr 
mxFontCollection;
 mutable std::shared_ptr mxFontCache;
@@ -342,6 +345,8 @@ public:
 /// request XSpriteCanvas render interface
 css::uno::Reference< css::rendering::XSpriteCanvas > GetSpriteCanvas() 
const;
 
+auto ScopedNoFontScaling() { return 
comphelper::FlagRestorationGuard(mbNoFontScaling, true); }
+
 protected:
 
 /** Acquire a graphics device that the output device uses to draw on.
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index dd0747eae3ec..9370c69ded2e 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -120,6 +121,9 @@ public:
 
 virtual SalLayoutGlyphs GetGlyphs() const;
 
+auto ScopedFontScaling(bool v) { return 
comphelper::FlagRestorationGuard(mbScaleFont, v); }