[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - editeng/source include/xmloff schema/libreoffice xmloff/qa xmloff/source

2022-06-29 Thread Miklos Vajna (via logerrit)
 editeng/source/uno/unotext.cxx  |   12 
 include/xmloff/xmltoken.hxx |   13 +
 include/xmloff/xmltypes.hxx |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   25 ++
 xmloff/qa/unit/data/refer-to-theme.odp  |binary
 xmloff/qa/unit/draw.cxx |   24 +
 xmloff/source/core/xmltoken.cxx |   13 +
 xmloff/source/draw/sdxmlexp.cxx |   30 ++--
 xmloff/source/text/txtprhdl.cxx |   20 
 xmloff/source/text/txtprmap.cxx |2 
 xmloff/source/token/tokens.txt  |   13 +
 11 files changed, 138 insertions(+), 15 deletions(-)

New commits:
commit ae2b901849bbc6a1a75ea3c9b855676617e0958e
Author: Miklos Vajna 
AuthorDate: Thu Dec 9 08:43:27 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 09:04:07 2022 +0200

ODP import/export: refer to theme from shape text color

Refer to the 12 pre-defined colors by name + don't write the attribute
for the case when there is no theme.

(cherry picked from commit 91f649a119d4b7ece26f9737a38663664953a57a)

Conflicts:
xmloff/source/token/tokens.txt

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

diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 59a5688017e8..50aa8a9d632d 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1132,6 +1133,17 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const 
SfxItemSet* pSet, const Sf
 
 if(bItemStateSet)
 {
+if (pMap->nWID == EE_CHAR_COLOR && pMap->nMemberId == 
MID_COLOR_THEME_INDEX)
+{
+// Theme can be DEFAULT_VALUE, even if the same pool item has 
a color which is a
+// DIRECT_VALUE.
+const SvxColorItem* pColor = 
pSet->GetItem(EE_CHAR_COLOR);
+if (pColor->GetThemeIndex() == -1)
+{
+eItemState = SfxItemState::DEFAULT;
+}
+}
+
 switch( eItemState )
 {
 case SfxItemState::SET:
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index f26c4871ec35..85f6ca74847d 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3468,6 +3468,19 @@ namespace xmloff::token {
 XML_LINKED_STYLE_NAME,
 
 XML_THEME,
+XML_THEME_COLOR,
+XML_DK1,
+XML_LT1,
+XML_DK2,
+XML_LT2,
+XML_ACCENT1,
+XML_ACCENT2,
+XML_ACCENT3,
+XML_ACCENT4,
+XML_ACCENT5,
+XML_ACCENT6,
+XML_HLINK,
+XML_FOLHLINK,
 
 XML_CONTENT_CONTROL,
 XML_SHOWING_PLACE_HOLDER,
diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx
index 625e3a5b9c68..3711e5d5db52 100644
--- a/include/xmloff/xmltypes.hxx
+++ b/include/xmloff/xmltypes.hxx
@@ -293,6 +293,7 @@
 #define XML_TYPE_GRAPHIC(XML_TEXT_TYPES_START + 127)
 #define XML_SW_TYPE_PRESPAGE_BACKSIZE   (XML_TEXT_TYPES_START + 128)
 #define XML_SW_TYPE_RTLGUTTER   (XML_TEXT_TYPES_START + 129)
+#define XML_TYPE_THEME_COLOR(XML_TEXT_TYPES_START + 130)
 
 #endif // INCLUDED_XMLOFF_XMLTYPES_HXX
 
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 19a1edb7f3c0..b7c2d83b98e8 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -2258,6 +2258,31 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
   
 
+
+
+  
+
+  
+  dk1
+  
+  lt1
+  
+  dk2
+  
+  lt2
+  accent1
+  accent2
+  accent3
+  accent4
+  accent5
+  accent6
+  
+  hlink
+  
+  folHlink
+
+  
+
   
 
   
diff --git a/xmloff/qa/unit/data/refer-to-theme.odp 
b/xmloff/qa/unit/data/refer-to-theme.odp
new file mode 100644
index ..83bad49b5f56
Binary files /dev/null and b/xmloff/qa/unit/data/refer-to-theme.odp differ
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index f3bab2a69996..2ea5ec785f44 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -179,6 +179,30 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeImport)
 CPPUNIT_ASSE

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - editeng/source include/editeng include/xmloff schema/libreoffice xmloff/qa xmloff/source

2022-06-29 Thread Miklos Vajna (via logerrit)
 editeng/source/uno/unotext.cxx  |   27 --
 include/editeng/colritem.hxx|4 +
 include/xmloff/xmltoken.hxx |2 
 include/xmloff/xmltypes.hxx |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   10 
 xmloff/qa/unit/data/refer-to-theme.odp  |binary
 xmloff/qa/unit/draw.cxx |   17 ++
 xmloff/source/core/xmltoken.cxx |2 
 xmloff/source/style/prhdlfac.cxx|3 +
 xmloff/source/style/xmlbahdl.cxx|   30 
 xmloff/source/style/xmlbahdl.hxx|9 +++
 xmloff/source/text/txtprmap.cxx |4 +
 xmloff/source/token/tokens.txt  |2 
 13 files changed, 106 insertions(+), 5 deletions(-)

New commits:
commit 8259a1ac609aaed4cea9c1d4e77c99d50037d287
Author: Miklos Vajna 
AuthorDate: Mon Dec 13 08:41:10 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 09:04:59 2022 +0200

ODP import/export: refer to theme from shape text color with effects

Handle luminance modulation and offset (i.e. lighter and darker colors).

(cherry picked from commit 7d1e4d12baa85d47f5945872a3bc186dd6ce1889)

Conflicts:
xmloff/source/token/tokens.txt

Change-Id: I536bbca1ed994e991c7ceac153d6a47cb6ef35f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136528
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 50aa8a9d632d..16ffaaa8bbfa 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1133,14 +1133,31 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const 
SfxItemSet* pSet, const Sf
 
 if(bItemStateSet)
 {
-if (pMap->nWID == EE_CHAR_COLOR && pMap->nMemberId == 
MID_COLOR_THEME_INDEX)
+if (pMap->nWID == EE_CHAR_COLOR)
 {
-// Theme can be DEFAULT_VALUE, even if the same pool item has 
a color which is a
-// DIRECT_VALUE.
+// Theme & effects can be DEFAULT_VALUE, even if the same pool 
item has a color
+// which is a DIRECT_VALUE.
 const SvxColorItem* pColor = 
pSet->GetItem(EE_CHAR_COLOR);
-if (pColor->GetThemeIndex() == -1)
+switch (pMap->nMemberId)
 {
-eItemState = SfxItemState::DEFAULT;
+case MID_COLOR_THEME_INDEX:
+if (pColor->GetThemeIndex() == -1)
+{
+eItemState = SfxItemState::DEFAULT;
+}
+break;
+case MID_COLOR_LUM_MOD:
+if (pColor->GetLumMod() == 1)
+{
+eItemState = SfxItemState::DEFAULT;
+}
+break;
+case MID_COLOR_LUM_OFF:
+if (pColor->GetLumOff() == 0)
+{
+eItemState = SfxItemState::DEFAULT;
+}
+break;
 }
 }
 
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index cd223d2777bc..99ebed218748 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -83,6 +83,10 @@ public:
 maTintShade = nTintOrShade;
 }
 
+sal_Int16 GetLumMod() const { return mnLumMod; }
+
+sal_Int16 GetLumOff() const { return mnLumOff; }
+
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 85f6ca74847d..1f2e4163d9b1 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3481,6 +3481,8 @@ namespace xmloff::token {
 XML_ACCENT6,
 XML_HLINK,
 XML_FOLHLINK,
+XML_COLOR_LUM_MOD,
+XML_COLOR_LUM_OFF,
 
 XML_CONTENT_CONTROL,
 XML_SHOWING_PLACE_HOLDER,
diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx
index 3711e5d5db52..13e7c3fcc6c0 100644
--- a/include/xmloff/xmltypes.hxx
+++ b/include/xmloff/xmltypes.hxx
@@ -153,6 +153,7 @@
 #define XML_TYPE_NEG_PERCENT16  0x2023  // (100-x)
 #define XML_TYPE_DOUBLE_PERCENT 0x2024  //  50% (source is a 
double from 0.0 to 1.0)
 #define XML_TYPE_HEX0x2025  // 00544F1B
+#define XML_TYPE_PERCENT100 0x2026 // 100th percent
 
 // special basic types
 #define XML_TYPE_RECTANGLE_LEFT 0x0100  // the Left member of 
an awt::Rectangle as a measure
diff --git a/schema/libreoffi

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/Library_cui.mk cui/Module_cui.mk cui/qa cui/source cui/uiconfig cui/UIConfig_cui.mk cui/UITest_cui_tabpages.mk include/svx sd/i

2022-06-29 Thread Miklos Vajna (via logerrit)
 cui/Library_cui.mk |1 
 cui/Module_cui.mk  |1 
 cui/UIConfig_cui.mk|1 
 cui/UITest_cui_tabpages.mk |   16 +
 cui/qa/uitest/tabpages/themepage.py|   47 
 cui/source/factory/dlgfact.cxx |5 +
 cui/source/inc/themepage.hxx   |   38 +
 cui/source/tabpages/themepage.cxx  |   95 +
 cui/uiconfig/ui/themetabpage.ui|   72 +
 include/svx/dialogs.hrc|1 
 sd/inc/sdabstdlg.hxx   |2 
 sd/qa/unit/dialogs-test.cxx|2 
 sd/source/ui/dlg/dlgpage.cxx   |9 ++-
 sd/source/ui/dlg/sddlgfact.cxx |4 -
 sd/source/ui/dlg/sddlgfact.hxx |2 
 sd/source/ui/func/fupage.cxx   |   31 ++
 sd/source/ui/inc/dlgpage.hxx   |2 
 sd/uiconfig/sdraw/ui/drawpagedialog.ui |   48 
 18 files changed, 369 insertions(+), 8 deletions(-)

New commits:
commit 5b63e62271b36b2109d35961acfca29546c13e59
Author: Miklos Vajna 
AuthorDate: Tue Dec 14 09:55:45 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 09:05:40 2022 +0200

sd: add initial theme UI for master slides

Click Sidebar -> properties -> slide -> master view, then launch the
Slide -> Slide properties menu item, this adds a new Theme tab page
there.

This is just an initial UI, only the theme name can be edited as a
start.

(cherry picked from commit 64fcf278830a33114f0fa5884767f24edf32cb12)

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

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1e8023cc819c..d455a64ab266 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -219,6 +219,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/textanim \
 cui/source/tabpages/textattr \
 cui/source/tabpages/TextColumnsPage \
+cui/source/tabpages/themepage \
 cui/source/tabpages/tparea \
 cui/source/tabpages/tpbitmap \
 cui/source/tabpages/tpcolor \
diff --git a/cui/Module_cui.mk b/cui/Module_cui.mk
index e4ff28c8fabe..53492ef291a4 100644
--- a/cui/Module_cui.mk
+++ b/cui/Module_cui.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Module_add_screenshot_targets,cui,\
 
 $(eval $(call gb_Module_add_uicheck_targets,cui,\
 UITest_cui_dialogs \
+UITest_cui_tabpages \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index a4ad452bdfee..806779daaa9d 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -213,6 +213,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/textcolumnstabpage \
cui/uiconfig/ui/textdialog \
cui/uiconfig/ui/textflowpage \
+   cui/uiconfig/ui/themetabpage \
cui/uiconfig/ui/thesaurus \
cui/uiconfig/ui/toolbarmodedialog \
cui/uiconfig/ui/transparencytabpage \
diff --git a/cui/UITest_cui_tabpages.mk b/cui/UITest_cui_tabpages.mk
new file mode 100644
index ..4458e9859e23
--- /dev/null
+++ b/cui/UITest_cui_tabpages.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UITest_UITest,cui_tabpages))
+
+$(eval $(call gb_UITest_add_modules,cui_tabpages,$(SRCDIR)/cui/qa/uitest,\
+   tabpages/ \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/cui/qa/uitest/tabpages/themepage.py 
b/cui/qa/uitest/tabpages/themepage.py
new file mode 100644
index ..eb97205d19ab
--- /dev/null
+++ b/cui/qa/uitest/tabpages/themepage.py
@@ -0,0 +1,47 @@
+#
+# 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/.
+#
+
+from libreoffice.uno.propertyvalue import convert_property_values_to_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+
+# Test for cui/source/tabpages/themepage.cxx.
+class Test(UITestCase):
+
+def testThemePage(self):
+# Given an Impress document with a master page that has a theme:
+with self.ui_test.create_doc_in_start_center("impress") as component:
+template = self.xUITest.getTopFocusWindow()
+
self.ui_test.close_dialog_through_button(template.getChild("close"))
+doc = self.xUITest.getTopFocusWindow()
+editWi

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/qa cui/source cui/uiconfig

2022-06-29 Thread Miklos Vajna (via logerrit)
 cui/qa/uitest/tabpages/themepage.py |   13 +++
 cui/source/inc/themepage.hxx|1 
 cui/source/tabpages/themepage.cxx   |   10 ++
 cui/uiconfig/ui/themetabpage.ui |   60 
 4 files changed, 83 insertions(+), 1 deletion(-)

New commits:
commit faefd179af737cf68b96cd25901be0a7195fc8b9
Author: Miklos Vajna 
AuthorDate: Wed Dec 15 08:41:01 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 09:06:53 2022 +0200

sd theme: add UI to set/get the name of a color set

The two names make sense because the theme can have not only color sets
but also font names, etc -- but for now we just care about the theme
name and a named color set.

(cherry picked from commit c634f836945379ae17a3714938210bba7995dd25)

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

diff --git a/cui/qa/uitest/tabpages/themepage.py 
b/cui/qa/uitest/tabpages/themepage.py
index eb97205d19ab..25726c63feda 100644
--- a/cui/qa/uitest/tabpages/themepage.py
+++ b/cui/qa/uitest/tabpages/themepage.py
@@ -23,7 +23,8 @@ class Test(UITestCase):
 drawPage = component.getDrawPages().getByIndex(0)
 master = drawPage.MasterPage
 theme = mkPropertyValues({
-"Name": "nameA"
+"Name": "nameA",
+"ColorSchemeName": "colorSetA"
 })
 master.Theme = theme
 
@@ -34,7 +35,13 @@ class Test(UITestCase):
 # Select RID_SVXPAGE_THEME.
 select_pos(xTabs, "3")
 themeName = xDialog.getChild("themeName")
+themeName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+themeName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
 themeName.executeAction("TYPE", mkPropertyValues({"TEXT": 
"nameB"}))
+colorSetName = xDialog.getChild("colorSetName")
+colorSetName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+colorSetName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+colorSetName.executeAction("TYPE", mkPropertyValues({"TEXT": 
"colorSetB"}))
 
 # Then make sure the doc model is updated accordingly:
 # Without the accompanying fix in place, this test would have 
failed with:
@@ -42,6 +49,10 @@ class Test(UITestCase):
 # i.e. the UI didn't update the theme name.
 theme = convert_property_values_to_dict(master.Theme)
 self.assertEqual(theme["Name"], "nameB")
+# Without the accompanying fix in place, this test would have 
failed with:
+# AssertionError: 'colorSetA' != 'colorSetB'
+# i.e. the UI didn't update the color scheme name.
+self.assertEqual(theme["ColorSchemeName"], "colorSetB")
 
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cui/source/inc/themepage.hxx b/cui/source/inc/themepage.hxx
index 6596cd227244..613650c075b6 100644
--- a/cui/source/inc/themepage.hxx
+++ b/cui/source/inc/themepage.hxx
@@ -21,6 +21,7 @@ class SvxThemePage : public SfxTabPage
 static const WhichRangesContainer m_pRanges;
 
 std::unique_ptr m_xThemeName;
+std::unique_ptr m_xColorSetName;
 
 public:
 SvxThemePage(weld::Container* pPage, weld::DialogController* pController,
diff --git a/cui/source/tabpages/themepage.cxx 
b/cui/source/tabpages/themepage.cxx
index 4c2cd18716b9..99abeed799fb 100644
--- a/cui/source/tabpages/themepage.cxx
+++ b/cui/source/tabpages/themepage.cxx
@@ -27,6 +27,7 @@ SvxThemePage::SvxThemePage(weld::Container* pPage, 
weld::DialogController* pCont
const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "cui/ui/themetabpage.ui", "ThemePage", 
&rInAttrs)
 , m_xThemeName(m_xBuilder->weld_entry("themeName"))
+, m_xColorSetName(m_xBuilder->weld_entry("colorSetName"))
 {
 }
 
@@ -57,6 +58,14 @@ void SvxThemePage::Reset(const SfxItemSet* pAttrs)
 it->second >>= aName;
 m_xThemeName->set_text(aName);
 }
+
+it = aMap.find("ColorSchemeName");
+if (it != aMap.end())
+{
+OUString aName;
+it->second >>= aName;
+m_xColorSetName->set_text(aName);
+}
 }
 
 bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs)
@@ -76,6 +85,7 @@ bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs)
 }
 
 aMap["Name"] <<= m_xThemeName->get_text();
+aMap["ColorSchemeName"] <<= m_xColorSetName->get_text();
 
 beans::PropertyValues aTheme = aMap.getAsConstPropertyValueList();
 aGrabBagItem.GetGrabBag()["Theme"] <<= aTheme;
diff --git a/cui/uiconfig/ui/themetabpage.ui b/cui/uiconfig/ui/themetabpage.ui
index c94c6093958b..81c1affbe85f 100644
--- a/cui/uiconfig/ui/themetabpage.ui
+++ b/

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

2022-06-29 Thread Luboš Luňák (via logerrit)
 sc/source/core/data/queryiter.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 3fa4220729c707a66b411033e1c068a2091b3fdd
Author: Luboš Luňák 
AuthorDate: Tue Jun 28 17:52:43 2022 +0200
Commit: Luboš Luňák 
CommitDate: Wed Jun 29 09:29:32 2022 +0200

don't try to use self-referencing ScSortedRangeCache (tdf#149752)

Both the documents from the bugreport use COUNTIF where the range
includes the cell itself. So trying to create ScSortedRangeCache
for the range would try to read the values of the cells in the range
including the cell itself, which would try to interpret COUNTIF,
which would recurse and deadlock on the mutex.

Change-Id: I95c33d0b75015dcd1d628740ef52c2d680864791
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136581
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 33f1b7eab3a3550052fb4215de5ab33cea522fa7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136547

diff --git a/sc/source/core/data/queryiter.cxx 
b/sc/source/core/data/queryiter.cxx
index adc6006adf94..b2d43c3ac769 100644
--- a/sc/source/core/data/queryiter.cxx
+++ b/sc/source/core/data/queryiter.cxx
@@ -1259,7 +1259,9 @@ static bool CanBeUsedForSorterCache(ScDocument& rDoc, 
const ScQueryParam& rParam
 if(!inUnitTest)
 return false;
 }
-if( !cell || !cell->GetCellGroup() || cell->GetCellGroup()->mnLength < 10 )
+if( !cell )
+return false;
+if( !cell->GetCellGroup() || cell->GetCellGroup()->mnLength < 10 )
 {
 if(!inUnitTest)
 return false;
@@ -1269,6 +1271,8 @@ static bool CanBeUsedForSorterCache(ScDocument& rDoc, 
const ScQueryParam& rParam
 for(SCCOL col : rDoc.GetAllocatedColumnsRange(nTab, rParam.nCol1, 
rParam.nCol2))
 {
 ScRange aSortedRangeRange( col, rParam.nRow1, nTab, col, rParam.nRow2, 
nTab);
+if( aSortedRangeRange.Contains( cell->aPos ))
+return false; // self-referencing, can't create cache
 ScSortedRangeCache& cache = rDoc.GetSortedRangeCache( 
aSortedRangeRange, rParam, &context );
 if(!cache.isValid())
 return false;


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

2022-06-29 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/ods/tdf149752.ods  |binary
 sc/qa/unit/subsequent_filters_test.cxx |1 +
 2 files changed, 1 insertion(+)

New commits:
commit 2cf8c1d10e719a13afa6a5d9362a60f80e4318ed
Author: Xisco Fauli 
AuthorDate: Tue Jun 28 18:34:58 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 29 09:46:52 2022 +0200

tdf#149752: sc_subsequent_filters_test: Add unittest

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

diff --git a/sc/qa/unit/data/ods/tdf149752.ods 
b/sc/qa/unit/data/ods/tdf149752.ods
new file mode 100644
index ..c939b272693e
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf149752.ods differ
diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index b4b65fac7821..0019b50ce192 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -2965,6 +2965,7 @@ void ScFiltersTest::testFormulaDependency()
 }
 
 void ScFiltersTest::testImportCrashes() {
+testImportCrash(u"tdf149752.", FORMAT_ODS);
 testImportCrash(u"tdf122643.", FORMAT_ODS);
 testImportCrash(u"tdf132278.", FORMAT_ODS);
 testImportCrash(u"tdf130959.", FORMAT_XLSX);


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - shell/source

2022-06-29 Thread Mike Kaganski (via logerrit)
 shell/source/win32/simplemail/smplmailclient.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 9cef4bd3795d9f98a00baaf06005a7b3ac064517
Author: Mike Kaganski 
AuthorDate: Mon Jun 27 10:24:28 2022 +0300
Commit: Xisco Fauli 
CommitDate: Wed Jun 29 10:07:56 2022 +0200

tdf#126263: make sure to convert system path to file URLs

Change-Id: Ia21f29e3a1eb078a7df2366399c59d46ab26ff3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136482
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136490
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136505

diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index 1396bd150066..4b19880d6cc2 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -194,7 +194,11 @@ OUString CSmplMailClient::CopyAttachment(const OUString& 
sOrigAttachURL, OUStrin
 maAttachmentFiles.back()->EnableKillingFile();
 INetURLObject aFilePathObj(maAttachmentFiles.back()->GetURL());
 OUString sNewAttachmentURL = 
aFilePathObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
-if (osl::File::copy(sOrigAttachURL, sNewAttachmentURL) == 
osl::FileBase::RC::E_None)
+OUString sCorrectedOrigAttachURL(sOrigAttachURL);
+// Make sure to convert to URL, if a system path was passed to 
XSimpleMailMessage
+// Ignore conversion error, in which case sCorrectedOrigAttachURL is 
unchanged
+osl::FileBase::getFileURLFromSystemPath(sCorrectedOrigAttachURL, 
sCorrectedOrigAttachURL);
+if (osl::File::copy(sCorrectedOrigAttachURL, sNewAttachmentURL) == 
osl::FileBase::RC::E_None)
 {
 INetURLObject url(sOrigAttachURL, 
INetURLObject::EncodeMechanism::WasEncoded);
 sUserVisibleName = url.getName(INetURLObject::LAST_SEGMENT, true,


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - shell/source

2022-06-29 Thread Mike Kaganski (via logerrit)
 shell/source/win32/simplemail/senddoc.cxx|   38 +++
 shell/source/win32/simplemail/smplmailclient.cxx |   10 --
 shell/source/win32/simplemail/smplmailclient.hxx |2 -
 3 files changed, 35 insertions(+), 15 deletions(-)

New commits:
commit e8a2be942f1c0f9cfb008d4ab81a57a3b3fb8da0
Author: Mike Kaganski 
AuthorDate: Mon Jun 27 12:02:44 2022 +0300
Commit: Xisco Fauli 
CommitDate: Wed Jun 29 10:08:23 2022 +0200

tdf#126263: do not try to delete non-temporary files

Change-Id: I5df7db7eac6224fce833e6b9d4ea220cade44e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136483
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136491
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136506

diff --git a/shell/source/win32/simplemail/senddoc.cxx 
b/shell/source/win32/simplemail/senddoc.cxx
index 3b57684fe821..e34412cbfae1 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -58,8 +58,8 @@ namespace /* private */
 std::vector gTo;
 std::vector gCc;
 std::vector gBcc;
-// Keep temp filepath and displayed name
-std::vector> gAttachments;
+// Keep temp filepath, displayed name, and "do not delete" flag
+std::vector> gAttachments;
 int gMapiFlags = 0;
 }
 
@@ -121,11 +121,12 @@ static void initAttachmentList(MapiAttachmentList_t* 
pMapiAttachmentList)
 {
 OSL_ASSERT(pMapiAttachmentList->empty());
 
-for (const auto& attachment : gAttachments)
+for (const auto& [filepath, attachname, nodelete] : gAttachments)
 {
+(void)nodelete;
 MapiFileDescW mfd;
 ZeroMemory(&mfd, sizeof(mfd));
-mfd.lpszPathName = const_cast(attachment.first.c_str());
+mfd.lpszPathName = const_cast(filepath.c_str());
 // MapiFileDesc documentation 
(https://msdn.microsoft.com/en-us/library/hh707272)
 // allows using here either nullptr, or a pointer to empty string. 
However,
 // for Outlook 2013, we cannot use nullptr here, and must point to a 
(possibly
@@ -134,7 +135,7 @@ static void initAttachmentList(MapiAttachmentList_t* 
pMapiAttachmentList)
 // Since C++11, c_str() must return a pointer to single null character 
when the
 // string is empty, so we are OK here in case when there's no explicit 
file name
 // passed
-mfd.lpszFileName = const_cast(attachment.second.c_str());
+mfd.lpszFileName = const_cast(attachname.c_str());
 mfd.nPosition = sal::static_int_cast(-1);
 pMapiAttachmentList->push_back(mfd);
 }
@@ -239,7 +240,14 @@ static void initParameter(int argc, wchar_t* argv[])
 sName = argv[i+3];
 i += 2;
 }
-gAttachments.emplace_back(sPath, sName);
+// Also there may be --nodelete to keep the attachment on exit
+bool nodelete = false;
+if ((i + 2) < argc && _wcsicmp(argv[i+2], L"--nodelete") == 0)
+{
+nodelete = true;
+++i;
+}
+gAttachments.emplace_back(sPath, sName, nodelete);
 }
 else if (_wcsicmp(argv[i], L"--langtag") == 0)
 gLangTag = o3tl::toU(argv[i+1]);
@@ -401,8 +409,12 @@ int wmain(int argc, wchar_t* argv[])
 }
 
 // Now cleanup the temporary attachment files
-for (const auto& rAttachment : gAttachments)
-DeleteFileW(rAttachment.first.c_str());
+for (const auto& [filepath, attachname, nodelete] : gAttachments)
+{
+(void)attachname;
+if (!nodelete)
+DeleteFileW(filepath.c_str());
+}
 
 // Only show the error message if UI was requested
 if ((ulRet != SUCCESS_SUCCESS) && (gMapiFlags & (MAPI_DIALOG | 
MAPI_LOGON_UI)))
@@ -434,11 +446,13 @@ int wmain(int argc, wchar_t* argv[])
 for (const auto& address : gBcc)
 oss << "--bcc " << address << std::endl;
 
-for (const auto& attachment : gAttachments)
+for (const auto& [filepath, attachname, nodelete] : gAttachments)
 {
-oss << "--attach " << attachment.first << std::endl;
-if (!attachment.second.empty())
-oss << "--attach-name " << attachment.second << std::endl;
+oss << "--attach " << filepath << std::endl;
+if (!attachname.empty())
+oss << "--attach-name " << attachname << std::endl;
+if (nodelete)
+oss << "--nodelete" << std::endl;
 }
 
 if (gMapiFlags & MAPI_DIALOG)
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index 4b19880d6cc2..075eaa34579d 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/sim

[Libreoffice-commits] core.git: compilerplugins/clang external/boost external/clucene external/libmspub vcl/source

2022-06-29 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/reservedid.cxx  |2 +-
 external/boost/UnpackedTarball_boost.mk   |2 ++
 external/boost/libc++.patch.0 |   12 
 external/clucene/Library_clucene.mk   |   10 --
 external/libmspub/ExternalProject_libmspub.mk |   10 +-
 vcl/source/window/layout.cxx  |   17 +
 6 files changed, 49 insertions(+), 4 deletions(-)

New commits:
commit 7e30d784025d2c36c85d8f3defc7740ef8a2fe5a
Author: Stephan Bergmann 
AuthorDate: Tue Jun 28 16:57:14 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 29 10:08:25 2022 +0200

Adapt to LLVM 15 trunk libc++ dropping std::unary_/binary_function

...for C++17 and beyond with


"[libc++] Complete the implementation of N4190".  (Unless explicitly 
opted-in
with _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION.  This is similar 
to the
MSVC standard library needing _HAS_AUTO_PTR_ETC=1 to enable those zombie
functions for quite some time now.  Only libstdc++ still supports them
unconditionally.)

Most uses of those zombie functions across LibreOffice itself and the 
bundled
external/* are indirectly within Boost include files.  And many (but not 
all) of
those Boost include files only use those zombie functions conditionally, 
based
on BOOST_NO_CXX98_FUNCTION_BASE.  For the (Dinkumware-derived) MSVC standard
library, workdir/UnpackedTarball/boost/boost/config/stdlib/dinkumware.hpp
already defined BOOST_NO_CXX98_FUNCTION_BASE.  So add a patch to define that
also in workdir/UnpackedTarball/boost/boost/config/stdlib/libcpp.hpp (for 
all of
C++11 and beyond, even if those functions were still available as 
deprecated in
C++11 and C++14, but which shouldn't make a difference with our C++17 
baseline
anyway; only make sure that things still work if those Boost include files 
ever
get used by code built with gb_CXX03FLAGS).  (Patching our bundled
external/boost of course doesn't help when building with such a new libc++ 
and
--with-system-boost against an unpatched Boost, but lets consider that "not 
my
problem".  Also, one could always use a sledgehammer like passing
CPPFLAGS=-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION into gbuild in
such a case.)

Then there are two places that include boost/multi_array.hpp, which 
indirectly
includes workdir/UnpackedTarball/boost/boost/functional.hpp, which still 
uses
those zombie functions for non-MSVC builds (at least in the bundled
Boost 1.79.0).  Lets do a targeted
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION in those cases.
(Alternatively, we could patch
workdir/UnpackedTarball/boost/boost/functional.hpp.  Also, I decided to make
loplugin:reservedid support the new suppression mechanism, rather than 
extending
its existing ignorelist even further.)

And then there is external/clucene using those zombie functions even 
outside of
a Boost include file, so extend the existing hack there that was already 
needed
for MSVC.  (And adapt the accompanying comment:  For one, we are 
unconditionally
"in C++17 mode" by now.  And for another, the exact places where
external/clucene uses those functions have apparently changed over time.)

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

diff --git a/compilerplugins/clang/reservedid.cxx 
b/compilerplugins/clang/reservedid.cxx
index be0a2f209f71..477f8c3ffda9 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -113,7 +113,7 @@ void ReservedId::postRun() {
 for (;;) {
 if (d->getKind() == MacroDirective::MD_Define) {
 auto loc = d->getLocation();
-if (loc.isValid() && !ignoreLocation(loc)) {
+if (loc.isValid() && !ignoreLocation(loc) && 
!suppressWarningAt(loc)) {
 auto file = getFilenameOfLocation(loc);
 if (!loplugin::isSameUnoIncludePathname(
 file,
diff --git a/external/boost/UnpackedTarball_boost.mk 
b/external/boost/UnpackedTarball_boost.mk
index 91a0e264a926..384782f586f0 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -31,6 +31,8 @@ boost_patches += windows-no-utf8-locales.patch.0
 
 boost_patches += msvc2017.patch.0
 
+boost_patches += libc++.patch.0
+
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))
diff --git a/external/boost/libc++.patch.0 b/external/boost/libc++.patch.0
new file mode 100644
index 0

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

2022-06-29 Thread Attila Bakos (NISZ) (via logerrit)
 sw/inc/textboxhelper.hxx |   11 +++
 sw/qa/extras/uiwriter/data/tdf149550.docx|binary
 sw/qa/extras/uiwriter/uiwriter6.cxx  |   23 +++
 sw/source/core/doc/DocumentLayoutManager.cxx |   65 +
 sw/source/core/doc/textboxhelper.cxx |   81 ++-
 5 files changed, 118 insertions(+), 62 deletions(-)

New commits:
commit cd67e988f27de819a39e75e5243b9b20ba56faab
Author: Attila Bakos (NISZ) 
AuthorDate: Tue Jun 14 10:38:46 2022 +0200
Commit: László Németh 
CommitDate: Wed Jun 29 10:35:53 2022 +0200

tdf#149550 sw: fix crash by implementing nested textbox copy

Grouped shapes with a nested textbox were copied without
the textbox with frequent crashing.

Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834
"tdf#143574 OOXML export/import of textboxes in group shapes".

Change-Id: Ie2cc24f10706d8999026dc92ebad21f2c5673003
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135815
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index d851a0fda7d2..112b312a0dab 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -26,6 +26,7 @@ class SdrObject;
 class SfxItemSet;
 class SwFrameFormat;
 class SwFrameFormats;
+class SwFormatAnchor;
 class SwFormatContent;
 class SwDoc;
 namespace tools
@@ -203,6 +204,8 @@ class SwTextBoxNode
 // (and the textboxes)
 SwFrameFormat* m_pOwnerShapeFormat;
 
+mutable bool m_bIsCloningInProgress;
+
 public:
 // Not needed.
 SwTextBoxNode() = delete;
@@ -250,6 +253,14 @@ public:
 size_t GetTextBoxCount() const { return m_pTextBoxes.size(); };
 // Returns with a const collection of textboxes owned by this node.
 std::map GetAllTextBoxes() const;
+
+void Clone(SwDoc* pDoc, const SwFormatAnchor& rNewAnc, SwFrameFormat* 
o_pTarget, bool bSetAttr,
+   bool bMakeFrame) const;
+
+private:
+void Clone_Impl(SwDoc* pDoc, const SwFormatAnchor& rNewAnc, SwFrameFormat* 
o_pTarget,
+const SdrObject* pSrcObj, SdrObject* pDestObj, bool 
bSetAttr,
+bool bMakeFrame) const;
 };
 
 #endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
diff --git a/sw/qa/extras/uiwriter/data/tdf149550.docx 
b/sw/qa/extras/uiwriter/data/tdf149550.docx
new file mode 100644
index ..3434fc1fff93
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf149550.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index cf37fe5f28ee..b7187568cff4 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -2014,6 +2014,29 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testHatchFill)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(30), getProperty(getShape(1), 
"FillTransparence"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testNestedGroupTextBoxCopyCrash)
+{
+createSwDoc(DATA_DIRECTORY, "tdf149550.docx");
+
+dispatchCommand(mxComponent, ".uno:SelectAll", {});
+Scheduler::ProcessEventsToIdle();
+dispatchCommand(mxComponent, ".uno:Copy", {});
+Scheduler::ProcessEventsToIdle();
+// This crashed here before the fix.
+SwXTextDocument* pXTextDocument = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pXTextDocument);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_ESCAPE);
+Scheduler::ProcessEventsToIdle();
+dispatchCommand(mxComponent, ".uno:Paste", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_MESSAGE("Where is the doc, it crashed, isn't it?!", 
mxComponent);
+
+auto pLayout = parseLayoutDump();
+// There must be 2 textboxes!
+assertXPath(pLayout, "/root/page/body/txt/anchored/fly[2]");
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCaptionShape)
 {
 createSwDoc();
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index 006501b3aa36..a03d5dc1d60d 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -463,67 +463,6 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
 if( bMakeFrames )
 pDest->MakeFrames();
 
-// If the draw format has a TextBox, then copy its fly format as well.
-if (rSource.Which() == RES_DRAWFRMFMT && rSource.GetOtherTextBoxFormats())
-{
-auto pObj = rSource.FindRealSdrObject();
-auto pTextBoxNd = 
std::make_shared(SwTextBoxNode(pDest));
-pDest->SetOtherTextBoxFormats(pTextBoxNd);
-
-if (pObj)
-{
-const bool bIsGroupObj = pObj->getChildrenOfSdrObject();
-for (size_t it = 0;
- it < (bIsGroupObj ? 
pObj->getChildrenOfSdrObject()->GetObjCount() : 1); it++)
-{
-auto pChild = bIsGroupObj ? 
pObj->getChildrenOfSdrObject()->GetObj(it)
-  : const_cast(pObj)

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

2022-06-29 Thread Szymon Kłos (via logerrit)
 sc/source/ui/app/inputwin.cxx |9 ++--
 vcl/jsdialog/executor.cxx |   44 +++---
 2 files changed, 48 insertions(+), 5 deletions(-)

New commits:
commit 850b7a567c9d0812dc612ba21ee804d8bafb6fe1
Author: Szymon Kłos 
AuthorDate: Wed Jun 15 10:02:59 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 29 10:40:01 2022 +0200

jsdialog: formulabar: handle multiline selection

it uses format: "start;end;startPara;endPara"

Change-Id: If3d36550f5e4a35fc04c72114c7719119b10da61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135866
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136597
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 817a68dc044f..395499a683d7 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1774,9 +1774,14 @@ bool ScTextWnd::Command( const CommandEvent& rCEvt )
 if (!m_xEditView)
 return true;
 
+// information about paragraph is in additional data
+// information about position in a paragraph in a Mouse Pos
+// see vcl/jsdialog/executor.cxx "textselection" event
+const Point* pParaPoint = static_cast(rCEvt.GetEventData());
 Point aSelectionStartEnd = rCEvt.GetMousePosPixel();
-m_xEditView->SetSelection(ESelection(0, aSelectionStartEnd.X(),
-0, aSelectionStartEnd.Y()));
+m_xEditView->SetSelection(
+ESelection((pParaPoint ? pParaPoint->X() : 0), 
aSelectionStartEnd.X(),
+   (pParaPoint ? pParaPoint->Y() : 0), 
aSelectionStartEnd.Y()));
 
 SC_MOD()->InputSelection( m_xEditView.get() );
 
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 0145c91f8eee..4489949a91b5 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -210,23 +210,61 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
 }
 else if (sAction == "textselection")
 {
-// start;end
 OUString sTextData = rData["data"];
 int nSeparatorPos = sTextData.indexOf(';');
 if (nSeparatorPos <= 0)
 return true;
 
+int nSeparator2Pos = sTextData.indexOf(';', nSeparatorPos 
+ 1);
+int nSeparator3Pos = 0;
+
+if (nSeparator2Pos > 0)
+{
+// start;end;startPara;endPara
+nSeparator3Pos = sTextData.indexOf(';', nSeparator2Pos 
+ 1);
+if (nSeparator3Pos <= 0)
+return true;
+}
+else
+{
+// start;end
+nSeparator2Pos = 0;
+nSeparator3Pos = 0;
+}
+
 std::u16string_view aStartPos = sTextData.subView(0, 
nSeparatorPos);
-std::u16string_view aEndPos = 
sTextData.subView(nSeparatorPos + 1);
+std::u16string_view aEndPos
+= sTextData.subView(nSeparatorPos + 1, nSeparator2Pos 
- nSeparatorPos + 1);
 
 if (aStartPos.empty() || aEndPos.empty())
 return true;
 
 sal_Int32 nStart = o3tl::toInt32(aStartPos);
 sal_Int32 nEnd = o3tl::toInt32(aEndPos);
+sal_Int32 nStartPara = 0;
+sal_Int32 nEndPara = 0;
+
+// multiline case
+if (nSeparator2Pos && nSeparator3Pos)
+{
+std::u16string_view aStartPara = sTextData.subView(
+nSeparator2Pos + 1, nSeparator3Pos - 
nSeparator2Pos + 1);
+std::u16string_view aEndPara = 
sTextData.subView(nSeparator3Pos + 1);
+
+if (aStartPara.empty() || aEndPara.empty())
+return true;
+
+nStartPara = o3tl::toInt32(aStartPara);
+nEndPara = o3tl::toInt32(aEndPara);
+}
+
+// pass information about paragraph number in the 
additional data
+// handled in sc/source/ui/app/inputwin.cxx
+Point* pParaPoint = new Point(nStartPara, nEndPara);
+const void* pCmdData = pParaPoint;
 
 Point aPos(nStart, nEnd);
-CommandEvent aCEvt(aPos, CommandEventId::CursorPos);
+CommandEvent aCEvt(aPos, CommandEventId::CursorPos, false, 
pCmdData);
 LOKTrigger::command(*pArea, aCEvt);
 
   

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

2022-06-29 Thread Szymon Kłos (via logerrit)
 sc/source/ui/app/inputhdl.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6ab6f7bf61efe7f42161a2d5760763bf39f8795a
Author: Szymon Kłos 
AuthorDate: Fri Jun 24 14:04:03 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 29 10:40:26 2022 +0200

lok: formulabar: send correct caret position for numbers

It fixes the bug:

1. Open spreadsheet and type long numer in some cell (only numbers)
2. Move cell cursor to another cell, then using keyboard go back to the 
previous cell
3. click in formulabar somewhere in the middle of a number
4. try to type one character

result: character was added in correct place but cursor was moved to the 
start
expected: caret will stay at correct place

Change-Id: I514d868dce5478e65d57fd2f350da9777b615e0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136395
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Rashesh Padia 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136598
Tested-by: Jenkins

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9ad38d7d321d..77e2342e6955 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2775,6 +2775,10 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, 
bool bSetModified )
 
 if (comphelper::LibreOfficeKit::isActive() && pActiveViewSh && pInputWin)
 {
+UpdateActiveView();
+if (pActiveView)
+aSel = pActiveView->GetSelection();
+
 ScInputHandler::LOKSendFormulabarUpdate(pActiveViewSh,
 
ScEditUtil::GetMultilineString(*mpEditEngine),
 aSel);


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

2022-06-29 Thread Stephan Bergmann (via logerrit)
 dev/null |binary
 sw/qa/core/text/text.cxx |   68 ---
 sw/source/core/text/guess.cxx|   10 -
 sw/source/core/text/guess.hxx|4 --
 sw/source/core/text/itrcrsr.cxx  |   46 ++
 sw/source/core/text/itrpaint.cxx |1 
 sw/source/core/text/itrtxt.hxx   |1 
 sw/source/core/text/porlin.hxx   |7 
 sw/source/core/text/portxt.cxx   |   20 ---
 sw/source/core/text/portxt.hxx   |1 
 10 files changed, 27 insertions(+), 131 deletions(-)

New commits:
commit 761d3a128214b48645f00e2ff094e0f8928d1ee1
Author: Stephan Bergmann 
AuthorDate: Wed Jun 29 07:54:17 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 29 10:51:11 2022 +0200

Revert "tdf#43100 tdf#104683 tdf#120715 sw: cursor on spaces over margin"

This reverts commit 7ef9c3ef30023cc40068e1f735aa4bec4811288b (plus relevant 
part
of c08d71a0e0015ec7857335b68a354df04fa04a0c "Fix typos" follow-up).  It 
started
to cause  to fail with

> /sw/source/core/text/itrcrsr.cxx:1659:50: runtime error: downcast of 
address 0x60700059b250 which does not point to an object of type 'SwTextPortion'
> 0x60700059b250: note: object is of type 'SwHolePortion'
>  00 00 00 00  90 23 40 a7 6f 7f 00 00  e1 03 00 00 00 00 00 00  0d 01 00 
00 00 00 00 00  00 00 00 00
>   ^~~
>   vptr for 'SwHolePortion'
> #0 0x7f6f9f1777f0 in 
SwTextCursor::GetModelPositionForViewPoint(SwPosition*, Point const&, bool, 
SwCursorMoveState*) const /sw/source/core/text/itrcrsr.cxx:1659:50
> #1 0x7f6f9efc2b39 in SwTextFrame::UnitDown_(SwPaM*, long, bool) const 
/sw/source/core/text/frmcrsr.cxx:1200:49
> #2 0x7f6f9efc5b50 in SwTextFrame::UnitDown(SwPaM*, long, bool) const 
/sw/source/core/text/frmcrsr.cxx:1298:31
> #3 0x7f6f9be4bac8 in SwCursor::UpDown(bool, unsigned short, Point 
const*, long, SwRootFrame&) /sw/source/core/crsr/swcrsr.cxx:2062:31
> #4 0x7f6f9bf0692b in SwShellCursor::UpDown(bool, unsigned short) 
/sw/source/core/crsr/viscrs.cxx:1025:22
> #5 0x7f6f9bb840c0 in SwCursorShell::UpDown(bool, unsigned short) 
/sw/source/core/crsr/crsrsh.cxx:511:29
> #6 0x7f6fa37f131d in SwCursorShell::Down(unsigned short) 
/sw/inc/crsrsh.hxx:359:50
> #7 0x7f6fa37dcfc9 in SwWrtShell::Down(bool, unsigned short, bool) 
/sw/source/uibase/wrtsh/move.cxx:171:27
> #8 0x7f6fb6aa1325 in 
testTdf43100_CursorMoveToSpacesOverMargin::TestBody() 
/sw/qa/core/text/text.cxx:532:20

during CppunitTest_sw_core_text
CPPUNIT_TEST_NAME=testTdf43100_CursorMoveToSpacesOverMargin::TestBody

Change-Id: I37947825ec9db826446ed28fa87a23ee60749b82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136549
Reviewed-by: László Németh 
Tested-by: Jenkins

diff --git 
a/sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docx 
b/sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docx
deleted file mode 100644
index 474d805d893e..
Binary files 
a/sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docx and 
/dev/null differ
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 99d80f649fef..2db4d6dab348 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -470,74 +470,6 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRedlineDelete)
  
pDoc->getIDocumentRedlineAccess().GetRedlineTable().size());
 }
 
-CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testTdf120715_CursorMoveWhenTypingSpaceAtCenteredLineEnd)
-{
-SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, 
"tdf43100_tdf120715_cursorOnSpacesOverMargin.docx");
-SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
-
-// Make a paint to force the call of AddExtraBlankWidth, that calculate 
width for holePortions.
-pDoc->GetDocShell()->GetPreviewBitmap();
-
-// Move the cursor to the last character of the document.
-pWrtShell->EndOfSection();
-
-//Press space and check if the cursor move right with the additional space.
-sal_Int32 nOldCursorPos = pWrtShell->GetCharRect().Left();
-pWrtShell->Insert(" ");
-sal_Int32 nNewCursorPos = pWrtShell->GetCharRect().Left();
-CPPUNIT_ASSERT_GREATER(nOldCursorPos, nNewCursorPos);
-}
-
-CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf43100_CursorMoveToSpacesOverMargin)
-{
-// Test the cursor movement over the right margin in several different 
paragraphs.
-// These differences are based on its paragraphs
-// - alignment (left, center, right, justified),
-// - line count (1 line, 2 lines, blank line containing only spaces)
-SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, 
"tdf43100_tdf120715_cursorOnSpacesOverMargin.docx");
-SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
-
-// Make a paint to force the call of AddExtraBlankWi

Re: Tools module geometry classes

2022-06-29 Thread Luboš Luňák
On Wednesday 29 of June 2022, Chris Sherlock wrote:
> On Wed, Jun 29, 2022 at 9:06 AM Chris Sherlock 
> wrote:
> > On Mon, Jun 27, 2022 at 4:52 PM Miklos Vajna 
> > wrote:
> >> On Mon, Jun 13, 2022 at 01:03:30PM +1000, Chris Sherlock <
> >> chris.sherloc...@gmail.com> wrote:
> >> > Are there any plans for deprecating the usage of the tools geometry
> >> primitives? I understand it will be needed for deserialising some legacy
> >> svm files, but is the intention to ever start replacing the tools
> >> primitives with the basegfx primitives?

 I guess that depends on what exactly you mean by "intention". If you look at 
tools/README.md, it says it's deprecated and "will be removed in the near 
future". Except that comment is from 2013. So presumably the intention has 
always been there, except it's never actually taken place. The common OOo 
pattern of starting to write something new and shiny in order to replace 
something old and then never finishing it.

> >> The trouble with e.g. tools::Rectangle is that it can have both a closed
> >> or a half-open interval, and you need to read the surrounding code to
> >> understand which mode is in use. basegfx::B2IRange is explicitly closed.
> >>
> >> So it would help readability to go with basegfx::B2IRange everywhere,
> >> but it's not an easy hack to do such conversions.

 While tools::Rectangle is indeed completely brain-damaged with that 
open/closed interval problem, I'm not that convinced that basegfx primitives 
are that much better, as they have their own list of dumb things. The size 
class is actually a typedef of the vector class (because everybody totally 
thinks of sizes as vectors, right), the design is ... interesting, so 
e.g. 'point = size;' is perfectly valid code, and the classes have like the 5 
most basic functions implemented and that's it. So even if it weren't for the 
trouble with converting the open/closed problem, the conversion still 
wouldn't be simple and it's a question if it would be an actual improvement 
in the end.

> > Thanks Miklos. I read the comment above the Rectangle header definition
> > which starts with "Note: this class is a true marvel of engineering:
> > because the author could not decide whether it's better to have a closed
> > or half-open interval, they just implemented *both* in the same class!"
> >
> > What is the feasibility of changing this class to be only explicitly
> > closed?

 Next to impossible, I'm afraid. I had a look at it in the past 
(https://lists.freedesktop.org/archives/libreoffice/2020-March/084702.html), 
and IIRC the summary is that the open/closed interval problem is not a 
technical problem. The class uses open or closed interval depending on the 
intention of the developer. Some functions assume one or another, but some 
work for both and you basically can't tell which one it is unless you know. I 
expect there is even code that mixes that for one rectangle instance. So it 
is my understanding that you cannot fix that with code, it can be fixed only 
by declaring how it's supposed to be used.

 BTW, it's also worth noting that the linked to discussion basically points 
out that people apparently even can't agree on what a rectangle class 
actually should look like. I rather quickly gave up on it and decided I could 
spend my time better.

> > Is this the main issue with not converting over to basegfx?

 I would say it's a big part, since you'd need to decipher whether each usage 
of tools::Rectangle assumes open or closed intervals. Or you'd need to guess 
and then fix the fallout and hope there wouldn't be much broken that'd go 
undetected. Which would be presumably a tremendous amount of work, and also 
boring, obnoxious, error-prone and whatnot.

 But as I wrote above, I see more problems with the conversion than just this.

> A quick followup - I have changed the getWidth() and getHeight() functions
> in tools::Rectangle to getHalfOpenWidth/getHalfOpenHeight() - it seems
> needlessly confusing to have functions with the same name except
> capitalizing the first letter (!!) and have differing functionality.
>
> The gerrit commit is here:
>
> https://gerrit.libreoffice.org/c/core/+/136575
>
> Is this reasonable?

 I think getHalfOpenWidth() is too long, the 'half' part can be dropped.

 But while this is an improvement for the class, it doesn't really change much 
about it still being broken as such. The class itself will still be confusing 
to use, other function will still be unclear on what they assume, etc.

 So I think a good question to ask is what it is you want to achieve and how 
much time and energy are you willing to spend on it. I don't want to 
demoralize or stop you, it certainly would be really nice if this madness 
finally got sorted out, it's just that it hasn't got sorted out yet because 
nobody so far has been willing to give it all the effort it'd need.

-- 
 Luboš Luňák
 l.lu...@collabora.com


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

2022-06-29 Thread Noel Grandin (via logerrit)
 svl/source/items/itemset.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit ff6fc9927241afe4dc95580bf6bb987fe62a191d
Author: Noel Grandin 
AuthorDate: Wed Jun 29 10:36:30 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 29 11:53:21 2022 +0200

tdf#117539 Assert after cut and paste operation of a chart stick

inline the call to the other constructor, and remove the
assert(size() != 0)
it appears to be valid to have a size of zero here

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

diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 982cbc837898..50af12fee107 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -45,8 +45,13 @@
  * Don't create ItemSets with full range before FreezeIdRanges()!
  */
 SfxItemSet::SfxItemSet(SfxItemPool& rPool)
-: SfxItemSet(rPool, rPool.GetFrozenIdRanges())
+: m_pPool(&rPool), m_pParent(nullptr),
+m_ppItems(new SfxPoolItem const 
*[svl::detail::CountRanges(rPool.GetFrozenIdRanges())]{}),
+m_pWhichRanges(rPool.GetFrozenIdRanges()),
+m_nCount(0),
+m_bItemsFixed(false)
 {
+assert(svl::detail::validRanges2(m_pWhichRanges));
 }
 
 SfxItemSet::SfxItemSet( SfxItemPool& rPool, SfxAllItemSetFlag )


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

2022-06-29 Thread Miklos Vajna (via logerrit)
 sd/qa/unit/uiimpress.cxx   |   15 +++
 sd/source/ui/view/drviews2.cxx |   34 ++
 2 files changed, 33 insertions(+), 16 deletions(-)

New commits:
commit c09eb0f74c0a110e4a4cfc4783b59883aad30475
Author: Miklos Vajna 
AuthorDate: Wed Jun 29 08:55:17 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 12:33:34 2022 +0200

tdf#149748 sd theme: fix crash on selecting none from color bar

Opening Impress, going to view -> color bar to enable it and then
clicking on "none" resulted in a crash.

This went wrong in commit f5db3b12ae1cd3bfe6ee5d260aec9532cc65f2dc (sd
theme: add UI (sidebar) for shape fill color, 2022-04-06), where I
assumed that in case the slot is a SID_ATTR_FILL_COLOR, then its item
set also has a SID_ATTR_FILL_COLOR key. This is usually true, but not in
case of "no color" (i.e. transparent).

Fix the problem by just skipping theming metadata for such a color.

It seems to me that the color set of a theme is not allowed to contain
such "no color" colors, so this should be safe.

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

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 2433d7c4cb73..b309b4e4754f 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -1008,6 +1008,21 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme)
 CPPUNIT_ASSERT_EQUAL(static_cast(6000), nFillColorLumOff);
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorNoColor)
+{
+// Given an empty Impress document:
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+sd::ViewShell* pViewShell = 
pImpressDocument->GetDocShell()->GetViewShell();
+SfxDispatcher* pDispatcher = pViewShell->GetViewFrame()->GetDispatcher();
+
+// When dispatching a fill color that only has a fill style (no color), 
then make sure we don't
+// crash:
+XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
+pDispatcher->ExecuteList(SID_ATTR_FILL_COLOR, SfxCallMode::RECORD, { 
&aXFillStyleItem });
+}
+
 CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696)
 {
 mxComponent = loadFromDesktop("private:factory/simpress",
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d7a6bc6a2c78..39f5458bfcd6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -599,24 +599,26 @@ public:
 {
 // Merge the color parameters to the color itself.
 const XFillColorItem* pColorItem = static_cast(pArgs->GetItem(SID_ATTR_FILL_COLOR));
-assert(pColorItem);
-XFillColorItem aColorItem(*pColorItem);
-if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, &pItem) 
== SfxItemState::SET)
+if (pColorItem)
 {
-auto pIntItem = static_cast(pItem);
-aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
-}
-if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) == 
SfxItemState::SET)
-{
-auto pIntItem = static_cast(pItem);
-aColorItem.GetThemeColor().SetLumMod(pIntItem->GetValue());
-}
-if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) == 
SfxItemState::SET)
-{
-auto pIntItem = static_cast(pItem);
-aColorItem.GetThemeColor().SetLumOff(pIntItem->GetValue());
+XFillColorItem aColorItem(*pColorItem);
+if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, 
&pItem) == SfxItemState::SET)
+{
+auto pIntItem = static_cast(pItem);
+
aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
+}
+if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) 
== SfxItemState::SET)
+{
+auto pIntItem = static_cast(pItem);
+aColorItem.GetThemeColor().SetLumMod(pIntItem->GetValue());
+}
+if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) 
== SfxItemState::SET)
+{
+auto pIntItem = static_cast(pItem);
+aColorItem.GetThemeColor().SetLumOff(pIntItem->GetValue());
+}
+pArgs->Put(aColorItem);
 }
