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

2022-01-06 Thread Miklos Vajna (via logerrit)
 sw/source/filter/ww8/sortedarray.hxx |   41 ---
 1 file changed, 41 deletions(-)

New commits:
commit 7b8bb9f085ca8e70247da48fdd2bf7ab06a0a102
Author: Miklos Vajna 
AuthorDate: Thu Jan 6 21:18:57 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 7 08:27:56 2022 +0100

sw: remove debug code that doesn't build anymore in ww::SortedArray

It also claimed "You will not see this message again", but I don't see
how the matching flag would be static.

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

diff --git a/sw/source/filter/ww8/sortedarray.hxx 
b/sw/source/filter/ww8/sortedarray.hxx
index 7efec13aa9ff..1229b83df057 100644
--- a/sw/source/filter/ww8/sortedarray.hxx
+++ b/sw/source/filter/ww8/sortedarray.hxx
@@ -57,47 +57,6 @@ namespace ww
 {
 OSL_ENSURE(mnNoElems && pWwSprmTab, "WW8: empty Array: Don't do 
that");
 std::sort(mpWwSprmTab, mpWwSprmTab + mnNoElems);
-#if OSL_DEBUG_LEVEL > 1
-bool bBroken=false;
-OUString sError;
-const C *pIter = mpWwSprmTab;
-const C *pBeforeEnd = mpWwSprmTab + mnNoElems - 1;
-while (pIter < pBeforeEnd)
-{
-if (pIter->nId == (pIter+1)->nId)
-{
-if (!bBroken)
-{
-sError =
-"WW8: Duplicate in list, almost certainly don't "
-"want that!\n"
-"(You will not see this message again unless you "
-"restart)\n"
-"Extra entries are...\n";
-bBroken=true;
-}
-
-size_t nSize = sizeof(C);
-const sal_uInt8 *pHack =
-reinterpret_cast(&(*pIter));
-for (size_t i=0; i < nSize; ++i)
-{
-sError += OUString::number(
-static_cast(pHack[i]), 16);
-sError += OUString(' ');
-}
-sError += OUString('\n');
-while (pIter->nId == (pIter+1)->nId && pIter < pBeforeEnd)
-++pIter;
-}
-else
-++pIter;
-}
-if (bBroken)
-{
-   SAL_WARN( "sw", sError );
-}
-#endif
 }
 };
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source

2022-01-06 Thread Andras Timar (via logerrit)
 vcl/source/gdi/dibtools.cxx |   33 -
 1 file changed, 24 insertions(+), 9 deletions(-)

New commits:
commit 9d2c6fc2f0bd79ae5dbe3ca5d0bb34aeecfb1efd
Author: Andras Timar 
AuthorDate: Thu Jan 6 23:01:29 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 7 08:25:16 2022 +0100

Backport the better fix of tdf#73523 from master

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

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 949423a1f255..6a64f60549fa 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -249,8 +249,18 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& 
rHeader, bool& bTopDown
 readUInt32( rHeader.nV5ProfileSize );
 readUInt32( rHeader.nV5Reserved );
 
+// Read color mask. An additional 12 bytes of color bitfields follow 
the info header (WinBMPv3-NT)
+sal_uInt32 nColorMask = 0;
+if (BITFIELDS == rHeader.nCompression && DIBINFOHEADERSIZE == 
rHeader.nSize)
+{
+rIStm.ReadUInt32( rHeader.nV5RedMask );
+rIStm.ReadUInt32( rHeader.nV5GreenMask );
+rIStm.ReadUInt32( rHeader.nV5BlueMask );
+nColorMask = 12;
+}
+
 // seek to EndPos
-if (!checkSeek(rIStm, aStartPos + rHeader.nSize))
+if (!checkSeek(rIStm, aStartPos + rHeader.nSize + nColorMask))
 return false;
 }
 
@@ -533,13 +543,12 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& 
rHeader, BitmapWriteAccess& r
 }
 else
 {
-// Read color mask. An additional 12 bytes of color bitfields follow 
the info header (WinBMPv3-NT)
-if(bTCMask && BITFIELDS == rHeader.nCompression && DIBINFOHEADERSIZE 
== rHeader.nSize)
-{
-rIStm.ReadUInt32( nRMask );
-rIStm.ReadUInt32( nGMask );
-rIStm.ReadUInt32( nBMask );
-}
+if (rHeader.nV5RedMask > 0)
+nRMask = rHeader.nV5RedMask;
+if (rHeader.nV5GreenMask > 0)
+nGMask = rHeader.nV5GreenMask;
+if (rHeader.nV5BlueMask > 0)
+nBMask = rHeader.nV5BlueMask;
 
 const long nWidth(rHeader.nWidth);
 const long nHeight(rHeader.nHeight);
@@ -910,7 +919,13 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, 
AlphaMask* pBmpAlpha, sal_uL
 
 if (nOffset)
 {
-pIStm->SeekRel(nOffset - (pIStm->Tell() - nStmPos));
+// It is problematic to seek backwards. We are at the
+// end of BITMAPINFOHEADER or 12 bytes further in case
+// of WinBMPv3-NT format. It is possible to seek forward
+// though because a gap may be there.
+sal_Int32 nSeekRel = nOffset - (pIStm->Tell() - nStmPos);
+if (nSeekRel > 0)
+pIStm->SeekRel(nSeekRel);
 }
 
 const sal_Int64 nBitsPerLine (static_cast(aHeader.nWidth) * 
static_cast(aHeader.nBitCount));


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

2022-01-06 Thread Andras Timar (via logerrit)
 vcl/source/gdi/dibtools.cxx |   33 -
 1 file changed, 24 insertions(+), 9 deletions(-)

New commits:
commit fd9648dc6f022b49db7f55fd55d69e18b6e95dc5
Author: Andras Timar 
AuthorDate: Thu Jan 6 22:56:49 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 7 08:25:00 2022 +0100

Backport the better fix of tdf#73523 from master

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

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 99ec4af8f386..98a149aa901f 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -250,8 +250,18 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& 
rHeader, bool& bTopDown
 readUInt32( rHeader.nV5ProfileSize );
 readUInt32( rHeader.nV5Reserved );
 
+// Read color mask. An additional 12 bytes of color bitfields follow 
the info header (WinBMPv3-NT)
+sal_uInt32 nColorMask = 0;
+if (BITFIELDS == rHeader.nCompression && DIBINFOHEADERSIZE == 
rHeader.nSize)
+{
+rIStm.ReadUInt32( rHeader.nV5RedMask );
+rIStm.ReadUInt32( rHeader.nV5GreenMask );
+rIStm.ReadUInt32( rHeader.nV5BlueMask );
+nColorMask = 12;
+}
+
 // seek to EndPos
-if (!checkSeek(rIStm, aStartPos + rHeader.nSize))
+if (!checkSeek(rIStm, aStartPos + rHeader.nSize + nColorMask))
 return false;
 }
 
