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

2021-10-18 Thread Jim Raykowski (via logerrit)
 include/editeng/editids.hrc  |2 -
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 
+
 svx/sdi/svx.sdi  |   15 
++
 sw/sdi/_annotsh.sdi  |7 

 sw/sdi/_textsh.sdi   |6 

 sw/sdi/drwtxtsh.sdi  |7 

 sw/source/uibase/shells/annotsh.cxx  |   10 
++
 sw/source/uibase/shells/drwtxtex.cxx |   10 
++
 sw/source/uibase/shells/txtattr.cxx  |4 ++
 sw/uiconfig/swriter/menubar/menubar.xml  |1 
 10 files changed, 69 insertions(+), 1 deletion(-)

New commits:
commit 40458226fda358bd90c25ddfe6a9b2cf25b2fcad
Author: Jim Raykowski 
AuthorDate: Wed Oct 13 13:24:39 2021 -0800
Commit: Heiko Tietze 
CommitDate: Tue Oct 19 08:22:43 2021 +0200

tdf#113512 Writer: 1.15 line spacing UNO command

Resolves the Writer 1.15 line spacing part of the request for 1.15,
2.5, and 3 line spacing UNO commands.

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

diff --git a/include/editeng/editids.hrc b/include/editeng/editids.hrc
index 129afc52234e..5560eea1336a 100644
--- a/include/editeng/editids.hrc
+++ b/include/editeng/editids.hrc
@@ -51,7 +51,6 @@
 #define SID_ATTR_CHAR_FONTLIST  ( SID_SVX_START + 22 )
 #define SID_ATTR_BORDER_OUTER   ( SID_SVX_START + 24 )
 #define SID_ATTR_BORDER_SHADOW  ( SID_SVX_START + 25 )
-  // free
 #define SID_ATTR_PARA_ADJUST( SID_SVX_START + 27 )
 #define SID_ATTR_PARA_ADJUST_LEFT   ( SID_SVX_START + 28 )
 #define SID_ATTR_PARA_ADJUST_RIGHT  ( SID_SVX_START + 29 )
@@ -60,6 +59,7 @@
 #define SID_ATTR_PARA_LINESPACE ( SID_SVX_START + 33 )
 #define SID_ATTR_PARA_LINESPACE_10  ( SID_SVX_START + 34 )
 #define SID_ATTR_PARA_LINESPACE_15  ( SID_SVX_START + 35 )
+#define SID_ATTR_PARA_LINESPACE_115 ( SID_SVX_START + 26 )
 #define SID_ATTR_PARA_LINESPACE_20  ( SID_SVX_START + 36 )
 #define SID_ATTR_PARA_PAGEBREAK ( SID_SVX_START + 37 )
 #define SID_ATTR_PARA_HYPHENZONE( SID_SVX_START + 38 )
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 37fa7fc9ffb0..c45aab0823b4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1828,6 +1828,14 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   15
 
   
+  
+
+  Line Spacing: 1.15
+
+
+  15
+
+  
   
 
   Line Spacing: 1.5
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 4cb657ee48b5..1e08145d3644 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8100,6 +8100,21 @@ SfxBoolItem SpacePara1 SID_ATTR_PARA_LINESPACE_10
 GroupId = SfxGroupId::Format;
 ]
 
+SfxBoolItem SpacePara115 SID_ATTR_PARA_LINESPACE_115
+[
+AutoUpdate = TRUE,
+FastCall = FALSE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+ToolBoxConfig = TRUE,
+GroupId = SfxGroupId::Format;
+]
 
 SfxBoolItem SpacePara15 SID_ATTR_PARA_LINESPACE_15
 
diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
index 66242a1f52ca..b335fb9e0676 100644
--- a/sw/sdi/_annotsh.sdi
+++ b/sw/sdi/_annotsh.sdi
@@ -417,6 +417,13 @@ interface _Annotation
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
+SID_ATTR_PARA_LINESPACE_115
+[
+ExecMethod = Exec ;
+StateMethod = GetState ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
+
 SID_ATTR_PARA_LINESPACE_15 // api:
 [
 ExecMethod = Exec ;
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index 6af93a628eb6..38359c593471 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1167,6 +1167,12 @@ interface BaseText
 StateMethod = GetAttrState ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+SID_ATTR_PARA_LINESPACE_115
+[
+ExecMethod = ExecParaAttr ;
+StateMethod = GetAttrState ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
 SID_ATTR_PARA_LINESPACE_15
 [
 ExecMeth

[Libreoffice-commits] core.git: officecfg/registry sc/uiconfig

2021-10-18 Thread Ross Johnson (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   11 
++
 sc/uiconfig/scalc/ui/notebookbar.ui   |2 -
 sc/uiconfig/scalc/ui/notebookbar_compact.ui   |2 -
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui|2 -
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui   |2 -
 5 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 672b4c155766e9bf18e109e92f3e8cc71a52e21d
Author: Ross Johnson 
AuthorDate: Fri Oct 1 20:43:33 2021 +1000
Commit: Heiko Tietze 
CommitDate: Tue Oct 19 08:18:09 2021 +0200

tdf#144572 - fix incomplete labeling of Pivot Table UI elements

Created an additional alias of .uno:DataDataPilotRun, of which
.uno:InsertPivotTable is already an alias, called
.uno:InsertPivotTableNBLabel for use in the NoteBook UI styles.

ContextLabel didn't appear to apply to these instances, they
must be considered sub menus even though they appear not.

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 3c1013147c65..12e39a72ed0f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -480,6 +480,17 @@
   1
 
   
+  
+
+  ~Insert or Edit Pivot Table...
+
+
+  .uno:DataDataPilotRun
+
+
+  1
+
+  
   
 
   Select to Left Block Margin
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index 2682869eacea..a4aff25ee371 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -129,7 +129,7 @@
   
 True
 False
-.uno:InsertPivotTable
+.uno:InsertPivotTableNBLabel
   
 
 
diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
index 62ec2e2645a8..93fe9cf63e3e 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -129,7 +129,7 @@
   
 True
 False
-.uno:InsertPivotTable
+.uno:InsertPivotTableNBLabel
   
 
 
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index db1a7849f907..06aa431e165b 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -2826,7 +2826,7 @@
   
 True
 False
-.uno:InsertPivotTable
+.uno:InsertPivotTableNBLabel
   
 
 
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
index a0c64db41c7e..ef0423549647 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
@@ -498,7 +498,7 @@
   
 True
 False
-.uno:InsertPivotTable
+.uno:InsertPivotTableNBLabel
   
 
 


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

2021-10-18 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx  |   18 
 writerfilter/qa/cppunittests/dmapper/data/chart-zorder.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |3 ++
 3 files changed, 21 insertions(+)

New commits:
commit 63007619da7e6c4a6d0c466a8fe54324252be14b
Author: Miklos Vajna 
AuthorDate: Mon Oct 18 19:54:07 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Oct 19 08:17:14 2021 +0200

tdf#144798 DOCX import: handle ZOrder of chart objects

Regression from commit 10efab2b9a3cf7fc49655c90ba29db4512680c38
(tdf#82824 DOCX import: fix at-char embedded object handling,
2016-11-15), the problem was that if we start supporting anchor types
other than as-char, then handling ZOrder is no longer optional.

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

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
index ef4c8ed40fb0..3719a09e3323 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -212,6 +213,23 @@ CPPUNIT_TEST_FIXTURE(Test, testCreateDatePreserve)
 // i.e. the formatting of the create date field was lost.
 CPPUNIT_ASSERT_EQUAL(OUString("7/7/2020 10:11:00 AM"), 
xPortion->getString());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testChartZOrder)
+{
+// Given a document with a chart and a shape on it:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"chart-zorder.docx";
+
+// When loading the document:
+getComponent() = loadFromDesktop(aURL);
+
+// Then make sure the shape is on top of the chart:
+uno::Reference 
xDrawPageSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xChart(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed, as 
the chart was on top
+// of the shape.
+
CPPUNIT_ASSERT(xChart->supportsService("com.sun.star.text.TextEmbeddedObject"));
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/chart-zorder.docx 
b/writerfilter/qa/cppunittests/dmapper/data/chart-zorder.docx
new file mode 100644
index ..e022a3bde266
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/chart-zorder.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 12dacd0ef733..0dcaa197962b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -7364,6 +7364,9 @@ void  DomainMapper_Impl::ImportGraphic(const 
writerfilter::Reference< Properties
 xEmbeddedProps->setPropertyValue("VertOrientRelation", 
xShapeProps->getPropertyValue("VertOrientRelation"));
 //tdf123873 fix missing textwrap import
 xEmbeddedProps->setPropertyValue("TextWrap", 
xShapeProps->getPropertyValue("TextWrap"));
+
+// GraphicZOrderHelper::findZOrder() was called already, so can 
just copy it over.
+xEmbeddedProps->setPropertyValue("ZOrder", 
xShapeProps->getPropertyValue("ZOrder"));
 }
 }
 //insert it into the document at the current cursor position


[Libreoffice-commits] core.git: 2 commits - connectivity/source cui/source editeng/source sc/source svtools/source svx/source unotools/source vcl/unx xmloff/source

2021-10-18 Thread Eike Rathke (via logerrit)
 connectivity/source/commontools/formattedcolumnvalue.cxx |2 +-
 cui/source/options/optgdlg.cxx   |2 +-
 cui/source/options/optlingu.cxx  |2 +-
 cui/source/tabpages/numpages.cxx |2 +-
 editeng/source/misc/svxacorr.cxx |2 +-
 sc/source/core/tool/interpr1.cxx |2 +-
 sc/source/ui/sidebar/CellLineStyleValueSet.cxx   |2 +-
 svtools/source/control/ctrltool.cxx  |2 +-
 svx/source/dialog/svxbmpnumvalueset.cxx  |2 +-
 svx/source/sidebar/line/LineWidthValueSet.cxx|2 +-
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx |2 +-
 unotools/source/config/syslocaleoptions.cxx  |4 ++--
 vcl/unx/gtk3/gtkframe.cxx|2 +-
 xmloff/source/style/xmlnumfe.cxx |4 ++--
 14 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit b582a76d7cc20adb8440830ffd1597258d2d6a4a
Author: Eike Rathke 
AuthorDate: Mon Oct 18 22:23:12 2021 +0200
Commit: Eike Rathke 
CommitDate: Tue Oct 19 00:20:49 2021 +0200

Use MsLangId::getConfiguredSystemUILanguage()

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

diff --git a/svtools/source/control/ctrltool.cxx 
b/svtools/source/control/ctrltool.cxx
index 96b81ed13abb..3d908b342ab8 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -772,7 +772,7 @@ FontSizeNames::FontSizeNames( LanguageType eLanguage )
 if ( eLanguage == LANGUAGE_DONTKNOW )
 eLanguage = 
Application::GetSettings().GetUILanguageTag().getLanguageType();
 if ( eLanguage == LANGUAGE_SYSTEM )
-eLanguage = MsLangId::getSystemUILanguage();
+eLanguage = MsLangId::getConfiguredSystemUILanguage();
 
 if (MsLangId::isSimplifiedChinese(eLanguage))
 {
diff --git a/unotools/source/config/syslocaleoptions.cxx 
b/unotools/source/config/syslocaleoptions.cxx
index 04a31826de82..7e38237ec3b2 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -275,7 +275,7 @@ void SvtSysLocaleOptions_Impl::MakeRealUILocale()
 {
 if (m_aUILocaleString.isEmpty())
 {
-LanguageType nLang = MsLangId::getSystemUILanguage();
+LanguageType nLang = MsLangId::getConfiguredSystemUILanguage();
 m_aRealUILocale.reset( nLang).makeFallback();
 }
 else
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index aa1d5b600187..41e621db24db 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -1371,7 +1371,7 @@ void GtkSalFrame::Init( SalFrame* pParent, 
SalFrameStyleFlags nStyle )
 //header bar with the desired 'outside' direction
 if ((eType == GDK_WINDOW_TYPE_HINT_NORMAL || eType == 
GDK_WINDOW_TYPE_HINT_DIALOG) && 
DLSYM_GDK_IS_WAYLAND_DISPLAY(GtkSalFrame::getGdkDisplay()))
 {
-const bool bDesktopIsRTL = 
MsLangId::isRightToLeft(MsLangId::getSystemUILanguage());
+const bool bDesktopIsRTL = 
MsLangId::isRightToLeft(MsLangId::getConfiguredSystemUILanguage());
 const bool bAppIsRTL = gtk_widget_get_default_direction() == 
GTK_TEXT_DIR_RTL;
 if (bDesktopIsRTL != bAppIsRTL)
 {
commit e3c3c3b84ef6b91f89a5e388e6538f18a2e8b13e
Author: Eike Rathke 
AuthorDate: Mon Oct 18 23:22:33 2021 +0200
Commit: Eike Rathke 
CommitDate: Tue Oct 19 00:20:36 2021 +0200

Use MsLangId::getConfiguredSystemLanguage()

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

diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx 
b/connectivity/source/commontools/formattedcolumnvalue.cxx
index 072802e9a9eb..e290875236b1 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -155,7 +155,7 @@ namespace dbtools
 if ( !bHaveFieldFormat )
 {
 // fall back to a format key as indicated by the field type
-Locale aSystemLocale( LanguageTag( 
MsLangId::getSystemLanguage() ).getLocale() );
+Locale aSystemLocale( LanguageTag( 
MsLangId::getConfiguredSystemLanguage() ).getLocale() );
 Reference< XNumberFormatTypes > xNumTypes( 
xNumberFormatsSupp->getNumberFormats(), UNO_QUERY_THROW );
 _rData.m_nFormatKey = getDefaultNumberFormat( _rxColumn, 
xNumTypes, aSystemLocale );
 }
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5424c03622f4..30b98e8de55f 100644
--- a/cui/source/options/opt

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

2021-10-18 Thread Eike Rathke (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |   46 +++-
 include/i18nlangtag/mslangid.hxx|   37 +
 2 files changed, 54 insertions(+), 29 deletions(-)

New commits:
commit 20081a8ea052b2f31915bd127c3b282cf5025d59
Author: Eike Rathke 
AuthorDate: Mon Oct 18 22:02:52 2021 +0200
Commit: Eike Rathke 
CommitDate: Mon Oct 18 23:23:56 2021 +0200

Introduce MsLangId::getConfiguredSystemLanguage()

To be used instead of getSystemLanguage() in a subsequent change.
For details see commit summary of

commit aec5312ffab24236876693d7a8b55843847f2a48
CommitDate: Mon Oct 18 21:14:24 2021 +0200

Related: tdf#145173 Ensure known supported system and default 
document locale

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

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index d3bcee020a00..4cc448768f3a 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -81,19 +81,9 @@ LanguageType MsLangId::getRealLanguage( LanguageType nLang )
 {
 LanguageType simplifyLang = simplifySystemLanguages( nLang);
 if (simplifyLang == LANGUAGE_SYSTEM )
-{
-if (nConfiguredSystemLanguage == LANGUAGE_SYSTEM)
-nLang = getSystemLanguage();
-else
-nLang = nConfiguredSystemLanguage;
-}
+nLang = getConfiguredSystemLanguage();
 else if (simplifyLang == LANGUAGE_HID_HUMAN_INTERFACE_DEVICE)
-{
-if (nConfiguredSystemUILanguage == LANGUAGE_SYSTEM)
-nLang = getSystemUILanguage();
-else
-nLang = nConfiguredSystemUILanguage;
-}
+nLang = getConfiguredSystemUILanguage();
 else
 {
 /* TODO: would this be useful here? */
@@ -106,6 +96,38 @@ LanguageType MsLangId::getRealLanguage( LanguageType nLang )
 }
 
 
+// static
+LanguageType MsLangId::getConfiguredSystemLanguage()
+{
+if (nConfiguredSystemLanguage != LANGUAGE_SYSTEM)
+return nConfiguredSystemLanguage;
+return getSystemLanguage();
+}
+
+
+// static
+LanguageType MsLangId::getConfiguredSystemUILanguage()
+{
+if (nConfiguredSystemUILanguage != LANGUAGE_SYSTEM)
+return nConfiguredSystemUILanguage;
+return getSystemUILanguage();
+}
+
+
+// static
+LanguageType MsLangId::getSystemLanguage()
+{
+return getPlatformSystemLanguage();
+}
+
+
+// static
+LanguageType MsLangId::getSystemUILanguage()
+{
+return getPlatformSystemUILanguage();
+}
+
+
 // static
 LanguageType MsLangId::resolveSystemLanguageByScriptType( LanguageType nLang, 
sal_Int16 nType )
 {
diff --git a/include/i18nlangtag/mslangid.hxx b/include/i18nlangtag/mslangid.hxx
index 9376458bdf6f..4966fde852f3 100644
--- a/include/i18nlangtag/mslangid.hxx
+++ b/include/i18nlangtag/mslangid.hxx
@@ -57,14 +57,31 @@ public:
 return LanguageType((sal_uInt16(nLangID) & ~LANGUAGE_MASK_PRIMARY) >> 
10);
 }
 
+/** Get the configured system language/locale.
+If not set yet then getSystemLanguage().
+
+Prefer this over getSystemLanguage() unless you exactly know why you
+would not. */
+static LanguageType getConfiguredSystemLanguage();
+
+/** Get the configured system UI language/locale.
+If not set yet then getSystemUILanguage().
+
+Prefer this over getSystemUILanguage() unless you exactly know why you
+would not. */
+static LanguageType getConfiguredSystemUILanguage();
+
+
 /** Language/locale of category LC_CTYPE (on Unix, else the system
 language).
-Evaluation order: LC_ALL, LC_CTYPE, LANG */
+Evaluation order: LC_ALL, LC_CTYPE, LANG
+Note this may return an unknown unsupported locale. */
 static LanguageType getSystemLanguage();
 
 /** Language/locale of category LC_MESSAGES (on Unix, else same as
-GetSystemLanguage()).
-Evaluation order: LANGUAGE, LC_ALL, LC_MESSAGES, LANG */
+getSystemLanguage()).
+Evaluation order: LANGUAGE, LC_ALL, LC_MESSAGES, LANG
+Note this may return an unknown unsupported locale. */
 static LanguageType getSystemUILanguage();
 
 
@@ -312,20 +329,6 @@ private:
 I18NLANGTAG_DLLPRIVATE static inline LanguageType simplifySystemLanguages( 
LanguageType nLang );
 };
 
-
-// static
-inline LanguageType MsLangId::getSystemLanguage()
-{
-return getPlatformSystemLanguage();
-}
-
-
-// static
-inline LanguageType MsLangId::getSystemUILanguage()
-{
-return getPlatformSystemUILanguage();
-}
-
 #endif // INCLUDED_I18NLANGTAG_MSLANGID_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ipict/ipict.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c7f0fddb4a1a0dcc0dd21d2a27d67d4e75a8195c
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 19:33:46 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 21:40:19 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/ipict/ipict.cxx 
b/vcl/source/filter/ipict/ipict.cxx
index 2b5109461a8f..148de01d4edd 100644
--- a/vcl/source/filter/ipict/ipict.cxx
+++ b/vcl/source/filter/ipict/ipict.cxx
@@ -606,9 +606,9 @@ sal_uInt8 PictReader::ReadAndDrawSameArc(PictDrawingMethod 
eMethod)
 
 sal_uInt64 PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod)
 {
-sal_uInt16 nSize;
-
+sal_uInt16 nSize(0);
 pPict->ReadUInt16( nSize );
+
 // read the DATA
 //
 // a region data is a mask and is probably coded as


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

2021-10-18 Thread Eike Rathke (via logerrit)
 desktop/source/app/langselect.cxx |   15 +++
 svx/source/dialog/langbox.cxx |2 ++
 2 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit aec5312ffab24236876693d7a8b55843847f2a48
Author: Eike Rathke 
AuthorDate: Mon Oct 18 20:02:55 2021 +0200
Commit: Eike Rathke 
CommitDate: Mon Oct 18 21:14:24 2021 +0200

Related: tdf#145173 Ensure known supported system and default document 
locale

For an unsupported locale like {en-IL} that could had ended up as
language-only {en} if the aImplIsoLangEntries map contains such
entry as obtained through
MsLangId::convertUnxByteStringToLanguage() and
Conversion::convertIsoNamesToLanguage(). For the system locale in
SvtSysLocale a proper fallback is used but the default document
language was propagated as is

Other places evaluating MsLangId::getSystemLanguage() are affected
as well, those probably will have to be replaced by a call to
MsLangId::getRealLanguage(LANGUAGE_SYSTEM) or a newly to be
introduced MsLangId::getConfiguredSystemLanguage() and
MsLangId::getSystemLanguage() be made private or accessible only
by LanguageTag.

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

diff --git a/desktop/source/app/langselect.cxx 
b/desktop/source/app/langselect.cxx
index 2958ed8786b5..8a07e26c3134 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -121,11 +121,18 @@ bool prepareLocale() {
 }
 MsLangId::setConfiguredSystemUILanguage(tag.getLanguageType(false));
 
+// Note the system language/locale here may or may not be correct before we
+// actually set it below. It is what could be figured from the system
+// setting and may only partially match, like "en" for an unsupported
+// English locale.
+LanguageTag aSysLocTag( MsLangId::getSystemLanguage());
 OUString setupSysLoc(officecfg::Setup::L10N::ooSetupSystemLocale::get());
-LanguageTag::setConfiguredSystemLanguage(
-setupSysLoc.isEmpty()
-? MsLangId::getSystemLanguage()
-: LanguageTag(setupSysLoc).getLanguageType(false));
+if (!setupSysLoc.isEmpty())
+aSysLocTag.reset( setupSysLoc);
+// Ensure the system locale is set to a known supported locale.
+aSysLocTag.makeFallback();
+LanguageTag::setConfiguredSystemLanguage( 
aSysLocTag.getLanguageType(false));
+
 // #i32939# setting of default document locale
 // #i32939# this should not be based on the UI language
 // So obtain the system locale now configured just above and pass it on,
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index fcd9c54e3774..ca9344f32bc7 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -356,6 +356,8 @@ weld::ComboBoxEntry SvxLanguageBox::BuildEntry(const 
LanguageType nLangType, sal
 else if (nRealLang == LANGUAGE_USER_SYSTEM_CONFIG)
 {
 nRealLang = MsLangId::getSystemLanguage();
+// Whatever we obtained, ensure a known supported locale.
+nRealLang = LanguageTag(nRealLang).makeFallback().getLanguageType();
 aStrEntry += " - " + SvtLanguageTable::GetLanguageString( nRealLang );
 }
 


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

2021-10-18 Thread Julien Nabet (via logerrit)
 framework/source/accelerators/acceleratorconfiguration.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3abbb1486f09b377084c3232a921772302ab34ec
Author: Julien Nabet 
AuthorDate: Sun Oct 17 16:59:04 2021 +0200
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 20:52:27 2021 +0200

Fix nb of tokens in XCUBasedAcceleratorConfiguration::reloadChanged

and use 4 like XCUBasedAcceleratorConfiguration::impl_ts_load
Indeed, there can be:
- SHIFT
- MOD1
- MOD2
- MOD3

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

diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx 
b/framework/source/accelerators/acceleratorconfiguration.cxx
index 877b4a9f6843..efa200556fda 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -1224,8 +1224,8 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( 
const OUString& sPrimarySe
 sKeyIdentifier = sKey.getToken(0, '_', nIndex);
 aKeyEvent.KeyCode = 
KeyMapping::get().mapIdentifierToCode("KEY_"+sKeyIdentifier);
 
-css::uno::Sequence< OUString > sToken(3);
-const sal_Int32 nToken = 3;
+css::uno::Sequence< OUString > sToken(4);
+const sal_Int32 nToken = 4;
 for (sal_Int32 i=0; i

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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/RemoteFilesDialog.cxx |   43 +---
 fpicker/source/office/RemoteFilesDialog.hxx |2 -
 2 files changed, 21 insertions(+), 24 deletions(-)

New commits:
commit c263a01a47a0a2521f50feb9544b51e78399a78c
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 11:37:12 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 20:29:32 2021 +0200

Related: tdf#145169 change to selected dir on remote "save"

if a dir is selected then try to change to that dir
when save is clicked instead of saving using that as
basename, which is consistent with standard fpicker.

don't change the contents of the Entry, leave it alone.

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

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 544887795da4..9757f151541c 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -380,21 +380,18 @@ void RemoteFilesDialog::OpenURL( OUString const & sURL )
 }
 }
 
-void RemoteFilesDialog::AddFileExtension()
+OUString RemoteFilesDialog::AddFileExtension(const OUString& rFileName)
 {
 if (m_nCurrentFilter == -1)
-return;
+return rFileName;
 
 OUString sExt = m_aFilters[m_nCurrentFilter].second;
-OUString sFileName = m_xName_ed->get_text();
+sal_Int32 nDotPos = rFileName.lastIndexOf( '.' );
 
-sal_Int32 nDotPos = sFileName.lastIndexOf( '.' );
+if (nDotPos == -1)
+return rFileName + sExt.subView( 1 ); // without '*'
 
-if ( nDotPos == -1 )
-{
-sFileName += sExt.subView( 1 ); // without '*'
-m_xName_ed->set_text( sFileName );
-}
+return rFileName;
 }
 
 void RemoteFilesDialog::EnableControls()
@@ -826,18 +823,18 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, NewFolderHdl, 
weld::Button&, void )
 
 IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, weld::Button&, void )
 {
-OUString sNameNoExt = m_xName_ed->get_text();
-OUString sPathNoExt;
-
-// auto extension
-if( m_eMode == REMOTEDLG_MODE_SAVE )
-AddFileExtension();
+OUString sUserSelectedPath;
 
 // check if file/path exists
-
 OUString sCurrentPath = m_xFileView->GetViewURL();
 OUString sSelectedItem = m_xFileView->GetCurrentURL();
-OUString sName = m_xName_ed->get_text();
+OUString sUserTypedName = m_xName_ed->get_text();
+OUString sFileName;
+// auto extension
+if( m_eMode == REMOTEDLG_MODE_SAVE )
+sFileName = AddFileExtension(sUserTypedName);
+else
+sFileName = sUserTypedName;
 
 bool bFileDlg = ( m_eType == REMOTEDLG_TYPE_FILEDLG );
 bool bSelected = ( m_xFileView->GetSelectionCount() > 0 );
@@ -847,8 +844,8 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, weld::Button&, 
void )
 
 if( !bSelected )
 {
-m_sPath = sCurrentPath + INetURLObject::encode( sName, 
INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All );
-sPathNoExt = sCurrentPath + INetURLObject::encode( sNameNoExt, 
INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All );
+m_sPath = sCurrentPath + INetURLObject::encode(sFileName, 
INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All);
+sUserSelectedPath = sCurrentPath + 
INetURLObject::encode(sUserTypedName, INetURLObject::PART_FPATH, 
INetURLObject::EncodeMechanism::All);
 }
 else
 {
@@ -864,6 +861,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, weld::Button&, 
void )
 aURL.SetUser( aCurrentURL.GetUser() );
 
 m_sPath = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
+sUserSelectedPath = m_sPath;
 }
 
 bool bExists = false;
@@ -878,7 +876,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, weld::Button&, 
void )
 if( m_eMode == REMOTEDLG_MODE_SAVE )
 {
 OUString sMsg = FpsResId( STR_SVT_ALREADYEXISTOVERWRITE );
-sMsg = sMsg.replaceFirst( "$filename$", sName );
+sMsg = sMsg.replaceFirst("$filename$", sFileName);
 std::unique_ptr 
xBox(Application::CreateMessageDialog(m_xDialog.get(),
   
VclMessageType::Question, VclButtonsType::YesNo, sMsg));
 if (xBox->run() != RET_YES)
@@ -887,10 +885,9 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, weld::Button&, 
void )
 }
 else
 {
-if( ContentIsFolder( sPathNoExt ) )
+if (ContentIsFolder(sUserSelectedPath))
 {
-OpenURL( sPathNoExt );
-m_xName_ed->set_text( "" );
+OpenURL(sUserSelectedPath);
 
 if (!bSelected)
 m_xName_ed->grab_focus();
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx 
b/fpicker/source/office/RemoteFilesDialog.hxx
index 6ff5ae747212..93a8e363f5b4 100644
---

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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/fileview.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 3c168b1dc876e4fca97f73683572462a29227523
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 16:28:03 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 20:29:15 2021 +0200

Resolves: tdf#145169 only position treeview cursor at the first entry

when the view is filled, don't actually select the entry.

With these single selection trees the default is to select when the
cursor is positioned, so move the unselect to after the cursor
positioning to achieve this.

Now nothing is considered "selected" in the view unless the user
explicitly does that so the contents of the entry are used by default
on save/load because nothing is selected in the treeview unless the
user does that.

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

diff --git a/fpicker/source/office/fileview.cxx 
b/fpicker/source/office/fileview.cxx
index 788c001a5574..203f1d1d27b3 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -1386,25 +1386,25 @@ void SvtFileView_Impl::ResetCursor()
 {
 if (mxView->get_visible())
 {
-// deselect
-mxView->unselect_all();
 std::unique_ptr xFirst = mxView->make_iterator();
 if (mxView->get_iter_first(*xFirst))
 {
 // set cursor to the first entry
 mxView->set_cursor(*xFirst);
 }
+// deselect
+mxView->unselect_all();
 }
 else
 {
-// deselect
-mxIconView->unselect_all();
 std::unique_ptr xFirst = mxIconView->make_iterator();
 if (mxIconView->get_iter_first(*xFirst))
 {
 // set cursor to the first entry
 mxIconView->set_cursor(*xFirst);
 }
+// deselect
+mxIconView->unselect_all();
 }
 }
 


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/RemoteFilesDialog.cxx |6 ++
 fpicker/uiconfig/ui/remotefilesdialog.ui|   21 +++--
 2 files changed, 5 insertions(+), 22 deletions(-)

New commits:
commit d989619895a1215d0f701247d5d8368069da8962
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 16:17:54 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 20:28:37 2021 +0200

tdf#145169 have one button per response

not two sharing the same response, so the other buttons response
handler is not a candidate to be called on pressing return

which is the circumstance which causes the dialog to return even
after cancel was selected in its child dialog warning about overwrite

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

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 9c12a1efc25b..544887795da4 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -33,6 +33,7 @@ RemoteFilesDialog::RemoteFilesDialog( weld::Window* pParent, 
PickerFlags nBits )
 , m_xContext( comphelper::getProcessComponentContext() )
 , m_xMasterPasswd( PasswordContainer::create( m_xContext ) )
 , m_bIsInExecute( false )
+, m_xOk_btn(m_xBuilder->weld_button("ok"))
 , m_xCancel_btn(m_xBuilder->weld_button("cancel"))
 , m_xManageServices(m_xBuilder->weld_menu_button("add_service_btn"))
 , m_xServices_lb(m_xBuilder->weld_combo_box("services_lb"))
@@ -62,13 +63,11 @@ RemoteFilesDialog::RemoteFilesDialog( weld::Window* 
pParent, PickerFlags nBits )
 
 if( m_eMode == REMOTEDLG_MODE_OPEN )
 {
-m_xOk_btn = m_xBuilder->weld_button("open");
-
 m_xNewFolder->hide();
 }
 else
 {
-m_xOk_btn = m_xBuilder->weld_button("save");
+m_xOk_btn->set_label(FpsResId(STR_EXPLORERFILE_BUTTONSAVE));
 m_xNewFolder->connect_clicked( LINK( this, RemoteFilesDialog, 
NewFolderHdl ) );
 }
 
@@ -76,7 +75,6 @@ RemoteFilesDialog::RemoteFilesDialog( weld::Window* pParent, 
PickerFlags nBits )
 m_xIconView_btn->connect_clicked( LINK( this, RemoteFilesDialog, 
IconViewHdl ) );
 m_xListView_btn->connect_clicked( LINK( this, RemoteFilesDialog, 
ListViewHdl ) );
 
-m_xOk_btn->show();
 m_xOk_btn->set_sensitive(false);
 
 m_xOk_btn->connect_clicked( LINK( this, RemoteFilesDialog, OkHdl ) );
diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui 
b/fpicker/uiconfig/ui/remotefilesdialog.ui
index 9f4034deefc7..be7e83f43e03 100644
--- a/fpicker/uiconfig/ui/remotefilesdialog.ui
+++ b/fpicker/uiconfig/ui/remotefilesdialog.ui
@@ -138,8 +138,9 @@
   
 
 
-  
+  
 _Open
+True
 True
 True
 True
@@ -152,21 +153,6 @@
 2
   
 
-
-  
-_Save
-True
-True
-True
-True
-True
-  
-  
-True
-True
-3
-  
-
   
   
 False
@@ -565,8 +551,7 @@
 
   help
   cancel
-  open
-  save
+  ok
 
   
 


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

2021-10-18 Thread Chris Sherlock (via logerrit)
 include/tools/poly.hxx|   13 +
 include/vcl/metaact.hxx   |2 -
 vcl/qa/cppunit/outdev.cxx |   66 ++
 3 files changed, 80 insertions(+), 1 deletion(-)

New commits:
commit ed92e40aea759d435ec1c05877e6480654a06ab6
Author: Chris Sherlock 
AuthorDate: Sat Oct 2 14:42:01 2021 +1000
Commit: Tomaž Vajngerl 
CommitDate: Mon Oct 18 20:22:39 2021 +0200

vcl: test OutputDevice::DrawPolyPolygon()

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

diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index 3c39f2d6c56b..d2ecf644af39 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_TOOLS_POLY_HXX
 #define INCLUDED_TOOLS_POLY_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -272,6 +273,18 @@ inline std::basic_ostream & operator <<(
 if (i > 0)
 stream << "--";
 stream << poly.GetPoint(i);
+
+OUString aFlag;
+if (poly.GetFlags(i) == PolyFlags::Normal)
+aFlag = "Normal";
+else if (poly.GetFlags(i) == PolyFlags::Smooth)
+aFlag = "Smooth";
+else if (poly.GetFlags(i) == PolyFlags::Control)
+aFlag = "Control";
+else if (poly.GetFlags(i) == PolyFlags::Symmetric)
+aFlag = "Symmetric";
+
+stream << ";f=" << aFlag;
 }
 stream << ">";
 return stream;
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index a80469bca1e5..ed74de84d5cd 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -435,7 +435,7 @@ public:
 voidSetPolygon(const tools::Polygon& rPoly) { maPoly = 
rPoly; }
 };
 
-class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPolyPolygonAction final : public 
MetaAction
+class VCL_DLLPUBLIC MetaPolyPolygonAction final : public MetaAction
 {
 private:
 
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 799a7fdc8708..df5d8b2c9bf4 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -86,6 +87,7 @@ public:
 void testDrawWaveLine();
 void testDrawPolyLine();
 void testDrawPolygon();
+void testDrawPolyPolygon();
 
 CPPUNIT_TEST_SUITE(VclOutdevTest);
 CPPUNIT_TEST(testVirtualDevice);
@@ -138,6 +140,7 @@ public:
 CPPUNIT_TEST(testDrawWaveLine);
 CPPUNIT_TEST(testDrawPolyLine);
 CPPUNIT_TEST(testDrawPolygon);
+CPPUNIT_TEST(testDrawPolyPolygon);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1947,6 +1950,69 @@ void VclOutdevTest::testDrawPolygon()
 }
 }
 
+static tools::PolyPolygon createPolyPolygon()
+{
+tools::Polygon aPolygon(4);
+
+aPolygon.SetPoint(Point(1, 8), 0);
+aPolygon.SetPoint(Point(2, 7), 1);
+aPolygon.SetPoint(Point(3, 6), 2);
+aPolygon.SetPoint(Point(4, 5), 3);
+
+tools::PolyPolygon aPolyPolygon(aPolygon);
+aPolyPolygon.Optimize(PolyOptimizeFlags::CLOSE);
+
+return aPolyPolygon;
+}
+
+void VclOutdevTest::testDrawPolyPolygon()
+{
+{
+ScopedVclPtrInstance pVDev;
+GDIMetaFile aMtf;
+aMtf.Record(pVDev.get());
+
+pVDev->SetOutputSizePixel(Size(100, 100));
+
+tools::PolyPolygon aPolyPolygon = createPolyPolygon();
+
+pVDev->DrawPolyPolygon(aPolyPolygon);
+
+MetaAction* pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a polypolygon action", 
MetaActionType::POLYPOLYGON,
+ pAction->GetType());
+
+MetaPolyPolygonAction* pPolyPolygonAction = 
dynamic_cast(pAction);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not the same polypolygon in polypolygon 
action", aPolyPolygon,
+ pPolyPolygonAction->GetPolyPolygon());
+}
+
+{
+ScopedVclPtrInstance pVDev;
+GDIMetaFile aMtf;
+aMtf.Record(pVDev.get());
+
+pVDev->SetOutputSizePixel(Size(100, 100));
+
+tools::PolyPolygon aPolyPolygon = createPolyPolygon();
+
+basegfx::B2DPolyPolygon 
aB2DPolyPolygon(aPolyPolygon.getB2DPolyPolygon());
+
+pVDev->DrawPolyPolygon(aB2DPolyPolygon);
+
+MetaAction* pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a polypolygon action", 
MetaActionType::POLYPOLYGON,
+ pAction->GetType());
+
+/* these should match, but the equality operator does not work on 
PolyPolygon for some reason
+
+MetaPolyPolygonAction* pPolyPolygonAction = 
dynamic_cast(pAction);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not the same polypolygon in polypolygon 
action", aPolyPolygon,
+ pPolyPolygonAction->GetPolyPolygon());
+*/
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Vc

[Libreoffice-commits] core.git: oox/CppunitTest_oox_shape.mk oox/qa oox/source

2021-10-18 Thread Regina Henschel (via logerrit)
 oox/CppunitTest_oox_shape.mk |3 ++
 oox/qa/unit/data/tdf125582_TextOnCircle.pptx |binary
 oox/qa/unit/shape.cxx|   31 ++-
 oox/source/drawingml/shape.cxx   |2 -
 4 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit 9142d19ddc751e05041471aa1bbeca2f06729522
Author: Regina Henschel 
AuthorDate: Sun Oct 17 23:49:17 2021 +0200
Commit: Regina Henschel 
CommitDate: Mon Oct 18 19:13:42 2021 +0200

tdf#125582 use TextVerticalAlign_BOTTOM for textCircle

PowerPoint aligns the bottom of the text to the path for prstTxWarp
'textCircle'. That preset type is mapped to 'fontwork-circle-curve'
on import with additional attribute ScaleX=true. Currently the property
TextVerticalAlign is only evaluated in case ScaleX=true. Therefore I
have written the condition similar as the already existing with
'fontwork-arch-up-curve'. If it will be necessary later, all those
conditions can be changed to use rPresetType instead of rClass.

The rendering is slightly different compared to PowerPoint, because
descenders and paragraphs line-spacing are handled differently.

The rendering has still the problem, that in PowerPoint the letters
are placed without gap, but in LO they have additional distances from
each other. The needed ODF attribute draw:text-path-mode is not yet
implemented in LO. Its value 'normal' would be needed here.

Change-Id: I1f03d4845312885eff9ee8dbe1d51ddd437ed8e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123726
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/oox/CppunitTest_oox_shape.mk b/oox/CppunitTest_oox_shape.mk
index 9ae7bbd634cd..9b910f249160 100644
--- a/oox/CppunitTest_oox_shape.mk
+++ b/oox/CppunitTest_oox_shape.mk
@@ -24,6 +24,9 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_shape, \
 cppu \
 oox \
 sal \
+svx \
+svxcore \
+tl \
 test \
 unotest \
 utl \
diff --git a/oox/qa/unit/data/tdf125582_TextOnCircle.pptx 
b/oox/qa/unit/data/tdf125582_TextOnCircle.pptx
new file mode 100644
index ..b2c09e515372
Binary files /dev/null and b/oox/qa/unit/data/tdf125582_TextOnCircle.pptx differ
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 88f86d3bb30e..345ebb215ad6 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -15,11 +15,12 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
-
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -146,6 +147,34 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition)
 CPPUNIT_ASSERT_EQUAL(nExpected, nY);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf125582_TextOnCircle)
+{
+// The document contains a shape with a:prstTxWarp="textCircle" with two 
paragraphs.
+// PowerPoint aligns the bottom of the text with the path, LO had aligned 
the middle of the
+// text with the path, which resulted in smaller text.
+load(u"tdf125582_TextOnCircle.pptx");
+
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xPropSet(xShape, uno::UNO_QUERY);
+
+// BoundRect of Fontwork shape depends on dpi.
+if (IsDefaultDPI())
+{
+SdrObjCustomShape& rSdrCustomShape(
+
static_cast(*SdrObject::getSdrObjectFromXShape(xShape)));
+// Without the fix in place width was 3639, but should be 4824 for 
96dpi.
+tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(4824), aBoundRect.GetWidth(), 
5);
+}
+
+drawing::TextVerticalAdjust eAdjust;
+xPropSet->getPropertyValue("TextVerticalAdjust") >>= eAdjust;
+CPPUNIT_ASSERT_EQUAL_MESSAGE("TextVerticalAdjust", 
drawing::TextVerticalAdjust_BOTTOM, eAdjust);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 6821dffc9f34..6622001b2b0d 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -564,7 +564,7 @@ static void lcl_createPresetShape(const 
uno::Reference& xShape,
 // ToDo: The property is currently not evaluated.
 SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape);
 assert(pShape);
-if (rClass == "fontwork-arch-up-curve")
+if (rClass == "fontwork-arch-up-curve" || rClass == 
"fontwork-circle-curve")
 pShape->SetMergedItem( SdrTextVertAdjustItem( 
SdrTextVertAdjust::SDRTEXTVERTADJUST_BOTTOM ) );
 else if (rClass == "fontwork-arch-down-curve")
 pShape->SetMergedItem( SdrTextVertAdjustItem( 
SdrTextVertAdjust::SDRTEXTVERTADJUST_TOP ) );


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

2021-10-18 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/random.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 300a743048de760e3a5456e8dce549af5f42b11b
Author: Noel Grandin 
AuthorDate: Mon Oct 18 12:41:36 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 18 18:48:49 2021 +0200

make RR easier to use

breaks easily without the RNG being repeatable

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

diff --git a/comphelper/source/misc/random.cxx 
b/comphelper/source/misc/random.cxx
index c8c87888bcae..96d466641dfb 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -42,7 +42,8 @@ struct RandomNumberGenerator
 STD_RNG_ALGO global_rng;
 RandomNumberGenerator()
 {
-bool bRepeatable = (getenv("SAL_RAND_REPEATABLE") != nullptr);
+// make RR easier to use, breaks easily without the RNG being 
repeatable
+bool bRepeatable = (getenv("SAL_RAND_REPEATABLE") != nullptr) || 
(getenv("RR") != nullptr);
 // valgrind on some platforms (e.g.Ubuntu16.04) does not support the 
new Intel RDRAND instructions,
 // which leads to "Illegal Opcode" errors, so just turn off randomness.
 #if defined HAVE_VALGRIND_HEADERS


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - scripting/Jar_ScriptFramework.mk scripting/java

2021-10-18 Thread Stephan Bergmann (via logerrit)
 scripting/Jar_ScriptFramework.mk   
 |1 
 scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
 |   61 
 scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase.java
 |   73 ++
 
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
   |4 
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
 |4 
 5 files changed, 84 insertions(+), 59 deletions(-)

New commits:
commit af82e4c8c87cb7b27426a1950a2d57bc924c2ddf
Author: Stephan Bergmann 
AuthorDate: Mon Oct 18 14:37:05 2021 +0200
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 18:15:22 2021 +0200

Revert incompatible ScriptEditor change

...from interface to abstract class, in 
1c42afc194da2288c5a738b727952e80c323885c
"Respect DisableMacrosExecution option in javascript editor".  It caused 
3rd-
party code like ScriptProviderForooRexx.oxt to fail to install.

Change-Id: I532f27fdce806e471a8551646adbb3aecf80bcee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123745
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit d425cd604cb4d30862640851b11a31e742d81336)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123769
Reviewed-by: Caolán McNamara 

diff --git a/scripting/Jar_ScriptFramework.mk b/scripting/Jar_ScriptFramework.mk
index 397de3ccbc72..bd15b243f9b2 100644
--- a/scripting/Jar_ScriptFramework.mk
+++ b/scripting/Jar_ScriptFramework.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Jar_add_sourcefiles,ScriptFramework,\
scripting/java/com/sun/star/script/framework/provider/PathUtils \
scripting/java/com/sun/star/script/framework/provider/ScriptContext \
scripting/java/com/sun/star/script/framework/provider/ScriptEditor \
+   scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase \
scripting/java/com/sun/star/script/framework/provider/ScriptProvider \
scripting/java/com/sun/star/script/framework/provider/SwingInvocation \

scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog \
diff --git 
a/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java 
b/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
index 395a1b6a8abb..32ebd2fefb41 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
@@ -18,62 +18,13 @@
 
 package com.sun.star.script.framework.provider;
 
-import com.sun.star.beans.NamedValue;
-import com.sun.star.configuration.theDefaultProvider;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.script.framework.container.ScriptMetaData;
 import com.sun.star.script.provider.XScriptContext;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
 
-import javax.swing.JOptionPane;
-import javax.swing.JDialog;
-
-public abstract class ScriptEditor {
-public XScriptContext context;
-
-public abstract Object execute() throws Exception;
-public abstract void indicateErrorLine(int lineNum);
-public abstract void edit(XScriptContext context, ScriptMetaData entry);
-public abstract String getTemplate();
-public abstract String getExtension();
-
-public void setContext(XScriptContext context) {
-this.context = context;
-}
-
-public boolean isMacroExecutionEnabled() {
-XNameAccess xNameAccess = null;
-try {
-String sAccess = "com.sun.star.configuration.ConfigurationAccess";
-XMultiServiceFactory xMSFCfg = 
theDefaultProvider.get(context.getComponentContext());
-Object oAccess = xMSFCfg.createInstanceWithArguments(sAccess,
-new Object[] { new NamedValue("nodepath", 
"org.openoffice.Office.Common/Security/Scripting") });
-xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, 
oAccess);
-Object result = xNameAccess.getByName("DisableMacrosExecution");
-boolean bMacrosDisabled = AnyConverter.toBoolean(result);
-if (bMacrosDisabled)
-return false;
-} catch (com.sun.star.uno.Exception e) {
-return false;
-}
-return true;
-}
-
-// Wraps long error messages
-private static class NarrowOptionPane extends JOptionPane {
-private static final long serialVersionUID = 1L;
-public int getMaxCharactersPerLineCount() {
-return 100;
-}
-}
-
-public void showErrorMessage(String message) {
-JOptionPane optionPane = new NarrowOptionPane();
-optionPane.setMessage(message);
-optionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
-JDialog dialog =

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - test/signing-keys unotest/source

2021-10-18 Thread Michael Stahl (via logerrit)
 dev/null   |binary
 test/signing-keys/cert9.db |binary
 test/signing-keys/key4.db  |binary
 test/signing-keys/pkcs11.txt   |5 +
 unotest/source/cpp/macros_test.cxx |7 ---
 5 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 7b4b03b9cf21ecd11bc82da5f29c4ff91ad242c9
Author: Michael Stahl 
AuthorDate: Thu Oct 14 13:44:14 2021 +0200
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 18:14:36 2021 +0200

test: upgrade test NSS database from dbm: to sql:

Fedora nss-3.69.0-1.fc34.x86_64 and Debian libnss3:amd64 2:3.70-1 no
longer support the old BerekelyDB databases, so convert them to the new
SQLite format for the benefit of --with-system-nss builds.

This worked to do the upgrade:

> certutil -N -d sql:test/new --empty-password
> LD_LIBRARY_PATH=instdir/program 
workdir/UnpackedTarball/nss/dist/out/bin/certutil --merge -d sql:test/new 
--source-dir dbm:test/signing-keys

Builds would fail running tests added in commit
40d70d427edddb589eda64fafc2e56536953d274

  signing.cxx:551:Assertion
  Test name: testODFX509CertificateChain::TestBody
  equality assertion failed
  - Expected: 0
  - Actual  : 1

Change-Id: I00aa20703e117ebf583c3331b84e966c2cfc78cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123586
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 907784ccce7bd8b5121888cff7f5723a55d35358)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123643
Reviewed-by: Caolán McNamara 

diff --git a/test/signing-keys/cert8.db b/test/signing-keys/cert9.db
similarity index 50%
rename from test/signing-keys/cert8.db
rename to test/signing-keys/cert9.db
index 95e58ffe5b92..c4064e419f42 100644
Binary files a/test/signing-keys/cert8.db and b/test/signing-keys/cert9.db 
differ
diff --git a/test/signing-keys/key3.db b/test/signing-keys/key3.db
deleted file mode 100644
index f449e60a667f..
Binary files a/test/signing-keys/key3.db and /dev/null differ
diff --git a/test/signing-keys/key4.db b/test/signing-keys/key4.db
new file mode 100644
index ..34a7fa28aa32
Binary files /dev/null and b/test/signing-keys/key4.db differ
diff --git a/test/signing-keys/pkcs11.txt b/test/signing-keys/pkcs11.txt
new file mode 100644
index ..22c8f8519efd
--- /dev/null
+++ b/test/signing-keys/pkcs11.txt
@@ -0,0 +1,5 @@
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='sql:test/new' certPrefix='' keyPrefix='' 
secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' 
updateid='' updateTokenDescription='' 
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 
slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]
 askpw=any timeout=30})
