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

2023-07-04 Thread Mike Kaganski (via logerrit)
 sw/inc/autostyle_helper.hxx   |   31 
+++
 sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx |   17 +
 sw/source/core/unocore/unoobj.cxx |   52 
+
 sw/source/core/unocore/unostyle.cxx   |   67 
--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |   99 
++
 6 files changed, 213 insertions(+), 53 deletions(-)

New commits:
commit 1db2c58efedb36703ae39f42dc21c6796b1fd675
Author: Mike Kaganski 
AuthorDate: Tue Jul 4 08:14:02 2023 +0300
Commit: Miklos Vajna 
CommitDate: Wed Jul 5 08:15:03 2023 +0200

tdf#141969: use paragraph autostyle to mimic Word's table style

Word's table styles may define paragraph and character properties. They are
handled in DomainMapperTableHandler::ApplyParagraphPropertiesFromTableStyle.

When setting such a character property using setPropertyValue, it may apply
to the text runs inside the paragraph, overriding values from character
style and direct formatting, which must be kept.

To fix that, this change creates a *paragraph* autostyle first, containing
the properties; and then applies only this autostyle to the paragraph; the
autostyle can't apply to runs, so the properties apply at paragraph level.

Sadly, it is impossible to create a useful autostyle in writerfilter using
UNO, because of the same problem that caused tdf#155945. UNO properties
may define only parts of complex SfxPoolItem; setting them without having
already applied values of such SfxPoolItem's would create wrong values for
properties that weren't set by the UNO properties, but happen to share the
same SfxPoolItem. To workaround that in writerfilter, a map of UNO names
to sets of UNO names defining the complex property would be required, and
then maintained.

Instead, introduce a hidded 'ParaAutoStyleDef' property of SwXTextCursor,
taking the same PropertyValue sequence as in XAutoStyleFamily::insertStyle.
Implement it similarly to SwUnoCursorHelper::SetPropertyValues: first,
build a WhichRangesContainer for specific WIDs needed for the properties;
then obtain the actual values for these WIDs from the paragraph; and then
set properties from the PropertyValue sequence.

To create the autostyle properly, the code from 
SwXAutoStyleFamily::insertStyle
is reused.

There are more "proper" ways to fix this in part or as a whole, e.g.:

* Split all complex SfxPoolItem's to simple ones, as done for one of them
  in commit db115bec9254417ef7a3faf687478fe5424ab378 (tdf#78510 sw,cui:
  split SvxLRSpaceItem for SwTextNode, SwTextFormatColl, 2023-02-24);

* Rewrite writerfilter in sw;

* Implement the missing proper table styles with paragraph and character
  properties, having the same precedence.

But I don't feel crazy enough for any of these :D