@@ -534,13 +544,12 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& 
rHeader, BitmapWriteAccess& r
 }
 else
 {
-// Read color mask
-if(bTCMask && BITFIELDS == rHeader.nCompression)
-{
-rIStm.ReadUInt32( nRMask );
-rIStm.ReadUInt32( nGMask );
-rIStm.ReadUInt32( nBMask );
-}
+if (rHeader.nV5RedMask > 0)
+nRMask = rHeader.nV5RedMask;
+if (rHeader.nV5GreenMask > 0)
+nGMask = rHeader.nV5GreenMask;
+if (rHeader.nV5BlueMask > 0)
+nBMask = rHeader.nV5BlueMask;
 
 const tools::Long nWidth(rHeader.nWidth);
 const tools::Long nHeight(rHeader.nHeight);
@@ -911,7 +920,13 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, 
AlphaMask* pBmpAlpha, sal_uL
 
 if (nOffset)
 {
-pIStm->SeekRel(nOffset - (pIStm->Tell() - nStmPos));
+// It is problematic to seek backwards. We are at the
+// end of BITMAPINFOHEADER or 12 bytes further in case
+// of WinBMPv3-NT format. It is possible to seek forward
+// though because a gap may be there.
+sal_Int32 nSeekRel = nOffset - (pIStm->Tell() - nStmPos);
+if (nSeekRel > 0)
+pIStm->SeekRel(nSeekRel);
 }
 
 const sal_Int64 nBitsPerLine (static_cast(aHeader.nWidth) * 
static_cast(aHeader.nBitCount));


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

2022-01-06 Thread Gabor Kelemen (via logerrit)
 cui/source/inc/multipat.hxx |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit a49865c8dab0e8117bc37da6725efd6f6d6af8ae
Author: Gabor Kelemen 
AuthorDate: Fri Dec 31 17:19:00 2021 +0100
Commit: Julien Nabet 
CommitDate: Fri Jan 7 08:10:59 2022 +0100

Drop unused define CLASSPATH_DELIMITER

since commit 200cc2d20a21ceb5d176604f9c384f15c6a87570 (2014)

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

diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx
index 3f747f21aadd..0cedd954a1a6 100644
--- a/cui/source/inc/multipat.hxx
+++ b/cui/source/inc/multipat.hxx
@@ -20,16 +20,6 @@
 
 #include 
 
-// define 
-
-// different delimiter for Unix (:) and Windows (;)
-
-#ifdef UNX
-#define CLASSPATH_DELIMITER ':'
-#else
-#define CLASSPATH_DELIMITER ';'
-#endif
-
 class SvxMultiPathDialog : public weld::GenericDialogController
 {
 private:


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

2022-01-06 Thread Noel Grandin (via logerrit)
 sw/qa/extras/layout/layout2.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit f07a2d1b5c7c6deabe6da60892fd6f6fbffad15f
Author: Noel Grandin 
AuthorDate: Thu Jan 6 18:52:01 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 7 07:06:42 2022 +0100

remove debug code

accidtionally committed with
commit 302b44125aa0c1d5216f986ecf8e341cd6e57418
Author: Noel Grandin 
Date:   Thu Dec 9 11:45:36 2021 +0200
use background XShapeGroup for bar-chart area

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

diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index eea736f2bdef..7e548490f67d 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -657,11 +657,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf133005)
 xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
 CPPUNIT_ASSERT(pXmlDoc);
 
-{
-SvFileStream aStream("/home/noel/libo/noel1.dump", StreamMode::WRITE | 
StreamMode::TRUNC);
-dumper.dump(*xMetaFile, aStream);
-aStream.Close();
-}
 sal_Int32 nXChartWall = getXPath(pXmlDoc,
  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/"
  "push[1]/push[1]/polyline[1]/point[2]",


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

2022-01-06 Thread Noel Grandin (via logerrit)
 chart2/source/view/main/PropertyMapper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 74e74e9a7b6c264112eda1f5bc9e9c5dddf9f4c5
Author: Noel Grandin 
AuthorDate: Thu Jan 6 20:58:00 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 7 06:57:51 2022 +0100

fix setPropertyNameMapForFilledSeriesProperties

called the wrong method to set new properties,
rather than overwrite all existing properties

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

diff --git a/chart2/source/view/main/PropertyMapper.cxx 
b/chart2/source/view/main/PropertyMapper.cxx
index c8bd6e1d61eb..c8edc21aa852 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -597,7 +597,7 @@ void 
PropertyMapper::setPropertyNameMapForFilledSeriesProperties(SdrPathObj* pSh
 xOptionSet->Put(XFillColorItem(OUString(), Color(ColorTransparency, 
*xFillColor)));
 }
 if (xOptionSet)
-pShape->SetMergedItemSet(*xOptionSet);
+pShape->GetProperties().SetObjectItemSet(*xOptionSet);
 
 }
 


[Libreoffice-commits] core.git: solenv/clang-format vcl/inc vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win

2022-01-06 Thread Jan-Marek Glogowski (via logerrit)
 solenv/clang-format/excludelist|2 
 vcl/inc/dndhelper.hxx  |   41 ++
 vcl/inc/osx/salinst.h  |4 -
 vcl/inc/qt5/QtInstance.hxx |6 +-
 vcl/inc/salinst.hxx|   10 +++-
 vcl/inc/unx/gtk/gtkinst.hxx|4 -
 vcl/inc/unx/salinst.h  |4 -
 vcl/inc/win/dnd_source.hxx |1 
 vcl/inc/win/dnd_target.hxx |1 
 vcl/inc/win/salinst.h  |3 +
 vcl/osx/service_entry.cxx  |   23 +++---
 vcl/qt5/QtInstance.cxx |   14 +++---
 vcl/source/app/dndhelp.cxx |   28 
 vcl/source/components/dtranscomp.cxx   |   25 +--
 vcl/source/window/mouse.cxx|   73 +
 vcl/unx/generic/dtrans/X11_service.cxx |   21 ++---
 vcl/unx/gtk3/gtkinst.cxx   |   21 ++---
 vcl/win/app/salinst.cxx|   18 
 vcl/win/dtrans/idroptarget.hxx |2 
 vcl/win/dtrans/source.cxx  |2 
 vcl/win/dtrans/sourcecontext.hxx   |2 
 vcl/win/dtrans/target.cxx  |2 
 vcl/win/dtrans/targetdragcontext.hxx   |3 -
 vcl/win/dtrans/targetdropcontext.hxx   |2 
 24 files changed, 177 insertions(+), 135 deletions(-)

New commits:
commit 031576105c21b2e0c2585a1236092487d5d193e2
Author: Jan-Marek Glogowski 
AuthorDate: Thu Jan 6 14:16:53 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Fri Jan 7 05:04:14 2022 +0100

VCL move platform code from mouse.cxx into plugins

... by moving it into ImplCreate(DragSource|DropTarget).

The existing Create* variant now checks for headless mode and the
IsRunningUnitTest flag, before creating the platform variants.
There are two small helpers to initialize either X11 or Ole based
UNO DnD interace implementations.

Unfortunatly Windows requires to move two dtrans header files, but
at least any other changes are minimal.

Change-Id: Id79459ad71a26243b1c9cb1fe38ab236b0ab8fa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128049
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 22c11a641d36..b8bebd05da48 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14612,6 +14612,7 @@ vcl/inc/unx/x11_cursors/vshear_curs.h
 vcl/inc/unx/x11_cursors/vshear_mask.h
 vcl/inc/vclstatuslistener.hxx
 vcl/inc/wall2.hxx
+vcl/inc/win/dnd_source.hxx
 vcl/inc/win/DWriteTextRenderer.hxx
 vcl/inc/win/salbmp.h
 vcl/inc/win/saldata.hxx
@@ -15194,7 +15195,6 @@ vcl/win/dtrans/MtaOleClipb.cxx
 vcl/win/dtrans/MtaOleClipb.hxx
 vcl/win/dtrans/sourcecontext.cxx
 vcl/win/dtrans/source.cxx
-vcl/win/dtrans/source.hxx
 vcl/win/dtrans/target.cxx
 vcl/win/dtrans/TxtCnvtHlp.cxx
 vcl/win/dtrans/TxtCnvtHlp.hxx
diff --git a/vcl/inc/dndhelper.hxx b/vcl/inc/dndhelper.hxx
new file mode 100644
index ..f79382f4ee3a
--- /dev/null
+++ b/vcl/inc/dndhelper.hxx
@@ -0,0 +1,41 @@
+/* -*- 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
+
+#include 
+#include 
+#include 
+
+namespace com::sun::star::lang
+{
+class XInitialization;
+}
+namespace com::sun::star::uno
+{
+class XInterface;
+}
+
+namespace vcl
+{
+// Ole and X11 refer to the UNO DnD interface names and their expected 
XInitialization arguments.
+
+enum class DragOrDrop
+{
+Drag,
+Drop
+};
+VCL_DLLPUBLIC css::uno::Reference
+OleDnDHelper(const css::uno::Reference&, 
sal_IntPtr pWin, DragOrDrop);
+
+VCL_DLLPUBLIC css::uno::Reference
+X11DnDHelper(const css::uno::Reference&, 
sal_IntPtr pWin);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 3be765057ca9..6d707807d38e 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -128,8 +128,8 @@ public:
 // dtrans implementation
 virtual css::uno::Reference< css::uno::XInterface > CreateClipboard(
 const css::uno::Sequence< css::uno::Any >& i_rArguments ) override;
-virtual css::uno::Reference< css::uno::XInterface > CreateDragSource() 
override;
-virtual css::uno::Reference< css::uno::XInterface > CreateDropTarget() 
override;
+virtual css::uno::Reference 
ImplCreateDragSource(const SystemEnvData*) override;
+virtual css::uno::Reference 
ImplCreateDropTarget(const SystemEnvData*) override;
 
 static void handleAppDefinedEvent( NSEvent* pEvent );
 
diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx
index 009b9ae8c312..b02dd6234633 100644
--- a/vcl/inc/qt5/QtInstance.hxx
++

[Libreoffice-commits] core.git: solenv/gbuild

2022-01-06 Thread Jan-Marek Glogowski (via logerrit)
 solenv/gbuild/LinkTarget.mk |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 32bf2040bfa9d76731fc7c679845eb3835dde8a3
Author: Jan-Marek Glogowski 
AuthorDate: Wed Jan 5 11:56:30 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Fri Jan 7 02:51:50 2022 +0100

gbuild: fix actually used libraries for mergelib

Just the $(filter $(gb_MERGEDLIBS),$(2)) in the "if" was wrong,
but reformat and add a comment to make the code easier to read.

This way we correctly header-depend on all requested libraries,
but just export-depend on the real libraries.

And actually use gb_LinkTarget__is_build_lib in the ifeq, as
otherwise the build now fails for the reduced dependencies.

Change-Id: I24d5701891324f5055c9dfa535bd854d09fbb905
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127994
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 52eabb9e5b96..ce60b462ecee 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1246,7 +1246,8 @@ $(foreach lib,$(2),$(call 
gb_LinkTarget__lib_dummy_depend,$(lib)))
 endef
 
 # libraries which are merged but need to be built for gb_BUILD_HELPER_TOOLS
-gb_BUILD_HELPER_LIBS := basegfx \
+gb_BUILD_HELPER_LIBS := $(foreach lib, \
+basegfx \
comphelper \
cppu \
cppuhelper \
@@ -1260,6 +1261,7 @@ gb_BUILD_HELPER_LIBS := basegfx \
ucbhelper \
unoidl \
xmlreader \
+, $(call gb_Library__get_workdir_linktargetname,$(lib)))
 
 # tools libmerged depends on, so they link against gb_BUILD_HELPER_LIBS
 gb_BUILD_HELPER_TOOLS := $(foreach exe,\
@@ -1271,12 +1273,12 @@ gb_BUILD_HELPER_TOOLS := $(foreach exe,\
 
 # call gb_LinkTarget__is_build_lib,linktargetname
 define gb_LinkTarget__is_build_lib
-$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(foreach 
lib,$(gb_BUILD_HELPER_LIBS),$(call 
gb_Library__get_workdir_linktargetname,$(lib,$(true),$(false))
+$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call 
gb_BUILD_HELPER_LIBS)),$(true))
 endef
 
 # call gb_LinkTarget__is_build_tool,linktargetname
 define gb_LinkTarget__is_build_tool
-$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call 
gb_BUILD_HELPER_TOOLS)),$(true),$(false))
+$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call 
gb_BUILD_HELPER_TOOLS)),$(true))
 endef
 
 define gb_LinkTarget__is_merged
@@ -1295,15 +1297,14 @@ $$(eval $$(call gb_Output_error,Cannot link against 
plugin library/libraries '$$
 endif
 endif
 
-ifeq ($(call gb_LinkTarget__is_build_tool,$(1)),$(true))
+ifeq ($(call gb_LinkTarget__is_build_tool,$(1))$(call 
gb_LinkTarget__is_build_lib,$(1)),$(true))
 $(call gb_LinkTarget__use_libraries,$(1),$(2),$(2),$(4))
 else
+# $$(3) = Always just depend on non-merged libs. If any dependency is merged, 
but you aren't, also depend on "merged".
 $(call gb_LinkTarget__use_libraries,$(1),$(2),$(strip \
-   $(if $(filter $(gb_MERGEDLIBS),$(2)), \
-   $(if $(call gb_LinkTarget__is_merged,$(1)), \
-   $(filter $(gb_MERGEDLIBS),$(2)), merged)) \
-   $(filter-out $(gb_MERGEDLIBS),$(2)) \
-   ),$(4))
+$(filter-out $(gb_MERGEDLIBS),$(2)) \
+$(if $(filter $(gb_MERGEDLIBS),$(2)),$(if $(call 
gb_LinkTarget__is_merged,$(1)),,merged)) \
+),$(4))
 endif
 
 endef


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

2022-01-06 Thread VaibhavMalik4187 (via logerrit)
 vcl/source/filter/idxf/dxf2mtf.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d3308503a8c320b4a1c3f6156a6b7e6a71a5806d
Author: VaibhavMalik4187 
AuthorDate: Fri Dec 31 01:12:39 2021 +0530
Commit: Hossein 
CommitDate: Fri Jan 7 00:19:50 2022 +0100

tdf#146479 - Use basegfx fTools for converting the angle unit

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

diff --git a/vcl/source/filter/idxf/dxf2mtf.cxx 
b/vcl/source/filter/idxf/dxf2mtf.cxx
index a8504c0d4c53..3c248c31fca0 100644
--- a/vcl/source/filter/idxf/dxf2mtf.cxx
+++ b/vcl/source/filter/idxf/dxf2mtf.cxx
@@ -275,7 +275,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const 
DXFCircleEntity & rE, const DXFTran
 nPoints=OptPointsPerCircle;
 tools::Polygon aPoly(nPoints);
 for (i=0; i(nPoints-1)*static_cast(i);
+fAng=2*M_PI/static_cast(nPoints-1)*static_cast(i);
 rTransform.Transform(
 rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),0),
 aPoly[i]
@@ -285,7 +285,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const 
DXFCircleEntity & rE, const DXFTran
 if (rE.fThickness!=0) {
 tools::Polygon aPoly2(nPoints);
 for (i=0; i(nPoints-1)*static_cast(i);
+
fAng=2*M_PI/static_cast(nPoints-1)*static_cast(i);
 rTransform.Transform(
 
rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),rE.fThickness),
 aPoly2[i]
@@ -322,10 +322,10 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & 
rE, const DXFTransform
 if (fdA<=0) fdA+=360.0;
 rTransform.Transform(rE.aP0,aC);
 if (rE.fThickness==0 && fdA>5.0 && 
rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)) {
-DXFVector 
aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0);
+DXFVector 
aVS(cos(basegfx::deg2rad(fA1)),sin(basegfx::deg2rad(fA1)),0.0);
 aVS*=rE.fRadius;
 aVS+=rE.aP0;
-DXFVector 
aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0);
+DXFVector 
aVE(cos(basegfx::deg2rad(fA1+fdA)),sin(basegfx::deg2rad(fA1+fdA)),0.0);
 aVE*=rE.fRadius;
 aVE+=rE.aP0;
 Point aPS,aPE;
@@ -349,7 +349,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & 
rE, const DXFTransform
 if (nPoints<2) nPoints=2;
 tools::Polygon aPoly(nPoints);
 for (i=0; i(nPoints-1)*static_cast(i) );
+fAng=basegfx::deg2rad( fA1 + 
fdA/static_cast(nPoints-1)*static_cast(i) );
 rTransform.Transform(
 rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),0),
 aPoly[i]
@@ -359,7 +359,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & 
rE, const DXFTransform
 if (rE.fThickness!=0) {
 tools::Polygon aPoly2(nPoints);
 for (i=0; i(nPoints-1)*static_cast(i) );
+fAng=basegfx::deg2rad( fA1 + 
fdA/static_cast(nPoints-1)*static_cast(i) );
 rTransform.Transform(
 
rE.aP0+DXFVector(rE.fRadius*cos(fAng),rE.fRadius*sin(fAng),rE.fThickness),
 aPoly2[i]


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

2022-01-06 Thread Andras Timar (via logerrit)
 vcl/qa/cppunit/BmpFilterTest.cxx |   13 +
 vcl/qa/cppunit/data/tdf73523.bmp |binary
 vcl/source/bitmap/dibtools.cxx   |   34 --
 3 files changed, 37 insertions(+), 10 deletions(-)

New commits:
commit 3a0d539b3a8a76efc2cdac04c658645fe750bec4
Author: Andras Timar 
AuthorDate: Mon Jan 3 22:12:01 2022 +0100
Commit: Andras Timar 
CommitDate: Thu Jan 6 23:12:13 2022 +0100

tdf#73523 support WinBMPv3-NT version of BMP files (found in Visio files)

It is a special case when there are additional 12 bytes of color bitfields
after the info header. See also the useful comments at

https://searchfox.org/mozilla-central/source/image/decoders/nsBMPDecoder.cpp#47

It turned out we generate this type of BMP files internally from EMF files,
but in that case the bfOffBits of BITMAPFILEHEADER struct points to the
pixel data. In case of Visio, bfOffBits points to the color mask. There was
no better solution than preventing jumping back in the stream.

Change-Id: I97f0fd4f184ea77beeab8b22fc98fdb78472d9bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127920
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127927
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/vcl/qa/cppunit/BmpFilterTest.cxx b/vcl/qa/cppunit/BmpFilterTest.cxx
index 20be739d0e98..1ab7bc2a0a4a 100644
--- a/vcl/qa/cppunit/BmpFilterTest.cxx
+++ b/vcl/qa/cppunit/BmpFilterTest.cxx
@@ -204,4 +204,17 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_V2)
 CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, aBitmap.GetPixelColor(2, 2));
 }
 
+CPPUNIT_TEST_FIXTURE(BmpFilterTest, testTdf73523)
+{
+SvFileStream aFileStream(getFullUrl(u"tdf73523.bmp"), StreamMode::READ);
+Graphic aGraphic;
+CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
+auto aBitmap = aGraphic.GetBitmapEx();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: c[8000]
+// - Actual  : c[]
+// i.e. the pixel is red not black
+CPPUNIT_ASSERT_EQUAL(COL_RED, aBitmap.GetPixelColor(0, 0));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/data/tdf73523.bmp b/vcl/qa/cppunit/data/tdf73523.bmp
new file mode 100644
index ..f4364ea3e841
Binary files /dev/null and b/vcl/qa/cppunit/data/tdf73523.bmp differ
diff --git a/vcl/qa/cppunit/graphicfilter/data/bmp/fail/crash-1.bmp 
b/vcl/qa/cppunit/graphicfilter/data/bmp/pass/crash-1.bmp
similarity index 100%
rename from vcl/qa/cppunit/graphicfilter/data/bmp/fail/crash-1.bmp
rename to vcl/qa/cppunit/graphicfilter/data/bmp/pass/crash-1.bmp
diff --git a/vcl/source/bitmap/dibtools.cxx b/vcl/source/bitmap/dibtools.cxx
index 65117319afe5..96b82b9a7b86 100644
--- a/vcl/source/bitmap/dibtools.cxx
+++ b/vcl/source/bitmap/dibtools.cxx
@@ -246,8 +246,18 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& 
rHeader, bool& bTopDown
 readUInt32( rHeader.nV5ProfileSize );
 readUInt32( rHeader.nV5Reserved );
 
+// Read color mask. An additional 12 bytes of color bitfields follow 
the info header (WinBMPv3-NT)
+sal_uInt32 nColorMask = 0;
+if (BITFIELDS == rHeader.nCompression && DIBINFOHEADERSIZE == 
rHeader.nSize)
+{
+rIStm.ReadUInt32( rHeader.nV5RedMask );
+rIStm.ReadUInt32( rHeader.nV5GreenMask );
+rIStm.ReadUInt32( rHeader.nV5BlueMask );
+nColorMask = 12;
+}
+
 // seek to EndPos
-if (!checkSeek(rIStm, aStartPos + rHeader.nSize))
+if (!checkSeek(rIStm, aStartPos + rHeader.nSize + nColorMask))
 return false;
 }
 
@@ -530,14 +540,12 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& 
rHeader, BitmapWriteAccess& r
 }
 else
 {
-// Read color mask
-if(bTCMask && BITFIELDS == rHeader.nCompression)
-{
-rIStm.SeekRel( -12 );
-rIStm.ReadUInt32( nRMask );
-rIStm.ReadUInt32( nGMask );
-rIStm.ReadUInt32( nBMask );
-}
+if (rHeader.nV5RedMask > 0)
+nRMask = rHeader.nV5RedMask;
+if (rHeader.nV5GreenMask > 0)
+nGMask = rHeader.nV5GreenMask;
+if (rHeader.nV5BlueMask > 0)
+nBMask = rHeader.nV5BlueMask;
 
 const tools::Long nWidth(rHeader.nWidth);
 const tools::Long nHeight(rHeader.nHeight);
@@ -908,7 +916,13 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, 
AlphaMask* pBmpAlpha, sal_uI
 
 if (nOffset)
 {
-pIStm->SeekRel(nOffset - (pIStm->Tell() - nStmPos));
+// It is problematic to seek backwards. We are at the
+// end of BITMAPINFOHEADER or 12 bytes further in case
+// of WinBMPv3-NT format. It is possible to seek forward
+// though because a gap may be there.
+sal_Int32 nSeekRel = nOffset - (pIStm->Te

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

2022-01-06 Thread Stephan Bergmann (via logerrit)
 svx/qa/unit/classicshapes.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit caaff91025316a464aa979b743a4748ab2d207ac
Author: Stephan Bergmann 
AuthorDate: Thu Jan 6 19:00:26 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Jan 6 23:02:39 2022 +0100

-Werror=maybe-uninitialized

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

diff --git a/svx/qa/unit/classicshapes.cxx b/svx/qa/unit/classicshapes.cxx
index d9e0fc18c7c1..3bba20f8ec73 100644
--- a/svx/qa/unit/classicshapes.cxx
+++ b/svx/qa/unit/classicshapes.cxx
@@ -198,15 +198,15 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf130076Flip)
 
 for (sal_uInt8 nPageIndex = 0; nPageIndex < 2; ++nPageIndex)
 {
-sal_Int32 angle1, angle2;
+sal_Int32 angle1 = {}, angle2 = {};
 const sal_Int32 goodAngle1 = 26000;
 const sal_Int32 goodAngle2 = 26000;
 uno::Reference xShape(getShape(1, nPageIndex));
 uno::Reference xShapeProps(xShape, 
uno::UNO_QUERY);
 uno::Reference xShape2(getShape(2, nPageIndex));
 uno::Reference xShapeProps2(xShape2, 
uno::UNO_QUERY);
-xShapeProps->getPropertyValue("CircleStartAngle") >>= angle1;
-xShapeProps2->getPropertyValue("CircleStartAngle") >>= angle2;
+CPPUNIT_ASSERT(xShapeProps->getPropertyValue("CircleStartAngle") >>= 
angle1);
+CPPUNIT_ASSERT(xShapeProps2->getPropertyValue("CircleStartAngle") >>= 
angle2);
 if (angle1 != goodAngle1)
 {
 sErrors += "page " + OUString::number(nPageIndex)


Problems with lighting of extruded custom-shapes

2022-01-06 Thread Regina Henschel

Hi all,

I want to improve lighting for extruded custom-shapes. I have examined 
how MS Office (MSO) does lighting of those shapes. Now I try to map that 
to the attributes of 3D scene and objects, which are used to render 
extruded custom-shapes. I see some problems and things incompatible with 
our current implementation (including my previous commit). So it would 
be nice to get some comments and suggestions from you.


If the OOXML 'scene3d' and 'sp3d' elements will be imported so, that 
extruded custom-shapes are used, the decisions here will influence that 
implementation too.
Fontwork is affected too, because it is only a special mode of a 
custom-shape.


I know that for most of you working on LibreOffice is connected with 
making money. But maybe you have time to think about the problems anyway?



(A)
MSO attributes 'c3DKeyHarsh' and 'c3DFillHarsh'
API properties 'FirstLineHarsh' and 'SecondLineHarsh'
ODF attributes 'draw:extrusion-first-light-harsh' and 
'draw:extrusion-second-light-harsh':


If a light is not "harsh", then MSO keeps only half the intensity value 
at the light and puts the other half to the ambient light. The light 
keeps to be "specular" in the sense of LO. That does not correspond to 
light attribute 'dr3d:specular' in our 3D engine, which is currently used.


ODF specifies, "The means by which the light is softened is 
implementation-defined." That means, that in addition we need to 
document, how we do it.



(B)
MSO attribute 'c3DShininess'
API property 'Shininess'
ODF attribute 'draw:extrusion-shininess':

This attribute has the same effect in MSO as the property "Specular 
Intensity" in the '3D Effects' dialog. That property is ODF style 
attribute 'dr3d:shininess'. Only the value ranges are different and a 
mapping would be not linear. But this attribute is currently not 
evaluated at all for extruded custom-shapes. Instead a value is build as 
100 - "Specularity". (for "Specularity" see below)



(C)
MSO attribute 'c3DDiffuseAmt'
API property 'Diffusion'
ODF attribute 'draw:extrusion-diffusion':

The attribute works on the luminance of the fill color of the shape in 
MSO. I have not yet tested extrusion color. There exists a style 
attribute dr3d:diffuse-color (not to be confused with the same named 
light attribute) for 3D-objects in ODF. But this ODF attribute is not 
implemented in our 3D engine and the standard does not contain a 
description, how it should work. Values are only preserved from load to 
save by LO.

Default value is 1 in MSO and 0% in ODF.
MSO sets this attribute in addition to the 'fc3DMetallic' flag, if the 
user chooses the surface preset 'Metal', so we need to consider it for 
extruded custom-shapes.



(D)
MSO attribute 'c3DSpecularAmt'
API property 'Specularity'
ODF attribute 'draw:extrusion-specularity':

This attribute is currently mapped to property 'Specular color' in the 
'3d Effects' dialog. That property is ODF style attribute 
'dr3d:specular-color'. ODF has as data type zeroToHundredPercent. MSO 
allows values larger as 1 and evaluates them. If the user sets surface 
preset 'Plastic' in the UI, then MSO sets 8/65536≈122% for example.



(E)
MSO flag 'fc3DMetallic'
API property 'Metal'
ODF attribute 'draw:extrusion-metal':

The ODF standard specifies,
"•false: the specular color for the shading of an extruded shape is white.
•true: the specular color for the shading of an extruded shape is gray 
(red green and blue values of 200) instead of white and 15% is added to 
the specularity."


But "specular color" is not defined in the standard. It cannot be 
interpreted as "color resulting from draw:extrusion-specularity", 
because then that color would be either white or RGB(200,200,200), and 
it would conflict with interpreting 'specularity' as being 
'draw:extrusion-specularity'.
MSO has default 65536 for attribute 'c3DDiffuseAmt' and reduces it to 
43712 in case of surface "Metal". Interpreting 'c3DDiffuseAmt' as 
"specular color" and 65536 as white and 43712 as gray would not result 
in RGB(200,200,200) but in RGB(170,170,170).




In case you want to test these MSO properties in a current MSO, then use 
a text document and save it to RTF. MSO provides then a UI for extruding 
shapes which uses these attributes known from the binary format, and you 
can edit the resulting RTF-file instead of working in binary format. LO 
cannot import the shapes in the RTF-file directly. Instead let MSO save 
it to doc-Format.


Kind regards,
Regina


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

2022-01-06 Thread Vasily Melenchuk (via logerrit)
 sc/qa/unit/data/ods/tdf145059.ods  |binary
 sc/qa/unit/subsequent_export_test2.cxx |   31 +++
 sc/source/filter/excel/excrecds.cxx|4 
 sc/source/filter/excel/xestyle.cxx |   16 
 sc/source/filter/inc/xestyle.hxx   |5 +++--
 5 files changed, 50 insertions(+), 6 deletions(-)

New commits:
commit f0ad6ec2a23a36ade407db8cda36655ba2f144c1
Author: Vasily Melenchuk 
AuthorDate: Thu Dec 30 15:32:37 2021 +0300
Commit: Thorsten Behrens 
CommitDate: Thu Jan 6 21:25:18 2022 +0100

tdf#145059: sc: always write dxf node for color filter for XLSX

If there is no dxf reference to color filter (for example if selected
color is not in range of available colors for current range) Excel
is not able to show color filter correctly: it is not marked as used
filter, no ability to reset, etc.

Change-Id: I65378ddd6f8f8233cda147ff9dcd28f455a58225
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127745
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/unit/data/ods/tdf145059.ods 
b/sc/qa/unit/data/ods/tdf145059.ods
new file mode 100644
index ..a76da3b5cb4e
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf145059.ods differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index 59fa0bf21d9b..3aef467687d2 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -216,6 +216,7 @@ public:
 void testTdf142264ManyChartsToXLSX();
 void testTdf143929MultiColumnToODS();
 void testTdf142578();
+void testTdf145059();
 void testTdf130104_XLSXIndent();
 
 CPPUNIT_TEST_SUITE(ScExportTest2);
@@ -331,6 +332,7 @@ public:
 CPPUNIT_TEST(testTdf142264ManyChartsToXLSX);
 CPPUNIT_TEST(testTdf143929MultiColumnToODS);
 CPPUNIT_TEST(testTdf142578);
+CPPUNIT_TEST(testTdf145059);
 CPPUNIT_TEST(testTdf130104_XLSXIndent);
 
 CPPUNIT_TEST_SUITE_END();
@@ -3054,6 +3056,35 @@ void ScExportTest2::testTdf142578()
 xDocSh->DoClose();
 }
 
+void ScExportTest2::testTdf145059()
+{
+ScDocShellRef xDocSh = loadDoc(u"tdf145059.", FORMAT_ODS);
+CPPUNIT_ASSERT(xDocSh);
+
+// Export to xlsx.
+std::shared_ptr pXPathFile
+= ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+xmlDocUniquePtr pSheet
+= XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet1.xml");
+CPPUNIT_ASSERT(pSheet);
+xmlDocUniquePtr pStyle = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/styles.xml");
+CPPUNIT_ASSERT(pStyle);
+
+sal_Int32 nColorFilterDxdId
+= getXPath(pSheet, 
"/x:worksheet/x:autoFilter/x:filterColumn/x:colorFilter", "dxfId")
+  .toInt32();
+
+// Ensure that dxf id is not -1
+CPPUNIT_ASSERT(nColorFilterDxdId >= 0);
+
+// Find color by this dxfid
+OString sDxfIdPath = "/x:styleSheet/x:dxfs/x:dxf[" + 
OString::number(nColorFilterDxdId + 1)
+ + "]/x:fill/x:patternFill/x:fgColor";
+assertXPath(pStyle, sDxfIdPath, "rgb", "FF4472C4");
+
+xDocSh->DoClose();
+}
+
 void ScExportTest2::testTdf130104_XLSXIndent()
 {
 ScDocShellRef xDocSh = loadDoc(u"tdf130104_indent.", FORMAT_XLSX);
diff --git a/sc/source/filter/excel/excrecds.cxx 
b/sc/source/filter/excel/excrecds.cxx
index 65edd87ee5bc..570167b8014b 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -796,6 +796,10 @@ void XclExpAutofilter::AddColorEntry(const ScQueryEntry& 
rEntry)
 {
 maColorValues.push_back(
 std::make_pair(rItem.maColor, rItem.meType == 
ScQueryEntry::ByBackgroundColor));
+// Ensure that selected color(s) will be added to dxf: selection can 
be not in list
+// of already added to dfx colors taken from filter range
+if (GetDxfs().GetDxfByColor(rItem.maColor) == -1)
+GetDxfs().AddColor(rItem.maColor);
 }
 }
 
diff --git a/sc/source/filter/excel/xestyle.cxx 
b/sc/source/filter/excel/xestyle.cxx
index 3898c5cad9b6..291b51c6c83e 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -3176,22 +3176,30 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
 }
 }
 
-sal_Int32 XclExpDxfs::GetDxfId( const OUString& rStyleName )
+sal_Int32 XclExpDxfs::GetDxfId( const OUString& rStyleName ) const
 {
-std::map::iterator itr = 
maStyleNameToDxfId.find(rStyleName);
+std::map::const_iterator itr = 
maStyleNameToDxfId.find(rStyleName);
 if(itr!= maStyleNameToDxfId.end())
 return itr->second;
 return -1;
 }
 
-sal_Int32 XclExpDxfs::GetDxfByColor(Color aColor)
+sal_Int32 XclExpDxfs::GetDxfByColor(Color aColor) const
 {
-std::map::iterator itr = maColorToDxfId.find(aColor);
+std::map::const_iterator itr = 
maColorToDxfId.find(aColor);
 if (itr != maColorToDxfId.end())
 return itr->second;
 return -1;
 }
 
+void X

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

2022-01-06 Thread Mike Kaganski (via logerrit)
 sc/source/ui/unoobj/viewuno.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit e9dce4e8cbea04d6c6636a45f5a172e986714409
Author: Mike Kaganski 
AuthorDate: Thu Jan 6 18:38:58 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jan 6 20:44:42 2022 +0100

tdf#146617: iterators may be invalidated during handler call

... when the handler decides to remove itself from listeners.

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

diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 7ca9df64e88d..e933830534d3 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -544,16 +544,16 @@ void ScTabViewObj::SheetChanged( bool bSameTabButMoved )
 uno::Reference< uno::XInterface > xSource(xView, uno::UNO_QUERY);
 aEvent.Source = xSource;
 aEvent.ActiveSheet = new ScTableSheetObj(pDocSh, rViewData.GetTabNo());
-for (auto it = aActivationListeners.begin(); it != 
aActivationListeners.end(); )
+// Listener's handler may remove it from the listeners list
+for (size_t i = aActivationListeners.size(); i > 0; --i)
 {
 try
 {
-(*it)->activeSpreadsheetChanged( aEvent );
-++it;
+aActivationListeners[i - 1]->activeSpreadsheetChanged( aEvent 
);
 }
 catch( uno::Exception& )
 {
-it = aActivationListeners.erase( it);
+aActivationListeners.erase(aActivationListeners.begin() + (i - 
1));
 }
 }
 }
@@ -1149,17 +1149,17 @@ bool ScTabViewObj::MousePressed( const awt::MouseEvent& 
e )
 aMouseEvent.Target = xTarget;
 aMouseEvent.Modifiers = e.Modifiers;
 
-for (auto it = aMouseClickHandlers.begin(); it != 
aMouseClickHandlers.end(); )
+// Listener's handler may remove it from the listeners list
+for (size_t i = aMouseClickHandlers.size(); i > 0; --i)
 {
 try
 {
-if (!(*it)->mousePressed( aMouseEvent ))
+if (!aMouseClickHandlers[i - 1]->mousePressed(aMouseEvent))
 bReturn = true;
-++it;
 }
 catch ( uno::Exception& )
 {
-it = aMouseClickHandlers.erase(it);
+aMouseClickHandlers.erase(aMouseClickHandlers.begin() + (i - 
1));
 }
 }
 }
@@ -1256,17 +1256,17 @@ bool ScTabViewObj::MouseReleased( const 
awt::MouseEvent& e )
 aMouseEvent.Target = xTarget;
 aMouseEvent.Modifiers = e.Modifiers;
 
-for (auto it = aMouseClickHandlers.begin(); it != 
aMouseClickHandlers.end(); )
+// Listener's handler may remove it from the listeners list
+for (size_t i = aMouseClickHandlers.size(); i > 0; --i)
 {
 try
 {
-if (!(*it)->mouseReleased( aMouseEvent ))
+if (!aMouseClickHandlers[i - 1]->mouseReleased( 
aMouseEvent ))
 bReturn = true;
-++it;
 }
 catch ( uno::Exception& )
 {
-it = aMouseClickHandlers.erase(it);
+aMouseClickHandlers.erase(aMouseClickHandlers.begin() + (i 
- 1));
 }
 }
 }


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

2022-01-06 Thread Tor Lillqvist (via logerrit)
 sd/inc/bitmaps.hlst   |   16 ++--
 sd/source/ui/controller/displaymodecontroller.cxx |8 +++---
 sd/source/ui/controller/slidelayoutcontroller.cxx |   28 +++---
 sd/source/ui/dlg/sdpreslt.cxx |2 -
 sd/source/ui/sidebar/LayoutMenu.cxx   |   24 +-
 5 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit 568293d7ce6d96ba71ae8c2d591b6cf237e31db1
Author: Tor Lillqvist 
AuthorDate: Thu Jan 6 15:03:05 2022 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Jan 6 20:22:44 2022 +0100

It's called a slide, not a foil

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

diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst
index 5b3ae7851897..9e66e87dd032 100644
--- a/sd/inc/bitmaps.hlst
+++ b/sd/inc/bitmaps.hlst
@@ -26,13 +26,13 @@ inline constexpr OUStringLiteral BMP_LAYOUT_HEAD06 = 
u"sd/res/layout_head06.png"
 inline constexpr OUStringLiteral BMP_LAYOUT_TEXTONLY = 
u"sd/res/layout_textonly.png";
 inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL01 = 
u"sd/res/layout_vertical01.png";
 inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL02 = 
u"sd/res/layout_vertical02.png";
-inline constexpr OUStringLiteral BMP_FOIL_NONE = u"sd/res/foilnone.png";
-inline constexpr OUStringLiteral BMP_FOILH_01 = u"sd/res/foilh01.png";
-inline constexpr OUStringLiteral BMP_FOILH_02 = u"sd/res/foilh02.png";
-inline constexpr OUStringLiteral BMP_FOILH_03 = u"sd/res/foilh03.png";
-inline constexpr OUStringLiteral BMP_FOILH_04 = u"sd/res/foilh04.png";
-inline constexpr OUStringLiteral BMP_FOILH_06 = u"sd/res/foilh06.png";
-inline constexpr OUStringLiteral BMP_FOILH_09 = u"sd/res/foilh09.png";
+inline constexpr OUStringLiteral BMP_SLIDE_NONE = u"sd/res/foilnone.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_01 = u"sd/res/foilh01.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_02 = u"sd/res/foilh02.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_03 = u"sd/res/foilh03.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_04 = u"sd/res/foilh04.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_06 = u"sd/res/foilh06.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_09 = u"sd/res/foilh09.png";
 inline constexpr OUStringLiteral BMP_DISPLAYMODE_SLIDE = 
u"sd/res/displaymode_slide.png";
 inline constexpr OUStringLiteral BMP_DISPLAYMODE_OUTLINE = 
u"sd/res/displaymode_outline.png";
 inline constexpr OUStringLiteral BMP_DISPLAYMODE_NOTES = 
u"sd/res/displaymode_notes.png";
@@ -56,7 +56,7 @@ inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE 
= u"sd/res/placehol
 inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE_HOVER = 
u"sd/res/placeholder_movie_large_hover.png";
 inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE = 
u"sd/res/placeholder_table_large.png";
 inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE_HOVER = 
u"sd/res/placeholder_table_large_hover.png";
-inline constexpr OUStringLiteral BMP_FOILN_01 = u"sd/res/foiln01.png";
+inline constexpr OUStringLiteral BMP_SLIDEN_01 = u"sd/res/foiln01.png";
 inline constexpr OUStringLiteral BMP_PAGE = u"sd/res/page.png"; 
 inline constexpr OUStringLiteral BMP_PAGE_EXCLUDED = u"sd/res/pageexcl.png"; 
 inline constexpr OUStringLiteral BMP_PAGEOBJS_EXCLUDED = 
u"sd/res/pagobjex.png"; 
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx 
b/sd/source/ui/controller/displaymodecontroller.cxx
index 7c29a03659b6..81ad2d19e477 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -70,7 +70,7 @@ private:
 DECL_LINK(SelectValueSetHdl, ValueSet*, void);
 };
 
-struct snewfoil_value_info
+struct snew_slide_value_info
 {
 sal_uInt16 mnId;
 OUString msBmpResId;
@@ -80,7 +80,7 @@ struct snewfoil_value_info
 
 }
 
-const snewfoil_value_info editmodes[] =
+const snew_slide_value_info editmodes[] =
 {
 {1,
 BMP_DISPLAYMODE_SLIDE,
@@ -101,7 +101,7 @@ const snewfoil_value_info editmodes[] =
 {0, "", {}, "" }
 };
 
-const snewfoil_value_info mastermodes[] =
+const snew_slide_value_info mastermodes[] =
 {
 {5,
 BMP_DISPLAYMODE_SLIDE_MASTER,
@@ -119,7 +119,7 @@ const snewfoil_value_info mastermodes[] =
 };
 
 
-static void fillLayoutValueSet(ValueSet* pValue, const snewfoil_value_info* 
pInfo)
+static void fillLayoutValueSet(ValueSet* pValue, const snew_slide_value_info* 
pInfo)
 {
 Size aLayoutItemSize;
 for( ; pInfo->mnId; pInfo++ )
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx 
b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 06814feda90f..55a4d0419b82 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -77,7 +77,7 @@ private:
 std::unique_ptr mxMoreButton;
 };
 
-struct snewfoil_value_info_layo

[Libreoffice-commits] core.git: bin/get-bugzilla-attachments-by-mimetype

2022-01-06 Thread Michael Stahl (via logerrit)
 bin/get-bugzilla-attachments-by-mimetype |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 82cf116fe646c822bc91b4ae0a6c4e6e948a6f4d
Author: Michael Stahl 
AuthorDate: Thu Jan 6 11:04:23 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 6 19:13:48 2022 +0100

get-bugzilla-attachments-by-mimetype: query different bzs concurrently

Downside is we can't easily detect when one tracker is done, but it
should be faster.

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

diff --git a/bin/get-bugzilla-attachments-by-mimetype 
b/bin/get-bugzilla-attachments-by-mimetype
index 47669d04434a..a38b6ea95bca 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -547,11 +547,12 @@ class manage_threads(threading.Thread):
 break
 
 def generate_multi_threading():
-for (prefix, uri) in rss_bugzillas:
 
-# Initialize threads
-for i in range(max_threads):
-manage_threads().start()
+# Initialize threads
+for i in range(max_threads):
+manage_threads().start()
+
+for (prefix, uri) in rss_bugzillas:
 
 # Create a job for every mimetype for a bugzilla
 for (mimetype,extension) in mimetypes.items():
@@ -565,8 +566,9 @@ def generate_multi_threading():
 print("successfully placed a job in the queue searching for " + 
mimetype + " in bugtracker " + prefix)
 
 # Continue when all mimetypes are done for a bugzilla
-jobs.join()
-print("DONE with bugtracker " + prefix)
+print("STARTED all bugtracker " + prefix)
+
+jobs.join()
 
 max_threads = 20 # Number of threads to create, (1 = without multi-threading)
 jobs = queue.Queue()


[Libreoffice-commits] core.git: distro-configs/Jenkins

2022-01-06 Thread Jan-Marek Glogowski (via logerrit)
 distro-configs/Jenkins/linux_gcc_release_64 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7df70a1cdcec43352e25fca9fdb5687bdb0616a6
Author: Jan-Marek Glogowski 
AuthorDate: Fri Dec 24 14:13:57 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Thu Jan 6 18:51:34 2022 +0100

Switch Linux Jenkins release build to mergelibs

Currently mergelibs errors just fails the later callgrind build,
not early in Gerrit.

Change-Id: I165f99fa819ea3d88b76089a5a0967731570d42a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127426
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/distro-configs/Jenkins/linux_gcc_release_64 
b/distro-configs/Jenkins/linux_gcc_release_64
index 381ea68a0104..1c61522d4099 100644
--- a/distro-configs/Jenkins/linux_gcc_release_64
+++ b/distro-configs/Jenkins/linux_gcc_release_64
@@ -4,3 +4,4 @@ CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
 --disable-dependency-tracking
 --with-jdk-home=/etc/alternatives/java_sdk_11
 --enable-odk
+--enable-mergelibs


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

2022-01-06 Thread Miklos Vajna (via logerrit)
 sw/qa/core/layout/data/inner-border.docx |binary
 sw/qa/core/layout/layout.cxx |   53 +++
 sw/source/core/layout/paintfrm.cxx   |   83 +++
 3 files changed, 116 insertions(+), 20 deletions(-)

New commits:
commit 526c8bdb54eff942d5213030d1455f97720a1ba7
Author: Miklos Vajna 
AuthorDate: Thu Jan 6 15:45:02 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 18:37:14 2022 +0100

sw: fix too long inner borders intersecting with outer borders for Word 
cells

This is similar to commit 66ac8e60896f6306bed8fbb34606fd14474f19ce (sw:
fix unwanted long vertical border around vertically merged Word cell,
2021-03-04), but this one is about how we handle table border painting
when an inner border intersects with an outer border.

Previously we used to paint the full outer border and the full inner
border, which looks silly in case you have e.g. double border outside
and a single border inside -- the inner line stops at the edge of the
thick outer border in Word.

Do the same by limiting the start of a horizontal line if its start
would match the X coordinate of a vertical line (and the remaining 3
combinations of hori/vert line start/end). We always limit the inner
line, so this needs extending SwLineEntry if the line is an outer one or
not.

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

diff --git a/sw/qa/core/layout/data/inner-border.docx 
b/sw/qa/core/layout/data/inner-border.docx
new file mode 100644
index ..1d8adc9fe818
Binary files /dev/null and b/sw/qa/core/layout/data/inner-border.docx differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index b1cb3136b963..2b1dc8be0b3f 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -525,6 +525,59 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testLinkedBullet)
 assertXPath(pXmlDoc, "//bmpexscale", 1);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testInnerCellBorderIntersect)
+{
+// Given a table with both outer and inner borders:
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "inner-border.docx");
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// When rendering table borders:
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+
+// Then make sure that that inner and outer borders don't overlap in Word 
compatibility mode,
+// and inner borders are reduced to prevent an overlap:
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+// Collect start/end (vertical) positions of horizontal borders.
+xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, 
"//polyline[@style='solid']/point");
+xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+std::vector> aBorderStartEnds;
+for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+{
+xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+sal_Int32 nStartY = OString(reinterpret_cast(pStartY)).toInt32();
+sal_Int32 nEndY = OString(reinterpret_cast(pEndY)).toInt32();
+if (nStartY != nEndY)
+{
+// Vertical border.
+continue;
+}
+xmlChar* pStartX = xmlGetProp(pStart, BAD_CAST("x"));
+xmlChar* pEndX = xmlGetProp(pEnd, BAD_CAST("x"));
+sal_Int32 nStartX = OString(reinterpret_cast(pStartX)).toInt32();
+sal_Int32 nEndX = OString(reinterpret_cast(pEndX)).toInt32();
+aBorderStartEnds.emplace_back(nStartX, nEndX);
+}
+xmlXPathFreeObject(pXmlObj);
+// We have 3 lines: top, middle and bottom. The top and the bottom one is 
a full line, since
+// it's an outer border. The middle one has increased start and decreased 
end to avoid an
+// overlap.
+CPPUNIT_ASSERT_EQUAL(static_cast(3), aBorderStartEnds.size());
+CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].first, aBorderStartEnds[2].first);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected greater than: 1724
+// - Actual  : 1724
+// i.e. the middle line's start was the same as the top line start, while 
what we want is a
+// larger X position, so the start of the middle line doesn't overlap with 
the thick vertical
+// outer border on the left of the table.
+CPPUNIT_ASSERT_GREATER(aBorderStartEnds[0].first, 
aBorderStartEnds[1].first);
+CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].second, 
aBorderStartEnds[2].second);
+CPPUNIT_ASSERT_LESS(aBorderStartEnds[0].second, 
aBorderStartEnds[1].second);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw

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

2022-01-06 Thread Caolán McNamara (via logerrit)
 filter/source/msfilter/dffrecordheader.cxx |   35 +++--
 sd/source/filter/ppt/pptatom.cxx   |6 +---
 2 files changed, 16 insertions(+), 25 deletions(-)

New commits:
commit d5288dd29611f2e5c4140724255cea8e7bb2b25b
Author: Caolán McNamara 
AuthorDate: Tue Jan 4 21:27:40 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 6 18:14:30 2022 +0100

ofz#42785 Timeout

Stream::Seek (like istream::seekg) clears any eofbit
Change-Id: I90253e69a52c4099aa2971294a215dff37e8a246
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127975
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/filter/source/msfilter/dffrecordheader.cxx 
b/filter/source/msfilter/dffrecordheader.cxx
index 2a8c91a89b1b..c94bec53b611 100644
--- a/filter/source/msfilter/dffrecordheader.cxx
+++ b/filter/source/msfilter/dffrecordheader.cxx
@@ -22,28 +22,21 @@
 bool ReadDffRecordHeader(SvStream& rIn, DffRecordHeader& rRec)
 {
 rRec.nFilePos = rIn.Tell();
-if (rIn.remainingSize() >= 8)
-{
-sal_uInt16 nTmp(0);
-rIn.ReadUInt16(nTmp);
-rRec.nImpVerInst = nTmp;
-rRec.nRecVer = sal::static_int_cast(nTmp & 0x000F);
-rRec.nRecInstance = nTmp >> 4;
-rIn.ReadUInt16(rRec.nRecType);
-rIn.ReadUInt32(rRec.nRecLen);
+sal_uInt16 nTmp(0);
+rIn.ReadUInt16(nTmp);
+rRec.nImpVerInst = nTmp;
+rRec.nRecVer = sal::static_int_cast(nTmp & 0x000F);
+rRec.nRecInstance = nTmp >> 4;
+rRec.nRecType = 0;
+rIn.ReadUInt16(rRec.nRecType);
+rRec.nRecLen = 0;
+rIn.ReadUInt32(rRec.nRecLen);
+
+// preserving overflow, optimally we would check
+// the record size against the parent header
+if (rRec.nRecLen > (SAL_MAX_UINT32 - rRec.nFilePos))
+rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
 
-// preserving overflow, optimally we would check
-// the record size against the parent header
-if (rRec.nRecLen > (SAL_MAX_UINT32 - rRec.nFilePos))
-rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
-}
-else
-{
-rRec.nImpVerInst = 0;
-rRec.nRecVer = 0;
-rRec.nRecInstance = 0;
-rIn.Seek(STREAM_SEEK_TO_END);
-}
 return rIn.good();
 }
 
diff --git a/sd/source/filter/ppt/pptatom.cxx b/sd/source/filter/ppt/pptatom.cxx
index 90e61e738ffb..20d52eb8c63f 100644
--- a/sd/source/filter/ppt/pptatom.cxx
+++ b/sd/source/filter/ppt/pptatom.cxx
@@ -39,13 +39,11 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& 
rStream )
 // retrieve file size (to allow sanity checks)
 sal_uInt64 const nStreamSize = mrStream.TellEnd();
 
-while( (mrStream.GetError() == ERRCODE_NONE )
+while( mrStream.good()
 && ( mrStream.Tell() < nStreamSize )
 && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
 {
-ReadDffRecordHeader( mrStream, aChildHeader );
-
-if( mrStream.GetError() == ERRCODE_NONE )
+if (ReadDffRecordHeader(mrStream, aChildHeader))
 {
 Atom* pAtom = new Atom( aChildHeader, mrStream );
 


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

2022-01-06 Thread scito (via logerrit)
 xmlsecurity/inc/xmlsec-wrapper.h   |4 
 xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx |2 ++
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx |2 ++
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 67fb363eed88b15eec7821fe604eb23d142d84cc
Author: scito 
AuthorDate: Thu Dec 30 10:15:28 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jan 6 17:34:05 2022 +0100

tdf#146392 fix --enable-pch=full build

x509.h includes cert.h. But that doesn't know of LO using
xmlsecurity/source/xmlsec/nss/nssrenam.h, which has a "#define
CERT_DecodeDERCertificate __CERT_DecodeDERCertificate". So the PCH
doesn't know of this rename and the compiler fails.

move the include line into the file that needs it and the --enable-pch=full
build works ok

Change-Id: I247bd219cf47964490ded439ad51bd8e8e120c48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127744
Reviewed-by: Jan-Marek Glogowski 
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
index cc149379c36b..e4048de94bf2 100644
--- a/xmlsecurity/inc/xmlsec-wrapper.h
+++ b/xmlsecurity/inc/xmlsec-wrapper.h
@@ -42,10 +42,6 @@
 #include 
 #include 
 #include 
-#include 
-#endif
-#ifdef XMLSEC_CRYPTO_MSCRYPTO
-#include 
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index 0f145cd3def3..87af0f040866 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -22,6 +22,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx 
b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 9257771f2767..94e84a71b5d8 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -20,6 +20,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - config_host/config_features.h.in config_host.mk.in configure.ac sal/Library_sal.mk sal/osl

2022-01-06 Thread Ismael Luceno (via logerrit)
 config_host.mk.in|2 ++
 config_host/config_features.h.in |4 
 configure.ac |   14 ++
 sal/Library_sal.mk   |2 ++
 sal/osl/unx/backtrace.c  |   20 +++-
 sal/osl/unx/backtrace.h  |   13 +++--
 sal/osl/unx/signal.cxx   |   32 +++-
 7 files changed, 43 insertions(+), 44 deletions(-)

New commits:
commit 7c0a4e7ca36b93df4968182f92b3d52fd4d1bb01
Author: Ismael Luceno 
AuthorDate: Tue Dec 28 12:12:13 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 6 17:33:15 2022 +0100

Add configure test for the backtrace implementation

Improve robustness by testing explicitly; instead of assuming based on
the OS, test first the libc and then test for libexecinfo.

The assumption was wrong for FreeBSD (included since 2017) and for
musl-based systems (not in libc).

Also, remove INCLUDE_BACKTRACE and clean up a bit.

Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220271
Change-Id: Ib4b7fd4fe2cdf5f76babe47a21bd2990fcf42649
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127538
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit c1be12396088563ed77ed61e54fd4e153469701d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127767
Reviewed-by: Ismael Luceno 
Reviewed-by: Michael Stahl 

diff --git a/config_host.mk.in b/config_host.mk.in
index e17d3f73cf57..a38458b8c865 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -35,6 +35,8 @@ export AVAHI_CFLAGS=$(gb_SPACE)@AVAHI_CFLAGS@
 export AVAHI_LIBS=$(gb_SPACE)@AVAHI_LIBS@
 export LIBATOMIC_OPS_CFLAGS=$(gb_SPACE)@LIBATOMIC_OPS_CFLAGS@
 export LIBATOMIC_OPS_LIBS=$(gb_SPACE)@LIBATOMIC_OPS_LIBS@
+export BACKTRACE_CFLAGS=@BACKTRACE_CFLAGS@
+export BACKTRACE_LIBS=@BACKTRACE_LIBS@
 export BINDIR=@BINDIR@
 export BISON=@BISON@
 export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index e38e46386d83..0f610a5646bc 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -99,6 +99,10 @@
  */
 #define HAVE_FEATURE_BREAKPAD 0
 
+/* BACKTRACE - whether a GNU backtrace implementation is available.
+ */
+#define HAVE_FEATURE_BACKTRACE 0
+
 /*
  *  Whether OpenGL is enabled
  */
diff --git a/configure.ac b/configure.ac
index e1b75d2c10ad..aca958768d0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1334,6 +1334,20 @@ if test $_os != "WINNT"; then
 fi
 AC_SUBST(DLOPEN_LIBS)
 
+# Check for a (GNU) backtrace implementation
+AC_ARG_VAR([BACKTRACE_CFLAGS], [Compiler flags needed to use backtrace(3)])
+AC_ARG_VAR([BACKTRACE_LIBS], [Linker flags needed to use backtrace(3)])
+AS_IF([test "x$BACKTRACE_LIBS$BACKTRACE_CFLAGS" = x], [
+save_LIBS="$LIBS"
+AC_SEARCH_LIBS([backtrace], [libexecinfo],
+[case "$ac_cv_search_backtrace" in -l*) 
BACKTRACE_LIBS="$ac_cv_search_backtrace";; esac],
+[PKG_CHECK_MODULES([BACKTRACE], [libexecinfo], 
[ac_cv_search_backtrace=], [:])])
+LIBS="$save_LIBS"
+])
+AS_IF([test "x$ac_cv_search_backtrace" != xno ], [
+AC_DEFINE([HAVE_FEATURE_BACKTRACE])
+])
+
 dnl ===
 dnl Sanity checks for Emscripten SDK setup
 dnl ===
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index f7c7b3ab1764..03ca93f673b8 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_set_is_ure_library,sal))
 $(eval $(call gb_Library_set_include,sal,\
$$(INCLUDE) \
-I$(SRCDIR)/sal/inc \
+   $(BACKTRACE_CFLAGS) \
 ))
 
 $(eval $(call gb_Library_add_defs,sal,\
@@ -71,6 +72,7 @@ $(eval $(call gb_Library_add_libs,sal,\
$(if $(filter HAIKU,$(OS)), \
-lnetwork \
) \
+   $(BACKTRACE_LIBS) \
 ))
 
 ifeq ($(OS),MACOSX)
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c
index 26005f7715af..f7bd01c334aa 100644
--- a/sal/osl/unx/backtrace.c
+++ b/sal/osl/unx/backtrace.c
@@ -17,16 +17,19 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include "backtrace.h"
+
+#if ! HAVE_FEATURE_BACKTRACE /* no GNU backtrace implementation available */
+
 #include 
 
-#ifdef __sun
+#ifdef __sun /* Solaris */
 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include "backtrace.h"
 
 #if defined(SPARC)
 
@@ -140,7 +143,12 @@ void backtrace_symbols_fd( void **buffer, int size, int fd 
)
 #include 
 #include 
 #include 
-#include "backtrace.h"
+
+/* no frame.h on FreeBSD */
+struct frame {
+struct frame *fr_savfp;
+longfr_savpc;
+};
 
 #if defined(POWERPC) || defined(POWERPC64)
 
@@ -212,7 +220,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
 }
 }
 