+
diff --git a/unotest/source/cpp/macros_test.cxx 
b/unotest/source/cpp/macros_test.cxx
index f94f0704c243..7cbad8c0f3cb 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -91,9 +91,10 @@ void MacrosTest::setUpNssGpg(const test::Directories& 
rDirectories, const OUStri
 OUString aTargetDir
 = rDirectories.getURLFromWorkdir(OUString("CppunitTest/" + rTestName + 
".test.user"));
 
-// Set up cert8.db in workdir/CppunitTest/
-osl::File::copy(aSourceDir + "cert8.db", aTargetDir + "/cert8.db");
-osl::File::copy(aSourceDir + "key3.db", aTargetDir + "/key3.db");
+// Set up NSS database in workdir/CppunitTest/
+osl::File::copy(aSourceDir + "cert9.db", aTargetDir + "/cert9.db");
+osl::File::copy(aSourceDir + "key4.db", aTargetDir + "/key4.db");
+osl::File::copy(aSourceDir + "pkcs11.txt", aTargetDir + "/pkcs11.txt");
 
 // Make gpg use our own defined setup & keys
 osl::File::copy(aSourceDir + "pubring.gpg", aTargetDir + "/pubring.gpg");


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

2021-10-18 Thread Miklos Vajna (via logerrit)
 include/vcl/errinf.hxx |7 
 sw/qa/core/unocore/data/broken-embedded-object.odt |binary
 sw/qa/core/unocore/unocore.cxx |   31 +
 sw/source/core/unocore/unoframe.cxx|   20 +
 vcl/source/window/errinf.cxx   |   15 +-
 5 files changed, 72 insertions(+), 1 deletion(-)

New commits:
commit 86e07d951bc4fd16648fe10befb40dd953fcc208
Author: Miklos Vajna 
AuthorDate: Mon Oct 18 16:22:45 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 18 18:04:22 2021 +0200

sw: avoid popup window for the EmbeddedObject property of an UNO OLE object

The old behavior was that in case loading the native data of the
embedded object failed, then we presented a popup to the user, but we
still returned a valid com.sun.star.comp.embed.OCommonEmbeddedObject.

Given that the return valid is desired even in the error case, don't
turn the error popup into an UNO exception, rather redirect the popup to
SAL_WARN().

This is meant to be consistent with other UNO API functions that pass
down an "is API" boolean to internal code to control if interactive
behavior is allowed or not.

One extreme would be to do this only for the EmbeddedObject property of
frames, the other one would be to do this for more object types. Go with
a middle ground for now, so all properties of Writer frame objects use
this, but leave other object types unchanged.

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

diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx
index 88f4a3bb2390..670c085cf495 100644
--- a/include/vcl/errinf.hxx
+++ b/include/vcl/errinf.hxx
@@ -65,11 +65,18 @@ public:
 
 static void RegisterDisplay(BasicDisplayErrorFunc*);
 static void RegisterDisplay(WindowDisplayErrorFunc*);
+
+static void SetLock(bool bLock);
+static bool GetLock();
+
 static void Reset();
 
 private:
 DisplayFnPtrpDsp;
 boolbIsWindowDsp;
+
+bool m_bLock;
+
 sal_uInt16  nNextError;
 
 std::vector  errorHandlers;
diff --git a/sw/qa/core/unocore/data/broken-embedded-object.odt 
b/sw/qa/core/unocore/data/broken-embedded-object.odt
new file mode 100644
index ..94a0809235e9
Binary files /dev/null and b/sw/qa/core/unocore/data/broken-embedded-object.odt 
differ
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 520c1e21ea28..a480a082f975 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -16,6 +16,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -184,6 +185,36 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testViewCursorTextFrame)
 xStorable->storeToURL(maTempFile.GetURL(), aStoreArgs);
 }
 
