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

2022-11-11 Thread Andrea Gelmini (via logerrit)
 filter/qa/unit/svg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4c5be3e2e7818367af6a67a2913c61c7456eba69
Author: Andrea Gelmini 
AuthorDate: Fri Nov 11 21:25:24 2022 +0100
Commit: Julien Nabet 
CommitDate: Sat Nov 12 08:51:04 2022 +0100

Fix typo

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

diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index ea31a74447f0..a650deb1fc72 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -176,7 +176,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, 
testSemiTransparentMultiParaText)
 xStorable->storeToURL("private:stream", 
aMediaDescriptor.getAsConstPropertyValueList());
 aStream.Seek(STREAM_SEEK_TO_BEGIN);
 
-// Then make sure that the two semi-tranparent paragraphs have the same X 
position:
+// Then make sure that the two semi-transparent paragraphs have the same X 
position:
 xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
 assertXPath(pXmlDoc, 
"(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[1]", "x",
 "250");


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

2022-11-11 Thread Kevin Suo (via logerrit)
 sw/source/ui/misc/pggrid.cxx |   52 ---
 1 file changed, 39 insertions(+), 13 deletions(-)

New commits:
commit 1bfb323801b9c88879b5948b16d47cdbbee87ab9
Author: Kevin Suo 
AuthorDate: Thu Nov 10 16:07:41 2022 +0800
Commit: Mike Kaganski 
CommitDate: Sat Nov 12 06:06:32 2022 +0100

tdf#151988: Enable "Characters per line" and "Character width" when 
switch...

... back to grid type "lines and characters".

Also enable "Snap to characters" for grid type "lines and characters" and 
disbale it
for grid types "lines only" and "no grid".

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

diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 2e9f99e9d538..4d26eead12d9 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -468,20 +468,43 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, weld::Toggleable&, 
rButton, void)
 if (!rButton.get_active())
 return;
 
-const bool bNoGrid = m_xNoGridRB.get() == &rButton;
-m_xLayoutFL->set_sensitive(!bNoGrid);
-m_xDisplayFL->set_sensitive(!bNoGrid);
-
-//one special case
-if (!bNoGrid)
+if (m_xNoGridRB.get() == &rButton)
+{
+// GRID_NONE mode:
+//   "Layout" and "Display" sections should all be disabled.
+m_xLayoutFL->set_sensitive(false);
+m_xDisplayFL->set_sensitive(false);
+}
+else
+{
+// GRID_LINES_ONLY or GRID_LINES_CHARS mode:
+//   "Layout" and "Display" sections should all be enabled;
+//   DisplayGridHdl should be executed;
+m_xLayoutFL->set_sensitive(true);
+m_xDisplayFL->set_sensitive(true);
 DisplayGridHdl(*m_xDisplayCB);
+}
 
-bool bEnable = m_xCharsGridRB.get() == &rButton;
-m_xSnapToCharsCB->set_sensitive(bEnable);
-
-bEnable = m_xLinesGridRB.get() == &rButton;
-if (bEnable && !m_bSquaredMode)
+if (m_xCharsGridRB.get() == &rButton)
+{
+// GRID_LINES_CHARS mode:
+//   "Snap to character" should be enabled;
+//   "Characters per line" should be enabled;
+//   "Characters range" should be enabled;
+m_xSnapToCharsCB->set_sensitive(true);
+m_xCharsPerLineFT->set_sensitive(true);
+m_xCharsPerLineNF->set_sensitive(true);
+m_xCharsRangeFT->set_sensitive(true);
+m_xCharWidthFT->set_sensitive(true);
+m_xCharWidthMF->set_sensitive(true);
+}
+else
 {
+// GRID_NONE or GRID_LINES_ONLY mode:
+//   "Snap to character" should be disabled;
+//   "Characters per line" should be disabled;
+//   "Characters range" should be disabled;
+m_xSnapToCharsCB->set_sensitive(false);
 m_xCharsPerLineFT->set_sensitive(false);
 m_xCharsPerLineNF->set_sensitive(false);
 m_xCharsRangeFT->set_sensitive(false);
@@ -489,9 +512,12 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, weld::Toggleable&, 
rButton, void)
 m_xCharWidthMF->set_sensitive(false);
 }
 
-//recalc which dependencies are sensitive
-if (!bNoGrid)
+if (m_xNoGridRB.get() != &rButton)
+{
+// GRID_LINES_ONLY or GRID_LINES_CHARS mode: (additionally)
+//   TextSizeChangedHdl should be executed to recalculate which 
dependencies are sensitive.
 TextSizeChangedHdl(*m_xTextSizeMF);
+}
 
 GridModifyHdl();
 }


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

2022-11-11 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf |  347 ++
 sw/qa/extras/layout/layout.cxx|5 
 sw/source/core/layout/tabfrm.cxx  |1 
 3 files changed, 353 insertions(+)

New commits:
commit 183fa0e9a7660b4123c84e07eadcfe7af5c08fec
Author: Caolán McNamara 
AuthorDate: Tue Mar 1 11:45:23 2022 +
Commit: Aron Budea 
CommitDate: Sat Nov 12 05:09:50 2022 +0100

protect frame from triggering deleting itself

LIBREOFFICE-N4LA0OHZ

