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

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

New commits:
commit 26cd9a5e8be28097e59188bcdf6bcaa9c75be4e4
Author: Andrea Gelmini 
AuthorDate: Mon Apr 18 22:07:19 2022 +0200
Commit: Julien Nabet 
CommitDate: Tue Apr 19 09:05:21 2022 +0200

Fix typo

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

diff --git a/source/text/sbasic/shared/03/lib_tools.xhp 
b/source/text/sbasic/shared/03/lib_tools.xhp
index 5c2c7512e..2ed625b5a 100644
--- a/source/text/sbasic/shared/03/lib_tools.xhp
+++ b/source/text/sbasic/shared/03/lib_tools.xhp
@@ -213,7 +213,7 @@
 InputStyleName as String)
 
 ChangeValueofRange
-' Inserts a certain String to all cells 
of a Range that ist passed over either as an object or as the 
RangeName.
+' Inserts a certain String to all cells 
of a Range that is passed over either as an object or as the 
RangeName.
 
 Sub ChangeValueofRange(
 oSheet as Object, 


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 41560f52a93602b61253e942d8a88046745c16aa
Author: Andrea Gelmini 
AuthorDate: Tue Apr 19 09:05:23 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Apr 19 09:05:23 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 26cd9a5e8be28097e59188bcdf6bcaa9c75be4e4
  - Fix typo

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

diff --git a/helpcontent2 b/helpcontent2
index 24828f91e228..26cd9a5e8be2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 24828f91e22842cdaf64faf7d22a028541e5746c
+Subproject commit 26cd9a5e8be28097e59188bcdf6bcaa9c75be4e4


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

2022-04-19 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkobject.hxx |7 +
 vcl/unx/gtk3/gtkobject.cxx|   53 ++
 2 files changed, 46 insertions(+), 14 deletions(-)

New commits:
commit 7c313b2e41e013d33b3576960a688c319d584d9a
Author: Caolán McNamara 
AuthorDate: Fri Apr 15 16:27:37 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Apr 19 09:13:10 2022 +0200

Related: tdf#147237 change the SalObject background when the settings change

which solves the problem of parts of the gtk ui remaining in the old
theme when switching dark<->light

Change-Id: I59060dfdf3937ca13cd706eefc9e67c133478992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133043
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/inc/unx/gtk/gtkobject.hxx b/vcl/inc/unx/gtk/gtkobject.hxx
index 113868a4616c..b43f09e0bd30 100644
--- a/vcl/inc/unx/gtk/gtkobject.hxx
+++ b/vcl/inc/unx/gtk/gtkobject.hxx
@@ -82,6 +82,8 @@ class GtkSalObjectWidgetClip final : public GtkSalObjectBase
 tools::Rectangle m_aRect;
 tools::Rectangle m_aClipRect;
 GtkWidget* m_pScrolledWindow;
+GtkWidget* m_pViewPort;
+GtkCssProvider* m_pBgCssProvider;
 
 // signals
 #if !GTK_CHECK_VERSION(4, 0, 0)
@@ -98,6 +100,11 @@ class GtkSalObjectWidgetClip final : public GtkSalObjectBase
 #endif
 
 void ApplyClipRegion();
+
+void SetViewPortBackground();
+
+DECL_LINK(SettingsChangedHdl, VclWindowEvent&, void);
+
 public:
 GtkSalObjectWidgetClip(GtkSalFrame* pParent, bool bShow);
 virtual ~GtkSalObjectWidgetClip() override;
diff --git a/vcl/unx/gtk3/gtkobject.cxx b/vcl/unx/gtk3/gtkobject.cxx
index 6f8fffd3f0a0..8a987c09faf7 100644
--- a/vcl/unx/gtk3/gtkobject.cxx
+++ b/vcl/unx/gtk3/gtkobject.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 GtkSalObjectBase::GtkSalObjectBase(GtkSalFrame* pParent)
 : m_pSocket(nullptr)
@@ -298,6 +299,8 @@ void GtkSalObjectBase::SetForwardKey( bool bEnable )
 GtkSalObjectWidgetClip::GtkSalObjectWidgetClip(GtkSalFrame* pParent, bool 
bShow)
 : GtkSalObjectBase(pParent)
 , m_pScrolledWindow(nullptr)
+, m_pViewPort(nullptr)
+, m_pBgCssProvider(nullptr)
 {
 if( !pParent )
 return;
@@ -320,31 +323,26 @@ 
GtkSalObjectWidgetClip::GtkSalObjectWidgetClip(GtkSalFrame* pParent, bool bShow)
0, 0 );
 
 // deliberately without adjustments to avoid gtk's auto adjustment on 
changing focus
-GtkWidget* pViewPort = gtk_viewport_new(nullptr, nullptr);
+m_pViewPort = gtk_viewport_new(nullptr, nullptr);
 
 // force in a fake background of a suitable color
-GtkStyleContext *pWidgetContext = gtk_widget_get_style_context(pViewPort);
-GtkCssProvider* pBgCssProvider = gtk_css_provider_new();
-OUString sColor = 
Application::GetSettings().GetStyleSettings().GetDialogColor().AsRGBHexString();
-OUString aBuffer = "* { background-color: #" + sColor + "; }";
-OString aResult = OUStringToOString(aBuffer, RTL_TEXTENCODING_UTF8);
-css_provider_load_from_data(pBgCssProvider, aResult.getStr(), 
aResult.getLength());
-gtk_style_context_add_provider(pWidgetContext, 
GTK_STYLE_PROVIDER(pBgCssProvider),
-   GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+SetViewPortBackground();
+
+ImplGetDefaultWindow()->AddEventListener(LINK(this, 
GtkSalObjectWidgetClip, SettingsChangedHdl));
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_container_add(GTK_CONTAINER(m_pScrolledWindow), pViewPort);
+gtk_container_add(GTK_CONTAINER(m_pScrolledWindow), m_pViewPort);
 #else
-gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(m_pScrolledWindow), 
pViewPort);
+gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(m_pScrolledWindow), 
m_pViewPort);
 #endif
-gtk_widget_show(pViewPort);
+gtk_widget_show(m_pViewPort);
 
 // our plug window
 m_pSocket = gtk_grid_new();
 #if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_container_add(GTK_CONTAINER(pViewPort), m_pSocket);
+gtk_container_add(GTK_CONTAINER(m_pViewPort), m_pSocket);
 #else
-gtk_viewport_set_child(GTK_VIEWPORT(pViewPort), m_pSocket);
+gtk_viewport_set_child(GTK_VIEWPORT(m_pViewPort), m_pSocket);
 #endif
 gtk_widget_show(m_pSocket);
 
@@ -355,8 +353,35 @@ 
GtkSalObjectWidgetClip::GtkSalObjectWidgetClip(GtkSalFrame* pParent, bool bShow)
 g_signal_connect( G_OBJECT(m_pSocket), "destroy", 
G_CALLBACK(signalDestroy), this );
 }
 