-pArgs->Put(aColorItem);
 }
 }
 }


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

2022-06-29 Thread Szymon Kłos (via logerrit)
 sc/source/ui/app/inputhdl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7fc989c564accbc1678628c9bda988ad06426105
Author: Szymon Kłos 
AuthorDate: Tue Jun 14 16:59:32 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 29 12:42:36 2022 +0200

jsdialog: formulabar: send also paragraph number for multiline formula

Change-Id: Ia146be83f0ac6f3fbc94d5a904b8067ac8b2a8d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135833
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136596
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 77e2342e6955..5cae17a057df 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1794,7 +1794,8 @@ void ScInputHandler::LOKSendFormulabarUpdate(const 
SfxViewShell* pActiveViewSh,
  const ESelection& rSelection)
 {
 OUString aSelection =
-OUString::number(rSelection.nStartPos) + ";" + 
OUString::number(rSelection.nEndPos);
+OUString::number(rSelection.nStartPos) + ";" + 
OUString::number(rSelection.nEndPos) + ";" +
+OUString::number(rSelection.nStartPara) + ";" + 
OUString::number(rSelection.nEndPara);
 
 std::unique_ptr pData = 
std::make_unique();
 (*pData)["action_type"] = "setText";


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

2022-06-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 001d9a20ae3607e618a8fb0889ab2f2bcb612f4f
Author: Szymon Kłos 
AuthorDate: Thu Jun 9 17:41:15 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 29 12:42:52 2022 +0200

jsdialog: toggle toolbox buttons correctly

Change-Id: Ic02f9ceab29257ebc4cb6261aae10c4f1a7ef176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135562
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
(cherry picked from commit b6b7b3a5a46790baf2266aaeb10976753dfe0fce)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135539
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136605
Tested-by: Jenkins

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 4489949a91b5..24a5f9ba596d 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -314,8 +314,9 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
 }
 else if (sAction == "togglemenu")
 {
-pToolbar->set_menu_item_active(
-OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US), true);
+OString sId = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
+bool bIsActive = pToolbar->get_menu_item_active(sId);
+pToolbar->set_menu_item_active(sId, !bIsActive);
 return true;
 }
 }


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

