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

2022-11-15 Thread Miklos Vajna (via logerrit)
 canvas/source/cairo/cairo_canvashelper.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 94df17d2fcdb72bc529097d77b174d934a25cc24
Author: Miklos Vajna 
AuthorDate: Tue Nov 15 08:27:57 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 15 09:57:01 2022 +0100

tdf#145416 canvas: fix rotated, not zero-sized bitmap, which is not rendered

The presentation had a rotated bitmap, which is not zero size, but we
still decided to just not render it. The bug is specific to the "cairo
canvas", which is the default on Linux, but not elsewhere.

The trouble is that CanvasHelper::implDrawBitmapSurface() accessed the
transform matrix directly, assuming that the (0,0) and (1,1) members
represent scaling as-is. This is only true in case there are no other
transforms in the matrix (rotation, sharing).

Fix the problem by getting the scale info via
cairo_matrix_transform_distance(), which correctly determines if the
scaling is 0 or not.

This went wrong in commit 78036f74fa74ee2552e79064660634e1342692ff
(tdf#135094 cairo canvas: fix black slide containing a very small image,
2020-08-14).  No testcase, our tests are typically headless and
currently SvpSalGraphics::SupportsCairo() reports false, so this would
be tricky to test.

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

diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index 0306bff9f379..14113e89361f 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1175,8 +1175,13 @@ constexpr OUStringLiteral 
PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
 cairo_rectangle( mpCairo.get(), 0, 0, aBitmapSize.Width, 
aBitmapSize.Height );
 cairo_clip( mpCairo.get() );
 
-int nPixelWidth = std::round(rSize.Width * aMatrix.xx);
-int nPixelHeight = std::round(rSize.Height * aMatrix.yy);
+// Use cairo_matrix_transform_distance() to determine the scaling, 
as that works even if
+// the matrix also has rotation.
+double fPixelWidth = rSize.Width;
+double fPixelHeight = rSize.Height;
+cairo_matrix_transform_distance(&aMatrix, &fPixelWidth, 
&fPixelHeight);
+int nPixelWidth = std::round(fPixelWidth);
+int nPixelHeight = std::round(fPixelHeight);
 if (std::abs(nPixelWidth) > 0 && std::abs(nPixelHeight) > 0)
 {
 // Only render the image if it's at least 1x1 px sized.


Re: java.security.AccessController deprecated since Java 17 and subject to removal in a future version

2022-11-15 Thread Stephan Bergmann

On 14/11/2022 18:54, Julien Nabet wrote:
During a build, I noticed some warning about deprecation of 
AccessController.


git grep -n 'java.security.AccessController' gives:
odk/source/com/sun/star/lib/loader/Loader.java:36:import 
java.security.AccessController;

ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader.java:25:import 
java.security.AccessController;
scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java:26:import
 java.security.AccessController;
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java:24:import
 java.security.AccessController;

source: 
https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/security/AccessController.html


For the moment, it's just deprecated but don't know if it's quick/easy 
to remove or this must be analyzed.


We only use java.security.AccessController to wrap creation of class 
loaders in AccessController::doPrivileged.  Which is the common idiom 
for class loader construction, to avoid unnecessary SecurityExceptions 
when "a security manager exists and its checkCreateClassLoader method 
doesn't allow creation of a new class loader" 
() 
and the relevant code doesn't yet run with all the privileges it could 
run with.


This should still be relevant when running LO against older JRE 
installations that might employ such restrictive security managers. 
There is no replacement for AccessCotnroller::doPrivileged, and a way 
forward is apparently sill being paved.  See 
 "JEP 411: Deprecate the Security Manager 
for Removal":


"In feature releases after Java 18, we will degrade other Security 
Manager APIs so that they remain in place but with limited or no 
functionality.  For example, we may revise 
AccessController::doPrivileged simply to run the given action, or revise 
System::getSecurityManager always to return null.  This will allow 
libraries that support the Security Manager and were compiled against 
previous Java releases to continue to work without change or even 
recompilation.  We expect to remove the APIs once the compatibility risk 
of doing so declines to an acceptable level."




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

2022-11-15 Thread Mike Kaganski (via logerrit)
 libreofficekit/source/gtk/lokdocview.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 32aa6697c0b9f0ef490f42165a6b777c2b800da4
Author: Mike Kaganski 
AuthorDate: Tue Nov 15 11:04:18 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Nov 15 10:11:06 2022 +0100

gtktiledviewer: Don't call updateClientZoom until zoom is initialized

Avoids some console noise

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

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 451a373d416b..4fc6fe0452c1 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2840,6 +2840,8 @@ static gboolean spin_lok_loop(void *pData)
 static void updateClientZoom(LOKDocView *pDocView)
 {
 LOKDocViewPrivate& priv = getPrivate(pDocView);
+if (!priv->m_fZoom)
+return; // Not initialized yet?
 gint nScaleFactor = gtk_widget_get_scale_factor(GTK_WIDGET(pDocView));
 gint nTileSizePixelsScaled = nTileSizePixels * nScaleFactor;
 GError* error = nullptr;


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

2022-11-15 Thread Mike Kaganski (via logerrit)
 desktop/source/lib/init.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9bd7ff6b918de25fc3662898009228db6510ebf8
Author: Mike Kaganski 
AuthorDate: Mon Nov 14 17:34:55 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Nov 15 10:11:37 2022 +0100

gtktiledviewer: Fix getting tiles on Windows

The "CanvasSize + 1" hack was implemented by myself in commit
ebb3a72ba0c4f070c9c254c439147beea8b2d93d (Paint tiles on Windows;
Oct 24 09:01:32 2022 +0200) to workaround a rounding error, where
converting pixels to logic and back resulted in 1 pixel smaller
size (when I worked in Writer). This hack breaks in Calc, because
the size then is 1 pixel larger than expected, failing the assert
below.

This fixes the problem by disabling the map mode, as everywhere
else in such cases.

Change-Id: I37f0f03ae4cb19f2de0e7995064843d17b0c7189
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142714
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit dbc307ef7c2351cd72e60ef46e647c908379db86)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142680
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 13fef313aec4..627c352c4b24 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3712,8 +3712,8 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
 
 #ifdef _WIN32
 // pBuffer was not used there
-tools::Rectangle r(pDevice->PixelToLogic({ Point(0, 0), Size(nCanvasWidth 
+ 1, nCanvasHeight + 1) }));
-BitmapEx aBmpEx = pDevice->GetBitmapEx(r.TopLeft(), r.GetSize());
+pDevice->EnableMapMode(false);
+BitmapEx aBmpEx = pDevice->GetBitmapEx({ 0, 0 }, { nCanvasWidth, 
nCanvasHeight });
 Bitmap aBmp = aBmpEx.GetBitmap();
 Bitmap aAlpha = aBmpEx.GetAlpha();
 Bitmap::ScopedReadAccess sraBmp(aBmp);


[Libreoffice-commits] core.git: bin/list-dispatch-commands.py

2022-11-15 Thread Mike Kaganski (via logerrit)
 bin/list-dispatch-commands.py |   22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 55c2e9e7e24a4bc2016fc54a5ffaf22aa094eb58
Author: Mike Kaganski 
AuthorDate: Tue Nov 15 11:02:47 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Nov 15 10:37:08 2022 +0100

Allow using bin/list-dispatch-commands.py with separate builddir

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

diff --git a/bin/list-dispatch-commands.py b/bin/list-dispatch-commands.py
index dad2f01ffee2..f4832f12b777 100755
--- a/bin/list-dispatch-commands.py
+++ b/bin/list-dispatch-commands.py
@@ -16,11 +16,17 @@ Script to generate 
https://wiki.documentfoundation.org/Development/DispatchComma
 
 import os
 
+# It is assumed that the script is called from $BUILDDIR;
+# and __file__ refers to the script location in $SRCDIR.
+# This allows to use it in separate builddir configuration.
+srcdir = os.path.dirname(os.path.realpath(__file__)) + '/..' # go up from /bin
+builddir = os.getcwd()
+
 REPO = 'https://opengrok.libreoffice.org/xref/core/'
 
 BLACKLIST = ('_SwitchViewShell0', '_SwitchViewShell1', '_SwitchViewShell2', 
'_SwitchViewShell3', '_SwitchViewShell4')
 
-XCU_DIR = 'officecfg/registry/data/org/openoffice/Office/UI/'
+XCU_DIR = srcdir + '/officecfg/registry/data/org/openoffice/Office/UI/'
 XCU_FILES = (   XCU_DIR + 'BasicIDECommands.xcu',
 XCU_DIR + 'CalcCommands.xcu',
 XCU_DIR + 'ChartCommands.xcu',
@@ -31,7 +37,7 @@ XCU_FILES = (   XCU_DIR + 'BasicIDECommands.xcu',
 XCU_DIR + 'ReportCommands.xcu',
 XCU_DIR + 'WriterCommands.xcu')
 
-HXX_DIR = './workdir/SdiTarget/'
+HXX_DIR = builddir + '/workdir/SdiTarget/'
 HXX_FILES = (   HXX_DIR + 'basctl/sdi/basslots.hxx',
 HXX_DIR + 'sc/sdi/scslots.hxx',
 HXX_DIR + 'sd/sdi/sdgslots.hxx',
@@ -41,12 +47,12 @@ HXX_FILES = (   HXX_DIR + 'basctl/sdi/basslots.hxx',
 HXX_DIR + 'svx/sdi/svxslots.hxx',
 HXX_DIR + 'sw/sdi/swslots.hxx')
 
-SDI_FILES = (   'sc/sdi/scalc.sdi',
-'sd/sdi/sdraw.sdi',
-'sfx2/sdi/sfx.sdi',
-'starmath/sdi/smath.sdi',
-'svx/sdi/svx.sdi',
-'sw/sdi/swriter.sdi')
+SDI_FILES = (   srcdir + '/sc/sdi/scalc.sdi',
+srcdir + '/sd/sdi/sdraw.sdi',
+srcdir + '/sfx2/sdi/sfx.sdi',
+srcdir + '/starmath/sdi/smath.sdi',
+srcdir + '/svx/sdi/svx.sdi',
+srcdir + '/sw/sdi/swriter.sdi')
 
 # Category is defined by the 1st file where the command has been found. 
Precedence: 1. xcu, 2. hxx, 3. sdi.
 MODULES = {'BasicIDE':  'Basic IDE, Forms, Dialogs',


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

2022-11-15 Thread Justin Luth (via logerrit)
 oovbaapi/UnoApi_oovbaapi.mk  |3 
 oovbaapi/ooo/vba/word/XDropDown.idl  |   31 +++
 oovbaapi/ooo/vba/word/XListEntries.idl   |   25 ++
 oovbaapi/ooo/vba/word/XListEntry.idl |   27 ++
 sw/Library_vbaswobj.mk   |3 
 sw/inc/IMark.hxx |   19 ++
 sw/qa/core/data/docm/testVBA.docm|binary
 sw/source/core/crsr/bookmark.cxx |  177 +++
 sw/source/core/inc/bookmark.hxx  |9 
 sw/source/ui/vba/vbaformfield.cxx|6 
 sw/source/ui/vba/vbaformfielddropdown.cxx|  101 ++
 sw/source/ui/vba/vbaformfielddropdown.hxx|   52 +
 sw/source/ui/vba/vbaformfielddropdownlistentries.cxx |  171 ++
 sw/source/ui/vba/vbaformfielddropdownlistentries.hxx |   49 +
 sw/source/ui/vba/vbaformfielddropdownlistentry.cxx   |   56 ++
 sw/source/ui/vba/vbaformfielddropdownlistentry.hxx   |   48 +
 16 files changed, 773 insertions(+), 4 deletions(-)

New commits:
commit b8fa94b28a2fbf75edc0d31fbf776d40a227e794
Author: Justin Luth 
AuthorDate: Thu Nov 3 17:59:14 2022 -0400
Commit: Miklos Vajna 
CommitDate: Tue Nov 15 11:07:06 2022 +0100

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

make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba

This now allows MS Word Basic legacy list box form fields
to be controlled by VBA basic.
-allows getting and setting the text string/list entry
-allows adding and deleting list entries

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

diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk
index 6d83196dbcf6..331cf4937e32 100644
--- a/oovbaapi/UnoApi_oovbaapi.mk
+++ b/oovbaapi/UnoApi_oovbaapi.mk
@@ -1052,6 +1052,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba/word,\
XDocument \
XDocumentOutgoing \
XDocuments \
+   XDropDown \
XField \
XFields \
XFind \
@@ -1063,6 +1064,8 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba/word,\
XGlobals \
XHeaderFooter \
XHeadersFooters \
+   XListEntries \
+   XListEntry \
XListFormat \
XListGalleries \
XListGallery \
diff --git a/oovbaapi/ooo/vba/word/XDropDown.idl 
b/oovbaapi/ooo/vba/word/XDropDown.idl
new file mode 100644
index ..d22f2c3299a3
--- /dev/null
+++ b/oovbaapi/ooo/vba/word/XDropDown.idl
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+module ooo {  module vba {  module word {
+
+interface XDropDown
+{
+interface ooo::vba::XHelperInterface;
+interface com::sun::star::script::XDefaultProperty;
+
+/// Default member: True if the specified form field object is a valid 
drop down form field.
+[attribute, readonly] boolean Valid;
+
+/// Returns or sets a number that represents the default drop-down index.
+[attribute] long Default;
+/// Returns or sets the index of the selected item in a drop-down form 
field.
+[attribute] long Value;
+
+/// Returns a ListEntries collection that represents all the items in a 
DropDown object.
+any ListEntries( [in] any Index );
+};
+
+}; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/word/XListEntries.idl 
b/oovbaapi/ooo/vba/word/XListEntries.idl
new file mode 100644
index ..5db6b7bd4eb2
--- /dev/null
+++ b/oovbaapi/ooo/vba/word/XListEntries.idl
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+module ooo {  module vba {  module word {
+
+interface XListEntry;
+interface XListEntries
+{
+interface ooo::vba::XCollection;
+
+/// Returns a ListEntry object that represents an item added to a 
drop-down form field.
+XListEntry Add( [in] string Name, [in] /*optional long*/ any Index ) 
raises ( com::sun::star::script::BasicErrorException );
+/// Removes all items from the drop-down form field.
+void Clear();
+};
+
+}; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/word/XListEntry.idl 
b/oovbaapi/ooo

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

2022-11-15 Thread Miklos Vajna (via logerrit)
 sw/qa/uibase/shells/shells.cxx  |   26 ++
 sw/sdi/swriter.sdi  |2 +-
 sw/source/uibase/shells/textfld.cxx |   10 +-
 3 files changed, 36 insertions(+), 2 deletions(-)

New commits:
commit 9f481c1eba14566c649c45ddbf15b66e6e42cc30
Author: Miklos Vajna 
AuthorDate: Mon Nov 14 14:21:31 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 15 11:09:07 2022 +0100

sw: add new FieldType parameter for the .uno:TextFormField command

Currently LOK clients can't insert fieldmarks which are comparable to
the ones Zotero's Word extension inserts into DOCX files.

There is already a .uno:TextFormField UNO command to insert fieldmarks,
but it has a hardcoded field type set to ODF_FORMTEXT, which is not what
we need.

Fix this by adding a new, optional FieldType parameter to the existing
UNO command.

The field code/command and the result is not yet possible to customize.

(cherry picked from commit 1ff360c29c99a570bfe59c69d8f589d4f2b59135)

Conflicts:
sw/qa/uibase/shells/shells.cxx
sw/source/uibase/shells/textfld.cxx

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

diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index 4bde6eab7ac6..3d5342f7a121 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -238,6 +239,31 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testContentControlPageBreak)
 CPPUNIT_ASSERT_EQUAL(1, getPages());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testInsertTextFormField)
+{
+// Given an empty document:
+SwDoc* pDoc = createSwDoc();
+
+// When inserting an ODF_UNHANDLED fieldmark:
+uno::Sequence aArgs = {
+comphelper::makePropertyValue("FieldType", 
uno::Any(OUString(ODF_UNHANDLED))),
+};
+dispatchCommand(mxComponent, ".uno:TextFormField", aArgs);
+
+// Then make sure that it's type/name is correct:
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwCursor* pCursor = pWrtShell->GetCursor();
+pCursor->SttEndDoc(/*bSttDoc=*/true);
+sw::mark::IFieldmark* pFieldmark
+= pDoc->getIDocumentMarkAccess()->getFieldmarkAt(*pCursor->GetPoint());
+CPPUNIT_ASSERT(pFieldmark);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: vnd.oasis.opendocument.field.UNHANDLED
+// - Actual  : vnd.oasis.opendocument.field.FORMTEXT
+// i.e. the custom type parameter was ignored.
+CPPUNIT_ASSERT_EQUAL(OUString(ODF_UNHANDLED), pFieldmark->GetFieldname());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index e34d663bf29b..7aa6aab89a17 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8203,7 +8203,7 @@ SfxBoolItem ShowInlineTooltips FN_SHOW_INLINETOOLTIPS
 ]
 
 SfxVoidItem TextFormField FN_INSERT_TEXT_FORMFIELD
-
+(SfxStringItem FieldType FN_PARAM_1)
 [
 AutoUpdate = TRUE,
 FastCall = FALSE,
diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index 474d76ce0030..17030cba23a3 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -686,6 +686,14 @@ FIELD_INSERT:
 
 case FN_INSERT_TEXT_FORMFIELD:
 {
+OUString aFieldType(ODF_FORMTEXT);
+const SfxStringItem* pFieldType = 
rReq.GetArg(FN_PARAM_1);
+if (pFieldType)
+{
+// Allow overwriting the default type.
+aFieldType = pFieldType->GetValue();
+}
+
 
rSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT_FORM_FIELD, 
nullptr);
 
 SwPaM* pCursorPos = rSh.GetCursor();
@@ -699,7 +707,7 @@ FIELD_INSERT:
 IDocumentMarkAccess* pMarksAccess = 
rSh.GetDoc()->getIDocumentMarkAccess();
 SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, 
pCursorPos->GetPoint()->nContent.GetIndex() - vEnSpaces.getLength(),
 pCursorPos->GetPoint()->nNode, 
pCursorPos->GetPoint()->nContent.GetIndex());
-pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), 
ODF_FORMTEXT,
+pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), 
aFieldType,
 aFieldPam.Start());
 }
 }


[Libreoffice-commits] core.git: config_host.mk.in

2022-11-15 Thread Rene Engelhard (via logerrit)
 config_host.mk.in |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1caf3f2554ffac3624d43defb4252a5b40945bbc
Author: Rene Engelhard 
AuthorDate: Sat Nov 12 18:31:02 2022 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 11:09:29 2022 +0100

actually don't compile tools/source/misc/fix16.cxx with system-libfixmath

90babff28406d5366df153e2d3c6d4206f06d614 missed the config_host.mk.in
part

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 9de974e472f9..1352749754e3 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -645,6 +645,7 @@ export SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@
 export SYSTEM_LIBEOT=@SYSTEM_LIBEOT@
 export SYSTEM_LIBEXTTEXTCAT=@SYSTEM_LIBEXTTEXTCAT@
 export SYSTEM_LIBEXTTEXTCAT_DATA=@SYSTEM_LIBEXTTEXTCAT_DATA@
+export SYSTEM_LIBFIXMATH=@SYSTEM_LIBFIXMATH@
 export SYSTEM_LIBLANGTAG=@SYSTEM_LIBLANGTAG@
 export SYSTEM_LIBNUMBERTEXT=@SYSTEM_LIBNUMBERTEXT@
 export SYSTEM_LIBNUMBERTEXT_DATA=@SYSTEM_LIBNUMBERTEXT_DATA@


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

2022-11-15 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/interpretercontext.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 6ace25e26e1ff3abbe10747630caf3b9f8d118f7
Author: Eike Rathke 
AuthorDate: Sat Nov 12 21:12:18 2022 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 11:10:14 2022 +0100

Resolves: tdf#152014 When reusing interpreter context slot clear lookup 
cache

... if different doc

As is, unthreaded the same slot gets reused for every calculation.
That could benefit from keeping 2-3 documents cached to not throw
away the lookup cache each time when alternating between
documents.

Change-Id: Id024333f72bcdcd6109042dec1104f3029955d3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142639
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit f86a0666ac337363b470c9c67fa0970a330b26a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142631
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Mike Kaganski 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/core/tool/interpretercontext.cxx 
b/sc/source/core/tool/interpretercontext.cxx
index 0df4a8407c9c..e66a8b977446 100644
--- a/sc/source/core/tool/interpretercontext.cxx
+++ b/sc/source/core/tool/interpretercontext.cxx
@@ -53,7 +53,11 @@ void ScInterpreterContext::ResetTokens()
 
 void ScInterpreterContext::SetDocAndFormatter(const ScDocument& rDoc, 
SvNumberFormatter* pFormatter)
 {
-mpDoc = &rDoc;
+if (mpDoc != &rDoc)
+{
+mxScLookupCache.reset();
+mpDoc = &rDoc;
+}
 mpFormatter = pFormatter;
 }
 


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

2022-11-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/a11y/atkwrapper.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 5f3de2ba23486184f5ba8e1efa76a02afb20a42a
Author: Caolán McNamara 
AuthorDate: Fri Nov 11 16:52:33 2022 +
Commit: Michael Stahl 
CommitDate: Tue Nov 15 11:11:42 2022 +0100

ImplDbgTestSolarMutex assert from a11y

 #5  0x7fffee605ea2 in ImplDbgTestSolarMutex() () at 
vcl/source/app/dbggui.cxx:35
 #6  0x771186f0 in DbgTestSolarMutex() () at 
tools/source/debug/debug.cxx:54
 #7  0x7fffa95614d8 in SwAccessibleMap::GetContext(SwFrame const*, 
bool) (this=0x895a9c0, pFrame=0x5358800, bCreate=false) at 
sw/source/core/access/accmap.cxx:1788
 #8  0x7fffa961ac0e in sw::sidebarwindows::(anonymous 
