Re: ESC meeting minutes: 2023-07-13

2023-07-13 Thread Miklos Vajna
Hi Roman,

On Thu, Jul 13, 2023 at 09:16:45PM +0300, Roman Kuznetsov 
 wrote:
> Hi all. Unfortunately I don't see any AI about Skia/Raster enabled by
> default in the minutes. Was it there?

My reading is that none of the attendees had a strong objection to your
proposal, you can go ahead with your gerrit change after the usual
review.

Not all questions end with an action item, our focus is more on
resolving conflicts, if there are any. :-)

Regards,

Miklos


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

2023-07-13 Thread Miklos Vajna (via logerrit)
 sw/source/core/doc/notxtfrm.cxx |   13 
 sw/source/core/inc/frame.hxx|2 -
 sw/source/core/inc/notxtfrm.hxx |2 +
 sw/source/core/text/xmldump.cxx |   41 
 4 files changed, 16 insertions(+), 42 deletions(-)

New commits:
commit 46d7119b8be03968017e59d882e5671350304e15
Author: Miklos Vajna 
AuthorDate: Thu Jul 13 20:04:59 2023 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 14 08:13:46 2023 +0200

sw layout xml dump: extract SwNoTextFrame::dumpAsXml() from SwFrame

Which means finally SwFrame::dumpAsXml() can be pure-virtual as all
subclasses overwrite it.

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

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index ccf60904585d..14cb5680309b 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -648,6 +648,19 @@ double SwNoTextFrame::getLocalFrameRotation() const
 return 0.0;
 }
 
+void SwNoTextFrame::dumpAsXml(xmlTextWriterPtr writer) const
+{
+(void)xmlTextWriterStartElement(writer, reinterpret_cast("notxt"));
+dumpAsXmlAttributes(writer);
+
+(void)xmlTextWriterStartElement(writer, BAD_CAST("infos"));
+dumpInfosAsXml(writer);
+(void)xmlTextWriterEndElement(writer);
+dumpChildrenAsXml(writer);
+
+(void)xmlTextWriterEndElement(writer);
+}
+
 /** Calculate the Bitmap's site, if needed */
 void SwNoTextFrame::Format( vcl::RenderContext* /*pRenderContext*/, const 
SwBorderAttrs * )
 {
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index ec47266ec468..d405da36515b 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -938,7 +938,7 @@ public:
 
 public:
 // if writer is NULL, dumps the layout structure as XML in layout.xml
-virtual void dumpAsXml(xmlTextWriterPtr writer = nullptr) const;
+virtual void dumpAsXml(xmlTextWriterPtr writer = nullptr) const = 0;
 void dumpTopMostAsXml(xmlTextWriterPtr writer = nullptr) const;
 void dumpInfosAsXml(xmlTextWriterPtr writer) const;
 virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index a3870c86150c..50612e396ab5 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -107,6 +107,8 @@ public:
 
 // RotateFlyFrame3 - Support for Transformations
 virtual void transform_translate(const Point& rOffset) override;
+
+void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override;
 };
 
 #endif
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 2ed4113cddba..83111d397d38 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -168,47 +168,6 @@ void SwFrame::dumpTopMostAsXml(xmlTextWriterPtr writer) 
const
 pFrame->dumpAsXml(writer);
 }
 