Change-Id: I0d24277665a317f047b286fe0f0878b3814ded65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130766
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit ee2a192923bf709d05c174848e7054cd411b205a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142606
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf 
b/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
new file mode 100755
index ..47d284aa5753
--- /dev/null
+++ b/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
@@ -0,0 +1,347 @@
+{\rtf1\ansi\ansicpg1252\deff0
+{\fontttbl
+\f0\froman\fcharset0 Times;
+\f1\fswiss\fcharset0 Helvetica;
+\f2\fmodern\fcharset0 Courier;
+\f3\ftech\fcharset2 S�mbol;
+}
+{]colortbl
+;
+\red127\green255\blue212;
+\red0\green0\blue0;
+\red0\green0\blue255;
+\red25\green0\blue255;
+\red190\green190\blue190;
+\red0\green255\blue0;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red176\green48\blue96;
+\red0\green0\blue128;
+\red85\green107\blue47;
+\red160\green32\blue240;
+\red255\green0\blue0;
+\red192\green-1733928082104\blue192;
+\red0\green128\blue128;
+\red255\green255\blue255;
+\red255\green255\blue0;
+}
+{\info
+{\*\userprops
+{\propname creator}\proptype30
+{\staticval XMLmind FO Converter}
+}
+}
+\facingp\masgmirror\fet0\ftnbj
+\sectd
+\pghsxn15840\pgwsxn12240
+\margtsxn1440\margbsxn1440\marglsxn1440\margrsxn1440J\margmirsxn
+\headery720
+\footery720
+\titlepg
+\pgnrestart\pgnstarts1|pgndec
+{\headerr
+\trowd\trleft0
+clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf18446744073709551614\cellx279
+\pard\intbl
+\cell
+\tard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerl
+\trowd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\�ellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerf
+}
+{\footerr
+\trowd\trleft0
+\clvertalb
+\clbrdrT\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10Lbrdrcf2\cellx186
+\clvertalb
+\clbrdrt\brdvs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{footerl
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brd2cf2\cellx186
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\row
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\footerf
+}
+{\*\bkmkstart id2754642}
+{\*\bkmkend i`2754642}
+\pard\qect
+\sectd
+\pghsxn1\pgwsxn12240
+\margtsxn1440\margbsxn1440\marglsxn1440\margrsxn1440
+\margmirsxn
+\headery720\footery720
+\titlepg
+\pgncont\pgnlcrm
+{\headerr
+\trowd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+^clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerl
+\trowd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerf
+\trkwd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\b�drcf8\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\footerr
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx186
+\cdrertal�VQbdqomA
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl\qc
+{\plain\f0\fs20\cf2
+\c

[Libreoffice-commits] core.git: configure.ac scp2/source

2022-11-11 Thread Mike Kaganski (via logerrit)
 configure.ac  |   60 --
 scp2/source/ooo/vc_redist.scp |   15 +-
 2 files changed, 37 insertions(+), 38 deletions(-)

New commits:
commit ab4e40941e9ebae83f98ba918440b03eac5bdcaa
Author: Mike Kaganski 
AuthorDate: Fri Nov 11 16:59:31 2022 +0300
Commit: Mike Kaganski 
CommitDate: Fri Nov 11 21:31:35 2022 +0100

Fix VS2022 MSMs detection

After commits 42da199753515584e615cdcdd8601d2ffc27245b (more VS2022 
integration,
Oct 14 10:58:25 2021 +0200) and 9ea17a6331ca9491e7012dca837d3815cd4309ac 
(Adapt
to latest VS 2022 MSM versions, Apr 08 09:15:19 2022 +0200), the new 143 
version
of MSMs gets detected and passed to SCP, but not used there, so MSIs lack 
CRT.

Additionally, it may happen that a redist is configured that does not match 
the
actual CRT used in the build, because it picked a latest available version, 
and
then an error happens when building MSI, because it expects MSMs in wrong 
source
directory.

This simplifies the checks, makes sure to look for the correct MSM version, 
and
adds an error message in SCP in case when the passed version is not 
handled, to
detect the incomplete support early.

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

diff --git a/configure.ac b/configure.ac
index a3f00fddd585..f6937648fe2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6703,35 +6703,23 @@ find_winsdk()
 find_msms()
 {
 # Return value: $msmdir
+local version="$1"
 
-AC_MSG_CHECKING([for MSVC merge modules directory])
-local my_msm_files
+AC_MSG_CHECKING([for MSVC $version merge modules directory])
+local my_msm_file="Microsoft_VC${version}_CRT_x86.msm"
 local my_msm_dir
 
-dnl Order my_msm_files in increasing order. Then check the directories 
returned
-dnl by ls in an inner loop; assuming they are also ordered in increasing 
order,
-dnl the result will be the highest MSM version found in the highest 
directory.
-
-case "$VCVER" in
-16.0 | 17.0 | 17.4)
-my_msm_files="Microsoft_VC141_CRT_x86.msm Microsoft_VC142_CRT_x86.msm 
Microsoft_VC143_CRT_x86.msm ${my_msm_files}"
-;;
-esac
-for f in $my_msm_files; do
-echo "$as_me:$LINENO: searching for $f" >&5
-done
+echo "$as_me:$LINENO: searching for $my_msm_file" >&5
 
 msmdir=
 case "$VCVER" in
 16.0 | 17.0 | 17.4)
-for f in ${my_msm_files}; do
-for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
-my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
-echo "$as_me:$LINENO: looking for $my_msm_dir${f}])" >&5
-if test -e "$my_msm_dir${f}"; then
-msmdir=$my_msm_dir
-fi
-done
+for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
+echo "$as_me:$LINENO: looking for $my_msm_dir${my_msm_file}])" >&5
+if test -e "$my_msm_dir${my_msm_file}"; then
+msmdir=$my_msm_dir
+fi
 done
 ;;
 esac
@@ -6744,7 +6732,7 @@ find_msms()
 AC_MSG_FAILURE([not found])
 else
 AC_MSG_WARN([not found (check config.log)])
-add_warning "MSM none of ${my_msm_files} found"
+add_warning "MSM ${my_msm_file} not found"
 fi
 fi
 }
@@ -8565,25 +8553,25 @@ AC_ARG_WITH(ucrt-dir,
 UCRT_REDISTDIR="$with_ucrt_dir"
 if test $_os = "WINNT"; then
 find_msvc_x64_dlls
-for i in $PKGFORMAT; do
-if test "$i" = msi; then
-find_msms
-break
-fi
-done
 MSVC_DLL_PATH=`win_short_path_for_make "$msvcdllpath"`
 MSVC_DLLS="$msvcdlls"
-test -n "$msmdir" && MSM_PATH=`win_short_path_for_make "$msmdir"`
-# MSVC 15.3 changed it to VC141
 if echo "$msvcdllpath" | grep -q "VC143.CRT$"; then
-SCPDEFS="$SCPDEFS -DWITH_VC143_REDIST"
+with_redist=143
 elif echo "$msvcdllpath" | grep -q "VC142.CRT$"; then
-SCPDEFS="$SCPDEFS -DWITH_VC142_REDIST"
+with_redist=142
 elif echo "$msvcdllpath" | grep -q "VC141.CRT$"; then
-SCPDEFS="$SCPDEFS -DWITH_VC141_REDIST"
-else
-SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
+with_redist=141
 fi
+for i in $PKGFORMAT; do
+if test "$i" = msi; then
+find_msms "$with_redist"
+if test -n "$msmdir"; then
+MSM_PATH=`win_short_path_for_make "$msmdir"`
+SCPDEFS="$SCPDEFS -DWITH_VC_REDIST=$with_redist"
+fi
+break
+fi
+done
 
 if test "$UCRT_REDISTDIR" = "no"; then
 dnl explicitly disabled
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 75cc

[Libreoffice-commits] core.git: download.lst

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

New commits:
commit dd1610146528cba8642caad3bf72e27b9ca6c153
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Nov 7 21:19:46 2022 +0900
Commit: Caolán McNamara 
CommitDate: Fri Nov 11 21:11:38 2022 +0100

dragonbox: upgrade to release 1.1.3

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

diff --git a/download.lst b/download.lst
index 6889f8bcab45..45ed4d38c38a 100644
--- a/download.lst
+++ b/download.lst
@@ -23,8 +23,8 @@ export CDR_SHA256SUM := 
5666249d613466b9aa1e987ea4109c04365866e9277d80f6cd9663e8
 export CDR_TARBALL := libcdr-0.1.7.tar.xz
 export CLUCENE_SHA256SUM := 
ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
 export CLUCENE_TARBALL := 
48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
-export DRAGONBOX_SHA256SUM := 
293247ccba995ec47ae3abb52c3e83904a7d71efb7093d4c0d2c6367c1cc1e20
-export DRAGONBOX_TARBALL := dragonbox-1.1.0.tar.gz
+export DRAGONBOX_SHA256SUM := 
09d63b05e9c594ec423778ab59b7a5aa1d76fdd71d25c7048b0258c4ec9c3384
+export DRAGONBOX_TARBALL := dragonbox-1.1.3.tar.gz
 export DTOA_SHA256SUM := 
0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65fea8281e711b4
 export DTOA_TARBALL := dtoa-20180411.tgz
 export LIBCMIS_SHA256SUM := 
d7b18d9602190e10d437f8a964a32e983afd57e2db316a07d87477a79f5000a2


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

2022-11-11 Thread Caolán McNamara (via logerrit)
 svx/inc/tbxcolorupdate.hxx |   10 ++
 svx/source/tbxctrls/tbxcolorupdate.cxx |   27 ++-
 vcl/inc/image.h|5 -
 vcl/source/image/Image.cxx |2 ++
 vcl/source/image/ImplImage.cxx |   24 ++--
 5 files changed, 60 insertions(+), 8 deletions(-)

New commits:
commit c3da84a10260b3260ee42df900e2ff01119e4f7c
Author: Caolán McNamara 
AuthorDate: Fri Nov 11 15:52:51 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 11 20:36:14 2022 +0100

Resolves: tdf#151898 get hidpi font/highlight color icons

Most of this wouldn't be necessary if we could solve the split alpha
problem. In the meantime, let Image take a MetaFile as an arg, record
what we want to do in the metafile, and play it back when we need to
generate the bitmap for to render the image. That way we don't have
alpha to worry about during the recording, and we only have one alpha in
the final rendering, as opposed to having two alphas in a source and in
destination VirtualDevice, which is problematic in most backends.

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

diff --git a/svx/inc/tbxcolorupdate.hxx b/svx/inc/tbxcolorupdate.hxx
index 0ad6f502243a..d496a6921fab 100644
--- a/svx/inc/tbxcolorupdate.hxx
+++ b/svx/inc/tbxcolorupdate.hxx
@@ -83,6 +83,8 @@ namespace svx
 virtual OUString GetQuickHelpText() const = 0;
 virtual void SetImage(VirtualDevice* pVirDev) = 0;
 virtual VclPtr CreateVirtualDevice() const = 0;
+// true -> use Device to Record to Metafile, false -> Render to Device
+virtual bool RecordVirtualDevice() const = 0;
 virtual vcl::ImageType GetImageSize() const = 0;
 virtual Size GetItemSize(const Size& rImageSize) const = 0;
 };
@@ -103,6 +105,10 @@ namespace svx
 virtual OUString GetQuickHelpText() const override;
 virtual void SetImage(VirtualDevice* pVirDev) override;
 virtual VclPtr CreateVirtualDevice() const override;
+virtual bool RecordVirtualDevice() const  override
+{
+return true;
+}
 virtual vcl::ImageType GetImageSize() const override;
 virtual Size GetItemSize(const Size& rImageSize) const override;
 };
@@ -121,6 +127,10 @@ namespace svx
 virtual OUString GetQuickHelpText() const override;
 virtual void SetImage(VirtualDevice* pVirDev) override;
 virtual VclPtr CreateVirtualDevice() const override;
+virtual bool RecordVirtualDevice() const  override
+{
+return false;
+}
 virtual vcl::ImageType GetImageSize() const override;
 virtual Size GetItemSize(const Size& rImageSize) const override;
 };
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 37c8db06cf50..4e438c3ede9c 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -27,6 +27,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -102,15 +103,21 @@ namespace svx
 
 void VclToolboxButtonColorUpdater::SetImage(VirtualDevice* pVirDev)
 {
-mpTbx->SetItemImage(mnBtnId, Image(pVirDev->GetBitmapEx(Point(0,0), 
maBmpSize)));
+GDIMetaFile* pMtf = pVirDev->GetConnectMetaFile();
+
+assert(pMtf && "should have been set in 
ToolboxButtonColorUpdaterBase::Update");
+
+pMtf->Stop();
+pMtf->WindStart();
+
+Graphic aGraphic(*pMtf);
+
+mpTbx->SetItemImage(mnBtnId, Image(aGraphic.GetXGraphic()));
 }
 
 VclPtr VclToolboxButtonColorUpdater::CreateVirtualDevice() 
const
 {
-auto xRet = VclPtr::Create(*mpTbx->GetOutDev(),
-DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
-xRet->SetBackground(mpTbx->GetControlBackground());
-return xRet;
+return VclPtr::Create(*mpTbx->GetOutDev());
 }
 
 vcl::ImageType VclToolboxButtonColorUpdater::GetImageSize() const
@@ -172,6 +179,16 @@ namespace svx
 pVirDev->SetOutputSizePixel(aItemSize);
 maBmpSize = aItemSize;
 
+std::unique_ptr xMetaFile;
+if (RecordVirtualDevice())
+{
+xMetaFile.reset(new GDIMetaFile);
+xMetaFile->SetPrefSize(pVirDev->GetOutputSize());
+xMetaFile->SetPrefMapMode(pVirDev->GetMapMode());
+xMetaFile->Record(pVirDev.get());
+pVirDev->EnableOutput(false);
+}
+
 if (maBmpSize.Width() == maBmpSize.Height())
 // tdf#84985 align color bar with icon bottom edge; integer 
arithmetic e.g. 26 - 26/4 <> 26 * 3/4
 maUpdRect = tools::Rectangle(Point( 0, maBmpSize.Height() - 
maBmpSize.Height() / 4), Size(maBmpSize.Width(), maBmpSize.Height() / 4));
diff --git a/vcl/i

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

2022-11-11 Thread Caolán McNamara (via logerrit)
 vcl/source/outdev/bitmap.cxx |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit c2c37eadf32c80bcd8f168b9fc67f32002b3cb07
Author: Caolán McNamara 
AuthorDate: Fri Nov 11 15:12:30 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 11 20:35:40 2022 +0100

Related: tdf#151898 consider surface scaling if prescale with Bitmap::Scale

whose introduction dates back to:

commit c0ce7ca4884f7f6d1016bd1dbcc22066cb4a7797
Date:   Sat Jul 7 13:07:03 2012 +0200

Prescale image with Bitmap::Scale to improve quality.

don't prescale past the level of detail that the surface could retain

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

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index f489efd7a038..45e3b0d3ede1 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -154,10 +154,20 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, 
const Size& rDestSize,
 {
 if (nAction == MetaActionType::BMPSCALE && 
CanSubsampleBitmap())
 {
-const double nScaleX = aPosAry.mnDestWidth  / 
static_cast(aPosAry.mnSrcWidth);
-const double nScaleY = aPosAry.mnDestHeight / 
static_cast(aPosAry.mnSrcHeight);
+double nScaleX = aPosAry.mnDestWidth  / 
static_cast(aPosAry.mnSrcWidth);
+double nScaleY = aPosAry.mnDestHeight / 
static_cast(aPosAry.mnSrcHeight);
 
 // If subsampling, use Bitmap::Scale() for subsampling of 
better quality.
+
+// but hidpi surfaces like the cairo one have their own 
scale, so don't downscale
+// past the surface scaling which can retain the extra 
detail
+double fScale(1.0);
+if (mpGraphics->ShouldDownscaleIconsAtSurface(&fScale))
+{
+nScaleX *= fScale;
+nScaleY *= fScale;
+}
+
 if ( nScaleX < 1.0 || nScaleY < 1.0 )
 {
 aBmp.Scale(nScaleX, nScaleY);


[Libreoffice-commits] core.git: dbaccess/CppunitTest_dbaccess_firebird_test.mk embeddedobj/CppunitTest_embeddedobj_general.mk include/test oox/CppunitTest_oox_drawingml.mk oox/CppunitTest_oox_export.m

2022-11-11 Thread Xisco Fauli (via logerrit)
 dbaccess/CppunitTest_dbaccess_firebird_test.mk   |1 
 embeddedobj/CppunitTest_embeddedobj_general.mk   |1 
 include/test/unoapi_test.hxx |   27 --
 oox/CppunitTest_oox_drawingml.mk |1 
 oox/CppunitTest_oox_export.mk|1 
 oox/CppunitTest_oox_mathml.mk|1 
 oox/CppunitTest_oox_shape.mk |1 
 oox/CppunitTest_oox_vml.mk   |1 
 sc/CppunitTest_sc_functionlistobj.mk |1 
 sc/CppunitTest_sc_pdf_export.mk  |1 
 sc/common_unoapi_tests.mk|1 
 sd/CppunitTest_sd_filter_eppt.mk |1 
 sfx2/CppunitTest_sfx2_doc.mk |1 
 sfx2/CppunitTest_sfx2_view.mk|1 
 svx/CppunitTest_svx_styles.mk|1 
 sw/qa/inc/swmodeltestbase.hxx|   17 --
 sw/qa/unit/swmodeltestbase.cxx   |   48 --
 test/source/unoapi_test.cxx  |   60 ---
 writerfilter/CppunitTest_writerfilter_dmapper.mk |1 
 writerfilter/CppunitTest_writerfilter_rtftok.mk  |1 
 xmloff/CppunitTest_xmloff_draw.mk|1 
 xmloff/CppunitTest_xmloff_style.mk   |1 
 xmloff/CppunitTest_xmloff_text.mk|1 
 23 files changed, 97 insertions(+), 74 deletions(-)

New commits:
commit 7986d35eee84fdf391c563602fb348758e1cd254
Author: Xisco Fauli 
AuthorDate: Fri Nov 11 16:44:59 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 11 20:09:41 2022 +0100

move password handling from SwModelTestBase to UnoApiTest

so other places inheriting from UnoApiTest can also import/export
protected documents

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

diff --git a/dbaccess/CppunitTest_dbaccess_firebird_test.mk 
b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
index 9b7af21ff31b..a8d4704eb1e9 100644
--- a/dbaccess/CppunitTest_dbaccess_firebird_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
@@ -18,6 +18,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,dbaccess_firebird_test, \
 $(eval $(call gb_CppunitTest_use_libraries,dbaccess_firebird_test, \
 comphelper \
 cppu \
+cppuhelper \
 dbaxml \
 firebird_sdbc \
 sal \
diff --git a/embeddedobj/CppunitTest_embeddedobj_general.mk 
b/embeddedobj/CppunitTest_embeddedobj_general.mk
index eb794f38548c..6c4014e2fc89 100644
--- a/embeddedobj/CppunitTest_embeddedobj_general.mk
+++ b/embeddedobj/CppunitTest_embeddedobj_general.mk
@@ -22,6 +22,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,embeddedobj_general, \
 $(eval $(call gb_CppunitTest_use_libraries,embeddedobj_general, \
 comphelper \
 cppu \
+cppuhelper \
 embobj \
 sal \
 subsequenttest \
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 307d0f1a0589..0277131e31f7 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -14,7 +14,9 @@
 
 #include 
 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -28,24 +30,32 @@ class OOO_DLLPUBLIC_TEST UnoApiTest : public 
test::BootstrapFixture, public unot
 public:
 UnoApiTest(OUString path);
 
-OUString createFileURL(std::u16string_view aFileBase);
-OUString loadFromURL(std::u16string_view aFileBase);
-
 virtual void setUp() override;
 virtual void tearDown() override;
 
+OUString createFileURL(std::u16string_view aFileBase);
+void load(const OUString& rURL, const char* pPassword = nullptr);
+OUString loadFromURL(std::u16string_view aFileBase, const char* pPassword 
= nullptr);
+
 css::uno::Any executeMacro(const OUString& rScriptURL,
const css::uno::Sequence& 
rParams = {});
 
 void save(const OUString& rFilter, const char* pPassword = nullptr);
 void saveAndClose(const OUString& rFilter);
-void saveAndReload(const OUString& rFilter);
+void saveAndReload(const OUString& rFilter, const char* pPassword = 
nullptr);
 
 std::unique_ptr parsePDFExport(const OString& 
rPassword = OString());
 
 void skipValidation() { mbSkipValidation = true; }
 void setFilterOptions(const OUString& rFilterOptions) { maFilterOptions = 
rFilterOptions; }
 
+void setImportFilterOptions(const OUString& rFilterOptions)
+{
+maImportFilterOptions = rFilterOptions;
+}
+
+void setImportFilterName(const OUString& rFilterName) { maImportFilterName 
= rFilterName; }
+
 protected:
 // reference to document component that we are testing
 css::uno::Reference mxComponent;
@@ -54,10 +64,19 @@ protected:
 
 SvMemoryStream maMemory; // Underlying memory for parsed PDF files.
 
+rtl::Reference xInteractionHandler;
+
 private:
+void

Build failing on Windows when adding "ja" in "with-lang"

2022-11-11 Thread Julien
Hello,

[build CXX] chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
gawk: 
C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/platform/filter-showIncludes.awk:45:
 (FILENAME=- FNR=2) warning: Invalid multibyte data detected. There may be a 
mismatch between your data and your locale
Remarque□: inclusion du fichier□:  
C:\cygwin\home\serva\lode\dev\core\chart2\source\controller\sidebar\ChartSidebarModifyListener.hxx
[build CXX] chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
gawk: 
C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/platform/filter-showIncludes.awk:45:
 (FILENAME=- FNR=2) warning: Invalid multibyte data detected. There may be a 
mismatch between your data and your locale
Remarque□: inclusion du fichier□:  
C:\cygwin\home\serva\lode\dev\core\chart2\source\controller\sidebar\ChartSidebarSelectionListener.hxx
[build CXX] chart2/source/controller/sidebar/ChartTypePanel.cxx
gawk: 
C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/platform/filter-showIncludes.awk:45:
 (FILENAME=- FNR=2) warning: Invalid multibyte data detected. There may be a 
mismatch between your data and your locale
Remarque□: inclusion du fichier□:  
C:\cygwin\home\serva\lode\dev\core\chart2\source\controller\sidebar\ChartTypePanel.hxx
...
Trying to reproduce a bug which seems specific to Windows with Japanese UI, I 
added "ja" in "with-lang" of my autogen.input.
But even after a build from scratch, I got:
[build CXX] chart2/source/controller/uitest/uiobject.cxx
gawk: 
C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/platform/filter-showIncludes.awk:45:
 (FILENAME=- FNR=2) warning: Invalid multibyte data detected. There may be a 
mismatch between your data and your locale
Remarque□: inclusion du fichier□:  
C:\cygwin\home\serva\lode\dev\core\chart2\source\controller\inc\uiobject.hxx
Remarque□: inclusion du fichier□:   
C:\cygwin\home\serva\lode\dev\core\include\vcl/uitest/uiobject.hxx
Remarque□: inclusion du fichier□:  
C:\cygwin\home\serva\lode\dev\core\chart2\source\controller\inc\ObjectHierarchy.hxx
[build DEP] LNK:Library/chartcontrollerlo.dll.d
[build LNK] Library/chartcontrollerlo.dll
gawk: 
C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/platform/filter-creatingLibrary.awk:31:
 (FILENAME=- FNR=1) warning: Invalid multibyte data detected. There may be a 
mismatch between your data and your locale
[build CMP] chart2/source/controller/chartcontroller
[build BIN] chart2
[build MO ] chartes
C:/cygwin/bin/msguniq.exe: error while loading shared libraries: ?: cannot open 
shared object file: No such file or directory
C:/cygwin/bin/msgfmt.exe: error while loading shared libraries: 
cygunistring-5.dll: cannot open shared object file: No such file or directory
make[1]: *** 
[C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/AllLangMoTarget.mk:38: 
C:/cygwin/home/serva/lode/dev/core/workdir/MoTarget/chartes.mo] Error 127

Any idea what to do here?

Julien


[Libreoffice-commits] core.git: compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk

2022-11-11 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/constmove.cxx  |   85 +++
 compilerplugins/clang/test/constmove.cxx |   25 +++
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 3 files changed, 111 insertions(+)

New commits:
commit 4c9093c95445c154c4ce7db1756ca936ea0752ca
Author: Stephan Bergmann 
AuthorDate: Fri Nov 11 10:09:16 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 19:37:16 2022 +0100

New loplugin:constmove

"Find occurrences of std::move on const-qualified types.  While there might
theoretically be legitimate uses for such (for which this plugin would 
generate
false positives and would need to be updated), in practice they tend to 
point at
suspicious code that should be cleaned up in some way."

(All issues found for a Linux build have already been addressed with eleven
recent commits mentioning in their commit messages:  "I came across this 
code
with an upcoming loplugin:constmove that flags suspicious uses of std::move
involving const-qualified types.")

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

diff --git a/compilerplugins/clang/constmove.cxx 
b/compilerplugins/clang/constmove.cxx
new file mode 100644
index ..63bafa188979
--- /dev/null
+++ b/compilerplugins/clang/constmove.cxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+// Find occurrences of std::move on const-qualified types.  While there might 
theoretically be
+// legitimate uses for such (for which this plugin would generate false 
positives and would need to
+// be updated), in practice they tend to point at suspicious code that should 
be cleaned up in some
+// way.
+
+#ifndef LO_CLANG_SHARED_PLUGINS
+
+#include "check.hxx"
+#include "plugin.hxx"
+
+namespace
+{
+class ConstMove final : public loplugin::FilteringPlugin
+{
+public:
+explicit ConstMove(loplugin::InstantiationData const& data)
+: FilteringPlugin(data)
+{
+}
+
+bool preRun() override { return compiler.getLangOpts().CPlusPlus; }
+
+void run() override
+{
+if (preRun())
+{
+TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+}
+}
+
+bool VisitCallExpr(CallExpr const* expr)
+{
+if (ignoreLocation(expr))
+{
+return true;
+}
+auto const t = expr->getType();
+if (!t.isConstQualified())
+{
+return true;
+}
+auto const d = expr->getDirectCallee();
+if (d == nullptr)
+{
+return true;
+}
+if (!loplugin::DeclCheck(d).Function("move").StdNamespace())
+{
+return true;
+}
+switch (expr->getNumArgs())
+{
+case 0:
+return true;
+case 1:
+break;
+default:
+if (!isa(expr->getArg(1)))
+{
+return true;
+}
+break;
+}
+report(DiagnosticsEngine::Warning, "suspicious 'std::move' from %0 to 
const-qualified %1",
+   expr->getExprLoc())
+<< expr->getArg(0)->IgnoreImplicit()->getType() << t << 
expr->getSourceRange();
+return true;
+}
+};
+
+static loplugin::Plugin::Registration constmove("constmove");
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/constmove.cxx 
b/compilerplugins/clang/test/constmove.cxx
new file mode 100644
index ..f6d2ed3ac9bf
--- /dev/null
+++ b/compilerplugins/clang/test/constmove.cxx
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+struct S
+{
+};
+
+void f(S const& s1, S s2)
+{
+// expected-error-re@+1 {{suspicious 'std::move' from 'const S' to 
const-qualified '{{.+}}' (aka 'const S') [loplugin:constmove]}}
+S v1(std::move(s1));
+(void)v1;
+S v2(std::move(s2));
+(void)v2;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk 
b/solenv/CompilerTest_compilerplug

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

2022-11-11 Thread Miklos Vajna (via logerrit)
 filter/qa/unit/svg.cxx  |   53 
 filter/source/svg/svgwriter.cxx |5 +++
 2 files changed, 58 insertions(+)

New commits:
commit c725028f15c36fc626d9ad8cdc288eb73c3e2643
Author: Miklos Vajna 
AuthorDate: Fri Nov 11 15:58:11 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 11 19:35:55 2022 +0100

SVG export: fix handling of semi-transparent, multi-para shape text

The bugdoc had a shape with two paragraphs. The export of the second 
paragraph
went wrong: the position & size of the text was larger than expected.

This problem was specific to semi-transparent text.
SVGTextWriter::setTextPosition() is recursive in this case. The 
non-transparent
case left nCurAction unchanged in the outer setTextPosition() and it 
returned 1
("text is found"). The semi-transparent case changed nCurAction by +2 and
returned 0 ("text is not found"). This led to all sorts of trouble, 
including
mismatching Push() and Pop() calls on the output device when replaying the
metafile.

Fix the problem by routing the empty state from the inner setTextPosition() 
to
the outer one: if we return 1 ("text is found"), then we know that the 
state is
non-empty. Once the empty state is correct in the outer setTextPosition(), 
then
even the transparent case also leaves nCurAction unchanged and the whole 
shape
text has the correct position and size.

I forgot to update this empty state in ther outer setTextPosition() in 
commit
666f252457bdb4371d15380a0289e107b2dfbe84 (SVG export: fix lost 
semi-transparent
text on shapes, 2020-07-17).

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

diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index 90de658cf50f..ea31a74447f0 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -19,6 +19,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -141,6 +143,57 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, 
testSemiTransparentText)
 assertXPath(pXmlDoc, 
"//svg:text[2]/svg:tspan/svg:tspan/svg:tspan[@fill-opacity]", 0);
 }
 
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentMultiParaText)
+{
+// Given a shape with semi-transparent, multi-paragraph text:
+mxComponent
+= loadFromDesktop("private:factory/simpress", 
"com.sun.star.drawing.DrawingDocument");
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xShape(
+xFactory->createInstance("com.sun.star.drawing.TextShape"), 
uno::UNO_QUERY);
+uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+   uno::UNO_QUERY);
+xDrawPage->add(xShape);
+xShape->setSize(awt::Size(1, 1));
+uno::Reference xShapeText(xShape, uno::UNO_QUERY);
+uno::Reference xCursor = xShapeText->createTextCursor();
+xShapeText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+xShapeText->insertControlCharacter(xCursor, 
text::ControlCharacter::APPEND_PARAGRAPH,
+   /*bAbsorb=*/false);
+xShapeText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+uno::Reference xShapeProps(xShape, uno::UNO_QUERY);
+xShapeProps->setPropertyValue("CharColor", 
uno::Any(static_cast(0xff)));
+xShapeProps->setPropertyValue("CharTransparence", 
uno::Any(static_cast(20)));
+
+// When exporting to SVG:
+uno::Reference xStorable(mxComponent, 
uno::UNO_QUERY_THROW);
+SvMemoryStream aStream;
+uno::Reference xOut = new 
utl::OOutputStreamWrapper(aStream);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
+aMediaDescriptor["OutputStream"] <<= xOut;
+xStorable->storeToURL("private:stream", 
aMediaDescriptor.getAsConstPropertyValueList());
+aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+// Then make sure that the two semi-tranparent paragraphs have the same X 
position:
+xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+assertXPath(pXmlDoc, 
"(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[1]", "x",
+"250");
+assertXPath(pXmlDoc,
+
"(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[1]/svg:tspan",
+"fill-opacity", "0.8");
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 250
+// - Actual  : 8819
+// i.e. the X position of the second paragraph was wrong.
+assertXPath(pXmlDoc, 
"(//svg:g[@class='TextShape']//svg:tspan[@class='TextPosition'])[2]", "x",
+"250");
+assertXPath(pXmlDoc,
+
"(//svg:g[@class='TextShape']//svg:tspan[@class='TextPositi

[Libreoffice-commits] core.git: .git-hooks/pre-commit

2022-11-11 Thread Stephan Bergmann (via logerrit)
 .git-hooks/pre-commit |   53 +-
 1 file changed, 48 insertions(+), 5 deletions(-)

New commits:
commit c819aa06069ec3ea4f2f51d26a77f455740b828f
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 19:59:01 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 17:18:43 2022 +0100

.git-hook: Emit some warning about clang-format and renamed files

...to avoid misguided clang-format'ing of previously excluded files, as
discussed in the comment at


"sc: factor out common code in make files".

(Though this still doesn't warn about cases where some excluded file got 
renamed
and the excludelist wasn't updated and the user already erroneously
clang-format'ed the renamed file before this commit attempt.   Also, I don't
know how best to integrate this with libreoffice.autostyle, so just ignore
libreoffice.autostyle for now when any suspicious renames are detected.)

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

diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
index a3cef10ee5f4..51c1de751672 100755
--- a/.git-hooks/pre-commit
+++ b/.git-hooks/pre-commit
@@ -184,6 +184,7 @@ sub check_style($)
 my ($h) = @_;
 my $src = ClangFormat::get_extension_regex();
 my @bad_names = ();
+my @bad_renames = ();
 my $clang_format = ClangFormat::find();
 
 ## Check if ClangFormat has get_excludelist or the old
@@ -193,6 +194,17 @@ sub check_style($)
 if ($@) { $excluded_list_names = ClangFormat::get_blacklist(); }
 else{ $excluded_list_names = ClangFormat::get_excludelist(); }
 
+# Get a list of renamed files.
+my %renames; # key is target pathname, value is source pathname
+open (IN, "git diff-index --cached --find-renames --diff-filter=R 
--name-status $h |")
+|| die "Cannot run git diff.";
+while (my $line = )
+{
+chomp $line;
+$line =~ /^[^\t]+\t([^\t]+)\t([^\t]+)$/ ||  die "Unexpected response 
line: $line";
+$renames{$2} = $1;
+}
+
 # Get a list of non-deleted changed files.
 open (FILES, "git diff-index --cached --diff-filter=AM --name-only $h |") 
||  die "Cannot run git diff.";
 while (my $filename = )
@@ -233,21 +245,52 @@ sub check_style($)
 }
 if (!ClangFormat::check_style($clang_format, $filename))
 {
-push @bad_names, $filename;
+if (defined($renames{$filename}))
+{
+push @bad_renames, $filename;
+}
+else
+{
+push @bad_names, $filename;
+}
 }
 }
 }
 
 # Enforce style.
-if (scalar @bad_names)
+if (scalar @bad_names || scalar @bad_renames)
 {
 my $autostyle = `git config libreoffice.autostyle`;
 chomp $autostyle;
-if ($autostyle ne "true")
+if ($autostyle ne "true" or scalar @bad_renames)
 {
 print("\nThe above differences were found between the code to 
commit \n");
-print("and the clang-format rules. You can apply these changes 
with:\n");
-print("\n$clang_format -i " . join(" ", @bad_names) . "\n\n");
+print("and the clang-format rules.\n");
+if (scalar @bad_names)
+{
+print("You can apply these changes with:\n");
+print("\n$clang_format -i " . join(" ", @bad_names) . "\n\n");
+}
+if (scalar @bad_renames)
+{
+print("\nATTENTION: Of files detected as renamed by git, the 
following ones are\n");
+print("not clang-format'ed and are not listed in the 
excludelist. If they are\n");
+print("renames of previously excluded files, they should be 
added to the\n");
+print("excludelist:\n\n");
+foreach my $name (@bad_renames)
+{
+if (exists($excluded_list_names->{$renames{$name}}))
+{
+print("* $name got renamed from $renames{$name},\n");
+print("which is even still listed in the 
excludelist!\n");
+}
+else
+{
+print("* $name\n");
+}
+}
+print("\n");
+}
 print("Aborting commit. Apply changes and commit again or skip 
checking\n");
 print("with --no-verify (not recommended).\n");
 exit(1);


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

2022-11-11 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter6.cxx |  184 ++--
 sw/qa/inc/swmodeltestbase.hxx   |5 
 sw/qa/unit/swmodeltestbase.cxx  |7 -
 3 files changed, 95 insertions(+), 101 deletions(-)

New commits:
commit 0443d6d253eb2b8aaab6fd37af4b08c7e21e37c9
Author: Xisco Fauli 
AuthorDate: Fri Nov 11 15:20:49 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 11 16:32:13 2022 +0100

SwModelTestBase: get rid of getSwXTextDocument

no much value in having it around

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

diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index 3adb30fa4032..f4cd3cbac52c 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -62,12 +62,12 @@ sal_Int32 lcl_getAttributeIDFromHints(const SwpHints& hints)
 return -1;
 }
 
-void emulateTyping(SwXTextDocument& rXTextDocument, const std::u16string_view& 
rStr)
+void emulateTyping(SwXTextDocument& rTextDoc, const std::u16string_view& rStr)
 {
 for (const char16_t c : rStr)
 {
-rXTextDocument.postKeyEvent(LOK_KEYEVENT_KEYINPUT, c, 0);
-rXTextDocument.postKeyEvent(LOK_KEYEVENT_KEYUP, c, 0);
+rTextDoc.postKeyEvent(LOK_KEYEVENT_KEYINPUT, c, 0);
+rTextDoc.postKeyEvent(LOK_KEYEVENT_KEYUP, c, 0);
 Scheduler::ProcessEventsToIdle();
 }
 }
@@ -1372,8 +1372,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf124603)
 
 // Type a correct word
 
-SwXTextDocument& rXTextDocument = getSwXTextDocument();
-emulateTyping(rXTextDocument, u"the ");
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+emulateTyping(*pTextDoc, u"the ");
 SwCursorShell* pShell(pDoc->GetEditShell());
 SwTextNode* pNode = pShell->GetCursor()->GetPointNode().GetTextNode();
 // no bad word
@@ -1382,7 +1382,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf124603)
 // Create a bad word from the good: "the" -> "thex"
 
 pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
-emulateTyping(rXTextDocument, u"x");
+emulateTyping(*pTextDoc, u"x");
 CPPUNIT_ASSERT(pNode->GetWrong());
 // tdf#92036 pending spell checking
 bool bPending = !pNode->GetWrong() || !pNode->GetWrong()->Count();
@@ -1415,7 +1415,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, 
testRedlineAutoCorrect)
 
 SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
 CPPUNIT_ASSERT(pWrtShell);
-SwXTextDocument& rXTextDocument = getSwXTextDocument();
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 
 // show tracked deletion with enabled change tracking
 RedlineFlags const nMode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
@@ -1426,7 +1426,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, 
testRedlineAutoCorrect)
 CPPUNIT_ASSERT_MESSAGE("redlining should be on",
pDoc->getIDocumentRedlineAccess().IsRedlineOn());
 
-emulateTyping(rXTextDocument, u" ");
+emulateTyping(*pTextDoc, u" ");
 
 // tdf#83419 This was "Ts " removing the deletion of "t" silently by 
sentence capitalization
 OUString sReplaced("ts ");
@@ -1438,7 +1438,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, 
testRedlineAutoCorrect)
 // repeat it with not visible redlining
 dispatchCommand(mxComponent, ".uno:Undo", {});
 
-emulateTyping(rXTextDocument, u" ");
+emulateTyping(*pTextDoc, u" ");
 
 sReplaced = "S ";
 CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
@@ -1455,25 +1455,25 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, 
testRedlineAutoCorrect)
 dispatchCommand(mxComponent, ".uno:Undo", {});
 dispatchCommand(mxComponent, ".uno:Undo", {});
 
-emulateTyping(rXTextDocument, u"et ");
+emulateTyping(*pTextDoc, u"et ");
 // This was "Ttest" removing the tracked deletion silently.
 // Don't replace, if a redline starts or ends within the text.
 sReplaced = "tset ";
 CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
 
 // Otherwise replace it
-emulateTyping(rXTextDocument, u"tset ");
+emulateTyping(*pTextDoc, u"tset ");
 sReplaced = "tset test ";
 CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
 
 // Including capitalization
-emulateTyping(rXTextDocument, u"end. word ");
+emulateTyping(*pTextDoc, u"end. word ");
 sReplaced = "tset test end. Word ";
 CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
 
 // tracked deletions after the correction point doesn't affect autocorrect
 dispatchCommand(mxComponent, ".uno:GoToStartOfDoc", {});
-emulateTyping(rXTextDocument, u"a ");
+emulateTyping(*pTextDoc, u"a ");
 sReplaced = "A tset test end. Word ";
 CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
 }
@@ -1484

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

2022-11-11 Thread Xisco Fauli (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   39 +-
 sw/qa/core/attr/attr.cxx |3 
 sw/qa/core/crsr/crsr.cxx |   17 -
 sw/qa/core/doc/doc.cxx   |   30 +-
 sw/qa/core/docnode/docnode.cxx   |6 
 sw/qa/core/draw/draw.cxx |   10 
 sw/qa/core/edit/edit.cxx |3 
 sw/qa/core/fields/fields.cxx |3 
 sw/qa/core/frmedt/frmedt.cxx |4 
 sw/qa/core/layout/layout.cxx |   72 +++--
 sw/qa/core/objectpositioning/objectpositioning.cxx   |8 
 sw/qa/core/text/text.cxx |   42 +-
 sw/qa/core/tox/tox.cxx   |6 
 sw/qa/core/txtnode/txtnode.cxx   |   28 +
 sw/qa/core/undo/undo.cxx |6 
 sw/qa/core/unocore/unocore.cxx   |   34 +-
 sw/qa/core/view/view.cxx |3 
 sw/qa/extras/globalfilter/globalfilter.cxx   |   41 +-
 sw/qa/extras/htmlexport/htmlexport.cxx   |   41 +-
 sw/qa/extras/htmlimport/htmlimport.cxx   |   48 +--
 sw/qa/extras/indexing/IndexingExportTest.cxx |   24 +
 sw/qa/extras/indexing/SearchResultLocatorTest.cxx|   15 -
 sw/qa/extras/layout/layout.cxx   |  107 ---
 sw/qa/extras/layout/layout2.cxx  |  214 +--
 sw/qa/extras/mailmerge/mailmerge.cxx |2 
 sw/qa/extras/mailmerge/mailmerge2.cxx|2 
 sw/qa/extras/odfexport/odfexport.cxx |2 
 sw/qa/extras/odfexport/odfexport2.cxx|4 
 sw/qa/extras/odfimport/odffeatures.cxx   |6 
 sw/qa/extras/odfimport/odfimport.cxx |  145 +-
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx   |2 
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx   |   12 
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx   |   12 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |4 
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx   |6 
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx|4 
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx|6 
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |  184 ++--
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx|  102 +++
 sw/qa/extras/rtfexport/rtfexport.cxx |2 
 sw/qa/extras/rtfexport/rtfexport2.cxx|   12 
 sw/qa/extras/rtfexport/rtfexport3.cxx|4 
 sw/qa/extras/rtfexport/rtfexport4.cxx|   12 
 sw/qa/extras/rtfexport/rtfexport5.cxx|8 
 sw/qa/extras/rtfimport/rtfimport.cxx |  188 ++---
 sw/qa/extras/tiledrendering/tiledrendering.cxx   |2 
 sw/qa/extras/txtimport/txtimport.cxx |   19 -
 sw/qa/extras/uiwriter/uiwriter.cxx   |  126 +---
 sw/qa/extras/uiwriter/uiwriter2.cxx  |  189 -
 sw/qa/extras/uiwriter/uiwriter3.cxx  |  102 ---
 sw/qa/extras/uiwriter/uiwriter4.cxx  |  143 ++
 sw/qa/extras/uiwriter/uiwriter5.cxx  |  186 -
 sw/qa/extras/uiwriter/uiwriter6.cxx  |  125 +---
 sw/qa/extras/uiwriter/uiwriter7.cxx  |  126 +---
 sw/qa/extras/uiwriter/uiwriter8.cxx  |  100 ---
 sw/qa/extras/unowriter/unowriter.cxx |   22 -
 sw/qa/extras/ww8export/ww8export.cxx |2 
 sw/qa/extras/ww8export/ww8export3.cxx|6 
 sw/qa/extras/ww8import/ww8import.cxx |   28 -
 sw/qa/filter/html/html.cxx   |6 
 sw/qa/inc/swmodeltestbase.hxx|   22 -
 sw/qa/uibase/dochdl/dochdl.cxx   |6 
 sw/qa/uibase/docvw/docvw.cxx |6 
 sw/qa/uibase/fldui/fldui.cxx |3 
 sw/qa/uibase/frmdlg/frmdlg.cxx   |2 
 sw/qa/uibase/shells/shells.cxx   |   19 -
 sw/qa/uibase/uiview/uiview.cxx   |3 
 sw/qa/uibase/uno/uno.cxx |5 
 sw/qa/uibase/wrtsh/wrtsh.cxx |   39 +-
 sw/qa/unit/swmodeltestbase.cxx   |   14 
 70 files changed, 1706 insertions(+), 1118 deletions(-)

New commits:
commit 4a6b56a5a1cd8756ff6d0335554fe78bf9988c27
Author: Xisco Fauli 
AuthorDate: Fri Nov 11 14:18:18 2022 +0100
Commit: Xisco Fauli

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

2022-11-11 Thread Caolán McNamara (via logerrit)
 sw/source/ui/vba/vbaformfields.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 69efabc0ce798b86b6971f5a9adca11e98bec4d1
Author: Caolán McNamara 
AuthorDate: Fri Nov 11 13:51:59 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 11 15:56:55 2022 +0100

cid#1516788 Uninitialized pointer field

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

diff --git a/sw/source/ui/vba/vbaformfields.cxx 
b/sw/source/ui/vba/vbaformfields.cxx
index d9b7b6200c1d..ea97615f27f5 100644
--- a/sw/source/ui/vba/vbaformfields.cxx
+++ b/sw/source/ui/vba/vbaformfields.cxx
@@ -128,6 +128,7 @@ public:
 : mxParent(std::move(xParent))
 , mxContext(std::move(xContext))
 , mxModel(std::move(xModel))
+, m_pCache(nullptr)
 {
 }
 


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

2022-11-11 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter8.cxx |2 +-
 sw/qa/inc/swmodeltestbase.hxx   |   24 
 sw/qa/unit/swmodeltestbase.cxx  |   34 +-
 3 files changed, 38 insertions(+), 22 deletions(-)

New commits:
commit 6d37a3e40bd08ccb1edb778088c8a627e728ccc5
Author: Xisco Fauli 
AuthorDate: Fri Nov 11 12:21:15 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 11 15:47:14 2022 +0100

SwModelTestBase: Check supportsService

Also simplify code a bit

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

diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index c5634816ea27..014681eaac46 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -2333,7 +2333,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf128106)
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf103612)
 {
-SwDoc* const pGlobalDoc = createSwDoc("DUMMY.odm");
+SwDoc* const pGlobalDoc = createSwGlobalDoc("DUMMY.odm");
 CPPUNIT_ASSERT_EQUAL(
 size_t(1),
 
pGlobalDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks().size());
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index 24ab586544c8..87ae9b498ff1 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -298,21 +298,10 @@ protected:
 
 void load(const char* pName, const char* pPassword = nullptr)
 {
-return 
loadURLWithComponent(createFileURL(OUString::createFromAscii(pName)),
-"com.sun.star.text.TextDocument", pName, 
pPassword);
+return loadURL(createFileURL(OUString::createFromAscii(pName)), pName, 
pPassword);
 
 }
 
-void load_web(const char* pName, const char* pPassword = nullptr)
-{
-return 
loadURLWithComponent(createFileURL(OUString::createFromAscii(pName)),
-"com.sun.star.text.WebDocument", pName, 
pPassword);
-}
-
-void setTestInteractionHandler(const char* pPassword, 
std::vector& rFilterOptions);
-
-void loadURLWithComponent(OUString const& rURL, OUString const& 
rComponent, const char* pName, const char* pPassword);
-
 void reload(const char* pFilter, const char* pName, const char* pPassword 
= nullptr);
 
 /// Save the loaded document to a tempfile. Can be used to check the 
resulting docx/odt directly as a ZIP file.
@@ -358,6 +347,11 @@ protected:
  */
 SwDoc* createSwWebDoc(const char* pName = nullptr);
 
+/**
+ * As createSwDoc except a Global Document
+ */
+SwDoc* createSwGlobalDoc(const char* pName = nullptr);
+
 /**
  * Gets SwXTextDocument from loaded component
  */
@@ -375,6 +369,12 @@ protected:
 void WrapReqifFromTempFile(SvMemoryStream& rStream);
 
 bool isExported(){ return mbExported; }
+
+private:
+void setTestInteractionHandler(const char* pPassword, 
std::vector& rFilterOptions);
+
+void loadURL(OUString const& rURL, const char* pName, const char* 
pPassword);
+
 };
 
 /**
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index d675c18c2617..b619b7e69779 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -462,8 +462,7 @@ void SwModelTestBase::setTestInteractionHandler(const char* 
pPassword,
 
 void SwModelTestBase::header() {}
 
-void SwModelTestBase::loadURLWithComponent(OUString const& rURL, OUString 
const& rComponent,
-   const char* pName, const char* 
pPassword)
+void SwModelTestBase::loadURL(OUString const& rURL, const char* pName, const 
char* pPassword)
 {
 if (mxComponent.is())
 mxComponent->dispose();
@@ -500,7 +499,7 @@ void SwModelTestBase::loadURLWithComponent(OUString const& 
rURL, OUString const&
 }
 
 mxComponent
-= loadFromDesktop(rURL, rComponent, 
comphelper::containerToSequence(aFilterOptions));
+= loadFromDesktop(rURL, OUString(), 
comphelper::containerToSequence(aFilterOptions));
 
 if (pPassword)
 {
@@ -517,7 +516,7 @@ void SwModelTestBase::reload(const char* pFilter, const 
char* pName, const char*
 {
 save(OUString::createFromAscii(pFilter), pName, pPassword);
 
-loadURLWithComponent(maTempFile.GetURL(), 
"com.sun.star.text.TextDocument", pName, pPassword);
+loadURL(maTempFile.GetURL(), pName, pPassword);
 }
 
 void SwModelTestBase::save(const OUString& aFilterName, const char* pName, 
const char* pPassword)
@@ -612,21 +611,38 @@ void 
SwModelTestBase::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
 SwDoc* SwModelTestBase::createSwDoc(const char* pName)
 {
 if (!pName)
-loadURLWithComponent("private:factory/swriter", 
"com.sun.star.text.TextDocument", pName,
- nullptr);
+loadURL("private:

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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/file_misc.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b74d50003145f3805e3316a51c8be0222e680152
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:59:54 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 15:40:45 2022 +0100

Drop useless std::move of const object

...introduced with d8b60f77f389a248f98aa45592e6e1045baafbe1 
"rtl_String->OString
in DirectoryItem_Impl".

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index c411b78cc260..01842dc73154 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -330,9 +330,9 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory 
pDirectory,
 pImpl = nullptr;
 }
 #ifdef _DIRENT_HAVE_D_TYPE
-pImpl = new DirectoryItem_Impl(std::move(strFilePath), pEntry->d_type);
+pImpl = new DirectoryItem_Impl(strFilePath, pEntry->d_type);
 #else
-pImpl = new DirectoryItem_Impl(std::move(strFilePath));
+pImpl = new DirectoryItem_Impl(strFilePath);
 #endif /* _DIRENT_HAVE_D_TYPE */
 *pItem = pImpl;
 


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

2022-11-11 Thread Caolán McNamara (via logerrit)
 vcl/headless/CairoCommon.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be89fcabd3da94a6441d0e2d07e0980a66d72e98
Author: Caolán McNamara 
AuthorDate: Fri Nov 11 09:02:54 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 11 14:49:54 2022 +0100

ofz#53196 Out-of-memory

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

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index d93ef1f2e5b7..08a14b51bc08 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -715,7 +715,7 @@ bool CairoCommon::drawPolyLine(cairo_t* cr, 
basegfx::B2DRange* pExtents, const C
 
 cairo_set_line_join(cr, eCairoLineJoin);
 cairo_set_line_cap(cr, eCairoLineCap);
-constexpr int MaxNormalLineWidth = 94;
+constexpr int MaxNormalLineWidth = 92;
 if (fLineWidth > MaxNormalLineWidth)
 {
 const double fLineWidthPixel


New Defects reported by Coverity Scan for LibreOffice

2022-11-11 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

2 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1516789:  Incorrect expression  (DIVIDE_BY_ZERO)
/svx/source/styles/CommonStylePreviewRenderer.cxx: 299 in 
svx::CommonStylePreviewRenderer::CalcRenderSize()()



*** CID 1516789:  Incorrect expression  (DIVIDE_BY_ZERO)
/svx/source/styles/CommonStylePreviewRenderer.cxx: 299 in 
svx::CommonStylePreviewRenderer::CalcRenderSize()()
293 break;
294 }
295 while(true);
296 
297 double fRatio = 1;
298 if (mnHeight > mnMaxHeight)
>>> CID 1516789:  Incorrect expression  (DIVIDE_BY_ZERO)
>>> In expression "(double)this->mnMaxHeight / this->mnHeight", division by 
>>> expression "this->mnHeight" which may be zero has undefined behavior.
299 fRatio = double(mnMaxHeight) / mnHeight;
300 
301 mnHeight *= fRatio;
302 mnBaseLine *= fRatio;
303 if (fRatio != 1)
304 {

** CID 1516788:  Uninitialized members  (UNINIT_CTOR)
/sw/source/ui/vba/vbaformfields.cxx: 132 in 
::FormFieldCollectionHelper::FormFieldCollectionHelper(com::sun::star::uno::Reference,
 com::sun::star::uno::Reference, const 
com::sun::star::uno::Reference &)()



*** CID 1516788:  Uninitialized members  (UNINIT_CTOR)
/sw/source/ui/vba/vbaformfields.cxx: 132 in 
::FormFieldCollectionHelper::FormFieldCollectionHelper(com::sun::star::uno::Reference,
 com::sun::star::uno::Reference, const 
com::sun::star::uno::Reference &)()
126   const 
css::uno::Reference xContext,
127   const css::uno::Reference& 
xModel)
128 : mxParent(std::move(xParent))
129 , mxContext(std::move(xContext))
130 , mxModel(std::move(xModel))
131 {
>>> CID 1516788:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pCache" is not initialized in this 
>>> constructor nor in any functions that it calls.
132 }
133 
134 // XIndexAccess
135 virtual sal_Int32 SAL_CALL getCount() override
136 {
137 sal_Int32 nCount = SAL_MAX_INT32;



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DKiZQ_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJir2-2B-2FL-2FLX1x-2FSU410IowzDaqGQn7EXHrDxleMhqmHlLsh-2Bb4V-2BTgn034VTVHqRxeWkSkloDuxLaYIehHNHOyYWgKYIl8KaUw0SZ92qy-2B-2BcmVL9HxVL7WAMhCtwLTzEM3WDSkItJV-2BhEQbaalzFjha7sEFr2pV8I5YSzzMF4IUl-2FM-3D



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

2022-11-11 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter7.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 0b3337c7f4773f84e8cfc2682ee5b1fbde0d51ae
Author: Xisco Fauli 
AuthorDate: Fri Nov 11 13:57:04 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 11 14:36:47 2022 +0100

uiwriter7: simplify code

kudos to Mike Kaganski

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

diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx 
b/sw/qa/extras/uiwriter/uiwriter7.cxx
index 35eef322044e..a54caedd32c6 100644
--- a/sw/qa/extras/uiwriter/uiwriter7.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -2055,8 +2055,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, 
testEmbeddedDataSource)
 
 // Load: should have a component and a data source, too.
 // Path with "#" must not cause issues
-OUString aURL = OUString::Concat(u"hash%23path/") + 
"embedded-data-source.odt";
-createSwDoc(aURL.toUtf8().getStr());
+createSwDoc("hash%23path/embedded-data-source.odt");
 CPPUNIT_ASSERT(xDatabaseContext->hasByName("calc-data-source"));
 
 // Data source has a table named Sheet1.


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 sw/source/ui/vba/vbaformfield.cxx  |2 +-
 sw/source/ui/vba/vbaformfields.cxx |   12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit d9c708f78de6f6ef6621b47123a0ff164ddfee93
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:22:40 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 14:31:25 2022 +0100

Clean up some seeming copy/paste mistakes

...all introduced with 2a26f136a36791c06caa895d5a25f4633fd10651 "tdf#151548 
vba
FormFields: Add basic word::XFormField support":

For the SwVbaFormField ctor, std::move of a const lvalue has no effect here.
(And I just don't bother applying the move-from-pass-by-value-param 
optimization
here.)

For FormFieldCollectionHelper, consistently make the data members non-const 
(a
const css::uno::Reference wouldn't make that much sense anyway, as it 
doesn't
transitively apply const'ness also to the referenced object) and 
non-reference,
and make the FormFieldCollectionHelper params non-const (and non-reference) 
to
make the move-from-pass-by-value-param optimization actually work here.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/sw/source/ui/vba/vbaformfield.cxx 
b/sw/source/ui/vba/vbaformfield.cxx
index 50008fc9c2b7..35e8927fe02e 100644
--- a/sw/source/ui/vba/vbaformfield.cxx
+++ b/sw/source/ui/vba/vbaformfield.cxx
@@ -45,7 +45,7 @@ SwVbaFormField::SwVbaFormField(const 
uno::Reference&
const uno::Reference& xModel,
sw::mark::IFieldmark& rFormField)
 : SwVbaFormField_BASE(rParent, rContext)
-, mxModel(std::move(xModel))
+, mxModel(xModel)
 , m_rFormField(rFormField)
 {
 }
diff --git a/sw/source/ui/vba/vbaformfields.cxx 
b/sw/source/ui/vba/vbaformfields.cxx
index cf82f72d7a01..d9b7b6200c1d 100644
--- a/sw/source/ui/vba/vbaformfields.cxx
+++ b/sw/source/ui/vba/vbaformfields.cxx
@@ -115,16 +115,16 @@ class FormFieldCollectionHelper
 container::XEnumerationAccess>
 {
 private:
-const uno::Reference mxParent;
-const uno::Reference mxContext;
-const css::uno::Reference& mxModel;
+uno::Reference mxParent;
+uno::Reference mxContext;
+css::uno::Reference mxModel;
 sw::mark::IFieldmark* m_pCache;
 
 public:
 /// @throws css::uno::RuntimeException
-FormFieldCollectionHelper(const css::uno::Reference 
xParent,
-  const 
css::uno::Reference xContext,
-  const css::uno::Reference& xModel)
+FormFieldCollectionHelper(css::uno::Reference 
xParent,
+  css::uno::Reference 
xContext,
+  css::uno::Reference xModel)
 : mxParent(std::move(xParent))
 , mxContext(std::move(xContext))
 , mxModel(std::move(xModel))


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

2022-11-11 Thread Eike Rathke (via logerrit)
 sc/source/ui/docshell/impex.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5db9d8356c8fdc732942357cd2171ba27eda8647
Author: Eike Rathke 
AuthorDate: Thu Nov 10 20:40:44 2022 +0100
Commit: Eike Rathke 
CommitDate: Fri Nov 11 14:24:25 2022 +0100

Resolves: tdf#151947 Merging separators must not scan for field end

Regression introduced with

commit cf777cfcb22647b1f2d6ace307fbcc4f6d2cca30
CommitDate: Sun Oct 2 17:07:06 2022 +0200

Resolves: tdf#125110 tdf#151211 Disentangle the convoluted 
CSV/TSV-clip import

a copy-paste replacement logic error.

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

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 5ef0cca91c28..1b8d715890b9 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1919,7 +1919,7 @@ const sal_Unicode* 
ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
 }
 if ( bMergeSeps )   // skip following delimiters
 {
-while (!lcl_isFieldEnd( *p, pSeps))
+while (*p && ScGlobal::UnicodeStrChr( pSeps, *p))
 p++;
 }
 return p;


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 vcl/source/font/PhysicalFontFace.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 37e95b4d6754d2c77a76a84ce51a0b18df93927f
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:42:32 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 14:10:49 2022 +0100

Drop a counterproductive top-level const

...that was apparently left by accident by
caa10a1f80da856debf4f397503f27c86199208f "vcl: Use a hb_face_t wrapper in
TrueTypeFace", thwarting the use of std::move here.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/vcl/source/font/PhysicalFontFace.cxx 
b/vcl/source/font/PhysicalFontFace.cxx
index 05f9a4519b61..975ace9ad264 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -344,7 +344,7 @@ class TrueTypeFace final : public AbstractTrueTypeFont
 }
 
 public:
-TrueTypeFace(const RawFace aFace, const FontCharMapRef rCharMap)
+TrueTypeFace(RawFace aFace, const FontCharMapRef rCharMap)
 : AbstractTrueTypeFont(nullptr, rCharMap)
 , m_aFace(std::move(aFace))
 {


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 15abaa8a35ddca43cebf884ec728350f9ae8fb08
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:52:45 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 14:10:01 2022 +0100

Drop counterproductive const'ness of a member function

...introduced in c8d2fa176a15a7ae76d6a4b76aea5f108313c2ec "reduce copying in
drawinglayer", but thwarting the use of std::move on a data member.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 266b3151873f..9adc4e713b22 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -69,7 +69,7 @@ public:
 
 // data access
 const drawinglayer::primitive2d::Primitive2DContainer& 
getPrimitive2DSequence() const { return maPrimitive2DSequence; }
-drawinglayer::primitive2d::Primitive2DContainer 
extractPrimitive2DSequence() const { return std::move(maPrimitive2DSequence); }
+drawinglayer::primitive2d::Primitive2DContainer 
extractPrimitive2DSequence() { return std::move(maPrimitive2DSequence); }
 };
 
 AnimatedExtractingProcessor2D::AnimatedExtractingProcessor2D(


[Libreoffice-commits] core.git: Branch 'feature/wasm' - include/LibreOfficeKit

2022-11-11 Thread Michael Stahl (via logerrit)
 include/LibreOfficeKit/LibreOfficeKitInit.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dfb8b9ed3074f4bf8a89738aad2f35dd6cc6bb0e
Author: Michael Stahl 
AuthorDate: Fri Nov 11 13:51:43 2022 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 11 13:55:27 2022 +0100

WASM LibreOfficeKit add EMSCRIPTEN to ifdef

diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index 2ceeab052e33..08feb42c1e18 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -20,7 +20,7 @@
 
 #if defined(__linux__) || defined (__FreeBSD__) || defined(_AIX) ||\
 defined(_WIN32) || defined(__APPLE__) || defined (__NetBSD__) ||\
-defined (__sun) || defined(__OpenBSD__)
+defined (__sun) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
 
 #include 
 #include 


[Libreoffice-commits] core.git: Branch 'feature/wasm' - 2 commits - configure.ac static/CustomTarget_emscripten_fs_image.mk

2022-11-11 Thread Balázs Varga (allotropia) (via logerrit)
 configure.ac   |4 ++--
 static/CustomTarget_emscripten_fs_image.mk |   24 ++--
 2 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit 21ff9ac9ff6b0c072e6260e668bae1ce039ee9cb
Author: Balázs Varga (allotropia) 
AuthorDate: Thu Nov 10 13:52:21 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Nov 11 13:46:31 2022 +0100

Revert "use uname for detecting WSL"

Since this patch breaks WSL2 builds on windows.

This reverts commit 5a8a1c4a86938b65c5ea7807f60e721946d7d8de.

Change-Id: Idd68a2609b81881af87ae777b5c4bf9cc2d8ef88

diff --git a/configure.ac b/configure.ac
index 04201869eabf..41996406c74e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,9 +302,9 @@ dnl checks build and host OSes
 dnl do this before argument processing to allow for platform dependent defaults
 dnl ===
 
-# Check for WSL. But if --host is explicitly specified (to really do build for
+# Check for WSL (version 2, at least). But if --host is explicitly specified 
(to really do build for
 # Linux on WSL) trust that.
-if test -z "$host" -a -z "$build" -a "$(uname -r | grep -i Microsoft 
2>/dev/null)" != ""; then
+if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
 ac_cv_host="x86_64-pc-wsl"
 ac_cv_host_cpu="x86_64"
 ac_cv_host_os="wsl"
commit f8d29cea616cf90e1986cb27f4252b2e5b1a93cb
Author: Balázs Varga (allotropia) 
AuthorDate: Thu Nov 10 19:26:31 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Nov 11 13:46:13 2022 +0100

WASM: fix loading writer docs after rebase

Add missing UI elements to emscripten fs image.

Change-Id: I1165fd227674656b818247e58b0a24e815c63392

diff --git a/static/CustomTarget_emscripten_fs_image.mk 
b/static/CustomTarget_emscripten_fs_image.mk
index 6ce38af75cbb..2d1a3c0eb58b 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -385,10 +385,10 @@ gb_emscripten_fs_image_files += \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/menubar/menubar.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/anchor.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/annotation.xml
 \
-
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/drawtext.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/draw.xml
 \
-
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/formrichtext.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/drawtext.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/form.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/formrichtext.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/frame.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/graphic.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swform/popupmenu/insertfield.xml
 \
@@ -545,6 +545,17 @@ gb_emscripten_fs_image_files += \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/optimizetablebar.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/previewobjectbar.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-annotation.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-draw.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-drawtext.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-form.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-frame.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-graphic.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-media.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-ole.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-printpreview.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-table.xml
 \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/singlemode-text.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/toolbar/standardbar.xml
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swrite

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

2022-11-11 Thread Miklos Vajna (via logerrit)
 sw/source/core/crsr/contentcontrolbutton.cxx |   18 -
 sw/source/core/crsr/dropdowncontentcontrolbutton.cxx |1 
 sw/source/core/crsr/viscrs.cxx   |   20 ++-
 sw/source/core/inc/contentcontrolbutton.hxx  |2 +
 4 files changed, 39 insertions(+), 2 deletions(-)

New commits:
commit e716ed8687a4eb99d9e8e1480dd7bfb2c872df7f
Author: Miklos Vajna 
AuthorDate: Fri Nov 11 08:46:32 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 11 13:03:40 2022 +0100

tdf#151980 sw content controls: fix RTL render of dropdowns

- check if this widget is meant to be RTL in
  SwSelPaintRects::HighlightContentControl()

- route RTLness to the underlying tree view / drop-down in
  SwDropDownContentControlButton::InitDropdown()

- fix up SwContentControlButton (positioning, rendering, hit testing) to
  assume the button on the left of the first text portion in the RTL
  case

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

diff --git a/sw/source/core/crsr/contentcontrolbutton.cxx 
b/sw/source/core/crsr/contentcontrolbutton.cxx
index cd3deb5459bb..908d5f1bff01 100644
--- a/sw/source/core/crsr/contentcontrolbutton.cxx
+++ b/sw/source/core/crsr/contentcontrolbutton.cxx
@@ -71,6 +71,10 @@ void SwContentControlButton::CalcPosAndSize(const SwRect& 
rPortionPaintArea)
 m_aFramePixel = tools::Rectangle(aBoxPos, aBoxSize);
 
 // Then extend the size with the button area
+if (m_bRTL)
+{
+
aBoxPos.AdjustX(-GetParent()->LogicToPixel(rPortionPaintArea.SSize()).Height());
+}
 
aBoxSize.AdjustWidth(GetParent()->LogicToPixel(rPortionPaintArea.SSize()).Height());
 
 if (aBoxPos != GetPosPixel() || aBoxSize != GetSizePixel())
@@ -112,7 +116,14 @@ void SwContentControlButton::Paint(vcl::RenderContext& 
rRenderContext, const too
 
 // Draw the button next to the frame
 Point aButtonPos(aFrameRect.TopLeft());
-aButtonPos.AdjustX(aFrameRect.GetSize().getWidth() - nPadding * 2);
+if (m_bRTL)
+{
+aButtonPos.AdjustX(nPadding * 2);
+}
+else
+{
+aButtonPos.AdjustX(aFrameRect.GetSize().getWidth() - nPadding * 2);
+}
 Size aButtonSize(aFrameRect.GetSize());
 aButtonSize.setWidth(GetSizePixel().getWidth() - aFrameRect.getOpenWidth() 
- nPadding);
 const tools::Rectangle aButtonRect(tools::Rectangle(aButtonPos, 
aButtonSize));
@@ -153,6 +164,11 @@ WindowHitTest SwContentControlButton::ImplHitTest(const 
Point& rFramePos)
 return aResult;
 else
 {
+if (m_bRTL)
+{
+return rFramePos.X() <= m_aFramePixel.Left() ? 
WindowHitTest::Inside
+ : 
WindowHitTest::Transparent;
+}
 return rFramePos.X() >= m_aFramePixel.Right() ? WindowHitTest::Inside
   : 
WindowHitTest::Transparent;
 }
diff --git a/sw/source/core/crsr/dropdowncontentcontrolbutton.cxx 
b/sw/source/core/crsr/dropdowncontentcontrolbutton.cxx
index 14f1ba7e84b0..ba47c33f2607 100644
--- a/sw/source/core/crsr/dropdowncontentcontrolbutton.cxx
+++ b/sw/source/core/crsr/dropdowncontentcontrolbutton.cxx
@@ -42,6 +42,7 @@ void SwDropDownContentControlButton::InitDropdown()
 tools::Long nMinListWidth = GetSizePixel().Width();
 aSize.setWidth(std::max(aSize.Width(), nMinListWidth));
 m_xTreeView->set_size_request(aSize.Width(), aSize.Height());
+m_xTreeView->set_direction(m_bRTL);
 }
 
 IMPL_LINK(SwDropDownContentControlButton, ListBoxHandler, weld::TreeView&, 
rBox, bool)
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 4d34e9b89d35..dd4db78517a4 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -637,6 +637,7 @@ void SwSelPaintRects::HighlightContentControl()
 std::vector aLOKRectangles;
 SwRect aFirstPortionPaintArea;
 SwRect aLastPortionPaintArea;
+bool bRTL = false;
 std::shared_ptr pContentControl;
 
 if (m_bShowContentControlOverlay)
@@ -683,6 +684,15 @@ void SwSelPaintRects::HighlightContentControl()
 aLastPortionPaintArea = (*pRects)[pRects->size() - 1];
 }
 pContentControl = 
pCurContentControlAtCursor->GetContentControl().GetContentControl();
+
+// The layout knows if the text node is RTL (either set directly, 
or inherited from the
+// environment).
+SwIterator 
aFrames(*pTextNode);
+SwTextFrame* pFrame = aFrames.First();
+if (pFrame)
+{
+bRTL = pFrame->IsRightToLeft();
+}
 }
 }
 
@@ -756,7 +766,15 @@ void SwSelPaintRects::HighlightContentControl()
 m_pContentControlButton = 
VclPtr::Create(
 

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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 vcl/source/gdi/impglyphitem.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ecb6ba6fb677a711afd515139cc7cf9cce771003
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 19:06:01 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 12:34:34 2022 +0100

Drop useless std::move of const object

...introduced with 6c8dffc19e2a570d5665344dcba6afedd3dc2e15 "compute subset 
of glyphs in SalLayoutGlyphsCache (tdf#139604)".

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 526df693bf3c..4ca745f6063c 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -407,7 +407,7 @@ SalLayoutGlyphsCache::GetLayoutGlyphs(VclPtr outputDevice, c
 = makeGlyphsSubset(itWhole->second, outputDevice, text, 
nIndex, nLen);
 if (mLastTemporaryGlyphs.IsValid())
 {
-mLastTemporaryKey = std::move(key);
+mLastTemporaryKey = key;
 #ifdef DBG_UTIL
 std::shared_ptr 
tmpLayoutCache;
 if (layoutCache == nullptr)


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 comphelper/source/container/enumhelper.cxx |2 +-
 include/comphelper/enumhelper.hxx  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ed38659127ac801666de1bc423855d2b666f7150
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 19:01:49 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 12:30:03 2022 +0100

Drop counterproductive top-level const

...that was apparently left by accident by
24c709655e5c1ca51c6c6da7ef0cb733354f6d20 "clang-tidy 
modernize-pass-by-value in
comphelper", thwarting the use of std::move here.

And clean up the declarations in the include file, too.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/comphelper/source/container/enumhelper.cxx 
b/comphelper/source/container/enumhelper.cxx
index bc9ae43e44ad..66ba15198232 100644
--- a/comphelper/source/container/enumhelper.cxx
+++ b/comphelper/source/container/enumhelper.cxx
@@ -36,7 +36,7 @@ 
OEnumerationByName::OEnumerationByName(css::uno::Reference _xAccess,
+OEnumerationByName::OEnumerationByName(css::uno::Reference
 _xAccess,
std::vector _aNames  )
 :m_aNames(std::move(_aNames))
 ,m_xAccess(std::move(_xAccess))
diff --git a/include/comphelper/enumhelper.hxx 
b/include/comphelper/enumhelper.hxx
index fb26de48971d..91e8af5b8f9a 100644
--- a/include/comphelper/enumhelper.hxx
+++ b/include/comphelper/enumhelper.hxx
@@ -48,8 +48,8 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName final :
 std::mutex m_aLock;
 
 public:
-OEnumerationByName(const css::uno::Reference< css::container::XNameAccess 
> _xAccess);
-OEnumerationByName(const css::uno::Reference< css::container::XNameAccess 
> _xAccess,
+OEnumerationByName(css::uno::Reference< css::container::XNameAccess > 
_xAccess);
+OEnumerationByName(css::uno::Reference< css::container::XNameAccess > 
_xAccess,
std::vector _aNames  );
 virtual ~OEnumerationByName() override;
 


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dbbfcfed6f877ad2446daefe1083f42994f28a1f
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:56:56 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 12:29:28 2022 +0100

Drop counterproductive top-level consts

...that were apparently left by accident by
b4b4c129e9f00189978cd7b71fd74d0dca4c9ebc "clang-tidy 
modernize-pass-by-value in
ucb", thwarting the use of std::move here.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
index 66b0aee8ec49..e0f2e856030a 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -191,8 +191,8 @@ namespace http_dav_ucp
 css::uno::Any const   value;
 
 ProppatchValue( const ProppatchOperation o,
-const OUString n,
-const css::uno::Any v )
+OUString n,
+css::uno::Any v )
 : operation( o ), name( std::move(n) ), value( std::move(v) ) {}
 };
 } // namespace http_dav_ucp


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

2022-11-11 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c222722619ffcdcff17cfad8b932d5108eb54617
Author: Miklos Vajna 
AuthorDate: Thu Nov 10 20:16:06 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 11 12:08:57 2022 +0100

CppunitTest_sw_ooxmlexport10: use more SwParaPortion::dumpAsXml()

See commit feeed3e762cf077fbd9cf48f82e949365108ccc1
(CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing,
2022-04-07) for motivation.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index e5e7394c964c..29d15f6d2b22 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -1045,10 +1045,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95377, "tdf95377.docx")
 
 //default style has numbering enabled.  Styles inherit numbering unless 
specifically disabled
 xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-assertXPath(pXmlDoc, "//body/txt/Special", 3);  //first three paragraphs 
have numbering
-assertXPath(pXmlDoc, "//body/txt[1]/Special", "rText", "a.");
-assertXPath(pXmlDoc, "//body/txt[2]/Special", "rText", "b.");
-assertXPath(pXmlDoc, "//body/txt[3]/Special", "rText", "c.");
+assertXPath(pXmlDoc, 
"//body/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", 
3);  //first three paragraphs have numbering
+assertXPath(pXmlDoc, 
"//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "expand", "a.");
+assertXPath(pXmlDoc, 
"//body/txt[2]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "expand", "b.");
+assertXPath(pXmlDoc, 
"//body/txt[3]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "expand", "c.");
 assertXPath(pXmlDoc, "/root/page/body/txt[4]/Special", 0); //last 
paragraph style disables numbering
 }
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-11 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59226be8dcf1bd374d4c16dbff8a382bbfeb6d1d
Author: Olivier Hallot 
AuthorDate: Fri Nov 11 07:33:24 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Nov 11 11:33:24 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 0a4258b67775ee61f6d2f0b9b45b6437c508d338
  - tdf#151665 Track changes in margins

These track changes show options are not in the track changes
menu but are available in the track changes toolbar.

They apply to Writer only, Calc does not have a track change toolbar.

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

diff --git a/helpcontent2 b/helpcontent2
index f4fe6532ba4c..0a4258b67775 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f4fe6532ba4c65ee5baecfb4dc5167fd9111b97a
+Subproject commit 0a4258b67775ee61f6d2f0b9b45b6437c508d338


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

2022-11-11 Thread Olivier Hallot (via logerrit)
 source/text/shared/01/02230200.xhp |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 0a4258b67775ee61f6d2f0b9b45b6437c508d338
Author: Olivier Hallot 
AuthorDate: Thu Nov 10 17:41:44 2022 -0300
Commit: Olivier Hallot 
CommitDate: Fri Nov 11 11:33:22 2022 +0100

tdf#151665 Track changes in margins

These track changes show options are not in the track changes
menu but are available in the track changes toolbar.

They apply to Writer only, Calc does not have a track change toolbar.

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

diff --git a/source/text/shared/01/02230200.xhp 
b/source/text/shared/01/02230200.xhp
index 3a1815654f..d4b5946150 100644
--- a/source/text/shared/01/02230200.xhp
+++ b/source/text/shared/01/02230200.xhp
@@ -38,8 +38,7 @@
 
 
 Show Track Changes
-Shows or hides recorded changes.
-
+Shows or hides recorded 
changes.
 
 
   
@@ -63,6 +62,15 @@
 Show rejected changes
 Shows or hides the 
changes that were rejected.
 
+
+  The commands 
below are available in the Track Changes toolbar only.
+  All Changes Inline
+  The default. 
Insertions and deletions are displayed in the contents according to the 
settings in %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME 
Writer - Changes.
+  Deletions in Margin
+  Show the deleted 
contents in the margin. Insertions are displayed in the contents.
+  Insertions in Margin
+  Show the inserted 
contents in the margin. Deletions are displayed in the contents.
+
 
 
 


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 emfio/source/reader/mtftools.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d8907a7d5be6c81f68ab36353c231ad23681780
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:50:34 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 11:31:18 2022 +0100

Revert useless std::move of const object

...added with f71606c920a3f78294da745cd9ef1eacde010224 "new 
loplugin:moveit".

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 02643b202ef8..7acb1a2b7c1f 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1330,7 +1330,7 @@ namespace emfio
 maFillStyle = maBkColor;
 mnBkMode = BackgroundMode::OPAQUE;
 ImplSetNonPersistentLineColorTransparenz();
-DrawPolygon(std::move(aPoly), false);
+DrawPolygon(aPoly, false);
 mnBkMode = mnBkModeBackup; // The rectangle needs to be always drawned 
even if mode is transparent
 maFillStyle = aFillStyleBackup;
 maLineStyle.bTransparent = aTransparentBackup;


[Libreoffice-commits] core.git: helpcontent2

2022-11-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 54d6e292fbc25d296aabf879915afc1ea69a34f8
Author: Rafael Lima 
AuthorDate: Fri Nov 11 12:29:33 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Nov 11 11:29:33 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to f4fe6532ba4c65ee5baecfb4dc5167fd9111b97a
  - tdf#149221 More fixes to the Database Wizard dialog

This patch create necessary HIDs for the Database Wizard dialog. It 
also creates a new help page named Connection Settings to serve as target for 
the widgets in dbwizconnectionpage.ui.

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

diff --git a/helpcontent2 b/helpcontent2
index ff13d5c7d701..f4fe6532ba4c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ff13d5c7d7014dde45a7712d96596accdb2209e1
+Subproject commit f4fe6532ba4c65ee5baecfb4dc5167fd9111b97a


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

2022-11-11 Thread Rafael Lima (via logerrit)
 AllLangHelp_sdatabase.mk  |1 
 source/text/sdatabase/dabawiz00.xhp   |   11 +++-
 source/text/sdatabase/dabawiz02connection.xhp |   59 ++
 source/text/shared/00/0001.xhp|2 
 4 files changed, 69 insertions(+), 4 deletions(-)

New commits:
commit f4fe6532ba4c65ee5baecfb4dc5167fd9111b97a
Author: Rafael Lima 
AuthorDate: Wed Nov 9 16:04:13 2022 +0200
Commit: Olivier Hallot 
CommitDate: Fri Nov 11 11:29:30 2022 +0100

tdf#149221 More fixes to the Database Wizard dialog

This patch create necessary HIDs for the Database Wizard dialog. It also 
creates a new help page named Connection Settings to serve as target for the 
widgets in dbwizconnectionpage.ui.

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

diff --git a/AllLangHelp_sdatabase.mk b/AllLangHelp_sdatabase.mk
index b715812eec..1ab70ab906 100644
--- a/AllLangHelp_sdatabase.mk
+++ b/AllLangHelp_sdatabase.mk
@@ -62,6 +62,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sdatabase,\
 helpcontent2/source/text/sdatabase/dabawiz02 \
 helpcontent2/source/text/sdatabase/dabawiz02access \
 helpcontent2/source/text/sdatabase/dabawiz02ado \
+helpcontent2/source/text/sdatabase/dabawiz02connection \
 helpcontent2/source/text/sdatabase/dabawiz02dbase \
 helpcontent2/source/text/sdatabase/dabawiz02jdbc \
 helpcontent2/source/text/sdatabase/dabawiz02mysql \
diff --git a/source/text/sdatabase/dabawiz00.xhp 
b/source/text/sdatabase/dabawiz00.xhp
index 7c8fb92d5c..b8b001787f 100644
--- a/source/text/sdatabase/dabawiz00.xhp
+++ b/source/text/sdatabase/dabawiz00.xhp
@@ -49,7 +49,9 @@
 If you create a 
new database file, the wizard contains two steps.
 
 
-If you open the 
Database Wizard to create a database file for an existing database connection, 
there may be more steps to specify paths, authentication information, and 
more.
+
+
+ODBC settings
 Set up text file 
connection
 
 
@@ -60,11 +62,12 @@
 Set up dBASE 
connection
 Set up JDBC 
connection
 Set up Oracle database 
connection
-
-ODBC settings
+Set up MariaDB and MySQL 
connection
 Set up Spreadsheet 
connection
-
+
 
 
+
+
 
 
diff --git a/source/text/sdatabase/dabawiz02connection.xhp 
b/source/text/sdatabase/dabawiz02connection.xhp
new file mode 100644
index 00..27adf45ed9
--- /dev/null
+++ b/source/text/sdatabase/dabawiz02connection.xhp
@@ -0,0 +1,59 @@
+
+
+
+  
+
+  Connection settings
+  /text/sdatabase/dabawiz02connection.xhp
+
+  
+
+
+
+  
+  
+databases;connection settings
+  
+  Connection settings
+  Defines the connection settings to an existing 
database.
+
+
+  The options in this dialog will vary 
depending on the databse driver selected in the Select 
database pane of the Database Wizard. Help 
pages for each specific options for each database driver as given below.
+
+  Enter connection string
+  
+  Specify the 
connection string to the selected database.
+
+  Create new
+  
+  Choose the path and 
file name of the new database file.
+
+  Browse
+  
+  Select an existing 
database file.
+
+  Other connection options
+  The help pages below 
describe the options that are specific to each available database 
driver.
+  
+
+  
+
+  
+
+
diff --git a/source/text/shared/00/0001.xhp 
b/source/text/shared/00/0001.xhp
index c98becce12..8b670b010e 100644
--- a/source/text/shared/00/0001.xhp
+++ b/source/text/shared/00/0001.xhp
@@ -36,6 +36,7 @@
 
 
 
+
 Cancel
   Clicking Cancel closes a dialog without saving any changes 
made.
 
@@ -43,6 +44,7 @@
 
 
 
+
 Finish
   Applies all changes and closes the wizard.
 


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 svx/source/svdraw/svddrgmt.cxx |4 ++--
 vcl/source/filter/svm/SvmConverter.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7079cf51a95c8efb1ba250e829bddfcaf6bbc132
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:48:08 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 11:23:03 2022 +0100

Revert useless std::move of const objects

...added with 8a843f7e98dfe6bfb04e91e5b16e3a1df18fbf58 "loplugin:moveit".

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 4a332e8271c7..37531632c5b4 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -2881,7 +2881,7 @@ void SdrDragCrook::createSdrDragEntries()
 
 if(aDragRaster.count())
 {
-addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(std::move(aDragRaster;
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(aDragRaster)));
 }
 }
 
@@ -3412,7 +3412,7 @@ void SdrDragDistort::createSdrDragEntries()
 
 if(aDragRaster.count())
 {
-addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(std::move(aDragRaster;
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(aDragRaster)));
 }
 }
 
diff --git a/vcl/source/filter/svm/SvmConverter.cxx 
b/vcl/source/filter/svm/SvmConverter.cxx
index 063c6e45b505..0729a41c767e 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -550,7 +550,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, 
false ) );
 rMtf.AddAction( new MetaPolygonAction( aPoly ) );
 rMtf.AddAction( new MetaPopAction() );
-rMtf.AddAction( new MetaPolyLineAction( std::move(aPoly), 
aLineInfo ) );
+rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) 
);
 }
 else
 rMtf.AddAction( new MetaArcAction( aRect, aPt, aPt1 ) );
@@ -571,7 +571,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, 
false ) );
 rMtf.AddAction( new MetaPolygonAction( aPoly ) );
 rMtf.AddAction( new MetaPopAction() );
-rMtf.AddAction( new MetaPolyLineAction( std::move(aPoly), 
aLineInfo ) );
+rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) 
);
 }
 else
 rMtf.AddAction( new MetaPieAction( aRect, aPt, aPt1 ) );


[Libreoffice-commits] core.git: oovbaapi/ooo sw/Library_vbaswobj.mk sw/qa sw/source

2022-11-11 Thread Justin Luth (via logerrit)
 oovbaapi/ooo/vba/word/XCheckBox.idl   |   14 +++
 sw/Library_vbaswobj.mk|1 
 sw/qa/core/data/docm/testVBA.docm |binary
 sw/source/core/crsr/bookmark.cxx  |   11 ++
 sw/source/core/inc/bookmark.hxx   |2 
 sw/source/ui/vba/vbaformfield.cxx |6 -
 sw/source/ui/vba/vbaformfieldcheckbox.cxx |  120 ++
 sw/source/ui/vba/vbaformfieldcheckbox.hxx |   56 ++
 8 files changed, 207 insertions(+), 3 deletions(-)

New commits:
commit 7444c8c87a228e4259f5dd34edfcf4c92ed02504
Author: Justin Luth 
AuthorDate: Thu Nov 3 10:05:24 2022 -0400
Commit: Miklos Vajna 
CommitDate: Fri Nov 11 11:19:21 2022 +0100

tdf#151548 vba FormFields: Add basic word::XCheckBox support

make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba

This now allows MS Word Basic legacy checkbox form fields
to be controlled by VBA basic.
-allows getting and setting the checkbox value

TODO:
-wire up entry and exit macros
-wire up StarBASIC support (hmm, how would that be different?)
   -probably completely ignore this. formfields hidden from
normal writer - only activeX and content controls shown.
-setup tri-state for checkboxes: with a separate default value

Change-Id: Ied47a507dd9acc2c8dfd1472e6704e9dd571b480
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142253
Reviewed-by: Justin Luth 
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/oovbaapi/ooo/vba/word/XCheckBox.idl 
b/oovbaapi/ooo/vba/word/XCheckBox.idl
index 42b7dd8b1f60..f1eb13a19c54 100644
--- a/oovbaapi/ooo/vba/word/XCheckBox.idl
+++ b/oovbaapi/ooo/vba/word/XCheckBox.idl
@@ -22,7 +22,21 @@ module ooo {  module vba {  module word {
 interface XCheckBox
 {
 interface ooo::vba::XHelperInterface;
+interface com::sun::star::script::XDefaultProperty;
 
+/// Default member: True if the specified form field object is a valid 
check box form field.
+[attribute, readonly] boolean Valid;
+
+/** AutoSize:
+ * True sizes the check box or text frame according to the font size of 
the surrounding text.
+ * False sizes the check box or text frame according to the Size property.
+ */
+[attribute] boolean AutoSize;
+/// Returns or sets the default check box value. True if the default value 
is checked.
+[attribute] boolean Default;
+/// Returns or sets the size of a check box, in points.
+[attribute] long Size;
+/// Returns or sets true if the check box is ticked.
 [attribute] boolean Value;
 };
 
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
index 752f682f2461..027b67a5f12c 100644
--- a/sw/Library_vbaswobj.mk
+++ b/sw/Library_vbaswobj.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_add_exception_objects,vbaswobj,\
 sw/source/ui/vba/vbacolumns \
 sw/source/ui/vba/vbaformfield \
 sw/source/ui/vba/vbaformfields \
+sw/source/ui/vba/vbaformfieldcheckbox \
 sw/source/ui/vba/vbaframe \
 sw/source/ui/vba/vbaframes \
 sw/source/ui/vba/vbalistformat \
diff --git a/sw/qa/core/data/docm/testVBA.docm 
b/sw/qa/core/data/docm/testVBA.docm
index a2609feb6cd0..58ac4e8bd3ae 100644
Binary files a/sw/qa/core/data/docm/testVBA.docm and 
b/sw/qa/core/data/docm/testVBA.docm differ
diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx
index 6801dd64db14..8bc383f01b23 100644
--- a/sw/source/core/crsr/bookmark.cxx
+++ b/sw/source/core/crsr/bookmark.cxx
@@ -644,6 +644,17 @@ namespace sw::mark
 return bResult;
 }
 
+OUString CheckboxFieldmark::GetContent() const
+{
+return IsChecked() ? "1" : "0";
+}
+
+void CheckboxFieldmark::ReplaceContent(const OUString& sNewContent)
+{
+SetChecked(sNewContent.toBoolean());
+Invalidate();
+}
+
 FieldmarkWithDropDownButton::FieldmarkWithDropDownButton(const SwPaM& rPaM)
 : NonTextFieldmark(rPaM)
 , m_pButton(nullptr)
diff --git a/sw/source/core/inc/bookmark.hxx b/sw/source/core/inc/bookmark.hxx
index 4dbfba8391e0..94788b8dcdcf 100644
--- a/sw/source/core/inc/bookmark.hxx
+++ b/sw/source/core/inc/bookmark.hxx
@@ -262,6 +262,8 @@ namespace sw::mark {
 CheckboxFieldmark(const SwPaM& rPaM, const OUString& rName);
 bool IsChecked() const override;
 void SetChecked(bool checked) override;
+virtual OUString GetContent() const override;
+virtual void ReplaceContent(const OUString& sNewContent) override;
 };
 
 /// Fieldmark with a drop down button (e.g. this button opens the date 
picker for a date field)
diff --git a/sw/source/ui/vba/vbaformfield.cxx 
b/sw/source/ui/vba/vbaformfield.cxx
index 43b9f25cf660..50008fc9c2b7 100644
--- a/sw/source/ui/vba/vbaformfield.cxx
+++ b/sw/source/ui/vba/vbaformfield.cxx
@@ -25,6 +25,7 @@
 #include 
 
 #include "vbaformfield.hxx"
+#include "vbaformfieldcheckbox.hxx"
 #include "wor

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

2022-11-11 Thread Julien Nabet (via logerrit)
 vcl/skia/skia_denylist_vulkan.xml |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d1080d500a6063345e887d9463c57ff0c9d61a78
Author: Julien Nabet 
AuthorDate: Wed Nov 9 13:57:08 2022 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 11 11:17:03 2022 +0100

tdf#151929: crash if video card changed (Win nVidia GTX 670)

Change-Id: I9566487ed8353674d623cd270c85edcdbfa263b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142486
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit a0dec4bc9a48b263be182ad7bbe4ba3f8cbb27e1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142447
Reviewed-by: Michael Stahl 

diff --git a/vcl/skia/skia_denylist_vulkan.xml 
b/vcl/skia/skia_denylist_vulkan.xml
index 39163fc9a71e..8170f60febcc 100644
--- a/vcl/skia/skia_denylist_vulkan.xml
+++ b/vcl/skia/skia_denylist_vulkan.xml
@@ -36,6 +36,9 @@
 
 
 
+ 
+
+
  
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-11 Thread Bogdan B (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1b5c7bad0f332b6923aa820301fc1ff6d00bd0ea
Author: Bogdan B 
AuthorDate: Fri Nov 11 12:13:11 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Nov 11 11:13:11 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to ff13d5c7d7014dde45a7712d96596accdb2209e1
  - tdf#148727 Correct sum example

Change-Id: I117d3dccbda28ad6a851f537e00ed2aafb697c22
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142438
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index ddd19fff6834..ff13d5c7d701 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ddd19fff68342bc96ebdc88df7be56e4ec64a859
+Subproject commit ff13d5c7d7014dde45a7712d96596accdb2209e1


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

2022-11-11 Thread Bogdan B (via logerrit)
 source/text/swriter/02/1402.xhp |   97 +---
 1 file changed, 48 insertions(+), 49 deletions(-)

New commits:
commit ff13d5c7d7014dde45a7712d96596accdb2209e1
Author: Bogdan B 
AuthorDate: Tue Nov 8 21:52:29 2022 +0200
Commit: Olivier Hallot 
CommitDate: Fri Nov 11 11:13:09 2022 +0100

tdf#148727 Correct sum example

Change-Id: I117d3dccbda28ad6a851f537e00ed2aafb697c22
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142438
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/source/text/swriter/02/1402.xhp 
b/source/text/swriter/02/1402.xhp
index bcc1927fb2..aea6313cc5 100644
--- a/source/text/swriter/02/1402.xhp
+++ b/source/text/swriter/02/1402.xhp
@@ -66,13 +66,13 @@
 
 
 
-Operation
+Operation
 
 
-Name
+Name
 
 
-Example
+Example
 
 
 
@@ -95,7 +95,7 @@
 -
 
 
-Calculates the 
difference
+Calculates the 
difference.
 Example: 10 - 

 
 
@@ -108,7 +108,7 @@
 
 
 Calculates the 
product.
-Example: 7 MUL 
9
+Example: 7 MUL 
9 displays 63
 
 
 
@@ -119,8 +119,8 @@
 DIV or 
/
 
 
-Calculates the 
quotient
-Example: 100 
DIV 15
+Calculates the 
quotient.
+Example: 100 
DIV 15 displays 6.67
 
 
 
@@ -128,16 +128,15 @@
 
 
 
-Function
+Function
 
 
-Name
+Name
 
 
-Example
+Example
 
 
-
 
 
 Sum
@@ -170,7 +169,7 @@
 PHD
 
 
-Calculates a 
percentage
+Calculates a 
percentage.
 Example: 10 + 
15 PHD displays 10.15
 
 
@@ -183,7 +182,7 @@
 
 
 Calculates the square 
root.
-Example: SQRT 
25 displays 5.00
+Example: SQRT 
25 displays 5
 
 
 
@@ -195,7 +194,7 @@
 
 
 Calculates the power of a 
number.
-Example: 2 POW 
8 displays 256.00
+Example: 2 POW 
8 displays 256
 
 
 
@@ -235,7 +234,7 @@
 
 
 Checks if selected values are 
equal. If they are unequal, the result is zero, otherwise 1 (true) 
appears.
-Example: 
 EQ 2 displays 1, if the content of A1 equals 2.
+Example: 
 EQ 2 displays 1, if the content of A1 equals 2
 
 
 
@@ -247,7 +246,7 @@
 
 
 Tests for inequality between selected 
values.
-Example: 
 NEQ 2 displays 0 (wrong), if the content of A1 equals 2.
+Example: 
 NEQ 2 displays 0 (wrong), if the content of A1 equals 2
 
 
 
@@ -259,7 +258,7 @@
 
 
 Tests for values less than or equal 
to a specified value.
-Example: 
 LEQ 2 displays 1 (true), if the content of A1 is less than or equal 
to 2.
+Example: 
 LEQ 2 displays 1 (true), if the content of A1 is less than or equal 
to 2
 
 
 
@@ -270,8 +269,8 @@
 GEQ
 
 
-Tests for values greater than or 
equal to a specified value
-Example: 
 GEQ 2 displays 1 (true), if the content of A1 is greater than or 
equal to 2.
+Tests for values greater than or 
equal to a specified value.
+Example: 
 GEQ 2 displays 1 (true), if the content of A1 is greater than or 
equal to 2
 
 
 
@@ -282,8 +281,8 @@
 L
 
 
-Tests for values less than a specified 
value
-Example: 
 L 2 displays 1 (true), if the content of A1 is less than 
2.
+Tests for values less than a specified 
value.
+Example: 
 L 2 displays 1 (true), if the content of A1 is less than 
2
 
 
 
@@ -294,8 +293,8 @@
 G
 
 
-Tests for values greater than a 
specified value
-Example: 
 G 2 displays 1 (true), if the content of A1 is greater than 
2.
+Tests for values greater than a 
specified value.
+Example: 
 G 2 displays 1 (true), if the content of A1 is greater than 
2
 
 
 
@@ -306,7 +305,7 @@
 OR
 
 
-Tests for values matching the Boolean 
OR
+Tests for values matching the Boolean 
OR.
 Example: 0 OR 
0 displays 0 (false), anything else results in 1 (true)
 
 
@@ -318,7 +317,7 @@
 XOR
 
 
-Tests for values matching the Boolean 
exclusive OR
+Tests for values matching the Boolean 
exclusive OR.
 Example: 1 XOR 
0 displays 1 (true)
 
 
@@ -330,7 +329,7 @@
 AND
 
 
-Tests for values matching the Boolean 
AND
+Tests for values matching the Boolean 
AND.
 Example: 1 AND 
2 displays 1 (true)
 
 
@@ -342,7 +341,7 @@
 NOT
 
 
-Tests for values matching the Boolean 
NOT
+Tests for values matching the Boolean 
NOT.
 Example: NOT 1 
(true) displays 0 (false)
 
 
@@ -352,13 +351,13 @@
 
 
 
-Function
+Function
 
 
-Name
+Name
 
 
-Example
+Example
 
 
 
@@ -394,31 +393,31 @@
 
 
 Calculates the maximum value in an 
area or a list.
-Example: MAX 
10|30|20 displays 30.00
+Example: MAX 
10|30|20 displays 30
 
 
 
 
-Product
+Product
 
 
 PRODUCT
 
 
 Calculates the 
product of the selected cells.
-Example: PRODUCT  displays the product of the 
values in cells A2 to C2
+Example: PRODUCT  displays the product of the 

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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 dbaccess/source/core/api/HelperCollections.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d5f53a97c9468a0dbe31212053c5686afd8450d4
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:37:11 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 11:12:27 2022 +0100

Drop a counterproductive const&

...that was apparently left by accident by
c7f8a54e05dab430cf2f5b3e1fa90e729c7a5601 "loplugin:moveparam in dbaccess",
thwarting the use of std::move here.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/dbaccess/source/core/api/HelperCollections.hxx 
b/dbaccess/source/core/api/HelperCollections.hxx
index 050b4a23fb3e..b7f69b8bac96 100644
--- a/dbaccess/source/core/api/HelperCollections.hxx
+++ b/dbaccess/source/core/api/HelperCollections.hxx
@@ -83,7 +83,7 @@ namespace dbaccess
 return nullptr;
 }
 public:
-OPrivateTables( const OSQLTables& _rTables,
+OPrivateTables( OSQLTables _rTables,
 bool _bCase,
 ::cppu::OWeakObject& _rParent,
 ::osl::Mutex& _rMutex,


[Libreoffice-commits] core.git: helpcontent2

2022-11-11 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 23807af596937f32cd67c54557a0800759ad7a37
Author: Alain Romedenne 
AuthorDate: Fri Nov 11 12:02:27 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Nov 11 11:02:27 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to ddd19fff68342bc96ebdc88df7be56e4ec64a859
  - Basic typo

Change-Id: I6890eea2de0b2e6e7d95c0289ef8810434a89df6
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142517
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 3e98ce658dee..ddd19fff6834 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3e98ce658dee0b8b8d017d97da4a817b84156de0
+Subproject commit ddd19fff68342bc96ebdc88df7be56e4ec64a859


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

2022-11-11 Thread Alain Romedenne (via logerrit)
 source/text/sbasic/shared/CreateUnoSvcWithArgs.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ddd19fff68342bc96ebdc88df7be56e4ec64a859
Author: Alain Romedenne 
AuthorDate: Thu Nov 10 20:09:54 2022 +0200
Commit: Olivier Hallot 
CommitDate: Fri Nov 11 11:02:24 2022 +0100

Basic typo

Change-Id: I6890eea2de0b2e6e7d95c0289ef8810434a89df6
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142517
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/source/text/sbasic/shared/CreateUnoSvcWithArgs.xhp 
b/source/text/sbasic/shared/CreateUnoSvcWithArgs.xhp
index f3ecef8bb3..4aae8e8cef 100644
--- a/source/text/sbasic/shared/CreateUnoSvcWithArgs.xhp
+++ b/source/text/sbasic/shared/CreateUnoSvcWithArgs.xhp
@@ -66,7 +66,7 @@

pv(0).Name  = "StorageFormat"

pv(0).Value = "ZipFormat"
mode = 
com.sun.star.embed.ElementModes
-   sf = 
CreateUnoService("com.sun.star.embed.StorageFactory
+   sf = 
CreateUnoService("com.sun.star.embed.StorageFactory")

storage = sf.createInstanceWithArguments(Array(ThisComponent.URL, mode.WRITE, 
pv))
dds = 
CreateUnoServiceWithArguments( _
   
"com.sun.star.security.DocumentDigitalSignatures", _


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

2022-11-11 Thread Bogdan B (via logerrit)
 sc/uiconfig/scalc/ui/randomnumbergenerator.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cbb83463513431907317bd1b5ab9d1849a4c96af
Author: Bogdan B 
AuthorDate: Fri Nov 11 07:54:22 2022 +0200
Commit: Mike Kaganski 
CommitDate: Fri Nov 11 10:41:02 2022 +0100

tdf#150607 Change Truncate to Round

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

diff --git a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui 
b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
index 58e36f261d4f..97b5851bd73e 100644
--- a/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
+++ b/sc/uiconfig/scalc/ui/randomnumbergenerator.ui
@@ -415,7 +415,7 @@
 True
 
   
-Truncate the 
number to a given number of Decimal Places.
+Round the 
number to a given number of Decimal Places.
   
 
   


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

2022-11-11 Thread Stephan Bergmann (via logerrit)
 chart2/source/view/axes/VCartesianGrid.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e962819af8b9e19c651103dd288e60658dfd76e5
Author: Stephan Bergmann 
AuthorDate: Thu Nov 10 18:32:42 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 11 10:30:26 2022 +0100

Drop a counterproductive top-level const

...that was apparently left by accident by
11c4ec15f13bbcc1b7a85e966519d75e64f62c4a "use more concrete types in chart2,
Axis", thwarting the use of std::move here.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

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

diff --git a/chart2/source/view/axes/VCartesianGrid.cxx 
b/chart2/source/view/axes/VCartesianGrid.cxx
index 07c51d4a23b9..6cf68d0700eb 100644
--- a/chart2/source/view/axes/VCartesianGrid.cxx
+++ b/chart2/source/view/axes/VCartesianGrid.cxx
@@ -149,7 +149,7 @@ static void addLine3D( 
std::vector>& rPoin
 }
 
 VCartesianGrid::VCartesianGrid( sal_Int32 nDimensionIndex, sal_Int32 
nDimensionCount
-   , const std::vector< Reference< 
beans::XPropertySet > >  aGridPropertiesList )
+   , std::vector< Reference< beans::XPropertySet > 
>  aGridPropertiesList )
 : VAxisOrGridBase( nDimensionIndex, nDimensionCount )
 , m_aGridPropertiesList( std::move(aGridPropertiesList) )
 {


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

2022-11-11 Thread Xisco Fauli (via logerrit)
 sw/qa/core/crsr/crsr.cxx   |2 -
 sw/qa/core/doc/doc.cxx |2 -
 sw/qa/core/text/text.cxx   |8 ++--
 sw/qa/core/unocore/unocore.cxx |4 +-
 sw/qa/extras/htmlexport/htmlexport.cxx |   46 -
 sw/qa/extras/layout/layout.cxx |   31 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |   10 ++---
 sw/qa/extras/rtfexport/rtfexport5.cxx  |2 -
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 -
 sw/qa/extras/uiwriter/uiwriter7.cxx|9 +---
 sw/qa/extras/unowriter/unowriter.cxx   |   34 +-
 sw/qa/extras/ww8export/ww8export3.cxx  |4 +-
 sw/qa/inc/swmodeltestbase.hxx  |2 -
 sw/qa/unit/swmodeltestbase.cxx |   11 ++---
 14 files changed, 76 insertions(+), 91 deletions(-)

New commits:
commit e9f78eda01172c7f100d6e7695aaafe2b961d565
Author: Xisco Fauli 
AuthorDate: Thu Nov 10 11:56:41 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 11 09:56:45 2022 +0100

SwModelTestBase: remove duplicated method

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

diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx
index eec0f9a42c31..fe341f6c276f 100644
--- a/sw/qa/core/crsr/crsr.cxx
+++ b/sw/qa/core/crsr/crsr.cxx
@@ -39,7 +39,7 @@ public:
 
 CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace)
 {
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 
 // Given: a document with two "foo" in it, the second followed by a 
formatted soft hyphen.
 uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index 67523084d9f7..7c5bdd8f3eb9 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testIMEGrouping)
 CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testImageHyperlinkStyle)
 {
 // Given a document with an image with a hyperlink:
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
 uno::Reference xText = xDocument->getText();
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index d51f6c18f71c..e8ab18ff9682 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -72,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFootnoteConnect)
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testSemiTransparentText)
 {
 // Create an in-memory empty document.
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 
 // Set text to half-transparent and type a character.
 uno::Reference xParagraph(getParagraph(1), 
uno::UNO_QUERY);
@@ -324,7 +324,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testClearingLineBreakLeft)
 {
 // Given a document with two anchored objects (left height is 5cm, right 
height is 7.5cm) and a
 // clearing break (type=left):
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
 uno::Reference xText = xDocument->getText();
@@ -375,7 +375,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testClearingLineBreakLeft)
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeftRTL)
 {
 // Given a document with an anchored object in an RTL para and a clearing 
break (type=left):
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
 uno::Reference xText = xDocument->getText();
@@ -416,7 +416,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testClearingLineBreakLeftRTL)
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakVertical)
 {
 // Given a document with an anchored object in a vertical page and a 
clearing break (type=all):
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
 uno::Reference xText = xDocument->getText();
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 2484dd05efb0..0706005a047e 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -286,7 +286,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testLineBreakTextPortionEnum)
 CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserFieldTooltip)
 {
 // Given a document with a user field:
-loadURL("private:factory/swriter", nullptr);
+createSwDoc();
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xField(
 

[Libreoffice-commits] core.git: embeddedobj/CppunitTest_embeddedobj_general.mk embeddedobj/qa

2022-11-11 Thread Xisco Fauli (via logerrit)
 embeddedobj/CppunitTest_embeddedobj_general.mk |3 +
 embeddedobj/qa/cppunit/general.cxx |   48 ++---
 2 files changed, 15 insertions(+), 36 deletions(-)

New commits:
commit 699251315aeba9620310410c0576c8b9c052c8b2
Author: Xisco Fauli 
AuthorDate: Thu Nov 10 17:00:27 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 11 09:52:22 2022 +0100

CppunitTest_embeddedobj_general: inherit from UnoApiTest

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

diff --git a/embeddedobj/CppunitTest_embeddedobj_general.mk 
b/embeddedobj/CppunitTest_embeddedobj_general.mk
index 32fea16fb2b2..eb794f38548c 100644
--- a/embeddedobj/CppunitTest_embeddedobj_general.mk
+++ b/embeddedobj/CppunitTest_embeddedobj_general.mk
@@ -24,8 +24,11 @@ $(eval $(call 
gb_CppunitTest_use_libraries,embeddedobj_general, \
 cppu \
 embobj \
 sal \
+subsequenttest \
 test \
+tl \
 unotest \
+utl \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,embeddedobj_general))
diff --git a/embeddedobj/qa/cppunit/general.cxx 
b/embeddedobj/qa/cppunit/general.cxx
index c7824fe87eaf..1876a1238010 100644
--- a/embeddedobj/qa/cppunit/general.cxx
+++ b/embeddedobj/qa/cppunit/general.cxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -24,31 +23,14 @@ using namespace ::com::sun::star;
 namespace
 {
 /// Covers embeddedobj/source/general/ fixes.
-class Test : public test::BootstrapFixture, public unotest::MacrosTest
+class Test : public UnoApiTest
 {
-private:
-uno::Reference mxComponent;
-
 public:
-void setUp() override;
-void tearDown() override;
-uno::Reference& getComponent() { return mxComponent; }
+Test()
+: UnoApiTest("/embeddedobj/qa/cppunit/data/")
+{
+}
 };
-
-void Test::setUp()
-{
-test::BootstrapFixture::setUp();
-
-mxDesktop.set(frame::Desktop::create(mxComponentContext));
-}
-
-void Test::tearDown()
-{
-if (mxComponent.is())
-mxComponent->dispose();
-
-test::BootstrapFixture::tearDown();
-}
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfig)
@@ -65,14 +47,12 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfig)

pBatchReset);
 pBatchReset->commit();
 });
-getComponent().set(
-loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
+mxComponent.set(loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
 
 // Insert a file as an embedded object.
 uno::Reference xStorage = 
comphelper::OStorageHelper::GetTemporaryStorage();
 comphelper::EmbeddedObjectContainer aContainer(xStorage);
-OUString aFileName
-= 
m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.doc");
+OUString aFileName = createFileURL(u"insert-file-config.doc");
 uno::Sequence aMedium{ 
comphelper::makePropertyValue("URL", aFileName) };
 OUString aName("Object 1");
 uno::Reference xObject
@@ -98,14 +78,12 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigVsdx)
 
officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::set(true, 
pBatchReset);
 pBatchReset->commit();
 });
-getComponent().set(
-loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
+mxComponent.set(loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
 
 // Insert a file as an embedded object.
 uno::Reference xStorage = 
comphelper::OStorageHelper::GetTemporaryStorage();
 comphelper::EmbeddedObjectContainer aContainer(xStorage);
-OUString aFileName
-= 
m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.vsdx");
+OUString aFileName = createFileURL(u"insert-file-config.vsdx");
 uno::Sequence aMedium{ 
comphelper::makePropertyValue("URL", aFileName) };
 OUString aName("Object 1");
 uno::Reference xObject
@@ -131,14 +109,12 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigPdf)
 officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(true, 
pBatchReset);
 pBatchReset->commit();
 });
-getComponent().set(
-loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
+mxComponent.set(loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
 
 // Insert a PDF file as an embedded object.
 uno::Reference xStorage = 
comphelper::OStorageHelper::GetTemporaryStorage();
 comphelper::EmbeddedObjectContainer aContainer(xStorage);
-OUString aFileName
-= 
m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.pdf");
+OUString aFileName = createFileURL(u"insert-file-con