+/// Fails the test if an error popup would be presented.
+static void BasicDisplayErrorHandler(const OUString& /*rErr*/, const OUString& 
/*rAction*/)
+{
+CPPUNIT_ASSERT(false);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testBrokenEmbeddedObject)
+{
+// Given a document with a broken embedded object (the XML markup is not 
well-formed):
+load(DATA_DIRECTORY, "broken-embedded-object.odt");
+uno::Reference xSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xObjects(xSupplier->getEmbeddedObjects(),
+ uno::UNO_QUERY);
+uno::Reference xObject(xObjects->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xEmbeddedObject;
+// Get the property first, which initializes Draw, which would overwrite 
our error handler.
+xObject->getPropertyValue("EmbeddedObject") >>= xEmbeddedObject;
+ErrorRegistry::RegisterDisplay(&BasicDisplayErrorHandler);
+
+// When trying to load that embedded object:
+xObject->getPropertyValue("EmbeddedObject") >>= xEmbeddedObject;
+
+// Then make sure we get a non-empty reference and an error popup it not 
shown:
+CPPUNIT_ASSERT(xEmbeddedObject.is());
+// Without the accompanying fix in place, we got this reference, but first 
an error popup was
+// shown to the user.
+CPPUNIT_ASSERT(
+
xEmbeddedObject->supportsService("com.sun.star.comp.embed.OCommonEmbeddedObject"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index dd6de80c47af..dcf25fadde59 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -112,6 +112,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1977,9 +1978,28 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
 throw u

Henrik Palomäki license statement

2021-10-18 Thread Henrik Palomäki
All of my past & future contributions to LibreOffice may belicensed under the MPLv2/LGPLv3+ dual license. Additionally, to the extent possible under law, I waive allcopyright and related or neighboring rights to my past & futureArtwork and Design contributions to the LibreOffice project, andsimilarly to The Document Foundation, placing such contributionsunder CC0: https://creativecommons.org/publicdomain/zero/1.0


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/RemoteFilesDialog.cxx |   55 +---
 fpicker/source/office/RemoteFilesDialog.hxx |2 -
 2 files changed, 4 insertions(+), 53 deletions(-)

New commits:
commit 67fa088be7db1df661188ef4bab490a76fb06b85
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 14:18:03 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 17:21:21 2021 +0200

tdf#145169 for IsDocument/IsFolder I think we want no interaction

rather than installing something to sometimes disable interaction
I think we just want to not have any interaction here at all

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

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 2d1c4c961119..9c12a1efc25b 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -1142,62 +1143,12 @@ std::vector RemoteFilesDialog::GetPathList() 
const
 
 bool RemoteFilesDialog::ContentIsFolder( const OUString& rURL )
 {
-try
-{
-Reference< XInteractionHandler > xInteractionHandler(
-InteractionHandler::createWithParent( m_xContext, 
nullptr ), UNO_QUERY_THROW );
-INetURLObject aURLObject(rURL);
-if (aURLObject.isAnyKnownWebDAVScheme() || aURLObject.GetProtocol() == 
INetProtocol::Sftp)
-xInteractionHandler.set(new 
comphelper::StillReadWriteInteraction(xInteractionHandler, 
xInteractionHandler));
-Reference< XCommandEnvironment > xEnv = new 
::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< 
XProgressHandler >() );
-::ucbhelper::Content aContent( rURL, xEnv, m_xContext );
-
-return aContent.isFolder();
-}
-catch( const Exception& )
-{
-// a content doesn't exist
-}
-
-return false;
+return FStatHelper::IsFolder(rURL);
 }
 
 bool RemoteFilesDialog::ContentIsDocument( const OUString& rURL )
 {
-try
-{
-Reference< XInteractionHandler > xInteractionHandler(
-InteractionHandler::createWithParent( m_xContext, 
nullptr ), UNO_QUERY_THROW );
-//check if WebDAV or not
-INetURLObject aURLObject(rURL);
-if (!aURLObject.isAnyKnownWebDAVScheme() && aURLObject.GetProtocol() 
!= INetProtocol::Sftp)
-{
-// no webdav, use the interaction handler as is
-Reference< XCommandEnvironment > xEnv = new 
::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< 
XProgressHandler >() );
-::ucbhelper::Content aContent( rURL, xEnv, m_xContext );
-
-return aContent.isDocument();
-}
-else
-{
-// It's a webdav URL, so use the same open sequence as in normal 
open process.
-// Let's use a comphelper::StillReadWriteInteraction to trap 
errors here without showing the user.
-// This sequence will result in an exception if the target URL 
resource is not present
-rtl::Reference pInteraction 
= new 
comphelper::StillReadWriteInteraction(xInteractionHandler,xInteractionHandler);
-
-Reference< XCommandEnvironment > xEnv = new 
::ucbhelper::CommandEnvironment( pInteraction, Reference< XProgressHandler >() 
);
-::ucbhelper::Content aContent( rURL, xEnv, m_xContext );
-
-aContent.openStream();
-return aContent.isDocument();
-}
-}
-catch( const Exception& )
-{
-// a content doesn't exist
-}
-
-return false;
+return FStatHelper::IsDocument(rURL);
 }
 
 sal_Int32 RemoteFilesDialog::getAvailableWidth()
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx 
b/fpicker/source/office/RemoteFilesDialog.hxx
index 55cfa2870d59..6ff5ae747212 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -68,7 +68,7 @@ public:
 virtual const OUString& GetPath() override;
 virtual std::vector GetPathList() const override;
 virtual bool ContentIsFolder( const OUString& rURL ) override;
-bool ContentIsDocument( const OUString& rURL );
+static bool ContentIsDocument(const OUString& rURL);
 
 virtual OUString getCurrentFileText() const override;
 virtual void setCurrentFileText( const OUString& rText, bool bSelectAll = 
false ) override;


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

2021-10-18 Thread Henrik Palomäki (via logerrit)
 sw/source/ui/inc/mmresultdialogs.hxx |5 ++---
 sw/source/ui/inc/swuiexp.hxx |6 ++
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 123edad21081ab45c8d83be4788f3c47c3b9a2dc
Author: Henrik Palomäki 
AuthorDate: Mon Oct 18 14:17:36 2021 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Mon Oct 18 17:08:38 2021 +0200

tdf#143148 - Use pragma once instead of include guards

This patch replaces include guards with the "pragma once" directive.

Change-Id: I1325488a22cca27d1f33e0191a0674a662630f66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123743
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/sw/source/ui/inc/mmresultdialogs.hxx 
b/sw/source/ui/inc/mmresultdialogs.hxx
index 445fb1ee546b..11744fd5fb07 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX
-#define INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX
+
+#pragma once
 
 #include 
 #include 
@@ -187,6 +187,5 @@ public:
 voidAllMailsSent();
 
 };
-#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swuiexp.hxx b/sw/source/ui/inc/swuiexp.hxx
index 3ea2f5f30464..a5fa95e7a094 100644
--- a/sw/source/ui/inc/swuiexp.hxx
+++ b/sw/source/ui/inc/swuiexp.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_SOURCE_UI_INC_SWUIEXP_HXX
-#define INCLUDED_SW_SOURCE_UI_INC_SWUIEXP_HXX
+
+#pragma once
 
 #include 
 
@@ -26,6 +26,4 @@ namespace swui
 SwAbstractDialogFactory& GetFactory();
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2021-10-18 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests6/tdf144691.py |   44 
 1 file changed, 44 insertions(+)

New commits:
commit cc355073a9a16bcb1d1f222ef313e582fb88998b
Author: Xisco Fauli 
AuthorDate: Mon Oct 18 13:44:44 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 16:44:39 2021 +0200

tdf#144691: sw: Add UItest

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