Change-Id: I07142cb23e8ec51f0e8ac8609f367ba247d94438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153947
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154010
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/autostyle_helper.hxx b/sw/inc/autostyle_helper.hxx
new file mode 100644
index ..9336085db02e
--- /dev/null
+++ b/sw/inc/autostyle_helper.hxx
@@ -0,0 +1,31 @@
+/* -*- 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 
+
+#include 
+#include 
+
+#include 
+
+#include "istyleaccess.hxx"
+#include "swatrset.hxx"
+
+class SwDoc;
+
+std::shared_ptr
+PropValuesToAutoStyleItemSet(SwDoc& rDoc, IStyleAccess::SwAutoStyleFamily 
eFamily,
+ const 
css::uno::Sequence& Values,
+ SfxItemSet& rSet);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git 
a/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx 
b/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx
new file mode 100644
index ..6cbb8fb72e9d
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index a8e0c64c8712..ca1aeafccc5e 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -1132,6 +1132,23 @@ CPPUNIT_TEST_FIXT

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

2023-07-04 Thread Maxim Monastirsky (via logerrit)
 svx/source/sidebar/text/TextPropertyPanel.cxx |8 --
 svx/source/sidebar/text/TextPropertyPanel.hxx |2 -
 svx/uiconfig/ui/sidebartextpanel.ui   |   32 +++---
 sw/uiconfig/sglobal/toolbar/textstylebar.xml  |2 -
 sw/uiconfig/swriter/toolbar/textstylebar.xml  |2 -
 sw/uiconfig/swriter/ui/notebookbar_groups.ui  |2 -
 6 files changed, 8 insertions(+), 40 deletions(-)

New commits:
commit c0f1f67bfd2853554b58127e91443526c44163d7
Author: Maxim Monastirsky 
AuthorDate: Wed Jul 5 01:28:05 2023 +0300
Commit: Maxim Monastirsky 
CommitDate: Wed Jul 5 08:14:20 2023 +0200

Swap .uno:FontColor for .uno:Color

Following tdf#105293, which left some UI elements unchanged.
This also simplifies the sidebar, as .uno:Color is universal
while .uno:FontColor works only with Writer text. It also
benefits tdf#154270, as using the same command in the toolbar
and the sidebar will keep their color in sync.

Change-Id: Ia6e1ffef4012b6f8db4c9079d0b0c99a59887670
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154012
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx 
b/svx/source/sidebar/text/TextPropertyPanel.cxx
index d5bfc2a480df..5b4e907cd86b 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -49,9 +49,7 @@ TextPropertyPanel::TextPropertyPanel(weld::Widget* pParent, 
const css::uno::Refe
 , mxFontEffectsDispatch(new ToolbarUnoDispatcher(*mxFontEffects, 
*m_xBuilder, rxFrame))
 , mxFontAdjust(m_xBuilder->weld_toolbar("fontadjust"))
 , mxFontAdjustDispatch(new ToolbarUnoDispatcher(*mxFontAdjust, 
*m_xBuilder, rxFrame))
-, mxToolBoxFontColorSw(m_xBuilder->weld_toolbar("colorbar_writer"))
-, mxToolBoxFontColorSwDispatch(new 
ToolbarUnoDispatcher(*mxToolBoxFontColorSw, *m_xBuilder, rxFrame))
-, mxToolBoxFontColor(m_xBuilder->weld_toolbar("colorbar_others"))
+, mxToolBoxFontColor(m_xBuilder->weld_toolbar("colorbar"))
 , mxToolBoxFontColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxFontColor, 
*m_xBuilder, rxFrame))
 , mxToolBoxBackgroundColor(m_xBuilder->weld_toolbar("colorbar_background"))
 , mxToolBoxBackgroundColorDispatch(new 
ToolbarUnoDispatcher(*mxToolBoxBackgroundColor, *m_xBuilder, rxFrame))
@@ -78,7 +76,6 @@ TextPropertyPanel::~TextPropertyPanel()
 mxDefaultBarDispatch.reset();
 mxPositionBarDispatch.reset();
 mxSpacingBarDispatch.reset();
-mxToolBoxFontColorSwDispatch.reset();
 mxToolBoxFontColorDispatch.reset();
 mxToolBoxBackgroundColorDispatch.reset();
 mxFontAdjustDispatch.reset();
@@ -90,7 +87,6 @@ TextPropertyPanel::~TextPropertyPanel()
 mxDefaultBar.reset();
 mxPositionBar.reset();
 mxSpacingBar.reset();
-mxToolBoxFontColorSw.reset();
 mxToolBoxFontColor.reset();
 mxToolBoxBackgroundColor.reset();
 mxFontAdjust.reset();
@@ -143,8 +139,6 @@ void TextPropertyPanel::HandleContextChange (
 break;
 }
 
-mxToolBoxFontColor->set_visible(!bWriterText);
-mxToolBoxFontColorSw->set_visible(bWriterText);
 mxToolBoxBackgroundColor->set_visible(bWriterText || bDrawText);
 mxResetBar->set_visible(bWriterText || bCalcText);
 mxDefaultBar->set_visible(bDrawText);
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx 
b/svx/source/sidebar/text/TextPropertyPanel.hxx
index 3ad44bde78ac..c383ef1bd891 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -53,8 +53,6 @@ private:
 std::unique_ptr mxFontEffectsDispatch;
 std::unique_ptr mxFontAdjust;
 std::unique_ptr mxFontAdjustDispatch;
-std::unique_ptr mxToolBoxFontColorSw;
-std::unique_ptr mxToolBoxFontColorSwDispatch;
 std::unique_ptr mxToolBoxFontColor;
 std::unique_ptr mxToolBoxFontColorDispatch;
 std::unique_ptr mxToolBoxBackgroundColor;
diff --git a/svx/uiconfig/ui/sidebartextpanel.ui 
b/svx/uiconfig/ui/sidebartextpanel.ui
index 732c3ee421ed..97a92d97a0f5 100644
--- a/svx/uiconfig/ui/sidebartextpanel.ui
+++ b/svx/uiconfig/ui/sidebartextpanel.ui
@@ -161,31 +161,7 @@
 False
 6
 
-  
-True
-True
-icons
-False
-2
-
-  
-True
-True
-  
-  
-False
-False
-  
-
-  
-  
-False
-True
-0
-  
-
-
-  
+  
 True
 True
 icons
@@ -205,7 +181,7 @@
   
 False
 True
-1
+0
   

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - external/libxslt

2023-07-04 Thread Stephan Bergmann (via logerrit)
 external/libxslt/ExternalPackage_libxslt.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2808d5a6874d5956d99e02feb0fbf55a7343d63c
Author: Stephan Bergmann 
AuthorDate: Tue Jul 4 08:31:28 2023 +0200
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Wed Jul 5 07:40:06 2023 +0200

Fix Linux --without-system-libxml build

...after 362dfc50a28a918ec73609a00d2851eb3058375d "libxslt: upgrade to 
release
1.1.38"

Change-Id: Id0ebf5676f79c43bb4fab3a33a2a19e303881aef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153942
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit d1fc1c326470461def5ab092a311afee31950880)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154000
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/external/libxslt/ExternalPackage_libxslt.mk 
b/external/libxslt/ExternalPackage_libxslt.mk
index c22a2e1b5dad..c1a8ee1217f1 100644
--- a/external/libxslt/ExternalPackage_libxslt.mk
+++ b/external/libxslt/ExternalPackage_libxslt.mk
@@ -25,7 +25,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dl
 endif
 else # OS!=WNT
 $(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.$(LIBXSLT_VERSION_MICRO)))
-$(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.20))
+$(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.21))
 endif
 endif # DISABLE_DYNLOADING
 


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

2023-07-04 Thread Mike Kaganski (via logerrit)
 sw/inc/autostyle_helper.hxx   |   31 
+++
 sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx |   17 +
 sw/source/core/unocore/unoobj.cxx |   52 
+
 sw/source/core/unocore/unostyle.cxx   |   67 
--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |   99 
++
 6 files changed, 213 insertions(+), 53 deletions(-)

New commits:
commit cece082f1b94e448ea807d22a1d177c33635406c
Author: Mike Kaganski 
AuthorDate: Tue Jul 4 08:14:02 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jul 5 07:17:56 2023 +0200

tdf#141969: use paragraph autostyle to mimic Word's table style

Word's table styles may define paragraph and character properties. They are
handled in DomainMapperTableHandler::ApplyParagraphPropertiesFromTableStyle.

When setting such a character property using setPropertyValue, it may apply
to the text runs inside the paragraph, overriding values from character
style and direct formatting, which must be kept.

To fix that, this change creates a *paragraph* autostyle first, containing
the properties; and then applies only this autostyle to the paragraph; the
autostyle can't apply to runs, so the properties apply at paragraph level.

Sadly, it is impossible to create a useful autostyle in writerfilter using
UNO, because of the same problem that caused tdf#155945. UNO properties
may define only parts of complex SfxPoolItem; setting them without having
already applied values of such SfxPoolItem's would create wrong values for
properties that weren't set by the UNO properties, but happen to share the
same SfxPoolItem. To workaround that in writerfilter, a map of UNO names
to sets of UNO names defining the complex property would be required, and
then maintained.

Instead, introduce a hidded 'ParaAutoStyleDef' property of SwXTextCursor,
taking the same PropertyValue sequence as in XAutoStyleFamily::insertStyle.
Implement it similarly to SwUnoCursorHelper::SetPropertyValues: first,
build a WhichRangesContainer for specific WIDs needed for the properties;
then obtain the actual values for these WIDs from the paragraph; and then
set properties from the PropertyValue sequence.

To create the autostyle properly, the code from 
SwXAutoStyleFamily::insertStyle
is reused.

There are more "proper" ways to fix this in part or as a whole, e.g.:

* Split all complex SfxPoolItem's to simple ones, as done for one of them
  in commit db115bec9254417ef7a3faf687478fe5424ab378 (tdf#78510 sw,cui:
  split SvxLRSpaceItem for SwTextNode, SwTextFormatColl, 2023-02-24);

* Rewrite writerfilter in sw;

* Implement the missing proper table styles with paragraph and character
  properties, having the same precedence.

But I don't feel crazy enough for any of these :D

Change-Id: I07142cb23e8ec51f0e8ac8609f367ba247d94438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153947
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit b036e563e699595fa7625888f11ab0c76f1abd66)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153989

diff --git a/sw/inc/autostyle_helper.hxx b/sw/inc/autostyle_helper.hxx
new file mode 100644
index ..9336085db02e
--- /dev/null
+++ b/sw/inc/autostyle_helper.hxx
@@ -0,0 +1,31 @@
+/* -*- 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 
+
+#include 
+#include 
+
+#include 
+
+#include "istyleaccess.hxx"
+#include "swatrset.hxx"
+
+class SwDoc;
+
+std::shared_ptr
+PropValuesToAutoStyleItemSet(SwDoc& rDoc, IStyleAccess::SwAutoStyleFamily 
eFamily,
+ const 
css::uno::Sequence& Values,
+ SfxItemSet& rSet);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git 
a/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx 
b/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx
new file mode 100644
index ..6cbb8fb72e9d
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 20b190d59af6..a0a4d8051686 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.c

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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 sc/qa/unit/ThemeImportExportTest.cxx |   61 +--
 1 file changed, 38 insertions(+), 23 deletions(-)

New commits:
commit cf2356bf647bd3edf63cb98dc56d627916597a03
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 30 15:46:22 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 5 03:20:58 2023 +0200

sc: test export of model::Theme into theme1.xml with xpath

Change-Id: I9b2b61a5ae93a0738fb90aa20b20f9a9ecc7272b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153786
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 8164915520b27b655372e7521b2a58978516f88d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153920

diff --git a/sc/qa/unit/ThemeImportExportTest.cxx 
b/sc/qa/unit/ThemeImportExportTest.cxx
index 0cf03ea6c010..c04a90dc6f54 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -34,30 +34,45 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExport)
 
 save("Calc Office Open XML");
 
-xmlDocUniquePtr pXmlDoc = parseExport("xl/styles.xml");
-
-assertXPath(pXmlDoc, "/x:styleSheet", 1);
-
-// Fonts
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font", 6);
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[5]/x:color", "theme", 
"7");
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[6]/x:color", "rgb", 
"FF9C5700");
-
-// Fills
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill", 4);
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[1]/x:patternFill", 
"patternType", "none");
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[2]/x:patternFill", 
"patternType", "gray125");
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[3]/x:patternFill", 
"patternType", "solid");
-assertXPath(pXmlDoc, 
"/x:styleSheet/x:fills/x:fill[3]/x:patternFill/x:fgColor", "rgb",
-"EB9C");
+{
+xmlDocUniquePtr pXmlDoc = parseExport("xl/theme/theme1.xml");
+OString aClrScheme = "/a:theme/a:themeElements/a:clrScheme";
+assertXPath(pXmlDoc, aClrScheme, "name", "Office");
+assertXPath(pXmlDoc, aClrScheme + "/a:dk1/a:srgbClr", "val", "00");
+assertXPath(pXmlDoc, aClrScheme + "/a:lt1/a:srgbClr", "val", "ff");
+assertXPath(pXmlDoc, aClrScheme + "/a:dk2/a:srgbClr", "val", "44546a");
+assertXPath(pXmlDoc, aClrScheme + "/a:lt2/a:srgbClr", "val", "e7e6e6");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent1/a:srgbClr", "val", 
"4472c4");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent2/a:srgbClr", "val", 
"ed7d31");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent3/a:srgbClr", "val", 
"a5a5a5");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent4/a:srgbClr", "val", 
"ffc000");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent5/a:srgbClr", "val", 
"5b9bd5");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent6/a:srgbClr", "val", 
"70ad47");
+assertXPath(pXmlDoc, aClrScheme + "/a:hlink/a:srgbClr", "val", 
"0563c1");
+assertXPath(pXmlDoc, aClrScheme + "/a:folHlink/a:srgbClr", "val", 
"954f72");
+}
 
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[4]/x:patternFill", 
"patternType", "solid");
-assertXPath(pXmlDoc, 
"/x:styleSheet/x:fills/x:fill[4]/x:patternFill/x:fgColor", "theme", "4");
+{
+xmlDocUniquePtr pXmlDoc = parseExport("xl/styles.xml");
+
+assertXPath(pXmlDoc, "/x:styleSheet", 1);
+
+// Fonts
+OString aFont = "/x:styleSheet/x:fonts/x:font";
+assertXPath(pXmlDoc, aFont, 6);
+assertXPath(pXmlDoc, aFont + "[5]/x:color", "theme", "7");
+assertXPath(pXmlDoc, aFont + "[6]/x:color", "rgb", "FF9C5700");
+
+// Fills
+OString aFill = "/x:styleSheet/x:fills/x:fill";
+assertXPath(pXmlDoc, aFill, 4);
+assertXPath(pXmlDoc, aFill + "[1]/x:patternFill", "patternType", 
"none");
+assertXPath(pXmlDoc, aFill + "[2]/x:patternFill", "patternType", 
"gray125");
+assertXPath(pXmlDoc, aFill + "[3]/x:patternFill", "patternType", 
"solid");
+assertXPath(pXmlDoc, aFill + "[3]/x:patternFill/x:fgColor", "rgb", 
"EB9C");
+assertXPath(pXmlDoc, aFill + "[4]/x:patternFill", "patternType", 
"solid");
+assertXPath(pXmlDoc, aFill + "[4]/x:patternFill/x:fgColor", "theme", 
"4");
+}
 }
 
 // Round 100th percent to percent value - so that small differences don't fail 
the test


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

2023-07-04 Thread Laurent Balland (via logerrit)
 chart2/source/controller/main/ControllerCommandDispatch.cxx |   13 ---
 chart2/source/inc/RegressionCurveHelper.hxx |1 
 chart2/source/tools/RegressionCurveHelper.cxx   |   14 
 chart2/source/tools/RegressionCurveModel.cxx|1 
 chart2/source/tools/RegressionEquation.cxx  |8 ++
 5 files changed, 34 insertions(+), 3 deletions(-)

New commits:
commit 47d3f102add9a46216e9082efdff362eb8555ad3
Author: Laurent Balland 
AuthorDate: Sun Jun 18 19:25:39 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 5 03:19:43 2023 +0200

tdf#155526 Moving average: remove Insert R2

Moving average trend line does not R² value.
This change remove "Insert R²" from context menu when the trend is of
type "Moving average"

Change-Id: I729a6421df34859e7176c798a2b68a6f13cfb544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153294
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit aa86e7e8c22527eb5da0b8a05dbd4bd749f7a2b8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153838

diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 620082bd99d8..ba659fd00449 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -285,23 +285,28 @@ void ControllerState::update(
 // Trendline Equation
 bMayFormatTrendlineEquation = bMayDeleteTrendlineEquation = 
RegressionCurveHelper::hasEquation( xRegCurve );
 bMayAddTrendlineEquation = !bMayDeleteTrendlineEquation;
+bMayAddR2Value = RegressionCurveHelper::MayHaveCorrelationCoefficient( 
xRegCurve ) && bMayAddTrendlineEquation;
 }
 else if( aObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
 {
 bMayFormatTrendlineEquation = true;
 bool bHasR2Value = false;
+bool bMayHaveR2 = true;
 try
 {
 uno::Reference< beans::XPropertySet > xEquationProperties =
 ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel );
 if( xEquationProperties.is() )
+{
 xEquationProperties->getPropertyValue( 
"ShowCorrelationCoefficient" ) >>= bHasR2Value;
+xEquationProperties->getPropertyValue( 
"MayHaveCorrelationCoefficient" ) >>= bMayHaveR2;
+}
 }
 catch(const uno::RuntimeException&)
 {
 TOOLS_WARN_EXCEPTION("chart2", "" );
 }
-bMayAddR2Value = !bHasR2Value;
+bMayAddR2Value = !bHasR2Value && bMayHaveR2;
 bMayDeleteR2Value = bHasR2Value;
 }
 }
@@ -672,8 +677,10 @@ void ControllerCommandDispatch::updateCommandAvailability()
 m_aCommandAvailability[ ".uno:InsertMeanValue" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddMeanValue;
 m_aCommandAvailability[ ".uno:InsertTrendline" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddTrendline;
 m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation;
-m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = 
m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ];
-m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddR2Value;
+m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] =
+m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] && 
m_apControllerState->bMayAddR2Value;
+m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddR2Value
+&& !m_apControllerState->bMayAddTrendlineEquation;
 m_aCommandAvailability[ ".uno:DeleteR2Value" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value;
 
 m_aCommandAvailability[ ".uno:InsertXErrorBars" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars;
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx 
b/chart2/source/inc/RegressionCurveHelper.hxx
index 2666b41d9bb9..e2df1bb4cd4d 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -199,6 +199,7 @@ namespace chart::RegressionCurveHelper
 const rtl::Reference<::chart::RegressionCurveModel>& xCurve );
 
 OOO_DLLPUBLIC_CHARTTOOLS bool hasEquation(const 
css::uno::Reference& xCurve );
+OOO_DLLPUBLIC_CHARTTOOLS bool MayHaveCorrelationCoefficient(const 
css::uno::Reference& xCurve );
 
 } //  namespace chart
 
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx 
b/chart2/source/tools/RegressionCurveHelper.cxx
index 2ff161bf0cf7..9626b07c1fbd 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart

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

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

New commits:
commit a5475addd81434478d7f91cbff098f64d72e877a
Author: Olivier Hallot 
AuthorDate: Tue Jul 4 21:48:16 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Jul 5 02:48:16 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-6'
  to 29efaac233accae71a698ad64231f47d0dfc5f62
  - Add bookmarks to PostgreSQL help page

Change-Id: I8e3e52446b9b58e34faf479829ce72cfc4680f8b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154013
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit ccaa099da1def9e89347af3f1759f48f9fa538ba)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154004

diff --git a/helpcontent2 b/helpcontent2
index ee8c6dd6dbbf..29efaac233ac 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ee8c6dd6dbbf5bba930a9264d9e1929be21dacbb
+Subproject commit 29efaac233accae71a698ad64231f47d0dfc5f62


[Libreoffice-commits] help.git: Branch 'libreoffice-7-6' - source/text

2023-07-04 Thread Olivier Hallot (via logerrit)
 source/text/sdatabase/dabawiz02pgsql.xhp |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 29efaac233accae71a698ad64231f47d0dfc5f62
Author: Olivier Hallot 
AuthorDate: Tue Jul 4 21:45:35 2023 -0300
Commit: Olivier Hallot 
CommitDate: Wed Jul 5 02:48:16 2023 +0200

Add bookmarks to PostgreSQL help page

Change-Id: I8e3e52446b9b58e34faf479829ce72cfc4680f8b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154013
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit ccaa099da1def9e89347af3f1759f48f9fa538ba)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/154004

diff --git a/source/text/sdatabase/dabawiz02pgsql.xhp 
b/source/text/sdatabase/dabawiz02pgsql.xhp
index 92990dacbf..abbdfca5dc 100644
--- a/source/text/sdatabase/dabawiz02pgsql.xhp
+++ b/source/text/sdatabase/dabawiz02pgsql.xhp
@@ -19,15 +19,17 @@
 
 PostgreSQL settings (Base)
 
-
 
 PostgreSQL 
Connection
 Specifies the options for connecting to PostgreSQL 
databases.
-  
+
 Direct connection to PostgreSQL 
databases
 The data for the 
direct connection to a PostgreSQL database can be provided in two different 
ways:
 Fill in the data
 Connection data can 
be provided by filling in the top three text boxes. Ask the database 
administrator for the correct data.
+
+
+
 
 
 Database name: type the name of the specific 
database.
@@ -38,7 +40,8 @@
 
 Port 
number: enter the port number of the DBMS server.
 
-
+
+
 DBMS/driver-specific connection string
 Instead of entering 
the data in the text boxes as explained above, or if you need to specify more 
parameter for the connection, you can enter the driver specific connection 
string. The connection string is a sequence of keyword/value pairs separated by 
spaces. For example
 dbname=MyDatabase host=myHost 
port=5432


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit d74344f6cae0cf1c12f08249c8f49be1374fb98f
Author: Olivier Hallot 
AuthorDate: Tue Jul 4 21:47:16 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Jul 5 02:47:16 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ccaa099da1def9e89347af3f1759f48f9fa538ba
  - Add bookmarks to PostgreSQL help page

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

diff --git a/helpcontent2 b/helpcontent2
index 2fd43ac04f55..ccaa099da1de 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2fd43ac04f55c78c7e323dc28509889d027f7a42
+Subproject commit ccaa099da1def9e89347af3f1759f48f9fa538ba


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

2023-07-04 Thread Olivier Hallot (via logerrit)
 source/text/sdatabase/dabawiz02pgsql.xhp |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ccaa099da1def9e89347af3f1759f48f9fa538ba
Author: Olivier Hallot 
AuthorDate: Tue Jul 4 21:45:35 2023 -0300
Commit: Olivier Hallot 
CommitDate: Wed Jul 5 02:47:16 2023 +0200

Add bookmarks to PostgreSQL help page

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

diff --git a/source/text/sdatabase/dabawiz02pgsql.xhp 
b/source/text/sdatabase/dabawiz02pgsql.xhp
index 92990dacbf..abbdfca5dc 100644
--- a/source/text/sdatabase/dabawiz02pgsql.xhp
+++ b/source/text/sdatabase/dabawiz02pgsql.xhp
@@ -19,15 +19,17 @@
 
 PostgreSQL settings (Base)
 
-
 
 PostgreSQL 
Connection
 Specifies the options for connecting to PostgreSQL 
databases.
-  
+
 Direct connection to PostgreSQL 
databases
 The data for the 
direct connection to a PostgreSQL database can be provided in two different 
ways:
 Fill in the data
 Connection data can 
be provided by filling in the top three text boxes. Ask the database 
administrator for the correct data.
+
+
+
 
 
 Database name: type the name of the specific 
database.
@@ -38,7 +40,8 @@
 
 Port 
number: enter the port number of the DBMS server.
 
-
+
+
 DBMS/driver-specific connection string
 Instead of entering 
the data in the text boxes as explained above, or if you need to specify more 
parameter for the connection, you can enter the driver specific connection 
string. The connection string is a sequence of keyword/value pairs separated by 
spaces. For example
 dbname=MyDatabase host=myHost 
port=5432


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-4' - 2 commits - sc/qa sc/source

2023-07-04 Thread luigiiucci (via logerrit)
 sc/qa/unit/helper/qahelper.cxx   |   38 ++
 sc/source/core/data/dpoutput.cxx |6 +-
 sc/source/ui/view/viewfun3.cxx   |2 ++
 3 files changed, 45 insertions(+), 1 deletion(-)

New commits:
commit 3a51b402f243eb32b544c16813f682617d88c0b9
Author: luigiiucci 
AuthorDate: Wed May 17 11:02:37 2023 +0200
Commit: Aron Budea 
CommitDate: Wed Jul 5 01:23:40 2023 +0200

Header columns can disappear with filtered data in pivot tables

When we set on a pivot table a filter that filters all the rows,
the pivot table showed only the first header columns and computed
column, but all the columns headers should still be shown so we can
adjust the filter for the column. This fixes this issue.

Also add more debug output and prevent a crash when running pivot
table tests.

Change-Id: I30b4ee72cf8436c4522ab4ba0781462b214816dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151871
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 3551d18404cb19cdaa8edb170a549f5c5405d0cb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153686
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 9a5c5124cb08..99a8492ce87d 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -527,6 +528,43 @@ bool checkOutput(
 svl::GridPrinter printer(e.Row() - s.Row() + 1, e.Col() - s.Col() + 1, 
CALC_DEBUG_OUTPUT != 0);
 SCROW nOutRowSize = e.Row() - s.Row() + 1;
 SCCOL nOutColSize = e.Col() - s.Col() + 1;
+
+// Check if expected size iz smaller than actual size (and prevent a crash)
+if (aCheck.size() < o3tl::make_unsigned(nOutRowSize) || aCheck[0].size() < 
o3tl::make_unsigned(nOutColSize))
+{
+// Dump the arrays to console, so we can compare
+std::cout << "Expected data:" << std::endl;
+for (size_t nRow = 0; nRow < aCheck.size(); ++nRow)
+{
+for (size_t nCol = 0; nCol < aCheck[nRow].size(); ++nCol)
+{
+const char* p = aCheck[nRow][nCol];
+if (p)
+{
+OUString aCheckVal = OUString::createFromAscii(p);
+std::cout << "'" << aCheckVal << "', ";
+}
+else
+std::cout << "null, ";
+}
+std::cout << std::endl;
+}
+
+std::cout << "Actual data:" << std::endl;
+for (SCROW nRow = 0; nRow < nOutRowSize; ++nRow)
+{
+for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol)
+{
+OUString aVal = pDoc->GetString(nCol + s.Col(), nRow + 
s.Row(), s.Tab());
+std::cout << "'" << aVal << "', ";
+}
+std::cout << std::endl;
+}
+std::cout << std::endl;
+
+return false;
+}
+
 for (SCROW nRow = 0; nRow < nOutRowSize; ++nRow)
 {
 for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol)
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index bf2109b300a3..b8565852d511 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -600,7 +600,11 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const 
uno::Reference 
aResult = xLevRes->getResults();
-if (!lcl_MemberEmpty(aResult))
+// We want only to remove the DATA 
column if it is empty
+// and not any other empty columns (to 
still show the
+// header columns)
+bool bSkip = lcl_MemberEmpty(aResult) 
&& bIsDataLayout;
+if (!bSkip)
 {
 ScDPOutLevelData tmp(nDim, 
nHierarchy, nLev, nDimPos, nNumFmt, aResult, aName,
aCaption, 
bHasHiddenMember, bIsDataLayout, false);
commit 0d38ec8443312398f81aa1eac57e97211018022d
Author: Luigi Iucci 
AuthorDate: Wed Jun 21 10:16:16 2023 +0200
Commit: Aron Budea 
CommitDate: Tue Jul 4 12:52:47 2023 +0200

problem pasting to calc an image copied from firefox (windows)

Calc tries to paste the image as html.
In case both HTML_SIMPLE and BITMAP flavors are present in
the clipboard, we paste as BITMAP

Change-Id: I2527bedf11eb6986b58329acaf360a397af03101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153614
Tested-by: Jenkins
Reviewed-by: Henry Castro 
(cherry picked from commit 46fa17b70db0d543518dde52908f46c85838ac12)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153668
Reviewed-by: Xisco Fauli 
(che

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

2023-07-04 Thread Khaled Hosny (via logerrit)
 vcl/source/gdi/pdfwriter_impl.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit fe2c0663436879b2d562f0c921da3f844017d85a
Author: Khaled Hosny 
AuthorDate: Tue Jul 4 15:49:35 2023 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jul 5 01:20:43 2023 +0200

tdf#156151: Take PDF DPI into account when outputting Type 3 glyphs

We were always assuming the default 720 DPI, but this is not always true
when printing to file as the DPI would depend on printer settings in
this case.

Change-Id: I747f8e24f0942ecb94eb8acfc1dd9972d83ba0e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153978
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 4b05805df02eadd920e808c8f82dbfd1038b4be8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153996
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 432f25b04ba1..b5653748ac8e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2649,6 +2649,10 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 ResourceDict aResourceDict;
 std::list aOutputStreams;
 
+// Scale for glyph outlines.
+double fScaleX = GetDPIX() / 72.;
+double fScaleY = GetDPIY() / 72.;
+
 for (auto i = 1u; i < nGlyphs; i++)
 {
 auto nStream = pGlyphStreams[i];
@@ -2731,9 +2735,12 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 const auto& rOutline = rGlyph.getOutline();
 if (rOutline.count())
 {
-// XXX I have no idea why this transformation matrix is needed.
-aContents.append("q 10 0 0 10 0 ");
-appendDouble(m_aPages.back().getHeight() * -10, aContents, 3);
+aContents.append("q ");
+appendDouble(fScaleX, aContents);
+aContents.append(" 0 0 ");
+appendDouble(fScaleY, aContents);
+aContents.append(" 0 ");
+appendDouble(m_aPages.back().getHeight() * -fScaleY, 
aContents, 3);
 aContents.append(" cm\n");
 m_aPages.back().appendPolyPolygon(rOutline, aContents);
 aContents.append("f\n"


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

2023-07-04 Thread Khaled Hosny (via logerrit)
 vcl/source/gdi/pdfwriter_impl.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit ef155fcf7bb78a2788f66cad3d6008b9203f5a32
Author: Khaled Hosny 
AuthorDate: Tue Jul 4 15:49:35 2023 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jul 5 01:20:58 2023 +0200

tdf#156151: Take PDF DPI into account when outputting Type 3 glyphs

We were always assuming the default 720 DPI, but this is not always true
when printing to file as the DPI would depend on printer settings in
this case.

Change-Id: I747f8e24f0942ecb94eb8acfc1dd9972d83ba0e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153978
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit c1dcffceb14cd35c7168ba2108b2f2e9aa875b56)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153997
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 56d3db20716c..b6901420bddf 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2673,6 +2673,10 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 ResourceDict aResourceDict;
 std::list aOutputStreams;
 
+// Scale for glyph outlines.
+double fScaleX = GetDPIX() / 72.;
+double fScaleY = GetDPIY() / 72.;
+
 for (auto i = 1u; i < nGlyphs; i++)
 {
 auto nStream = pGlyphStreams[i];
@@ -2753,9 +2757,12 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 const auto& rOutline = rGlyph.getOutline();
 if (rOutline.count())
 {
-// XXX I have no idea why this transformation matrix is needed.
-aContents.append("q 10 0 0 10 0 ");
-appendDouble(m_aPages.back().getHeight() * -10, aContents, 3);
+aContents.append("q ");
+appendDouble(fScaleX, aContents);
+aContents.append(" 0 0 ");
+appendDouble(fScaleY, aContents);
+aContents.append(" 0 ");
+appendDouble(m_aPages.back().getHeight() * -fScaleY, 
aContents, 3);
 aContents.append(" cm\n");
 m_aPages.back().appendPolyPolygon(rOutline, aContents);
 aContents.append("f\n");


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

2023-07-04 Thread Xisco Fauli (via logerrit)
 sw/source/core/unocore/unoobj2.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 16a94d2b25198442af1257574bf88007c8b352f3
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 15:53:39 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 23:05:45 2023 +0200

sw: fix crash in CreateParentXText

See 
https://crashreport.libreoffice.org/stats/signature/SfxObjectShell::GetBaseModel()

Change-Id: Idcfc8219b5765bca9c45819bde5f276ce68c45de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153971
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/unocore/unoobj2.cxx 
b/sw/source/core/unocore/unoobj2.cxx
index 210e62655a15..1b02cb5a0b27 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1307,12 +1307,14 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
 break;
 default:
 {
-// then it is the body text
-const uno::Reference xModel =
-rDoc.GetDocShell()->GetBaseModel();
-const uno::Reference< text::XTextDocument > xDoc(
-xModel, uno::UNO_QUERY);
-xParentText = xDoc->getText();
+if (SwDocShell *const pDocSh = rDoc.GetDocShell())
+{
+// then it is the body text
+const uno::Reference xModel = 
pDocSh->GetBaseModel();
+const uno::Reference< text::XTextDocument > xDoc(
+xModel, uno::UNO_QUERY);
+xParentText = xDoc->getText();
+}
 }
 }
 OSL_ENSURE(xParentText.is(), "no parent text?");


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

2023-07-04 Thread Mike Kaganski (via logerrit)
 sw/qa/extras/ooxmlimport/data/tdf156078_rightTabOutsideParaRightIndent.docx 
|binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx   |  
 34 ++
 sw/source/core/text/itrpaint.cxx|  
  7 +-
 3 files changed, 39 insertions(+), 2 deletions(-)

New commits:
commit 3e04f54f7efdc0f7373c248b9ba02e6fd5a43da2
Author: Mike Kaganski 
AuthorDate: Wed Jun 28 18:54:43 2023 +0300
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 22:59:59 2023 +0200

tdf#156078: Use TabOverSpacing compat option instead of TabOverflow

As Justin Luth noted, "TabOverflow is basically always true", and
using it basically equal to making the test always true. On the
other hand, TabOverSpacing is accurate for the task.

Change-Id: I608b200dac0169cbafc935a03452aac9ba0527a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153722
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153876

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 9c6dc347a47c..a189e5abf25b 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -167,8 +167,8 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
 //compatibility settings: allow tabstop text to exceed right margin
 const auto& iDSA = 
GetInfo().GetTextFrame()->GetDoc().getIDocumentSettingAccess();
 const bool bTabOverMargin = iDSA.get(DocumentSettingId::TAB_OVER_MARGIN);
-const bool bTabOverflow = iDSA.get(DocumentSettingId::TAB_OVERFLOW);
-if (bTabOverMargin || bTabOverflow)
+const bool bTabOverSpacing = iDSA.get(DocumentSettingId::TAB_OVER_SPACING);
+if (bTabOverMargin || bTabOverSpacing)
 {
 SwLinePortion* pPorIter = pPor;
 while( pPorIter )
commit 237a550af3b4ec1223decf451fb41dc74c229080
Author: Mike Kaganski 
AuthorDate: Tue Jun 27 17:42:49 2023 +0300
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 22:59:54 2023 +0200

tdf#156078: also consider TabOverflow for tabs outside of line bounds

Before commit 29bd00f7628e7a54e69cabcc7e2a1792c24aa55c, TabOverMargin
compat option was set for DOCX with any compat mode. After that commit,
the unset option disallowed output of content after a tab stop outside
of the paragraph indents, even within page margins.

SwTabPortion::PreFormat consults TabOverflow when checking if position
is outside the frame; so let's consult it also when painting.

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

diff --git 
a/sw/qa/extras/ooxmlimport/data/tdf156078_rightTabOutsideParaRightIndent.docx 
b/sw/qa/extras/ooxmlimport/data/tdf156078_rightTabOutsideParaRightIndent.docx
new file mode 100644
index ..cc2715cf6acd
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf156078_rightTabOutsideParaRightIndent.docx 
differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index c3e834823c02..20b190d59af6 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -23,6 +23,9 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
 #include 
 
 #include 
@@ -1143,6 +1146,37 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154695)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf156078)
+{
+// Given a DOCX with compat level 15, and a tab stop outside of paragraph 
right indent
+createSwDoc("tdf156078_rightTabOutsideParaRightIndent.docx");
+
+// Export it to a PNG (96 ppi)
+uno::Sequence aFilterData(
+comphelper::InitPropertySequence({ { "PixelWidth", 
uno::Any(sal_Int32(816)) },
+   { "PixelHeight", 
uno::Any(sal_Int32(1056)) } }));
+uno::Sequence 
aDescriptor(comphelper::InitPropertySequence(
+{ { "FilterName", uno::Any(OUString("writer_png_Export")) },
+  { "FilterData", uno::Any(aFilterData) } }));
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+xStorable->storeToURL(maTempFile.GetURL(), aDescriptor);
+CPPUNIT_ASSERT(maTempFile.IsValid());
+
+Graphic exported;
+GraphicFilter::LoadGraphic(maTempFile.GetURL(), {}, exported);
+Bitmap bmp = exported.GetBitmapEx().GetBitmap();
+Bitmap::ScopedReadAccess pAccess(bmp);
+
+// "1" must export to the top right corner; check its pixels
+bool numberPixelsFound = false;
+for (tools::Long y = 90; y < 130; ++y)
+for (tools::Long x = 680; x < 720; ++x)
+if (Color(pAccess->GetPixel(y, x)).IsDark())
+numberPixelsFound = true;
+
+CPPUNIT_ASSERT(numberPixelsFound);
+}
+
 // te

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

2023-07-04 Thread Mike Kaganski (via logerrit)
 sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a3f74ebbb9082c6d8e15a10ea51e19f47de84510
Author: Mike Kaganski 
AuthorDate: Tue Jul 4 06:20:36 2023 +0300
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 22:47:39 2023 +0200

Fix a UITest on Windows

Change-Id: I9645cea2394f945355f86b3f6013d1d0f5117c76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153940
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 80569dc996a9a814ad7c2e729f30443debdbc6fe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153923
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py 
b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
index eb43912782bc..0c556b6c2b65 100644
--- a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
+++ b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
@@ -9,6 +9,7 @@
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
 from libreoffice.uno.propertyvalue import mkPropertyValues
+import platform
 
 class dateFormFieldDialog(UITestCase):
 
@@ -138,6 +139,9 @@ class dateFormFieldDialog(UITestCase):
 xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"ALT+DOWN"}))
 xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"ESC"}))
 xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"UP"}))
-self.assertEqual(writer_doc.getText().getString(), "\nClick to 
choose a date")
+if platform.system() == "Windows":
+self.assertEqual(writer_doc.getText().getString(), "\r\nClick 
to choose a date")
+else:
+self.assertEqual(writer_doc.getText().getString(), "\nClick to 
choose a date")
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


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

2023-07-04 Thread Paris Oplopoios (via logerrit)
 include/sfx2/viewsh.hxx |2 ++
 sc/source/ui/inc/tabvwsh.hxx|2 ++
 sc/source/ui/view/tabvwshc.cxx  |5 +
 sd/source/ui/inc/ViewShellBase.hxx  |2 ++
 sd/source/ui/view/ViewShellBase.cxx |   12 
 sfx2/source/appl/appserv.cxx|   20 ++--
 sfx2/source/view/viewsh.cxx |6 ++
 sw/inc/view.hxx |2 ++
 sw/inc/viewopt.hxx  |2 +-
 sw/source/core/view/vnew.cxx|   17 -
 sw/source/uibase/uiview/viewprt.cxx |   14 ++
 11 files changed, 80 insertions(+), 4 deletions(-)

New commits:
commit 884fd220d0025a92510d3ff4710c8c517c8f271e
Author: Paris Oplopoios 
AuthorDate: Mon Jul 3 19:00:59 2023 +0300
Commit: Paris Oplopoios 
CommitDate: Tue Jul 4 22:12:16 2023 +0200

Make sure views get new themes on .uno:ChangeTheme

It would be that sometimes .uno:ChangeTheme would not load the new
scheme because it was using EditableConfig::GetCurrentSchemeName which
uses a static name - normally great except for when you need different
views to have different color schemes in tiled rendering

Change-Id: I5b149bd1a4776337f76753c6de98d5386a899d34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153939
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Paris Oplopoios 

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 2435caa52a47..78f75b7067dd 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -409,6 +409,8 @@ public:
 virtual vcl::Window* GetEditWindowForActiveOLEObj() const override;
 /// Get a color config color from this view
 virtual ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) 
const;
+/// Get the color scheme name of this view
+virtual OUString GetColorConfigName() const;
 
 /// Set the LibreOfficeKit language of this view.
 void SetLOKLanguageTag(const OUString& rBcp47LanguageTag);
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index ee3edd020def..d32f664b5536 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -395,6 +395,8 @@ public:
 void NotifyCursor(SfxViewShell* pViewShell) const override;
 /// See SfxViewShell::GetColorConfigColor().
 ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const 
override;
+/// See SfxViewShell::GetColorConfigName().
+OUString GetColorConfigName() const override;
 /// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab 
is equal to nCurrentTabIndex
 static void notifyAllViewsHeaderInvalidation(const SfxViewShell* 
pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex);
 static bool isAnyEditViewInRange(const SfxViewShell* pForViewShell, bool 
bColumns, SCCOLROW nStart, SCCOLROW nEnd);
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 3b50da7114cb..517a00c8f2e1 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -516,6 +516,11 @@ void ScTabViewShell::NotifyCursor(SfxViewShell* 
pOtherShell) const
 return {};
 }
 
+OUString ScTabViewShell::GetColorConfigName() const
+{
+return GetViewData().GetOptions().GetColorSchemeName();
+}
+
 css::uno::Reference 
ScTabViewShell::GetClipData(vcl::Window* pWin)
 {
 SfxViewFrame* pViewFrame = nullptr;
diff --git a/sd/source/ui/inc/ViewShellBase.hxx 
b/sd/source/ui/inc/ViewShellBase.hxx
index aa0346ea5b2f..71522c7892d4 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -223,6 +223,8 @@ public:
 void NotifyCursor(SfxViewShell* pViewShell) const override;
 /// See SfxViewShell::GetColorConfigColor().
 ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const 
override;
+/// See SfxViewShell::GetColorConfigName().
+OUString GetColorConfigName() const override;
 
 void setLOKVisibleArea(const ::tools::Rectangle& rArea) { maLOKVisibleArea 
= rArea; }
 virtual ::tools::Rectangle getLOKVisibleArea() const override { return 
maLOKVisibleArea; }
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 834e1d6cc3e2..19be45aaca12 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1091,6 +1091,18 @@ void ViewShellBase::NotifyCursor(SfxViewShell* 
pOtherShell) const
 return {};
 }
 
+OUString ViewShellBase::GetColorConfigName() const
+{
+if (DrawViewShell* pCurrentDrawShell = 
dynamic_cast(GetMainViewShell().get()))
+{
+const SdViewOptions& rViewOptions = 
pCurrentDrawShell->GetViewOptions();
+return rViewOptions.msColorSchemeName;
+}
+
+SAL_WARN("sd", "dynamic_cast to DrawViewShell failed");
+return {};
+}
+
 //= ViewShellBase::Implementation =
 
 ViewShellBase::Implementation::Implementation (ViewShellBase& rBase)
diff --gi

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

2023-07-04 Thread Xisco Fauli (via logerrit)
 sfx2/source/view/viewprn.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 58cd822025b15d1224acc01867c54445b36cdc55
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 14:23:20 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:08:54 2023 +0200

sfx2: fix crash in SfxViewShell::StartPrint

See 
https://crashreport.libreoffice.org/stats/signature/SfxViewShell::StartPrint(com::sun::star::uno::Sequence%3Ccom::sun::star::beans::PropertyValue%3E%20const%20&,bool,bool)

Change-Id: I3d10414d4cfd027bf80ceaf6692bb7f92269f6c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153965
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 3502f5147b9102d37459c373ee07e052fd267db7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153929

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 5add9956abcb..5ada786ba108 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -609,8 +609,11 @@ void SfxViewShell::StartPrint( const uno::Sequence < 
beans::PropertyValue >& rPr
 css::beans::PropertyValue* pJobNameVal = 
xNewController->getValue("JobName");
 if (!pJobNameVal)
 {
-xNewController->setValue("JobName", 
Any(GetObjectShell()->GetTitle(1)));
-xNewController->setPrinterModified(mbPrinterSettingsModified);
+if (SfxObjectShell* pDoc = GetObjectShell())
+{
+xNewController->setValue("JobName", Any(pDoc->GetTitle(1)));
+xNewController->setPrinterModified(mbPrinterSettingsModified);
+}
 }
 }
 


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

2023-07-04 Thread Xisco Fauli (via logerrit)
 sc/source/ui/vba/vbaworksheet.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b6ffe34e5ec64b20ab91dc7cd8fa9cd6b015caff
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 14:06:26 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:08:23 2023 +0200

sc: fix crash in ScVbaWorksheet::Cells

See 
https://crashreport.libreoffice.org/stats/signature/ScDocShell::GetDocument()

Similar to 286a1c03fa10acf60f076a0af987112d24cb2ff5
"sc: check excel::getDocShell"

Change-Id: I102e575b4992e175d4e780ef2b43f887d94bbd24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153964
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit c7a8889302fd7e9e0665c3d21510e374cff3891e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153991

diff --git a/sc/source/ui/vba/vbaworksheet.cxx 
b/sc/source/ui/vba/vbaworksheet.cxx
index 46b0e131f7e0..466e904d6f55 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -681,8 +681,9 @@ ScVbaWorksheet::Cells( const ::uno::Any &nRow, const 
::uno::Any &nCol )
 // Use a common helper method instead of creating a new ScVbaRange object
 uno::Reference< table::XCellRange > xRange( getSheet(), 
uno::UNO_QUERY_THROW );
 uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW );
-ScDocument& rDoc = excel::getDocShell( xModel )->GetDocument();
-return ScVbaRange::CellsHelper( rDoc, this, mxContext, xRange, nRow, nCol 
);
+if(ScDocShell* pShell = excel::getDocShell( xModel ))
+return ScVbaRange::CellsHelper(pShell->GetDocument(), this, mxContext, 
xRange, nRow, nCol );
+throw uno::RuntimeException();
 }
 
 uno::Reference< excel::XRange >


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - download.lst external/libxslt

2023-07-04 Thread Taichi Haradaguchi (via logerrit)
 download.lst|4 ++--
 external/libxslt/README |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 746790a8ec3f7cbd22f5f74565e657145b6e9ef2
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Jul 3 18:38:33 2023 +0900
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:07:39 2023 +0200

libxslt: upgrade to release 1.1.38

Change-Id: I0534d7e02c9486b3d58f56e1a26fe6846b4a20b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153874
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>
(cherry picked from commit 362dfc50a28a918ec73609a00d2851eb3058375d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153905
Reviewed-by: Xisco Fauli 

diff --git a/download.lst b/download.lst
index 47c1abb8f9cd..b179b4ba7034 100644
--- a/download.lst
+++ b/download.lst
@@ -350,8 +350,8 @@ LIBXML_TARBALL := 
libxml2-2.11.$(LIBXML_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXSLT_SHA256SUM := 
8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79
-LIBXSLT_VERSION_MICRO := 35
+LIBXSLT_SHA256SUM := 
1f32450425819a09acaff2ab7a5a7f8a2ec7956e505d7beeb45e843d0e1ecab1
+LIBXSLT_VERSION_MICRO := 38
 LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
diff --git a/external/libxslt/README b/external/libxslt/README
index dd69a9d732c3..2eb71661b903 100644
--- a/external/libxslt/README
+++ b/external/libxslt/README
@@ -1 +1 @@
-Gnome xslt library written in C, from [http://xmlsoft.org/xslt/]
+libxslt is an XSLT processor based on libxml2, from 
[https://gitlab.gnome.org/GNOME/libxslt/]


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

2023-07-04 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 3813aa6c8306fce85bb9b9d090ee48766ae87653
Author: Jim Raykowski 
AuthorDate: Sat Jul 1 19:52:43 2023 -0800
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:07:27 2023 +0200

tdf#156112 SwNavigator: Disallow footnote and endnote dnd

Change-Id: I892f8a34f43629f3e76aa187299dc8c805b72545
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153855
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 4f9294ec702a82765c04c8652dddec4dda1e6075)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153891
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 6f02872cda43..c2af6a16304d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2752,6 +2752,8 @@ bool SwContentTree::FillTransferData( 
TransferDataContainer& rTransfer,
 case ContentTypeId::INDEX:
 case ContentTypeId::REFERENCE :
 case ContentTypeId::TEXTFIELD:
+case ContentTypeId::FOOTNOTE:
+case ContentTypeId::ENDNOTE:
 // cannot be inserted, neither as URL nor as section
 break;
 case ContentTypeId::URLFIELD:
commit 7d5870ba7a505db8251a34448a11643eae14936e
Author: Jim Raykowski 
AuthorDate: Sun Jul 2 21:02:56 2023 -0800
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:07:19 2023 +0200

tdf#156128 Make drawing object hyperlinks created by dnd

from Navigator functional

Change-Id: Ic12f3c43c079865e31c3bb89d9f277d3567d8c01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153887
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit c4515f6be4a0ec923d85fd6b4c85bfaafb0b26ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153924
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 1284dc7a0d0e..6f02872cda43 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -394,6 +394,7 @@ SwContentType::SwContentType(SwWrtShell* pShell, 
ContentTypeId nType, sal_uInt8
 m_bEdit = true;
 break;
 case ContentTypeId::DRAWOBJECT:
+m_sTypeToken = "drawingobject";
 m_bEdit = true;
 break;
 default: break;


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

2023-07-04 Thread Mike Kaganski (via logerrit)
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |   36 
-
 include/comphelper/xmlencode.hxx  |   62 
++
 include/vcl/pdfwriter.hxx |2 
 sd/source/filter/html/htmlex.cxx  |5 
 sw/qa/extras/htmlexport/data/frameWithText.fodt   |2 
 sw/qa/extras/htmlexport/htmlexport.cxx|4 
 sw/source/filter/html/css1atr.cxx |3 
 sw/source/filter/html/htmlfldw.cxx|3 
 sw/source/filter/html/htmlflywriter.cxx   |5 
 vcl/source/gdi/pdfwriter_impl.cxx |   39 
--
 10 files changed, 81 insertions(+), 80 deletions(-)

New commits:
commit b4372afaa268db5489953db6baeaeaa7167b22db
Author: Mike Kaganski 
AuthorDate: Thu Jun 29 12:22:55 2023 +0300
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:06:48 2023 +0200

XML-encode text that will appear in ReqIF

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

diff --git a/sw/qa/extras/htmlexport/data/frameWithText.fodt 
b/sw/qa/extras/htmlexport/data/frameWithText.fodt
index 3c4635b14a78..97ee5b105984 100644
--- a/sw/qa/extras/htmlexport/data/frameWithText.fodt
+++ b/sw/qa/extras/htmlexport/data/frameWithText.fodt
@@ -16,7 +16,7 @@
A frame with text below

  
-  Some text in frame
+  Some text in frame & 

  
 
A text after the frame
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index d5226975ec03..04577e8cafd0 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -2720,12 +2720,12 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqIF_FrameTextAsObjectAltText)
 CPPUNIT_ASSERT(pDoc);
 
 // Without the fix, this would fail with
-// - Expected: Some text in frame
+// - Expected: Some text in frame & 
 // - Actual  : Frame1
 // i.e., frame name was used as the object element content, not frame text
 assertXPathContent(pDoc,

"/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:p[2]/reqif-xhtml:object",
-   "Some text in frame");
+   "Some text in frame & ");
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index 1a440c4c2c4c..5697f294dc86 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1248,10 +1249,10 @@ OUString getFrameFormatText(const SwFrameFormat& 
rFrameFormat)
 {
 if (!result.isEmpty())
 result.append("\n");
-result.append(pTextNd->GetExpandText(
+
result.append(comphelper::string::encodeForXml(pTextNd->GetExpandText(
 nullptr, 0, -1, true, true, false,
 ExpandMode::ExpandFields | ExpandMode::HideInvisible | 
ExpandMode::HideDeletions
-| ExpandMode::HideFieldmarkCommands));
+| ExpandMode::HideFieldmarkCommands)));
 }
 }
 
commit 0c41a250eb28fb4ad8d06824fc8c6ed005927c4d
Author: Szymon Kłos 
AuthorDate: Fri Apr 7 09:48:41 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:06:42 2023 +0200

Make encodeForXml accessible for other modules

and share similar code

Change-Id: I7729a46d40845893f577c273c1ab340f69ebb51b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151230
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151754
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153873

diff --git 
a/desktop/source/deployment/registry/configuration/dp_configuration.cxx 
b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 1f4ba053ec55..622814248670 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -566,39 +567,6 @@ BackendImpl::PackageImpl::isRegistered_(
 }
 
 
-OUString encodeForXml( std::u16string_view text )
-{
-// encode conforming xml:
-size_t len = text.size();
-OUStringBuffer buf;
-for ( size_t pos = 0; pos < len; ++pos )
-{
-sal_Unicode c = text[ pos ];
-   

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

2023-07-04 Thread Xisco Fauli (via logerrit)
 sc/source/ui/app/inputhdl.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 58550b67a89b2aa189043e8c6a8be2e8a5976d84
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 17:46:26 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 21:05:49 2023 +0200

sc: fix crash in ScInputHandler::ShowArgumentsTip

See 
https://crashreport.libreoffice.org/stats/signature/ScInputHandler::ShowArgumentsTip(rtl::OUString%20&)

Change-Id: I0fd61d5cca58121e77e102edd3c8e77c75baf800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153976
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 96c4963fe073..3351408459a9 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1137,6 +1137,9 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText 
)
 return;
 }
 
+if ( !pActiveViewSh )
+return;
+
 ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell();
 const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
 const sal_Unicode cSheetSep = pDocSh->GetDocument().GetSheetSeparator();


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

2023-07-04 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 vcl/jsdialog/jsdialogbuilder.cxx |3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3e10169b0508d46ffea2e72f11608a19038b8016
Author: Szymon Kłos 
AuthorDate: Wed May 31 11:16:36 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 4 20:47:23 2023 +0200

jsdialog: enable sparkline dialog

Change-Id: Iaf5de5c1c15313075afdf8dbc48dcb22da448fea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152417
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153949
Tested-by: Jenkins

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 36707140b927..171294bf5372 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -130,6 +130,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/scalc/ui/sortdialog.ui"
 || rUIFile == u"modules/scalc/ui/sortkey.ui"
 || rUIFile == u"modules/scalc/ui/sortoptionspage.ui"
+|| rUIFile == u"modules/scalc/ui/sparklinedialog.ui"
 || rUIFile == u"modules/scalc/ui/standardfilterdialog.ui"
 || rUIFile == u"modules/scalc/ui/textimportcsv.ui"
 || rUIFile == u"modules/scalc/ui/ttestdialog.ui"
commit d077c6bf7b1697abc977a8bea5b19cb624c4a5b1
Author: Szymon Kłos 
AuthorDate: Fri May 19 13:45:22 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 4 20:47:15 2023 +0200

jsdialog: lazy json generation when closing tab in dialog

After profiling Writer -> Format -> Character dialog
I found that full dialog update happens while creating
the dialog as some of the tabs are destroyed.

Instead of instant JSON generation we should
add the message to the queue and send it in idle time.
Problem is that we are closing the tab and it's builder
so we will not be able to do it later.

So using jsdialog::SendFullUpdate trigger update in parent
dialog which shares the same WINDOW_ID.

This behaviour can be tested in Highlight tab when switching
between "Color" and "None". As previous solution was introduced
for it in:

commit 41a1a2f04301dc22b156b4e11767859e40473897
jsdialog: don't close dialog on tab page destroy

Change-Id: I916250cf08d87c1109dc2db6dbbc1fbff7f48c07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152008
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153945
Tested-by: Szymon Kłos 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 328a03340c97..d37c5c2ffb59 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -677,8 +677,7 @@ JSInstanceBuilder::~JSInstanceBuilder()
 // tab page closed -> refresh parent window
 if (m_bIsNestedBuilder && m_sTypeOfJSON == "dialog")
 {
-sendFullUpdate(true);
-flush();
+jsdialog::SendFullUpdate(OUString::number(m_nWindowId), "__DIALOG__");
 }
 
 if (m_sTypeOfJSON == "popup")


Re: LibreOffice Build failed on Debian-x86-32bit

2023-07-04 Thread Rene Engelhard

Hi,

Am 04.07.23 um 20:45 schrieb Andreas Mantke:

big thanks for investigating. I'll try to apply your patch and look if
it build successful.

A somewhat improved version of it (keeping amd64 intact) is in 
https://gerrit.libreoffice.org/c/core/+/153984.


> But it may take some time to get the whole build done on the (old) 
machine.


Also test-building above patch now.

Regards,

Rene



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

2023-07-04 Thread Szymon Kłos (via logerrit)
 desktop/source/lib/init.cxx   |4 +++-
 tools/source/misc/json_writer.cxx |9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 16b0da38515467bf1819ccd88027934481cc5727
Author: Szymon Kłos 
AuthorDate: Thu May 25 09:38:12 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 4 20:46:50 2023 +0200

jsdialog: encode properly control characters

according to https://www.rfc-editor.org/rfc/rfc7159#section-7
strings in JSON should contain control characters (0x00-0x1f)
encoded as \u

Signed-off-by: Szymon Kłos 
Change-Id: I1f828f64e57328b5fa2dcf5853afe0d6ea643081
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152262
Reviewed-by: Attila Szűcs 
Tested-by: Attila Szűcs 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153946
Tested-by: Jenkins

diff --git a/tools/source/misc/json_writer.cxx 
b/tools/source/misc/json_writer.cxx
index 3111cac2f816..8303e4c2973e 100644
--- a/tools/source/misc/json_writer.cxx
+++ b/tools/source/misc/json_writer.cxx
@@ -135,6 +135,15 @@ static char getEscapementChar(char ch)
 
 static bool writeEscapedSequence(sal_uInt32 ch, char*& pos)
 {
+// control characters
+if (ch <= 0x1f)
+{
+int written = snprintf(pos, 7, "\\u%.4x", static_cast(ch));
+if (written > 0)
+pos += written;
+return true;
+}
+
 switch (ch)
 {
 case '\b':
commit 8fc7ac5569592d5cd026d292202e8c51d670c241
Author: Szymon Kłos 
AuthorDate: Wed May 17 16:09:06 2023 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 4 20:46:42 2023 +0200

lok: linking-api: export correct target string

export target string instead of boolean so user
can jump into the target using that.

this is fix for:
https://github.com/CollaboraOnline/online/issues/6230

Signed-off-by: Szymon Kłos 
Change-Id: Id4b1a1c65ddcb6f4d94d3939dda9124f2d10e9d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151884
Reviewed-by: Gülşah Köse 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153944

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index bef06bcd4f98..dbd236858ce8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -480,7 +480,9 @@ static bool extractLinks(const uno::Reference< 
container::XNameAccess >& xLinks,
 
 if (bIsTarget)
 {
-jsonText.append("true");
+jsonText.append("\"");
+jsonText.append(aLink);
+jsonText.append("\"");
 continue;
 }
 jsonText.append("{");


Re: LibreOffice Build failed on Debian-x86-32bit

2023-07-04 Thread Andreas Mantke

Hi Rene,

big thanks for investigating. I'll try to apply your patch and look if
it build successful.
But it may take some time to get the whole build done on the (old) machine.

Regards,
Andreas

Am 04.07.23 um 20:31 schrieb Rene Engelhard:

Hi again,

Am 04.07.23 um 20:19 schrieb Rene Engelhard:

/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:65:50:
error: always_inline function '_mm_loadu_si128' requires target
feature 'sse2', but would be inlined into function
'blit_row_s32_blend' that is compiled without support for 'sse2'


Hmm.

commit 9c9a711ac5d8f32ac318d0e4ecab7b3a26bc2150
Author: Noel Grandin 
Date:   Fri Jan 27 10:48:45 2023 +0200

    Update skia to m111

    (*) Remove patches already upstream

    (*) Remove the skia_sk_cpu_sse_level_0_by_default.patch.1 patch
and rather set
    that define via -D parameter, because that is how the skia BUILD.gn
    seems to do it

    (*) I hand edited the PCH file, because running the update_pch
script failed for me.

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

was the commit.

Apparently the second part doesn't work?

Oh, no, that patch contains

diff --git a/external/skia/Library_skia.mk
b/external/skia/Library_skia.mk
index 3bb9cc3eed40..4b7d9ee56407 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_Library_add_defs,skia,\
 -DSKIA_IMPLEMENTATION=1 \
 -DSKIA_DLL \
-DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
+    $(if $(filter INTEL
X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \
 ))

 # SK_DEBUG controls runtime checks and is controlled by config_skia.h
and depends on DBG_UTIL.

ARGH, no

diff --git a/external/skia/Library_skia.mk
b/external/skia/Library_skia.mk
index 4b7d9ee56407..7dd5375f1eb9 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_Library_add_defs,skia,\
 -DSKIA_IMPLEMENTATION=1 \
 -DSKIA_DLL \
-DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
-    $(if $(filter INTEL
X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \
+    $(if $(filter INTEL X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=0) \
 ))

 # SK_DEBUG controls runtime checks and is controlled by config_skia.h
and depends on DBG_UTIL.

is what I am trying right now.

Regards,

Rene


--
## Free Software Advocate
## Plone add-on developer
## My blog: http://www.amantke.de/blog



Re: LibreOffice Build failed on Debian-x86-32bit

2023-07-04 Thread Rene Engelhard

Hi again,

Am 04.07.23 um 20:19 schrieb Rene Engelhard:

/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:65:50:
 error: always_inline function '_mm_loadu_si128' requires target feature 
'sse2', but would be inlined into function 'blit_row_s32_blend' that is 
compiled without support for 'sse2'


Hmm.

commit 9c9a711ac5d8f32ac318d0e4ecab7b3a26bc2150
Author: Noel Grandin 
Date:   Fri Jan 27 10:48:45 2023 +0200

Update skia to m111

(*) Remove patches already upstream

(*) Remove the skia_sk_cpu_sse_level_0_by_default.patch.1 patch and 
rather set

that define via -D parameter, because that is how the skia BUILD.gn
seems to do it

(*) I hand edited the PCH file, because running the update_pch 
script failed for me.


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

was the commit.

Apparently the second part doesn't work?

Oh, no, that patch contains

diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index 3bb9cc3eed40..4b7d9ee56407 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_Library_add_defs,skia,\
 -DSKIA_IMPLEMENTATION=1 \
 -DSKIA_DLL \
 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
+$(if $(filter INTEL 
X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \

 ))

 # SK_DEBUG controls runtime checks and is controlled by config_skia.h 
and depends on DBG_UTIL.


ARGH, no

diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index 4b7d9ee56407..7dd5375f1eb9 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_Library_add_defs,skia,\
 -DSKIA_IMPLEMENTATION=1 \
 -DSKIA_DLL \
 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
-$(if $(filter INTEL 
X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \

+$(if $(filter INTEL X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=0) \
 ))

 # SK_DEBUG controls runtime checks and is controlled by config_skia.h 
and depends on DBG_UTIL.


is what I am trying right now.

Regards,

Rene


[Libreoffice-commits] core.git: include/sfx2 include/svx sfx2/Library_sfx.mk sfx2/source svx/inc svx/source

2023-07-04 Thread Maxim Monastirsky (via logerrit)
 include/sfx2/namedcolor.hxx|   57 +
 include/sfx2/objsh.hxx |4 ++
 include/svx/Palette.hxx|   46 --
 include/svx/PaletteManager.hxx |1 
 include/svx/colorwindow.hxx|3 -
 include/svx/tbcontrl.hxx   |1 
 sfx2/Library_sfx.mk|1 
 sfx2/source/doc/objcont.cxx|   15 
 sfx2/source/inc/objshimp.hxx   |4 ++
 svx/inc/tbxcolorupdate.hxx |8 +++-
 svx/source/tbxctrls/PaletteManager.cxx |9 -
 svx/source/tbxctrls/tbcontrl.cxx   |   15 +---
 svx/source/tbxctrls/tbxcolorupdate.cxx |   57 +++--
 13 files changed, 145 insertions(+), 76 deletions(-)

New commits:
commit 8ffb8e164d9d350a1b9887d0a75e0a82892008ee
Author: Maxim Monastirsky 
AuthorDate: Sun Jul 2 17:31:38 2023 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue Jul 4 20:26:42 2023 +0200

tdf#154270 Sync toolbar button recent colors

As the last used color is stored per button instance, these
will go out of sync with several buttons being visible (e.g.
a toolbar and a sidebar, or a toolbar overflow popup), and
will reset whenever the toolbar resets (e.g. change in
selection, switch from print preview, or customization).

Fix that by storing the last colors per-document, and
notifying other buttons on changes. Keep the last color also
stored per-button for now, as a fallback for reportdesign
(which isn't sfx2 based).

Change-Id: I866f1de5c8ff6f56c47dc4b6b5acf52957d4e6c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153943
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/include/sfx2/namedcolor.hxx b/include/sfx2/namedcolor.hxx
new file mode 100644
index ..fc7941686fbd
--- /dev/null
+++ b/include/sfx2/namedcolor.hxx
@@ -0,0 +1,57 @@
+/* -*- 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 
+
+#include 
+#include 
+
+struct SFX2_DLLPUBLIC NamedColor
+{
+Color m_aColor;
+OUString m_aName;
+sal_Int16 m_nThemeIndex = -1;
+sal_Int16 m_nLumMod = 1;
+sal_Int16 m_nLumOff = 0;
+
+NamedColor() = default;
+
+NamedColor(Color const& rColor, OUString const& rName)
+: m_aColor(rColor)
+, m_aName(rName)
+{
+}
+
+model::ComplexColor getComplexColor()
+{
+model::ComplexColor aComplexColor;
+
+auto eThemeColorType = model::convertToThemeColorType(m_nThemeIndex);
+
+if (eThemeColorType != model::ThemeColorType::Unknown)
+{
+aComplexColor.setSchemeColor(eThemeColorType);
+
+if (m_nLumMod != 1)
+aComplexColor.addTransformation({ 
model::TransformationType::LumMod, m_nLumMod });
+
+if (m_nLumMod != 0)
+aComplexColor.addTransformation({ 
model::TransformationType::LumOff, m_nLumOff });
+}
+
+aComplexColor.setFinalColor(m_aColor);
+
+return aComplexColor;
+}
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 15533c2954ca..dfb69b264418 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -47,6 +47,7 @@
 
 namespace weld {class Button; }
 namespace model {class ColorSet; }
+struct NamedColor;
 class SbxValue;
 class SbxArray;
 class BasicManager;
@@ -564,6 +565,9 @@ public:
 GetDialogContainer();
 StarBASIC*  GetBasic() const;
 
+std::optional GetRecentColor(sal_uInt16 nSlotId);
+void SetRecentColor(sal_uInt16 nSlotId, const NamedColor& rColor);
+
 virtual std::set GetDocColors();
 virtual std::shared_ptr GetThemeColors();
 
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index 4858b47140c4..5bf63762b75c 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -20,56 +20,12 @@
 #pragma once
 
 #include 
+#include 
 
 #include 
 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-
 class SvxColorValueSet;
 
-struct SVXCORE_DLLPUBLIC NamedColor
-{
-Color m_aColor;
-OUString m_aName;
-sal_Int16 m_nThemeIndex = -1;
-sal_Int16 m_nLumMod = 1;
-sal_Int16 m_nLumOff = 0;
-
-NamedColor() = default;
-
-NamedColor(Color const& rColor, OUString const& rName)
-: m_aColor(rColor)
-, m_aName(rName)
-{}
-
-model::ComplexColor getComplexColor()
-{
-model::ComplexColor aComplexColor;
-
-auto eThemeColorTy

[Libreoffice-commits] core.git: basegfx/source comphelper/source include/basegfx include/comphelper include/svx oox/source svx/source

2023-07-04 Thread Noel Grandin (via logerrit)
 basegfx/source/polygon/b2dlinegeometry.cxx|   23 ++-
 comphelper/source/property/propmultiplex2.cxx |   10 +++---
 include/basegfx/polygon/b2dlinegeometry.hxx   |3 +--
 include/comphelper/propmultiplex2.hxx |4 +---
 include/svx/svdotable.hxx |2 +-
 oox/source/drawingml/shape.cxx|2 +-
 svx/source/table/svdotable.cxx|4 ++--
 7 files changed, 15 insertions(+), 33 deletions(-)

New commits:
commit 203476b6676505acafd1c41561800afd9316a0f6
Author: Noel Grandin 
AuthorDate: Tue Jul 4 16:12:19 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 20:19:06 2023 +0200

loplugin:constantparam

Change-Id: Iee554baae7239c9bf0ac35cab6ff235a88dc29a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153973
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx 
b/basegfx/source/polygon/b2dlinegeometry.cxx
index 6dda8f9e7e1f..37c7cfc172d2 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -848,8 +848,7 @@ namespace basegfx
 css::drawing::LineCap eCap,
 double fMaxAllowedAngle,
 double fMaxPartOfEdge,
-double fMiterMinimumAngle,
-basegfx::triangulator::B2DTriangleVector* pTriangles)
+double fMiterMinimumAngle)
 {
 if(fMaxAllowedAngle > M_PI_2)
 {
@@ -959,7 +958,7 @@ namespace basegfx
 fHalfLineWidth,
 eJoin,
 fMiterMinimumAngle,
-pTriangles));
+nullptr));
 }
 else if(aOrientation == 
B2VectorOrientation::Negative)
 {
@@ -976,7 +975,7 @@ namespace basegfx
 fHalfLineWidth,
 eJoin,
 fMiterMinimumAngle,
-pTriangles));
+nullptr));
 }
 }
 
@@ -995,7 +994,7 @@ namespace basegfx
 bLast && eCap == 
css::drawing::LineCap_ROUND,
 bFirst && eCap == 
css::drawing::LineCap_SQUARE,
 bLast && eCap == 
css::drawing::LineCap_SQUARE,
-pTriangles));
+nullptr));
 }
 else
 {
@@ -1007,7 +1006,7 @@ namespace basegfx
 false,
 false,
 false,
-pTriangles));
+nullptr));
 }
 
 // prepare next step
@@ -1030,17 +1029,7 @@ namespace basegfx
 aCandidate.getB2DPoint(0),
 fHalfLineWidth));
 
-if(nullptr != pTriangles)
-{
-const basegfx::triangulator::B2DTriangleVector aResult(
-basegfx::triangulator::triangulate(
-aCircle));
-pTriangles->insert(pTriangles->end(), aResult.begin(), 
aResult.end());
-}
-else
-{
-aRetval.append(aCircle);
-}
+aRetval.append(aCircle);
 }
 
 return aRetval;
diff --git a/comphelper/source/property/propmultiplex2.cxx 
b/comphelper/source/property/propmultiplex2.cxx
index 16c06c3bc1f9..b9d7719c4e1d 100644
--- a/comphelper/source/property/propmultiplex2.cxx
+++ b/comphelper/source/property/propmultiplex2.cxx
@@ -51,14 +51,12 @@ void 
OPropertyChangeListener2::setAdapter(std::unique_lock& /*rGuard
 OPropertyChangeMultiplexer2::OPropertyChangeMultiplexer2(std::mutex& rMutex,
  
std::unique_lock& rGuard,
  
OPropertyChangeListener2* _pListener,
- const 
Reference& _rxSet,
- bool _bAutoReleaseSet)
+ const 
Reference& _rxSet)
 : m_rMutex(rMutex)
 , m_xSet(_rxSet)
 , m_pListener(_pListener)
 , m_nLockCount(0)
 , m_bListening(false)
-, m_bAutoSetRelease(_bAutoReleaseSet)
 {
 m_pListener->setAdapter(rGuard, this);
 }
@@ -84,8 +82,7 @@ void

Re: LibreOffice Build failed on Debian-x86-32bit

2023-07-04 Thread Rene Engelhard

Hi,

Am 03.07.23 um 20:45 schrieb Rene Engelhard:




Here is the output from my current build process (from the status of the
LibreOffice source from last Friday):


Note you can't assume anything over SSE2 in here.


Actually you can't assume anything MMXish or SSEish.

https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1


I confused it with amd64 which up to 
SSE2:https://wiki.debian.org/ArchitectureSpecificsMemo#amd64


https://wiki.debian.org/ArchitectureSpecificsMemo#amd64



I've no diea about SIMD instuctions bit this suspicously looks like 
instructions not in SSE2?


clang (which per defaults gets used for building skia if installed) 
spells out explicitely that it's trying to use SSE2:


/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:65:50: 
error: always_inline function '_mm_loadu_si128' requires target feature 
'sse2', but would be inlined into function 'blit_row_s32_blend' that is 
compiled without support for 'sse2'

    _mm_storeu_si128(dst4, SkPMLerp_SSE2(_mm_loadu_si128(src4),
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:66:50: 
error: always_inline function '_mm_loadu_si128' requires target feature 
'sse2', but would be inlined into function 'blit_row_s32_blend' that is 
compiled without support for 'sse2'

_mm_loadu_si128(dst4),
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:65:13: 
error: always_inline function '_mm_storeu_si128' requires target feature 
'sse2', but would be inlined into function 'blit_row_s32_blend' that is 
compiled without support for 'sse2'

    _mm_storeu_si128(dst4, SkPMLerp_SSE2(_mm_loadu_si128(src4),
    ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:33:30: 
error: always_inline function '_mm_set1_epi32' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    const __m128i mask = _mm_set1_epi32(0x00FF00FF);
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:36:26: 
error: always_inline function '_mm_and_si128' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i src_rb = _mm_and_si128(mask, src);
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:37:26: 
error: always_inline function '_mm_srli_epi16' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i src_ag = _mm_srli_epi16(src, 8);
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:38:26: 
error: always_inline function '_mm_and_si128' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i dst_rb = _mm_and_si128(mask, dst);
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:39:26: 
error: always_inline function '_mm_srli_epi16' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i dst_ag = _mm_srli_epi16(dst, 8);
 ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:42:27: 
error: always_inline function '_mm_sub_epi16' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i diff_rb = _mm_sub_epi16(src_rb, dst_rb);
  ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:43:27: 
error: always_inline function '_mm_sub_epi16' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i diff_ag = _mm_sub_epi16(src_ag, dst_ag);
  ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:44:21: 
error: always_inline function '_mm_set1_epi16' requires target feature 
'sse2', but would be inlined into function 'SkPMLerp_SSE2' that is 
compiled without support for 'sse2'

    __m128i s = _mm_set1_epi16(src_scale);
    ^
/home/rene/LibreOffice/git/libreoffice-7-6/workdir/UnpackedTarball/skia/src/core/SkBlitRow_D32.cpp:45:19: 
error: always_inline function '_mm_mullo_epi16' requires target feature 
'sse2', but would be inlined into function 'SkPM

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

2023-07-04 Thread Noel Grandin (via logerrit)
 vcl/source/control/combobox.cxx |9 -
 vcl/source/window/tabpage.cxx   |5 ++---
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit f73e8c895e24fda10931ecf344a1a0dd8bcdf92c
Author: Noel Grandin 
AuthorDate: Tue Jul 4 15:00:12 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 20:18:47 2023 +0200

unnecessary LogicToPixel in TabPage::Draw

we are already using logical pixels here, and DrawBitmapEx wants logical
pixels

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

diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 5a83165eb1af..90abeaa25968 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -163,7 +163,6 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, 
const tools::Rectangle&
 
 void TabPage::Draw( OutputDevice* pDev, const Point& rPos, 
SystemTextColorFlags )
 {
-Point aPos = pDev->LogicToPixel( rPos );
 Size aSize = GetSizePixel();
 
 Wallpaper aWallpaper = GetBackground();
@@ -175,14 +174,14 @@ void TabPage::Draw( OutputDevice* pDev, const Point& 
rPos, SystemTextColorFlags
 pDev->SetLineColor();
 
 if ( aWallpaper.IsBitmap() )
-pDev->DrawBitmapEx( aPos, aSize, aWallpaper.GetBitmap() );
+pDev->DrawBitmapEx( rPos, aSize, aWallpaper.GetBitmap() );
 else
 {
 if( aWallpaper.GetColor() == COL_AUTO )
 pDev->SetFillColor( 
GetSettings().GetStyleSettings().GetDialogColor() );
 else
 pDev->SetFillColor( aWallpaper.GetColor() );
-pDev->DrawRect( tools::Rectangle( aPos, aSize ) );
+pDev->DrawRect( tools::Rectangle( rPos, aSize ) );
 }
 
 pDev->Pop();
commit a2dacae0c8acfad8a5e5a16c766ee740ec202c5e
Author: Noel Grandin 
AuthorDate: Tue Jul 4 14:58:03 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 20:18:38 2023 +0200

unnecessary LogicToPixel in ComboBox::Draw

we are already using logical pixels here, and Draw wants logical pixels

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

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 2fa7913c5148..0edd309ba7f2 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1152,7 +1152,6 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& 
rPos, SystemTextColorFlags
 {
 GetMainWindow()->ApplySettings(*pDev);
 
-Point aPos = pDev->LogicToPixel( rPos );
 Size aSize = GetSizePixel();
 vcl::Font aFont = GetMainWindow()->GetDrawPixelFont( pDev );
 
@@ -1168,7 +1167,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& 
rPos, SystemTextColorFlags
 bool bBackground = IsControlBackground();
 if ( bBorder || bBackground )
 {
-tools::Rectangle aRect( aPos, aSize );
+tools::Rectangle aRect( rPos, aSize );
 // aRect.Top() += nEditHeight;
 if ( bBorder )
 {
@@ -1192,7 +1191,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& 
rPos, SystemTextColorFlags
 // First, draw the edit part
 Size aOrigSize(m_pImpl->m_pSubEdit->GetSizePixel());
 m_pImpl->m_pSubEdit->SetSizePixel(Size(aSize.Width(), nEditHeight));
-m_pImpl->m_pSubEdit->Draw( pDev, aPos, nFlags );
+m_pImpl->m_pSubEdit->Draw( pDev, rPos, nFlags );
 m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize);
 
 // Second, draw the listbox
@@ -1220,14 +1219,14 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& 
rPos, SystemTextColorFlags
 }
 }
 
-tools::Rectangle aClip( aPos, aSize );
+tools::Rectangle aClip( rPos, aSize );
 pDev->IntersectClipRegion( aClip );
 sal_Int32 nLines = static_cast( nTextHeight > 0 ? 
(aSize.Height()-nEditHeight)/nTextHeight : 1 );
 if ( !nLines )
 nLines = 1;
 const sal_Int32 nTEntry = IsReallyVisible() ? 
m_pImpl->m_pImplLB->GetTopEntry() : 0;
 
-tools::Rectangle aTextRect( aPos, aSize );
+tools::Rectangle aTextRect( rPos, aSize );
 
 aTextRect.AdjustLeft(3*nOnePixel );
 aTextRect.AdjustRight( -(3*nOnePixel) );


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

2023-07-04 Thread Khaled Hosny (via logerrit)
 vcl/source/gdi/pdfwriter_impl.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit c1dcffceb14cd35c7168ba2108b2f2e9aa875b56
Author: Khaled Hosny 
AuthorDate: Tue Jul 4 15:49:35 2023 +
Commit: خالد حسني 
CommitDate: Tue Jul 4 20:15:26 2023 +0200

tdf#156151: Take PDF DPI into account when outputting Type 3 glyphs

We were always assuming the default 720 DPI, but this is not always true
when printing to file as the DPI would depend on printer settings in
this case.

Change-Id: I747f8e24f0942ecb94eb8acfc1dd9972d83ba0e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153978
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 432f25b04ba1..b5653748ac8e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2649,6 +2649,10 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 ResourceDict aResourceDict;
 std::list aOutputStreams;
 
+// Scale for glyph outlines.
+double fScaleX = GetDPIX() / 72.;
+double fScaleY = GetDPIY() / 72.;
+
 for (auto i = 1u; i < nGlyphs; i++)
 {
 auto nStream = pGlyphStreams[i];
@@ -2731,9 +2735,12 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 const auto& rOutline = rGlyph.getOutline();
 if (rOutline.count())
 {
-// XXX I have no idea why this transformation matrix is needed.
-aContents.append("q 10 0 0 10 0 ");
-appendDouble(m_aPages.back().getHeight() * -10, aContents, 3);
+aContents.append("q ");
+appendDouble(fScaleX, aContents);
+aContents.append(" 0 0 ");
+appendDouble(fScaleY, aContents);
+aContents.append(" 0 ");
+appendDouble(m_aPages.back().getHeight() * -fScaleY, 
aContents, 3);
 aContents.append(" cm\n");
 m_aPages.back().appendPolyPolygon(rOutline, aContents);
 aContents.append("f\n"


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

2023-07-04 Thread Mike Kaganski (via logerrit)
 sw/inc/autostyle_helper.hxx   |   31 
+++
 sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx |   17 +
 sw/source/core/unocore/unoobj.cxx |   52 
+
 sw/source/core/unocore/unostyle.cxx   |   67 
--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |   99 
++
 6 files changed, 213 insertions(+), 53 deletions(-)

New commits:
commit b036e563e699595fa7625888f11ab0c76f1abd66
Author: Mike Kaganski 
AuthorDate: Tue Jul 4 08:14:02 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Jul 4 20:10:33 2023 +0200

tdf#141969: use paragraph autostyle to mimic Word's table style

Word's table styles may define paragraph and character properties. They are
handled in DomainMapperTableHandler::ApplyParagraphPropertiesFromTableStyle.

When setting such a character property using setPropertyValue, it may apply
to the text runs inside the paragraph, overriding values from character
style and direct formatting, which must be kept.

To fix that, this change creates a *paragraph* autostyle first, containing
the properties; and then applies only this autostyle to the paragraph; the
autostyle can't apply to runs, so the properties apply at paragraph level.

Sadly, it is impossible to create a useful autostyle in writerfilter using
UNO, because of the same problem that caused tdf#155945. UNO properties
may define only parts of complex SfxPoolItem; setting them without having
already applied values of such SfxPoolItem's would create wrong values for
properties that weren't set by the UNO properties, but happen to share the
same SfxPoolItem. To workaround that in writerfilter, a map of UNO names
to sets of UNO names defining the complex property would be required, and
then maintained.

Instead, introduce a hidded 'ParaAutoStyleDef' property of SwXTextCursor,
taking the same PropertyValue sequence as in XAutoStyleFamily::insertStyle.
Implement it similarly to SwUnoCursorHelper::SetPropertyValues: first,
build a WhichRangesContainer for specific WIDs needed for the properties;
then obtain the actual values for these WIDs from the paragraph; and then
set properties from the PropertyValue sequence.

To create the autostyle properly, the code from 
SwXAutoStyleFamily::insertStyle
is reused.

There are more "proper" ways to fix this in part or as a whole, e.g.:

* Split all complex SfxPoolItem's to simple ones, as done for one of them
  in commit db115bec9254417ef7a3faf687478fe5424ab378 (tdf#78510 sw,cui:
  split SvxLRSpaceItem for SwTextNode, SwTextFormatColl, 2023-02-24);

* Rewrite writerfilter in sw;

* Implement the missing proper table styles with paragraph and character
  properties, having the same precedence.

But I don't feel crazy enough for any of these :D

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

diff --git a/sw/inc/autostyle_helper.hxx b/sw/inc/autostyle_helper.hxx
new file mode 100644
index ..9336085db02e
--- /dev/null
+++ b/sw/inc/autostyle_helper.hxx
@@ -0,0 +1,31 @@
+/* -*- 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 
+
+#include 
+#include 
+
+#include 
+
+#include "istyleaccess.hxx"
+#include "swatrset.hxx"
+
+class SwDoc;
+
+std::shared_ptr
+PropValuesToAutoStyleItemSet(SwDoc& rDoc, IStyleAccess::SwAutoStyleFamily 
eFamily,
+ const 
css::uno::Sequence& Values,
+ SfxItemSet& rSet);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git 
a/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx 
b/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx
new file mode 100644
index ..6cbb8fb72e9d
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf141969-font_in_table_with_style.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 20b190d59af6..a0a4d8051686 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -1177,6 +1177,23 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156078)
 CPPUNIT_ASSERT(numberPixelsFound);
 }
 
+CPPUNIT_TEST_FIXTURE(Te

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

2023-07-04 Thread Michael Stahl (via logerrit)
 sw/source/core/unocore/unostyle.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 0efacb9f484962d4b3be207ed3ebb8935779444c
Author: Michael Stahl 
AuthorDate: Tue Jul 4 14:54:47 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 4 20:01:00 2023 +0200

tdf#156155 sw: export draw:fill to top-level ODF graphic styles

The default for XATTR_FILLSTYLE for Writer flys differs from the default
in the item pool, which is intended for svx shapes/SdrObjects.

This is implemented with an intermediate mpDfltFrameFormat but it needs
some special handling so the attribute ends up in the styles.xml.

Change-Id: I8f369809a9f3b7e85a8bc7ad5d309dbc3cd6ccfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153970
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 9410a22cdbe7c977206456218c75683a305ef79e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153993

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 0f0faa227351..bb78c16244bc 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2536,6 +2536,21 @@ uno::Sequence 
SwXStyle::getPropertyStates(const uno::Seque
 }
 }
 break;
+case XATTR_FILLSTYLE:
+{
+if (m_rEntry.family() == SfxStyleFamily::Frame
+&& xStyle->GetFrameFormat()->DerivedFrom() == 
GetDoc()->GetDfltFrameFormat())
+{   // tdf#156155 mpDfltFrameFormat is the parent, but because
+// it IsDefault() it is not enumerated/exported as a style
+// to ODF, so export its one important value here.
+pStates[i] = beans::PropertyState_DIRECT_VALUE;
+}
+else
+{
+pStates[i] = pPropSet->getPropertyState(*pEntry, 
*pSourceSet);
+}
+}
+break;
 case RES_BACKGROUND:
 {
 // for FlyFrames we need to mark the used properties from type 
RES_BACKGROUND


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 3b2dc641d67c47ab9492f3d0a65bd57ea5d88311
Author: Olivier Hallot 
AuthorDate: Tue Jul 4 14:56:21 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 19:56:21 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 2fd43ac04f55c78c7e323dc28509889d027f7a42
  - Fix a d'oh! you found a bug

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

diff --git a/helpcontent2 b/helpcontent2
index 0f3a4fe926e1..2fd43ac04f55 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0f3a4fe926e1c8b554160094d81087b9ab346a07
+Subproject commit 2fd43ac04f55c78c7e323dc28509889d027f7a42


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

2023-07-04 Thread Olivier Hallot (via logerrit)
 source/text/sbasic/shared/03/sf_dialog.xhp |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2fd43ac04f55c78c7e323dc28509889d027f7a42
Author: Olivier Hallot 
AuthorDate: Tue Jul 4 14:54:54 2023 -0300
Commit: Olivier Hallot 
CommitDate: Tue Jul 4 19:56:20 2023 +0200

Fix a d'oh! you found a bug

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

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index c6abe7a7ca..96d1bd40dc 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -612,7 +612,7 @@


  myButton = 
dlg.CreateButton('Button1', (20, 20, 60, 15))
- 
+   
 
 
 
@@ -647,7 +647,7 @@
Create a new control 
of type ComboBox in the current dialog.

svc.CreateComboBox(opt ControlName: str, opt Place, 
Border = "3D", DropDown = True, LineCount = 5): svc
-   
+   
Border: 
"3D" (default) or "FLAT" or "NONE"
DropDown: When True (default), a drop 
down button is displayed
LineCount: Specifies the maximum line 
count displayed in the drop down (default = 5)
@@ -815,7 +815,7 @@
  myFormattedField = 
dlg.CreateFormattedField('FormattedField1', (20, 20, 60, 15), SpinButton = 
True)

 
- 
+
 
CreateGroupBox 
-
 



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

2023-07-04 Thread Noel Grandin (via logerrit)
 vcl/source/control/button.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 7441aaa4c5b2215e369c62e22af098184e8ce807
Author: Noel Grandin 
AuthorDate: Tue Jul 4 14:46:24 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 19:17:04 2023 +0200

unnecessary LogicToPixel in RadioButton::Draw

we are already using logical pixels here, and ImplDraw wants logical
pixels

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

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index ec171d91137d..a99e9733496c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2531,7 +2531,6 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& 
rPos,
 if ( !maImage )
 {
 MapMode aResMapMode( MapUnit::Map100thMM );
-Point   aPos  = pDev->LogicToPixel( rPos );
 SizeaSize = GetSizePixel();
 SizeaImageSize = pDev->LogicToPixel( Size( 300, 300 ), 
aResMapMode );
 SizeaBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), 
aResMapMode );
@@ -2565,7 +2564,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& 
rPos,
 pDev->SetTextColor( GetTextColor() );
 pDev->SetTextFillColor();
 
-ImplDraw( pDev, nFlags, aPos, aSize,
+ImplDraw( pDev, nFlags, rPos, aSize,
   aImageSize, aStateRect, aMouseRect );
 
 Point   aCenterPos = aStateRect.Center();
commit d408fe5cd45c9594feecec727ab2f73c66e361d0
Author: Noel Grandin 
AuthorDate: Tue Jul 4 14:36:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 19:16:55 2023 +0200

unnecessary LogicToPixel in CheckBox::Draw

we are already in logical pixels here, and the ImplDraw call expects
logical pixels

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

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 69646cc9637e..ec171d91137d 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3355,7 +3355,6 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& 
rPos,
  SystemTextColorFlags nFlags )
 {
 MapMode aResMapMode( MapUnit::Map100thMM );
-Point   aPos  = pDev->LogicToPixel( rPos );
 SizeaSize = GetSizePixel();
 SizeaImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode 
);
 SizeaBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode );
@@ -3392,7 +3391,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& 
rPos,
 pDev->SetTextColor( GetTextColor() );
 pDev->SetTextFillColor();
 
-ImplDraw( pDev, nFlags, aPos, aSize,
+ImplDraw( pDev, nFlags, rPos, aSize,
   aImageSize, aStateRect, aMouseRect );
 
 pDev->SetLineColor();


[Libreoffice-commits] core.git: compilerplugins/clang forms/source sd/inc sw/inc xmloff/inc xmloff/source

2023-07-04 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedvarsglobal.untouched.results |   84 ++---
 compilerplugins/clang/unusedvarsglobal.writeonly.results |  218 +--
 forms/source/inc/frm_strings.hxx |2 
 sd/inc/bitmaps.hlst  |3 
 sw/inc/unoprnms.hxx  |2 
 xmloff/inc/xmlprop.hxx   |1 
 xmloff/source/forms/strings.hxx  |1 
 7 files changed, 118 insertions(+), 193 deletions(-)

New commits:
commit 77befddec9486403c471b2beafd4ca0fd2429c5a
Author: Noel Grandin 
AuthorDate: Mon Jul 3 13:27:18 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 19:16:40 2023 +0200

loplugin:unusedvarsglobal

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

diff --git a/compilerplugins/clang/unusedvarsglobal.untouched.results 
b/compilerplugins/clang/unusedvarsglobal.untouched.results
index 9a9216a208a3..490665af3b1c 100644
--- a/compilerplugins/clang/unusedvarsglobal.untouched.results
+++ b/compilerplugins/clang/unusedvarsglobal.untouched.results
@@ -1,5 +1,5 @@
 canvas/workben/canvasdemo.cxx:666
-(anonymous namespace)::DemoApp aApp
+DemoApp aApp
 connectivity/source/drivers/evoab2/EApi.h:51
 gconstpointer (*)(EContact *, EContactField) e_contact_get_const
 connectivity/source/drivers/evoab2/EApi.h:55
@@ -17,80 +17,82 @@ connectivity/source/drivers/evoab2/EApi.h:93
 connectivity/source/drivers/evoab2/EApi.h:101
 gboolean (*)(EBook *, const char *, const char *, const char *, GError **) 
e_book_authenticate_user
 cppu/source/uno/check.cxx:329
-(anonymous namespace)::BinaryCompatible_Impl aTest
-desktop/source/lib/init.cxx:6493
+BinaryCompatible_Impl aTest
+desktop/source/lib/init.cxx:7376
 SvtOptionsDialogOptions aDialogOptions
-desktop/source/lib/init.cxx:6494
+desktop/source/lib/init.cxx:7377
 SvtCTLOptions aSvtCTLOptions
-desktop/source/lib/init.cxx:6495
+desktop/source/lib/init.cxx:7378
 SvtAccessibilityOptions aSvtAccessibilityOptions
-desktop/source/lib/init.cxx:6496
+desktop/source/lib/init.cxx:7379
 svtools::ColorConfig aColorConfig
-desktop/source/lib/init.cxx:6497
+desktop/source/lib/init.cxx:7380
 SvtMiscOptions aSvtMiscOptions
-desktop/source/lib/init.cxx:6498
+desktop/source/lib/init.cxx:7381
 SvtSlideSorterBarOptions aSvtSlideSorterBarOptions
-desktop/source/lib/init.cxx:6499
+desktop/source/lib/init.cxx:7382
 SvtCommandOptions aSvtCommandOptions
-desktop/source/lib/init.cxx:6500
+desktop/source/lib/init.cxx:7383
 SvtCompatibilityOptions aSvtCompatibilityOptions
-desktop/source/lib/init.cxx:6501
+desktop/source/lib/init.cxx:7384
 SvtFilterOptions aSvtFilterOptions
-desktop/source/lib/init.cxx:6502
+desktop/source/lib/init.cxx:7385
 SvtLinguConfig aSvtLinguConfig
-desktop/source/lib/init.cxx:6503
+desktop/source/lib/init.cxx:7386
 SvtModuleOptions aSvtModuleOptions
-desktop/source/lib/init.cxx:6504
+desktop/source/lib/init.cxx:7387
 SvtPathOptions aSvtPathOptions
-desktop/source/lib/init.cxx:6505
+desktop/source/lib/init.cxx:7388
 SvtSearchOptions aSvtSearchOptions
-desktop/source/lib/init.cxx:6506
+desktop/source/lib/init.cxx:7389
 SvtSysLocaleOptions aSvtSysLocaleOptions
-desktop/source/lib/init.cxx:6507
+desktop/source/lib/init.cxx:7390
 SvtUserOptions aSvtUserOptions
-desktop/source/lib/init.cxx:6509
+desktop/source/lib/init.cxx:7392
 MouseSettings aMouseSettings
-desktop/source/lib/init.cxx:6510
+desktop/source/lib/init.cxx:7393
 StyleSettings aStyleSettings
-desktop/source/lib/init.cxx:6511
+desktop/source/lib/init.cxx:7394
 MiscSettings aMiscSettings
-desktop/source/lib/init.cxx:6512
+desktop/source/lib/init.cxx:7395
 HelpSettings aHelpSettings
-desktop/source/lib/init.cxx:6513
+desktop/source/lib/init.cxx:7396
 AllSettings aAllSettings
-framework/source/services/ContextChangeEventMultiplexer.cxx:352
-framework::(anonymous namespace)::Hook g_hook
+framework/source/services/ContextChangeEventMultiplexer.cxx:353
+Hook g_hook
 hwpfilter/source/nodes.h:89
 int count
 pyuno/source/module/pyuno_gc.cxx:45
-pyuno::(anonymous namespace)::StaticDestructorGuard guard
+StaticDestructorGuard guard
 sal/osl/all/utility.cxx:45
-osl::(anonymous namespace)::OGlobalTimer aGlobalTimer
+OGlobalTimer aGlobalTimer
 sal/qa/osl/file/osl_File.cxx:4978
-(anonymous namespace)::GlobalObject theGlobalObject
+GlobalObject theGlobalObject
 sal/rtl/cmdargs.cxx:46
-(anonymous namespace)::ArgHolder argHolder
-sal/rtl/strtmpl.hxx:890
-IMPL_RTL_STRINGDATA data
-sc/source/core/inc/sharedstringpoolpurge.hxx:43
-sc::SharedStringPoolPurge * self
-sfx2/source/bastyp/fltfnc.cxx:80
+ArgHolder argHolder
+sal/rtl/strtmpl.hxx:772
+rtl_tString data
+sfx2/source/bastyp/fltfnc.cxx:81
 SfxFilterListe

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

2023-07-04 Thread Nay Catina Dia-Schneebeli (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 92416376fca75a50c03557cb478b70bcce25acf5
Author: Nay Catina Dia-Schneebeli 
AuthorDate: Tue Jul 4 13:36:05 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 18:36:05 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-6'
  to ee8c6dd6dbbf5bba930a9264d9e1929be21dacbb
  - tdf#155031 Help page for Style Spotlight

Change-Id: Id25e7aed6db62621e3fc4fd2e430efec8c6d397e
Signed-off-by: Olivier Hallot 
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153979
Tested-by: Jenkins
(cherry picked from commit 0f3a4fe926e1c8b554160094d81087b9ab346a07)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153995

diff --git a/helpcontent2 b/helpcontent2
index 71e1ee638af1..ee8c6dd6dbbf 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 71e1ee638af1e19eceaf242338c811f7300869d6
+Subproject commit ee8c6dd6dbbf5bba930a9264d9e1929be21dacbb


[Libreoffice-commits] help.git: Branch 'libreoffice-7-6' - AllLangHelp_swriter.mk source/text

2023-07-04 Thread Nay Catina Dia-Schneebeli (via logerrit)
 AllLangHelp_swriter.mk  |1 
 source/text/swriter/01/spotlight_styles.xhp |   51 
 2 files changed, 52 insertions(+)

New commits:
commit ee8c6dd6dbbf5bba930a9264d9e1929be21dacbb
Author: Nay Catina Dia-Schneebeli 
AuthorDate: Tue Jul 4 13:15:42 2023 -0300
Commit: Olivier Hallot 
CommitDate: Tue Jul 4 18:36:04 2023 +0200

tdf#155031 Help page for Style Spotlight

Change-Id: Id25e7aed6db62621e3fc4fd2e430efec8c6d397e
Signed-off-by: Olivier Hallot 
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153979
Tested-by: Jenkins
(cherry picked from commit 0f3a4fe926e1c8b554160094d81087b9ab346a07)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153995

diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk
index 7819b539e9..2055f792cd 100644
--- a/AllLangHelp_swriter.mk
+++ b/AllLangHelp_swriter.mk
@@ -206,6 +206,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\
 helpcontent2/source/text/swriter/01/selection_mode \
 helpcontent2/source/text/swriter/01/select_text \
 helpcontent2/source/text/swriter/01/show_whitespace \
+helpcontent2/source/text/swriter/01/spotlight_styles \
 helpcontent2/source/text/swriter/01/style_inspector \
 helpcontent2/source/text/swriter/01/title_page \
 helpcontent2/source/text/swriter/01/translate \
diff --git a/source/text/swriter/01/spotlight_styles.xhp 
b/source/text/swriter/01/spotlight_styles.xhp
new file mode 100644
index 00..c3664f22d7
--- /dev/null
+++ b/source/text/swriter/01/spotlight_styles.xhp
@@ -0,0 +1,51 @@
+
+
+
+
+
+  
+Spotlight Styles
+/text/swriter/01/spotlight_styles.xhp
+  
+
+
+
+spotlight;styles
+styles spotlight;visual indicator of styles
+styles visual indicator;spotlighting styles
+
+
+
+
+Styles Spotlighting
+The styles 
spotlight in %PRODUCTNAME Writer gives a visual indicator of styles and direct 
formatting present in the document.
+
+
+
+Open the 
Styles deck, mark Spotlight check 
box.
+
+Use the styles 
spotlight to inspect usage of styles and direct formatting in the 
document.
+The Spotlight visual 
indicator is codified using numbers and colors. The feature shows direct 
formatting for characters and paragraphs. 
+Direct formatting text 
is indicated by a hatch pattern in the Spotlight colored indicators on the 
margin.
+Spotlight character 
direct formatting visual indication is a call-out with string "df" next to the 
text with direct formatting. 
+The Spotlight feature can visualize 
paragraphs and characters styles only.
+When the extended tips 
features is enabled in %PRODUCTNAME - 
PreferencesTools – 
Options – LibreOffice – 
General, a tooltip shows the style name and many attributes of the 
style applied.
+Paragraph direct 
formatting is indicated in two ways: by a hatch pattern in the coloured 
indicators and by the text "+ Paragraph Direct Formatted" added to the name of 
the style.
+Character Direct Formatting
+To enable character 
direct formatting spotlight, go to menu  Styles - Spotlight Character 
Direct Formatting
+When enabled, the 
Character Direct Formatting feature indicates direct character formatting by a 
lightgray text "df" call-out and by lightgray highlight.
+Use command Clean direct 
formatting (CommandCtrl
 + M) to remove character direct formatting of the paragraph.
+The Clean Direct 
Formatting command only cleans character attributes of paragraphs. 
Other attributes such as manual lists are not cleaned.
+
+Refer to Styles for 
more information about Style 
Categories and Style Groups
+Manage 
Templates
+
+
+


[Libreoffice-commits] core.git: helpcontent2

2023-07-04 Thread Nay Catina Dia-Schneebeli (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 798ea743033273714780ba7bcf5a29a9b6c2d4a1
Author: Nay Catina Dia-Schneebeli 
AuthorDate: Tue Jul 4 13:32:39 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 18:32:39 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 0f3a4fe926e1c8b554160094d81087b9ab346a07
  - tdf#155031 Help page for Style Spotlight

Change-Id: Id25e7aed6db62621e3fc4fd2e430efec8c6d397e
Signed-off-by: Olivier Hallot 
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153979
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index 7656ffac6fbb..0f3a4fe926e1 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7656ffac6fbbacd8739ee690549517a8e0e49f6b
+Subproject commit 0f3a4fe926e1c8b554160094d81087b9ab346a07


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

2023-07-04 Thread Nay Catina Dia-Schneebeli (via logerrit)
 AllLangHelp_swriter.mk  |1 
 source/text/swriter/01/spotlight_styles.xhp |   51 
 2 files changed, 52 insertions(+)

New commits:
commit 0f3a4fe926e1c8b554160094d81087b9ab346a07
Author: Nay Catina Dia-Schneebeli 
AuthorDate: Tue Jul 4 13:15:42 2023 -0300
Commit: Olivier Hallot 
CommitDate: Tue Jul 4 18:32:39 2023 +0200

tdf#155031 Help page for Style Spotlight

Change-Id: Id25e7aed6db62621e3fc4fd2e430efec8c6d397e
Signed-off-by: Olivier Hallot 
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153979
Tested-by: Jenkins

diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk
index c2bedb6997..93003fca72 100644
--- a/AllLangHelp_swriter.mk
+++ b/AllLangHelp_swriter.mk
@@ -206,6 +206,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\
 helpcontent2/source/text/swriter/01/selection_mode \
 helpcontent2/source/text/swriter/01/select_text \
 helpcontent2/source/text/swriter/01/show_whitespace \
+helpcontent2/source/text/swriter/01/spotlight_styles \
 helpcontent2/source/text/swriter/01/style_inspector \
 helpcontent2/source/text/swriter/01/title_page \
 helpcontent2/source/text/swriter/01/translate \
diff --git a/source/text/swriter/01/spotlight_styles.xhp 
b/source/text/swriter/01/spotlight_styles.xhp
new file mode 100644
index 00..c3664f22d7
--- /dev/null
+++ b/source/text/swriter/01/spotlight_styles.xhp
@@ -0,0 +1,51 @@
+
+
+
+
+
+  
+Spotlight Styles
+/text/swriter/01/spotlight_styles.xhp
+  
+
+
+
+spotlight;styles
+styles spotlight;visual indicator of styles
+styles visual indicator;spotlighting styles
+
+
+
+
+Styles Spotlighting
+The styles 
spotlight in %PRODUCTNAME Writer gives a visual indicator of styles and direct 
formatting present in the document.
+
+
+
+Open the 
Styles deck, mark Spotlight check 
box.
+
+Use the styles 
spotlight to inspect usage of styles and direct formatting in the 
document.
+The Spotlight visual 
indicator is codified using numbers and colors. The feature shows direct 
formatting for characters and paragraphs. 
+Direct formatting text 
is indicated by a hatch pattern in the Spotlight colored indicators on the 
margin.
+Spotlight character 
direct formatting visual indication is a call-out with string "df" next to the 
text with direct formatting. 
+The Spotlight feature can visualize 
paragraphs and characters styles only.
+When the extended tips 
features is enabled in %PRODUCTNAME - 
PreferencesTools – 
Options – LibreOffice – 
General, a tooltip shows the style name and many attributes of the 
style applied.
+Paragraph direct 
formatting is indicated in two ways: by a hatch pattern in the coloured 
indicators and by the text "+ Paragraph Direct Formatted" added to the name of 
the style.
+Character Direct Formatting
+To enable character 
direct formatting spotlight, go to menu  Styles - Spotlight Character 
Direct Formatting
+When enabled, the 
Character Direct Formatting feature indicates direct character formatting by a 
lightgray text "df" call-out and by lightgray highlight.
+Use command Clean direct 
formatting (CommandCtrl
 + M) to remove character direct formatting of the paragraph.
+The Clean Direct 
Formatting command only cleans character attributes of paragraphs. 
Other attributes such as manual lists are not cleaned.
+
+Refer to Styles for 
more information about Style 
Categories and Style Groups
+Manage 
Templates
+
+
+


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - external/libnumbertext

2023-07-04 Thread Stephan Bergmann (via logerrit)
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 
 external/libnumbertext/deprecated.patch.0   |   49 
 2 files changed, 50 insertions(+)

New commits:
commit 3edabf69c20bd8d945d2edf7652e1f9a671905e1
Author: Stephan Bergmann 
AuthorDate: Fri Jul 1 19:45:19 2022 +0200
Commit: Aron Budea 
CommitDate: Tue Jul 4 18:28:10 2023 +0200

external/libnumbertext: Silence -Werror,-Wdeprecated-declarations

...as seen now with LLVM 15 trunk libc++, which marks the std::codecvt_utf8 
and
std::wstring_convert functionality, deprecated since C++17, as such

(
"[libc++] Implement P0618R0 (Deprecating )")

Change-Id: Id34e3fea540b76591ead8ba3df4c31a71d7b4aaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136776
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit e37e1a7d2007bd6896027b69271774da2568e6f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153935
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index fb88366d5aef..fa8c59b975c8 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
 external/libnumbertext/WinUnicodePath.patch1 \
 external/libnumbertext/EmptyString.patch1 \
+external/libnumbertext/deprecated.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libnumbertext/deprecated.patch.0 
b/external/libnumbertext/deprecated.patch.0
new file mode 100644
index ..1fe5c214f602
--- /dev/null
+++ b/external/libnumbertext/deprecated.patch.0
@@ -0,0 +1,49 @@
+--- src/Numbertext.cxx
 src/Numbertext.cxx
+@@ -41,7 +41,14 @@
+ std::wifstream wif(filename);
+ if (wif.fail())
+ return false;
++#if defined __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
+ wif.imbue(std::locale(std::locale(), new std::codecvt_utf8));
++#if defined __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ std::wstringstream wss;
+ wss << wif.rdbuf();
+ result = wss.str();
+@@ -122,8 +129,15 @@
+ MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wstr.get(), nSize);
+ return wstr.get();
+ #elif !defined NUMBERTEXT_BOOST
++#if defined __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
+ typedef std::codecvt_utf8 convert_type;
+ std::wstring_convert converter;
++#if defined __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ return converter.from_bytes( s );
+ #else
+ return ::locale::conv::utf_to_utf(s.c_str(), s.c_str() + 
s.size());
+@@ -138,8 +152,15 @@
+ WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, 
nullptr);
+ return str.get();
+ #elif !defined NUMBERTEXT_BOOST
++#if defined __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
+ typedef std::codecvt_utf8 convert_type;
+ std::wstring_convert converter;
++#if defined __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ return converter.to_bytes( s );
+ #else
+ return ::locale::conv::utf_to_utf(s.c_str(), s.c_str() + s.size());


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

2023-07-04 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/GraphicTest.cxx|   12 
 vcl/qa/cppunit/data/tdf156016.svg |   33 +
 2 files changed, 45 insertions(+)

New commits:
commit e6cf27e46a48580892ecd0d82f8e55ff9aed465d
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 13:01:36 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 17:32:54 2023 +0200

tdf#156016: vcl_graphic_test: Add unittest

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

diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 3cbbcbecf112..606936c65f9e 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -1282,6 +1282,18 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testLoadSVGZ)
 CPPUNIT_ASSERT_EQUAL(tools::Long(100 * scalingY), 
aGraphic.GetSizePixel().Height());
 }
 
+CPPUNIT_TEST_FIXTURE(GraphicTest, testTdf156016)
+{
+// Without the fix in place, this test would have failed with
+// - Expected: 0x0(Error Area:Io Class:NONE Code:0)
+// - Actual  : 0x8203(Error Area:Vcl Class:General Code:3)
+Graphic aGraphic = loadGraphic(u"tdf156016.svg");
+CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
+const auto[scalingX, scalingY] = getDPIScaling();
+CPPUNIT_ASSERT_EQUAL(tools::Long(100 * scalingX), 
aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(tools::Long(100 * scalingY), 
aGraphic.GetSizePixel().Height());
+}
+
 CPPUNIT_TEST_FIXTURE(GraphicTest, testAvailableThreaded)
 {
 Graphic jpgGraphic1 = importUnloadedGraphic(u"TypeDetectionExample.jpg");
diff --git a/vcl/qa/cppunit/data/tdf156016.svg 
b/vcl/qa/cppunit/data/tdf156016.svg
new file mode 100644
index ..e54d786fe7d4
--- /dev/null
+++ b/vcl/qa/cppunit/data/tdf156016.svg
@@ -0,0 +1,33 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; id="svg-root" width="100%" 
height="100%" viewBox="0 0 99 99">
+
+
+
+


[Libreoffice-commits] core.git: editeng/source officecfg/registry

2023-07-04 Thread Caolán McNamara (via logerrit)
 editeng/source/misc/acorrcfg.cxx   |2 +-
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2559baf56eed67dd97183d8852360866b5fe9d4e
Author: Caolán McNamara 
AuthorDate: Tue Jul 4 10:15:53 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 4 17:15:29 2023 +0200

32bit is enough for the word completion limit

and we don't have to change the xcs in that case

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

diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 4ff15f1bfc2d..74d97d5a41f9 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -524,7 +524,7 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
 break; // "Completion/MinWordLen",
 case  35:
 {
-sal_Int64 nVal = 0; pValues[nProp] >>= nVal;
+sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
 rSwFlags.nAutoCmpltListLen =
 sal::static_int_cast< sal_uInt32 >(nVal);
 }
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index dd880f51cfa4..0f684bb2eea9 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -4464,7 +4464,7 @@
   
   8
 
-
+
   
   
 Sets the maximum number of words to be recalled.


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

2023-07-04 Thread Michael Stahl (via logerrit)
 sw/source/core/unocore/unostyle.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 9410a22cdbe7c977206456218c75683a305ef79e
Author: Michael Stahl 
AuthorDate: Tue Jul 4 14:54:47 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 4 17:13:59 2023 +0200

tdf#156155 sw: export draw:fill to top-level ODF graphic styles

The default for XATTR_FILLSTYLE for Writer flys differs from the default
in the item pool, which is intended for svx shapes/SdrObjects.

This is implemented with an intermediate mpDfltFrameFormat but it needs
some special handling so the attribute ends up in the styles.xml.

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

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 071ca0daae31..f57cd53d407f 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2533,6 +2533,21 @@ uno::Sequence 
SwXStyle::getPropertyStates(const uno::Seque
 }
 }
 break;
+case XATTR_FILLSTYLE:
+{
+if (m_rEntry.family() == SfxStyleFamily::Frame
+&& xStyle->GetFrameFormat()->DerivedFrom() == 
GetDoc()->GetDfltFrameFormat())
+{   // tdf#156155 mpDfltFrameFormat is the parent, but because
+// it IsDefault() it is not enumerated/exported as a style
+// to ODF, so export its one important value here.
+pStates[i] = beans::PropertyState_DIRECT_VALUE;
+}
+else
+{
+pStates[i] = pPropSet->getPropertyState(*pEntry, 
*pSourceSet);
+}
+}
+break;
 case RES_BACKGROUND:
 {
 // for FlyFrames we need to mark the used properties from type 
RES_BACKGROUND


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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 sc/qa/unit/ThemeImportExportTest.cxx   |   34 +--
 sc/qa/unit/subsequent_export_test4.cxx |2 
 sc/source/filter/excel/xestyle.cxx |   72 ++---
 sc/source/filter/inc/xestyle.hxx   |   20 +
 4 files changed, 85 insertions(+), 43 deletions(-)

New commits:
commit ad341c969f7fe31590d80f795caeb5ecd2eb3983
Author: Tomaž Vajngerl 
AuthorDate: Sat Jul 1 14:26:08 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 16:43:31 2023 +0200

sc: add border export and enable round-trip test

Change-Id: I76071185d819b9645d97a3e599ea7f48b341a145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153820
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 563ef3bf8db881223201fbacbc4f3c565b8fac0f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153922

diff --git a/sc/qa/unit/ThemeImportExportTest.cxx 
b/sc/qa/unit/ThemeImportExportTest.cxx
index 95e6d0e2351e..0cf03ea6c010 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -60,6 +60,12 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExport)
 assertXPath(pXmlDoc, 
"/x:styleSheet/x:fills/x:fill[4]/x:patternFill/x:fgColor", "theme", "4");
 }
 
+// Round 100th percent to percent value - so that small differences don't fail 
the test
+sal_Int32 roundToPercent(sal_Int16 n100Percent)
+{
+return sal_Int32(std::round(double(n100Percent) / 100.0));
+}
+
 void checkCellBackgroundThemeColor(ScDocument* pDoc)
 {
 // A1
@@ -90,9 +96,9 @@ void checkCellBackgroundThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(20, 
sal_Int32(std::round(rTransformations[0].mnValue / 100.0)));
+CPPUNIT_ASSERT_EQUAL(20, roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(80, 
sal_Int32(std::round(rTransformations[1].mnValue / 100.0)));
+CPPUNIT_ASSERT_EQUAL(80, roundToPercent(rTransformations[1].mnValue));
 }
 
 // A3
@@ -109,7 +115,7 @@ void checkCellBackgroundThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(1), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(sal_Int16(5000), rTransformations[0].mnValue);
+CPPUNIT_ASSERT_EQUAL(50, roundToPercent(rTransformations[0].mnValue));
 }
 }
 
@@ -151,9 +157,9 @@ void checkCellTextThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(60, 
sal_Int32(std::round(rTransformations[0].mnValue / 100.0)));
+CPPUNIT_ASSERT_EQUAL(60, roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(40, 
sal_Int32(std::round(rTransformations[1].mnValue / 100.0)));
+CPPUNIT_ASSERT_EQUAL(40, roundToPercent(rTransformations[1].mnValue));
 }
 
 // B3
@@ -170,7 +176,7 @@ void checkCellTextThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(1), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(sal_Int16(5000), rTransformations[0].mnValue);
+CPPUNIT_ASSERT_EQUAL(50, roundToPercent(rTransformations[0].mnValue));
 }
 }
 
@@ -226,9 +232,9 @@ void checkCellBorderThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), rTransformations[0].mnValue);
+CPPUNIT_ASSERT_EQUAL(20, 
roundToPercent(rTransformations[0].mnValue));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(sal_Int16(7999), rTransformations[1].mnValue);
+CPPUNIT_ASSERT_EQUAL(80, 
roundToPercent(rTransformations[1].mnValue));
 }
 {
 auto* pTop = pBoxItem->GetRight();
@@ -239,9 +245,9 @@ void checkCellBorderThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
  

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

2023-07-04 Thread Xisco Fauli (via logerrit)
 sc/source/ui/vba/vbaworksheet.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 48d1573c0d862cb64cdbb4854bced60e5f0cdbaf
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 14:06:26 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 16:25:14 2023 +0200

sc: fix crash in ScVbaWorksheet::Cells

See 
https://crashreport.libreoffice.org/stats/signature/ScDocShell::GetDocument()

Similar to 286a1c03fa10acf60f076a0af987112d24cb2ff5
"sc: check excel::getDocShell"

Change-Id: I102e575b4992e175d4e780ef2b43f887d94bbd24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153964
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/vba/vbaworksheet.cxx 
b/sc/source/ui/vba/vbaworksheet.cxx
index 46b0e131f7e0..466e904d6f55 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -681,8 +681,9 @@ ScVbaWorksheet::Cells( const ::uno::Any &nRow, const 
::uno::Any &nCol )
 // Use a common helper method instead of creating a new ScVbaRange object
 uno::Reference< table::XCellRange > xRange( getSheet(), 
uno::UNO_QUERY_THROW );
 uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW );
-ScDocument& rDoc = excel::getDocShell( xModel )->GetDocument();
-return ScVbaRange::CellsHelper( rDoc, this, mxContext, xRange, nRow, nCol 
);
+if(ScDocShell* pShell = excel::getDocShell( xModel ))
+return ScVbaRange::CellsHelper(pShell->GetDocument(), this, mxContext, 
xRange, nRow, nCol );
+throw uno::RuntimeException();
 }
 
 uno::Reference< excel::XRange >


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

2023-07-04 Thread Xisco Fauli (via logerrit)
 sfx2/source/view/viewprn.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b88b9504503298996de1feaa3f86b1adf36563a2
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 14:23:20 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 16:24:31 2023 +0200

sfx2: fix crash in SfxViewShell::StartPrint

See 
https://crashreport.libreoffice.org/stats/signature/SfxViewShell::StartPrint(com::sun::star::uno::Sequence%3Ccom::sun::star::beans::PropertyValue%3E%20const%20&,bool,bool)

Change-Id: I3d10414d4cfd027bf80ceaf6692bb7f92269f6c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153965
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 5add9956abcb..5ada786ba108 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -609,8 +609,11 @@ void SfxViewShell::StartPrint( const uno::Sequence < 
beans::PropertyValue >& rPr
 css::beans::PropertyValue* pJobNameVal = 
xNewController->getValue("JobName");
 if (!pJobNameVal)
 {
-xNewController->setValue("JobName", 
Any(GetObjectShell()->GetTitle(1)));
-xNewController->setPrinterModified(mbPrinterSettingsModified);
+if (SfxObjectShell* pDoc = GetObjectShell())
+{
+xNewController->setValue("JobName", Any(pDoc->GetTitle(1)));
+xNewController->setPrinterModified(mbPrinterSettingsModified);
+}
 }
 }
 


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

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

New commits:
commit b68e4a2d0179558180085bfe28a32a1510aeb3e1
Author: Mike Kaganski 
AuthorDate: Tue Jul 4 11:50:01 2023 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 4 16:07:17 2023 +0200

Fix build on Win64, where int != sal_Int32

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

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

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

2023-07-04 Thread Michael Stahl (via logerrit)
 filter/source/pdf/pdfexport.cxx|   16 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   90 +
 vcl/source/gdi/pdfwriter_impl.cxx  |4 -
 3 files changed, 108 insertions(+), 2 deletions(-)

New commits:
commit f3e4a5450cdf602c3ed176c4f66c8845482fff97
Author: Michael Stahl 
AuthorDate: Tue Jul 4 11:32:07 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 4 15:20:32 2023 +0200

tdf#152235 filter,vcl: PDF/UA export: tag watermark as Artifact

Change-Id: I64e57a832678be935b69a5cea328cc252a4bf29d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153951
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit dd4ce9b2fc7feaf288055b24b5bc4842c0d2b4de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153927

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index a29ff1afb777..eac4128da177 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1262,6 +1262,13 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& 
rWriter, const Size& rPageSi
 pDev->Pop();
 
 rWriter.Push();
+// tdf#152235 tag around the reference to the XObject on the page
+rWriter.BeginStructureElement(vcl::PDFWriter::NonStructElement, 
::std::u16string_view());
+rWriter.SetStructureAttribute(vcl::PDFWriter::Type, 
vcl::PDFWriter::Pagination);
+rWriter.SetStructureAttribute(vcl::PDFWriter::Subtype, 
vcl::PDFWriter::Watermark);
+// HACK: this should produce *nothing* itself but is necessary to output
+// the Artifact tag here, not inside the XObject
+rWriter.DrawPolyLine({});
 rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
 rWriter.SetFont( aFont );
 rWriter.SetTextColor(maWatermarkColor);
@@ -1304,6 +1311,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& 
rWriter, const Size& rPageSi
 rWriter.BeginTransparencyGroup();
 rWriter.DrawText( aTextPoint, msWatermark );
 rWriter.EndTransparencyGroup( aTextRect, 50 );
+rWriter.EndStructureElement();
 rWriter.Pop();
 }
 
@@ -1350,6 +1358,13 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& 
rWriter, const Size& rP
 pDev->Pop();
 
 rWriter.Push();
+// tdf#152235 tag around the reference to the XObject on the page
+rWriter.BeginStructureElement(vcl::PDFWriter::NonStructElement, 
::std::u16string_view());
+rWriter.SetStructureAttribute(vcl::PDFWriter::Type, 
vcl::PDFWriter::Pagination);
+rWriter.SetStructureAttribute(vcl::PDFWriter::Subtype, 
vcl::PDFWriter::Watermark);
+// HACK: this should produce *nothing* itself but is necessary to output
+// the Artifact tag here, not inside the XObject
+rWriter.DrawPolyLine({});
 rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
 rWriter.SetFont(aFont);
 rWriter.SetTextColor( Color(19,20,22) );
@@ -1385,6 +1400,7 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& 
rWriter, const Size& rP
 aTextPoint.Move( nTextWidth*1.5, 0 );
 }
 
+rWriter.EndStructureElement();
 rWriter.Pop();
 }
 
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 34492890fe7f..a78ea33e38ba 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3314,6 +3314,96 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf152231)
 CPPUNIT_ASSERT_EQUAL(static_cast(12), nPara);
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf152235)
+{
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+// Enable PDF/UA
+uno::Sequence 
aFilterData(comphelper::InitPropertySequence(
+{ { "PDFUACompliance", uno::Any(true) },
+  { "Watermark", uno::Any(OUString("kendy")) },
+  // need to set a font to avoid assertions about missing "Helvetica"
+  { "WatermarkFontName", uno::Any(OUString("Liberation Sans")) },
+  { "SelectPdfVersion", uno::Any(sal_Int32(17)) } }));
+aMediaDescriptor["FilterData"] <<= aFilterData;
+mxComponent = loadFromDesktop("private:factory/swriter");
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+vcl::filter::PDFObjectElement* pContents = 
aPages[0]->LookupObject("Contents");
+CPPUNIT_ASSERT(pContents);
+vcl::filter::PDFStreamElement* pStream = pContents->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+// Uncompress it.
+SvMemoryStream aUncompressed;
+ZCodec aZCodec;
+aZCodec.BeginCompression();
+rObjectStream.Seek(0);
+aZCodec.Decompress(rObjectStrea

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

2023-07-04 Thread Michael Stahl (via logerrit)
 include/vcl/gdimtf.hxx   |1 
 sw/source/core/view/vprint.cxx   |   65 ++--
 sw/source/uibase/docvw/AnnotationWin2.cxx|   13 +
 vcl/inc/pdf/pdfwriter_impl.hxx   |3 
 vcl/qa/cppunit/pdfexport/data/tdf152231.fodt |  208 +++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx   |  110 ++
 vcl/source/gdi/gdimtf.cxx|7 
 vcl/source/gdi/pdfwriter_impl.cxx|   13 -
 8 files changed, 365 insertions(+), 55 deletions(-)

New commits:
commit 3f504e684560be7038a68e0941fad9cbcfc58fc6
Author: Michael Stahl 
AuthorDate: Fri Jun 30 14:56:48 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 4 15:20:16 2023 +0200

tdf#152231 vcl: PDF/UA export: content of comments in the margin

... is also Artifact.

The problem is that ImpEditEngine::Paint() always produces tags,
it can't easily check if it's inside a layout environment that is an
Artifact.

But it looks like PDFWriterImpl::beginStructureElement() already wants
to handle and suppress a structure element inside a NonStruct, except
that it calls endStructureElementMCSeq() before checkEmitStructure(),
so no structure marked content sequence is produced, but the content is
outside the Artifact marked content sequence, and possibly a second
Artifact marked content sequence will be opened once the structure
element is finished.

(btw, it's allowed to nest marked content sequences in PDF, but
nesting a structure element inside an Artifact appears dubious)

Change-Id: Ib3eef9c611e28242854c712ce974fd8cfecd8ac2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153810
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 9eacbf7874320d44b79966cac8fa59c52a191715)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153902

diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index bad2d387511c..a9438be8fc13 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -1062,7 +1062,8 @@ i12626
 void endPage();
 
 void beginStructureElementMCSeq();
-void endStructureElementMCSeq();
+enum class EndMode { Default, OnlyStruct };
+void endStructureElementMCSeq(EndMode = EndMode::Default);
 /** checks whether a non struct element lies in the ancestor hierarchy
 of the current structure element
 
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf152231.fodt 
b/vcl/qa/cppunit/pdfexport/data/tdf152231.fodt
new file mode 100644
index ..26b5d329b2aa
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/tdf152231.fodt
@@ -0,0 +1,208 @@
+
+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/"; xmlns:c
 alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:
 meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ Gabor Kelemen 
LO2022-11-22T00:38:49.808002022-11-22T01:02:17.524

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

2023-07-04 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/GraphicTest.cxx |  233 -
 1 file changed, 70 insertions(+), 163 deletions(-)

New commits:
commit 0c9e09af8ab85122e56bf0a40e1056248565ed75
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 12:39:07 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 15:16:04 2023 +0200

CppunitTest_vcl_graphic_test: use CPPUNIT_TEST_FIXTURE()

Avoiding the declaration/registration/definition of each
test manually saves a lot of space.

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

diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index d9ba3b875486..3cbbcbecf112 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -41,103 +41,10 @@
 
 using namespace css;
 
-namespace
-{
 class GraphicTest : public test::BootstrapFixture
 {
 public:
 ~GraphicTest();
-
-private:
-void testUnloadedGraphic();
-void testUnloadedGraphicLoadingPng();
-void testUnloadedGraphicLoadingGif();
-void testUnloadedGraphicLoadingJpg();
-void testUnloadedGraphicLoadingTif();
-void testUnloadedGraphicLoadingWebp();
-void testUnloadedGraphicWmf();
-void testUnloadedGraphicAlpha();
-void testUnloadedGraphicSizeUnit();
-
-void testWMFRoundtrip();
-void testWMFWithEmfPlusRoundtrip();
-void testEmfToWmfConversion();
-
-void testSwappingGraphic_PNG_WithGfxLink();
-void testSwappingGraphic_PNG_WithoutGfxLink();
-void testSwappingGraphicProperties_PNG_WithGfxLink();
-void testSwappingGraphicProperties_PNG_WithoutGfxLink();
-
-void testSwappingVectorGraphic_SVG_WithGfxLink();
-void testSwappingVectorGraphic_SVG_WithoutGfxLink();
-void testSwappingGraphicProperties_SVG_WithGfxLink();
-void testSwappingGraphicProperties_SVG_WithoutGfxLink();
-
-void testSwappingVectorGraphic_PDF_WithGfxLink();
-void testSwappingVectorGraphic_PDF_WithoutGfxLink();
-
-void testSwappingAnimationGraphic_GIF_WithGfxLink();
-void testSwappingAnimationGraphic_GIF_WithoutGfxLink();
-
-void testLoadMET();
-void testLoadBMP();
-void testLoadPSD();
-void testLoadTGA();
-void testLoadXBM();
-void testLoadXPM();
-void testLoadPCX();
-void testLoadEPS();
-void testLoadWEBP();
-void testLoadSVGZ();
-
-void testAvailableThreaded();
-void testColorChangeToTransparent();
-
-CPPUNIT_TEST_SUITE(GraphicTest);
-CPPUNIT_TEST(testUnloadedGraphic);
-CPPUNIT_TEST(testUnloadedGraphicLoadingPng);
-CPPUNIT_TEST(testUnloadedGraphicLoadingGif);
-CPPUNIT_TEST(testUnloadedGraphicLoadingJpg);
-CPPUNIT_TEST(testUnloadedGraphicLoadingTif);
-CPPUNIT_TEST(testUnloadedGraphicLoadingWebp);
-CPPUNIT_TEST(testUnloadedGraphicWmf);
-CPPUNIT_TEST(testUnloadedGraphicAlpha);
-CPPUNIT_TEST(testUnloadedGraphicSizeUnit);
-CPPUNIT_TEST(testWMFRoundtrip);
-CPPUNIT_TEST(testWMFWithEmfPlusRoundtrip);
-CPPUNIT_TEST(testEmfToWmfConversion);
-
-CPPUNIT_TEST(testSwappingGraphic_PNG_WithGfxLink);
-CPPUNIT_TEST(testSwappingGraphic_PNG_WithoutGfxLink);
-CPPUNIT_TEST(testSwappingGraphicProperties_PNG_WithGfxLink);
-CPPUNIT_TEST(testSwappingGraphicProperties_PNG_WithoutGfxLink);
-
-CPPUNIT_TEST(testSwappingVectorGraphic_SVG_WithGfxLink);
-CPPUNIT_TEST(testSwappingVectorGraphic_SVG_WithoutGfxLink);
-CPPUNIT_TEST(testSwappingGraphicProperties_SVG_WithGfxLink);
-CPPUNIT_TEST(testSwappingGraphicProperties_SVG_WithoutGfxLink);
-
-CPPUNIT_TEST(testSwappingVectorGraphic_PDF_WithGfxLink);
-CPPUNIT_TEST(testSwappingVectorGraphic_PDF_WithoutGfxLink);
-
-CPPUNIT_TEST(testSwappingAnimationGraphic_GIF_WithGfxLink);
-CPPUNIT_TEST(testSwappingAnimationGraphic_GIF_WithoutGfxLink);
-
-CPPUNIT_TEST(testLoadMET);
-CPPUNIT_TEST(testLoadBMP);
-CPPUNIT_TEST(testLoadPSD);
-CPPUNIT_TEST(testLoadTGA);
-CPPUNIT_TEST(testLoadXBM);
-CPPUNIT_TEST(testLoadXPM);
-CPPUNIT_TEST(testLoadPCX);
-CPPUNIT_TEST(testLoadEPS);
-CPPUNIT_TEST(testLoadWEBP);
-CPPUNIT_TEST(testLoadSVGZ);
-
-CPPUNIT_TEST(testAvailableThreaded);
-CPPUNIT_TEST(testColorChangeToTransparent);
-
-CPPUNIT_TEST_SUITE_END();
 };
 
 GraphicTest::~GraphicTest()
@@ -147,6 +54,8 @@ GraphicTest::~GraphicTest()
 #endif
 }
 
+namespace
+{
 BitmapEx createBitmap(bool alpha = false)
 {
 Bitmap aBitmap(Size(120, 100), vcl::PixelFormat::N24_BPP);
@@ -262,7 +171,39 @@ Graphic importUnloadedGraphic(std::u16string_view const& 
rFilename)
 return rGraphicFilter.ImportUnloadedGraphic(aFileStream);
 }
 
-void GraphicTest::testUnloadedGraphic()
+int getEmfPlusActionsCount(const Graphic& graphic)
+{
+const GDIMetaFile& metafile = graphic.GetGDIMetaFile();
+int emfPlusCount = 0;
+for (size_t i = 0; i < metafile.GetActionSize(); ++i)
+{
+MetaAction*

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

2023-07-04 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/GraphicTest.cxx  |  100 +---
 vcl/source/filter/graphicfilter.cxx |8 --
 2 files changed, 83 insertions(+), 25 deletions(-)

New commits:
commit cf40ee4a162da5f357793463e5707492030eb5df
Author: Xisco Fauli 
AuthorDate: Tue Jul 4 12:06:04 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 15:15:33 2023 +0200

CppunitTest_vcl_graphic_test: Demultiplex test code

and relax hack a bit, enabling webp based on testname is
dirty since they might change

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

diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 2dff15f29d34..d9ba3b875486 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -50,7 +50,11 @@ public:
 
 private:
 void testUnloadedGraphic();
-void testUnloadedGraphicLoading();
+void testUnloadedGraphicLoadingPng();
+void testUnloadedGraphicLoadingGif();
+void testUnloadedGraphicLoadingJpg();
+void testUnloadedGraphicLoadingTif();
+void testUnloadedGraphicLoadingWebp();
 void testUnloadedGraphicWmf();
 void testUnloadedGraphicAlpha();
 void testUnloadedGraphicSizeUnit();
@@ -91,7 +95,11 @@ private:
 
 CPPUNIT_TEST_SUITE(GraphicTest);
 CPPUNIT_TEST(testUnloadedGraphic);
-CPPUNIT_TEST(testUnloadedGraphicLoading);
+CPPUNIT_TEST(testUnloadedGraphicLoadingPng);
+CPPUNIT_TEST(testUnloadedGraphicLoadingGif);
+CPPUNIT_TEST(testUnloadedGraphicLoadingJpg);
+CPPUNIT_TEST(testUnloadedGraphicLoadingTif);
+CPPUNIT_TEST(testUnloadedGraphicLoadingWebp);
 CPPUNIT_TEST(testUnloadedGraphicWmf);
 CPPUNIT_TEST(testUnloadedGraphicAlpha);
 CPPUNIT_TEST(testUnloadedGraphicSizeUnit);
@@ -294,25 +302,79 @@ void GraphicTest::testUnloadedGraphic()
 CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
 }
 
-void GraphicTest::testUnloadedGraphicLoading()
+void GraphicTest::testUnloadedGraphicLoadingPng()
 {
-const OUString aFormats[] = { "png", "gif", "jpg", "tif", "webp" };
+Graphic aGraphic = makeUnloadedGraphic(u"png");
 
-for (OUString const& sFormat : aFormats)
-{
-Graphic aGraphic = makeUnloadedGraphic(sFormat);
-
-// check available
-CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
-CPPUNIT_ASSERT_EQUAL(tools::Long(120), 
aGraphic.GetSizePixel().Width());
-CPPUNIT_ASSERT_EQUAL(tools::Long(100), 
aGraphic.GetSizePixel().Height());
-CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
-CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
-CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
-
-if (sFormat != "jpg")
-CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
-}
+// check available
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
+CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
+
+CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
+}
+
+void GraphicTest::testUnloadedGraphicLoadingGif()
+{
+Graphic aGraphic = makeUnloadedGraphic(u"gif");
+
+// check available
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
+CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
+
+CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
+}
+
+void GraphicTest::testUnloadedGraphicLoadingJpg()
+{
+Graphic aGraphic = makeUnloadedGraphic(u"jpg");
+
+// check available
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
+CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
+
+CPPUNIT_ASSERT_EQUAL(false, checkBitmap(aGraphic));
+}
+
+void GraphicTest::testUnloadedGraphicLoadingTif()
+{
+Graphic aGraphic = makeUnloadedGraphic(u"tif");
+
+// check available
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
+CPPUNIT_ASSER

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

2023-07-04 Thread Andrea Gelmini (via logerrit)
 wizards/source/sfdialogs/SF_Dialog.xba |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 5d439a07b60d505ac1a9fafad90849aa13f0c2aa
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 11:39:09 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 4 14:24:29 2023 +0200

Fix typos

Change-Id: I1049c2bec21caa751a37708023338a1449dc5539
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153953
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/wizards/source/sfdialogs/SF_Dialog.xba 
b/wizards/source/sfdialogs/SF_Dialog.xba
index f08a6ad7b45d..bbbeddd111d1 100644
--- a/wizards/source/sfdialogs/SF_Dialog.xba
+++ b/wizards/source/sfdialogs/SF_Dialog.xba
@@ -858,8 +858,8 @@ Public Function CreateCurrencyField(Optional ByVal 
ControlName As Variant _
 ''' Specific args:
 ''' Border: "3D" (default) or 
"FLAT" or "NONE"
 ''' SpinButton:: when True (default = False), a 
spin button is present
-''' MinValue: the smallest value that can be 
entered in the control. Dafault = -100
-''' MaxValue: the largest value that can be entered 
in the control. Dafault = +100
+''' MinValue: the smallest value that can be 
entered in the control. Default = -100
+''' MaxValue: the largest value that can be entered 
in the control. Default = +100
 ''' Increment: the step when the spin button is 
pressed. Default = 1
 ''' Accuracy: specifies the decimal accuracy. 
Default = 2 decimal digits
 ''' Returns:
@@ -920,8 +920,8 @@ Public Function CreateDateField(Optional ByVal ControlName 
As Variant _
 ''' Specific args:
 ''' Border: "3D" (default) or 
"FLAT" or "NONE"
 ''' Dropdown:: when True (default = False), a 
dropdown button is shown
-''' MinDate: the smallest date that can be entered 
in the control. Dafault = 1900-01-01
-''' MaxDate: the largest Date that can be entered 
in the control. Dafault = 2200-12-31
+''' MinDate: the smallest date that can be entered 
in the control. Default = 1900-01-01
+''' MaxDate: the largest Date that can be entered 
in the control. Default = 2200-12-31
 ''' Returns:
 ''' an instance of the SF_DialogControl class or 
Nothing
 ''' Example:
@@ -1133,8 +1133,8 @@ Public Function CreateFormattedField(Optional ByVal 
ControlName As Variant _
 ''' Specific args:
 ''' Border: "3D" (default) or 
"FLAT" or "NONE"
 ''' SpinButton:: when True (default = False), a 
spin button is present
-''' MinValue: the smallest value that can be 
entered in the control. Dafault = -100
-''' MaxValue: the largest value that can be entered 
in the control. Dafault = +100
+''' MinValue: the smallest value that can be 
entered in the control. Default = -100
+''' MaxValue: the largest value that can be entered 
in the control. Default = +100
 ''' Returns:
 ''' an instance of the SF_DialogControl class or 
Nothing
 ''' Example:
@@ -1407,8 +1407,8 @@ Public Function CreateNumericField(Optional ByVal 
ControlName As Variant _
 ''' Specific args:
 ''' Border: "3D" (default) or 
"FLAT" or "NONE"
 ''' SpinButton:: when True (default = False), a 
spin button is present
-''' MinValue: the smallest value that can be 
entered in the control. Dafault = -100
-''' MaxValue: the largest value that can be entered 
in the control. Dafault = +100
+''' MinValue: the smallest value that can be 
entered in the control. Default = -100
+''' MaxValue: the largest value that can be entered 
in the control. Default = +100
 ''' Increment: the step when the spin button is 
pressed. Default = 1
 ''' Accuracy: specifies the decimal accuracy. 
Default = 2 decimal digits
 ''' Returns:
@@ -1614,8 +1614,8 @@ Public Function CreateScrollBar(Optional ByVal 
ControlName As Variant _
 ''' Specific args:
 ''' Orientation: H[orizontal] or V[ertical]
 ''' Border: "3D" (default) or 
"FLAT" or "NONE"
-''' MinValue: the smallest value that can be 
entered in the control. Dafault = 0
-''' MaxValue: the largest value that can be entered 
in the control. Dafault = 100
+''' MinValue: the smallest value that can be 
entered in the control. Default = 0
+''' MaxValue: the largest value that can be entered 
in the control. Default = 100
 ''' Returns:
 ''' an instance of the SF_DialogControl class or 
Nothing
 ''' Example:
@@ -1794,8 +1794,8 @@ Public Function CreateTimeField(Optional ByVal 
ControlName As Variant _
 ''' Create a new control of type TimeField in the actual 
dialog.
 ''' Specific args:
 ''' Border: "3D" (default) or 
"FLAT" or "NON

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

2023-07-04 Thread Michael Stahl (via logerrit)
 filter/source/pdf/pdfexport.cxx|   16 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   90 +
 vcl/source/gdi/pdfwriter_impl.cxx  |4 -
 3 files changed, 108 insertions(+), 2 deletions(-)

New commits:
commit dd4ce9b2fc7feaf288055b24b5bc4842c0d2b4de
Author: Michael Stahl 
AuthorDate: Tue Jul 4 11:32:07 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 4 14:15:49 2023 +0200

tdf#152235 filter,vcl: PDF/UA export: tag watermark as Artifact

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

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index eb43260d8a83..f9c5fb44af6b 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1262,6 +1262,13 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& 
rWriter, const Size& rPageSi
 pDev->Pop();
 
 rWriter.Push();
+// tdf#152235 tag around the reference to the XObject on the page
+rWriter.BeginStructureElement(vcl::PDFWriter::NonStructElement, 
::std::u16string_view());
+rWriter.SetStructureAttribute(vcl::PDFWriter::Type, 
vcl::PDFWriter::Pagination);
+rWriter.SetStructureAttribute(vcl::PDFWriter::Subtype, 
vcl::PDFWriter::Watermark);
+// HACK: this should produce *nothing* itself but is necessary to output
+// the Artifact tag here, not inside the XObject
+rWriter.DrawPolyLine({});
 rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
 rWriter.SetFont( aFont );
 rWriter.SetTextColor(maWatermarkColor);
@@ -1304,6 +1311,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& 
rWriter, const Size& rPageSi
 rWriter.BeginTransparencyGroup();
 rWriter.DrawText( aTextPoint, msWatermark );
 rWriter.EndTransparencyGroup( aTextRect, 50 );
+rWriter.EndStructureElement();
 rWriter.Pop();
 }
 
@@ -1350,6 +1358,13 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& 
rWriter, const Size& rP
 pDev->Pop();
 
 rWriter.Push();
+// tdf#152235 tag around the reference to the XObject on the page
+rWriter.BeginStructureElement(vcl::PDFWriter::NonStructElement, 
::std::u16string_view());
+rWriter.SetStructureAttribute(vcl::PDFWriter::Type, 
vcl::PDFWriter::Pagination);
+rWriter.SetStructureAttribute(vcl::PDFWriter::Subtype, 
vcl::PDFWriter::Watermark);
+// HACK: this should produce *nothing* itself but is necessary to output
+// the Artifact tag here, not inside the XObject
+rWriter.DrawPolyLine({});
 rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
 rWriter.SetFont(aFont);
 rWriter.SetTextColor( Color(19,20,22) );
@@ -1385,6 +1400,7 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& 
rWriter, const Size& rP
 aTextPoint.Move( nTextWidth*1.5, 0 );
 }
 
+rWriter.EndStructureElement();
 rWriter.Pop();
 }
 
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 5698288b4c22..34e733c115c3 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3314,6 +3314,96 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf152231)
 CPPUNIT_ASSERT_EQUAL(static_cast(12), nPara);
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf152235)
+{
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+// Enable PDF/UA
+uno::Sequence 
aFilterData(comphelper::InitPropertySequence(
+{ { "PDFUACompliance", uno::Any(true) },
+  { "Watermark", uno::Any(OUString("kendy")) },
+  // need to set a font to avoid assertions about missing "Helvetica"
+  { "WatermarkFontName", uno::Any(OUString("Liberation Sans")) },
+  { "SelectPdfVersion", uno::Any(sal_Int32(17)) } }));
+aMediaDescriptor["FilterData"] <<= aFilterData;
+mxComponent = loadFromDesktop("private:factory/swriter");
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+vcl::filter::PDFObjectElement* pContents = 
aPages[0]->LookupObject("Contents");
+CPPUNIT_ASSERT(pContents);
+vcl::filter::PDFStreamElement* pStream = pContents->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+// Uncompress it.
+SvMemoryStream aUncompressed;
+ZCodec aZCodec;
+aZCodec.BeginCompression();
+rObjectStream.Seek(0);
+aZCodec.Decompress(rObjectStream, aUncompressed);
+CPPUNIT_ASSERT(aZCodec.EndCompression());
+
+auto pStart = static_cast(aUncompressed.GetData());
+const c

Re: Welcome Michael Weghorn, new Developer at TDF

2023-07-04 Thread Caolán McNamara
On Tue, 2023-07-04 at 11:36 +0200, Mike Saunders wrote:
> Hi everyone,
> 
> At The Document Foundation, we have a new Developer, initially
> focusing on accessibility improvements:

Great news.


Re: Welcome Michael Weghorn, new Developer at TDF

2023-07-04 Thread Colomban Wendling

Le 04/07/2023 à 11:36, Mike Saunders a écrit :

Hi everyone,

At The Document Foundation, we have a new Developer, initially focusing 
on accessibility improvements


Hey, it's great to hear you'll be focusing even more on this, although 
you were already very helpful in these area!


I'm thrilled :)

Cheers,
Colomban


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - configure.ac

2023-07-04 Thread Thorsten Behrens (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6072ae89a4d5475f89204add726eb4edf074921c
Author: Thorsten Behrens 
AuthorDate: Tue Jul 4 13:24:03 2023 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Jul 4 13:24:03 2023 +0200

Release 6.3.6.24

Change-Id: I0d68c2c019eb1a402a941b03369d32a186aaa645

diff --git a/configure.ac b/configure.ac
index bd58dd3d40e1..e0a74779f35a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.3.6.23],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.24],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


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

2023-07-04 Thread Regina Henschel (via logerrit)
 svx/source/tbxctrls/PaletteManager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b3dcce7fd39ada7e3318901102311062c28791a5
Author: Regina Henschel 
AuthorDate: Sun Jul 2 18:14:54 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 13:22:03 2023 +0200

tdf#153487 First color item needs mnId = 1

The SvxColorValueSet for the other color palettes is build so that the
first item gets value 1 in its mnId component. But for the new theme
color palette it was 0. That results in the error, that the first
color (top-left in the dialog) could not be selected. An Id of value 0
is handled as 'fail' in various places. Thus use starting mnId = 1 for
theme color palette too.

Change-Id: Ic0b63fee641d4424cabaf25a7f803acd734cbfa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153860
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit cf13f9d89b4411b8c2b38bb3eb1ac4e6346b5b74)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153925

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 607bd60df921..9fcefd34d1c8 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -207,7 +207,7 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet 
&rColorSet)
 auto pColorSet = pObjectShell->GetThemeColors();
 mnColorCount = 12;
 rColorSet.Clear();
-sal_uInt16 nItemId = 0;
+sal_uInt16 nItemId = 1;
 
 if (!pColorSet)
 return;


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

2023-07-04 Thread Andrea Gelmini (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef1c755e31971d92429d70fbab58446ccb2bfcda
Author: Andrea Gelmini 
AuthorDate: Mon Jul 3 15:24:46 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 4 13:16:50 2023 +0200

Fix typo

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 3016358e49a5..5698288b4c22 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3306,7 +3306,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf152231)
 ++nPara;
 auto pKids = 
dynamic_cast(pObject->Lookup("K"));
 CPPUNIT_ASSERT(pKids);
-// one problem was that that some StructElem were missing kids
+// one problem was that some StructElem were missing kids
 CPPUNIT_ASSERT(!pKids->GetElements().empty());
 }
 }


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

2023-07-04 Thread Andrea Gelmini (via logerrit)
 source/text/sbasic/shared/03/sf_dialog.xhp |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 7656ffac6fbbacd8739ee690549517a8e0e49f6b
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 11:38:29 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 4 13:16:06 2023 +0200

Fix typos

Change-Id: I9b855f5b4af6c5cba368b5649ecce61d9dcfc202
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153952
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index 67c8fc3105..c6abe7a7ca 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -802,8 +802,8 @@

Border: 
"3D" (default) or "FLAT" or "NONE"
SpinButton: when True (default = 
False), a spin button is present
-   MinValue: the smallest value that can 
be entered in the control. Dafault = -100
-   MaxValue: the largest value that can be 
entered in the control. Dafault = +100
+   MinValue: the smallest value that can 
be entered in the control. Default = -100
+   MaxValue: the largest value that can be 
entered in the control. Default = +100

   

@@ -900,8 +900,8 @@

Border: 
"3D" (default) or "FLAT" or "NONE"
SpinButton: when True (default = 
False), a spin button is present
-   MinValue: the smallest value that can 
be entered in the control. Dafault = -100
-   MaxValue: the largest value that can be 
entered in the control. Dafault = +100
+   MinValue: the smallest value that can 
be entered in the control. Default = -100
+   MaxValue: the largest value that can be 
entered in the control. Default = +100
Increment: the step when the spin 
button is pressed. Default = 1
Accuracy: specifies the decimal 
accuracy. Default = 2 decimal digits

@@ -1001,8 +1001,8 @@

Orientation: H[orizontal] or 
V[ertical]
Border: 
"3D" (default) or "FLAT" or "NONE"
-   MinValue: the smallest value that can 
be entered in the control. Dafault = 0
-   MaxValue: the largest value that can be 
entered in the control. Dafault = 100
+   MinValue: the smallest value that can 
be entered in the control. Default = 0
+   MaxValue: the largest value that can be 
entered in the control. Default = 100

   



[Libreoffice-commits] core.git: helpcontent2

2023-07-04 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 83d7f565101f154de23857537726dc11ca7bccb5
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 13:16:06 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 13:16:06 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 7656ffac6fbbacd8739ee690549517a8e0e49f6b
  - Fix typos

Change-Id: I9b855f5b4af6c5cba368b5649ecce61d9dcfc202
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153952
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/helpcontent2 b/helpcontent2
index 11126b46e48f..7656ffac6fbb 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 11126b46e48f2a504eafdc4cd14e43a0b532e8b3
+Subproject commit 7656ffac6fbbacd8739ee690549517a8e0e49f6b


[Libreoffice-commits] core.git: helpcontent2

2023-07-04 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e7bb39c3972d284ece80d5002c9411d3cd8c835
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 13:15:39 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 13:15:39 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 11126b46e48f2a504eafdc4cd14e43a0b532e8b3
  - Fix typo

Change-Id: Ia94aac3b44f6c4a9b7671fef82f93fcc83bc7335
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153954
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/helpcontent2 b/helpcontent2
index 77b7e3cd8019..11126b46e48f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 77b7e3cd801902564050d17ffaa20754fed39347
+Subproject commit 11126b46e48f2a504eafdc4cd14e43a0b532e8b3


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

2023-07-04 Thread Andrea Gelmini (via logerrit)
 source/text/sbasic/shared/03/sf_dialog.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 11126b46e48f2a504eafdc4cd14e43a0b532e8b3
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 11:46:20 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 4 13:15:39 2023 +0200

Fix typo

Change-Id: Ia94aac3b44f6c4a9b7671fef82f93fcc83bc7335
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153954
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index 8add760552..67c8fc3105 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -873,7 +873,7 @@
svc.CreateListBox(opt ControlName: str, opt 
Place, Border = "3D", DropDown = True, LineCount = 5, MultiSelect = False): 
svc

Border: "3D" (default) or 
"FLAT" or "NONE"
-   DropDown: When True (default), a drop 
down button is displed
+   DropDown: When True (default), a drop 
down button is displayed
LineCount: Specifies the maximum line 
count displayed in the drop down (default = 5)
MultiSelect: When True, more than 1 
entry may be selected. Default = False



[Libreoffice-commits] core.git: helpcontent2

2023-07-04 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7a08e33a36364331a8c5c7d78345e6e691df0754
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 13:15:19 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 13:15:19 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 77b7e3cd801902564050d17ffaa20754fed39347
  - Fix typo

Change-Id: I943773674d5d57cd030075887fa60d92ff1068e9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153955
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/helpcontent2 b/helpcontent2
index 6b29c320e0e7..77b7e3cd8019 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6b29c320e0e7a7fd2b0839e3aa7e353252a1f811
+Subproject commit 77b7e3cd801902564050d17ffaa20754fed39347


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

2023-07-04 Thread Andrea Gelmini (via logerrit)
 source/text/sbasic/shared/03/sf_dialog.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 77b7e3cd801902564050d17ffaa20754fed39347
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 11:48:32 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 4 13:15:19 2023 +0200

Fix typo

Change-Id: I943773674d5d57cd030075887fa60d92ff1068e9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153955
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index e38252ff92..8add760552 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -1026,8 +1026,8 @@
svc.CreateTableControl(opt ControlName: str, 
opt Place, Border, RowHeaders, ColumnHeaders, ScrollBars, GridLines): 
svc

Border: 
"3D" (default) or "FLAT" or "NONE"
-   RowHeaders: when True (default), the 
row Headerss are shown
-   ColumnHeaders: when True (default), the 
column Headerss are shown
+   RowHeaders: when True (default), the 
row Headers are shown
+   ColumnHeaders: when True (default), the 
column Headers are shown
ScrollBars: H[orizontal] or V[ertical] 
or B[oth] or N[one] (default). Scrollbars appear dynamically when they are 
needed.
GridLines: when True (default = False) 
horizontal and vertical lines are painted between the grid cells



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

2023-07-04 Thread Andrea Gelmini (via logerrit)
 source/text/sbasic/shared/03/sf_dialog.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6b29c320e0e7a7fd2b0839e3aa7e353252a1f811
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 11:49:22 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 4 13:14:54 2023 +0200

Fix typo

Change-Id: I06f6b6f701ab87932f2f5784bf10ab0bdc838e8d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153956
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index f3207c0434..e38252ff92 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -699,7 +699,7 @@
CreateDateField
Create a new control 
of type DateField in the current dialog.

-   svc.CreateDateField(opt ControlName: str, opt Place, 
Border = "3D", DropDown = False, opp MinDate, opt MaxDate): 
svc
+   svc.CreateDateField(opt ControlName: str, opt Place, 
Border = "3D", DropDown = False, opt MinDate, opt MaxDate): 
svc

Border: 
"3D" (default) or "FLAT" or "NONE"
DropDown: when True (default = False), 
a dropdown button is shown


[Libreoffice-commits] core.git: helpcontent2

2023-07-04 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8808e52e922b748b2e7ce9ffa944c47da9db864
Author: Andrea Gelmini 
AuthorDate: Tue Jul 4 13:14:54 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Jul 4 13:14:54 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 6b29c320e0e7a7fd2b0839e3aa7e353252a1f811
  - Fix typo

Change-Id: I06f6b6f701ab87932f2f5784bf10ab0bdc838e8d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153956
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/helpcontent2 b/helpcontent2
index 257fec6735fa..6b29c320e0e7 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 257fec6735fa0d0e57c0c2d0220bd71ce987b947
+Subproject commit 6b29c320e0e7a7fd2b0839e3aa7e353252a1f811


Re: TB 77 Windows ARM fails because new lib "frozen" isn't taken into

2023-07-04 Thread Marc Roland
Hello,

Thank you for troubleshooting and repairing the TB. Whoever has brought it back 
to running again: The 'Daily Builds' are generated daily again!
This TB was once launched by Jan-Marek Glogowski, see bug 137143 – Offer a 
Windows on ARM64 installer 
(documentfoundation.org)

Regards, Marc


Re: Welcome Michael Weghorn, new Developer at TDF

2023-07-04 Thread Eike Rathke

Welcome Michael, great to have you on board to actively develop accessibility 
(a11y)!

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature


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

2023-07-04 Thread Noel Grandin (via logerrit)
 vcl/skia/salbmp.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit d697e25846433c3a589228262cf8d0f7b6f5fd7e
Author: Noel Grandin 
AuthorDate: Tue Jul 4 10:41:14 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 12:14:31 2023 +0200

remove skia workaround

No longer necessary since

commit 9c9a711ac5d8f32ac318d0e4ecab7b3a26bc2150
Author: Noel Grandin 
Date:   Fri Jan 27 10:48:45 2023 +0200
Update skia to m111

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

diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 1ce85dd0e837..97609c11d125 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -888,10 +888,7 @@ const sk_sp& 
SkiaSalBitmap::GetAlphaSkImage(DirectImage direct) const
 SkiaZone zone;
 const bool scaling = imageSize(mImage) != mSize;
 SkPixmap pixmap;
-// Note: We cannot do this when 'scaling' because 
SkCanvas::drawImageRect()
-// with kAlpha_8_SkColorType as source and destination would act as 
SkBlendMode::kSrcOver
-// despite SkBlendMode::kSrc set 
(https://bugs.chromium.org/p/skia/issues/detail?id=9692).
-if (mImage->peekPixels(&pixmap) && !scaling)
+if (mImage->peekPixels(&pixmap))
 {
 assert(pixmap.colorType() == kN32_SkColorType);
 // In non-GPU mode, convert 32bit data to 8bit alpha, this is 
faster than


Welcome Michael Weghorn, new Developer at TDF

2023-07-04 Thread Mike Saunders

Hi everyone,

At The Document Foundation, we have a new Developer, initially focusing 
on accessibility improvements:


https://blog.documentfoundation.org/blog/2023/07/04/welcome-michael-weghorn-new-developer-at-tdf/

Great to have him on board!

--
Mike Saunders, Marketing and Community Coordinator
The Document Foundation


[Libreoffice-commits] core.git: cui/source cui/uiconfig editeng/source include/editeng officecfg/registry

2023-07-04 Thread Baole Fang (via logerrit)
 cui/source/tabpages/autocdlg.cxx   |9 -
 cui/uiconfig/ui/wordcompletionpage.ui  |2 +-
 editeng/source/misc/acorrcfg.cxx   |4 ++--
 include/editeng/swafopt.hxx|3 ++-
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 254161f9dd2b7b3e416c54dfeb8e8c6e81cd7dcd
Author: Baole Fang 
AuthorDate: Sun Jun 25 22:08:37 2023 -0400
Commit: Caolán McNamara 
CommitDate: Tue Jul 4 11:17:10 2023 +0200

tdf#92311: increase word completion limit

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

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 378fb68c4143..a23fc2015ebf 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1981,7 +1981,6 @@ bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet* )
 bool bModified = false, bCheck;
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
 SvxSwAutoFormatFlags *pOpt = &pAutoCorrect->GetSwFlags();
-sal_uInt16 nVal;
 
 bCheck = m_xCBActiv->get_active();
 bModified |= pOpt->bAutoCompleteWords != bCheck;
@@ -1999,13 +1998,13 @@ bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet* )
 bModified |= pOpt->bAutoCmpltShowAsTip != bCheck;
 pOpt->bAutoCmpltShowAsTip = bCheck;
 
-nVal = static_cast(m_xNFMinWordlen->get_value());
+sal_uInt16 nVal = static_cast(m_xNFMinWordlen->get_value());
 bModified |= nVal != pOpt->nAutoCmpltWordLen;
 pOpt->nAutoCmpltWordLen = nVal;
 
-nVal = static_cast(m_xNFMaxEntries->get_value());
-bModified |= nVal != pOpt->nAutoCmpltListLen;
-pOpt->nAutoCmpltListLen = nVal;
+sal_uInt32 nList = static_cast(m_xNFMaxEntries->get_value());
+bModified |= nList != pOpt->nAutoCmpltListLen;
+pOpt->nAutoCmpltListLen = nList;
 
 const int nPos = m_xDCBExpandKey->get_active();
 if (nPos != -1)
diff --git a/cui/uiconfig/ui/wordcompletionpage.ui 
b/cui/uiconfig/ui/wordcompletionpage.ui
index d77e2c4f81d3..1b7004ee2d49 100644
--- a/cui/uiconfig/ui/wordcompletionpage.ui
+++ b/cui/uiconfig/ui/wordcompletionpage.ui
@@ -4,7 +4,7 @@
   
   
 50
-65535
+4294967295
 500
 25
 100
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 8603b4347da1..4ff15f1bfc2d 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -524,9 +524,9 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
 break; // "Completion/MinWordLen",
 case  35:
 {
-sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
+sal_Int64 nVal = 0; pValues[nProp] >>= nVal;
 rSwFlags.nAutoCmpltListLen =
-sal::static_int_cast< sal_uInt16 >(nVal);
+sal::static_int_cast< sal_uInt32 >(nVal);
 }
 break; // "Completion/MaxListLen",
 case  36: rSwFlags.bAutoCmpltCollectWords = 
*o3tl::doAccess(pValues[nProp]); break; // "Completion/CollectWords",
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index 71919383da96..8a4ca5aeaa62 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -86,7 +86,8 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
 sal_UCS4 cBullet;
 sal_UCS4 cByInputBullet;
 
-sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen;
+sal_uInt32 nAutoCmpltListLen;
+sal_uInt16 nAutoCmpltWordLen;
 sal_uInt16 nAutoCmpltExpandKey;
 
 sal_uInt8 nRightMargin;
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 0f684bb2eea9..dd880f51cfa4 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -4464,7 +4464,7 @@
   
   8
 
-
+
   
   
 Sets the maximum number of words to be recalled.


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

2023-07-04 Thread Regina Henschel (via logerrit)
 svx/source/tbxctrls/PaletteManager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7fede2c47f8a24b80700fe3b82f71a0f60bffd3d
Author: Regina Henschel 
AuthorDate: Sun Jul 2 18:14:54 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 11:15:13 2023 +0200

tdf#153487 First color item needs mnId = 1

The SvxColorValueSet for the other color palettes is build so that the
first item gets value 1 in its mnId component. But for the new theme
color palette it was 0. That results in the error, that the first
color (top-left in the dialog) could not be selected. An Id of value 0
is handled as 'fail' in various places. Thus use starting mnId = 1 for
theme color palette too.

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

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 607bd60df921..9fcefd34d1c8 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -207,7 +207,7 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet 
&rColorSet)
 auto pColorSet = pObjectShell->GetThemeColors();
 mnColorCount = 12;
 rColorSet.Clear();
-sal_uInt16 nItemId = 0;
+sal_uInt16 nItemId = 1;
 
 if (!pColorSet)
 return;


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

2023-07-04 Thread Caolán McNamara (via logerrit)
 svgio/source/svgreader/svgclippathnode.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 553253c529eae792cb47735fdce8ef3ef16cbda0
Author: Caolán McNamara 
AuthorDate: Mon Jul 3 17:25:36 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 11:06:11 2023 +0200

crashtesting: crash on import of moz610347-2.svg

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

diff --git a/svgio/source/svgreader/svgclippathnode.cxx 
b/svgio/source/svgreader/svgclippathnode.cxx
index 764c874dbe5f..387f7af553e1 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -151,7 +151,7 @@ namespace svgio::svgreader
 // merge to single clipPolyPolygon
 aClipPolyPolygon = 
basegfx::utils::mergeToSinglePolyPolygon(rResult);
 }
-else
+else if (nSize != 0)
 {
 aClipPolyPolygon = rResult[0];
 }


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

2023-07-04 Thread Taichi Haradaguchi (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9373156f5cc70d4234e81a9f5d84d0a0f527085b
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Jul 3 22:01:59 2023 +0900
Commit: Xisco Fauli 
CommitDate: Tue Jul 4 11:05:32 2023 +0200

libpng: upgrade to release 1.6.40

Change-Id: I2f366045097a6f063e26703b4132710573a40e65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153879
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>
(cherry picked from commit 2c733d79d8d1ce630711c5b9bcceb2b6f99eb51a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153913
Reviewed-by: Xisco Fauli 

diff --git a/download.lst b/download.lst
index 74fc95e75c61..47c1abb8f9cd 100644
--- a/download.lst
+++ b/download.lst
@@ -448,8 +448,8 @@ PIXMAN_TARBALL := pixman-0.42.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBPNG_SHA256SUM := 
1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937
-LIBPNG_TARBALL := libpng-1.6.39.tar.xz
+LIBPNG_SHA256SUM := 
535b479b2467ff231a3ec6d92a525906fb8ef27978be4f66dbe05d3f3a01b3a1
+LIBPNG_TARBALL := libpng-1.6.40.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts


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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 sc/source/ui/theme/ThemeColorChanger.cxx |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 4d1feecce79cb942625321a8fa1dcf9de7e9dc58
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 4 00:44:15 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 10:42:30 2023 +0200

sc: change theme color for SdrObjects

Change-Id: I318821c843fe937b7011f1674809f8c78df24a2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153938
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 30ee52e6c284be1095fdf278439b4c0a7c5982f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153916

diff --git a/sc/source/ui/theme/ThemeColorChanger.cxx 
b/sc/source/ui/theme/ThemeColorChanger.cxx
index a245f7b0c1c0..8eaa6ed0fcb6 100644
--- a/sc/source/ui/theme/ThemeColorChanger.cxx
+++ b/sc/source/ui/theme/ThemeColorChanger.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -129,9 +130,9 @@ void 
ThemeColorChanger::apply(std::shared_ptr const& pColorSet)
 pStyle = static_cast(pPool->Next());
 }
 
-// Change Cell / Text attributes
 for (SCTAB nTab = 0; nTab < rDocument.GetTableCount(); nTab++)
 {
+// Change Cell / Text attributes
 ScDocAttrIterator aAttributeIterator(rDocument, nTab, 0, 0, 
rDocument.MaxCol(),
  rDocument.MaxRow());
 SCCOL nCol = 0;
@@ -144,6 +145,16 @@ void 
ThemeColorChanger::apply(std::shared_ptr const& pColorSet)
 auto& rItemSet = pNonConstPattern->GetItemSet();
 changeCellItems(rItemSet, *pColorSet);
 }
+
+// Change all SdrObjects
+SdrPage* pPage = 
rDocument.GetDrawLayer()->GetPage(static_cast(nTab));
+SdrObjListIter aIter(pPage, SdrIterMode::DeepNoGroups);
+SdrObject* pObject = aIter.Next();
+while (pObject)
+{
+svx::theme::updateSdrObject(*pColorSet, pObject);
+pObject = aIter.Next();
+}
 }
 }
 


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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 svx/source/tbxctrls/PaletteManager.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 40a5f5c4e700431659c26de427c8213f276959b0
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 4 00:37:30 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 10:42:10 2023 +0200

svx: PaletteManager - remove printf

Change-Id: I7d631352d423b6465d8bea4b09561f33d2ad98f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153936
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit cbc45a7f713ea1f2c44ed27b371e342ed7547e05)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153914

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 7735e09d44e8..607bd60df921 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -430,8 +430,6 @@ void PaletteManager::DispatchColorCommand(const OUString& 
aCommand, const NamedC
 comphelper::makePropertyValue(aObj.GetURLPath()+ ".Color", 
sal_Int32(rColor.m_aColor)),
 };
 
-printf ("Sending: %s\n", aObj.GetURLPath().toUtf8().getStr());
-
 if (rColor.m_nThemeIndex != -1)
 {
 model::ComplexColor aComplexColor;


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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 79048d9bedf7ad09200916011d02837f4f3ffe4a
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 4 00:38:01 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 10:41:54 2023 +0200

sc: fix failed assert in when setting a color on a shape

When setting a color with a colorpicker, and assert failed,
because it's not possible to clone a SfxItemSet by value - use
a plane Clone instead, which clones into a SfxItemSet.

Change-Id: I8780ed42d3807e9802d3f4fa1d68e16bd5d5a5e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153937
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 548e5b6d825606bd218ef18591df642872e6acd0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153915

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 52ec9d9d438a..fde34e9d6686 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -260,9 +260,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
 if( pView->AreObjectsMarked() )
 {
-SfxItemSet aNewArgs = rReq.GetArgs()->CloneAsValue();
-lcl_convertStringArguments(aNewArgs);
-pView->SetAttrToMarked( aNewArgs, false );
+std::unique_ptr aNewArgs = 
rReq.GetArgs()->Clone();
+lcl_convertStringArguments(*aNewArgs);
+pView->SetAttrToMarked(*aNewArgs, false);
 }
 else
 pView->SetDefaultAttr( *rReq.GetArgs(), false);


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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 sc/qa/unit/ThemeImportExportTest.cxx |   61 +--
 1 file changed, 38 insertions(+), 23 deletions(-)

New commits:
commit 8164915520b27b655372e7521b2a58978516f88d
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 30 15:46:22 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 10:40:58 2023 +0200

sc: test export of model::Theme into theme1.xml with xpath

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

diff --git a/sc/qa/unit/ThemeImportExportTest.cxx 
b/sc/qa/unit/ThemeImportExportTest.cxx
index 0cf03ea6c010..c04a90dc6f54 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -34,30 +34,45 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExport)
 
 save("Calc Office Open XML");
 
-xmlDocUniquePtr pXmlDoc = parseExport("xl/styles.xml");
-
-assertXPath(pXmlDoc, "/x:styleSheet", 1);
-
-// Fonts
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font", 6);
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[5]/x:color", "theme", 
"7");
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[6]/x:color", "rgb", 
"FF9C5700");
-
-// Fills
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill", 4);
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[1]/x:patternFill", 
"patternType", "none");
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[2]/x:patternFill", 
"patternType", "gray125");
-
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[3]/x:patternFill", 
"patternType", "solid");
-assertXPath(pXmlDoc, 
"/x:styleSheet/x:fills/x:fill[3]/x:patternFill/x:fgColor", "rgb",
-"EB9C");
+{
+xmlDocUniquePtr pXmlDoc = parseExport("xl/theme/theme1.xml");
+OString aClrScheme = "/a:theme/a:themeElements/a:clrScheme";
+assertXPath(pXmlDoc, aClrScheme, "name", "Office");
+assertXPath(pXmlDoc, aClrScheme + "/a:dk1/a:srgbClr", "val", "00");
+assertXPath(pXmlDoc, aClrScheme + "/a:lt1/a:srgbClr", "val", "ff");
+assertXPath(pXmlDoc, aClrScheme + "/a:dk2/a:srgbClr", "val", "44546a");
+assertXPath(pXmlDoc, aClrScheme + "/a:lt2/a:srgbClr", "val", "e7e6e6");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent1/a:srgbClr", "val", 
"4472c4");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent2/a:srgbClr", "val", 
"ed7d31");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent3/a:srgbClr", "val", 
"a5a5a5");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent4/a:srgbClr", "val", 
"ffc000");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent5/a:srgbClr", "val", 
"5b9bd5");
+assertXPath(pXmlDoc, aClrScheme + "/a:accent6/a:srgbClr", "val", 
"70ad47");
+assertXPath(pXmlDoc, aClrScheme + "/a:hlink/a:srgbClr", "val", 
"0563c1");
+assertXPath(pXmlDoc, aClrScheme + "/a:folHlink/a:srgbClr", "val", 
"954f72");
+}
 
-assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill[4]/x:patternFill", 
"patternType", "solid");
-assertXPath(pXmlDoc, 
"/x:styleSheet/x:fills/x:fill[4]/x:patternFill/x:fgColor", "theme", "4");
+{
+xmlDocUniquePtr pXmlDoc = parseExport("xl/styles.xml");
+
+assertXPath(pXmlDoc, "/x:styleSheet", 1);
+
+// Fonts
+OString aFont = "/x:styleSheet/x:fonts/x:font";
+assertXPath(pXmlDoc, aFont, 6);
+assertXPath(pXmlDoc, aFont + "[5]/x:color", "theme", "7");
+assertXPath(pXmlDoc, aFont + "[6]/x:color", "rgb", "FF9C5700");
+
+// Fills
+OString aFill = "/x:styleSheet/x:fills/x:fill";
+assertXPath(pXmlDoc, aFill, 4);
+assertXPath(pXmlDoc, aFill + "[1]/x:patternFill", "patternType", 
"none");
+assertXPath(pXmlDoc, aFill + "[2]/x:patternFill", "patternType", 
"gray125");
+assertXPath(pXmlDoc, aFill + "[3]/x:patternFill", "patternType", 
"solid");
+assertXPath(pXmlDoc, aFill + "[3]/x:patternFill/x:fgColor", "rgb", 
"EB9C");
+assertXPath(pXmlDoc, aFill + "[4]/x:patternFill", "patternType", 
"solid");
+assertXPath(pXmlDoc, aFill + "[4]/x:patternFill/x:fgColor", "theme", 
"4");
+}
 }
 
 // Round 100th percent to percent value - so that small differences don't fail 
the test


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

2023-07-04 Thread Tomaž Vajngerl (via logerrit)
 include/docmodel/color/ComplexColor.hxx |5 ++
 include/oox/export/ColorExportUtils.hxx |   55 
 sc/qa/unit/ThemeImportExportTest.cxx|   18 +-
 sc/qa/unit/subsequent_export_test.cxx   |   16 ++---
 sc/source/filter/excel/xestream.cxx |   19 ++-
 sc/source/filter/excel/xestyle.cxx  |   40 ++-
 6 files changed, 125 insertions(+), 28 deletions(-)

New commits:
commit 1d627c6f15bddc94189f6018c0cc6d48335695e3
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 30 01:39:50 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 10:37:56 2023 +0200

sc: OOXML export of theme colors for text and background

Change-Id: Ifd0d8184c9210caa5ca099767baa5dbbf8783f36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153785
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 82f60df96c5e7f7ad92c49cbbdbb0619f4e5e8a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153919

diff --git a/include/docmodel/color/ComplexColor.hxx 
b/include/docmodel/color/ComplexColor.hxx
index 4952d91ac217..e9597b15186b 100644
--- a/include/docmodel/color/ComplexColor.hxx
+++ b/include/docmodel/color/ComplexColor.hxx
@@ -100,6 +100,11 @@ public:
 
 ThemeColorType getSchemeType() const { return meSchemeType; }
 
+bool isValidSchemeType() const
+{
+return meType == model::ColorType::Scheme && meSchemeType != 
ThemeColorType::Unknown;
+}
+
 Color getRGBColor() const { return Color(mnComponent1, mnComponent2, 
mnComponent3); }
 
 std::vector const& getTransformations() const { return 
maTransformations; }
diff --git a/include/oox/export/ColorExportUtils.hxx 
b/include/oox/export/ColorExportUtils.hxx
new file mode 100644
index ..63716a10839d
--- /dev/null
+++ b/include/oox/export/ColorExportUtils.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+namespace oox
+{
+static double convertColorTransformsToTintOrShade(model::ComplexColor const& 
rComplexColor)
+{
+sal_Int16 nLumMod = 10'000;
+sal_Int16 nLumOff = 0;
+
+for (auto const& rTransform : rComplexColor.getTransformations())
+{
+if (rTransform.meType == model::TransformationType::LumMod)
+nLumMod = rTransform.mnValue;
+if (rTransform.meType == model::TransformationType::LumOff)
+nLumOff = rTransform.mnValue;
+}
+
+if (nLumMod == 10'000 && nLumOff == 0)
+return 0.0;
+
+double fTint = 0.0;
+
+if (nLumOff > 0) // tint
+fTint = double(nLumOff) / 10'000.0;
+else
+fTint = -double(10'000 - nLumMod) / 10'000.0;
+
+return fTint;
+}
+
+static sal_Int32 convertThemeColorTypeToExcelThemeNumber(model::ThemeColorType 
eType)
+{
+if (eType == model::ThemeColorType::Unknown)
+return -1;
+
+constexpr std::array constMap = { 1, 0, 3, 2, 4, 5, 6, 7, 
8, 9, 10, 11 };
+
+return constMap[sal_Int32(eType)];
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/ThemeImportExportTest.cxx 
b/sc/qa/unit/ThemeImportExportTest.cxx
index 106471f9a816..95e6d0e2351e 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -41,11 +41,9 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExport)
 // Fonts
 assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font", 6);
 
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[5]/x:color", "rgb",
-"C000"); // need to be theme probably
+assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[5]/x:color", "theme", 
"7");
 
-assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[6]/x:color", "rgb",
-"FF9C5700"); // need to be theme probably
+assertXPath(pXmlDoc, "/x:styleSheet/x:fonts/x:font[6]/x:color", "rgb", 
"FF9C5700");
 
 // Fills
 assertXPath(pXmlDoc, "/x:styleSheet/x:fills/x:fill", 4);
@@ -92,9 +90,9 @@ void checkCellBackgroundThemeColor(ScDocument* pDoc)
 auto& rTransformations = aComplexColor.getTransformations();
 CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
-CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), rTransformations[0].mnValue);
+CPPUNIT_ASSERT_EQUAL(20, 
sal_Int32(std::round(rTransformations[0].mnValue / 100.0)));
 CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
-CPPUNIT_ASSERT_EQUAL(sal_Int16(7999), rTransformations[1].mnValue);
+CPPUNIT_ASSERT_EQUAL(80, 
sal_Int32(std::round(rTransform

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

2023-07-04 Thread Khaled Hosny (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf48707-1.fodt |  290 ++
 vcl/qa/cppunit/pdfexport/data/tdf48707-2.fodt |  335 ++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|   65 +
 vcl/source/gdi/pdfwriter_impl.cxx |3 
 4 files changed, 693 insertions(+)

New commits:
commit 1f9087b8da6588239a4b655f2dc94d48817569a5
Author: Khaled Hosny 
AuthorDate: Mon Jul 3 14:19:42 2023 +0300
Commit: Michael Stahl 
CommitDate: Tue Jul 4 10:37:55 2023 +0200

tdf#48707: Explicitly set overline color in PDF export

Like we do with underline color, so that color does not leak from
elsewhere.

Change-Id: I3716a117a0d0a1260e47cbfed2242f401a09d7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153877
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 19f4d93ddfc1b738c4f11666d6cb8090437abce7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153911
Reviewed-by: Michael Stahl 

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf48707-1.fodt 
b/vcl/qa/cppunit/pdfexport/data/tdf48707-1.fodt
new file mode 100644
index ..02286e5051c5
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/tdf48707-1.fodt
@@ -0,0 +1,290 @@
+
+
+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:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:formx="u
 rn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:ooo="http:/
 /openoffice.org/2004/office" 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ Scott 
Wills2011-08-03T07:12:282023-07-03T14:56:12.773653822PT1M52S2LibreOffice/7.5.4.2$MacOSX_X86_64
 
LibreOffice_project/36ccfdc35048b057fd9854c757a8b67ec53977b6
+ 
+  
+   0
+   0
+   22666
+   10624
+   true
+   false
+   
+
+ view2
+ 10463
+ 2501
+ 0
+ 0
+ 22664
+ 10622
+ 3
+ 0
+ false
+ 167
+ false
+ false
+ true
+ true
+ false
+
+   
+  
+  
+   true
+   true
+   true
+   true
+   false
+   
+   false
+   false
+   true
+   false
+   false
+   false
+   true
+   false
+   false
+   false
+   false
+   false
+   0
+   0
+   false
+   false
+   false
+   false
+   true
+   false
+   false
+   false
+   true
+   false
+   false
+   
+   false
+   false
+   
+   true
+   false
+   false
+   false
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   false
+   false
+   false
+   false
+   false
+   false
+   
+   false
+   false
+   false
+   false
+   false
+   false
+   0
+   false
+   false
+   false
+   false
+   false
+   true
+   false
+   false
+   false
+   false
+   false
+   false
+   false
+   
+   false
+   false
+   true
+   true
+   false
+   true
+   true
+   false
+   821660
+   true
+   true
+   false
+   
+   false
+   true
+   false
+   high-resolution
+   1
+   0
+   true
+   false
+   false
+   true
+   true
+   true
+   true
+   true
+   false
+   true
+   
+   false
+   true
+   850755
+   false
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink"/>
+  
+ 
+ 
+  
+

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

2023-07-04 Thread Caolán McNamara (via logerrit)
 sc/source/filter/inc/XclExpChangeTrack.hxx   |3 ++
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |   36 ++-
 2 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 650ab6e645c51aaffc8dc5e638295d6da74d44ff
Author: Caolán McNamara 
AuthorDate: Mon Jul 3 21:19:10 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 4 10:08:39 2023 +0200

crashtesting: assert on exporting fdo68105-1.ods to xls

and ooo101471-3.ods to xls

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

diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx 
b/sc/source/filter/inc/XclExpChangeTrack.hxx
index a6cdeff93cab..b23b6f8cdcaf 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -305,6 +305,7 @@ public:
 voidInitFillup();
 
 sal_uInt16  GetId( sal_uInt16 nIndex ) const;
+boolHasId( sal_uInt16 nIndex ) const;
 voidRemove();
 
 sal_uInt16   GetBufferCount() const
@@ -465,6 +466,8 @@ struct XclExpChTrData
 voidWrite(
 XclExpStream& rStrm,
 const XclExpChTrTabIdBuffer& rTabIdBuffer 
);
+
+boolUsesDeletedTab(const XclExpChTrTabIdBuffer& 
rTabIdBuffer) const;
 };
 
 // XclExpChTrCellContent - changed cell content
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx 
b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 24da37109d29..9c22af8a6420 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -577,6 +577,11 @@ sal_uInt16 XclExpChTrTabIdBuffer::GetId( sal_uInt16 nIndex 
) const
 return pBuffer[ nIndex ];
 }
 
+bool XclExpChTrTabIdBuffer::HasId( sal_uInt16 nIndex ) const
+{
+return nIndex < nBufSize;
+}
+
 void XclExpChTrTabIdBuffer::Remove()
 {
 OSL_ENSURE( pBuffer.get() <= pLast, "XclExpChTrTabIdBuffer::Remove - 
buffer empty" );
@@ -807,6 +812,31 @@ void XclExpChTrData::Write( XclExpStream& rStrm, const 
XclExpChTrTabIdBuffer& rT
 }
 }
 
+static bool lcl_IsDeletedTab(const XclExpChTrTabIdBuffer& rTabIdBuffer, 
sal_uInt16 nIndex)
+{
+return !rTabIdBuffer.HasId(nIndex);
+}
+
+bool XclExpChTrData::UsesDeletedTab(const XclExpChTrTabIdBuffer& rTabIdBuffer) 
const
+{
+if (nType != EXC_CHTR_TYPE_FORMULA)
+return false;
+
+for( const auto& rLogEntry : maRefLog )
+{
+if (rLogEntry.mpUrl && rLogEntry.mpFirstTab)
+continue;
+if (lcl_IsDeletedTab(rTabIdBuffer, rLogEntry.mnFirstXclTab))
+return true;
+bool bSingleTab = rLogEntry.mnFirstXclTab == rLogEntry.mnLastXclTab;
+if (!bSingleTab)
+continue;
+if (lcl_IsDeletedTab(rTabIdBuffer, rLogEntry.mnLastXclTab))
+return true;
+}
+return false;
+}
+
 XclExpChTrCellContent::XclExpChTrCellContent(
 const ScChangeActionContent& rAction,
 const XclExpRoot& rRoot,
@@ -934,7 +964,11 @@ void XclExpChTrCellContent::GetCellData(
 
 bool XclExpChTrCellContent::UsesDeletedTab() const
 {
-return IsDeletedTab(aPosition.Tab());
+if (IsDeletedTab(aPosition.Tab()))
+return true;
+if (pOldData && pOldData->UsesDeletedTab(rIdBuffer))
+return true;
+return pNewData && pNewData->UsesDeletedTab(rIdBuffer);
 }
 
 void XclExpChTrCellContent::SaveActionData( XclExpStream& rStrm ) const


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

2023-07-04 Thread Stephan Bergmann (via logerrit)
 external/libxslt/ExternalPackage_libxslt.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d1fc1c326470461def5ab092a311afee31950880
Author: Stephan Bergmann 
AuthorDate: Tue Jul 4 08:31:28 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jul 4 09:38:35 2023 +0200

Fix Linux --without-system-libxml build

...after 362dfc50a28a918ec73609a00d2851eb3058375d "libxslt: upgrade to 
release
1.1.38"

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

diff --git a/external/libxslt/ExternalPackage_libxslt.mk 
b/external/libxslt/ExternalPackage_libxslt.mk
index c22a2e1b5dad..c1a8ee1217f1 100644
--- a/external/libxslt/ExternalPackage_libxslt.mk
+++ b/external/libxslt/ExternalPackage_libxslt.mk
@@ -25,7 +25,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dl
 endif
 else # OS!=WNT
 $(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.$(LIBXSLT_VERSION_MICRO)))
-$(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.20))
+$(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.21))
 endif
 endif # DISABLE_DYNLOADING
 


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

2023-07-04 Thread Noel Grandin (via logerrit)
 include/vcl/window.hxx   |2 +-
 vcl/source/window/window.cxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2d1d1279790807235b1edcee8f807d594636fda7
Author: Noel Grandin 
AuthorDate: Mon Jul 3 21:35:14 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 4 09:12:10 2023 +0200

ImplGetUnmirroredOutOffX can be const

which avoids some unnecessary const_cast

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

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 2a94c3bd414c..ba380cb8817d 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -692,7 +692,7 @@ private:
 
 SAL_DLLPRIVATE tools::Rectangle 
ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle& rRect ) 
const;
 SAL_DLLPRIVATE tools::Rectangle 
ImplUnmirroredAbsoluteScreenToOutputPixel( const tools::Rectangle& rRect ) 
const;
-SAL_DLLPRIVATE tools::Long ImplGetUnmirroredOutOffX();
+SAL_DLLPRIVATE tools::Long  ImplGetUnmirroredOutOffX() const;
 
 // retrieves the list of owner draw decorated windows for this window 
hierarchy
 SAL_DLLPRIVATE ::std::vector >& ImplGetOwnerDrawList();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f79918fd7f52..c07433173287 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2818,11 +2818,11 @@ Point Window::ScreenToOutputPixel( const Point& rPos ) 
const
 return Point( rPos.X() - GetOutDev()->mnOutOffX, rPos.Y() - 
GetOutDev()->mnOutOffY );
 }
 
-tools::Long Window::ImplGetUnmirroredOutOffX()
+tools::Long Window::ImplGetUnmirroredOutOffX() const
 {
 // revert mnOutOffX changes that were potentially made in ImplPosSizeWindow
 tools::Long offx = GetOutDev()->mnOutOffX;
-OutputDevice *pOutDev = GetOutDev();
+const OutputDevice *pOutDev = GetOutDev();
 if( pOutDev->HasMirroredGraphics() )
 {
 if( mpWindowImpl->mpParent && 
!mpWindowImpl->mpParent->mpWindowImpl->mbFrame && 
mpWindowImpl->mpParent->GetOutDev()->ImplIsAntiparallel() )
@@ -2844,14 +2844,14 @@ tools::Long Window::ImplGetUnmirroredOutOffX()
 Point Window::OutputToNormalizedScreenPixel( const Point& rPos ) const
 {
 // relative to top level parent
-tools::Long offx = 
const_cast(this)->ImplGetUnmirroredOutOffX();
+tools::Long offx = ImplGetUnmirroredOutOffX();
 return Point( rPos.X()+offx, rPos.Y() + GetOutDev()->mnOutOffY );
 }
 
 Point Window::NormalizedScreenToOutputPixel( const Point& rPos ) const
 {
 // relative to top level parent
-tools::Long offx = 
const_cast(this)->ImplGetUnmirroredOutOffX();
+tools::Long offx = ImplGetUnmirroredOutOffX();
 return Point( rPos.X()-offx, rPos.Y() - GetOutDev()->mnOutOffY );
 }