-#elif !defined LINUX && !defined MACOSX && !defined IOS
+#else /* not GNU/BS

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

2022-01-06 Thread Jan Holesovsky (via logerrit)
 include/vcl/mtfxmldump.hxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit 9067b827f013caafc61ef3d0d63305572a320ee2
Author: Jan Holesovsky 
AuthorDate: Thu Jan 6 11:55:57 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 16:52:59 2022 +0100

Add a comment how to use MetafileXmlDump in the tests

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

diff --git a/include/vcl/mtfxmldump.hxx b/include/vcl/mtfxmldump.hxx
index edfcaff55e4d..3425bccb710f 100644
--- a/include/vcl/mtfxmldump.hxx
+++ b/include/vcl/mtfxmldump.hxx
@@ -24,6 +24,23 @@ class SvStream;
 
 enum class MetaActionType;
 
+/**
+ * Class that is used for testing of the decomposition into shapes.  Used like
+ * this:
+ *
+ *   std::shared_ptr xMetaFile = xDocShRef->GetPreviewMetaFile();
+ *   MetafileXmlDump dumper;
+ *   xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
+ *   CPPUNIT_ASSERT(pXmlDoc);
+ *
+ *   assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]", "x", 
"2093");
+ *
+ * To see the dump to be able to create the assertXPath() call, use:
+ *
+ *   xMetaFile->dumpAsXml();
+ *
+ * and check the output in /tmp/metafile.xml
+ */
 class VCL_DLLPUBLIC MetafileXmlDump final
 {
 o3tl::enumarray maFilter;


ESC meeting minutes: 2022-01-06

2022-01-06 Thread Miklos Vajna

* Present:
+ Stephan, Michael W, Michael S, Jan-Marek, Hossein, Heiko, Caolan, Eike, 
Olivier, Miklos, Thorsten, Kendy

* Completed Action Items:
+ Release note that Calc's quick filter searches now (>=7.3) for values 
instead of formulas (Heiko)

* Pending Action Items:
+ None

* Release Engineering update (Cloph)
+ 7.2.5 is now out
+ 7.3 status: RC2 next week (+ creating the libreoffice-7-3-0 branch)
  + late feature request: re-enable inline fieldmark support
(https://gerrit.libreoffice.org/c/core/+/125558) (Thorsten)
+ this is now in, hoping to fix 2 more related bugs (Michael S)
+ Remotes: Android, iOS
+ Android viewer

* Documentation (Olivier)
+ New Help
  + Some refactor/simplification in CSS
+ HelpContent2
  + Many updates and closing bugs (ohallot, R. Lima, S Horacek, A. 
Barrientos)
 + Typos reported by translators.
  + Refactoring for readability (Johnny_m)
+ Guides
  + Published Writer Guide for macOS
 + based on the content of the shared guide, just custom keyboard, etc.
 + Jean H. Weber
  + Published draw guide 7.2 !
 + Peter Schofield
 + The Guides library is now in synch with the software)
+ Bugzilla Documentation statistics
243(243) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 19(11)41(6) 90(5)  318(0)
 commented 58(38)   126(32)   353(12)1644(27)
  resolved  7(2) 20(2) 46(4)  194(1)
+ top 10 contributors:
  Rafael Lima made 44 changes in 1 month, and 290 changes in 1 year
  Olivier Hallot made 28 changes in 1 month, and 502 changes in 1 year
  Ilmari Lauhakangas made 17 changes in 1 month, and 89 changes in 1 
year
  Nabet, Julien made 17 changes in 1 month, and 51 changes in 1 year
  Foote, V Stuart made 13 changes in 1 month, and 69 changes in 1 year
  gmarco made 9 changes in 1 month, and 16 changes in 1 year
  Kaganski, Mike made 8 changes in 1 month, and 91 changes in 1 year
  Dieter made 6 changes in 1 month, and 120 changes in 1 year
  Alain Romedenne made 5 changes in 1 month, and 27 changes in 1 year
  Juan made 4 changes in 1 month, and 4 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
258(258) (topicUI) bugs open, 156(156) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month3 months   12 months
 added  2(-4) 8(-7) 26(-6)  86(-5)
 commented 55(25)   227(-56)   605(-19)   3038(-24)
   removed  0(0)  4(0)   7(0)   36(0)
  resolved  4(3) 26(-5) 75(-3) 414(1)
+ top 10 contributors:
  Heiko Tietze made 125 changes in 1 month, and 2044 changes in 1 year
  Foote, V Stuart made 41 changes in 1 month, and 541 changes in 1 year
  Kaganski, Mike made 28 changes in 1 month, and 179 changes in 1 year
  Dieter made 26 changes in 1 month, and 280 changes in 1 year
  MarjaE made 19 changes in 1 month, and 19 changes in 1 year
  Stéphane Guillou made 19 changes in 1 month, and 72 changes in 1 year
  McNamara, Caolán made 12 changes in 1 month, and 28 changes in 1 year
  Thomas Lendo made 12 changes in 1 month, and 36 changes in 1 year
  jsv made 9 changes in 1 month, and 10 changes in 1 year
  Henschel, Regina made 9 changes in 1 month, and 78 changes in 1 year

+ 14 new tickets with needsUXEval Dec/16-Jan/05
  [Bug 146593] [Discussion] Enforce style details for all styles
  [Bug 146545] [Enhancement] Add "Colibre (dark)" icon style
  [Bug 146552] DRAW: Export Functionality (deprecated efficiency)
  [Bug 146493] "Insert > Special Character" and "Insert > Formatting Mark"
   should be renamed
  [Bug 146409] customize keyboard simpler
   -> [Bug 146386] Drop support for FTP
+ https://bugs.documentfoundation.org/show_bug.cgi?id=146386
+ any objections for the removal? (Heiko)
+ supporting it (Thorsten)
  + browsers already dropped it
  + non-encrypted
  + helps maintenance
+ ftp can be used with tls, but our code doesn't support that (Michael 
S)
  + not much value