diff --git a/sw/qa/uitest/writer_tests6/tdf144691.py 
b/sw/qa/uitest/writer_tests6/tdf144691.py
new file mode 100644
index ..3d3c9e7e127d
--- /dev/null
+++ b/sw/qa/uitest/writer_tests6/tdf144691.py
@@ -0,0 +1,44 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_by_text
+
+class tdf144691(UITestCase):
+
+def test_tdf144691(self):
+
+with self.ui_test.create_doc_in_start_center("writer"):
+
+with 
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as 
xDialog:
+xPages = xDialog.getChild("pages")
+xLanguageEntry = xPages.getChild('2')
+xLanguageEntry.executeAction("EXPAND", tuple())
+xxLanguageEntryGeneralEntry = xLanguageEntry.getChild('0')
+xxLanguageEntryGeneralEntry.executeAction("SELECT", tuple())
+
+xWesternLanguage = xDialog.getChild("westernlanguage")
+
+defaultLanguage = 
get_state_as_dict(xWesternLanguage)['SelectEntryText']
+
+# Select another language
+select_by_text(xWesternLanguage, "Tajik")
+self.assertEqual("Tajik", 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
+
+xApply = xDialog.getChild("apply")
+xApply.executeAction("CLICK", tuple())
+
+# Without the fix in place, this test would have failed with
+# AssertionError: 'Tajik' != 'English (USA)'
+self.assertEqual("Tajik", 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
+
+# Select the default language
+select_by_text(xWesternLanguage, defaultLanguage)
+self.assertEqual(defaultLanguage, 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


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

2021-10-18 Thread Julien Nabet (via logerrit)
 framework/source/loadenv/loadenv.cxx |   21 +++--
 1 file changed, 7 insertions(+), 14 deletions(-)

New commits:
commit bb73961ed0a5f4e09a9b761a02547490a46a06bd
Author: Julien Nabet 
AuthorDate: Sun Oct 17 16:48:21 2021 +0200
Commit: Julien Nabet 
CommitDate: Mon Oct 18 16:41:46 2021 +0200

Simplify Sequences init + remove dup block + typos in framework

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

diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index a4b7e6557004..25639461f0ad 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -606,29 +606,26 @@ LoadEnv::EContentType LoadEnv::classifyContent(const 
OUString&
 
 OUString sType = xDetect->queryTypeByURL(sURL);
 
-css::uno::Sequence< css::beans::NamedValue >   lQuery(1);
 css::uno::Reference< css::frame::XLoaderFactory >  xLoaderFactory;
 css::uno::Reference< css::container::XEnumeration >xSet;
-css::uno::Sequence< OUString >  lTypesReg(1);
 
 // (iii) If a FrameLoader service (or at least
 //  a Filter) can be found, which supports
 //  this URL - it must be a loadable content.
 //  Because both items are registered for types
 //  it's enough to check for frame loaders only.
-//  Mos of our filters are handled by our global
+//  Most of our filters are handled by our global
 //  default loader. But there exist some specialized
 //  loader, which does not work on top of filters!
 //  So it's not enough to search on the filter configuration.
 //  Further it's not enough to search for types!
 //  Because there exist some types, which are referenced by
-//  other objects... but not by filters nor frame loaders!
-
-OUString sPROP_TYPES(PROP_TYPES);
-
-lTypesReg[0]  = sType;
-lQuery[0].Name= sPROP_TYPES;
-lQuery[0].Value <<= lTypesReg;
+//  other objects... but neither by filters nor frame loaders!
+css::uno::Sequence< OUString > lTypesReg { sType };
+css::uno::Sequence< css::beans::NamedValue >   lQuery
+{
+css::beans::NamedValue(PROP_TYPES, makeAny(lTypesReg))
+};
 
 xLoaderFactory = css::frame::FrameLoaderFactory::create(xContext);
 xSet   = xLoaderFactory->createSubSetEnumerationByProperties(lQuery);
@@ -640,10 +637,6 @@ LoadEnv::EContentType LoadEnv::classifyContent(const 
OUString&
 //  E.g. ContentHandler.
 //  Such contents can be handled ... but not loaded.
 
-lTypesReg[0]  = sType;
-lQuery[0].Name= sPROP_TYPES;
-lQuery[0].Value <<= lTypesReg;
-
 xLoaderFactory = css::frame::ContentHandlerFactory::create(xContext);
 xSet   = xLoaderFactory->createSubSetEnumerationByProperties(lQuery);
 // at least one registered content handler is enough!


[Libreoffice-commits] dev-tools.git: test-bugzilla-files/test-bugzilla-files.py test-bugzilla-files/zip.sh

2021-10-18 Thread Gülşah Köse (via logerrit)
 test-bugzilla-files/test-bugzilla-files.py |7 ---
 test-bugzilla-files/zip.sh |2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 5f98759d3b424308c5688c30ec87110fbab0faf7
Author: Gülşah Köse 
AuthorDate: Mon Oct 18 17:08:29 2021 +0300
Commit: Miklos Vajna 
CommitDate: Mon Oct 18 16:31:00 2021 +0200

Create odfundifflog.csv in a simple way.

Remove import_csv and export_csv functions and just write the data to a
file directly.

Change-Id: Ia28f15984e630647f2097516c3da2c8f61257034
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/123751
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/test-bugzilla-files/test-bugzilla-files.py 
b/test-bugzilla-files/test-bugzilla-files.py
index 6dec0e0..ac219ac 100644
--- a/test-bugzilla-files/test-bugzilla-files.py
+++ b/test-bugzilla-files/test-bugzilla-files.py
@@ -34,7 +34,6 @@ import time
 import uuid
 import datetime
 import re
-from analyze_logs import import_csv, export_csv
 
 import signal
 import threading
@@ -340,8 +339,10 @@ def handleODFunDiff(file, odfundifflog):
 result["total-diff-count"] = len(odfundifflog.splitlines()) - 1 # Last 
line of log is not a real difference
 result["attr-diff-count"]  = getDifferencesByType("Attribute" , 
odfundifflog)
 result["node-diff-count"] = getDifferencesByType("Node", odfundifflog)
-reader = import_csv("odfundifflog.csv")
-export_csv("odfundifflog.csv", result, reader, header=False)
+
+odfundifflog_f = open("odfundifflog.csv", "a")
+odfundifflog_f.write(file + "," + str(result["total-diff-count"]) + "," + 
str(result["attr-diff-count"]) + "," + str(result["node-diff-count"]) + "\n")
+odfundifflog_f.close()
 
 def getDifferencesByType(type, odfundifflog):
 difflist = odfundifflog.splitlines()
diff --git a/test-bugzilla-files/zip.sh b/test-bugzilla-files/zip.sh
index a923cb5..b35117f 100755
--- a/test-bugzilla-files/zip.sh
+++ b/test-bugzilla-files/zip.sh
@@ -9,7 +9,7 @@ mkdir -p /srv/crashtestdata/logs/$SHA/backtraces
 for a in */core*; do gdb ~/build/instdir/program/soffice.bin $a -ex "thread 
apply all backtrace full" --batch > 
/srv/crashtestdata/logs/$SHA/backtraces/`dirname "$a"`-`basename 
"$a"`.backtrace.txt; done
 cat */crashlog.txt > /srv/crashtestdata/logs/$SHA/crashlog.txt
 cat */exportCrash.txt > /srv/crashtestdata/logs/$SHA/exportCrash.txt
-echo "attr-diff-count,filename,node-diff-count,total-diff-count" > 
/srv/crashtestdata/logs/$SHA/odfundifflog.csv
+echo "filename,total-diff-count,attr-diff-count,node-diff-count" > 
/srv/crashtestdata/logs/$SHA/odfundifflog.csv
 cat */odfundifflog.csv >> /srv/crashtestdata/logs/$SHA/odfundifflog.csv
 # Ignore the header.
 num_of_odf_diffs=$(($(< "/srv/crashtestdata/logs/$SHA/odfundifflog.csv" wc 
-l)-1))


[Libreoffice-commits] core.git: scripting/Jar_ScriptFramework.mk scripting/java

2021-10-18 Thread Stephan Bergmann (via logerrit)
 scripting/Jar_ScriptFramework.mk   
 |1 
 scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
 |   61 
 scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase.java
 |   73 ++
 
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
   |4 
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
 |4 
 5 files changed, 84 insertions(+), 59 deletions(-)

New commits:
commit d425cd604cb4d30862640851b11a31e742d81336
Author: Stephan Bergmann 
AuthorDate: Mon Oct 18 14:37:05 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 18 16:17:02 2021 +0200

Revert incompatible ScriptEditor change

...from interface to abstract class, in 
1c42afc194da2288c5a738b727952e80c323885c
"Respect DisableMacrosExecution option in javascript editor".  It caused 
3rd-
party code like ScriptProviderForooRexx.oxt to fail to install.

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

diff --git a/scripting/Jar_ScriptFramework.mk b/scripting/Jar_ScriptFramework.mk
index 397de3ccbc72..bd15b243f9b2 100644
--- a/scripting/Jar_ScriptFramework.mk
+++ b/scripting/Jar_ScriptFramework.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Jar_add_sourcefiles,ScriptFramework,\
scripting/java/com/sun/star/script/framework/provider/PathUtils \
scripting/java/com/sun/star/script/framework/provider/ScriptContext \
scripting/java/com/sun/star/script/framework/provider/ScriptEditor \
+   scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase \
scripting/java/com/sun/star/script/framework/provider/ScriptProvider \
scripting/java/com/sun/star/script/framework/provider/SwingInvocation \

scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog \
diff --git 
a/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java 
b/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
index 395a1b6a8abb..32ebd2fefb41 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
@@ -18,62 +18,13 @@
 
 package com.sun.star.script.framework.provider;
 
-import com.sun.star.beans.NamedValue;
-import com.sun.star.configuration.theDefaultProvider;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.script.framework.container.ScriptMetaData;
 import com.sun.star.script.provider.XScriptContext;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
 
-import javax.swing.JOptionPane;
-import javax.swing.JDialog;
-
-public abstract class ScriptEditor {
-public XScriptContext context;
-
-public abstract Object execute() throws Exception;
-public abstract void indicateErrorLine(int lineNum);
-public abstract void edit(XScriptContext context, ScriptMetaData entry);
-public abstract String getTemplate();
-public abstract String getExtension();
-
-public void setContext(XScriptContext context) {
-this.context = context;
-}
-
-public boolean isMacroExecutionEnabled() {
-XNameAccess xNameAccess = null;
-try {
-String sAccess = "com.sun.star.configuration.ConfigurationAccess";
-XMultiServiceFactory xMSFCfg = 
theDefaultProvider.get(context.getComponentContext());
-Object oAccess = xMSFCfg.createInstanceWithArguments(sAccess,
-new Object[] { new NamedValue("nodepath", 
"org.openoffice.Office.Common/Security/Scripting") });
-xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, 
oAccess);
-Object result = xNameAccess.getByName("DisableMacrosExecution");
-boolean bMacrosDisabled = AnyConverter.toBoolean(result);
-if (bMacrosDisabled)
-return false;
-} catch (com.sun.star.uno.Exception e) {
-return false;
-}
-return true;
-}
-
-// Wraps long error messages
-private static class NarrowOptionPane extends JOptionPane {
-private static final long serialVersionUID = 1L;
-public int getMaxCharactersPerLineCount() {
-return 100;
-}
-}
-
-public void showErrorMessage(String message) {
-JOptionPane optionPane = new NarrowOptionPane();
-optionPane.setMessage(message);
-optionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
-JDialog dialog = optionPane.createDialog(null, "Error");
-dialog.setVisible(true);
-}
+public interface ScriptEditor {
+Object execute() throws Exception;
+void indic

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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/RemoteFilesDialog.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 15d0eec26be416e77d9b9580cf34d9a1d32a2615
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 13:01:05 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 16:08:29 2021 +0200

Related: tdf#145169 unwanted dialogs on sftp save to remote to a new 
document

which is similar to:

commit f12e483589888f87843026ceff5ae3c1e615ca02
Date:   Mon Feb 1 16:04:49 2016 +0100

Fix tdf#97500 Reinstate missing file error dialog on WebDAV

this all looks a bit dubious, but make a safely backportable change
first

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

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index ee031caf099d..2d1c4c961119 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1146,6 +1146,9 @@ bool RemoteFilesDialog::ContentIsFolder( const OUString& 
rURL )
 {
 Reference< XInteractionHandler > xInteractionHandler(
 InteractionHandler::createWithParent( m_xContext, 
nullptr ), UNO_QUERY_THROW );
+INetURLObject aURLObject(rURL);
+if (aURLObject.isAnyKnownWebDAVScheme() || aURLObject.GetProtocol() == 
INetProtocol::Sftp)
+xInteractionHandler.set(new 
comphelper::StillReadWriteInteraction(xInteractionHandler, 
xInteractionHandler));
 Reference< XCommandEnvironment > xEnv = new 
::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< 
XProgressHandler >() );
 ::ucbhelper::Content aContent( rURL, xEnv, m_xContext );
 
@@ -1166,7 +1169,8 @@ bool RemoteFilesDialog::ContentIsDocument( const 
OUString& rURL )
 Reference< XInteractionHandler > xInteractionHandler(
 InteractionHandler::createWithParent( m_xContext, 
nullptr ), UNO_QUERY_THROW );
 //check if WebDAV or not
-if ( !INetURLObject( rURL ).isAnyKnownWebDAVScheme() )
+INetURLObject aURLObject(rURL);
+if (!aURLObject.isAnyKnownWebDAVScheme() && aURLObject.GetProtocol() 
!= INetProtocol::Sftp)
 {
 // no webdav, use the interaction handler as is
 Reference< XCommandEnvironment > xEnv = new 
::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< 
XProgressHandler >() );


[Libreoffice-commits] dev-tools.git: test-bugzilla-files/analyze_logs.py test-bugzilla-files/zip.sh

2021-10-18 Thread Miklos Vajna (via logerrit)
 test-bugzilla-files/analyze_logs.py |2 +-
 test-bugzilla-files/zip.sh  |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 62e8517e05674f67f0773a6a628a976a5c69d6d6
Author: Miklos Vajna 
AuthorDate: Wed Oct 13 09:26:07 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 18 16:03:13 2021 +0200

crashtest: switch mail template to per-run odfundifflog.csv

It used to have a .txt extension, but that's no longer true since it has
multiple columns.

Also use the new extension when updating the long-term .csv file that
tracks the state for multiple runs.

Change-Id: Ic3f5c6bee8df7a38394cf0c626ab4adad96918df

diff --git a/test-bugzilla-files/analyze_logs.py 
b/test-bugzilla-files/analyze_logs.py
index 760b806..c2c426a 100644
--- a/test-bugzilla-files/analyze_logs.py
+++ b/test-bugzilla-files/analyze_logs.py
@@ -115,7 +115,7 @@ def update_validation():
 
 def update_odfundiff():
 differences = dict()
-analyze_odfundifflog("odfundifflog.txt", differences)
+analyze_odfundifflog("odfundifflog.csv", differences)
 reader = import_csv("odfundiff.csv")
 export_csv("odfundiff.csv", differences, reader)
 
diff --git a/test-bugzilla-files/zip.sh b/test-bugzilla-files/zip.sh
index 4b52fb1..a923cb5 100755
--- a/test-bugzilla-files/zip.sh
+++ b/test-bugzilla-files/zip.sh
@@ -11,7 +11,8 @@ cat */crashlog.txt > /srv/crashtestdata/logs/$SHA/crashlog.txt
 cat */exportCrash.txt > /srv/crashtestdata/logs/$SHA/exportCrash.txt
 echo "attr-diff-count,filename,node-diff-count,total-diff-count" > 
/srv/crashtestdata/logs/$SHA/odfundifflog.csv
 cat */odfundifflog.csv >> /srv/crashtestdata/logs/$SHA/odfundifflog.csv
-num_of_odf_diffs=$(< "/srv/crashtestdata/logs/$SHA/odfundifflog.txt" wc -l)
+# Ignore the header.
+num_of_odf_diffs=$(($(< "/srv/crashtestdata/logs/$SHA/odfundifflog.csv" wc 
-l)-1))
 num_of_import_crashes=$(< "/srv/crashtestdata/logs/$SHA/crashlog.txt" wc -l)
 num_of_export_crashes=$(< "/srv/crashtestdata/logs/$SHA/exportCrash.txt" wc -l)
 num_of_excluded_file=$(< "/srv/crashtestdata/odfundiff_exclude_list.txt" wc -l)


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - writerfilter/source

2021-10-18 Thread Miklos Vajna (via logerrit)
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 1638c9d51e98a30c6521995d2817c61297df4f36
Author: Miklos Vajna 
AuthorDate: Fri Oct 15 08:40:22 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 18 15:50:10 2021 +0200

writerfilter: give up if body text is missing

Crashreport trace:


writerfilter::dmapper::DomainMapper_Impl::DomainMapper_Impl(writerfilter::dmapper::DomainMapper&,
 com::sun::star::uno::Reference const&, 
com::sun::star::uno::Reference const&, 
writerfilter::dmapper::SourceDocumentType, utl::MediaDescriptor const&)
writerfilter/source/dmapper/DomainMapper_Impl.cxx:359 
(discriminator 2)

writerfilter::dmapper::DomainMapper::DomainMapper(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&, com::sun::star::uno::Reference 
const&, bool, writerfilter::dmapper::SourceDocumentType, utl::MediaDescriptor 
const&)
writerfilter/source/dmapper/DomainMapper.cxx:113

writerfilter::dmapper::DomainMapperFactory::createMapper(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&, com::sun::star::uno::Reference 
const&, bool, writerfilter::dmapper::SourceDocumentType, utl::MediaDescriptor 
const&)
writerfilter/source/dmapper/domainmapperfactory.cxx:34
ollaboraoffice6.4/program/../program/libwriterfilterlo.so

RtfFilter::filter(com::sun::star::uno::Sequence
 const&)
writerfilter/source/filter/RtfFilter.cxx:152

I.e. we end up in a situation where the insert position does not have a
containing XText. It's hard to continue from that point and this is in
the ctor of the dmapper, so we didn't start the import. Just throw an
exception to avoid further crashes.

Change-Id: Idb5c06186a82c00b838d0b3330260340eb4218b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123616
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123737
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 0d008bf78618..33ab5c6853fa 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -360,6 +360,11 @@ DomainMapper_Impl::DomainMapper_Impl(
 
 appendTableManager( );
 GetBodyText();
+if (!m_bIsNewDoc && !m_xBodyText)
+{
+throw uno::Exception("failed to find body text of the insert 
position", nullptr);
+}
+
 uno::Reference< text::XTextAppend > xBodyTextAppend( m_xBodyText, 
uno::UNO_QUERY );
 m_aTextAppendStack.push(TextAppendContext(xBodyTextAppend,
 m_bIsNewDoc ? uno::Reference() : 
m_xBodyText->createTextCursorByRange(m_xInsertTextRange)));


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source desktop/qa desktop/source include/comphelper include/LibreOfficeKit include/sfx2 libreofficekit/source sfx2/source

2021-10-18 Thread Pranam Lashkari (via logerrit)
 comphelper/source/misc/lok.cxx   |   60 ---
 desktop/qa/desktop_lib/test_desktop_lib.cxx  |5 --
 desktop/source/lib/init.cxx  |   17 +--
 include/LibreOfficeKit/LibreOfficeKit.h  |7 ---
 include/LibreOfficeKit/LibreOfficeKit.hxx|9 
 include/LibreOfficeKit/LibreOfficeKitEnums.h |7 +++
 include/comphelper/lok.hxx   |7 ---
 include/sfx2/lokhelper.hxx   |2 
 include/sfx2/viewsh.hxx  |   14 ++
 libreofficekit/source/gtk/lokdocview.cxx |1 
 sfx2/source/control/unoctitm.cxx |   31 -
 sfx2/source/view/lokhelper.cxx   |7 ---
 sfx2/source/view/viewsh.cxx  |   23 +-
 13 files changed, 53 insertions(+), 137 deletions(-)

New commits:
commit 7fee2a542eca7e346c9dd79fdf02cf0ef8febe8c
Author: Pranam Lashkari 
AuthorDate: Fri Sep 17 19:13:15 2021 +0530
Commit: Tor Lillqvist 
CommitDate: Mon Oct 18 15:30:37 2021 +0200

LOK: maintain blocked command list per view

Change-Id: I7c621accd84f49447ab3e08a4bb662a9b91b834a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122253
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index d3b3e9bdec2d..8765c8eb2847 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -35,10 +35,6 @@ static bool g_bLocalRendering(false);
 
 static Compat g_eCompatFlags(Compat::none);
 
-static std::unordered_set g_vFreemiumDenyList;
-
-static std::unordered_set g_vRestrictedCommandList;
-
 namespace
 {
 
@@ -289,62 +285,6 @@ void statusIndicatorFinish()
 pStatusIndicatorCallback(pStatusIndicatorCallbackData, 
statusIndicatorCallbackType::Finish, 0, nullptr);
 }
 
-void setBlockedCommandList(const char* bolckedCommandList)
-{
-
-OUString BolckedListString(bolckedCommandList, strlen(bolckedCommandList), 
RTL_TEXTENCODING_UTF8);
-
-OUString type = BolckedListString.getToken(0, '-');
-
-if (type == "freemium")
-{
-if(!g_vFreemiumDenyList.empty())
-return;
-OUString commands = BolckedListString.getToken(1, '-');
-
-OUString command = commands.getToken(0, ' ');
-for (size_t i = 1; !command.isEmpty(); i++)
-{
-g_vFreemiumDenyList.emplace(command);
-command = commands.getToken(i, ' ');
-}
-}
-else
-{
-if(!g_vRestrictedCommandList.empty())
-return;
-
-OUString commands = BolckedListString.getToken(1, '-');
-
-OUString command = commands.getToken(0, ' ');
-for (size_t i = 1; !command.isEmpty(); i++)
-{
-g_vRestrictedCommandList.emplace(command);
-command = commands.getToken(i, ' ');
-}
-}
-}
-
-const std::unordered_set& getFreemiumDenyList()
-{
-return g_vFreemiumDenyList;
-}
-
-bool isCommandFreemiumDenied(const OUString& command)
-{
-return g_vFreemiumDenyList.find(command) != g_vFreemiumDenyList.end();
-}
-
-const std::unordered_set& getRestrictedCommandList()
-{
-return g_vRestrictedCommandList;
-}
-
-bool isRestrictedCommand(const OUString& command)
-{
-return g_vRestrictedCommandList.find(command) != 
g_vRestrictedCommandList.end();
-}
-
 } // namespace
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index ee4d0e8a4b34..495293b76246 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3548,12 +3548,11 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), offsetof(struct 
_LibreOfficeKitDocumentClass, setWindowTextSelection));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct 
_LibreOfficeKitDocumentClass, sendFormFieldEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct 
_LibreOfficeKitDocumentClass, setBlockedCommandList));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct 
_LibreOfficeKitDocumentClass, setBlockedCommandView));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct 
_LibreOfficeKitDocumentClass, renderSearchResult));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct 
_LibreOfficeKitDocumentClass, renderSearchResult));
 
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index eb560c56a13e..9216b12b213c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop

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

2021-10-18 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/csv_dialog/tdf88359.py |   38 
 sc/qa/uitest/data/tdf88359.csv  |2 +
 2 files changed, 40 insertions(+)

New commits:
commit bb5968d199e5f185b5dbbc9be6b6bca992b94932
Author: Xisco Fauli 
AuthorDate: Mon Oct 18 13:11:52 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 15:18:35 2021 +0200

tdf#88359: sc: Add UItest

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

diff --git a/sc/qa/uitest/csv_dialog/tdf88359.py 
b/sc/qa/uitest/csv_dialog/tdf88359.py
new file mode 100644
index ..ea2252d5dc0f
--- /dev/null
+++ b/sc/qa/uitest/csv_dialog/tdf88359.py
@@ -0,0 +1,38 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, select_pos
+from libreoffice.calc.csv_dialog import load_csv_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class Tdf88359(UITestCase):
+
+def test_tdf88359(self):
+
+# Import the file with 'Detect Special Numbers' unchecked
+with load_csv_file(self, "tdf88359.csv", True):
+pass
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"}))
+
+with 
self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog:
+xTabs = xDialog.getChild("tabcontrol")
+select_pos(xTabs, "0")
+xliststore1 = xDialog.getChild("categorylb")
+xliststore2 = xDialog.getChild("formatlb")
+xformatted = xDialog.getChild("formatted")
+
+# Without the fix in place, this test would have failed with
+# AssertionError: 'Date' != 'Text'
+self.assertEqual("Date", 
get_state_as_dict(xliststore1)["SelectEntryText"])
+self.assertEqual("1999-12-31T13:37:46", 
get_state_as_dict(xliststore2)["SelectEntryText"])
+self.assertEqual("-MM-DD\"T\"HH:MM:SS", 
get_state_as_dict(xformatted)["Text"])
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf88359.csv b/sc/qa/uitest/data/tdf88359.csv
new file mode 100644
index ..1f71e3d98e05
--- /dev/null
+++ b/sc/qa/uitest/data/tdf88359.csv
@@ -0,0 +1,2 @@
+start_date
+2010-10-15T20:56:30


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source desktop/qa desktop/source include/comphelper include/LibreOfficeKit include/sfx2 sfx2/source

2021-10-18 Thread Pranam Lashkari (via logerrit)
 comphelper/source/misc/lok.cxx  |   64 +++-
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   10 +---
 desktop/source/lib/init.cxx |   43 +-
 include/LibreOfficeKit/LibreOfficeKit.h |   22 +++--
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   18 +--
 include/comphelper/lok.hxx  |8 +--
 include/sfx2/lokhelper.hxx  |6 --
 sfx2/source/control/unoctitm.cxx|   42 +++---
 sfx2/source/view/lokhelper.cxx  |   16 +++
 9 files changed, 93 insertions(+), 136 deletions(-)