namespace)::SidebarWinAccessibleContext::getAccessibleParent() (this=0xb90f800)
 at sw/source/uibase/docvw/SidebarWinAcc.cxx:65
 #9  0x7fffa961ae27 in non-virtual thunk to 
sw::sidebarwindows::(anonymous 
namespace)::SidebarWinAccessibleContext::getAccessibleParent() ()
 at /home/caolan/LibreOffice/core/instdir/program/../program/libswlo.so
 #10 0x7fffd8f4ae7d in 
atk_object_wrapper_new(com::sun::star::uno::Reference
 const&, AtkObject*, AtkObject*)
 (rxAccessible=uno::Reference to 
(sw::sidebarwindows::SidebarWinAccessible *) 0xba7f450, parent=0x0, orig=0x0) 
at vcl/unx/gtk3/a11y/atkwrapper.cxx:970
 #11 0x7fffd8f4a820 in 
atk_object_wrapper_ref(com::sun::star::uno::Reference
 const&, bool)
 (rxAccessible=uno::Reference to 
(sw::sidebarwindows::SidebarWinAccessible *) 0xba7f450, create=true) at 
vcl/unx/gtk3/a11y/atkwrapper.cxx:925
 #12 0x7fffd8f4d246 in wrapper_ref_child(_AtkObject*, int) 
(atk_obj=0xb9d06f0, i=0) at vcl/unx/gtk3/a11y/atkwrapper.cxx:500
 #13 0x7fffd95700c3 in add_pending_items () at 
/lib64/libatk-bridge-2.0.so.0
 #14 0x7fffea7154cb in g_idle_dispatch (source=0x21d40e0, 
callback=0x7fffd956fec0 , user_data=0x21d5890) at 
../glib/gmain.c:5935

and...

 #5  0x7fffee605ea2 in ImplDbgTestSolarMutex() () at 
vcl/source/app/dbggui.cxx:35
 #6  0x771186f0 in DbgTestSolarMutex() () at 
tools/source/debug/debug.cxx:54
 #7  0x7fffa95614d8 in SwAccessibleMap::GetContext(SwFrame const*, 
bool) (this=0x894ce20, pFrame=0x53390f0, bCreate=false) at 
sw/source/core/access/accmap.cxx:1788
 #8  0x7fffa956285f in SwAccessibleMap::GetContextImpl(SwFrame const*, 
bool) (this=0x894ce20, pFrame=0x53390f0, bCreate=false) at 
sw/source/core/access/accmap.cxx:1917
 #9  0x7fffa9550a91 in 
SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(SwAccessibleChildSList
 const&, SwAccessibleMap&)
 (this=0x7fffbb58, rLst=..., rAccMap=...) at 
sw/source/core/access/accfrmobjslist.cxx:65
 #10 0x7fffa951c507 in SwAccessibleChildSList::begin() const 
(this=0x7fffbb80) at sw/source/core/access/accfrmobjslist.hxx:100
 #11 0x7fffa95421c2 in 
SwAccessibleFrame::GetChildIndex(SwAccessibleMap&, SwRect const&, SwFrame 
const&, sw::access::SwAccessibleChild const&, int&, bool)
 (rAccMap=..., rVisArea=SwRect = {...}, rFrame=..., rChild=..., 
rPos=@0x7fffbcc4: 0, bInPagePreview=false) at 
sw/source/core/access/accframe.cxx:179
 #12 0x7fffa9543be5 in 
SwAccessibleFrame::GetChildIndex(SwAccessibleMap&, 
sw::access::SwAccessibleChild const&) const (this=0xb7bd6e0, rAccMap=..., 
rChild=...)
 at sw/source/core/access/accframe.cxx:455
 #13 0x7fffa9569721 in SwAccessibleMap::GetChildIndex(SwFrame const&, 
vcl::Window&) const (this=0x894ce20, rParentFrame=..., rChild=...)
 at sw/source/core/access/accmap.cxx:2905
 #14 0x7fffa961ad89 in sw::sidebarwindows::(anonymous 
namespace)::SidebarWinAccessibleContext::getAccessibleIndexInParent() 
(this=0xb9ead70)
 at sw/source/uibase/docvw/SidebarWinAcc.cxx:80
 #15 0x7fffd8f4d781 in wrapper_get_index_in_parent(_AtkObject*) 
(atk_obj=0xc517810) at vcl/unx/gtk3/a11y/atkwrapper.cxx:529
 #16 0x7fffd957298c in append_cache_item () at 
/lib64/libatk-bridge-2.0.so.0

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

diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index bc493561b1ce..b1e4c4479e80 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "atkwrapper.hxx"
@@ -466,6 +467,8 @@ static AtkObject *
 wrapper_ref_child( AtkObject *atk_obj,
gint   i )
 {
+SolarMutexGuard aGuard;
+
 AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj);
 
 if (obj->mpSysObjChild)
@@ -504,6 +507,8 @@ wrapper_ref_child( AtkObject *atk_obj,
 static gint
 wrapper_get_index_in_parent( AtkObject *atk_obj )
 {
+SolarMutexG

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

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

New commits:
commit 881fb6f7c06444c58551f71730d97c51a840fbf5
Author: Eike Rathke 
AuthorDate: Thu Nov 10 20:40:44 2022 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 15 11:13:06 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
(cherry picked from commit 5db9d8356c8fdc732942357cd2171ba27eda8647)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142527
Reviewed-by: Michael Stahl 

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 3be11884ca72..3f80f88ef9b6 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1924,7 +1924,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: sw/qa sw/sdi sw/source

2022-11-15 Thread Miklos Vajna (via logerrit)
 sw/qa/uibase/shells/shells.cxx  |   13 +
 sw/sdi/swriter.sdi  |2 +-
 sw/source/uibase/shells/textfld.cxx |   29 +
 3 files changed, 39 insertions(+), 5 deletions(-)

New commits:
commit 6870c0c3385bf5d19e9c80bf973fca255ae38c08
Author: Miklos Vajna 
AuthorDate: Tue Nov 15 09:53:20 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 15 11:34:49 2022 +0100

sw: add new FieldCode parameter for the .uno:TextFormField command

The field code/command is the input of the field expand.

Also allow setting a field result, given that the entire point of
"unhandled" fieldmarks is that Writer itself doesn't know how to compute
the field result / expanded string.

Note that a field result can be a multi-paragraph and formatted content,
so far we only allow single-paragraph plain text.

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

diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index c107913e6469..803c41657e89 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -277,8 +277,12 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testInsertTextFormField)
 SwDoc* pDoc = getSwDoc();
 
 // When inserting an ODF_UNHANDLED fieldmark:
+OUString aExpectedCommand("ADDIN ZOTERO_BIBL foo bar");
+OUString aExpectedResult("(Abrikosov, n.d.)");
 uno::Sequence aArgs = {
 comphelper::makePropertyValue("FieldType", 
uno::Any(OUString(ODF_UNHANDLED))),
+comphelper::makePropertyValue("FieldCommand", 
uno::Any(aExpectedCommand)),
+comphelper::makePropertyValue("FieldResult", 
uno::Any(aExpectedResult)),
 };
 dispatchCommand(mxComponent, ".uno:TextFormField", aArgs);
 
@@ -294,6 +298,15 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testInsertTextFormField)
 // - Actual  : vnd.oasis.opendocument.field.FORMTEXT
 // i.e. the custom type parameter was ignored.
 CPPUNIT_ASSERT_EQUAL(OUString(ODF_UNHANDLED), pFieldmark->GetFieldname());
+
+auto it = pFieldmark->GetParameters()->find(ODF_CODE_PARAM);
+CPPUNIT_ASSERT(it != pFieldmark->GetParameters()->end());
+OUString aActualCommand;
+it->second >>= aActualCommand;
+CPPUNIT_ASSERT_EQUAL(aExpectedCommand, aActualCommand);
+
+OUString aActualResult = pFieldmark->GetContent();
+CPPUNIT_ASSERT_EQUAL(aExpectedResult, aActualResult);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 61e38bfe7f78..48328375735c 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8238,7 +8238,7 @@ SfxBoolItem ShowInlineTooltips FN_SHOW_INLINETOOLTIPS
 ]
 
 SfxVoidItem TextFormField FN_INSERT_TEXT_FORMFIELD