2022-06-29 Thread Noel Grandin (via logerrit)
 svl/source/items/itemset.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c71e26b4cf6181791acff4017f661edb3523c70e
Author: Noel Grandin 
AuthorDate: Wed Jun 29 10:06:04 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 29 13:03:40 2022 +0200

elide unnecessary copy in SfxItemSet constructor

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

diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 50af12fee107..93721dd756f2 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -97,8 +97,14 @@ SfxItemSet::SfxItemSet(SfxItemPool& pool, const 
WhichRangesContainer& wids)
 }
 
 SfxItemSet::SfxItemSet(SfxItemPool& pool, WhichRangesContainer&& wids)
-: SfxItemSet(pool, wids, svl::detail::CountRanges(wids))
+: m_pPool(&pool), m_pParent(nullptr),
+m_ppItems(new SfxPoolItem const *[svl::detail::CountRanges(wids)]{}),
+m_pWhichRanges(std::move(wids)),
+m_nCount(0),
+m_bItemsFixed(false)
 {
+assert(svl::detail::CountRanges(m_pWhichRanges) != 0);
+assert(svl::detail::validRanges2(m_pWhichRanges));
 }
 
 SfxItemSet::SfxItemSet( const SfxItemSet& rASet )


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

2022-06-29 Thread Attila Bakos (NISZ) (via logerrit)
 sw/inc/textboxhelper.hxx |   11 +++
 sw/qa/extras/uiwriter/data/tdf149550.docx|binary
 sw/qa/extras/uiwriter/uiwriter6.cxx  |   23 +++
 sw/source/core/doc/DocumentLayoutManager.cxx |   65 +
 sw/source/core/doc/textboxhelper.cxx |   81 ++-
 5 files changed, 118 insertions(+), 62 deletions(-)

New commits:
commit 56b3fb0cc14af8dd2a1ddaee4566cbf53fe05c4c
Author: Attila Bakos (NISZ) 
AuthorDate: Tue Jun 14 10:38:46 2022 +0200
Commit: László Németh 
CommitDate: Wed Jun 29 13:06:06 2022 +0200

tdf#149550 sw: fix crash by implementing nested textbox copy

Grouped shapes with a nested textbox were copied without
the textbox with frequent crashing.

Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834
"tdf#143574 OOXML export/import of textboxes in group shapes".

Change-Id: Ie2cc24f10706d8999026dc92ebad21f2c5673003
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135815
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit a94edb7f9b8987518a1757a873d2c1fc94efa327)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136550
Tested-by: Jenkins

diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index d851a0fda7d2..112b312a0dab 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -26,6 +26,7 @@ class SdrObject;
 class SfxItemSet;
 class SwFrameFormat;
 class SwFrameFormats;
+class SwFormatAnchor;
 class SwFormatContent;
 class SwDoc;
 namespace tools
@@ -203,6 +204,8 @@ class SwTextBoxNode
 // (and the textboxes)
 SwFrameFormat* m_pOwnerShapeFormat;
 
+mutable bool m_bIsCloningInProgress;
+
 public:
 // Not needed.
 SwTextBoxNode() = delete;
@@ -250,6 +253,14 @@ public:
 size_t GetTextBoxCount() const { return m_pTextBoxes.size(); };
 // Returns with a const collection of textboxes owned by this node.
 std::map GetAllTextBoxes() const;
+
+void Clone(SwDoc* pDoc, const SwFormatAnchor& rNewAnc, SwFrameFormat* 
o_pTarget, bool bSetAttr,
+   bool bMakeFrame) const;
+
+private:
+void Clone_Impl(SwDoc* pDoc, const SwFormatAnchor& rNewAnc, SwFrameFormat* 
o_pTarget,
+const SdrObject* pSrcObj, SdrObject* pDestObj, bool 
bSetAttr,
+bool bMakeFrame) const;
 };
 
 #endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