New commits:
commit be717e5062f353526e78749b74f3c9888ecfcc5c
Author: Pranam Lashkari 
AuthorDate: Wed Sep 15 23:39:32 2021 +0530
Commit: Tor Lillqvist 
CommitDate: Mon Oct 18 15:16:54 2021 +0200

LOK: unify freemium APIs and uno command restriction APIs

Signed-off-by: Pranam Lashkari 
Change-Id: I3badb038822331ab5cb30df6a66ce9a0640cf340
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122162
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 659765f802da..d3b3e9bdec2d 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -35,9 +35,9 @@ static bool g_bLocalRendering(false);
 
 static Compat g_eCompatFlags(Compat::none);
 
-static std::vector g_vFreemiumDenyList;
+static std::unordered_set g_vFreemiumDenyList;
 
-static std::vector g_vRestrictedCommandList;
+static std::unordered_set g_vRestrictedCommandList;
 
 namespace
 {
@@ -289,54 +289,60 @@ void statusIndicatorFinish()
 pStatusIndicatorCallback(pStatusIndicatorCallbackData, 
statusIndicatorCallbackType::Finish, 0, nullptr);
 }
 
-void setFreemiumDenyList(const char* freemiumDenyList)
+void setBlockedCommandList(const char* bolckedCommandList)
 {
-if(!g_vFreemiumDenyList.empty())
-return;
 
-OUString DenyListString(freemiumDenyList, strlen(freemiumDenyList), 
RTL_TEXTENCODING_UTF8);
+OUString BolckedListString(bolckedCommandList, strlen(bolckedCommandList), 
RTL_TEXTENCODING_UTF8);
 
-OUString command = DenyListString.getToken(0, ' ');
-for (size_t i = 1; !command.isEmpty(); i++)
+OUString type = BolckedListString.getToken(0, '-');
+
+if (type == "freemium")
 {
-g_vFreemiumDenyList.emplace_back(command);
-command = DenyListString.getToken(i, ' ');
+if(!g_vFreemiumDenyList.empty())
+return;
+OUString commands = BolckedListString.getToken(1, '-');
+
+OUString command = commands.getToken(0, ' ');
+for (size_t i = 1; !command.isEmpty(); i++)
+{
+g_vFreemiumDenyList.emplace(command);
+command = commands.getToken(i, ' ');
+}
+}
+else
+{
+if(!g_vRestrictedCommandList.empty())
+return;
+
+OUString commands = BolckedListString.getToken(1, '-');
+
+OUString command = commands.getToken(0, ' ');
+for (size_t i = 1; !command.isEmpty(); i++)
+{
+g_vRestrictedCommandList.emplace(command);
+command = commands.getToken(i, ' ');
+}
 }
 }
 
-const std::vector& getFreemiumDenyList()
+const std::unordered_set& getFreemiumDenyList()
 {
 return g_vFreemiumDenyList;
 }
 
 bool isCommandFreemiumDenied(const OUString& command)
 {
-return std::find(g_vFreemiumDenyList.begin(), g_vFreemiumDenyList.end(), 
command) != g_vFreemiumDenyList.end();
-}
-
-void setRestrictedCommandList(const char* restrictedCommandList)
-{
-if(!g_vRestrictedCommandList.empty())
-return;
-
-OUString RestrictedListString(restrictedCommandList, 
strlen(restrictedCommandList), RTL_TEXTENCODING_UTF8);
-
-OUString command = RestrictedListString.getToken(0, ' ');
-for (size_t i = 1; !command.isEmpty(); i++)
-{
-g_vRestrictedCommandList.emplace_back(command);
-command = RestrictedListString.getToken(i, ' ');
-}
+return g_vFreemiumDenyList.find(command) != g_vFreemiumDenyList.end();
 }
 
-const std::vector& getRestrictedCommandList()
+const std::unordered_set& getRestrictedCommandList()
 {
 return g_vRestrictedCommandList;
 }
 
 bool isRestrictedCommand(const OUString& command)
 {
-return std::find(g_vRestrictedCommandList.begin(), 
g_vRestrictedCommandList.end(), command) != g_vRestrictedCommandList.end();
+return g_vRestrictedCommandList.find(command) != 
g_vRestrictedCommandList.end();
 }
 
 } // namespace
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index e66ebb159cb3..ee4d0e8a4b34 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3547,15 +3547,13 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), offsetof(struct 
_LibreOfficeKitDocumentClass, completeFunction));
 CPPUNI

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

2021-10-18 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/table/tdf144843.py |   29 +
 1 file changed, 29 insertions(+)

New commits:
commit 631ac203b926fd92401ff305bcc0d5dde6a24a2f
Author: Xisco Fauli 
AuthorDate: Mon Oct 18 11:40:45 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 15:15:35 2021 +0200

tdf#144843: sw: Add UItest

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

diff --git a/sw/qa/uitest/table/tdf144843.py b/sw/qa/uitest/table/tdf144843.py
new file mode 100644
index ..d186568bd1dc
--- /dev/null
+++ b/sw/qa/uitest/table/tdf144843.py
@@ -0,0 +1,29 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+# 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 uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf144843(UITestCase):
+
+   def test_tdf144843(self):
+with self.ui_test.create_doc_in_start_center("writer") as document:
+
+
self.xUITest.executeCommand(".uno:InsertTable?Columns:short=2&Rows:short=2")
+
+self.xUITest.executeCommand(".uno:SelectAll")
+
+self.assertEqual(-1, 
document.TextTables[0].getCellByName("A1").BackColor)
+
+# Without the fix in place, this test would have crashed here
+with 
self.ui_test.execute_dialog_through_command(".uno:BackgroundDialog") as xDialog:
+btncolor = xDialog.getChild("btncolor")
+btncolor.executeAction("CLICK", tuple())
+
+hex_custom = xDialog.getChild("hex_custom")
+hex_custom.executeAction("TYPE", 
mkPropertyValues({"TEXT":"101010"}))
+
+self.assertEqual("0x101010", 
hex(document.TextTables[0].getCellByName("A1").BackColor))
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


Re: compiling libreoffice branch distro/collabora/co-2021

2021-10-18 Thread Danilo Tomasoni
Hello Miklos,
Thank you for your message.
Actually I tried first with master, that exited almost immediately with another 
error.
Then I tried this branch that compiled for a long time before giving the error 
I mentioned.

Any clue? I'm not cross-compiling. I'm using an aarch64 machine, actually an 
odroid C2 with his vendor-shipped ubuntu.


Il 18 ottobre 2021 08:48:09 CEST, Miklos Vajna  ha 
scritto:
>Hi Danilo,
>
>On Thu, Oct 14, 2021 at 07:20:26PM +0200, Danilo Tomasoni 
> wrote:
>> I am trying to build collabora online for aarch64.
>> 
>> I saw that I need to first compile libreoffice branch
>> distro/collabora/co-2021
>> 
>> but when I try to do it I get the following error. Anyone can tell me how
>> can I fix this? Thank you
>
>Does the master branch compile for you with the same autogen.input
>switches?
>
>Regards,
>
>Miklos


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source desktop/qa desktop/source include/comphelper include/LibreOfficeKit include/sfx2 sfx2/source

2021-10-18 Thread Pranam Lashkari (via logerrit)
 comphelper/source/misc/lok.cxx  |   27 +++
 desktop/qa/desktop_lib/test_desktop_lib.cxx |6 --
 desktop/source/lib/init.cxx |   21 +
 include/LibreOfficeKit/LibreOfficeKit.h |9 +
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 ++
 include/comphelper/lok.hxx  |4 
 include/sfx2/lokhelper.hxx  |2 ++
 include/sfx2/viewsh.hxx |5 +
 sfx2/source/control/unoctitm.cxx|   17 +
 sfx2/source/view/lokhelper.cxx  |7 +++
 sfx2/source/view/viewsh.cxx |1 +
 11 files changed, 107 insertions(+), 2 deletions(-)

New commits:
commit 5393f9bf41f4a35385526205bb51f9b29bf8c20d
Author: Pranam Lashkari 
AuthorDate: Mon Sep 13 23:05:40 2021 +0530
Commit: Tor Lillqvist 
CommitDate: Mon Oct 18 14:03:29 2021 +0200

LOK: introduce way to restrict uno commands

With this new API we can define which uno commands to restrict their 
functionality

Change-Id: I9f3fd659d373e56542c5323922a53564f1cfb27b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122049
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index a7b77ea0a3ae..659765f802da 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -37,6 +37,8 @@ static Compat g_eCompatFlags(Compat::none);
 
 static std::vector g_vFreemiumDenyList;
 
+static std::vector g_vRestrictedCommandList;
+
 namespace
 {
 
@@ -312,6 +314,31 @@ bool isCommandFreemiumDenied(const OUString& command)
 return std::find(g_vFreemiumDenyList.begin(), g_vFreemiumDenyList.end(), 
command) != g_vFreemiumDenyList.end();
 }
 
+void setRestrictedCommandList(const char* restrictedCommandList)
+{
+if(!g_vRestrictedCommandList.empty())
+return;
+
+OUString RestrictedListString(restrictedCommandList, 
strlen(restrictedCommandList), RTL_TEXTENCODING_UTF8);
+
+OUString command = RestrictedListString.getToken(0, ' ');
+for (size_t i = 1; !command.isEmpty(); i++)
+{
+g_vRestrictedCommandList.emplace_back(command);
+command = RestrictedListString.getToken(i, ' ');
+}
+}
+
+const std::vector& getRestrictedCommandList()
+{
+return g_vRestrictedCommandList;
+}
+
+bool isRestrictedCommand(const OUString& command)
+{
+return std::find(g_vRestrictedCommandList.begin(), 
g_vRestrictedCommandList.end(), command) != g_vRestrictedCommandList.end();
+}
+
 } // namespace
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 13c6c6938c0a..e66ebb159cb3 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3549,11 +3549,13 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct 
_LibreOfficeKitDocumentClass, sendFormFieldEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct 
_LibreOfficeKitDocumentClass, setFreemiumDenyList));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct 
_LibreOfficeKitDocumentClass, setFreemiumView));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct 
_LibreOfficeKitDocumentClass, renderSearchResult));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct 
_LibreOfficeKitDocumentClass, setRestrictedCommandList));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct 
_LibreOfficeKitDocumentClass, setRestrictedView));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct 
_LibreOfficeKitDocumentClass, renderSearchResult));
 
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2f490ce2b5af..93eaa3e78f42 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1083,6 +1083,13 @@ static void doc_setFreemiumView(LibreOfficeKitDocument* 
pThis,
 int nViewId,
 bool isFreemium);
 
+static void doc_setRestrictedCommandList(LibreOfficeKitDocument* pThis,
+const char* restrictedCommandList);
+
+static void doc_setRestrictedView(LibreOfficeKitDocument* pThis,
+int nViewId,
+bool isRestricted);
+
 static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
 unsig

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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/uiconfig/ui/explorerfiledialog.ui |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 851c2a68171a9fa20a952c65ca5860453c6cabf1
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 11:38:53 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 13:47:14 2021 +0200

help button in built-in file dialog didn't work

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

diff --git a/fpicker/uiconfig/ui/explorerfiledialog.ui 
b/fpicker/uiconfig/ui/explorerfiledialog.ui
index c947771e0e6a..08bd2a0fb4cf 100644
--- a/fpicker/uiconfig/ui/explorerfiledialog.ui
+++ b/fpicker/uiconfig/ui/explorerfiledialog.ui
@@ -891,6 +891,9 @@
 
   
 
+
+  help
+
   
   
 True


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

2021-10-18 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   14 +--
 sc/source/ui/app/inputhdl.cxx|  101 ++-
 sc/source/ui/inc/inputhdl.hxx|6 +
 sc/source/ui/view/tabvwsh4.cxx   |5 +
 4 files changed, 101 insertions(+), 25 deletions(-)

New commits:
commit 4cfa840ecaa5a094a32a60a60b295858980109df
Author: Dennis Francis 
AuthorDate: Wed Oct 13 20:24:50 2021 +0530
Commit: Dennis Francis 
CommitDate: Mon Oct 18 13:20:02 2021 +0200

tdf#145198: Bash like autocompletion for Calc autoinput

Refer ESC minutes section "Calc auto-complete behavior changes" at
https://lists.freedesktop.org/archives/libreoffice/2021-October/087911.html
for context.

Consider an example of the following data in a column:

ABCD123xyz
ABCD345qwel
ABCD123pqr
ABCD123xyz
PQR

1. When user types A, it will show the partial suggestion BCD.

2. User can accept the suggestion with the right arrow key and then the
   cursor will be placed after the letter D, waiting for more input. User
   can choose to not accept the suggestion either by typing more or by
   ending the edit mode by pressing Esc key.

3. If the user accepts the suggestion BCD by right arrow key, and
   types 1, it will show a partial suggestion of 23. User can accept
   this by pressing the right arrow key.

4. If the user accepts the suggestion in the 3rd step and types x it will
   show the final suggestion yz. Again user can choose to accept or decline
   the suggestion as mentioned in the 1st step.

The tiledrendering test ScTiledRenderingTest::testAutoInputExactMatch()
is amended to match the new behaviour.

Change-Id: Ib2cfc16af71483790384e70eb7332f864cf744c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123578
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 3cfde4952b16..ac0ca40d241d 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2712,12 +2712,12 @@ void ScTiledRenderingTest::testAutoInputExactMatch()
 
 ScAddress aA8(0, 7, 0);
 lcl_typeCharsInCell("S", aA8.Col(), aA8.Row(), pView, pModelObj); // Type 
"S" in A8
-// Should not autocomplete as there are multiple matches starting with "S".
-CPPUNIT_ASSERT_EQUAL_MESSAGE("1: A8 should have just S (should not 
autocomplete)", OUString("S"), pDoc->GetString(aA8));
+// Should show the partial completion "i".
+CPPUNIT_ASSERT_EQUAL_MESSAGE("1: A8 should have partial completion Si", 
OUString("Si"), pDoc->GetString(aA8));
 
 lcl_typeCharsInCell("Si", aA8.Col(), aA8.Row(), pView, pModelObj); // Type 
"Si" in A8
-// Should not autocomplete as there are multiple matches starting with 
"Si".
-CPPUNIT_ASSERT_EQUAL_MESSAGE("2: A8 should not autocomplete", 
OUString("Si"), pDoc->GetString(aA8));
+// Should not show any suggestions.
+CPPUNIT_ASSERT_EQUAL_MESSAGE("2: A8 should not show suggestions", 
OUString("Si"), pDoc->GetString(aA8));
 
 lcl_typeCharsInCell("Sim", aA8.Col(), aA8.Row(), pView, pModelObj); // 
Type "Sim" in A8
 // Should autocomplete to "Simple" which is the only match.
@@ -2727,9 +2727,9 @@ void ScTiledRenderingTest::testAutoInputExactMatch()
 // Should autocomplete to "Sing" which is the only match.
 CPPUNIT_ASSERT_EQUAL_MESSAGE("4: A8 should autocomplete", 
OUString("Sing"), pDoc->GetString(aA8));
 
-lcl_typeCharsInCell("Cas", aA8.Col(), aA8.Row(), pView, pModelObj); // 
Type "Cas" in A8
-// Should not autocomplete as there are multiple matches starting with 
"Cas".
-CPPUNIT_ASSERT_EQUAL_MESSAGE("5: A8 should not autocomplete", 
OUString("Cas"), pDoc->GetString(aA8));
+lcl_typeCharsInCell("C", aA8.Col(), aA8.Row(), pView, pModelObj); // Type 
"C" in A8
+// Should show the partial completion "as".
+CPPUNIT_ASSERT_EQUAL_MESSAGE("5: A8 should have partial completion Cas", 
OUString("Cas"), pDoc->GetString(aA8));
 
 lcl_typeCharsInCell("Cast", aA8.Col(), aA8.Row(), pView, pModelObj); // 
Type "Cast" in A8
 // Should autocomplete to "Castle" which is the only match.
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9c553cec8614..97c86b34b00d 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -162,15 +162,42 @@ OUString getExactMatch(const ScTypedCaseStrSet& rDataSet, 
const OUString& rStrin
 return rString;
 }
 