+// force in a fake background of a suitable color
+void GtkSalObjectWidgetClip::SetViewPortBackground()
+{
+GtkStyleContext *pWidgetContext = 
gtk_widget_get_style_context(m_pViewPort);
+if (m_pBgCssProvider)
+gtk_style_context_remove_provider(pWidgetContext, 
GTK_STYLE_PROVIDER(m_pBgCssProvider));
+m_pBgCssProvider = gtk_css_provider_new();
+OUString sColor = 
Application::GetSettings().GetStyleSettings().GetDialogColor().AsRGBHexString();
+OUString aBuffer = "* { background-color: #" + sColor

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

2022-04-19 Thread Tor Lillqvist (via logerrit)
 configure.ac |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 6db3014de5e7c1852c27437287e327f765f2a88b
Author: Tor Lillqvist 
AuthorDate: Wed May 19 14:18:56 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Apr 19 09:38:39 2022 +0200

We do want scripting on iOS, too

The native-code.py script unconditionally generates references to that now.

Change-Id: Ib0ca1e994af15597f8a191ccdd32d95efca063da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115796
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118897
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133016

diff --git a/configure.ac b/configure.ac
index 6cdcb539da44..07a56aa37fd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3001,11 +3001,7 @@ else
 fi
 
 if test -z "$enable_scripting"; then
-# Disable scripting for iOS unless specifically overridden
-# with --enable-scripting.
-if test $_os != iOS -o $_os = Emscripten; then
-enable_scripting=yes
-fi
+enable_scripting=yes
 fi
 
 DISABLE_SCRIPTING=''


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

2022-04-19 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/view/main/ChartView.cxx |   60 --
 1 file changed, 29 insertions(+), 31 deletions(-)

New commits:
commit b9f778460977921c945b798376121785a69d9e08
Author: Tomaž Vajngerl 
AuthorDate: Mon Apr 18 20:19:50 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 19 10:08:40 2022 +0200

chart2: convert TitleAlignment enum to enum class

Change-Id: I0cfc0bb74b2e218c579a5f7e7ed8e39c01838fec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133122
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 1fdd501e3d0df156d330d4a3454a88f156fe8f25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133160
Tested-by: Jenkins CollaboraOffice 

diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index f658eadb15ce..bfc186512266 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1142,7 +1142,7 @@ bool getAvailablePosAndSizeForDiagram(
 return true;
 }
 
-enum TitleAlignment { ALIGN_LEFT, ALIGN_TOP, ALIGN_RIGHT, ALIGN_BOTTOM, 
ALIGN_Z };
+enum class TitleAlignment { ALIGN_LEFT, ALIGN_TOP, ALIGN_RIGHT, ALIGN_BOTTOM, 
ALIGN_Z };
 
 void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment
, awt::Rectangle const & rDiagramPlusAxesRect, 
const awt::Size & rPageSize )
@@ -1154,30 +1154,28 @@ void changePositionOfAxisTitle( VTitle* pVTitle, 
TitleAlignment eAlignment
 awt::Size aTitleSize = pVTitle->getFinalSize();
 sal_Int32 nYDistance = static_cast(rPageSize.Height * 
constPageLayoutDistancePercentage);
 sal_Int32 nXDistance = static_cast(rPageSize.Width * 
constPageLayoutDistancePercentage);
-switch( eAlignment )
+switch (eAlignment)
 {
-case ALIGN_TOP:
+case TitleAlignment::ALIGN_TOP:
 aNewPosition = awt::Point( rDiagramPlusAxesRect.X + 
rDiagramPlusAxesRect.Width/2
 , rDiagramPlusAxesRect.Y - 
aTitleSize.Height/2  - nYDistance );
 break;
-case ALIGN_BOTTOM:
+case TitleAlignment::ALIGN_BOTTOM:
 aNewPosition = awt::Point( rDiagramPlusAxesRect.X + 
rDiagramPlusAxesRect.Width/2
 , rDiagramPlusAxesRect.Y + 
rDiagramPlusAxesRect.Height + aTitleSize.Height/2  + nYDistance );
 break;
-case ALIGN_LEFT:
+case TitleAlignment::ALIGN_LEFT:
 aNewPosition = awt::Point( rDiagramPlusAxesRect.X - aTitleSize.Width/2 
- nXDistance
 , rDiagramPlusAxesRect.Y + 
rDiagramPlusAxesRect.Height/2 );
 break;
-case ALIGN_RIGHT:
+case TitleAlignment::ALIGN_RIGHT:
 aNewPosition = awt::Point( rDiagramPlusAxesRect.X + 
rDiagramPlusAxesRect.Width + aTitleSize.Width/2 + nXDistance
 , rDiagramPlusAxesRect.Y + 
rDiagramPlusAxesRect.Height/2 );
 break;
-case ALIGN_Z:
+case TitleAlignment::ALIGN_Z:
 aNewPosition = awt::Point( rDiagramPlusAxesRect.X + 
rDiagramPlusAxesRect.Width + aTitleSize.Width/2 + nXDistance
 , rDiagramPlusAxesRect.Y + 
rDiagramPlusAxesRect.Height - aTitleSize.Height/2 );
break;
-default:
-break;
 }
 
 sal_Int32 nMaxY = rPageSize.Height - aTitleSize.Height/2;
@@ -1279,23 +1277,23 @@ std::shared_ptr lcl_createTitle( 
TitleHelper::eTitleType eType
 {
 switch( eAlignment )
 {
-case ALIGN_TOP:
+case TitleAlignment::ALIGN_TOP:
 aNewPosition = awt::Point( rRemainingSpace.X + 
rRemainingSpace.Width/2
  , rRemainingSpace.Y + aTitleSize.Height/2 
+ nYDistance );
 break;
-case ALIGN_BOTTOM:
+case TitleAlignment::ALIGN_BOTTOM:
 aNewPosition = awt::Point( rRemainingSpace.X + 
rRemainingSpace.Width/2
  , rRemainingSpace.Y + 
rRemainingSpace.Height - aTitleSize.Height/2 - nYDistance );
 break;
-case ALIGN_LEFT:
+case TitleAlignment::ALIGN_LEFT:
 aNewPosition = awt::Point( rRemainingSpace.X + aTitleSize.Width/2 
+ nXDistance
  , rRemainingSpace.Y + 
rRemainingSpace.Height/2 );
 break;
-case ALIGN_RIGHT:
+case TitleAlignment::ALIGN_RIGHT:
 aNewPosition = awt::Point( rRemainingSpace.X + 
rRemainingSpace.Width - aTitleSize.Width/2 - nXDistance
  , rRemainingSpace.Y + 
rRemainingSpace.Height/2 );
 break;
-default:
+case TitleAlignment::ALIGN_Z:
 break;
 
 }
@@ -1305,25 +1303,25 @@ std::shared_ptr lcl_createTitle( 
TitleHelper::eTitleType eType
 //remaining space
 switch( eAlignment )
 {
-case ALIGN_TOP:
+case TitleAlignment::ALIGN_TOP:
 // Push the remaining space down from top.

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

2022-04-19 Thread Julien Nabet (via logerrit)
 vcl/source/filter/itiff/itiff.cxx |   34 +++---
 1 file changed, 7 insertions(+), 27 deletions(-)

New commits:
commit dc97aac5cdfa3789d4e71e9d92df6e7e68802825
Author: Julien Nabet 
AuthorDate: Mon Apr 18 12:26:39 2022 +0200
Commit: Mike Kaganski 
CommitDate: Tue Apr 19 10:23:39 2022 +0200

Following tdf#142151: Red cast rendered in 16 bit TIFF image

Just simplify by merging both almost identical parts.

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

diff --git a/vcl/source/filter/itiff/itiff.cxx 
b/vcl/source/filter/itiff/itiff.cxx
index 5e54eeaa155a..7fa66b746c5d 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -902,7 +902,10 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
 }
 }
 }
-else if ( nPhotometricInterpretation == 2 && nSamplesPerPixel >= 3 )
+else if (
+   ( nPhotometricInterpretation == 2 && nSamplesPerPixel >= 3 ) ||
+   ( nPhotometricInterpretation == 5 && nSamplesPerPixel == 3 )
+)
 {
 if ( nMaxSampleValue > nMinSampleValue )
 {
@@ -921,33 +924,10 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
 nGreen = GetBits( getMapData(1), nx * nBitsPerSample, 
nBitsPerSample );
 nBlue = GetBits( getMapData(2), nx * nBitsPerSample, 
nBitsPerSample );
 }
-SetPixel(nY, nx, Color(static_cast(nRed - 
nMinMax), static_cast(nGreen - nMinMax), 
static_cast(nBlue - nMinMax)));
-}
-}
-}
-else if ( nPhotometricInterpretation == 5 && nSamplesPerPixel == 3 )
-{
-if ( nMaxSampleValue > nMinSampleValue )
-{
-sal_uInt32 nMinMax =  nMinSampleValue * 255 / ( 
nMaxSampleValue - nMinSampleValue );
-for (sal_Int32 nx = 0; nx < nImageWidth; ++nx)
-{
-if ( nPlanes < 3 )
-{
-nRed = GetBits( getMapData(0), ( nx * nSamplesPerPixel 
+ 0 ) * nBitsPerSample, nBitsPerSample );
-nGreen = GetBits( getMapData(0), ( nx * 
nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
-nBlue = GetBits( getMapData(0), ( nx * 
nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
-}
+if (nPhotometricInterpretation == 2)
+SetPixel(nY, nx, Color(static_cast(nRed - 
nMinMax), static_cast(nGreen - nMinMax), 
static_cast(nBlue - nMinMax)));
 else
-{
-nRed = GetBits( getMapData(0), nx * nBitsPerSample, 
nBitsPerSample );
-nGreen = GetBits( getMapData(1), nx * nBitsPerSample, 
nBitsPerSample );
-nBlue = GetBits( getMapData(2), nx * nBitsPerSample, 
nBitsPerSample );
-}
-nRed = 255 - static_cast( nRed - nMinMax );
-nGreen = 255 - static_cast( nGreen - nMinMax );
-nBlue = 255 - static_cast( nBlue - nMinMax );
-SetPixel(nY, nx, Color(static_cast(nRed), 
static_cast(nGreen), static_cast(nBlue)));
+SetPixel(nY, nx, Color(255 - 
static_cast(nRed - nMinMax), 255 - static_cast(nGreen - 
nMinMax), 255 - static_cast(nBlue - nMinMax)));
 }
 }
 }


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

2022-04-19 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5b43869be3d6338eb105fbfeed401c915b108aa6
Author: Andras Timar 
AuthorDate: Tue Apr 19 10:24:36 2022 +0200
Commit: Andras Timar 
CommitDate: Tue Apr 19 10:24:36 2022 +0200

Bump version to 21.11.27.1

Change-Id: I35c4f6ddb879ec685a1b67d5a7d9107697f593e4

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


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

2022-04-19 Thread Andras Timar (via logerrit)
Rebased ref, commits from common ancestor:
commit 145f48b92995599faffc6adf599d958ff50b8bc5
Author: Andras Timar 
AuthorDate: Tue Apr 19 10:24:36 2022 +0200
Commit: Andras Timar 
CommitDate: Tue Apr 19 10:25:10 2022 +0200

Bump version to 21.06.27.1

Change-Id: I35c4f6ddb879ec685a1b67d5a7d9107697f593e4

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


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-21.06.27-1'

2022-04-19 Thread Andras Timar (via logerrit)
Tag 'cp-21.06.27-1' created by Andras Timar  at 
2022-04-19 08:25 +

cp-21.06.27-1

Changes since libreoffice-7-1-branch-point-5:
---
 0 files changed
---


[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-21.06.27-1'

2022-04-19 Thread Adolfo Jayme Barrientos (via logerrit)
Tag 'cp-21.06.27-1' created by Andras Timar  at 
2022-04-19 08:25 +

cp-21.06.27-1

Changes since co-2021-branch-point-10:
---
 0 files changed
---


[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-21.06.27-1'

2022-04-19 Thread Andras Timar (via logerrit)
Tag 'cp-21.06.27-1' created by Andras Timar  at 
2022-04-19 08:25 +

cp-21.06.27-1

Changes since cp-21.06.13-1-1:
---
 0 files changed
---


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-21.06.27-1'

2022-04-19 Thread Andras Timar (via logerrit)
Tag 'cp-21.06.27-1' created by Andras Timar  at 
2022-04-19 08:25 +

cp-21.06.27-1

Changes since cp-21.06.26-1-7:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - postprocess/Rdb_services.mk solenv/bin vcl/source

2022-04-19 Thread Tor Lillqvist (via logerrit)
 postprocess/Rdb_services.mk   |2 +-
 solenv/bin/native-code.py |2 +-
 vcl/source/treelist/transfer2.cxx |5 +
 3 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 19a34e3f2985fb66f99f9e308f37b5f8f11e47f4
Author: Tor Lillqvist 
AuthorDate: Thu Apr 14 14:25:31 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Apr 19 11:07:36 2022 +0200

Avoid LOKClipboard harder on iOS

When I back- or side-ported cde6577dcb9c94aca7605790d34c83a5ff62edad
to this branch (as 0111b70afdce44118a3616496c70c75962e7f57f) I could
not apply all of it because this branch was so different, or
something, then. But now more of it is needed, and does apply.

Change-Id: I2710a7537594c486878a68c630f762a24ac81c49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133017
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 98abf2de3f7b..47c340b020a7 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -340,7 +340,7 @@ endif
 
 # lokclipboard.component
 ifneq ($(filter $(OS),ANDROID iOS MACOSX WNT),)
-$(if $(filter-out $(OS),IOS), \
+$(if $(filter-out $(OS),iOS), \
 $(eval $(call gb_Rdb_add_components,services,\
desktop/lokclipboard)))
 else
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 5e1b4db93ec9..0e2ed402c750 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -129,7 +129,7 @@ core_constructor_list = [
 "com_sun_star_comp_dba_ODatabaseSource",
 "com_sun_star_comp_dba_ORowSet_get_implementation",
 # desktop/lokclipboard.component
-"desktop_LOKClipboard_get_implementation",
+("desktop_LOKClipboard_get_implementation", "#ifndef IOS"),
 # drawinglayer/drawinglayer.component
 "drawinglayer_XPrimitive2DRenderer",
 # embeddedobj/util/embobj.component
diff --git a/vcl/source/treelist/transfer2.cxx 
b/vcl/source/treelist/transfer2.cxx
index d0a105554c0f..05183b9c0485 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -484,11 +484,16 @@ Reference GetSystemClipboard()
 Reference xClipboard;
 try
 {
+#ifdef IOS
+if (false)
+;
+#else
 if (comphelper::LibreOfficeKit::isActive())
 {
 xClipboard = css::datatransfer::clipboard::LokClipboard::create(
 comphelper::getProcessComponentContext());
 }
+#endif
 else
 {
 xClipboard = css::datatransfer::clipboard::SystemClipboard::create(


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

2022-04-19 Thread Vasily Melenchuk (via logerrit)
 sw/qa/uitest/writer_tests7/tdf144439.py |3 +--
 sw/source/core/doc/number.cxx   |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 90715026e5a19956ef449694937893c0c76bea21
Author: Vasily Melenchuk 
AuthorDate: Mon Apr 18 14:36:37 2022 +0300
Commit: Xisco Fauli 
CommitDate: Tue Apr 19 11:16:58 2022 +0200

tdf#147472: sw: bug in numbering with previous level NONE

Previous fix for tdf#146257 was not complete and was not able to
take care of disabled numebering started just at beginning of the
numbering string.

UI test test_tdf144439_outline with modifications is covering this
situation. No need in extra testcases.

Change-Id: Id17838cec7fb4fb039f9b457b7ee9ad3ab345678
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133124
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk 
(cherry picked from commit a31a7b53c42eef3a8007766c60ec5a2539054a7c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133135
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/writer_tests7/tdf144439.py 
b/sw/qa/uitest/writer_tests7/tdf144439.py
index 6797260f7240..4862375834e8 100644
--- a/sw/qa/uitest/writer_tests7/tdf144439.py
+++ b/sw/qa/uitest/writer_tests7/tdf144439.py
@@ -69,8 +69,7 @@ class tdf144439(UITestCase):
 Paragraphs = document.Text.createEnumeration()
 Para1 = Paragraphs.nextElement()
 self.assertEqual(Para1.String, "Outline2")
-# Well, this looks strange, but we asked to show 1 & 2 levels and 
1st is without numbering
-self.assertEqual(Para1.getPropertyValue("ListLabelString"), ".1")
+self.assertEqual(Para1.getPropertyValue("ListLabelString"), "1")
 
 with 
self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog") as 
xDialog:
 # Select level "1"
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 8a5b9c5d7c60..4e446cbf215c 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -705,7 +705,7 @@ OUString SwNumRule::MakeNumString( const 
SwNumberTree::tNumberVector & rNumVecto
 OUString sFind("%" + OUString::number(i + 1) + "%");
 sal_Int32 nPositionToken = sLevelFormat.indexOf(sFind);
 sal_Int32 nPositionNextToken = sLevelFormat.indexOf('%', 
nPositionToken + sFind.getLength());
-if (nPositionToken > 0 && nPositionNextToken >= nPositionToken)
+if (nPositionToken >= 0 && nPositionNextToken >= 
nPositionToken)
 {
 sLevelFormat = sLevelFormat.replaceAt(nPositionToken, 
nPositionNextToken - nPositionToken, u"");
 }


Frequent recent killing of runaway CppunitTest_sw_layoutwriter on Jenkins (was: ESC meeting minutes: 2022-04-14)

2022-04-19 Thread Stephan Bergmann

On 4/14/22 16:29, Stephan Bergmann wrote:

* Jenkins / CI update (Cloph)

[...]

  30 Killed by the kill-wrapper gerrit_linux_clang_dbgutil
     + quite high, but may be just bad luck this week


Starting on 2022-04-10, I saw so far five "Gerrit Linux clang/dbgutil" 
master builds and one "UBSAN Linux Build" that all got killed due to a 
CppunitTest_sw_layoutwriter that is apparently either live-locked or 
excessively long-running, in a way I had not seen before.


Maybe the below backtrace rings a bell with somebody, regarding a recent 
change?


The killed builds that I happened to notice (across tb76, tb79, tb88) are

* 
* 
* 
* 
* 
* 

The backtrace is e.g. 
()



kill-wrapper,18267 /home/tdf/lode/bin/tb_slave_wrapper --real --mode=config 
--clean 1200
  `-tb_slave_wrappe,18268 /home/tdf/lode/bin/tb_slave_wrapper --real 
--mode=config --clean
  |-make,21676 -O -k check screenshot
  |   `-make,22350 -j 32 -rs -f 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/Makefile.gbuild
 unitcheck slowcheck subsequentcheck uicheck check screenshot
  |   `-sh,28945 -c S=/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64 && I=$S/instdir && W=$S/workdir &&  mkdir -p $W/CppunitTest/ && rm -fr $W/CppunitTest/sw_layoutwriter.test.user && cp -r 
$W/unittest $W/CppunitTest/sw_layoutwriter.test.user &&rm -fr $W/CppunitTest/sw_layoutwriter.test.core && mkdir $W/CppunitTest/sw_layoutwriter.test.core && cd $W/CppunitTest/sw_layoutwriter.test.core && (  MAX_CONCURRENCY=4 
MOZILLA_CERTIFICATE_FOLDER=dbm: SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 SAL_USE_VCLPLUGIN=svp LIBO_LANG=C  LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs
$W/LinkTarget/Executable/cppunittester $W/LinkTarget/CppunitTest/libtest_sw_layoutwriter.so --headless "-env:BRAND_BASE_DIR=file://$S/instdir" "-env:BRAND_SHARE_SUBDIR=share" "-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" 
"-env:UserInstallation=file://$W/CppunitTest/sw_layoutwriter.test.user"   "-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry xcsxcu:file://$W/unittest/registry"  "-env:UNO_TYPES=file://$I/program/types.rdb 
file://$I/program/types/offapi.rdb file://$I/program/types/oovbaapi.rdb"  "-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb file://$W/Rdb/services.rdb" -env:URE_INTERNAL_LIB_DIR=file://$I/program -env:LO_LIB_DIR=file://$I/program 
-env:LO_JAVA_DIR=file://$I/program/classes --protector $W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector --protector $W/LinkTarget/Library/unobootstrapprotector.so unobootstrapprotector   --protector 
$W/LinkTarget/Library/libvclbootstrapprotector.so vclbootstrapprotector   "-env:CPPUNITTESTTARGET=$W/CppunitTest/sw_layoutwriter.test"  )  > $W/CppunitTest/sw_layoutwriter.test.log 2>&1 || ( RET=$?; $S/solenv/bin/gdb-core-bt.sh 
$W/LinkTarget/Executable/cppunittester $W/CppunitTest/sw_layoutwriter.test.core $RET >> $W/CppunitTest/sw_layoutwriter.test.log 2>&1; cat $W/CppunitTest/sw_layoutwriter.test.log; $S/solenv/gbuild/platform/unittest-failed-default.sh Cppunit 
sw_layoutwriter)
  |   `-cppunittester,28995 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/LinkTarget/CppunitTest/libtest_sw_layoutwriter.so
 --headless 
-env:BRAND_BASE_DIR=file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir
 -env:BRAND_SHARE_SUBDIR=share 
-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource 
-env:UserInstallation=file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/CppunitTest/sw_layoutwriter.test.user
 
-env:CONFIGURATION_LAYERS=xcsxcu:file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/share/registry
 
xcsxcu:file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/unittest/registry
 
-env:UNO_TYPES=file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/types.rdb
 
file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/types/offapi.rdb
 
file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/types/oovbaapi.rdb
 
-env:UNO_SERVICES=file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/Rdb/ure/services.rdb
 
file:///home/tdf/lode/jenkins/workspace/lo_gerrit/Conf

[Libreoffice-commits] core.git: offapi/com

2022-04-19 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/document/XDocumentInsertable.idl |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 7321d43155e91eeb4302ba94ab917b773695f944
Author: Samuel Mehrbrodt 
AuthorDate: Thu Apr 14 15:04:33 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 19 11:17:46 2022 +0200

Extend insertDocumentFromURL documentation

Change-Id: I892c876ff53a0aaf2ce4d484604ef0c2a95d8801
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133035
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/com/sun/star/document/XDocumentInsertable.idl 
b/offapi/com/sun/star/document/XDocumentInsertable.idl
index 6b72864eec2f..340305c6de2b 100644
--- a/offapi/com/sun/star/document/XDocumentInsertable.idl
+++ b/offapi/com/sun/star/document/XDocumentInsertable.idl
@@ -32,12 +32,16 @@
 module com {   module sun {   module star {   module document {
 
 
-/** makes it possible to import a document from a given URL
+/** Makes it possible to import a document from a given URL
 into this document.
  */
 published interface XDocumentInsertable: com::sun::star::uno::XInterface
 {
-/** inserts the document that is specified by the URL.
+/** Inserts the document that is specified by the URL.
+The document will be inserted at the current cursor position.
+
+Make sure that you insert at a position which can be split
+in two paragraphs (i.e. not inside of a field).
  */
 void insertDocumentFromURL( [in] string aURL,
  [in] sequence aOptions )


About libtiff

2022-04-19 Thread Julien Nabet

Hello,

I noticed some bugs about dealing with TIFF images (see 
https://bugs.documentfoundation.org/show_bug.cgi?id=126152 for the meta).


According to https://en.wikipedia.org/wiki/TIFF, TIFF is quite complex, 
I quote:


"TIFF is a complex format, defining many tags of which typically only a 
few are used in each file. This led to implementations supporting very 
varying subsets of the format, a situation that gave rise to the joke 
that TIFF stands for /Thousands of Incompatible File Formats/.".


So in https://gerrit.libreoffice.org/c/core/+/133108, I wondered if we 
could use Libtiff. Of course asTomaž indicated it'll need lots of work. 
However Mike pointed out Luboš' commit about Webp to take example


https://cgit.freedesktop.org/libreoffice/core/commit/?id=60eaa424c5e213f31227008e1ed66a646491a360 
("support for the WebP image format (tdf#114532 
)") which 
can be a start.


But before this, is libtiff license compatible?

I mean, I retrieved source code of libtiff and m4/acinclude.m4 indicates 
(from line 192):


dnl   This program is free software; you can redistribute it and/or 
modify it

dnl   under the terms of the GNU General Public License as published by the
dnl   Free Software Foundation; either version 2 of the License, or (at your
dnl   option) any later version.

If I remember well, GPL isn't sufficient, we also need LGPL, don't we?

Julien

PS : it's just a question for devs who would be interested in doing the 
porting, I wouldn't be able to do this myself.


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

2022-04-19 Thread Stephan Bergmann (via logerrit)
 extensions/source/update/check/updatehdl.cxx |   13 -
 extensions/source/update/check/updatehdl.hxx |2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit b12727e15a82216f709ccb6e37a9029d60ad4831
Author: Stephan Bergmann 
AuthorDate: Tue Apr 19 09:40:53 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 19 11:32:56 2022 +0200

loplugin:stringviewparam

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

diff --git a/extensions/source/update/check/updatehdl.cxx 
b/extensions/source/update/check/updatehdl.cxx
index b0ecb69e37f9..4ccf0f4fcc20 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
 
 #include "updatehdl.hxx"
 #include 
@@ -240,13 +243,13 @@ void UpdateHandler::setErrorMessage( const OUString& 
rErrorMsg )
 }
 
 
-void UpdateHandler::setDownloadFile( const OUString& rFilePath )
+void UpdateHandler::setDownloadFile( std::u16string_view rFilePath )
 {
-sal_Int32 nLast = rFilePath.lastIndexOf( '/' );
-if ( nLast != -1 )
+std::size_t nLast = rFilePath.rfind( '/' );
+if ( nLast != std::u16string_view::npos )
 {
-msDownloadFile = rFilePath.copy( nLast+1 );
-const OUString aDownloadURL = rFilePath.copy( 0, nLast );
+msDownloadFile = rFilePath.substr( nLast+1 );
+const OUString aDownloadURL(rFilePath.substr( 0, nLast ));
 osl::FileBase::getSystemPathFromFileURL( aDownloadURL, msDownloadPath 
);
 }
 }
diff --git a/extensions/source/update/check/updatehdl.hxx 
b/extensions/source/update/check/updatehdl.hxx
index 6597176468bd..297cf730ce4b 100644
--- a/extensions/source/update/check/updatehdl.hxx
+++ b/extensions/source/update/check/updatehdl.hxx
@@ -166,7 +166,7 @@ public:
 voidsetProgress( sal_Int32 nPercent );
 voidsetNextVersion( const OUString &rNextVersion ) { 
msNextVersion = rNextVersion; }
 voidsetDownloadPath( const OUString &rPath ) { 
msDownloadPath = rPath; }
-voidsetDownloadFile( const OUString &rPath );
+voidsetDownloadFile( std::u16string_view rPath );
 voidsetErrorMessage( const OUString &rErrorMsg );
 voidsetDescription( const OUString &rDescription ){ 
msDescriptionMsg = rDescription; }
 


Re: About libtiff

2022-04-19 Thread Andras Timar
Hello Julien,

On Tue, Apr 19, 2022 at 11:30 AM Julien Nabet  wrote:

> Hello,
>
> I noticed some bugs about dealing with TIFF images (see
> https://bugs.documentfoundation.org/show_bug.cgi?id=126152 for the meta).
>
> According to https://en.wikipedia.org/wiki/TIFF, TIFF is quite complex, I
> quote:
>
> "TIFF is a complex format, defining many tags of which typically only a
> few are used in each file. This led to implementations supporting very
> varying subsets of the format, a situation that gave rise to the joke that
> TIFF stands for *Thousands of Incompatible File Formats*.".
>
> So in https://gerrit.libreoffice.org/c/core/+/133108, I wondered if we
> could use Libtiff. Of course as Tomaž indicated it'll need lots of work.
> However Mike pointed out Luboš' commit about Webp to take example
>
>
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=60eaa424c5e213f31227008e1ed66a646491a360
> ("support for the WebP image format (tdf#114532
> )") which can
> be a start.
>
> But before this, is libtiff license compatible?
>
> I mean, I retrieved source code of libtiff and m4/acinclude.m4 indicates
> (from line 192):
>
> dnl   This program is free software; you can redistribute it and/or modify
> it
> dnl   under the terms of the GNU General Public License as published by the
> dnl   Free Software Foundation; either version 2 of the License, or (at
> your
> dnl   option) any later version.
>
> If I remember well, GPL isn't sufficient, we also need LGPL, don't we?
>
>
You quoted the license of GNU Autoconf. Libtiff has a BSD-like licence.
https://gitlab.com/libtiff/libtiff/-/blob/master/COPYRIGHT

Best regards,
Andras


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

2022-04-19 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/utlui/content.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0fc0d1a9fb14a23357219e797e1b35092f7d8ee6
Author: Caolán McNamara 
AuthorDate: Sat Apr 16 12:29:37 2022 +0100
Commit: Michael Stahl 
CommitDate: Tue Apr 19 12:10:32 2022 +0200

Resolves: tdf#148197 crash on launching context menu with no row selected

Change-Id: I4b05e6013ec4fb8f3968484a59c2dacf1e1c97ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133048
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Xisco Fauli 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 7e197dafdd67..4985e4f2075e 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1934,7 +1934,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 xPop->remove("footnotetracking");
 
 bool bSetSensitiveCollapseAllCategories = false;
-if (!m_bIsRoot)
+if (!m_bIsRoot && xEntry)
 {
 bool bEntry = m_xTreeView->get_iter_first(*xEntry);
 while (bEntry)


Re: About libtiff

2022-04-19 Thread Julien Nabet

On 19/04/2022 11:41, Andras Timar wrote:


...


You quoted the license of GNU Autoconf. Libtiff has a BSD-like 
licence. https://gitlab.com/libtiff/libtiff/-/blob/master/COPYRIGHT

...


Oups!

Ok so considering 
https://api.libreoffice.org/share/readme/LICENSE.html#thirdparty which 
show external libs with BSD-like license, it seems there's no pb then.


Thank you for your quick feedback!

Julien


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

2022-04-19 Thread Noel Grandin (via logerrit)
 editeng/inc/editdoc.hxx |   38 ++--
 editeng/qa/unit/core-test.cxx   |4 
 editeng/source/editeng/editdbg.cxx  |   32 ++--
 editeng/source/editeng/editdoc.cxx  |  114 --
 editeng/source/editeng/editeng.cxx  |   24 +--
 editeng/source/editeng/impedit.cxx  |   16 +-
 editeng/source/editeng/impedit.hxx  |8 -
 editeng/source/editeng/impedit2.cxx |  211 ++-
 editeng/source/editeng/impedit3.cxx |  279 ++--
 editeng/source/editeng/impedit4.cxx |   79 +-
 editeng/source/editeng/impedit5.cxx |   10 -
 11 files changed, 429 insertions(+), 386 deletions(-)

New commits:
commit 79b584af649c9499b1b4606803ee50595e2da33d
Author: Noel Grandin 
AuthorDate: Mon Apr 18 16:30:55 2022 +0200
Commit: Xisco Fauli 
CommitDate: Tue Apr 19 12:27:58 2022 +0200

tdf#148620 Crash in Draw using Format > Lists > Move Down

This reverts
commit 35f03f26799747894d1534796b6cb227bd4f233b
speed up loading large ODS a little
since ImpEditEngine::ImpMoveParagraphs wants to manipulate
ParaPortion's and also identify them by pointer

Also convert the OSL_ASSERT in this method to an assert
to catch such problems earlier

Change-Id: Id924d00c9524223db9a96e487b331ce60e3a4fff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133128
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133165
Reviewed-by: Michael Stahl 

diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 4d4de9497b67..b37fefd40bd0 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -433,10 +433,8 @@ class TextPortionList
 PortionsType maPortions;
 
 public:
-   TextPortionList();
-~TextPortionList();
-TextPortionList(TextPortionList&&) = default;
-TextPortionList& operator=(TextPortionList&&) = default;
+TextPortionList();
+~TextPortionList();
 
 voidReset();
 sal_Int32 FindPortion(
@@ -477,7 +475,9 @@ private:
 boolbInvalid:1;   // for skillful formatting
 
 public:
-EditLine();
+EditLine();
+EditLine( const EditLine& );
+~EditLine();
 
 boolIsIn( sal_Int32 nIndex ) const
 { return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); 
}
@@ -532,6 +532,7 @@ public:
 
 EditLine*   Clone() const;
 
+EditLine&   operator = ( const EditLine& rLine );
 friend bool operator == ( const EditLine& r1,  const EditLine& r2  );
 };
 
@@ -543,10 +544,8 @@ class EditLineList
 LinesType maLines;
 
 public:
-EditLineList();
-~EditLineList();
-EditLineList(EditLineList&&) = default;
-EditLineList& operator=(EditLineList&&) = default;
+EditLineList();
+~EditLineList();
 
 void Reset();
 void DeleteFromLine(sal_Int32 nDelFrom);
@@ -583,11 +582,11 @@ private:
 boolbVisible: 1;// Belongs to the node!
 boolbForceRepaint   : 1;
 
+ParaPortion( const ParaPortion& ) = delete;
+
 public:
-ParaPortion( ContentNode* pNode );
-~ParaPortion();
-ParaPortion( ParaPortion&& ) = default;
-ParaPortion& operator=( ParaPortion&& ) = default;
+ParaPortion( ContentNode* pNode );
+~ParaPortion();
 
 sal_Int32 GetLineNumber( sal_Int32 nIndex ) const;
 
@@ -634,7 +633,7 @@ public:
 class ParaPortionList
 {
 mutable sal_Int32 nLastCache;
-std::vector maPortions;
+std::vector> maPortions;
 public:
 ParaPortionList();
 ~ParaPortionList();
@@ -647,12 +646,13 @@ public:
 ParaPortion* SafeGetObject(sal_Int32 nPos);
 
 sal_Int32 GetPos(const ParaPortion* p) const;
-ParaPortion& operator[](sal_Int32 nPos);
-const ParaPortion& operator[](sal_Int32 nPos) const;
+ParaPortion* operator[](sal_Int32 nPos);
+const ParaPortion* operator[](sal_Int32 nPos) const;
 
-ParaPortion Remove(sal_Int32 nPos);
-ParaPortion& Insert(sal_Int32 nPos, ParaPortion&& p);
-void Append(ParaPortion&& p);
+std::unique_ptr Release(sal_Int32 nPos);
+void Remove(sal_Int32 nPos);
+void Insert(sal_Int32 nPos, std::unique_ptr p);
+void Append(std::unique_ptr p);
 sal_Int32 Count() const;
 
 #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 8215c451118a..cefeca9453ba 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -191,8 +191,8 @@ void Test::testLineSpacing()
 aEditEngine.QuickSetAttribs(*pSet, aSelection);
 
 // Assert changes
-ParaPortion& rParaPortion = aEditEngine.GetParaPortions()[0];
-ContentNode* const pNode = rParaPortion.GetNode();
+ParaPo

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

2022-04-19 Thread Vasily Melenchuk (via logerrit)
 sw/source/ui/fldui/flddok.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit f67484bdb6d99589789dfe0c2ac49f6160e9d95d
Author: Vasily Melenchuk 
AuthorDate: Wed Apr 13 20:19:35 2022 +0300
Commit: Michael Stahl 
CommitDate: Tue Apr 19 12:28:46 2022 +0200

tdf#148551: sw ui: set default format value for Insert Field dlg

My previous implementation was changing current format selection
only for field edit dialog. However it should be initialized also
for insert field dlg. It is not always first element. Instead of
older confusing approach right now there is a switch to set
defaults: it is less confusing IMO.

Change-Id: I189339ba66effc49267004a42345a28892cb693c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132980
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit b2b821715a3745718a941fa99dda92137c0f0c86)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133045
(cherry picked from commit 911d7c3336f07a4ea49bb539bf1bd35f11eea2a0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133050
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Vasily Melenchuk 
Reviewed-by: Xisco Fauli 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index fba96e93cb4a..3bd1b4f5dea1 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -471,6 +471,19 @@ sal_Int32 SwFieldDokPage::FillFormatLB(SwFieldTypesEnum 
nTypeId)
 {
 m_xFormatLB->select_id(OUString::number(GetCurField()->GetFormat() & 
~AF_FIXED));
 }
+else
+{
+// Select default selected value for "Insert" dialog
+switch (nTypeId)
+{
+case SwFieldTypesEnum::PageNumber:
+case SwFieldTypesEnum::DocumentStatistics:
+m_xFormatLB->select_text(SwResId(FMT_NUM_PAGEDESC));
+break;
+default:
+m_xFormatLB->select(0);
+}
+}
 
 FormatHdl(*m_xFormatLB);
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - chart2/Library_chartcore.mk chart2/source

2022-04-19 Thread Tomaž Vajngerl (via logerrit)
 chart2/Library_chartcore.mk   |1 
 chart2/source/view/main/ChartView.cxx |  157 
 chart2/source/view/main/ExplicitValueProvider.cxx |  215 ++
 3 files changed, 217 insertions(+), 156 deletions(-)

New commits:
commit e1f1cf2ae99deb5fd3628bab7c4db87e78191195
Author: Tomaž Vajngerl 
AuthorDate: Mon Apr 18 20:51:00 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 19 12:54:40 2022 +0200

chart2: move ExplicitValueProvider impl. out of ChartView

Change-Id: Ie1bcae70c5a5df3978f8890c127f9aae1ae9237b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133125
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit efb39149be1744def96ef015d1d184b5af3f43b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133161
Tested-by: Jenkins CollaboraOffice 

diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 54585db4d30d..6ec40246b22c 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -104,6 +104,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
 chart2/source/view/main/Clipping \
 chart2/source/view/main/DataPointSymbolSupplier \
 chart2/source/view/main/DrawModelWrapper \
+chart2/source/view/main/ExplicitValueProvider \
 chart2/source/view/main/LabelPositionHelper \
 chart2/source/view/main/Linear3DTransformation \
 chart2/source/view/main/PlotterBase \
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index bfc186512266..e2e1cfb97846 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -156,11 +156,7 @@ struct CreateShapeParam2D
 mbUseFixedInnerSize(false) {}
 };
 
-const uno::Sequence& ExplicitValueProvider::getUnoTunnelId()
-{
-static const comphelper::UnoIdInit theExplicitValueProviderUnoTunnelId;
-return theExplicitValueProviderUnoTunnelId.getSeq();
-}
+
 
 ChartView::ChartView(
 uno::Reference const & xContext,
@@ -929,157 +925,6 @@ std::shared_ptr< DrawModelWrapper > 
ChartView::getDrawModelWrapper()
 
 namespace
 {
-
-constexpr sal_Int32 constDiagramTitleSpace = 200; //=0,2 cm spacing
-
-bool lcl_getPropertySwapXAndYAxis( const uno::Reference< XDiagram >& xDiagram )
-{
-bool bSwapXAndY = false;
-
-uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, 
uno::UNO_QUERY );
-if( xCooSysContainer.is() )
-{
-uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( 
xCooSysContainer->getCoordinateSystems() );
-if( aCooSysList.hasElements() )
-{
-uno::Reference xProp(aCooSysList[0], 
uno::UNO_QUERY );
-if( xProp.is()) try
-{
-xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY;
-}
-catch( const uno::Exception& )
-{
-TOOLS_WARN_EXCEPTION("chart2", "" );
-}
-}
-}
-return bSwapXAndY;
-}
-
-} // end anonymous namespace
-
-sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
-  const Reference< chart2::XAxis >& xAxis
-, const Reference< chart2::XCoordinateSystem > & 
xCorrespondingCoordinateSystem
-, const Reference& xChartDoc)
-{
-return AxisHelper::getExplicitNumberFormatKeyForAxis( xAxis, 
xCorrespondingCoordinateSystem, xChartDoc
-, true /*bSearchForParallelAxisIfNothingIsFound*/ );
-}
-
-sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( const 
uno::Reference< beans::XPropertySet >& xSeriesOrPointProp )
-{
-sal_Int32 nFormat=0;
-if( !xSeriesOrPointProp.is() )
-return nFormat;
-
-try
-{
-xSeriesOrPointProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nFormat;
-}
-catch (const beans::UnknownPropertyException&) {}
-
-if(nFormat<0)
-nFormat=0;
-return nFormat;
-}
-
-sal_Int32 
ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
-const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
-const uno::Reference< util::XNumberFormatsSupplier >& 
xNumberFormatsSupplier )
-{
-sal_Int32 nFormat=0;
-if( !xSeriesOrPointProp.is() )
-return nFormat;
-if( !(xSeriesOrPointProp->getPropertyValue("PercentageNumberFormat") >>= 
nFormat) )
-{
-nFormat = DiagramHelper::getPercentNumberFormat( 
xNumberFormatsSupplier );
-}
-if(nFormat<0)
-nFormat=0;
-return nFormat;
-}
-
-awt::Rectangle ExplicitValueProvider::AddSubtractAxisTitleSizes(
-ChartModel& rModel
-, const Reference< uno::XInterface >& xChartView
-, const awt::Rectangle& rPositionAndSize, bool bSubtract )
-{
-awt::Rectangle aRet(rPositionAndSize);
-
-//add axis title sizes to the diagram size
-uno::Reference< chart2::XTitle > xTitle_Height( TitleHelper

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

2022-04-19 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter.cxx   |   19 +++
 sw/source/core/unocore/unocrsrhelper.cxx |   10 ++
 2 files changed, 29 insertions(+)

New commits:
commit 42c6dfa1662603793cf6e2c5be99a8a8ed0acaa1
Author: Michael Stahl 
AuthorDate: Thu Apr 14 18:33:21 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 19 12:57:57 2022 +0200

sw: check if cursor position is valid before inserting file

SwXTextCursor::insertDocumentFromURL() must not insert the file inside
of an input field.

If the CH_TXT_ATR_INPUTFIELD* become separated to different text nodes,
things are going to break.

Change-Id: Ia170e63f6c6d8a8fdd18f0b91e2b333e660ed924
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133028
Reviewed-by: Samuel Mehrbrodt 
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index b4b7a9eac36d..8934ee1617ea 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -9,6 +9,7 @@
 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -262,6 +263,24 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testBookmarkCopy)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testInsertFileInInputFieldException)
+{
+createSwDoc();
+uno::Reference const xTextDoc(mxComponent, 
uno::UNO_QUERY);
+uno::Reference const xBody(xTextDoc->getText());
+uno::Reference const xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference const xCursor(xBody->createTextCursor());
+uno::Reference const xInsertable(xCursor, 
uno::UNO_QUERY);
+uno::Reference const xContent(
+xFactory->createInstance("com.sun.star.text.textfield.Input"), 
uno::UNO_QUERY);
+xBody->insertTextContent(xCursor, xContent, false);
+xCursor->goLeft(1, false);
+// try to insert some random file
+OUString const url(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"fdo75110.odt");
+// inserting even asserts in debug builds - document model goes invalid 
with input field split across 2 nodes
+CPPUNIT_ASSERT_THROW(xInsertable->insertDocumentFromURL(url, {}), 
uno::RuntimeException);
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf67238)
 {
 //create a new writer document
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index e4f18b7a3b17..f75e95f30722 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1025,6 +1025,16 @@ void resetCursorPropertyValue(const 
SfxItemPropertyMapEntry& rEntry, SwPaM& rPam
 void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL,
 const uno::Sequence< beans::PropertyValue >& rOptions)
 {
+if (SwTextNode const*const pTextNode = 
pUnoCursor->GetPoint()->nNode.GetNode().GetTextNode())
+{
+// TODO: check meta field here too in case it ever grows a 2nd char
+if 
(pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(),
+RES_TXTATR_INPUTFIELD, SwTextNode::PARENT))
+{
+throw uno::RuntimeException("cannot insert file inside input 
field");
+}
+}
+
 std::unique_ptr pMed;
 SwDoc& rDoc = pUnoCursor->GetDoc();
 SwDocShell* pDocSh = rDoc.GetDocShell();


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

2022-04-19 Thread Jan-Marek Glogowski (via logerrit)
 vcl/inc/qt5/QtFrame.hxx  |3 +++
 vcl/inc/qt5/QtWidget.hxx |2 +-
 vcl/qt5/QtFrame.cxx  |8 +++-
 vcl/qt5/QtWidget.cxx |   19 ++-
 4 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit 421abb60875e88432f5d0c6ad4d6dbd8e483647f
Author: Jan-Marek Glogowski 
AuthorDate: Tue Apr 12 00:29:56 2022 +0200
Commit: Michael Weghorn 
CommitDate: Tue Apr 19 12:58:53 2022 +0200

tdf#148115 Qt handle tooltips via event loop

Instead of calling QToolTip::showText directly from LO, this
defers showing the tooltip to the QEvent processing, which takes
the tooltip timeouts into account. So tooltips are shown with
a slight delay, therefore they happen less fast on mouse move,
reducing / avoiding artifacts of fast changing windows.

This unfortunately comes with yet an other hack in the area of
our fake popup windows...

New handling is based on the code of the Qt Tool Tips example.

Change-Id: I42634ad36dd12171c30f52f07a02a88d3c48a718
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132841
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins
(cherry picked from commit af6dd54d53eee0d0de1164bff0a77c6b433b3935)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132864
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 7fc871299080427587307932c505d3ae93d6a357)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133040
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx
index 5ffaacf3ad94..23a4fd9887f1 100644
--- a/vcl/inc/qt5/QtFrame.hxx
+++ b/vcl/inc/qt5/QtFrame.hxx
@@ -111,6 +111,9 @@ class VCLPLUG_QT_PUBLIC QtFrame : public QObject, public 
SalFrame
 
 LanguageType m_nInputLanguage;
 
+OUString m_aTooltipText;
+QRect m_aTooltipArea;
+
 void SetDefaultPos();
 Size CalcDefaultSize();
 void SetDefaultSize();
diff --git a/vcl/inc/qt5/QtWidget.hxx b/vcl/inc/qt5/QtWidget.hxx
index 575cef11014f..878c8b1229ce 100644
--- a/vcl/inc/qt5/QtWidget.hxx
+++ b/vcl/inc/qt5/QtWidget.hxx
@@ -87,7 +87,7 @@ public:
 void endExtTextInput();
 void fakeResize();
 
-static bool handleEvent(QtFrame&, const QWidget&, QEvent*);
+static bool handleEvent(QtFrame&, QWidget&, QEvent*);
 // key events might be propagated further down => call base on false
 static inline bool handleKeyReleaseEvent(QtFrame&, const QWidget&, 
QKeyEvent*);
 // mouse events are always accepted
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index c78417b3070a..f6f4b6c2611d 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -175,7 +175,12 @@ QtFrame::QtFrame(QtFrame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 m_pTopLevel->setFocusProxy(m_pQWidget);
 }
 else
+{
 m_pQWidget = new QtWidget(*this, aWinFlags);
+// from Qt's POV the popup window doesn't have the input focus, so we 
must force tooltips...
+if (isPopup())
+m_pQWidget->setAttribute(Qt::WA_AlwaysShowToolTips);
+}
 
 QWindow* pChildWindow = windowHandle();
 connect(pChildWindow, &QWindow::screenChanged, this, 
&QtFrame::screenChanged);
@@ -855,7 +860,8 @@ bool QtFrame::ShowTooltip(const OUString& rText, const 
tools::Rectangle& rHelpAr
 QRect aHelpArea(toQRect(rHelpArea));
 if (QGuiApplication::isRightToLeft())
 aHelpArea.moveLeft(maGeometry.nWidth - aHelpArea.width() - 
aHelpArea.left() - 1);
-QToolTip::showText(QCursor::pos(), toQString(rText), m_pQWidget, 
aHelpArea);
+m_aTooltipText = rText;
+m_aTooltipArea = aHelpArea;
 return true;
 }
 
diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index 1fe2ce9a7159..017249b05434 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -562,7 +563,7 @@ bool QtWidget::handleKeyEvent(QtFrame& rFrame, const 
QWidget& rWidget, QKeyEvent
 return bStopProcessingKey;
 }
 
-bool QtWidget::handleEvent(QtFrame& rFrame, const QWidget& rWidget, QEvent* 
pEvent)
+bool QtWidget::handleEvent(QtFrame& rFrame, QWidget& rWidget, QEvent* pEvent)
 {
 if (pEvent->type() == QEvent::ShortcutOverride)
 {
@@ -589,6 +590,22 @@ bool QtWidget::handleEvent(QtFrame& rFrame, const QWidget& 
rWidget, QEvent* pEve
ButtonKeyState::Pressed))
 return true;
 }
+else if (pEvent->type() == QEvent::ToolTip)
+{
+// Qt's POV on focus is wrong for our fake popup windows, so check 
LO's state.
+// Otherwise Qt will continue handling ToolTip events from the 
"parent" window.
+const vcl::Window* pFocusWin = Application::GetFocusWindow();
+if (!rFrame.m_aTooltipText.isEmpty() && pFocusWin
+&& pFocusWin->GetFrameWindow() == rFrame.GetWindow())
+QToolTip::showTe

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 2 commits - comphelper/source sw/qa sw/source

2022-04-19 Thread Michael Stahl (via logerrit)
 comphelper/source/misc/asyncnotification.cxx |1 
 sw/qa/extras/uiwriter/uiwriter.cxx   |   30 ++-
 sw/source/core/unocore/unocrsrhelper.cxx |   10 +
 3 files changed, 32 insertions(+), 9 deletions(-)

New commits:
commit a41f1b3a19a33194d56e1720d3ae46229db0f5c6
Author: Michael Stahl 
AuthorDate: Thu Apr 14 18:33:21 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 19 13:00:47 2022 +0200

sw: check if cursor position is valid before inserting file

SwXTextCursor::insertDocumentFromURL() must not insert the file inside
of an input field.

If the CH_TXT_ATR_INPUTFIELD* become separated to different text nodes,
things are going to break.

Change-Id: Ia170e63f6c6d8a8fdd18f0b91e2b333e660ed924

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d11cf4e2d3f8..64cf555a95aa 100755
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -38,15 +38,7 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
-#include "com/sun/star/awt/FontUnderline.hpp"
+#include 
 
 #include 
 #include 
@@ -129,6 +121,7 @@ public:
 void testDOCXAutoTextGallery();
 void testWatermarkDOCX();
 void testTdf67238();
+void testInsertFileInInputFieldException();
 void testFdo75110();
 void testFdo75898();
 void testFdo74981();
@@ -278,6 +271,7 @@ public:
 CPPUNIT_TEST(testDOCXAutoTextGallery);
 CPPUNIT_TEST(testWatermarkDOCX);
 CPPUNIT_TEST(testTdf67238);
+CPPUNIT_TEST(testInsertFileInInputFieldException);
 CPPUNIT_TEST(testFdo75110);
 CPPUNIT_TEST(testFdo75898);
 CPPUNIT_TEST(testFdo74981);
@@ -559,6 +553,24 @@ void SwUiWriterTest::testBookmarkCopy()
 }
 }
 
+SwUiWriterTest::testInsertFileInInputFieldException
+{
+createSwDoc();
+uno::Reference const xTextDoc(mxComponent, 
uno::UNO_QUERY);
+uno::Reference const xBody(xTextDoc->getText());
+uno::Reference const xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference const xCursor(xBody->createTextCursor());
+uno::Reference const xInsertable(xCursor, 
uno::UNO_QUERY);
+uno::Reference const xContent(
+xFactory->createInstance("com.sun.star.text.textfield.Input"), 
uno::UNO_QUERY);
+xBody->insertTextContent(xCursor, xContent, false);
+xCursor->goLeft(1, false);
+// try to insert some random file
+OUString const url(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"fdo75110.odt");
+// inserting even asserts in debug builds - document model goes invalid 
with input field split across 2 nodes
+CPPUNIT_ASSERT_THROW(xInsertable->insertDocumentFromURL(url, {}), 
uno::RuntimeException);
+}
+
 void SwUiWriterTest::testTdf67238()
 {
 //create a new writer document
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 547598423ab7..4dc38b347e8f 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -955,6 +955,16 @@ void resetCursorPropertyValue(const 
SfxItemPropertySimpleEntry& rEntry, SwPaM& r
 void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL,
 const uno::Sequence< beans::PropertyValue >& rOptions)
 {
+if (SwTextNode const*const pTextNode = 
pUnoCursor->GetPoint()->nNode.GetNode().GetTextNode())
+{
+// TODO: check meta field here too in case it ever grows a 2nd char
+if 
(pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(),
+RES_TXTATR_INPUTFIELD, SwTextNode::PARENT))
+{
+throw uno::RuntimeException("cannot insert file inside input 
field");
+}
+}
+
 std::unique_ptr pMed;
 SwDoc* pDoc = pUnoCursor->GetDoc();
 SwDocShell* pDocSh = pDoc->GetDocShell();
commit c19adeab9860d961fe74bce583ac5b77cc7cbf51
Author: Stephan Bergmann 
AuthorDate: Thu Jun 15 15:37:57 2017 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 19 13:00:47 2022 +0200

Missing include

Change-Id: I3345d989dc279f080d26c60888daa67154b3c0e9
(cherry picked from commit 1d0890bb241d7ef3d52057e3d2715277d081b0e5)

diff --git a/comphelper/source/misc/asyncnotification.cxx 
b/comphelper/source/misc/asyncnotification.cxx
index 942ba308e263..bb53b096a5d7 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -25,6 +25,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 3 commits - officecfg/registry slideshow/source sw/qa sw/source

2022-04-19 Thread Xisco Fauli (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs  |2 +
 slideshow/source/engine/activities/simplecontinuousactivitybase.cxx |   12 
+++---
 sw/qa/extras/ooxmlexport/data/tdf148494.docx|binary
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx  |   12 
++
 sw/source/filter/ww8/ww8atr.cxx |4 +--
 5 files changed, 25 insertions(+), 5 deletions(-)

New commits:
commit 1b4a46e5f16c63d1920daf81274ab682e06e7ae9
Author: Xisco Fauli 
AuthorDate: Fri Apr 15 17:55:21 2022 +0200
Commit: Andras Timar 
CommitDate: Tue Apr 19 13:13:49 2022 +0200

tdf#148494: export: Always add space separator

Otherwise, the macro is saved as MACROBUTTONAllCaps
instead of MACROBUTTON AllCaps

Change-Id: Id1288e23f21ce72884bc1197f171e255ea7458f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133077
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133082
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf148494.docx 
b/sw/qa/extras/ooxmlexport/data/tdf148494.docx
new file mode 100644
index ..c60c73a206fb
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf148494.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index b658a451fa2d..9a31041d6465 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -100,6 +100,18 @@ CPPUNIT_TEST_FIXTURE(Test, testClearingBreak)
 assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br", "clear", "all");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf148494)
+{
+loadAndSave("tdf148494.docx");
+
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+// Without the fix in place, this test would have failed with
+// - Expected:  MACROBUTTON AllCaps Hello World
+// - Actual  :  MACROBUTTONAllCaps Hello World
+assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText", " 
MACROBUTTON AllCaps Hello World ");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf137466, "tdf137466.docx")
 {
 xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 6a0e38eb6677..1b6c22f26d00 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3306,8 +3306,8 @@ void AttributeOutputBase::TextField( const SwFormatField& 
rField )
 break;
 case SwFieldIds::Macro:
 {
-const OUString sStr = " MACROBUTTON"
-+ 
pField->GetPar1().replaceFirst("StarOffice.Standard.Modul1.", " ")
+const OUString sStr = " MACROBUTTON "
++ 
pField->GetPar1().replaceFirst("StarOffice.Standard.Modul1.", "")
 + " "
 + lcl_GetExpandedField(*pField);
 GetExport().OutputField( pField, ww::eMACROBUTTON, sStr );
commit 7e4b2a2ab2d1b0a680b7e880925dd57e4aa5299f
Author: Thorsten Behrens 
AuthorDate: Thu Apr 14 12:01:50 2022 +0200
Commit: Andras Timar 
CommitDate: Tue Apr 19 13:13:15 2022 +0200

Resolves: tdf#143615 clamp relative times to 1.0

User input permits zero-length animations, so whenever we calculate
relative position within the animation time frame, the case
mnMinSimpleDuration == 0.0 means: we're already at the end of the
animation, i.e. set relative time to 1.0

Change-Id: I0e8c1e29f47bd9fa16f04115cf52d3a176e13fb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133005
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit e1db8c27875eac73b1e619e4a23ecdb7a9924b61)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133038
Reviewed-by: Xisco Fauli 

diff --git 
a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx 
b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
index 9e23fc2c76c8..01cb3b75007b 100644
--- a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
+++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
@@ -63,9 +63,12 @@ namespace slideshow::internal
 // perform will be called at least mnMinNumberOfTurns
 // times.
 
-// fraction of time elapsed
+// fraction of time elapsed (clamp to 1.0 for zero-length
+// animations)
 const double nFractionElapsedTime(
-nCurrElapsedTime / mnMinSimpleDuration );
+mnMinSimpleDuration != 0.0 ?
+nCurrElapsedTime / mnMinSimpleDuration :
+1.0 );
 
 // fraction of minimum calls performed
 const double nFractionRequiredCalls(
@@ -115,7 +118,10 @@ namespace slideshow::internal
 // =

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - translations

2022-04-19 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f91ba89af17c7a4b3ac53322016190f27f4699c7
Author: Christian Lohmaier 
AuthorDate: Tue Apr 19 13:14:00 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Apr 19 13:14:00 2022 +0200

Update git submodules

* Update translations from branch 'libreoffice-7-2'
  to f7d6d5069dfea2692c2a53f7b2fc0045b748a456
  - update translations for 7.2.7 rc1

and force-fix errors using pocheck

Change-Id: If9216a8bfc693e61595f984567a9dce55ce9dd6f

diff --git a/translations b/translations
index 3fa6133e8446..f7d6d5069dfe 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 3fa6133e8446fe5eb90825616fe46d2df7444c71
+Subproject commit f7d6d5069dfea2692c2a53f7b2fc0045b748a456


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

2022-04-19 Thread Noel Grandin (via logerrit)
 sfx2/source/doc/objserv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a93346144e2948fc5b2afc31601eb49a1a2838eb
Author: Noel Grandin 
AuthorDate: Tue Apr 19 10:47:50 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 19 13:19:09 2022 +0200

use of template param here confuses Visual Studio

version 17.2.0 Preview 3.0

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

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index d3db98802433..0c150ece85e6 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -607,7 +607,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 {
 if (RET_OK == nResult)
 {
-const SfxDocumentInfoItem* pDocInfoItem = 
SfxItemSet::GetItem(xDlg->GetOutputItemSet(), SID_DOCINFO, 
false);
+const SfxDocumentInfoItem* pDocInfoItem = 
SfxItemSet::GetItem(xDlg->GetOutputItemSet(), SID_DOCINFO, false);
 if ( pDocInfoItem )
 {
 // user has done some changes to DocumentInfo


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

2022-04-19 Thread Seth Chaiklin (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   24 
+-
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 2f5cc5a4249feb4ffded2892aef5957d2aed192f
Author: Seth Chaiklin 
AuthorDate: Sat Apr 16 23:31:08 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Apr 19 13:22:26 2022 +0200

tdf#144493  adjust changes to GenericCommands.xcu

 There are no chapters in Draw or Impress, so the label changes by
 008cfd5980f31c9e01b5cdbede33631d66f2fb56 in
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
 to uno:OutlineUp and uno:OutlineDown were inappropriate.
 Remove "Chapter" from ContextLabel, and just make it "Label" so that
 Customize matches command name in menus, and add TooltipLabel for
 toolbars that gives a more informative tooltip.

 No text changes for uno:OutlineLeft and uno:OutlineRight, but same
 label changes to make command name in Customize correspond to name
 in menus, and add TooltipLabel that gives a more informative tooltip.

Change-Id: I03a43089654721b9023912c29835e9f56ffc5b26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133049
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 8fdf279a72eb..6720fc931b18 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -2853,11 +2853,11 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   
   
 
-  Move Chapter Up
-
-
   Move Up
 
+
+  Move selected paragraphs up one 
paragraph
+
 
   1
 
@@ -2872,11 +2872,11 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   
   
 
-  Move Chapter Down
-
-
   Move Down
 
+
+  Move selected paragraphs down one 
paragraph
+
 
   1
 
@@ -2891,11 +2891,11 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   
   
 
-  Promote Outline Level
-
-
   Promote
 
+
+  Promote outline level of selected list 
paragraphs
+
 
   1
 
@@ -2927,11 +2927,11 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   
   
 
-  Demote Outline Level
-
-
   Demote
 
+
+  Demote outline level of selected list 
paragraphs
+
 
   1
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 8 commits - editeng/inc editeng/qa editeng/source i18npool/qa oox/source sd/qa sw/qa sw/source vcl/inc vcl/source vcl/unx

2022-04-19 Thread Noel Grandin (via logerrit)
 editeng/inc/editdoc.hxx|   38 +--
 editeng/qa/unit/core-test.cxx  |4 
 editeng/source/editeng/editdbg.cxx |   32 +--
 editeng/source/editeng/editdoc.cxx |  114 ++-
 editeng/source/editeng/editeng.cxx |   24 +-
 editeng/source/editeng/impedit.cxx |   16 -
 editeng/source/editeng/impedit.hxx |8 
 editeng/source/editeng/impedit2.cxx|  211 +++--
 editeng/source/editeng/impedit3.cxx|  279 ++---
 editeng/source/editeng/impedit4.cxx|   79 
 editeng/source/editeng/impedit5.cxx|   10 -
 i18npool/qa/cppunit/test_breakiterator.cxx |4 
 oox/source/export/shapes.cxx   |6 
 sd/qa/unit/data/odp/tdf109169_Diamond.odp  |binary
 sd/qa/unit/data/odp/tdf109169_Octagon.odp  |binary
 sd/qa/unit/export-tests-ooxml3.cxx |   46 
 sw/qa/uitest/writer_tests7/tdf144439.py|3 
 sw/source/core/doc/number.cxx  |2 
 sw/source/ui/fldui/flddok.cxx  |   13 +
 sw/source/uibase/utlui/content.cxx |2 
 vcl/inc/unx/gtk/gtkobject.hxx  |7 
 vcl/source/filter/itiff/itiff.cxx  |4 
 vcl/unx/gtk3/gtkobject.cxx |   53 -
 23 files changed, 544 insertions(+), 411 deletions(-)

New commits:
commit b9d482cba10f51d50035e5c8f486ca33df5e8d65
Author: Noel Grandin 
AuthorDate: Mon Apr 18 16:30:55 2022 +0200
Commit: Andras Timar 
CommitDate: Tue Apr 19 13:23:15 2022 +0200

tdf#148620 Crash in Draw using Format > Lists > Move Down

This reverts
commit 35f03f26799747894d1534796b6cb227bd4f233b
speed up loading large ODS a little
since ImpEditEngine::ImpMoveParagraphs wants to manipulate
ParaPortion's and also identify them by pointer

Also convert the OSL_ASSERT in this method to an assert
to catch such problems earlier

Change-Id: Id924d00c9524223db9a96e487b331ce60e3a4fff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133128
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133165
Reviewed-by: Michael Stahl 

diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 4d4de9497b67..b37fefd40bd0 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -433,10 +433,8 @@ class TextPortionList
 PortionsType maPortions;
 
 public:
-   TextPortionList();
-~TextPortionList();
-TextPortionList(TextPortionList&&) = default;
-TextPortionList& operator=(TextPortionList&&) = default;
+TextPortionList();
+~TextPortionList();
 
 voidReset();
 sal_Int32 FindPortion(
@@ -477,7 +475,9 @@ private:
 boolbInvalid:1;   // for skillful formatting
 
 public:
-EditLine();
+EditLine();
+EditLine( const EditLine& );
+~EditLine();
 
 boolIsIn( sal_Int32 nIndex ) const
 { return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); 
}
@@ -532,6 +532,7 @@ public:
 
 EditLine*   Clone() const;
 
+EditLine&   operator = ( const EditLine& rLine );
 friend bool operator == ( const EditLine& r1,  const EditLine& r2  );
 };
 
@@ -543,10 +544,8 @@ class EditLineList
 LinesType maLines;
 
 public:
-EditLineList();
-~EditLineList();
-EditLineList(EditLineList&&) = default;
-EditLineList& operator=(EditLineList&&) = default;
+EditLineList();
+~EditLineList();
 
 void Reset();
 void DeleteFromLine(sal_Int32 nDelFrom);
@@ -583,11 +582,11 @@ private:
 boolbVisible: 1;// Belongs to the node!
 boolbForceRepaint   : 1;
 
+ParaPortion( const ParaPortion& ) = delete;
+
 public:
-ParaPortion( ContentNode* pNode );
-~ParaPortion();
-ParaPortion( ParaPortion&& ) = default;
-ParaPortion& operator=( ParaPortion&& ) = default;
+ParaPortion( ContentNode* pNode );
+~ParaPortion();
 
 sal_Int32 GetLineNumber( sal_Int32 nIndex ) const;
 
@@ -634,7 +633,7 @@ public:
 class ParaPortionList
 {
 mutable sal_Int32 nLastCache;
-std::vector maPortions;
+std::vector> maPortions;
 public:
 ParaPortionList();
 ~ParaPortionList();
@@ -647,12 +646,13 @@ public:
 ParaPortion* SafeGetObject(sal_Int32 nPos);
 
 sal_Int32 GetPos(const ParaPortion* p) const;
-ParaPortion& operator[](sal_Int32 nPos);
-const ParaPortion& operator[](sal_Int32 nPos) const;
+ParaPortion* operator[](sal_Int32 nPos);
+const ParaPortion* operator[](sal_Int32 nPos) const;
 
-ParaPortion Remove(sal_Int32 nPos);
-ParaPortion& Insert(sal_Int32 nPos, ParaPortion&& p);
-void Append(ParaPortion&& p);
+std::unique_ptr Rele

[Libreoffice-commits] dictionaries.git: Changes to 'libreoffice-7-2-7'

2022-04-19 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-2-7' available with the following commits:
commit f4b3d11843d255cea30fdecbcf9d65a7704f91b2
Author: Christian Lohmaier 
Date:   Tue Apr 19 13:31:56 2022 +0200

Branch libreoffice-7-2-7

This is 'libreoffice-7-2-7' - the stable branch for the 7.2.7 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.2.x release,
please use the 'libreoffice-7-2' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: I756082ae5ca07aff482ac7a146b74f7647736f5f



[Libreoffice-commits] help.git: Changes to 'libreoffice-7-2-7'

2022-04-19 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-2-7' available with the following commits:
commit 250622e84e468b3f895520daf0f735ff28c8514e
Author: Christian Lohmaier 
Date:   Tue Apr 19 13:31:56 2022 +0200

Branch libreoffice-7-2-7

This is 'libreoffice-7-2-7' - the stable branch for the 7.2.7 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.2.x release,
please use the 'libreoffice-7-2' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: I736d7806d926588090cbe5239c2c70d307bbdbd2



[Libreoffice-commits] translations.git: Changes to 'libreoffice-7-2-7'

2022-04-19 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-2-7' available with the following commits:
commit eed8ec08dc641c7c091d6be324e38ec8fc4be052
Author: Christian Lohmaier 
Date:   Tue Apr 19 13:31:56 2022 +0200

Branch libreoffice-7-2-7

This is 'libreoffice-7-2-7' - the stable branch for the 7.2.7 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.2.x release,
please use the 'libreoffice-7-2' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: Ib52447b336ecc09f11e555dc9f285b8e321d80b6



[Libreoffice-commits] core.git: Changes to 'libreoffice-7-2-7'

2022-04-19 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-2-7' available with the following commits:
commit b42d93324f54fbbe0fdfebd0507899605a58cbec
Author: Christian Lohmaier 
Date:   Tue Apr 19 13:36:49 2022 +0200

Branch libreoffice-7-2-7

This is 'libreoffice-7-2-7' - the stable branch for the 7.2.7 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.2.x release,
please use the 'libreoffice-7-2' branch.

If you want to build something cool, unstable, and risky, use master.



[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - configure.ac

2022-04-19 Thread Christian Lohmaier (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ae81d7a47680ce0484be2b3d4f77af5daa02db50
Author: Christian Lohmaier 
AuthorDate: Tue Apr 19 13:39:15 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Tue Apr 19 13:39:15 2022 +0200

bump product version to 7.2.8.0.0+

Change-Id: I98a016d2477e18e4f5d02cc1e9c6db777de98871

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


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2-7' - configure.ac

2022-04-19 Thread Christian Lohmaier (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d1df247f031105b2f51424d150f10afb1d6e2cee
Author: Christian Lohmaier 
AuthorDate: Tue Apr 19 13:40:38 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Tue Apr 19 13:40:38 2022 +0200

bump product version to 7.2.7.1.0+

Change-Id: I60a0534f32b13e2d46b4e95bcc8aac1b6a6a954c

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


[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-7.2.7.1'

2022-04-19 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.7.1' created by Christian Lohmaier 
 at 2022-04-19 11:40 +

Tag libreoffice-7.2.7.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmJen6IACgkQ9DSh76/u
rqMVxg//XmD/6iqkM6hewGJ3WAQ3DRspk7cZOF64Zr3cAcjb2GsTRSkS2yosERVq
LWlpL4njZKGeJP7xfylqT6aMBZLaGoWHFEliFPTMvfigDQpRts0qIs8lxx93QFYD
Ek8SEflfTn/n8VoWOoYlD9hbFLEWPqUb5XYaVeYbvjjPH8DzsESFfKWpMgsDzE9w
CuAm/hkdKezQkcIx0aDuA9uTcZe9wvighFm4++1pvNasQxnQz0TMvXd9rI8U5cLi
KlrQnjpoSZxCgcG4hzNjvmyOE2LZeZ3lHv1tztk0jAwooXlmqtwxniewA2Pn1ulX
nWQ8KEw44NYZMbz4F/BhkXujQz7uaevDf2Vv5xvnG8nIxKNDAgeqO3Q4RnAhkZGW
46aZchgqTaEFFF/bnc+PT8Fs+xK5XsIX+APitjNnqmv+GV2ypqsn3Ul2wyM74tqn
Z6L4pf7wqoPLD9oNnGQDlnuqv7KNz4D3GdT3bBN2mDASSiRYTK5uG9L599HKJDDS
YpBUH9PhZBoBg2ZN8XtvmhoqkM7Q/C4DlZBfw0qBXk7+w+PgkIrixQb6QRzXkNp4
rJhNoLsbrAVZzOzRh/LSyRWjIKZSnSLPBfcxDhnV/ioDDX7toTTAQfLzAZXWQSp7
P5oQ189UdLI4DkWSJXagXNxfKb6ARExpz8drHLRYSlWbPGmUfUA=
=if1T
-END PGP SIGNATURE-

Changes since mimo-7-2-branch-point-47:
---
 0 files changed
---


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-7.2.7.1'

2022-04-19 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.7.1' created by Christian Lohmaier 
 at 2022-04-19 11:40 +

Tag libreoffice-7.2.7.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmJen54ACgkQ9DSh76/u
rqMeexAAmovojCrp0hNk7N+d2laMDcdATfxGX6PzKe8FTIrG4htTpjYSJwzirKN8
q+Te3qAjb8mhxRMU1A9VxaHNNk4Vd5BHCFAPYbT9bV///utkps3nLGuW1OA5pUJY
2CoRRdHGnWU+lSWfaR6wAdQvlI4GAqOdztCGw3aqfi28dYPa8d1Z9aMmT8RDARUC
Mn4K3LORWVisW4sqkI2IdmeBedjhSj4bSGkU/i9zuXZNN2XDwHkRb4OiZhAVTHcr
7kTcRhnT9oQNejXOBUEX9hHhzVeOU5mEnUnVIlKBGl5GmPCITCLJQzA1/8b8+hG1
PWwMYqVOfjsOOls37SfZY3qQaChG05SQPbjeHYJBmL/aZLgmFnTAxnhiXs1hNbMW
ZMD7TM8rfwKiu3feyWTORm97FI+cmp8poSInjcP4Owrz4czNUkfdlRcSTDipu4pH
BsSl6npkWzL5pmaHza6Plgalu//j9LHFWPWOVl61y9zDxD32FfsfmPl4dmtJkr3Q
EwEwFLgIxmXkyLtyLwXZCSlI/j9rt6WhkhnISbaNJS8oyQYPiVXIj3oZ97z3io2c
6SFsYzrtnp3uGDAaQet+hGh58Lu8YBt45n1JoL3bWrQajAA+as6Rx8coI7oJpUH9
kZeVWQJXVaeZ0GhmDh/6s7M+HY0mcvkfj/n5QqlWQFaQlEthxBg=
=yeZA
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-12:
---
 0 files changed
---


[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-7.2.7.1'

2022-04-19 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.7.1' created by Christian Lohmaier 
 at 2022-04-19 11:40 +

Tag libreoffice-7.2.7.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmJen6EACgkQ9DSh76/u
rqPXIQ/9HRuhYzprM3mk31dsJanHXkpfswA/JEYc7AnSWK+LCwRKVgBNWroDF8Rb
fBVFGhooL6H/QY2Pql67UEzBBnmHKeTVRAlC4kU1upQAYRY3LIfKhZHoNFN1e9Dz
InWsIkohtQl8u8roAUDuYiSLqPAOV5xfg9Q0gVS6RweForzxkQnVwv9qciEq7/nu
BvXSTWMao5Xvjx7hD379e5/VHBjgpF4Dv6zlEj3chxhqizxpcS1nMzz8cX2kcjvc
OhclscYw7jYkht4EgzDMFThqVUacYMIzqB7WYD52+EU5ScM8Zjm3ucEB1u28JNP4
FVrl7qDibOGVOxRQKZWcJ8CR6faIpULRe7gEMxXtztaakymQkpMCdne6tzJ8pF4o
VnAqkQdGQGCveB5bVtaP6pT4ctlsslTeOY9C4V9+ne0WfKeEC7RTVVJxLx4zwjSA
gNiNqGPJzsUHRrEJ/wIa5CdfYrmMtzXIZKicZe3e3gm39NBck4Q6//ugRvGqV7gq
r7FXwjOTYrtgyy0jXPc36QVc0KhRhrZBVvkM59gxL2eEO+2LMjp3X0BgAJim/5AP
eQHU2T11EM6xBt/AFh24q5ENnH4aomVXSobBl8Eys7Zhk+B3bdbdZrK0yoqWHkHG
DytrapsD/P8vFbvRasgm8/7jmid9FK26jMoKUAhua/w7deYHBi8=
=szCn
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-15:
---
 0 files changed
---


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-7.2.7.1'

2022-04-19 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.7.1' created by Christian Lohmaier 
 at 2022-04-19 11:40 +

Tag libreoffice-7.2.7.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmJen6EACgkQ9DSh76/u
rqPg5RAAh5HXDdOfFPVSskl18CCz3saEoTYso/bcRR69zXgN5Ss+cbt6zq8q5E3Z
50T5gUWx4ZckpjKPQ1iFWyTI2DZ9sFyouzMvhDm0rL371WJXewAxRD9rliegK+3a
QdYO1SwO4PpXJPjmF4xw4bKs+cBtqRVK+TC9/6VlKjZoul+Zwj9x9FoiQAa+6tKs
0j3Cz7Gn0BftRd/fV8aGo4we4EX12rIHtZmSFBtFLTCBJI09ndFbW/6AA47ItSUI
YygVO5cDJwHsWyWZPZAVHJwjsnTnBimvKoP1/FGBGt892V2q8LpMj79gi8HAv9wN
M2322+eOgy9LNTJnA2suz0pzdCwG0rvKK7fbg7ZeTMz5OEmDVLKBoD8cAwMfVBNM
FJyPtbgWFLhYIoNdHiH8DA4uDrAA7PrmUZRyv6ikAT/TuFugLSD2EGfJEpDYNTDI
QfXRJvn3+8zBGokoLLMZzsHAWJRABSf9OCYtLDZJA46BSvO5Er4Dk5E1XcKpWS45
mtg0ZZrQ2PxpKgJBOnzr3kT0R25ncO0jKPnz6F795QClvXFW7gYVLp9YTZX8RvuY
N5VYzEizFZwaPA5eu5lKS8z5zJFryMxAhZ7Jl5WpCfM2dNQw+9OOOCkpj4QS2xkk
VoJAlOTtqnB5LZTtSO7vQ8v7iKX6wEqo2sch/R4sp8RqUpIyp/U=
=A58D
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-21:
---
 0 files changed
---


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

2022-04-19 Thread Mark Hung (via logerrit)
 sw/source/core/txtnode/fntcache.cxx |   33 +++--
 1 file changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 7418fc88021a7d2cb45eb3b029466ed7a14d3338
Author: Mark Hung 
AuthorDate: Sat Apr 16 15:36:09 2022 +0800
Commit: Mark Hung 
CommitDate: Tue Apr 19 13:51:07 2022 +0200

tdf#148594 correcting the number of kern spaces.

A glyph item ( or a glyph cluster ) may be made up of
more than one sal_Unicode values ( e.g. CJK ideograph extension
B characters that need surrogate pairs, or unicode iVS that have
a base character and a selector ).

Insert the kern space only when KernArray value changes. I.e.
character belongs to a different glyph item or cluster. Count the
number of needed kern spaces in the same way.

Change-Id: If79766bda37cf4d10ca5be2d51dfdc992eaf9cc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133093
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index 65a4332b462d..3e1a6f9b2c67 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1598,6 +1598,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 nSpaceSum += nHalfSpace;
 }
 
+tools::Long nOldValue = aKernArray[i-1];
+
 cChPrev = nCh;
 aKernArray[i-1] += nKernSum + nSpaceSum;
 // In word line mode and for Arabic, we disabled the half 
space trick. If a portion
@@ -1606,10 +1608,22 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 // nSpaceAdd value again:
 if ((bNoHalfSpace || m_pPrtFont->IsWordLineMode()) && i+1 == 
sal_Int32(nCnt) && nCh == CH_BLANK)
 aKernArray[i-1] = aKernArray[i-1] - nSpaceAdd;
+
+// Some glyph items use more than one sal_Unicode, eg. CJK 
ideograph extensions
+// or unicode IVS. Don't assign space multiple times in case 
the orginal text array
+// have the same values.
+while(i < sal_Int32(nCnt) && aKernArray[i] == nOldValue)
+{
+aKernArray[i] = aKernArray[i-1];
+++i;
+}
 }
 
 // the layout engine requires the total width of the output
-aKernArray[sal_Int32(rInf.GetLen()) - 1] += nKernSum + nSpaceSum;
+tools::Long nOldValue = aKernArray[sal_Int32(rInf.GetLen()) - 1];
+for(sal_Int32 i = sal_Int32(rInf.GetLen()) - 1; i >= 0 && 
aKernArray[i] == nOldValue; --i)
+aKernArray[i] += nKernSum + nSpaceSum;
+
 
 if( rInf.GetGreyWave() )
 {
@@ -1906,8 +1920,23 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
 if (nLn)
 {
 aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]);
+
+// Note that we can't simply use sal_Int(nLn) - 1 as nSpaceCount
+// because a glyph may be made up of more than one characters.
+sal_Int32 nSpaceCount = 0;
+tools::Long nOldValue = aKernArray[0];
+
+for(sal_Int32 i = 1; i < sal_Int32(nLn); ++i)
+{
+if (nOldValue != aKernArray[i])
+{
+++nSpaceCount;
+nOldValue = aKernArray[i];
+}
+}
+
 if (rInf.GetKern())
-aTextSize.AdjustWidth((sal_Int32(nLn) - 1) * rInf.GetKern());
+aTextSize.AdjustWidth(nSpaceCount * rInf.GetKern());
 }
 
 OSL_ENSURE( !rInf.GetShell() ||


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

2022-04-19 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ffa172fc6b98d7d7dd3928693035a34cd331fe12
Author: Caolán McNamara 
AuthorDate: Thu Apr 14 09:13:35 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Apr 19 13:55:53 2022 +0200

tdf#148197 gtk_tree_row_reference_new_proxy warning on docking navigator

Gtk-CRITICAL **: 09:05:11.124: gtk_tree_row_reference_new_proxy: assertion 
'path->depth > 0' failed

from TreeView::set_cursor(-1)

gtk_tree_view_set_cursor is ok (and documented as such) with an
"invalid" path to unset the cursor, but there isn't the same for
gtk_tree_view_scroll_to_cell, though there null is docs as acceptable.

Change-Id: I11b94ba997fbbd2f31031d9e73765ea1882ad9ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132872
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 2732ea7dd0ad..9c6327d7c4f7 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14552,7 +14552,7 @@ public:
 virtual void set_cursor(int pos) override
 {
 disable_notify_events();
-GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1);
+GtkTreePath* path = pos != -1 ? gtk_tree_path_new_from_indices(pos, 
-1) : nullptr;
 gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
 gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
 gtk_tree_path_free(path);


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

2022-04-19 Thread Noel Grandin (via logerrit)
 vcl/source/app/settings.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e0c424ba729e4659ce1007254adbbceafbeaef5b
Author: Noel Grandin 
AuthorDate: Tue Apr 19 11:54:53 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 19 14:03:13 2022 +0200

dont keep writing to config when persona is set to 'no'

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

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 122b2ae6f576..c7e8b8d1c6fa 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2286,6 +2286,8 @@ static void setupPersonaHeaderFooter( WhichPersona 
eWhich, OUString& rHeaderFoot
 // read from the configuration
 OUString aPersona( officecfg::Office::Common::Misc::Persona::get() );
 OUString aPersonaSettings( 
officecfg::Office::Common::Misc::PersonaSettings::get() );
+if (aPersona == "no")
+return;
 
 // have the settings changed? marks if header /footer prepared before
 //should maybe extended to a flag that marks if header /footer /both are 
loaded


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - sw/qa sw/source

2022-04-19 Thread Michael Stahl (via logerrit)
Rebased ref, commits from common ancestor:
commit 376f0143d875ef39550f916f209a3a923342c269
Author: Michael Stahl 
AuthorDate: Thu Apr 14 18:33:21 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 19 14:16:51 2022 +0200

sw: check if cursor position is valid before inserting file

SwXTextCursor::insertDocumentFromURL() must not insert the file inside
of an input field.

If the CH_TXT_ATR_INPUTFIELD* become separated to different text nodes,
things are going to break.

Change-Id: Ia170e63f6c6d8a8fdd18f0b91e2b333e660ed924

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d11cf4e2d3f8..7f81222766bf 100755
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -47,6 +47,7 @@
 #include 
 #include "com/sun/star/text/XDefaultNumberingProvider.hpp"
 #include "com/sun/star/awt/FontUnderline.hpp"
+#include 
 
 #include 
 #include 
@@ -129,6 +130,7 @@ public:
 void testDOCXAutoTextGallery();
 void testWatermarkDOCX();
 void testTdf67238();
+void testInsertFileInInputFieldException();
 void testFdo75110();
 void testFdo75898();
 void testFdo74981();
@@ -278,6 +280,7 @@ public:
 CPPUNIT_TEST(testDOCXAutoTextGallery);
 CPPUNIT_TEST(testWatermarkDOCX);
 CPPUNIT_TEST(testTdf67238);
+CPPUNIT_TEST(testInsertFileInInputFieldException);
 CPPUNIT_TEST(testFdo75110);
 CPPUNIT_TEST(testFdo75898);
 CPPUNIT_TEST(testFdo74981);
@@ -559,6 +562,24 @@ void SwUiWriterTest::testBookmarkCopy()
 }
 }
 
+void SwUiWriterTest::testInsertFileInInputFieldException()
+{
+createDoc();
+uno::Reference const xTextDoc(mxComponent, 
uno::UNO_QUERY);
+uno::Reference const xBody(xTextDoc->getText());
+uno::Reference const xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference const xCursor(xBody->createTextCursor());
+uno::Reference const xInsertable(xCursor, 
uno::UNO_QUERY);
+uno::Reference const xContent(
+xFactory->createInstance("com.sun.star.text.textfield.Input"), 
uno::UNO_QUERY);
+xBody->insertTextContent(xCursor, xContent, false);
+xCursor->goLeft(1, false);
+// try to insert some random file
+OUString const url(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"fdo75110.odt");
+// inserting even asserts in debug builds - document model goes invalid 
with input field split across 2 nodes
+CPPUNIT_ASSERT_THROW(xInsertable->insertDocumentFromURL(url, {}), 
uno::RuntimeException);
+}
+
 void SwUiWriterTest::testTdf67238()
 {
 //create a new writer document
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 547598423ab7..4dc38b347e8f 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -955,6 +955,16 @@ void resetCursorPropertyValue(const 
SfxItemPropertySimpleEntry& rEntry, SwPaM& r
 void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL,
 const uno::Sequence< beans::PropertyValue >& rOptions)
 {
+if (SwTextNode const*const pTextNode = 
pUnoCursor->GetPoint()->nNode.GetNode().GetTextNode())
+{
+// TODO: check meta field here too in case it ever grows a 2nd char
+if 
(pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(),
+RES_TXTATR_INPUTFIELD, SwTextNode::PARENT))
+{
+throw uno::RuntimeException("cannot insert file inside input 
field");
+}
+}
+
 std::unique_ptr pMed;
 SwDoc* pDoc = pUnoCursor->GetDoc();
 SwDocShell* pDocSh = pDoc->GetDocShell();


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

2022-04-19 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c4afdaefbfbc6c2f2d86fb6296daa814f552cc03
Author: Samuel Mehrbrodt 
AuthorDate: Tue Apr 19 14:37:22 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 19 14:37:22 2022 +0200

Release 5.4.15.0

Change-Id: I219d5bb20f9443f8d644814c066cf321499fb519

diff --git a/configure.ac b/configure.ac
index 23c1266b4392..5c5f843c168c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.14.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.15.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 


[Libreoffice-commits] help.git: help3xsl/default.css help3xsl/online_transform.xsl helpers/xmlhelp.dtd source/text

2022-04-19 Thread Ilmari Lauhakangas (via logerrit)
 help3xsl/default.css |   27 ++
 help3xsl/online_transform.xsl|7 -
 helpers/xmlhelp.dtd  |7 -
 source/text/sbasic/shared/03/lib_ScriptForge.xhp |   28 +--
 4 files changed, 50 insertions(+), 19 deletions(-)

New commits:
commit 5bab8a2d2530d7487064a2560c440269018a56b9
Author: Ilmari Lauhakangas 
AuthorDate: Mon Apr 18 12:41:48 2022 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Tue Apr 19 14:51:33 2022 +0200

tdf#148621 Make ScriptForge service tables mobile-friendly

- Introduce  element
- While considering text-align, I noticed we do not take RTL languages
into account. A CSS rule 'html[dir=ltr] th' was added, which does
nothing at the moment. We should look into directionality.

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

diff --git a/help3xsl/default.css b/help3xsl/default.css
index 2c5e59ac0..bc053cc70 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -212,6 +212,9 @@ table, th, td {
 border-right: 0;
 padding: 0.3em;
 }
+html[dir=ltr] th {
+text-align: left;
+}
 .tablehead,
 .tableheadintable {
 font-weight: bold;
@@ -226,6 +229,17 @@ table, th, td {
 font-size: 0.98rem;
 }
 
+/* ScriptForge service tables */
+.sf_table {
+min-width: 100%;
+}
+.sf_table thead {
+display: none;
+}
+.sf_table tr, .sf_table td {
+display: block;
+}
+
 h1,
 h2,
 h3,
@@ -840,6 +854,19 @@ li.disabled a {
 max-width: 200px;
 width: 100%
 }
+/* ScriptForge service tables */
+.sf_table {
+min-width: auto;
+}
+.sf_table thead {
+display: table-header-group;
+}
+.sf_table tr {
+display: table-row;
+}
+.sf_table td {
+display: table-cell;
+}
 }
 @media screen and (min-width: 1440px) {
 #Contents {
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 465415ea2..70c7ab0af 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -732,7 +732,7 @@
 
 
 
-
+
 
 
 
@@ -744,7 +744,7 @@
 
 
 
-
+
 
 
 
@@ -758,6 +758,9 @@
 
 
 
+
+
+
 
 
 
diff --git a/helpers/xmlhelp.dtd b/helpers/xmlhelp.dtd
index 6a4ef9778..fcb1076b5 100644
--- a/helpers/xmlhelp.dtd
+++ b/helpers/xmlhelp.dtd
@@ -228,7 +228,7 @@ Version Nov 2018
   select (sys | appl | distrib | target | ver | lang) #REQUIRED
 >
 
-
+
 
 
+
+
+
 
 
 
   Services provided by the ScriptForge 
library
-  
-
-   
- Category
-   
-   
- Services
-   
-   
- 
-   
-   
- 
-   
-
+  
+
+  
+
+  Category
+
+
+  Services
+
+  
+
 

  %PRODUCTNAME Basic
@@ -241,4 +237,4 @@
   All ScriptForge 
Basic routines or identifiers that are prefixed with an underscore character 
"_" are reserved for internal use. They are not meant be used in Basic macros 
or Python scripts.
 
 
-
\ No newline at end of file
+


[Libreoffice-commits] core.git: helpcontent2

2022-04-19 Thread Ilmari Lauhakangas (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cd8848acc93346e5613bc8c1fdc1d6c74c099f1f
Author: Ilmari Lauhakangas 
AuthorDate: Tue Apr 19 15:51:36 2022 +0300
Commit: Gerrit Code Review 
CommitDate: Tue Apr 19 14:51:36 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 5bab8a2d2530d7487064a2560c440269018a56b9
  - tdf#148621 Make ScriptForge service tables mobile-friendly

- Introduce  element
- While considering text-align, I noticed we do not take RTL languages
into account. A CSS rule 'html[dir=ltr] th' was added, which does
nothing at the moment. We should look into directionality.

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

diff --git a/helpcontent2 b/helpcontent2
index 26cd9a5e8be2..5bab8a2d2530 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 26cd9a5e8be28097e59188bcdf6bcaa9c75be4e4
+Subproject commit 5bab8a2d2530d7487064a2560c440269018a56b9


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

2022-04-19 Thread Noel Grandin (via logerrit)
 svx/source/svdraw/sdrhittesthelper.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit d40c6601330b70c3cb9c1be0fa9e9775ad51113c
Author: Noel Grandin 
AuthorDate: Tue Apr 19 12:53:43 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 19 15:15:24 2022 +0200

tdf#148313 Basic IDE crashing while resizing dialog

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

diff --git a/svx/source/svdraw/sdrhittesthelper.cxx 
b/svx/source/svdraw/sdrhittesthelper.cxx
index 7534b08d5b7a..62ebde956c73 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -136,9 +136,10 @@ bool ViewObjectContactPrimitiveHit(
 {
 // get primitive sequence
 sdr::contact::DisplayInfo aDisplayInfo;
-const drawinglayer::primitive2d::Primitive2DContainer& 
rSequence(rVOC.getPrimitive2DSequence(aDisplayInfo));
+// have to make a copy of this container here, because it might be 
changed underneath us
+const drawinglayer::primitive2d::Primitive2DContainer 
aSequence(rVOC.getPrimitive2DSequence(aDisplayInfo));
 
-if(!rSequence.empty())
+if(!aSequence.empty())
 {
 // create a HitTest processor
 const drawinglayer::geometry::ViewInformation2D& 
rViewInformation2D = rVOC.GetObjectContact().getViewInformation2D();
@@ -152,7 +153,7 @@ bool ViewObjectContactPrimitiveHit(
 aHitTestProcessor2D.collectHitStack(pHitContainer != nullptr);
 
 // feed it with the primitives
-aHitTestProcessor2D.process(rSequence);
+aHitTestProcessor2D.process(aSequence);
 
 // deliver result
 if (aHitTestProcessor2D.getHit())


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

2022-04-19 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 122905d30e8918e0ebe0ad3a84a50c7681ae228e
Author: Michael Stahl 
AuthorDate: Wed Apr 13 20:59:39 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 19 15:27:50 2022 +0200

sfx2: fix utterly confusing bools in SfxViewFrame::ExecReload_Impl()

bPhysObjIsYounger variable is actually true if aPhysObj is *older* than
aMedObj.

Due to the "bNeedsReload = true" that was added in commit
b505ca5b9c31b3d9c639406d03a25bea4e914242 i had first thought that commit
b4576f3da4d90139fc5140962d13cb91dab98797 is at fault and inverted the
condition - but not so, its only crime is mis-naming the variable and
the "bNeedsReload = true" is actually dead code because this branch
always returns before any use of bNeedsReload further below.

Meanwhile, commit f1035312f80746fdf4a7a04039db73b27d1387c3 actually did
invert the condition, but that was in 2004 and presumably intentional.

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

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 95574c8892b0..1a7eeafb2bee 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -437,7 +437,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 // etag tells that the cache representation (e.g. in LO) is 
different from the one on the server,
 // but tells nothing about the age
 // Details at this link: 
http://tools.ietf.org/html/rfc4918#section-15, section 15.7
-bool bPhysObjIsYounger = ::utl::UCBContentHelper::IsYounger( 
aMedObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
+bool const bPhysObjIsOlder = 
::utl::UCBContentHelper::IsYounger(aMedObj.GetMainURL( 
INetURLObject::DecodeMechanism::NONE),
  
aPhysObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
 bool bIsWebDAV = aMedObj.isAnyKnownWebDAVScheme();
 
@@ -446,14 +446,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 if ( ( !bNeedsReload && ( ( aMedObj.GetProtocol() == 
INetProtocol::File &&
 ( aMedObj.getFSysPath( 
FSysStyle::Detect ) != aPhysObj.getFSysPath( FSysStyle::Detect )
   || bPasswordEntered ) &&
-!bPhysObjIsYounger )
-  || ( bIsWebDAV && !bPhysObjIsYounger )
+!bPhysObjIsOlder)
+  || (bIsWebDAV && !bPhysObjIsOlder)
   || ( pMed->IsRemote() && !bIsWebDAV ) ) )
  || pVersionItem )
 // <- tdf#82744
 {
-bNeedsReload = true;
-
 bool bOK = false;
 bool bRetryIgnoringLock = false;
 bool bOpenTemplate = false;


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

2022-04-19 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c929c563e2029bbb969dc417a688cca8934e69b0
Author: Michael Stahl 
AuthorDate: Tue Apr 19 14:09:08 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 19 15:28:08 2022 +0200

sfx2: do reload on SID_EDITDOC in SfxViewFrame::ExecReload_Impl()

commit b505ca5b9c31b3d9c639406d03a25bea4e914242 "Switch to read-only
mode: do not force reload document if possible" replaced "true" with
"bNeedsReload" here - but this is a problem when switching from
read-only to editable.

1. Start LO and load a document from WebDAV editable
2. Start other LO and load the same document from WebDAV read-only
3. In first LO, edit document, store it and close it
4. In second LO, click "Edit Document" button
5. LO doesn't reload the document and shows stale content

It's not clear what problem that commit was trying to solve, but let's
assume that it intended to change only what happens when switching from
editable to read-only.

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

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1a7eeafb2bee..bbf1a679dd4a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -596,7 +596,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 }
 }
 
-rReq.AppendItem( SfxBoolItem( SID_FORCERELOAD, bNeedsReload) );
+rReq.AppendItem( SfxBoolItem(SID_FORCERELOAD,
+rReq.GetSlot() == SID_EDITDOC || bNeedsReload) );
 rReq.AppendItem( SfxBoolItem( SID_SILENT, true ));
 
 [[fallthrough]]; //TODO ???


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

2022-04-19 Thread Caolán McNamara (via logerrit)
 fpicker/source/office/autocmpledit.cxx |   25 -
 fpicker/source/office/autocmpledit.hxx |2 ++
 sfx2/source/appl/newhelp.cxx   |1 +
 3 files changed, 27 insertions(+), 1 deletion(-)

New commits:
commit b8485b4a4675b5ae2fcee9d44d986415a7165e64
Author: Caolán McNamara 
AuthorDate: Thu Apr 14 12:05:49 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Apr 19 15:28:31 2022 +0200

tdf#148101 don't autocomplete remote files dialog entry on delete/backspace

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

diff --git a/fpicker/source/office/autocmpledit.cxx 
b/fpicker/source/office/autocmpledit.cxx
index 5a31c7bdc501..89a2d0b0c245 100644
--- a/fpicker/source/office/autocmpledit.cxx
+++ b/fpicker/source/office/autocmpledit.cxx
@@ -7,21 +7,44 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include "autocmpledit.hxx"
 
 AutocompleteEdit::AutocompleteEdit(std::unique_ptr xEntry)
 : m_xEntry(std::move(xEntry))
 , m_aChangedIdle("fpicker::AutocompleteEdit m_aChangedIdle")
+, m_nLastCharCode(0)
 {
 m_xEntry->connect_changed(LINK(this, AutocompleteEdit, ChangedHdl));
+m_xEntry->connect_key_press(LINK(this, AutocompleteEdit, KeyInputHdl));
 
 m_aChangedIdle.SetInvokeHandler(LINK(this, AutocompleteEdit, 
TryAutoComplete));
 }
 
+IMPL_LINK(AutocompleteEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
+{
+m_nLastCharCode = rKEvt.GetKeyCode().GetCode();
+return false;
+}
+
 IMPL_LINK_NOARG(AutocompleteEdit, ChangedHdl, weld::Entry&, void)
 {
 m_aChangeHdl.Call(*m_xEntry);
-m_aChangedIdle.Start(); //launch this to happen on idle after cursor 
position will have been set
+
+switch (m_nLastCharCode)
+{
+case css::awt::Key::DELETE_WORD_BACKWARD:
+case css::awt::Key::DELETE_WORD_FORWARD:
+case css::awt::Key::DELETE_TO_BEGIN_OF_LINE:
+case css::awt::Key::DELETE_TO_END_OF_LINE:
+case KEY_BACKSPACE:
+case KEY_DELETE:
+m_aChangedIdle.Stop();
+break;
+default:
+m_aChangedIdle.Start(); //launch this to happen on idle after 
cursor position will have been set
+break;
+}
 }
 
 void AutocompleteEdit::AddEntry( const OUString& rEntry )
diff --git a/fpicker/source/office/autocmpledit.hxx 
b/fpicker/source/office/autocmpledit.hxx
index bfb2ee096a63..3eb79eb14aa6 100644
--- a/fpicker/source/office/autocmpledit.hxx
+++ b/fpicker/source/office/autocmpledit.hxx
@@ -22,7 +22,9 @@ private:
 std::vector m_aMatching;
 Idle m_aChangedIdle;
 Link m_aChangeHdl;
+sal_uInt16 m_nLastCharCode;
 
+DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
 DECL_LINK(ChangedHdl, weld::Entry&, void);
 DECL_LINK(TryAutoComplete, Timer*, void);
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 9312a83ccd04..b3b7483bb29a 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -475,6 +475,7 @@ IMPL_LINK_NOARG(IndexTabPage_Impl, EntryChangeHdl, 
weld::Entry&, void)
 case css::awt::Key::DELETE_TO_END_OF_LINE:
 case KEY_BACKSPACE:
 case KEY_DELETE:
+aAutoCompleteIdle.Stop();
 break;
 default:
 aAutoCompleteIdle.Start();


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

2022-04-19 Thread Tor Lillqvist (via logerrit)
 desktop/source/lib/init.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 37916a87204560f3bccbf9495b01c5d9295f1f11
Author: Tor Lillqvist 
AuthorDate: Tue Apr 19 16:40:11 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Apr 19 16:39:41 2022 +0200

Fix regression in the iOS app (and possibly the Android and GTK apps)

The problem was caused by my remote font downloading changes. We need
to be more careful in lo_initialize() and libreofficekit_hook_2() to
distinguish whether the code is called from "normal" Online (with
"pre-initialisation" through lok_preinit_2()) or otherwise, for
instance the iOS app, where not pre-initialisation is done.

Sadly, this fix makes state handling in init.c even more complex with
one more static Boolean flag.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 392441079820..58236658c08a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -198,6 +198,7 @@ using namespace desktop;
 using namespace utl;
 
 static LibLibreOffice_Impl *gImpl = nullptr;
+static bool lok_preinit_2_called = false;
 static std::weak_ptr< LibreOfficeKitClass > gOfficeClass;
 static std::weak_ptr< LibreOfficeKitDocumentClass > gDocumentClass;
 
@@ -6537,8 +6538,11 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 if (pThis == nullptr)
 {
 eStage = PRE_INIT;
-SAL_INFO("lok", "Create libreoffice object");
-gImpl = new LibLibreOffice_Impl();
+if (lok_preinit_2_called)
+{
+SAL_INFO("lok", "Create libreoffice object");
+gImpl = new LibLibreOffice_Impl();
+}
 }
 else if (bPreInited)
 eStage = SECOND_INIT;
@@ -6828,10 +6832,16 @@ LibreOfficeKit *libreofficekit_hook_2(const char* 
install_path, const char* user
 {
 static bool alreadyCalled = false;
 
-if (!alreadyCalled)
+if ((!lok_preinit_2_called && !gImpl) || (lok_preinit_2_called && 
!alreadyCalled))
 {
 alreadyCalled = true;
 
+if (!lok_preinit_2_called)
+{
+SAL_INFO("lok", "Create libreoffice object");
+gImpl = new LibLibreOffice_Impl();
+}
+
 if (!lo_initialize(gImpl, install_path, user_profile_url))
 {
 lo_destroy(gImpl);
@@ -6855,6 +6865,7 @@ int lok_preinit(const char* install_path, const char* 
user_profile_url)
 SAL_JNI_EXPORT
 int lok_preinit_2(const char* install_path, const char* user_profile_url, 
LibLibreOffice_Impl** kit)
 {
+lok_preinit_2_called = true;
 int result = lo_initialize(nullptr, install_path, user_profile_url);
 if (kit != nullptr)
 *kit = gImpl;


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

2022-04-19 Thread Hannah Meeks (via logerrit)
 cui/qa/uitest/dialogs/chardlg.py|4 ++--
 sc/qa/uitest/calc_tests3/insertQrCodeGen.py |2 +-
 sc/qa/uitest/calc_tests4/exportToPDF.py |6 +++---
 sc/qa/uitest/calc_tests8/tdf144940.py   |4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 182833b893ae4ad7430479f2dfebcc9c130cf27c
Author: Hannah Meeks 
AuthorDate: Sat Apr 16 18:07:54 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Apr 19 17:12:30 2022 +0200

tdf#97361 - make unit tests more pythonic.

Change-Id: I853cda76522ebf3c9a8f7389d5b2b6fc9611f502
Signed-off-by: Hannah Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133136
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py
index 21a1582567a0..c52664f36d0e 100644
--- a/cui/qa/uitest/dialogs/chardlg.py
+++ b/cui/qa/uitest/dialogs/chardlg.py
@@ -35,8 +35,8 @@ class Test(UITestCase):
 xFontTransparency.executeAction("UP", tuple())
 
 # Verify the result.
-drawPage = component.getDrawPages().getByIndex(0)
-shape = drawPage.getByIndex(0)
+drawPage = component.getDrawPages()[0]
+shape = drawPage[0]
 
 # Without the accompanying fix in place, this test would have 
failed with:
 # AssertionError: 100 != 5
diff --git a/sc/qa/uitest/calc_tests3/insertQrCodeGen.py 
b/sc/qa/uitest/calc_tests3/insertQrCodeGen.py
index 2594b66c2dea..7337962c23ba 100644
--- a/sc/qa/uitest/calc_tests3/insertQrCodeGen.py
+++ b/sc/qa/uitest/calc_tests3/insertQrCodeGen.py
@@ -30,7 +30,7 @@ class insertQrCode(UITestCase):
 xBorder.executeAction("DOWN", tuple())
 
 # check the QR code in the document
-element = document.Sheets.getByIndex(0).DrawPage.getByIndex(0)
+element = document.Sheets[0].DrawPage[0]
 self.assertEqual(element.BarCodeProperties.Payload, 
"www.libreoffice.org")
 self.assertEqual(element.BarCodeProperties.ErrorCorrection, 1)
 self.assertEqual(element.BarCodeProperties.Border, 1)
diff --git a/sc/qa/uitest/calc_tests4/exportToPDF.py 
b/sc/qa/uitest/calc_tests4/exportToPDF.py
index 3cf589bbb9c3..565a5337e9ee 100644
--- a/sc/qa/uitest/calc_tests4/exportToPDF.py
+++ b/sc/qa/uitest/calc_tests4/exportToPDF.py
@@ -71,8 +71,8 @@ class exportToPDF(UITestCase):
 
 with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
 
-self.assertEqual("Sheet1", 
document.DrawPages[0].getByIndex(0).String)
-self.assertEqual("Page 1", 
document.DrawPages[0].getByIndex(1).String)
-self.assertEqual("Hello World", 
document.DrawPages[0].getByIndex(2).String)
+self.assertEqual("Sheet1", document.DrawPages[0][0].String)
+self.assertEqual("Page 1", document.DrawPages[0][1].String)
+self.assertEqual("Hello World", 
document.DrawPages[0][2].String)
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/calc_tests8/tdf144940.py 
b/sc/qa/uitest/calc_tests8/tdf144940.py
index b117b56d2a9b..ab47384311ad 100644
--- a/sc/qa/uitest/calc_tests8/tdf144940.py
+++ b/sc/qa/uitest/calc_tests8/tdf144940.py
@@ -50,8 +50,8 @@ class tdf144940(UITestCase):
 
 with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
 
-xPageStyles = document.StyleFamilies.getByIndex(1)
-xDefaultPageStyle = xPageStyles.getByIndex(0)
+xPageStyles = document.StyleFamilies[1]
+xDefaultPageStyle = xPageStyles[0]
 
 # Without the fix in place, this test would have failed with
 # AssertionError: False is not true


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

2022-04-19 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |3 +
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx   |   21 ++
 sc/inc/chart2uno.hxx  |4 +
 sc/source/ui/unoobj/chart2uno.cxx |   21 +++---
 4 files changed, 36 insertions(+), 13 deletions(-)

New commits:
commit fd2ca9607431fc6ca49e37ab6fef228aa72da5f9
Author: Noel Grandin 
AuthorDate: Tue Apr 19 14:24:46 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 19 18:13:10 2022 +0200

tdf#148635 cache some chart stuff

cache some intermediate stuff that it does a handful of times when
finishing a chart - halves the time taken

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

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 4327297360d4..9c7a2b5342f7 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1118,7 +1118,8 @@ public:
 
 private: //member
 std::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
-mutable Any m_aOuterValue;
+mutable Any m_aOuterValue;
+mutable boolm_bDetectedRangeSegmentation { 
false };
 };
 
 }
@@ -1172,15 +1173,19 @@ Any WrappedDataRowSourceProperty::getPropertyValue( 
const Reference< beans::XPro
 bool bHasCategories = true;
 uno::Sequence< sal_Int32 > aSequenceMapping;
 
-if( DataSourceHelper::detectRangeSegmentation(
-m_spChart2ModelContact->getDocumentModel(), aRangeString, 
aSequenceMapping, bUseColumns
-, bFirstCellAsLabel, bHasCategories ) )
+if (!m_bDetectedRangeSegmentation)
 {
-css::chart::ChartDataRowSource eChartDataRowSource = 
css::chart::ChartDataRowSource_ROWS;
-if(bUseColumns)
-eChartDataRowSource = css::chart::ChartDataRowSource_COLUMNS;
+if( DataSourceHelper::detectRangeSegmentation(
+m_spChart2ModelContact->getDocumentModel(), aRangeString, 
aSequenceMapping, bUseColumns
+, bFirstCellAsLabel, bHasCategories ) )
+{
+css::chart::ChartDataRowSource eChartDataRowSource = 
css::chart::ChartDataRowSource_ROWS;
+if(bUseColumns)
+eChartDataRowSource = css::chart::ChartDataRowSource_COLUMNS;
 
-m_aOuterValue <<= eChartDataRowSource;
+m_aOuterValue <<= eChartDataRowSource;
+}
+m_bDetectedRangeSegmentation = true;
 }
 
 return m_aOuterValue;
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index a5e4f53b032f..72a6374be739 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -147,6 +147,10 @@ private:
 ScDocument* m_pDocument;
 SfxItemPropertySet  m_aPropSet;
 boolm_bIncludeHiddenCells;
+css::uno::Reference< css::chart2::data::XDataSource > mxCachedDataSource;
+css::uno::Sequence< css::beans::PropertyValue > maCachedArguments;
+css::uno::Sequence< css::beans::PropertyValue > 
maCreateDataSourceArguments;
+css::uno::Reference< css::chart2::data::XDataSource > mxCreatedDataSource;
 };
 
 // DataSource
diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index adc244bacc78..9ca2e73bd4ec 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1403,7 +1403,11 @@ ScChart2DataProvider::createDataSource(
 if ( ! m_pDocument )
 throw uno::RuntimeException();
 
-uno::Reference< chart2::data::XDataSource> xResult;
+// This is expensive to compute and we get called more than once, so cache
+if (maCreateDataSourceArguments == aArguments)
+return mxCreatedDataSource;
+maCreateDataSourceArguments = aArguments;
+
 bool bLabel = true;
 bool bCategories = false;
 bool bOrientCol = true;
@@ -1490,7 +1494,7 @@ ScChart2DataProvider::createDataSource(
 const Chart2PositionMap* pChartMap = aChPositioner.getPositionMap();
 if (!pChartMap)
 // No chart position map instance.  Bail out.
-return xResult;
+return mxCreatedDataSource;
 
 rtl::Reference pDS;
 ::std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aSeqs;
@@ -1568,8 +1572,8 @@ ScChart2DataProvider::createDataSource(
 }
 }
 
-xResult.set( pDS );
-return xResult;
+mxCreatedDataSource.set(pDS);
+return mxCreatedDataSource;
 }
 
 namespace
@@ -1761,6 +1765,10 @@ std::pair constructKey(const 
uno::Reference< chart2::data::X
 uno::Sequence< beans::PropertyValue > SAL_CALL 
ScChart2DataProvider::detectArguments(
 const uno::Reference< chart2::data::XD

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

2022-04-19 Thread Seth Chaiklin (via logerrit)
 source/text/shared/02/0605.xhp  |   13 ++---
 source/text/shared/02/0606.xhp  |   12 +---
 source/text/shared/02/0610.xhp  |   24 +---
 source/text/shared/02/0611.xhp  |   23 +--
 source/text/swriter/02/0607.xhp |   22 +-
 source/text/swriter/02/0608.xhp |   22 +-
 source/text/swriter/02/0612.xhp |   19 ++-
 source/text/swriter/02/0613.xhp |   20 ++--
 source/text/swriter/main0206.xhp|   20 ++--
 9 files changed, 85 insertions(+), 90 deletions(-)

New commits:
commit 000df5aded9b5cbe2488dc2e9c9406c6b56767c5
Author: Seth Chaiklin 
AuthorDate: Thu Apr 14 03:57:09 2022 +0100
Commit: Seth Chaiklin 
CommitDate: Tue Apr 19 18:21:32 2022 +0200

Related:tdf#147107;tdf#144493 update B&N bar command names and explanations

   tdf#144493 (008cfd5980f31c9e01b5cdbede33631d66f2fb56) changed command
   names that are found in the Bullets and Numbering toolbar (and menus
   in Writer, Draw, Impress).

   tdf#147107 (3b222bcd75d57db404cd2ed5dc97a5c492c28060) made
   adjustments to some of the command names changed for tdf#144493.

   This patch addresses the consequences of these name changes for the
   Bullet and Numbering toolbar in Writer, where the changed commands
   also appear in the Format menu UI. Meanwhile, some of the help pages
   for the changed commands are shared with Draw and Impress, so any
   help file that needed to be changed for Writer was also updated for
   Draw and Impress. In addition to updating the changes in the command
   names, the descriptions of the commands were evaluated and corrected
   when necessary.

   text/swriter/main0206.xhp (B&N Bar)
 *reorder controls on help page to correspond to order on toolbar

   text/shared/02/0610.xhp (Move Item Up)
 + appl-inline switch for  and icon name to distinguish
Writer from the other modules
 * adjustments and corrections in descriptions
 + add appl-switch for mentioning toolbar and shortcut keys
 + add link to relevant toolbar
 * correction in command sequence for shortcut keys for Writer
 and Impress.
 * refactor to ,

   text/shared/02/0611.xhp (Move Item Down)
 + appl-inline switch for  and icon name to distinguish
Writer from the other modules
 * adjustments and corrections in descriptions
 + add appl-switch for mentioning toolbar and shortcut keys
 + add link to relevant toolbar
 * correction in command sequence for shortcut keys for Writer
 and Impress.
 * refactor to ,

   text/shared/02/0612.xhp (Move Item Up with Subpoints)
 * correct the description, with separate explanations for
   list paragraphs and chapter headings, and mention of
   multiple selection.
 * update command name
 * change .png to .svg

   text/shared/02/0613.xhp (Move Item Down with Subpoints)
 * correct the description, with separate explanations for
   list paragraphs and chapter headings, and mention of
   multiple selection.
 * update command name
 * change .png to .svg

text/shared/02/0605.xhp (Demote Outline Level)
 * simplify the appl-inline switch for 
 * correct the description
 + add separate explanations for chapter headings
 and list paragraphs for Writer
 + add link to B&N toolbar
 + add shortcut key info for Impress
 * refactor to 

text/shared/02/0606.xhp (Promote Outline Level)
 * simplify the appl-inline switch for 
 * correct the description
 + add separate explanations for chapter headings
 and list paragraphs for Writer
 + add link to B&N toolbar
 + add shortcut key info for Impress
 * refactor to 

text/swriter/02/0607.xhp (Demote Outline Level with Subpoints)
 * correct the description
 * update command and icon name
 * refactor to 
 * change .png to .svg
 * change icon size to 1cm
 - remove 

text/swriter/02/0608.xhp (Promote Outline Level with Subpoints)
 * correct the description
 * update command and icon name
 * refactor to 
 * change .png to .svg
 * change icon size to 1cm
 - remove 

Change-Id: Iaedfebe4f260658bb1f5821ef279846eba22415a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132870
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/source/text/shared/02/0605.xhp 
b/source/text/shared/02/0605.xhp
index 8fc483a77..70941518a 100644
--- a/source/text/shared/02/0605.xhp
+++ b/sourc

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit f393785a146433cccd5bbecf1e49b5f1485ec5a7
Author: Seth Chaiklin 
AuthorDate: Tue Apr 19 17:21:34 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Apr 19 18:21:34 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 000df5aded9b5cbe2488dc2e9c9406c6b56767c5
  - Related:tdf#147107;tdf#144493 update B&N bar command names and 
explanations

   tdf#144493 (008cfd5980f31c9e01b5cdbede33631d66f2fb56) changed command
   names that are found in the Bullets and Numbering toolbar (and menus
   in Writer, Draw, Impress).

   tdf#147107 (3b222bcd75d57db404cd2ed5dc97a5c492c28060) made
   adjustments to some of the command names changed for tdf#144493.

   This patch addresses the consequences of these name changes for the
   Bullet and Numbering toolbar in Writer, where the changed commands
   also appear in the Format menu UI. Meanwhile, some of the help pages
   for the changed commands are shared with Draw and Impress, so any
   help file that needed to be changed for Writer was also updated for
   Draw and Impress. In addition to updating the changes in the command
   names, the descriptions of the commands were evaluated and corrected
   when necessary.

   text/swriter/main0206.xhp (B&N Bar)
 *reorder controls on help page to correspond to order on toolbar

   text/shared/02/0610.xhp (Move Item Up)
 + appl-inline switch for  and icon name to distinguish
Writer from the other modules
 * adjustments and corrections in descriptions
 + add appl-switch for mentioning toolbar and shortcut keys
 + add link to relevant toolbar
 * correction in command sequence for shortcut keys for Writer
 and Impress.
 * refactor to ,

   text/shared/02/0611.xhp (Move Item Down)
 + appl-inline switch for  and icon name to distinguish
Writer from the other modules
 * adjustments and corrections in descriptions
 + add appl-switch for mentioning toolbar and shortcut keys
 + add link to relevant toolbar
 * correction in command sequence for shortcut keys for Writer
 and Impress.
 * refactor to ,

   text/shared/02/0612.xhp (Move Item Up with Subpoints)
 * correct the description, with separate explanations for
   list paragraphs and chapter headings, and mention of
   multiple selection.
 * update command name
 * change .png to .svg

   text/shared/02/0613.xhp (Move Item Down with Subpoints)
 * correct the description, with separate explanations for
   list paragraphs and chapter headings, and mention of
   multiple selection.
 * update command name
 * change .png to .svg

text/shared/02/0605.xhp (Demote Outline Level)
 * simplify the appl-inline switch for 
 * correct the description
 + add separate explanations for chapter headings
 and list paragraphs for Writer
 + add link to B&N toolbar
 + add shortcut key info for Impress
 * refactor to 

text/shared/02/0606.xhp (Promote Outline Level)
 * simplify the appl-inline switch for 
 * correct the description
 + add separate explanations for chapter headings
 and list paragraphs for Writer
 + add link to B&N toolbar
 + add shortcut key info for Impress
 * refactor to 

text/swriter/02/0607.xhp (Demote Outline Level with Subpoints)
 * correct the description
 * update command and icon name
 * refactor to 
 * change .png to .svg
 * change icon size to 1cm
 - remove 

text/swriter/02/0608.xhp (Promote Outline Level with Subpoints)
 * correct the description
 * update command and icon name
 * refactor to 
 * change .png to .svg
 * change icon size to 1cm
 - remove 

Change-Id: Iaedfebe4f260658bb1f5821ef279846eba22415a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132870
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/helpcontent2 b/helpcontent2
index 5bab8a2d2530..000df5aded9b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5bab8a2d2530d7487064a2560c440269018a56b9
+Subproject commit 000df5aded9b5cbe2488dc2e9c9406c6b56767c5


[Libreoffice-commits] core.git: 2 commits - basctl/source chart2/source compilerplugins/clang desktop/source filter/source oox/source sc/source sfx2/source solenv/CompilerTest_compilerplugins_clang.mk

2022-04-19 Thread Stephan Bergmann (via logerrit)
 basctl/source/basicide/localizationmgr.cxx   |6 
 chart2/source/controller/accessibility/AccessibleBase.cxx|2 
 chart2/source/controller/main/ChartController_Properties.cxx |2 
 chart2/source/controller/main/ChartController_Window.cxx |4 
 chart2/source/controller/main/DragMethod_PieSegment.cxx  |2 
 chart2/source/tools/ObjectIdentifier.cxx |   16 
 compilerplugins/clang/stringviewvar.cxx  |  406 +++
 compilerplugins/clang/test/stringviewvar.cxx |   65 +
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx  |1 
 desktop/source/deployment/misc/dp_platform.cxx   |8 
 desktop/source/lib/init.cxx  |   18 
 desktop/source/migration/migration.cxx   |4 
 filter/source/xsltdialog/typedetectionimport.cxx |   10 
 oox/source/dump/pptxdumper.cxx   |   37 -
 sc/source/core/tool/dbdata.cxx   |6 
 sfx2/source/sidebar/ResourceManager.cxx  |6 
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 svgio/source/svgreader/svgtextpathnode.cxx   |4 
 sw/source/core/graphic/ndgrf.cxx |4 
 sw/source/filter/html/swhtml.cxx |2 
 sw/source/filter/ww8/docxattributeoutput.cxx |2 
 vcl/source/font/FeatureParser.cxx|   11 
 xmloff/source/chart/SchXMLTools.cxx  |5 
 23 files changed, 549 insertions(+), 73 deletions(-)

New commits:
commit 441e32d9555f410a0a2df995a70f9958cf2b0f1d
Author: Stephan Bergmann 
AuthorDate: Tue Apr 19 16:45:02 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 19 18:31:24 2022 +0200

Fix heap-use-after-free

...when dp_gui::ExtensionRemovedListener::disposing
(desktop/source/deployment/gui/dp_gui_extlistbox.cxx) calls

> m_pParent->removeEntry( xPackage );

on an already destroyed m_pParent in e.g. the following scenario:  In an
installation with some bundled extensions (e.g., --enable-ext-ct2n), "Tools 
-
Extension Manager...", deselect "Display Extensions - Bundled with 
LibreOffice",
"Close", "File - Exit LibreOffice".

It appears the issue was present ever since at least
051f7b163fa4bf1917fb3db98fed2a6a932a827e "jl152#i77196# Use ExtensionManager
instead of PackageManager"

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

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index f66c016ea6a7..3b96147bbf02 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -1106,6 +1106,7 @@ void ExtensionBox_Impl::checkEntries()
 m_bHasActive = false;
 }
 m_vRemovedEntries.push_back(*iIndex);
+
(*iIndex)->m_xPackage->removeEventListener(m_xRemoveListener);
 iIndex = m_vEntries.erase(iIndex);
 }
 }
commit ab699bfdb3375f7142a50cc35322e2924c9e5945
Author: Noel Grandin 
AuthorDate: Fri Apr 15 12:25:12 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 19 18:31:10 2022 +0200

new loplugin:stringviewvar looks for OUString vars that can be

... that can be string_view

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

diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index 6dd07a021d32..279fd7555801 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -975,7 +975,7 @@ void LocalizationMgr::resetResourceForDialog( const 
Reference< container::XNameC
 return;
 
 // Dialog as control
-OUString aDummyName;
+std::u16string_view aDummyName;
 Any aDialogCtrl;
 aDialogCtrl <<= xDialogModel;
 Reference< XStringResourceResolver > xDummyStringResolver;
@@ -1002,7 +1002,7 @@ void LocalizationMgr::setResourceIDsForDialog( const 
Reference< container::XName
 return;
 
 // Dialog as control
-OUString aDummyName;
+std::u16string_view aDummyName;
 Any aDialogCtrl;
 aDialogCtrl <<= xDialogModel;
 Reference< XStringResourceResolver > xDummyStringResolver;
@@ -1084,7 +1084,7 @@ void LocalizationMgr::copyResourceForDialog(
 if( !xDialogModel.is() || !xSourceStringResolver.is() || 
!xTargetStringResourceManager.is() )
 return;
 
-OUString aDummyName;
+std::u16string_view a

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

2022-04-19 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/webdavresponseparser.cxx |   22 ++--
 1 file changed, 20 insertions(+), 2 deletions(-)

New commits:
commit 68f41f4e2dcec65e8885cdfa658c0568a26182a9
Author: Michael Stahl 
AuthorDate: Tue Apr 19 17:34:52 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 19 19:02:13 2022 +0200

ucb: webdav-curl: fix getting DAV:lockdiscovery property

commit b4576f3da4d90139fc5140962d13cb91dab98797 "tdf#82744: fix WebDAV
lock/unlock behaviour - part 3" added a call to get the
DAV:lockdiscovery property.

But WebDAVResponseParser puts lock related properties into a separate
return value maResult_Lock that is only returned for LOCK requests.

Just add it as a normal property too, then PROPFIND can get it, and
the dialog in SfxMedium::LockOrigFileOnDemand() no longer displays
"Unknown user".

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

diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx 
b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
index 41f9a8232748..b2ec174688e4 100644
--- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
@@ -22,11 +22,13 @@
 #include "DAVProperties.hxx"
 #include "UCBDeadPropertyValue.hxx"
 
-#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -76,6 +78,7 @@ namespace
 {
 WebDAVName_unknown = 0,
 WebDAVName_activelock,
+WebDAVName_lockdiscovery,
 WebDAVName_multistatus,
 WebDAVName_response,
 WebDAVName_href,
@@ -115,6 +118,7 @@ namespace
 if(aWebDAVNameMapperList.empty())
 {
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("activelock"), 
WebDAVName_activelock));
+
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockdiscovery"), 
WebDAVName_lockdiscovery));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("multistatus"), 
WebDAVName_multistatus));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("response"), 
WebDAVName_response));
 aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("href"), 
WebDAVName_href));
@@ -752,6 +756,20 @@ namespace
 maResult_Lock.push_back(maLock);
 break;
 }
+case WebDAVName_lockdiscovery:
+{
+// lockdiscovery may be requested via PROPFIND,
+// in addition to LOCK! so return it 2 ways
+if (isCollectingProperties())
+{
+http_dav_ucp::DAVPropertyValue 
aDAVPropertyValue;
+
+aDAVPropertyValue.Name = 
"DAV:lockdiscovery";
+aDAVPropertyValue.Value <<= 
::comphelper::containerToSequence(maResult_Lock);
+
maPropStatProperties.push_back(aDAVPropertyValue);
+}
+break;
+}
 case WebDAVName_propstat:
 {
 // propstat end, check status


[Libreoffice-commits] core.git: ucb/Library_ucpdav1.mk ucb/source

2022-04-19 Thread Michael Stahl (via logerrit)
 ucb/Library_ucpdav1.mk   |1 +
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 70bea73ffbe815c2d5b7067f20d3eebbb98df61f
Author: Michael Stahl 
AuthorDate: Tue Apr 19 18:01:37 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 19 19:55:22 2022 +0200

ucb: webdav-curl: put user name from config into LOCK request

... so that the dialog in SfxMedium::LockOrigFileOnDemand() can show
something more useful than hard-coded URL, which has been used since
commit 99bdd887a6141883878978bad9beb35e7b326cd1 in 2009 when locking
was added.

This is half of the user info that is put into LO's own lock files
(see svt::LockFileCommon::GenerateOwnEntry()).

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

diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index b3c9a2342d6e..be8205baed8a 100644
--- a/ucb/Library_ucpdav1.mk
+++ b/ucb/Library_ucpdav1.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
cppuhelper \
sal \
salhelper \
+   svl \
ucbhelper \
tl \
 ))
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 8528f31fa263..a8d7ef233030 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -3235,8 +3236,7 @@ void Content::lock(
 }
 
 uno::Any aOwnerAny;
-aOwnerAny
-<<= OUString("LibreOffice - http://www.libreoffice.org/";);
+aOwnerAny <<= OUString("LibreOffice - " + 
::svt::LockFileCommon::GetOOOUserName());
 
 ucb::Lock aLock(
 ucb::LockScope_EXCLUSIVE,


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

2022-04-19 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |  113 +++--
 1 file changed, 73 insertions(+), 40 deletions(-)

New commits:
commit c7ed23137f7601833793ea8c27e1c601b6d19290
Author: Jim Raykowski 
AuthorDate: Sat Apr 16 19:38:07 2022 -0800
Commit: Jim Raykowski 
CommitDate: Tue Apr 19 20:52:29 2022 +0200

SwNavigator: List fields content type members in document order

Currently all Fields content type members may not be listed in the
order of document appearance. This happens because the sort is done
using *only* the document model position of the text node (paragraph)
the field is in. Fields in the same text node (parargraph) have the
same sort value which results in an alphabetical sort of these. This
patch uses both the document model text node index and start position
of the field in the text node text to make the fields content type
members list in the order of document appearance. This method is
already used to sort Hyperlinks content type members in the order of
document appearance.

Change-Id: I05f5ad0699764a265b5320047b67e7f418b7fa99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133101
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 02b07633f531..6321c9b7db41 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -301,6 +301,25 @@ sal_Int32 getYPos(const SwNodeIndex& rNodeIndex)
 }
 return sal_Int32(nIndex);
 }
+// Gets the content node used to sort content members in Navigator's content 
types having a
+// specific start position
+SwContentNode* getContentNode(const SwNode& rNode)
+{
+if (rNode.GetNodes().GetEndOfExtras().GetIndex() >= rNode.GetIndex())
+{
+// Not a node of BodyText
+// Are we in a fly?
+if (const auto pFlyFormat = rNode.GetFlyFormat())
+{
+// Get node index of anchor
+if (auto pSwPosition = pFlyFormat->GetAnchor().GetContentAnchor())
+{
+return getContentNode(pSwPosition->nNode.GetNode());
+}
+}
+}
+return const_cast(rNode.GetContentNode());
+}
 } // end of anonymous namespace
 
 SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, 
sal_uInt8 nLevel) :
@@ -575,6 +594,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 break;
 case ContentTypeId::TEXTFIELD:
 {
+std::vector aArr;
 const SwFieldTypes& rFieldTypes =
 
*m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
 const size_t nSize = rFieldTypes.size();
@@ -585,56 +605,69 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 continue;
 std::vector vFields;
 pFieldType->GatherFields(vFields);
-std::vector aSubTypesList;
-if (pFieldType->Which() == SwFieldIds::DocStat && 
!vFields.empty())
-{
-
SwFieldMgr(m_pWrtShell).GetSubTypes(SwFieldTypesEnum::DocumentStatistics,
-aSubTypesList);
-}
 for (SwFormatField* pFormatField: vFields)
 {
 if (SwTextField* pTextField = pFormatField->GetTextField())
 {
-const SwField* pField = pFormatField->GetField();
 // fields in header footer don't behave well, skip them
 if 
(m_pWrtShell->GetDoc()->IsInHeaderFooter(pTextField->GetTextNode()))
 continue;
-OUString sExpandField = pField->ExpandField(true, 
m_pWrtShell->GetLayout());
-if (!sExpandField.isEmpty())
-sExpandField = u" - " + sExpandField;
-OUString sText;
-if (pField->GetTypeId() == 
SwFieldTypesEnum::DocumentStatistics)
-{
-OUString sSubType;
-if (pField->GetSubType() < aSubTypesList.size())
-sSubType = u" - " + 
aSubTypesList[pField->GetSubType()];
-sText = pField->GetDescription() + u" - " + 
pField->GetFieldName()
-+ sSubType + sExpandField;
-}
-else if (pField->GetTypeId() == 
SwFieldTypesEnum::GetRef)
-{
-OUString sFieldSubTypeOrName;
-auto nSubType = pField->GetSubType();
-if (nSubType == REF_FOOTNOTE)
-sFieldSubTypeOrName = 
SwResId(STR_FLDREF_FOOTNOTE);
-else if (nSubType == REF

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

2022-04-19 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx |4 
 sw/source/filter/ww8/wrtw8nds.cxx  |2 ++
 2 files changed, 6 insertions(+)

New commits:
commit 76de78c338fd508c21289ff2edab80fc4f5d8c23
Author: Justin Luth 
AuthorDate: Tue Apr 19 15:29:14 2022 +0200
Commit: Justin Luth 
CommitDate: Tue Apr 19 21:05:27 2022 +0200

tdf#148565 sw ms export: a new run can't be postponed-started

This fixes a LO 7.4 regression from
commit 46b62fc6acdc2c94dc4b2ab79d38a10c49f9.

A make check with an assert indicated the following
existing unit tests matched - but they had no noticable
char run content to test against.
ooxmlexport6's testShapeThemePreservation
ooxmlexport7's testBnc884615
ooxmlexport9's testTdf90789
ooxmlexport10's testTdf90153
ooxmlexport11's testTdf137655
ooxmlexport14's testTdf131539
ooxmlexport15's testTdf138739
ooxmlexport17's testTdf126287

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 1a9bddbfbd67..d5cc153b7a7d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -9,6 +9,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -268,6 +269,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138739, "tdf138739.docx")
 uno::Reference xParaProps(getParagraph(1), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Font type name does not match!", 
OUString("Comic Sans MS"),
  
xParaProps->getPropertyValue("CharFontName").get());
+
+// tdf#148565: text at anchor point should be bold, Comic Sanc MS font
+CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, 
getProperty(getRun(getParagraph(5), 3), "CharWeight"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf123390, "tdf123390.fodt")
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 1a600e33e799..dbbe0d67fc9d 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2772,6 +2772,8 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
 if (FLY_PROCESSED == nStateOfFlyFrame || FLY_NONE == 
nStateOfFlyFrame)
 {
 AttrOutput().EndRun(&rNode, nCurrentPos, 
/*bLastRun=*/false);
+if (!aSavedSnippet.isEmpty())
+bStartedPostponedRunProperties = false;
 
 AttrOutput().StartRun( pRedlineData, nCurrentPos, 
bSingleEmptyRun );
 AttrOutput().SetAnchorIsLinkedToNode( false );


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

2022-04-19 Thread Xisco Fauli (via logerrit)
 sd/qa/uitest/impress_tests/tdf148620.py |   77 
 1 file changed, 77 insertions(+)

New commits:
commit e9dbbf0f184e4f742d5f0e1a6bc9adcd9d765739
Author: Xisco Fauli 
AuthorDate: Tue Apr 19 16:25:14 2022 +0200
Commit: Xisco Fauli 
CommitDate: Tue Apr 19 22:14:06 2022 +0200

tdf#148620: sd: add UItest

I tried to implement this test as a CppUnittest but
'.uno:OutlineUp' and '.uno:OutlineDown' do nothing there

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

diff --git a/sd/qa/uitest/impress_tests/tdf148620.py 
b/sd/qa/uitest/impress_tests/tdf148620.py
new file mode 100644
index ..a703d722d8dd
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf148620.py
@@ -0,0 +1,77 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+
+class Tdf148620(UITestCase):
+
+def test_Tdf148620(self):
+with self.ui_test.create_doc_in_start_center("impress") as document:
+
+xTemplateDlg = self.xUITest.getTopFocusWindow()
+xCancelBtn = xTemplateDlg.getChild("close")
+self.ui_test.close_dialog_through_button(xCancelBtn)
+
+xDoc = self.xUITest.getTopFocusWindow()
+xEditWin = xDoc.getChild("impress_win")
+
+xEditWin.executeAction("SELECT", 
mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
+self.assertEqual("com.sun.star.drawing.SvxShapeCollection", 
document.CurrentSelection.getImplementationName())
+
+xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"one"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"two"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"three"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"four"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"five"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"six"}))
+
+self.assertEqual("One\nTwo\nThree\nFour\nFive\nsix", 
document.DrawPages[0].getByIndex(1).String)
+
+xArgs = mkPropertyValues({"KeyModifier": 0})
+self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+self.assertEqual("One\nTwo\nThree\nFour\nsix\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+self.assertEqual("One\nTwo\nThree\nsix\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+self.assertEqual("One\nTwo\nsix\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+self.assertEqual("One\nsix\nTwo\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+self.assertEqual("six\nOne\nTwo\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+
+# Without the fix in place, this test would have failed with
+# AssertionError: 'One\nsix\nTwo\nThree\nFour\nFive' != 
'One\nTwo\nsix\nThree\nFour\nFive'
+self.assertEqual("One\nsix\nTwo\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+self.assertEqual("One\nTwo\nsix\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+self.assertEqual("One\nTwo\nThree\nsix\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
+
+self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+self.assertEqual("One\nTwo\nThree\nFour\nsix\nFive", 
docume

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

2022-04-19 Thread VaibhavMalik4187 (via logerrit)
 include/vcl/salnativewidgets.hxx  |   22 --
 vcl/inc/toolbarvalue.hxx  |   52 ++
 vcl/source/gdi/salgdilayout.cxx   |1 
 vcl/source/outdev/nativecontrols.cxx  |1 
 vcl/source/window/dockingarea.cxx |1 
 vcl/source/window/toolbox.cxx |1 
 vcl/win/gdi/salnativewidgets-luna.cxx |1 
 7 files changed, 57 insertions(+), 22 deletions(-)

New commits:
commit ed007423eb4b6d1560d81317b20f291d81bced28
Author: VaibhavMalik4187 
AuthorDate: Wed Apr 20 00:10:15 2022 +0200
Commit: Hossein 
CommitDate: Wed Apr 20 01:36:42 2022 +0200

tdf#97228 Move ToolbarValue class to separate include file

The ToolbarValue class defined in include/vcl/salnativewidgets.hxx
was used only by vcl. Therefore, it is now moved to a seperate include
file named toolbarvalue.hxx which is inside vcl/inc folder.

This header file only contains the definition of the the ToolbarValue
class. All the files that references the ToolbarValue class now
include toolbarvalue.hxx.

Change-Id: I78fe3ceb09892c5d3f720ee3d66111bdcdf48db2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131321
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 75c25d3f0fe0..057e05aac151 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -446,28 +446,6 @@ class SAL_DLLPUBLIC_RTTI SpinbuttonValue final : public 
ImplControlValue
 SpinbuttonValue & operator =(SpinbuttonValue &&) = delete; // due to 
ImplControlValue
 };
 
-/*  Toolbarvalue:
- *
- *  Value container for toolbars detailing the grip position
- */
-class ToolbarValue final : public ImplControlValue
-{
-public:
-ToolbarValue() : ImplControlValue( ControlType::Toolbar, 0 )
-{ mbIsTopDockingArea = false; }
-virtual ~ToolbarValue() override;
-virtual ToolbarValue* clone() const override;
-
-ToolbarValue(ToolbarValue const &) = default;
-ToolbarValue(ToolbarValue &&) = default;
-ToolbarValue & operator =(ToolbarValue const &) = delete; // due to 
ImplControlValue
-ToolbarValue & operator =(ToolbarValue &&) = delete; // due to 
ImplControlValue
-
-tools::Rectangle   maGripRect;
-boolmbIsTopDockingArea; // indicates that this is the top 
aligned dockingarea
-// adjacent to the menubar, only 
used on Windows
-};
-
 /*  MenubarValue:
  *
  *  Value container for menubars specifying height of adjacent docking area
diff --git a/vcl/inc/toolbarvalue.hxx b/vcl/inc/toolbarvalue.hxx
new file mode 100644
index ..b2c2d6dcb162
--- /dev/null
+++ b/vcl/inc/toolbarvalue.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   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_VCL_INC_TOOLBARVALUE_HXX
+#define INCLUDED_VCL_INC_TOOLBARVALUE_HXX
+
+#include 
+#include 
+
+/*  Toolbarvalue:
+ *
+ *  Value container for toolbars detailing the grip position
+ */
+class ToolbarValue final : public ImplControlValue
+{
+public:
+ToolbarValue()
+: ImplControlValue(ControlType::Toolbar, 0)
+{
+mbIsTopDockingArea = false;
+}
+virtual ~ToolbarValue() override;
+virtual ToolbarValue* clone() const override;
+ToolbarValue(ToolbarValue const&) = default;
+ToolbarValue(ToolbarValue&&) = default;
+ToolbarValue& operator=(ToolbarValue const&) = delete; // due to 
ImplControlValue
+ToolbarValue& operator=(ToolbarValue&&) = delete; // due to 
ImplControlValue
+tools::Rectangle maGripRect;
+// indicates that this is the top aligned dockingarea
+// adjacent to the menubar, only used on Windows
+bool mbIsTopDockingArea;
+};
+
+#endif // INCLUDED_VCL_INC_TOOLBARVALUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 34f54a8ce870..89f9d0321daf 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 

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

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/source/AndroidManifest.xml |6 +++---
 android/source/build.gradle|4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 258fd217a35444ed245528ccbabdef62869c0419
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 12:04:11 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:18:49 2022 +0200

android: Remove redundant label attribute from activities

Android Studio was showing an info/warning in the "Problems"
pane that this label is redundant, so remove it.
(The app name is used by default if nothing else is specified
anyway.)

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

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 409a56cb84ef..0af368c8460b 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -25,7 +25,6 @@
 
 
@@ -102,7 +101,6 @@
 
 
 
 
 
commit 2ab389b251744fa7f3f6b060c09746e59d87f3b1
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 10:33:27 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:18:36 2022 +0200

android: Update compileSdkVersion/targetSdkVersion to 31

Google Play now requires that apps target API level 30 or higher, and
compileSdkVersion/targetSdkVersion 31 is also needed to update
the com.google.android.material dependency to >= 1.5.0 [1].

Explicitly set the `android:exported="true"` attribute for activities
which is required when targeting Android 12 or newer; quoting from
the list of behavior changes for apps targeting Android 12 [1]:

> Safer component exporting
>
> If your app targets Android 12 or higher and contains activities,
> services, or broadcast receivers that use intent filters, you must
> explicitly declare the android:exported attribute for these app
> components.  Warning: If an activity, service, or broadcast receiver
> uses intent filters and doesn't have an explicitly-declared value for
> android:exported, your app can't be installed on a device that runs
> Android 12 or higher.
>
> If the app component includes the LAUNCHER category, set
> android:exported to true. In most other cases, set android:exported
> to false.
>
> The following code snippet shows an example of a service that
> contains an intent filter whose android:exported attribute is set to
> false:
>
>   android:exported="false">
> 
> 
> 
> 

The app worked fine in a quick test on an x86_64 AVD with API level 31.

[1] 
https://github.com/material-components/material-components-android/releases/tag/1.5.0-alpha03

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

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 43f790fca985..409a56cb84ef 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -27,7 +27,8 @@
 android:name=".LibreOfficeMainActivity"
 android:label="@string/app_name"
 
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|uiMode|screenSize|smallestScreenSize"
-android:windowSoftInputMode="adjustResize" >
+android:windowSoftInputMode="adjustResize"
+android:exported="true">
 
 
 
@@ -101,7 +102,8 @@
 
 
 
+android:label="@string/app_name"
+android:exported="true">
 
 
 
diff --git a/android/source/build.gradle b/android/source/build.gradle
index 7dc93e778a7c..6b7391d5e389 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -32,7 +32,7 @@ dependencies {
 }
 
 android {
-compileSdkVersion 28
+compileSdkVersion 31
 compileOptions {
 // silence some java-language features hints
 sourceCompatibility 6
@@ -53,7 +53,7 @@ android {
 }
 defaultConfig {
 minSdkVersion 16
-targetSdkVersion 28
+targetSdkVersion 31
 vectorDrawables.useSupportLibrary = true
 }
 buildTypes {


[Libreoffice-commits] core.git: android/Bootstrap config_host.mk.in configure.ac external/nss

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/Bootstrap/Makefile.shared   |5 +++--
 config_host.mk.in   |2 +-
 configure.ac|   24 
 external/nss/ExternalProject_nss.mk |2 +-
 4 files changed, 17 insertions(+), 16 deletions(-)

New commits:
commit 128de1949ff120ac925dbb06e398fa992fb295ba
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 15:18:49 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:19:03 2022 +0200

android: Use property instead of ANDROID_NDK_HOME env var

Write an `ndk.dir` property with the directory path to
`android/source/local.properties` instead, similar
to how it's done for `sdk.dir`.

Also, rename the `ANDROID_NDK_HOME` variable that's
assigned in configure.ac that holds the corresponding
value to `ANDROID_NDK_DIR`, because the gradle warning
still shows up if that environment variable is set in
addition to having an `ndk.dir` property in `local.properties`.

This makes the following gradle warning disappear:

> > Task :stripStrippedUIDebugDebugSymbols
> WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed 
in the future. Use android.ndkVersion in build.gradle instead.
> Support for ANDROID_NDK_HOME is deprecated and will be removed in the 
future. Use android.ndkVersion in build.gradle instead.

Note however, that with this approach of using the `ndk.dir`
property instead of the suggested `android.ndkVersion`
(with the latter having the stricter requirement that
the `ndk` dir would have to be a subdir of the SDK dir),
doing the actual upgrade to a newer Gradle (plugin) version
in follow-up commit
Change-Id Ia982d72d877e229c3006c6d528b830d16c88481f
"android: Update Android Gradle Plugin to 7.1.3"
revealed that the use of the `ndk.dir` property
is deprecated in newer Gradle (plugin) versions as well,
resulting in this warning.

> > Task :stripStrippedUIDebugDebugSymbols
> [CXX5106] NDK was located by using ndk.dir property. This method is
> deprecated and will be removed in a future release. Please delete
> ndk.dir from local.properties and set android.ndkVersion to
> [20.0.5594570] in all native modules in the project.
> https://developer.android.com/r/studio-ui/ndk-dir

It might make sense to address that in a follow-up step,
but for now, it's an improvement and keeps it working
after the upgrade without potentially causing any incompatibility
problems with existing autogen configurations,
while support for the `ANDROID_NDK_HOME` env var that was
used so far seems to have been dropped, resulting in

> > Task :stripStrippedUIDebugDebugSymbols
> Unable to strip the following libraries, packaging them as they are:
> libc++_shared.so, libfreebl3.so, liblo-native-code.so, libnspr4.so,
> libnss3.so, libnssckbi.so, libnssdbm3.so, libnssutil3.so,
> libplc4.so, libplds4.so, libsmime3.so, libsoftokn3.so,
> libsqlite3.so, libssl3.so.

instead if upgrading gradle without switching to the use of the property.

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

diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index f40693615f0a..18082ea30ea3 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -23,7 +23,8 @@ OBJLOCAL=$(BUILDDIR)/android/obj/local/$(ANDROID_APP_ABI)
 #
 
 local.properties: $(BUILDDIR)/config_host.mk
-   echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
+   echo ndk.dir=$(ANDROID_NDK_DIR) >local.properties
+   echo sdk.dir=$(ANDROID_SDK_HOME) >>local.properties
 
 #
 # Build / link the single .so for this app
@@ -71,7 +72,7 @@ $(SODEST)/nss-libraries :
mkdir -p $(SODEST)
$(foreach lib,$(NSSLIBS),$(STRIP) -o $(SODEST)/lib$(lib).so 
$(INSTDIR)/$(LIBO_LIB_FOLDER)/lib$(lib).so;)
 
-$(SODEST)/libc++_shared.so : 
$(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++/libs/$(ANDROID_APP_ABI)/libc++_shared.so
+$(SODEST)/libc++_shared.so : 
$(ANDROID_NDK_DIR)/sources/cxx-stl/llvm-libc++/libs/$(ANDROID_APP_ABI)/libc++_shared.so
mkdir -p $(SODEST)
cp $< $@
 
diff --git a/config_host.mk.in b/config_host.mk.in
index cc05b3448d0b..7552991e366b 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -15,7 +15,7 @@ export BUILDDIR=@BUILDDIR@
 @x_AFLAGS@ export AFLAGS=@AFLAGS@
 export ABW_CFLAGS=$(gb_SPACE)@ABW_CFLAGS@
 export ABW_LIBS=$(gb_SPACE)@ABW_LIBS@
-export ANDROID_NDK_HOME=@ANDROID_NDK_HOME@
+export ANDROID_NDK_DIR=@ANDROID_NDK_DIR@
 export ANDROID_APP_ABI=@ANDROID_APP_ABI@
 export ANDROID_SDK_HOME=@ANDROID_SDK_HOME@
 export ANDROID_PACKAGE_NAME=@ANDROID_PACKAGE_NAME@
diff --git a/configure.ac b/configure.ac
index e4fe7891ddf2..151a894537ee 100644
--- a/configure.ac
+++ b/c

[Libreoffice-commits] core.git: 2 commits - android/Bootstrap android/Makefile android/source config_host.mk.in configure.ac

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/Bootstrap/Makefile.shared   |4 +--
 android/Makefile|2 -
 android/source/Makefile |4 +--
 android/source/build.gradle |4 +--
 android/source/gradle/wrapper/gradle-wrapper.properties |2 -
 config_host.mk.in   |2 -
 configure.ac|   18 
 7 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 39326bc7d439170dd24c9d4b837c2cdb720b5d6f
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 15:49:53 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:19:36 2022 +0200

android: Update Android Gradle Plugin to 7.1.3

... and gradle to 7.2, which is what Android Studio suggested
and did automatically when confirming.

Also apply the following optional, but recommended change
while doing so:

> Migrate from lintOptions to lint
> Configuration related to lint is now performed using the lint block.

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

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 6b7391d5e389..47661f79c4cc 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -16,7 +16,7 @@ buildscript {
 google()
 }
 dependencies {
-classpath 'com.android.tools.build:gradle:3.6.1'
+classpath 'com.android.tools.build:gradle:7.1.3'
 }
 }
 
@@ -81,7 +81,7 @@ android {
 }
 fullUI.dimension "default"
 }
-lintOptions {
+lint {
 // don't error-out on missing translations
 warning 'MissingTranslation'
 }
diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties 
b/android/source/gradle/wrapper/gradle-wrapper.properties
index 7d1cfd365805..2d5e5400a6ed 100644
--- a/android/source/gradle/wrapper/gradle-wrapper.properties
+++ b/android/source/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
commit 76d50f83274549002cedc7dc6ded0e3eac7c277c
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 15:44:08 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:19:20 2022 +0200

android: Stop using ANDROID_SDK_HOME env variable

Otherwise, upgrading to Android Gradle Plugin 7.1.3 and
gradle 7.2 (which will be done in a follow-up commit)
would make the build fail like this:

> FAILURE: Build failed with an exception.
>
> * Where:
> Build file 
'/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/android/source/build.gradle'
 line: 1
>
> * What went wrong:
> A problem occurred evaluating root project 'source'.
> > Failed to apply plugin 'com.android.internal.application'.
>> ANDROID_SDK_HOME is set to the root of your SDK: 
/home/michi/Android/Sdk
>  ANDROID_SDK_HOME was meant to be the parent path of the preference 
folder expected by the Android tools.
>  It is now deprecated.
>
>  To set a custom preference folder location, use ANDROID_USER_HOME.
>
>  It should NOT be set to the same directory as the root of your SDK.
>  To set a custom SDK location, use ANDROID_HOME.

We don't actually rely on `ANDROID_SDK_HOME` being evaluated
by the Android toolchain, but it used to be set in configure.ac,
and the value was then assigned to the `sdk.dir` property written to
`android/source/local.properties`.

Just use a new variable name `ANDROID_SDK_DIR`
and keep the mechanism otherwise unchanged for now.

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

diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index 18082ea30ea3..83a2383581e4 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -24,7 +24,7 @@ OBJLOCAL=$(BUILDDIR)/android/obj/local/$(ANDROID_APP_ABI)
 
 local.properties: $(BUILDDIR)/config_host.mk
echo ndk.dir=$(ANDROID_NDK_DIR) >local.properties
-   echo sdk.dir=$(ANDROID_SDK_HOME) >>local.properties
+   echo sdk.dir=$(ANDROID_SDK_DIR) >>local.properties
 
 #
 # Build / link the single .so for this app
@@ -84,7 +84,7 @@ link-so: $(SODEST)/liblo-native-code.so 
$(SODEST)/nss-libraries $(SODEST)/libc++
 # can't "stop" a device anyway.)
 
 stop-start-cycle:
-   $(ANDROID_SDK_HOME)/platf

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

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/source/build.gradle |4 
 1 file changed, 4 deletions(-)

New commits:
commit 8917c8b11a4c05e9dd8b0259146179a99ae08a19
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 17:18:03 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:19:52 2022 +0200

android: Drop obsolete "sourceCompatibility 6"

This addresses this warning when building Android Viewer:

> > Task :compileStrippedUIDebugJavaWithJavac
> warning: [options] source value 6 is obsolete and will be removed in a 
future release
> warning: [options] To suppress warnings about obsolete options, use 
-Xlint:-options.

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

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 47661f79c4cc..08f59bd2f90a 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -33,10 +33,6 @@ dependencies {
 
 android {
 compileSdkVersion 31
-compileOptions {
-// silence some java-language features hints
-sourceCompatibility 6
-}
 // uses non-conventional source layout, so need to reconfigure accordingly
 // ToDo move to conventional layout, so stuff can be stripped down.
 sourceSets {


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

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/source/build.gradle |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f22f83fbac3a0a419c2e95d7b725525fd02649e6
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 17:19:26 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:20:08 2022 +0200

android: Update dependencies to current versions

This requires the Gradle update from
Change-Id Ia982d72d877e229c3006c6d528b830d16c88481f
"android: Update Android Gradle Plugin to 7.1.3"
as a prerequisite, since the build would otherwise fail
with

> > Task :desugarStrippedUIDebugFileDependencies FAILED
> D8: Method name '$private$' in class
> 'com.sun.star.frame.XMenuBarMergingAcceptor$-CC' cannot be represented
> in dex format.
>
> FAILURE: Build failed with an exception.

after updating only the dependencies.

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

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 08f59bd2f90a..118d7c53d86e 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -27,8 +27,8 @@ dependencies {
 "libreoffice.jar",
 "unoloader.jar"
 ])
-implementation 'com.google.android.material:material:1.0.0'
-implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+implementation 'com.google.android.material:material:1.5.0'
+implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
 }
 
 android {


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

2022-04-19 Thread Noel Grandin (via logerrit)
 svx/source/svdraw/sdrhittesthelper.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a1820d4c62e8f38faa6360f1de168622d296d049
Author: Noel Grandin 
AuthorDate: Tue Apr 19 12:53:43 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Apr 20 05:24:46 2022 +0200

tdf#148313 Basic IDE crashing while resizing dialog

Change-Id: Ic68b78f26626f346f3ef8b54a584de64165d9eb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133170
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit d40c6601330b70c3cb9c1be0fa9e9775ad51113c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133140
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/svdraw/sdrhittesthelper.cxx 
b/svx/source/svdraw/sdrhittesthelper.cxx
index 2a93dc372555..eb5116e584a7 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -136,9 +136,10 @@ bool ViewObjectContactPrimitiveHit(
 {
 // get primitive sequence
 sdr::contact::DisplayInfo aDisplayInfo;
-const drawinglayer::primitive2d::Primitive2DContainer& 
rSequence(rVOC.getPrimitive2DSequence(aDisplayInfo));
+// have to make a copy of this container here, because it might be 
changed underneath us
+const drawinglayer::primitive2d::Primitive2DContainer 
aSequence(rVOC.getPrimitive2DSequence(aDisplayInfo));
 
-if(!rSequence.empty())
+if(!aSequence.empty())
 {
 // create a HitTest processor
 const drawinglayer::geometry::ViewInformation2D& 
rViewInformation2D = rVOC.GetObjectContact().getViewInformation2D();
@@ -152,7 +153,7 @@ bool ViewObjectContactPrimitiveHit(
 aHitTestProcessor2D.collectHitStack(true);
 
 // feed it with the primitives
-aHitTestProcessor2D.process(rSequence);
+aHitTestProcessor2D.process(aSequence);
 
 // deliver result
 if (aHitTestProcessor2D.getHit())


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-3+backports' - 14 commits - android/Bootstrap android/Makefile android/source config_host.mk.in configure.ac editeng/inc editeng/qa edi

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/Bootstrap/Makefile.shared   |7 
 android/Makefile|2 
 android/source/AndroidManifest.xml  |6 
 android/source/Makefile |4 
 android/source/build.gradle |   16 
 android/source/gradle/wrapper/gradle-wrapper.properties |2 
 config_host.mk.in   |4 
 configure.ac|   42 +-
 editeng/inc/editdoc.hxx |   38 +-
 editeng/qa/unit/core-test.cxx   |4 
 editeng/source/editeng/editdbg.cxx  |   32 -
 editeng/source/editeng/editdoc.cxx  |  114 +++---
 editeng/source/editeng/editeng.cxx  |   24 -
 editeng/source/editeng/impedit.cxx  |   16 
 editeng/source/editeng/impedit.hxx  |8 
 editeng/source/editeng/impedit2.cxx |  211 ++--
 editeng/source/editeng/impedit3.cxx |  279 
 editeng/source/editeng/impedit4.cxx |   79 ++--
 editeng/source/editeng/impedit5.cxx |   10 
 external/nss/ExternalProject_nss.mk |2 
 fpicker/source/office/autocmpledit.cxx  |   25 +
 fpicker/source/office/autocmpledit.hxx  |2 
 sfx2/source/appl/newhelp.cxx|1 
 svx/source/svdraw/sdrhittesthelper.cxx  |7 
 sw/qa/uitest/writer_tests7/tdf144439.py |3 
 sw/source/core/doc/number.cxx   |2 
 vcl/inc/unx/gtk/gtkobject.hxx   |7 
 vcl/unx/gtk3/gtkinst.cxx|2 
 vcl/unx/gtk3/gtkobject.cxx  |   53 ++-
 29 files changed, 550 insertions(+), 452 deletions(-)

New commits:
commit daad3b76bfc557360070fffe2fce79261f31cc9f
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 17:19:26 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:33:22 2022 +0200

android: Update dependencies to current versions

This requires the Gradle update from
Change-Id Ia982d72d877e229c3006c6d528b830d16c88481f
"android: Update Android Gradle Plugin to 7.1.3"
as a prerequisite, since the build would otherwise fail
with

> > Task :desugarStrippedUIDebugFileDependencies FAILED
> D8: Method name '$private$' in class
> 'com.sun.star.frame.XMenuBarMergingAcceptor$-CC' cannot be represented
> in dex format.
>
> FAILURE: Build failed with an exception.

after updating only the dependencies.

Change-Id: Ifa007fa0e520e9494ace173d1643abb7d7a5f9c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133183
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit f22f83fbac3a0a419c2e95d7b725525fd02649e6)

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 08f59bd2f90a..118d7c53d86e 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -27,8 +27,8 @@ dependencies {
 "libreoffice.jar",
 "unoloader.jar"
 ])
-implementation 'com.google.android.material:material:1.0.0'
-implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+implementation 'com.google.android.material:material:1.5.0'
+implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
 }
 
 android {
commit 61d7d2407e6af2ed2dcf52deeaf99841a0a23d6c
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 17:18:03 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:33:22 2022 +0200

android: Drop obsolete "sourceCompatibility 6"

This addresses this warning when building Android Viewer:

> > Task :compileStrippedUIDebugJavaWithJavac
> warning: [options] source value 6 is obsolete and will be removed in a 
future release
> warning: [options] To suppress warnings about obsolete options, use 
-Xlint:-options.

Change-Id: Ic1a80117e7e8c31774947729452bfafacd7a24c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133182
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 8917c8b11a4c05e9dd8b0259146179a99ae08a19)

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 47661f79c4cc..08f59bd2f90a 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -33,10 +33,6 @@ dependencies {
 
 android {
 compileSdkVersion 31
-compileOptions {
-// silence some java-language features hints
-sourceCompatibility 6
-}
 // uses non-conventional source layout, so need to reconfigure accordingly
 // ToDo move to conventional layout, so stuff can be stripped down.
 sourceSets {
commit 2a58d87beeb08fb19d24097e4a22f77c37a1570c
Au

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-3+backports' - android/Bootstrap android/source

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/Bootstrap/Makefile.shared |1 +
 android/source/build.gradle   |1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c42c3e45e3a0460aed9be5b7b68ea9095f7add4f
Author: Michael Weghorn 
AuthorDate: Wed Apr 20 08:00:22 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 08:17:33 2022 +0200

android: Set archivesBaseName differently after gradle update

Setting the archive base name in build.gradle using

project.ext.set("archivesBaseName", "LibreOfficeViewer")

no longer worked after

commit 39326bc7d439170dd24c9d4b837c2cdb720b5d6f
Date:   Tue Apr 19 15:49:53 2022 +0200

android: Update Android Gradle Plugin to 7.1.3

... and gradle to 7.2, which is what Android Studio suggested
and did automatically when confirming.

As a consequence, the generated .apk or .aar files
would no longer have the app name in them, but be
called e.g. "source-strippedUIEditing-release-unsigned.apk"
instead of
"LibreOfficeViewer-strippedUIEditing-release-unsigned.apk".

Setting `archivesBaseName` in `android.defaultConfig`
in libOSettings.gradle works, so move it there.

[NOTE: This is v1 of https://gerrit.libreoffice.org/c/core/+/133191
which I plan to merge to upstream master once Jenkins CI run has
finished successfully.]

Change-Id: Id03cbe10681aca85c35aeef64527bc7707c95736

diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index 83a2383581e4..74121e6f03b4 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -108,6 +108,7 @@ liboSettings.gradle: $(BUILDDIR)/config_build.mk 
$(BUILDDIR)/config_host.mk
&& echo "}" \
&& echo "android.defaultConfig {" \
&& echo "applicationId '$(ANDROID_PACKAGE_NAME)'" \
+   && echo "archivesBaseName = 'LibreOfficeViewer'" \
&& echo "versionCode project.hasProperty('cmdVersionCode') 
? cmdVersionCode.toInteger() : $(if $(versionCode),$(versionCode),1)" \
&& echo "versionName 
'$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell
 cd $(SRCDIR) && git log -1 --format=%h)/$(OOO_VENDOR)'" \
&& echo "}" \
diff --git a/android/source/build.gradle b/android/source/build.gradle
index 118d7c53d86e..43a22c3b31a8 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -2,7 +2,6 @@ apply plugin: 'com.android.application'
 // buildhost settings - paths and the like
 apply from: 'liboSettings.gradle'
 
-project.ext.set("archivesBaseName", "LibreOfficeViewer")
 allprojects {
 repositories {
 jcenter()


Re: built msi file

2022-04-19 Thread Miklos Vajna
Hi Israel,

On Fri, Apr 15, 2022 at 07:48:14PM +, Israel  
wrote:
> I did a change on my autogen.input, this way worked for me:
> 
> --host=x86_64-pc-cygwin
> --without-junit
> --without-helppack-integration
> --enable-extension-integration
> --enable-scripting-beanshell
> --enable-scripting-javascript
> --enable-ext-wiki-publisher
> --enable-ext-nlpsolver
> --with-myspell-dicts
> --with-package-format=msi
> --enable-mergelibs
> --enable-lto
> --enable-odk
> --with-visual-studio=2022
> --with-jdk-home=C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot
> --without-ucrt-dir
> --with-ant-home=/cygdrive/c/sources/apache-ant-1.9.5

Oh, interesting. Did you track down which specific switch worked the
problem around?

Perhaps building MSIs without dictionaries is now broken or something.

Regards,

Miklos