diff --git a/sw/qa/extras/uiwriter/data/tdf149550.docx 
b/sw/qa/extras/uiwriter/data/tdf149550.docx
new file mode 100644
index ..3434fc1fff93
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf149550.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index cf37fe5f28ee..b7187568cff4 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -2014,6 +2014,29 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testHatchFill)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(30), getProperty(getShape(1), 
"FillTransparence"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testNestedGroupTextBoxCopyCrash)
+{
+createSwDoc(DATA_DIRECTORY, "tdf149550.docx");
+
+dispatchCommand(mxComponent, ".uno:SelectAll", {});
+Scheduler::ProcessEventsToIdle();
+dispatchCommand(mxComponent, ".uno:Copy", {});
+Scheduler::ProcessEventsToIdle();
+// This crashed here before the fix.
+SwXTextDocument* pXTextDocument = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pXTextDocument);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_ESCAPE);
+Scheduler::ProcessEventsToIdle();
+dispatchCommand(mxComponent, ".uno:Paste", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_MESSAGE("Where is the doc, it crashed, isn't it?!", 
mxComponent);
+
+auto pLayout = parseLayoutDump();
+// There must be 2 textboxes!
+assertXPath(pLayout, "/root/page/body/txt/anchored/fly[2]");
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCaptionShape)
 {
 createSwDoc();
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index 006501b3aa36..a03d5dc1d60d 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -463,67 +463,6 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
 if( bMakeFrames )
 pDest->MakeFrames();
 
-// If the draw format has a TextBox, then copy its fly format as well.
-if (rSource.Which() == RES_DRAWFRMFMT && rSource.GetOtherTextBoxFormats())
-{
-auto pObj = rSource.FindRealSdrObject();
-auto pTextBoxNd = 
std::make_shared(SwTextBoxNode(pDest));
-pDest->SetOtherTextBoxFormats(pTextBoxNd);
-
-if (pObj)
-{
-const bool bIsGroupObj = pObj->getChildrenOfSdrObject();
-for (size_t it = 0;
- it < (bIsGroupObj ? 
pObj->getChildrenOfSdrObject()->GetObjCount() : 1); it++)
-

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - 2 commits - shell/source

2022-06-29 Thread Mike Kaganski (via logerrit)
 shell/source/win32/simplemail/senddoc.cxx|   38 +++
 shell/source/win32/simplemail/smplmailclient.cxx |   16 +++--
 shell/source/win32/simplemail/smplmailclient.hxx |2 -
 3 files changed, 40 insertions(+), 16 deletions(-)

New commits:
commit 859902189d67a85c3172bf0fc4d038fe8611fe82
Author: Mike Kaganski 
AuthorDate: Mon Jun 27 12:02:44 2022 +0300
Commit: Gabor Kelemen 
CommitDate: Wed Jun 29 11:47:54 2022 +0100

tdf#126263: do not try to delete non-temporary files

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

diff --git a/shell/source/win32/simplemail/senddoc.cxx 
b/shell/source/win32/simplemail/senddoc.cxx
index 3b57684fe821..e34412cbfae1 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -58,8 +58,8 @@ namespace /* private */
 std::vector gTo;
 std::vector gCc;
 std::vector gBcc;
-// Keep temp filepath and displayed name
-std::vector> gAttachments;
+// Keep temp filepath, displayed name, and "do not delete" flag
+std::vector> gAttachments;
 int gMapiFlags = 0;
 }
 
@@ -121,11 +121,12 @@ static void initAttachmentList(MapiAttachmentList_t* 
pMapiAttachmentList)
 {
 OSL_ASSERT(pMapiAttachmentList->empty());
 
-for (const auto& attachment : gAttachments)
+for (const auto& [filepath, attachname, nodelete] : gAttachments)
 {
+(void)nodelete;
 MapiFileDescW mfd;
 ZeroMemory(&mfd, sizeof(mfd));
-mfd.lpszPathName = const_cast(attachment.first.c_str());
+mfd.lpszPathName = const_cast(filepath.c_str());
 // MapiFileDesc documentation 
(https://msdn.microsoft.com/en-us/library/hh707272)
 // allows using here either nullptr, or a pointer to empty string. 
However,
 // for Outlook 2013, we cannot use nullptr here, and must point to a 
(possibly
@@ -134,7 +135,7 @@ static void initAttachmentList(MapiAttachmentList_t* 
pMapiAttachmentList)
 // Since C++11, c_str() must return a pointer to single null character 
when the
 // string is empty, so we are OK here in case when there's no explicit 
file name
 // passed
-mfd.lpszFileName = const_cast(attachment.second.c_str());
+mfd.lpszFileName = const_cast(attachname.c_str());
 mfd.nPosition = sal::static_int_cast(-1);
 pMapiAttachmentList->push_back(mfd);
 }
@@ -239,7 +240,14 @@ static void initParameter(int argc, wchar_t* argv[])
 sName = argv[i+3];
 i += 2;
 }
-gAttachments.emplace_back(sPath, sName);
+// Also there may be --nodelete to keep the attachment on exit
+bool nodelete = false;
+if ((i + 2) < argc && _wcsicmp(argv[i+2], L"--nodelete") == 0)
+{
+nodelete = true;
+++i;
+}
+gAttachments.emplace_back(sPath, sName, nodelete);
 }
 else if (_wcsicmp(argv[i], L"--langtag") == 0)
 gLangTag = o3tl::toU(argv[i+1]);
@@ -401,8 +409,12 @@ int wmain(int argc, wchar_t* argv[])
 }
 
 // Now cleanup the temporary attachment files
-for (const auto& rAttachment : gAttachments)
-DeleteFileW(rAttachment.first.c_str());
+for (const auto& [filepath, attachname, nodelete] : gAttachments)
+{
+(void)attachname;
+if (!nodelete)
+DeleteFileW(filepath.c_str());
+}
 
 // Only show the error message if UI was requested
 if ((ulRet != SUCCESS_SUCCESS) && (gMapiFlags & (MAPI_DIALOG | 
MAPI_LOGON_UI)))
@@ -434,11 +446,13 @@ int wmain(int argc, wchar_t* argv[])
 for (const auto& address : gBcc)
 oss << "--bcc " << address << std::endl;
 
-for (const auto& attachment : gAttachments)
+for (const auto& [filepath, attachname, nodelete] : gAttachments)
 {
-oss << "--attach " << attachment.first << std::endl;
-if (!attachment.second.empty())
-oss << "--attach-name " << attachment.second << std::endl;
+oss << "--attach " << filepath << std::endl;
+if (!attachname.empty())
+oss << "--attach-name " << attachname << std::endl;
+if (nodelete)
+oss << "--nodelete" << std::endl;
 }
 
 if (gMapiFlags & MAPI_DIALOG)
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index 4919ded7f889..ff4b7443ef73 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -193,7 +193,8 @@ const OUString& GetBaseTempDirURL()
 }
 }
 
-OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, 
OUString& sUserVisibl

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

2022-06-29 Thread Justin Luth (via logerrit)
 sw/source/core/crsr/swcrsr.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 0031f34d0ba99de5384e13843e99ffbb01f729d0
Author: Justin Luth 
AuthorDate: Thu Jun 9 20:53:57 2022 -0400
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 13:24:34 2022 +0200

tdf#145151 tdf#119540 sw IsTableMode: deselect unselected cell

So far I have been playing whack-a-mole fixing the case where
selecting table cells backwards leaves one cell seemingly
still selected when applying paragraph properties.

This patch seems to fix the underlying selection problem,
meaning that the other patches can be reverted,
and their unit tests become proof for this patch.

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

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index c5061c42f854..da1f1f5046f6 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2434,7 +2434,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* 
pCurrentCursor )
 // compare old and new ones
 SwNodes& rNds = pCurrentCursor->GetDoc().GetNodes();
 const SwStartNode* pSttNd;
-SwPaM* pCur = pCurrentCursor;
+SwCursor* pCur = pCurrentCursor;
 do {
 size_t nPos;
 bool bDel = false;
@@ -2473,7 +2473,9 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* 
pCurrentCursor )
 pCur = pCur->GetNext();
 if( bDel )
 {
-SwPaM* pDel = pCur->GetPrev();
+SwCursor* pDel = pCur->GetPrev();
+if (pDel == dynamic_cast(pCurrentCursor))
+pCurrentCursor = pDel->GetPrev();
 
 if( pDel == pCurrentCursor )
 pCurrentCursor->DeleteMark();


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

2022-06-29 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/utlui/content.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a440d93d2817b908643f0af9e53479fe91286905
Author: Caolán McNamara 
AuthorDate: Wed Jun 29 08:46:38 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 29 13:28:05 2022 +0200

cid#1506710 Unchecked return value

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

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index beae047b4f37..132eecd13aa1 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3901,7 +3901,8 @@ void SwContentTree::UpdateTracking()
 {
 if (m_xTreeView->get_iter_depth(*xIter) == 0)
 break;
-m_xTreeView->iter_previous(*xIter);
+if (!m_xTreeView->iter_previous(*xIter))
+break;
 while (!weld::IsEntryVisible(*m_xTreeView, *xIter))
 m_xTreeView->iter_parent(*xIter);
 }


[Libreoffice-commits] core.git: configure.ac

2022-06-29 Thread Christian Lohmaier (via logerrit)
 configure.ac |   48 
 1 file changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 2f5b54ba51157a2346e10dfb82e3d434d6030aaa
Author: Christian Lohmaier 
AuthorDate: Tue Jun 21 13:45:00 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 13:54:31 2022 +0200

allow pretty names in --enable-macosx-code/package-signing

also reorder the logic to avoid duplicating the matches for default
value and manually provided one.

Change-Id: I4466cbeaf5abd7168f21e22cd910f63568c14e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136224
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/configure.ac b/configure.ac
index 2963f05e3326..f66a1392fd45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3547,16 +3547,22 @@ if test $_os = Darwin; then
 
 AC_MSG_CHECKING([whether to do code signing])
 
-if test "$enable_macosx_code_signing" = yes; then
-# By default use the first suitable certificate (?).
-
-# 
http://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
-# says that the "Mac Developer" certificate is useful just for 
self-testing. For distribution
-# outside the Mac App Store, use the "Developer ID Application" one, 
and for distribution in
-# the App Store, the "3rd Party Mac Developer" one. I think it works 
best to the
-# "Developer ID Application" one.
+if test -z "$enable_macosx_code_signing" -o "$enable_macosx_code_signing" 
== "no" ; then
+AC_MSG_RESULT([no])
+else
+if test "$enable_macosx_code_signing" = yes; then
+# By default use the first suitable certificate (?).
 
-identity=`security find-identity -p codesigning -v 2>/dev/null | grep 
'Developer ID Application:' | $AWK '{print $2}' |head -1`
+# 
http://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
+# says that the "Mac Developer" certificate is useful just for 
self-testing. For distribution
+# outside the Mac App Store, use the "Developer ID Application" 
one, and for distribution in
+# the App Store, the "3rd Party Mac Developer" one. I think it 
works best to the
+# "Developer ID Application" one.
+identity="Developer ID Application:"
+else
+identity=$enable_macosx_code_signing
+fi
+identity=`security find-identity -p codesigning -v 2>/dev/null | $AWK 
"/$identity/{print \\$2; exit}"`
 if test -n "$identity"; then
 MACOSX_CODESIGNING_IDENTITY=$identity
 pretty_name=`security find-identity -p codesigning -v | grep 
"$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
@@ -3564,12 +3570,6 @@ if test $_os = Darwin; then
 else
 AC_MSG_ERROR([cannot determine identity to use])
 fi
-elif test -n "$enable_macosx_code_signing" -a 
"$enable_macosx_code_signing" != no ; then
-MACOSX_CODESIGNING_IDENTITY=$enable_macosx_code_signing
-pretty_name=`security find-identity -p codesigning -v | grep 
"$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
-AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY 
for $pretty_name])
-else
-AC_MSG_RESULT([no])
 fi
 
 AC_MSG_CHECKING([whether to create a Mac App Store package])
@@ -3578,11 +3578,15 @@ if test $_os = Darwin; then
 AC_MSG_RESULT([no])
 elif test -z "$MACOSX_CODESIGNING_IDENTITY"; then
 AC_MSG_ERROR([You forgot --enable-macosx-code-signing])
-elif test "$enable_macosx_package_signing" = yes; then
-# By default use the first suitable certificate.
-# It should be a "3rd Party Mac Developer Installer" one
-
-identity=`security find-identity -v 2>/dev/null | grep '3rd Party Mac 
Developer Installer:' | awk '{print $2}' |head -1`
+else
+if test "$enable_macosx_package_signing" = yes; then
+# By default use the first suitable certificate.
+# It should be a "3rd Party Mac Developer Installer" one
+identity="3rd Party Mac Developer Installer:"
+else
+identity=$enable_macosx_package_signing
+fi
+identity=`security find-identity -v 2>/dev/null | $AWK "/$identity/ 
{print \\$2; exit}"`
 if test -n "$identity"; then
 MACOSX_PACKAGE_SIGNING_IDENTITY=$identity
 pretty_name=`security find-identity -v | grep 
"$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
@@ -3590,10 +3594,6 @@ if test $_os = Darwin; then
 else
 AC_MSG_ERROR([Could not find any suitable '3rd Party Mac Developer 
Installer' certificate])
 fi
-else
-MACOSX_PACKAGE_SIGNING_IDENTITY=$enable_macosx_package_signing
-pretty_name=`secur

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

2022-06-29 Thread László Németh (via logerrit)
 sw/qa/extras/layout/data/tdf115524.fodt |   44 
 sw/qa/extras/layout/layout2.cxx |   21 +++
 sw/source/core/txtnode/ndtxt.cxx|7 +
 3 files changed, 72 insertions(+)

New commits:
commit 508ed558948353a3eb8be9adf3588368e440f4cf
Author: László Németh 
AuthorDate: Tue Jun 28 11:20:45 2022 +0200
Commit: László Németh 
CommitDate: Wed Jun 29 14:32:12 2022 +0200

tdf#115524 sw_redlinenum: show original numbering of insertions

in Show Changes mode, according to the name "Show Changes" and
according to the interoperability requirements.

Follow-up to commit 2413f213625253a9c2b1787b3b9fe859d724a9bd
"tdf#115523 sw_redlinenum: show correct, also original numbering"
and commit d3b0fb222f96964d7bd2b82fe20e1547f731b7a6
"tdf#149710 sw_redlinenum: update numbering at deletion".

Change-Id: I32476baa3daa73b48f9398282cbe7837d95b0a04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136562
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 05312bbcaf7c0a8b58b1e8b9f107261933e9a31b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136536

diff --git a/sw/qa/extras/layout/data/tdf115524.fodt 
b/sw/qa/extras/layout/data/tdf115524.fodt
new file mode 100644
index ..4e589ad9a1a4
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf115524.fodt
@@ -0,0 +1,44 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+   
+  
+  
+   
+
+ 
+
+   
+  
+ 
+ 
+  
+   
+
+ 
+  
+   Unknown Author
+   2022-06-27T14:35:42
+  
+ 
+
+   
+   
+
+ Item
+
+
+ Item
+
+
+ New item
+
+
+ Item
+
+   
+  
+ 
+
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 66941abc4269..08160784a4d0 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -332,6 +332,27 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineNumbering)
 assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[5]/text", 
"2.[3.] ");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineNumbering2)
+{
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf115524.fodt");
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+
+// Show the correct and the original line numbering in Show Changes mode
+assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[1]/text", 
"1.");
+assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[3]/text", 
"2.");
+// FIXME: show as 3.[2.]
+assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[5]/text", 
"3.");
+// This was "4." (not shown the original number)
+assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[7]/text", 
"4.[3.] ");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf149710_RedlineNumberingEditing)
 {
 SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf149710.fodt");
d

Re: Need help with ScLookupCache

2022-06-29 Thread Winfried Donkers

Luboš, Eike,

Op 21-06-2022 om 15:12 schreef Winfried Donkers:
Am I correct when stating that ScLookupCache currently cannot cope 
with the

combinations
  eOp SC_GREATER_EQUAL and sorted in ascending order
and
  eOp SC_LESSER_EQUAL and sorted in descending order?


As Luboš already said, ScLookupCache just caches results of lookups, to
be able to reuse them for same lookups with further columns. Using the
same for example SC_GREATER_EQUAL operator with different ascending or
descending sort orders should however invalidate the cache for that
position, so you'll probably also need to take the sort order into
account in ScLookupCache::QueryCriteria and ScLookupCache::QueryKey.

That could be accomplished without adding an extra field if the
ScLookupCache::QueryOp simply would have different values for
SC_GREATER_EQUAL ascending or descending, similar for SC_LESS_EQUAL; so
just add them and map accordingly in the
ScLookupCache::QueryCriteria::QueryCriteria() ctor. You'll probably need
to add some flag to ScQueryEntry anyway.


It is the function BinarySearch in sc/source/core/data/queryiter.cxx 
that presents 'challenges'.
Currently its search direction (and probably whether the cells are 
ordered or not and in which direction) depends on rEntry.eOp.
For MATCH, LOOKUP, HLOOKUP and VLOOKUP this is OK, for XLOOKUP this is 
quite different.
XLOOKUP has 4 search modes (forwards and backwards (data not sorted) as 
well as ascending and descending (data sorted) and 4 match modes of 
which 3 are relevant here ( exact match (SC_EQUAL), exact or less 
(SC_LESS_EQUAL, exact or greater (SC_GREATER_EQUAL) and wildcard ( 
SC_EQUAL with wildcard/regexp enabled)). The search modes and match 
modes can be used in any combination.


Incorporating this in BinarySearch will be a lot of work and probably 
reduce performance for all other uses than XLOOKUP.
I tend to make an XBinarySearch function that will be called from 
BinarySearch when an XLOOKUPIndicator is true. I hope to be able to use 
BinarySearch as foundation and expand it for XLOOKUP.


I wonder if this is a wise way to go or whether there are better 
alternative solutions?


Winfried


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

2022-06-29 Thread Seth Chaiklin (via logerrit)
 AllLangHelp_shared.mk  |2 
 source/text/shared/00/00040500.xhp |  173 +
 source/text/shared/01/05110600m.xhp|   27 +--
 source/text/shared/01/05120600.xhp |   32 +---
 source/text/shared/01/minimal_column_width.xhp |   66 +
 source/text/shared/01/minimal_row_height.xhp   |   45 ++
 source/text/shared/02/0421.xhp |   29 ++--
 source/text/swriter/00/0405.xhp|   75 --
 source/text/swriter/01/0511.xhp|   18 +-
 source/text/swriter/01/05110100.xhp|   14 --
 source/text/swriter/01/05110200.xhp|   29 ++--
 source/text/swriter/01/0512.xhp|   13 -
 source/text/swriter/01/05120200.xhp|   56 +++-
 source/text/swriter/guide/table_sizing.xhp |   30 ++--
 source/text/swriter/main0110.xhp   |   16 +-
 15 files changed, 429 insertions(+), 196 deletions(-)

New commits:
commit b6a8105c3ceb14f1216a12dbbe4b191acc0b99f3
Author: Seth Chaiklin 
AuthorDate: Thu May 26 15:01:15 2022 +0200
Commit: Olivier Hallot 
CommitDate: Wed Jun 29 14:46:05 2022 +0200

tdf#120550,tdf#121367 update row and column resizing in tables

  This patch is a general review and update of commands to
  optimize the size of tables in Writer, Draw, and Impress.
  Thanks to Justin Luth for essential help in making accurate
  descriptions of these commands. It also started to improve
  the maintenance by moving the access commands and icon tables
  from diverse places to a shared/00 folder, introducing variables
  and sections that would allow reusing relevant sequences.

 shared/02/0421.xhp  (Optimize Size menu)
  * add two missing controls as embeds from swriter/main0110.xhp
  * add icon tables for the two controls
  * correction to control name
  * modify switch to include Draw and Impress
  * put controls in same order as dropdown menu
  + add variable to h1, so page can be embedded in related topics
  * update to renamed ids
  * change image size to 1cm
  * refactor to ,

 shared/00/00040500.xhp
   + add  to "Open Optimize Size..." (i.e., for opening
 dropdown menu in Table bar), so it can be embedded into each
 page for the individual controls.
   * use access controls from swriter/00/0405.xhp, plus add
 appl-switch
   * update access for Table menu

  swriter/00/0405.xhp  (Access commands for Size)
   * move all relevant access commands to shared/00/00040500.xhp

 swriter/01/0511.xhp (Row)
  * correction to two command names
  * update to renamed id
  * refactor to ,

 swriter/01/05120200.xhp (Optimal Column Width)
  * update command name
  + add  with two links
  * rename German id
  * refactor to 

 swriter/01/05110200.xhp (Optimal Row Height)
  * update command name
  * rename German id
  + add  with two links
  * refactor to ,

 shared/01/05120600.xhp  (Distribute Columns Equally)
  * corrections to description of the command operation
  + additional information about how to select
  + add "right-click" instructions to "howtoget"
  + add link to "Optimize Size" menu and "Table" bar
  + add  with two links
  * rename German id
  * refactor to , changed paragraphs to 
  * image size to 1cm

 shared/01/05110600m.xhp  (Distribute Rows Equally)
  + add link to "Optimize Size" menu
  + add  with two links
  * rename German id
  * refactor to , changed paragraphs to 
  * image size to 1cm

 swriter/main0110.xhp  (Table menu page)
  * update renamed ids
  + add sections to text in Minimal Row Height
and Minimal Column Width, so that they
can be embedded into "Optimize Size"
menu page.

 swriter/guide/table_sizing.xhp
  + add links to "Optimize Size" and "Table" bar in text.
  + add "Optimize Size" to Related Topics
  * refactor to ,,

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

diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index d430f2032..d98cfdec1 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -351,6 +351,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 helpcontent2/source/text/shared/01/mediaplayer \
 helpcontent2/source/text/shared/01/menu_edit_find \
 helpcontent2/source/text/shared/01/menu_view_sidebar \
+helpcontent2/source/text/shared/01/minimal_column_width \
+helpcontent2/source/text/shared/01/minimal_row_height \
 helpcontent2/source/text/shared/01/moviesound \
 helpcontent2/source/text/shared/01/nav_rename \
 helpcontent2/source/tex

[Libreoffice-commits] core.git: helpcontent2

2022-06-29 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c1af51b8fc98793bee156ccfa6d91ff5983226c4
Author: Seth Chaiklin 
AuthorDate: Wed Jun 29 14:46:07 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 29 14:46:07 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to b6a8105c3ceb14f1216a12dbbe4b191acc0b99f3
  - tdf#120550,tdf#121367 update row and column resizing in tables

  This patch is a general review and update of commands to
  optimize the size of tables in Writer, Draw, and Impress.
  Thanks to Justin Luth for essential help in making accurate
  descriptions of these commands. It also started to improve
  the maintenance by moving the access commands and icon tables
  from diverse places to a shared/00 folder, introducing variables
  and sections that would allow reusing relevant sequences.

 shared/02/0421.xhp  (Optimize Size menu)
  * add two missing controls as embeds from swriter/main0110.xhp
  * add icon tables for the two controls
  * correction to control name
  * modify switch to include Draw and Impress
  * put controls in same order as dropdown menu
  + add variable to h1, so page can be embedded in related topics
  * update to renamed ids
  * change image size to 1cm
  * refactor to ,

 shared/00/00040500.xhp
   + add  to "Open Optimize Size..." (i.e., for opening
 dropdown menu in Table bar), so it can be embedded into each
 page for the individual controls.
   * use access controls from swriter/00/0405.xhp, plus add
 appl-switch
   * update access for Table menu

  swriter/00/0405.xhp  (Access commands for Size)
   * move all relevant access commands to shared/00/00040500.xhp

 swriter/01/0511.xhp (Row)
  * correction to two command names
  * update to renamed id
  * refactor to ,

 swriter/01/05120200.xhp (Optimal Column Width)
  * update command name
  + add  with two links
  * rename German id
  * refactor to 

 swriter/01/05110200.xhp (Optimal Row Height)
  * update command name
  * rename German id
  + add  with two links
  * refactor to ,

 shared/01/05120600.xhp  (Distribute Columns Equally)
  * corrections to description of the command operation
  + additional information about how to select
  + add "right-click" instructions to "howtoget"
  + add link to "Optimize Size" menu and "Table" bar
  + add  with two links
  * rename German id
  * refactor to , changed paragraphs to 
  * image size to 1cm

 shared/01/05110600m.xhp  (Distribute Rows Equally)
  + add link to "Optimize Size" menu
  + add  with two links
  * rename German id
  * refactor to , changed paragraphs to 
  * image size to 1cm

 swriter/main0110.xhp  (Table menu page)
  * update renamed ids
  + add sections to text in Minimal Row Height
and Minimal Column Width, so that they
can be embedded into "Optimize Size"
menu page.

 swriter/guide/table_sizing.xhp
  + add links to "Optimize Size" and "Table" bar in text.
  + add "Optimize Size" to Related Topics
  * refactor to ,,

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

diff --git a/helpcontent2 b/helpcontent2
index 26d75235b7f3..b6a8105c3ceb 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 26d75235b7f3cb46f4d893c45efe9a8f94020027
+Subproject commit b6a8105c3ceb14f1216a12dbbe4b191acc0b99f3


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

2022-06-29 Thread Miklos Vajna (via logerrit)
 sd/qa/unit/uiimpress.cxx   |   15 +++
 sd/source/ui/view/drviews2.cxx |   34 ++
 2 files changed, 33 insertions(+), 16 deletions(-)

New commits:
commit 08daa6801ca48007fc4f676b3b90098b35f8f70e
Author: Miklos Vajna 
AuthorDate: Wed Jun 29 08:55:17 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 14:54:23 2022 +0200

tdf#149748 sd theme: fix crash on selecting none from color bar

Opening Impress, going to view -> color bar to enable it and then
clicking on "none" resulted in a crash.

This went wrong in commit f5db3b12ae1cd3bfe6ee5d260aec9532cc65f2dc (sd
theme: add UI (sidebar) for shape fill color, 2022-04-06), where I
assumed that in case the slot is a SID_ATTR_FILL_COLOR, then its item
set also has a SID_ATTR_FILL_COLOR key. This is usually true, but not in
case of "no color" (i.e. transparent).

Fix the problem by just skipping theming metadata for such a color.

It seems to me that the color set of a theme is not allowed to contain
such "no color" colors, so this should be safe.

(cherry picked from commit c09eb0f74c0a110e4a4cfc4783b59883aad30475)

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

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 2433d7c4cb73..b309b4e4754f 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -1008,6 +1008,21 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme)
 CPPUNIT_ASSERT_EQUAL(static_cast(6000), nFillColorLumOff);
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorNoColor)
+{
+// Given an empty Impress document:
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+sd::ViewShell* pViewShell = 
pImpressDocument->GetDocShell()->GetViewShell();
+SfxDispatcher* pDispatcher = pViewShell->GetViewFrame()->GetDispatcher();
+
+// When dispatching a fill color that only has a fill style (no color), 
then make sure we don't
+// crash:
+XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
+pDispatcher->ExecuteList(SID_ATTR_FILL_COLOR, SfxCallMode::RECORD, { 
&aXFillStyleItem });
+}
+
 CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696)
 {
 mxComponent = loadFromDesktop("private:factory/simpress",
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a8906acfc40c..3d4e6b604aca 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -599,24 +599,26 @@ public:
 {
 // Merge the color parameters to the color itself.
 const XFillColorItem* pColorItem = static_cast(pArgs->GetItem(SID_ATTR_FILL_COLOR));
-assert(pColorItem);
-XFillColorItem aColorItem(*pColorItem);
-if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, &pItem) 
== SfxItemState::SET)
+if (pColorItem)
 {
-auto pIntItem = static_cast(pItem);
-aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
-}
-if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) == 
SfxItemState::SET)
-{
-auto pIntItem = static_cast(pItem);
-aColorItem.GetThemeColor().SetLumMod(pIntItem->GetValue());
-}
-if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) == 
SfxItemState::SET)
-{
-auto pIntItem = static_cast(pItem);
-aColorItem.GetThemeColor().SetLumOff(pIntItem->GetValue());
+XFillColorItem aColorItem(*pColorItem);
+if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, 
&pItem) == SfxItemState::SET)
+{
+auto pIntItem = static_cast(pItem);
+
aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
+}
+if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) 
== SfxItemState::SET)
+{
+auto pIntItem = static_cast(pItem);
+aColorItem.GetThemeColor().SetLumMod(pIntItem->GetValue());
+}
+if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) 
== SfxItemState::SET)
+{
+auto pIntItem = static_cast(pItem);
+aColorItem.GetThemeColor().SetLumOff(pIntItem->GetValue());
+}
+pArgs->Put(aColorItem);
 }