+// This assumes that rResults is a sorted ring w.r.t 
ScTypedStrData::LessCaseInsensitive() or
+// in the reverse direction, whose origin is specified by nRingOrigin.
+sal_Int32 getLongestCommonPrefixLength(const std::vector& rResults, 
const OUString& rUserEntry, sal_Int32 nRingOrigin)
+{
+sal_Int32 nResults = rResults.size();
+if (!nResults)
+ret

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

2021-10-18 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit b2e4123cfd597ef19eebcb1d2a98c058eea990b2
Author: Xisco Fauli 
AuthorDate: Mon Oct 18 10:47:59 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 13:16:17 2021 +0200

tdf#145085: sc_uicalc: Add unittest

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

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 8a17d18b4f87..3c3d15f1d399 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -232,6 +232,24 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf143896)
 CPPUNIT_ASSERT_EQUAL(OUString("Test"), pDoc->GetString(ScAddress(0, 1999, 
0)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf145085)
+{
+mxComponent = loadFromDesktop("private:factory/scalc");
+ScModelObj* pModelObj = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pModelObj);
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+insertStringToCell(*pModelObj, "A1", "=HYPERLINK(\"a\";\"b\")", true);
+
+CPPUNIT_ASSERT_EQUAL(OUString("b"), pDoc->GetString(ScAddress(0, 0, 0)));
+
+// Without the fix in place, this test would have failed with
+// - Expected:
+// - Actual  : a
+CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf100582)
 {
 ScModelObj* pModelObj = createDoc("tdf100582.xls");


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/breadcrumb.cxx |   56 +--
 1 file changed, 22 insertions(+), 34 deletions(-)

New commits:
commit f845ee17d52bca18b86bf6f28a74147085175d6a
Author: Caolán McNamara 
AuthorDate: Mon Oct 18 09:58:26 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 12:39:57 2021 +0200

Related: tdf#145169 use INetURLObject::getName and removeSegment

to get the name and link for each part of the path

otherwise for sftp:// clicking on the "Root" doesn't work for me

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

diff --git a/fpicker/source/office/breadcrumb.cxx 
b/fpicker/source/office/breadcrumb.cxx
index d884d5b3fc8e..0b27367d8a8e 100644
--- a/fpicker/source/office/breadcrumb.cxx
+++ b/fpicker/source/office/breadcrumb.cxx
@@ -68,61 +68,49 @@ void Breadcrumb::SetRootName( const OUString& rURL )
 void Breadcrumb::SetURL( const OUString& rURL )
 {
 m_aCurrentURL = rURL;
-INetURLObject aURL( rURL );
+INetURLObject aURL(rURL);
 aURL.setFinalSlash();
-//prepare the Host port
-OUString sHostPort;
 
-if( aURL.HasPort() )
-{
-sHostPort += ":" + OUString::number( aURL.GetPort() );
-}
-
-OUString sUser = aURL.GetUser( INetURLObject::DecodeMechanism::NONE );
-OUString sPath = 
aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
-OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() )
-+ sUser
-+ ( sUser.isEmpty() ? OUString() : "@" )
-+ aURL.GetHost()
-+ sHostPort;
+bool bClear = m_eMode == SvtBreadcrumbMode::ONLY_CURRENT_PATH;
 
 int nSegments = aURL.getSegmentCount();
-unsigned int nPos = 0;
 
-bool bClear = ( m_eMode == SvtBreadcrumbMode::ONLY_CURRENT_PATH );
-
-// root field
-m_aSegments[0]->m_xLink->set_label( m_sRootName );
-m_aSegments[0]->m_xLink->set_sensitive(true);
-m_aSegments[0]->m_xLink->set_uri(sRootPath);
-m_aUris[m_aSegments[0]->m_xLink.get()] = sRootPath;
+size_t nVecSizeRequired = nSegments + 1;
 
-// fill the other fields
+while (m_aSegments.size() < nVecSizeRequired)
+appendField();
 
-for( unsigned int i = 1; i < static_cast(nSegments) + 1; i++ 
)
+// fill the fields under root
+for (int i = nSegments; i; --i)
 {
-if( i >= m_aSegments.size() )
-appendField();
+OUString sLabel = aURL.getName(INetURLObject::LAST_SEGMENT, true, 
INetURLObject::DecodeMechanism::WithCharset);
+OUString sLink = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
 
-unsigned int nEnd = sPath.indexOf( '/', nPos + 1 );
-OUString sLabel = sPath.copy( nPos + 1, nEnd - nPos - 1 );
-
-if( m_eMode == SvtBreadcrumbMode::ALL_VISITED )
+if (m_eMode == SvtBreadcrumbMode::ALL_VISITED)
 {
 if( m_aSegments[i]->m_xLink->get_label() != sLabel )
 bClear = true;
 }
 
-m_aSegments[i]->m_xLink->set_label( sLabel );
-m_aUris[m_aSegments[i]->m_xLink.get()] = sRootPath + sPath.subView(0, 
nEnd);
 m_aSegments[i]->m_xLink->hide();
+m_aSegments[i]->m_xLink->set_label(sLabel);
 m_aSegments[i]->m_xLink->set_sensitive(true);
+m_aSegments[i]->m_xLink->set_uri(sLink);
+m_aUris[m_aSegments[i]->m_xLink.get()] = sLink;
 
 m_aSegments[i]->m_xSeparator->hide();
 
-nPos = nEnd;
+aURL.removeSegment();
 }
 
+OUString sRootPath = 
aURL.GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
+
+// root field
+m_aSegments[0]->m_xLink->set_label( m_sRootName );
+m_aSegments[0]->m_xLink->set_sensitive(true);
+m_aSegments[0]->m_xLink->set_uri(sRootPath);
+m_aUris[m_aSegments[0]->m_xLink.get()] = sRootPath;
+
 // clear unused fields
 for (size_t i = nSegments + 1; i < m_aSegments.size(); i++ )
 {


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 svtools/source/dialogs/PlaceEditDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 33f3c2abd1cfebaa6e6957a2c189b2e345068788
Author: Caolán McNamara 
AuthorDate: Sat Oct 16 21:59:29 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 12:38:53 2021 +0200

Related: tdf#145169 use "sftp" because that's a known Protocol

while "ssh" isn't by INetURLObject. If we use sftp then
Breadcrumb::SetURL would create legal breadcrumbs links in the "save
remote" dialog for new "add SSH" from the manage services menu

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

diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx 
b/svtools/source/dialogs/PlaceEditDialog.cxx
index f006f82c84a7..252dc27cea83 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -222,7 +222,7 @@ void PlaceEditDialog::InitDetails( )
 xFtpDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
 m_aDetailsContainers.push_back(xFtpDetails);
 
-std::shared_ptr 
xSshDetails(std::make_shared(this, 22, "ssh"));
+std::shared_ptr 
xSshDetails(std::make_shared(this, 22, "sftp"));
 xSshDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
 m_aDetailsContainers.push_back(xSshDetails);
 


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

2021-10-18 Thread Armin Le Grand (Allotropia) (via logerrit)
 sw/source/core/docnode/ndtbl1.cxx  |2 ++
 sw/source/uibase/shells/basesh.cxx |3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 42b7c8c105602668f119d70f7c0aaf6e82aa9785
Author: Armin Le Grand (Allotropia) 
AuthorDate: Thu Oct 14 17:56:22 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 12:35:12 2021 +0200

tdf#144843 call to GetBoxBackground requires incarnated item

Change-Id: Id47f26a762804cd8c1b5742966ec54b71a26ab09

Added assert/warning to SwDoc::GetBoxAttr - that is the
method used by GetBoxBackground && GetBoxDirection

Change-Id: I59e8dfb790e3872810885a8f888cea57be27e80c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123619
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Armin Le Grand 
(cherry picked from commit e299f1f5e6097d9e5857dba65a65c33ac31974ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123640
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/docnode/ndtbl1.cxx 
b/sw/source/core/docnode/ndtbl1.cxx
index b0fb85487a1e..3e864f2145c0 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1223,6 +1223,8 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const 
SfxPoolItem &rNew )
 
 bool SwDoc::GetBoxAttr( const SwCursor& rCursor, std::unique_ptr& 
rToFill )
 {
+// tdf#144843 calling GetBoxAttr *requires* object
+assert(rToFill && "requires object here");
 bool bRet = false;
 SwTableNode* pTableNd = 
rCursor.GetPoint()->nNode.GetNode().FindTableNode();
 SwSelBoxes aBoxes;
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 6812cc3d9b3d..dc831d1b142b 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2714,7 +2714,8 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
 if ( rSh.IsTableMode() )
 {
 // Get background attributes of the table and put it in the set
-std::unique_ptr aBrush;
+// tdf#144843 calling GetBoxBackground *requires* an 
incarnation to be handed over
+std::unique_ptr 
aBrush(std::make_unique(RES_BACKGROUND));
 rSh.GetBoxBackground( aBrush );
 pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, 
aSet));
 aSet.Put( *aBrush );


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

2021-10-18 Thread Regina Henschel (via logerrit)
 svx/qa/unit/customshapes.cxx|   24 
 svx/qa/unit/data/tdf144988_Fontwork_FontSize.odp|binary
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |8 -
 3 files changed, 30 insertions(+), 2 deletions(-)

New commits:
commit 460af321a84aae07f699e45700c212fcad50c38a
Author: Regina Henschel 
AuthorDate: Sun Oct 17 00:15:04 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 12:34:26 2021 +0200

tdf#144988 correct font size in multiline Fontwork text

The error happened if ScaleX in TextPath is true. In that case the
original font size is used for rendering if possible. Only if a
paragraph is longer as its sub-path length, the rendered font size for
the whole text is reduced until the text fits. The error was, that in
case the first paragraph was too long and the second paragraph fits,
the fact that the first paragraph was too long was overwritten from
the factor for the second paragraph. That resulted in wrong position
and size of the text and overlapping characters.

The meaning of fScalingFactor is related to the usual case, where
ScaleX is false. Keeping original font size is not achieved by using
value 1 for fScalingFactor (which would be obvious), but the adaption
to case ScaleX==true is done in FitTextOutlinesToShapeOutlines() by
tweaking the width from the text bounding rectangle.

Change-Id: Icf5829018a83be0f1197304d17da10a88130f702
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123714
Tested-by: Jenkins
Reviewed-by: Regina Henschel 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123732

diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index db9302766780..509d6204908e 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -127,6 +127,30 @@ void lcl_AssertRectEqualWithTolerance(std::string_view 
sInfo, const tools::Recta
std::abs(rExpected.GetHeight() - 
rActual.GetHeight()) <= nTolerance);
 }
 
+CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf145111_Fontwork_rendering_font_size)
+{
+// The tested position and height depend on dpi.
+if (!IsDefaultDPI())
+return;
+
+// tdf#144988 In case ScaleX is true in property TextPath, the rendering 
font size should be
+// reduced in case any of the paragraphs would be longer as its sub-path. 
That was wrong, if
+// the first paragraph was too long and the second would fit. It resulted 
in wrong position
+// and height and overlapping characters.
+
+OUString aURL = m_directories.getURLFromSrc(sDataDirectory) + 
"tdf144988_Fontwork_FontSize.odp";
+mxComponent = loadFromDesktop(aURL, 
"com.sun.star.comp.presentation.PresentationDocument");
+uno::Reference xShape(getShape(0));
+SdrObjCustomShape& rSdrCustomShape(
+
static_cast(*SdrObject::getSdrObjectFromXShape(xShape)));
+
+// Without the fix in place left|top, width x height was 1279|1279, 2815 x 
2448.
+// The expected values 1501|1777, 3941 x 1446 are only valid for 96dpi.
+tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
+tools::Rectangle aExpected(Point(1501, 1777), Size(3941, 1446));
+lcl_AssertRectEqualWithTolerance("Wrong text rendering", aExpected, 
aBoundRect, 5);
+}
+
 CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145111_anchor_in_Fontwork)
 {
 // The tested positions depend on dpi.
diff --git a/svx/qa/unit/data/tdf144988_Fontwork_FontSize.odp 
b/svx/qa/unit/data/tdf144988_Fontwork_FontSize.odp
new file mode 100644
index ..943bc143ba0e
Binary files /dev/null and b/svx/qa/unit/data/tdf144988_Fontwork_FontSize.odp 
differ
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 6ca82e691095..3ad4287c7743 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -163,7 +163,6 @@ static void CalculateHorizontalScalingFactor(
 const tools::PolyPolygon& rOutline2d)
 {
 double fScalingFactor = 1.0;
-bool bScalingFactorDefined = false;
 rFWData.fVerticalTextScaling = 1.0;
 
 sal_uInt16 i = 0;
@@ -199,9 +198,14 @@ static void CalculateHorizontalScalingFactor(
 if ( nOutlinesCount2d & 1 )
 bSingleLineMode = true;
 
+// In case of rFWData.bScaleX == true it loops with reduced font size 
until the current run
+// results in a fScalingFactor >=1.0. The fact, that case rFWData.bScaleX 
== true keeps font
+// size if possible, is not done here with scaling factor 1 but is done in 
method
+// FitTextOutlinesToShapeOutlines()
 do
 {
 i = 0;
+bool bScalingFactorDefined = false; // New calculation for each font 
size
 for( const auto& rTextArea : rFWData.vTextAreas )
 {
 // calculating the

[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-5-4-7-2' - download.lst

2021-10-18 Thread Michael Stahl (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e4c6c6e58e929bf72c7ac0bfae3899c0805b9d1c
Author: Michael Stahl 
AuthorDate: Thu May 2 10:59:01 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Oct 18 12:15:01 2021 +0200

libpng: upgrade to release 1.6.37

Fixes CVE-2019-7317.

Reviewed-on: https://gerrit.libreoffice.org/71663
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e2abbc0062398ea67cb13cb5b0b7bfdce78e652c)

Change-Id: I3374f5cbd6552e2c1569d63ee680d0c1d9389621

diff --git a/download.lst b/download.lst
index f882b6d05f13..db1c084b12cd 100644
--- a/download.lst
+++ b/download.lst
@@ -189,8 +189,8 @@ export PDFIUM_SHA256SUM := 
ded806dc9e2a4005d8c0a6b7fcb232ab36221d72d9ff5b815e824
 export PDFIUM_TARBALL := pdfium-3064.tar.bz2
 export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
-export PNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
-export PNG_TARBALL := libpng-1.6.37.tar.xz
+export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
+export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
 export POSTGRESQL_SHA256SUM := 
db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-0' - 3 commits - download.lst external/curl RepositoryExternal.mk sw/source

2021-10-18 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk |2 
 download.lst  |8 +--
 external/curl/ExternalPackage_curl.mk |4 -
 external/curl/ExternalProject_curl.mk |8 ++-
 external/curl/clang-cl.patch.0|4 -
 external/curl/curl-7.26.0_win-proxy.patch |2 
 external/curl/curl-msvc-disable-protocols.patch.1 |7 +--
 external/curl/curl-msvc.patch.1   |8 +--
 external/curl/zlib.patch.0|   14 --
 sw/source/filter/ww8/ww8par.hxx   |2 
 sw/source/filter/ww8/ww8par2.cxx  |   47 +-
 11 files changed, 63 insertions(+), 43 deletions(-)

New commits:
commit 6b0b9fce0042a75d82b9ae565f60cb8e963397af
Author: Michael Stahl 
AuthorDate: Thu May 2 10:59:01 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Oct 18 12:13:34 2021 +0200

libpng: upgrade to release 1.6.37

Fixes CVE-2019-7317.

Reviewed-on: https://gerrit.libreoffice.org/71663
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e2abbc0062398ea67cb13cb5b0b7bfdce78e652c)

Change-Id: I3374f5cbd6552e2c1569d63ee680d0c1d9389621

diff --git a/download.lst b/download.lst
index feff3c1c5d90..1cea2e4194f8 100644
--- a/download.lst
+++ b/download.lst
@@ -200,8 +200,8 @@ export PDFIUM_SHA256SUM := 
7dc0d33fc24b1612865f5e173d48800ba3f2db891c57e3f92b9d2
 export PDFIUM_TARBALL := pdfium-3235.tar.bz2
 export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
-export LIBPNG_SHA256SUM := 
2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
-export LIBPNG_TARBALL := libpng-1.6.34.tar.xz
+export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
+export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
 export POSTGRESQL_SHA256SUM := 
db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461
commit 582218a2a5e801db67c0772a368e910ac86edd3d
Author: Caolán McNamara 
AuthorDate: Sat Oct 27 19:45:34 2018 +0100
Commit: Andras Timar 
CommitDate: Mon Oct 18 12:04:33 2021 +0200

ofz#11125 pass param len around

Change-Id: I4b382271df21c58de0e102af6e0b07a88a1d9610
Reviewed-on: https://gerrit.libreoffice.org/62448
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 6253b1a29c8c1bcd7fd9efb07ca1a12fb0fc1746)

diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index c0a4b44c4c93..b2db0fe83b44 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1033,7 +1033,7 @@ struct WW8TabBandDesc
 static void setcelldefaults(WW8_TCell *pCells, short nCells);
 void ReadDef(bool bVer67, const sal_uInt8* pS, short nLen);
 void ProcessDirection(const sal_uInt8* pParams);
-void ProcessSprmTSetBRC(int nBrcVer, const sal_uInt8* pParamsTSetBRC);
+void ProcessSprmTSetBRC(int nBrcVer, const sal_uInt8* pParamsTSetBRC, 
sal_uInt16 nParamsLen);
 void ProcessSprmTTableBorders(int nBrcVer, const sal_uInt8* pParams, 
sal_uInt16 nParamsLen);
 void ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol);
 void ProcessSprmTDelete(const sal_uInt8* pParamsTDelete);
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 1ab43e948b90..2bb1a638bc2c 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1360,11 +1360,17 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const 
sal_uInt8* pS, short nLen)
 }
 }
 