-void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
-{
-const char *name = nullptr;
-
-switch ( GetType(  ) )
-{
-case SwFrameType::NoTxt:
-name = "notxt";
-break;
-default: break;
-}
-
-if ( name != nullptr )
-{
-(void)xmlTextWriterStartElement( writer, reinterpret_cast(name) );
-
-dumpAsXmlAttributes( writer );
-
-(void)xmlTextWriterStartElement( writer, BAD_CAST( "infos" ) );
-dumpInfosAsXml( writer );
-(void)xmlTextWriterEndElement( writer );
-
-// Dump Anchored objects if any
-const SwSortedObjs* pAnchored = GetDrawObjs();
-if ( pAnchored && pAnchored->size() > 0 )
-{
-(void)xmlTextWriterStartElement( writer, BAD_CAST( "anchored" ) );
-
-for (SwAnchoredObject* pObject : *pAnchored)
-{
-pObject->dumpAsXml( writer );
-}
-
-(void)xmlTextWriterEndElement( writer );
-}
-
-dumpChildrenAsXml( writer );
-(void)xmlTextWriterEndElement( writer );
-}
-}
-
 void SwFrame::dumpInfosAsXml( xmlTextWriterPtr writer ) const
 {
 // output the Frame


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

2023-07-13 Thread Michael Weghorn (via logerrit)
 vcl/unx/gtk3/a11y/atkwrapper.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 4ded0e7c874e8b8052a2afa55c4cdaa0b5d095b8
Author: Michael Weghorn 
AuthorDate: Thu Jul 13 14:32:32 2023 +0200
Commit: Michael Weghorn 
CommitDate: Fri Jul 14 07:40:40 2023 +0200

gtk3 a11y: Map push button menu role to ATK equivalent

at-spi2-core commit [1]

commit ed16f50e4930e32c29f80552eb698baa35b4677e
Date:   Thu Jul 21 21:49:32 2022 +0800

Add `ATK_ROLE_PUSH_BUTTON_MENU`

has added a `ATK_ROLE_PUSH_BUTTON_MENU` role
(and `ATSPI_ROLE_PUSH_BUTTON_MENU` on the AT-SPI
layer, note also pending related MR [2] to also
increase `ATSPI_ROLE_COUNT` accordingly),
so map LO's `BUTTON_MENU` role to that
when using a new enough ATK version
(available from ATK 2.46 on).

[1] 
https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/ed16f50e4930e32c29f80552eb698baa35b4677e
[2] https://gitlab.gnome.org/GNOME/at-spi2-core/-/merge_requests/146

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

diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index f322987dbbcd..904358a2d229 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -309,7 +309,11 @@ static AtkRole mapToAtkRole( sal_Int16 nRole )
 case accessibility::AccessibleRole::BUTTON_DROPDOWN:
 return ATK_ROLE_PUSH_BUTTON;
 case accessibility::AccessibleRole::BUTTON_MENU:
+#if ATK_CHECK_VERSION(2, 46, 0)
+return ATK_ROLE_PUSH_BUTTON_MENU;
+#else
 return ATK_ROLE_PUSH_BUTTON;
+#endif
 case accessibility::AccessibleRole::CAPTION:
 return ATK_ROLE_CAPTION;
 case accessibility::AccessibleRole::CHART:


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

2023-07-13 Thread Colomban Wendling (via logerrit)
 sw/CppunitTest_sw_a11y.mk   |1 
 sw/qa/extras/accessibility/tdf155705.cxx|   57 +++
 sw/qa/extras/accessibility/testdocuments/tdf155705.fodt |  130 
 3 files changed, 188 insertions(+)

New commits:
commit d54a48c008dc9c9cf206d7c7dd37b8d2fdd4e86d
Author: Colomban Wendling 
AuthorDate: Tue Jun 6 15:29:20 2023 +0200
Commit: Michael Weghorn 
CommitDate: Fri Jul 14 07:39:05 2023 +0200

Add test case for tdf#155705

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

diff --git a/sw/CppunitTest_sw_a11y.mk b/sw/CppunitTest_sw_a11y.mk
index 070f0e402d88..a0d76a20d53a 100644
--- a/sw/CppunitTest_sw_a11y.mk
+++ b/sw/CppunitTest_sw_a11y.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sw_a11y, \
sw/qa/extras/accessibility/basics \
sw/qa/extras/accessibility/dialogs \
sw/qa/extras/accessibility/unicode \
+   sw/qa/extras/accessibility/tdf155705 \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,sw_a11y, \
diff --git a/sw/qa/extras/accessibility/tdf155705.cxx 
b/sw/qa/extras/accessibility/tdf155705.cxx
new file mode 100644
index ..ebaf4600142a
--- /dev/null
+++ b/sw/qa/extras/accessibility/tdf155705.cxx
@@ -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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+using namespace css;
+
+/* This test only works if spell checking is available for en_US */
+CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, tdf155705)
+{
+loadFromSrc(u"/sw/qa/extras/accessibility/testdocuments/tdf155705.fodt");
+
+/* we need to give it a second to fully set up the XAccessibleTextMarkup, 
otherwise we get a
+ * dysfunctional one that asserts out on m_pTextFrame */
+Scheduler::ProcessEventsToIdle();
+
+uno::Reference xLSM2
+= linguistic2::LinguServiceManager::create(m_xContext);
+uno::Reference 
xSpell(xLSM2->getSpellChecker(), uno::UNO_QUERY);
+if (!xSpell.is() || 
!xSpell->hasLanguage(static_cast(LANGUAGE_ENGLISH_US)))
+return;
+
+auto xContext = getDocumentAccessibleContext();
+CPPUNIT_ASSERT(xContext.is());
+
+auto xChildContext = getAllChildren(xContext).back();
+uno::Reference xMarkup(xChildContext,
+ 
uno::UNO_QUERY_THROW);
+
+// make sure the idle spellcheck pass runs
+AccessibilityTools::Await(
+[&xMarkup]() { return 0 < 
xMarkup->getTextMarkupCount(text::TextMarkupType::SPELLCHECK); });
+
+CPPUNIT_ASSERT_GREATER(sal_Int32(0),
+   
xMarkup->getTextMarkupCount(text::TextMarkupType::SPELLCHECK));
+auto aSegment = xMarkup->getTextMarkup(0, 
text::TextMarkupType::SPELLCHECK);
+CPPUNIT_ASSERT_GREATEREQUAL(sal_Int32(0), aSegment.SegmentStart);
+CPPUNIT_ASSERT_GREATER(aSegment.SegmentStart, aSegment.SegmentEnd);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/qa/extras/accessibility/testdocuments/tdf155705.fodt 
b/sw/qa/extras/accessibility/testdocuments/tdf155705.fodt
new file mode 100644
index ..8a22551ca911
--- /dev/null
+++ b/sw/qa/extras/accessibility/testdocuments/tdf155705.fodt
@@ -0,0 +1,130 @@
+
+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:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:meta="u
 rn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns

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

2023-07-13 Thread Matt K (via logerrit)
 sc/source/ui/app/inputwin.cxx |   39 ++-
 1 file changed, 38 insertions(+), 1 deletion(-)

New commits:
commit b247630d8b5e81041e0ed515572dfede49ccdf46
Author: Matt K 
AuthorDate: Thu Jul 13 18:12:16 2023 -0500
Commit: Mike Kaganski 
CommitDate: Fri Jul 14 06:40:06 2023 +0200

tdf#150262 Split Autosum button and default to sum on click

This change follows with comments in the bug report by
changing the Button Type to dropdown and adding back
the code to do the autosum on default click of the
sigma button.

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

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 005b29e3b573..2c46b93db54d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -197,7 +197,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
 // sigma and equal buttons
 if (!bIsLOKMobilePhone)
 {
-InsertItem  (SID_INPUT_SUM,  Image(StockImage::Yes, 
RID_BMP_INPUT_SUM), ToolBoxItemBits::DROPDOWNONLY, 3);
+InsertItem  (SID_INPUT_SUM,  Image(StockImage::Yes, 
RID_BMP_INPUT_SUM), ToolBoxItemBits::DROPDOWN, 3);
 InsertItem  (SID_INPUT_EQUAL,Image(StockImage::Yes, 
RID_BMP_INPUT_EQUAL), ToolBoxItemBits::NONE, 4);
 InsertItem  (SID_INPUT_CANCEL,   Image(StockImage::Yes, 
RID_BMP_INPUT_CANCEL), ToolBoxItemBits::NONE, 5);
 InsertItem  (SID_INPUT_OK,   Image(StockImage::Yes, 
RID_BMP_INPUT_OK), ToolBoxItemBits::NONE, 6);
@@ -366,6 +366,43 @@ void ScInputWindow::Select()
 SetSumAssignMode();
 mxTextWindow->Invalidate(); // Or else the Selection remains
 }
+else if (curItemId == SID_INPUT_SUM)
+{
+ScTabViewShell* pViewSh = 
dynamic_cast(SfxViewShell::Current());
+if (pViewSh)
+{
+bool bSubTotal = false;
+bool bRangeFinder = false;
+const OUString aFormula = pViewSh->DoAutoSum(bRangeFinder, 
bSubTotal, ocSum);
+if (!aFormula.isEmpty())
+{
+SetFuncString(aFormula);
+if (bRangeFinder && pScMod->IsEditMode())
+{
+ScInputHandler* pHdl = pScMod->GetInputHdl(pViewSh);
+if (pHdl)
+{
+pHdl->InitRangeFinder(aFormula);
+
+//! SetSelection at the InputHandler?
+//! Set bSelIsRef?
+const sal_Int32 nOpen = aFormula.indexOf('(');
+const sal_Int32 nLen = aFormula.getLength();
+if (nOpen != -1 && nLen > nOpen)
+{
+ESelection aSel(0, nOpen + (bSubTotal ? 3 : 1), 0, 
nLen - 1);
+EditView* pTableView = pHdl->GetTableView();
+if (pTableView)
+pTableView->SetSelection(aSel);
+EditView* pTopView = pHdl->GetTopView();
+if (pTopView)
+pTopView->SetSelection(aSel);
+}
+}
+}
+}
+}
+}
 else if (curItemId == SID_INPUT_EQUAL)
 {
 StartFormula();


[Libreoffice-commits] core.git: 3 commits - sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-13 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |3 
 sw/qa/api/SwXFieldEnumeration.cxx |  109 ++
 sw/qa/api/SwXFrames.cxx   |   90 +
 sw/qa/api/SwXNumberingRules.cxx   |  134 ++
 4 files changed, 336 insertions(+)

New commits:
commit 73367f09716f5709264885486a2bb03626d39884
Author: anfanite396 
AuthorDate: Tue Jul 11 21:05:30 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 14 03:13:35 2023 +0200

Move SwXNumberingRules Java tests to C++

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

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index e0af4cb0b29d..659b582b49c0 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -32,6 +32,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXFootnotes \
 sw/qa/api/SwXHeadFootText \
+sw/qa/api/SwXNumberingRules \
 sw/qa/api/SwXStyleFamilies \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
diff --git a/sw/qa/api/SwXNumberingRules.cxx b/sw/qa/api/SwXNumberingRules.cxx
new file mode 100644
index ..74febc1c027a
--- /dev/null
+++ b/sw/qa/api/SwXNumberingRules.cxx
@@ -0,0 +1,134 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXNumberingRules.
+ */
+class SwXNumberingRules final : public UnoApiTest,
+public apitest::XElementAccess,
+public apitest::XIndexAccess,
+public apitest::XPropertySet
+{
+public:
+SwXNumberingRules()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType>::get())
+, XIndexAccess(10)
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xIndexAccess;
+Reference xNumRules;
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+try
+{
+xText->insertString(xCursor, "The quick brown fox jumps over the 
lazy dog", false);
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::PARAGRAPH_BREAK, false);
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+Reference xStyleFam(xTextDocument, 
UNO_QUERY_THROW);
+
+try
+{
+Reference xStyleFamNames = 
xStyleFam->getStyleFamilies();
+Reference xNumStyles(
+xStyleFamNames->getByName("NumberingStyles"), UNO_QUERY_THROW);
+xIndexAccess = Reference(xNumStyles, 
UNO_QUERY_THROW);
+}
+catch (lang::WrappedTargetException&)
+{
+}
+catch (container::NoSuchElementException&)
+{
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+try
+{
+Reference 
xPropSet(xIndexAccess->getByIndex(0), UNO_QUERY_THROW);
+xNumRules = Reference(
+xPropSet->getPropertyValue("NumberingRules"), UNO_QUERY_THROW);
+}
+catch (lang::WrappedTargetException&)
+{
+}
+catch (lang::IndexOutOfBoundsException&)
+{
+}
+catch (beans::UnknownPropertyException&)
+{
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+return Reference(xNumRules, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXNumberingRules);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetPropertySetInfo);
+CPPUNIT_TEST(testSetPropertyValue);
+CPPUNIT_TEST(testGetPropertyValue);
+CPPUNIT_TEST(testPropertyChangeListener);
+CPPUNIT_TEST(testVetoableChangeListener);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXNumberingRules);
+}
+
+/* vim:set shiftwidth=4 s

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

2023-07-13 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk|1 
 sw/qa/api/SwXDocumentIndexes.cxx |   84 +++
 2 files changed, 85 insertions(+)

New commits:
commit 0fa8010a07c6e6fd7d3506087a417bf84e948e16
Author: anfanite396 
AuthorDate: Tue Jul 11 15:55:49 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 14 03:13:03 2023 +0200

Move SwXDocumentIndexes Java tests to C++

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

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index cc2cede24ad4..c1d323dc5df1 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -22,6 +22,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBookmarks \
 sw/qa/api/SwXChapterNumbering \
 sw/qa/api/SwXDocumentIndex \
+sw/qa/api/SwXDocumentIndexes \
 sw/qa/api/SwXDocumentIndexMark \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnote \
diff --git a/sw/qa/api/SwXDocumentIndexes.cxx b/sw/qa/api/SwXDocumentIndexes.cxx
new file mode 100644
index ..91be0e5c8448
--- /dev/null
+++ b/sw/qa/api/SwXDocumentIndexes.cxx
@@ -0,0 +1,84 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXDocumentIndexes.
+ */
+class SwXDocumentIndexes final : public UnoApiTest,
+ public apitest::XElementAccess,
+ public apitest::XIndexAccess,
+ public apitest::XNameAccess
+{
+public:
+SwXDocumentIndexes()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType::get())
+, XIndexAccess(1)
+, XNameAccess("Table of Contents1")
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+Reference xTextContent(
+xMSF->createInstance("com.sun.star.text.ContentIndex"), 
UNO_QUERY_THROW);
+
+xText->insertTextContent(xCursor, xTextContent, false);
+Reference xDocIndSupp(xTextDocument, 
UNO_QUERY_THROW);
+
+return Reference(xDocIndSupp->getDocumentIndexes(), 
UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXDocumentIndexes);
+CPPUNIT_TEST(testGetByName);
+CPPUNIT_TEST(testGetElementNames);
+CPPUNIT_TEST(testHasByName);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXDocumentIndexes);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-07-13 Thread Xisco Fauli (via logerrit)
 svgio/source/svgreader/svgcharacternode.cxx |   32 
 1 file changed, 14 insertions(+), 18 deletions(-)

New commits:
commit 3bf6ec92379a14ac97ccfff5c6d0ca14b70d7b7e
Author: Xisco Fauli 
AuthorDate: Thu Jul 13 21:55:34 2023 +0200
Commit: Xisco Fauli 
CommitDate: Fri Jul 14 01:02:57 2023 +0200

svgio: remove redundant check

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

diff --git a/svgio/source/svgreader/svgcharacternode.cxx 
b/svgio/source/svgreader/svgcharacternode.cxx
index e62d21528d96..e9b719afc946 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -263,31 +263,27 @@ namespace svgio::svgreader
 
 // prepare TextArray
 ::std::vector< double > aTextArray(rSvgTextPosition.getX());
-
 if(!aTextArray.empty() && aTextArray.size() < nLength)
 {
 const sal_uInt32 nArray(aTextArray.size());
 
-if(nArray < nLength)
-{
-double fStartX(0.0);
+double fStartX(0.0);
 
-if(rSvgTextPosition.getParent() && 
rSvgTextPosition.getParent()->getAbsoluteX())
-{
-fStartX = 
rSvgTextPosition.getParent()->getPosition().getX();
-}
-else
-{
-fStartX = aTextArray[nArray - 1];
-}
+if(rSvgTextPosition.getParent() && 
rSvgTextPosition.getParent()->getAbsoluteX())
+{
+fStartX = 
rSvgTextPosition.getParent()->getPosition().getX();
+}
+else
+{
+fStartX = aTextArray[nArray - 1];
+}
 
-::std::vector< double > 
aExtendArray(aTextLayouterDevice.getTextArray(getText(), nArray, nLength - 
nArray));
-aTextArray.reserve(nLength);
+::std::vector< double > 
aExtendArray(aTextLayouterDevice.getTextArray(getText(), nArray, nLength - 
nArray));
+aTextArray.reserve(nLength);
 
-for(const auto &a : aExtendArray)
-{
-aTextArray.push_back(a + fStartX);
-}
+for(const auto &a : aExtendArray)
+{
+aTextArray.push_back(a + fStartX);
 }
 }
 


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

2023-07-13 Thread Mike Kaganski (via logerrit)
 svx/source/dialog/svxruler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a177a4474b8c31f44741e2834df2c76ea8074aa3
Author: Mike Kaganski 
AuthorDate: Thu Jul 13 21:07:08 2023 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jul 13 23:45:51 2023 +0200

tdf#142808: use SvxLRSpaceItem::GetTextLeft instead of GetLeft

Because we need the value without the negative (hanging) indent.

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

diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 2211f09a20e1..ffc34cd5bfb5 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -2152,7 +2152,7 @@ void SvxRuler::ApplyTabs()
 = lAppNullOffset + (bRTL ? GetRightFrameMargin() : 
GetLeftFrameMargin());
 if (mxRulerImpl->bIsTabsRelativeToIndent && mxParaItem)
 {
-nTmpLeftIndentLogic += bRTL ? mxParaItem->GetRight() : 
mxParaItem->GetLeft();
+nTmpLeftIndentLogic += bRTL ? mxParaItem->GetRight() : 
mxParaItem->GetTextLeft();
 }
 aTabStop.GetTabPos()
 = mxRulerImpl->lMaxRightLogic - lLogicNullOffset - 
nTmpLeftIndentLogic;


[Libreoffice-commits] core.git: include/rtl

2023-07-13 Thread Stephan Bergmann (via logerrit)
 include/rtl/stringutils.hxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit bca5ba30e0bbfe04de652eb55d1a9ceac4be2b0b
Author: Stephan Bergmann 
AuthorDate: Thu Jul 13 15:33:57 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 13 23:35:11 2023 +0200

Restrict deleted catch-all O[U]StringChar ctor to arithmetic/enum types

...which should still cover the issues that
7320d7a4a4dd0657f2d650a6f580ad399529f0f1 "OUStringChar must either take a
sal_Unicode or an ASCII char" wanted to address, but without causing 
ambiguities
where some unrelated type would unexpectedly be sucked into a conversion 
chain
going through these ctors

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

diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx
index 58781973fab9..2c5d05c82784 100644
--- a/include/rtl/stringutils.hxx
+++ b/include/rtl/stringutils.hxx
@@ -19,6 +19,10 @@
 #include 
 #include 
 
+#if defined LIBO_INTERNAL_ONLY
+#include 
+#endif
+
 #include "sal/types.h"
 
 // The unittest uses slightly different code to help check that the proper
@@ -48,7 +52,8 @@ namespace rtl
 //
 struct SAL_WARN_UNUSED OStringChar {
 constexpr OStringChar(char theC): c(theC) {}
-template OStringChar(T &&) = delete;
+template OStringChar(
+T, std::enable_if_t || std::is_enum_v, int> 
= 0) = delete;
 constexpr operator std::string_view() const { return {&c, 1}; }
 char const c;
 };
@@ -98,7 +103,8 @@ struct SAL_WARN_UNUSED OStringChar {
 struct SAL_WARN_UNUSED OUStringChar_ {
 constexpr OUStringChar_(sal_Unicode theC): c(theC) {}
 constexpr OUStringChar_(char theC): c(theC) { assert(c <= 0x7F); }
-template OUStringChar_(T &&) = delete;
+template OUStringChar_(
+T, std::enable_if_t || std::is_enum_v, int> 
= 0) = delete;
 constexpr operator std::u16string_view() const { return {&c, 1}; }
 sal_Unicode const c;
 };


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

2023-07-13 Thread Justin Luth (via logerrit)
 sd/source/ui/func/futext.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0c421a9aa3210d3bafdc8bb5e0d79cc1b58b4b33
Author: Justin Luth 
AuthorDate: Wed Jul 5 19:09:57 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 13 23:20:26 2023 +0200

tdf#153446 sd FuText: handle mouse-up without mouse-down

This is a follow-up to the previous commit which did the same
thing to all of the other FuConstruct elements.
It isn't essential to have for FuText, just nice for consistency.

FuText is much more complex than the other FuConstructs,
and has been this complex since initial import.

In patchset1, I removed a large chunk of code that I assume
is now obsolete with my change, but now I just left it in.
Without any documentation or unit tests, it is hard to know
for sure why this function creates a textbox on mouse-up.
So I chickened out and did the smart thing of just leaving
stuff I don't know anything at all about alone.

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

diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 5639d424b8b1..48c166792e70 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -604,6 +604,9 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
 }
 }
 
+if (rMEvt.IsLeft() && !mxTextObj.get().is() && 
IsIgnoreUnexpectedMouseButtonUp())
+return false;
+
 if( mpView && mpView->IsDragObj())
 {
 // object was moved


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

2023-07-13 Thread Xisco Fauli (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx  |   27 +++
 svgio/qa/cppunit/data/tdf156269.svg |8 
 svgio/source/svgreader/svgcharacternode.cxx |   48 ++--
 3 files changed, 59 insertions(+), 24 deletions(-)

New commits:
commit 1df7a1ac274db509f1a135b84a01ea51c4d0c1f9
Author: Xisco Fauli 
AuthorDate: Thu Jul 13 11:14:25 2023 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jul 13 23:09:53 2023 +0200

tdf#156269: dx and dy do not depend on x and y

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

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index b3d20603cfa7..7263439e86c1 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -1404,6 +1404,33 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf97663)
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "y", 
"236");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf156269)
+{
+Primitive2DSequence aSequence = 
parseSvg(u"/svgio/qa/cppunit/data/tdf156269.svg");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(Primitive2DContainer(aSequence));
+
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "//textsimpleportion[@text='one']", "width", "16");
+assertXPath(pDocument, "//textsimpleportion[@text='one']", "height", "16");
+assertXPath(pDocument, "//textsimpleportion[@text='one']", "x", "10");
+assertXPath(pDocument, "//textsimpleportion[@text='one']", "y", "50");
+assertXPath(pDocument, "//textsimpleportion[@text='one']", "fontcolor", 
"#808080");
+
+assertXPath(pDocument, "//textsimpleportion[@text='two']", "width", "16");
+assertXPath(pDocument, "//textsimpleportion[@text='two']", "height", "16");
+
+// Without the fix in place, this test would have failed with
+// - Expected: 60
+// - Actual  : 10
+assertXPath(pDocument, "//textsimpleportion[@text='two']", "x", "60");
+assertXPath(pDocument, "//textsimpleportion[@text='two']", "y", "100");
+assertXPath(pDocument, "//textsimpleportion[@text='two']", "fontcolor", 
"#00");
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testTdf149880)
 {
 Primitive2DSequence aSequence = 
parseSvg(u"/svgio/qa/cppunit/data/tdf149880.svg");
diff --git a/svgio/qa/cppunit/data/tdf156269.svg 
b/svgio/qa/cppunit/data/tdf156269.svg
new file mode 100644
index ..e840b351d17d
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf156269.svg
@@ -0,0 +1,8 @@
+http://www.w3.org/2000/svg";>
+  
+  one
+
+  
+  two
+
+
diff --git a/svgio/source/svgreader/svgcharacternode.cxx 
b/svgio/source/svgreader/svgcharacternode.cxx
index 4ffc46a483db..e62d21528d96 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -645,23 +645,23 @@ namespace svgio::svgreader
 {
 maPosition.setX(pParent->getPosition().getX());
 }
+}
+
+const sal_uInt32 nSizeDx(rSvgTextPositions.getDx().size());
 