+ fine with the removal (Stephan)
AI: update the bug (Heiko)
  [Bug 146380] (Enhancement) More View Options
  [Bug 105985] Make Template Manager's directory scanning smarter
  [Bug 146369] An extra word in the tooltip when hovering over a footnote
  [Bug 146097] RED CROSS -- search toolbar close button's RED color is 
ambiguous
  [Bug 146356] ODT: No easy way to create an empty paragraph before Table of
   Content if document starts with table of content
  [Bug 146033] Output to HTML: Field shadings shouldn't be part of

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

2022-01-06 Thread Noel Grandin (via logerrit)
 chart2/source/view/main/ChartView.cxx |   34 ++
 1 file changed, 14 insertions(+), 20 deletions(-)

New commits:
commit ab07c078d14970db934f5a27cfdb6c2e5413738a
Author: Noel Grandin 
AuthorDate: Wed Jan 5 21:22:12 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jan 6 15:49:26 2022 +0100

speed up lcl_removeEmptyGroupShapes

by bypassing the SvxShape layer, which adds a bunch of unnecessary
overhead for this situation

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

diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index 0f023d6e4358..f1a3e32e760e 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2322,33 +2322,27 @@ void formatPage(
 }
 }
 
-void lcl_removeEmptyGroupShapes( const Reference< drawing::XShapes>& xParent )
+void lcl_removeEmptyGroupShapes( SdrObject& rParent )
 {
-if(!xParent.is())
+SdrObjList* pObjList = rParent.getChildrenOfSdrObject();
+if (!pObjList || pObjList->GetObjCount() == 0)
 return;
-Reference< drawing::XShapeGroup > xParentGroup( xParent, uno::UNO_QUERY );
-if( !xParentGroup.is() )
-{
-Reference< drawing::XDrawPage > xPage( xParent, uno::UNO_QUERY );
-if( !xPage.is() )
-return;
-}
 
 //iterate from back!
-for( sal_Int32 nN = xParent->getCount(); nN--; )
+for(auto nIdx = static_cast(pObjList->GetObjCount() - 1); nIdx 
>= 0; --nIdx)
 {
-uno::Any aAny = xParent->getByIndex( nN );
-Reference< drawing::XShapes> xShapes;
-if( aAny >>= xShapes )
-lcl_removeEmptyGroupShapes( xShapes );
-if( xShapes.is() && xShapes->getCount()==0 )
+SdrObject* pChildSdrObject = pObjList->GetObj(nIdx);
+SdrObjList* pChildObjList = pChildSdrObject->getChildrenOfSdrObject();
+if (!pChildObjList)
+continue;
+if (pChildObjList->GetObjCount() == 0)
 {
 //remove empty group shape
-Reference< drawing::XShapeGroup > xGroup( xShapes, uno::UNO_QUERY 
);
-Reference< drawing::XShape > xShape( xShapes, uno::UNO_QUERY );
-if( xGroup.is() )
-xParent->remove( xShape );
+SdrObject* pRemoved = pObjList->NbcRemoveObject(nIdx);
+SdrObject::Free( pRemoved );
 }
+else
+lcl_removeEmptyGroupShapes(*pChildSdrObject);
 }
 }
 
@@ -2983,7 +2977,7 @@ void ChartView::createShapes2D( const awt::Size& 
rPageSize )
 }
 
 //cleanup: remove all empty group shapes to avoid grey border lines:
-lcl_removeEmptyGroupShapes( mxRootShape );
+lcl_removeEmptyGroupShapes( *mxRootShape->GetSdrObject() );
 
 if(maTimeBased.bTimeBased && maTimeBased.nFrame % 60 == 0)
 {


Re: Build fails on Loongnix-Server Linux (loongarch64 CPU)

2022-01-06 Thread Kevin Suo

  
  
I see that file, thanks. I will translate and forward this to him
  and wait for his further feedback.
在 2022/1/6 22:34, Caolán McNamara 写道:


  On Thu, 2022-01-06 at 22:08 +0800, Kevin Suo wrote:

  

  so to debug why that might not be happening I'd look into
config.log



Do you mean the terminal output of "./autogen.sh"?

  
  
no, literally the file named config.log that should have been generated
in the dir that configure/autogen.sh was run in.


  




Re: Build fails on Loongnix-Server Linux (loongarch64 CPU)

2022-01-06 Thread Caolán McNamara
On Thu, 2022-01-06 at 22:08 +0800, Kevin Suo wrote:
> > so to debug why that might not be happening I'd look into
> > config.log
> 
> Do you mean the terminal output of "./autogen.sh"?

no, literally the file named config.log that should have been generated
in the dir that configure/autogen.sh was run in.



[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 27775987a3355769cd8f4ca5368b9ba5731f67d5
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 15:32:13 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 6 15:32:13 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 94cb6f9bbb1410fd53c4160c76d8b77896572258
  - typo

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

diff --git a/helpcontent2 b/helpcontent2
index 2e2c9a736ac6..94cb6f9bbb14 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2e2c9a736ac622fcf032094ede32709dcf62f1ae
+Subproject commit 94cb6f9bbb1410fd53c4160c76d8b77896572258


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

2022-01-06 Thread Olivier Hallot (via logerrit)
 source/text/sbasic/shared/03/sf_calc.xhp  |2 +-
 source/text/sbasic/shared/03/sf_popupmenu.xhp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 94cb6f9bbb1410fd53c4160c76d8b77896572258
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 15:23:07 2022 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 6 15:32:11 2022 +0100

typo

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

diff --git a/source/text/sbasic/shared/03/sf_calc.xhp 
b/source/text/sbasic/shared/03/sf_calc.xhp
index 718114b90..b2c916e1c 100644
--- a/source/text/sbasic/shared/03/sf_calc.xhp
+++ b/source/text/sbasic/shared/03/sf_calc.xhp
@@ -635,7 +635,7 @@
   If only 
sheetname is specified, an zero-based array of strings 
containing the names of all charts is returned.
 
 
-  If a 
chartname is provided, than a single object corresponding to 
the desired chart is returned. The specified chart must exist.
+  If a 
chartname is provided, then a single object corresponding to 
the desired chart is returned. The specified chart must exist.
 
   
   
diff --git a/source/text/sbasic/shared/03/sf_popupmenu.xhp 
b/source/text/sbasic/shared/03/sf_popupmenu.xhp
index 05c166888..c99df69ee 100644
--- a/source/text/sbasic/shared/03/sf_popupmenu.xhp
+++ b/source/text/sbasic/shared/03/sf_popupmenu.xhp
@@ -297,7 +297,7 @@
 
 Execute
 Displays the popup 
menu and waits for a user action. Returns the item clicked by the 
user.
-If the user clicks 
outside the popup menu ou presses the Esc key, then no item 
is selected. In such cases, the returned value depends on the 
returnid parameter. If returnid = True 
and no item is selected, then the value 0 (zero) is returned. Otherwise an 
empty string "" is returned.
+If the user clicks 
outside the popup menu or presses the Esc key, then no item 
is selected. In such cases, the returned value depends on the 
returnid parameter. If returnid = True 
and no item is selected, then the value 0 (zero) is returned. Otherwise an 
empty string "" is returned.
 
 
   svc.Execute(opt returnid: bool): any


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 6d2dbdde27aee8c05898c656823f4bedd1b3afee
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 15:18:48 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 6 15:18:48 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 2e2c9a736ac622fcf032094ede32709dcf62f1ae
  - Typo

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

diff --git a/helpcontent2 b/helpcontent2
index 4ce4649ea3b2..2e2c9a736ac6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 4ce4649ea3b21406c4e95e81930097968cb95cf6
+Subproject commit 2e2c9a736ac622fcf032094ede32709dcf62f1ae


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

2022-01-06 Thread Olivier Hallot (via logerrit)
 source/text/sbasic/shared/calc_functions.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2e2c9a736ac622fcf032094ede32709dcf62f1ae
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 15:14:51 2022 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 6 15:18:46 2022 +0100

Typo

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

diff --git a/source/text/sbasic/shared/calc_functions.xhp 
b/source/text/sbasic/shared/calc_functions.xhp
index 7ac121088..4d4d7b97e 100644
--- a/source/text/sbasic/shared/calc_functions.xhp
+++ b/source/text/sbasic/shared/calc_functions.xhp
@@ -39,7 +39,7 @@
 
MyVlook = oService.callFunction("VLOOKUP", Array(Lookup, DataArray, Index, 
SortedRangeLookup))
 End 
Function
   
-  The macro below 
presents an example of how the MyVlook function can be 
called. If first creates a 5-by-2 data array and then calls the function 
MyVlook and shows the returned value using 
MsgBox.
+  The macro below 
presents an example of how the MyVlook function can be 
called. It first creates a 5-by-2 data array and then calls the function 
MyVlook and shows the returned value using 
MsgBox.
   
 Sub 
CallingMyVlook()
 ' Creates a 5 by 
2 array and fills it with data


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

2022-01-06 Thread Gülşah Köse (via logerrit)
 sd/qa/unit/data/pptx/tdf135843.pptx|binary
 sd/qa/unit/import-tests.cxx|   27 ++-
 svx/source/table/viewcontactoftableobj.cxx |4 ++--
 3 files changed, 28 insertions(+), 3 deletions(-)

New commits:
commit fa5ab8aa5d88e7128015127af75980a65f945cbb
Author: Gülşah Köse 
AuthorDate: Wed Jan 5 13:03:14 2022 +0300
Commit: Gülşah Köse 
CommitDate: Thu Jan 6 15:16:28 2022 +0100

tdf#135843 Fix the missing border handling

Adding +1 at that stage causes indexoutofbounds.
But never throws that exception and tries to pull
empty cell style instead. As a result we can not
see the border. Actually no idea why +1 used here.

Change-Id: Id54ba6445d022540173af3bbf5d679b7edefc55b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127990
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/sd/qa/unit/data/pptx/tdf135843.pptx 
b/sd/qa/unit/data/pptx/tdf135843.pptx
new file mode 100644
index ..0a5dcb334b0c
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf135843.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 303ab76bed7b..5035fa6cedb8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -101,6 +101,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -117,7 +118,7 @@ static std::ostream& operator<<(std::ostream& rStrm, const 
uno::Reference& xR
 
 
 /// Impress import filters tests.
-class SdImportTest : public SdModelTestBase
+class SdImportTest : public SdModelTestBaseXML
 {
 public:
 virtual void setUp() override;
@@ -187,6 +188,7 @@ public:
 void testTdf93124();
 void testTdf99729();
 void testTdf89927();
+void testTdf135843();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -255,6 +257,7 @@ public:
 CPPUNIT_TEST(testTdf93124);
 CPPUNIT_TEST(testTdf99729);
 CPPUNIT_TEST(testTdf89927);
+CPPUNIT_TEST(testTdf135843);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1958,6 +1961,28 @@ void SdImportTest::testTdf89927()
 xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf135843()
+{
+sd::DrawDocShellRef xDocShRef = loadURL( 
m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf135843.pptx"), PPTX );
+
+std::shared_ptr xMetaFile = xDocShRef->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+
+xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+
+// Without the fix, the test fails with:
+// - Expected: 21165
+// - Actual  : 4218
+assertXPath(pXmlDoc, 
"/metafile/push[1]/push[1]/push[5]/polyline[1]/point[1]", "x", "21165");
+assertXPath(pXmlDoc, 
"/metafile/push[1]/push[1]/push[5]/polyline[1]/point[1]", "y", "3866");
+
+assertXPath(pXmlDoc, 
"/metafile/push[1]/push[1]/push[5]/polyline[1]/point[2]", "x", "21165");
+assertXPath(pXmlDoc, 
"/metafile/push[1]/push[1]/push[5]/polyline[1]/point[2]", "y", "5956");
+
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/table/viewcontactoftableobj.cxx 
b/svx/source/table/viewcontactoftableobj.cxx
index 6419c5057dab..932844fe98d7 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -259,9 +259,9 @@ namespace sdr::contact
 {
 // copy styles for current cell to 
CellBorderArray for primitive creation
 aArray.SetCellStyleLeft(aCellPos.mnCol, 
aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, 
false, nColCount, nRowCount, bIsRTL));
-aArray.SetCellStyleRight(aCellPos.mnCol, 
aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol + 1, 
aCellPos.mnRow, false, nColCount, nRowCount, bIsRTL));
+aArray.SetCellStyleRight(aCellPos.mnCol, 
aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, 
false, nColCount, nRowCount, bIsRTL));
 aArray.SetCellStyleTop(aCellPos.mnCol, 
aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, 
true, nColCount, nRowCount, bIsRTL));
-aArray.SetCellStyleBottom(aCellPos.mnCol, 
aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow 
+ 1, true, nColCount, nRowCount, bIsRTL));
+aArray.SetCellStyleBottom(aCellPos.mnCol, 
aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, 
true, nColCount, nRowCount, bIsRTL));
 
 // ignore merged cells (all except the 
top-left of a merged cell)
 if(!xCurrentCell->isMerged())


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

2022-01-06 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf146491.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx   |   11 ++-
 sw/source/filter/ww8/wrtw8sty.cxx   |7 ++-
 3 files changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 42e7dc75363ee7f326f7f9e2b4476e55300f1f7a
Author: Justin Luth 
AuthorDate: Thu Jan 6 13:05:34 2022 +0200
Commit: Justin Luth 
CommitDate: Thu Jan 6 15:14:35 2022 +0100

tdf146491 Revert "tdf121374 ooxmlexport: export H/F to def...

...default section"

This reverts LO 6.3 commit e6f5dec3250b4d26bc4bb485fad2100ee29a3528.
Something else must have changed because it doesn't seem to
be needed anymore.

It wouldn't be terrible to duplicate headers/footers
unnecessarily,

One side effect is that page styles could be
duplicated multiple times if there were many
non-overlapping sections. If the H/F contained images,
that could bloat the filesize,
or in this specific bug, it was duplicating fields.

Since it doesn't appear to be necessary anymore,
let's just revert it.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf146491.odt 
b/sw/qa/extras/ooxmlexport/data/tdf146491.odt
new file mode 100644
index ..2ee08f1d3e9b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf146491.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index d46344fe53cf..ef128fb59eef 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1289,7 +1289,16 @@ DECLARE_OOXMLEXPORT_TEST(testSectionHeader, 
"sectionprot.odt")
 if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
 {
 // this test must not be zero
-assertXPath(pXmlDoc, "//w:headerReference", 2);
+assertXPath(pXmlDoc, "//w:headerReference", 1);
+}
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf146491, "tdf146491.odt")
+{
+if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
+{
+// This was 12 - a page style was unnecessarily created for every 
section.
+assertXPath(pXmlDoc, "//w:footerReference", 1);
 }
 }
 
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 4f121ccd7cd9..e64f16f0ea97 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1639,7 +1639,6 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 */
 sal_uInt8 nBreakCode = 2;// default start new page
 bool bOutPgDscSet = true, bLeftRightPgChain = false, bOutputStyleItemSet = 
false;
-bool bEnsureHeaderFooterWritten = rSepInfo.pSectionFormat && 
rSepInfo.bIsFirstParagraph;
 const SwFrameFormat* pPdFormat = &pPd->GetMaster();
 bool bUsePrevSectionNextStyle = false;
 if ( rSepInfo.pSectionFormat )
@@ -1657,9 +1656,7 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 }
 }
 
-if ( reinterpret_cast(sal_IntPtr(-1)) == 
rSepInfo.pSectionFormat )
-bEnsureHeaderFooterWritten |= !rSepInfo.pPDNd && GetExportFormat() 
!= ExportFormat::RTF;
-else
+if (reinterpret_cast(sal_IntPtr(-1)) != 
rSepInfo.pSectionFormat)
 {
 if ( nBreakCode == 0 )
 bOutPgDscSet = false;
@@ -1893,7 +1890,7 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 }
 
 // Ensure that headers are written if section is first paragraph
-if ( nBreakCode != 0 || bEnsureHeaderFooterWritten )
+if (nBreakCode != 0 || (rSepInfo.pSectionFormat && 
rSepInfo.bIsFirstParagraph))
 {
 if ( titlePage )
 {


Re: Build fails on Loongnix-Server Linux (loongarch64 CPU)

2022-01-06 Thread Kevin Suo
> so to debug why that might not be happening I'd look into config.log

Do you mean the terminal output of "./autogen.sh"?

Kevin Suo


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 5 commits - connectivity/source dtrans/source external/gpgmepp external/libassuan external/libgpg-error include/vcl sc/source sd/sou

2022-01-06 Thread Mike Kaganski (via logerrit)
 connectivity/source/parse/sqlbison.y  |6 +
 dtrans/source/win32/ftransl/ftransl.cxx   |2 -
 external/gpgmepp/ExternalProject_gpgmepp.mk   |2 -
 external/libassuan/ExternalProject_libassuan.mk   |3 +-
 external/libgpg-error/ExternalProject_libgpg-error.mk |2 -
 include/vcl/transfer.hxx  |2 -
 sc/source/ui/app/transobj.cxx |2 -
 sd/source/ui/app/sdxfer.cxx   |2 -
 sot/source/base/exchange.cxx  |4 +--
 svtools/source/misc/stringtransfer.cxx|2 -
 svx/source/fmcomp/dbaexchange.cxx |4 +--
 svx/source/fmcomp/xmlexchg.cxx|2 -
 svx/source/gallery2/galmisc.cxx   |2 -
 vcl/source/treelist/transfer.cxx  |   19 +-
 14 files changed, 23 insertions(+), 31 deletions(-)

New commits:
commit 3b0933520c6b0bc59ae2ab540222b3f772265726
Author: Mike Kaganski 
AuthorDate: Wed Dec 1 12:29:37 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jan 6 16:03:21 2022 +0300

tdf#145964 related: also drop special-casing in 
TransferableHelper::SetString

Follow-up to commit 5fb9f4ffa9284c7248e2e82210506babaad4044d

Change-Id: I46d5ea404f77ac5ff67b6ee6a42afee13274a481
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126174
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126181
Tested-by: Jenkins

diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index 2ec7c340b69f..90ab70c21a1e 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -230,7 +230,7 @@ protected:
 voidClearFormats();
 
 boolSetAny( const css::uno::Any& rAny );
-boolSetString( const OUString& rString, const 
css::datatransfer::DataFlavor& rFlavor );
+boolSetString( const OUString& rString );
 boolSetBitmapEx( const BitmapEx& rBitmap, const 
css::datatransfer::DataFlavor& rFlavor );
 boolSetGDIMetaFile( const GDIMetaFile& rMtf );
 boolSetGraphic( const Graphic& rGraphic );
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 5a81a24a1fa4..616d37aed594 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -377,7 +377,7 @@ bool ScTransferObj::GetData( const 
datatransfer::DataFlavor& rFlavor, const OUSt
 {
 OUString aString;
 if ( aObj.ExportString( aString, nFormat ) )
-bOK = SetString( aString, rFlavor );
+bOK = SetString( aString );
 }
 else if ( rFlavor.DataType.equals( cppu::UnoType>::get() ) )
 {
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 9ce97f817e73..e501d750c008 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -520,7 +520,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, 
const OUString& rDestDo
 }
 else if( ( nFormat == SotClipboardFormatId::STRING ) && mpBookmark )
 {
-bOK = SetString( mpBookmark->GetURL(), rFlavor );
+bOK = SetString( mpBookmark->GetURL() );
 }
 else if( ( nFormat == SotClipboardFormatId::SVXB ) && mpGraphic )
 {
diff --git a/svtools/source/misc/stringtransfer.cxx 
b/svtools/source/misc/stringtransfer.cxx
index 14e805fc60c9..d56f2a52b720 100644
--- a/svtools/source/misc/stringtransfer.cxx
+++ b/svtools/source/misc/stringtransfer.cxx
@@ -52,7 +52,7 @@ namespace svt
 {
 SotClipboardFormatId nFormat = SotExchange::GetFormat( _rFlavor );
 if (SotClipboardFormatId::STRING == nFormat)
-return SetString( m_sContent, _rFlavor );
+return SetString( m_sContent );
 
 return false;
 }
diff --git a/svx/source/fmcomp/dbaexchange.cxx 
b/svx/source/fmcomp/dbaexchange.cxx
index b11e9770b040..46b878146984 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -218,7 +218,7 @@ namespace svx
 {
 case SotClipboardFormatId::SBA_FIELDDATAEXCHANGE:
 case SotClipboardFormatId::SBA_CTRLDATAEXCHANGE:
-return SetString(m_sCompatibleFormat, _rFlavor);
+return SetString(m_sCompatibleFormat);
 default: break;
 }
 if (nFormatId == getDescriptorFormatId())
@@ -431,7 +431,7 @@ namespace svx
 return SetAny( 
makeAny(m_aDescriptor.createPropertyValueSequence()) );
 
 case SotClipboardFormatId::SBA_DATAEXCHANGE:
-return SetString(m_sCompatibleObjectDescription, rFlavor);
+return SetString(m_sCompatibleObjectDescription

[Libreoffice-commits] core.git: download.lst external/freetype

2022-01-06 Thread Caolán McNamara (via logerrit)
 download.lst |4 +-
 external/freetype/freetype-2.6.5.patch.1 |   45 +++
 2 files changed, 24 insertions(+), 25 deletions(-)

New commits:
commit 72dfa7ec4c3cae074c9769cc99fe1b7eb029de43
Author: Caolán McNamara 
AuthorDate: Thu Jan 6 09:09:53 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 6 15:00:58 2022 +0100

upgrade freetype to latest release

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

diff --git a/download.lst b/download.lst
index 47db7add2e70..06126a0bc290 100644
--- a/download.lst
+++ b/download.lst
@@ -92,8 +92,8 @@ export FONT_SCHEHERAZADE_SHA256SUM := 
251c8817ceb87d9b661ce1d5b49e732a0116add10a
 export FONT_SCHEHERAZADE_TARBALL := Scheherazade-2.100.zip
 export FREEHAND_SHA256SUM := 
0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac
 export FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz
-export FREETYPE_SHA256SUM := 
8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7
-export FREETYPE_TARBALL := freetype-2.11.0.tar.xz
+export FREETYPE_SHA256SUM := 
ae7cfda88429c97a7ae63b7d01ab398076c3b67182e960e5684050f2c5c8
+export FREETYPE_TARBALL := freetype-2.11.1.tar.xz
 export GLM_SHA256SUM := 
6bba5f032bed47c73ad9397f2313b9acbfb56253d0d0576b5873d3dcb25e99ad
 export GLM_TARBALL := glm-0.9.9.8.zip
 export GPGME_SHA256SUM := 
6c8cc4aedb10d5d4c905894ba1d850544619ee765606ac43df7405865de29ed0
diff --git a/external/freetype/freetype-2.6.5.patch.1 
b/external/freetype/freetype-2.6.5.patch.1
index faae4bafddd4..c10c0bb38ea8 100644
--- a/external/freetype/freetype-2.6.5.patch.1
+++ b/external/freetype/freetype-2.6.5.patch.1
@@ -1,7 +1,7 @@
 diff -up freetype/builds/unix/configure.dt freetype/builds/unix/configure
 --- freetype/builds/unix/configure.dt  2017-02-01 22:14:45.206257952 +0100
 +++ freetype/builds/unix/configure 2017-02-01 22:16:31.076183707 +0100
-@@ -8887,7 +8887,7 @@
+@@ -9386,7 +9386,7 @@
case $host_cpu in
powerpc)
  # see comment about AmigaOS4 .so support
@@ -10,7 +10,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
  archive_expsym_cmds=''
  ;;
m68k)
-@@ -8903,7 +8903,7 @@
+@@ -9402,7 +9402,7 @@
allow_undefined_flag=unsupported
# Joseph Beckenbach  says some releases of gcc
# support --undefined.  This deserves some investigation.  FIXME
@@ -19,7 +19,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
else
ld_shlibs=no
fi
-@@ -8937,7 +8937,7 @@
+@@ -9436,7 +9436,7 @@
;;
  
  haiku*)
@@ -28,7 +28,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
link_all_deplibs=yes
;;
  
-@@ -9032,13 +9032,13 @@
+@@ -9531,13 +9531,13 @@
*Sun\ F*)   # Sun Fortran 8.3
  tmp_sharedflag='-G' ;;
esac
@@ -44,7 +44,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
  fi
  
case $cc_basename in
-@@ -9068,8 +9068,8 @@
+@@ -9567,8 +9567,8 @@
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -55,7 +55,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
fi
;;
  
-@@ -9087,8 +9087,8 @@
+@@ -9586,8 +9586,8 @@
  
  _LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 
then
@@ -66,7 +66,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
else
ld_shlibs=no
fi
-@@ -9116,8 +9116,8 @@
+@@ -9615,8 +9615,8 @@
  # requires that you compile everything twice, which is a pain.
  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 
then
hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
@@ -77,7 +77,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
  else
ld_shlibs=no
  fi
-@@ -9134,8 +9134,8 @@
+@@ -9633,8 +9633,8 @@
  
  *)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 