-void WW8TabBandDesc::ProcessSprmTSetBRC(int nBrcVer, const sal_uInt8* 
pParamsTSetBRC)
+void WW8TabBandDesc::ProcessSprmTSetBRC(int nBrcVer, const sal_uInt8* 
pParamsTSetBRC, sal_uInt16 nParamsLen)
 {
 if( !pParamsTSetBRC || !pTCs ) // set one or more cell border(s)
 return;
 
+if (nParamsLen < 3)
+{
+SAL_WARN("sw.ww8", "table border property is too short");
+return;
+}
+
 sal_uInt8 nitcFirst= pParamsTSetBRC[0];// first col to be changed
 sal_uInt8 nitcLim  = pParamsTSetBRC[1];// (last col to be changed)+1
 sal_uInt8 nFlag= *(pParamsTSetBRC+2);
@@ -1383,11 +1389,33 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(int nBrcVer, 
const sal_uInt8* pParamsTSe
 WW8_TCell* pAktTC  = pTCs + nitcFirst;
 WW8_BRCVer9 brcVer9;
 if( nBrcVer == 6 )
+{
+if (nParamsLen < sizeof(WW8_BRCVer6) + 3)
+{
+SAL_WARN("sw.ww8", "table border property is too short");
+return;
+}
 brcVer9 = WW8_BRCVer9(WW8_BRC(*reinterpret_cast(pParamsTSetBRC+3)));
+}
 else if( nBrcVer == 8 )
+{
+static_assert(sizeof (WW8_BRC) == 4, "this has to ma

[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-0' - external/libgpg-error

2021-10-18 Thread nd101 (via logerrit)
 external/libgpg-error/UnpackedTarball_libgpg-error.mk |1 
 external/libgpg-error/libgpg-error_gawk5.patch|  114 ++
 external/libgpg-error/w32-build-fixes.patch   |2 
 3 files changed, 116 insertions(+), 1 deletion(-)

New commits:
commit 686dbf59f8bb343bf1f09087eb4419eeadfb8062
Author: nd101 
AuthorDate: Wed Jul 3 09:41:06 2019 +0800
Commit: Andras Timar 
CommitDate: Mon Oct 18 11:38:28 2021 +0200

Fix libgpg-error compilation error with gawk5

This is an adaptation of upstream patch

https://github.com/gpg/libgpg-error/commit/7865041c77f4f7005282f10f9bb19072fbdf
plus a fix to Makefile.in

Change-Id: I5bf946cf93e5849b8a3428064ab86f6255be97da
Reviewed-on: https://gerrit.libreoffice.org/75022
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit af3b993ebea2f653fabba981d4c22b9aa779b32a)
Reviewed-on: https://gerrit.libreoffice.org/75075
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 87215115618de0c12d287a300fc5fde993886089)
Reviewed-on: https://gerrit.libreoffice.org/76308
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 8edc7023a14d26a7a6201f154b5c0e8edb47b1d9)

diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk 
b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index 822145c2f4ab..4dcef3f1465a 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libgpg-error,$(LIBGPGERROR_TARBALL)
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libgpg-error,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
+   external/libgpg-error/libgpg-error_gawk5.patch \
$(if $(filter MSC,$(COM)),external/libgpg-error/w32-build-fixes.patch) \
$(if $(filter 
MSC,$(COM)),external/libgpg-error/w32-build-fixes-2.patch.1) \
$(if $(filter 
MSC,$(COM)),external/libgpg-error/w32-build-fixes-3.patch.1) \
diff --git a/external/libgpg-error/libgpg-error_gawk5.patch 
b/external/libgpg-error/libgpg-error_gawk5.patch
new file mode 100644
index ..3be76a4538a8
--- /dev/null
+++ b/external/libgpg-error/libgpg-error_gawk5.patch
@@ -0,0 +1,114 @@
+--- src/Makefile.am
 src/Makefile.am~
+@@ -266,7 +266,7 @@
+ 
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+   $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+-  -v prefix=GPG_ERR_ -v namespace=errnos_ \
++  -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+   $(srcdir)/errnos.in >$@
+ 
+ 
+--- src/mkerrcodes.awk
 src/mkerrcodes.awk~
+@@ -81,7 +81,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkerrcodes1.awk
 src/mkerrcodes1.awk~
+@@ -81,7 +81,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkerrcodes2.awk
 src/mkerrcodes2.awk~
+@@ -91,7 +91,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkerrnos.awk
 src/mkerrnos.awk~
+@@ -83,7 +83,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkstrtable.awk
 src/mkstrtable.awk~
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ 
+ BEGIN {
+@@ -102,7 +102,7 @@
+   print "/* The purpose of this complex string table is to produce";
+   print "   optimal code with a minimum of relocations.  */";
+   print "";
+-  print "static const char " namespace "msgstr[] = ";
++  print "static const char " pkg_namespace "msgstr[] = ";
+   header = 0;
+ }
+   else
+@@ -110,7 +110,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+@@ -150,7 +150,7 @@
+   else
+ print "  gettext_noop (\"" last_msgstr "\");";
+   print "";
+-  print "static const int " namespace "msgidx[] =";
++  print "static const int " pkg_namespace "msgidx[] =";
+   print "  {";
+   for (i = 0; i < coded_msgs; i++)
+ print "" pos[i] ",";
+@@ -158,7 +158,7 @@
+   print "  };";
+   print "";
+   print "static GPG_ERR_INLINE int";
+-  print namespace "msgidxof (int code)";
++  print pkg_namespace "msgidxof (int code)";
+   print "{";
+   print "  return (0 ? 0";
+ 
+--- src/Makefile.in
 src/Makefile.

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

2021-10-18 Thread Caolán McNamara (via logerrit)
 svtools/source/dialogs/PlaceEditDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5acba60cbd97f2f181037cbd3ab049e7ebff5332
Author: Caolán McNamara 
AuthorDate: Sat Oct 16 21:59:29 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 18 11:07:30 2021 +0200

Related: tdf#145169 use "sftp" because that's a known Protocol

while "ssh" isn't by INetURLObject. If we use sftp then
Breadcrumb::SetURL would create legal breadcrumbs links in the "save
remote" dialog for new "add SSH" from the manage services menu

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

diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx 
b/svtools/source/dialogs/PlaceEditDialog.cxx
index 359d0d0f5327..d0c8b67d5de7 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -222,7 +222,7 @@ void PlaceEditDialog::InitDetails( )
 xFtpDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
 m_aDetailsContainers.push_back(xFtpDetails);
 
-std::shared_ptr 
xSshDetails(std::make_shared(this, 22, "ssh"));
+std::shared_ptr 
xSshDetails(std::make_shared(this, 22, "sftp"));
 xSshDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
 m_aDetailsContainers.push_back(xSshDetails);
 


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

2021-10-18 Thread Regina Henschel (via logerrit)
 svx/qa/unit/customshapes.cxx|   38 
 svx/qa/unit/data/tdf145111_TL_BL_Fontwork.odp   |binary
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 
 3 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit 164ebe08df1cb501235aff99722864556ee6fc2d
Author: Regina Henschel 
AuthorDate: Fri Oct 15 02:00:30 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 10:51:26 2021 +0200

tdf#145111 evaluate nVertDiff for HORZADJUST_LEFT too

In case of ScaleX=true in property TextPath, SDRTEXTVERTADJUST is
evaluated and should shift the Fontwork text. That did not work for
'LeftTop' and 'LeftBottom'.
Error was that in case of SDRTEXTHORZADJUST_LEFT the vertical shift
was not considered.

Change-Id: I4edb47515c4bf40e17b4054c3a10220df8468028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123613
Tested-by: Jenkins
Reviewed-by: Regina Henschel 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123731

diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 48b4c07c0d2d..db9302766780 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -127,6 +127,44 @@ void lcl_AssertRectEqualWithTolerance(std::string_view 
sInfo, const tools::Recta
std::abs(rExpected.GetHeight() - 
rActual.GetHeight()) <= nTolerance);
 }
 
+CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145111_anchor_in_Fontwork)
+{
+// The tested positions depend on dpi.
+if (!IsDefaultDPI())
+return;
+
+// tdf#145004 In case ScaleX is true in property TextPath, 
SDRTEXTVERTADJUST is
+// evaluated and should shift the Fontwork text. That did not work for
+// 'Top-Left' and 'Bottom-Left'.
+
+// Load document
+OUString aURL = m_directories.getURLFromSrc(sDataDirectory) + 
"tdf145111_TL_BL_Fontwork.odp";
+mxComponent = loadFromDesktop(aURL, 
"com.sun.star.comp.presentation.PresentationDocument");
+
+{
+// First shape has anchor set to Top-Left, which shifts Fontwork text 
down.
+uno::Reference xShape(getShape(0));
+SdrObjCustomShape& rSdrCustomShape(
+
static_cast(*SdrObject::getSdrObjectFromXShape(xShape)));
+
+// Without the fix in place top was 2295, but should be 2916 for 96dpi.
+// Was 2184, should be 2886 for 120dpi.
+tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(2916), aBoundRect.Top(), 5);
+}
+{
+// Second shape has anchor set to Bottom-Left, which shifts Fontwork 
text up.
+uno::Reference xShape(getShape(1));
+SdrObjCustomShape& rSdrCustomShape(
+
static_cast(*SdrObject::getSdrObjectFromXShape(xShape)));
+
+// Without the fix in place top was 10294, but should be 9519 for 
96dpi.
+// Was 10184, should be 9481 for 120dpi.
+tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(9519), aBoundRect.Top(), 5);
+}
+}
+
 CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145004_gap_by_ScaleX)
 {
 if (!IsDefaultDPI())
diff --git a/svx/qa/unit/data/tdf145111_TL_BL_Fontwork.odp 
b/svx/qa/unit/data/tdf145111_TL_BL_Fontwork.odp
new file mode 100644
index ..257023cfad0a
Binary files /dev/null and b/svx/qa/unit/data/tdf145111_TL_BL_Fontwork.odp 
differ
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index fd0827edbfc4..6ca82e691095 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -494,7 +494,7 @@ static bool GetFontWorkOutline(
 else if ( eHorzAdjust == SDRTEXTHORZADJUST_RIGHT )
 nHorzDiff = ( rFWData.fHorizontalTextScaling * 
rTextArea.aBoundRect.GetWidth() - rParagraph.aBoundRect.GetWidth() );
 
-if (nHorzDiff)
+if (nHorzDiff || nVertDiff)
 {
 for ( auto& rCharacter : rParagraph.vCharacters )
 {


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - icon-themes/colibre

2021-10-18 Thread Pedro Pinto Silva (via logerrit)
 icon-themes/colibre/sw/res/page-shadow-mask.png |binary
 1 file changed

New commits:
commit cc9b93213ed2b8d1955686d46e7505bf2113b912
Author: Pedro Pinto Silva 
AuthorDate: Fri Oct 15 18:06:26 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Oct 18 10:49:57 2021 +0200

[cp] Restore light document border for writer part2

- Make shadow not so harsh
- Add border radius

fixes https://github.com/CollaboraOnline/online/issues/3403

Signed-off-by: Pedro Pinto Silva 
Change-Id: I5a46915ca4db7b484d5e816985e834b2777a9786
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123672
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/icon-themes/colibre/sw/res/page-shadow-mask.png 
b/icon-themes/colibre/sw/res/page-shadow-mask.png
index 77b430c997a9..107f37d84982 100644
Binary files a/icon-themes/colibre/sw/res/page-shadow-mask.png and 
b/icon-themes/colibre/sw/res/page-shadow-mask.png differ


[Libreoffice-commits] core.git: Changes to 'refs/tags/MIMO-7.0.7.0.M5'

2021-10-18 Thread Andras Timar (via logerrit)
Tag 'MIMO-7.0.7.0.M5' created by Andras Timar  at 
2021-10-18 08:23 +

MIMO-7.0.7.0.M5

Changes since mimo-7.0.7.0.M4-1:
---
 0 files changed
---


[Libreoffice-commits] core.git: Changes to 'refs/tags/MIMO-6.3.6.2.M1'

2021-10-18 Thread Michael Stahl (via logerrit)
Tag 'MIMO-6.3.6.2.M1' created by Andras Timar  at 
2021-10-18 08:22 +

MIMO-6.3.6.2.M1

Changes since mimo-6-3-branch-point-45:
---
 0 files changed
---


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 cui/source/options/treeopt.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 755679765e43762251393e51f4b852aace56df92
Author: Caolán McNamara 
AuthorDate: Thu Oct 14 21:10:38 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 10:00:39 2021 +0200

tdf#144691 apply the language change SYNCHRON so it will be seen during 
apply

otherwise the restore of state from the document takes place before the
document has seen the language change

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

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index e7bf078bcae4..f7f29998a4a1 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1281,17 +1281,17 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const 
SfxItemSet& rSet)
 pItem = nullptr;
 if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_LANGUAGE, false, 
&pItem ))
 {
-pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { 
pItem });
+pDispatch->ExecuteList(pItem->Which(), SfxCallMode::SYNCHRON, { 
pItem });
 bSaveSpellCheck = true;
 }
 if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE, 
false, &pItem ))
 {
-pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { 
pItem });
+pDispatch->ExecuteList(pItem->Which(), SfxCallMode::SYNCHRON, { 
pItem });
 bSaveSpellCheck = true;
 }
 if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE, 
false, &pItem ))
 {
-pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { 
pItem });
+pDispatch->ExecuteList(pItem->Which(), SfxCallMode::SYNCHRON, { 
pItem });
 bSaveSpellCheck = true;
 }
 


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

2021-10-18 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 |binary
 sc/source/core/data/table5.cxx   |3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit db742b6cb627f807ff62c4ede3ddb5260b5f41b0
Author: Caolán McNamara 
AuthorDate: Sat Oct 16 14:12:03 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Oct 18 09:56:39 2021 +0200

ofz#40008 check if column exists before EndListening attempt

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

diff --git a/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 
b/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2
new file mode 100644
index ..d4adc7d484c9
Binary files /dev/null and b/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 differ
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 7af84bcd58dc..fb8e32f19af2 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -1152,7 +1152,8 @@ void ScTable::EndListening(sc::EndListeningContext& rCxt, 
const ScAddress& rAddr
 if (!ValidCol(rAddress.Col()))
 return;
 
-aCol[rAddress.Col()].EndListening(rCxt, rAddress, rListener);
+if (rAddress.Col() < aCol.size())
+aCol[rAddress.Col()].EndListening(rCxt, rAddress, rListener);
 }
 
 void ScTable::SetPageStyle(const OUString& rName)


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - distro-configs/CPLinux.conf distro-configs/CPLinux-LOKit.conf distro-configs/CPWin32.conf distro-configs/CPWin64.conf

2021-10-18 Thread Luboš Luňák (via logerrit)
 distro-configs/CPLinux-LOKit.conf |1 +
 distro-configs/CPLinux.conf   |1 +
 distro-configs/CPWin32.conf   |1 +
 distro-configs/CPWin64.conf   |1 +
 4 files changed, 4 insertions(+)

New commits:
commit cc5c85cb320e1b1d41abbef3b636e9934d107226
Author: Luboš Luňák 
AuthorDate: Thu Oct 14 14:31:37 2021 +0200
Commit: Luboš Luňák 
CommitDate: Mon Oct 18 09:31:10 2021 +0200

--enable-lto for CP distro configs that use --enable-mergelibs

It's a couple of percent better performance at the cost of build
time. It should build properly, but if something breaks for whatever
reason, shout and I'll fix it.

Change-Id: I37b7e90eecc0d7b503db88ad18fcbf2ae5f22a98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123587
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 

diff --git a/distro-configs/CPLinux-LOKit.conf 
b/distro-configs/CPLinux-LOKit.conf
index 5f575b6fa5e7..eacbcf5fae0a 100644
--- a/distro-configs/CPLinux-LOKit.conf
+++ b/distro-configs/CPLinux-LOKit.conf
@@ -55,6 +55,7 @@
 --disable-online-update
 --disable-dconf
 --enable-mergelibs
+--enable-lto
 --with-package-format=deb rpm
 --enable-release-build
 --with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
diff --git a/distro-configs/CPLinux.conf b/distro-configs/CPLinux.conf
index 5c59211380ae..72fd0b0ffd17 100644
--- a/distro-configs/CPLinux.conf
+++ b/distro-configs/CPLinux.conf
@@ -40,6 +40,7 @@
 --disable-online-update
 --disable-dconf
 --enable-mergelibs
+--enable-lto
 --with-package-format=deb rpm
 --enable-release-build
 --with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
diff --git a/distro-configs/CPWin32.conf b/distro-configs/CPWin32.conf
index 8f79659f4e6a..b3b2f6cbc5f7 100644
--- a/distro-configs/CPWin32.conf
+++ b/distro-configs/CPWin32.conf
@@ -19,6 +19,7 @@
 --with-myspell-dicts
 --with-package-format=msi
 --enable-mergelibs
+--enable-lto
 --with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
 --enable-windows-build-signing
 --enable-symbols
diff --git a/distro-configs/CPWin64.conf b/distro-configs/CPWin64.conf
index 1b715691c9c9..7216b352dc3c 100644
--- a/distro-configs/CPWin64.conf
+++ b/distro-configs/CPWin64.conf
@@ -19,6 +19,7 @@
 --with-myspell-dicts
 --with-package-format=msi
 --enable-mergelibs
+--enable-lto
 --with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
 --enable-windows-build-signing
 --enable-symbols


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

2021-10-18 Thread Emanuel Schorsch (via logerrit)
 sal/rtl/bootstrap.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 191e5fc227e40d18a1fe4563ed145517117596ea
Author: Emanuel Schorsch 
AuthorDate: Sun Oct 17 18:31:30 2021 -0700
Commit: Stephan Bergmann 
CommitDate: Mon Oct 18 09:10:46 2021 +0200

Noop unify style for branches

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

diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index fc551c8ce933..9feadf874e54 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -919,11 +919,9 @@ OUString expandMacros(
 }
 else if (n == 2)
 {
-buf.append(
-lookup(
-static_cast< Bootstrap_Impl * >(
-rtl::Bootstrap(seg[0]).getHandle()),
-mode, false, seg[1], requestStack));
+rtl::Bootstrap b(seg[0]);
+Bootstrap_Impl * f = static_cast< Bootstrap_Impl * 
>(b.getHandle());
+buf.append(lookup(f, mode, false, seg[1], requestStack));
 }
 else if (n == 3 && seg[0] == ".override")
 {