-pArgs->Put(aColorItem);
 }
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/qa cui/source cui/uiconfig

2022-06-29 Thread Miklos Vajna (via logerrit)
 cui/qa/uitest/tabpages/themepage.py |   31 ++
 cui/source/inc/themepage.hxx|   14 +
 cui/source/tabpages/themepage.cxx   |   61 
 cui/uiconfig/ui/themetabpage.ui |  441 +++-
 4 files changed, 537 insertions(+), 10 deletions(-)

New commits:
commit 4b139336b89c99b60e25149c7871dbabcb8a41db
Author: Miklos Vajna 
AuthorDate: Thu Dec 16 08:56:25 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 14:54:44 2022 +0200

sd theme: add UI to set individual colors of a color set

Which completes the UI to set and get various parts of the theme itself
(not yet referring to a theme).

(cherry picked from commit 48cb441fceab83a6320dc871f291dcb313696650)

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

diff --git a/cui/qa/uitest/tabpages/themepage.py 
b/cui/qa/uitest/tabpages/themepage.py
index 25726c63feda..f85af965f626 100644
--- a/cui/qa/uitest/tabpages/themepage.py
+++ b/cui/qa/uitest/tabpages/themepage.py
@@ -9,6 +9,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict
 from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
 
 # Test for cui/source/tabpages/themepage.cxx.
 class Test(UITestCase):
@@ -24,7 +25,21 @@ class Test(UITestCase):
 master = drawPage.MasterPage
 theme = mkPropertyValues({
 "Name": "nameA",
-"ColorSchemeName": "colorSetA"
+"ColorSchemeName": "colorSetA",
+"ColorScheme": tuple([
+0x00,  # dk1
+0x00,  # lt1
+0x00,  # dk2
+0x00,  # lt2
+0xff,  # accent1
+0x00,  # accent2
+0x00,  # accent3
+0x00,  # accent4
+0x00,  # accent5
+0x00,  # accent6
+0x00,  # hlink
+0x00,  # folHlink
+])
 })
 master.Theme = theme
 
@@ -43,6 +58,15 @@ class Test(UITestCase):
 colorSetName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
 colorSetName.executeAction("TYPE", mkPropertyValues({"TEXT": 
"colorSetB"}))
 
+# Select a custom accent1 color.
+accent1 = xDialog.getChild("btnAccent1")
+accent1.executeAction("OPENLIST", tuple())
+floatWindow = self.xUITest.getFloatWindow()
+paletteSelector = floatWindow.getChild("palette_listbox")
+select_by_text(paletteSelector, "chart-palettes")
+colorSet = floatWindow.getChild("colorset")
+colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": 
"2"}))
+
 # Then make sure the doc model is updated accordingly:
 # Without the accompanying fix in place, this test would have 
failed with:
 # AssertionError: 'nameA' != 'nameB'
@@ -53,6 +77,11 @@ class Test(UITestCase):
 # AssertionError: 'colorSetA' != 'colorSetB'
 # i.e. the UI didn't update the color scheme name.
 self.assertEqual(theme["ColorSchemeName"], "colorSetB")
+colorSet = theme["ColorScheme"]
+# Without the accompanying fix in place, this test would have 
failed with:
+# AssertionError: 0 != 16728590 (#ff420e)
+# i.e. the UI didn't update the accent1 color from black to a 
custom value.
+self.assertEqual(colorSet[4], 0xff420e)
 
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cui/source/inc/themepage.hxx b/cui/source/inc/themepage.hxx
index 613650c075b6..894a09c9385b 100644
--- a/cui/source/inc/themepage.hxx
+++ b/cui/source/inc/themepage.hxx
@@ -15,6 +15,8 @@
 
 #include 
 
+class ColorListBox;
+
 /// Tab page for themes
 class SvxThemePage : public SfxTabPage
 {
@@ -22,6 +24,18 @@ class SvxThemePage : public SfxTabPage
 
 std::unique_ptr m_xThemeName;
 std::unique_ptr m_xColorSetName;
+std::unique_ptr m_xDk1;
+std::unique_ptr m_xLt1;
+std::unique_ptr m_xDk2;
+std::unique_ptr m_xLt2;
+std::unique_ptr m_xAccent1;
+std::unique_ptr m_xAccent2;
+std::unique_ptr m_xAccent3;
+std::unique_ptr m_xAccent4;
+std::unique_ptr m_xAccent5;
+std::unique_ptr m_xAccent6;
+std::unique_ptr m_xHlink;
+std::unique_ptr m_xFolHlink;
 
 public:
 SvxThemePage(weld::Container* pPage, weld::DialogController* pController,
diff --git a/cui/source/tabpages/themepage.cxx 
b/cui/source/tabpages/themepage.cxx
index 99abeed799fb..c01d72def6cc 100644
--- a/cui/source/tabpages/themepage.cxx
+++ b/c

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - editeng/source include/sfx2 include/svx sd/source sfx2/source svx/source

2022-06-29 Thread Miklos Vajna (via logerrit)
 editeng/source/items/textitem.cxx  |2 ++
 include/sfx2/objsh.hxx |1 +
 include/svx/ColorSets.hxx  |2 ++
 include/svx/strings.hrc|   13 +
 sd/source/ui/docshell/docshell.cxx |   25 +
 sd/source/ui/inc/DrawDocShell.hxx  |2 ++
 sfx2/source/doc/objcont.cxx|2 ++
 svx/source/styles/ColorSets.cxx|   15 +++
 svx/source/tbxctrls/PaletteManager.cxx |   27 +--
 9 files changed, 87 insertions(+), 2 deletions(-)

New commits:
commit e8b3609230406c6589c5d123f018edb38e543679
Author: Miklos Vajna 
AuthorDate: Fri Dec 17 09:19:20 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 14:55:15 2022 +0200

sd theme: add a "theme" palette to the color picker

This implements listing the current theme colors (which depend on what
is the master page of the current slide) in the color picker and also
allows picking those colors.

The colors are picked as-is for now, not yet setting the color theme
index in the document model.

(cherry picked from commit 4bbbd15fb8e8269a8bdfd188d3ca2a2a84c00922)

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

diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index 32c269480c5a..f3338f300567 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1521,6 +1521,8 @@ void SvxColorItem::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 std::stringstream ss;
 ss << mColor;
 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), 
BAD_CAST(ss.str().c_str()));
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("theme-index"),
+  
BAD_CAST(OString::number(maThemeIndex).getStr()));
 
 OUString aStr;
 IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 0bfcddd2ba76..7440674d6656 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -558,6 +558,7 @@ public:
 StarBASIC*  GetBasic() const;
 
 virtual std::set GetDocColors();
+virtual std::vector GetThemeColors();
 
 // Accessibility Check
 virtual sfx::AccessibilityIssueCollection runAccessibilityCheck();
diff --git a/include/svx/ColorSets.hxx b/include/svx/ColorSets.hxx
index c4aa0ae2b9bc..ac9008cbeb32 100644
--- a/include/svx/ColorSets.hxx
+++ b/include/svx/ColorSets.hxx
@@ -92,6 +92,8 @@ public:
 static std::unique_ptr FromAny(const css::uno::Any& rVal);
 
 void UpdateSdrPage(SdrPage* pPage);
+
+std::vector GetColors() const;
 };
 
 } // end of namespace svx
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index ebf12af91006..24c9dcfa8cfb 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1118,7 +1118,20 @@
 #define RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE
NC_("RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE", "Font Name. The current font is not 
available and will be substituted.")
 #define RID_SVXSTR_CUSTOM_PAL   
NC_("RID_SVXSTR_CUSTOM_PAL", "custom")
 #define RID_SVXSTR_DOC_COLORS   
NC_("RID_SVXSTR_DOC_COLORS", "Document colors")
+#define RID_SVXSTR_THEME_COLORS 
NC_("RID_SVXSTR_THEME_COLORS", "Theme colors")
 #define RID_SVXSTR_DOC_COLOR_PREFIX 
NC_("RID_SVXSTR_DOC_COLOR_PREFIX", "Document Color")
+#define RID_SVXSTR_THEME_COLOR1 
NC_("RID_SVXSTR_THEME_COLOR1", "Background - Dark 1")
+#define RID_SVXSTR_THEME_COLOR2 
NC_("RID_SVXSTR_THEME_COLOR2", "Text - Light 1")
+#define RID_SVXSTR_THEME_COLOR3 
NC_("RID_SVXSTR_THEME_COLOR3", "Background - Dark 2")
+#define RID_SVXSTR_THEME_COLOR4 
NC_("RID_SVXSTR_THEME_COLOR4", "Text - Light 2")
+#define RID_SVXSTR_THEME_COLOR5 
NC_("RID_SVXSTR_THEME_COLOR5", "Accent 1")
+#define RID_SVXSTR_THEME_COLOR6 
NC_("RID_SVXSTR_THEME_COLOR6", "Accent 2")
+#define RID_SVXSTR_THEME_COLOR7 
NC_("RID_SVXSTR_THEME_COLOR7", "Accent 3")
+#define RID_SVXSTR_THEME_COLOR8 
NC_("RID_SVXSTR_THEME_COLOR8", "Accent 4")
+#define RID_SVXSTR_THEME_COLOR9 
NC_("RID_SVXSTR_THEME_COLOR9", "Accent 5")
+#define RID_SVXSTR_THEME_COLOR10
NC_("RID_SVXSTR_THEME_COLOR10", "Accent 6")
+#define RID_SVXSTR_THEME_COLOR11
NC_("RID_SVXSTR_THEME_COLOR11", "Hyperlink")
+#define RID_SVXSTR_THEME_COLOR12
NC_("RID_SVXSTR_THEME_COLOR12", "Followed Hyperlink")
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - chart2/source cui/qa cui/source include/svx reportdesign/source svx/source

2022-06-29 Thread Miklos Vajna (via logerrit)
 chart2/source/controller/sidebar/ChartColorWrapper.cxx |4 -
 chart2/source/controller/sidebar/ChartColorWrapper.hxx |2 
 cui/qa/uitest/dialogs/chardlg.py   |   66 +
 cui/source/tabpages/chardlg.cxx|   22 -
 cui/source/tabpages/themepage.cxx  |   14 +++
 include/svx/Palette.hxx|   20 -
 include/svx/PaletteManager.hxx |4 -
 include/svx/colorbox.hxx   |   11 +-
 include/svx/tbcontrl.hxx   |2 
 reportdesign/source/ui/dlg/Condition.cxx   |4 -
 reportdesign/source/ui/dlg/Condition.hxx   |2 
 svx/source/tbxctrls/Palette.cxx|   13 +++
 svx/source/tbxctrls/PaletteManager.cxx |   36 +
 svx/source/tbxctrls/tbcontrl.cxx   |   33 
 14 files changed, 183 insertions(+), 50 deletions(-)

New commits:
commit 349fccc2840a84520054b6864fdd8f2b8112
Author: Miklos Vajna 
AuthorDate: Mon Dec 20 08:46:40 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 14:55:55 2022 +0200

sd theme: allow setting the color's theme index in the chardlg

This routes not only the rgb color and a name, but also a theme index
from the color picker to the chardlg (only there as a start).

That way the picked color will be updated if the master page theme
changes.

(cherry picked from commit 7d5984d7aed2bafcb599882b66bb0dde2d22ff3f)

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

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 613407a827e7..dcaa77822682 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -84,7 +84,7 @@ ChartColorWrapper::ChartColorWrapper(
 {
 }
 
-void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const 
NamedColor& rColor)
+void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const 
svx::NamedThemedColor& rColor)
 {
 css::uno::Reference xPropSet = 
getPropSet(mxModel);
 
@@ -94,7 +94,7 @@ void ChartColorWrapper::operator()([[maybe_unused]] const 
OUString& , const Name
 return;
 }
 
-xPropSet->setPropertyValue(maPropertyName, 
css::uno::makeAny(rColor.first));
+xPropSet->setPropertyValue(maPropertyName, 
css::uno::makeAny(rColor.m_aColor));
 }
 
 void ChartColorWrapper::updateModel(const 
css::uno::Reference& xModel)
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.hxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
index 66c880ae3ca2..694c5a9f7786 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.hxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
@@ -26,7 +26,7 @@ public:
 SvxColorToolBoxControl* pControl,
 const OUString& rPropertyName);
 
-void operator()(const OUString& rCommand, const NamedColor& rColor);
+void operator()(const OUString& rCommand, const svx::NamedThemedColor& 
rColor);
 // ColorSelectFunction signature
 
 void updateModel(const css::uno::Reference& xModel);
diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py
index 49adfe6d9980..c49c08dbc687 100644
--- a/cui/qa/uitest/dialogs/chardlg.py
+++ b/cui/qa/uitest/dialogs/chardlg.py
@@ -8,6 +8,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.framework import UITestCase
 from uitest.uihelper.common import select_pos
 from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_by_text
 
 # Test for cui/source/tabpages/chardlg.cxx.
 class Test(UITestCase):
@@ -43,6 +44,71 @@ class Test(UITestCase):
 # COL_AUTO.
 self.assertEqual(shape.CharTransparence, 5)
 
+def testSvxCharEffectsPageTheme(self):
+# Given a document with a document theme:
+# Start Impress.
+with self.ui_test.create_doc_in_start_center("impress") as component:
+template = self.xUITest.getTopFocusWindow()
+
self.ui_test.close_dialog_through_button(template.getChild("close"))
+doc = self.xUITest.getTopFocusWindow()
+editWin = doc.getChild("impress_win")
+
+# Set theme colors.
+drawPage = component.getDrawPages().getByIndex(0)
+master = drawPage.MasterPage
+theme = mkPropertyValues({
+"Name": "nameA",
+"ColorSchemeName": "colorSetA",
+"ColorScheme": tuple([
+0x00,  # dk1
+0x00,  # lt1
+0x00,  # dk2
+0x00

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/qa cui/source editeng/source include/editeng include/svx svx/source

2022-06-29 Thread Miklos Vajna (via logerrit)
 cui/qa/uitest/dialogs/chardlg.py   |   11 ++
 cui/source/tabpages/chardlg.cxx|2 +
 editeng/source/items/textitem.cxx  |4 ++
 include/editeng/colritem.hxx   |4 ++
 include/svx/Palette.hxx|2 +
 include/svx/PaletteManager.hxx |3 +
 include/svx/strings.hrc|5 +++
 svx/source/tbxctrls/PaletteManager.cxx |   52 +++--
 svx/source/tbxctrls/tbcontrl.cxx   |4 +-
 9 files changed, 82 insertions(+), 5 deletions(-)

New commits:
commit 286b586f633966a0530d4e74dc304701ee9d769f
Author: Miklos Vajna 
AuthorDate: Tue Dec 21 08:51:56 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jun 29 14:56:12 2022 +0200

sd theme: allow setting color effects in the chardlg

Which means not only the 12 colors from the theme are offered (which
comes from the current master page), but also lighter/darker variants.

And once these are selected, their theme index and luminance modulation
/ offset is also remembered. This means if you pick light blue and later
change accent1 from blue to orange, you get light orange out of the box.

(cherry picked from commit 4f140ebac1f971d72f5bb59ee23a3fe248c4d16e)

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

diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py
index c49c08dbc687..631766922a0d 100644
--- a/cui/qa/uitest/dialogs/chardlg.py
+++ b/cui/qa/uitest/dialogs/chardlg.py
@@ -94,7 +94,8 @@ class Test(UITestCase):
 paletteSelector = floatWindow.getChild("palette_listbox")
 select_by_text(paletteSelector, "Theme colors")
 colorSet = floatWindow.getChild("colorset")
-colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": 
"4"}))
+# 4 would be accent1, +12 is the first from the effect 
variants.
+colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": 
"16"}))
 
 # Then make sure the doc model has the correct color theme index:
 drawPage = component.getDrawPages().getByIndex(0)
@@ -109,6 +110,14 @@ class Test(UITestCase):
 # i.e. no theme index was set, instead of accent1 (index into the 
above color scheme).
 self.assertEqual(portion.CharColorTheme, 4)
 
