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

2021-11-12 Thread Noel Grandin (via logerrit)
 include/comphelper/proparrhlp.hxx|   16 
 include/comphelper/servicehelper.hxx |1 -
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit ec1a54ca6033533a20309f3df5b8b5353bb2b509
Author: Noel Grandin 
AuthorDate: Thu Nov 11 20:55:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 13 07:35:10 2021 +0100

rtl::Static->thread-safe static in OPropertyArrayUsageHelper

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

diff --git a/include/comphelper/proparrhlp.hxx 
b/include/comphelper/proparrhlp.hxx
index a53b718c2697..8520ac58f87d 100644
--- a/include/comphelper/proparrhlp.hxx
+++ b/include/comphelper/proparrhlp.hxx
@@ -24,21 +24,21 @@
 #include 
 #include 
 #include 
-#include 
 
 namespace comphelper
 {
 
-template  struct OPropertyArrayUsageHelperMutex
-: public rtl::Static< ::osl::Mutex, OPropertyArrayUsageHelperMutex > 
{};
-
 template 
 class OPropertyArrayUsageHelper
 {
 protected:
 static sal_Int32s_nRefCount;
 static ::cppu::IPropertyArrayHelper*s_pProps;
-
+static osl::Mutex& theMutex()
+{
+static osl::Mutex SINGLETON;
+return SINGLETON;
+}
 public:
 OPropertyArrayUsageHelper();
 virtual ~OPropertyArrayUsageHelper();
@@ -92,14 +92,14 @@ template
 template 
 OPropertyArrayUsageHelper::OPropertyArrayUsageHelper()
 {
-::osl::MutexGuard aGuard(OPropertyArrayUsageHelperMutex::get());
+::osl::MutexGuard aGuard(theMutex());
 ++s_nRefCount;
 }
 
 template 
 OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper()
 {
-::osl::MutexGuard aGuard(OPropertyArrayUsageHelperMutex::get());
+::osl::MutexGuard aGuard(theMutex());
 OSL_ENSURE(s_nRefCount > 0, 
"OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have 
a refcount of 0 !");
 if (!--s_nRefCount)
 {
@@ -114,7 +114,7 @@ template 
 OSL_ENSURE(s_nRefCount, "OPropertyArrayUsageHelper::getArrayHelper : 
suspicious call : have a refcount of 0 !");
 if (!s_pProps)
 {
-::osl::MutexGuard aGuard(OPropertyArrayUsageHelperMutex::get());
+::osl::MutexGuard aGuard(theMutex());
 if (!s_pProps)
 {
 s_pProps = createArrayHelper();
diff --git a/include/comphelper/servicehelper.hxx 
b/include/comphelper/servicehelper.hxx
index fa906075e1b6..b2c6bf46d009 100644
--- a/include/comphelper/servicehelper.hxx
+++ b/include/comphelper/servicehelper.hxx
@@ -21,7 +21,6 @@
 #define INCLUDED_COMPHELPER_SERVICEHELPER_HXX
 
 #include 
-#include 
 #include 
 #include 
 


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

2021-11-12 Thread Noel Grandin (via logerrit)
 include/comphelper/IdPropArrayHelper.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit e6f2736be82559c513aa07c765e9f6c0dd72072b
Author: Noel Grandin 
AuthorDate: Thu Nov 11 20:41:58 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 13 07:34:48 2021 +0100

osl::Mutex->std::mutex in OIdPropertyArrayUsageHelper

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

diff --git a/include/comphelper/IdPropArrayHelper.hxx 
b/include/comphelper/IdPropArrayHelper.hxx
index 705de3db8925..8b70db849ed5 100644
--- a/include/comphelper/IdPropArrayHelper.hxx
+++ b/include/comphelper/IdPropArrayHelper.hxx
@@ -20,7 +20,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -36,7 +36,7 @@ namespace comphelper
 OIdPropertyArrayUsageHelper();
 virtual ~OIdPropertyArrayUsageHelper()
 {
-::osl::MutexGuard aGuard(theMutex());
+std::unique_lock aGuard(theMutex());
 assert(s_nRefCount > 0 && 
"OIdPropertyArrayUsageHelper::~OIdPropertyArrayUsageHelper : suspicious call : 
have a refcount of 0 !");
 if (!--s_nRefCount)
 {
@@ -64,9 +64,9 @@ namespace comphelper
 private:
 static sal_Int32s_nRefCount;
 static OIdPropertyArrayMap* s_pMap;
-static osl::Mutex& theMutex()
+static std::mutex& theMutex()
 {
-static osl::Mutex SINGLETON;
+static std::mutex SINGLETON;
 return SINGLETON;
 }
 };
@@ -80,7 +80,7 @@ namespace comphelper
 template 
 OIdPropertyArrayUsageHelper::OIdPropertyArrayUsageHelper()
 {
-::osl::MutexGuard aGuard(theMutex());
+std::unique_lock aGuard(theMutex());
 // create the map if necessary
 if (!s_pMap)
 s_pMap = new OIdPropertyArrayMap;
@@ -91,7 +91,7 @@ namespace comphelper
 ::cppu::IPropertyArrayHelper* 
OIdPropertyArrayUsageHelper::getArrayHelper(sal_Int32 nId)
 {
 assert(s_nRefCount && "OIdPropertyArrayUsageHelper::getArrayHelper : 
suspicious call : have a refcount of 0 !");
-::osl::MutexGuard aGuard(theMutex());
+std::unique_lock aGuard(theMutex());
 // do we have the array already?
 auto& rEntry = (*s_pMap)[nId];
 if (!rEntry)


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

2021-11-12 Thread Noel Grandin (via logerrit)
 include/comphelper/IdPropArrayHelper.hxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit f4a2c9e91e6b12d4d66b35146ec87b15b365f57d
Author: Noel Grandin 
AuthorDate: Thu Nov 11 20:40:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 13 07:34:25 2021 +0100

rtl::Static->thread-safe static in OIdPropertyArrayUsageHelper

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

diff --git a/include/comphelper/IdPropArrayHelper.hxx 
b/include/comphelper/IdPropArrayHelper.hxx
index c702acb98065..705de3db8925 100644
--- a/include/comphelper/IdPropArrayHelper.hxx
+++ b/include/comphelper/IdPropArrayHelper.hxx
@@ -21,7 +21,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -29,9 +28,6 @@
 namespace comphelper
 {
 
-template  struct OIdPropertyArrayUsageHelperMutex
-: public rtl::Static< ::osl::Mutex, 
OIdPropertyArrayUsageHelperMutex > {};
-
 typedef std::unordered_map< sal_Int32, ::cppu::IPropertyArrayHelper* > 
OIdPropertyArrayMap;
 template 
 class OIdPropertyArrayUsageHelper
@@ -40,7 +36,7 @@ namespace comphelper
 OIdPropertyArrayUsageHelper();
 virtual ~OIdPropertyArrayUsageHelper()
 {
-::osl::MutexGuard 
aGuard(OIdPropertyArrayUsageHelperMutex::get());
+::osl::MutexGuard aGuard(theMutex());
 assert(s_nRefCount > 0 && 
"OIdPropertyArrayUsageHelper::~OIdPropertyArrayUsageHelper : suspicious call : 
have a refcount of 0 !");
 if (!--s_nRefCount)
 {
@@ -68,6 +64,11 @@ namespace comphelper
 private:
 static sal_Int32s_nRefCount;
 static OIdPropertyArrayMap* s_pMap;
+static osl::Mutex& theMutex()
+{
+static osl::Mutex SINGLETON;
+return SINGLETON;
+}
 };
 
 template
@@ -79,7 +80,7 @@ namespace comphelper
 template 
 OIdPropertyArrayUsageHelper::OIdPropertyArrayUsageHelper()
 {
-::osl::MutexGuard 
aGuard(OIdPropertyArrayUsageHelperMutex::get());
+::osl::MutexGuard aGuard(theMutex());
 // create the map if necessary
 if (!s_pMap)
 s_pMap = new OIdPropertyArrayMap;
@@ -90,7 +91,7 @@ namespace comphelper
 ::cppu::IPropertyArrayHelper* 
OIdPropertyArrayUsageHelper::getArrayHelper(sal_Int32 nId)
 {
 assert(s_nRefCount && "OIdPropertyArrayUsageHelper::getArrayHelper : 
suspicious call : have a refcount of 0 !");
-::osl::MutexGuard 
aGuard(OIdPropertyArrayUsageHelperMutex::get());
+::osl::MutexGuard aGuard(theMutex());
 // do we have the array already?
 auto& rEntry = (*s_pMap)[nId];
 if (!rEntry)


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

2021-11-12 Thread Justin Luth (via logerrit)
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit b89853d017f862de9dfadcf9efdbcf7d68feb945
Author: Justin Luth 
AuthorDate: Wed Nov 10 09:15:58 2021 +0200
Commit: Justin Luth 
CommitDate: Sat Nov 13 06:33:59 2021 +0100

tdf#142986 sc sampling: allow more than default (100) samples

The default maximum for a spinbutton must be 100.
For some reason, the previous setMax to maxint was removed
in LO 6.3 in commit 2c5c20b19c349a4b7f6d78d69d8d57f9af5c351c.

Change-Id: I846c1ce037db6ef3b8d48975e24b748cad0394d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124948
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Eike Rathke 
(cherry picked from commit eb50d356ffbe5bd2e3de9ac574ddf28ce4e034ad)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124972
(cherry picked from commit 62d82a9a4108f715cf1a2bf15205adc28e9fd31a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124974
Reviewed-by: Xisco Fauli 
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 

diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx 
b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 608ba1a30fa1..fad4ac6d05a5 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -87,7 +87,9 @@ void ScSamplingDialog::Init()
 mxOutputRangeEdit->SetModifyHdl( aLink2);
 
 mxSampleSize->connect_value_changed( LINK( this, ScSamplingDialog, 
SamplingSizeValueModified ));
+mxSampleSize->set_range(1, SAL_MAX_INT32);
 mxPeriod->connect_value_changed( LINK( this, ScSamplingDialog, 
PeriodValueModified ));
+mxPeriod->set_range(1, SAL_MAX_INT32);
 
 mxPeriodicMethodRadio->connect_toggled( LINK( this, ScSamplingDialog, 
ToggleSamplingMethod ) );
 mxRandomMethodRadio->connect_toggled( LINK( this, ScSamplingDialog, 
ToggleSamplingMethod ) );


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

2021-11-12 Thread Noel Grandin (via logerrit)
 include/comphelper/IdPropArrayHelper.hxx |   31 +++
 1 file changed, 11 insertions(+), 20 deletions(-)

New commits:
commit 98a2cef1ee9c76897af64ff0a1e1efd280796f36
Author: Noel Grandin 
AuthorDate: Thu Nov 11 19:08:17 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 13 06:26:52 2021 +0100

modernise IdPropArrayHelper a little

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

diff --git a/include/comphelper/IdPropArrayHelper.hxx 
b/include/comphelper/IdPropArrayHelper.hxx
index 34e403b3ab0a..c702acb98065 100644
--- a/include/comphelper/IdPropArrayHelper.hxx
+++ b/include/comphelper/IdPropArrayHelper.hxx
@@ -16,40 +16,32 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_COMPHELPER_IDPROPARRAYHELPER_HXX
-#define INCLUDED_COMPHELPER_IDPROPARRAYHELPER_HXX
+#pragma once
 
 #include 
 
-#include 
-
 #include 
-#include 
 #include 
 #include 
+#include 
+#include 
 
 namespace comphelper
 {
 
-//  OIdPropertyArrayUsageHelper
-
 template  struct OIdPropertyArrayUsageHelperMutex
 : public rtl::Static< ::osl::Mutex, 
OIdPropertyArrayUsageHelperMutex > {};
 
-typedef std::map< sal_Int32, ::cppu::IPropertyArrayHelper* > 
OIdPropertyArrayMap;
+typedef std::unordered_map< sal_Int32, ::cppu::IPropertyArrayHelper* > 
OIdPropertyArrayMap;
 template 
 class OIdPropertyArrayUsageHelper
 {
-protected:
-static sal_Int32s_nRefCount;
-static OIdPropertyArrayMap* s_pMap;
-
 public:
 OIdPropertyArrayUsageHelper();
 virtual ~OIdPropertyArrayUsageHelper()
 {
 ::osl::MutexGuard 
aGuard(OIdPropertyArrayUsageHelperMutex::get());
-OSL_ENSURE(s_nRefCount > 0, 
"OIdPropertyArrayUsageHelper::~OIdPropertyArrayUsageHelper : suspicious call : 
have a refcount of 0 !");
+assert(s_nRefCount > 0 && 
"OIdPropertyArrayUsageHelper::~OIdPropertyArrayUsageHelper : suspicious call : 
have a refcount of 0 !");
 if (!--s_nRefCount)
 {
 // delete the element
@@ -73,42 +65,41 @@ namespace comphelper
 @return a pointer to the newly created 
array helper. Must not be NULL.
 */
 virtual ::cppu::IPropertyArrayHelper* createArrayHelper(sal_Int32 nId) 
const = 0;
+private:
+static sal_Int32s_nRefCount;
+static OIdPropertyArrayMap* s_pMap;
 };
 
-
 template
 sal_Int32   OIdPropertyArrayUsageHelper< TYPE 
>::s_nRefCount= 0;
 
 template
 OIdPropertyArrayMap*OIdPropertyArrayUsageHelper< TYPE 
>::s_pMap = nullptr;
 
-
 template 
 OIdPropertyArrayUsageHelper::OIdPropertyArrayUsageHelper()
 {
 ::osl::MutexGuard 
aGuard(OIdPropertyArrayUsageHelperMutex::get());
 // create the map if necessary
-if (s_pMap == nullptr)
+if (!s_pMap)
 s_pMap = new OIdPropertyArrayMap;
 ++s_nRefCount;
 }
 
-
 template 
 ::cppu::IPropertyArrayHelper* 
OIdPropertyArrayUsageHelper::getArrayHelper(sal_Int32 nId)
 {
-OSL_ENSURE(s_nRefCount, "OIdPropertyArrayUsageHelper::getArrayHelper : 
suspicious call : have a refcount of 0 !");
+assert(s_nRefCount && "OIdPropertyArrayUsageHelper::getArrayHelper : 
suspicious call : have a refcount of 0 !");
 ::osl::MutexGuard 
aGuard(OIdPropertyArrayUsageHelperMutex::get());
 // do we have the array already?
 auto& rEntry = (*s_pMap)[nId];
 if (!rEntry)
 {
 rEntry = createArrayHelper(nId);
-OSL_ENSURE((*s_pMap)[nId], 
"OIdPropertyArrayUsageHelper::getArrayHelper : createArrayHelper returned 
nonsense !");
+assert(rEntry && "OIdPropertyArrayUsageHelper::getArrayHelper : 
createArrayHelper returned nonsense !");
 }
 return (*s_pMap)[nId];
 }
 }
-#endif // INCLUDED_COMPHELPER_IDPROPARRAYHELPER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2021-11-12 Thread Noel Grandin (via logerrit)
 sw/inc/nodeoffset.hxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 0dbde576f57395c9315e5da8c43e9aedf9094953
Author: Noel Grandin 
AuthorDate: Fri Nov 12 13:16:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 13 06:26:32 2021 +0100

make SwNodeOffset operator+ and operator- inline

forgot to do this

spotted by llunak

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

diff --git a/sw/inc/nodeoffset.hxx b/sw/inc/nodeoffset.hxx
index 0911fdb67b23..035925855b31 100644
--- a/sw/inc/nodeoffset.hxx
+++ b/sw/inc/nodeoffset.hxx
@@ -17,14 +17,16 @@ typedef o3tl::strong_int SwNodeOffset;
 
 /* Just to make it easier to write arithmetic with these types */
 template 
-typename std::enable_if::value, SwNodeOffset>::type 
operator+(SwNodeOffset a, T n)
+inline typename std::enable_if::value, SwNodeOffset>::type
+operator+(SwNodeOffset a, T n)
 {
 return a + SwNodeOffset(n);
 }
 
 /* Just to make it easier to write arithmetic with these types */
 template 
-typename std::enable_if::value, SwNodeOffset>::type 
operator-(SwNodeOffset a, T n)
+inline typename std::enable_if::value, SwNodeOffset>::type
+operator-(SwNodeOffset a, T n)
 {
 return a - SwNodeOffset(n);
 }


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

2021-11-12 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/token.cxx |  200 ++
 1 file changed, 106 insertions(+), 94 deletions(-)

New commits:
commit 79589afe173ba8f17bfbbc6b38f0dfbc5fd9e0c9
Author: Eike Rathke 
AuthorDate: Fri Nov 12 21:59:14 2021 +0100
Commit: Eike Rathke 
CommitDate: Sat Nov 13 00:16:22 2021 +0100

Resolves: tdf#145640 MoveReference...Reorder() there are RPN tokens as well

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

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 9c17554e9dd5..c27c964a533a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3501,126 +3501,138 @@ sc::RefUpdateResult 
ScTokenArray::AdjustReferenceOnMove(
 void ScTokenArray::MoveReferenceColReorder(
 const ScAddress& rPos, SCTAB nTab, SCROW nRow1, SCROW nRow2, const 
sc::ColRowReorderMapType& rColMap )
 {
-FormulaToken** p = pCode.get();
-FormulaToken** pEnd = p + static_cast(nLen);
-for (; p != pEnd; ++p)
+TokenPointers aPtrs( pCode.get(), nLen, pRPN, nRPN);
+for (size_t j=0; j<2; ++j)
 {
-switch ((*p)->GetType())
+FormulaToken** pp = aPtrs.maPointerRange[j].mpStart;
+FormulaToken** pEnd = aPtrs.maPointerRange[j].mpStop;
+for (; pp != pEnd; ++pp)
 {
-case svSingleRef:
-{
-formula::FormulaToken* pToken = *p;
-ScSingleRefData& rRef = *pToken->GetSingleRef();
-ScAddress aAbs = rRef.toAbs(*mxSheetLimits, rPos);
+FormulaToken* p = aPtrs.getHandledToken(j,pp);
+if (!p)
+continue;
 
-if (aAbs.Tab() == nTab && nRow1 <= aAbs.Row() && aAbs.Row() <= 
nRow2)
-{
-// Inside reordered row range.
-sc::ColRowReorderMapType::const_iterator it = 
rColMap.find(aAbs.Col());
-if (it != rColMap.end())
+switch (p->GetType())
+{
+case svSingleRef:
 {
-// This column is reordered.
-SCCOL nNewCol = it->second;
-aAbs.SetCol(nNewCol);
-rRef.SetAddress(*mxSheetLimits, aAbs, rPos);
+ScSingleRefData& rRef = *p->GetSingleRef();
+ScAddress aAbs = rRef.toAbs(*mxSheetLimits, rPos);
+
+if (aAbs.Tab() == nTab && nRow1 <= aAbs.Row() && 
aAbs.Row() <= nRow2)
+{
+// Inside reordered row range.
+sc::ColRowReorderMapType::const_iterator it = 
rColMap.find(aAbs.Col());
+if (it != rColMap.end())
+{
+// This column is reordered.
+SCCOL nNewCol = it->second;
+aAbs.SetCol(nNewCol);
+rRef.SetAddress(*mxSheetLimits, aAbs, rPos);
+}
+}
 }
-}
-}
-break;
-case svDoubleRef:
-{
-formula::FormulaToken* pToken = *p;
-ScComplexRefData& rRef = *pToken->GetDoubleRef();
-ScRange aAbs = rRef.toAbs(*mxSheetLimits, rPos);
+break;
+case svDoubleRef:
+{
+ScComplexRefData& rRef = *p->GetDoubleRef();
+ScRange aAbs = rRef.toAbs(*mxSheetLimits, rPos);
 
-if (aAbs.aStart.Tab() != aAbs.aEnd.Tab())
-// Must be a single-sheet reference.
-break;
+if (aAbs.aStart.Tab() != aAbs.aEnd.Tab())
+// Must be a single-sheet reference.
+break;
 
-if (aAbs.aStart.Col() != aAbs.aEnd.Col())
-// Whole range must fit in a single column.
-break;
+if (aAbs.aStart.Col() != aAbs.aEnd.Col())
+// Whole range must fit in a single column.
+break;
 
-if (aAbs.aStart.Tab() == nTab && nRow1 <= aAbs.aStart.Row() && 
aAbs.aEnd.Row() <= nRow2)
-{
-// Inside reordered row range.
-sc::ColRowReorderMapType::const_iterator it = 
rColMap.find(aAbs.aStart.Col());
-if (it != rColMap.end())
-{
-// This column is reordered.
-SCCOL nNewCol = it->second;
-aAbs.aStart.SetCol(nNewCol);
-aAbs.aEnd.SetCol(nNewCol);
- 

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

2021-11-12 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ae73f0f05aa32f2afc737ab9d4a3e028f7647363
Author: Caolán McNamara 
AuthorDate: Fri Nov 12 10:17:52 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 12 21:33:15 2021 +0100

call GetGetSpecialCharsFunction just once

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 804bbbd50644..dae7b92c9155 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1527,9 +1527,9 @@ IMPL_LINK(SentenceEditWindow_Impl, ToolbarHdl, const 
OString&, rCurItemId, void)
 }
 else if (rCurItemId == "insert")
 {
-if (vcl::GetGetSpecialCharsFunction())
+if (auto pImplFncGetSpecialChars = vcl::GetGetSpecialCharsFunction())
 {
-OUString aChars = 
vcl::GetGetSpecialCharsFunction()(GetDrawingArea(), 
m_xEditEngine->GetStandardFont(0));
+OUString aChars = pImplFncGetSpecialChars(GetDrawingArea(), 
m_xEditEngine->GetStandardFont(0));
 if (!aChars.isEmpty())
 {
 ESelection aCurrentSelection(m_xEditView->GetSelection());


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

2021-11-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |4 +++-
 sc/source/ui/inc/checklistmenu.hxx   |3 ++-
 sc/source/ui/view/gridwin.cxx|8 ++--
 sc/source/ui/view/gridwin2.cxx   |6 --
 4 files changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 3509a42a042db1628acc59dfc13298639745f62e
Author: Caolán McNamara 
AuthorDate: Fri Nov 12 15:39:49 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 12 21:32:56 2021 +0100

Resolves: tdf#145645 pivot table popups don't dismiss when item activated

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index e96f06c4d63d..5fcfa27c0c1b 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -202,7 +202,9 @@ void ScCheckListMenuControl::executeMenuItem(size_t nPos)
 // no action is defined.
 return;
 
-maMenuItems[nPos].mxAction->execute();
+const bool bClosePopup = maMenuItems[nPos].mxAction->execute();
+if (bClosePopup)
+terminateAllPopupMenus();
 }
 
 void ScCheckListMenuControl::setSelectedMenuItem(size_t nPos, bool 
bSubMenuTimer)
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 465a259d5463..302f2bd0b55d 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -62,7 +62,8 @@ public:
 {
 public:
 virtual ~Action() {}
-virtual void execute() = 0;
+// return true to dismiss the popup
+virtual bool execute() = 0;
 };
 
 struct ResultEntry
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5d5e2a3a6667..d850ac042872 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -499,9 +499,12 @@ class AutoFilterAction : public 
ScCheckListMenuControl::Action
 public:
 AutoFilterAction(ScGridWindow* p, ScGridWindow::AutoFilterMode eMode) :
 mpWindow(p), meMode(eMode) {}
-virtual void execute() override
+virtual bool execute() override
 {
 mpWindow->UpdateAutoFilterFromMenu(meMode);
+// RefreshAutoFilterButton manually closes the popup so return
+// false to not attempt a second close
+return false;
 }
 };
 
@@ -512,9 +515,10 @@ class AutoFilterPopupEndAction : public 
ScCheckListMenuControl::Action
 public:
 AutoFilterPopupEndAction(ScGridWindow* p, const ScAddress& rPos) :
 mpWindow(p), maPos(rPos) {}
-virtual void execute() override
+virtual bool execute() override
 {
 mpWindow->RefreshAutoFilterButton(maPos);
+return false; // this is called after the popup has been closed
 }
 };
 
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 0baef4a4aa96..db6c8c6066d3 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -382,9 +382,10 @@ public:
 explicit DPFieldPopupOKAction(ScGridWindow* p) :
 mpGridWindow(p) {}
 
-virtual void execute() override
+virtual bool execute() override
 {
 mpGridWindow->UpdateDPFromFieldPopupMenu();
+return true;
 }
 private:
 VclPtr mpGridWindow;
@@ -404,7 +405,7 @@ public:
 , mpViewShell(pViewShell)
 {}
 
-virtual void execute() override
+virtual bool execute() override
 {
 switch (meType)
 {
@@ -420,6 +421,7 @@ public:
 default:
 ;
 }
+return true;
 }
 
 private:


Re: How to get started with contribution

2021-11-12 Thread Ilmari Lauhakangas

On 12.11.2021 17.44, SMIL THAKUR wrote:
I am Smil Raj Thakur, a Information and Communication Technology 
undergrad, I have just entered my second year at Adani institute of 
Infrastructure Engineering. I am new to open source contributions but I 
am well aware of Flutter, Dart , JAVA, C++ and frontend basics of web 
Development. I would love to contribute to your organisation but could 
you please tell me how to get started ?


Hoping to hear from you soon.

Regards

Smil


I have invited you to an interview.

Ilmari


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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/utils.hxx  |3 +++
 vcl/skia/SkiaHelper.cxx |   35 +++
 vcl/skia/gdiimpl.cxx|   35 ++-
 3 files changed, 40 insertions(+), 33 deletions(-)

New commits:
commit 110fa313628c55fef1d35830358aea7e27c1e3ee
Author: Luboš Luňák 
AuthorDate: Thu Nov 11 20:51:55 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 18:49:39 2021 +0100

get rid of Skia's 'rasterhack' for Invert()

It seems that manually writing a shader that does the same
as SkBlendMode::kDifference works fine even though the blend mode
crashes e.g. on Windows/AMD. So get rid of the memory<->GPU
conversions and use the shader as a workaround.

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

diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 0bcc5989493e..ba479c58f234 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -71,6 +71,9 @@ VCL_DLLPUBLIC sk_sp 
makeCheckedImageSnapshot(sk_sp surface,
 
 inline Size imageSize(const sk_sp& image) { return 
Size(image->width(), image->height()); }
 
+// Do 'paint->setBlendMode(SkBlendMode::kDifference)' (workaround for buggy 
drivers).
+void setBlendModeDifference(SkPaint* paint);
+
 // Must be called in any VCL backend before any Skia functionality is used.
 // If not set, Skia will be disabled.
 VCL_DLLPUBLIC void
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index 458f415befa4..ed04e5f20ec0 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -42,6 +42,7 @@ bool isVCLSkiaEnabled() { return false; }
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -645,11 +646,45 @@ tools::Long maxImageCacheSize()
 return officecfg::Office::Common::Cache::Skia::ImageCacheSize::get();
 }
 
+static sk_sp differenceBlender;
+
+void setBlendModeDifference(SkPaint* paint)
+{
+// This should normally do 
'paint->setBlendMode(SkBlendMode::kDifference);'.
+// But some drivers have a problem with this, namely currently AMD on 
Windows
+// (e.g. 'Vulkan API version: 1.2.170, driver version: 2.0.179, vendor: 
0x1002 (AMD),
+// device: 0x15dd, type: integrated, name: AMD Radeon(TM) Vega 8 Graphics')
+// simply crashes when kDifference is used.
+// Intel also had repaint problems with kDifference (tdf#130430), but it 
seems
+// those do not(?) exist anymore.
+// Interestingly, explicitly writing a shader that does exactly the same 
works fine,
+// so do that.
+if (!differenceBlender)
+{
+const char* diff = R"(
+vec4 main( vec4 src, vec4 dst )
+{
+return vec4(abs( src.r - dst.r ), abs( src.g - dst.g ), abs( 
src.b - dst.b ), dst.a );
+}
+)";
+auto effect = SkRuntimeEffect::MakeForBlender(SkString(diff));
+if (!effect.effect)
+{
+SAL_WARN("vcl.skia",
+ "SKRuntimeEffect::MakeForBlender failed: " << 
effect.errorText.c_str());
+abort();
+}
+differenceBlender = effect.effect->makeBlender(nullptr);
+}
+paint->setBlender(differenceBlender);
+}
+
 void cleanup()
 {
 sharedWindowContext.reset();
 imageCache.clear();
 imageCacheSize = 0;
+differenceBlender.reset();
 }
 
 static SkSurfaceProps commonSurfaceProps;
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 9e2da70323de..fd86928c24c9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1412,16 +1412,6 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon 
const& rPoly, SalInvert eFl
 preDraw();
 SAL_INFO("vcl.skia.trace", "invert(" << this << "): " << rPoly << ":" << 
int(eFlags));
 assert(!mXorMode);
-// Intel Vulkan drivers (up to current 0.401.3889) have a problem
-// with SkBlendMode::kDifference(?) and surfaces wider than 1024 pixels, 
resulting
-// in drawing errors. Work that around by fetching the relevant part of 
the surface
-// and drawing using CPU.
-bool rasterHack = (isGPU() && getVendor() == DriverBlocklist::VendorIntel 
&& !mXorMode);
-// BackendTest::testDrawInvertTrackFrameWithRectangle() also has a problem
-// with SkBlendMode::kDifference on AMD, leading to crashes or even
-// driver instability. Also work around by drawing using CPU.
-if (isGPU() && getVendor() == DriverBlocklist::VendorAMD && !mXorMode)
-rasterHack = true;
 SkPath aPath;
 aPath.incReserve(rPoly.count());
 addPolygonToPath(rPoly, aPath);
@@ -1429,6 +1419,7 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon 
const& rPoly, SalInvert eFl
 addUpdateRegion(aPath.getBounds());
 SkAutoCanvasRestore autoRestore(getDrawCanvas(), true);
 SkPaint aPaint;
+setBlendModeDifference(&aPaint);
 // TrackFrame just inverts a dashed path around the 

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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/skia/gdiimpl.cxx |   62 ---
 1 file changed, 30 insertions(+), 32 deletions(-)

New commits:
commit 754697f0dcd63e1f0ce2edd70ab8b42b1b4d4484
Author: Luboš Luňák 
AuthorDate: Thu Nov 11 16:23:53 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 18:49:19 2021 +0100

revert part of 'loplugin:flatten' in Skia code

The automated code flattening may make sense in old spaghetti code,
but this is new code, and it's structured the way it makes sense.
Both those if's are logically just a part of a larger function
and bailing out sooner is at least conceptually wrong (and the moment
I add more code there, I'd need to revert anyway).

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 1fb1518386d0..9e2da70323de 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -455,23 +455,22 @@ void SkiaSalGraphicsImpl::postDraw()
 }
 SkiaZone::leave(); // matched in preDraw()
 // If there's a problem with the GPU context, abort.
-GrDirectContext* context = 
GrAsDirectContext(mSurface->getCanvas()->recordingContext());
-if (!context)
-return;
-
-// Running out of memory on the GPU technically could be possibly 
recoverable,
-// but we don't know the exact status of the surface (and what has or has 
not been drawn to it),
-// so in practice this is unrecoverable without possible data loss.
-if (context->oomed())
-{
-SAL_WARN("vcl.skia", "GPU context has run out of memory, aborting.");
-abort();
-}
-// Unrecoverable problem.
-if (context->abandoned())
+if (GrDirectContext* context = 
GrAsDirectContext(mSurface->getCanvas()->recordingContext()))
 {
-SAL_WARN("vcl.skia", "GPU context has been abandoned, aborting.");
-abort();
+// Running out of memory on the GPU technically could be possibly 
recoverable,
+// but we don't know the exact status of the surface (and what has or 
has not been drawn to it),
+// so in practice this is unrecoverable without possible data loss.
+if (context->oomed())
+{
+SAL_WARN("vcl.skia", "GPU context has run out of memory, 
aborting.");
+abort();
+}
+// Unrecoverable problem.
+if (context->abandoned())
+{
+SAL_WARN("vcl.skia", "GPU context has been abandoned, aborting.");
+abort();
+}
 }
 }
 
@@ -1061,22 +1060,21 @@ static void roundPolygonPoints(basegfx::B2DPolyPolygon& 
polyPolygon)
 
 void SkiaSalGraphicsImpl::checkPendingDrawing()
 {
-if (mLastPolyPolygonInfo.polygons.size() == 0)
-return;
-
-// Flush any pending polygon drawing.
-basegfx::B2DPolyPolygonVector polygons;
-std::swap(polygons, mLastPolyPolygonInfo.polygons);
-double transparency = mLastPolyPolygonInfo.transparency;
-mLastPolyPolygonInfo.bounds.reset();
-if (polygons.size() == 1)
-performDrawPolyPolygon(polygons.front(), transparency, true);
-else
-{
-for (basegfx::B2DPolyPolygon& p : polygons)
-roundPolygonPoints(p);
-
performDrawPolyPolygon(basegfx::utils::mergeToSinglePolyPolygon(polygons), 
transparency,
-   true);
+if (mLastPolyPolygonInfo.polygons.size() != 0)
+{ // Flush any pending polygon drawing.
+basegfx::B2DPolyPolygonVector polygons;
+std::swap(polygons, mLastPolyPolygonInfo.polygons);
+double transparency = mLastPolyPolygonInfo.transparency;
+mLastPolyPolygonInfo.bounds.reset();
+if (polygons.size() == 1)
+performDrawPolyPolygon(polygons.front(), transparency, true);
+else
+{
+for (basegfx::B2DPolyPolygon& p : polygons)
+roundPolygonPoints(p);
+
performDrawPolyPolygon(basegfx::utils::mergeToSinglePolyPolygon(polygons), 
transparency,
+   true);
+}
 }
 }
 


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

2021-11-12 Thread Noel Grandin (via logerrit)
 framework/inc/xml/toolboxconfigurationdefines.hxx   |   18 +-
 framework/source/fwe/xml/toolboxdocumenthandler.cxx |6 +--
 include/rtl/ustring.hxx |   35 
 3 files changed, 47 insertions(+), 12 deletions(-)

New commits:
commit a4d4286a6ae5ad7f57db4f34380ed170b92ced06
Author: Noel Grandin 
AuthorDate: Fri Nov 12 12:20:18 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 12 18:37:38 2021 +0100

introduce OUStringConstExpr

so we can declare compile-time constant arrays and structs
containing OUStringLiteral

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

diff --git a/framework/inc/xml/toolboxconfigurationdefines.hxx 
b/framework/inc/xml/toolboxconfigurationdefines.hxx
index c84adff58e8b..b4aca76a6bef 100644
--- a/framework/inc/xml/toolboxconfigurationdefines.hxx
+++ b/framework/inc/xml/toolboxconfigurationdefines.hxx
@@ -52,14 +52,14 @@
 #define ATTRIBUTE_BOOLEAN_TRUE  "true"
 #define ATTRIBUTE_BOOLEAN_FALSE "false"
 
-#define ATTRIBUTE_ITEMSTYLE_RADIO   "radio"
-#define ATTRIBUTE_ITEMSTYLE_AUTO"auto"
-#define ATTRIBUTE_ITEMSTYLE_LEFT"left"
-#define ATTRIBUTE_ITEMSTYLE_AUTOSIZE"autosize"
-#define ATTRIBUTE_ITEMSTYLE_DROPDOWN"dropdown"
-#define ATTRIBUTE_ITEMSTYLE_REPEAT  "repeat"
-#define ATTRIBUTE_ITEMSTYLE_TEXT"text"
-#define ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY"dropdownonly"
-#define ATTRIBUTE_ITEMSTYLE_IMAGE"image"
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_RADIO = u"radio";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_AUTO = u"auto";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_LEFT = u"left";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_AUTOSIZE = u"autosize";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_DROPDOWN = u"dropdown";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_REPEAT = u"repeat";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_TEXT = u"text";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY = u"dropdownonly";
+constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_IMAGE = u"image";
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx 
b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 4fd152a6f03e..11385edd9b5c 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -85,12 +85,12 @@ namespace {
 struct ToolboxStyleItem
 {
 sal_Int16 nBit;
-const char* attrName;
+rtl::OUStringConstExpr attrName;
 };
 
 }
 
-const ToolboxStyleItem Styles[ ] = {
+constexpr ToolboxStyleItem Styles[ ] = {
 { css::ui::ItemStyle::RADIO_CHECK,   ATTRIBUTE_ITEMSTYLE_RADIO },
 { css::ui::ItemStyle::ALIGN_LEFT,ATTRIBUTE_ITEMSTYLE_LEFT },
 { css::ui::ItemStyle::AUTO_SIZE, ATTRIBUTE_ITEMSTYLE_AUTO },
@@ -703,7 +703,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
 {
 if ( !aValue.isEmpty() )
 aValue.append(" ");
-aValue.appendAscii( pStyle->attrName );
+aValue.append( OUString(pStyle->attrName) );
 }
 }
 pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_ITEMSTYLE,
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 1a5ff2d97d6c..6cf92e1d3599 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -84,6 +84,7 @@ template class SAL_WARN_UNUSED OUStringLiteral 
{
 static_assert(N != 0);
 static_assert(N - 1 <= std::numeric_limits::max(), "literal too 
long");
 friend class OUString;
+friend class OUStringConstExpr;
 
 public:
 #if HAVE_CPP_CONSTEVAL
@@ -138,6 +139,34 @@ template struct 
ExceptCharArrayDetector> {};
 }
 #endif
 
+/**
+  This is intended to be used when declaring compile-time-constant structs or 
arrays
+  that can be initialised from named OUStringLiteral e.g.
+
+constexpr OUStringLiteral AAA = u"aaa";
+constexpr OUStringLiteral BBB = u"bbb";
+constexpr OUStringConstExpr FOO[] { AAA, BBB };
+*/
+class OUString;
+class OUStringConstExpr
+{
+public:
+template constexpr OUStringConstExpr(OUStringLiteral 
const & literal):
+pData(const_cast(&literal.str)) {}
+
+// prevent mis-use
+template constexpr OUStringConstExpr(OUStringLiteral && 
literal)
+= delete;
+
+// no destructor necessary because we know we are pointing at a 
compile-time
+// constant OUStringLiteral, which bypasses ref-counting.
+
+inline operator OUString() const;
+
+private:
+rtl_uString* pData;
+};
+
 /// @endcond
 #endif
 
@@ -3268,6 +3297,11 @@ private:
 
 };
 
+#if defined LIBO_INTERNAL_ONLY
+// Can only define this after we define OUString
+inline OUStringConstExpr::operator OUString() const { return 
OUString::unacquired(&pData); }
+#endif
+

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 16be302fededaf2cc6e82701bda6dcba6e3fa4d3
Author: Olivier Hallot 
AuthorDate: Fri Nov 12 19:15:25 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Nov 12 18:15:25 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 79548b2894c85265f0e4cb9ec74c761c1f5955ed
  - Improvement in  English

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

diff --git a/helpcontent2 b/helpcontent2
index 6d3d8f1f5279..79548b2894c8 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6d3d8f1f5279595d78267ed830cc0abb6babccb3
+Subproject commit 79548b2894c85265f0e4cb9ec74c761c1f5955ed


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

2021-11-12 Thread Olivier Hallot (via logerrit)
 source/text/shared/05/new_help.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79548b2894c85265f0e4cb9ec74c761c1f5955ed
Author: Olivier Hallot 
AuthorDate: Fri Nov 12 19:07:35 2021 +0200
Commit: Olivier Hallot 
CommitDate: Fri Nov 12 18:15:24 2021 +0100

Improvement in  English

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

diff --git a/source/text/shared/05/new_help.xhp 
b/source/text/shared/05/new_help.xhp
index b55185ead..ca21fd884 100644
--- a/source/text/shared/05/new_help.xhp
+++ b/source/text/shared/05/new_help.xhp
@@ -131,7 +131,7 @@
 Press Enter.
 
 
-To find the 
next occurrence of the search term on the page, click on the Up 
arrow or Down arrow to find the previous or next 
occurrence.
+To find the 
previous occurrence of the search term on the page, click on the Up 
arrow. To find the next occurrence, click on the Down 
arrow.
 Contents general information
 
 


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

2021-11-12 Thread Julien Nabet (via logerrit)
 connectivity/source/drivers/evoab2/NResultSet.cxx |   41 +++
 connectivity/source/drivers/evoab2/NStatement.cxx |   79 +-
 2 files changed, 90 insertions(+), 30 deletions(-)

New commits:
commit 02244b3b651465e65ce192c6e82e91aba44dcd6e
Author: Julien Nabet 
AuthorDate: Fri Nov 12 14:56:06 2021 +0100
Commit: Julien Nabet 
CommitDate: Fri Nov 12 18:00:21 2021 +0100

Replace REGISTER_PROP in connectivity/evoab2

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

diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx 
b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 9c9e1f302a05..c0b31cc100e4 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -618,19 +618,34 @@ OEvoabResultSet::OEvoabResultSet( OCommonStatement* 
pStmt, OEvoabConnection *pCo
 else
 m_pVersionHelper  = std::make_unique();
 
-#define REGISTER_PROP( id, member ) \
-registerProperty( \
-OMetaConnection::getPropMap().getNameByIndex( id ), \
-id, \
-PropertyAttribute::READONLY, \
-&member, \
-cppu::UnoType::get() \
-);
-
-REGISTER_PROP( PROPERTY_ID_FETCHSIZE, m_nFetchSize );
-REGISTER_PROP( PROPERTY_ID_RESULTSETTYPE, m_nResultSetType );
-REGISTER_PROP( PROPERTY_ID_FETCHDIRECTION, m_nFetchDirection );
-REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency );
+registerProperty(
+OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE),
+PROPERTY_ID_FETCHSIZE,
+PropertyAttribute::READONLY,
+&m_nFetchSize,
+cppu::UnoType::get()
+);
+registerProperty(
+
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE),
+PROPERTY_ID_RESULTSETTYPE,
+PropertyAttribute::READONLY,
+&m_nResultSetType,
+cppu::UnoType::get()
+);
+registerProperty(
+
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION),
+PROPERTY_ID_FETCHDIRECTION,
+PropertyAttribute::READONLY,
+&m_nFetchDirection,
+cppu::UnoType::get()
+);
+registerProperty(
+
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY),
+PROPERTY_ID_RESULTSETCONCURRENCY,
+PropertyAttribute::READONLY,
+&m_nResultSetConcurrency,
+cppu::UnoType::get()
+);
 }
 
 OEvoabResultSet::~OEvoabResultSet()
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx 
b/connectivity/source/drivers/evoab2/NStatement.cxx
index f41487951659..542ee1de8d45 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -89,24 +89,69 @@ OCommonStatement::OCommonStatement(OEvoabConnection* 
_pConnection)
 , m_nResultSetConcurrency(ResultSetConcurrency::UPDATABLE)
 , m_bEscapeProcessing(true)
 {
-#define REGISTER_PROP( id, member ) \
-registerProperty( \
-OMetaConnection::getPropMap().getNameByIndex( id ), \
-id, \
-0, \
-&member, \
-cppu::UnoType::get() \
+registerProperty(
+OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME),
+PROPERTY_ID_CURSORNAME,
+0,
+&m_aCursorName,
+cppu::UnoType::get()
+);
+registerProperty(
+OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE),
+PROPERTY_ID_MAXFIELDSIZE,
+0,
+&m_nMaxFieldSize,
+cppu::UnoType::get()
+);
+registerProperty(
+OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS),
+PROPERTY_ID_MAXROWS,
+0,
+&m_nMaxRows,
+cppu::UnoType::get()
+);
+registerProperty(
+OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT),
+PROPERTY_ID_QUERYTIMEOUT,
+0,
+&m_nQueryTimeOut,
+cppu::UnoType::get()
+);
+registerProperty(
+OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE),
+PROPERTY_ID_FETCHSIZE,
+0,
+&m_nFetchSize,
+cppu::UnoType::get()
+);
+registerProperty(
+
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE),
+PROPERTY_ID_RESULTSETTYPE,
+0,
+&m_nResultSetType,
+cppu::UnoType::get()
+);
+registerProperty(
+
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION),
+PROPERTY_ID_FETCHDIRECTION,
+0,
+&m_nFetchDirection,
+cppu::UnoType::get()
+);
+registerProperty(
+
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING),
+PROPERTY_ID_ESCAPEPROCESSING,
+0,
+&m_bEscapeProcess

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

2021-11-12 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/browser/formadapter.cxx  |  117 +--
 dbaccess/source/ui/browser/sbamultiplex.cxx |  201 ++-
 dbaccess/source/ui/inc/sbamultiplex.hxx |  291 +++-
 3 files changed, 457 insertions(+), 152 deletions(-)

New commits:
commit d2fa58b628b3f48c1c8941dbbd9d2faadddeef99
Author: Julien Nabet 
AuthorDate: Fri Nov 12 12:55:33 2021 +0100
Commit: Julien Nabet 
CommitDate: Fri Nov 12 18:00:01 2021 +0100

Replace some macros in dbaccess part 9

Remove IMPLEMENT_LISTENER_MULTIPLEXER_CORE + 
BEGIN_DECLARE_LISTENER_MULTIPLEXER
+ END_DECLARE_LISTENER_MULTIPLEXER + DECLARE_MULTIPLEXER_BOOL_METHOD + 
DECLARE_MULTIPLEXER_VOID_METHOD
+ STOP_MULTIPLEXER_LISTENING + START_PROPERTY_MULTIPLEXER_LISTENING + 
STOP_PROPERTY_MULTIPLEXER_LISTENING
+ START_MULTIPLEXER_LISTENING

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

diff --git a/dbaccess/source/ui/browser/formadapter.cxx 
b/dbaccess/source/ui/browser/formadapter.cxx
index 344b3ff8dd4d..20314106988b 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -89,13 +89,42 @@ Any SAL_CALL SbaXFormAdapter::queryInterface(const Type& 
_rType)
 void SbaXFormAdapter::StopListening()
 {
 // log off all our multiplexers
-STOP_MULTIPLEXER_LISTENING(LoadListener, m_aLoadListeners, 
css::form::XLoadable, m_xMainForm);
-STOP_MULTIPLEXER_LISTENING(RowSetListener, m_aRowSetListeners, 
css::sdbc::XRowSet, m_xMainForm);
-STOP_MULTIPLEXER_LISTENING(RowSetApproveListener, 
m_aRowSetApproveListeners, css::sdb::XRowSetApproveBroadcaster, m_xMainForm);
-STOP_MULTIPLEXER_LISTENING(SQLErrorListener, m_aErrorListeners, 
css::sdb::XSQLErrorBroadcaster, m_xMainForm);
-STOP_MULTIPLEXER_LISTENING(SubmitListener, m_aSubmitListeners, 
css::form::XSubmit, m_xMainForm);
-STOP_MULTIPLEXER_LISTENING(ResetListener, m_aResetListeners, 
css::form::XReset, m_xMainForm);
-
+if (m_aLoadListeners.getLength())
+{
+css::uno::Reference< css::form::XLoadable > xBroadcaster(m_xMainForm, 
css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeLoadListener(&m_aLoadListeners);
+}
+if (m_aRowSetListeners.getLength())
+{
+css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, 
css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeRowSetListener(&m_aRowSetListeners);
+}
+if (m_aRowSetApproveListeners.getLength())
+{
+css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+
xBroadcaster->removeRowSetApproveListener(&m_aRowSetApproveListeners);
+}
+if (m_aErrorListeners.getLength())
+{
+css::uno::Reference< css::sdb::XSQLErrorBroadcaster > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeSQLErrorListener(&m_aErrorListeners);
+}
+if (m_aSubmitListeners.getLength())
+{
+css::uno::Reference< css::form::XSubmit > xBroadcaster(m_xMainForm, 
css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeSubmitListener(&m_aSubmitListeners);
+}
+if (m_aResetListeners.getLength())
+{
+css::uno::Reference< css::form::XReset > xBroadcaster(m_xMainForm, 
css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeResetListener(&m_aResetListeners);
+}
 if (m_aParameterListeners.getLength())
 {
 Reference< css::form::XDatabaseParameterBroadcaster >  
xBroadcaster(m_xMainForm, UNO_QUERY);
@@ -103,8 +132,20 @@ void SbaXFormAdapter::StopListening()
 xBroadcaster->removeParameterListener(&m_aParameterListeners);
 }
 
-STOP_PROPERTY_MULTIPLEXER_LISTENING(PropertyChangeListener, 
m_aPropertyChangeListeners, css::beans::XPropertySet, m_xMainForm);
-STOP_PROPERTY_MULTIPLEXER_LISTENING(VetoableChangeListener, 
m_aVetoablePropertyChangeListeners, css::beans::XPropertySet, m_xMainForm);
+if (m_aPropertyChangeListeners.getOverallLen())
+{
+css::uno::Reference< css::beans::XPropertySet > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removePropertyChangeListener(OUString(), 
&m_aPropertyChangeListeners);
+}
+
+if (m_aVetoablePropertyChangeListeners.getOverallLen())
+{
+css::uno::Reference< css::beans::XPropertySet > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeVetoableChangeListener(OUString(), 
&m_aVetoablePropertyChangeListeners);
+}
+
 if (m_aPropertiesChangeListeners.getLength())
 {
 Reference< css::beans::XMultiPropertySet >

[Libreoffice-commits] core.git: Branch 'feature/wasm' - desktop/source framework/source package/source sax/source vcl/source xmloff/source

2021-11-12 Thread Armin Le Grand (Allotropia) (via logerrit)
 desktop/source/app/cmdlineargs.cxx  |5 +++--
 framework/source/helper/statusindicator.cxx |   10 +-
 package/source/zipapi/ZipFile.cxx   |2 ++
 sax/source/fastparser/fastparser.cxx|4 
 vcl/source/app/svapp.cxx|2 ++
 xmloff/source/core/xmlimp.cxx   |3 +++
 6 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit 349f8921bde12f16ad6164ae087f0db1b519da8b
Author: Armin Le Grand (Allotropia) 
AuthorDate: Fri Nov 12 17:16:32 2021 +0100
Commit: Armin Le Grand (Allotropia) 
CommitDate: Fri Nov 12 17:16:32 2021 +0100

WASM: Make test file loading work

Change-Id: Ic34104534c3e0e73791cf867bfb2e1246dc79cf8

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 5f495d5105ec..0b3a9598ea88 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -298,11 +298,12 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 
 const OUString aWasmTestFile("file:///instdir/example.odt");
 ::osl::File aFile(aWasmTestFile);
-SAL_INFO("desktop.app", "Testfile: " << aWasmTestFile);
+SAL_INFO("wasm", "Testfile: " << aWasmTestFile);
 if(aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None)
 {
-SAL_INFO("desktop.app", "Testfile exists :-)");
+SAL_INFO("wasm", "Testfile exists :-)");
 aFile.close();
+m_writer = false; // Writer startup not needed when file exists
 m_openlist.push_back(aWasmTestFile);
 }
 
diff --git a/framework/source/helper/statusindicator.cxx 
b/framework/source/helper/statusindicator.cxx
index 2deb4a0ae5b2..7dcc9018e1f3 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -40,7 +40,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText, 
sal_Int32 nRange)
 
 comphelper::LibreOfficeKit::statusIndicatorStart(sText);
 }
-#if !defined(IOS) && !defined(ANDROID)
+#if !defined(IOS) && !defined(ANDROID) && !defined(EMSCRIPTEN)
 css::uno::Reference 
xFactory(m_xFactory);
 if (xFactory.is())
 {
@@ -58,7 +58,7 @@ void SAL_CALL StatusIndicator::end()
 {
 comphelper::LibreOfficeKit::statusIndicatorFinish();
 }
-#if !defined(IOS) && !defined(ANDROID)
+#if !defined(IOS) && !defined(ANDROID) && !defined(EMSCRIPTEN)
 css::uno::Reference 
xFactory(m_xFactory);
 if (xFactory.is())
 {
@@ -72,7 +72,7 @@ void SAL_CALL StatusIndicator::reset()
 {
 if (comphelper::LibreOfficeKit::isActive())
 return;
-#if !defined(IOS) && !defined(ANDROID)
+#if !defined(IOS) && !defined(ANDROID) && !defined(EMSCRIPTEN)
 css::uno::Reference 
xFactory(m_xFactory);
 if (xFactory.is())
 {
@@ -86,7 +86,7 @@ void SAL_CALL StatusIndicator::setText(const OUString& sText)
 {
 if (comphelper::LibreOfficeKit::isActive())
 return;
-#if !defined(IOS) && !defined(ANDROID)
+#if !defined(IOS) && !defined(ANDROID) && !defined(EMSCRIPTEN)
 css::uno::Reference 
xFactory(m_xFactory);
 if (xFactory.is())
 {
@@ -113,7 +113,7 @@ void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue)
 }
 return;
 }
-#if !defined(IOS) && !defined(ANDROID)
+#if !defined(IOS) && !defined(ANDROID) && !defined(EMSCRIPTEN)
 css::uno::Reference 
xFactory(m_xFactory);
 if (xFactory.is())
 {
diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 0869d58931c9..db004669cffa 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -652,9 +652,11 @@ uno::Reference< XInputStream > 
ZipFile::createStreamForZipEntry(
 uno::Reference xBufStream;
 static const sal_Int32 nThreadingThreshold = 1;
 
+#ifndef EMSCRIPTEN
 if( xSrcStream->available() > nThreadingThreshold )
 xBufStream = new XBufferedThreadedStream(xSrcStream, 
xSrcStream->getSize());
 else
+#endif
 xBufStream = new XBufferedStream(xSrcStream);
 
 return xBufStream;
diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 97435e2219ea..bc4e00ba0349 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -838,6 +838,9 @@ void FastSaxParserImpl::parseStream(const InputSource& 
rStructSource)
 rEntity.mxDocumentHandler->startDocument();
 }
 
+#ifdef EMSCRIPTEN
+rEntity.mbEnableThreads = false;
+#else
 if (!getenv("SAX_DISABLE_THREADS") && !m_bDisableThreadedParser)
 {
 Reference 
xSeekable(rEntity.maStructSource.aInputStream, UNO_QUERY);
@@ -845,6 +848,7 @@ void FastSaxParserImpl::parseStream(const InputSource& 
rStructSource)
 rEntity.mbEnableThreads = (xSeekable.is() && xSeekable->getLength() > 
1)
 || (rEntity.maStructSource.aInputStream->available() > 1);
 }
+#endif
 
 if (rEntity.mbEnableThreads)
 {
diff --git a/vcl/s

How to get started with contribution

2021-11-12 Thread SMIL THAKUR
Respected sir/madam,
I am Smil Raj Thakur, a Information and Communication Technology undergrad, I 
have just entered my second year at Adani institute of Infrastructure 
Engineering. I am new to open source contributions but I am well aware of 
Flutter, Dart , JAVA, C++ and frontend basics of web Development. I would love 
to contribute to your organisation but could you please tell me how to get 
started ?

Hoping to hear from you soon.
Regards
Smil


Sent from Mail for Windows



[Libreoffice-commits] core.git: helpcontent2

2021-11-12 Thread flywire (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5f8dc0a2e1ff065978881913156b3ba451231793
Author: flywire 
AuthorDate: Fri Nov 12 17:47:01 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Nov 12 16:47:01 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 6d3d8f1f5279595d78267ed830cc0abb6babccb3
  - Simplify location description

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

diff --git a/helpcontent2 b/helpcontent2
index b902fbcc87b0..6d3d8f1f5279 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b902fbcc87b0baf76b3dd501f0feff40bb1f3711
+Subproject commit 6d3d8f1f5279595d78267ed830cc0abb6babccb3


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

2021-11-12 Thread flywire (via logerrit)
 Package_html_media.mk |1 
 source/media/helpimg/sbasic/Library-Container.svg |  130 ++
 source/text/sbasic/python/python_locations.xhp|   29 +++-
 3 files changed, 150 insertions(+), 10 deletions(-)

New commits:
commit 6d3d8f1f5279595d78267ed830cc0abb6babccb3
Author: flywire 
AuthorDate: Fri Nov 5 13:25:45 2021 +0200
Commit: Olivier Hallot 
CommitDate: Fri Nov 12 16:46:58 2021 +0100

Simplify location description

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

diff --git a/Package_html_media.mk b/Package_html_media.mk
index 25ddb7910..66cd339f1 100644
--- a/Package_html_media.mk
+++ b/Package_html_media.mk
@@ -134,6 +134,7 @@ $(eval $(call 
gb_Package_add_files_with_dir,helpcontent2_html_media,$(LIBO_SHARE
 helpimg/sbasic/If_statement.svg \
 helpimg/sbasic/Input_statement.svg \
 helpimg/sbasic/LetSet_statement.svg \
+helpimg/sbasic/Library-Container.svg \
 helpimg/sbasic/Line-Input_statement.svg \
 helpimg/sbasic/MkDir_statement.svg \
 helpimg/sbasic/On-Error_statement.svg \
diff --git a/source/media/helpimg/sbasic/Library-Container.svg 
b/source/media/helpimg/sbasic/Library-Container.svg
new file mode 100644
index 0..b64eb8f72
--- /dev/null
+++ b/source/media/helpimg/sbasic/Library-Container.svg
@@ -0,0 +1,130 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+http://www.w3.org/2000/svg"; 
xmlns:ooo="http://xml.openoffice.org/svg/export"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:presentation="http://sun.com/xmlns/staroffice/presentation"; 
xmlns:smil="http://www.w3.org/2001/SMIL20/"; 
xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" 
xml:space="preserve">
+ 
+  
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+ 
+ 
+  
+   
+
+
+
+
+Library Container
+   
+  
+  
+   
+
+
+
+Module A
+   
+  
+  
+   
+
+
+
+Library B
+   
+  
+  
+   
+
+
+
+Library C
+   
+  
+  
+   
+
+
+
+Module 1
+   
+  
+  
+   
+
+
+
+Module 2
+   
+  
+  
+   
+
+
+
+Macro 1
+   
+  
+  
+   
+
+
+
+Macro 2
+   
+  
+ 
+
\ No newline at end of file
diff --git a/source/text/sbasic/python/python_locations.xhp 
b/source/text/sbasic/python/python_locations.xhp
index 4ec027b43..6a5faa544 100644
--- a/source/text/sbasic/python/python_locations.xhp
+++ b/source/text/sbasic/python/python_locations.xhp
@@ -18,13 +18,28 @@
 
 
 Python 
Scripts Organization and Location
-The Python script files are stored in the filesystem, in 
folders controlled by %PRODUCTNAME. The macros can be started at installation, 
user or file level.
+%PRODUCTNAME macros are grouped in module files, modules are 
usually grouped in library folders, and libraries are grouped in library 
containers although containers can contain modules too.
+A library is 
used as a major grouping for either an entire category of macros, or for an 
entire application. Modules usually split functionality, such as user 
interaction and calculations. Individual macros are subroutines and functions. 
The Figure below shows an example of the hierarchical structure of macro 
libraries in %PRODUCTNAME.
+Library Container 
diagram
+Figure: Macro Library 
hierarchy
+The containers 
are accessible in all %PRODUCTNAME programs through the user interface. Go to 
Tools > Macros > Organize Macros > Python, to open the 
Python Macros dialog.
+Three library 
containers are shown in the Macro From list:
+
+
+  My 
Macros: personal macros available for the %PRODUCTNAME user
+
+
+  %PRODUCTNAME Macros: system macros distributed 
with LibreOffice for every computer user
+
+
+  Document macros:  every document can contain macro 
libraries available in that document for all users
+
+
 
 Python Script Locations
 Refer to Getting Session Information in order 
to get programmatic access to Python script locations.
-%PRODUCTNAME Macros container
+%PRODUCTNAME Macros
 Existing macros in 
this location (container) were copied by the installation program and are 
available to every computer user, and any open document can access macros 
stored the container. You need administrative rights to store or edit macros 
here.
-
 The %PRODUCTNAME  
Macros container location in the file system depends on the operating 
system:
 
 
@@ -48,13 +63,7 @@
 Document macros
 Docume

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

2021-11-12 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/sqledit.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 942c8654648ab18a32b00eb686ce04d9ee668617
Author: Caolán McNamara 
AuthorDate: Fri Nov 12 12:23:05 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 12 16:38:16 2021 +0100

insert special character in sql view in dbaccess using an arbitrary font

The font to use in the editengine is set with the fallback list notation
"Font1;Font2;Font3" and while SvxCharacterMap::SetCharFont explicitly has...

{
// first get the underlying info in order to get font names
// like "Times New Roman;Times" resolved
vcl::Font aTmp(m_xVirDev->GetFontMetric(rFont));
}

which is supposed to resolve to what the physical font is, it appears
that since the ancient merge of:

commit 2f382d6c2579a25c68dbd121af7f1f5dc7ec9852
Date:   Thu Mar 27 16:59:30 2003 +

MWS_SRX644: migrate branch mws_srx644 -> HEAD

a change was included of:

-// Fontdaten ermitteln und setzen
-aMetric.SetName( pMetric->maName );
+// set aMetric with info from font
+aMetric.SetName( maFont.GetName() );

which means that font names like "Times:Times New Roman" appear in the
FontMetric for the font and not the font name of the physical font that
the metric describes.

That doesn't look right to me, but rather than get bogged down in
changing that and the undoubtedly infinite chain of knock on problems
that will trigger just start with a simple font name here not the
fallback list.

The font is "Liberation Mono;etc;etc" so the first one is certain to be
available.

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

diff --git a/dbaccess/source/ui/control/sqledit.cxx 
b/dbaccess/source/ui/control/sqledit.cxx
index 7f86d8d01bc0..5ebb87152684 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -90,7 +90,7 @@ void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool)
 OUString 
sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString()));
 if (sFontName.isEmpty())
 {
-vcl::Font 
aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, 
Application::GetSettings().GetUILanguageTag().getLanguageType(), 
GetDefaultFontFlags::NONE));
+vcl::Font 
aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, 
Application::GetSettings().GetUILanguageTag().getLanguageType(), 
GetDefaultFontFlags::OnlyOne));
 sFontName = aTmpFont.GetFamilyName();
 }
 


Re: Regarding participation in GSoC 2022

2021-11-12 Thread Ilmari Lauhakangas

On 12.11.2021 14.39, Casafurix wrote:

Hello!
I am Agnibha Sarkar, an Electronics and Telecommunication undergrad. I 
am currently in my Second/Sophomore Year at Vishwakarma Institute Of 
Technology, India. I have recently participated in HacktoberFest 2021, 
and was successful in contributing to the program and winning the prized 
swags. But, I believe open-source is more than just winning swags, it's 
more about getting to learn and implement new technologies and ideas to 
supersede the existing technologies and create new and better 
innovations, therefore, I still consider myself a beginner in the 
development field.


I am currently a user and simultaneous learner of:

  * Front-end trinity of web-development (HTML, CSS, JavaScript)
  * React
  * Flutter and Dart (Basics of app development)
  * Java
  * Python

The following are my handles on Linkedin and GitHub:

  * Linkedin: https://www.linkedin.com/in/agnibha-sarkar-8143161b8/

  * GitHub: https://github.com/casafurix 


I would love to contribute to your organization for GSoC 2022, but could 
you please suggest to me on how to get started?


If you knew C++, I would invite you to an interview. If someone else has 
other ideas, feel free to start mentoring.


Ilmari


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

2021-11-12 Thread Mike Kaganski (via logerrit)
 include/com/sun/star/uno/Sequence.h |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3e8214734f9695d7f16c4a37f1a497aeb229d677
Author: Mike Kaganski 
AuthorDate: Fri Nov 12 15:49:57 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Nov 12 16:01:37 2021 +0100

Add a comment clarifying intended replacement for non-const operator[]

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

diff --git a/include/com/sun/star/uno/Sequence.h 
b/include/com/sun/star/uno/Sequence.h
index b557ec87b4ca..4f481914c52b 100644
--- a/include/com/sun/star/uno/Sequence.h
+++ b/include/com/sun/star/uno/Sequence.h
@@ -217,6 +217,8 @@ public:
 */
 inline E const * end() const;
 
+// Non-const operator[] is not available in internal code. Consider explicit 
use
+// of getArray(), out of tight loops if possible to avoid unneeded COW 
overhead.
 #if !defined LIBO_INTERNAL_ONLY
 /** Non-const index operator: Obtains a reference to element indexed at
 given position.


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

2021-11-12 Thread Regina Henschel (via logerrit)
 svx/qa/unit/data/tdf140321_Matte_import.ppt  |binary
 svx/qa/unit/data/tdf140321_material_specular.odp |binary
 svx/qa/unit/data/tdf140321_metal.odp |binary
 svx/qa/unit/data/tdf140321_phong.odp |binary
 svx/qa/unit/svdraw.cxx   |  101 +++
 5 files changed, 101 insertions(+)

New commits:
commit 87e5caca7d3133a32d92503bfa8e5a1409545187
Author: Regina Henschel 
AuthorDate: Wed Nov 10 22:34:07 2021 +0100
Commit: Regina Henschel 
CommitDate: Fri Nov 12 15:55:52 2021 +0100

tdf#143021 unit test enable 'matte' extrusion surface

This adds the missing unit test for commmit
70a4cb766ed356bc17433ac1673e977bb0bf3d2f.

Thanks to Tomaž for extending the test framework to 3D.

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

diff --git a/svx/qa/unit/data/tdf140321_Matte_import.ppt 
b/svx/qa/unit/data/tdf140321_Matte_import.ppt
new file mode 100644
index ..83e790fd414f
Binary files /dev/null and b/svx/qa/unit/data/tdf140321_Matte_import.ppt differ
diff --git a/svx/qa/unit/data/tdf140321_material_specular.odp 
b/svx/qa/unit/data/tdf140321_material_specular.odp
new file mode 100644
index ..03869914f54d
Binary files /dev/null and b/svx/qa/unit/data/tdf140321_material_specular.odp 
differ
diff --git a/svx/qa/unit/data/tdf140321_metal.odp 
b/svx/qa/unit/data/tdf140321_metal.odp
new file mode 100644
index ..a81ee0dfbcd1
Binary files /dev/null and b/svx/qa/unit/data/tdf140321_metal.odp differ
diff --git a/svx/qa/unit/data/tdf140321_phong.odp 
b/svx/qa/unit/data/tdf140321_phong.odp
new file mode 100644
index ..989a0848532c
Binary files /dev/null and b/svx/qa/unit/data/tdf140321_phong.odp differ
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index 5050136991bf..f213af12f7de 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -48,6 +48,7 @@ class SvdrawTest : public test::BootstrapFixture, public 
unotest::MacrosTest, pu
 {
 protected:
 uno::Reference mxComponent;
+SdrPage* getFirstDrawPageWithAssert();
 
 public:
 virtual void setUp() override
@@ -67,6 +68,37 @@ public:
 uno::Reference& getComponent() { return mxComponent; }
 };
 
+SdrPage* SvdrawTest::getFirstDrawPageWithAssert()
+{
+uno::Reference xDrawPagesSupplier(mxComponent,
+   
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(xDrawPagesSupplier.is());
+uno::Reference 
xDrawPages(xDrawPagesSupplier->getDrawPages());
+uno::Reference xDrawPage(xDrawPages->getByIndex(0), 
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(xDrawPage.is());
+
+auto pDrawPage = dynamic_cast(xDrawPage.get());
+CPPUNIT_ASSERT(pDrawPage);
+return pDrawPage->GetSdrPage();
+}
+
+xmlDocUniquePtr lcl_dumpAndParseFirstObjectWithAssert(SdrPage* pSdrPage)
+{
+ScopedVclPtrInstance aVirtualDevice;
+sdr::contact::ObjectContactOfObjListPainter aObjectContact(*aVirtualDevice,
+   { 
pSdrPage->GetObj(0) }, nullptr);
+const auto& rDrawPageVOContact
+= pSdrPage->GetViewContact().GetViewObjectContact(aObjectContact);
+sdr::contact::DisplayInfo aDisplayInfo;
+drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence;
+rDrawPageVOContact.getPrimitive2DSequenceHierarchy(aDisplayInfo, 
xPrimitiveSequence);
+
+drawinglayer::Primitive2dXmlDump aDumper;
+xmlDocUniquePtr pXmlDoc = aDumper.dumpAndParse(xPrimitiveSequence);
+CPPUNIT_ASSERT(pXmlDoc);
+return pXmlDoc;
+}
+
 CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
 {
 // Create a new Draw document with a rectangle.
@@ -391,6 +423,75 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testFontWorks)
 assertXPath(pXmlDoc, "//scene/extrude3D[1]/object3Dattributes/material", 
"specularIntensity",
 "20");
 }
+
+CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMetal)
+{
+OUString aURL = 
m_directories.getURLFromSrc(u"svx/qa/unit/data/tdf140321_metal.odp");
+mxComponent = loadFromDesktop(aURL, 
"com.sun.star.presentation.PresentationDocument");
+
+SdrPage* pSdrPage = getFirstDrawPageWithAssert();
+
+xmlDocUniquePtr pXmlDoc = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage);
+
+// ODF specifies specular color as rgb(200,200,200) and adding 15 to 
specularity for metal=true
+// without patch the specular color was #ff
+assertXPath(pXmlDoc, "(//material)[1]", "specular", "#c8c8c8");
+// specularIntensity = 100 - (80 + 15), with nominal value 80 in the file
+// without patch specularIntensity was 15
+assertXPath(pXmlDoc, "(//material)[1]", "specularIntensity", "5");
+}
+
+CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong)
+{
+OUString aURL = 
m_directories.getURLFromSrc(u"svx/qa/unit/data/tdf140321_phon

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

2021-11-12 Thread Attila Szűcs (via logerrit)
 sw/source/core/layout/findfrm.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 9fdb9c5fd71e61ae673c79064e3249ce7207031a
Author: Attila Szűcs 
AuthorDate: Fri Nov 12 11:30:42 2021 +0100
Commit: László Németh 
CommitDate: Fri Nov 12 15:43:02 2021 +0100

tdf#145611 sw: fix regression: undoing page breaks

at pages with endnotes.

Added a nullptr check for section to avoid crash on Linux.
It seems, SwSectionFrame::m_pSection can be nullptr at that point.

Regression from commit 4c31b4ef2083087a822c3ae648fd09acc67d2f88
"tdf#139336 sw: fix extra pages of multicolumn sections with footnotes".

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/sw/source/core/layout/findfrm.cxx 
b/sw/source/core/layout/findfrm.cxx
index 1eae79d9cd60..52d7e9627a1e 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -459,9 +459,12 @@ SwFootnoteBossFrame* SwFrame::FindFootnoteBossFrame( bool 
bFootnotes )
 bool bMoveToPageFrame = false;
 if (pSectframe)
 {
-bool bNoBalance = 
pSectframe->GetSection()->GetFormat()->GetBalancedColumns().GetValue();
-bool bFAtEnd = pSectframe->IsFootnoteAtEnd();
-bMoveToPageFrame = !bFAtEnd && !bNoBalance;
+SwSection* pSect = pSectframe->GetSection();
+if (pSect) {
+bool bNoBalance = 
pSect->GetFormat()->GetBalancedColumns().GetValue();
+bool bFAtEnd = pSectframe->IsFootnoteAtEnd();
+bMoveToPageFrame = !bFAtEnd && !bNoBalance;
+}
 }
 while (pRet
&& ((!bMoveToPageFrame && !pRet->IsFootnoteBossFrame())


Regarding participation in GSoC 2022

2021-11-12 Thread Casafurix
Hello!
I am Agnibha Sarkar, an Electronics and Telecommunication undergrad. I am
currently in my Second/Sophomore Year at Vishwakarma Institute Of
Technology, India. I have recently participated in HacktoberFest 2021, and
was successful in contributing to the program and winning the prized swags.
But, I believe open-source is more than just winning swags, it's more about
getting to learn and implement new technologies and ideas to supersede the
existing technologies and create new and better innovations, therefore, I
still consider myself a beginner in the development field.

I am currently a user and simultaneous learner of:

   - Front-end trinity of web-development (HTML, CSS, JavaScript)
   - React
   - Flutter and Dart (Basics of app development)
   - Java
   - Python

The following are my handles on Linkedin and GitHub:

   - Linkedin: https://www.linkedin.com/in/agnibha-sarkar-8143161b8/
   - GitHub: https://github.com/casafurix


I would love to contribute to your organization for GSoC 2022, but could
you please suggest to me on how to get started?

Thanks and regards,
Agnibha Sarkar,
India


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

2021-11-12 Thread Andrea Gelmini (via logerrit)
 include/vcl/outdev.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3f2699eb402164391776851a9dd95026ef40032
Author: Andrea Gelmini 
AuthorDate: Fri Nov 12 13:23:11 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Nov 12 15:09:55 2021 +0100

Fix typo

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index a1c26747c882..e82bf1e357a6 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1255,7 +1255,7 @@ public:
 
 /*
  These functions allow collecting information on how fonts are mapped when 
used, such as what
- replacements are used when a requrested font is missing or which fonts 
are used as fallbacks
+ replacements are used when a requested font is missing or which fonts are 
used as fallbacks
  when a font doesn't provide all necessary glyphs.
  After StartTrackingFontMappingUse() is called, VCL starts collecting font 
usage for all
  text layout calls, FinishTrackingFontMappingUse() will stop collecting 
and providing


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

2021-11-12 Thread Xisco Fauli (via logerrit)
 sd/qa/uitest/impress_tests/tdf126605.py |   27 -
 sd/qa/unit/uiimpress.cxx|   64 
 2 files changed, 57 insertions(+), 34 deletions(-)

New commits:
commit e410094c1c0565cbff335c71cc5ebb2ea4e706e2
Author: Xisco Fauli 
AuthorDate: Fri Nov 12 11:55:07 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 12 14:58:32 2021 +0100

tdf#126605: sd: move UItest to CppUnittest

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

diff --git a/sd/qa/uitest/impress_tests/tdf126605.py 
b/sd/qa/uitest/impress_tests/tdf126605.py
deleted file mode 100644
index ba277f726951..
--- a/sd/qa/uitest/impress_tests/tdf126605.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf126605(UITestCase):
-
-   def test_run(self):
-with self.ui_test.create_doc_in_start_center("impress"):
-xTemplateDlg = self.xUITest.getTopFocusWindow()
-xCancelBtn = xTemplateDlg.getChild("close")
-self.ui_test.close_dialog_through_button(xCancelBtn)
-
-xDoc = self.xUITest.getTopFocusWindow()
-xEdit = xDoc.getChild("impress_win")
-xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"test"}))
-
-# Without the accompanying fix in place, it would crash at this 
point
-self.xUITest.executeCommand(".uno:ParaRightToLeft")
-self.xUITest.executeCommand(".uno:ParaLeftToRight")
-
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 3368a45c3b61..68786fac3698 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -64,7 +65,7 @@ public:
 virtual void tearDown() override;
 
 void checkCurrentPageNumber(sal_uInt16 nNum);
-void insertStringToObject(sal_uInt16 nObj, const std::string& rStr);
+void insertStringToObject(sal_uInt16 nObj, const std::string& rStr, bool 
bUseEscape);
 sd::slidesorter::SlideSorterViewShell* getSlideSorterViewShell();
 };
 
@@ -95,7 +96,8 @@ void SdUiImpressTest::checkCurrentPageNumber(sal_uInt16 nNum)
 CPPUNIT_ASSERT_EQUAL(nNum, nPageNumber);
 }
 
-void SdUiImpressTest::insertStringToObject(sal_uInt16 nObj, const std::string& 
rStr)
+void SdUiImpressTest::insertStringToObject(sal_uInt16 nObj, const std::string& 
rStr,
+   bool bUseEscape)
 {
 auto pImpressDocument = 
dynamic_cast(mxComponent.get());
 sd::ViewShell* pViewShell = 
pImpressDocument->GetDocShell()->GetViewShell();
@@ -116,11 +118,14 @@ void SdUiImpressTest::insertStringToObject(sal_uInt16 
nObj, const std::string& r
 
 CPPUNIT_ASSERT(pView->IsTextEdit());
 
-pImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE);
-pImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE);
-Scheduler::ProcessEventsToIdle();
+if (bUseEscape)
+{
+pImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 
awt::Key::ESCAPE);
+pImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 
awt::Key::ESCAPE);
+Scheduler::ProcessEventsToIdle();
 
-CPPUNIT_ASSERT(!pView->IsTextEdit());
+CPPUNIT_ASSERT(!pView->IsTextEdit());
+}
 }
 
 sd::slidesorter::SlideSorterViewShell* 
SdUiImpressTest::getSlideSorterViewShell()
@@ -373,6 +378,51 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf128651)
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Redo changes width", nUndoWidth, nRedoWidth);
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126605)
+{
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+
+dispatchCommand(mxComponent, ".uno:InsertPage", {});
+Scheduler::ProcessEventsToIdle();
+
+insertStringToObject(0, "Test", /*bUseEscape*/ false);
+
+uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY);
+
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+
+uno::Reference xText
+= uno::Reference(xShape, 
uno::UNO_QUERY_THROW)->getText();
+CPPUNIT_ASSERT_MESSAGE("Not a text shape", xText.is());
+
+uno::Reference paraEnumAccess(xText, 
uno::UNO_QUERY);
+uno::Reference 
paraEnum(paraEnumAccess->createEnumeration()

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

2021-11-12 Thread Michael Meeks (via logerrit)
 svl/source/config/languageoptions.cxx  |2 +-
 svtools/source/misc/langtab.cxx|   13 +++--
 sw/source/uibase/shells/langhelper.cxx |5 ++---
 sw/source/uibase/shells/textsh1.cxx|5 ++---
 4 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 66a0b5f04d1ec06d2631a9f739b995d365bfc879
Author: Michael Meeks 
AuthorDate: Wed Nov 10 13:40:12 2021 +
Commit: Michael Meeks 
CommitDate: Fri Nov 12 14:54:55 2021 +0100

Resolves: tdf#145386 Use "Default" for LANGUAGE_PROCESS_OR_USER_DEFAULT

There's no, specifically not in Writer, handling of the LCID
0x0400 LANGUAGE_PROCESS_OR_USER_DEFAULT language/locale concept
other than the number formatter mapping it to LANGUAGE_SYSTEM.

Use the LANGUAGE_SYSTEM "Default" string in UI (status bar, status
menu, language list) but keep the LCID, and don't append the
resolved locale string as it is also displayed both in the Font
Western and CJK listboxes.

This ends up as two list entries, like
* Default - English (UK)first entry
* Default   last entry
of which the second would be selected.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124449
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 0f3c19ee61ec371aa32d9f51c3555d3ea8ae9eeb)

 Conflicts:
svtools/source/misc/langtab.cxx

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124204
Tested-by: Jenkins
Tested-by: Michael Meeks 
Reviewed-by: Michael Meeks 
Change-Id: I35b84dbf6e5913773949aad3dad802d79e93c2af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124965

diff --git a/svl/source/config/languageoptions.cxx 
b/svl/source/config/languageoptions.cxx
index f00812b30b8d..3b490c6ac1fe 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -142,7 +142,7 @@ SvtScriptType SvtLanguageOptions::GetScriptTypeOfLanguage( 
LanguageType nLang )
 {
 if( LANGUAGE_DONTKNOW == nLang )
 nLang = LANGUAGE_ENGLISH_US;
-else if( LANGUAGE_SYSTEM == nLang  )
+else if (LANGUAGE_SYSTEM == nLang || LANGUAGE_PROCESS_OR_USER_DEFAULT == 
nLang)
 nLang = SvtSysLocale().GetLanguageTag().getLanguageType();
 
 sal_Int16 nScriptType = MsLangId::getScriptType( nLang );
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index 2b4311cde7f6..519e7da7268c 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -208,23 +208,24 @@ bool SvtLanguageTable::HasLanguageType( const 
LanguageType eType )
 
 OUString SvtLanguageTableImpl::GetString( const LanguageType eType ) const
 {
-LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType );
-sal_uInt32 nPos = FindIndex(eLang);
+const LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( 
eType);
+const sal_uInt32 nPos = (eType == LANGUAGE_PROCESS_OR_USER_DEFAULT ?
+FindIndex(LANGUAGE_SYSTEM) : FindIndex( nLang));
 
 if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < GetEntryCount() )
 return m_aStrings[nPos].first;
 
 //Rather than return a fairly useless "Unknown" name, return a geeky but 
usable-in-a-pinch lang-tag
-OUString sLangTag( lcl_getDescription( 
LanguageTag::convertToBcp47(eType)));
+OUString sLangTag( lcl_getDescription( 
LanguageTag::convertToBcp47(nLang)));
 SAL_WARN("svtools.misc", "Language: 0x"
-<< std::hex << eType
+<< std::hex << nLang
 << " with unknown name, so returning lang-tag of: "
 << sLangTag);
 
 // And add it to the table if it is an on-the-fly-id, which it usually is,
 // so it is available in all subsequent language boxes.
-if (LanguageTag::isOnTheFlyID( eType))
-const_cast(this)->AddItem( sLangTag, eType);
+if (LanguageTag::isOnTheFlyID( nLang))
+const_cast(this)->AddItem( sLangTag, nLang);
 
 return sLangTag;
 }
diff --git a/sw/source/uibase/shells/langhelper.cxx 
b/sw/source/uibase/shells/langhelper.cxx
index 27326c973fb0..32a6cb1a5793 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -39,7 +39,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -76,14 +75,14 @@ namespace SwLangHelper
 
 vcl::Window* pWin = rEditView.GetWindow();
 if(pWin)
-nLang = MsLangId::getRealLanguage( pWin->GetInputLanguage() );
+nLang = pWin->GetInputLanguage();
 if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
 aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang );
 
 // get the language that is in use
 OUString aCurrentLang("*");
 SfxItemSet aSet(pOLV->GetAttribs());
-nLang = MsLangId::getRealLanguage( SwLangHelper::GetCurrentLanguage( 
aSet,nScriptType ) );
+nLang = SwLangHelper::GetCurrentLanguage( 

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

2021-11-12 Thread Heiko Tietze (via logerrit)
 include/vcl/outdev.hxx  |2 +-
 sw/source/core/txtnode/fntcache.cxx |6 --
 vcl/source/outdev/textline.cxx  |4 +---
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 4141c13da8245b5ed46be3b7034d014d75f433f9
Author: Heiko Tietze 
AuthorDate: Thu Nov 11 11:34:08 2021 +0100
Commit: Heiko Tietze 
CommitDate: Fri Nov 12 14:47:06 2021 +0100

Resolves tdf#70519 - Make wavy lines depend on zoom factor

Solves accessibility issue of too faint spellchecking indicators

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 8c0746215a50..a1c26747c882 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -910,7 +910,7 @@ public:
 voidImplDrawTextLines( SalLayout&, FontStrikeout 
eStrikeout, FontLineStyle eUnderline,
FontLineStyle eOverline, 
bool bWordLine, bool bUnderlineAbove );
 
-voidDrawWaveLine( const Point& rStartPos, const 
Point& rEndPos, tools::Long nLineWidth = 1 );
+voidDrawWaveLine( const Point& rStartPos, const 
Point& rEndPos, tools::Long nLineWidth = 1, tools::Long nWaveHeight = 3);
 
 boolImplDrawRotateText( SalLayout& );
 
diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index b23ba26a5d34..ccc25f50df9c 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -801,17 +801,19 @@ static void lcl_DrawLineForWrongListData(
 SwWrongArea const*const wrongArea = 
pWList->GetWrongElement(nNextStart + rInf.GetIdx());
 if (wrongArea != nullptr)
 {
+const SwViewShell* pShell = rInf.GetShell();
+sal_uInt16 nZoom = pShell ? 
round(pShell->GetViewOptions()->GetZoom()/100) : 1;
 if (WRONGAREA_WAVE == wrongArea->mLineType)
 {
 vcl::ScopedAntialiasing a(rInf.GetOut(), true);
 rInf.GetOut().SetLineColor( wrongArea->mColor );
-rInf.GetOut().DrawWaveLine( aStart, aEnd, 1 );
+rInf.GetOut().DrawWaveLine( aStart, aEnd, 1 + nZoom, 3 + 
nZoom );
 }
 else if (WRONGAREA_BOLDWAVE == wrongArea->mLineType)
 {
 vcl::ScopedAntialiasing a(rInf.GetOut(), true);
 rInf.GetOut().SetLineColor( wrongArea->mColor );
-rInf.GetOut().DrawWaveLine( aStart, aEnd, 2 );
+rInf.GetOut().DrawWaveLine( aStart, aEnd, 2 + nZoom, 4 + 
nZoom  );
 }
 else if (WRONGAREA_BOLD == wrongArea->mLineType)
 {
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 0b3ca866b37a..7015d768986c 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -969,7 +969,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, 
tools::Long nWidth,
 mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, 
eOverline, bUnderlineAbove );
 }
 
-void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, 
tools::Long nLineWidth)
+void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, 
tools::Long nLineWidth, tools::Long nWaveHeight)
 {
 assert(!is_double_buffered_window());
 
@@ -1008,8 +1008,6 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 aStartPt.RotateAround(nEndX, nEndY, 
Degree10(static_cast(-fOrientation * 10.0)));
 }
 
-tools::Long nWaveHeight = 3;
-
 // Handle HiDPI
 float fScaleFactor = GetDPIScaleFactor();
 if (fScaleFactor > 1.0f)


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - external/rhino

2021-11-12 Thread Michael Stahl (via logerrit)
 external/rhino/UnpackedTarball_rhino.mk |1 +
 external/rhino/rhino-classpath.patch.1  |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit d46f415553cdcfe736728bd8de551f6a2354a834
Author: Michael Stahl 
AuthorDate: Tue Nov 9 18:48:38 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 12 14:20:39 2021 +0100

rhino: unbreak build on Fedora 34

Sometime during the Fedora 34 lifecycle, ant started to put
/usr/share/java/rhino.jar on the classpath used to invoke javac,
which results in:

[javac] 
workdir/UnpackedTarball/rhino/src/org/mozilla/javascript/optimizer/Codegen.java:202:
 error: reference to Hashtable is ambiguous
[javac] Hashtable possibleDirectCalls = null;
[javac] ^
[javac]   both class java.util.Hashtable in java.util and class 
org.mozilla.javascript.Hashtable in org.mozilla.javascript match

Indeed /usr/share/java/rhino.jar contains a class
org.mozilla.javascript.Hashtable, while it doesn't exist yet in the
older rhino1_5R5.zip that is bundled.

The problem is that the package ant-apache-bsf contains the file
/etc/ant.d/apache-bsf which references the system rhino jar.

It turns out that reading the /etc/ant.d/* files in the shell script
/usr/bin/ant can be suppressed by setting the variable OPT_JAR_LIST to a
non-empty value, which is documented as "A user should
request optional jars and their dependencies via the OPT_JAR_LIST
variable", but which is sadly ignored if set to an empty value.

Another way to fix the problem is to patch the property
build.sysclasspath to "ignore" in build.xml.

http://ant.apache.org/manual/sysclasspath.html

Change-Id: I6d82eb226e5d01d094ebe044dbdada85b8687814
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124934
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit bb58293296f843654045d7b0eba6899d11533a4a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124980
Reviewed-by: Stephan Bergmann 

diff --git a/external/rhino/UnpackedTarball_rhino.mk 
b/external/rhino/UnpackedTarball_rhino.mk
index 0a1492b88da6..15a596eb1b0f 100644
--- a/external/rhino/UnpackedTarball_rhino.mk
+++ b/external/rhino/UnpackedTarball_rhino.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,rhino,\
external/rhino/rhino1_5R5.patch \
external/rhino/rhino1_5R5-find_swing.patch \
external/rhino/rhino1_5R5-updateToolTip.patch \
+   external/rhino/rhino-classpath.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,rhino,toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java,external/rhino/OfficeScriptInfo.java))
diff --git a/external/rhino/rhino-classpath.patch.1 
b/external/rhino/rhino-classpath.patch.1
new file mode 100644
index ..c751b95b5d9b
--- /dev/null
+++ b/external/rhino/rhino-classpath.patch.1
@@ -0,0 +1,13 @@
+/usr/bin/ant will put dozens of jars on the classpath, including a
+rhino.jar that breaks the build
+
+--- rhino/build.xml.orig   2021-11-11 17:25:07.284267174 +0100
 rhino/build.xml2021-11-11 17:25:38.689242510 +0100
+@@ -33,6 +33,7 @@
+ 
+ 
+ 
++
+   
+ 
+   


[Libreoffice-commits] core.git: dictionaries

2021-11-12 Thread Olivier Hallot (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e9577ef8265ec579066b2daa7de3f1b15044b2b7
Author: Olivier Hallot 
AuthorDate: Fri Nov 12 10:13:11 2021 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Nov 12 14:13:11 2021 +0100

Update git submodules

* Update dictionaries from branch 'master'
  to 5cf23af85b47be6e398add826da1a02175be4238
  - Add "exrtudir" to spell check for pt-BR

Refactor by PTG tool

Change-Id: I78d0caffbbe04d1d0b75ae1dab95470452692550
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/125106
Tested-by: Olivier Hallot 
Reviewed-by: Olivier Hallot 

diff --git a/dictionaries b/dictionaries
index 12c4f7058e7b..5cf23af85b47 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 12c4f7058e7b2d2861ed870ca4c7b46fe3e1f63a
+Subproject commit 5cf23af85b47be6e398add826da1a02175be4238


[Libreoffice-commits] dictionaries.git: pt_BR/pt_BR.aff pt_BR/pt_BR.dic

2021-11-12 Thread Olivier Hallot (via logerrit)
 pt_BR/pt_BR.aff |2 
 pt_BR/pt_BR.dic |94759 
 2 files changed, 47381 insertions(+), 47380 deletions(-)

New commits:
commit 5cf23af85b47be6e398add826da1a02175be4238
Author: Olivier Hallot 
AuthorDate: Fri Nov 12 10:10:21 2021 -0300
Commit: Olivier Hallot 
CommitDate: Fri Nov 12 14:13:08 2021 +0100

Add "exrtudir" to spell check for pt-BR

Refactor by PTG tool

Change-Id: I78d0caffbbe04d1d0b75ae1dab95470452692550
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/125106
Tested-by: Olivier Hallot 
Reviewed-by: Olivier Hallot 

diff --git a/pt_BR/pt_BR.aff b/pt_BR/pt_BR.aff
index 8e2a144..4664ad6 100644
--- a/pt_BR/pt_BR.aff
+++ b/pt_BR/pt_BR.aff
@@ -1,4 +1,4 @@
-SET UTF-8
+SET UTF-8
 FLAG UTF-8
 TRY áàãâéêíóõôúüçesianrtolcdugmphbyfvkwjqxz
 
diff --git a/pt_BR/pt_BR.dic b/pt_BR/pt_BR.dic
index bb21c79..849c1dc 100644
--- a/pt_BR/pt_BR.dic
+++ b/pt_BR/pt_BR.dic
@@ -1,9 +1,6 @@
-312367
-a
-ª
-á/Ý
+312368
 à
-ã/Ý
+a
 a-amilase
 á-bê-cê/B
 á-é-i-ó-u
@@ -15,6 +12,8 @@ a.a.
 a.C.
 A.C.
 a.m.
+á/Ý
+ã/Ý
 AA
 aa.
 aabora/B
@@ -29,7 +28,7 @@ aaquênio/D
 Aarão
 aardvark/Ý
 aariano/Dî
-aarônico/DK13
+aarônico/13DK
 aarônida/B
 aaronita/B
 ab
@@ -37,18 +36,18 @@ AB
 Ab'Sáber/Ý
 ab-henry
 ab-reação/BQW
-ab-reagir/cmMjL
+ab-reagir/cjLMm
 ab-reatividade/B
 ab-reativo
-ab-renunciar/akYMjL
+ab-renunciar/ajkLMY
 ab-reptício/D
 ab-repto/B
 ab-reticiamente
 ab-rogabilidade/B
 ab-rogação/B
-ab-rogar/cmYMjL
+ab-rogar/cjLmMY
 ab-rogatário/D
-ab-rogativo/DXJ
+ab-rogativo/DJX
 ab-rogatório
 ab-rogável/BÄ
 ab-rompido/D
@@ -60,40 +59,40 @@ ab-rupto/DJ
 ab-ruptude/B
 Abã
 Ababa
-ababadar/akYMjL
+ababadar/ajkLMY
 ababaia/B
-ababalhar/akYMjL
+ababalhar/ajkLMY
 ababalhos
 ababalidade/B
 ababangai/B
 ababé/B
 ababelação/BQW
-ababelar/akYjL
-ababelável/KXI
+ababelar/ajkLY
+ababelável/IKX
 ababil/BRV
-ababocado/DJH
+ababocado/DHJ
 ababone/B
 ababoni/B
 ababosação/BQW
-ababosar/akYMjL
-ababosável/KXI
-ababroar/akYMjL
+ababosar/ajkLMY
+ababosável/IKX
+ababroar/ajkLMY
 ababuá/B
 abacá/B
 abacado/D
+Abaçai
 abacaí/B
 abaçaí/B
-Abaçai
 abacaíba/B
-abacalhoar/akYMjL
+abacalhoar/ajkLMY
 abacamartado/D
-abaçanar/akYMjL
+abaçanar/ajkLMY
 abacanto/D
 abacatada/B
 abacataia/B
 abacatal/BR
-abacate/BP
 abacate-do-mato
+abacate/BP
 abacateiral/BR
 abacateiro/D
 abacatense/B
@@ -106,14 +105,14 @@ abacatuaia/B
 abacatuia/B
 abacatúxia/B
 abacavir/BR
-abacaxi/B
 abacaxi-branco
 abacaxi-de-tingir
 abacaxi-silvestre
+abacaxi/B
 abacaxibirra/B
 abacaxicultor/DR
 abacaxicultura/B
-abacaxicultural/BJXZ2HRV
+abacaxicultural/2BHJRVXZ
 abacaxiense/B
 abacaxis-brancos
 abacaxis-de-tingir
@@ -121,11 +120,11 @@ abacaxis-silvestres
 abacaxizal/R
 abacaxizeiro/D
 abacaxizinho/B
+Abace
 abacé/B
 ábace/B
-Abace
 abaceias
-abacelável/KXI
+abacelável/IKX
 abacena/B
 abacenino/D
 abacense/B
@@ -136,14 +135,14 @@ abaciato/D
 abácida/B
 Abacílio
 abacinamento/B
-abacinar/akYjL
+abacinar/ajkLY
 abacisco/D
-abacismo/B3
-abacístico/DK13
-ábaco/B
+abacismo/3B
+abacístico/13DK
 ábaco-harmônico
 ábaco-logístico
 ábaco-mágico
+ábaco/B
 abacomitato/B
 abacómite/B
 abacômite/D
@@ -155,7 +154,7 @@ abacóptero/B
 ábacos-logísticos
 ábacos-mágicos
 abacote/BP
-abactinal/BJXZ2HRV
+abactinal/2BHJRVXZ
 abactíneo/D
 abactínico/D
 abacto/B
@@ -167,7 +166,7 @@ abadá/B
 abadágio/B
 abadalassa/B
 abadão/BRV
-abadar/akYMjL
+abadar/ajkLMY
 abadavina/B
 Abade-MG/5
 abadecida/B
@@ -176,11 +175,11 @@ abadengo/D
 abadense/B
 abadesco/D
 abadessão/BRV
-abadessar/akYMjL
+abadessar/ajkLMY
 abadianense/B
 Abadiânia
 Abadiânia-GO/5
-abadiar/akYMjL
+abadiar/ajkLMY
 abadico/B
 abádida/B
 abadiense/B
@@ -192,10 +191,10 @@ abadita/B
 abadiva/B
 abadô/B
 abadom/B
-abaetar/akYMjL
-abaeté/B
-abaetê/B
+abaetar/ajkLMY
 Abaete-MG/5
+abaetê/B
+abaeté/B
 abaeteense/B
 Abaetetuba
 Abaetetuba-PA/5
@@ -207,23 +206,23 @@ abafadiço/D
 abafadoiro/D
 abafadouro/D
 abafadura/B
-abafanético/DK13
-abafar/akYMjLÂ
+abafanético/13DK
+abafar/ajkLMYÂ
 abafarete/BP
-abafativo/DXJÂ
-abafável/KXIÂ
+abafativo/DJXÂ
+abafável/IKXÂ
 abafeiro/D
 abafos/Â
 abafura/B
-abagaçar/akYMjL
+abagaçar/ajkLMY
 abagaceirado/D
-abaganhar/akYMjL
+abaganhar/ajkLMY
 abagmento/B
 abagos
-abagualar/akYMjL
+abagualar/ajkLMY
 abagum/B
-abaianar/akYMjL
-abaianável/KXI
+abaianar/ajkLMY
+abaianável/IKX
 Abaiara
 Abaiara-CE/5
 abaiarense/B
@@ -234,13 +233,13 @@ abaiô/B
 Abaíra
 Abaíra-BA/5
 abairense/B
-abairrar/akYMjL
-abairreirar/akYMjL
+abairrar/ajkLMY
+abairreirar/ajkLMY
 Abaís
 abaisir
 abaité/B
 abaitinguense/B
-abaiucar/isYMjL
+abaiucar/ijLMsY
 abaixa-língua/B
 abaixa-luz/B
 abaixa-pálpebra/B
@@ -248,11 +247,11 @@ abaixa-voz/B
 abaixação/BQW
 abaixadela/B
 abaixadura/B
-abaixável/KXI
+abaixável/IKX
 abaixo-assinado/B
 Abaixo-MG/5
-abajá/B
 abajá-mirim
+abajá/B
 abajás-mirins
 abajeru/B
 abajur/B
@@ -264,76 +263,76 @@ abaladiço/D
 abaladura/B
 abalaiação/BQW
 abalaiamento/B
-abalaiar/akYjL
+abalaiar/ajkLY
 abalancado/DJ
-abalar/akYMjLÂ
+abalar/ajkLMYÂ

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

2021-11-12 Thread Tomaž Vajngerl (via logerrit)
 include/svx/svdedtv.hxx   |1 
 include/svx/svdedxv.hxx   |   13 
 sc/source/ui/inc/drawview.hxx |4 
 sc/source/ui/view/drawview.cxx|9 
 sd/qa/unit/misc-tests.cxx |   34 +-
 sd/qa/unit/tiledrendering/data/TextBoxAndRect.odg |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx  |  339 --
 sd/source/ui/inc/View.hxx |3 
 sd/source/ui/view/drviews1.cxx|4 
 sd/source/ui/view/sdview.cxx  |   10 
 svx/source/svdraw/svddrgmt.cxx|2 
 svx/source/svdraw/svdedtv.cxx |   10 
 svx/source/svdraw/svdedtv1.cxx|   24 -
 svx/source/svdraw/svdedxv.cxx |   17 -
 sw/qa/extras/tiledrendering/data/shape.fodt   |   20 +
 sw/qa/extras/tiledrendering/tiledrendering.cxx|   16 -
 sw/source/core/draw/dview.cxx |   10 
 sw/source/core/inc/dview.hxx  |4 
 18 files changed, 456 insertions(+), 64 deletions(-)

New commits:
commit 723db12abd7c238e11dab0271516b6f4415e52eb
Author: Tomaž Vajngerl 
AuthorDate: Thu Oct 7 16:48:46 2021 +0200
Commit: Tomaž Vajngerl 
CommitDate: Fri Nov 12 14:08:08 2021 +0100

svx: Don't end text edit mode for all views

This allows multiple views to not disturb each other editing inside
a impress document. With the ending of text edit for all views still
enabled, one view can cancel other views text editing just by moving
or resizing a unrelated shape in the document.

To make this possible we also need a view-local undo manager for
the text edit mode, which is independent of the document undo
manager. When the text edit mode ends, all the changes will be
added as one change to the document undo stack. This prevents any
conflicts in the undo stack that could be made when 2 views are
editing the same document at the same time.

This also adds the test for the new use case and changes the existing
tests to reflect the change.

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

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

diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 51da6124ed88..71e014970888 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -195,6 +195,7 @@ public:
  * Checks if this or other views have an active text edit, if true, end 
them.
  */
 void EndTextEditAllViews() const;
+void EndTextEditCurrentView();
 
 std::vector< std::unique_ptr > CreateConnectorUndo( 
SdrObject& rO );
 void AddUndoActions( std::vector< std::unique_ptr > );
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 1f9fcf0b898d..737da8ca4896 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -104,20 +104,17 @@ protected:
 
 private:
 SfxUndoManager* mpOldTextEditUndoManager;
+std::unique_ptr mpLocalTextEditUndoManager;
 
 SVX_DLLPRIVATE void ImpClearVars();
 
 protected:
-// central method to get an SdrUndoManager for enhanced TextEdit. Default 
will
-// try to return a dynamic_casted GetModel()->GetSdrUndoManager(). 
Applications
-// which want to use this feature will need to override this virtual 
method,
-// provide their document UndoManager and derive it from SdrUndoManager.
-virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const;
+// Create a local UndoManager that is used for text editing.
+virtual std::unique_ptr createLocalTextUndoManager();
 
 void ImpMoveCursorAfterChainingEvent(TextChainCursorManager 
*pCursorManager);
 TextChainCursorManager *ImpHandleMotionThroughBoxesKeyInput(const 
KeyEvent& rKEvt, bool *bOutHandled);
 
-
 OutlinerView* ImpFindOutlinerView(vcl::Window const * pWin) const;
 
 // Create a new OutlinerView at the heap and initialize all required 
parameters.
@@ -177,6 +174,10 @@ public:
 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
 virtual void ModelHasChanged() override;
 
+const std::unique_ptr& getViewLocalUndoManager() const
+{
+return mpLocalTextEditUndoManager;
+}
 
 // TextEdit over an outliner
 
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 46f5598705f2..aa5e1bbb8533 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -52,8 +52,8 @@ class ScDrawView final : public FmFormView
 
 void ImplClearCalcDropMarker();
 
-// support enhanced text edit for draw objects
-virtual SdrU

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

2021-11-12 Thread Hossein (via logerrit)
 vcl/workben/mtfdemo.cxx |   44 ++--
 1 file changed, 38 insertions(+), 6 deletions(-)

New commits:
commit d49807bb277f69cfd494f10399e59bd9947a9d29
Author: Hossein 
AuthorDate: Fri Nov 12 10:23:11 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Nov 12 13:56:07 2021 +0100

Add error handling while creating absolute url

* Added error handling while creating absolute url from file name
* It was reported as ofz#1493240 Unchecked return value
* It has been silenced in 30f1617bd873d9ccf343a280ba27f476d4c7726e
  and b7c8e4f8ae5402eb665f758f75123e9fe1514d01

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

diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index eb81c3363b16..aae7c092a163 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -63,7 +64,7 @@ void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectangl
 }
 else
 {
-Application::Abort("Can't read metafile");
+Application::Abort("Can't read metafile " + aFileStream.GetFileName());
 }
 
 aMtf.Play(*GetOutDev(), aMtf.GetActionSize());
@@ -154,8 +155,19 @@ private:
 
 OUString sWorkingDir, sFileUrl;
 osl_getProcessWorkingDir(&sWorkingDir.pData);
-(void)osl::FileBase::getFileURLFromSystemPath(aFilename, sFileUrl);
-(void)osl::FileBase::getAbsoluteFileURL(sWorkingDir, sFileUrl, 
maFileName);
+osl::FileBase::RC rc = 
osl::FileBase::getFileURLFromSystemPath(aFilename, sFileUrl);
+if (rc == osl::FileBase::E_None)
+{
+rc = osl::FileBase::getAbsoluteFileURL(sWorkingDir, sFileUrl, 
maFileName);
+if (rc != osl::FileBase::E_None)
+{
+throw css::uno::RuntimeException("Can not make absolute: " 
+ aFilename);
+}
+}
+else
+{
+throw css::uno::RuntimeException("Can not get file url from 
system path: " + aFilename);
+}
 
 uno::Reference xComponentContext
 = ::cppu::defaultBootstrap_InitialComponentContext();
@@ -169,10 +181,30 @@ private:
 {
 GDIMetaFile aMtf;
 SvFileStream aFileStream(maFileName, StreamMode::READ);
-ReadWindowMetafile(aFileStream, aMtf);
+
+if (aFileStream.IsOpen())
+{
+ReadWindowMetafile(aFileStream, aMtf);
+}
+else
+{
+throw css::uno::RuntimeException("Can't read metafile " + 
aFileStream.GetFileName());
+}
+
 OUString sAbsoluteDumpUrl, sDumpUrl;
-(void)osl::FileBase::getFileURLFromSystemPath("metadump.xml", 
sDumpUrl);
-(void)osl::FileBase::getAbsoluteFileURL(sWorkingDir, sDumpUrl, 
sAbsoluteDumpUrl);
+rc = osl::FileBase::getFileURLFromSystemPath("metadump.xml", 
sDumpUrl);
+if (rc == osl::FileBase::E_None)
+{
+rc = osl::FileBase::getAbsoluteFileURL(sWorkingDir, 
sDumpUrl, sAbsoluteDumpUrl);
+if (rc != osl::FileBase::E_None)
+{
+throw css::uno::RuntimeException("Can not make 
absolute: metadump.xml");
+}
+}
+else
+{
+throw css::uno::RuntimeException("Can not get file url 
from system path: metadump.xml");
+}
 
 aMtf.dumpAsXml(rtl::OUStringToOString(sAbsoluteDumpUrl, 
RTL_TEXTENCODING_UTF8).getStr());
 std::cout << "Dumped metaactions as metadump.xml" << std::endl;


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

2021-11-12 Thread Aron Budea (via logerrit)
 sw/source/uibase/shells/basesh.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7da45f1ba0e5062426919c87c13fdeffa7e61102
Author: Aron Budea 
AuthorDate: Fri Nov 12 08:51:00 2021 +0100
Commit: Aron Budea 
CommitDate: Fri Nov 12 13:22:05 2021 +0100

Fix -Werror=shadow in basesh.cxx

sw/source/uibase/shells/basesh.cxx:
 In member function ‘void SwBaseShell::ExecUndo(SfxRequest&)’:
sw/source/uibase/shells/basesh.cxx:564:29: error: declaration
 of ‘rView’ shadows a member of ‘SwBaseShell’ [-Werror=shadow]
  564 | SwView& rView = rWrtShell.GetView();
  | ^
In file included from sw/source/uibase/shells/basesh.cxx:63:
sw/source/uibase/inc/basesh.hxx:41:18: note: shadowed declaration
 is here
   41 | SwView  &rView;
  |  ^

Since c72e500ccaf0ce2261c5233b80fba9342778f810.

Change-Id: I5fda3ad4805dc59a9e0e01dd262c09952a2bc97e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125077
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index fc7c5daf8ce4..ed6dd8883b57 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -561,10 +561,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
 {
 sw::UndoManager& rManager = 
rWrtShell.GetDoc()->GetUndoManager();
 const SfxUndoAction* pAction = rManager.GetUndoAction();
-SwView& rView = rWrtShell.GetView();
-ViewShellId nViewShellId = rView.GetViewShellId();
+SwView& rSwView = rWrtShell.GetView();
+ViewShellId nViewShellId = rSwView.GetViewShellId();
 if (pAction->GetViewShellId() != nViewShellId
-&& rManager.IsViewUndoActionIndependent(&rView))
+&& rManager.IsViewUndoActionIndependent(&rSwView))
 {
 // Execute the undo with an offset: don't undo the top 
action, but an
 // earlier one, since it's independent and that 
belongs to our view.


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

2021-11-12 Thread Luboš Luňák (via logerrit)
 solenv/gbuild/LinkTarget.mk |5 -
 solenv/gbuild/PrecompiledHeaders.mk |   20 +---
 solenv/gbuild/TargetLocations.mk|1 +
 3 files changed, 18 insertions(+), 8 deletions(-)

New commits:
commit 5e7421b3895aa69ea874fc2ccf0f615b1163fbda
Author: Luboš Luňák 
AuthorDate: Fri Nov 12 11:34:41 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 13:21:19 2021 +0100

rebuild a PCH when the flags it was built with change

We already store the flags in a .flags file for another use, so just
handle the file as another make rule before the PCH rule and
if the file changes then the PCH rule will depend on something
that has changed.

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

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index fe40fcbaf4ac..71be0790b59b 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1853,6 +1853,7 @@ define gb_LinkTarget__set_precompiled_header_impl
 $(call gb_LinkTarget_get_clean_target,$(1)) : $(call 
gb_PrecompiledHeader_get_clean_target,$(3))
 $(call gb_PrecompiledHeader_get_target,$(3),$(4)) : $(call 
gb_CxxObject_get_source,$(SRCDIR),$(2))
 $(call gb_PrecompiledHeader_get_target,$(3),$(4)) : $(patsubst 
%.cxx,%.hxx,$(call gb_CxxObject_get_source,$(SRCDIR),$(2)))
+$(call gb_PrecompiledHeader_get_target,$(3),$(4)) : $(call 
gb_PrecompiledHeader_get_flags_file,$(3),$(4))
 
 $(call gb_PrecompiledHeader_get_target,$(3),$(4)) : $(call 
gb_LinkTarget_get_headers_target,$(1))
 
@@ -1912,7 +1913,9 @@ $(call gb_LinkTarget_get_pch_timestamp,$(4)) : $(call 
gb_LinkTarget_get_pch_reus
 # Depending directly on the PCH could cause that PCH to be built with this 
linktarget's flags.
 $(call gb_LinkTarget_get_pch_reuse_timestamp,$(4)) : $(call 
gb_PrecompiledHeader_get_for_reuse_target,$(3),$(4))
$(call gb_PrecompiledHeader_check_flags,$(4),$(2),\
-   $(call 
gb_PrecompiledHeader_get_target,$(3),$(4)),$$(PCH_CXXFLAGS) $$(PCH_DEFS) 
$$(gb_LinkTarget_EXCEPTIONFLAGS))
+   $(call gb_PrecompiledHeader_get_target,$(3),$(4)),\
+   $(call gb_PrecompiledHeader_get_flags_file,$(3),$(4)),\
+   $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_EXCEPTIONFLAGS))
$$(call gb_PrecompiledHeader__copy_reuse_files,$(1),$(3),$(4))
mkdir -p $$(dir $$@) && touch $$@
 
diff --git a/solenv/gbuild/PrecompiledHeaders.mk 
b/solenv/gbuild/PrecompiledHeaders.mk
index 60c56950350f..28f2308c8e92 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -44,6 +44,13 @@ $(call gb_PrecompiledHeader_get_dep_target,$(1),$(3)) :
mkdir -p $$(dir $$@) && \
echo "$$(call gb_PrecompiledHeader_get_target,$(1),$(3)) : 
$$(gb_Helper_PHONY)" > $$@)
 
+# keep the flags the PCH was built with in a separate file, update the file if 
and only if the flags
+# change, and make the PCH depend on it => the PCH will be rebuilt on any 
flags change
+.PHONY: force
+$(call gb_PrecompiledHeader_get_flags_file,$(1),$(3)) : force
+   echo $$(sort $$(PCH_DEFS) $$(PCH_CXXFLAGS) 
$$(gb_PrecompiledHeader_EXCEPTIONFLAGS)) | cmp -s - $$@ \
+   || echo $$(sort $$(PCH_DEFS) $$(PCH_CXXFLAGS) 
$$(gb_PrecompiledHeader_EXCEPTIONFLAGS)) > $$@
+
 # despite this being only one .d file, need to run concat-deps on it to
 # re-write external headers from UnpackedTarball
 $(call gb_PrecompiledHeader_get_target,$(1),$(3)) :
@@ -52,7 +59,6 @@ $(call gb_PrecompiledHeader_get_target,$(1),$(3)) :
rm -f $$@
$$(call 
gb_PrecompiledHeader__command,$$@,$(1),$$<,$$(PCH_DEFS),$$(PCH_CXXFLAGS) 
$$(gb_PrecompiledHeader_EXCEPTIONFLAGS),$$(INCLUDE),$(3),$(5))
$$(call 
gb_PrecompiledHeader__sum_command,$$@,$(1),$$<,$$(PCH_DEFS),$$(PCH_CXXFLAGS) 
$$(gb_PrecompiledHeader_EXCEPTIONFLAGS),$$(INCLUDE),$(3))
-   echo $$(sort $$(PCH_DEFS) $$(PCH_CXXFLAGS) 
$$(gb_PrecompiledHeader_EXCEPTIONFLAGS)) > $$(call 
gb_PrecompiledHeader_get_target,$(1),$(3)).flags
 ifeq ($(gb_FULLDEPS),$(true))
$$(call gb_Helper_abbreviate_dirs,\
RESPONSEFILE=$$(call gb_var2file,$$(shell 
$$(gb_MKTEMP)),200,$$(call gb_PrecompiledHeader_get_dep_target_tmp,$(1),$(3))) 
&& \
@@ -73,8 +79,8 @@ $(call gb_PrecompiledHeader_get_clean_target,$(1)) :
$$(call gb_PrecompiledHeader_get_target,$(1),$(3)).obj \
$$(call gb_PrecompiledHeader_get_target,$(1),$(3)).pdb \
$$(call gb_PrecompiledHeader_get_target,$(1),$(3)).sum \
-   $$(call 
gb_PrecompiledHeader_get_target,$(1),$(3)).flags \
-   $$(call 
gb_PrecompiledHeader_get_target,$(1),$(3)).reuse \
+   $$(call gb_PrecompiledHeader_get_flags_file,$(1),$(3)) \
+   $$(call 
gb_PrecompiledHeader_get_for_

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

2021-11-12 Thread Luboš Luňák (via logerrit)
 toolkit/source/awt/vclxtoolkit.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 7a65f43709b2945cca935158c72c28dc77ba65b2
Author: Luboš Luňák 
AuthorDate: Fri Nov 12 13:14:23 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 13:18:36 2021 +0100

adapt to Sequence::operator[] non-const removal

5054202e71605cb4f10c798be76679 passed Gerrit before the changes
and I submitted it only later after the changes.

Change-Id: I251f50f417964f23e5e91aae6696df609fee9e14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125098
Tested-by: Luboš Luňák 
Reviewed-by: Luboš Luňák 

diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 5991df78fddb..6c21a5b474f1 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -2550,12 +2550,13 @@ SAL_CALL VCLXToolkit::finishTrackingFontMappingUse()
 SolarMutexGuard aSolarGuard;
 OutputDevice::FontMappingUseData data = 
OutputDevice::FinishTrackingFontMappingUse();
 css::uno::Sequence ret( data.size());
+css::awt::XFontMappingUseItem* retData = ret.getArray();
 for( size_t i = 0; i < data.size(); ++i )
 {
-ret[ i ].originalFont = data[ i ].mOriginalFont;
-ret[ i ].usedFonts = comphelper::arrayToSequence
+retData[ i ].originalFont = data[ i ].mOriginalFont;
+retData[ i ].usedFonts = comphelper::arrayToSequence
 (data[ i ].mUsedFonts.data(), data[ i ].mUsedFonts.size());
-ret[ i ].count = data[ i ].mCount;
+retData[ i ].count = data[ i ].mCount;
 }
 return ret;
 }


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

2021-11-12 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/sqledit.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e467d936452bd428fe71339803fa22eb0a5f31e2
Author: Caolán McNamara 
AuthorDate: Fri Nov 12 10:05:34 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 12 13:14:37 2021 +0100

Resolves: tdf#145582 modify called too often

a problem since:

commit 5b98dd53c7dc101d3a5ff693d3f0520ec1abd3d1
Date:   Tue Aug 3 12:28:23 2021 +0100

tdf#143657 'execute' button doesn't get enabled when contents changed

which was a fix for the problem since:

commit 73c9ef661d9ef6237d3fd3c259fd040a545b44cf
Date:   Tue Jul 6 18:51:38 2021 +0200

tdf#132740 don't broadcast if modified status has not changed

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

diff --git a/dbaccess/source/ui/control/sqledit.cxx 
b/dbaccess/source/ui/control/sqledit.cxx
index a55664513e86..7f86d8d01bc0 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -195,6 +195,7 @@ void SQLEditView::UpdateData()
 m_bInUpdate = true;
 EditEngine& rEditEngine = *GetEditEngine();
 
+bool bModified = rEditEngine.IsModified();
 bool bUndoEnabled = rEditEngine.IsUndoEnabled();
 rEditEngine.EnableUndo(false);
 
@@ -225,7 +226,8 @@ void SQLEditView::UpdateData()
 
 rEditEngine.EnableUndo(bUndoEnabled);
 
-m_aModifyLink.Call(nullptr);
+if (bModified)
+m_aModifyLink.Call(nullptr);
 
 Invalidate();
 }


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

2021-11-12 Thread Stephan Bergmann (via logerrit)
 configure.ac |   90 ---
 1 file changed, 50 insertions(+), 40 deletions(-)

New commits:
commit 7b26ac7e8eba298ba173c682bbd952f60a59c5f3
Author: Stephan Bergmann 
AuthorDate: Fri Nov 12 11:06:57 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 12 13:04:09 2021 +0100

Fix HAVE_CPP_CONSTEVAL check for MSVC

For one, it always trivially failed with

> LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'

because of a missing LIB env var expected by cl.  (Rather using LDFLAGS with
something like

> LDFLAGS="$LDFLAGS -LIBPATH:$COMPATH/lib/$WIN_HOST_ARCH"

instead of prepending LIB to $CXX via env wouldn't work, as AC_RUN_IFELSE 
puts
LDFLAGS too early on the compiler command line, causing "cl : Command line
warning D9002 : ignoring unknown option '-LIBPATH:...'".  And just using
something like

> CXX="env LIB=$COMPATH/lib/$WIN_HOST_ARCH $CXX"

instead of the full $ILIB would cause "LINK : fatal error LNK1104: cannot 
open
file 'kernel32.lib'".)  This means that the HAVE_CPP_CONSEVAL check had to 
be
moved past setting up ILIB.

But for another, detection of HAVE_CPP_CONSTEVAL under --with-latest-c++ 
would
trigger MSVC bug  
"Bogus
error C7595 with consteval constructor in ternary expression 
(/std:c++latest)"
at

> sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to 
immediate function is not a constant expression

(and see also f8a30a87a9d0c68dc16d5fa2ca63f687b1d90da1 "Fix (mis-)uses of
temporary O[U]StringLiteral") so add a test for that bug to the checking 
code.

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

diff --git a/configure.ac b/configure.ac
index 336c79925427..23c2beaceefd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7347,46 +7347,6 @@ if test "$GCC" = yes; then
 fi
 AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
 
-AC_MSG_CHECKING([whether $CXX_BASE supports a working C++20 consteval])
-dnl ...that does not suffer from 
 "Missing code
-dnl from consteval constructor initializing const variable",
-dnl  "wrong 'error: ‘this’ 
is not a constant
-dnl expression' with consteval constructor", or 
 "code
-dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value*
-dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' 
failed.'":
-AC_LANG_PUSH([C++])
-save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
-AC_RUN_IFELSE([AC_LANG_PROGRAM([
-struct S {
-consteval S() { i = 1; }
-int i = 0;
-};
-S const s;
-
-struct S1 { consteval S1(int) {} };
-struct S2 {
-S1 x;
-S2(): x(0) {}
-};
-
-struct S3 {
-consteval S3() {}
-union {
-int a;
-unsigned b = 0;
-};
-};
-void f() { S3(); }
-], [
-return (s.i == 1) ? 0 : 1;
-])], [
-AC_DEFINE([HAVE_CPP_CONSTEVAL],[1])
-AC_MSG_RESULT([yes])
-], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([assumed no (cross compiling)])])
-CXXFLAGS=$save_CXXFLAGS
-AC_LANG_POP([C++])
-
 AC_MSG_CHECKING([whether $CXX_BASE supports C++2a constinit sorted vectors])
 AC_LANG_PUSH([C++])
 save_CXXFLAGS=$CXXFLAGS
@@ -14177,6 +14137,56 @@ fi
 AC_SUBST(ILIB)
 AC_SUBST(ILIB_FOR_BUILD)
 
+AC_MSG_CHECKING([whether $CXX_BASE supports a working C++20 consteval])
+dnl ...that does not suffer from 
 "Missing code
+dnl from consteval constructor initializing const variable",
+dnl  "wrong 'error: ‘this’ 
is not a constant
+dnl expression' with consteval constructor", 
 "code
+dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value*
+dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' 
failed.'", or
+dnl  "Bogus error C7595 
with consteval
+dnl constructor in ternary expression (/std:c++latest)":
+AC_LANG_PUSH([C++])
+save_CXX=$CXX
+if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then
+CXX="env LIB=$ILIB $CXX"
+fi
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_RUN_IFELSE([AC_LANG_PROGRAM([
+struct S {
+consteval S() { i = 1; }
+int i = 0;
+};
+S const s;
+
+struct S1 { consteval S1(int) {} };
+struct S2 {
+S1 x;
+S2(): x(0) {}
+};
+
+struct S3 {
+ 

[Libreoffice-commits] core.git: desktop/source include/sfx2 sfx2/source sw/inc sw/source test/source

2021-11-12 Thread Luboš Luňák (via logerrit)
 desktop/source/lib/init.cxx   |5 +++--
 include/sfx2/viewsh.hxx   |5 +++--
 sfx2/source/view/viewsh.cxx   |2 +-
 sw/inc/view.hxx   |2 +-
 sw/inc/viscrs.hxx |4 ++--
 sw/source/core/crsr/viscrs.cxx|6 --
 sw/source/uibase/inc/wrtsh.hxx|2 +-
 sw/source/uibase/uiview/view.cxx  |4 ++--
 sw/source/uibase/wrtsh/wrtsh4.cxx |6 +++---
 test/source/lokcallback.cxx   |   10 ++
 10 files changed, 26 insertions(+), 20 deletions(-)

New commits:
commit 309bffba603ae65e76148dff3add1a541a2b5d81
Author: Luboš Luňák 
AuthorDate: Fri Nov 12 10:56:54 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 13:02:08 2021 +0100

make it explicit whether to ignore the result of getLOKPayload()

Returning an empty string to signify 'ignore' was a poor design,
as some messages types actually may have valid empty messages.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6a1e0871fceb..2191a87f5b87 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2191,8 +2191,9 @@ void CallbackFlushHandler::enqueueUpdatedTypes()
 
 void CallbackFlushHandler::enqueueUpdatedType( int type, const SfxViewShell* 
viewShell, int viewId )
 {
-OString payload = viewShell->getLOKPayload( type, viewId );
-if(payload.isEmpty())
+bool ignore = false;
+OString payload = viewShell->getLOKPayload( type, viewId, &ignore );
+if(ignore)
 return; // No actual payload to send.
 CallbackData callbackData(payload.getStr(), viewId);
 m_queue1.emplace_back(type);
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index e35c6848c9e1..fc06eb9ddbe8 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -346,8 +346,9 @@ public:
 virtual void libreOfficeKitViewUpdatedCallback(int nType) const override;
 virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int 
nViewId, int nSourceViewId) const override;
 // Returns current payload for nType, after 
libreOfficeKitViewUpdatedCallback() or
-// libreOfficeKitViewUpdatedCallbackPerViewId() were called.
-virtual OString getLOKPayload(int nType, int nViewId) const;
+// libreOfficeKitViewUpdatedCallbackPerViewId() were called. If no payload 
should
+// be generated, the ignore flag should be set.
+virtual OString getLOKPayload(int nType, int nViewId, bool* ignore) const;
 
 /// Set if we are doing tiled searching.
 void setTiledSearching(bool bTiledSearching);
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index e49899bc36eb..75826a28d128 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1544,7 +1544,7 @@ void SfxViewShell::flushPendingLOKInvalidateTiles()
 // SfxViewShell itself does not delay any tile invalidations.
 }
 
-OString SfxViewShell::getLOKPayload(int nType, int /*nViewId*/) const
+OString SfxViewShell::getLOKPayload(int nType, int /*nViewId*/, bool* 
/*ignore*/) const
 {
 // SfxViewShell itself currently doesn't handle any updated-payload types.
 SAL_WARN("sfx.view", "SfxViewShell::getLOKPayload unhandled type " << 
lokCallbackTypeToString(nType));
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index edcf028d9f5d..d074f0d552a7 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -693,7 +693,7 @@ public:
 
 virtual tools::Rectangle getLOKVisibleArea() const override;
 virtual void flushPendingLOKInvalidateTiles() override;
-virtual OString getLOKPayload(int nType, int nViewId) const override;
+virtual OString getLOKPayload(int nType, int nViewId, bool* ignore) const 
override;
 };
 
 inline tools::Long SwView::GetXScroll() const
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 3c355e01800c..6755b548e8a0 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -60,7 +60,7 @@ public:
 void SetPosAndShow(SfxViewShell const * pViewShell);
 const vcl::Cursor& GetTextCursor() const;
 
-OString getLOKPayload(int nType, int nViewId) const;
+OString getLOKPayload(int nType, int nViewId, bool* ignore) const;
 };
 
 // From here classes/methods for selections.
@@ -114,7 +114,7 @@ public:
 static void Get1PixelInLogic( const SwViewShell& rSh,
 tools::Long* pX = nullptr, tools::Long* pY 
= nullptr );
 
-OString getLOKPayload(int nType, int nViewId) const;
+OString getLOKPayload(int nType, int nViewId, bool* ignore) const;
 };
 
 class SW_DLLPUBLIC SwShellCursor : public virtual SwCursor, public 
SwSelPaintRects
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index d28dab2c7d98..26e43813575d 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -266,7 +

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

2021-11-12 Thread Miklos Vajna (via logerrit)
 svl/source/undo/undo.cxx   |   18 ++--
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   52 +
 sw/source/core/inc/UndoManager.hxx |4 -
 sw/source/core/undo/docundo.cxx|   26 +---
 sw/source/uibase/shells/basesh.cxx |5 +-
 5 files changed, 90 insertions(+), 15 deletions(-)

New commits:
commit 39f231360013e944a8713248359662b9f282d902
Author: Miklos Vajna 
AuthorDate: Fri Nov 12 08:39:35 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 12 12:46:22 2021 +0100

sw, out of order undo: allow multiple actions from other views

Previously we assumed that the action to be executed is always exactly
the top of the undo stack minus 1 element.

Extend this, so that in case an other view appends two or more elements
to the undo stack, we still find our undo action. Obviously only do this
if all those undo actions are independent from us.

This requires replacing the swap in svl/ with a move-out + move a range
down + move in construct.

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

diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index f84d2cda185a..e820a3cbb9d1 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -683,13 +683,21 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* 
i_contextOrNull )
 return false;
 }
 
-if (i_contextOrNull && i_contextOrNull->GetUndoOffset() == 1)
+if (i_contextOrNull && i_contextOrNull->GetUndoOffset() > 0)
 {
-if (m_xData->pActUndoArray->nCurUndoAction >= 2)
+size_t nCurrent = m_xData->pActUndoArray->nCurUndoAction;
+size_t nOffset = i_contextOrNull->GetUndoOffset();
+if (nCurrent >= nOffset + 1)
 {
-std::swap(
-
m_xData->pActUndoArray->maUndoActions[m_xData->pActUndoArray->nCurUndoAction - 
1],
-
m_xData->pActUndoArray->maUndoActions[m_xData->pActUndoArray->nCurUndoAction - 
2]);
+// Move out the action we want to execute.
+MarkedUndoAction aAction
+= std::move(m_xData->pActUndoArray->maUndoActions[nCurrent - 1 
- nOffset]);
+// Move the actions after aAction down by one.
+std::move(m_xData->pActUndoArray->maUndoActions.data() + nCurrent 
- nOffset,
+  m_xData->pActUndoArray->maUndoActions.data() + nCurrent,
+  m_xData->pActUndoArray->maUndoActions.data() + nCurrent 
- nOffset - 1);
+// Move aAction to the top.
+m_xData->pActUndoArray->maUndoActions[nCurrent - 1] = 
std::move(aAction);
 }
 }
 
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 4f0c7e3c5c7b..46a4eab3ac98 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -110,6 +110,7 @@ public:
 void testUndoLimiting();
 void testUndoReordering();
 void testUndoReorderingRedo();
+void testUndoReorderingMulti();
 void testUndoShapeLimiting();
 void testUndoDispatch();
 void testUndoRepairDispatch();
@@ -193,6 +194,7 @@ public:
 CPPUNIT_TEST(testUndoLimiting);
 CPPUNIT_TEST(testUndoReordering);
 CPPUNIT_TEST(testUndoReorderingRedo);
+CPPUNIT_TEST(testUndoReorderingMulti);
 CPPUNIT_TEST(testUndoShapeLimiting);
 CPPUNIT_TEST(testUndoDispatch);
 CPPUNIT_TEST(testUndoRepairDispatch);
@@ -1408,6 +1410,56 @@ void SwTiledRenderingTest::testUndoReorderingRedo()
 SfxViewShell::Current()->setLibreOfficeKitViewCallback(nullptr);
 }
 
+void SwTiledRenderingTest::testUndoReorderingMulti()
+{
+// Create two views and a document of 2 paragraphs.
+SwXTextDocument* pXTextDocument = createDoc();
+SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
+int nView1 = SfxLokHelper::getView();
+int nView2 = SfxLokHelper::createView();
+
pXTextDocument->initializeForTiledRendering(uno::Sequence());
+SwWrtShell* pWrtShell2 = pXTextDocument->GetDocShell()->GetWrtShell();
+pWrtShell2->SplitNode();
+SfxLokHelper::setView(nView1);
+pWrtShell1->SttEndDoc(/*bStt=*/true);
+SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetNode().GetTextNode();
+// View 1 types into the first paragraph.
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'a', 0);
+Scheduler::ProcessEventsToIdle();
+SfxLokHelper::setView(nView2);
+pWrtShell2->SttEndDoc(/*bStt=*/false);
+SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetNode().GetTextNode();
+// View 2 types into the second paragraph, twice.
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
+pXTextDocument->p

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - download.lst external/poppler

2021-11-12 Thread Michael Stahl (via logerrit)
 download.lst  |4 +-
 external/poppler/StaticLibrary_poppler.mk |2 +
 external/poppler/poppler-config.patch.1   |   58 +++---
 3 files changed, 49 insertions(+), 15 deletions(-)

New commits:
commit 4382a9d896b1f3c60d508ab074385ceeb68e9775
Author: Michael Stahl 
AuthorDate: Thu Nov 11 11:01:43 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 12 12:41:36 2021 +0100

poppler: upgrade to release 21.11.0

The changelogs tend to mention "crash in malformed files" a lot.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125034
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 03bc0f97205593547ddf1fc8d4fb396479bcab6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124973
Reviewed-by: Caolán McNamara 
(cherry picked from commit 22beb8f80985ea73e2c98d14480e53da81673c67)

Change-Id: Iadc1d9cc23abd09a8fff58ba0cb7a7803236a542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125085
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 03101aac433b..f5c35551682c 100644
--- a/download.lst
+++ b/download.lst
@@ -208,8 +208,8 @@ export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
-export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
-export POPPLER_TARBALL := poppler-21.01.0.tar.xz
+export POPPLER_SHA256SUM := 
31b76b5cac0a48612fdd154c02d9eca01fd38fb8eaa77c1196840ecdeb53a584
+export POPPLER_TARBALL := poppler-21.11.0.tar.xz
 export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
 export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
f8d82e7572c86ec9d55c8627aae5040124fd2203af400c383c821b980306ee6b
diff --git a/external/poppler/StaticLibrary_poppler.mk 
b/external/poppler/StaticLibrary_poppler.mk
index 3cc0a95e3617..bcb66b49299a 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -72,6 +72,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/fofi/FoFiType1C \
UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/poppler/Annot \
+   UnpackedTarball/poppler/poppler/AnnotStampImageHelper \
UnpackedTarball/poppler/poppler/Array \
UnpackedTarball/poppler/poppler/BBoxOutputDev \
UnpackedTarball/poppler/poppler/CachedFile \
@@ -136,6 +137,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/Movie \
UnpackedTarball/poppler/poppler/Rendition \
UnpackedTarball/poppler/poppler/DCTStream \
+   UnpackedTarball/poppler/splash/SplashBitmap \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/poppler/poppler-config.patch.1 
b/external/poppler/poppler-config.patch.1
index b902402ea4e7..2a24d4510197 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -16,7 +16,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/config.h
-@@ -0,0 +1,221 @@
+@@ -0,0 +1,223 @@
 +/* config.h.  Generated from config.h.cmake by cmake.  */
 +
 +/* Build against libcurl. */
@@ -176,7 +176,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_NAME "poppler"
 +
 +/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 21.01.0"
++#define PACKAGE_STRING "poppler 21.11.0"
 +
 +/* Define to the one symbol short name of this package. */
 +#define PACKAGE_TARNAME "poppler"
@@ -185,7 +185,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_URL ""
 +
 +/* Define to the version of this package. */
-+#define PACKAGE_VERSION "21.01.0"
++#define PACKAGE_VERSION "21.11.0"
 +
 +/* Poppler data dir */
 +#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -203,7 +203,7 @@ index 0fbd336a..451213f8 100644
 +/* #undef USE_FLOAT */
 +
 +/* Version number of package */
-+#define VERSION "21.01.0"
++#define VERSION "21.11.0"
 +
 +#if defined(__APPLE__)
 +#elif defined (_WIN32)
@@ -228,6 +228,8 @@ index 0fbd336a..451213f8 100644
 +#if defined(_MSC_VER) || defined(__BORLANDC__)
 +#define popen _popen
 +#define pclose _pclose
++#define strncasecmp _strnicmp
++// error C4005: "strcasecmp": macro redefinition#define strcasecmp 
_stricmp
 +#endif
 +
 +/* Number of bits in a file offset, on hosts where this is settable. */
@@ -243,7 +245,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/poppler/poppler-config.h
-@@ -0,0 +1,166 @@
+@@ -0,0 +1,161 @@
 +//= -*- mode: 

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst external/poppler

2021-11-12 Thread Michael Stahl (via logerrit)
 download.lst  |4 +-
 external/poppler/StaticLibrary_poppler.mk |2 +
 external/poppler/poppler-config.patch.1   |   58 +++---
 3 files changed, 49 insertions(+), 15 deletions(-)

New commits:
commit 0183aeb68189637fe98b7c0e6c3a64ac84736123
Author: Michael Stahl 
AuthorDate: Thu Nov 11 11:01:43 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 12 12:41:43 2021 +0100

poppler: upgrade to release 21.11.0

The changelogs tend to mention "crash in malformed files" a lot.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125034
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 03bc0f97205593547ddf1fc8d4fb396479bcab6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124973
Reviewed-by: Caolán McNamara 
(cherry picked from commit 22beb8f80985ea73e2c98d14480e53da81673c67)

Change-Id: Iadc1d9cc23abd09a8fff58ba0cb7a7803236a542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125087
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index b7145a9822c5..22cd0fb9ed4c 100644
--- a/download.lst
+++ b/download.lst
@@ -206,8 +206,8 @@ export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
-export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
-export POPPLER_TARBALL := poppler-21.01.0.tar.xz
+export POPPLER_SHA256SUM := 
31b76b5cac0a48612fdd154c02d9eca01fd38fb8eaa77c1196840ecdeb53a584
+export POPPLER_TARBALL := poppler-21.11.0.tar.xz
 export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
 export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
diff --git a/external/poppler/StaticLibrary_poppler.mk 
b/external/poppler/StaticLibrary_poppler.mk
index 994b175fee6e..aab71eac9a6a 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -88,6 +88,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/fofi/FoFiType1C \
UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/poppler/Annot \
+   UnpackedTarball/poppler/poppler/AnnotStampImageHelper \
UnpackedTarball/poppler/poppler/Array \
UnpackedTarball/poppler/poppler/BBoxOutputDev \
UnpackedTarball/poppler/poppler/CachedFile \
@@ -152,6 +153,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/Movie \
UnpackedTarball/poppler/poppler/Rendition \
UnpackedTarball/poppler/poppler/DCTStream \
+   UnpackedTarball/poppler/splash/SplashBitmap \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/poppler/poppler-config.patch.1 
b/external/poppler/poppler-config.patch.1
index b902402ea4e7..2a24d4510197 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -16,7 +16,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/config.h
-@@ -0,0 +1,221 @@
+@@ -0,0 +1,223 @@
 +/* config.h.  Generated from config.h.cmake by cmake.  */
 +
 +/* Build against libcurl. */
@@ -176,7 +176,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_NAME "poppler"
 +
 +/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 21.01.0"
++#define PACKAGE_STRING "poppler 21.11.0"
 +
 +/* Define to the one symbol short name of this package. */
 +#define PACKAGE_TARNAME "poppler"
@@ -185,7 +185,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_URL ""
 +
 +/* Define to the version of this package. */
-+#define PACKAGE_VERSION "21.01.0"
++#define PACKAGE_VERSION "21.11.0"
 +
 +/* Poppler data dir */
 +#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -203,7 +203,7 @@ index 0fbd336a..451213f8 100644
 +/* #undef USE_FLOAT */
 +
 +/* Version number of package */
-+#define VERSION "21.01.0"
++#define VERSION "21.11.0"
 +
 +#if defined(__APPLE__)
 +#elif defined (_WIN32)
@@ -228,6 +228,8 @@ index 0fbd336a..451213f8 100644
 +#if defined(_MSC_VER) || defined(__BORLANDC__)
 +#define popen _popen
 +#define pclose _pclose
++#define strncasecmp _strnicmp
++// error C4005: "strcasecmp": macro redefinition#define strcasecmp 
_stricmp
 +#endif
 +
 +/* Number of bits in a file offset, on hosts where this is settable. */
@@ -243,7 +245,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/poppler/poppler-config.h
-@@ -0,0 +1,166 @@
+@@ -0,0 +1,161 @@
 +//= -*- mode: 

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

2021-11-12 Thread Xisco Fauli (via logerrit)
 sd/qa/uitest/impress_tests/exportToPDF.py |   77 ++
 1 file changed, 77 insertions(+)

New commits:
commit e1a9d507d92cc793f7f10f87cdd7a5534faa5759
Author: Xisco Fauli 
AuthorDate: Fri Nov 12 11:17:42 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 12 12:37:58 2021 +0100

uitest: sd: Add UItest for .uno:ExportToPDF

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

diff --git a/sd/qa/uitest/impress_tests/exportToPDF.py 
b/sd/qa/uitest/impress_tests/exportToPDF.py
new file mode 100644
index ..c53918c03980
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/exportToPDF.py
@@ -0,0 +1,77 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+
+class exportToPDF(UITestCase):
+
+def test_checkDefaultValues(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, 'exportToPDFFromImpress-tmp.pdf')
+
+with self.ui_test.create_doc_in_start_center("impress"):
+
+xTemplateDlg = self.xUITest.getTopFocusWindow()
+xCancelBtn = xTemplateDlg.getChild("close")
+self.ui_test.close_dialog_through_button(xCancelBtn)
+
+xDoc = self.xUITest.getTopFocusWindow()
+xEdit = xDoc.getChild("impress_win")
+
+xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"Hello 
World"}))
+
+# Export as PDF
+with 
self.ui_test.execute_dialog_through_command('.uno:ExportToPDF', 
close_button="") as xDialog:
+
+selectedChildren = ['bookmarks', 'display', 'effects', 
'enablea11y', 'enablecopy', 'exporturl', 'forms', 'reduceresolution']
+
+for child in selectedChildren:
+self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
+
+nonSelectedChildren = ['allowdups', 'center', 'comments', 
'convert', 'embed', 'emptypages', 'export', 'exportplaceholders',
+'firstonleft', 'hiddenpages', 'menubar', 'notes', 
'onlynotes', 'open', 'pdfa', 'pdfua', 'resize', 'singlepagesheets',
+'tagged', 'toolbar', 'usereferencexobject', 
'viewpdf', 'watermark', 'window']
+
+for child in nonSelectedChildren:
+self.assertEqual("false", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
+
+checkedChildren = ['all', 'allbookmarks', 'changeany', 
'default', 'defaultlayout', 'fitdefault', 'jpegcompress', 'pageonly', 
'printhigh']
+
+for child in checkedChildren:
+self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Checked'])
+
+nonCheckedChildren = ['changecomment', 'changeform', 
'changeinsdel', 'changenone', 'contfacinglayout', 'contlayout', 'fitvis',
+'fitwidth', 'fitwin', 'fitzoom', 
'losslesscompress', 'openinternet', 'openpdf', 'outline', 'printlow', 
'printnone', 'range',
+'selection', 'singlelayout', 'thumbs', 
'visiblebookmark']
+
+for child in nonCheckedChildren:
+self.assertEqual("false", 
get_state_as_dict(xDialog.getChild(child))['Checked'])
+
+self.assertEqual("300 DPI", 
get_state_as_dict(xDialog.getChild("resolution"))['Text'])
+self.assertEqual("90%", 
get_state_as_dict(xDialog.getChild("quality"))['Text'])
+self.assertEqual("FDF", 
get_state_as_dict(xDialog.getChild("format"))['DisplayText'])
+
+xOk = xDialog.getChild("ok")
+with self.ui_test.execute_dialog_through_action(xOk, 
"CLICK", close_button="open") as xSaveDialog:
+xFileName = xSaveDialog.getChild('file_name')
+xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'CTRL+A'}))
+xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'BACKSPACE'}))
+xFileName.executeAction('TYPE', 
mkPropertyValues({'TEXT': xFilePath}))
+
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
+
+self.assertEqual("", 
document.DrawPages[0].getByIndex(0).String)
+self.assertEqual(" ", 
document.DrawPages[0].getByIndex(1).String)
+

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

2021-11-12 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_dialogs/openDialogs.py |4 -
 sc/qa/uitest/calc_tests4/exportToPDF.py  |   73 +++
 2 files changed, 75 insertions(+), 2 deletions(-)

New commits:
commit f3076ba858509756d8e69000632b41e06d14043e
Author: Xisco Fauli 
AuthorDate: Fri Nov 12 10:49:38 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 12 12:12:51 2021 +0100

uitest: sc: Add UItest for .uno:ExportToPDF

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

diff --git a/sc/qa/uitest/calc_dialogs/openDialogs.py 
b/sc/qa/uitest/calc_dialogs/openDialogs.py
index 109f97f4709b..a816b177341a 100644
--- a/sc/qa/uitest/calc_dialogs/openDialogs.py
+++ b/sc/qa/uitest/calc_dialogs/openDialogs.py
@@ -13,8 +13,8 @@ dialogs = [
 {"command": ".uno:OpenRemote", "closeButton": "cancel"},
 {"command": ".uno:SaveAsTemplate", "closeButton": "cancel"},
 {"command": ".uno:SaveAsRemote", "closeButton": "cancel"},
-{"command": ".uno:ExportToPDF", "closeButton": "cancel", "skipTestOK": 
True},
-# export needs filesystem
+# {"command": ".uno:ExportToPDF", "closeButton": "cancel", "skipTestOK": 
True},
+# tested in sc/qa/uitest/calc_tests4/exportToPDF.py
 {"command": ".uno:Print", "closeButton": "cancel", "skipTestOK": True},
 # no printer in CI
 {"command": ".uno:PrinterSetup", "closeButton": "cancel"},
diff --git a/sc/qa/uitest/calc_tests4/exportToPDF.py 
b/sc/qa/uitest/calc_tests4/exportToPDF.py
new file mode 100644
index ..dfe9e70cdcf4
--- /dev/null
+++ b/sc/qa/uitest/calc_tests4/exportToPDF.py
@@ -0,0 +1,73 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.calc import enter_text_to_cell
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+
+class exportToPDF(UITestCase):
+
+def test_checkDefaultValues(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, 'exportToPDFFromCalc-tmp.pdf')
+
+with self.ui_test.create_doc_in_start_center("calc"):
+
+calcDoc = self.xUITest.getTopFocusWindow()
+gridwin = calcDoc.getChild("grid_window")
+
+enter_text_to_cell(gridwin, "A1", "Hello World")
+
+# Export as PDF
+with 
self.ui_test.execute_dialog_through_command('.uno:ExportToPDF', 
close_button="") as xDialog:
+
+selectedChildren = ['bookmarks', 'display', 'effects', 
'enablea11y', 'enablecopy', 'exporturl', 'forms', 'reduceresolution']
+
+for child in selectedChildren:
+self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
+
+nonSelectedChildren = ['allowdups', 'center', 'comments', 
'convert', 'embed', 'emptypages', 'export', 'exportplaceholders',
+'firstonleft', 'hiddenpages', 'menubar', 'notes', 
'onlynotes', 'open', 'pdfa', 'pdfua', 'resize', 'singlepagesheets',
+'tagged', 'toolbar', 'usereferencexobject', 
'viewpdf', 'watermark', 'window']
+
+for child in nonSelectedChildren:
+self.assertEqual("false", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
+
+checkedChildren = ['allbookmarks', 'changeany', 'default', 
'defaultlayout', 'fitdefault', 'jpegcompress', 'pageonly', 'printhigh', 
'selection']
+
+for child in checkedChildren:
+self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Checked'])
+
+nonCheckedChildren = ['all', 'changecomment', 
'changeform', 'changeinsdel', 'changenone', 'contfacinglayout', 'contlayout', 
'fitvis', 'fitwidth',
+'fitwin', 'fitzoom', 'losslesscompress', 
'openinternet', 'openpdf', 'outline', 'printlow', 'printnone', 'range',
+'singlelayout', 'thumbs', 'visiblebookmark']
+
+for child in nonCheckedChildren:
+self.assertEqual("false", 
get_state_as_dict(xDialog.getChild(child))['Checked'])
+
+self.assertEqual("300 DPI", 
get_state_as_dict(xDialog.getChild("resolution"))['Text'])
+self.assertEqual("90%", 
get_state_as_dict(xDialog.getChild("quality"))['Text'])
+self.assertEqual("FDF", 
get_state_as_dict(xDialog.getChild("format"))['DisplayText'])
+
+xOk

[Libreoffice-commits] core.git: include/vcl offapi/com offapi/UnoApi_offapi.mk toolkit/source vcl/source

2021-11-12 Thread Luboš Luňák (via logerrit)
 include/vcl/outdev.hxx   |   19 +++
 offapi/UnoApi_offapi.mk  |3 +
 offapi/com/sun/star/awt/XFontMappingUse.idl  |   56 +++
 offapi/com/sun/star/awt/XFontMappingUseItem.idl  |   55 ++
 offapi/com/sun/star/awt/XToolkit3.idl|   47 +++
 offapi/com/sun/star/awt/XToolkitExperimental.idl |4 -
 toolkit/source/awt/vclxtoolkit.cxx   |   28 +++
 vcl/source/outdev/text.cxx   |   55 ++
 8 files changed, 265 insertions(+), 2 deletions(-)

New commits:
commit 5054202e71605cb4f10c798be766798d99cb1b6a
Author: Luboš Luňák 
AuthorDate: Mon Oct 4 15:03:19 2021 +0200
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 12:12:13 2021 +0100

make it possible to find out what fonts are actually really used

A document specifies which font each text is supposed to use,
but we still need to map that to a real available font, which
includes also font fallback in case the font selected doesn't
cover all glyphs.

This commit adds API to track this font mapping, first
StartTrackingFontMappingUse() will make VCL record this
information, and then FinishTrackingFontMappingUse() will stop
and return all the information, as a listing saying that
a requested font got mapped to a list of fonts and the number
of times this took place. This can be useful to find out
what actually gets used for a specific document, or compare how
changing fonts available affects a specific document.

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e9b8d3540cd1..8c0746215a50 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1253,6 +1253,25 @@ public:
 LogicalFontInstance* pLogicalFont, int 
nFallbackLevel,
 vcl::text::ImplLayoutArgs& rLayoutArgs, 
const SalLayoutGlyphs* ) const;
 
+/*
+ These functions allow collecting information on how fonts are mapped when 
used, such as what
+ replacements are used when a requrested font is missing or which fonts 
are used as fallbacks
+ when a font doesn't provide all necessary glyphs.
+ After StartTrackingFontMappingUse() is called, VCL starts collecting font 
usage for all
+ text layout calls, FinishTrackingFontMappingUse() will stop collecting 
and providing
+ the collected information.
+ Each item is a mapping from a requested font to a list of actually used 
fonts and the number
+ of times this mapping was done.
+*/
+struct FontMappingUseItem
+{
+OUString mOriginalFont;
+std::vector mUsedFonts;
+int mCount;
+};
+typedef std::vector FontMappingUseData;
+static void StartTrackingFontMappingUse();
+static FontMappingUseData FinishTrackingFontMappingUse();
 
 // Enabling/disabling RTL only makes sense for OutputDevices that use a 
mirroring SalGraphicsLayout
 virtual voidEnableRTL( bool bEnable = true);
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 26b56bedd8e5..6f1dc604a8e3 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1828,6 +1828,8 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/awt,\
XFocusListener \
XFont \
XFont2 \
+   XFontMappingUse \
+   XFontMappingUseItem \
XGraphics \
XGraphics2 \
XImageButton \
@@ -1890,6 +1892,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/awt,\
XToggleButton \
XToolkit \
XToolkit2 \
+   XToolkit3 \
XToolkitExperimental \
XToolkitRobot \
XTopWindow \
diff --git a/offapi/com/sun/star/awt/XFontMappingUse.idl 
b/offapi/com/sun/star/awt/XFontMappingUse.idl
new file mode 100644
index ..8140d6a78a4a
--- /dev/null
+++ b/offapi/com/sun/star/awt/XFontMappingUse.idl
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance 

[Libreoffice-commits] core.git: basegfx/source include/basegfx svgio/source vcl/skia

2021-11-12 Thread Noel Grandin (via logerrit)
 basegfx/source/polygon/b2dpolypolygoncutter.cxx  |   74 ++-
 include/basegfx/polygon/b2dpolypolygoncutter.hxx |2 
 svgio/source/svgreader/svgclippathnode.cxx   |2 
 svgio/source/svgreader/svgstyleattributes.cxx|4 -
 vcl/skia/gdiimpl.cxx |4 -
 5 files changed, 41 insertions(+), 45 deletions(-)

New commits:
commit b2247f86e42c05991165834ff5d63731b0da2b3b
Author: Noel Grandin 
AuthorDate: Fri Nov 12 11:46:21 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 12 12:11:36 2021 +0100

improve mergeToSinglePolyPolygon

spotted by llunak.

No need to take param by &&, since mergeToSinglePol does not
actually need to modify it.

Also flatten it a little.

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

diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx 
b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 9d3cd7b450df..ac1e10660607 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -1067,81 +1067,77 @@ namespace basegfx::utils
 }
 }
 
-B2DPolyPolygon mergeToSinglePolyPolygon(B2DPolyPolygonVector&& rInput)
+B2DPolyPolygon mergeToSinglePolyPolygon(const B2DPolyPolygonVector& 
rInput)
 {
-B2DPolyPolygonVector aInput(std::move(rInput));
+if(rInput.empty())
+return B2DPolyPolygon();
 
 // first step: prepareForPolygonOperation and simple merge of 
non-overlapping
 // PolyPolygons for speedup; this is possible for the wanted 
OR-operation
-if(!aInput.empty())
+B2DPolyPolygonVector aResult;
+aResult.reserve(rInput.size());
+
+for(const basegfx::B2DPolyPolygon & a : rInput)
 {
-B2DPolyPolygonVector aResult;
-aResult.reserve(aInput.size());
+const basegfx::B2DPolyPolygon 
aCandidate(prepareForPolygonOperation(a));
 
-for(const basegfx::B2DPolyPolygon & a : aInput)
+if(!aResult.empty())
 {
-const basegfx::B2DPolyPolygon 
aCandidate(prepareForPolygonOperation(a));
+const B2DRange aCandidateRange(aCandidate.getB2DRange());
+bool bCouldMergeSimple(false);
 
-if(!aResult.empty())
+for(auto & b: aResult)
 {
-const B2DRange 
aCandidateRange(aCandidate.getB2DRange());
-bool bCouldMergeSimple(false);
-
-for(auto & b: aResult)
-{
-basegfx::B2DPolyPolygon aTarget(b);
-const B2DRange aTargetRange(aTarget.getB2DRange());
-
-if(!aCandidateRange.overlaps(aTargetRange))
-{
-aTarget.append(aCandidate);
-b = aTarget;
-bCouldMergeSimple = true;
-break;
-}
-}
+basegfx::B2DPolyPolygon aTarget(b);
+const B2DRange aTargetRange(aTarget.getB2DRange());
 
-if(!bCouldMergeSimple)
+if(!aCandidateRange.overlaps(aTargetRange))
 {
-aResult.push_back(aCandidate);
+aTarget.append(aCandidate);
+b = aTarget;
+bCouldMergeSimple = true;
+break;
 }
 }
-else
+
+if(!bCouldMergeSimple)
 {
 aResult.push_back(aCandidate);
 }
 }
-
-aInput = aResult;
+else
+{
+aResult.push_back(aCandidate);
+}
 }
 
 // second step: melt pairwise to a single PolyPolygon
-while(aInput.size() > 1)
+while(aResult.size() > 1)
 {
-B2DPolyPolygonVector aResult;
-aResult.reserve((aInput.size() / 2) + 1);
+B2DPolyPolygonVector aResult2;
+aResult2.reserve((aResult.size() / 2) + 1);
 
-for(size_t a(0); a < aInput.size(); a += 2)
+for(size_t a(0); a < aResult.size(); a += 2)
 {
-if(a + 1 < aInput.size())
+if(a + 1 < aResult.size())
 {
 // a pair for processing
-

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source include/sfx2 sfx2/source sw/inc sw/source test/source

2021-11-12 Thread Luboš Luňák (via logerrit)
 desktop/source/lib/init.cxx   |5 +++--
 include/sfx2/viewsh.hxx   |5 +++--
 sfx2/source/view/viewsh.cxx   |2 +-
 sw/inc/view.hxx   |2 +-
 sw/inc/viscrs.hxx |4 ++--
 sw/source/core/crsr/viscrs.cxx|6 --
 sw/source/uibase/inc/wrtsh.hxx|2 +-
 sw/source/uibase/uiview/view.cxx  |4 ++--
 sw/source/uibase/wrtsh/wrtsh4.cxx |6 +++---
 test/source/lokcallback.cxx   |   10 ++
 10 files changed, 26 insertions(+), 20 deletions(-)

New commits:
commit c33f23598f9bc5ed80c95b18e373c91b68b2511e
Author: Luboš Luňák 
AuthorDate: Fri Nov 12 10:56:54 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 12:10:00 2021 +0100

make it explicit whether to ignore the result of getLOKPayload()

Returning an empty string to signify 'ignore' was a poor design,
as some messages types actually may have valid empty messages.

Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125089
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d3353e441474..e71e62929903 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2197,8 +2197,9 @@ void CallbackFlushHandler::enqueueUpdatedTypes()
 
 void CallbackFlushHandler::enqueueUpdatedType( int type, SfxViewShell* 
viewShell, int viewId )
 {
-OString payload = viewShell->getLOKPayload( type, viewId );
-if(payload.isEmpty())
+bool ignore = false;
+OString payload = viewShell->getLOKPayload( type, viewId, &ignore );
+if(ignore)
 return; // No actual payload to send.
 CallbackData callbackData(payload.getStr(), viewId);
 m_queue1.emplace_back(type);
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index f0d71bc542e6..26a2324c7ca0 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -345,8 +345,9 @@ public:
 virtual void libreOfficeKitViewUpdatedCallback(int nType) const override;
 virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int 
nViewId, int nSourceViewId) const override;
 // Returns current payload for nType, after 
libreOfficeKitViewUpdatedCallback() or
-// libreOfficeKitViewUpdatedCallbackPerViewId() were called.
-virtual OString getLOKPayload(int nType, int nViewId) const;
+// libreOfficeKitViewUpdatedCallbackPerViewId() were called. If no payload 
should
+// be generated, the ignore flag should be set.
+virtual OString getLOKPayload(int nType, int nViewId, bool* ignore) const;
 
 /// Set if we are doing tiled searching.
 void setTiledSearching(bool bTiledSearching);
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 325c9ffa71cc..d1c0e48ba18e 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1552,7 +1552,7 @@ void SfxViewShell::flushPendingLOKInvalidateTiles()
 // SfxViewShell itself does not delay any tile invalidations.
 }
 
-OString SfxViewShell::getLOKPayload(int nType, int /*nViewId*/) const
+OString SfxViewShell::getLOKPayload(int nType, int /*nViewId*/, bool* 
/*ignore*/) const
 {
 // SfxViewShell itself currently doesn't handle any updated-payload types.
 SAL_WARN("sfx.view", "SfxViewShell::getLOKPayload unhandled type " << 
lokCallbackTypeToString(nType));
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index b793614f58f7..0f062d3bedf3 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -680,7 +680,7 @@ public:
 
 virtual tools::Rectangle getLOKVisibleArea() const override;
 virtual void flushPendingLOKInvalidateTiles() override;
-virtual OString getLOKPayload(int nType, int nViewId) const override;
+virtual OString getLOKPayload(int nType, int nViewId, bool* ignore) const 
override;
 };
 
 inline tools::Long SwView::GetXScroll() const
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index b2ceb9c67c79..dc7e020ad103 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -61,7 +61,7 @@ public:
 void SetPosAndShow(SfxViewShell const * pViewShell);
 const vcl::Cursor& GetTextCursor() const;
 
-OString getLOKPayload(int nType, int nViewId) const;
+OString getLOKPayload(int nType, int nViewId, bool* ignore) const;
 };
 
 // From here classes/methods for selections.
@@ -115,7 +115,7 @@ public:
 static void Get1PixelInLogic( const SwViewShell& rSh,
 tools::Long* pX = nullptr, tools::Long* pY 
= nullptr );
 
-OString getLOKPayload(int nType, int nViewId) const;
+OString getLOKPayload(int nType, int nViewId, bool* ignore) const;
 };
 
 class SW_DLLPUBLIC SwShellCursor : public virtual SwCursor, public 
SwSelPaintRects
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 7d9564295fab..f81f9750b312 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx

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

2021-11-12 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_dialogs/openDialogs.py |4 -
 sw/qa/uitest/writer_tests4/exportToPDF.py  |   71 +
 2 files changed, 73 insertions(+), 2 deletions(-)

New commits:
commit 67c541621b701a6873f4e507ad9cc4119b2985bf
Author: Xisco Fauli 
AuthorDate: Fri Nov 12 10:10:07 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 12 12:05:36 2021 +0100

uitest: sw: Add UItest for .uno:ExportToPDF

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

diff --git a/sw/qa/uitest/writer_dialogs/openDialogs.py 
b/sw/qa/uitest/writer_dialogs/openDialogs.py
index 4f7c97835dbd..3579956f1256 100644
--- a/sw/qa/uitest/writer_dialogs/openDialogs.py
+++ b/sw/qa/uitest/writer_dialogs/openDialogs.py
@@ -13,8 +13,8 @@ dialogs = [
 {"command": ".uno:OpenRemote", "closeButton": "cancel"},
 {"command": ".uno:NewDoc", "closeButton": "close"},
 {"command": ".uno:SaveAsTemplate", "closeButton": "cancel"},
-{"command": ".uno:ExportToPDF", "closeButton": "cancel", "skipTestOK": 
True},
-# export needs filesystem
+#{"command": ".uno:ExportToPDF", "closeButton": "cancel", "skipTestOK": 
True},
+# tested in sw/qa/uitest/writer_tests4/exportToPDF.py
 {"command": ".uno:ExportToEPUB", "closeButton": "cancel", "skipTestOK": 
True},
 # export needs filesystem
 {"command": ".uno:Print", "closeButton": "cancel", "skipTestOK": True},
diff --git a/sw/qa/uitest/writer_tests4/exportToPDF.py 
b/sw/qa/uitest/writer_tests4/exportToPDF.py
new file mode 100644
index ..cc35227d09b8
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/exportToPDF.py
@@ -0,0 +1,71 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import type_text
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+
+class exportToPDF(UITestCase):
+
+def test_checkDefaultValues(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, 'exportToPDFFromWriter-tmp.pdf')
+
+with self.ui_test.create_doc_in_start_center("writer"):
+
+xMainWindow = self.xUITest.getTopFocusWindow()
+xEdit = xMainWindow.getChild("writer_edit")
+
+type_text(xEdit, "Hello World")
+
+# Export as PDF
+with 
self.ui_test.execute_dialog_through_command('.uno:ExportToPDF', 
close_button="") as xDialog:
+
+selectedChildren = ['bookmarks', 'display', 'effects', 
'enablea11y', 'enablecopy', 'exporturl', 'forms', 'reduceresolution']
+
+for child in selectedChildren:
+self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
+
+nonSelectedChildren = ['allowdups', 'center', 'comments', 
'convert', 'embed', 'emptypages', 'export', 'exportplaceholders',
+'firstonleft', 'hiddenpages', 'menubar', 'notes', 
'onlynotes', 'open', 'pdfa', 'pdfua', 'resize', 'singlepagesheets',
+'tagged', 'toolbar', 'usereferencexobject', 
'viewpdf', 'watermark', 'window']
+
+for child in nonSelectedChildren:
+self.assertEqual("false", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
+
+checkedChildren = ['all', 'allbookmarks', 'changeany', 
'default', 'defaultlayout', 'fitdefault', 'jpegcompress', 'pageonly', 
'printhigh']
+
+for child in checkedChildren:
+self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Checked'])
+
+nonCheckedChildren = ['changecomment', 'changeform', 
'changeinsdel', 'changenone', 'contfacinglayout', 'contlayout', 'fitvis',
+'fitwidth', 'fitwin', 'fitzoom', 
'losslesscompress', 'openinternet', 'openpdf', 'outline', 'printlow', 
'printnone', 'range',
+'selection', 'singlelayout', 'thumbs', 
'visiblebookmark']
+
+for child in nonCheckedChildren:
+self.assertEqual("false", 
get_state_as_dict(xDialog.getChild(child))['Checked'])
+
+self.assertEqual("300 DPI", 
get_state_as_dict(xDialog.getChild("resolution"))['Text'])
+self.assertEqual("90%", 
get_state_as_dict(xDialog.getChild("quality"))['Text'])
+self.assertEqual("FDF", 
get_state_as_dict(xDialog.getChild("format"))['DisplayText'])
+

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

2021-11-12 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter3.cxx |   54 
 1 file changed, 54 insertions(+)

New commits:
commit a0a4aa475e29bd030313c1a17e962386e6d063ca
Author: Xisco Fauli 
AuthorDate: Fri Nov 12 09:19:40 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 12 11:59:44 2021 +0100

tdf#145584: sw_uiwriter3: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 72e91ba9f0cb..b90e5d18ee56 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -1768,6 +1770,58 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130629)
 CPPUNIT_ASSERT_EQUAL(1, getShapes());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145584)
+{
+std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
+if (!pPDFium)
+{
+return;
+}
+SwDoc* const pDoc = createSwDoc();
+SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+CPPUNIT_ASSERT(pWrtSh);
+
+pWrtSh->Insert("Hello World");
+
+// Select 'World'
+pWrtSh->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 5, /*bBasicCall=*/false);
+
+// Save as PDF.
+uno::Sequence aFilterData(
+comphelper::InitPropertySequence({ { "Selection", uno::Any(true) } }));
+
+uno::Sequence 
aDescriptor(comphelper::InitPropertySequence(
+{ { "FilterName", uno::Any(OUString("writer_pdf_Export")) },
+  { "FilterData", uno::Any(aFilterData) },
+  { "URL", uno::Any(maTempFile.GetURL()) } }));
+
+// Without the fix in place, this test would have crashed here
+dispatchCommand(mxComponent, ".uno:ExportToPDF", aDescriptor);
+
+// Parse the export result.
+SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+SvMemoryStream aMemory;
+aMemory.WriteStream(aFile);
+std::unique_ptr pPdfDocument
+= pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize());
+CPPUNIT_ASSERT(pPdfDocument);
+CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
+std::unique_ptr pPdfPage = 
pPdfDocument->openPage(/*nIndex=*/0);
+CPPUNIT_ASSERT(pPdfPage);
+CPPUNIT_ASSERT_EQUAL(1, pPdfPage->getObjectCount());
+std::unique_ptr pPdfTextPage = 
pPdfPage->getTextPage();
+CPPUNIT_ASSERT(pPdfTextPage);
+
+int nChars = pPdfTextPage->countChars();
+CPPUNIT_ASSERT_EQUAL(5, nChars);
+
+std::vector aChars(nChars);
+for (int i = 0; i < nChars; i++)
+aChars[i] = pPdfTextPage->getUnicode(i);
+OUString aActualText(aChars.data(), aChars.size());
+CPPUNIT_ASSERT_EQUAL(OUString("World"), aActualText);
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf116315)
 {
 SwDoc* const pDoc = createSwDoc();


[Libreoffice-commits] core.git: external/rhino

2021-11-12 Thread Michael Stahl (via logerrit)
 external/rhino/UnpackedTarball_rhino.mk |1 +
 external/rhino/rhino-classpath.patch.1  |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit bb58293296f843654045d7b0eba6899d11533a4a
Author: Michael Stahl 
AuthorDate: Tue Nov 9 18:48:38 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 12 11:29:26 2021 +0100

rhino: unbreak build on Fedora 34

Sometime during the Fedora 34 lifecycle, ant started to put
/usr/share/java/rhino.jar on the classpath used to invoke javac,
which results in:

[javac] 
workdir/UnpackedTarball/rhino/src/org/mozilla/javascript/optimizer/Codegen.java:202:
 error: reference to Hashtable is ambiguous
[javac] Hashtable possibleDirectCalls = null;
[javac] ^
[javac]   both class java.util.Hashtable in java.util and class 
org.mozilla.javascript.Hashtable in org.mozilla.javascript match

Indeed /usr/share/java/rhino.jar contains a class
org.mozilla.javascript.Hashtable, while it doesn't exist yet in the
older rhino1_5R5.zip that is bundled.

The problem is that the package ant-apache-bsf contains the file
/etc/ant.d/apache-bsf which references the system rhino jar.

It turns out that reading the /etc/ant.d/* files in the shell script
/usr/bin/ant can be suppressed by setting the variable OPT_JAR_LIST to a
non-empty value, which is documented as "A user should
request optional jars and their dependencies via the OPT_JAR_LIST
variable", but which is sadly ignored if set to an empty value.

Another way to fix the problem is to patch the property
build.sysclasspath to "ignore" in build.xml.

http://ant.apache.org/manual/sysclasspath.html

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

diff --git a/external/rhino/UnpackedTarball_rhino.mk 
b/external/rhino/UnpackedTarball_rhino.mk
index 0a1492b88da6..15a596eb1b0f 100644
--- a/external/rhino/UnpackedTarball_rhino.mk
+++ b/external/rhino/UnpackedTarball_rhino.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,rhino,\
external/rhino/rhino1_5R5.patch \
external/rhino/rhino1_5R5-find_swing.patch \
external/rhino/rhino1_5R5-updateToolTip.patch \
+   external/rhino/rhino-classpath.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,rhino,toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java,external/rhino/OfficeScriptInfo.java))
diff --git a/external/rhino/rhino-classpath.patch.1 
b/external/rhino/rhino-classpath.patch.1
new file mode 100644
index ..c751b95b5d9b
--- /dev/null
+++ b/external/rhino/rhino-classpath.patch.1
@@ -0,0 +1,13 @@
+/usr/bin/ant will put dozens of jars on the classpath, including a
+rhino.jar that breaks the build
+
+--- rhino/build.xml.orig   2021-11-11 17:25:07.284267174 +0100
 rhino/build.xml2021-11-11 17:25:38.689242510 +0100
+@@ -33,6 +33,7 @@
+ 
+ 
+ 
++
+   
+ 
+   


[Libreoffice-commits] core.git: cui/source fpicker/source sc/source sfx2/source starmath/source sw/source ucb/source unotest/source writerfilter/source

2021-11-12 Thread Stephan Bergmann (via logerrit)
 cui/source/options/dbregister.cxx  |6 +-
 fpicker/source/office/fileview.cxx |3 ++-
 sc/source/core/data/segmenttree.cxx|3 ++-
 sc/source/core/tool/interpr1.cxx   |2 +-
 sc/source/filter/excel/xiescher.cxx|3 ++-
 sfx2/source/bastyp/helper.cxx  |5 -
 starmath/source/ooxmlimport.cxx|6 +-
 sw/source/ui/index/cnttab.cxx  |6 --
 sw/source/uibase/envelp/labelcfg.cxx   |3 ++-
 sw/source/uibase/uiview/view.cxx   |6 +-
 ucb/source/ucp/package/pkgcontent.cxx  |8 ++--
 ucb/source/ucp/package/pkguri.cxx  |8 ++--
 unotest/source/cpp/filters-test.cxx|3 ++-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |7 ---
 14 files changed, 50 insertions(+), 19 deletions(-)

New commits:
commit f8a30a87a9d0c68dc16d5fa2ca63f687b1d90da1
Author: Stephan Bergmann 
AuthorDate: Fri Nov 12 09:56:30 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Nov 12 11:23:14 2021 +0100

Fix (mis-)uses of temporary O[U]StringLiteral

...as sub-expressions of ternary operators, which happened to keep compiling
after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a
consteval'ed, static-refcound rtl_String" and
e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a
consteval'ed, static-refcound rtl_uString" because both branches are of the 
same
type O[U]StringLiteral, and which didn't cause any issues because no 
dangling
pointers to those temporary objects escaped the surrounding full 
expressions.

This was found with an experimental build with VS 2022 with
--enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some 
linking
fix in the configure.ac detection code (which is forthcoming in a later 
commit)
and flagged all these uses in ternary operators as error C7595 "call to
immediate function is not a constant expression".  That error looks bogus 
(and
it also caused a false

> sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to 
immediate function is not a constant expression

so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that
compiler bug is fixed), but it nicely found all these cases that should 
arguably
be cleaned up.

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

diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index ba61527cdeca..357a4af426c9 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
+
 #include 
 #include "dbregistersettings.hxx"
 #include 
@@ -188,7 +192,7 @@ void DbRegistrationOptionsPage::FillUserData()
 {
 OUString aUserData = OUString::number( 
m_xPathBox->get_column_width(COL_TYPE) ) + ";";
 bool bUp = m_xPathBox->get_sort_order();
-aUserData += (bUp ? OUStringLiteral(u"1") : OUStringLiteral(u"0"));
+aUserData += (bUp ? std::u16string_view(u"1") : std::u16string_view(u"0"));
 SetUserData( aUserData );
 }
 
diff --git a/fpicker/source/office/fileview.cxx 
b/fpicker/source/office/fileview.cxx
index 203f1d1d27b3..0e13bc0a3b55 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -36,6 +36,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1060,7 +1061,7 @@ OUString SvtFileView::GetConfigString() const
 OUString sRet = OUString::number( mpImpl->mnSortColumn ) + ";";
 
 bool bUp = mpImpl->mbAscending;
-sRet += (bUp ? OUStringLiteral(u"1") : OUStringLiteral(u"0")) + ";";
+sRet += OUString::Concat(bUp ? std::u16string_view(u"1") : 
std::u16string_view(u"0")) + ";";
 
 weld::TreeView* pView = mpImpl->mxView->getWidget();
 sal_uInt16 nCount = mpImpl->mxView->TypeColumnVisible() ? 4 : 3;
diff --git a/sc/source/core/data/segmenttree.cxx 
b/sc/source/core/data/segmenttree.cxx
index 60003fb924b3..f57578149e0f 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using ::std::numeric_limits;
@@ -499,7 +500,7 @@ OString ScFlatBoolRowSegments::dumpAsString()
 while (getRangeData(nRow, aRange))
 {
 if (!nRow)
-aSegment = (aRange.mbValue ? OStringLiteral("1") : 
OStringLiteral("0")) + OString::Concat(":");
+aSegment = (aRange.mbValue ? std::string_view("1") : 
std::string_view("0")) + OString::Concat(":");
 else
 aSegment.clear();
 
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e

[Libreoffice-commits] core.git: external/pdfium

2021-11-12 Thread Tor Lillqvist (via logerrit)
 external/pdfium/build.patch.1 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 9c8076f438dfac311a9c7dce559e8ab3ea4fd6e0
Author: Tor Lillqvist 
AuthorDate: Fri Nov 12 11:40:33 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Fri Nov 12 11:20:01 2021 +0100

Include  in fxcodec/fx_codec.h

Fixes the build of Pdfium on Fedora 34 for me. No idea why it wasn't
needed on other platforms.

Change-Id: Id0d6172383970b289b6b3b7f6b5c0da998167796
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125084
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 
Reviewed-by: Tor Lillqvist 

diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
index ec29803246ed..8d5e22f43c61 100644
--- a/external/pdfium/build.patch.1
+++ b/external/pdfium/build.patch.1
@@ -1,3 +1,4 @@
+-*- Mode: diff -*-
 diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
 index 323de4ffc..f11a0b0ad 100644
 --- a/core/fpdfdoc/cpdf_metadata.cpp
@@ -50,3 +51,13 @@ index d8875786c..bc019ebe1 100644
  }
  
  void sycc_to_rgb(int offset,
+--- a/core/fxcodec/fx_codec.h
 b/core/fxcodec/fx_codec.h
+@@ -8,6 +8,7 @@
+ #define CORE_FXCODEC_FX_CODEC_H_
+ 
+ #include 
++#include 
+ 
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ 


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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/salbmp.hxx  |1 
 vcl/qa/cppunit/skia/skia.cxx |   57 +++
 vcl/skia/salbmp.cxx  |2 -
 3 files changed, 59 insertions(+), 1 deletion(-)

New commits:
commit 897130541646a37e358463cb76aa505b66a1d7ac
Author: Luboš Luňák 
AuthorDate: Thu Nov 11 16:12:35 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 11:09:11 2021 +0100

fix assertion with scaled alpha image in SkiaSalBitmap

The size of the alpha image does not really depend in mPixelsSize,
it's created on demand and it's just necessary to check if it
has the right size.

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

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index 91b11ab6255b..455414fdd7fa 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -96,6 +96,7 @@ public:
 bool unittestHasImage() const { return mImage.get(); }
 bool unittestHasAlphaImage() const { return mAlphaImage.get(); }
 bool unittestHasEraseColor() const { return mEraseColorSet; }
+bool unittestHasPendingScale() const { return mSize != mPixelsSize; }
 const sal_uInt8* unittestGetBuffer() const { return mBuffer.get(); }
 const SkImage* unittestGetImage() const { return mImage.get(); }
 const SkImage* unittestGetAlphaImage() const { return mAlphaImage.get(); }
diff --git a/vcl/qa/cppunit/skia/skia.cxx b/vcl/qa/cppunit/skia/skia.cxx
index 4ff70306b3fe..128829aecc18 100644
--- a/vcl/qa/cppunit/skia/skia.cxx
+++ b/vcl/qa/cppunit/skia/skia.cxx
@@ -42,6 +42,7 @@ public:
 void testBitmapCopyOnWrite();
 void testMatrixQuality();
 void testDelayedScale();
+void testDelayedScaleAlphaImage();
 void testTdf137329();
 void testTdf140848();
 void testTdf132367();
@@ -54,6 +55,7 @@ public:
 CPPUNIT_TEST(testBitmapCopyOnWrite);
 CPPUNIT_TEST(testMatrixQuality);
 CPPUNIT_TEST(testDelayedScale);
+CPPUNIT_TEST(testDelayedScaleAlphaImage);
 CPPUNIT_TEST(testTdf137329);
 CPPUNIT_TEST(testTdf140848);
 CPPUNIT_TEST(testTdf132367);
@@ -372,6 +374,61 @@ void SkiaTest::testDelayedScale()
 skiaBitmap2.ReleaseBuffer(buffer2, BitmapAccessMode::Read);
 }
 
+void SkiaTest::testDelayedScaleAlphaImage()
+{
+if (!SkiaHelper::isVCLSkiaEnabled())
+return;
+auto bitmapTmp = std::make_unique();
+CPPUNIT_ASSERT(bitmapTmp->Create(Size(10, 10), vcl::PixelFormat::N24_BPP, 
BitmapPalette()));
+bitmapTmp->Erase(COL_RED);
+// Create a bitmap that has only an image, not a pixel buffer.
+SkiaSalBitmap bitmap(bitmapTmp->GetSkImage());
+bitmapTmp.release();
+CPPUNIT_ASSERT(!bitmap.unittestHasBuffer());
+CPPUNIT_ASSERT(bitmap.unittestHasImage());
+CPPUNIT_ASSERT(!bitmap.unittestHasAlphaImage());
+// Set up pending scale.
+CPPUNIT_ASSERT(bitmap.Scale(2.0, 2.0, BmpScaleFlag::Fast));
+CPPUNIT_ASSERT(bitmap.unittestHasPendingScale());
+CPPUNIT_ASSERT(bitmap.InterpretAs8Bit());
+// Ask for SkImage and make sure it's scaled up.
+sk_sp image = bitmap.GetSkImage();
+CPPUNIT_ASSERT_EQUAL(20, image->width());
+// Ask again, this time it should be cached.
+sk_sp image2 = bitmap.GetSkImage();
+CPPUNIT_ASSERT_EQUAL(image.get(), image2.get());
+// Add another scale.
+CPPUNIT_ASSERT(bitmap.Scale(3.0, 3.0, BmpScaleFlag::Fast));
+// Ask for alpha SkImage and make sure it's scaled up.
+sk_sp alphaImage = bitmap.GetAlphaSkImage();
+CPPUNIT_ASSERT_EQUAL(60, alphaImage->width());
+// Ask again, this time it should be cached.
+sk_sp alphaImage2 = bitmap.GetAlphaSkImage();
+CPPUNIT_ASSERT_EQUAL(alphaImage.get(), alphaImage2.get());
+// Ask again for non-alpha image, it should be scaled again.
+sk_sp image3 = bitmap.GetSkImage();
+CPPUNIT_ASSERT_EQUAL(60, image3->width());
+CPPUNIT_ASSERT(image3.get() != image2.get());
+CPPUNIT_ASSERT(image3.get() != image.get());
+// Create pixel buffer from the image (it should convert from alpha image 
because the bitmap is 8bpp
+// and the alpha image size matches).
+SkiaSalBitmap bitmapCopy;
+bitmapCopy.Create(bitmap);
+CPPUNIT_ASSERT(!bitmap.unittestHasBuffer());
+BitmapBuffer* buffer1 = bitmap.AcquireBuffer(BitmapAccessMode::Read);
+CPPUNIT_ASSERT(bitmap.unittestHasBuffer());
+bitmap.ReleaseBuffer(buffer1, BitmapAccessMode::Read);
+CPPUNIT_ASSERT_EQUAL(Size(60, 60), bitmap.GetSize());
+// Scale the copy before the buffer was created (this time it should 
convert from non-alpha image
+// because of the different size).
+CPPUNIT_ASSERT(!bitmapCopy.unittestHasBuffer());
+CPPUNIT_ASSERT(bitmapCopy.Scale(4.0, 4.0, BmpScaleFlag::Fast));
+BitmapBuffer* buffer2 = bitmapCopy.AcquireBuffer(BitmapAccessMode::Read);
+CPPUNIT_ASSERT(bitmapCopy.unittestHasBuffer());
+bitmapCopy.Re

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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/salbmp.hxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a8ea76779f8c0ab52f0200249a4a5cc279b914b3
Author: Luboš Luňák 
AuthorDate: Thu Nov 11 15:21:29 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 11:08:55 2021 +0100

log also whether SkiaSalBitmap has a pixel buffer

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

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index bb8ae16f1c2e..91b11ab6255b 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -147,6 +147,7 @@ private:
 // I/i - has SkImage (on GPU/CPU),
 // A/a - has alpha SkImage (on GPU/CPU)
 // E - has erase color
+// B - has pixel buffer
 stream << static_cast(bitmap) << " " << bitmap->GetSize() 
<< "x"
<< bitmap->GetBitCount();
 if (bitmap->GetBitCount() <= 8 && 
!bitmap->Palette().IsGreyPalette8Bit())
@@ -158,6 +159,8 @@ private:
 stream << (bitmap->mAlphaImage->isTextureBacked() ? "A" : "a");
 if (bitmap->mEraseColorSet)
 stream << "E" << bitmap->mEraseColor;
+if (bitmap->mBuffer)
+stream << "B";
 return stream;
 }
 


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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/skia/gdiimpl.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1008f2a06e43c19b7d8b95427198bd691eed5992
Author: Luboš Luňák 
AuthorDate: Wed Nov 10 16:29:36 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 11:08:40 2021 +0100

clean up SkCanvas before using the bitmap it's painted to

I think this is not strictly needed with raster bitmaps, but still,
this is the proper way.

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 642752a3bbdd..cc5e309a4d40 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -680,10 +680,12 @@ void SkiaSalGraphicsImpl::applyXor()
 abort();
 SkPaint paint;
 paint.setBlendMode(SkBlendMode::kSrc); // copy as is
-SkCanvas canvas(surfaceBitmap);
 SkRect area = SkRect::Make(mXorRegion.getBounds());
-canvas.drawImageRect(makeCheckedImageSnapshot(mSurface), area, area, 
SkSamplingOptions(),
- &paint, SkCanvas::kFast_SrcRectConstraint);
+{
+SkCanvas canvas(surfaceBitmap);
+canvas.drawImageRect(makeCheckedImageSnapshot(mSurface), area, area, 
SkSamplingOptions(),
+ &paint, SkCanvas::kFast_SrcRectConstraint);
+}
 // xor to surfaceBitmap
 assert(surfaceBitmap.info().alphaType() == kUnpremul_SkAlphaType);
 assert(mXorBitmap.info().alphaType() == kUnpremul_SkAlphaType);


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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/skia/gdiimpl.cxx |   93 ++-
 1 file changed, 27 insertions(+), 66 deletions(-)

New commits:
commit b11a510541f3758e1769f75b34cf27e70b846923
Author: Luboš Luňák 
AuthorDate: Mon Sep 13 14:08:33 2021 +0200
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 11:08:22 2021 +0100

drop usage of SkSurface::draw()

It causes so many problems that it almost doesn't get used in practice
anyway.

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 434209ae1dcf..642752a3bbdd 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1213,37 +1213,6 @@ bool 
SkiaSalGraphicsImpl::drawPolyPolygonBezier(sal_uInt32, const sal_uInt32*, c
 return false;
 }
 
-static void copyArea(SkCanvas* canvas, sk_sp surface, tools::Long 
nDestX,
- tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
- tools::Long nSrcWidth, tools::Long nSrcHeight, bool 
srcIsRaster,
- bool destIsRaster)
-{
-// Using SkSurface::draw() should be more efficient than 
SkSurface::makeImageSnapshot(),
-// because it may detect copying to itself and avoid some needless copies.
-// But it has problems with drawing to itself
-// (https://groups.google.com/forum/#!topic/skia-discuss/6yiuw24jv0I) and 
also
-// raster surfaces do not avoid a copy of the source
-// (https://groups.google.com/forum/#!topic/skia-discuss/S3FMpCi82k0).
-// Finally, there's not much point if one of them is raster and the other 
is not (chrome/m86 even crashes).
-if (canvas == surface->getCanvas() || srcIsRaster || (srcIsRaster != 
destIsRaster))
-{
-SkPaint paint;
-paint.setBlendMode(SkBlendMode::kSrc); // copy as is, including alpha
-canvas->drawImageRect(makeCheckedImageSnapshot(surface),
-  SkRect::MakeXYWH(nSrcX, nSrcY, nSrcWidth, 
nSrcHeight),
-  SkRect::MakeXYWH(nDestX, nDestY, nSrcWidth, 
nSrcHeight),
-  SkSamplingOptions(), &paint, 
SkCanvas::kFast_SrcRectConstraint);
-return;
-}
-// SkCanvas::draw() cannot do a subrectangle, so clip.
-canvas->save();
-canvas->clipRect(SkRect::MakeXYWH(nDestX, nDestY, nSrcWidth, nSrcHeight));
-SkPaint paint;
-paint.setBlendMode(SkBlendMode::kSrc); // copy as is, including alpha
-surface->draw(canvas, nDestX - nSrcX, nDestY - nSrcY, &paint);
-canvas->restore();
-}
-
 void SkiaSalGraphicsImpl::copyArea(tools::Long nDestX, tools::Long nDestY, 
tools::Long nSrcX,
tools::Long nSrcY, tools::Long nSrcWidth, 
tools::Long nSrcHeight,
bool /*bWindowInvalidate*/)
@@ -1256,8 +1225,13 @@ void SkiaSalGraphicsImpl::copyArea(tools::Long nDestX, 
tools::Long nDestY, tools
<< SkIRect::MakeXYWH(nDestX, nDestY, 
nSrcWidth, nSrcHeight));
 assert(!mXorMode);
 addUpdateRegion(SkRect::MakeXYWH(nDestX, nDestY, nSrcWidth, nSrcHeight));
-::copyArea(getDrawCanvas(), mSurface, nDestX, nDestY, nSrcX, nSrcY, 
nSrcWidth, nSrcHeight,
-   !isGPU(), !isGPU());
+// Using SkSurface::draw() should be more efficient, but it's too buggy.
+SkPaint paint;
+paint.setBlendMode(SkBlendMode::kSrc); // copy as is, including alpha
+getDrawCanvas()->drawImageRect(makeCheckedImageSnapshot(mSurface),
+   SkRect::MakeXYWH(nSrcX, nSrcY, nSrcWidth, 
nSrcHeight),
+   SkRect::MakeXYWH(nDestX, nDestY, nSrcWidth, 
nSrcHeight),
+   SkSamplingOptions(), &paint, 
SkCanvas::kFast_SrcRectConstraint);
 postDraw();
 }
 
@@ -1280,39 +1254,26 @@ void SkiaSalGraphicsImpl::copyBits(const SalTwoRect& 
rPosAry, SalGraphics* pSrcG
 assert(!mXorMode);
 addUpdateRegion(SkRect::MakeXYWH(rPosAry.mnDestX, rPosAry.mnDestY, 
rPosAry.mnDestWidth,
  rPosAry.mnDestHeight));
-if (rPosAry.mnSrcWidth == rPosAry.mnDestWidth && rPosAry.mnSrcHeight == 
rPosAry.mnDestHeight)
-{
-auto srcDebug = [&]() -> std::string {
-if (src == this)
-return "(self)";
-else
-{
-std::ostringstream stream;
-stream << "(" << src << ")";
-return stream.str();
-}
-};
-SAL_INFO("vcl.skia.trace",
- "copybits(" << this << "): " << srcDebug() << " copy area: " 
<< rPosAry);
-::copyArea(getDrawCanvas(), src->mSurface, rPosAry.mnDestX, 
rPosAry.mnDestY, rPosAry.mnSrcX,
-   rPosAry.mnSrcY, rPosAry.mnDestWidth, rPosAry.mnDestHeight, 
!src->isGPU(),
-   !isGPU());
-}

[Libreoffice-commits] core.git: dbaccess/source include/xmloff reportdesign/source sc/source xmloff/source

2021-11-12 Thread Noel Grandin (via logerrit)
 dbaccess/source/filter/xml/xmlHelper.cxx |   72 +--
 include/xmloff/maptype.hxx   |   23 +++-
 reportdesign/source/filter/xml/xmlHelper.cxx |   10 +--
 sc/source/filter/xml/xmlstyle.cxx|   10 +--
 xmloff/source/chart/PropertyMap.hxx  |   22 
 xmloff/source/draw/sdpropls.cxx  |6 +-
 xmloff/source/forms/controlpropertymap.cxx   |8 +--
 xmloff/source/style/PageMasterStyleMap.cxx   |6 +-
 xmloff/source/table/XMLTableExport.cxx   |4 -
 xmloff/source/text/txtprmap.cxx  |   27 --
 10 files changed, 101 insertions(+), 87 deletions(-)

New commits:
commit 5fe5ded723b2bea0c88ebc7647284dc0ade97ee3
Author: Noel Grandin 
AuthorDate: Fri Nov 12 10:07:18 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 12 10:55:07 2021 +0100

simplify construction of XMLPropertyMapEntry

so we don't have to pass in the size of the string literal.

This is mostly a preparatory change, to make an another
patch of mine less noisy.

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

diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx 
b/dbaccess/source/filter/xml/xmlHelper.cxx
index 65227360307e..85b98ec1eb70 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -72,7 +72,7 @@ rtl::Reference < XMLPropertySetMapper > 
OXMLHelper::GetTableStylesPropertySetMap
 {
 static const XMLPropertyMapEntry s_aTableStylesProperties[] =
 {
-{ nullptr, 0, 0, XML_TOKEN_INVALID, 0 , 0, 
SvtSaveOptions::ODFSVER_010, false}
+{ nullptr, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFSVER_010, 
false}
 };
 rtl::Reference < XMLPropertyHandlerFactory> xFac = new 
::xmloff::OControlPropertyHandlerFactory();
 return new XMLPropertySetMapper(s_aTableStylesProperties, xFac, 
bForExport);
@@ -82,12 +82,12 @@ rtl::Reference < XMLPropertySetMapper > 
OXMLHelper::GetColumnStylesPropertySetMa
 {
 static const XMLPropertyMapEntry s_aColumnStylesProperties[] =
 {
-{ PROPERTY_WIDTH, sizeof(PROPERTY_WIDTH)-1,  XML_NAMESPACE_STYLE, 
XML_COLUMN_WIDTH, XML_TYPE_MEASURE|XML_TYPE_PROP_TABLE_COLUMN, 0, 
SvtSaveOptions::ODFSVER_010, false },
-{ PROPERTY_HIDDEN, sizeof(PROPERTY_HIDDEN)-1,  XML_NAMESPACE_TABLE, 
XML_DISPLAY, XML_DB_TYPE_EQUAL|MID_FLAG_SPECIAL_ITEM|XML_TYPE_PROP_TABLE_COLUMN,
+{ PROPERTY_WIDTH, XML_NAMESPACE_STYLE, XML_COLUMN_WIDTH, 
XML_TYPE_MEASURE|XML_TYPE_PROP_TABLE_COLUMN, 0, SvtSaveOptions::ODFSVER_010, 
false },
+{ PROPERTY_HIDDEN, XML_NAMESPACE_TABLE, XML_DISPLAY, 
XML_DB_TYPE_EQUAL|MID_FLAG_SPECIAL_ITEM|XML_TYPE_PROP_TABLE_COLUMN,
   CTF_DB_ISVISIBLE, SvtSaveOptions::ODFSVER_010, false },
-{ PROPERTY_NUMBERFORMAT, sizeof(PROPERTY_NUMBERFORMAT)-1,  
XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, 
XML_TYPE_NUMBER|MID_FLAG_SPECIAL_ITEM|XML_TYPE_PROP_TABLE_COLUMN,
+{ PROPERTY_NUMBERFORMAT, XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, 
XML_TYPE_NUMBER|MID_FLAG_SPECIAL_ITEM|XML_TYPE_PROP_TABLE_COLUMN,
CTF_DB_NUMBERFORMAT, SvtSaveOptions::ODFSVER_010, false },
-{ nullptr, 0, 0, XML_TOKEN_INVALID, 0 , 0, 
SvtSaveOptions::ODFSVER_010, false}
+{ nullptr, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFSVER_010, 
false}
 };
 rtl::Reference < XMLPropertyHandlerFactory> xFac = new 
OPropertyHandlerFactory();
 return new XMLPropertySetMapper(s_aColumnStylesProperties, xFac, 
bForExport);
@@ -97,47 +97,45 @@ rtl::Reference < XMLPropertySetMapper > 
OXMLHelper::GetCellStylesPropertySetMapp
 {
 static const XMLPropertyMapEntry s_aCellStylesProperties[] =
 {
-{ PROPERTY_ALIGN, sizeof(PROPERTY_ALIGN)-1,  XML_NAMESPACE_FO, 
XML_TEXT_ALIGN, XML_TYPE_TEXT_ALIGN|XML_TYPE_PROP_PARAGRAPH, 
CTF_DB_COLUMN_TEXT_ALIGN, SvtSaveOptions::ODFSVER_010, false },
-{ PROPERTY_FONTNAME, sizeof(PROPERTY_FONTNAME)-1,  
XML_NAMESPACE_STYLE, XML_FONT_NAME, XML_TYPE_STRING|XML_TYPE_PROP_TEXT, 0 , 
SvtSaveOptions::ODFSVER_010, false },
-{ PROPERTY_TEXTCOLOR, sizeof(PROPERTY_TEXTCOLOR)-1,  XML_NAMESPACE_FO, 
XML_COLOR, XML_TYPE_COLOR|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, 
false },
-{ PROPERTY_TEXTLINECOLOR, sizeof(PROPERTY_TEXTLINECOLOR)-1,  
XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR,
+{ PROPERTY_ALIGN, XML_NAMESPACE_FO, XML_TEXT_ALIGN, 
XML_TYPE_TEXT_ALIGN|XML_TYPE_PROP_PARAGRAPH, CTF_DB_COLUMN_TEXT_ALIGN, 
SvtSaveOptions::ODFSVER_010, false },
+{ PROPERTY_FONTNAME, XML_NAMESPACE_STYLE, XML_FONT_NAME, 
XML_TYPE_STRING|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false },
+{ PROPERTY_TEXTCOLOR, XML_NAMESPACE_FO, XML_COLOR, 
XML_TYPE_COLOR|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false },
+{ PROPERTY_TEXTLINECOLOR, XML_NAMESPACE

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

2021-11-12 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/browser/formadapter.cxx  |  170 ++-
 dbaccess/source/ui/browser/sbamultiplex.cxx |  311 ++--
 dbaccess/source/ui/inc/sbamultiplex.hxx |  244 +
 3 files changed, 515 insertions(+), 210 deletions(-)

New commits:
commit 6bd74e49f8a99f14a7d8bdc005e2fd50e773841b
Author: Julien Nabet 
AuthorDate: Thu Nov 11 20:05:36 2021 +0100
Commit: Julien Nabet 
CommitDate: Fri Nov 12 10:36:57 2021 +0100

Replace some macros in dbaccess part 8

Remove DECLARE_PROPERTY_MULTIPLEXER + 
IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD
+ IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD + 
IMPLEMENT_LISTENER_ADMINISTRATION
+ IMPLEMENT_PROPERTY_MULTIPLEXER + 
IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION

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

diff --git a/dbaccess/source/ui/browser/formadapter.cxx 
b/dbaccess/source/ui/browser/formadapter.cxx
index a1e9b1f31ecb..344b3ff8dd4d 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -736,7 +736,26 @@ void SAL_CALL SbaXFormAdapter::execute()
 m_xMainForm->execute();
 }
 
-IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdbc, RowSetListener, 
m_aRowSetListeners, css::sdbc::XRowSet, m_xMainForm)
+void SAL_CALL SbaXFormAdapter::addRowSetListener(const css::uno::Reference< 
css::sdbc::XRowSetListener >& l)
+{
+m_aRowSetListeners.addInterface(l);
+if (m_aRowSetListeners.getLength() == 1)
+{
+css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, 
css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->addRowSetListener(&m_aRowSetListeners);
+}
+}
+void SAL_CALL SbaXFormAdapter::removeRowSetListener(const css::uno::Reference< 
css::sdbc::XRowSetListener >& l)
+{
+if (m_aRowSetListeners.getLength() == 1)
+{
+css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, 
css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeRowSetListener(&m_aRowSetListeners);
+}
+m_aRowSetListeners.removeInterface(l);
+}
 
 // css::sdbcx::XDeleteRows
 Sequence SAL_CALL SbaXFormAdapter::deleteRows(const Sequence< Any 
>& rows)
@@ -764,10 +783,48 @@ void SAL_CALL SbaXFormAdapter::clearWarnings()
 }
 
 // css::sdb::XRowSetApproveBroadcaster
-IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdb, RowSetApproveListener, 
m_aRowSetApproveListeners, css::sdb::XRowSetApproveBroadcaster, m_xMainForm)
+void SAL_CALL SbaXFormAdapter::addRowSetApproveListener(const 
css::uno::Reference< css::sdb::XRowSetApproveListener >& l)
+{
+m_aRowSetApproveListeners.addInterface(l);
+if (m_aRowSetApproveListeners.getLength() == 1)
+{
+css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->addRowSetApproveListener(&m_aRowSetApproveListeners);
+}
+}
+void SAL_CALL SbaXFormAdapter::removeRowSetApproveListener(const 
css::uno::Reference< css::sdb::XRowSetApproveListener >& l)
+{
+if (m_aRowSetApproveListeners.getLength() == 1)
+{
+css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+
xBroadcaster->removeRowSetApproveListener(&m_aRowSetApproveListeners);
+}
+m_aRowSetApproveListeners.removeInterface(l);
+}
 
 // css::sdbc::XSQLErrorBroadcaster
-IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdb, SQLErrorListener, 
m_aErrorListeners, css::sdb::XSQLErrorBroadcaster, m_xMainForm)
+void SAL_CALL SbaXFormAdapter::addSQLErrorListener(const css::uno::Reference< 
css::sdb::XSQLErrorListener >& l)
+{
+m_aErrorListeners.addInterface(l);
+if (m_aErrorListeners.getLength() == 1)
+{
+css::uno::Reference< css::sdb::XSQLErrorBroadcaster > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->addSQLErrorListener(&m_aErrorListeners);
+}
+}
+void SAL_CALL SbaXFormAdapter::removeSQLErrorListener(const 
css::uno::Reference< css::sdb::XSQLErrorListener >& l)
+{
+if (m_aErrorListeners.getLength() == 1)
+{
+css::uno::Reference< css::sdb::XSQLErrorBroadcaster > 
xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
+if (xBroadcaster.is())
+xBroadcaster->removeSQLErrorListener(&m_aErrorListeners);
+}
+m_aErrorListeners.removeInterface(l);
+}
 
 // css::sdb::XResultSetAccess
 Reference< css::sdbc::XResultSet > SAL_CALL SbaXFormAdapter::createResultSet()
@@ -808,7 +865,26 @@ sal_Bool SAL_CALL SbaXFormAdapter::isLoaded()
 return false;
 }
 
-IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, LoadListener, 
m_aLoadListeners, css::form::XLoadable, m_xMainForm)
+void SA

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst external/libwpd solenv/flatpak-manifest.in

2021-11-12 Thread David Tardon (via logerrit)
 download.lst  |4 ++--
 external/libwpd/Library_wpd.mk|2 ++
 external/libwpd/include.patch |4 ++--
 external/libwpd/libwpd-bundled-soname.patch.0 |3 +--
 solenv/flatpak-manifest.in|6 +++---
 5 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 4a565c374377d56f40c4f3c953b39bdd159efd8e
Author: David Tardon 
AuthorDate: Sat Dec 29 14:14:13 2018 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 12 10:30:25 2021 +0100

upload libwpd 0.10.3

Reviewed-on: https://gerrit.libreoffice.org/65714
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 87742f16e2d3f1c58534508b724268b9ce675c8e)

Change-Id: I68e3791f50b95956bfe6aae743978994a5f232b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125064
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index a377b09e3d4c..b7145a9822c5 100644
--- a/download.lst
+++ b/download.lst
@@ -238,8 +238,8 @@ export UCPP_SHA256SUM := 
983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
 export VISIO_SHA256SUM := 
8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
 export VISIO_TARBALL := libvisio-0.1.7.tar.xz
-export WPD_SHA256SUM := 
323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610
-export WPD_VERSION_MICRO := 2
+export WPD_SHA256SUM := 
2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09
+export WPD_VERSION_MICRO := 3
 export WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
 export WPG_SHA256SUM := 
57faf1ab97d63d57383ac5d7875e992a3d190436732f4083310c0471e72f8c33
 export WPG_VERSION_MICRO := 2
diff --git a/external/libwpd/Library_wpd.mk b/external/libwpd/Library_wpd.mk
index 62285858468f..2c84a5b5bb24 100644
--- a/external/libwpd/Library_wpd.mk
+++ b/external/libwpd/Library_wpd.mk
@@ -192,6 +192,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,wpd,\
UnpackedTarball/libwpd/src/lib/WPXContentListener \
UnpackedTarball/libwpd/src/lib/WPXEncryption \
UnpackedTarball/libwpd/src/lib/WPXHeader \
+   UnpackedTarball/libwpd/src/lib/WPXHeaderFooter \
UnpackedTarball/libwpd/src/lib/WPXListener \
UnpackedTarball/libwpd/src/lib/WPXMemoryStream \
UnpackedTarball/libwpd/src/lib/WPXPageSpan \
@@ -199,6 +200,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,wpd,\
UnpackedTarball/libwpd/src/lib/WPXStylesListener \
UnpackedTarball/libwpd/src/lib/WPXSubDocument \
UnpackedTarball/libwpd/src/lib/WPXTable \
+   UnpackedTarball/libwpd/src/lib/WPXTableList \
UnpackedTarball/libwpd/src/lib/libwpd_internal \
UnpackedTarball/libwpd/src/lib/libwpd_math \
 ))
diff --git a/external/libwpd/include.patch b/external/libwpd/include.patch
index ca68e8bdb22a..57f52b4b0aa5 100644
--- a/external/libwpd/include.patch
+++ b/external/libwpd/include.patch
@@ -1,10 +1,10 @@
 --- src/lib/WPXTable.h
 +++ src/lib/WPXTable.h
 @@ -36,6 +36,7 @@
- 
  #ifndef _WPXTABLE_H
  #define _WPXTABLE_H
+ 
 +#include 
  #include 
- #include 
  
+ struct WPXTableCell
diff --git a/external/libwpd/libwpd-bundled-soname.patch.0 
b/external/libwpd/libwpd-bundled-soname.patch.0
index 04661f2d464b..2a669748f21d 100644
--- a/external/libwpd/libwpd-bundled-soname.patch.0
+++ b/external/libwpd/libwpd-bundled-soname.patch.0
@@ -1,7 +1,6 @@
 --- src/lib/Makefile.in.orig   2015-08-06 21:41:41.073622494 +0200
 +++ src/lib/Makefile.in2015-08-06 21:42:09.377622009 +0200
-@@ -429,7 +429,7 @@
- AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) 
-DLIBWPD_BUILD=1
+@@ -429,6 +429,6 @@
  libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) 
@LIBWPD_WIN32_RESOURCE@
  libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_DEPENDENCIES = 
@LIBWPD_WIN32_RESOURCE@
 -libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LDFLAGS = $(version_info) 
-export-dynamic $(no_undefined)
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index bc911dbf91db..77765e353346 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -340,10 +340,10 @@
 "dest-filename": "external/tarballs/libvisio-0.1.7.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libwpd-0.10.2.tar.xz";,
-"sha256": 
"323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610",
+"url": 
"https://dev-www.libreoffice.org/src/libwpd-0.10.3.tar.xz";,
+"sha256": 
"2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09",
 "type": "file",
-"dest-filename": "external/tarballs/libwpd-0.10.2.tar.xz"
+"dest-filename": "external/tarballs/libwpd-0.10.3.ta

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst external/libvisio solenv/flatpak-manifest.in

2021-11-12 Thread David Tardon (via logerrit)
 download.lst   |4 +-
 external/libvisio/0001-fix-debug-build.patch.1 |   40 -
 external/libvisio/UnpackedTarball_libvisio.mk  |1 
 external/libvisio/ubsan.patch  |4 +-
 solenv/flatpak-manifest.in |6 +--
 5 files changed, 7 insertions(+), 48 deletions(-)

New commits:
commit a3858ab58111a2b489f122652755e034ca427822
Author: David Tardon 
AuthorDate: Sat Aug 17 17:06:07 2019 +0200
Commit: Michael Stahl 
CommitDate: Fri Nov 12 10:30:07 2021 +0100

upload libvisio 0.1.7

Reviewed-on: https://gerrit.libreoffice.org/77640
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit d83472ab6fde650772307f7f93a0a4b96e7ea6a8)

Change-Id: I4eb115c7c085b325370e9cd8f80e1b03f16f5033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125063
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 9303f0b830de..a377b09e3d4c 100644
--- a/download.lst
+++ b/download.lst
@@ -236,8 +236,8 @@ export TWAIN_DSM_SHA256SUM := 
82c818be771f242388457aa8c807e4b52aa84dc22b21c6c561
 export TWAIN_DSM_TARBALL := twaindsm_2.4.1.orig.tar.gz
 export UCPP_SHA256SUM := 
983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
-export VISIO_SHA256SUM := 
fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9
-export VISIO_TARBALL := libvisio-0.1.6.tar.xz
+export VISIO_SHA256SUM := 
8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
+export VISIO_TARBALL := libvisio-0.1.7.tar.xz
 export WPD_SHA256SUM := 
323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610
 export WPD_VERSION_MICRO := 2
 export WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
diff --git a/external/libvisio/0001-fix-debug-build.patch.1 
b/external/libvisio/0001-fix-debug-build.patch.1
deleted file mode 100644
index 4146e6e8bfe7..
--- a/external/libvisio/0001-fix-debug-build.patch.1
+++ /dev/null
@@ -1,40 +0,0 @@
-From 15f3774513d0181ad90da382297c175cc3424462 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Sun, 22 Oct 2017 21:24:43 +0200
-Subject: [PATCH] fix debug build
-
-Change-Id: I860b6034e5d833900652aec8c3647eeae185e538

- src/lib/VDXParser.cpp  | 2 +-
- src/lib/VSDXParser.cpp | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/VDXParser.cpp b/src/lib/VDXParser.cpp
-index f2f3154..0f07efd 100644
 a/src/lib/VDXParser.cpp
-+++ b/src/lib/VDXParser.cpp
-@@ -916,7 +916,7 @@ xmlChar 
*libvisio::VDXParser::readStringData(xmlTextReaderPtr reader)
- ret = xmlTextReaderRead(reader);
- if (1 == ret && stringValue)
- {
--  VSD_DEBUG_MSG(("VDXParser::readStringData stringValue %s\n", (const 
char *)stringValue));
-+  VSD_DEBUG_MSG(("VDXParser::readStringData stringValue %s\n", (const 
char *)stringValue.get()));
-   return stringValue.release();
- }
-   }
-diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
-index 488be3a..efd46b9 100644
 a/src/lib/VSDXParser.cpp
-+++ b/src/lib/VSDXParser.cpp
-@@ -555,7 +555,7 @@ xmlChar 
*libvisio::VSDXParser::readStringData(xmlTextReaderPtr reader)
-   std::unique_ptr 
stringValue(xmlTextReaderGetAttribute(reader, BAD_CAST("V")), xmlFree);
-   if (stringValue)
-   {
--VSD_DEBUG_MSG(("VSDXParser::readStringData stringValue %s\n", (const char 
*)stringValue));
-+VSD_DEBUG_MSG(("VSDXParser::readStringData stringValue %s\n", (const char 
*)stringValue.get()));
- return stringValue.release();
-   }
-   return nullptr;
--- 
-2.14.1
-
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk 
b/external/libvisio/UnpackedTarball_libvisio.mk
index 1ab8b392c4e8..eba43f3b7a6e 100644
--- a/external/libvisio/UnpackedTarball_libvisio.mk
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -17,7 +17,6 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libvisio))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
 external/libvisio/ubsan.patch \
-external/libvisio/0001-fix-debug-build.patch.1 \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch
index 7bba63fda7a1..c9ffbd98f4b6 100644
--- a/external/libvisio/ubsan.patch
+++ b/external/libvisio/ubsan.patch
@@ -4,8 +4,8 @@
  }
  if (U_SUCCESS(status) && conv)
  {
--  const char *src = (const char *)&characters[0];
-+  const char *src = (const char *)characters.data();
+-  const auto *src = (const char *)&characters[0];
++  const auto *src = (const char *)characters.data();
const char *srcLimit = (const char *)src + characters.size();
while (src < srcLimit)
{
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 847f28d3d2fd..bc911dbf91db 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -334

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

2021-11-12 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/resource/core_resource.cxx |3 --
 desktop/inc/dp_shared.hxx   |   18 +
 desktop/source/app/appinit.cxx  |   25 +++-
 desktop/source/app/officeipcthread.cxx  |1 
 desktop/source/deployment/misc/dp_misc.cxx  |8 +++
 5 files changed, 26 insertions(+), 29 deletions(-)

New commits:
commit 2811d0a20e038f6fd573f31eff8d485bd16c81ce
Author: Noel Grandin 
AuthorDate: Mon Nov 8 21:24:32 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 12 10:16:14 2021 +0100

rtl::Static to thread-safe static

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

diff --git a/dbaccess/source/core/resource/core_resource.cxx 
b/dbaccess/source/core/resource/core_resource.cxx
index 312a328e2808..fdef07e1f8f8 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -21,9 +21,6 @@
 
 #include 
 
-//  needed as long as we have no contexts for components ---
-#include 
-
 namespace dbaccess
 {
 OUString ResourceManager::loadString(TranslateId pResId)
diff --git a/desktop/inc/dp_shared.hxx b/desktop/inc/dp_shared.hxx
index 0ce0bc401d65..dbd695c31b9b 100644
--- a/desktop/inc/dp_shared.hxx
+++ b/desktop/inc/dp_shared.hxx
@@ -19,23 +19,9 @@
 
 #pragma once
 
-#include 
 #include 
+#include 
 
-namespace dp {
-
-struct DeploymentLocale :
-public ::rtl::StaticWithInit {
-std::locale operator () () {
-return Translate::Create("dkt");
-}
-};
-
-} // namespace dp
-
-inline OUString DpResId(TranslateId aId)
-{
-return Translate::get(aId, dp::DeploymentLocale::get());
-}
+DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString DpResId(TranslateId aId);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index bc4af1c681b8..98a1fa61ca2f 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -122,8 +121,16 @@ typedef std::map< OUString, 
css::uno::Reference > Ac
 
 namespace
 {
-struct acceptorMap : public rtl::Static< AcceptorMap, acceptorMap > {};
-struct CurrentTempURL : public rtl::Static< OUString, CurrentTempURL > {};
+AcceptorMap& acceptorMap()
+{
+static AcceptorMap SINGLETON;
+return SINGLETON;
+}
+OUString& CurrentTempURL()
+{
+static OUString SINGLETON;
+return SINGLETON;
+}
 }
 
 static bool bAccept = false;
@@ -131,7 +138,7 @@ static bool bAccept = false;
 void Desktop::createAcceptor(const OUString& aAcceptString)
 {
 // check whether the requested acceptor already exists
-AcceptorMap &rMap = acceptorMap::get();
+AcceptorMap &rMap = acceptorMap();
 AcceptorMap::const_iterator pIter = rMap.find(aAcceptString);
 if (pIter != rMap.end() )
 return;
@@ -188,7 +195,7 @@ IMPL_STATIC_LINK_NOARG(Desktop, EnableAcceptors_Impl, 
void*, void)
 bAccept = true;
 // enable existing acceptors by calling initialize(true)
 // on all existing acceptors
-AcceptorMap &rMap = acceptorMap::get();
+AcceptorMap &rMap = acceptorMap();
 std::for_each(rMap.begin(), rMap.end(), enable());
 }
 }
@@ -196,7 +203,7 @@ IMPL_STATIC_LINK_NOARG(Desktop, EnableAcceptors_Impl, 
void*, void)
 void Desktop::destroyAcceptor(const OUString& aAcceptString)
 {
 // special case stop all acceptors
-AcceptorMap &rMap = acceptorMap::get();
+AcceptorMap &rMap = acceptorMap();
 if (aAcceptString == "all") {
 rMap.clear();
 
@@ -217,7 +224,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
 void Desktop::DeregisterServices()
 {
 // stop all acceptors by clearing the map
-acceptorMap::get().clear();
+acceptorMap().clear();
 }
 
 void Desktop::CreateTemporaryDirectory()
@@ -252,13 +259,13 @@ void Desktop::CreateTemporaryDirectory()
 {
 aRet.clear();
 }
-CurrentTempURL::get() = aRet;
+CurrentTempURL() = aRet;
 }
 
 void Desktop::RemoveTemporaryDirectory()
 {
 // remove current temporary directory
-OUString &rCurrentTempURL = CurrentTempURL::get();
+OUString &rCurrentTempURL = CurrentTempURL();
 if ( !rCurrentTempURL.isEmpty() )
 {
 ::utl::UCBContentHelper::Kill( rCurrentTempURL );
diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 61827856f3e9..07880d27fc4c 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/desktop/source/deployment/misc/dp_misc.cxx 
b/desktop/source/deployment/misc/dp_misc.cxx
index 63f684666857..f4

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

2021-11-12 Thread Mike Kaganski (via logerrit)
 chart2/qa/extras/xshape/data/reference/tdf90839-1.xml |4 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml |4 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml |4 +-
 sc/inc/global.hxx |   35 ++
 sc/qa/extras/macros-test.cxx  |6 +--
 sc/qa/unit/filters-test.cxx   |2 -
 sc/qa/unit/scshapetest.cxx|   12 +++---
 sc/qa/unit/subsequent_filters_test2.cxx   |   20 +-
 sc/qa/unit/tiledrendering/tiledrendering.cxx  |6 +--
 sc/qa/unit/uicalc/uicalc.cxx  |4 +-
 sc/source/core/data/documen3.cxx  |   24 
 sc/source/core/data/drwlayer.cxx  |   10 ++---
 sc/source/ui/docshell/docsh4.cxx  |   12 +++---
 sc/source/ui/inc/printfun.hxx |4 +-
 sc/source/ui/unoobj/docuno.cxx|8 ++--
 sc/source/ui/view/output2.cxx |1 
 sc/source/ui/view/printfun.cxx|5 +-
 sc/source/ui/view/viewdata.cxx|1 
 sw/qa/extras/odfexport/odfexport.cxx  |6 +--
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx|6 +--
 20 files changed, 78 insertions(+), 96 deletions(-)

New commits:
commit 00d74a5e0291a40e532b2a0f51fdd5a3e1f487ed
Author: Mike Kaganski 
AuthorDate: Wed Aug 11 17:36:12 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Nov 12 09:44:10 2021 +0100

Use more o3tl::convert in sc

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

diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
index 2af62c344940..eb48c3f7293d 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
@@ -10,7 +10,7 @@
   
   

-   
+   

   
  
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
index d7e5c4a364f9..639c32d00491 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
@@ -10,7 +10,7 @@
   
   

-   
+   

   
  
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
index 77a1ac06f80a..77be20e2147f 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
@@ -10,7 +10,7 @@
   
   

-   
+   

   
  
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 7881395d802e..3eab2e36d8e2 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -28,6 +28,7 @@
 #include "scdllapi.h"
 #include 
 #include 
+#include 
 
 #include 
 // HACK:  includes , which in some Clang versions does 
'#define bool bool',
@@ -79,35 +80,23 @@ const sal_Unicode CHAR_NNBSP= 0x202F; //NARROW NO-BREAK 
SPACE
 
 const SCSIZE MAXSUBTOTAL= 3;
 
-#define PIXEL_PER_INCH  96.0
-#define CM_PER_INCH 2.54
-#define POINTS_PER_INCH 72.0/**< PostScript points per inch */
-#define PIXEL_PER_POINT (PIXEL_PER_INCH / POINTS_PER_INCH)
-#define TWIPS_PER_POINT 20.0
-#define TWIPS_PER_INCH  (TWIPS_PER_POINT * POINTS_PER_INCH)
-#define TWIPS_PER_CM(TWIPS_PER_INCH / CM_PER_INCH)
-#define CM_PER_TWIPS(CM_PER_INCH / TWIPS_PER_INCH)
-#define TWIPS_PER_PIXEL (TWIPS_PER_INCH / PIXEL_PER_INCH)
-#define TWIPS_PER_CHAR  (TWIPS_PER_INCH / 13.6)
-#define PIXEL_PER_TWIPS (PIXEL_PER_INCH / TWIPS_PER_INCH)
-#define HMM_PER_TWIPS   (CM_PER_TWIPS * 1000.0)
-
-#define STD_COL_WIDTH   1280/* 2.2577cm, 64.00pt PS */
-#define STD_EXTRA_WIDTH 113 /* 2mm extra for optimal width,
- * 0.1986cm with TeX points,
- * 0.1993cm with PS points. */
-
-#define MAX_EXTRA_WIDTH 23811   /* 42cm in TWIPS, 41.8430cm TeX, 41.cm 
PS */
-#define MAX_EXTRA_HEIGHT23811
-#define MAX_COL_WIDTH   56693   /* 1m in TWIPS, 99.6266cm TeX, 100.0001cm 
PS */
-#define MAX_ROW_HEIGHT  56693
+// ~105.88 twip, i.e. about 2 times narrower than o3tl::Length::ch, which is 
210 twip
+constexpr auto TWIPS_PER_CHAR = o3tl::toTwips(1 / 13.6, o3tl::Length::in);
+
+constexpr sal_Int32 STD_COL_WIDTH = o3tl::convert(64, o3tl::Length::pt, 
o3tl::Length::twip);
+constexpr sal_Int32 STD_EXTRA_WIDTH = o3tl::convert(2, o3tl::Length::mm, 
o3tl::Length::twip);
+
+constexpr sal_Int32 MAX_EXTRA_WIDTH = o3tl::convert(42, o3tl::Length::cm, 
o3tl::Length::twip);

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

2021-11-12 Thread Caolán McNamara (via logerrit)
 embeddedobj/source/msole/ownview.cxx |1 +
 filter/source/msfilter/mscodec.cxx   |1 +
 sd/source/filter/eppt/eppt.cxx   |1 +
 sw/source/filter/ww8/docxattributeoutput.cxx |4 
 testtools/source/bridgetest/bridgetest.cxx   |1 +
 5 files changed, 8 insertions(+)

New commits:
commit 9871789e0f9256ac27ea7bc4590ba910d6e4c373
Author: Caolán McNamara 
AuthorDate: Thu Nov 11 21:08:58 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 12 09:36:29 2021 +0100

coverity: annotate with markup so they will stay silenced

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

diff --git a/embeddedobj/source/msole/ownview.cxx 
b/embeddedobj/source/msole/ownview.cxx
index ed794a74e07a..4aaf35499124 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -412,6 +412,7 @@ void OwnView_Impl::CreateNative()
 {
 sal_uInt8 const aClassID[] =
 { 0x00, 0x03, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x46 };
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty 
with css::uno::Sequence
 uno::Sequence< sal_Int8 > aPackageClassID( 
reinterpret_cast(aClassID), 16 );
 
 uno::Reference< io::XStream > xSubStream;
diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index b59b7dc73ad9..7aad72ba2dc7 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -185,6 +185,7 @@ bool MSCodec_Xor95::InitCodec( const uno::Sequence< 
beans::NamedValue >& aData )
 uno::Sequence< beans::NamedValue > MSCodec_Xor95::GetEncryptionData()
 {
 ::comphelper::SequenceAsHashMap aHashData;
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with 
css::uno::Sequence
 aHashData[ OUString( "XOR95EncryptionKey" ) ] <<= uno::Sequence( 
reinterpret_cast(mpnKey), 16 );
 aHashData[ OUString( "XOR95BaseKey" ) ] <<= static_cast(mnKey);
 aHashData[ OUString( "XOR95PasswordHash" ) ] <<= 
static_cast(mnHash);
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 423a90f3a65a..117c39d34453 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -506,6 +506,7 @@ void PPTWriter::ImplCreateDocumentSummaryInformation()
 'A',0,'1',0,'E',0,'F',0,'-',0,'0',0,'0',0,'6',0,'0',0,'9',0,
 '7',0,'D',0,'A',0,'5',0,'6',0,'8',0,'9',0,'}',0
 };
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with 
css::uno::Sequence
 uno::Sequence aGuidSeq(aGuid, 0x52);
 
 SvMemoryStream  aHyperBlob;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b2b7a047b0f2..de61bb748814 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1140,6 +1140,7 @@ void 
DocxAttributeOutput::InitCollectedParagraphProperties()
 
 // postpone the output so that we can later [in EndParagraphProperties()]
 // prepend the properties before the run
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with 
css::uno::Sequence
 m_pSerializer->mark(Tag_InitCollectedParagraphProperties, 
comphelper::containerToSequence(aOrder));
 }
 
@@ -2538,6 +2539,7 @@ void DocxAttributeOutput::InitCollectedRunProperties()
 
 // postpone the output so that we can later [in EndParagraphProperties()]
 // prepend the properties before the run
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with 
css::uno::Sequence
 m_pSerializer->mark(Tag_InitCollectedRunProperties, 
comphelper::containerToSequence(aOrder));
 }
 
@@ -3930,6 +3932,7 @@ void DocxAttributeOutput::TableDefinition( 
ww8::WW8TableNodeInfoInner::Pointer_t
 
 // postpone the output so that we can later []
 // prepend the properties before the run
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with 
css::uno::Sequence
 m_pSerializer->mark(Tag_TableDefinition, 
comphelper::containerToSequence(aOrder));
 
 tools::Long nPageSize = 0;
@@ -6848,6 +6851,7 @@ void DocxAttributeOutput::StartSection()
 
 // postpone the output so that we can later [in EndParagraphProperties()]
 // prepend the properties before the run
+// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with 
css::uno::Sequence
 m_pSerializer->mark(Tag_StartSection, 
comphelper::containerToSequence(aOrder));
 m_bHadSectPr = true;
 }
diff --git a/testtools/source/bridgetest/bridgetest.cxx 
b/testtools/source/bridgetest/bridgetest.cxx
index 5860708695d2..7c646b59a257 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -774,6 +774,7 @@ static bool performTest(
   

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

2021-11-12 Thread Luboš Luňák (via logerrit)
 vcl/skia/gdiimpl.cxx |   70 +--
 1 file changed, 24 insertions(+), 46 deletions(-)

New commits:
commit 0bd7dcf09d1801b03367ecbfd388c5940081d483
Author: Luboš Luňák 
AuthorDate: Fri Sep 10 16:06:03 2021 +0200
Commit: Luboš Luňák 
CommitDate: Fri Nov 12 09:12:47 2021 +0100

reduce copy&paste

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 73f6cc3dd479..434209ae1dcf 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1466,46 +1466,24 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon 
const& rPoly, SalInvert eFl
 addPolygonToPath(rPoly, aPath);
 aPath.setFillType(SkPathFillType::kEvenOdd);
 addUpdateRegion(aPath.getBounds());
+SkAutoCanvasRestore autoRestore(getDrawCanvas(), true);
+SkPaint aPaint;
 // TrackFrame just inverts a dashed path around the polygon
 if (eFlags == SalInvert::TrackFrame)
 {
 // TrackFrame is not supposed to paint outside of the polygon (usually 
rectangle),
 // but wider stroke width usually results in that, so ensure the 
requirement
 // by clipping.
-SkAutoCanvasRestore autoRestore(getDrawCanvas(), true);
 getDrawCanvas()->clipRect(aPath.getBounds(), SkClipOp::kIntersect, 
false);
-SkPaint aPaint;
 aPaint.setStrokeWidth(2);
-float intervals[] = { 4.0f, 4.0f };
+constexpr float intervals[] = { 4.0f, 4.0f };
 aPaint.setStyle(SkPaint::kStroke_Style);
 aPaint.setPathEffect(SkDashPathEffect::Make(intervals, 
SK_ARRAY_COUNT(intervals), 0));
 aPaint.setColor(SkColorSetARGB(255, 255, 255, 255));
 aPaint.setBlendMode(SkBlendMode::kDifference);
-if (!rasterHack)
-getDrawCanvas()->drawPath(aPath, aPaint);
-else
-{
-SkRect area;
-aPath.getBounds().roundOut(&area);
-SkRect size = SkRect::MakeWH(area.width(), area.height());
-sk_sp surface
-= SkSurface::MakeRasterN32Premul(area.width(), area.height(), 
surfaceProps());
-SkPaint copy;
-copy.setBlendMode(SkBlendMode::kSrc);
-flushDrawing();
-
surface->getCanvas()->drawImageRect(makeCheckedImageSnapshot(mSurface), area, 
size,
-SkSamplingOptions(), ©,
-
SkCanvas::kFast_SrcRectConstraint);
-aPath.offset(-area.x(), -area.y());
-surface->getCanvas()->drawPath(aPath, aPaint);
-getDrawCanvas()->drawImageRect(makeCheckedImageSnapshot(surface), 
size, area,
-   SkSamplingOptions(), ©,
-   SkCanvas::kFast_SrcRectConstraint);
-}
 }
 else
 {
-SkPaint aPaint;
 aPaint.setColor(SkColorSetARGB(255, 255, 255, 255));
 aPaint.setStyle(SkPaint::kFill_Style);
 aPaint.setBlendMode(SkBlendMode::kDifference);
@@ -1532,27 +1510,27 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon 
const& rPoly, SalInvert eFl
 aPaint.setShader(
 aBitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat, 
SkSamplingOptions()));
 }
-if (!rasterHack)
-getDrawCanvas()->drawPath(aPath, aPaint);
-else
-{
-SkRect area;
-aPath.getBounds().roundOut(&area);
-SkRect size = SkRect::MakeWH(area.width(), area.height());
-sk_sp surface
-= SkSurface::MakeRasterN32Premul(area.width(), area.height(), 
surfaceProps());
-SkPaint copy;
-copy.setBlendMode(SkBlendMode::kSrc);
-flushDrawing();
-
surface->getCanvas()->drawImageRect(makeCheckedImageSnapshot(mSurface), area, 
size,
-SkSamplingOptions(), ©,
-
SkCanvas::kFast_SrcRectConstraint);
-aPath.offset(-area.x(), -area.y());
-surface->getCanvas()->drawPath(aPath, aPaint);
-getDrawCanvas()->drawImageRect(makeCheckedImageSnapshot(surface), 
size, area,
-   SkSamplingOptions(), ©,
-   SkCanvas::kFast_SrcRectConstraint);
-}
+}
+if (!rasterHack)
+getDrawCanvas()->drawPath(aPath, aPaint);
+else
+{
+SkRect area;
+aPath.getBounds().roundOut(&area);
+SkRect size = SkRect::MakeWH(area.width(), area.height());
+sk_sp surface
+= SkSurface::MakeRasterN32Premul(area.width(), area.height(), 
surfaceProps());
+SkPaint copy;
+copy.setBlendMode(SkBlendMode::kSrc);
+flushDrawing

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

2021-11-12 Thread Julien Nabet (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3bc5a4c89e54138f6eebecddf93d55f1b052c42a
Author: Julien Nabet 
AuthorDate: Wed Nov 10 22:56:53 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Nov 12 09:02:08 2021 +0100

tdf#145584: fix crash on exporting as PDF with Selection rRange

Regression from 20ddabc88b6b45ea3efcc44ede5244ea526b09c4
tdf#144989 sw: disable idle jobs during printing or PDF export
The problem is that (with the kde5 and WNT vclplugs) the idle jobs
update fields and un-hides every section, which destroys the layout
that SwXTextDocument::getRendererCount() finalised with great effort

bt:
0  0x7f773af65dfa in SwXTextDocument::render(int, 
com::sun::star::uno::Any const&, 
com::sun::star::uno::Sequence const&) 
(this=0x66e4980, nRenderer=0, rSelection=
  uno::Any("com.sun.star.uno.XInterface": {_vptr$XInterface = 0x9579020}), 
rxOptions=uno::Sequence of length 8 = {...}) at 
sw/source/uibase/uno/unotxdoc.cxx:3012
1  0x7f76ff5f2832 in PDFExport::ExportSelection(vcl::PDFWriter&, 
com::sun::star::uno::Reference const&, 
com::sun::star::uno::Any const&, StringRangeEnumerator const&, 
com::sun::star::uno::Sequence&, int) 
(this=0x7ffc7ee0e990, rPDFWriter=..., rRenderable=uno::Reference to 
(SwXTextDocument *) 0x66e4c38, rSelection=
  uno::Any("com.sun.star.uno.XInterface": {_vptr$XInterface = 0x9579020}), 
rRangeEnum=..., rRenderOptions=uno::Sequence of length 8 = {...}, nPageCount=1) 
at filter/source/pdf/pdfexport.cxx:218
2  0x7f76ff5f787e in PDFExport::Export(rtl::OUString const&, 
com::sun::star::uno::Sequence const&)
(this=0x7ffc7ee0e990, rFile="file:///tmp/lu4uimg.tmp/lu4uimk.tmp", 
rFilterData=uno::Sequence of length 54 = {...}) at 
filter/source/pdf/pdfexport.cxx:949
3  0x7f76ff60a4a8 in 
PDFFilter::implExport(com::sun::star::uno::Sequence
 const&) (this=0x71798a0, rDescriptor=uno::Sequence of length 14 = {...})
at filter/source/pdf/pdffilter.cxx:161
4  0x7f76ff60a7fe in 
PDFFilter::filter(com::sun::star::uno::Sequence
 const&) (this=0x71798a0, rDescriptor=uno::Sequence of length 14 = {...})
at filter/source/pdf/pdffilter.cxx:224
5  0x7f7755e60218 in SfxObjectShell::ExportTo(SfxMedium&) 
(this=0x66d2a30, rMedium=...) at sfx2/source/doc/objstor.cxx:2468
(full bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=176170)

Valgrind:
==619070== Invalid read of size 8
==619070==at 0x19227A60: SwXTextDocument::render(int, 
com::sun::star::uno::Any const&, 
com::sun::star::uno::Sequence const&) 
(unotxdoc.cxx:3012)
==619070==by 0x7403: ???
==619070==by 0x1C4A8B57: ???
==619070==by 0x1C4A8BFF: ???
==619070==  Address 0x1ed27e08 is 328 bytes inside a block of size 880 
free'd
==619070==at 0x483C71B: operator delete(void*) (vg_replace_malloc.c:923)
==619070==by 0x188EC5CC: SwDoc::release() (doc.cxx:118)
==619070==by 0x1902B92C: clear (ref.hxx:196)
==619070==by 0x1902B92C: SwDocShell::RemoveLink() (docshini.cxx:444)
==619070==by 0x1902B622: SwDocShell::~SwDocShell() (docshini.cxx:372)
==619070==by 0x1902BC07: ~SwDocShell (docshini.cxx:362)
==619070==by 0x1902BC07: ~SwDocShell (docshini.cxx:362)
==619070==by 0x1902BC07: virtual thunk to SwDocShell::~SwDocShell() 
(docshini.cxx:0)
==619070==by 0x18EFA411: ~SfxObjectShellLock (objsh.hxx:863)
==619070==by 0x18EFA411: SwRenderData::~SwRenderData() 
(printdata.cxx:48)
==619070==by 0x19227A2B: operator() (unique_ptr.h:85)
==619070==by 0x19227A2B: reset (unique_ptr.h:182)
==619070==by 0x19227A2B: reset (unique_ptr.h:456)
==619070==by 0x19227A2B: SwXTextDocument::render(int, 
com::sun::star::uno::Any const&, 
com::sun::star::uno::Sequence const&) 
(unotxdoc.cxx:3009)
==619070==by 0x21566DB5: PDFExport::ExportSelection(vcl::PDFWriter&, 
com::sun::star::uno::Reference const&, 
com::sun::star::uno::Any const&, StringRangeEnumerator const&, 
com::sun::star::uno::Sequence&, int) 
(pdfexport.cxx:218)
==619070==by 0x2156BB83: PDFExport::Export(rtl::OUString const&, 
com::sun::star::uno::Sequence const&) 
(pdfexport.cxx:949)
==619070==by 0x21572A05: 
PDFFilter::implExport(com::sun::star::uno::Sequence
 const&) (pdffilter.cxx:161)
==619070==by 0x21572F65: 
PDFFilter::filter(com::sun::star::uno::Sequence
 const&) (pdffilter.cxx:224)
(full Valgrind trace here:
https://bugs.documentfoundation.org/attachment.cgi?id=176173)

Change-Id: I03a7ec45a62be2729273111a37c1d3bdf664
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125014
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 196ac5f5435dfba5bb93e1728c38eb7fa847876d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124976
Reviewed-by: Noel Grandin