then
@@ -88,7 +88,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
else
ld_shlibs=no
fi
-@@ -9434,7 +9434,7 @@
+@@ -9937,7 +9937,7 @@
case $host_cpu in
powerpc)
  # see comment about AmigaOS4 .so support
@@ -97,7 +97,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
  archive_expsym_cmds=''
  ;;
m68k)
-@@ -9703,7 +9703,7 @@
+@@ -10207,7 +10207,7 @@
  
  irix5* | irix6* | nonstopux*)
if test yes = "$GCC"; then
@@ -106,16 +106,16 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
# Try to use the -exported_symbol ld op

[Libreoffice-commits] core.git: bridges/source config_host.mk.in configure.ac solenv/gbuild

2022-01-06 Thread Caolán McNamara (via logerrit)
 bridges/source/cpp_uno/gcc3_linux_intel/call.s  |   16 
 bridges/source/cpp_uno/gcc3_linux_x86-64/call.s |   19 +++
 config_host.mk.in   |1 +
 configure.ac|   14 ++
 solenv/gbuild/platform/com_GCC_class.mk |1 +
 5 files changed, 51 insertions(+)

New commits:
commit af55dc3891f7950d392175004b2090cb0e54828e
Author: Caolán McNamara 
AuthorDate: Wed Dec 15 12:46:24 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 6 14:56:27 2022 +0100

annocheck warning about missing .note.gnu.property section

copy and paste recommendation from:
https://sourceware.org/annobin/annobin.html/Test-cf-protection.html

and adapt like:

https://github.com/openssl/openssl/commit/51994e505dbb1cd0dd76869ec962e2948b77b585
where https://bugs.ruby-lang.org/attachments/8962 is similar

Intel docs have "The ENDBR32 and ENDBR64 (collectively ENDBRANCH) are
two new instructions that are used to mark valid indirect CALL/JMP
target locations in the program."

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

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/call.s 
b/bridges/source/cpp_uno/gcc3_linux_intel/call.s
index 6be583247733..0a5870defcf3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/call.s
@@ -290,3 +290,19 @@ privateSnippetExecutorClass:
 .align 4
 .LEFDEc:
 .section .note.GNU-stack,"",@progbits
+.section .note.gnu.property,"a"
+.p2align 2
+.long 1f - 0f
+.long 4f - 1f
+.long 5
+0:
+.string "GNU"
+1:
+.p2align 2
+.long 0xc002
+.long 3f - 2f
+2:
+.long 0x3
+3:
+.p2align 2
+4:
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
index 53bfea8b254f..e7ff106244a8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
@@ -22,6 +22,9 @@
.type   privateSnippetExecutor, @function
 privateSnippetExecutor:
 .LFB3:
+#if defined(END_BRANCH_INS_SUPPORT)
+   endbr64
+#endif
pushq   %rbp
 .LCFI0:
movq%rsp, %rbp
@@ -121,3 +124,19 @@ privateSnippetExecutor:
.align 8
 .LEFDE1:
.section.note.GNU-stack,"",@progbits
+   .section.note.gnu.property,"a"
+   .p2align 3
+   .long1f - 0f
+   .long4f - 1f
+   .long5
+0:
+   .string  "GNU"
+1:
+   .p2align 3
+   .long0xc002
+   .long3f - 2f
+2:
+   .long0x3
+3:
+   .p2align 3
+4:
diff --git a/config_host.mk.in b/config_host.mk.in
index f787994bd840..8b4f723399ab 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -266,6 +266,7 @@ export GTK4_CFLAGS=$(gb_SPACE)@GTK4_CFLAGS@
 export GTK4_LIBS=$(gb_SPACE)@GTK4_LIBS@
 export USING_X11=@USING_X11@
 export HAMCREST_JAR=@HAMCREST_JAR@
+export HAVE_ASM_END_BRANCH_INS_SUPPORT=@HAVE_ASM_END_BRANCH_INS_SUPPORT@
 export 
HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=@HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED@
 export HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW=@HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW@
 export 
HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=@HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR@
diff --git a/configure.ac b/configure.ac
index 9ef7dbe9c7b6..0d3dec0eeaf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8040,6 +8040,20 @@ _ACEOF
 
 CPPFLAGS="$save_CPPFLAGS"
 
+AC_MSG_CHECKING([if CET endbranch is recognized])
+cat > endbr.s <<_ACEOF
+endbr32
+_ACEOF
+HAVE_ASM_END_BRANCH_INS_SUPPORT=
+if $CXX -c endbr.s -o endbr.o >/dev/null 2>&5; then
+AC_MSG_RESULT([yes])
+HAVE_ASM_END_BRANCH_INS_SUPPORT=TRUE
+else
+AC_MSG_RESULT([no])
+fi
+rm -f endbr.s endbr.o
+AC_SUBST(HAVE_ASM_END_BRANCH_INS_SUPPORT)
+
 AC_LANG_POP([C++])
 fi
 
diff --git a/solenv/gbuild/platform/com_GCC_class.mk 
b/solenv/gbuild/platform/com_GCC_class.mk
index 74f744658e15..d34464030d5e 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -44,6 +44,7 @@ $(call gb_Helper_abbreviate_dirs,\
-x assembler-with-cpp \
$(T_LTOFLAGS) \
$(gb_AFLAGS) \
+   $(if 
$(HAVE_ASM_END_BRANCH_INS_SUPPORT),-DEND_BRANCH_INS_SUPPORT) \
-c $(3) \
-o $(1)) \
$(INCLUDE) && \


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit a65c1e2d81b12c8ce96fa5cddcf11fabf7bbf709
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 10:45:04 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Thu Jan 6 14:45:04 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 4ce4649ea3b21406c4e95e81930097968cb95cf6
  - tdf#120247 Update CONVERT() Calc funct  wrt ODFF1.3

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

diff --git a/helpcontent2 b/helpcontent2
index 8d3da999f45d..4ce4649ea3b2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8d3da999f45d4db4f79e269baae9f07d48c3e7b8
+Subproject commit 4ce4649ea3b21406c4e95e81930097968cb95cf6


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

2022-01-06 Thread Olivier Hallot (via logerrit)
 source/text/scalc/01/func_convert.xhp |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 4ce4649ea3b21406c4e95e81930097968cb95cf6
Author: Olivier Hallot 
AuthorDate: Tue Jan 4 11:34:34 2022 -0300
Commit: Olivier Hallot 
CommitDate: Thu Jan 6 14:45:02 2022 +0100

tdf#120247 Update CONVERT() Calc funct  wrt ODFF1.3

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

diff --git a/source/text/scalc/01/func_convert.xhp 
b/source/text/scalc/01/func_convert.xhp
index 382c82cad..c422ba5bd 100644
--- a/source/text/scalc/01/func_convert.xhp
+++ b/source/text/scalc/01/func_convert.xhp
@@ -862,7 +862,7 @@
 
 
   
-"atm" ; "at"
+  "atm" ; ("at")(1)
   
   
 Standard 
atmosphere
@@ -916,6 +916,7 @@
   
 
   
+  1 - The "at" unit is deprecated. Use 
"atm" instead.
 
   Speed
   
@@ -1208,7 +1209,7 @@
 
 
   
-"Glass"
+  "Glass"(2)
   
   
 Australian 
glass (200 milliliters)
@@ -1230,7 +1231,7 @@
 
 
   
-"Humpen"
+"Humpen"(2)
   
   
 Humpen (500 
milliliters)
@@ -1296,7 +1297,7 @@
 
 
   
-"Middy"
+"Middy"(2)
   
   
 Australian 
middy (285 milliliters)
@@ -1384,7 +1385,7 @@
 
 
   
-"Schooner"
+"Schooner"(2)
   
   
 Australian 
schooner (425 milliliters)
@@ -1395,7 +1396,7 @@
 
 
   
-"Sixpack"
+"Sixpack"(2)
   
   
 Six pack (2 
liters)
@@ -1482,7 +1483,7 @@
   
 
   
-
+  2 - These units are not part of the 
Open Document Format for Office Applications (OpenDocument) Version 1.3. 
Part 4: Recalculated Formula (OpenFormula) Format standard for the 
CONVERT function. They are preserved for backward compatibility.
   
 Prefixes
   


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

2022-01-06 Thread Mike Kaganski (via logerrit)
 chart2/source/controller/dialogs/DialogModel.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0bc5584ef296683c015357232d48180b85f8baac
Author: Mike Kaganski 
AuthorDate: Thu Jan 6 12:22:55 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jan 6 14:05:29 2022 +0100

Add 'reference' to the iterator_traits, needed by LegacyIterator reqs

This addressed a failure with VS2022 Version 17.1.0 Preview 2.0:


C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(1152):
 error C2794: 'reference': is not a member of any direct or in direct base 
class of 
'std::iterator_traits<`anonymous-namespace'::lcl_DataSeriesContainerAppend>'

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932):
 note: see reference to alias template instantiation 
'std::_Iter_ref_t<`anonymous-namespace'::lcl_DataSeriesContainerAppend>' being 
compiled

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3992):
 note: see reference to variable template 'const bool 
_Iterator_is_volatile<`anonymous namespace'::lcl_DataSeriesContainerAppend>' 
being compiled

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(4048):
 note: see reference to function template instantiation '_OutIt 
std::_Copy_unchecked*,_OutIt>(_InIt,_InIt,_OutIt)'
 being compiled
with
[
_OutIt=`anonymous-namespace'::lcl_DataSeriesContainerAppend,

_InIt=com::sun::star::uno::Reference
 *
]
C:/lo/src/core/chart2/source/controller/dialogs/DialogModel.cxx(504): 
note: see reference to function template instantiation '_OutIt 
std::copy>>,`anonymous-namespace'::lcl_DataSeriesContainerAppend>(_InIt,_InIt,_OutIt)'
 being compiled
with
[
_OutIt=`anonymous-namespace'::lcl_DataSeriesContainerAppend,

_Ty=com::sun::star::uno::Reference,

_InIt=std::_Vector_iterator>>>
]

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932):
 error C2938: 'std::_Iter_ref_t' : Failed to specialize alias template

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932):
 error C2062: type 'unknown-type' unexpected

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3992):
 error C3376: 'std::_Iterator_is_volatile': only static data member templates 
are allowed

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(4026):
 error C2976: 'std::_Iter_copy_cat': too few template arguments

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3994):
 note: see declaration of 'std::_Iter_copy_cat'

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(1152):
 error C2794: 'reference': is not a member of any direct or in direct base 
class of 'std::iterator_traits<`anonymous-namespace'::lcl_RolesWithRangeAppend>'

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932):
 note: see reference to alias template instantiation 
'std::_Iter_ref_t<`anonymous-namespace'::lcl_RolesWithRangeAppend>' being 
compiled

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3992):
 note: see reference to variable template 'const bool 