-const sal_uInt32 nSizeDx(rSvgTextPositions.getDx().size());
+if(nSizeDx)
+{
+// relative positions given, translate position derived from 
parent
+maPosition.setX(maPosition.getX() + 
rSvgTextPositions.getDx()[0].solve(rInfoProvider, NumberType::xcoordinate));
 
-if(nSizeDx)
+if(nSizeDx > 1)
 {
-// relative positions given, translate position derived 
from parent
-maPosition.setX(maPosition.getX() + 
rSvgTextPositions.getDx()[0].solve(rInfoProvider, NumberType::xcoordinate));
+// fill deltas to maX
+maX.reserve(nSizeDx);
 
-if(nSizeDx > 1)
+for(sal_uInt32 a(1); a < nSizeDx; a++)
 {
-// fill deltas to maX
-maX.reserve(nSizeDx);
-
-for(sal_uInt32 a(1); a < nSizeDx; a++)
-{
-
maX.push_back(rSvgTextPositions.getDx()[a].solve(rInfoProvider, 
NumberType::xcoordinate));
-}
+
maX.push_back(rSvgTextPositions.getDx()[a].solve(rInfoProvider, 
NumberType::xcoordinate));
 }
 }
 }
@@ -693,23 +693,23 @@ namespace svgio::svgreader
 {
 maPosition.setY(pParent->getPosition().getY());
 }
+}
+
+const sal_uInt32 nSizeDy(rSvgTextPositions.getDy().size());
 