+# Then make sure that '80% lighter' is lum-mod=2000 and 
lum-off=8000:
+# Without the accompanying fix in place, this test would have 
failed with:
+# AssertionError: 1 != 2000
+# i.e. the effects where not applied, luminancen modulation was 
the default instead of a
+# custom value.
+self.assertEqual(portion.CharColorLumMod, 2000)
+self.assertEqual(portion.CharColorLumOff, 8000)
+
 def testSvxCharEffectsPageWriter(self):
 # Start Writer.
 with self.ui_test.create_doc_in_start_center("writer") as component:
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 834707e67e9f..7e1fb4077ca1 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1601,6 +1601,8 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 {
 // The color was picked from the theme palette, remember its index.
 aItem.SetThemeIndex(aSelectedColor.m_nThemeIndex);
+aItem.SetLumMod(aSelectedColor.m_nLumMod);
+aItem.SetLumOff(aSelectedColor.m_nLumOff);
 }
 
 rSet.Put(aItem);
diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index f3338f300567..2c787d34b171 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1523,6 +1523,10 @@ void SvxColorItem::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), 
BAD_CAST(ss.str().c_str()));
 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("theme-index"),
   
BAD_CAST(OString::number(maThemeIndex).getStr()));
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("lum-mod"),
+  
BAD_CAST(OString::number(mnLumMod).getStr()));
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("lum-off"),
+  
BAD_CAST(OString::number(mnLumOff).getStr()));
 
 OUString aStr;
 IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index 99ebed218748..21e389115b11 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -83,8 +83,12 @@ public:
 maTintShade = nTintOrShade;
 }
 
+void SetLumMod(sal_Int16 nLumMod) { mnLumMod = nLumMod; }
+
 sal_Int16 Ge

[Libreoffice-commits] core.git: vcl/Library_vclplug_osx.mk

2022-06-29 Thread Christian Lohmaier (via logerrit)
 vcl/Library_vclplug_osx.mk |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 788dcbef1bae7dbe600f8f193944cd9b31aa27d5
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:28:45 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 15:36:07 2022 +0200

Don't link against private CoreUI framework when sandboxed

Actual use of the code was already disabled since 2014 with
b8bee05dbf85bc4f5834520aa5d64e9ae18aba4e - but the link flags were not
conditionalized.

Change-Id: Ia1dd299cb78274850eb6a7b10259991bb4970ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136614
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/vcl/Library_vclplug_osx.mk b/vcl/Library_vclplug_osx.mk
index 5e0cfd2e8d3d..fbb0e68ec904 100644
--- a/vcl/Library_vclplug_osx.mk
+++ b/vcl/Library_vclplug_osx.mk
@@ -32,10 +32,14 @@ $(eval $(call gb_Library_use_custom_headers,vclplug_osx,\
 officecfg/registry \
 ))
 
+# TODO: arguably the private CoreUI framework should never be used, no matter 
whether building
+# a sandboxed version or a "regular" desktop version
 $(eval $(call gb_Library_add_libs,vclplug_osx,\
 -framework IOKit \
--F/System/Library/PrivateFrameworks \
--framework CoreUI \
+$(if $(ENABLE_MACOSX_SANDBOX),,\
+-F/System/Library/PrivateFrameworks \
+-framework CoreUI \
+) \
 -lobjc \
 ))
 


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sd/source/ui/dlg/RemoteDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c33ba7c52a031e8e0f1510d32ed4c33954fe5a39
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:36:28 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 15:37:50 2022 +0200

impress remote connection dialog must also work without bluetooth

as otherwise you can never confirm the pin to approve new devices.
old regression from 7c8c73dd5cf84050a8a2c51b04d7f5278b409fd7
still worked for users who had it enabled/linked in a previous
version...

Change-Id: Icf9fb6ae4259252da47c3709ab99fb7a2a70aeac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136616
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/sd/source/ui/dlg/RemoteDialog.cxx 
b/sd/source/ui/dlg/RemoteDialog.cxx
index e54b130c3a57..e28f57ecdecc 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -27,7 +27,7 @@ RemoteDialog::~RemoteDialog() {}
 IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton, weld::Button&, void)
 {
 weld::WaitObject(m_xDialog.get());
-#if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
+#if defined(ENABLE_SDREMOTE)
 auto xEntry = m_xClientBox->GetActiveEntry();
 if (!xEntry)
 return;


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sysui/desktop/macosx/Info.plist.in |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit d1739c8c735bcf890167c63b5559f2610e5a017a
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 13:43:37 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 15:39:31 2022 +0200

tdf#126961 fix access to the macOS address book

Having the personal-information.addressbook entitlement is not enough.
Without the plist key NSContactsUsageDescription, macOS will not ask the
user to grant access and the request is implicitly denied without any
feedback/logging.

Change-Id: I954fa86b35a128f08e5c498191bc0949e0edeebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136619
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index e50d7a20c4dd..6593139019fc 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1959,6 +1959,8 @@
 @MACOSX_DEPLOYMENT_TARGET@.0
 NSHighResolutionCapable
 
+NSContactsUsageDescription
+You can add your contacts as a data source for mail merge or 
similar operations.
 
 
 


[Libreoffice-commits] core.git: configure.ac lo.xcent lo.xcent.in Makefile.in

2022-06-29 Thread Christian Lohmaier (via logerrit)
 Makefile.in  |1 +
 configure.ac |9 +
 lo.xcent.in  |   11 ---
 3 files changed, 14 insertions(+), 7 deletions(-)

New commits:
commit c78b49ec132eb5126445ebee7d259d3df7fcaa68
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 13:17:14 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 16:53:59 2022 +0200

don't specify entitlements that are not used (sdremote w/o bluetooth)

the network.server entitlement is only needed when the sdremote is
enabled, and the bluetooth one only when the bluetooth part is built.
Also warn about bluetooth not being built because of obsoleted/removed
API. It was "silently" dropped before (lost in the flood of configure
output).

Change-Id: I38d83aa1132307b5b4b5d6dceba8f9020ffb2373
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136617
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/Makefile.in b/Makefile.in
index ed231eaade1e..29208d2765cc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -225,6 +225,7 @@ distclean : clean compilerplugins-clean
 $(BUILDDIR)/hardened_runtime.xcent \
 $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
 $(BUILDDIR)/solenv/lockfile/autoconf.h \
+$(BUILDDIR)/lo.xcent \
 $(BUILDDIR)/sysui/desktop/macosx/Info.plist \
 $(BUILDDIR)/vs-code*.code-workspace*
$(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) 
$(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \;
diff --git a/configure.ac b/configure.ac
index f66a1392fd45..919c3a8533e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5590,6 +5590,7 @@ if test "$cross_compiling" = "yes"; then
 config_host.mk.in \
 config_host_lang.mk.in \
 Makefile.in \
+lo.xcent.in \
 bin/bffvalidator.sh.in \
 bin/odfvalidator.sh.in \
 bin/officeotron.sh.in \
@@ -11760,6 +11761,8 @@ AC_MSG_CHECKING([whether to enable Impress remote 
control])
 if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
 AC_MSG_RESULT([yes])
 ENABLE_SDREMOTE=TRUE
+SDREMOTE_ENTITLEMENT=" com.apple.security.network.server
+   "
 AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote 
control])
 
 if test $OS = MACOSX && test "$MACOSX_SDK_VERSION" -ge 101500; then
@@ -11767,6 +11770,7 @@ if test -n "$enable_sdremote" -a "$enable_sdremote" != 
"no"; then
 if test "$enable_sdremote_bluetooth" = yes; then
 AC_MSG_ERROR([macOS SDK $macosx_sdk does not currently support 
--enable-sdremote-bluetooth])
 fi
+add_warning "not building the bluetooth part of the sdremote - used 
api was removed from macOS SDK 10.15"
 enable_sdremote_bluetooth=no
 fi
 # If not explicitly enabled or disabled, default
@@ -11816,6 +11820,9 @@ if test -n "$enable_sdremote" -a "$enable_sdremote" != 
"no"; then
 AC_MSG_RESULT([no])
 ENABLE_SDREMOTE_BLUETOOTH=
 SYSTEM_BLUEZ=
+SDREMOTE_ENTITLEMENT="$SDREMOTE_ENTITLEMENT
+   com.apple.security.device.bluetooth
+   "
 fi
 else
 ENABLE_SDREMOTE=
@@ -11824,6 +11831,7 @@ else
 fi
 AC_SUBST(ENABLE_SDREMOTE)
 AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
+AC_SUBST(SDREMOTE_ENTITLEMENT)
 AC_SUBST(SYSTEM_BLUEZ)
 
 dnl ===
@@ -14681,6 +14689,7 @@ AC_CONFIG_LINKS([include:include])
 AC_CONFIG_FILES([config_host.mk
  config_host_lang.mk
  Makefile
+ lo.xcent
  bin/bffvalidator.sh
  bin/odfvalidator.sh
  bin/officeotron.sh
diff --git a/lo.xcent b/lo.xcent.in
similarity index 74%
rename from lo.xcent
rename to lo.xcent.in
index 56bb981916fe..9a0838fbc388 100644
--- a/lo.xcent
+++ b/lo.xcent.in
@@ -14,16 +14,13 @@

com.apple.security.network.client

-   com.apple.security.network.server
-   
-   com.apple.security.device.bluetooth
-   
com.apple.security.print

 com.apple.security.cs.disable-executable-page-protection
 
-
-com.apple.security.personal-information.addressbook
-
+
+com.apple.security.personal-information.addressbook
+
+@SDREMOTE_ENTITLEMENT@
 
 


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 connectivity/source/drivers/macab/MacabAddressBook.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 5ebbb4e2b27d3fda6af410a553a196376d92034c
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 13:50:30 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 16:56:37 2022 +0200

related tdf#126961 don't crash when access to the macOS address book is 
denied

quick'n'dirty fix, ideally the user should get a message to reset the
privacy setting and try again...

Change-Id: I51cb852e305e285c87ff3a0e15b5198a2b1c5970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136620
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx 
b/connectivity/source/drivers/macab/MacabAddressBook.cxx
index a14b7abee9b9..02d4faf74290 100644
--- a/connectivity/source/drivers/macab/MacabAddressBook.cxx
+++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx
@@ -82,6 +82,13 @@ MacabAddressBook::MacabAddressBook( )
m_xMacabRecords(nullptr),
m_bRetrievedGroups(false)
 {
+if(m_aAddressBook == nullptr)
+{
+// TODO: tell the user to reset the permission via "tccutil reset 
AddressBook"
+// or the system preferences and try again, this time granting the 
access
+throw RuntimeException(
+"failed to access the macOS address book - permission not 
granted?" );
+}
 }
 
 


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d121e7cdd408fa5afb73b16466df42baa52b6a1a
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:32:47 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 16:57:57 2022 +0200

only hide Impress Remote option if there is no sdremote at all

it was incorrectly based on bluetooth support, but the remote can also
be used in the local network.
Regression from 4cdb960a79aff565f956f618116f3ea4b3836aa4 still worked
for users who had it enabled in earlier versions, but not with new
profiles.

Change-Id: Ib4026c60fed0842b3bad483d78e46dd73d1d75f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136615
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a612163f9493..0c534682de13 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -491,7 +491,7 @@ IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl, 
weld::ComboBox&, void)
 
 void SdTpOptionsMisc::SetImpressMode()
 {
-#ifndef ENABLE_SDREMOTE_BLUETOOTH
+#ifndef ENABLE_SDREMOTE
 m_xCbxEnableSdremote->hide();
 #else
 (void) this; // loplugin:staticmethods


[Libreoffice-commits] core.git: config_host.mk.in configure.ac lo.xcent.in Makefile.in

2022-06-29 Thread Christian Lohmaier (via logerrit)
 Makefile.in   |4 +++-
 config_host.mk.in |1 +
 configure.ac  |   19 +++
 lo.xcent.in   |1 +
 4 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit b43f0b0295953c8d5d16c5b9eccaddb5ec214bab
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 13:35:01 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 29 17:06:35 2022 +0200

allow to specify a macOS provisioning profile

having one is one of the prerequisites of using TestFlight

Change-Id: I9e20eb99905071fade4179dfbe2da5b7e5dd1c24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136618
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/Makefile.in b/Makefile.in
index 29208d2765cc..beae106e3ede 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -387,7 +387,9 @@ ifneq ($(ENABLE_MACOSX_SANDBOX),)
rm 
$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg
rm 
$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo
 endif
-#
+ifneq ($(MACOSX_PROVISIONING_PROFILE),)
+   cp "$(MACOSX_PROVISIONING_PROFILE)" 
$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/embedded.provisionprofile
+endif
 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 # Then use the macosx-codesign-app-bundle script
@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle 
$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app
diff --git a/config_host.mk.in b/config_host.mk.in
index c924c13c4832..0fd1bc7753f5 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -450,6 +450,7 @@ export MACOSX_BUNDLE_IDENTIFIER=@MACOSX_BUNDLE_IDENTIFIER@
 export MACOSX_CODESIGNING_IDENTITY=@MACOSX_CODESIGNING_IDENTITY@
 export MACOSX_DEPLOYMENT_TARGET=@MACOSX_DEPLOYMENT_TARGET@
 export MACOSX_PACKAGE_SIGNING_IDENTITY=@MACOSX_PACKAGE_SIGNING_IDENTITY@
+export MACOSX_PROVISIONING_PROFILE=@MACOSX_PROVISIONING_PROFILE@
 export MACOSX_SDK_PATH=@MACOSX_SDK_PATH@
 export MAC_OS_X_VERSION_MIN_REQUIRED=@MAC_OS_X_VERSION_MIN_REQUIRED@
 export MANDIR=@MANDIR@
diff --git a/configure.ac b/configure.ac
index 919c3a8533e0..08395ac66677 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1899,6 +1899,11 @@ AC_ARG_WITH(macosx-bundle-identifier,
  org.libreoffice.script ("script", huh?).]),
 ,with_macosx_bundle_identifier=org.libreoffice.script)
 
+AC_ARG_WITH(macosx-provisioning-profile,
+
AS_HELP_STRING([--with-macosx-provisioning-profile=/path/to/mac.provisionprofile],
+[Specify the path to a provisioning profile to use]),
+,)
+
 AC_ARG_WITH(product-name,
 AS_HELP_STRING([--with-product-name='My Own Office Suite'],
 [Define the product name. Default is AC_PACKAGE_NAME.]),
@@ -3615,6 +3620,18 @@ if test $_os = Darwin; then
 AC_MSG_CHECKING([what macOS app bundle identifier to use])
 MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
 AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
+
+if test -n "$with_macosx_provisioning_profile" ; then
+if test ! -f "$with_macosx_provisioning_profile"; then
+AC_MSG_ERROR([provisioning profile not found at 
$with_macosx_provisioning_profile])
+else
+MACOSX_PROVISIONING_PROFILE=$with_macosx_provisioning_profile
+MACOSX_PROVISIONING_INFO=$([security cms -D -i 
"$MACOSX_PROVISIONING_PROFILE" | \
+xmllint --xpath "//key[.='com.apple.application-identifier' or 
.='com.apple.developer.team-identifier'] \
+| //key[.='com.apple.application-identifier' or 
.='com.apple.developer.team-identifier']/following-sibling::string[1]" - | \
+sed -e 's#><#>\n\t<#g' -e 's#^#\t#'])
+fi
+fi
 fi
 AC_SUBST(MACOSX_SDK_PATH)
 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
@@ -3625,6 +3642,8 @@ AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
 AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
 AC_SUBST(ENABLE_MACOSX_SANDBOX)
 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
+AC_SUBST(MACOSX_PROVISIONING_INFO)
+AC_SUBST(MACOSX_PROVISIONING_PROFILE)
 
 dnl ===
 dnl Check iOS SDK and compiler
diff --git a/lo.xcent.in b/lo.xcent.in
index 9a0838fbc388..4b7303876e6b 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -22,5 +22,6 @@
 com.apple.security.personal-information.addressbook
 
 @SDREMOTE_ENTITLEMENT@
+@MACOSX_PROVISIONING_INFO@
 
 


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

2022-06-29 Thread Caolán McNamara (via logerrit)
 sc/source/core/data/formulacell.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 6f064418f5ce5bbc80bedbdf86fb4254369a956e
Author: Caolán McNamara 
AuthorDate: Wed Jun 29 10:08:23 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 29 17:38:47 2022 +0200

crashtesting: assert seen on loading forum-de3-8113.ods

This doc is available from 
https://de.openoffice.info/download/file.php?id=8113

/* TODO: replace by a simple rRecursionHelper.EndIteration() call
 * if the assertions hold. */
const bool bOnlyThis = (rRecursionHelper.GetList().size() == 1);
assert(bOnlyThis);

lets assume here that the assertion doesn't hold so drop the TODO
and speculative assert from:

commit ce8a7278e1304f7aaa65bce34aeeda5e83b231f1
Date:   Tue Oct 5 20:04:19 2021 +0200

Fix crash if conditional format triggers recursion with iterations 
enabled

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

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 404abe0988cc..e44e0e47a9a9 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1854,10 +1854,7 @@ bool ScFormulaCell::Interpret(SCROW nStartOffset, SCROW 
nEndOffset)
 // It additionally also should mean that the recursion/iteration
 // ends here as it must had been triggered by this free-flying
 // out-of-sheets cell
-/* TODO: replace by a simple rRecursionHelper.EndIteration() call
- * if the assertions hold. */
 const bool bOnlyThis = (rRecursionHelper.GetList().size() == 1);
-assert(bOnlyThis);
 rRecursionHelper.GetList().remove_if([this](const 
ScFormulaRecursionEntry& r){return r.pCell == this;});
 if (bOnlyThis)
 {


MohammadReza Hashemian license statement

2022-06-29 Thread Mohammad Hashemian
All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.


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

2022-06-29 Thread Gabor Kelemen (via logerrit)
 source/text/simpress/04/0102.xhp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f962040984c92627f0fdca608c9f23877cd5c92d
Author: Gabor Kelemen 
AuthorDate: Tue Jun 28 14:33:47 2022 +0200
Commit: Gabor Kelemen 
CommitDate: Wed Jun 29 19:25:43 2022 +0200

tdf#98404 Document new shortcuts for Move slide commands

Change-Id: Ibc2b560ac6cfe59d501e6a224c0143507c53ea68
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136586
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/source/text/simpress/04/0102.xhp 
b/source/text/simpress/04/0102.xhp
index 990f247cb..0005b06d8 100644
--- a/source/text/simpress/04/0102.xhp
+++ b/source/text/simpress/04/0102.xhp
@@ -815,7 +815,7 @@
 
 
 Option
-Ctrl+Shift+Arrow 
Down
+Alt+Shift+PageDown
 
 
 Move 
selected slides down one position in Slide Sorter list. If you select multiple 
slides, they are moved together with the last selected slide in the 
list.
@@ -824,7 +824,7 @@
 
 
 Option
-Ctrl+Shift+Arrow 
Up
+Alt+Shift+PageUp
 
 
 Move 
selected slides up one position.  If you select multiple slides, they are moved 
together with the first selected slide in the list.
@@ -832,8 +832,8 @@
 
 
 
-Command+Shift+Arrow Down
-Ctrl+Shift+End
+Option
+Alt+Shift+End
 
 
 Move 
selected slides to end of Slide Sorter list.
@@ -841,7 +841,7 @@
 
 
 
-Command+Shift+Arrow 
UpCtrl+Shift+Home
+OptionAlt+Shift+Home
 
 
 Move 
selected slides to start of Slide Sorter list.


[Libreoffice-commits] core.git: helpcontent2

2022-06-29 Thread Gabor Kelemen (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 643718d1ba48b16a4b180fbd8b0d45390b6a2554
Author: Gabor Kelemen 
AuthorDate: Wed Jun 29 19:25:45 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 29 19:25:45 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to f962040984c92627f0fdca608c9f23877cd5c92d
  - tdf#98404 Document new shortcuts for Move slide commands

Change-Id: Ibc2b560ac6cfe59d501e6a224c0143507c53ea68
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136586
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index b6a8105c3ceb..f962040984c9 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b6a8105c3ceb14f1216a12dbbe4b191acc0b99f3
+Subproject commit f962040984c92627f0fdca608c9f23877cd5c92d


[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - chart2/source

2022-06-29 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/view/axes/VAxisBase.cxx |2 +-
 chart2/source/view/inc/ShapeFactory.hxx   |2 +-
 chart2/source/view/main/DataTableView.cxx |5 -
 chart2/source/view/main/ShapeFactory.cxx  |7 ---
 4 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit a87ec5067a7228afb8c98eaeb517fc08c2a6febb
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 29 19:25:47 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 29 19:25:47 2022 +0200

chart2: allow to select the data table, fix object CID

Change-Id: I0a8d3643fcaefe8105e935b929947174bd9bdc96

diff --git a/chart2/source/view/axes/VAxisBase.cxx 
b/chart2/source/view/axes/VAxisBase.cxx
index 7d985051a4a7..814d3afd7858 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -187,7 +187,7 @@ bool VAxisBase::prepareShapeCreation()
 if (m_aAxisProperties.m_bDisplayLabels)
 m_xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget, m_aCID );
 if (m_aAxisProperties.m_bDisplayDataTable)
-m_xDataTableTarget = ShapeFactory::createGroup2D(m_xFinalTarget, 
m_aCID);
+m_xDataTableTarget = ShapeFactory::createGroup2D(m_xFinalTarget);
 
 return true;
 }
diff --git a/chart2/source/view/inc/ShapeFactory.hxx 
b/chart2/source/view/inc/ShapeFactory.hxx
index d6c05af04d18..b44612e74a4f 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -217,7 +217,7 @@ public:
 const css::uno::Reference< css::beans::XPropertySet > & 
xTextProperties,
 double nRotation, const OUString& aName, sal_Int32 
nTextMaxWidth );
 
-static rtl::Reference 
createTable(rtl::Reference const& xTarget);
+static rtl::Reference 
createTable(rtl::Reference const& xTarget, OUString const& 
rName = OUString());
 
 static rtl::Reference
 createInvisibleRectangle(
diff --git a/chart2/source/view/main/DataTableView.cxx 
b/chart2/source/view/main/DataTableView.cxx
index f899e724839e..210753bcb07e 100644
--- a/chart2/source/view/main/DataTableView.cxx
+++ b/chart2/source/view/main/DataTableView.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -191,7 +192,9 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 return;
 
 ShapeFactory::removeSubShapes(m_xTarget);
-m_xTableShape = ShapeFactory::createTable(m_xTarget);
+auto sParticle = 
ObjectIdentifier::createParticleForDataTable(m_xChartModel);
+auto sCID = 
ObjectIdentifier::createClassifiedIdentifierForParticle(sParticle);
+m_xTableShape = ShapeFactory::createTable(m_xTarget, sCID);
 
 uno::Reference xTable;
 try
diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 7fddc5d018d5..8f9f29ced232 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2533,16 +2533,17 @@ void ShapeFactory::removeSubShapes( const 
rtl::Reference& xSh
 }
 
 rtl::Reference
-ShapeFactory::createTable(rtl::Reference const& xTarget)
+ShapeFactory::createTable(rtl::Reference const& xTarget, 
OUString const& rName)
 {
-if( !xTarget.is() )
+if (!xTarget.is())
 return nullptr;
 
 //create table shape
 rtl::Reference xShape = new SvxTableShape(nullptr);
 xShape->setShapeKind(SdrObjKind::Table);
 xTarget->addShape(*xShape);
-
+if (!rName.isEmpty())
+setShapeName(xShape, rName);
 return xShape;
 }
 


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

2022-06-29 Thread Andrea Gelmini (via logerrit)
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ee013bd6af5acb6a12f596a7b32e12cb42755efb
Author: Andrea Gelmini 
AuthorDate: Wed Jun 29 18:15:54 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 29 19:26:58 2022 +0200

Fix typos

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

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index f2bf82a9ce7b..ac27fa59dc70 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -1212,10 +1212,10 @@ void 
VclPixelProcessor2D::processFillGradientPrimitive2D(
 }
 
 // tdf#149754 VCL gradient draw is not capable to handle all primitive 
gradient definitions,
-// what should be clear due to being developed to ectend/replace them in
+// what should be clear due to being developed to extend/replace them in
 // capabilities & precision.
 // It is e.g. not capable to correctly paint if the OutputRange is not 
completely
-// inside the DefinitionRange, thus forcing to paint gradent parts 
*outside* the
+// inside the DefinitionRange, thus forcing to paint gradient parts 
*outside* the
 // DefinitionRange.
 // This happens for Writer with Frames anchored in Frames (and was broken 
due to
 // falling back to VCL Gradient paint here), and for the new 
SlideBackgroundFill


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

2022-06-29 Thread Noel Grandin (via logerrit)
 sdext/source/pdfimport/tree/genericelements.cxx  |7 +--
 svx/source/accessibility/ChildrenManagerImpl.cxx |   12 ++--
 2 files changed, 7 insertions(+), 12 deletions(-)

New commits:
commit 9586d734c22e8650d0a060ec23d0bee6444d8bdb
Author: Noel Grandin 
AuthorDate: Wed Jun 29 16:05:59 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 29 22:10:03 2022 +0200

simplify iterator manipulation

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

diff --git a/sdext/source/pdfimport/tree/genericelements.cxx 
b/sdext/source/pdfimport/tree/genericelements.cxx
index 2c394c973bf0..f4dee87c71cb 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -407,12 +407,7 @@ void PageElement::resolveUnderlines( PDFIProcessor const & 
rProc )
 }
 }
 if( bRemovePoly )
-{
-auto next_it = poly_it;
-++next_it;
-Children.erase( poly_it );
-poly_it = next_it;
-}
+poly_it = Children.erase( poly_it );
 else
 ++poly_it;
 }