-(SfxStringItem FieldType FN_PARAM_1)
+(SfxStringItem FieldType FN_PARAM_1, SfxStringItem FieldCommand FN_PARAM_2, 
SfxStringItem FieldResult FN_PARAM_3)
 [
 AutoUpdate = TRUE,
 FastCall = FALSE,
diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index 54e19d7ec8c4..85dffcd7affc 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -694,6 +694,14 @@ FIELD_INSERT:
 aFieldType = pFieldType->GetValue();
 }
 
+OUString aFieldCode;
+const SfxStringItem* pFieldCode = 
rReq.GetArg(FN_PARAM_2);
+if (pFieldCode)
+{
+// Allow specifying a field code/command.
+aFieldCode = pFieldCode->GetValue();
+}
+
 
rSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT_FORM_FIELD, 
nullptr);
 
 SwPaM* pCursorPos = rSh.GetCursor();
@@ -701,14 +709,27 @@ FIELD_INSERT:
 {
 // Insert five En Space into the text field so the field has 
extent
 static constexpr OUStringLiteral vEnSpaces = 
u"\u2002\u2002\u2002\u2002\u2002";
-bool bSuccess = 
rSh.GetDoc()->getIDocumentContentOperations().InsertString(*pCursorPos, 
vEnSpaces);
+OUString aFieldResult(vEnSpaces);
+const SfxStringItem* pFieldResult = 
rReq.GetArg(FN_PARAM_3);
+if (pFieldResult)
+{
+// Allow specifying a field result / expanded value.
+aFieldResult = pFieldResult->GetValue();
+}
+
+bool bSuccess = 
rSh.GetDoc()->getIDocumentContentOperations().InsertString(*pCursorPos, 
aFieldResult);
 if(bSuccess)
 {
 IDocumentMarkAccess* pMarksAccess = 
rSh.GetDoc()->getIDocumentMarkAccess();
-SwPaM aFieldPam(pCursorPos->GetPoint()->GetNode(), 
pCursorPos->GetPoint()->GetContentIndex() - vEnSpaces.getLength(),
+SwPaM aFieldPam(pCursorPos->GetPoint()->Ge

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

2022-11-15 Thread Mike Kaganski (via logerrit)
 libreofficekit/source/gtk/lokdocview.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a069aaf91f5428fce96c882cd5827415c39a9192
Author: Mike Kaganski 
AuthorDate: Tue Nov 15 11:04:18 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Nov 15 11:37:30 2022 +0100

gtktiledviewer: Don't call updateClientZoom until zoom is initialized

Avoids some console noise

Change-Id: I521e430eeabe8fcf5012834dc7be7af8c0ce418b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142724
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 32aa6697c0b9f0ef490f42165a6b777c2b800da4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142681
Tested-by: Jenkins CollaboraOffice 

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 4cb9ef3ea553..5a4f556384e4 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2840,6 +2840,8 @@ static gboolean spin_lok_loop(void *pData)
 static void updateClientZoom(LOKDocView *pDocView)
 {
 LOKDocViewPrivate& priv = getPrivate(pDocView);
+if (!priv->m_fZoom)
+return; // Not initialized yet?
 gint nScaleFactor = gtk_widget_get_scale_factor(GTK_WIDGET(pDocView));
 gint nTileSizePixelsScaled = nTileSizePixels * nScaleFactor;
 GError* error = nullptr;


[Libreoffice-commits] core.git: include/test sc/CppunitTest_sc_filters_test.mk sc/CppunitTest_sc_opencl_test.mk sc/CppunitTest_sc_parallelism.mk sc/Library_scqahelper.mk sc/qa sc/subsequent_setup.mk s

2022-11-15 Thread Xisco Fauli (via logerrit)
 include/test/unoapi_test.hxx  |1 
 sc/CppunitTest_sc_filters_test.mk |1 
 sc/CppunitTest_sc_opencl_test.mk  |1 
 sc/CppunitTest_sc_parallelism.mk  |1 
 sc/Library_scqahelper.mk  |1 
 sc/qa/unit/helper/qahelper.cxx|  190 +++
 sc/qa/unit/helper/qahelper.hxx|   36 
 sc/qa/unit/subsequent_export_test.cxx | 1694 +-
 sc/subsequent_setup.mk|   52 -
 sc/ucalc_setup.mk |1 
 test/source/unoapi_test.cxx   |5 
 11 files changed, 899 insertions(+), 1084 deletions(-)

New commits:
commit a865d042eff3cdd4d78badcc55c9d8fdf9ef52aa
Author: Xisco Fauli 
AuthorDate: Thu Nov 10 14:18:12 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 11:56:34 2022 +0100

CppunitTest_sc_subsequent_export_test: inherit from UnoApiXmlTest

Some notes:
* testLinkedGraphicRT needed to be adapted. Saving to
Calc Office Open XML doesn't keep IsLinkedGraphic.
Reported in tdf#152036. No idea why it didn't fail before

* Some tests used "generic_HTML" as export filter format, which
is wrong. Instead, "HTML (StarCalc)" should have been used.
But then, the test would have failed with
- unsatisfied query for interface of type 
com.sun.star.sheet.XSpreadsheetDocument!
So trying to export to html in those tests is not expected.
No idea why it didn't fail before

* testTdf90299 fails now with
- Expected: 'file:///tmp/lu23738863wthph.tmp/dummy.xls'#$Sheet1.A1
- Actual  : 
'file:///tmp/lu23738863wthph.tmp/lu23738863wthpg.tmp/dummy.xls'#$Sheet1.A1
I added a TODO to check it later

* testNamedRangeBugfdo62729 fails on mac with an infinite loop

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

diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 0277131e31f7..461b52dcad93 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -34,6 +34,7 @@ public:
 virtual void tearDown() override;
 
 OUString createFileURL(std::u16string_view aFileBase);
+OUString createFilePath(std::u16string_view aFileBase);
 void load(const OUString& rURL, const char* pPassword = nullptr);
 OUString loadFromURL(std::u16string_view aFileBase, const char* pPassword 
= nullptr);
 
diff --git a/sc/CppunitTest_sc_filters_test.mk 
b/sc/CppunitTest_sc_filters_test.mk
index 67ef60664081..ca12691c73a4 100644
--- a/sc/CppunitTest_sc_filters_test.mk
+++ b/sc/CppunitTest_sc_filters_test.mk
@@ -24,6 +24,7 @@ endif
 $(eval $(call gb_CppunitTest_use_externals,sc_filters_test, \
boost_headers \
mdds_headers \
+   libxml2 \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,sc_filters_test, \
diff --git a/sc/CppunitTest_sc_opencl_test.mk b/sc/CppunitTest_sc_opencl_test.mk
index 9320d6757408..0807e14c08e1 100644
--- a/sc/CppunitTest_sc_opencl_test.mk
+++ b/sc/CppunitTest_sc_opencl_test.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_CppunitTest_use_externals,sc_opencl_test, \
boost_headers \
 $(call gb_Helper_optional,OPENCL,clew) \
mdds_headers \
+   libxml2 \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,sc_opencl_test, \
diff --git a/sc/CppunitTest_sc_parallelism.mk b/sc/CppunitTest_sc_parallelism.mk
index 8511d209f3d6..74b88f3b7d80 100644
--- a/sc/CppunitTest_sc_parallelism.mk
+++ b/sc/CppunitTest_sc_parallelism.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_parallelism, \
 sb \
 sfx \
 sot \
+subsequenttest \
 svl \
 svt \
 svx \
diff --git a/sc/Library_scqahelper.mk b/sc/Library_scqahelper.mk
index 78bbae5cd9ec..15289fea87af 100644
--- a/sc/Library_scqahelper.mk
+++ b/sc/Library_scqahelper.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,scqahelper,\
sc \
sfx \
sot \
+   subsequenttest \
svl \
svt \
svx \
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 45816c8f6fd4..59d4177ef19c 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -313,6 +313,120 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* 
pDoc, sal_Int32 nFormat)
 CPPUNIT_ASSERT_EQUAL(ScRangeList(ScRange(1,1,2,3,1,2)), rRange3);
 }
 
+void testFormats(ScModelTestBase* pTest, ScDocument* pDoc,std::u16string_view 
sFormat)
+{
+//test Sheet1 with csv file
+OUString aCSVFileName = 
pTest->createFilePath(u"contentCSV/numberFormat.csv");
+testFile(aCSVFileName, *pDoc, 0, StringType::PureString);
+//need to test the color of B3
+//it's not a font color!
+//formatting for B5: # ??/100 gets lost during import
+
+//test Sheet2
+const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 1);
+vcl::Font aFont;
+pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
+   

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

2022-11-15 Thread Caolán McNamara (via logerrit)
 sw/source/filter/basflt/shellio.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8359e28ff1ef3c2bf2c0e6da0813343022d54516
Author: Caolán McNamara 
AuthorDate: Tue Nov 15 08:54:31 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 12:22:16 2022 +0100

ofz#53416 Abrt

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

diff --git a/sw/source/filter/basflt/shellio.cxx 
b/sw/source/filter/basflt/shellio.cxx
index 1027ea9c4210..443e1a25902e 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -84,7 +85,7 @@ void SwAsciiOptions::Reset()
 m_eCharSet = ::osl_getThreadTextEncoding();
 m_nLanguage = LANGUAGE_SYSTEM;
 m_bIncludeBOM = true;
-m_bIncludeHidden = 
officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get();
+m_bIncludeHidden = !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get();
 }
 
 ErrCode SwReader::Read( const Reader& rOptions )


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

2022-11-15 Thread Caolán McNamara (via logerrit)
 dbaccess/uiconfig/ui/connectionpage.ui  |  156 ++--
 dbaccess/uiconfig/ui/dbwizconnectionpage.ui |   78 +++---
 dbaccess/uiconfig/ui/jdbcconnectionpage.ui  |   96 -
 3 files changed, 165 insertions(+), 165 deletions(-)

New commits:
commit 8fd86685dc48a4f381886785256dcb1fcce18fc4
Author: Caolán McNamara 
AuthorDate: Tue Nov 15 11:13:15 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 13:37:20 2022 +0100

resave with latest glade

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

diff --git a/dbaccess/uiconfig/ui/connectionpage.ui 
b/dbaccess/uiconfig/ui/connectionpage.ui
index cfac643b97d6..ae523c7c56d7 100644
--- a/dbaccess/uiconfig/ui/connectionpage.ui
+++ b/dbaccess/uiconfig/ui/connectionpage.ui
@@ -1,105 +1,105 @@
 
-
+
 
   
   
 True
-False
+False
 True
 True
-6
+6
 vertical
 12
 
   
 True
-False
+False
 start
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-6
-12
+False
 12
 6
 True
 True
+6
+12
 
   
 True
-False
+False
 start
 Path to the dBASE files:
-True
-browseurl
+True
+browseurl
   
   
-0
-0
+0
+0
   
 
 
   
 _Create New
 True
-True
-True
-True
+True
+True
+True
   
   
-1
-0
+1
+0
   
 
 
   
 _Browse…
 True
-True
-True
-True
+True
+True
+True
   
   
-1
-1
+1
+1
   
 
 
-  
+  
   
 True
-False
+False
 
   
 True
-True
-True
+True
 True
+True
   
   
-1
-0
+1
+0
   
 
 
   
 True
-False
+False
   
   
-0
-0
+0
+0
   
 
   
   
-0
-1
+0
+1
   
 
   
@@ -107,7 +107,7 @@
 
   
 True
-False
+False
 General
 
   
@@ -124,60 +124,60 @@
 
   
 True
-False
+False
 start
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-True
-6
-12
+False
 12
 6
+True
+True
+6
+12
 
   
 True
-False
+False
 _User name:
-True
-userNameEntry
+True
+userNameEntry
 1
   
   
-0
-0
+0
+0
   
 
 
   
 True
-True
-True
+True
 True
+True
   
   
-1
-0
+1
+0
   
 
 
   
 Password required
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   

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

2022-11-15 Thread Christian Lohmaier (via logerrit)
 source/text/sbasic/shared/03132000.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d2259c8401ccc4d9ead41f6aff4903601e5e8564
Author: Christian Lohmaier 
AuthorDate: Tue Nov 15 13:52:57 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Nov 15 13:54:48 2022 +0100

silence make translations warning (emtpy string flagged for translation)

Change-Id: Ie8d188eca6b04a1e264ebe4f1abfeaa79bcba37d

diff --git a/source/text/sbasic/shared/03132000.xhp 
b/source/text/sbasic/shared/03132000.xhp
index 82f607f46d..7cbb593874 100644
--- a/source/text/sbasic/shared/03132000.xhp
+++ b/source/text/sbasic/shared/03132000.xhp
@@ -154,7 +154,7 @@
   svc.Console 
modal:=False
   
svc.DebugPrint("Lorem", "Ipsum", "...")
End Sub ' 
SF_Trace
-   
+   
Sub 
A2B_Trace
   
GlobalScope.BasicLibraries.LoadLibrary("Access2Base")
   
Access2Base.Trace.DebugPrint("Lorem", "Ipsum", "...")


[Libreoffice-commits] core.git: helpcontent2

2022-11-15 Thread Christian Lohmaier (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f6a8395bda1cfb29faef8cfddbdf3c8775da450
Author: Christian Lohmaier 
AuthorDate: Tue Nov 15 13:57:07 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 15 13:57:07 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to d2259c8401ccc4d9ead41f6aff4903601e5e8564
  - silence make translations warning (emtpy string flagged for translation)

Change-Id: Ie8d188eca6b04a1e264ebe4f1abfeaa79bcba37d

diff --git a/helpcontent2 b/helpcontent2
index edc4b1fe0d17..d2259c8401cc 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit edc4b1fe0d17deebe719bca6eeb0a9fe316d1500
+Subproject commit d2259c8401ccc4d9ead41f6aff4903601e5e8564


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

2022-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_export_test.cxx |   21 -
 1 file changed, 21 deletions(-)

New commits:
commit 3dc257119dc235f3d74a6a6e95daf63317e4af95
Author: Xisco Fauli 
AuthorDate: Tue Nov 15 12:45:09 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 14:11:34 2022 +0100

CppunitTest_sc_subsequent_export_test: remove unneeded saveAndReload

follow-up by a save

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

diff --git a/sc/qa/unit/subsequent_export_test.cxx 
b/sc/qa/unit/subsequent_export_test.cxx
index 8533400c36a8..360e090b843a 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -346,8 +346,6 @@ void ScExportTest::testTdf139167()
 {
 createScDoc("xlsx/tdf139167.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/styles.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -361,8 +359,6 @@ void ScExportTest::testTdf113271()
 {
 createScDoc("xlsx/tdf113271.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/styles.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -380,8 +376,6 @@ void ScExportTest::testTdf139394()
 {
 createScDoc("xlsx/tdf139394.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/worksheets/sheet1.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -407,8 +401,6 @@ void ScExportTest::testExtCondFormatXLSX()
 {
 createScDoc("xlsx/tdf139021.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/worksheets/sheet1.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -449,8 +441,6 @@ void ScExportTest::testTdf90104()
 {
 createScDoc("xlsx/tdf90104.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 
 xmlDocUniquePtr pDoc = parseExport("xl/worksheets/sheet1.xml");
@@ -472,8 +462,6 @@ void ScExportTest::testTdf111876()
 
 createScDoc("xlsx/tdf111876.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/worksheets/_rels/sheet1.xml.rels");
 CPPUNIT_ASSERT(pDoc);
@@ -1506,7 +1494,6 @@ void ScExportTest::testNamedRangeBugfdo62729()
 void ScExportTest::testBuiltinRangesXLSX()
 {
 createScDoc("xlsx/built-in_ranges.xlsx");
-saveAndReload("Calc Office Open XML");
 
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/workbook.xml");
@@ -3736,8 +3723,6 @@ void ScExportTest::testSheetTextBoxHyperlinkXLSX()
 {
 createScDoc("xlsx/textbox-hyperlink.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/drawings/drawing1.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -3783,8 +3768,6 @@ void ScExportTest::testSheetCondensedCharacterSpaceXLSX()
 {
 createScDoc("xlsx/textbox-CondensedCharacterSpace.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/drawings/drawing1.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -3832,8 +3815,6 @@ void ScExportTest::testSheetRunParagraphPropertyXLSX()
 {
 createScDoc("xlsx/TextColor.xlsx");
 
-saveAndReload("Calc Office Open XML");
-
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/sharedStrings.xml");
 CPPUNIT_ASSERT(pDoc);
@@ -3845,7 +3826,6 @@ void ScExportTest::testSheetRunParagraphPropertyXLSX()
 void ScExportTest::testPreserveTextWhitespaceXLSX()
 {
 createScDoc("xlsx/preserve-whitespace.xlsx");
-saveAndReload("Calc Office Open XML");
 
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/sharedStrings.xml");
@@ -3856,7 +3836,6 @@ void ScExportTest::testPreserveTextWhitespaceXLSX()
 void ScExportTest::testPreserveTextWhitespace2XLSX()
 {
 createScDoc("xlsx/preserve_space.xlsx");
-saveAndReload("Calc Office Open XML");
 
 save("Calc Office Open XML");
 xmlDocUniquePtr pDoc = parseExport("xl/sharedStrings.xml");


[Libreoffice-commits] core.git: 2 commits - dbaccess/uiconfig

2022-11-15 Thread Caolán McNamara (via logerrit)
 dbaccess/uiconfig/ui/connectionpage.ui  |6 +-
 dbaccess/uiconfig/ui/dbwizconnectionpage.ui |5 -
 dbaccess/uiconfig/ui/jdbcconnectionpage.ui  |7 ++-
 3 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 09df29aed07223fa2cdb0913b6e8ddf4da347706
Author: Caolán McNamara 
AuthorDate: Tue Nov 15 11:21:33 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 14:17:36 2022 +0100

Resolves: tdf#152043 line wrap the label

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

diff --git a/dbaccess/uiconfig/ui/connectionpage.ui 
b/dbaccess/uiconfig/ui/connectionpage.ui
index 3b6b79f25f83..5e1257bf5689 100644
--- a/dbaccess/uiconfig/ui/connectionpage.ui
+++ b/dbaccess/uiconfig/ui/connectionpage.ui
@@ -33,10 +33,13 @@
   
 True
 False
-start
 Path to the dBASE files:
 True
+True
 browseurl
+38
+38
+0
   
   
 0
diff --git a/dbaccess/uiconfig/ui/dbwizconnectionpage.ui 
b/dbaccess/uiconfig/ui/dbwizconnectionpage.ui
index 6abae02a4a1f..7e9ed7d3ea60 100644
--- a/dbaccess/uiconfig/ui/dbwizconnectionpage.ui
+++ b/dbaccess/uiconfig/ui/dbwizconnectionpage.ui
@@ -55,10 +55,13 @@
   
 True
 False
-start
 Path to the dBASE files:
 True
+True
 browseurl
+38
+38
+0
   
   
 0
diff --git a/dbaccess/uiconfig/ui/jdbcconnectionpage.ui 
b/dbaccess/uiconfig/ui/jdbcconnectionpage.ui
index 1f73482cb8b6..8c295091c5b4 100644
--- a/dbaccess/uiconfig/ui/jdbcconnectionpage.ui
+++ b/dbaccess/uiconfig/ui/jdbcconnectionpage.ui
@@ -55,10 +55,13 @@
   
 True
 False
-start
 Path to the dBASE files:
 True
+True
 browseurl
+38
+38
+0
   
   
 0
commit 5214e06f76842fea5e73a4618137adc11c9c5ce3
Author: Caolán McNamara 
AuthorDate: Tue Nov 15 11:16:54 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 14:17:23 2022 +0100

sync with dbwizconnection page wrt the expansion of 'browseurl'

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

diff --git a/dbaccess/uiconfig/ui/connectionpage.ui 
b/dbaccess/uiconfig/ui/connectionpage.ui
index ae523c7c56d7..3b6b79f25f83 100644
--- a/dbaccess/uiconfig/ui/connectionpage.ui
+++ b/dbaccess/uiconfig/ui/connectionpage.ui
@@ -74,6 +74,7 @@
   
 True
 False
+True
 
   
 True
diff --git a/dbaccess/uiconfig/ui/jdbcconnectionpage.ui 
b/dbaccess/uiconfig/ui/jdbcconnectionpage.ui
index 2cb8861a0380..1f73482cb8b6 100644
--- a/dbaccess/uiconfig/ui/jdbcconnectionpage.ui
+++ b/dbaccess/uiconfig/ui/jdbcconnectionpage.ui
@@ -48,6 +48,7 @@
   
 True
 False
+True
 6
 12
 
@@ -95,6 +96,7 @@
   
 True
 False
+True
 
   
 True


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0-10.0' - filter/qa filter/source

2022-11-15 Thread Miklos Vajna (via logerrit)
 filter/qa/unit/data/semi-transparent-multi-para.odg |binary
 filter/qa/unit/svg.cxx  |   29 
 filter/source/svg/svgwriter.cxx |5 +++
 3 files changed, 34 insertions(+)

New commits:
commit 158628777ed9a18ac8f9ec5e0795f381637da8c7
Author: Miklos Vajna 
AuthorDate: Fri Nov 11 15:58:11 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 15 15:04:37 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).

(cherry picked from commit c725028f15c36fc626d9ad8cdc288eb73c3e2643)

Conflicts:
filter/qa/unit/svg.cxx

Change-Id: I7dc93fe13c4510220bf09a388e742799ed042510

diff --git a/filter/qa/unit/data/semi-transparent-multi-para.odg 
b/filter/qa/unit/data/semi-transparent-multi-para.odg
new file mode 100644
index ..5e01e31e4f7f
Binary files /dev/null and 
b/filter/qa/unit/data/semi-transparent-multi-para.odg differ
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index 5dcb1af0eb90..070225b1491d 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -14,6 +14,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -160,6 +164,31 @@ 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:
+load(u"semi-transparent-multi-para.odg");
+
+// When exporting to SVG:
+uno::Reference xStorable(getComponent(), 
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:tspan[@class='TextPosition'])[1]", "x", 
"5908");
+assertXPath(pXmlDoc, "(//svg:tspan[@class='TextPosition'])[1]/svg:tspan", 
"fill-opacity",
+"0.8");
+assertXPath(pXmlDoc, "(//svg:tspan[@class='TextPosition'])[2]", "x", 
"5908");
+assertXPath(pXmlDoc, "(//svg:tspan[@class='TextPosition'])[2]/svg:tspan", 
"fill-opacity",
+"0.8");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 3e54df31ba49..c3abf3420877 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -640,6 +640,11 @@ sal_Int32 SVGTextWriter::setTextPosition(const 
GDIMetaFile& rMtf, sal_uLong& nCu
 {
 // Text is found in the inner metafile.
 bConfigured = true;
+
+// nTextFound == 1 is only possible if the inner 
setTextPosition() had bEmpty ==
+// false, adjust our bEmpty accordingly.
+bEmpty = false;
+
 mrActionWriter.StartMask(pA->GetPoint(), pA->GetSize(), 
pA->GetGradient(),
  nWriteFlags, &maTextOpacity);
 }


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

2022-11-15 Thread Olivier Hallot (via logerrit)
 source/text/scalc/00/0403.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a443db63229d6e46eacae7c14d7c668ca2f54ea3
Author: Olivier Hallot 
AuthorDate: Tue Nov 15 16:27:54 2022 +0200
Commit: Olivier Hallot 
CommitDate: Tue Nov 15 15:29:58 2022 +0100

Fix contents after translation review

Thanks to @lyzbet

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

diff --git a/source/text/scalc/00/0403.xhp 
b/source/text/scalc/00/0403.xhp
index 66c4ce3c6a..328c318507 100644
--- a/source/text/scalc/00/0403.xhp
+++ b/source/text/scalc/00/0403.xhp
@@ -28,7 +28,7 @@
 View 
Menu
 Choose View - Column & Row 
Headers.
 Choose View - Value Highlighting.
-Choose View - Formula Bar or View - 
Toolbars - Formula Bar.
+Choose View - Formula Bar.
 Choose View - Page Break.
 Choose View - Function 
List.
 


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 37983b994472a11663b1c3d17181dde22ac3ec85
Author: Olivier Hallot 
AuthorDate: Tue Nov 15 16:30:00 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Nov 15 15:30:00 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to a443db63229d6e46eacae7c14d7c668ca2f54ea3
  - Fix contents after translation review

Thanks to @lyzbet

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

diff --git a/helpcontent2 b/helpcontent2
index d2259c8401cc..a443db63229d 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d2259c8401ccc4d9ead41f6aff4903601e5e8564
+Subproject commit a443db63229d6e46eacae7c14d7c668ca2f54ea3


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

2022-11-15 Thread Armin Le Grand (allotropia) (via logerrit)
 drawinglayer/source/tools/converters.cxx |   32 ++-
 include/drawinglayer/converters.hxx  |   10 +
 2 files changed, 29 insertions(+), 13 deletions(-)

New commits:
commit 3aadb8a87449c9a3141bef1e41353ec57b03ad79
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue Nov 15 10:55:17 2022 +0100
Commit: Armin Le Grand 
CommitDate: Tue Nov 15 16:01:33 2022 +0100

Prepare createAlphaMask to produce mask and alpha as needed

Change-Id: Ica799419ed628f94f134433ca5b37518c5698909
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142730
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/drawinglayer/source/tools/converters.cxx 
b/drawinglayer/source/tools/converters.cxx
index 56d5d8a5fb47..8167f8bf3f60 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -73,7 +73,7 @@ bool 
implPrepareConversion(drawinglayer::primitive2d::Primitive2DContainer& rSeq
 
 AlphaMask implcreateAlphaMask(drawinglayer::primitive2d::Primitive2DContainer& 
rSequence,
   const drawinglayer::geometry::ViewInformation2D& 
rViewInformation2D,
-  const Size& rSizePixel)
+  const Size& rSizePixel, bool bUseLuminance)
 {
 ScopedVclPtrInstance pContent;
 
@@ -98,11 +98,24 @@ AlphaMask 
implcreateAlphaMask(drawinglayer::primitive2d::Primitive2DContainer& r
 // set alpha to all white (fully transparent)
 pContent->Erase();
 
+basegfx::BColorModifierSharedPtr aBColorModifier;
+
+if (bUseLuminance)
+{
+// new mode: bUseLuminance allows simple creation of alpha channels
+//   for any content (e.g. gradients)
+aBColorModifier = 
std::make_shared();
+}
+else
+{
+// Embed primitives to paint them black
+aBColorModifier
+= 
std::make_shared(basegfx::BColor(0.0, 0.0, 
0.0));
+}
 // embed primitives to paint them black
 const drawinglayer::primitive2d::Primitive2DReference xRef(
-new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
-std::move(rSequence),
-
std::make_shared(basegfx::BColor(0.0, 0.0, 
0.0;
+new 
drawinglayer::primitive2d::ModifiedColorPrimitive2D(std::move(rSequence),
+
aBColorModifier));
 const drawinglayer::primitive2d::Primitive2DContainer xSeq{ xRef };
 
 // render
@@ -121,7 +134,7 @@ namespace drawinglayer
 AlphaMask createAlphaMask(drawinglayer::primitive2d::Primitive2DContainer&& 
rSeq,
   const geometry::ViewInformation2D& 
rViewInformation2D,
   sal_uInt32 nDiscreteWidth, sal_uInt32 
nDiscreteHeight,
-  sal_uInt32 nMaxSquarePixels)
+  sal_uInt32 nMaxSquarePixels, bool bUseLuminance)
 {
 drawinglayer::primitive2d::Primitive2DContainer aSequence(std::move(rSeq));
 
@@ -132,7 +145,7 @@ AlphaMask 
createAlphaMask(drawinglayer::primitive2d::Primitive2DContainer&& rSeq
 
 const Size aSizePixel(nDiscreteWidth, nDiscreteHeight);
 
-return implcreateAlphaMask(aSequence, rViewInformation2D, aSizePixel);
+return implcreateAlphaMask(aSequence, rViewInformation2D, aSizePixel, 
bUseLuminance);
 }
 
 BitmapEx convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& 
rSeq,
@@ -182,7 +195,7 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
 // This gives good results, it is in principle comparable with
 // the results using pre-multiplied alpha tooling, also reducing
 // the range of values where high alpha values are used.
-ScopedVclPtrInstance< VirtualDevice > 
pContent(*Application::GetDefaultDevice());
+ScopedVclPtrInstance 
pContent(*Application::GetDefaultDevice());
 
 // prepare vdev
 if (!pContent->SetOutputSizePixel(aSizePixel, false))
@@ -217,7 +230,8 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
 OUString::createFromAscii(std::getenv("VCL_DUMP_BMP_PATH")));
 if (!sDumpPath.isEmpty())
 {
-SvFileStream aNew(sDumpPath + "test_content.bmp", 
StreamMode::WRITE | StreamMode::TRUNC);
+SvFileStream aNew(sDumpPath + "test_content.bmp",
+  StreamMode::WRITE | StreamMode::TRUNC);
 WriteDIB(aRetval, aNew, false, true);
 }
 }
@@ -226,7 +240,7 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
 // Create the AlphaMask using a method that does this always correct (also 
used
 // now in GlowPrimitive2D and ShadowPrimitive2D which both only need the
 // AlphaMask to do their job, so speeding that up, too).
-AlphaMask aAlpha(implcreateAlphaMask(aSequence, rViewInformation2D, 
aSizePixel));
+AlphaMask aAlpha(implcreateAlphaMask(aSequence, rViewI

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

2022-11-15 Thread Bogdan B (via logerrit)
 sd/qa/uitest/impress_tests/autocorrectOptions.py |2 +-
 sd/qa/uitest/impress_tests/exportToPDF.py|3 ++-
 sd/qa/uitest/impress_tests/insertSlide.py|5 +
 sd/qa/uitest/impress_tests/masterElements.py |4 +---
 sd/qa/uitest/impress_tests/tdf134734.py  |3 +--
 sd/qa/uitest/impress_tests2/tdf127900.py |4 +++-
 sd/qa/uitest/impress_tests2/tdf139511.py |1 -
 sd/qa/uitest/impress_tests2/tdf148810.py |1 -
 uitest/uitest/uihelper/testDialog.py |2 +-
 9 files changed, 10 insertions(+), 15 deletions(-)

New commits:
commit eedb077f8860e02838b37d75c230e51cd290a283
Author: Bogdan B 
AuthorDate: Fri Nov 11 20:14:10 2022 +0200
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 17:41:46 2022 +0100

tdf#132293 remove unused imports from uitest

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

diff --git a/sd/qa/uitest/impress_tests/autocorrectOptions.py 
b/sd/qa/uitest/impress_tests/autocorrectOptions.py
index a79facecc204..2f4b7645e30c 100644
--- a/sd/qa/uitest/impress_tests/autocorrectOptions.py
+++ b/sd/qa/uitest/impress_tests/autocorrectOptions.py
@@ -10,9 +10,9 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
-import time
 from uitest.uihelper.common import select_pos
 
+
 class autocorrectOptions(UITestCase):
 
def test_autocorrect_options_impress(self):
diff --git a/sd/qa/uitest/impress_tests/exportToPDF.py 
b/sd/qa/uitest/impress_tests/exportToPDF.py
index 4dcaa4954405..72a8ac916a46 100644
--- a/sd/qa/uitest/impress_tests/exportToPDF.py
+++ b/sd/qa/uitest/impress_tests/exportToPDF.py
@@ -8,12 +8,13 @@
 #
 
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_state_as_dict
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from org.libreoffice.unotest import systemPathToFileUrl
 from tempfile import TemporaryDirectory
 import os.path
 
+
 class exportToPDF(UITestCase):
 
 def test_checkDefaultValues(self):
diff --git a/sd/qa/uitest/impress_tests/insertSlide.py 
b/sd/qa/uitest/impress_tests/insertSlide.py
index f81d0792f2b5..83f33c59782c 100644
--- a/sd/qa/uitest/impress_tests/insertSlide.py
+++ b/sd/qa/uitest/impress_tests/insertSlide.py
@@ -8,12 +8,9 @@
 #
 
 from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.uihelper.common import select_pos
 #Bug 85360 - LibreOffice crashes and crashes desktop too on inserting 4th slide
 
+
 class insertSlide(UITestCase):
 
def test_insert_slide(self):
diff --git a/sd/qa/uitest/impress_tests/masterElements.py 
b/sd/qa/uitest/impress_tests/masterElements.py
index ad277ca25c71..9950be9e232c 100644
--- a/sd/qa/uitest/impress_tests/masterElements.py
+++ b/sd/qa/uitest/impress_tests/masterElements.py
@@ -8,10 +8,8 @@
 #
 
 from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.uihelper.common import select_pos
+
 
 class masterElements(UITestCase):
 
diff --git a/sd/qa/uitest/impress_tests/tdf134734.py 
b/sd/qa/uitest/impress_tests/tdf134734.py
index 57559c4ead52..8320246272b7 100644
--- a/sd/qa/uitest/impress_tests/tdf134734.py
+++ b/sd/qa/uitest/impress_tests/tdf134734.py
@@ -8,11 +8,10 @@
 #
 
 from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict, select_pos
 from uitest.uihelper.common import change_measurement_unit
 from com.sun.star.drawing.FillStyle import SOLID
-import importlib
+
 
 class TestClass(UITestCase):
 def test_master_page_background(self):
diff --git a/sd/qa/uitest/impress_tests2/tdf127900.py 
b/sd/qa/uitest/impress_tests2/tdf127900.py
index b85e602fa995..e32b76591aad 100644
--- a/sd/qa/uitest/impress_tests2/tdf127900.py
+++ b/sd/qa/uitest/impress_tests2/tdf127900.py
@@ -6,11 +6,13 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
+
 from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos, get_state_as_dict
+from uitest.uihelper.common import select_pos
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_url_for_data_file
 
+
 class tdf127900(UITestCase):
 
 def test_tdf127900(self):
diff --git a/sd/qa/uitest/impress_tests2/tdf139511.py 
b/sd/qa/uitest/impress_tests2/tdf139511.py
index 3c1988510888..4ff7a67090a1 100644
--- a/sd/qa/uitest/impress_tests2/tdf139511.py
+++ b/sd/qa/uites

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

2022-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/filters-test.cxx |   20 
 sc/qa/unit/helper/qahelper.cxx  |   44 
 sc/qa/unit/helper/qahelper.hxx  |   22 
 sc/qa/unit/subsequent_export_test.cxx   |6 
 sc/qa/unit/subsequent_filters_test2.cxx | 1451 +---
 5 files changed, 649 insertions(+), 894 deletions(-)

New commits:
commit ad40ad91c5400391a0848832e91c596be8fbd811
Author: Xisco Fauli 
AuthorDate: Tue Nov 15 12:59:53 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 17:57:35 2022 +0100

CppunitTest_sc_subsequent_filters_test2: inherit from UnoApiXmlTest

I couldn't find a way to test testTooManyColsRows,
move it to sc/qa/unit/filters-test.cxx for the
time being

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

diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 91422c840ca2..862768af8390 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -84,6 +85,7 @@ public:
 void testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef const & 
xDocShRef, SCROW nRow1, SCROW nRow2,
 bool bCheckRelativeInSheet );
 void testSortWithFormattingXLS();
+void testTooManyColsRows();
 void testForcepoint107();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
@@ -112,6 +114,7 @@ public:
 CPPUNIT_TEST(testSortWithSharedFormulasODS);
 CPPUNIT_TEST(testSortWithSheetExternalReferencesODS);
 CPPUNIT_TEST(testSortWithFormattingXLS);
+CPPUNIT_TEST(testTooManyColsRows);
 CPPUNIT_TEST(testForcepoint107);
 
 CPPUNIT_TEST_SUITE_END();
@@ -887,6 +890,23 @@ void ScFiltersTest::testSortWithFormattingXLS()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTooManyColsRows()
+{
+// The intentionally doc has cells beyond our MAXROW/MAXCOL, so there
+// should be a warning on load.
+ScDocShellRef xDocSh = loadDoc(u"too-many-cols-rows.", FORMAT_ODS, 
/*bReadWrite*/ false,
+   /*bCheckErrorCode*/ false);
+CPPUNIT_ASSERT(xDocSh->GetErrorCode() == SCWARN_IMPORT_ROW_OVERFLOW
+   || xDocSh->GetErrorCode() == SCWARN_IMPORT_COLUMN_OVERFLOW);
+xDocSh->DoClose();
+
+xDocSh = loadDoc(u"too-many-cols-rows.", FORMAT_XLSX, /*bReadWrite*/ false,
+ /*bCheckErrorCode*/ false);
+CPPUNIT_ASSERT(xDocSh->GetErrorCode() == SCWARN_IMPORT_ROW_OVERFLOW
+   || xDocSh->GetErrorCode() == SCWARN_IMPORT_COLUMN_OVERFLOW);
+xDocSh->DoClose();
+}
+
 // just needs to not crash on recalc
 void ScFiltersTest::testForcepoint107()
 {
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 59d4177ef19c..3dad0c66be3f 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -933,48 +933,6 @@ std::shared_ptr 
ScBootstrapFixture::exportTo( ScDocShell& rS
 return pTempFile;
 }
 
-void ScBootstrapFixture::miscRowHeightsTest( TestParam const * aTestValues, 
unsigned int numElems )
-{
-for ( unsigned int index=0; indexGetDocument();
-
-for (int i=0; iDoClose();
-}
-}
-
 void ScBootstrapFixture::setUp()
 {
 test::BootstrapFixture::setUp();
@@ -1041,7 +999,7 @@ ScDocShell* ScModelTestBase::getScDocShell()
 return pDocSh;
 }
 
-void ScModelTestBase::miscRowHeightsTest( TestParam2 const * aTestValues, 
unsigned int numElems)
+void ScModelTestBase::miscRowHeightsTest( TestParam const * aTestValues, 
unsigned int numElems)
 {
 for ( unsigned int index=0; index exportTo(ScDocShell& rShell, sal_Int32 
nFormat, bool bValidate = true);
 
-void miscRowHeightsTest( TestParam const * aTestValues, unsigned int 
numElems );
-
 virtual void setUp() override;
 virtual void tearDown() override;
 };
@@ -272,7 +252,7 @@ public:
 void createScDoc(const char* pName = nullptr, const char* pPassword = 
nullptr);
 ScDocument* getScDoc();
 ScDocShell* getScDocShell();
-void miscRowHeightsTest( TestParam2 const * aTestValues, unsigned int 
numElems);
+void miscRowHeightsTest( TestParam const * aTestValues, unsigned int 
numElems);
 };
 
 #define ASSERT_DOUBLES_EQUAL( expected, result )\
diff --git a/sc/qa/unit/subsequent_export_test.cxx 
b/sc/qa/unit/subsequent_export_test.cxx
index 360e090b843a..34f675f36677 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -1342,7 +1342,7 @@ void ScExportTest::testDataBarExportXLSX()
 
 void ScExportTest::testMiscRowHeightExport()
 {
-static const TestParam2::RowData DfltRowData[] = {
+static const TestParam::RowData DfltRowData[] = {
 { 0, 4, 0, 529, 0, false },
 { 5, 10, 0, 1058, 0, false },
 { 17, 20, 0, 1746, 0, false },
@@ -1351,7 +1351,7 @@ void ScExportTest::testMiscRowHeightExport()
 

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

2022-11-15 Thread Julien Nabet (via logerrit)
 l10ntools/source/treemerge.cxx |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit bf9ce4e056b521db8e8c997a56317ab15963dce9
Author: Julien Nabet 
AuthorDate: Mon Nov 14 18:36:03 2022 +0100
Commit: Julien Nabet 
CommitDate: Tue Nov 15 19:38:32 2022 +0100

asan: fix leak in lcl_MergeLevel

Direct leak of 2000 byte(s) in 2 object(s) allocated from:
0 0x55906afe399e in malloc 
(/home/julien/lo/libo_perf/workdir/LinkTarget/Executable/treex+0xff99e) 
(BuildId: 5b19224d0ca2120a)
1 0x7fd51a4abfd7 in xmlEncodeSpecialChars 
(/lib/x86_64-linux-gnu/libxml2.so.2+0x31fd7) (BuildId: 
008b52a46ddf3013589362f7f678f7a6c8dd1e56)
2 0x55906b023403 in (anonymous namespace)::lcl_MergeLevel(_xmlDoc*, 
_xmlNode*, unsigned char const*, MergeDataFile*, rtl::OString const&, 
rtl::OString const&) treemerge.cxx
3 0x55906b0232d4 in (anonymous namespace)::lcl_MergeLevel(_xmlDoc*, 
_xmlNode*, unsigned char const*, MergeDataFile*, rtl::OString const&, 
rtl::OString const&) treemerge.cxx
4 0x55906b0232d4 in (anonymous namespace)::lcl_MergeLevel(_xmlDoc*, 
_xmlNode*, unsigned char const*, MergeDataFile*, rtl::OString const&, 
rtl::OString const&) treemerge.cxx
5 0x55906b0226ef in TreeParser::Merge(rtl::OString const&, rtl::OString 
const&, rtl::OString const&) treemerge.cxx
6 0x55906b02c0dd in sal_main_with_args(int, char**) treex.cxx
7 0x55906b02baad in main 
(/home/julien/lo/libo_perf/workdir/LinkTarget/Executable/treex+0x147aad) 
(BuildId: 5b19224d0ca2120a)
8 0x7fd519e46189 in __libc_start_call_main 
csu/../sysdeps/nptl/libc_start_call_main.h:58:16

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

diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index ff48aeda6b74..860c85b38598 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -116,11 +116,10 @@ namespace
 helper::xmlStrToOString( sTitle ).
 replaceAll("$[officename]","%PRODUCTNAME").
 
replaceAll("$[officeversion]","%PRODUCTVERSION");
-xmlNodeSetContent(
-pReturn,
-xmlEncodeSpecialChars( nullptr,
-reinterpret_cast(
-sNewTitle.getStr() )));
+xmlChar *xmlString = xmlEncodeSpecialChars(nullptr,
+reinterpret_cast( sNewTitle.getStr() 
));
+xmlNodeSetContent( pReturn, xmlString);
+xmlFree( xmlString );
 xmlFree( sTitle );
 break;
 }


Re: Wanted to contribute to libreoffice but decided not to after I got abused by some list members because I offered a suggestion which they didn't like.

2022-11-15 Thread Ralf Quint

On 11/9/2022 1:47 AM, A wrote:

I wanted to contribute to libreoffice but decided not to after I got
abused by some list members because I offered a suggestion which they
didn't like.


All I can see is that it is YOU who is abusing others. And then complain 
when you're being called out for it.

Just go away...


R



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

2022-11-15 Thread Eike Rathke (via logerrit)
 sc/source/core/data/column2.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 8309f94001ec29faff288cb8f920ee00978bb85a
Author: Eike Rathke 
AuthorDate: Tue Nov 15 18:19:23 2022 +0100
Commit: Eike Rathke 
CommitDate: Tue Nov 15 19:55:54 2022 +0100

Resolves: tdf#152053 GetOptimalColWidth() obtain number format from next row

... if 1st or 2nd row doesn't have one applied, i.e. is header.

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

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 08391bd24150..7f3a5d1e3d5d 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -740,7 +740,8 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
 
 if ( pParam && pParam->mbSimpleText )
 {   // all the same except for number format
-const ScPatternAttr* pPattern = GetPattern( 0 );
+SCROW nRow = 0;
+const ScPatternAttr* pPattern = GetPattern( nRow );
 vcl::Font aFont;
 // font color doesn't matter here
 pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &rZoomX );
@@ -752,6 +753,17 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
 // Try to find the row that has the longest string, and measure the 
width of that string.
 SvNumberFormatter* pFormatter = rDocument.GetFormatTable();
 sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter );
+while ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 && nRow <= 2)
+{
+// This is often used with CSV import or other data having a header
+// row; if there is no specific format set try next row for actual
+// data format.
+// Or again in case there was a leading sep=";" row or two header
+// rows..
+const ScPatternAttr* pNextPattern = GetPattern( ++nRow );
+if (pNextPattern != pPattern)
+nFormat = pNextPattern->GetNumberFormat( pFormatter );
+}
 OUString aLongStr;
 const Color* pColor;
 if (pParam->mnMaxTextRow >= 0)


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

2022-11-15 Thread Mert Tumer (via logerrit)
 sc/source/ui/docshell/docsh.cxx |   30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 2550835bde036a2809d693d9633b8b736c035ecb
Author: Mert Tumer 
AuthorDate: Mon Mar 21 14:07:13 2022 +0300
Commit: Aron Budea 
CommitDate: Tue Nov 15 20:12:12 2022 +0100

android: Fix tab name on CSV still becomes tempfile name

Unfortunately, in order for isLOKMObilePhone to work we need
to send deviceFormFactor on document load but at this stage
the document is still not loaded and the control does not work here

Signed-off-by: Mert Tumer 
Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142607
Tested-by: Jenkins

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index cb5c9e11606e..df55d056f7f2 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 
 #include 
@@ -1296,23 +1298,21 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 sc::SetFormulaDirtyContext aCxt;
 m_pDocument->SetAllFormulasDirty(aCxt);
 
-bool bIsMobile = comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current()
-&& SfxViewShell::Current()->isLOKMobilePhone();
 // for mobile case, we use a copy of the original document 
and give it a temporary name before editing
 // Therefore, the sheet name becomes ugly, long and 
nonsensical.
-if (!bIsMobile)
-// The same resulting name has to be handled in
-// ScExternalRefCache::initializeDoc() and related, 
hence
-// pass 'true' for RenameTab()'s bExternalDocument for 
a
-// composed name so ValidTabName() will not be checked,
-// which could veto the rename in case it contained
-// characters that Excel does not handle. If we wanted 
to
-// change that then it needed to be handled in all
-// corresponding places of the external references
-// manager/cache. Likely then we'd also need a method 
to
-// compose a name excluding such characters.
-m_pDocument->RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
-
+#if !(defined ANDROID)
+// The same resulting name has to be handled in
+// ScExternalRefCache::initializeDoc() and related, hence
+// pass 'true' for RenameTab()'s bExternalDocument for a
+// composed name so ValidTabName() will not be checked,
+// which could veto the rename in case it contained
+// characters that Excel does not handle. If we wanted to
+// change that then it needed to be handled in all
+// corresponding places of the external references
+// manager/cache. Likely then we'd also need a method to
+// compose a name excluding such characters.
+m_pDocument->RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+#endif
 bOverflowRow = aImpEx.IsOverflowRow();
 bOverflowCol = aImpEx.IsOverflowCol();
 bOverflowCell = aImpEx.IsOverflowCell();


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

2022-11-15 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/FrameControlsManager.cxx |4 
 sw/source/uibase/docvw/HeaderFooterWin.cxx  |  138 
 sw/source/uibase/inc/HeaderFooterWin.hxx|   48 ++--
 3 files changed, 133 insertions(+), 57 deletions(-)

New commits:
commit 701e8d06484fb8781e43017ccf4ac1a3d64ac9e8
Author: Caolán McNamara 
AuthorDate: Tue Nov 15 16:02:06 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 20:34:51 2022 +0100

Resolves: tdf#147802 don't create a header/footer control for every page

just create a cheaper SwHeaderFooterDashedLine and only create the
"expensive" control on-demand if it becomes visible on-screen and
destroy it immediately if it goes off-screen.

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

diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx 
b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 93254830a2f1..e5c0c202a4eb 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -94,7 +94,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const 
SwPageFrame* pPageFra
 else
 {
 SwFrameControlPtr pNewControl =
-std::make_shared( 
VclPtr::Create(
+std::make_shared( 
VclPtr::Create(
 m_pEditWin, pPageFrame, bHeader 
).get() );
 const SwViewOption* pViewOpt = 
m_pEditWin->GetView().GetWrtShell().GetViewOptions();
 pNewControl->SetReadonly( pViewOpt->IsReadonly() );
@@ -104,7 +104,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const 
SwPageFrame* pPageFra
 
 tools::Rectangle aPageRect = m_pEditWin->LogicToPixel( 
pPageFrame->getFrameArea().SVRect() );
 
-SwHeaderFooterWin* pWin = dynamic_cast(pControl->GetWindow());
+SwHeaderFooterDashedLine* pWin = 
dynamic_cast(pControl->GetWindow());
 assert( pWin != nullptr) ;
 assert( pWin->IsHeader() == bHeader );
 pWin->SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 81f9121892f1..0e79e1481012 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -160,26 +160,89 @@ void 
SwFrameButtonPainter::PaintButton(drawinglayer::primitive2d::Primitive2DCon
 new 
drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aPolygon), 
aLineColor)));
 }
 
-SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame 
*pFrame, bool bHeader ) :
-SwFrameMenuButtonBase(pEditWin, pFrame, 
"modules/swriter/ui/hfmenubutton.ui", "HFMenuButton"),
+SwHeaderFooterDashedLine::SwHeaderFooterDashedLine(SwEditWin* pEditWin, const 
SwFrame *pFrame, bool bHeader)
+: SwDashedLine(pEditWin, &SwViewOption::GetHeaderFooterMarkColor)
+, m_pEditWin(pEditWin)
+, m_pFrame(pFrame)
+, m_bIsHeader(bHeader)
+{
+}
+
+bool SwHeaderFooterDashedLine::IsOnScreen()
+{
+tools::Rectangle aBounds(GetPosPixel(), GetSizePixel());
+tools::Rectangle aVisArea = 
GetEditWin()->LogicToPixel(GetEditWin()->GetView().GetVisArea());
+return aBounds.Overlaps(aVisArea);
+}
+
+void SwHeaderFooterDashedLine::EnsureWin()
+{
+if (!m_pWin)
+{
+m_pWin = VclPtr::Create(m_pEditWin, m_pFrame, 
m_bIsHeader);
+m_pWin->SetZOrder(this, ZOrderFlags::Before);
+}
+}
+
+void SwHeaderFooterDashedLine::ShowAll(bool bShow)
+{
+Show(bShow);
+if (!m_pWin && IsOnScreen())
+EnsureWin();
+if (m_pWin)
+m_pWin->ShowAll(bShow);
+}
+
+void SwHeaderFooterDashedLine::SetReadonly(bool bReadonly)
+{
+ShowAll(!bReadonly);
+}
+
+bool SwHeaderFooterDashedLine::Contains(const Point &rDocPt) const
+{
+if (m_pWin && m_pWin->Contains(rDocPt))
+return true;
+
+::tools::Rectangle aLineRect(GetPosPixel(), GetSizePixel());
+return aLineRect.Contains(rDocPt);
+}
+
+void SwHeaderFooterDashedLine::SetOffset(Point aOffset, tools::Long 
nXLineStart, tools::Long nXLineEnd)
+{
+Point aLinePos(nXLineStart, aOffset.Y());
+Size aLineSize(nXLineEnd - nXLineStart, 1);
+SetPosSizePixel(aLinePos, aLineSize);
+
+bool bOnScreen = IsOnScreen();
+if (!m_pWin && bOnScreen)
+{
+EnsureWin();
+m_pWin->ShowAll(true);
+}
+else if (m_pWin && !bOnScreen)
+m_pWin.disposeAndClear();
+
+if (m_pWin)
+m_pWin->SetOffset(aOffset);
+}
+
+SwHeaderFooterWin::SwHeaderFooterWin(SwEditWin* pEditWin, const SwFrame 
*pFrame, bool bHeader ) :
+InterimItemWindow(pEditWin, "modules/swriter/ui/hfmenubutton.ui", 
"HFMenuButton"),
 m_xMenuButton(m_xBuilder->weld_menu_button("menubutton")),
 m_xPushButton(m_xBuilder->weld_button("button")),
+m_pEditWin(pEditWin),
+m_pFrame(pFrame),
 m_bIsHeader( 

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

2022-11-15 Thread Michael Stahl (via logerrit)
 include/vcl/pdfwriter.hxx  
  |4 
 sw/source/core/text/EnhancedPDFExportHelper.cxx
  |2 
 
vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
 |  560 ++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx 
  |   61 +
 vcl/source/gdi/pdfwriter_impl.cxx  
  |   18 
 5 files changed, 643 insertions(+), 2 deletions(-)

New commits:
commit dfffe710d07f84f4152cf61ccd4a69279a26ff7c
Author: Michael Stahl 
AuthorDate: Fri Oct 28 21:46:54 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Nov 15 20:42:35 2022 +0100

tdf#149140 vcl,sw: PDF/UA export: add Scope attribute to table headers

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

diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index ff0fa6066f71..5d06b1b05c96 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -138,7 +138,7 @@ public:
 Placement, WritingMode, SpaceBefore, SpaceAfter, StartIndent, 
EndIndent,
 TextIndent, TextAlign, Width, Height, BlockAlign, InlineAlign,
 LineHeight, BaselineShift, TextDecorationType, ListNumbering,
-RowSpan, ColSpan,
+RowSpan, ColSpan, Scope,
 
 // link destination is an artificial attribute that sets
 // the link annotation ID of a Link element
@@ -172,6 +172,8 @@ public:
 Normal,
 // TextDecorationType
 Underline, Overline, LineThrough,
+// Scope
+Row, Column, Both,
 // ListNumbering
 Disc, Circle, Square, Decimal, UpperRoman, LowerRoman, UpperAlpha, 
LowerAlpha
 };
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index fe67e955d37a..0f5f13c05966 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -538,6 +538,8 @@ void SwTaggedPDFHelper::SetAttributes( 
vcl::PDFWriter::StructElement eType )
 break;
 
 case vcl::PDFWriter::TableHeader :
+
mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Scope, 
vcl::PDFWriter::Column);
+[[fallthrough]];
 case vcl::PDFWriter::TableData :
 bPlacement =
 bWritingMode =
diff --git 
a/vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
 
b/vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
new file mode 100644
index ..1b13a4fd5004
--- /dev/null
+++ 
b/vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
@@ -0,0 +1,560 @@
+
+http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:draw="urn:oasis:names:tc:open
 document:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ Christophe 
Strobbe2022-05-14T18:39:40.8680018PT21M55STest
 File for Simple Tables With or Without a Properly Marked Header 
Row2022-05-17T16:43:48.91900Christoph

[Libreoffice-commits] dev-tools.git: test-bugzilla-files/config

2022-11-15 Thread Gabor Kelemen (via logerrit)
 test-bugzilla-files/config |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 09efa0825eb90233d35779807430a574afbb7587
Author: Gabor Kelemen 
AuthorDate: Tue Nov 15 10:12:12 2022 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 20:48:37 2022 +0100

Limit LO concurrency by setting MAX_CONCURRENCY

We noticed that crashtesting Calc files creates a lot of
threads which CPU-starve the whole testing process

Setting this value we still have the concurrent code tested
but server load is reasonable and the full runtime is reduced by
about a third

Change-Id: Icc20fd57cba8c6c8f884418d4f7f308f857ca06e
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/142728
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/test-bugzilla-files/config b/test-bugzilla-files/config
index 984bd52..e52aecd 100644
--- a/test-bugzilla-files/config
+++ b/test-bugzilla-files/config
@@ -11,6 +11,9 @@ export DISKSPACELIMIT=5  # Remaining disk space warning 
limit in GiB.
 export MEMORYLIMIT=90# Memory usage warning limit in percent.
 export CPULOADAVGLIMIT=0.9   # CPU load average limit for per core in last 
minute. min 0, max 1.
 
+# Reduce concurrency
+export MAX_CONCURRENCY=2
+
 # For development purposes:
 # Don't touch the core.git source/build directory:
 # export CRASHTEST_READONLY_CORE=1


[Libreoffice-commits] dev-tools.git: test-bugzilla-files/config test-bugzilla-files/new-control.py

2022-11-15 Thread Gabor Kelemen (via logerrit)
 test-bugzilla-files/config |1 +
 test-bugzilla-files/new-control.py |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3a2e47818088f661183d195131dac0bdbeebc49a
Author: Gabor Kelemen 
AuthorDate: Tue Nov 15 10:20:18 2022 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 15 20:48:56 2022 +0100

Make number of files processed by a worker configurable

Many files on a worker may result in a few longer running
processes thus not utilizing the available parallelism.

This option may be most useful in smaller file sets in testing runs.

Change-Id: I48a18fd79195634320df8ff73985ba735f9c3ea9
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/142729
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/test-bugzilla-files/config b/test-bugzilla-files/config
index e52aecd..5f81cee 100644
--- a/test-bugzilla-files/config
+++ b/test-bugzilla-files/config
@@ -5,6 +5,7 @@ export INSTDIR=$BUILDDIR/instdir
 export USERDIR=/home/$USER/.config
 export WORKERS=72
 export DTPATH=~/source/dev-tools/
+export FILESNR=100
 
 # Warning limits
 export DISKSPACELIMIT=5  # Remaining disk space warning limit in GiB.
diff --git a/test-bugzilla-files/new-control.py 
b/test-bugzilla-files/new-control.py
index 60010ca..2a95970 100644
--- a/test-bugzilla-files/new-control.py
+++ b/test-bugzilla-files/new-control.py
@@ -150,7 +150,7 @@ if __name__ == "__main__":
 print("no valid directory")
 sys.exit(1)
 
-task_size = 100
+task_size = int(os.environ["FILESNR"])
 workers = int(os.environ["WORKERS"])
 if asan == 1:
 workers = 64


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

2022-11-15 Thread Xisco Fauli (via logerrit)
 sc/CppunitTest_sc_pivottable_filters_test.mk |   44 -
 sc/qa/unit/pivottable_filters_test.cxx   |  671 ++-
 2 files changed, 268 insertions(+), 447 deletions(-)

New commits:
commit 3e1890ca6f66ccf675092f2841a1b99da0d85ec2
Author: Xisco Fauli 
AuthorDate: Tue Nov 15 17:47:02 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 21:02:21 2022 +0100

CppunitTest_sc_pivottable_filters_test: inherit from UnoApiXmlTest

This fixes the TODO in testPivotCacheExportXLSX

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

diff --git a/sc/CppunitTest_sc_pivottable_filters_test.mk 
b/sc/CppunitTest_sc_pivottable_filters_test.mk
index 7ace51fba53b..45ceded3698e 100644
--- a/sc/CppunitTest_sc_pivottable_filters_test.mk
+++ b/sc/CppunitTest_sc_pivottable_filters_test.mk
@@ -41,6 +41,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sc_pivottable_filters_test, \
 scqahelper \
 sfx \
 sot \
+subsequenttest \
 svl \
 svt \
 svx \
@@ -70,48 +71,7 @@ $(eval $(call 
gb_CppunitTest_use_api,sc_pivottable_filters_test,\
 $(eval $(call gb_CppunitTest_use_ure,sc_pivottable_filters_test))
 $(eval $(call gb_CppunitTest_use_vcl,sc_pivottable_filters_test))
 
-$(eval $(call gb_CppunitTest_use_components,sc_pivottable_filters_test,\
-chart2/source/chartcore \
-chart2/source/controller/chartcontroller \
-comphelper/util/comphelp \
-configmgr/source/configmgr \
-dbaccess/util/dba \
-embeddedobj/util/embobj \
-eventattacher/source/evtatt \
-filter/source/config/cache/filterconfig1 \
-forms/util/frm \
-framework/util/fwk \
-i18npool/source/search/i18nsearch \
-i18npool/util/i18npool \
-linguistic/source/lng \
-oox/util/oox \
-package/source/xstor/xstor \
-package/util/package2 \
-sax/source/expatwrap/expwrap \
-scaddins/source/analysis/analysis \
-scaddins/source/datefunc/date \
-sc/util/sc \
-sc/util/scfilt \
-sfx2/util/sfx \
-sot/util/sot \
-svl/util/svl \
-svtools/util/svt \
-toolkit/util/tk \
-ucb/source/core/ucb1 \
-ucb/source/ucp/file/ucpfile1 \
-ucb/source/ucp/tdoc/ucptdoc1 \
-unotools/util/utl \
-unoxml/source/rdf/unordf \
-unoxml/source/service/unoxml \
-uui/util/uui \
-vcl/vcl.common \
-xmloff/util/xo \
-xmlsecurity/util/xmlsecurity \
-))
-
-$(eval $(call gb_CppunitTest_use_components,sc_pivottable_filters_test,\
-xmlsecurity/util/xsec_xmlsec \
-))
+$(eval $(call gb_CppunitTest_use_rdb,sc_pivottable_filters_test,services))
 
 $(eval $(call gb_CppunitTest_use_custom_headers,sc_pivottable_filters_test,\
officecfg/registry \
diff --git a/sc/qa/unit/pivottable_filters_test.cxx 
b/sc/qa/unit/pivottable_filters_test.cxx
index 6bbbc39e0a2e..6d006bfc4431 100644
--- a/sc/qa/unit/pivottable_filters_test.cxx
+++ b/sc/qa/unit/pivottable_filters_test.cxx
@@ -11,7 +11,6 @@
 
 #include "helper/qahelper.hxx"
 #include "helper/debughelper.hxx"
-#include "helper/xpath.hxx"
 
 #include 
 #include 
@@ -36,7 +35,7 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
-class ScPivotTableFiltersTest : public ScBootstrapFixture, public XmlTestTools
+class ScPivotTableFiltersTest : public ScModelTestBase
 {
 protected:
 virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
@@ -156,7 +155,7 @@ public:
 };
 
 ScPivotTableFiltersTest::ScPivotTableFiltersTest()
-: ScBootstrapFixture("sc/qa/unit/data")
+: ScModelTestBase("sc/qa/unit/data")
 {
 }
 
@@ -188,13 +187,13 @@ bool hasDimension(const std::vector& rDims, const OUSt
 
 void ScPivotTableFiltersTest::testPivotTableBasicODS()
 {
-ScDocShellRef xDocSh = loadDoc(u"pivot-table-basic.", FORMAT_ODS);
+createScDoc("ods/pivot-table-basic.ods");
 
-ScDocument& rDoc = xDocSh->GetDocument();
+ScDocument* pDoc = getScDoc();
 CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly two sheets.", 
sal_Int16(2),
- rDoc.GetTableCount());
+ pDoc->GetTableCount());
 
-ScDPCollection* pDPs = rDoc.GetDPCollection();
+ScDPCollection* pDPs = pDoc->GetDPCollection();
 CPPUNIT_ASSERT_MESSAGE("Failed to get a live ScDPCollection instance.", 
pDPs);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one pivot table 
instance.", size_t(1),
  pDPs->GetCount());
@@ -240,17 +239,15 @@ void ScPivotTableFiltersTest::testPivotTableBasicODS()
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Function for the data field should be 
COUNT.",
  sal_uInt16(ScGeneralFunction::COUNT),
  sal_uInt16(pDim->GetFunction()));
-
-xDocSh->DoClose();
 }
 
 void ScPivotTableFiltersTest::testPivotTableNamedRangeSourceODS()
 {
-ScDocShellRef xDocSh = loadDo

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

2022-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_filters_test.cxx |  954 ++---
 solenv/clang-format/excludelist|1 
 2 files changed, 529 insertions(+), 426 deletions(-)

New commits:
commit d873aa4ddf617fb7c3440763efa71c97389ce738
Author: Xisco Fauli 
AuthorDate: Tue Nov 15 21:04:49 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 22:04:03 2022 +0100

subsequent_filters_test.cxx: use clang-format

Do it before changing the inheritance

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

diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index 327c39616b04..8b87ce6acd27 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -209,8 +209,8 @@ public:
 CPPUNIT_TEST(testDatabaseRangesXLS);
 CPPUNIT_TEST(testDatabaseRangesXLSX);
 CPPUNIT_TEST(testFormatsODS);
-//  CPPUNIT_TEST(testFormatsXLS); TODO: Fix this
-//  CPPUNIT_TEST(testFormatsXLSX); TODO: Fix this
+//  CPPUNIT_TEST(testFormatsXLS); TODO: Fix this
+//  CPPUNIT_TEST(testFormatsXLSX); TODO: Fix this
 CPPUNIT_TEST(testMatrixODS);
 CPPUNIT_TEST(testMatrixXLS);
 CPPUNIT_TEST(testDoubleThinBorder);
@@ -286,38 +286,41 @@ private:
 void testPassword_Impl(std::u16string_view rFileNameBase);
 };
 
-namespace {
-
+namespace
+{
 void testRangeNameImpl(const ScDocument& rDoc)
 {
 //check one range data per sheet and one global more detailed
 //add some more checks here
 ScRangeData* pRangeData = 
rDoc.GetRangeName()->findByUpperName(OUString("GLOBAL1"));
 CPPUNIT_ASSERT_MESSAGE("range name Global1 not found", pRangeData);
-double aValue = rDoc.GetValue(1,0,0);
+double aValue = rDoc.GetValue(1, 0, 0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Global1 should reference 
Sheet1.A1", 1.0, aValue);
 pRangeData = rDoc.GetRangeName(0)->findByUpperName(OUString("LOCAL1"));
 CPPUNIT_ASSERT_MESSAGE("range name Sheet1.Local1 not found", pRangeData);
-aValue = rDoc.GetValue(1,2,0);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet1.Local1 should reference 
Sheet1.A3", 3.0, aValue);
+aValue = rDoc.GetValue(1, 2, 0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet1.Local1 should reference 
Sheet1.A3", 3.0,
+ aValue);
 pRangeData = rDoc.GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
 CPPUNIT_ASSERT_MESSAGE("range name Sheet2.Local2 not found", pRangeData);
-aValue = rDoc.GetValue(1,1,1);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet2.Local2 should reference 
Sheet2.A2", 7.0, aValue);
+aValue = rDoc.GetValue(1, 1, 1);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet2.Local2 should reference 
Sheet2.A2", 7.0,
+ aValue);
 //check for correct results for the remaining formulas
-aValue = rDoc.GetValue(1,1,0);
+aValue = rDoc.GetValue(1, 1, 0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("=global2 should be 2", 2.0, aValue);
-aValue = rDoc.GetValue(1,3,0);
+aValue = rDoc.GetValue(1, 3, 0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("=local2 should be 4", 4.0, aValue);
-aValue = rDoc.GetValue(2,0,0);
+aValue = rDoc.GetValue(2, 0, 0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("=SUM(global3) should be 10", 10.0, aValue);
-aValue = rDoc.GetValue(1,0,1);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet2.local1 should reference 
Sheet1.A5", 5.0, aValue);
+aValue = rDoc.GetValue(1, 0, 1);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet2.local1 should reference 
Sheet1.A5", 5.0,
+ aValue);
 // Test if Global5 ( which depends on Global6 ) is evaluated
-aValue = rDoc.GetValue(0,5,1);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("formula Global5 should reference Global6 ( 
which is evaluated as local1 )", 5.0, aValue);
+aValue = rDoc.GetValue(0, 5, 1);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+"formula Global5 should reference Global6 ( which is evaluated as 
local1 )", 5.0, aValue);
 }
-
 }
 
 void ScFiltersTest::testCondFormatOperatorsSameRangeXLSX()
@@ -364,23 +367,25 @@ void ScFiltersTest::testTdf119292()
 
 // check the points of the polygon if the text is rotated 90 degrees
 tools::Rectangle aMarkRect1(0, 0, 45, 3);
-tools::Polygon aPoly90degrees = SvxFont::DrawArrow(*pDev, aMarkRect1, 
aMarkSize, aArrowFillCol, true, true);
+tools::Polygon aPoly90degrees
+= SvxFont::DrawArrow(*pDev, aMarkRect1, aMarkSize, aArrowFillCol, 
true, true);
 Point aPoly90Pos1 = aPoly90degrees.GetPoint(0);
 Point aPoly90Pos2 = aPoly90degrees.GetPoint(1);
 Point aPoly90Pos3 = aPoly90degrees.GetPoint(2);
-CPPUNIT_ASSERT_EQUAL(Point(19,3),aPoly90Pos1);
-CPPUNIT_ASSERT_EQUAL(Point(22,0),aPoly90Pos2);
-CPPUNIT_ASSERT_EQUAL(Point(25,3),aPoly90Pos3);
+CPPUNIT_ASSERT_EQUAL(Point(19, 3), aPoly90

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

2022-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/helper/qahelper.cxx |  115 --
 sc/qa/unit/helper/qahelper.hxx |2 
 sc/qa/unit/subsequent_filters_test.cxx | 1387 +
 3 files changed, 584 insertions(+), 920 deletions(-)

New commits:
commit 16433bb162e060256f3ac47dd09630590f9e4ce0
Author: Xisco Fauli 
AuthorDate: Tue Nov 15 19:13:26 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 22:40:27 2022 +0100

CppunitTest_sc_subsequent_filters_test: inherit from UnoApiXmlTest

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

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 3dad0c66be3f..f0d1767f9e80 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -198,121 +198,6 @@ void testCondFile(const OUString& aFileName, ScDocument* 
pDoc, SCTAB nTab)
 }
 }
 
-void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 
nFormat)
-{
-//test Sheet1 with csv file
-OUString aCSVFileName;
-pTest->createCSVPath("numberFormat.", aCSVFileName);
-testFile(aCSVFileName, *pDoc, 0, StringType::PureString);
-//need to test the color of B3
-//it's not a font color!
-//formatting for B5: # ??/100 gets lost during import
-
-//test Sheet2
-const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 1);
-vcl::Font aFont;
-pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", tools::Long(200), 
aFont.GetFontSize().getHeight());
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, 
aFont.GetColor());
-pPattern = pDoc->GetPattern(0,1,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), 
aFont.GetFontSize().getHeight());
-pPattern = pDoc->GetPattern(0,2,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, 
aFont.GetItalic());
-pPattern = pDoc->GetPattern(0,4,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, 
aFont.GetWeight());
-pPattern = pDoc->GetPattern(1,0,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be blue", COL_BLUE, 
aFont.GetColor());
-pPattern = pDoc->GetPattern(1,1,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be striked out with a single 
line", STRIKEOUT_SINGLE, aFont.GetStrikeout());
-//some tests on sheet2 only for ods
-if (nFormat == FORMAT_ODS)
-{
-pPattern = pDoc->GetPattern(1,2,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be striked out with a double 
line", STRIKEOUT_DOUBLE, aFont.GetStrikeout());
-pPattern = pDoc->GetPattern(1,3,1);
-pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be underlined with a dotted 
line", LINESTYLE_DOTTED, aFont.GetUnderline());
-//check row height import
-//disable for now until we figure out cause of win tinderboxes test 
failures
-//CPPUNIT_ASSERT_EQUAL( static_cast(256), 
pDoc->GetRowHeight(0,1) ); //0.178in
-//CPPUNIT_ASSERT_EQUAL( static_cast(304), 
pDoc->GetRowHeight(1,1) ); //0.211in
-//CPPUNIT_ASSERT_EQUAL( static_cast(477), 
pDoc->GetRowHeight(5,1) ); //0.3311in
-//check column width import
-CPPUNIT_ASSERT_EQUAL( static_cast(555), 
pDoc->GetColWidth(4,1) );  //0.3854in
-CPPUNIT_ASSERT_EQUAL( static_cast(1280), 
pDoc->GetColWidth(5,1) ); //0.889in
-CPPUNIT_ASSERT_EQUAL( static_cast(4153), 
pDoc->GetColWidth(6,1) ); //2.8839in
-//test case for i53253 where a cell has text with different styles and 
space between the text.
-OUString aTestStr = pDoc->GetString(3,0,1);
-OUString aKnownGoodStr("text14 space");
-CPPUNIT_ASSERT_EQUAL( aKnownGoodStr, aTestStr );
-//test case for cell text with line breaks.
-aTestStr = pDoc->GetString(3,5,1);
-aKnownGoodStr = "Hello,\nCalc!";
-CPPUNIT_ASSERT_EQUAL( aKnownGoodStr, aTestStr );
-}
-pPattern = pDoc->GetPattern(1,4,1);
-Color aColor = pPattern->GetItem(ATTR_BACKGROUND).GetColor();
-CPPUNIT_ASSERT_EQUAL_MESSAGE("background color should be green", 
COL_LIGHTGREEN, aColor);
-pPattern = pDoc->GetPattern(2,0,1);
-SvxCellHorJustify eHorJustify = 
pPattern->GetItem(ATTR_HOR_JUSTIFY).GetValue();
-CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned centre 
horizontally", SvxCellHorJustify::Center, eHorJustify);
-//test alignment
-pPattern = pDoc->GetPattern(2,1,1);
-eHorJustify = pPattern->GetItem(ATTR_HOR_JUSTIFY).GetValue();
-CPPUNIT_ASSERT_EQUAL_MESSAG

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

2022-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/bugfix-test.cxx  |  143 
 solenv/clang-format/excludelist |1 
 2 files changed, 73 insertions(+), 71 deletions(-)

New commits:
commit 5b0a6621858b141022743dd8d500558895dedb1f
Author: Xisco Fauli 
AuthorDate: Tue Nov 15 21:21:24 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 15 23:57:24 2022 +0100

bugfix-test.cxx: use clang-format

Do it before changing the inheritance

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

diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index 8b28f8e83c45..c05c9a5c8754 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -97,10 +97,10 @@ static void 
lcl_AssertRectEqualWithTolerance(std::string_view sInfo,
 {
 // Left
 OString sMsg = OString::Concat(sInfo) + " Left expected " + 
OString::number(rExpected.Left())
-   + " actual "
-   + OString::number(rActual.Left()) + " Tolerance " + 
OString::number(nTolerance);
-CPPUNIT_ASSERT_MESSAGE(
-sMsg.getStr(), std::abs(rExpected.Left() - rActual.Left()) <= 
nTolerance);
+   + " actual " + OString::number(rActual.Left()) + " 
Tolerance "
+   + OString::number(nTolerance);
+CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
+   std::abs(rExpected.Left() - rActual.Left()) <= 
nTolerance);
 
 // Top
 sMsg = OString::Concat(sInfo) + " Top expected " + 
OString::number(rExpected.Top()) + " actual "
@@ -109,15 +109,15 @@ static void 
lcl_AssertRectEqualWithTolerance(std::string_view sInfo,
 
 // Width
 sMsg = OString::Concat(sInfo) + " Width expected " + 
OString::number(rExpected.GetWidth())
-   + " actual "
-   + OString::number(rActual.GetWidth()) + " Tolerance " + 
OString::number(nTolerance);
+   + " actual " + OString::number(rActual.GetWidth()) + " Tolerance "
+   + OString::number(nTolerance);
 CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetWidth() - rActual.GetWidth()) 
<= nTolerance);
 
 // Height
 sMsg = OString::Concat(sInfo) + " Height expected " + 
OString::number(rExpected.GetHeight())
-   + " actual "
-   + OString::number(rActual.GetHeight()) + " Tolerance " + 
OString::number(nTolerance);
+   + " actual " + OString::number(rActual.GetHeight()) + " Tolerance "
+   + OString::number(nTolerance);
 CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetHeight() - 
rActual.GetHeight()) <= nTolerance);
 }
@@ -127,8 +127,8 @@ static void 
lcl_AssertPointEqualWithTolerance(std::string_view sInfo, const Poin
 {
 // X
 OString sMsg = OString::Concat(sInfo) + " X expected " + 
OString::number(rExpected.X())
-   + " actual "
-   + OString::number(rActual.X()) + " Tolerance " + 
OString::number(nTolerance);
+   + " actual " + OString::number(rActual.X()) + " Tolerance "
+   + OString::number(nTolerance);
 CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.X() - 
rActual.X()) <= nTolerance);
 // Y
 sMsg = OString::Concat(sInfo) + " Y expected " + 
OString::number(rExpected.Y()) + " actual "
@@ -367,7 +367,7 @@ void ScFiltersTest::testTdf43534()
 
 void ScFiltersTest::testTdf91979()
 {
-Sequence < beans::PropertyValue > args{ 
comphelper::makePropertyValue("Hidden", true) };
+Sequence args{ 
comphelper::makePropertyValue("Hidden", true) };
 ScDocShellRef xDocSh = loadEmptyDocument(args);
 CPPUNIT_ASSERT(xDocSh);
 
@@ -426,7 +426,8 @@ void ScFiltersTest::testTdf88821()
 ScDocument& rDoc = xDocSh->GetDocument();
 
 // B2 should be 'Périmètre', not 'Périmètre'
-CPPUNIT_ASSERT_EQUAL(OStringToOUString("P\xC3\xA9rim\xC3\xA8tre", 
RTL_TEXTENCODING_UTF8), rDoc.GetString(1, 1, 0));
+CPPUNIT_ASSERT_EQUAL(OStringToOUString("P\xC3\xA9rim\xC3\xA8tre", 
RTL_TEXTENCODING_UTF8),
+ rDoc.GetString(1, 1, 0));
 
 xDocSh->DoClose();
 }
@@ -437,7 +438,9 @@ void ScFiltersTest::testTdf88821_2()
 ScDocument& rDoc = xDocSh->GetDocument();
 
 // A2 should be 'ABCabcČŠŽčšž', not 'ABCabcČŠŽÄヘšž'
-
CPPUNIT_ASSERT_EQUAL(OStringToOUString("ABCabc\xC4\x8C\xC5\xA0\xC5\xBD\xC4\x8D\xC5\xA1\xC5\xBE",
 RTL_TEXTENCODING_UTF8), rDoc.GetString(0, 1, 0));
+
CPPUNIT_ASSERT_EQUAL(OStringToOUString("ABCabc\xC4\x8C\xC5\xA0\xC5\xBD\xC4\x8D\xC5\xA1\xC5\xBE",
+   RTL_TEXTENCODING_UTF8),
+ rDoc.GetString(0, 1, 0));
 
 xDocSh->DoClose();
 }
@@ -495,9 +498,9 @@ void ScFiltersTest::testTdf104310()
 std::vector aList;
 pData->FillSelectionList(aList, ScAddress(0, 1, 0));
 CPPUNIT_ASSERT_EQUAL(size_t(3), aList.siz

[Libreoffice-commits] core.git: drawinglayer/source filter/source include/drawinglayer svgio/source svx/source

2022-11-15 Thread Noel Grandin (via logerrit)
 drawinglayer/source/primitive2d/bitmapprimitive2d.cxx |   19 ++
 drawinglayer/source/primitive2d/controlprimitive2d.cxx|2 -
 drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx |2 -
 drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx |   16 
 drawinglayer/source/primitive2d/glowprimitive2d.cxx   |9 ++--
 drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx  |4 +-
 drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx|2 -
 drawinglayer/source/primitive2d/patternfillprimitive2d.cxx|2 -
 drawinglayer/source/primitive2d/sceneprimitive2d.cxx  |2 -
 drawinglayer/source/primitive2d/shadowprimitive2d.cxx |7 +--
 drawinglayer/source/primitive2d/softedgeprimitive2d.cxx   |7 +--
 drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx  |4 +-
 drawinglayer/source/processor2d/hittestprocessor2d.cxx|2 -
 drawinglayer/source/processor2d/vclprocessor2d.cxx|2 -
 drawinglayer/source/tools/emfphelperdata.cxx  |2 -
 drawinglayer/source/tools/primitive2dxmldump.cxx  |2 -
 drawinglayer/source/tools/wmfemfhelper.cxx|2 -
 filter/source/pdf/pdfdecomposer.cxx   |3 -
 include/drawinglayer/primitive2d/bitmapprimitive2d.hxx|   17 ++--
 svgio/source/svgreader/svgimagenode.cxx   |2 -
 svx/source/sdr/contact/viewcontactofgraphic.cxx   |2 -
 svx/source/sdr/overlay/overlaytools.cxx   |2 -
 22 files changed, 45 insertions(+), 67 deletions(-)

New commits:
commit 8011b16e05c97a92efee2debb23f5eae60f1236b
Author: Noel Grandin 
AuthorDate: Tue Nov 15 19:12:43 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 16 07:57:00 2022 +0100

Use BitmapEx in BitmapPrimitive2D

we no longer need to wrap it in the framework XBitmap
implemenation

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

diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx 
b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
index 519ad153696b..7dc58c3fe00a 100644
--- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
@@ -26,9 +26,8 @@ using namespace com::sun::star;
 
 namespace drawinglayer::primitive2d
 {
-BitmapPrimitive2D::BitmapPrimitive2D(css::uno::Reference 
xXBitmap,
- basegfx::B2DHomMatrix aTransform)
-: maXBitmap(std::move(xXBitmap))
+BitmapPrimitive2D::BitmapPrimitive2D(BitmapEx xXBitmap, basegfx::B2DHomMatrix 
aTransform)
+: maBitmap(std::move(xXBitmap))
 , maTransform(std::move(aTransform))
 {
 }
@@ -39,7 +38,7 @@ bool BitmapPrimitive2D::operator==(const BasePrimitive2D& 
rPrimitive) const
 {
 const BitmapPrimitive2D& rCompare = static_cast(rPrimitive);
 
-return (getXBitmap() == rCompare.getXBitmap() && getTransform() == 
rCompare.getTransform());
+return (getBitmap() == rCompare.getBitmap() && getTransform() == 
rCompare.getTransform());
 }
 
 return false;
@@ -55,19 +54,11 @@ BitmapPrimitive2D::getB2DRange(const 
geometry::ViewInformation2D& /*rViewInforma
 
 sal_Int64 BitmapPrimitive2D::estimateUsage()
 {
-if (!getXBitmap().is())
+if (getBitmap().IsEmpty())
 {
 return 0;
 }
-
-uno::Reference const xAcc(getXBitmap(), uno::UNO_QUERY);
-
-if (!xAcc.is())
-{
-return 0;
-}
-
-return xAcc->estimateUsage();
+return getBitmap().GetSizeBytes();
 }
 
 // provide unique ID
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx 
b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 14d4f7b69446..c776319e86f5 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -198,7 +198,7 @@ namespace drawinglayer::primitive2d
 
 // create primitive
 xRetval = new BitmapPrimitive2D(
-VCLUnoHelper::CreateVCLXBitmap(aContent),
+aContent,
 aBitmapTransform);
 }
 catch( const uno::Exception& )
diff --git a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx 
b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
index 8a86f83204bd..7ec7040ff2a1 100644
--- a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
@@ -66,7 +66,7 @@ namespace drawinglayer::primitive2d
 // create BitmapPrimitive2D with now object-local coordinate data
 rContainer.push_back

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

2022-11-15 Thread Miklos Vajna (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx|4 ++
 include/vcl/pdf/PDFAnnotAActionType.hxx |   25 +
 sw/qa/core/text/text.cxx|3 ++
 vcl/source/pdf/PDFiumLibrary.cxx|   45 
 4 files changed, 77 insertions(+)

New commits:
commit cd8e8685454c92c38f17ddcf8b4f49b9068635ec
Author: Miklos Vajna 
AuthorDate: Tue Nov 15 20:08:27 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 16 08:07:31 2022 +0100

sw content controls, date: improve PDF export test

Assert not only that the widget is a text one, but also that it has the
correct date format.

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

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index f0a642847cc6..7b319a727259 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SvMemoryStream;
 
@@ -105,6 +106,9 @@ public:
 virtual float getFontSize(PDFiumDocument* pDoc) = 0;
 virtual OUString getFormFieldAlternateName(PDFiumDocument* pDoc) = 0;
 virtual int getFormFieldFlags(PDFiumDocument* pDoc) = 0;
+virtual OUString getFormAdditionalActionJavaScript(PDFiumDocument* pDoc,
+   PDFAnnotAActionType 
eEvent)
+= 0;
 };
 
 class PDFiumTextPage;
diff --git a/include/vcl/pdf/PDFAnnotAActionType.hxx 
b/include/vcl/pdf/PDFAnnotAActionType.hxx
new file mode 100644
index ..099dcda813c5
--- /dev/null
+++ b/include/vcl/pdf/PDFAnnotAActionType.hxx
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+namespace vcl::pdf
+{
+enum class PDFAnnotAActionType
+{
+KeyStroke = 12,
+Format = 13,
+Validate = 14,
+Calculate = 15,
+};
+
+} // namespace vcl::pdf
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 382f9a8738a4..9125cf256a4b 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -750,6 +750,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testDateContentControlPDF)
 // Also check the form widget type (our date is a mode of text in PDF 
terms):
 CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::TextField,
  pAnnotation->getFormFieldType(pPdfDocument.get()));
+OUString aAction = pAnnotation->getFormAdditionalActionJavaScript(
+pPdfDocument.get(), vcl::pdf::PDFAnnotAActionType::KeyStroke);
+CPPUNIT_ASSERT_EQUAL(OUString("AFDate_KeystrokeEx(\"mm/dd/yy\");"), 
aAction);
 }
 
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDFFont)
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 3e247b7772eb..ad2f3332bea9 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -155,6 +155,18 @@ 
static_assert(static_cast(vcl::pdf::PDFFormFieldType::TextField) == FPDF_FO
 static_assert(static_cast(vcl::pdf::PDFFormFieldType::Signature) == 
FPDF_FORMFIELD_SIGNATURE,
   "PDFFormFieldType::Signature value mismatch");
 
+static_assert(static_cast(vcl::pdf::PDFAnnotAActionType::KeyStroke)
+  == FPDF_ANNOT_AACTION_KEY_STROKE,
+  "PDFAnnotAActionType::KeyStroke) value mismatch");
+static_assert(static_cast(vcl::pdf::PDFAnnotAActionType::Format) == 
FPDF_ANNOT_AACTION_FORMAT,
+  "PDFAnnotAActionType::Format) value mismatch");
+static_assert(static_cast(vcl::pdf::PDFAnnotAActionType::Validate)
+  == FPDF_ANNOT_AACTION_VALIDATE,
+  "PDFAnnotAActionType::Validate) value mismatch");
+static_assert(static_cast(vcl::pdf::PDFAnnotAActionType::Calculate)
+  == FPDF_ANNOT_AACTION_CALCULATE,
+  "PDFAnnotAActionType::Calculate) value mismatch");
+
 namespace
 {
 /// Callback class to be used with FPDF_SaveWithVersion().
@@ -253,6 +265,8 @@ public:
 float getFontSize(PDFiumDocument* pDoc) override;
 OUString getFormFieldAlternateName(PDFiumDocument* pDoc) override;
 int getFormFieldFlags(PDFiumDocument* pDoc) override;
+OUString getFormAdditionalActionJavaScript(PDFiumDocument* pDoc,
+   PDFAnnotAActionType eEvent) 
override;
 };
 
 class PDFiumPageObjectImpl final : public PDFiumPageObject
@@ -1194,6 +1208,37 @@ OUString 
PDFiumAnnotationImpl::getFormFieldAlternateName(PDFiumDocument* pDoc)
 return aString;
 }
 
+OUString 
PDFiumAnno

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

2022-11-15 Thread Stephan Bergmann (via logerrit)
 configure.ac |  113 +--
 1 file changed, 57 insertions(+), 56 deletions(-)

New commits:
commit d0a8c957be6dbc91cc05939468ce99947656481c
Author: Stephan Bergmann 
AuthorDate: Tue Nov 15 22:18:08 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 16 08:53:58 2022 +0100

configure: Allow to override CXXFLAGS_CXX11

(My Clang --with-latest-c++ build against GCC 13 trunk libstdc++ needs to 
use
-std=c++20 instead of -std=c++2b to work around
 for now.)

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

diff --git a/configure.ac b/configure.ac
index 51d5508ad248..cef05a5893d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2691,7 +2691,7 @@ libo_FUZZ_ARG_WITH(lxml,
 libo_FUZZ_ARG_WITH(latest-c++,
 AS_HELP_STRING([--with-latest-c++],
 [Try to enable the latest features of the C++ compiler, even if they 
are not yet part of a
- published standard.]),,
+ published standard.  This option is ignored when CXXFLAGS_CXX11 is 
set explicitly.]),,
 [with_latest_c__=no])
 
 AC_ARG_WITH(gtk3-build,
@@ -7615,63 +7615,64 @@ dnl 
===
 dnl C++11
 dnl ===
 
-AC_MSG_CHECKING([whether $CXX_BASE supports C++17])
-CXXFLAGS_CXX11=
-if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
-if test "$with_latest_c__" = yes; then
-CXXFLAGS_CXX11=-std:c++latest
-else
-CXXFLAGS_CXX11=-std:c++17
-fi
-CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus"
-elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
-my_flags='-std=c++17 -std=c++1z'
-if test "$with_latest_c__" = yes; then
-my_flags="-std=c++23 -std=c++2b -std=c++20 -std=c++2a $my_flags"
-fi
-for flag in $my_flags; do
-if test "$COM" = MSC; then
-flag="-Xclang $flag"
+if test -z "${CXXFLAGS_CXX11+x}"; then
+AC_MSG_CHECKING([whether $CXX_BASE supports C++17])
+if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
+if test "$with_latest_c__" = yes; then
+CXXFLAGS_CXX11=-std:c++latest
+else
+CXXFLAGS_CXX11=-std:c++17
 fi
-save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS $flag -Werror"
-if test "$SYSTEM_LIBCMIS" = TRUE; then
-CXXFLAGS="$CXXFLAGS -DSYSTEM_LIBCMIS $LIBCMIS_CFLAGS"
+CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus"
+elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+my_flags='-std=c++17 -std=c++1z'
+if test "$with_latest_c__" = yes; then
+my_flags="-std=c++23 -std=c++2b -std=c++20 -std=c++2a $my_flags"
 fi
-AC_LANG_PUSH([C++])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include 
-#include 
-#include 
-
-#if defined SYSTEM_LIBCMIS
-// See ucb/source/ucp/cmis/auth_provider.hxx:
-#if !defined __clang__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated"
-#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
-#endif
-#include 
-#if !defined __clang__
-#pragma GCC diagnostic pop
-#endif
-#endif
-
-void f(std::vector & v, std::function fn) {
-std::sort(v.begin(), v.end(), fn);
-}
-]])],[CXXFLAGS_CXX11=$flag])
-AC_LANG_POP([C++])
-CXXFLAGS=$save_CXXFLAGS
-if test -n "$CXXFLAGS_CXX11"; then
-break
-fi
-done
-fi
-if test -n "$CXXFLAGS_CXX11"; then
-AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
-else
-AC_MSG_ERROR(no)
+for flag in $my_flags; do
+if test "$COM" = MSC; then
+flag="-Xclang $flag"
+fi
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag -Werror"
+if test "$SYSTEM_LIBCMIS" = TRUE; then
+CXXFLAGS="$CXXFLAGS -DSYSTEM_LIBCMIS $LIBCMIS_CFLAGS"
+fi
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include 
+#include 
+#include 
+
+#if defined SYSTEM_LIBCMIS
+// See ucb/source/ucp/cmis/auth_provider.hxx:
+#if !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
+#endif
+#include 
+#if !defined __clang__
+#pragma GCC diagnostic pop
+