_Iterator_is_volatile<`anonymous namespace'::lcl_RolesWithRangeAppend>' being 
compiled

C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(4048):
 note: see reference to function template instantiation '_OutIt 
std::_Copy_unchecked<_InIt,_OutIt>(_InIt,_InIt,_OutIt)' being compiled
with
[
_OutIt=`anonymous-namespace'::lcl_RolesWithRangeAppend,
_InIt=const 
com::sun::star::uno::Reference
 *
]
C:/lo/src/core/chart2/source/controller/dialogs/DialogModel.cxx(563): 
note: see reference to function template instantiation '_OutIt std::copy(_InIt,_InIt,_OutIt)' being 
compiled
with
[
_OutIt=`anonymous-namespace'::lcl_RolesWithRangeAppend,

E=com::sun::star::uno::Reference,
_InIt=const 
com::sun::star::uno::Reference
 *
]
make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:332: 
C:/lo/src/build/workdir/CxxObject/chart2/source/controller/dialogs/DialogModel.o]
 Error 2

Change-Id: Ic93dc7922cd48870ef62bfd682dd5cbdc827a255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128036
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index ce6da753d6c4..9c735a489b5e 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -241,12 +241,14 @@ namespace std
 {
 typedef std::output_iterator_tag iterator_category;
 typedef Reference< XDataSerie

Re: Build fails on Loongnix-Server Linux (loongarch64 CPU)

2022-01-06 Thread Caolán McNamara
On Thu, 2022-01-06 at 20:06 +0800, Kevin Suo wrote:
> Someone has reported that 'make' has failed on 
> System: Loongnix-Server Linux release 8.3 (as far as I know, this
> system is based on Fedora)
> CPU: loongarch64
> 
> Error Message:
> 
> [user1@514adae7f545 libreoffice-7.2.5.1]$ make
> mkdir -p /home/user1/libreoffice-7.2.5.1/instdir
> /home/user1/libreoffice-7.2.5.1/solenv/bin/install-gdb-printers -a
> /home/user1/libreoffice-7.2.5.1/instdir -c
> make -j 32 -rs -f /home/user1/libreoffice-7.2.5.1/Makefile.gbuild
> build
> /home/user1/libreoffice-7.2.5.1/solenv/gbuild/UnoApiTarget.mk:127:
> *** gb_UnoApiHeadersTarget_select_variant must be defined by
> platform. Stop.
> make: *** [Makefile:287: build] Error 2

solenv/gbuild/UnoApiTarget.mk at that location has

ifeq ($(origin gb_UnoApiHeadersTarget_select_variant),undefined)
$(eval $(call gb_Output_error,gb_UnoApiHeadersTarget_select_variant
must be defined by platform))
endif

I expect that gets set by...

gb_UnoApiHeadersTarget_select_variant = $(if $(filter
udkapi,$(1)),comprehensive,$(2))

in solenv/gbuild/platform/unxgcc.mk

and for that to be included by

solenv/gbuild/platform/linux.mk

and for this architecture that should (I think) be included by 

solenv/gbuild/platform/LINUX_GODSON64_GCC.mk

so to debug why that might not be happening I'd look into config.log
and search for the line that starts with
CPUNAME=
and see what that is to check that first



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

2022-01-06 Thread Tor Lillqvist (via logerrit)
 desktop/Library_sofficeapp.mk|2 +-
 desktop/source/lib/init.cxx  |   22 ++
 vcl/source/components/dtranscomp.cxx |4 
 3 files changed, 27 insertions(+), 1 deletion(-)

New commits:
commit 6bcf00763402fc0969486e852634b5559fa044ba
Author: Tor Lillqvist 
AuthorDate: Tue Jan 4 16:33:16 2022 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Jan 6 13:52:00 2022 +0100

We don't want or need any LOKClipboard on iOS

Try to make the code more like in the co-2021 branch, where copy/paste
between Collabora Office and other iOS apps currently works again, in
both directions, both for text and images. Sadly something is broken
or missing either here in core or in online as it doesn't fully work
in a Collabora Office based on the master branch of core, even after
this commit, though.

We use only the system clipboard on iOS. (It is actually called the
"pasteboard" in Apple's operating systems.) The code to interface with
the system clipboard is in vcl. It has worked fine to copy and paste
between the Collabora Office iOS app and other iOS apps without any
LOKClipboard being involved. If LOKClipboard is used it doesn't work
at all.

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

diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index c9785eb059cf..d10c4f3c3403 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -132,7 +132,7 @@ ifneq ($(filter $(OS),ANDROID iOS MACOSX WNT),)
 $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/init \
desktop/source/lib/lokinteractionhandler \
-   $(if $(filter-out $(OS),IOS), \
+   $(if $(filter-out $(OS),iOS), \
desktop/source/lib/lokclipboard) \
$(if $(filter $(OS),ANDROID), \
desktop/source/lib/lokandroid) \
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fc43e606d7bb..407c1c0ebf33 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2352,7 +2352,9 @@ static void doc_destroy(LibreOfficeKitDocument *pThis)
 
 SolarMutexGuard aGuard;
 
+#ifndef IOS
 LOKClipboardFactory::releaseClipboardForView(-1);
+#endif
 
 LibLODocument_Impl *pDocument = static_cast(pThis);
 delete pDocument;
@@ -4706,6 +4708,18 @@ static int doc_getClipboard(LibreOfficeKitDocument* 
pThis,
 size_t **pOutSizes,
 char  ***pOutStreams)
 {
+#ifdef IOS
+(void) pThis;
+(void) pMimeTypes;
+(void) pOutCount;
+(void) pOutMimeTypes;
+(void) pOutSizes;
+(void) pOutStreams;
+
+assert(!"doc_getClipboard should not be called on iOS");
+
+return 0;
+#else
 comphelper::ProfileZone aZone("doc_getClipboard");
 
 SolarMutexGuard aGuard;
@@ -4782,6 +4796,7 @@ static int doc_getClipboard(LibreOfficeKitDocument* pThis,
 }
 
 return 1;
+#endif
 }
 
 static int doc_setClipboard(LibreOfficeKitDocument* pThis,
@@ -5529,7 +5544,9 @@ static void doc_destroyView(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis,
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
+#ifndef IOS
 LOKClipboardFactory::releaseClipboardForView(nId);
+#endif
 
 SfxLokHelper::destroyView(nId);
 
@@ -5796,6 +5813,7 @@ static void doc_postWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWindo
 }
 else if (nAction == LOK_WINDOW_PASTE)
 {
+#ifndef IOS
 OUString aMimeType;
 css::uno::Sequence aData;
 std::vector 
aArgs(jsonToPropertyValuesVector(pData));
@@ -5817,6 +5835,10 @@ static void doc_postWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWindo
 }
 else
 SetLastExceptionMsg("Window command 'paste': wrong parameters.");
+#else
+(void) pData;
+assert(!"doc_postWindow() with LOK_WINDOW_PASTE should not be called 
on iOS");
+#endif
 }
 }
 
diff --git a/vcl/source/components/dtranscomp.cxx 
b/vcl/source/components/dtranscomp.cxx
index 645e50625ba3..acd03cc01912 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -416,6 +416,9 @@ Reference< XInterface > SalInstance::CreateClipboard( const 
Sequence< Any >& arg
 throw css::lang::IllegalArgumentException(
 "non-empty SalInstance::CreateClipboard arguments", {}, -1);
 }
+#ifdef IOS
+return Reference< XInterface >( static_cast(new 
vcl::GenericClipboard()) );
+#else
 if (comphelper::LibreOfficeKit::isActive()) {
 // In LOK, each document view shall have its own clipboard instance, 
and the way that
 // (happens to?) work is that apparently this function is called at 
most once for each such
@@ -425,6 +428,7 @@ Reference< XInterface > SalInstance::CreateC

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

2022-01-06 Thread Andras Timar (via logerrit)
Tag 'cp-21.06.11-1' created by Andras Timar  at 
2022-01-06 12:45 +

cp-21.06.11-1

Changes since co-21.06.10-1-44:
---
 0 files changed
---


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

2022-01-06 Thread Christian Lohmaier (via logerrit)
Tag 'cp-21.06.11-1' created by Andras Timar  at 
2022-01-06 12:45 +

cp-21.06.11-1

Changes since co-21.06.5-1:
Christian Lohmaier (1):
  update templates for 7.1.7 rc2

---
 source/am/framework/messages.po  |
8 
 source/am/sfx2/messages.po   |
4 
 source/an/cui/messages.po|
9 
 source/an/desktop/messages.po|
9 
 source/an/officecfg/registry/data/org/openoffice/Office/UI.po|
5 
 source/an/sd/messages.po |
4 
 source/an/svx/messages.po|
6 
 source/ar/cui/messages.po|   
14 
 source/ast/cui/messages.po   |
6 
 source/ast/filter/source/config/fragments/filters.po |   
14 
 source/ast/helpcontent2/source/text/sdatabase.po |   
20 
 source/ast/helpcontent2/source/text/sdraw/guide.po   |   
16 
 source/ast/helpcontent2/source/text/shared/00.po |
6 
 source/ast/helpcontent2/source/text/shared/01.po |
8 
 source/ast/helpcontent2/source/text/simpress/00.po   |
8 
 source/ast/helpcontent2/source/text/simpress/01.po   |
6 
 source/ast/helpcontent2/source/text/swriter/01.po|   
10 
 source/ast/helpcontent2/source/text/swriter/02.po|
6 
 source/ast/helpcontent2/source/text/swriter/guide.po |
6 
 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po   |
8 
 source/ast/sc/messages.po|
7 
 source/ast/scp2/source/ooo.po|   
33 
 source/ast/sd/messages.po|   
10 
 source/ast/svtools/messages.po   |   
20 
 source/ast/sw/messages.po|   
20 
 source/ast/vcl/messages.po   |
4 
 source/ast/wizards/source/resources.po   |
8 
 source/ca/cui/messages.po|   
16 
 source/ca/helpcontent2/source/text/sbasic/shared/01.po   |
8 
 source/ca/helpcontent2/source/text/scalc/01.po   |   
10 
 source/ca/helpcontent2/source/text/scalc/guide.po|
6 
 source/ca/helpcontent2/source/text/sdatabase.po  |
4 
 source/ca/helpcontent2/source/text/sdraw.po  |
4 
 source/ca/helpcontent2/source/text/shared/00.po  |   
10 
 source/ca/helpcontent2/source/text/shared/01.po  |   
32 
 source/ca/helpcontent2/source/text/shared/02.po  |
6 
 source/ca/helpcontent2/source/text/shared/guide.po   |   
22 
 source/ca/helpcontent2/source/text/shared/optionen.po|   
28 
 source/ca/helpcontent2/source/text/simpress/guide.po |   
22 
 source/ca/helpcontent2/source/text/smath/00.po   |   
10 
 source/ca/helpcontent2/source/text/smath/01.po   |   
16 
 source/ca/helpcontent2/source/text/swriter.po|
6 
 source/ca/helpcontent2/source/text/swriter/01.po |   
22 
 source/ca/helpcontent2/source/text/swriter/guide.po  |   
10 
 source/ca/sfx2/messages.po   |
8 
 source/ca/starmath/messages.po   |   
10 
 source/ca/svtools/messages.po|
8 
 source/ca/sw/messages.po |   
12 
 source/cs/helpcontent2/source/text/sbasic/shared/02.po   |   
12 
 source/cs/helpcontent2/source/text/scalc/04.po   |   
12 
 source/cs/helpcontent2/source/text/swriter/00.po |
8 
 source/cs/helpcontent2/source/text/swriter/guide.po  |   
16 
 source/cs/officecfg/registry/data/org/openoffice/Office/UI.po|
6 
 source/de/cui/messages.po|   
16 
 source/de/dictionaries/ca.po |   
15 
 source/de/dictionaries/cs_CZ.po  |   
15 
 source/de/dictionaries/da_DK.po  |
6 
 source/de/dictionaries/de.po |   
16 
 so

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

2022-01-06 Thread Adolfo Jayme Barrientos (via logerrit)
Tag 'cp-21.06.11-1' created by Andras Timar  at 
2022-01-06 12:45 +

cp-21.06.11-1

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


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

2022-01-06 Thread Andras Timar (via logerrit)
Tag 'cp-21.06.11-1' created by Andras Timar  at 
2022-01-06 12:45 +

cp-21.06.11-1

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


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

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

New commits:
commit 035f34be44a92808f5dc060e9010d521d9946403
Author: Andras Timar 
AuthorDate: Thu Jan 6 13:44:54 2022 +0100
Commit: Andras Timar 
CommitDate: Thu Jan 6 13:44:54 2022 +0100

Bump version to 21.06.11.1

Change-Id: I9012065f8d196f15b478fb3b5d6a083cd5b2b671

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


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 69880354d192c34fec1e77f94e55bc5e8e16dcee
Author: Alain Romedenne 
AuthorDate: Thu Jan 6 13:35:21 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 6 13:35:21 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 8d3da999f45d4db4f79e269baae9f07d48c3e7b8
  - Basic sample correction

Change-Id: I1da6b83fba84a06b8da18c20cdfe3787f5c628f8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127962
Tested-by: Jenkins
Reviewed-by: Alain Romedenne

diff --git a/helpcontent2 b/helpcontent2
index b4685908844e..8d3da999f45d 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b4685908844ed4891a29d5b024db8dfb493d4933
+Subproject commit 8d3da999f45d4db4f79e269baae9f07d48c3e7b8


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

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

New commits:
commit 8d3da999f45d4db4f79e269baae9f07d48c3e7b8
Author: Alain Romedenne 
AuthorDate: Thu Jan 6 13:26:20 2022 +0100
Commit: Alain Romedenne 
CommitDate: Thu Jan 6 13:35:19 2022 +0100

Basic sample correction

Change-Id: I1da6b83fba84a06b8da18c20cdfe3787f5c628f8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/127962
Tested-by: Jenkins
Reviewed-by: Alain Romedenne

diff --git a/source/text/sbasic/shared/03100100.xhp 
b/source/text/sbasic/shared/03100100.xhp
index cc895b424..7dd18de93 100644
--- a/source/text/sbasic/shared/03100100.xhp
+++ b/source/text/sbasic/shared/03100100.xhp
@@ -58,7 +58,7 @@
 
 Sub 
ExampleCBool
 
Print CBool( 1>2 Xor 44 ) ' computes to True
-
Print CBool( expression := "15" /2 -7.5 ) ' displays False as expression equals 
0
+
Print CBool( expression := 15 /2 -7.5 ) ' displays False as expression equals 
0
 txt = 
InputBox("Please enter a short sentence:")
 ' Proof if 
the character "a" appears in the sentence.
 ' Instead of 
the command line


Build fails on Loongnix-Server Linux (loongarch64 CPU)

2022-01-06 Thread Kevin Suo
Someone has reported that 'make' has failed on 
System: Loongnix-Server Linux release 8.3 (as far as I know, this system is 
based on Fedora)
CPU: loongarch64

Error Message:

[user1@514adae7f545 libreoffice-7.2.5.1]$ make
mkdir -p /home/user1/libreoffice-7.2.5.1/instdir
/home/user1/libreoffice-7.2.5.1/solenv/bin/install-gdb-printers -a 
/home/user1/libreoffice-7.2.5.1/instdir -c
make -j 32 -rs -f /home/user1/libreoffice-7.2.5.1/Makefile.gbuild build
/home/user1/libreoffice-7.2.5.1/solenv/gbuild/UnoApiTarget.mk:127: *** 
gb_UnoApiHeadersTarget_select_variant must be defined by platform. Stop.
make: *** [Makefile:287: build] Error 2

What shall he do to make it builds? Please let me know if more information is 
required. Thanks in advance.

Kevin Suo

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

2022-01-06 Thread Noel Grandin (via logerrit)
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
   |   96 +-
 chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_bar_chart.txt  
   |   64 +++---
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_column_chart.txt
  |   80 
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_bar_chart.txt
|   76 +++
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_column_chart.txt
 |   76 +++
 chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_bar_chart.txt 
   |   76 +++
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_column_chart.txt
 |   80 
 chart2/source/view/charttypes/BarChart.cxx 
   |   11 -
 chart2/source/view/inc/ShapeFactory.hxx
   |3 
 chart2/source/view/main/ShapeFactory.cxx   
   |   11 -
 sw/qa/extras/layout/layout2.cxx
   |7 
 11 files changed, 298 insertions(+), 282 deletions(-)

New commits:
commit 302b44125aa0c1d5216f986ecf8e341cd6e57418
Author: Noel Grandin 
AuthorDate: Thu Dec 9 11:45:36 2021 +0200
Commit: Noel Grandin 
CommitDate: Thu Jan 6 12:20:22 2022 +0100

use background XShapeGroup for bar-chart area

which means we don't have to set the Z-order, which is expensive for
large charts.
Shaves 5% off the load time

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

diff --git 
a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
 
b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
index b3192a728377..f9ec3b65a2f8 100644
--- 
a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
+++ 
b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
@@ -7,17 +7,17 @@
 1
 // static_cast(aSeriesColumnOrBarFillColor)
 16711807
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0
 // aColumnOrBarPosition.X
-13522
+3698
 // aColumnOrBarPosition.Y
-4147
+4414
 // aColumnOrBarSize.Height
-3202
+2935
 // aColumnOrBarSize.Width
-1169
+1170
 // aColumnOrBarTransformation
-1169;0;13522;0;3202;4147;0;0;1
+1170;0;3698;0;2935;4414;0;0;1
 /// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1
 // aColumnOrBarPosition.X
 8610
@@ -29,17 +29,17 @@
 1170
 // aColumnOrBarTransformation
 1170;0;8610;0;5403;1946;0;0;1
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2
 // aColumnOrBarPosition.X
-3698
+13522
 // aColumnOrBarPosition.Y
-4414
+4147
 // aColumnOrBarSize.Height
-2935
+3202
 // aColumnOrBarSize.Width
-1170
+1169
 // aColumnOrBarTransformation
-1170;0;3698;0;2935;4414;0;0;1
+1169;0;13522;0;3202;4147;0;0;1
 /// Series 1 ColumnsOrBars
 // nColumnOrBarCountInSeries
 3
@@ -47,17 +47,17 @@
 4
 // static_cast(aSeriesColumnOrBarFillColor)
 10079487
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0
 // aColumnOrBarPosition.X
-14691
+4868
 // aColumnOrBarPosition.Y
-3747
+5247
 // aColumnOrBarSize.Height
-3602
+2102
 // aColumnOrBarSize.Width
-1170
+1169
 // aColumnOrBarTransformation
-1170;0;14691;0;3602;3747;0;0;1
+1169;0;4868;0;2102;5247;0;0;1
 /// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1
 // aColumnOrBarPosition.X
 9780
@@ -69,17 +69,17 @@
 1169
 // aColumnOrBarTransformation
 1169;0;9780;0;3002;4347;0;0;1
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2
 // aColumnOrBarPosition.X
-4868
+14691
 // aColumnOrBarPosition.Y
-5247
+3747
 // aColumnOrBarSize.Height
-2102
+3602
 // aColumnOrBarSize.Width
-1169
+1170
 // aColumnOrBarTransformation
-1169;0;4868;0;2102;5247;0;0;1
+1170;0;14691;0;3602;3747;0;0;1
 /// Series 2 ColumnsOrBars
 // nColumnOrBarCountInSeries
 3
@@ -87,17 +87,17 @@
 3
 // static_cast(aSeriesColumnOrBarFillColor)
 10079487
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0
 // aColumnOrBarPosition.X
-15861
+6037
 // aColumnOrBarPosition.Y
-5214
+6281
 // aColumnOrBarSize.Height
-2135
+1068
 // aColumnOrBarSize.Width
-1169
+1170
 // aColumnOrBarTransformation
-1169;0;15861;0;2135;5214;0;0;1
+1170;0;6037;0;1068;6281;0;0;1
 /// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1
 // aColumnOrBarPosition.X
 10949
@@ -109,17 +109,17 @@
 1169
 // aColumnOrBarTransformation
 1169;0;10949;0;2935;4414;0;0;1
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2
 // aColumnOrBarPosition.X
-6037
+15861
 // aColumnOrBar

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 5cfa563169d7e012a6c6e77a3d379c2d183d9339
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 07:32:40 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Thu Jan 6 11:32:40 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b4685908844ed4891a29d5b024db8dfb493d4933
  - Calling Calc Add-in function for Dates and Pricing

Inform respective UNO services

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

diff --git a/helpcontent2 b/helpcontent2
index 9bcc5f53bd01..b4685908844e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9bcc5f53bd012afc91b7c86cd0779d179f93ab71
+Subproject commit b4685908844ed4891a29d5b024db8dfb493d4933


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

2022-01-06 Thread Olivier Hallot (via logerrit)
 source/text/sbasic/shared/calc_functions.xhp |  132 +--
 1 file changed, 125 insertions(+), 7 deletions(-)

New commits:
commit b4685908844ed4891a29d5b024db8dfb493d4933
Author: Olivier Hallot 
AuthorDate: Wed Jan 5 18:09:42 2022 -0300
Commit: Olivier Hallot 
CommitDate: Thu Jan 6 11:32:39 2022 +0100

Calling Calc Add-in function for Dates and Pricing

Inform respective UNO services

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

diff --git a/source/text/sbasic/shared/calc_functions.xhp 
b/source/text/sbasic/shared/calc_functions.xhp
index a1ebc1ada..7ac121088 100644
--- a/source/text/sbasic/shared/calc_functions.xhp
+++ b/source/text/sbasic/shared/calc_functions.xhp
@@ -70,7 +70,7 @@
 
 
   Calling Add-In Calc Functions in BASIC
-  The Calc Add-In 
functions are in service 
com.sun.star.sheet.addin.Analysis.
+  The Calc Add-In 
functions are in the UNO services com.sun.star.sheet.addin.Analysis, 
com.sun.star.sheet.addin.DateFunctions 
and com.sun.star.sheet.addin.PricingFunctions.
   
 
 REM Example calling 
Add-in function SQRTPI
@@ -88,19 +88,20 @@
 Sub AssignAddInFormulaToCell
 REM Add 
an Add-In formula to cell A1. Function name is the UNO service name.
 oCell = 
ThisComponent.Sheets.getByIndex(0).getCellRangeByName("A1")
-oCell.Formula = 
"=com.sun.star.sheet.addin.Analysis.getBin2Dec(B1)"
+oCell.Formula = 
"=com.sun.star.sheet.addin.Analysis.getBin2Dec(B1)"
 REM Cell 
A1 displays the localized function name
 End Sub
 
-Add-In Functions UNO service Names
-The table below 
presents a list of all Calc Add-In functions and their respective UNO service 
names.
+
+UNO Service Names for Analysis Add-In 
Functions
+The table below 
presents a list of all Calc Analysis Add-In functions and their respective UNO 
service names.
 
 
 
-Calc Function name
+Calc Function name
 
 
-UNO service  name
+UNO service name
 
 
 
@@ -912,7 +913,124 @@
 
 
 
-  
+
+
+UNO Service Names for Date Add-In Functions
+The table below 
presents a list of all Calc Date Add-In functions and their respective UNO 
service names.
+
+
+
+Calc Function name
+
+
+UNO service name
+
+
+
+
+DAYSINMONTH
+
+
+com.sun.star.sheet.addin.DateFunctions.getDaysInMonth
+
+
+
+
+DAYSINYEAR
+
+
+com.sun.star.sheet.addin.DateFunctions.getDaysInMonth
+
+
+
+
+MONTHS
+
+
+com.sun.star.sheet.addin.DateFunctions.getDiffMonths
+
+
+
+
+WEEKS
+
+
+com.sun.star.sheet.addin.DateFunctions.getDiffWeeks
+
+
+
+
+YEARS
+
+
+com.sun.star.sheet.addin.DateFunctions.getDiffYears
+
+
+
+
+ROT13
+
+
+com.sun.star.sheet.addin.DateFunctions.getRot13
+
+
+
+
+WEEKSINYEAR
+
+
+com.sun.star.sheet.addin.DateFunctions.getWeeksInYear
+
+
+
+
+
+UNO Service Names for Pricing Add-In 
Functions
+The table below 
presents a list of all Calc Pricing Add-In functions and their respective UNO 
service names.
+
+
+
+Calc Function name
+
+
+UNO service name
+
+
+
+
+OPT_BARRIER
+
+
+com.sun.star.sheet.addin.PrincingFunctions.getOptBarrier
+
+
+
+
+OPT_PROB_HIT
+
+
+com.sun.star.sheet.addin.PrincingFunctions.getOptProbHit
+
+
+
+
+OPT_PROB_INMONEY
+
+
+com.sun.star.sheet.addin.PrincingFunctions.getOptProbInMoney
+
+
+
+
+OPT_TOUCH
+
+
+com.sun.star.sheet.addin.PrincingFunctions.getOptTouch
+
+
+
+
+
   
 
 


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 577a0c3f0bba24649f33af33bce20ac0be3ad184
Author: Olivier Hallot 
AuthorDate: Thu Jan 6 07:31:10 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Thu Jan 6 11:31:10 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 9bcc5f53bd012afc91b7c86cd0779d179f93ab71
  - tdf#135175 Styles Inspector Help page

+ Borrowed contents from Jean Weber and Shivam Kumar
+ Added more descriptive examples

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

diff --git a/helpcontent2 b/helpcontent2
index 1fbed0448d0d..9bcc5f53bd01 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1fbed0448d0d1d77532fe3abb5be05fc13d93bdb
+Subproject commit 9bcc5f53bd012afc91b7c86cd0779d179f93ab71


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

2022-01-06 Thread Olivier Hallot (via logerrit)
 AllLangHelp_swriter.mk |1 
 source/text/swriter/01/style_inspector.xhp |   92 +
 2 files changed, 93 insertions(+)

New commits:
commit 9bcc5f53bd012afc91b7c86cd0779d179f93ab71
Author: Olivier Hallot 
AuthorDate: Tue Jan 4 20:56:48 2022 -0300
Commit: Olivier Hallot 
CommitDate: Thu Jan 6 11:31:08 2022 +0100

tdf#135175 Styles Inspector Help page

+ Borrowed contents from Jean Weber and Shivam Kumar
+ Added more descriptive examples

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

diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk
index 40dd86a91..2ac115c02 100644
--- a/AllLangHelp_swriter.mk
+++ b/AllLangHelp_swriter.mk
@@ -203,6 +203,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\
 helpcontent2/source/text/swriter/01/protectdocument \
 helpcontent2/source/text/swriter/01/selection_mode \
 helpcontent2/source/text/swriter/01/show_whitespace \
+helpcontent2/source/text/swriter/01/style_inspector \
 helpcontent2/source/text/swriter/01/title_page \
 helpcontent2/source/text/swriter/01/watermark \
 helpcontent2/source/text/swriter/02/0211 \
diff --git a/source/text/swriter/01/style_inspector.xhp 
b/source/text/swriter/01/style_inspector.xhp
new file mode 100644
index 0..713b72c4b
--- /dev/null
+++ b/source/text/swriter/01/style_inspector.xhp
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+Style Inspector
+/text/swriter/01/style_inspector.xhp
+
+
+
+
+
+styles;inspector
+style inspector
+
+
+Style 
Inspector
+The Style Inspector is located 
on the Sidebar. It displays all the attributes of the styles (paragraph and 
character) and any direct formatting present in the paragraph and character 
where the cursor is located. These details can be useful when you are trying to 
figure out why some formatting in a document appears to be incorrect or 
inconsistent.
+
+
+
+Open the 
sidebar, click on the Style Inspector icon
+
+
+
+
+Icon Style Inspector
+
+
+
+Icon Style Inspector on the Sidebar
+
+
+
+Press 
CommandCtrl+Alt+5
+
+The Style Inspector Panel
+Properties
+Paragraph 
Styles: shows the list of the paragraph styles applied to the text at 
the cursor position, following the style hierarchy, where the parent style 
comes above any child style.
+
+Paragraph 
direct formatting: shows the list of paragraph properties which are set 
directly to the text at the cursor location.
+
+Character 
Styles: shows the list of the character styles applied to the text at 
the cursor, following hierarchy, where the parent style comes above any child 
style.
+
+Character 
direct formatting: shows the list of character properties which are set 
directly to the text at the cursor location.
+
+Values
+Display the values 
of the properties.
+Usage
+Use the Style 
Inspector to uncover formatting issues in your text document.
+
+
+Style 
properties overwritten by direct formatting are greyed out in the Paragraph and 
Character style tree, indicating that the style property is not effective 
anymore.
+
+
+Paragraph 
style properties that are re-defined by a child paragraph style are greyed 
out.
+
+
+Character 
style properties that are re-defined by a child character style are greyed 
out.
+
+
+Paragraph 
style and direct properties that are re-defined by character styles or 
character direct properties are greyed.
+
+
+For example, if the 
margins of the paragraph are changed by direct formatting using the rulers, the 
margins property of the paragraph style are greyed out and the margins 
properties are displayed in the Paragraph Direct Formatting entry of the Style 
Inspector.
+
+Another example, if 
the Emphasis character style highlights a word with a yellow 
background, and the user mistakenly overwrote it by using a white background, 
the yellow attribute would be greyed-out and 
white is listed under Direct Formatting in the Style 
Inspector. The Style Inspector shows only those attributes that diverge from 
the parent (which is usually the Default Paragraph Style).
+
+Some features of 
the Style Inspector are of interest mainly to advanced users:
+
+
+The Style 
Inspector can show any hidden RDF (Resource Description Framework, a W3C 
standard) metadata at the cursor position associated with text spans, 
paragraphs, and bookmarks. For annotated text spans, “Nested Text Content” item 

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

2022-01-06 Thread Attila Bakos (NISZ) (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf66039.docx   |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|   30 +--
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|   12 +++
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |   22 ++---
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |2 
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx |   11 +-
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |   22 ++---
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx  |   14 +--
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx |   13 +--
 writerfilter/inc/dmapper/resourcemodel.hxx|7 +
 writerfilter/source/dmapper/DomainMapper.cxx  |   11 ++
 writerfilter/source/dmapper/DomainMapper.hxx  |3 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   69 +-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |   10 ++
 writerfilter/source/dmapper/FontTable.hxx |2 
 writerfilter/source/dmapper/GraphicImport.hxx |2 
 writerfilter/source/dmapper/LoggedResources.cxx   |4 +
 writerfilter/source/dmapper/LoggedResources.hxx   |4 +
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |   23 +-
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |1 
 20 files changed, 207 insertions(+), 55 deletions(-)

New commits:
commit 121cbc250b36290f0f8c7265fea57256dad69553
Author: Attila Bakos (NISZ) 
AuthorDate: Thu Nov 11 14:02:12 2021 +0100
Commit: László Németh 
CommitDate: Thu Jan 6 10:41:32 2022 +0100

tdf#66039 DOCX: import textboxes (with tables, images etc.) in group shapes

Text boxes in group shapes were imported as shapes, losing
complex text content: tables (tdf#66039), colors (tdf#73022),
images (tdf#81958), lists, paragraph styles, hyperlinks
(tdf#122960) and track changes.

Note: a few unit tests have been deactivated temporarily.
Test document "groupshape-trackedchanges.docx" of
testGroupshapeTrackedchanges is imported correctly now:
with track changes, and the test was modified accordingly.

Follow-up to commit 2951cbdf3a6e2b62461665546b47e1d253fcb834
"tdf#143574 OOXML export/import of textboxes in group shapes".

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf66039.docx 
b/sw/qa/extras/ooxmlexport/data/tdf66039.docx
new file mode 100644
index ..f17032b3f90b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf66039.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index af0a2a378c4f..857accd57f7d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -440,13 +440,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf59274)
 // This was 3674: too wide last cell in first row
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[4]/w:tcPr/w:tcW", "w", "1695");
 }
-
-DECLARE_OOXMLEXPORT_TEST(testDMLGroupshapeSdt, "dml-groupshape-sdt.docx")
-{
-uno::Reference xGroupShape(getShape(1), uno::UNO_QUERY);
-// The text in the groupshape was missing due to the w:sdt and 
w:sdtContent wrapper around it.
-CPPUNIT_ASSERT_EQUAL(OUString("sdt and sdtContent inside groupshape"), 
uno::Reference(xGroupShape->getByIndex(1), 
uno::UNO_QUERY_THROW)->getString());
-}
+//FIXME:
+//DECLARE_OOXMLEXPORT_TEST(testDMLGroupshapeSdt, "dml-groupshape-sdt.docx")
+//{
+//uno::Reference xGroupShape(getShape(1), 
uno::UNO_QUERY);
+//// The text in the groupshape was missing due to the w:sdt and 
w:sdtContent wrapper around it.
+//CPPUNIT_ASSERT_EQUAL(OUString("sdt and sdtContent inside groupshape"), 
uno::Reference(xGroupShape->getByIndex(1), 
uno::UNO_QUERY_THROW)->getString());
+//}
 
 DECLARE_OOXMLEXPORT_TEST(testDmlCharheightDefault, 
"dml-charheight-default.docx")
 {
@@ -746,9 +746,21 @@ DECLARE_OOXMLEXPORT_TEST(testCaption, "caption.docx")
 DECLARE_OOXMLEXPORT_TEST(testGroupshapeTrackedchanges, 
"groupshape-trackedchanges.docx")
 {
 uno::Reference xGroup(getShape(1), uno::UNO_QUERY);
-uno::Reference xShape(xGroup->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xShape(xGroup->getByIndex(0), 
uno::UNO_QUERY);
 // Shape text was completely missing, ensure inserted text is available.
-CPPUNIT_ASSERT_EQUAL(OUString(" Inserted"), xShape->getString());
+uno::Reference xText
+= uno::Reference(xShape, 
uno::UNO_QUERY_THROW)->getText();
+auto xParagraph = getParagraphOfText(1, xText);
+
+CPPUNIT_ASSERT(hasProperty(getRun(xParagraph, 1), "RedlineType"));
+CPPUNIT_ASSERT_EQUAL(OUString("Delete"),
+ getProperty(getRun(xParagraph, 1), 
"RedlineType"));
+CPPUNIT_ASSERT_EQUAL(OUString("Deleted"), getRun(xParagraph,

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

2022-01-06 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/dlg/adminpages.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 470d1be4ec5a3a5a0aba8febda06600ea39852c5
Author: Julien Nabet 
AuthorDate: Wed Jan 5 22:22:52 2022 +0100
Commit: Julien Nabet 
CommitDate: Thu Jan 6 10:27:31 2022 +0100

tdf#68341: trim some variables passed on Base wizard

Here is a git grep -n fillString:
dbaccess/source/ui/dlg/ConnectionPage.cxx:232:
fillString(*_rSet,m_xJavaDriver.get(), DSID_JDBCDRIVERCLASS, bChangedSomething);
dbaccess/source/ui/dlg/ConnectionPage.cxx:235:
fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething);
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx:134:
fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:144:
fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN, bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:416:
fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:417:
fillString(*_rSet,m_xETHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:418:
fillString(*_rSet,m_xETDatabasename.get(),DSID_DATABASENAME,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:531:
fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/admincontrols.cxx:117:
OGenericAdministrationPage::fillString( *_rSet, m_xHostName.get(), 
DSID_CONN_HOSTNAME,bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:118:
OGenericAdministrationPage::fillString( *_rSet, m_xDatabaseName.get(), 
DSID_DATABASENAME, bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:121:
OGenericAdministrationPage::fillString( *_rSet, m_xSocket.get(),   
DSID_CONN_SOCKET,  bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:123:
OGenericAdministrationPage::fillString( *_rSet, m_xNamedPipe.get(),
DSID_NAMED_PIPE,   bChangedSomething );
dbaccess/source/ui/dlg/adminpages.cxx:219:void 
OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const weld::Entry* 
pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
dbaccess/source/ui/dlg/adminpages.cxx:227:void 
OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const 
dbaui::OConnectionURLEdit* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
dbaccess/source/ui/dlg/adminpages.hxx:218:static void 
fillString(SfxItemSet& _rSet,const weld::Entry* pEdit,sal_uInt16 _nID, bool& 
_bChangedSomething);
dbaccess/source/ui/dlg/adminpages.hxx:219:static void 
fillString(SfxItemSet& _rSet,const dbaui::OConnectionURLEdit* pEdit,sal_uInt16 
_nID, bool& _bChangedSomething);
dbaccess/source/ui/dlg/advancedsettings.cxx:351:fillString( *_rSet, 
m_xAutoIncrement.get(), DSID_AUTOINCREMENTVALUE, bChangedSomething );
dbaccess/source/ui/dlg/advancedsettings.cxx:353:fillString( *_rSet, 
m_xAutoRetrieving.get(), DSID_AUTORETRIEVEVALUE, bChangedSomething );
dbaccess/source/ui/dlg/detailpages.cxx:146:
fillString(*_rSet,m_xOptions.get(),DSID_ADDITIONALOPTIONS,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:303:
fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:406:
fillString(*_rSet,m_xEDDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:407:
fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:408:
fillString(*_rSet,m_xEDSocket.get(),DSID_CONN_SOCKET,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:608:
fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN,bChangedSomething);

So I don't think that trimming these may be harmful.
Now we could also add a boolean fillString to indicated if a trim is needed
but does it worth it?

Change-Id: I6fa841a0c062d4b81a09549cbe865fd627d070cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128029
Tested-by: Jenkins
Reviewed-by: Lionel Mamane 

diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index 9806c3d7199a..5f0eedbb0496 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -220,7 +220,7 @@ namespace dbaui
 {
 if (pEdit && pEdit->get_value_changed_from_saved())
 {
-_rSet.Put(SfxStringItem(_nID, pEdit->get_text()));
+_rSet.Put(SfxStringItem(_nID, pEdit->get_text().trim()));
 _bChangedSomething = true;
 }
 }
@@ -228,7 +228,7 @@ namespa

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

2022-01-06 Thread Szymon Kłos (via logerrit)
 filter/qa/unit/textfilterdetect.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit d33c478eca48b4b1790c2e9cff7e08472164b3ed
Author: Szymon Kłos 
AuthorDate: Thu Jan 6 09:45:30 2022 +0100
Commit: Andras Timar 
CommitDate: Thu Jan 6 10:27:02 2022 +0100

Unit test for 0-byte ods detection

Fixed by commit:
d9a4e323555d01202dd15e71a3a32294bfd568cc
Open empty (0 bytes) ods as spreadsheet

Change-Id: I9b7220f46f5d00f6e4a73d6325dca51d7ea5b656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128033
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/filter/qa/unit/data/empty.ods b/filter/qa/unit/data/empty.ods
new file mode 100644
index ..e69de29bb2d1
diff --git a/filter/qa/unit/textfilterdetect.cxx 
b/filter/qa/unit/textfilterdetect.cxx
index 500e886f5199..a56f63e6a4fe 100644
--- a/filter/qa/unit/textfilterdetect.cxx
+++ b/filter/qa/unit/textfilterdetect.cxx
@@ -103,6 +103,15 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile)
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextDocument"));
 getComponent()->dispose();
 
+// ... and ODS
+aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.ods";
+getComponent() = loadFromDesktop(aURL);
+xServiceInfo.set(getComponent(), uno::UNO_QUERY);
+CPPUNIT_ASSERT(xServiceInfo.is());
+// Make sure it opens in Calc.
+
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.sheet.SpreadsheetDocument"));
+getComponent()->dispose();
+
 // ... and ODP
 aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.odp";
 getComponent() = loadFromDesktop(aURL);


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

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/MAccessible.cxx |   36 
 winaccessibility/source/service/AccObject.cxx   |   19 +---
 2 files changed, 26 insertions(+), 29 deletions(-)

New commits:
commit d84c06577f3198d6c6bd05176429724897d918e6
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 15:32:06 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:11:21 2022 +0100

wina11y: Don't use space in qualified name

While 'MyClass:: MyMethod' (with a space in it) is valid in C++,
it's unusual and may break a naive plain-text search for
a specific class member definition.

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

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index c905cc82b875..495f8b49f196 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1802,7 +1802,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::role(long 
__RPC_FAR *role)
 }
 
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_nActions(long __RPC_FAR 
*nActions)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nActions(long __RPC_FAR 
*nActions)
 {
 SolarMutexGuard g;
 
@@ -1833,12 +1833,12 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: 
get_nActions(long __RPC_FAR *nA
 }
 
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: scrollToPoint(enum 
IA2CoordinateType, long, long)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::scrollToPoint(enum 
IA2CoordinateType, long, long)
 {
 return E_NOTIMPL;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: scrollTo(enum IA2ScrollType)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::scrollTo(enum IA2ScrollType)
 {
 return E_NOTIMPL;
 }
@@ -1865,7 +1865,7 @@ static XAccessible* getTheParentOfMember(XAccessible* 
pXAcc)
 return nullptr;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_groupPosition(long 
__RPC_FAR *groupLevel,long __RPC_FAR *similarItemsInGroup,long __RPC_FAR 
*positionInGroup)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long 
__RPC_FAR *groupLevel,long __RPC_FAR *similarItemsInGroup,long __RPC_FAR 
*positionInGroup)
 {
 SolarMutexGuard g;
 
@@ -2041,13 +2041,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: 
get_groupPosition(long __RPC_FA
 LEAVE_PROTECTED_BLOCK
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_extendedStates( long, 
BSTR __RPC_FAR *__RPC_FAR *, long __RPC_FAR *)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_extendedStates(long, BSTR 
__RPC_FAR *__RPC_FAR *, long __RPC_FAR *)
 {
 return E_NOTIMPL;
 }
 
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_uniqueID(long __RPC_FAR 
*uniqueID)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_uniqueID(long __RPC_FAR 
*uniqueID)
 {
 SolarMutexGuard g;
 
@@ -2064,7 +2064,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: 
get_uniqueID(long __RPC_FAR *un
 LEAVE_PROTECTED_BLOCK
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_windowHandle(HWND 
__RPC_FAR *windowHandle)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_windowHandle(HWND 
__RPC_FAR *windowHandle)
 {
 SolarMutexGuard g;
 
@@ -3001,7 +3001,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::Get_XAccChildID(long* childID)
 return S_OK;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_states(AccessibleStates 
__RPC_FAR *states )
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_states(AccessibleStates 
__RPC_FAR *states)
 {
 SolarMutexGuard g;
 
@@ -3040,29 +3040,29 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: 
get_states(AccessibleStates __R
 }
 
 // return the UNO roles
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_extendedRole( BSTR 
__RPC_FAR *  )
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_extendedRole(BSTR 
__RPC_FAR *)
 {
 return E_NOTIMPL;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_localizedExtendedRole( 
BSTR __RPC_FAR *  )
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_localizedExtendedRole(BSTR 
__RPC_FAR *)
 {
 return E_NOTIMPL;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_nExtendedStates( long 
__RPC_FAR * )
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nExtendedStates(long 
__RPC_FAR *)
 {
 return E_NOTIMPL;
 }
 
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_localizedExtendedStates( 
long, BSTR __RPC_FAR *__RPC_FAR *, long __RPC_FAR *)
+COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::get_localizedExtendedStates(long, BSTR __RPC_FAR *__RPC_FAR *, 
long __RPC_FAR *)
 {
 return E_NOTIMPL;
 }
 
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_indexInParent( long 
__RPC_FAR *accParentIndex)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_indexInParent(long 
__RPC_FAR *accParentInde

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

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/MAccessible.cxx |   14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit e523b205364e59f11ae3e735c1440d61427f15d7
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 14:29:18 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:52 2022 +0100

wina11y: Deduplicate 2 common lines in CMAccessible::get_accRole

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

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 0e3de1af1b53..c905cc82b875 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -505,18 +505,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::get_accRole(VARIANT varChild, VA
 
 if(varChild.lVal == CHILDID_SELF)
 {
-if( m_iRole < IA2_ROLE_CAPTION )
-{
-VariantInit(pvarRole);
-pvarRole->vt = VT_I4;
+VariantInit(pvarRole);
+pvarRole->vt = VT_I4;
+
+if (m_iRole < IA2_ROLE_CAPTION)
 pvarRole->lVal = m_iRole;
-}
 else
-{
-VariantInit(pvarRole);
-pvarRole->vt = VT_I4;
 pvarRole->lVal = ROLE_SYSTEM_CLIENT;
-}
+
 return S_OK;
 }
 


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

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObject.hxx  |1 -
 winaccessibility/inc/AccObjectWinManager.hxx|2 --
 winaccessibility/source/service/AccObject.cxx   |   12 
 winaccessibility/source/service/AccObjectWinManager.cxx |   13 -
 4 files changed, 28 deletions(-)

New commits:
commit fd787538797a182786ab7b1dfc041562b2e5073a
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 14:18:15 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:38 2022 +0100

wina11y: Drop now unused AccObject::SetRole

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

diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index 6da9d6621c5e..a255f36268fa 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -114,7 +114,6 @@ public:
 
 void  SetName( css::uno::Any newName);
 void  SetValue( css::uno::Any pAny );
-void  SetRole( short Role );
 
 short GetRole() const;
 
diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 781c58c82e71..cbda17fa3e77 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -485,18 +485,6 @@ void  AccObject::SetName( Any pAny)
 
 }
 
-/**
-   * Set role property via pAny
-   * @param Role New accessible role.
-   * @return
-   */
-void  AccObject::SetRole( short Role )
-{
-if( nullptr == m_pIMAcc )
-return ;
-m_pIMAcc->Put_XAccRole( Role );
-}
-
 /**
 * Get role property via pAny
 * @param
commit e60406b0873d9e73e84682248f234fca600a1a34
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 14:14:18 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:25 2022 +0100

wina11y: Drop unused AccObjectWinManager::SetRole

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

diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index 911c83ea2a8f..813c1d8541fa 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -122,8 +122,6 @@ public:
 void  SetAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any 
newName);
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc );
 
-void  SetRole( css::accessibility::XAccessible* pXAcc, long Role );
-
 void  UpdateAccFocus( css::accessibility::XAccessible* newFocus );
 void  UpdateAction( css::accessibility::XAccessible* pXAcc );
 
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index 69d8af6ee65a..341d108e1bff 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -977,19 +977,6 @@ void  AccObjectWinManager::SetAccName( XAccessible* pXAcc, 
Any newName)
 pAccObj->SetName( newName );
 }
 
-/**
-   * Set corresponding com object's role via XAccessible interface and new 
role.
-   * @param pXAcc XAccessible interface.
-   * @param Role new role
-   * @return
-   */
-void  AccObjectWinManager::SetRole( XAccessible* pXAcc, long Role )
-{
-AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
-if( pAccObj )
-pAccObj->SetRole( static_cast(Role) );
-}
-
 /**
* Judge if a XAccessible object is a container object.
* @param pAccessible XAccessible interface.


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

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObject.hxx  |2 
 winaccessibility/inc/AccObjectManagerAgent.hxx  |3 
 winaccessibility/inc/AccObjectWinManager.hxx|3 
 winaccessibility/source/UAccCOM/MAccessible.cxx |   43 
++
 winaccessibility/source/UAccCOM/MAccessible.h   |2 
 winaccessibility/source/UAccCOMIDL/UAccCOM.idl  |1 
 winaccessibility/source/service/AccContainerEventListener.cxx   |2 
 winaccessibility/source/service/AccEventListener.cxx|1 
 winaccessibility/source/service/AccObject.cxx   |   32 
---
 winaccessibility/source/service/AccObjectContainerEventListener.cxx |1 
 winaccessibility/source/service/AccObjectManagerAgent.cxx   |   18 
 winaccessibility/source/service/AccObjectWinManager.cxx |   20 
 12 files changed, 9 insertions(+), 119 deletions(-)

New commits:
commit fcf4a26275d7503835f9aa23cb94938809840300
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 13:41:53 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:11 2022 +0100

tdf#146306 wina11y: Retrieve accessible desc on demand

Adapt 'MAccessible::get_accDescription' to directly
retrieve the accessible description on demand via the
corresponding XAccessible, rather than keeping
track of it in a class member.

This simplifies the handling and makes it
unnecessary to "manually" update the description
on 'accessibility::AccessibleEventId::DESCRIPTION_CHANGED'
events, since the new value will
be queried next time it is needed anyway.

This also fixes the problem that a significant
amount of time was spent generating accessible
descriptions for all newly inserted a11y objects when
entering values into Calc cells with the NVDA
screen reader in use, resulting in several
seconds of delay.

Querying up-to-date values from the underlying
UNO interfaces on demand instead of doing extra
manual bookkeeping in the winaccessibility code
may be possible for more a11y attributes in addition
to the accessible description handled in this commit,
but each one will have to be looked at separately.

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

diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index 2a246ce43b29..6da9d6621c5e 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -114,7 +114,6 @@ public:
 
 void  SetName( css::uno::Any newName);
 void  SetValue( css::uno::Any pAny );
-void  SetDescription( css::uno::Any newDesc );
 void  SetRole( short Role );
 
 short GetRole() const;
@@ -123,7 +122,6 @@ public:
 void  UpdateName();
 void  UpdateValue();
 void  UpdateAction();
-void  UpdateDescription();
 void  UpdateValidWindow();
 void  UpdateLocation();
 
diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx 
b/winaccessibility/inc/AccObjectManagerAgent.hxx
index 579a785b41bb..a0f3daec579b 100644
--- a/winaccessibility/inc/AccObjectManagerAgent.hxx
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -76,9 +76,6 @@ public:
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any 
newName);
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc);
 
-void  UpdateDescription( css::accessibility::XAccessible* pXAcc, 
css::uno::Any newDesc );
-void  UpdateDescription( css::accessibility::XAccessible* pXAcc );
-
 void NotifyDestroy(css::accessibility::XAccessible* pXAcc);
 
 css::accessibility::XAccessible* GetParentXAccessible( 
css::accessibility::XAccessible* pXAcc );
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index 4f35668c56ef..911c83ea2a8f 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -122,9 +122,6 @@ public:
 void  SetAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any 
newName);
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc );
 
-void  SetDescription( css::accessibility::XAccessible* pXAcc, 
css::uno::Any newDesc );
-void UpdateDescription( css::accessibility::XAccessible* pXAcc );
-
 void  SetRole( css::accessibility::XAccessible* pXAcc, long Role );
 
 void  UpdateAccFocus( css::accessibility::XAccessible* newFocus );
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 7437f8a586c9..0e3de1af1b53 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -200,7 +200,6 @@ m_pszValue(nullptr),
 m_psz

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

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/service/AccObject.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7210a9d712b156d68627b5510bd2f2404d6fd657
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 12:05:50 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:09:35 2022 +0100

wina11y: Use separate local variable for action description

Use a separate local variable for the accessible
*action* description here, which is independent of
the accessible description handled above.

While at it, use '!OUString::isEmpty' instead of
'OUString::getLength() > 0'.

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

diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 9b6609666ee6..b69507486e25 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -771,10 +771,10 @@ void AccObject::UpdateActionDesc()
 if (!(Role == SPIN_BOX || Role == COMBO_BOX || Role == 
DATE_EDITOR ||
   Role == EDIT_BAR || Role == PASSWORD_TEXT || Role == 
TEXT))
 {
-pXString = 
m_xAccActionRef->getAccessibleActionDescription( 0 );
-//Solution: if string length is more than zero, action is 
set.
-if( pXString.getLength() > 0)
-m_pIMAcc->Put_ActionDescription( 
o3tl::toW(pXString.getStr()) );
+const OUString sActionDesc = 
m_xAccActionRef->getAccessibleActionDescription(0);
+// if string is non-empty, action is set.
+if (!sActionDesc.isEmpty())
+
m_pIMAcc->Put_ActionDescription(o3tl::toW(sActionDesc.getStr()));
 }
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source

2022-01-06 Thread Stephan Bergmann (via logerrit)
 vcl/source/gdi/bmpacc.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit b910f2f0ebd4b64efc829d826f315585db2efcea
Author: Stephan Bergmann 
AuthorDate: Tue Jun 16 10:23:43 2020 +0200
Commit: Andras Timar 
CommitDate: Thu Jan 6 10:08:46 2022 +0100

Remove dubious assert "Forbidden Access to empty bitmap!"

It had been added with d46c32140fdb05758c039dd27552b1788faac104 "assert in
BitmapInfoAccess if bitmap is empty or we can't read from it", and
 had argued:  "This does 
not
make sense.  Either xImpBmp must be true here (in which case the following 
'if'
is an error) or not (in which case the assert is an error).  Which is it?"  
To
which  had responded:  "because I
wanted to catch problems in debug/assert mode, but still allow release 
builds to
'work', to some degree.  Since this assert hasn't resulted in any bug 
reports
yet, I think we can remove the if now" (but note that that removal 
apparently
never happened until now; and
 "Assertion when
accessing animation properties from sidebar" documents a case where it 
appears
that the assert did help to highlight a real---albeit transient---error).

But e.g.  now
triggered that assert during CppunitTest_sw_uiwriter at

> #7  0x2acd75c651a6 in __assert_fail_base () at /lib64/libc.so.6
> #8  0x2acd75c65252 in  () at /lib64/libc.so.6
> #9  0x2acd82871aa6 in BitmapInfoAccess::BitmapInfoAccess(Bitmap&, 
BitmapAccessMode) (this=0x5255030, rBitmap=..., nMode=Write) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/Python Exception  There is no member or method named _M_head_impl.:
> vcl/source/gdi/bmpacc.cxx:38
> xImpBmp = std::shared_ptr (empty) 0x0
> #10 0x2acd82871e36 in BitmapReadAccess::BitmapReadAccess(Bitmap&, 
BitmapAccessMode) (this=0x5255030, rBitmap=..., nMode=Write) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/gdi/bmpacc.cxx:89
> #11 0x2acd828727b4 in BitmapWriteAccess::BitmapWriteAccess(Bitmap&) 
(this=0x5255030, rBitmap=...) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/gdi/bmpacc.cxx:355
> #12 0x2acd82afbdae in Bitmap::AcquireWriteAccess() 
(this=0x7ffcfba67700) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/bitmap/bitmap.cxx:413
> pWriteAccess =
> #13 0x2acd8276ce03 in vcl::ScopedBitmapAccess::ScopedBitmapAccess(Bitmap&) 
(this=0x7ffcfba676e0, rBitmap=...) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/vcl/scopedbitmapaccess.hxx:53
> #14 0x2acd82b07bec in BitmapDisabledImageFilter::execute(BitmapEx 
const&) const (this=0x7ffcfba67a88, rBitmapEx=...) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/bitmap/BitmapDisabledImageFilter.cxx:28
> aSize = Size = {width = 0, height = 0}
> nBitCount = 8
> pPal = 0x2acd83a65980 

> aGrey = {_vptr.Bitmap = 0x2acd83a16868 , 
mxSalBmp = std::shared_ptr (empty) 0x0, maPrefMapMode = {mpImplMapMode = 
{m_pimpl = 0x1d91070}}, maPrefSize = Size = {width = 0, height = 0}}
> pGrey = {mpAccess = 0x0, mpBitmap = 0x7ffcfba67700}
> aReturnBitmap = {maBitmap = {_vptr.Bitmap = 0x0, mxSalBmp = 
std::shared_ptr (count -2107407548, weak 10956) 0x50ad5e8, maPrefMapMode = 
{mpImplMapMode = {m_pimpl = 0x2acd823407d9 }}, 
maPrefSize = Size = {width = 140724530477216, height = 84596192}}, maMask = 
{_vptr.Bitmap = 0x7ffcfba678b0, mxSalBmp = std::shared_ptr (count -1736603320, 
weak -1871345337) 0x2acd82638344 , 
maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x50ad560}}, maPrefSize = Size = 
{width = 140724530477664, height = 47062149486690}}, maBitmapSize = Size = 
{width = 4607182418800017408, height = 84596016}, maTransparentColor = rgb(0, 
0, 0), meTransparent = NONE, mbAlpha = false}
> aReadBitmap = {_vptr.Bitmap = 0x, mxSalBmp = 
std::shared_ptr (count 7274595, weak 6881387) 0x215a600, maPrefMapMode = 
{mpImplMapMode = {m_pimpl = 0x2acd752acaa9 
<__gnu_debug::_Safe_sequence_base::_M_get_mutex()+9>}}, maPrefSize = Size = 
{width = 0, height = 0}}
> pRead = {mpAccess = 0x0, mpBitmap = 0x0}
> #15 0x2acd82aff64a in BitmapFilter::Filter(BitmapEx&, BitmapFilter 
const&) (rBmpEx=..., rFilter=...) at 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/bitmap/bitmapfilter.cxx:22
> aTmpBmpEx = {maBitmap = {_vptr.Bitmap = 0x0, mxSalBmp = 
std::shared_ptr (count -2107407548, weak 10956) 0x50ad5e8, maPrefMapMode = 
{mpImplMapMode = {m_pimpl = 0x2acd823407d9 }}, 

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

2022-01-06 Thread Caolán McNamara (via logerrit)
 sc/source/ui/optdlg/tpcalc.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit d99efe24213400932b97e47b131049fcbbfac612
Author: Caolán McNamara 
AuthorDate: Wed Jan 5 21:09:13 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 6 09:59:22 2022 +0100

Resolves: tdf#146592 "Reset" to the current document properties

not those seen at the initial load of the TabPage

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

diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 4a491a1c5419..df8d827ef670 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -83,12 +83,16 @@ std::unique_ptr ScTpCalcOptions::Create( 
weld::Container* pPage, wel
 return std::make_unique( pPage, pController, *rAttrSet );
 }
 
-void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ )
+void ScTpCalcOptions::Reset(const SfxItemSet* rCoreAttrs)
 {
 sal_uInt16  d,m;
 sal_Int16   y;
 
-*pLocalOptions  = *pOldOptions;
+pOldOptions.reset(new ScDocOptions(
+static_cast(rCoreAttrs->Get(
+GetWhich(SID_SCDOCOPTIONS))).GetDocOptions()));
+
+*pLocalOptions = *pOldOptions;
 
 m_xBtnCase->set_active( !pLocalOptions->IsIgnoreCase() );
 m_xBtnCase->set_sensitive( 
!officecfg::Office::Calc::Calculate::Other::CaseSensitive::isReadOnly() );


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-0' - include/svx sc/source svx/source

2022-01-06 Thread Miklos Vajna (via logerrit)
 include/svx/graphichelper.hxx |   12 +
 sc/source/ui/drawfunc/chartsh.cxx |9 +++-
 svx/source/core/graphichelper.cxx |   83 +++---
 3 files changed, 80 insertions(+), 24 deletions(-)

New commits:
commit 442e01de35eae2aee4540f25673604ddc5aaaca1
Author: Miklos Vajna 
AuthorDate: Tue Jan 4 16:28:03 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 09:45:20 2022 +0100

sc export chart as graphic: handle PDF

The context menu for Calc charts would call into
GraphicFilter::ExportGraphic(), which has explicit code for e.g. SVG,
but not for PDF. The graphic exporter to PDF is only meant to work with
images backed with PDF data, not with all shapes.

Fix the problem by explicitly handling PDF in
GraphicHelper::SaveShapeAsGraphic() in svx/, and invoking the normal PDF
export in that case. Continue to fall back to XGraphicExportFilter for
other formats.

This requires passing down the current document from sc/.

(cherry picked from commit 77d2bbaa18e0be5347d7bd7167b245264789e0a4)

Conflicts:
sc/source/ui/drawfunc/chartsh.cxx
svx/Module_svx.mk
svx/source/core/graphichelper.cxx

Change-Id: Ia5f78bffa1d26989bb0ad3ed265b922e609f076f

diff --git a/include/svx/graphichelper.hxx b/include/svx/graphichelper.hxx
index b582de4a2669..7a5e483a1b37 100644
--- a/include/svx/graphichelper.hxx
+++ b/include/svx/graphichelper.hxx
@@ -24,6 +24,10 @@
 #include 
 
 namespace com::sun::star::drawing { class XShape; }
+namespace com::sun::star::lang
+{
+class XComponent;
+}
 namespace weld { class Widget; }
 namespace weld { class Window; }
 
@@ -33,7 +37,13 @@ class SVXCORE_DLLPUBLIC GraphicHelper
 public:
 static void GetPreferredExtension( OUString& rExtension, const Graphic& 
rGraphic );
 static OUString ExportGraphic(weld::Window* pWin, const Graphic& rGraphic, 
const OUString& rGraphicName);
-static void SaveShapeAsGraphic(weld::Window* pWin, const 
css::uno::Reference< css::drawing::XShape >& xShape);
+static void
+SaveShapeAsGraphicToPath(const css::uno::Reference& 
xComponent,
+ const css::uno::Reference& 
xShape,
+ const OUString& rMimeType, const OUString& rPath);
+static void SaveShapeAsGraphic(weld::Window* pWin,
+   const 
css::uno::Reference& xComponent,
+   const 
css::uno::Reference& xShape);
 static short HasToSaveTransformedImage(weld::Widget* pWin);
 };
 
diff --git a/sc/source/ui/drawfunc/chartsh.cxx 
b/sc/source/ui/drawfunc/chartsh.cxx
index 70a46b8d5e71..425fdae1fc77 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -92,8 +92,15 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& )
 if( dynamic_cast( pObject) )
 {
 vcl::Window* pWin = GetViewData()->GetActiveWin();
+css::uno::Reference xComponent;
+const SfxObjectShell* pShell = GetObjectShell();
+if (pShell)
+{
+xComponent = pShell->GetModel();
+}
 Reference< drawing::XShape > xSourceDoc( pObject->getUnoShape(), 
UNO_QUERY_THROW );
-GraphicHelper::SaveShapeAsGraphic(pWin ? pWin->GetFrameWeld() : 
nullptr, xSourceDoc);
+GraphicHelper::SaveShapeAsGraphic(pWin ? pWin->GetFrameWeld() : 
nullptr, xComponent,
+  xSourceDoc);
 }
 }
 
diff --git a/svx/source/core/graphichelper.cxx 
b/svx/source/core/graphichelper.cxx
index c4755ff10863..7bcb3b58625d 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -46,9 +46,14 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
+#include 
+#include 
+#include 
+
 using namespace css::uno;
 using namespace css::lang;
 using namespace css::graphic;
@@ -336,7 +341,61 @@ OUString GraphicHelper::ExportGraphic(weld::Window* 
pParent, const Graphic& rGra
 return OUString();
 }
 
-void GraphicHelper::SaveShapeAsGraphic(weld::Window* pParent,  const 
Reference< drawing::XShape >& xShape)
+void GraphicHelper::SaveShapeAsGraphicToPath(
+const css::uno::Reference& xComponent,
+const css::uno::Reference& xShape, const OUString& 
aExportMimeType,
+const OUString& sPath)
+{
+Reference 
xContext(::comphelper::getProcessComponentContext());
+Reference xGraphStream;
+
+if (xGraphStream.is())
+{
+Reference xFileAccess = 
SimpleFileAccess::create(xContext);
+xFileAccess->writeFile(sPath, xGraphStream);
+}
+else if (xComponent.is() && aExportMimeType == "application/pdf")
+{
+css::uno::Reference 
xMSF(xContext->getServiceManager(),
+  
css::uno::UNO_QUERY);
+css::uno::Reference xExporter(
+xMSF->createInstance(

[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-0' - xmlsecurity/CppunitTest_xmlsecurity_signing.mk

2022-01-06 Thread Miklos Vajna (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 45ea78cfd8258ab60494ae9a48708662fd37c229
Author: Miklos Vajna 
AuthorDate: Thu Jan 6 09:27:34 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 09:27:34 2022 +0100

CppunitTest_xmlsecurity_signing: fix build

[LNK] CppunitTest/libtest_xmlsecurity_signing.so
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: 
workdir/CxxObject/xmlsecurity/qa/unit/signing/signing.o: in function 
`testSigningMultipleTimes_ODT::TestBody()':
signing.cxx:(.text+0x1060c): undefined reference to 
`Scheduler::ProcessEventsToIdle()'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: 
workdir/CxxObject/xmlsecurity/qa/unit/signing/signing.o: in function 
`testSigningMultipleTimes_OOXML::TestBody()':
signing.cxx:(.text+0x118d6): undefined reference to 
`Scheduler::ProcessEventsToIdle()'
collect2: error: ld returned 1 exit status
make[1]: *** [solenv/gbuild/LinkTarget.mk:667: 
workdir/LinkTarget/CppunitTest/libtest_xmlsecurity_signing.so] Error 1
make: *** [Makefile:282: build] Error 2

Change-Id: Ia29396a28381b01362bf09902a5f843b94ce2aa9

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index c748c644aecb..523c936cc560 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -27,6 +27,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,xmlsecurity_signing, \
unotest \
utl \
xmlsecurity \
+   vcl \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - cui/source include/sfx2 include/svx sd/inc svx/source sw/source

2022-01-06 Thread Tomaž Vajngerl (via logerrit)
 cui/source/inc/grfpage.hxx   |3 ++-
 cui/source/tabpages/grfpage.cxx  |   31 +--
 include/sfx2/tabdlg.hxx  |8 
 include/svx/svdmodel.hxx |2 ++
 sd/inc/drawdoc.hxx   |2 +-
 svx/source/tbxctrls/grafctrl.cxx |2 ++
 sw/source/ui/frmdlg/frmdlg.cxx   |7 +++
 7 files changed, 47 insertions(+), 8 deletions(-)

New commits:
commit ab63ad95c1538a0d03961cebfb0ffc77b6925d69
Author: Tomaž Vajngerl 
AuthorDate: Sun Dec 19 22:31:31 2021 +0900
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 09:19:17 2022 +0100

Set the original size in crop dialog to preferred DPI calc. size

If we have the document setting preferred image size set, then
use that as the default DPI and recalcualte the logical image
size using the DPI and the size in pixels.
This is useful so we have the preferred DPI size as 100% in the
crop dialog, so we can adjust the size in relation to that value.

This adds to SfxTabPage a new member maAdditionalProperties, to
make it easier to transfer additional properties into a tab page.
This is then used to transfer the preferred DPI into the tab page,
which was previously done by user data, which is less than ideal
and always doesn't work.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127096
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit e34067483ef78c1569641becfe99b79a97600aed)

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

diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index afdc7cb6ba6f..922126a1b6b7 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -57,6 +57,7 @@ class SvxGrfCropPage : public SfxTabPage
 longnOldWidth;
 longnOldHeight;
 boolbSetOrigSize;
+sal_Int32 m_aPreferredDPI;
 
 SvxCropExample m_aExampleWN;
 
@@ -93,7 +94,7 @@ class SvxGrfCropPage : public SfxTabPage
 voidGraphicHasChanged(bool bFound);
 virtual voidActivatePage(const SfxItemSet& rSet) override;
 
-static Size GetGrfOrigSize(const Graphic&);
+Size GetGrfOrigSize(const Graphic& rGraphic);
 public:
 SvxGrfCropPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet &rSet);
 static std::unique_ptr Create( weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet *rSet );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 091ef70faddf..aca4dd392bf0 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -57,6 +57,7 @@ SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, 
weld::DialogController* p
 , nOldWidth(0)
 , nOldHeight(0)
 , bSetOrigSize(false)
+, m_aPreferredDPI(0)
 , m_xCropFrame(m_xBuilder->weld_widget("cropframe"))
 , m_xZoomConstRB(m_xBuilder->weld_radio_button("keepscale"))
 , m_xSizeConstRB(m_xBuilder->weld_radio_button("keepsize"))
@@ -287,6 +288,10 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
 DBG_ASSERT( pPool, "Where is the pool?" );
 #endif
 
+auto& aProperties = getAdditionalProperties();
+if (aProperties.find("PreferredDPI") != aProperties.end())
+m_aPreferredDPI = aProperties.at("PreferredDPI").get();
+
 bSetOrigSize = false;
 
 // Size
@@ -664,13 +669,27 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
 
 Size SvxGrfCropPage::GetGrfOrigSize(const Graphic& rGrf)
 {
-const MapMode aMapTwip( MapUnit::MapTwip );
-Size aSize( rGrf.GetPrefSize() );
-if( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
-aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMapTwip);
+Size aSize;
+
+if (m_aPreferredDPI > 0)
+{
+Size aPixelSize = rGrf.GetSizePixel();
+double fWidth = aPixelSize.Width() / double(m_aPreferredDPI);
+double fHeight = aPixelSize.Height() / double(m_aPreferredDPI);
+fWidth = fWidth * 1440.0;
+fHeight = fHeight * 1440.0;
+aSize = Size(fWidth, fHeight);
+}
 else
-aSize = OutputDevice::LogicToLogic( aSize,
-rGrf.GetPrefMapMode(), aMapTwip );
+{
+const MapMode aMapTwip( MapUnit::MapTwip );
+aSize = rGrf.GetPrefSize();
+if( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
+aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, 
aMapTwip);
+else
+aSize = OutputDevice::LogicToLogic( aSize,
+rGrf.GetPrefMapMode(), aMapTwip );
+}
 return aSize;
 }
 
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index d5522a0cd253..13ac3ab90173 100644
--- a/inc

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sfx2 include/svx officecfg/registry sd/Library_sd.mk sd/sdi sd/source sd/uiconfig svx/Library_svx.mk svx/sdi svx/source svx/u

2022-01-06 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/sfxsids.hrc |2 
 include/svx/GenericCheckDialog.hxx   |   83 +++
 include/svx/strings.hrc  |7 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 
 sd/Library_sd.mk |1 
 sd/sdi/_drvwsh.sdi   |5 
 sd/source/ui/inc/tools/GraphicSizeCheck.hxx  |  103 

 sd/source/ui/tools/GraphicSizeCheck.cxx  |  211 
++
 sd/source/ui/view/drviews2.cxx   |   12 
 sd/source/ui/view/drviewsj.cxx   |4 
 sd/uiconfig/sdraw/menubar/menubar.xml|1 
 sd/uiconfig/simpress/menubar/menubar.xml |1 
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |2 
 svx/sdi/svx.sdi  |   17 
 svx/source/dialog/GenericCheckDialog.cxx |   70 +++
 svx/uiconfig/ui/genericcheckdialog.ui|  132 
++
 svx/uiconfig/ui/genericcheckentry.ui |   56 ++
 sw/Library_sw.mk |2 
 sw/sdi/_basesh.sdi   |7 
 sw/source/core/graphic/GraphicSizeCheck.cxx  |  163 
+++
 sw/source/core/inc/GraphicSizeCheck.hxx  |   99 

 sw/source/core/inc/ModelTraverser.hxx|   51 ++
 sw/source/core/model/ModelTraverser.cxx  |   61 ++
 sw/source/uibase/shells/basesh.cxx   |   17 
 sw/uiconfig/sglobal/menubar/menubar.xml  |1 
 sw/uiconfig/swriter/menubar/menubar.xml  |1 
 27 files changed, 1116 insertions(+), 2 deletions(-)

New commits:
commit d9ad5c6c174b22e0808b948bfc5087d38874f9b2
Author: Tomaž Vajngerl 
AuthorDate: Tue Dec 7 23:25:54 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 09:18:40 2022 +0100

Add graphic size checker for the preferred document DPI

This change adds a graphic size checker, which checks all the
images in the document, if they largely differ (outside of 50% and
110% of the image size) from the set preferred image DPI document
setting. For all images that don't fall under this bounds, list
them in the dialog and offer the posibility to select/goto the
image and pop-up the properties dialog for the image to change
its size.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127094
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 046e6cfa544d2ffd67fd29ba7dde41b495744618)

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

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 862a0a8e3d5c..ede429245298 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -431,7 +431,7 @@ class SvxSearchItem;
 
 // Used for redaction
 #define SID_SHAPE_NAME  (SID_SFX_START + 808)
-// FREE: SID_SFX_START + 809
+#define SID_GRAPHIC_SIZE_CHECK  (SID_SFX_START + 809)
 // FREE: SID_SFX_START + 810
 #define SID_ASYNCHRON   (SID_SFX_START + 811)
 
diff --git a/include/svx/GenericCheckDialog.hxx 
b/include/svx/GenericCheckDialog.hxx
new file mode 100644
index ..ef2a41159737
--- /dev/null
+++ b/include/svx/GenericCheckDialog.hxx
@@ -0,0 +1,83 @@
+/* -*- 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
+
+#include 
+#include 
+#include 
+
+namespace svx
+{
+class CheckData
+{
+public:
+virtual ~CheckData() {}
+
+virtual OUString getText() = 0;
+
+virtual bool canMarkObject() = 0;
+virtual void markObject() = 0;
+
+virtual bool hasProperties() = 0;
+virtual void runProperties() = 0;
+};
+
+class CheckDataCollection
+{
+protected:
+std::vector> m_aCollection;
+
+public:
+virtual ~CheckDataCollection() {}
+
+std::vector>& getCollection() { return 
m_aCollection; }
+
+virtual OUString getTitle() = 0;
+};
+
+class GenericCheckEntry final
+{
+private:
+std::unique_ptr m_xBui

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sfx2 sc/inc sc/source sd/inc sd/source sfx2/source sfx2/uiconfig sw/inc sw/source

2022-01-06 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/dinfdlg.hxx  |4 
 sc/inc/document.hxx   |5 
 sc/inc/unonames.hxx   |1 
 sc/source/core/data/documen2.cxx  |1 
 sc/source/ui/unoobj/confuno.cxx   |   14 -
 sd/inc/drawdoc.hxx|5 
 sd/source/core/drawdoc.cxx|1 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx   |   20 +
 sd/source/ui/view/sdview4.cxx |   39 ++
 sfx2/source/dialog/dinfdlg.cxx|   59 
 sfx2/uiconfig/ui/documentinfopage.ui  |  342 --
 sw/inc/IDocumentSettingAccess.hxx |3 
 sw/source/core/doc/DocumentSettingManager.cxx |3 
 sw/source/core/inc/DocumentSettingManager.hxx |9 
 sw/source/uibase/uno/SwXDocumentSettings.cxx  |   17 +
 sw/source/uibase/wrtsh/wrtsh1.cxx |   19 +
 16 files changed, 399 insertions(+), 143 deletions(-)

New commits:
commit 331b1fba6b1981a867678795e2fc38185bc0cac6
Author: Tomaž Vajngerl 
AuthorDate: Fri Dec 3 20:52:12 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 6 09:18:06 2022 +0100

Add image preffered DPI document setting, use it in Writer, Impress

This adds a "image preferred DPI" document setting, which is used
as a suggestion of the DPI that an image should have in the
document. This is currently used when the image is inserted into
the document (Writer, Impress/Draw) to resize it to the preferred
DPI value.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126334
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 4c00e8fb10437fcaefe8635ef390b78376938d15)

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

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 08be8bb5ea19..efdb957d3a57 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -192,10 +192,14 @@ private:
 
 std::unique_ptr m_xTemplFt;
 std::unique_ptr m_xTemplValFt;
+std::unique_ptr m_xImagePreferredDpiCheckButton;
+std::unique_ptr m_xImagePreferredDpiComboBox;
 
 DECL_LINK(DeleteHdl, weld::Button&, void);
 DECL_LINK(SignatureHdl, weld::Button&, void);
 DECL_LINK(ChangePassHdl, weld::Button&, void);
+DECL_LINK(ImagePreferredDPICheckBoxClicked, weld::ToggleButton&, void);
+
 voidImplUpdateSignatures();
 voidImplCheckPasswordState();
 
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 8c3c2ec79431..91e2c5b7c0b3 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -561,6 +561,8 @@ private:
 bool mbEmbedFontScriptAsian : 1;
 bool mbEmbedFontScriptComplex : 1;
 
+sal_Int32 mnImagenPreferredDPI;
+
 std::unique_ptr m_pIconSetBitmapMap;
 
 boolmbTrackFormulasPending  : 1;
@@ -586,6 +588,9 @@ public:
 void SetEmbedFontScriptAsian(bool bUse) { mbEmbedFontScriptAsian = bUse; }
 void SetEmbedFontScriptComplex(bool bUse) { mbEmbedFontScriptComplex = 
bUse; }
 
+void SetImagePreferredDPI(sal_Int32 nValue) { mnImagenPreferredDPI = 
nValue; }
+sal_Int32 GetImagePreferredDPI() { return mnImagenPreferredDPI; }
+
 SC_DLLPUBLIC sal_uLong   GetCellCount() const;   // all cells
 SC_DLLPUBLIC sal_uLong   GetFormulaGroupCount() const;   // all cells
 sal_uLongGetCodeCount() const;   // RPN-Code in 
formulas
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 6fb5051ec249..5dda3ad674d3 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -571,6 +571,7 @@
 #define SC_UNO_UPDTEMPL "UpdateFromTemplate"
 #define SC_UNO_FILTERED_RANGE_SELECTION   "FilteredRangeSelection"
 #define SC_UNO_VISAREASCREEN"VisibleAreaOnScreen"
+#define SC_UNO_IMAGE_PREFERRED_DPI  "ImagePreferredDPI"
 
 /*Stampit enable/disable print cancel */
 #define SC_UNO_ALLOWPRINTJOBCANCEL  "AllowPrintJobCancel"
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 7271fdef0d43..4846c301dca7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -163,6 +163,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, 
SfxObjectShell* pDocShell ) :
 mbEmbedFontScriptLatin(true),
 mbEmbedFontScriptAsian(true),
 mbEmbedFontScriptComplex(true),
+mnImagenPreferredDPI(0),
 mbTrackFormulasPending(false),
 mbFinalTrackFormulas(false),
 mbDocShellRecalc(false),
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 5cd457885c71..00740cd958ee 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -88,6 +88,7 @@ static const SfxItemPropertyMapEntry* 
lcl_GetConfigPropertyMap()
 {OUString(SC_U