commit d1ed54948ea3ffb43092d1748c1b6b53ce42fd3d
Author: Noel Grandin 
AuthorDate: Wed Jun 29 13:24:43 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 29 22:08:38 2022 +0200

ChildrenManagerImpl::GetChildShape was clearly written very late at night

Because it takes something that could be looked up by index, and instead
looks it up by scanning an entire vector.

been this way since
commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366
Date:   Wed Nov 27 13:03:45 2013 +
Integrate branch of IAccessible2

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

diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx 
b/svx/source/accessibility/ChildrenManagerImpl.cxx
index b557e00a9000..56b47c74b710 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -114,12 +114,12 @@ tools::Long ChildrenManagerImpl::GetChildCount() const 
noexcept
 
 css::uno::Reference 
ChildrenManagerImpl::GetChildShape(tools::Long nIndex)
 {
-uno::Reference xAcc = GetChild(nIndex);
-auto I = std::find_if(maVisibleChildren.begin(), maVisibleChildren.end(),
-[&xAcc](const ChildDescriptor& rChild) { return 
rChild.mxAccessibleShape == xAcc; });
-if (I != maVisibleChildren.end())
-return I->mxShape;
-return uno::Reference< drawing::XShape > ();
+// Check whether the given index is valid.
+if (nIndex < 0 || o3tl::make_unsigned(nIndex) >= maVisibleChildren.size())
+throw lang::IndexOutOfBoundsException (
+"no accessible child with index " + OUString::number(nIndex),
+mxParent);
+return maVisibleChildren[nIndex].mxShape;
 }
 
 /** Return the requested accessible child object.  Create it if it is not


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

2022-06-29 Thread Noel Grandin (via logerrit)
 sdext/source/pdfimport/tree/genericelements.cxx |   17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit eefba50f5908d535bce81b5b0d3d883715b6575e
Author: Noel Grandin 
AuthorDate: Wed Jun 29 16:36:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 29 22:10:27 2022 +0200

tdf#137544 reduce work in sdext::PageElement::resolveUnderlines

when opening complex pdf

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

diff --git a/sdext/source/pdfimport/tree/genericelements.cxx 
b/sdext/source/pdfimport/tree/genericelements.cxx
index f4dee87c71cb..2eb789616b30 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -332,6 +332,14 @@ void PageElement::resolveUnderlines( PDFIProcessor const & 
rProc )
 // FIXME: currently the algorithm used is quadratic
 // this could be solved by some sorting beforehand
 
+std::vector textAndHypers;
+textAndHypers.reserve(Children.size());
+for (auto const & p : Children)
+{
+if (dynamic_cast< TextElement* >(p.get()) || 
dynamic_cast(p.get()))
+textAndHypers.push_back(p.get());
+}
+
 auto poly_it = Children.begin();
 while( poly_it != Children.end() )
 {
@@ -372,9 +380,8 @@ void PageElement::resolveUnderlines( PDFIProcessor const & 
rProc )
 u_y = r_x; r_x = l_x; l_x = u_y;
 }
 u_y = aPoly.getB2DPoint(0).getY();
-for( const auto& rxChild : Children )
+for( Element* pEle : textAndHypers )
 {
-Element* pEle = rxChild.get();
 if( pEle->y <= u_y && pEle->y + pEle->h*1.1 >= u_y )
 {
 // first: is the element underlined completely ?
@@ -394,13 +401,13 @@ void PageElement::resolveUnderlines( PDFIProcessor const 
& rProc )
 pText->FontId = rProc.getFontId( aAttr );
 }
 }
-else if( dynamic_cast< HyperlinkElement* >(pEle) )
+else // must be HyperlinkElement
 bRemovePoly = true;
 }
 // second: hyperlinks may be larger than their underline
 // since they are just arbitrary rectangles in the action 
definition
-else if( dynamic_cast< HyperlinkElement* >(pEle) != nullptr &&
- l_x >= pEle->x && r_x <= pEle->x+pEle->w )
+else if( l_x >= pEle->x && r_x <= pEle->x+pEle->w &&
+dynamic_cast< HyperlinkElement* >(pEle) != nullptr )
 {
 bRemovePoly = true;
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - binaryurp/source

2022-06-29 Thread Noel Grandin (via logerrit)
 binaryurp/source/binaryurp.component |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28f8f7c411a2b965be6306d76fd2ed6ab4d5be1b
Author: Noel Grandin 
AuthorDate: Wed Jun 15 14:08:33 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 29 22:32:55 2022 +0200

BridgeFactory should be a singleton

regression from
commit 9be078ae0d4cc4e4c01952bb42c9bb5943bbde86
Date:   Sat Jul 4 09:12:35 2020 +0200
binaryurp: create instances with uno constructors

Change-Id: Ib7a7316fdee4afffac35b282adaf437ff8bdd009
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135904
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 7531f027c742a601c13a7a849dfae795a148d899)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135989
Reviewed-by: Xisco Fauli 
(cherry picked from commit e04635f338b9a39df0ed62b0909b0ac56c9a5b76)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136030
Reviewed-by: Michael Stahl 

diff --git a/binaryurp/source/binaryurp.component 
b/binaryurp/source/binaryurp.component
index e2581c76411e..b5b0f4da102f 100644
--- a/binaryurp/source/binaryurp.component
+++ b/binaryurp/source/binaryurp.component
@@ -20,7 +20,7 @@
 http://openoffice.org/2010/uno-components";>
   
+
constructor="com_sun_star_comp_bridge_BridgeFactory_get_implementation" 
single-instance="true">
 
   
 


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

2022-06-29 Thread Justin Luth (via logerrit)
 sw/source/core/edit/edfcol.cxx   |4 
 sw/source/core/edit/ednumber.cxx |   27 +--
 2 files changed, 1 insertion(+), 30 deletions(-)

New commits:
commit fcbd1e8363f14fcbdcef9bb2a6bca8a2cb7644ac
Author: Justin Luth 
AuthorDate: Tue Jun 28 07:25:57 2022 -0400
Commit: Justin Luth 
CommitDate: Thu Jun 30 00:19:11 2022 +0200

tdf#tdf#93747 tdf#145151 sw IsTableMode: revert obsolete one-offs

I started playing whack-a-mole, patching functions for
excessively selected cells. But now bug 145151 has fixed
the selection process itself, so these avoidance clauses
are now obsolete, so revert these 7.3 or 7.4 fixes.

This keeps the unit tests in
make CppunitTest_sw_uiwriter5

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

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 1d480f293fc5..aade2988c94b 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2199,10 +2199,6 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl 
*pFormat,
 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::SETFMTCOLL, 
&aRewriter);
 for(SwPaM& rPaM : GetCursor()->GetRingContainer())
 {
-// If in table cells select mode, ignore the cells that aren't 
actually selected
-if (IsTableMode() && !rPaM.HasMark())
-continue;
-
 if ( !rPaM.HasReadonlySel( GetViewOptions()->IsFormView() ) )
 {
 // store previous paragraph style for track changes
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index dd21abd149f6..4e9ca59c476b 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -152,10 +152,6 @@ bool SwEditShell::SelectionHasNumber() const
 bool bResult = false;
 for (SwPaM& rPaM : GetCursor()->GetRingContainer())
 {
-// If in table cells select mode, ignore the cells that aren't 
actually selected
-if (IsTableMode() && !rPaM.HasMark())
-continue;
-
 SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex();
 SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex();
 for (SwNodeOffset nPos = nStt; nPos<=nEnd; nPos++)
@@ -191,9 +187,6 @@ bool SwEditShell::SelectionHasBullet() const
 bool bResult = false;
 for (SwPaM& rPaM : GetCursor()->GetRingContainer())
 {
-if (IsTableMode() && !rPaM.HasMark())
-continue;
-
 SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex();
 SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex();
 for (SwNodeOffset nPos = nStt; nPos<=nEnd; nPos++)
@@ -265,9 +258,6 @@ void SwEditShell::DelNumRules()
 GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
 for (SwPaM& rPaM : pCursor->GetRingContainer())
 {
-if (IsTableMode() && !rPaM.HasMark())
-continue;
-
 GetDoc()->DelNumRules(rPaM, GetLayout());
 }
 GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
@@ -705,19 +695,7 @@ sal_uInt8 SwEditShell::GetNumLevel() const
 
 const SwNumRule* SwEditShell::GetNumRuleAtCurrCursorPos() const
 {
-SwPaM* pCursor = GetCursor();
-if (IsTableMode() && pCursor->IsMultiSelection() )
-{
-// Find the first valid position
-for (SwPaM& rPaM : pCursor->GetRingContainer())
-{
-if (!rPaM.HasMark())
-continue;
-pCursor = &rPaM;
-break;
-}
-}
-SwPosition pos(*pCursor->GetPoint());
+SwPosition pos(*GetCursor()->GetPoint());
 return SwDoc::GetNumRuleAtPos( pos, GetLayout() );
 }
 
@@ -774,9 +752,6 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
 OUString sContinuedListId(rContinuedListId);
 for (SwPaM& rPaM : pCursor->GetRingContainer())
 {
-if (IsTableMode() && !rPaM.HasMark())
-continue;
-
 OUString sListId = GetDoc()->SetNumRule(rPaM, rRule,
   bCreateNewList, GetLayout(), 
sContinuedListId,
   true, bResetIndentAttrs );


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

2022-06-29 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx |6 ++
 sw/source/filter/ww8/ww8par.cxx|   15 +++
 2 files changed, 21 insertions(+)

New commits:
commit a7e0a5a6d0054483d3ed5a753bbba2e8ab599e90
Author: Justin Luth 
AuthorDate: Thu Mar 12 21:00:24 2020 +0300
Commit: Justin Luth 
CommitDate: Thu Jun 30 00:59:20 2022 +0200

tdf#131304 .doc: provide compatibilityMode value for .docx

In case a .doc file will be exported as a .docx format,
populate the appropriate compatibilityMode setting.

11: Use features specified in MS-DOC.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 8b4fc39dd02d..24fc6d7f7995 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -769,6 +769,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf79435_legacyInputFields)
 xParameters.set(xFormField->getParameters());
 xParameters->getByName("Type") >>= sTmp;
 CPPUNIT_ASSERT_EQUAL(OUString("date"), sTmp);
+
+xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
+assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "name", 
"compatibilityMode");
+assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "uri",
+"http://schemas.microsoft.com/office/word";);
+assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "val", 
"11");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf120224_textControlCrossRef, 
"tdf120224_textControlCrossRef.docx")
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 9dab410cd66b..5195e1484de3 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1906,6 +1906,21 @@ void SwWW8ImplReader::ImportDop()
 if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
 xDocProps->setPropertyValue("ApplyFormDesignMode", 
css::uno::Any(false));
 }
+
+// for the benefit of DOCX - if this is ever saved in that format.
+comphelper::SequenceAsHashMap 
aGrabBag(xDocProps->getPropertyValue("InteropGrabBag"));
+uno::Sequence aCompatSetting( 
comphelper::InitPropertySequence({
+{ "name", uno::Any(OUString("compatibilityMode")) },
+{ "uri", 
uno::Any(OUString("http://schemas.microsoft.com/office/word";)) },
+{ "val", uno::Any(OUString("11")) }  //11: Use features 
specified in MS-DOC.
+}));
+
+uno::Sequence< beans::PropertyValue > 
aValue(comphelper::InitPropertySequence({
+{ "compatSetting", uno::Any(aCompatSetting) }
+}));
+
+aGrabBag["CompatSettings"] <<= aValue;
+xDocProps->setPropertyValue("InteropGrabBag", 
uno::Any(aGrabBag.getAsConstPropertyValueList()));
 }
 
 // The password can force read-only, comments-only, fill-in-form-only, or 
require track-changes.


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

2022-06-29 Thread Eike Rathke (via logerrit)
 sc/source/filter/xml/XMLCalculationSettingsContext.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 7ca3eca66888a1fa1b7bd59d79bb8f4c96bd7460
Author: Eike Rathke 
AuthorDate: Thu Jun 30 01:38:43 2022 +0200
Commit: Eike Rathke 
CommitDate: Thu Jun 30 02:33:05 2022 +0200

crashtesting: assert on reexport to ods of forum-it-7248.ods

source document available from:
https://forum.openoffice.org/it/forum/download/file.php?id=7248

The actual cause is already a bad



imported unchecked. For this, sax::Converter::parseDateTime()
returns a success value, just use it..
If bad keep the default NullDate.

Change-Id: If4caa57e302cfe8304e6cb49bf9d330245a97660
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136611
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx 
b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index 1989b337faf2..43da1437eb5c 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -150,12 +150,14 @@ ScXMLNullDateContext::ScXMLNullDateContext( ScXMLImport& 
rImport,
 if (aIter != rAttrList->end())
 {
 util::DateTime aDateTime;
-::sax::Converter::parseDateTime(aDateTime, aIter.toView());
-util::Date aDate;
-aDate.Day = aDateTime.Day;
-aDate.Month = aDateTime.Month;
-aDate.Year = aDateTime.Year;
-pCalcSet->SetNullDate(aDate);
+if (::sax::Converter::parseDateTime(aDateTime, aIter.toView()))
+{
+util::Date aDate;
+aDate.Day = aDateTime.Day;
+aDate.Month = aDateTime.Month;
+aDate.Year = aDateTime.Year;
+pCalcSet->SetNullDate(aDate);
+}
 }
 }
 


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

2022-06-29 Thread Hannah Meeks (via logerrit)
 oovbaapi/ooo/vba/excel/XRange.idl  |1 
 sc/qa/extras/testdocuments/vba.xls |binary
 sc/source/ui/vba/vbarange.cxx  |   41 +++--
 sc/source/ui/vba/vbarange.hxx  |5 
 4 files changed, 36 insertions(+), 11 deletions(-)

New commits:
commit cb41db23a044e6e6337bad642aad2c49174aa068
Author: Hannah Meeks 
AuthorDate: Fri Apr 29 15:25:51 2022 +0100
Commit: Mike Kaganski 
CommitDate: Thu Jun 30 03:36:15 2022 +0200

tdf#99514 - implement Value2 for compatibility

Value2 ignores date formatting in a way that Value does not.
Extended vba.xls to test this too.

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

diff --git a/oovbaapi/ooo/vba/excel/XRange.idl 
b/oovbaapi/ooo/vba/excel/XRange.idl
index e640f39eb33e..9dcc41f95166 100644
--- a/oovbaapi/ooo/vba/excel/XRange.idl
+++ b/oovbaapi/ooo/vba/excel/XRange.idl
@@ -43,6 +43,7 @@ interface XRange
 //interface ::ooo::vba::XHelperInterface;
 
 [attribute] any Value;
+[attribute] any Value2;
 [attribute] any Formula;
 [attribute] any FormulaArray;
 [attribute] any FormulaR1C1;
diff --git a/sc/qa/extras/testdocuments/vba.xls 
b/sc/qa/extras/testdocuments/vba.xls
index 399b1ec20675..22bee379caf1 100644
Binary files a/sc/qa/extras/testdocuments/vba.xls and 
b/sc/qa/extras/testdocuments/vba.xls differ
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index d94bd7b04a35..99bcce81ba00 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -781,13 +781,13 @@ namespace {
 class CellValueGetter : public ValueGetter
 {
 protected:
+RangeValueType meValueType;
 uno::Any maValue;
 public:
-CellValueGetter() {}
+CellValueGetter(RangeValueType eValueType) { meValueType = eValueType; }
 virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< 
table::XCell >& xCell ) override;
 virtual void processValue( const uno::Any& aValue ) override;
 const uno::Any& getValue() const override { return maValue; }
-
 };
 
 }
@@ -800,10 +800,10 @@ CellValueGetter::processValue(  const uno::Any& aValue )
 void CellValueGetter::visitNode( sal_Int32 /*x*/, sal_Int32 /*y*/, const 