-const sal_uInt32 nSizeDy(rSvgTextPositions.getDy().size());
+if(nSizeDy)
+{
+   

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

2023-07-13 Thread Andrea Gelmini (via logerrit)
 include/svx/svdpntv.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 99f5bf03caa2538ca79b04e7fd017cebfb4c7a95
Author: Andrea Gelmini 
AuthorDate: Wed Jul 12 23:38:47 2023 +0200
Commit: Julien Nabet 
CommitDate: Thu Jul 13 23:00:56 2023 +0200

Fix typo

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

diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 661c8e3b7406..bce1bd8bb881 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -193,7 +193,7 @@ protected:
 // -ViewContactOfGrid: the page's grid visualisation (foreground)
 // -ViewContactOfHelplines: the page's Helplines (foreground)
 // Note: background/foreground means that one is active, grid & helplines 
can be displayed in
-//   front of or behind obect visualisations/page content
+//   front of or behind object visualisations/page content
 bool mbPageDecorationAllowed : 1;
 
 // Allow MasterPage visualization, default is true


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

2023-07-13 Thread Andrea Gelmini (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 42f6dd4a22ed3c87ccd30b3e8007f4d614f86754
Author: Andrea Gelmini 
AuthorDate: Thu Jul 13 12:50:16 2023 +0200
Commit: Julien Nabet 
CommitDate: Thu Jul 13 23:00:24 2023 +0200

Fix typo

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

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
index 8c11e3db22c7..90181e5f9716 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
@@ -120,7 +120,7 @@ CPPUNIT_TEST_FIXTURE(Test, 
testDOCXFloatingTableHiddenAnchor)
 // Given a document with a floating table, anchored in a paragraph that is 
hidden:
 loadFromURL(u"floattable-hidden-anchor.docx");
 
-// When checking the visibility of the the anchor paragraph:
+// When checking the visibility of the anchor paragraph:
 uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
 uno::Reference 
xText(xTextDocument->getText(), uno::UNO_QUERY);
 uno::Reference xParagraphs = 
xText->createEnumeration();


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

2023-07-13 Thread Andrea Gelmini (via logerrit)
 wizards/source/scriptforge/SF_Region.xba |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b9addab4426745fa484f0012814699e31d5239b3
Author: Andrea Gelmini 
AuthorDate: Thu Jul 13 12:50:09 2023 +0200
Commit: Julien Nabet 
CommitDate: Thu Jul 13 22:59:54 2023 +0200

Fix typo

Change-Id: If127e00bab20839021afe82df555083bbae72ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154384
Reviewed-by: Jean-Pierre Ledure 
Tested-by: Julien Nabet 

diff --git a/wizards/source/scriptforge/SF_Region.xba 
b/wizards/source/scriptforge/SF_Region.xba
index d3eacfae0982..9ceccbbc94a6 100644
--- a/wizards/source/scriptforge/SF_Region.xba
+++ b/wizards/source/scriptforge/SF_Region.xba
@@ -549,7 +549,7 @@ Public Function UTCDateTime(Optional ByVal LocalDateTime As 
Variant _
 ''' Return:
 ''' The local time converted to the corresponding 
UTC date and time as a Date
 ''' If the returned value is before 1900, it is 
likely that the Locale is not recognized
-''' If the returned value matches the local time, 
it is likely that the the timezone is not recognized
+''' If the returned value matches the local time, 
it is likely that the timezone is not recognized
 ''' Examples:
 ''' regio.UTCDateTime(DateSerial(2022, 3, 20) + 
TimeSerial(17, 58, 17), "Europe/Brussels", "fr-BE")
 ''' '  2022-03-20 16:58:17
@@ -601,7 +601,7 @@ Public Function UTCNow(Optional ByVal TimeZone As Variant _
 ''' Return:
 ''' The actual UTC date and time as a Date
 ''' If the returned value is before 1900, it is 
likely that the Locale is not recognized
-''' If the returned value matches the local time, 
it is likely that the the timezone is not recognized
+''' If the returned value matches the local time, 
it is likely that the timezone is not recognized
 ''' Examples:
 ''' regio.UTCNow("Europe/Brussels", 
"fr-BE")'  2022-03-20 16:58:17
 
@@ -858,4 +858,4 @@ Finally:
 End Function   '  ScriptForge.SF_Region._PropertyGet
 
 REM  END OF 
SCRIPTFORGE.SF_REGION
-
\ No newline at end of file
+


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

2023-07-13 Thread Patrick Luby (via logerrit)
 fpicker/source/aqua/ControlHelper.hxx   |1 +
 fpicker/source/aqua/ControlHelper.mm|4 
 fpicker/source/aqua/resourceprovider.mm |1 +
 3 files changed, 6 insertions(+)

New commits:
commit 3c7b230910c95838d644d1d3971f2a656b64f635
Author: Patrick Luby 
AuthorDate: Thu Jul 13 13:41:17 2023 -0400
Commit: Patrick Luby 
CommitDate: Thu Jul 13 22:35:30 2023 +0200

tdf#155125 add "Encrypt with GPG key" checkbox in macOS native save dialog

Change-Id: I85cdf71c1beaef51e8c66e30aa5b0c7de5f4b72c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154396
Tested-by: Jenkins
Reviewed-by: Patrick Luby 

diff --git a/fpicker/source/aqua/ControlHelper.hxx 
b/fpicker/source/aqua/ControlHelper.hxx
index 5da540df61ec..ede5d0b0d574 100644
--- a/fpicker/source/aqua/ControlHelper.hxx
+++ b/fpicker/source/aqua/ControlHelper.hxx
@@ -69,6 +69,7 @@ public:
 enum ToggleType {
 AUTOEXTENSION, //but autoextension is handled differently on MacOSX
 PASSWORD,
+GPGENCRYPTION,
 FILTEROPTIONS,
 READONLY,
 LINK,
diff --git a/fpicker/source/aqua/ControlHelper.mm 
b/fpicker/source/aqua/ControlHelper.mm
index 88f0b655cb58..46c8c549035f 100644
--- a/fpicker/source/aqua/ControlHelper.mm
+++ b/fpicker/source/aqua/ControlHelper.mm
@@ -184,10 +184,12 @@ void ControlHelper::initialize( sal_Int16 nTemplateId )
 case FILESAVE_AUTOEXTENSION_PASSWORD:
 m_bToggleVisibility[AUTOEXTENSION] = true;
 m_bToggleVisibility[PASSWORD] = true;
+m_bToggleVisibility[GPGENCRYPTION] = true;
 break;
 case FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS:
 m_bToggleVisibility[AUTOEXTENSION] = true;
 m_bToggleVisibility[PASSWORD] = true;
+m_bToggleVisibility[GPGENCRYPTION] = true;
 m_bToggleVisibility[FILTEROPTIONS] = true;
 break;
 case FILESAVE_AUTOEXTENSION_SELECTION:
@@ -602,6 +604,7 @@ int ControlHelper::getControlElementName(const Class 
aClazz, const int nControlI
 switch (nControlId) {
 TOGGLE_ELEMENT( AUTOEXTENSION );
 TOGGLE_ELEMENT( PASSWORD );
+TOGGLE_ELEMENT( GPGENCRYPTION );
 TOGGLE_ELEMENT( FILTEROPTIONS );
 TOGGLE_ELEMENT( READONLY );
 TOGGLE_ELEMENT( LINK );
@@ -725,6 +728,7 @@ case ExtendedFilePickerElementIds::LISTBOX_##elem##_LABEL: \
 {
 MAP_TOGGLE( AUTOEXTENSION );
 MAP_TOGGLE( PASSWORD );
+MAP_TOGGLE( GPGENCRYPTION );
 MAP_TOGGLE( FILTEROPTIONS );
 MAP_TOGGLE( READONLY );
 MAP_TOGGLE( LINK );
diff --git a/fpicker/source/aqua/resourceprovider.mm 
b/fpicker/source/aqua/resourceprovider.mm
index 951833ae2714..e3aa23a6f64e 100644
--- a/fpicker/source/aqua/resourceprovider.mm
+++ b/fpicker/source/aqua/resourceprovider.mm
@@ -50,6 +50,7 @@ struct Entry
 Entry const CtrlIdToResIdTable[] = {
 { CHECKBOX_AUTOEXTENSION,   
STR_SVT_FILEPICKER_AUTO_EXTENSION },
 { CHECKBOX_PASSWORD,STR_SVT_FILEPICKER_PASSWORD },
+{ CHECKBOX_GPGENCRYPTION,   STR_SVT_FILEPICKER_GPGENCRYPT 
},
 { CHECKBOX_FILTEROPTIONS,   
STR_SVT_FILEPICKER_FILTER_OPTIONS },
 { CHECKBOX_READONLY,STR_SVT_FILEPICKER_READONLY },
 { CHECKBOX_LINK,
STR_SVT_FILEPICKER_INSERT_AS_LINK },


Re: LibreOffice Build failed on Debian-x86-32bit inside Module VCL

2023-07-13 Thread Andreas Mantke

Hi Michael,

thanks for your answer. I tried again with the latest patches from the
git repository. But it breaks again in the skia module yet.
(see my other mail to this list).

Thus I need to solve this issue, because the VCL module is currently not
build (it stops before in the skia module).

I will give feedback here once I got the skia issue fixed.

Regards,
Andreas

Am 13.07.23 um 08:31 schrieb Michael Weghorn:

On 2023-07-12 21:04, Andreas Mantke wrote:

I compiled LibreOffice on a Netbook with Debian-x86-32bit for a while
successful. I did this with success from the source repo some weeks ago
(before version 7.6 was tagged).

[...]

But yet I got a break inside the VCL module
Here is the output from my current build process:

[...]
error: no declaration matches ‘void AtkListener::handleChildAdded(const
com::sun::star::uno::Reference&,

const
com::sun::star::uno::Reference&,

sal_Int32)’
   164 | void AtkListener::handleChildAdded(
   |  ^~~
[...]


This sounds like the issue fixed by
https://git.libreoffice.org/core/commit/469fc646ec782f42e42947f480d5931b97e686ab

("gtk3 a11y: Use sal_Int32 consistently to fix i386 build").

Can you try again with current git master (or apply that commit)?


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



Re: Unsafe directory

2023-07-13 Thread Ralf Quint

On 7/13/2023 11:14 AM, Mike Kaganski wrote:

On 13.07.2023 21:09, Ralf Quint wrote:

On 7/13/2023 2:17 AM, Colomban Wendling wrote:


I'm not knowledgeable about Windows/CygWin, but I have two wild 
guesses:

- the directory name contains non-ASCII characters ("é")
- the directory name contains a space 


The space is most likely the key.

In this case, I am not so sure.


Both things are perfectly valid in Windows, though sometimes 
applications are not able to properly handle either.


Exactly that: not all are prepared for that, especially when the 
applications are not "for Windows"; even though these are also 
perfectly valid on ~all other platforms, there's a strong push-back to 
support them in development. 


Unfortunately, a lot of Linux/Unix folks think that they hold the one 
and only truth. And not everything in Windows is without reason and 
purpose and just needs to be denigrated.


The folder "\Users\User Name\" itself is not recommended to be written 
to (and I think if you do not have administrator rights, is even write 
protected). The proper space for applications under Windows, are either 
\Users\User Name\AppData", for user specific data as well as 
"\ProgramData", for program specific data (which could be shared between 
multiple users on the same host). Btw, both of those folders are by 
default set as "hidden"...



Ralf




Re: ESC meeting minutes: 2023-07-13

2023-07-13 Thread Roman Kuznetsov
>
>
>  Forwarded Message 
> Subject: ESC meeting minutes: 2023-07-13
> Date: Thu, 13 Jul 2023 16:51:16 +0200
> From: Miklos Vajna 
> To: libreoffice@lists.freedesktop.org
> CC: libreoffice...@lists.freedesktop.org, proje...@global.libreoffice.org
>
> * Present:
>  + Cloph, Gabriel, Heiko, Hossein, Ilmari, Michael W, Michael S,
> Regina, Stephan, Olivier, Eike, Xisco, Thorsten, Miklos, Tomaz, Khaled,
> Justin, Stephane
> ...
>
> * Change Skia/Raster to enabled by default (Roman)
>+ see https://gerrit.libreoffice.org/c/core/+/154322
>+ I think we should only make any such change on the release branch
> (Noel)
>+ it would be disappointing to degrade the skia support in LO (Hossein)
>  + but if nobody steps up to do the GPU-specific work...
>+ interested in svg-in-toolbars using skia (Hossein)
>  + the SVG icons are rasterized to PNGs on the fly (Ilmari)
>  + we have some kind of graphic tests that we could use to startup
> to detect if Skia can be safely turned on with Vulkan, but it needs some
> work (Tomaz)
>+ plan to progress with this, but low-priority
>+ but could be a solution long-term
>  + toolbar icons: all svgs are turned into png, exactly to help
> performance
>+ our svg import doesn't handle our small icons currently
>+ something to fix sooner or later
>+ if using Skia for SVG, then it has to be built everywhere,
> currently it's OK to disable it at build-time
>+ the Debian maintainer is rather unimpressed by Skia (Michael S)
>+ Current implementation is 10 times slower compared to Skia
> (Hossein)
>  + hope to have tenders to move this forward
>+ svg icons was already a motivation for tendering (Tomaz)
>  + would also improve svg import
> 
>

Hi all. Unfortunately I don't see any AI about Skia/Raster enabled by
default in the minutes. Was it there?
-- 
Best regards
Roman Kuznetsov


Re: Unsafe directory

2023-07-13 Thread Mike Kaganski

On 13.07.2023 21:09, Ralf Quint wrote:

On 7/13/2023 2:17 AM, Colomban Wendling wrote:


I'm not knowledgeable about Windows/CygWin, but I have two wild guesses:
- the directory name contains non-ASCII characters ("é")
- the directory name contains a space 


The space is most likely the key.

Both things are perfectly valid in Windows, though sometimes 
applications are not able to properly handle either.


Exactly that: not all are prepared for that, especially when the 
applications are not "for Windows"; even though these are also perfectly 
valid on ~all other platforms, there's a strong push-back to support 
them in development.


The problem is more likely that the initial "/home/Régis Perdreau" 
folder has been mapped in his cygwin installation to a non-writeable 
folder in Windows (or not recommended to be written to by applications).
Windows and Linux/Unix (and in extension macOS) simply have different 
convention for these kind of things. And using something like cygwin 
unfortunately seems to be masking those conventions in unfavorable ways...


No. And the problem here is that Libassuan uses home directory for 
unclear reason, which is neither source directory (which is 
C:/sources/libo-core/), nor work directory (which is 
C:/sources/libo-core/workdir), nor a temp directory (I hope); and fails 
on the space there in the name.


--
Best regards,
Mike Kaganski



Re: Unsafe directory

2023-07-13 Thread Ralf Quint

On 7/13/2023 2:17 AM, Colomban Wendling wrote:


I'm not knowledgeable about Windows/CygWin, but I have two wild guesses:
- the directory name contains non-ASCII characters ("é")
- the directory name contains a space 


Both things are perfectly valid in Windows, though sometimes 
applications are not able to properly handle either.


The problem is more likely that the initial "/home/Régis Perdreau" 
folder has been mapped in his cygwin installation to a non-writeable 
folder in Windows (or not recommended to be written to by applications).
Windows and Linux/Unix (and in extension macOS) simply have different 
convention for these kind of things. And using something like cygwin 
unfortunately seems to be masking those conventions in unfavorable ways...



Ralf




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

2023-07-13 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/uiview/viewtab.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit bfa25258d21430560584e3265cdd4629ee47a1b8
Author: Mike Kaganski 
AuthorDate: Thu Jul 13 17:58:07 2023 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jul 13 20:05:25 2023 +0200

tdf#154035: use correct Which range including the new WIDs

After commit db115bec9254417ef7a3faf687478fe5424ab378 (tdf#78510 sw,cui:
split SvxLRSpaceItem for SwTextNode, SwTextFormatColl, 2023-02-24),
aCoreSet is now querying RES_MARGIN_FIRSTLINE, RES_MARGIN_TEXTLEFT,
RES_MARGIN_RIGHT instead of RES_LR_SPACE. Without the fix, it would
return wrong state, and disable the respective item in the cases of
SID_ATTR_TABSTOP_VERTICAL / RES_PARATR_TABSTOP, which disabled the
ruler.

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

diff --git a/sw/source/uibase/uiview/viewtab.cxx 
b/sw/source/uibase/uiview/viewtab.cxx
index d99e27f7fb58..26bfba7b8b18 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1401,8 +1401,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
 SwapPageMargin( rDesc, aPageLRSpace );
 
 SfxItemSetFixed  aCoreSet( GetPool() );
-// get also the list level indent values merged as LR-SPACE item, if 
needed.
+RES_MARGIN_FIRSTLINE, RES_MARGIN_RIGHT,
+RES_UL_SPACE, RES_UL_SPACE>  aCoreSet( GetPool() );
+// get also the list level indent values, if needed.
 rSh.GetCurAttr( aCoreSet, true );
 const SelectionType nSelType = rSh.GetSelectionType();
 


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

2023-07-13 Thread Rico Tzschichholz (via logerrit)
 vcl/inc/TextLayoutCache.hxx|2 +-
 vcl/source/gdi/CommonSalLayout.cxx |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 55d62057c0ccd533af63b2a01edb0cddbd619721
Author: Rico Tzschichholz 
AuthorDate: Sun Apr 2 11:15:11 2023 +0200
Commit: خالد حسني 
CommitDate: Thu Jul 13 18:24:39 2023 +0200

vcl: Move include of  to the appropriate place

hb_icu_script_to_script is used in CommonSalLayout.cxx only

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

diff --git a/vcl/inc/TextLayoutCache.hxx b/vcl/inc/TextLayoutCache.hxx
index 46e5c80dc320..304c6d51ebfb 100644
--- a/vcl/inc/TextLayoutCache.hxx
+++ b/vcl/inc/TextLayoutCache.hxx
@@ -25,7 +25,7 @@
 
 #include 
 
-#include 
+#include 
 
 #include 
 
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 324b6fb48b07..c3b8fab84595 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 


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

2023-07-13 Thread Noel Grandin (via logerrit)
 include/vcl/imap.hxx |2 +-
 svx/source/sdr/misc/ImageMapInfo.cxx |   16 
 sw/source/core/layout/atrfrm.cxx |3 +--
 vcl/source/treelist/imap.cxx |2 +-
 4 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit ef609a580b3e1de7c39ef391bb5df92680a22f36
Author: Noel Grandin 
AuthorDate: Thu Jul 13 11:54:41 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 13 17:58:34 2023 +0200

ImageMap::GetHitIMapObject can be const

which removes an unnecessary const_cast

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

diff --git a/include/vcl/imap.hxx b/include/vcl/imap.hxx
index 6245d2928802..8a34ad1bf7d1 100644
--- a/include/vcl/imap.hxx
+++ b/include/vcl/imap.hxx
@@ -95,7 +95,7 @@ public:
 IMapObject* GetHitIMapObject( const Size& rOriginalSize,
   const Size& rDisplaySize,
   const Point& rRelHitPoint,
-  sal_uLong nFlags = 0 );
+  sal_uLong nFlags = 0 ) const;
 
 // returns the total amount of IMap objects
 size_t  GetIMapObjectCount() const { return maList.size(); }
diff --git a/svx/source/sdr/misc/ImageMapInfo.cxx 
b/svx/source/sdr/misc/ImageMapInfo.cxx
index 1d5600810f09..ac141d253d8b 100644
--- a/svx/source/sdr/misc/ImageMapInfo.cxx
+++ b/svx/source/sdr/misc/ImageMapInfo.cxx
@@ -57,7 +57,7 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* 
pObj, const Point& rW
 const MapMode aMap100(MapUnit::Map100thMM);
 Size aGraphSize;
 Point aRelPoint(rWinPoint);
-ImageMap& rImageMap = const_cast(pIMapInfo->GetImageMap());
+const ImageMap& rImageMap = pIMapInfo->GetImageMap();
 tools::Rectangle aRect = pObj->GetLogicRect();
 
 if (pCmpWnd)
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 596ae8d93fe4..c6b975827737 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3591,8 +3591,7 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& 
rPoint,
 nFlags = IMAP_MIRROR_HORZ;
 
 }
-return const_cast(rURL.GetMap())->GetHitIMapObject( aOrigSz,
-aActSz, aPos, nFlags );
+return rURL.GetMap()->GetHitIMapObject( aOrigSz, aActSz, aPos, nFlags 
);
 }
 
 return nullptr;
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 5c3b5b0b252a..ba29af020261 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -771,7 +771,7 @@ void ImageMap::InsertIMapObject( 
std::unique_ptr pNewObject )
 IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
 const Size& rDisplaySize,
 const Point& rRelHitPoint,
-sal_uLong nFlags )
+sal_uLong nFlags ) const
 {
 Point aRelPoint( rTotalSize.Width() * rRelHitPoint.X() / 
rDisplaySize.Width(),
  rTotalSize.Height() * rRelHitPoint.Y() / 
rDisplaySize.Height() );
commit deb9236d71dddbda6517bdc3a6f0911d38a77113
Author: Noel Grandin 
AuthorDate: Thu Jul 13 11:52:28 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 13 17:58:23 2023 +0200

remove very dodgy const_cast in SvxIMapInfo::GetHitIMapObject

This code has been here since
commit 8a6861a404c082226b52df335e3b0046164e6432
Author: Jens-Heiner Rechtien 
Date:   Mon Sep 18 23:16:46 2000 +
initial import

but it really does not seem likely that it actually wants to update the
internal LogicRect of the svx object.

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

diff --git a/svx/source/sdr/misc/ImageMapInfo.cxx 
b/svx/source/sdr/misc/ImageMapInfo.cxx
index a37e65247815..1d5600810f09 100644
--- a/svx/source/sdr/misc/ImageMapInfo.cxx
+++ b/svx/source/sdr/misc/ImageMapInfo.cxx
@@ -58,13 +58,13 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* 
pObj, const Point& rW
 Size aGraphSize;
 Point aRelPoint(rWinPoint);
 ImageMap& rImageMap = const_cast(pIMapInfo->GetImageMap());
-tools::Rectangle& rRect = 
const_cast(pObj->GetLogicRect());
+tools::Rectangle aRect = pObj->GetLogicRect();
 
 if (pCmpWnd)
 {
 MapMode aWndMode = pCmpWnd->GetMapMode();
 aRelPoint = pCmpWnd->LogicToLogic(rWinPoint, &aWndMode, &aMap100);
-rRect = pCmpWnd->LogicToLogic(pObj->GetLogicRect(), &aWndMode, 
&aMap100);
+

Re: ESC meeting agenda: 2023-07-13 16:00 CEST

2023-07-13 Thread Ilmari Lauhakangas

On 13.7.2023 2.24, Regina Henschel wrote:

Hi,

I suggest item: Preparations for the tenders for the 2024 budget

I would like to discuss these points:
(1) Will the ESC work again with a Wiki page like 
https://wiki.documentfoundation.org/Development/Budget2023 ?
If yes, can we please get that page as soon as possible? Who does it? 
Otherwise how to collect proposals?


(2) There was the idea of having more detailed descriptions. How long? 
What must it contain, what should it contain? If there will be a Wiki 
page, its structure somehow needs to consider longer texts.


(3) Is there already a decision which items of the ESC list of this year 
will not get a tender from the budget 2023?


I want to suggest some ODF related items. Because I'm not able to 
estimate the effort, I would like to start early so that there is enough 
time for others to (hopefully) help me in that point.


Page created: https://wiki.documentfoundation.org/Development/Budget2024

For improving the workflow, let's keep our thinking hats on for a while. 
In any case TDF staff should reach out to the original submitters of 
reasonable ideas with insufficient descriptions that have been lingering 
in the budget pages and encourage improving them.


Ilmari


ESC meeting minutes: 2023-07-13

2023-07-13 Thread Miklos Vajna

* Present:
+ Cloph, Gabriel, Heiko, Hossein, Ilmari, Michael W, Michael S, Regina, 
Stephan, Olivier, Eike, Xisco, Thorsten, Miklos, Tomaz, Khaled, Justin, Stephane

* Completed Action Items:

* Pending Action Items:

* Release Engineering update (Cloph)
+ 7.6 status: rc2 in 2 weeks
  + 1 review on libreoffice-7-6 is needed
  + libreoffice-7-6-0 will be created for rc2
+ 7.5 status: 7.5.5 rc2 was tagged yesterday, builds are in progress
+ replacement of the baseline:
+ AlmaLinux 8, expect support till 2029
+ also has the devtoolset equivalent
+ benefit: supported by cloud hosters + WSL
+ setting up environment
+ plan to switch baseline to this on master soon
+ this way bumping the compiler won't affect the runtime
+ can't install centos7 on modern HW / beefy machines, need to update
+ sounds fine (Stephan)
+ no objections for any centos-like flavors (Thorsten)
+ alternative: RockyLinux

* Documentation (Olivier)
+ Helpcontents2
   + Fixes (ohallot)
+ Guides
   + assembling the Getting Started Guide 7.5 (ohallot)
   + Prep'ing 7.6 Guides (J. Weber)
 + release notes for 7.6 is appreciated, that's the starting point for 
documentation
 + no 24.2 release notes pages yet (Justin)
AI: create the page (Ilmari)
Created: https://wiki.documentfoundation.org/ReleaseNotes/24.2 (Ilmari)
+ Bugzilla Documentation statistics
274(274) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 6(1) 32(4)  76(-6) 295(-4)
 commented 8(7) 68(1) 182(-15)   1003(-6)
  resolved 1(1)  6(1)  27(-4) 160(-5)
+ top 10 contributors:
  Stéphane Guillou made 51 changes in 1 month, and 270 changes in 1 year
  Olivier Hallot made 27 changes in 1 month, and 473 changes in 1 year
  Seth Chaiklin made 12 changes in 1 month, and 293 changes in 1 year
  Kaganski, Mike made 7 changes in 1 month, and 102 changes in 1 year
  Nabet, Julien made 6 changes in 1 month, and 23 changes in 1 year
  Alex Thurgood made 4 changes in 1 month, and 6 changes in 1 year
  Leroy made 3 changes in 1 month, and 3 changes in 1 year
  *UNKNOWN* made 3 changes in 1 month, and 3 changes in 1 year
  Eyal Rozenberg made 2 changes in 1 month, and 15 changes in 1 year
  Heiko Tietze made 2 changes in 1 month, and 108 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
269(269) (topicUI) bugs open, 71(71) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
 added  9(4) 21(3) 33(3)   63(3)
 commented 89(43)   244(37)   828(3) 2477(28)
   removed  0(0)  1(0)  8(-1)  28(-1)
  resolved 10(8) 29(8)107(6)  317(1)
+ top 10 contributors:
  Heiko Tietze made 110 changes in 1 month, and 1472 changes in 1 year
  Stéphane Guillou made 67 changes in 1 month, and 410 changes in 1 year
  Eyal Rozenberg made 64 changes in 1 month, and 313 changes in 1 year
  Vernon, Stuart Foote made 51 changes in 1 month, and 416 changes in 1 
year
  Kaganski, Mike made 43 changes in 1 month, and 161 changes in 1 year
  Justin Luth made 32 changes in 1 month, and 81 changes in 1 year
  ady made 23 changes in 1 month, and 68 changes in 1 year
  Ilmari Lauhakangas made 21 changes in 1 month, and 221 changes in 1 
year
  Dieter made 18 changes in 1 month, and 262 changes in 1 year
  Hossein made 9 changes in 1 month, and 64 changes in 1 year
+ [Bug 156227] Get Rid of the Red Background Color in Find Box
+ [Bug 114452] The "increase indent" icon has no effect after reaching
   cell border in CALC
+ [Bug 147388] Cell cursor should take cell border width into account
+ [Bug 156053] CTRL + MouseWheel should target cursor location
+ [Bug 156073] Bullets and Numbering Dialog: Improve preview and include
   a double-digit number
+ [Bug 156195] Support ODP -> ODG conversion on export, not just import
+ [Bug 100379] Impress pretends to be able to export to ODF Drawing format
   - but doesn't really
+ [Bug 156188] Add Favorites section to Formula Editor
+ [Bug 156193] Need to distinguish between intent of inserting a shape once
   and multiple times
+ [Bug 153994] Sidebar character deck/tab shows Western font with no excuse
+ [Bug 156192] Animation deck 'Play' button should be positioned to lead 
edge
   of deck, so always visible
 -> + [Bug 156182] FORMATTING Automatic text color can be unreadable with darker
  cell colors
  + new threshold for isDark() in 
https://gerrit.libreoffice.org/c/core/+/154352
  + calcul

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

2023-07-13 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx |2 +-
 cui/uiconfig/ui/optsavepage.ui |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5eae366cbdfb4c2e9f7a9b88257d12c400831456
Author: Justin Luth 
AuthorDate: Thu Jul 13 07:57:29 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 13 16:45:48 2023 +0200

tdf#65509 - re-make visible userautosave config option

This reverts LO 5.0 commit 4653c91a89cfe802754377bcdafc291526254a03

It was hidden because the feature didn't work well.
Many of the "stumbling blocks" have been removed since version 5,
and many people - especially in this age of web apps - expect
a program to automatically take care of saving their documents.
So make the option visible again.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c35da388ebf9..2772c6d60944 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -290,7 +290,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxBoolItem( SID_ATTR_USERAUTOSAVE,
m_xUserAutoSaveCB->get_active() ) );
-bModified = true;
+bModified = bRequestRestart = true;
 }
 // save relatively
 if ( m_xRelativeFsysCB->get_state_changed_from_saved() )
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index 82c9910dcf72..5e93c38a5856 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -182,6 +182,7 @@
 
   
 Automatically save the document 
too
+True
 True
 False
 12


Minutes from the UX/design meeting 2023-Jul-13

2023-07-13 Thread Heiko Tietze

Present: Hossein, Cor, Heiko
Comments: Stuart, Stephane, Shu, Eyal, David


Tickets/Topics

 * Removing "contextual groups" from the list of NB variants
   + Justin resolved some related tickets as WF/WFM
   + https://wiki.documentfoundation.org/Design/Guidelines/ToolBar
   + 
https://design.blog.documentfoundation.org/2016/12/21/evolving-past-the-restrictions-of-toolbars/.

   + pro removing: experimental state for long, some effort needed
   + con: would be a pity to just follow what others do
   + too many UI options anyway (Hossein)
 + unfortunately we do not have the manpower to improve these ideas
   + we have this ticket somewhere (Heiko)

 * Add an "all pages" view mode to Draw to scroll through all pages
   in canvas (without needing Page Pane)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=156087
   + similar to Writer's multiple-page view; expected by many
 users (Stephane, Shu)
 + Impress has the Slide Sorter in an extra view mode
   + Draw is not a PDF viewer, WF (Stuart)
   + missing function (Shu)
   + Draw is not meant to show multi-page documents,
 dup of bug 141732 or invalid (Eyal)
   => resolve WF

 * Rename "rotation object" to "solid of revolution"
   + https://bugs.documentfoundation.org/show_bug.cgi?id=156099
   + https://en.wikipedia.org/wiki/Solid_of_revolution (Tuomas)
   + ODF defines "a three-dimensional rotation shape based on the
 given polygon"; the more convoluted "solid of revolution" while
 lexically correct adds nothing to the UI or the UX (Stuart)
   => resolve NAB

 * Support distinction rather than override of conflicting
   subdocument styles
   + https://bugs.documentfoundation.org/show_bug.cgi?id=155740
   + unclear use case (David)
   + some confirmation per document (Shu)
 + if we better go with a global master switch (Heiko)
   + master documents are a special workflow aiming for style
 consistency, WF (Mike, Hossein)
   + unclear use case (David)
   + copy/paste could solve alternative workflows (Shu)
   => resolve WF

 * When setting the Heading/Outline Numbering for a level to "None",
   still getting separators
   + https://bugs.documentfoundation.org/show_bug.cgi?id=156089
   + works like in MSO, WF (Justin)
   + no reason to block, WF (Heiko)
   + asking to _clear_ the separator fields in case of None (Eyal)
 + remembering "Chapter/:" is not a (good) solution since users may
   change it for None into "-/>", or the like, making it very
   difficult to follow
   + behavior existing for years shouldn't change without
 good reasons (Hossein)
   + list style is something you shouldn't change multiple times
   => resolve WF

 * Autocorrect replaces " - " with " – " instead of " — "
   (en-dash instead of em-dash)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=156046
   + maybe drop the conversion of single hyphen (Stuart)
   + typically two hyphen is an EN-dash, three EM (Heiko)
   + two dashes with / without spaces is kind of standard and
 working like this in MSO (Hossein)
   + clearly described in 
https://help.libreoffice.org/latest/en-US/text/shared/01/06040100.html

   + two dashes without spaces like 1--2 is not correctly
 converted (Heiko)
   => bug; do not change the behavior as described in the help


OpenPGP_0xA68C0CA5EEA5F466.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Bringing multi-page floating tables to ODF

2023-07-13 Thread Mike Kaganski
I forgot to mention, that the feature that Miklos proposes can handle a 
situation when there's nothing on a given page, except for an 
intermediate part of this frame; in this case, a text box substituting 
this part of the frame would have no anchor opportunity, except for "to 
page", which would make the chain have not only different anchor points, 
but also different *anchor types*. It all would become only more 
complex, when additional factors and corner cases will be taken into 
account, in order to fit a "single contiguous object" concept into 
"chain of separate linked objects" existing feature.


--
Best regards,
Mike Kaganski



Re: Bringing multi-page floating tables to ODF

2023-07-13 Thread Mike Kaganski

Hi Regina!

On 12.07.2023 18:29, Regina Henschel wrote:

Miklos Vajna schrieb am 12.07.2023 um 15:46:

I attach a simple proposal to have a new optional boolean attribute, so
that it's possible to represent multi-page floating tables in ODF.

Could you please file an OASIS issue for me? I can't do that myself.

If there are any concerns, then I guess this list is the best place to
discuss that.


I think a new attribute in ODF is not needed. The desired layout of 
having a table in a text box which goes over several pages can already 
be written by using a chain of text boxes. Such chain is generated by 
the attribute draw:chain-next-name of the  elements.


Using a chain of text boxes has the advantage, that the solution exists 
since 1.1 and therefore is highly backward compatible and interoperable.


LibreOffice could detect the situation on import, that the chained text 
boxes contain only the parts of the same one table, and import it into 
an internal representation, that is designed for a good export to Word.


I'm afraid that a chain of text boxes is not a proper substitute for 
this feature.


A chain of linked text boxes is a fixed set of objects, each with own 
position; and own anchor (which is important), which is set in every 
place where this box should appear. These objects may have a common 
content (which flows from one of them to another), but the objects 
themselves are separate.


On the other hand, the feature that Miklos is talking about is a single 
entity, a frame that has only a single anchor, a single position/size 
definition, and which positions itself on as many pages as needed to fit 
its content, dynamically, where all the following parts of the frame on 
the next pages are not separate objects, but the same initial object.


This is similar to e.g. tables, or sections: you may have a *single* 
table, with arbitrarily large content; it will flow on to the next 
pages, but every next page's part of the table is not a separate table, 
but the same initial one. And it will re-arrange its layout on pages 
dynamically, when you resize pages, or add more content above. It will 
use its width and alignment when flowing to next pages.


Storing the chain of boxes would mean storing artificial objects in the 
document; their position would reflect not the *content* of the document 
(its semantics), but the actual layout on a specific system, that split 
the whole frame into specifically positioned pieces; this could be 
indeed different on a different system - say, where fonts are absent, 
which made substituted fonts to change the layout. The code would still 
need to disambiguate a proper chain of boxes (where user explicitly 
created such a chain, positioning the boxes arbitrarily) from the 
automatically layouted case, where these artifacts are actually one 
object - and that would also need introduction of a new attribute, which 
would defeat the intention to not extend the standard, but will fail to 
express the semantics of the new feature.


Hope this helps to avoid a confusion :)
Thank you!

--
Best regards,
Mike Kaganski



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

2023-07-13 Thread Tomaž Vajngerl (via logerrit)
 basegfx/source/tools/canvastools.cxx   |   12 -
 canvas/source/cairo/cairo_canvasbitmap.cxx |4 
 canvas/source/cairo/cairo_canvashelper.cxx |   12 -
 canvas/source/cairo/cairo_devicehelper.cxx |   10 -
 canvas/source/cairo/cairo_spritecanvashelper.cxx   |   28 +--
 canvas/source/cairo/cairo_spritedevicehelper.cxx   |6 
 canvas/source/directx/dx_9rm.cxx   |   92 
--
 canvas/source/directx/dx_bitmap.cxx|   18 -
 canvas/source/directx/dx_bitmap.hxx|   10 -
 canvas/source/directx/dx_bitmapcanvashelper.cxx|1 
 canvas/source/directx/dx_canvasbitmap.cxx  |   42 ++--
 canvas/source/directx/dx_canvascustomsprite.cxx|2 
 canvas/source/directx/dx_canvashelper.cxx  |4 
 canvas/source/directx/dx_ibitmap.hxx   |2 
 canvas/source/directx/dx_rendermodule.hxx  |2 
 canvas/source/directx/dx_spritedevicehelper.cxx|2 
 canvas/source/directx/dx_surfacebitmap.cxx |   52 ++---
 canvas/source/directx/dx_surfacebitmap.hxx |8 
 canvas/source/directx/dx_textlayout_drawhelper.cxx |4 
 canvas/source/tools/page.cxx   |   11 -
 canvas/source/tools/page.hxx   |3 
 canvas/source/tools/pagemanager.cxx|7 
 canvas/source/tools/surface.cxx|   36 +--
 canvas/source/tools/surfaceproxy.cxx   |   16 -
 canvas/source/tools/surfacerect.hxx|   16 -
 include/basegfx/tuple/Size2D.hxx   |2 
 include/basegfx/utils/canvastools.hxx  |5 
 include/basegfx/vector/b2dsize.hxx |   12 +
 include/basegfx/vector/b2isize.hxx |   38 +++-
 include/vcl/outdev.hxx |2 
 slideshow/source/engine/slide/slideimpl.cxx|   11 -
 slideshow/source/engine/slideshowimpl.cxx  |5 
 slideshow/source/engine/tools.cxx  |8 
 slideshow/source/engine/transitions/combtransition.cxx |4 
 slideshow/source/engine/transitions/slidechangebase.cxx|   20 +-
 slideshow/source/engine/transitions/slidetransitionfactory.cxx |6 
 slideshow/source/inc/tools.hxx |2 
 37 files changed, 271 insertions(+), 244 deletions(-)

New commits:
commit f896bbcffeccd27248f908d2628d03dddf83ea94
Author: Tomaž Vajngerl 
AuthorDate: Wed Sep 21 12:17:00 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Jul 13 13:19:00 2023 +0200

basegfx: replace typedef with a class B2ISize based on Size2D

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

diff --git a/basegfx/source/tools/canvastools.cxx 
b/basegfx/source/tools/canvastools.cxx
index d388356199a2..70f4787710ad 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -427,16 +428,15 @@ namespace basegfx::unotools
 rRect.Z2);
 }
 
-geometry::IntegerSize2D integerSize2DFromB2ISize( const 
::basegfx::B2IVector& rSize )
+geometry::IntegerSize2D integerSize2DFromB2ISize( const 
::basegfx::B2ISize& rSize )
 {
-return geometry::IntegerSize2D( rSize.getX(),
-rSize.getY() );
+return geometry::IntegerSize2D( rSize.getWidth(),
+rSize.getHeight() );
 }
 
-::basegfx::B2IVector b2ISizeFromIntegerSize2D( const 
geometry::IntegerSize2D& rSize )
+basegfx::B2ISize b2ISizeFromIntegerSize2D( const 
geometry::IntegerSize2D& rSize )
 {
-return ::basegfx::B2IVector( rSize.Width,
- rSize.Height );
+return basegfx::B2ISize(rSize.Width, rSize.Height);
 }
 
 ::basegfx::B2IRange b2IRectangleFromIntegerRectangle2D( const 
geometry::IntegerRectangle2D& rRectangle )
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx 
b/canvas/source/cairo/cairo_canvasbitmap.cxx
index ebf4f26c5321..9f18be80824a 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -48,7 +48,7 @@ namespace cairocanvas
 
 SAL_INFO(
 "canvas.cairo",
-"bitmap size: " << rSize.getX() << "x" << rSize

Re: Unsafe directory

2023-07-13 Thread Regis Perdreau
Hi Colomban,

I have set HOME to /tmp/mydir, it works.
Tks a lot.

Régis Perdreau



Le jeu. 13 juil. 2023 à 11:18, Colomban Wendling  a
écrit :

> Hello Régis,
>
> Le 13/07/2023 à 09:00, Regis Perdreau a écrit :
> > I'm trying to build master under Windows 11/cygwin.
> > Build failed with the message "autogen.sh: unsafe home directory:
> > `/home/Régis Perdreau"
>
> I'm not knowledgeable about Windows/CygWin, but I have two wild guesses:
> - the directory name contains non-ASCII characters ("é")
> - the directory name contains a space
>
> If it's anything like gnupg, it's likely the space (see the hardly
> readable check in https://github.com/gpg/gnupg/blob/master/autogen.sh#L127
> )
>
> You probably can work around this by either actually changing CygWin's
> homedir, or just adjust $HOME to point to some directory without those
> characters (e.g. HOME=/tmp/homedir, or anything less temporary yet still
> without spaces).
>
> HTH
> - Colomban
>


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

2023-07-13 Thread Szymon Kłos (via logerrit)
 desktop/source/lib/init.cxx   |   57 +++---
 include/tools/json_writer.hxx |2 +
 tools/source/misc/json_writer.cxx |   20 +
 3 files changed, 39 insertions(+), 40 deletions(-)

New commits:
commit 6086d896183a529d4a0b83d4862970c8f320b0aa
Author: Szymon Kłos 
AuthorDate: Thu May 18 15:00:38 2023 +0200
Commit: Szymon Kłos 
CommitDate: Thu Jul 13 12:17:36 2023 +0200

linking: api: use JsonWriter

Change-Id: If5bf1897f1aef8db1672789cbee14b90cb96dc08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151959
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154378
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 99ba738c17d5..8d830c0cbd00 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -410,7 +410,7 @@ std::vector 
desktop::jsonToPropertyValuesVector(const char
 return aArguments;
 }
 
-static bool extractLinks(const uno::Reference< container::XNameAccess >& 
xLinks, bool subcontent, OUStringBuffer& jsonText)
+static void extractLinks(const uno::Reference< container::XNameAccess >& 
xLinks, bool subcontent, tools::JsonWriter& aJson)
 {
 const uno::Sequence< OUString > aNames( xLinks->getElementNames() );
 
@@ -451,47 +451,27 @@ static bool extractLinks(const uno::Reference< 
container::XNameAccess >& xLinks,
 
 if (subcontent)
 {
-jsonText.append("\"");
-jsonText.append(aStrDisplayname);
-jsonText.append("\": \"");
-jsonText.append(aLink);
-jsonText.append("\"");
-if (i < nLinks-1)
-{
-jsonText.append(", ");
-}
+aJson.put(aStrDisplayname, aLink);
 }
 else
 {
 uno::Reference< lang::XServiceInfo > xSI( xTarget, 
uno::UNO_QUERY );
 bIsTarget = xSI->supportsService( aProp_LinkTarget );
-if (i != 0)
-{
-if (!bIsTarget)
-jsonText.append("}");
-if (i < nLinks)
-{
-jsonText.append(", ");
-}
-}
-jsonText.append("\"");
-jsonText.append(aStrDisplayname);
-jsonText.append("\": ");
 
 if (bIsTarget)
 {
-jsonText.append("\"");
-jsonText.append(aLink);
-jsonText.append("\"");
+aJson.put(aStrDisplayname, aLink);
 continue;
 }
-jsonText.append("{");
-}
+else
+{
+std::unique_ptr 
pName(convertOUString(aStrDisplayname));
+auto aNode = aJson.startNode(pName.get());
 
-uno::Reference< document::XLinkTargetSupplier > xLTS( xTarget, 
uno::UNO_QUERY );
-if( xLTS.is() )
-{
-extractLinks(xLTS->getLinks(), true, jsonText);
+uno::Reference< document::XLinkTargetSupplier > xLTS( 
xTarget, uno::UNO_QUERY );
+if( xLTS.is() )
+extractLinks(xLTS->getLinks(), true, aJson);
+}
 }
 }
 catch(...)
@@ -500,7 +480,6 @@ static bool extractLinks(const uno::Reference< 
container::XNameAccess >& xLinks,
 }
 }
 }
-return bIsTarget;
 }
 
 static void unoAnyToJson(tools::JsonWriter& rJson, std::string_view pNodeName, 
const uno::Any& anyItem)
@@ -3145,14 +3124,12 @@ static char* lo_extractRequest(LibreOfficeKit* 
/*pThis*/, const char* pFilePath)
 
 if( xLTS.is() )
 {
-OUStringBuffer jsonText("{ \"Targets\": { ");
-bool lastParentheses = extractLinks(xLTS->getLinks(), 
false, jsonText);
-jsonText.append("} }");
-if (!lastParentheses)
-jsonText.append(" }");
-
-OUString res(jsonText.makeStringAndClear());
-return convertOUString(res);
+tools::JsonWriter aJson;
+{
+auto aNode = aJson.startNode("Targets");
+extractLinks(xLTS->getLinks(), false, aJson);
+}
+return strdup(aJson.finishAndGetAsOString().getStr());
 }
 xComp->dispose();
 }
diff --git a/include/tools/jso

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

2023-07-13 Thread Xisco Fauli (via logerrit)
 svgio/inc/svgcharacternode.hxx|6 +++
 svgio/inc/svgtools.hxx|1 
 svgio/qa/cppunit/SvgImportTest.cxx|   23 +++
 svgio/qa/cppunit/data/tdf156251.svg   |   17 
 svgio/source/svgreader/svgcharacternode.cxx   |   17 
 svgio/source/svgreader/svgdocumenthandler.cxx |   50 +++---
 svgio/source/svgreader/svgtools.cxx   |   16 
 7 files changed, 107 insertions(+), 23 deletions(-)

New commits:
commit f0e825382a76d685998be702ed551a00b73476a5
Author: Xisco Fauli 
AuthorDate: Wed Jul 12 17:46:01 2023 +0200
Commit: Michael Stahl 
CommitDate: Thu Jul 13 12:02:11 2023 +0200

tdf#156251: Add gap between text elements when needed

Partially revert a42f5faac7c6d4590e632cf40e3ba9eb618e6f56
"tdf#103888: Do not add a gap at the end of each text portion"
and adapt code to keep tdf#103888 fixed

Change-Id: I4b3f1ff7d87b1945233d9b05824d58af1e001d65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154364
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 5079e7937ef471a44dcf119dc6ae0a334d9c6adc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154327
Reviewed-by: Michael Stahl 

diff --git a/svgio/inc/svgcharacternode.hxx b/svgio/inc/svgcharacternode.hxx
index 738ddf4d9e73..5fad2008ba1c 100644
--- a/svgio/inc/svgcharacternode.hxx
+++ b/svgio/inc/svgcharacternode.hxx
@@ -122,6 +122,9 @@ namespace svgio::svgreader
 /// the string data
 OUString   maText;
 
+// keep a copy of string data before space handling
+OUString   maTextBeforeSpaceHandling;
+
 /// local helpers
 rtl::Reference 
createSimpleTextPrimitive(
 SvgTextPosition& rSvgTextPosition,
@@ -141,10 +144,13 @@ namespace svgio::svgreader
 virtual const SvgStyleAttributes* getSvgStyleAttributes() const 
override;
 void 
decomposeText(drawinglayer::primitive2d::Primitive2DContainer& rTarget, 
SvgTextPosition& rSvgTextPosition) const;
 void whiteSpaceHandling();
+void addGap();
 void concatenate(std::u16string_view rText);
 
 /// Text content
 const OUString& getText() const { return maText; }
+
+const OUString& getTextBeforeSpaceHandling() const { return 
maTextBeforeSpaceHandling; }
 };
 
 } // end of namespace svgio::svgreader
diff --git a/svgio/inc/svgtools.hxx b/svgio/inc/svgtools.hxx
index fd9bdd396d9d..a21cf86c2606 100644
--- a/svgio/inc/svgtools.hxx
+++ b/svgio/inc/svgtools.hxx
@@ -126,7 +126,6 @@ namespace svgio::svgreader
 void readImageLink(const OUString& rCandidate, OUString& rXLink, 
OUString& rUrl, OUString& rMimeType, OUString& rData);
 
 OUString consolidateContiguousSpace(const OUString& rCandidate);
-OUString xmlSpaceHandling(const OUString& rCandidate, bool bIsDefault);
 
 // #125325# removes block comment of the general form '/* ... */', 
returns
 // an adapted string or the original if no comments included
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 16975f06f0b2..67793f0db3f1 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -459,7 +459,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf85770)
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"height", "11");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Times New Roman");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", 
"fontcolor", "#00");
-assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", 
"text", "Start");
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", 
"text", "Start ");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", 
"height", "11");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", 
"familyname", "Times New Roman");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", 
"fontcolor", "#00");
@@ -842,6 +842,27 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103888)
 assertXPath(pDocument, 
"/primitive2D/transform/transform/textsimpleportion[3]", "text", "hebung");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf156251)
+{
+Primitive2DSequence aSequence = 
parseSvg(u"/svgio/qa/cppunit/data/tdf156251.svg");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(Primitive2DContainer(aSequence));
+
+CPPUNIT_ASSERT (pDocument);
+
+// Without the fix in place, this test would have failed with
+// - Expected: 'You are '
+// - Actual  : 'You are'
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "You a

Re: Unsafe directory

2023-07-13 Thread Colomban Wendling

Hello Régis,

Le 13/07/2023 à 09:00, Regis Perdreau a écrit :

I'm trying to build master under Windows 11/cygwin.
Build failed with the message "autogen.sh: unsafe home directory: 
`/home/Régis Perdreau"


I'm not knowledgeable about Windows/CygWin, but I have two wild guesses:
- the directory name contains non-ASCII characters ("é")
- the directory name contains a space

If it's anything like gnupg, it's likely the space (see the hardly 
readable check in https://github.com/gpg/gnupg/blob/master/autogen.sh#L127)


You probably can work around this by either actually changing CygWin's 
homedir, or just adjust $HOME to point to some directory without those 
characters (e.g. HOME=/tmp/homedir, or anything less temporary yet still 
without spaces).


HTH
- Colomban


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

2023-07-13 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx   |   19 
++
 writerfilter/qa/cppunittests/dmapper/data/floattable-hidden-anchor.docx |binary
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx|   18 
+
 3 files changed, 37 insertions(+)

New commits:
commit 52d265c0d2f2638c386475e58c3ee489ccd3f06c
Author: Miklos Vajna 
AuthorDate: Thu Jul 13 08:14:42 2023 +0200
Commit: Miklos Vajna 
CommitDate: Thu Jul 13 11:14:28 2023 +0200

sw floattable: fix lost floating table right before a hidden para from DOCX

The bugdoc has a floating table, but that was not visible in Writer.

What happens is that the table's anchor was hidden, so Writer was hiding
the anchored table as well, but Word still shows the table in this case.

Fix the problem similar to what commit
79ddca4def81198e3eee42eca8aca42fef964c80 (sw floattable: fix lost
floating table right before a table from DOC, 2023-07-05) did for the
DOC import: if the paragraph has an anchored floating table and is
hidden, then show the paragraph.

An alternative would be to change how NS_ooxml::LN_EG_RPrBase_vanish is
handled in DomainMapper::sprmWithProps(), but that would be too early:
by the time we get the SPRM, there is no floating table yet. Another
alternative would be to make sure floating tables are part of the
"anchored object" list in DomainMapper_Impl::finishParagraph() (that's
how shapes don't have this problem), but the anchor paragraph is
finished before creating the floating table, so that would be again too
early.

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

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
index 1f044bc2f309..8c11e3db22c7 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
@@ -114,6 +114,25 @@ CPPUNIT_TEST_FIXTURE(Test, 
testFloatingTablesOuterNonsplitInner)
 // i.e. the inner floating table was not floating.
 CPPUNIT_ASSERT_EQUAL(static_cast(4), xFrames->getCount());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableHiddenAnchor)
+{
+// Given a document with a floating table, anchored in a paragraph that is 
hidden:
+loadFromURL(u"floattable-hidden-anchor.docx");
+
+// When checking the visibility of the the anchor paragraph:
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xText(xTextDocument->getText(), uno::UNO_QUERY);
+uno::Reference xParagraphs = 
xText->createEnumeration();
+uno::Reference xAnchor(xParagraphs->nextElement(), 
uno::UNO_QUERY);
+
+// Then make sure the anchor (and thus the table) is visible:
+bool bCharHidden{};
+CPPUNIT_ASSERT(xAnchor->getPropertyValue("CharHidden") >>= bCharHidden);
+// Without the accompanying fix in place, this test would have failed, the 
paragraph + table was
+// hidden.
+CPPUNIT_ASSERT(!bCharHidden);
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git 
a/writerfilter/qa/cppunittests/dmapper/data/floattable-hidden-anchor.docx 
b/writerfilter/qa/cppunittests/dmapper/data/floattable-hidden-anchor.docx
new file mode 100644
index ..08816aacc47e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/floattable-hidden-anchor.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 370a89c0442f..5b0971eee20f 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1643,6 +1643,24 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel, bool bTab
 }
 }
 
+if (xContent.is())
+{
+// By the time the frame is created, the anchor's 
paragraph marker character
+// properties are already imported. Check if we need to 
disable "vanish", that
+// would lead to a hidden floating table in Writer, but it 
does not in Word.
+uno::Reference 
xParagraph(xContent->getAnchor(),
+   
uno::UNO_QUERY);
+if (xParagraph.is())
+{
+bool bCharHidden{};
+xParagraph->getPropertyValue("CharHidden") >>= 
bCharHidden;
+if (bCharHidden)
+{
+xParagraph->setPropertyValue("CharHidden", 
uno::Any(false));
+}
+}
+}
+
  

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

2023-07-13 Thread Tomaž Vajngerl (via logerrit)
 sc/CppunitTest_sc_ucalc_document_themes.mk |3 
 sc/qa/unit/ucalc_DocumentThemes.cxx|  126 -
 sc/source/ui/inc/ThemeColorChanger.hxx |3 
 3 files changed, 129 insertions(+), 3 deletions(-)

New commits:
commit 225d2f3a625a63054e05e2b440651f0bf2eef691
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 11 20:25:23 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jul 13 11:03:46 2023 +0200

sc: add test for changing theme colors and undo/redo

Change-Id: Ieaae64cd6cfd96b8c1627cf1c3935bc546a36617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154306
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 8e4fb36a69d517bc5111d64d12b2c7df4f9791de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154328

diff --git a/sc/CppunitTest_sc_ucalc_document_themes.mk 
b/sc/CppunitTest_sc_ucalc_document_themes.mk
index b779a643ba19..c2e5bee7f8ef 100644
--- a/sc/CppunitTest_sc_ucalc_document_themes.mk
+++ b/sc/CppunitTest_sc_ucalc_document_themes.mk
@@ -28,10 +28,13 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sc_ucalc_document_themes, \
 comphelper \
 cppu \
 cppuhelper \
+docmodel \
+editeng \
 sal \
 salhelper \
 sax \
 sc \
+svl \
 scqahelper \
 sfx \
 svxcore \
diff --git a/sc/qa/unit/ucalc_DocumentThemes.cxx 
b/sc/qa/unit/ucalc_DocumentThemes.cxx
index 5c568b9f5ca0..fdd601e09d78 100644
--- a/sc/qa/unit/ucalc_DocumentThemes.cxx
+++ b/sc/qa/unit/ucalc_DocumentThemes.cxx
@@ -8,8 +8,19 @@
  */
 
 #include "helper/qahelper.hxx"
-#include 
+
+#include 
 #include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 using namespace css;
 
@@ -19,16 +30,127 @@ class DocumentThemesTest : public ScUcalcTestBase
 
 namespace
 {
-CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testThemes)
+CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testGetTheme)
 {
 m_pDoc->InitDrawLayer();
 m_pDoc->InsertTab(0, "Test");
+
+ScDrawLayer* pDrawLayer = m_pDoc->GetDrawLayer();
+CPPUNIT_ASSERT(pDrawLayer);
+const SdrPage* pPage(pDrawLayer->GetPage(0));
+CPPUNIT_ASSERT(pPage);
+auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
+CPPUNIT_ASSERT(pTheme);
+}
+
+CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testChangeTheme)
+{
+m_pDoc->InitDrawLayer();
+m_pDoc->InsertTab(0, "Test");
+
 ScDrawLayer* pDrawLayer = m_pDoc->GetDrawLayer();
 CPPUNIT_ASSERT(pDrawLayer);
 const SdrPage* pPage(pDrawLayer->GetPage(0));
 CPPUNIT_ASSERT(pPage);
 auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
 CPPUNIT_ASSERT(pTheme);
+
+Color aBackgroundThemeColor(0xc99c00);
+Color aCellTextThemeColor(0x0369a3);
+
+auto eBackgroundThemeType = model::ThemeColorType::Accent5;
+auto eCellTextThemeType = model::ThemeColorType::Accent2;
+
+ScPatternAttr aNewPattern(m_pDoc->GetPool());
+{
+model::ComplexColor aComplexColor;
+aComplexColor.setSchemeColor(eBackgroundThemeType);
+Color aColor = pTheme->getColorSet()->resolveColor(aComplexColor);
+aNewPattern.GetItemSet().Put(SvxBrushItem(aColor, aComplexColor, 
ATTR_BACKGROUND));
+}
+{
+model::ComplexColor aComplexColor;
+aComplexColor.setSchemeColor(eCellTextThemeType);
+Color aColor = pTheme->getColorSet()->resolveColor(aComplexColor);
+aNewPattern.GetItemSet().Put(SvxColorItem(aColor, aComplexColor, 
ATTR_FONT_COLOR));
+}
+
+m_pDoc->ApplyPatternAreaTab(2, 2, 4, 4, 0, aNewPattern);
+
+{
+const SfxPoolItem* pItem = nullptr;
+auto* pPattern = m_pDoc->GetPattern(ScAddress(3, 3, 0));
+CPPUNIT_ASSERT(pPattern);
+
+pPattern->GetItemSet().HasItem(ATTR_BACKGROUND, &pItem);
+auto pBrushItem = static_cast(pItem);
+CPPUNIT_ASSERT_EQUAL(aBackgroundThemeColor, pBrushItem->GetColor());
+pPattern->GetItemSet().HasItem(ATTR_FONT_COLOR, &pItem);
+auto pColorItem = static_cast(pItem);
+CPPUNIT_ASSERT_EQUAL(aCellTextThemeColor, pColorItem->getColor());
+}
+
+auto pColorSet = std::make_shared("TestColorScheme");
+pColorSet->add(model::ThemeColorType::Dark1, 0x00);
+pColorSet->add(model::ThemeColorType::Light1, 0x11);
+pColorSet->add(model::ThemeColorType::Dark2, 0x22);
+pColorSet->add(model::ThemeColorType::Light2, 0x33);
+pColorSet->add(model::ThemeColorType::Accent1, 0x44);
+pColorSet->add(model::ThemeColorType::Accent2, 0x55);
+pColorSet->add(model::ThemeColorType::Accent3, 0x66);
+pColorSet->add(model::ThemeColorType::Accent4, 0x77);
+pColorSet->add(model::ThemeColorType::Accent5, 0x88);
+pColorSet->add(model::ThemeColorType::Accent6, 0x99);
+pColorSet->add(model::ThemeColorType::Hyperlink, 0xaa);
+pColorSet->add(model::ThemeColorType::FollowedHyperlink, 0xbb);
+
+sc::ThemeColorChanger

Unsafe directory

2023-07-13 Thread Regis Perdreau
Hi,


I'm trying to build master under Windows 11/cygwin.
Build failed with the message "autogen.sh: unsafe home directory:
`/home/Régis Perdreau"

and when compilation is stopped :

config.status: executing libtool commands

Libassuan v has been configured as follows:

Revision:   ()
Platform: x86_64-pc-mingw32

Making all in m4
Making all in src
mkheader.c
usage: mkheader host_os template.h version version_number
make[4]: *** [Makefile:1339: assuan.h] Error 1
make[3]: *** [Makefile:462: all-recursive] Error 1
make[2]: *** [Makefile:394: all] Error 2
make[1]: ***
[C:/sources/libo-core/external/libassuan/ExternalProject_libassuan.mk:26:
C:/sources/libo-core/workdir/ExternalProject/libassuan/build] Error 1
make[1]: *** Waiting for unfinished jobs

Any thoughts?

Thanks


Régis Perdreau


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

2023-07-13 Thread Szymon Kłos (via logerrit)
 svx/uiconfig/ui/acceptrejectchangesdialog.ui |   14 +-
 sw/source/uibase/misc/redlndlg.cxx   |2 +-
 vcl/jsdialog/enabled.cxx |5 +
 3 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 6532f77926154340c27131de452666788ca42e6c
Author: Szymon Kłos 
AuthorDate: Fri Jun 16 18:53:46 2023 +0200
Commit: Szymon Kłos 
CommitDate: Thu Jul 13 10:44:37 2023 +0200

jsdialog: enable Manage Changes dialog

Change-Id: Ibc501dc595eba93adde7b635a5de1122b22c9651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153190
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154331
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/svx/uiconfig/ui/acceptrejectchangesdialog.ui 
b/svx/uiconfig/ui/acceptrejectchangesdialog.ui
index 58d1e10bdfcb..a2d4f4e2741f 100644
--- a/svx/uiconfig/ui/acceptrejectchangesdialog.ui
+++ b/svx/uiconfig/ui/acceptrejectchangesdialog.ui
@@ -58,7 +58,19 @@
   
 
 
-  
+  
+True
+False
+vertical
+
+  
+
+  
+  
+True
+True
+1
+  
 
   
 
diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index 1a9d168bee61..0f4b43006ea2 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -82,7 +82,7 @@ SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg(
 SfxBindings* _pBindings, SwChildWinWrapper* pChild, weld::Window *pParent)
 : SfxModelessDialogController(_pBindings, pChild, pParent,
 "svx/ui/acceptrejectchangesdialog.ui", "AcceptRejectChangesDialog")
-, m_xContentArea(m_xDialog->weld_content_area())
+, m_xContentArea(m_xBuilder->weld_container("container"))
 , m_pChildWin(pChild)
 {
 m_xImplDlg.reset(new SwRedlineAcceptDlg(m_xDialog, m_xBuilder.get(), 
m_xContentArea.get()));
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index f82ded6c5cad..5ca69398634d 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -222,11 +222,16 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"sfx/ui/managestylepage.ui"
 || rUIFile == u"sfx/ui/password.ui"
 // svx
+|| rUIFile == u"svx/ui/acceptrejectchangesdialog.ui"
+|| rUIFile == u"svx/ui/accessibilitycheckdialog.ui"
 || rUIFile == u"svx/ui/accessibilitycheckentry.ui"
 || rUIFile == u"svx/ui/compressgraphicdialog.ui"
 || rUIFile == u"svx/ui/findreplacedialog.ui"
 || rUIFile == u"svx/ui/fontworkgallerydialog.ui"
 || rUIFile == u"svx/ui/headfootformatpage.ui"
+|| rUIFile == u"svx/ui/redlinecontrol.ui"
+|| rUIFile == u"svx/ui/redlinefilterpage.ui"
+|| rUIFile == u"svx/ui/redlineviewpage.ui"
 || rUIFile == u"svx/ui/themecoloreditdialog.ui"
 || rUIFile == u"svx/ui/themedialog.ui"
 // uui


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

2023-07-13 Thread Stephan Bergmann (via logerrit)
 solenv/flatpak-manifest.in |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d39e1d6427725233d4218b152a44d5b6d778570e
Author: Stephan Bergmann 
AuthorDate: Wed Jul 12 14:06:34 2023 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jul 13 10:24:55 2023 +0200

Sync flatpak-manifest.in with Flathub

...including


"Update krb5-1.21.tar.gz to 1.21.1 (#248)"

Change-Id: I6c931f0c25cbd866f9c643dd952fb9945e56271a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154355
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 1d85c14396f4234f1251576f74581d09f2d0c37e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154324
Reviewed-by: Xisco Fauli 

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 16f8de42c5ca..8839a550548d 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -75,8 +75,8 @@
 "sources": [
 {
 "type": "archive",
-"url": 
"https://kerberos.org/dist/krb5/1.21/krb5-1.21.tar.gz";,
-"sha256": 
"69f8aaff85484832df67a4bbacd99b9259bd95aab8c651fbbe65cdc9620ea93b",
+"url": 
"https://kerberos.org/dist/krb5/1.21/krb5-1.21.1.tar.gz";,
+"sha256": 
"7881c31b329bd27dbc6bf2bf1c85c5d0b6c7358aff2b35d513ec2d50fa1f",
 "x-checker-data": {
 "type": "html",
 "url": "https://kerberos.org/dist/";,


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

2023-07-13 Thread Tomaž Vajngerl (via logerrit)
 sc/CppunitTest_sc_ucalc_document_themes.mk |3 
 sc/qa/unit/ucalc_DocumentThemes.cxx|  126 -
 sc/source/ui/inc/ThemeColorChanger.hxx |3 
 3 files changed, 129 insertions(+), 3 deletions(-)

New commits:
commit 8e4fb36a69d517bc5111d64d12b2c7df4f9791de
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 11 20:25:23 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jul 13 09:15:30 2023 +0200

sc: add test for changing theme colors and undo/redo

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

diff --git a/sc/CppunitTest_sc_ucalc_document_themes.mk 
b/sc/CppunitTest_sc_ucalc_document_themes.mk
index b779a643ba19..c2e5bee7f8ef 100644
--- a/sc/CppunitTest_sc_ucalc_document_themes.mk
+++ b/sc/CppunitTest_sc_ucalc_document_themes.mk
@@ -28,10 +28,13 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sc_ucalc_document_themes, \
 comphelper \
 cppu \
 cppuhelper \
+docmodel \
+editeng \
 sal \
 salhelper \
 sax \
 sc \
+svl \
 scqahelper \
 sfx \
 svxcore \
diff --git a/sc/qa/unit/ucalc_DocumentThemes.cxx 
b/sc/qa/unit/ucalc_DocumentThemes.cxx
index 5c568b9f5ca0..fdd601e09d78 100644
--- a/sc/qa/unit/ucalc_DocumentThemes.cxx
+++ b/sc/qa/unit/ucalc_DocumentThemes.cxx
@@ -8,8 +8,19 @@
  */
 
 #include "helper/qahelper.hxx"
-#include 
+
+#include 
 #include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 using namespace css;
 
@@ -19,16 +30,127 @@ class DocumentThemesTest : public ScUcalcTestBase
 
 namespace
 {
-CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testThemes)
+CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testGetTheme)
 {
 m_pDoc->InitDrawLayer();
 m_pDoc->InsertTab(0, "Test");
+
+ScDrawLayer* pDrawLayer = m_pDoc->GetDrawLayer();
+CPPUNIT_ASSERT(pDrawLayer);
+const SdrPage* pPage(pDrawLayer->GetPage(0));
+CPPUNIT_ASSERT(pPage);
+auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
+CPPUNIT_ASSERT(pTheme);
+}
+
+CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testChangeTheme)
+{
+m_pDoc->InitDrawLayer();
+m_pDoc->InsertTab(0, "Test");
+
 ScDrawLayer* pDrawLayer = m_pDoc->GetDrawLayer();
 CPPUNIT_ASSERT(pDrawLayer);
 const SdrPage* pPage(pDrawLayer->GetPage(0));
 CPPUNIT_ASSERT(pPage);
 auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
 CPPUNIT_ASSERT(pTheme);
+
+Color aBackgroundThemeColor(0xc99c00);
+Color aCellTextThemeColor(0x0369a3);
+
+auto eBackgroundThemeType = model::ThemeColorType::Accent5;
+auto eCellTextThemeType = model::ThemeColorType::Accent2;
+
+ScPatternAttr aNewPattern(m_pDoc->GetPool());
+{
+model::ComplexColor aComplexColor;
+aComplexColor.setSchemeColor(eBackgroundThemeType);
+Color aColor = pTheme->getColorSet()->resolveColor(aComplexColor);
+aNewPattern.GetItemSet().Put(SvxBrushItem(aColor, aComplexColor, 
ATTR_BACKGROUND));
+}
+{
+model::ComplexColor aComplexColor;
+aComplexColor.setSchemeColor(eCellTextThemeType);
+Color aColor = pTheme->getColorSet()->resolveColor(aComplexColor);
+aNewPattern.GetItemSet().Put(SvxColorItem(aColor, aComplexColor, 
ATTR_FONT_COLOR));
+}
+
+m_pDoc->ApplyPatternAreaTab(2, 2, 4, 4, 0, aNewPattern);
+
+{
+const SfxPoolItem* pItem = nullptr;
+auto* pPattern = m_pDoc->GetPattern(ScAddress(3, 3, 0));
+CPPUNIT_ASSERT(pPattern);
+
+pPattern->GetItemSet().HasItem(ATTR_BACKGROUND, &pItem);
+auto pBrushItem = static_cast(pItem);
+CPPUNIT_ASSERT_EQUAL(aBackgroundThemeColor, pBrushItem->GetColor());
+pPattern->GetItemSet().HasItem(ATTR_FONT_COLOR, &pItem);
+auto pColorItem = static_cast(pItem);
+CPPUNIT_ASSERT_EQUAL(aCellTextThemeColor, pColorItem->getColor());
+}
+
+auto pColorSet = std::make_shared("TestColorScheme");
+pColorSet->add(model::ThemeColorType::Dark1, 0x00);
+pColorSet->add(model::ThemeColorType::Light1, 0x11);
+pColorSet->add(model::ThemeColorType::Dark2, 0x22);
+pColorSet->add(model::ThemeColorType::Light2, 0x33);
+pColorSet->add(model::ThemeColorType::Accent1, 0x44);
+pColorSet->add(model::ThemeColorType::Accent2, 0x55);
+pColorSet->add(model::ThemeColorType::Accent3, 0x66);
+pColorSet->add(model::ThemeColorType::Accent4, 0x77);
+pColorSet->add(model::ThemeColorType::Accent5, 0x88);
+pColorSet->add(model::ThemeColorType::Accent6, 0x99);
+pColorSet->add(model::ThemeColorType::Hyperlink, 0xaa);
+pColorSet->add(model::ThemeColorType::FollowedHyperlink, 0xbb);
+
+sc::ThemeColorChanger aChanger(*m_xDocShell);
+aChanger.apply(pColorSet);
+
+{
+const SfxPoolItem* pItem = nullptr;
+auto* pPattern =