uno::Reference< table::XCell >& xCell )
 {
 uno::Any aValue;
-table::CellContentType eType = xCell->getType();
-if( eType == table::CellContentType_VALUE || eType == 
table::CellContentType_FORMULA )
+table::CellContentType eCellContentType = xCell->getType();
+if( eCellContentType == table::CellContentType_VALUE || eCellContentType 
== table::CellContentType_FORMULA )
 {
-if ( eType == table::CellContentType_FORMULA )
+if ( eCellContentType == table::CellContentType_FORMULA )
 {
 
 OUString sFormula = xCell->getFormula();
@@ -834,13 +834,13 @@ void CellValueGetter::visitNode( sal_Int32 /*x*/, 
sal_Int32 /*y*/, const uno::Re
 NumFormatHelper cellFormat( xRange );
 if ( cellFormat.isBooleanType() )
 aValue <<= ( xCell->getValue() != 0.0 );
-else if ( cellFormat.isDateType() )
+else if ( cellFormat.isDateType() && meValueType == 
RangeValueType::value)
 aValue <<= bridge::oleautomation::Date( xCell->getValue() );
 else
 aValue <<= xCell->getValue();
 }
 }
-if( eType == table::CellContentType_TEXT )
+if( eCellContentType == table::CellContentType_TEXT )
 {
 uno::Reference< text::XTextRange > xTextRange(xCell, 
::uno::UNO_QUERY_THROW);
 aValue <<= xTextRange->getString();
@@ -908,7 +908,8 @@ private:
 ScDocument& m_rDoc;
 formula::FormulaGrammar::Grammar m_eGrammar;
 public:
-CellFormulaValueGetter(ScDocument& rDoc, formula::FormulaGrammar::Grammar 
eGram ) :  m_rDoc( rDoc ), m_eGrammar( eGram ) {}
+CellFormulaValueGetter(ScDocument& rDoc, formula::FormulaGrammar::Grammar 
eGram ) :
+ CellValueGetter( RangeValueType::value ), m_rDoc( rDoc ), m_eGrammar( 
eGram ) {}
 virtual void visitNode( sal_Int32 /*x*/, sal_Int32 /*y*/, const 
uno::Reference< table::XCell >& xCell ) override
 {
 uno::Any aValue;
@@ -1524,8 +1525,7 @@ ScVbaRange::getValue( ValueGetter& valueGetter)
 return uno::Any( script::ArrayWrapper( false, arrayGetter.getValue() ) );
 }
 
-uno::Any SAL_CALL
-ScVbaRange::getValue()
+css::uno::Any ScVbaRange::DoGetValue( RangeValueType eValueType )
 {
 // #TODO code within the test below "if ( m_Areas... " can be removed
 // Test is performed only because m_xRange is NOT set to be
@@ -1537,11 +1537,23 @@ ScVbaRange::getValue()
 return xRange->getValue();
 }
 
-CellValueGetter valueGetter;
+CellValueGetter valueGetter( eValueType );
 return getValue( valueGetter );
+}
 
+uno::Any SAL_CALL
+ScVbaRange::getValue()
+{
+return DoGe

[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/Library_vclplug_osx.mk

2022-06-29 Thread Christian Lohmaier (via logerrit)
 vcl/Library_vclplug_osx.mk |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 2fbf4831617f13daedf0a80cfe6042f5ac088da1
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:28:45 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 07:26:46 2022 +0200

Don't link against private CoreUI framework when sandboxed

Actual use of the code was already disabled since 2014 with
b8bee05dbf85bc4f5834520aa5d64e9ae18aba4e - but the link flags were not
conditionalized.

Change-Id: Ia1dd299cb78274850eb6a7b10259991bb4970ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136614
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 7a493a7d64dc634ae2d5d6931b8ce33223cb3985)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136553
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/Library_vclplug_osx.mk b/vcl/Library_vclplug_osx.mk
index e2a1a5161bdd..e0adee810a30 100644
--- a/vcl/Library_vclplug_osx.mk
+++ b/vcl/Library_vclplug_osx.mk
@@ -30,10 +30,14 @@ $(eval $(call gb_Library_use_custom_headers,vclplug_osx,\
 officecfg/registry \
 ))
 
+# TODO: arguably the private CoreUI framework should never be used, no matter 
whether building
+# a sandboxed version or a "regular" desktop version
 $(eval $(call gb_Library_add_libs,vclplug_osx,\
 -framework IOKit \
--F/System/Library/PrivateFrameworks \
--framework CoreUI \
+$(if $(ENABLE_MACOSX_SANDBOX),,\
+-F/System/Library/PrivateFrameworks \
+-framework CoreUI \
+) \
 -lobjc \
 ))
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - vcl/Library_vclplug_osx.mk

2022-06-29 Thread Christian Lohmaier (via logerrit)
 vcl/Library_vclplug_osx.mk |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit f3516180adfa777d2a4103cd6a090cdbe81d26ab
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:28:45 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 07:27:03 2022 +0200

Don't link against private CoreUI framework when sandboxed

Actual use of the code was already disabled since 2014 with
b8bee05dbf85bc4f5834520aa5d64e9ae18aba4e - but the link flags were not
conditionalized.

Change-Id: Ia1dd299cb78274850eb6a7b10259991bb4970ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136614
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 788dcbef1bae7dbe600f8f193944cd9b31aa27d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136634
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/Library_vclplug_osx.mk b/vcl/Library_vclplug_osx.mk
index 5e0cfd2e8d3d..fbb0e68ec904 100644
--- a/vcl/Library_vclplug_osx.mk
+++ b/vcl/Library_vclplug_osx.mk
@@ -32,10 +32,14 @@ $(eval $(call gb_Library_use_custom_headers,vclplug_osx,\
 officecfg/registry \
 ))
 
+# TODO: arguably the private CoreUI framework should never be used, no matter 
whether building
+# a sandboxed version or a "regular" desktop version
 $(eval $(call gb_Library_add_libs,vclplug_osx,\
 -framework IOKit \
--F/System/Library/PrivateFrameworks \
--framework CoreUI \
+$(if $(ENABLE_MACOSX_SANDBOX),,\
+-F/System/Library/PrivateFrameworks \
+-framework CoreUI \
+) \
 -lobjc \
 ))
 


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

2022-06-29 Thread Mike Kaganski (via logerrit)
 source/text/shared/guide/csv_params.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9666061eacd2535e3243df7366eab729d7a2f27e
Author: Mike Kaganski 
AuthorDate: Tue Jun 28 16:48:39 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:37:14 2022 +0200

Improve description a bit

Change-Id: Iaaba632db103777f47d414647e611054824bea23
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136545
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 26d75235b7f3cb46f4d893c45efe9a8f94020027)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136647
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/guide/csv_params.xhp 
b/source/text/shared/guide/csv_params.xhp
index 175aab2b8..cc49b5ba7 100644
--- a/source/text/shared/guide/csv_params.xhp
+++ b/source/text/shared/guide/csv_params.xhp
@@ -63,7 +63,7 @@
 Text 
Delimiter
 
 
-The 
text delimiter as ASCII value, that is, 34 for double quotes and 39 for single 
quotes. Example: 34 (").
+The 
text delimiter as ASCII value, like 34 for double quotes and 39 for single 
quotes. Example: 34 (").
 
 
 


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

2022-06-29 Thread Mike Kaganski (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9cb42a3420e4a64706ccd385f982deae6f89fe78
Author: Mike Kaganski 
AuthorDate: Thu Jun 30 08:37:15 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Jun 30 08:37:15 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-4'
  to 9666061eacd2535e3243df7366eab729d7a2f27e
  - Improve description a bit

Change-Id: Iaaba632db103777f47d414647e611054824bea23
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136545
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 26d75235b7f3cb46f4d893c45efe9a8f94020027)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136647
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 0d5dea506d2d..9666061eacd2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0d5dea506d2d15ce931459d1c7f0507745b816a9
+Subproject commit 9666061eacd2535e3243df7366eab729d7a2f27e


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sd/source/ui/dlg/RemoteDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 01ffd406553c40bc91daf6bd5d63b1fe3a171a37
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:36:28 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:39:28 2022 +0200

impress remote connection dialog must also work without bluetooth

as otherwise you can never confirm the pin to approve new devices.
old regression from 7c8c73dd5cf84050a8a2c51b04d7f5278b409fd7
still worked for users who had it enabled/linked in a previous
version...

Change-Id: Icf9fb6ae4259252da47c3709ab99fb7a2a70aeac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136616
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit c7147cd2504d1d3f91ca5b0a5e119ca9d2185b37)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136635
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sd/source/ui/dlg/RemoteDialog.cxx 
b/sd/source/ui/dlg/RemoteDialog.cxx
index e54b130c3a57..e28f57ecdecc 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -27,7 +27,7 @@ RemoteDialog::~RemoteDialog() {}
 IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton, weld::Button&, void)
 {
 weld::WaitObject(m_xDialog.get());
-#if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
+#if defined(ENABLE_SDREMOTE)
 auto xEntry = m_xClientBox->GetActiveEntry();
 if (!xEntry)
 return;


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sd/source/ui/dlg/RemoteDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79ff3ac90c6c23aa1c63a235a0c141531202ce62
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:36:28 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:39:41 2022 +0200

impress remote connection dialog must also work without bluetooth

as otherwise you can never confirm the pin to approve new devices.
old regression from 7c8c73dd5cf84050a8a2c51b04d7f5278b409fd7
still worked for users who had it enabled/linked in a previous
version...

Change-Id: Icf9fb6ae4259252da47c3709ab99fb7a2a70aeac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136616
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit c33ba7c52a031e8e0f1510d32ed4c33954fe5a39)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136636
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sd/source/ui/dlg/RemoteDialog.cxx 
b/sd/source/ui/dlg/RemoteDialog.cxx
index e54b130c3a57..e28f57ecdecc 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -27,7 +27,7 @@ RemoteDialog::~RemoteDialog() {}
 IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton, weld::Button&, void)
 {
 weld::WaitObject(m_xDialog.get());
-#if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
+#if defined(ENABLE_SDREMOTE)
 auto xEntry = m_xClientBox->GetActiveEntry();
 if (!xEntry)
 return;


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f07313272267316d20409d51ad01482b23772e06
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:32:47 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:42:25 2022 +0200

tdf#141313 only hide Impress Remote option if there is no sdremote at all

it was incorrectly based on bluetooth support, but the remote can also
be used in the local network.
Regression from 4cdb960a79aff565f956f618116f3ea4b3836aa4 still worked
for users who had it enabled in earlier versions, but not with new
profiles.

Change-Id: Ib4026c60fed0842b3bad483d78e46dd73d1d75f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136615
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit d121e7cdd408fa5afb73b16466df42baa52b6a1a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136643
Tested-by: Christian Lohmaier 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a612163f9493..0c534682de13 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -491,7 +491,7 @@ IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl, 
weld::ComboBox&, void)
 
 void SdTpOptionsMisc::SetImpressMode()
 {
-#ifndef ENABLE_SDREMOTE_BLUETOOTH
+#ifndef ENABLE_SDREMOTE
 m_xCbxEnableSdremote->hide();
 #else
 (void) this; // loplugin:staticmethods


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

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1c415c638f11329b9cd7b415aefa4652499403a
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 12:32:47 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:42:57 2022 +0200

tdf#141313 only hide Impress Remote option if there is no sdremote at all

it was incorrectly based on bluetooth support, but the remote can also
be used in the local network.
Regression from 4cdb960a79aff565f956f618116f3ea4b3836aa4 still worked
for users who had it enabled in earlier versions, but not with new
profiles.

Change-Id: Ib4026c60fed0842b3bad483d78e46dd73d1d75f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136615
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 8d7c441097cc0279a9819fe0673b8cad40ae94db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136642
Tested-by: Christian Lohmaier 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 1da1974bedb7..d329e34c20d2 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -498,7 +498,7 @@ IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl, 
weld::ComboBox&, void)
 
 void SdTpOptionsMisc::SetImpressMode()
 {
-#ifndef ENABLE_SDREMOTE_BLUETOOTH
+#ifndef ENABLE_SDREMOTE
 m_xCbxEnableSdremote->hide();
 #else
 (void) this; // loplugin:staticmethods


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

2022-06-29 Thread Noel Grandin (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8e7edc8c3620e4f733c1974a288e5a5abd29f87e
Author: Noel Grandin 
AuthorDate: Wed Jun 29 20:50:47 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 30 08:50:25 2022 +0200

tdf#137544 std::unordered_set is cheaper here

when the number of on screen elements becomes rather large

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index d084837c4af0..4a7a244800aa 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -40,6 +40,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 namespace com::sun::star::accessibility { class XAccessibleEventListener; }
@@ -221,7 +222,7 @@ class DocumentFocusListener final :
 public ::cppu::WeakImplHelper< 
css::accessibility::XAccessibleEventListener >
 {
 
-o3tl::sorted_vector< css::uno::Reference< css::uno::XInterface > > 
m_aRefList;
+std::unordered_set< css::uno::Reference< css::uno::XInterface > > 
m_aRefList;
 
 public:
 /// @throws lang::IndexOutOfBoundsException


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

2022-06-29 Thread Noel Grandin (via logerrit)
 sd/source/ui/unoidl/unoobj.cxx |   11 +++
 sdext/source/pdfimport/wrapper/wrapper.cxx |   19 ++-
 2 files changed, 17 insertions(+), 13 deletions(-)

New commits:
commit ae27500eaf5cd7e0800cfc5d584809dc4e1739cb
Author: Noel Grandin 
AuthorDate: Wed Jun 29 19:48:17 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 30 08:50:57 2022 +0200

tdf#137544 only construct SdAnimationInfo when we need it

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

diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 6ed6729f9a75..bdd8104bef7c 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -95,7 +95,6 @@ using ::com::sun::star::drawing::XShape;
 #define WID_ANIMPATH16
 #define WID_IMAGEMAP17
 #define WID_ISANIMATION 18
-#define WID_THAT_NEED_ANIMINFO 19
 
 #define WID_ISEMPTYPRESOBJ  20
 #define WID_ISPRESOBJ   21
@@ -421,8 +420,6 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& 
aPropertyName, const c
 SdrObject* pObj = mpShape->GetSdrObject();
 if( pObj )
 {
-SdAnimationInfo* pInfo = GetAnimationInfo(pEntry->nWID <= 
WID_THAT_NEED_ANIMINFO);
-
 switch(pEntry->nWID)
 {
 case WID_NAVORDER:
@@ -506,19 +503,23 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& 
aPropertyName, const c
 if(!(aValue >>= aString))
 throw lang::IllegalArgumentException();
 
+SdAnimationInfo* pInfo = GetAnimationInfo(true);
 pInfo->SetBookmark( SdDrawPage::getUiNameFromPageApiName( 
aString ) );
 break;
 }
 case WID_CLICKACTION:
+{
+SdAnimationInfo* pInfo = GetAnimationInfo(true);
 ::cppu::any2enum< presentation::ClickAction >( 
pInfo->meClickAction, aValue);
 break;
-
+}
 // TODO: WID_PLAYFULL:
 case WID_SOUNDFILE:
 {
 OUString aString;
 if(!(aValue >>= aString))
 throw lang::IllegalArgumentException();
+SdAnimationInfo* pInfo = GetAnimationInfo(true);
 pInfo->maSoundFile = aString;
 EffectMigration::UpdateSoundEffect( mpShape, pInfo );
 break;
@@ -526,6 +527,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& 
aPropertyName, const c
 
 case WID_SOUNDON:
 {
+SdAnimationInfo* pInfo = GetAnimationInfo(true);
 if( !(aValue >>= pInfo->mbSoundOn) )
 throw lang::IllegalArgumentException();
 EffectMigration::UpdateSoundEffect( mpShape, pInfo );
@@ -537,6 +539,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& 
aPropertyName, const c
 if(!(aValue >>= nVerb))
 throw lang::IllegalArgumentException();
 
+SdAnimationInfo* pInfo = GetAnimationInfo(true);
 pInfo->mnVerb = static_cast(nVerb);
 break;
 }
commit 333e24b347293503f1c3abf8871769191b0c751d
Author: Noel Grandin 
AuthorDate: Wed Jun 29 19:47:52 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 30 08:50:42 2022 +0200

tdf#137544 slightly improve perf of pdf parsing

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

diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 1e096ccbc11d..da506d9ceef8 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -156,12 +156,12 @@ public:
 m_aFontMap(101)
 {}
 
-void parseLine( const OString& rLine );
+void parseLine( std::string_view aLine );
 };
 
 class LineParser {
 Parser  & m_parser;
-OString m_aLine;
+std::string_view m_aLine;
 
 static void parseFontFamilyName( FontAttributes& aResult );
 voidreadInt32( sal_Int32& o_Value );
@@ -174,7 +174,7 @@ class LineParser {
 public:
 std::size_t m_nCharIndex = 0;
 
-LineParser(Parser & parser, OString const & line): m_parser(parser), 
m_aLine(line) {}
+LineParser(Parser & parser, std::string_view line): m_parser(parser), 
m_aLine(line) {}
 
 std::string_view readNextToken();
 sal_Int32  readInt32();
@@ -384,7 +384,7 @@ void LineParser::readChar()
 OString aChars;
 
 if (m_nCharIndex != std::string_view::npos)
-aChars = lcl_unescapeLineFeeds( m_aLine.subView( m_nCharIndex ) );
+

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

2022-06-29 Thread Miklos Vajna (via logerrit)
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx |   36 
--
 1 file changed, 17 insertions(+), 19 deletions(-)

New commits:
commit a4a6680718e2cbc6c471894ed9d3b729504002b7
Author: Miklos Vajna 
AuthorDate: Wed Jun 29 19:51:14 2022 +0200
Commit: Miklos Vajna 
CommitDate: Thu Jun 30 08:53:26 2022 +0200

lingucomponent: avoid 'using namespace' in a header file

Because that would pollute the global namespace in any cxx file
including this header.

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

diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx
index 36b31238d0b5..0262be896cd6 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx
@@ -30,11 +30,6 @@
 #include 
 #include 
 
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::linguistic2;
-
 // Magical numbers
 #define MAX_CACHE_SIZE 10
 #define MAX_SUGGESTIONS_SIZE 10
@@ -48,13 +43,15 @@ enum class HTTP_METHOD
 };
 
 class LanguageToolGrammarChecker
-: public cppu::WeakImplHelper
+: public cppu::WeakImplHelper
 {
-Sequence m_aSuppLocales;
-o3tl::lru_map> mCachedResults;
+css::uno::Sequence m_aSuppLocales;
+o3tl::lru_map>
+mCachedResults;
 LanguageToolGrammarChecker(const LanguageToolGrammarChecker&) = delete;
 LanguageToolGrammarChecker& operator=(const LanguageToolGrammarChecker&) = 
delete;
-static void parseProofreadingJSONResponse(ProofreadingResult& rResult,
+static void 
parseProofreadingJSONResponse(css::linguistic2::ProofreadingResult& rResult,
   std::string_view aJSONBody);
 static std::string makeHttpRequest(std::string_view aURL, HTTP_METHOD 
method,
const OString& aPostData, tools::Long& 
nStatusCode);
@@ -64,30 +61,31 @@ public:
 virtual ~LanguageToolGrammarChecker() override;
 
 // XSupportedLocales
-virtual Sequence SAL_CALL getLocales() override;
-virtual sal_Bool SAL_CALL hasLocale(const Locale& rLocale) override;
+virtual css::uno::Sequence SAL_CALL getLocales() 
override;
+virtual sal_Bool SAL_CALL hasLocale(const css::lang::Locale& rLocale) 
override;
 
 // XProofReader
 virtual sal_Bool SAL_CALL isSpellChecker() override;
-virtual ProofreadingResult SAL_CALL doProofreading(
-const OUString& aDocumentIdentifier, const OUString& aText, const 
Locale& aLocale,
-sal_Int32 nStartOfSentencePosition, sal_Int32 
nSuggestedBehindEndOfSentencePosition,
-const Sequence& aProperties) override;
+virtual css::linguistic2::ProofreadingResult SAL_CALL
+doProofreading(const OUString& aDocumentIdentifier, const OUString& aText,
+   const css::lang::Locale& aLocale, sal_Int32 
nStartOfSentencePosition,
+   sal_Int32 nSuggestedBehindEndOfSentencePosition,
+   const css::uno::Sequence& 
aProperties) override;
 
 virtual void SAL_CALL ignoreRule(const OUString& aRuleIdentifier,
- const Locale& aLocale) override;
+ const css::lang::Locale& aLocale) 
override;
 virtual void SAL_CALL resetIgnoreRules() override;
 
 // XServiceDisplayName
-virtual OUString SAL_CALL getServiceDisplayName(const Locale& rLocale) 
override;
+virtual OUString SAL_CALL getServiceDisplayName(const css::lang::Locale& 
rLocale) override;
 
 // XInitialization
-virtual void SAL_CALL initialize(const Sequence& rArguments) override;
+virtual void SAL_CALL initialize(const css::uno::Sequence& 
rArguments) override;
 
 // XServiceInfo
 virtual OUString SAL_CALL getImplementationName() override;
 virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) 
override;
-virtual Sequence SAL_CALL getSupportedServiceNames() override;
+virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sysui/desktop

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sysui/desktop/macosx/Info.plist.in |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 83b65152c9a6547c47aabccdba6b66c0a749076b
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 13:43:37 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:57:42 2022 +0200

tdf#126961 fix access to the macOS address book

Having the personal-information.addressbook entitlement is not enough.
Without the plist key NSContactsUsageDescription, macOS will not ask the
user to grant access and the request is implicitly denied without any
feedback/logging.

Change-Id: I954fa86b35a128f08e5c498191bc0949e0edeebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136619
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit d1739c8c735bcf890167c63b5559f2610e5a017a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136638
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index e50d7a20c4dd..6593139019fc 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1959,6 +1959,8 @@
 @MACOSX_DEPLOYMENT_TARGET@.0
 NSHighResolutionCapable
 
+NSContactsUsageDescription
+You can add your contacts as a data source for mail merge or 
similar operations.
 
 
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sysui/desktop

2022-06-29 Thread Christian Lohmaier (via logerrit)
 sysui/desktop/macosx/Info.plist.in |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 6782748ca5ffa036de58cf9ad63d568703180390
Author: Christian Lohmaier 
AuthorDate: Wed Jun 29 13:43:37 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 30 08:58:05 2022 +0200

tdf#126961 fix access to the macOS address book

Having the personal-information.addressbook entitlement is not enough.
Without the plist key NSContactsUsageDescription, macOS will not ask the
user to grant access and the request is implicitly denied without any
feedback/logging.

Change-Id: I954fa86b35a128f08e5c498191bc0949e0edeebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136619
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit ccf518a6fd2819e6a328e953d5e7356d8d9bd11f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136637
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index e50d7a20c4dd..6593139019fc 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1959,6 +1959,8 @@
 @MACOSX_DEPLOYMENT_TARGET@.0
 NSHighResolutionCapable
 
+NSContactsUsageDescription
+You can add your contacts as a data source for mail merge or 
similar operations.