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

2022-05-14 Thread Caolán McNamara (via logerrit)
 vcl/quartz/salgdi.cxx |   20 
 1 file changed, 20 insertions(+)

New commits:
commit e083f38ab8f2ee864b9e20829bf9fe45c415ddff
Author: Caolán McNamara 
AuthorDate: Tue May 10 16:44:27 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat May 14 11:23:40 2022 +0200

tdf#148470 if macOS glyph fallback provided a partial result flag what 
failed

so another font can be attempted for the remainder

Change-Id: Ie2c67c7c63510d02c99f2377c0c43ed6050ccd86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134131
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 4b693a0c594fb3b73f4a4c1e03e9916f1a107012)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134070
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 9928cc4df3a2..b54c6da5119a 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -73,6 +74,12 @@ public:
 bool FindFontSubstitute(vcl::font::FontSelectPattern&, 
LogicalFontInstance* pLogicalFont, OUString&) const override;
 };
 
+bool FontHasCharacter(CTFontRef pFont, const OUString& rString, sal_Int32 
nIndex, sal_Int32 nLen)
+{
+CGGlyph glyphs[nLen];
+return CTFontGetGlyphsForCharacters(pFont, reinterpret_cast(rString.getStr() + nIndex), glyphs, nLen);
+}
+
 }
 
 bool 
CoreTextGlyphFallbackSubstititution::FindFontSubstitute(vcl::font::FontSelectPattern&
 rPattern, LogicalFontInstance* pLogicalFont,
@@ -89,6 +96,19 @@ bool 
CoreTextGlyphFallbackSubstititution::FindFontSubstitute(vcl::font::FontSele
 {
 bFound = true;
 
+// tdf#148470 remove the resolved chars from rMissing to flag 
which ones are still missing
+// for an attempt with another font
+OUStringBuffer aStillMissingChars;
+for (sal_Int32 nStrIndex = 0; nStrIndex < 
rMissingChars.getLength();)
+{
+sal_Int32 nOldStrIndex = nStrIndex;
+rMissingChars.iterateCodePoints(&nStrIndex);
+sal_Int32 nCharLength = nStrIndex - nOldStrIndex;
+if (!FontHasCharacter(pFallback, rMissingChars, nOldStrIndex, 
nCharLength))
+aStillMissingChars.append(rMissingChars.getStr() + 
nOldStrIndex, nCharLength);
+}
+rMissingChars = aStillMissingChars.toString();
+
 CTFontDescriptorRef pDesc = CTFontCopyFontDescriptor(pFallback);
 FontAttributes rAttr = DevFontFromCTFontDescriptor(pDesc, nullptr);
 


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

2022-05-14 Thread Noel Grandin (via logerrit)
 oox/source/drawingml/customshapepresetdata.cxx |  322 -
 1 file changed, 166 insertions(+), 156 deletions(-)

New commits:
commit 624ad0d635bdd0a5d6734fca36ce2a87314e92ce
Author: Noel Grandin 
AuthorDate: Thu May 12 14:33:54 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 11:47:29 2022 +0200

use more string_view in oox

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

diff --git a/oox/source/drawingml/customshapepresetdata.cxx 
b/oox/source/drawingml/customshapepresetdata.cxx
index 4e93f4f76a06..3215b9834a42 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -38,19 +38,19 @@ void lcl_parseAdjustmentValue(
 OString aToken(o3tl::trim(o3tl::getToken(rValue, 0, ',', nIndex)));
 static const char aNamePrefix[] = "Name = \"";
 static const char aValuePrefix[] = "Value = (any) { (long) ";
-if (aToken.startsWith(aNamePrefix))
+if (o3tl::starts_with(aToken, aNamePrefix))
 {
 OString aName = aToken.copy(strlen(aNamePrefix),
 aToken.getLength() - 
strlen(aNamePrefix) - strlen("\""));
 aAdjustmentValue.Name = OUString::fromUtf8(aName);
 }
-else if (aToken.startsWith(aValuePrefix))
+else if (o3tl::starts_with(aToken, aValuePrefix))
 {
 OString aValue = aToken.copy(strlen(aValuePrefix),
  aToken.getLength() - 
strlen(aValuePrefix) - strlen(" }"));
 aAdjustmentValue.Value <<= aValue.toInt32();
 }
-else if (!aToken.startsWith("State = "))
+else if (!o3tl::starts_with(aToken, "State = "))
 SAL_WARN("oox", "lcl_parseAdjustmentValue: unexpected prefix: " << 
aToken);
 } while (nIndex >= 0);
 rAdjustmentValues.push_back(aAdjustmentValue);
@@ -59,11 +59,11 @@ void lcl_parseAdjustmentValue(
 // Parses a string like: { Value = (any) { (long) 19098 }, State = 
(com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = ..., 
State = ..., Name = ... }
 void lcl_parseAdjustmentValues(
 std::vector& 
rAdjustmentValues,
-const OString& rValue)
+std::string_view rValue)
 {
 sal_Int32 nLevel = 0;
 sal_Int32 nStart = 0;
-for (sal_Int32 i = 0; i < rValue.getLength(); ++i)
+for (size_t i = 0; i < rValue.size(); ++i)
 {
 if (rValue[i] == '{')
 {
@@ -78,7 +78,7 @@ void lcl_parseAdjustmentValues(
 {
 lcl_parseAdjustmentValue(
 rAdjustmentValues,
-rValue.subView(nStart + strlen("{ "), i - nStart - 
strlen(" },")));
+rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" 
},")));
 }
 }
 }
@@ -179,13 +179,13 @@ awt::Size lcl_parseSize(std::string_view rValue)
 return aSize;
 }
 
-drawing::EnhancedCustomShapeTextFrame 
lcl_parseEnhancedCustomShapeTextFrame(const OString& rValue)
+drawing::EnhancedCustomShapeTextFrame 
lcl_parseEnhancedCustomShapeTextFrame(std::string_view rValue)
 {
 drawing::EnhancedCustomShapeTextFrame aTextFrame;
 sal_Int32 nLevel = 0;
 bool bIgnore = false;
 sal_Int32 nStart = 0;
-for (sal_Int32 i = 0; i < rValue.getLength(); ++i)
+for (size_t i = 0; i < rValue.size(); ++i)
 {
 if (rValue[i] == '{')
 {
@@ -201,13 +201,13 @@ drawing::EnhancedCustomShapeTextFrame 
lcl_parseEnhancedCustomShapeTextFrame(cons
 }
 else if (rValue[i] == ',' && !bIgnore)
 {
-OString aToken = rValue.copy(nStart, i - nStart);
+std::string_view aToken = rValue.substr(nStart, i - nStart);
 static const char aExpectedPrefix[]
 = "TopLeft = 
(com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
-if (aToken.startsWith(aExpectedPrefix))
+if (o3tl::starts_with(aToken, aExpectedPrefix))
 {
-aToken = aToken.copy(strlen(aExpectedPrefix),
- aToken.getLength() - 
strlen(aExpectedPrefix) - strlen(" }"));
+aToken = aToken.substr(strlen(aExpectedPrefix),
+   aToken.size() - strlen(aExpectedPrefix) 
- strlen(" }"));
 aTextFrame.TopLeft = 
lcl_parseEnhancedCustomShapeParameterPair(aToken);
 }
 else
@@ -217,13 +217,13 @@ drawing::EnhancedCustomShapeTextFrame 
lcl_parseEnhancedCustomShapeTextFrame(cons
 }
 }
 
-OString aToken = rValue.copy(nStart);
+std::string_view aToken = rValue.substr(nStart);
 static const char aExpectedPrefix[]
 = "BottomRight = 
(com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
-if (aToken.startsWith(aExpectedPrefix))
+if (o3tl::st

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

2022-05-14 Thread Noel Grandin (via logerrit)
 comphelper/source/processfactory/processfactory.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 09dffa4cea17983748f9a2141bb311886e33b00b
Author: Noel Grandin 
AuthorDate: Fri May 13 11:08:18 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 12:35:30 2022 +0200

use std::mutex in LocalProcessFactory

which much faster than osl_Mutex, and especially for this simple case

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

diff --git a/comphelper/source/processfactory/processfactory.cxx 
b/comphelper/source/processfactory/processfactory.cxx
index ea5595646e4c..fc8586471db1 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
+#include 
 #include 
 
 #include 
@@ -41,19 +41,20 @@ class LocalProcessFactory {
 public:
 void set( const Reference< XMultiServiceFactory >& xSMgr )
 {
-Guard< Mutex > aGuard( Mutex::getGlobalMutex() );
+std::unique_lock aGuard( maMutex );
 
 xProcessFactory = xSMgr;
 }
 
 Reference< XMultiServiceFactory > get() const
 {
-Guard< Mutex > aGuard( Mutex::getGlobalMutex() );
+std::unique_lock aGuard( maMutex );
 
 return xProcessFactory;
 }
 
 private:
+mutable std::mutex maMutex;
 Reference< XMultiServiceFactory > xProcessFactory;
 };
 


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

2022-05-14 Thread Noel Grandin (via logerrit)
 include/framework/gate.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 06900403843e4afa413d0ca4e2ea6be761ac668a
Author: Noel Grandin 
AuthorDate: Fri May 13 11:08:33 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 12:37:28 2022 +0200

osl::Mutex->std::mutex in framework::Gate

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

diff --git a/include/framework/gate.hxx b/include/framework/gate.hxx
index d4e7f3588523..ab9f81c24b2a 100644
--- a/include/framework/gate.hxx
+++ b/include/framework/gate.hxx
@@ -19,7 +19,7 @@
 
 #pragma once
 
-#include 
+#include 
 #include 
 
 namespace framework{
@@ -81,7 +81,7 @@ class Gate
 void open()
 {
 // We must safe access to our internal member!
-::osl::MutexGuard aLock( m_aAccessLock );
+std::unique_lock aLock( m_aAccessLock );
 // Set condition -> wait don't block any longer -> gate is open
 m_aPassage.set();
 // Check if operation was successful!
@@ -98,7 +98,7 @@ class Gate
 void close()
 {
 // We must safe access to our internal member!
-::osl::MutexGuard aLock( m_aAccessLock );
+std::unique_lock aLock( m_aAccessLock );
 // Reset condition -> wait blocks now -> gate is closed
 m_aPassage.reset();
 // Check if operation was successful!
@@ -118,14 +118,14 @@ class Gate
 void wait()
 {
 // We must safe access to our internal member!
-::osl::ClearableMutexGuard aLock( m_aAccessLock );
+std::unique_lock aLock( m_aAccessLock );
 // If gate not closed - caller can pass it.
 if( m_bClosed )
 {
 // Then we must release used access lock -
 // because next call will block...
 // and if we hold the access lock nobody else can use this 
object without a deadlock!
-aLock.clear();
+aLock.unlock();
 // Wait for opening gate...
 m_aPassage.wait();
 }
@@ -135,7 +135,7 @@ class Gate
 
 private:
 
-::osl::Mutexm_aAccessLock;
+std::mutex  m_aAccessLock;
 ::osl::Conditionm_aPassage;
 boolm_bClosed;
 


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

2022-05-14 Thread Noel Grandin (via logerrit)
 sal/osl/unx/thread.cxx |   16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)

New commits:
commit 60ba608b33b993ea9dc9cead84bd2d62f2ed50e1
Author: Noel Grandin 
AuthorDate: Fri May 13 11:09:07 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 13:45:47 2022 +0200

pthread_mutex_t->std::mutex in lookupThreadId

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

diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index ce5ece7c1d59..54e674dd4de5 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "system.hxx"
 #include "unixerrnostring.hxx"
@@ -598,7 +599,7 @@ struct HashEntry
 static HashEntry* HashTable[31];
 const int HashSize = SAL_N_ELEMENTS(HashTable);
 
-static pthread_mutex_t HashLock = PTHREAD_MUTEX_INITIALIZER;
+static std::mutex HashLock;
 
 #if ! ((defined LINUX && !defined __FreeBSD_kernel__) || defined MACOSX || 
defined IOS)
 static oslThreadIdentifier LastIdent = 0;
@@ -615,21 +616,18 @@ static oslThreadIdentifier lookupThreadId (pthread_t 
hThread)
 {
 HashEntry *pEntry;
 
-pthread_mutex_lock(&HashLock);
+std::unique_lock aGuard(HashLock);
 
 pEntry = HashTable[HASHID(hThread)];
 while (pEntry != nullptr)
 {
 if (pthread_equal(pEntry->Handle, hThread))
 {
-pthread_mutex_unlock(&HashLock);
 return pEntry->Ident;
 }
 pEntry = pEntry->Next;
 }
 
-pthread_mutex_unlock(&HashLock);
-
 return 0;
 }
 
@@ -637,7 +635,7 @@ static oslThreadIdentifier insertThreadId (pthread_t 
hThread)
 {
 HashEntry *pEntry, *pInsert = nullptr;
 
-pthread_mutex_lock(&HashLock);
+std::unique_lock aGuard(HashLock);
 
 pEntry = HashTable[HASHID(hThread)];
 
@@ -694,8 +692,6 @@ static oslThreadIdentifier insertThreadId (pthread_t 
hThread)
 HashTable[HASHID(hThread)] = pEntry;
 }
 
-pthread_mutex_unlock(&HashLock);
-
 return pEntry->Ident;
 }
 
@@ -703,7 +699,7 @@ static void removeThreadId (pthread_t hThread)
 {
 HashEntry *pEntry, *pRemove = nullptr;
 
-pthread_mutex_lock(&HashLock);
+std::unique_lock aGuard(HashLock);
 
 pEntry = HashTable[HASHID(hThread)];
 while (pEntry != nullptr)
@@ -724,8 +720,6 @@ static void removeThreadId (pthread_t hThread)
 
 free(pEntry);
 }
-
-pthread_mutex_unlock(&HashLock);
 }
 
 oslThreadIdentifier SAL_CALL osl_getThreadIdentifier(oslThread Thread)


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

2022-05-14 Thread Noel Grandin (via logerrit)
 svx/source/svdraw/svdoole2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 93243decefd78cd956d3d0984b4cd829d13bed4c
Author: Noel Grandin 
AuthorDate: Fri May 13 11:09:44 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 13:46:12 2022 +0200

skip some SetResizeProtect work during construction

unnecessary to do all the work of firing ActionChanged etc at this stage

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

diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 5f59761009fb..4582c6e34b37 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -763,7 +763,7 @@ SdrOle2Obj::SdrOle2Obj(
 mpImpl->aPersistName = rNewObjName;
 
 if (mpImpl->mxObjRef.is() && (mpImpl->mxObjRef->getStatus( GetAspect() ) & 
embed::EmbedMisc::EMBED_NEVERRESIZE ) )
-SetResizeProtect(true);
+m_bSizProt = true;
 
 // For math objects, set closed state to transparent
 SetClosedObj(!ImplIsMathObj( mpImpl->mxObjRef.GetObject() ));


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

2022-05-14 Thread Noel Grandin (via logerrit)
 xmloff/source/core/xmlexp.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 094b003268423a62cce9619a78caa82c59c7bbb8
Author: Noel Grandin 
AuthorDate: Fri May 13 11:10:12 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 13:46:35 2022 +0200

elide some OUString construction in GetViewSettingsAndViews

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

diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index f8e72d6fb3f3..5235226ac81f 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1725,7 +1725,8 @@ void 
SvXMLExport::GetViewSettingsAndViews(uno::Sequence& r
 xViewDataSupplier->setViewData( xIndexAccess ); // make sure we get a 
newly created sequence
 {
 // tdf#130559: don't export preview view data if active
-css::uno::ContextLayer 
layer(comphelper::NewFlagContext("NoPreviewData"));
+static constexpr OUStringLiteral sNoPreviewData = u"NoPreviewData";
+css::uno::ContextLayer 
layer(comphelper::NewFlagContext(sNoPreviewData));
 xIndexAccess = xViewDataSupplier->getViewData();
 }
 bool bAdd = false;


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

2022-05-14 Thread Andrea Gelmini (via logerrit)
 postprocess/qa/services.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1134ca31084e052554ba1b3fa25baf2fee8acd7
Author: Andrea Gelmini 
AuthorDate: Mon May 9 12:15:56 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat May 14 14:08:53 2022 +0200

Fix typo

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

diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index 2912356d40ea..94bd76031ff4 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -16,7 +16,7 @@
 // service there are multiple implementations or it does not have an 
appropriate
 // constructor) but does support at least one accumulation-based service, then
 // instantiate it through its implementation name (a heuristic to identify
-// instantiatable implementations that appears to work well).
+// instantiable implementations that appears to work well).
 
 #include 
 


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

2022-05-14 Thread Seth Chaiklin (via logerrit)
 sw/uiconfig/swriter/ui/frmaddpage.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c5542a82135b3527f883110d45a935661985d30
Author: Seth Chaiklin 
AuthorDate: Thu May 12 17:51:12 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat May 14 14:10:17 2022 +0200

Partially resolve: tdf#149010 rename section "Names" -> "Accessibility"

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

diff --git a/sw/uiconfig/swriter/ui/frmaddpage.ui 
b/sw/uiconfig/swriter/ui/frmaddpage.ui
index 33870a33bcd4..3bff62550b9b 100644
--- a/sw/uiconfig/swriter/ui/frmaddpage.ui
+++ b/sw/uiconfig/swriter/ui/frmaddpage.ui
@@ -211,7 +211,7 @@
   
 True
 False
-Names
+Accessibility
 
   
 


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

2022-05-14 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/impedit4.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 451efe2d7df16e61221fce4eafdba1fc7feaf60e
Author: Noel Grandin 
AuthorDate: Fri May 13 12:11:00 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 14:43:28 2022 +0200

reserve space in vector in ImpEditEngine::CreateTextObject

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

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 6520b0034727..9b1ec896612a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1043,6 +1043,7 @@ std::unique_ptr 
ImpEditEngine::CreateTextObject( EditSelection a
 // and the Attribute...
 std::size_t nAttr = 0;
 EditCharAttrib* pAttr = GetAttrib( 
pNode->GetCharAttribs().GetAttribs(), nAttr );
+rCAttriblist.reserve(rCAttriblist.size() + 
pNode->GetCharAttribs().GetAttribs().size());
 while ( pAttr )
 {
 // In a blank paragraph keep the attributes!


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

2022-05-14 Thread Noel Grandin (via logerrit)
 package/source/zipapi/ZipFile.cxx |1 +
 unotools/source/misc/fontdefs.cxx |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 8eabb8839dd81a1055aa0416ab5f3f67c7d3bb29
Author: Noel Grandin 
AuthorDate: Fri May 13 11:08:47 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 14:44:02 2022 +0200

reserve space in map in ZipFile::readCEN

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

diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 98f60bd4ab1d..aff8cce8fd34 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -918,6 +918,7 @@ sal_Int32 ZipFile::readCEN()
 ZipEntry aEntry;
 sal_Int16 nCommentLen;
 
+aEntries.reserve(nTotal);
 for (nCount = 0 ; nCount < nTotal; nCount++)
 {
 sal_Int32 nTestSig = aMemGrabber.ReadInt32();
commit 832c17278c9497de4b4b4a461cf858e8a62420da
Author: Noel Grandin 
AuthorDate: Fri May 13 12:11:53 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 14:43:50 2022 +0200

cache some OUString in GetEnglishSearchFontName

rather than allocating them repeatedly

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

diff --git a/unotools/source/misc/fontdefs.cxx 
b/unotools/source/misc/fontdefs.cxx
index 5a9157d4fb12..568110315f33 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -291,7 +291,7 @@ OUString GetEnglishSearchFontName(std::u16string_view 
rInName)
 // translate normalized localized name to its normalized English ASCII name
 if( bNeedTranslation )
 {
-typedef std::unordered_map FontNameDictionary;
+typedef std::unordered_map FontNameDictionary;
 static FontNameDictionary const aDictionary = {
 {aBatang, "batang"},
 {aBatangChe, "batangche"},
@@ -452,7 +452,7 @@ OUString GetEnglishSearchFontName(std::u16string_view 
rInName)
 
 FontNameDictionary::const_iterator it = aDictionary.find( rNameStr );
 if( it != aDictionary.end() )
-rNameStr = OUString::createFromAscii ( it->second );
+rNameStr = it->second;
 }
 
 return rNameStr;


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

2022-05-14 Thread Noel Grandin (via logerrit)
 ucb/source/ucp/file/filinl.hxx  |4 ++--
 ucb/source/ucp/file/filtask.hxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 27be40762e9e10de05cdc0692eef8a8c6fd5a23c
Author: Noel Grandin 
AuthorDate: Fri May 13 11:11:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 14:44:14 2022 +0200

pass-by-value in TaskManager::MyProperty::setValue

cheaper to move a temporary from some call-sites rather than
copy-construct

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

diff --git a/ucb/source/ucp/file/filinl.hxx b/ucb/source/ucp/file/filinl.hxx
index b29d938def1c..3ea985ebc6cd 100644
--- a/ucb/source/ucp/file/filinl.hxx
+++ b/ucb/source/ucp/file/filinl.hxx
@@ -46,9 +46,9 @@ inline const sal_Int16& 
TaskManager::MyProperty::getAttributes() const
 {
 return Attributes;
 }
-inline void TaskManager::MyProperty::setValue( const css::uno::Any& theValue ) 
const
+inline void TaskManager::MyProperty::setValue( css::uno::Any theValue ) const
 {
-const_cast(this)->Value = theValue;
+const_cast(this)->Value = std::move(theValue);
 }
 inline void TaskManager::MyProperty::setState( const 
css::beans::PropertyState& theState ) const
 {
diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx
index f8d070a4f36d..3fa4b85752ed 100644
--- a/ucb/source/ucp/file/filtask.hxx
+++ b/ucb/source/ucp/file/filtask.hxx
@@ -182,7 +182,7 @@ namespace fileaccess
 inline const sal_Int16& getAttributes() const;
 
 // The set* functions are declared const, because the key of 
"this" stays intact
-inline void setValue( const css::uno::Any& theValue ) const;
+inline void setValue( css::uno::Any theValue ) const;
 inline void setState( const css::beans::PropertyState& theState ) 
const;
 };
 


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

2022-05-14 Thread Luboš Luňák (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 130552d925878fcf452a85fb5a60ae048dc12a60
Author: Luboš Luňák 
AuthorDate: Sat May 14 12:13:24 2022 +0200
Commit: Luboš Luňák 
CommitDate: Sat May 14 14:55:05 2022 +0200

require libmwaw >= 0.3.21

File writerperfect/qa/unit/data/writer/libmwaw/pass/ScriptWriter_1
causes CppunitTest_writerperfect_writer to fail here with 0.3.20.

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

diff --git a/configure.ac b/configure.ac
index 899e9fec4ddd..2c65a1200f69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9524,7 +9524,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
-libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
+libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.21])
 libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.21])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])


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

2022-05-14 Thread Mike Kaganski (via logerrit)
 vcl/win/gdi/winlayout.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit f321113d71cca569624a848bdcb898cb04460137
Author: Mike Kaganski 
AuthorDate: Sat May 14 11:56:19 2022 +0100
Commit: Mike Kaganski 
CommitDate: Sat May 14 14:56:23 2022 +0200

Only obtain these after trying the cache

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

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 673b223a263f..8371c9577225 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -214,10 +214,6 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, 
hb_tag_t nTableTag, void* pU
 static o3tl::lru_map 
gCache(50);
 
 WinFontInstance* pFont = static_cast(pUserData);
-HDC hDC = pFont->GetGraphics()->getHDC();
-HFONT hFont = pFont->GetHFONT();
-assert(hDC);
-assert(hFont);
 
 BlobCacheKey cacheKey{ 
rtl::Reference(pFont->GetFontFace()),
nTableTag };
@@ -228,6 +224,11 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, 
hb_tag_t nTableTag, void* pU
 return it->second.mpBlob;
 }
 
+HDC hDC = pFont->GetGraphics()->getHDC();
+HFONT hFont = pFont->GetHFONT();
+assert(hDC);
+assert(hFont);
+
 sal_uLong nLength = 0;
 unsigned char* pBuffer = nullptr;
 


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

2022-05-14 Thread Olivier Hallot (via logerrit)
 dbaccess/uiconfig/ui/directsqldialog.ui |  165 +++-
 1 file changed, 81 insertions(+), 84 deletions(-)

New commits:
commit 6fb43429c31ebb4f4cff7be8ba27f1c7f022c7b9
Author: Olivier Hallot 
AuthorDate: Fri May 13 18:58:16 2022 -0300
Commit: Olivier Hallot 
CommitDate: Sat May 14 15:17:56 2022 +0200

Bump directsqldialog.ui to latest Glade version

No changes in dialog.

Change-Id: I478e43aadd5c92363a514e32245a17cbabd17da8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134294
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/dbaccess/uiconfig/ui/directsqldialog.ui 
b/dbaccess/uiconfig/ui/directsqldialog.ui
index ede0bd822e5e..d3107578b1e7 100644
--- a/dbaccess/uiconfig/ui/directsqldialog.ui
+++ b/dbaccess/uiconfig/ui/directsqldialog.ui
@@ -1,33 +1,30 @@
 
-
+
 
   
   
-False
-6
+False
+6
 Execute SQL Statement
 False
 True
-dialog
-
-  
-
+dialog
 
   
-False
+False
 vertical
 12
 
   
-False
-end
+False
+end
 
   
 _Help
 True
-True
-True
-True
+True
+True
+True
 True
   
   
@@ -41,9 +38,9 @@
   
 _Close
 True
-True
-True
-True
+True
+True
+True
 True
   
   
@@ -56,46 +53,46 @@
   
 False
 True
-end
+end
 0
   
 
 
   
 True
-False
+False
 True
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-True
-6
+False
 12
 6
+True
+True
+6
 
   
 True
-True
+True
 True
 True
-0
+0
 never
 always
-in
+in
 
   
 True
-False
+False
 
   
 True
-True
+True
 GDK_BUTTON_MOTION_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | 
GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK
   
 
@@ -103,42 +100,42 @@
 
   
   
-0
-1
+0
+1
   
 
 
   
 True
-False
+False
 _Command to execute:
-True
-sql
+True
+sql
 0
   
   
-0
-0
+0
+0
   
 
 
-  
+  
   
 True
-False
-12
+False
+12
 
   
 Run SQL command _directly
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
-0
-0
+0
+0
 2
   
 
@@ -146,59 +143,59 @@
   
 _Show output of "select" 
statements
 True
-True
-False
-True
-True
+True
+False
+True
+  

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

2022-05-14 Thread Olivier Hallot (via logerrit)
 source/text/sdatabase/1108.xhp |   36 +++-
 1 file changed, 27 insertions(+), 9 deletions(-)

New commits:
commit a6b0ba3babd4f6ed7aa55d9ccd85361970857977
Author: Olivier Hallot 
AuthorDate: Fri May 13 20:35:42 2022 -0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat May 14 15:45:24 2022 +0200

tdf#149086 Fix Help page for Direct SQL command

Add target bookmark
Update page content with latest UI enhancements

Change-Id: I88ec6bf787d7e4bb5df24b8e1652e5f176afdbf9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134296
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sdatabase/1108.xhp 
b/source/text/sdatabase/1108.xhp
index c61aebd19..8089a4990 100644
--- a/source/text/sdatabase/1108.xhp
+++ b/source/text/sdatabase/1108.xhp
@@ -24,9 +24,13 @@
 
 
 
-SQL; executing SQL statements 
(Base)
+
+SQL; executing SQL statements (Base)
 databases; administration through SQL (Base)
-
+
+
+
+
 Execute SQL statement
 Opens a dialog where you can enter an SQL command 
for administering a database.
 
@@ -36,17 +40,31 @@
 
 You can only 
enter administration commands in this dialog, such as Grant, Create Table, or 
Drop Table, and not filter commands. The commands that you can enter depend on 
the data source, for example, dBASE can only run some of the SQL commands list 
here.
 To run an SQL query for filtering data in the 
database, use the Query Design View.
-Command to 
execute
+
+Command to execute
 Enter the SQL administration command that 
you want to run.
 For example, 
for a "Bibliography" data source, you can enter the following SQL 
command:
 SELECT 
"Address" FROM "biblio" "biblio"
 For more 
information on SQL commands, please consult the documentation that came with 
the database.
-Previous commands
-Lists the previously executed SQL 
commands. To run a command again, click the command, and then click 
Run.
-Status
-Displays the results, including 
errors, of the SQL command that you ran.
-Run
-Runs the command that you entered in 
the Command to execute box.
+
+Run SQL commands directly
+Execute the SQL command 
directly without escape processing.
+Show output of "select" statements
+Show the result of the 
SQL SELECT command in the Output box.
+Execute
+Runs the command that you entered in 
the Command to execute box.
+
+
+Previous commands
+Lists the previously executed SQL 
commands. To run a command again, click the command, and then click 
Execute.
+
+
+Status
+Displays the status, including errors, 
of the SQL command that you ran.
+
+Output
+Displays the results of 
the SQL command that you ran.
+
 
 
 


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit c62a671a6676c27437f15a644032cd3e89b7c491
Author: Olivier Hallot 
AuthorDate: Sat May 14 10:45:26 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Sat May 14 15:45:26 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to a6b0ba3babd4f6ed7aa55d9ccd85361970857977
  - tdf#149086 Fix Help page for Direct SQL command

Add target bookmark
Update page content with latest UI enhancements

Change-Id: I88ec6bf787d7e4bb5df24b8e1652e5f176afdbf9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134296
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index d9880014fd80..a6b0ba3babd4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d9880014fd80f412d10b2f7536c45941552c4760
+Subproject commit a6b0ba3babd4f6ed7aa55d9ccd85361970857977


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

2022-05-14 Thread Michael Stahl (via logerrit)
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit fae560a9348e43d4af55cce2e27586a5bcb170b8
Author: Michael Stahl 
AuthorDate: Thu Apr 28 12:39:23 2022 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 14 16:27:38 2022 +0200

xmlsecurity: fix testInsertCertificate_PEM_ODT with "dbm:" NSS DB

CentOS 7 system NSS defaults to legacy "dbm:" DB.

  test_desktop_lib.cxx:2830:Assertion
  Test name: DesktopLOKTest::testInsertCertificate_PEM_ODT
  equality assertion failed
  - Expected: 1
  - Actual  : 2

The problem is that getPrivateKey() doesn't work:


warn:xmlsecurity.xmlsec:624712:624712:xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:824:
 Can't get the private key from the certificate.

In this function, there is a check for trust flags, and the CERTDB_USER
flag is not set, which causes the failure.

The certificate was inserted here and the trust flags were set; this
does write something to cert8.db and it's not clear why it doesn't work
(if this call is omitted with the "sql:" backend, the test fails with
NOTVALIDATED = 4 - as expected).

Oddly enough, while PK11_FindPrivateKeyFromCert() fails, there's another
function PK11_FindKeyByDERCert() that does appear to work, so call it as
a fallback.

Change-Id: I9821966a086574374f4f6df0ac5db2f7376fe742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133576
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit c9e758e3961b71c83a781da4cb12e454f09b094e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134290
Reviewed-by: Caolán McNamara 

diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx 
b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index 2d52134344fb..efb474a3326a 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -327,6 +327,13 @@ SECKEYPrivateKey* X509Certificate_NssImpl::getPrivateKey()
 SECKEYPrivateKey* pPrivateKey = 
PK11_FindPrivateKeyFromCert(m_pCert->slot, m_pCert, nullptr);
 if (pPrivateKey)
 return pPrivateKey;
+pPrivateKey = PK11_FindKeyByDERCert(m_pCert->slot, m_pCert, nullptr);
+if (pPrivateKey)
+{
+SAL_INFO("xmlsecurity.xmlsec", "fallback from 
PK11_FindPrivateKeyFromCert to PK11_FindKeyByDERCert needed");
+return pPrivateKey;
+}
+SAL_WARN("xmlsecurity.xmlsec", 
"X509Certificate_NssImpl::getPrivateKey() cannot find private key");
 }
 return nullptr;
 }


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

2022-05-14 Thread Michael Stahl (via logerrit)
 svl/source/crypto/cryptosign.cxx |   27 ++-
 1 file changed, 26 insertions(+), 1 deletion(-)

New commits:
commit a9854f30e1825240edc839e5f508f9d189fb31af
Author: Michael Stahl 
AuthorDate: Thu Apr 28 16:31:51 2022 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 14 16:28:32 2022 +0200

svl: fix testSignDocument_PEM_PDF with "dbm:" NSS DB

CentOS 7 system NSS defaults to legacy "dbm:" DB.

  test_desktop_lib.cxx:2943:Assertion
  Test name: DesktopLOKTest::testSignDocument_PEM_PDF
  assertion failed
  - Expression: bResult

NSS_CMSSignerInfo_Sign() (called from NSS_CMSEncoder_Finish())
internally calls PK11_FindKeyByAnyCert() and that fails likely for same
reasons as documented in previous commit.

The workaround here is a bit more involved, it turns out there's another
path with NSSCMSSignerID_SubjectKeyID where the caller can pass in a
SECKEYPrivateKey, let's try to do that as a fallback if a manual call to
find the key fails.

Change-Id: I298ee72f178220bcf644093917dba8143b092c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133577
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 5592ee094ca9f09bfcc16537d931518d4e6b2231)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134291
Reviewed-by: Caolán McNamara 

diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index 06080d221364..f19c4dfcd663 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -34,6 +34,8 @@
 #if USE_CRYPTO_NSS
 // NSS headers for PDF signing
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -635,7 +637,30 @@ NSSCMSMessage *CreateCMSMessage(const PRTime* time,
 return nullptr;
 }
 
-*cms_signer = NSS_CMSSignerInfo_Create(result, cert, SEC_OID_SHA256);
+// workaround: with legacy "dbm:", NSS can't find the private key - try out
+// if it works, and fallback if it doesn't.
+if (SECKEYPrivateKey * pPrivateKey = PK11_FindKeyByAnyCert(cert, nullptr))
+{
+SECKEY_DestroyPrivateKey(pPrivateKey);
+*cms_signer = NSS_CMSSignerInfo_Create(result, cert, SEC_OID_SHA256);
+}
+else
+{
+pPrivateKey = PK11_FindKeyByDERCert(cert->slot, cert, nullptr);
+SECKEYPublicKey *const pPublicKey = CERT_ExtractPublicKey(cert);
+if (pPublicKey && pPrivateKey)
+{
+*cms_signer = NSS_CMSSignerInfo_CreateWithSubjKeyID(result, 
&cert->subjectKeyID, pPublicKey, pPrivateKey, SEC_OID_SHA256);
+SECKEY_DestroyPrivateKey(pPrivateKey);
+SECKEY_DestroyPublicKey(pPublicKey);
+if (*cms_signer)
+{
+// this is required in NSS_CMSSignerInfo_IncludeCerts()
+// (and NSS_CMSSignerInfo_GetSigningCertificate() doesn't work)
+(**cms_signer).cert = CERT_DupCertificate(cert);
+}
+}
+}
 if (!*cms_signer)
 {
 SAL_WARN("svl.crypto", "NSS_CMSSignerInfo_Create failed");


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

2022-05-14 Thread Michael Stahl (via logerrit)
 unotest/source/cpp/macros_test.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 50101f735af5fdecbe7534a845a7a6a8ddfe763e
Author: Michael Stahl 
AuthorDate: Fri Apr 29 11:58:51 2022 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 14 16:29:07 2022 +0200

unotest: fix NSS initialization for CentOS7 system NSS

When given an unprefixed path, CentOS7 system NSS 3.67 apparently
ignores the nice unit test database and creates a legacy "dbm:" one in
the same directory, which is of course empty.

This causes:


xmlsecurity/qa/unit/signing/signing.cxx:570:aaa_testODFX509CertificateChain::TestBody
equality assertion failed
- Expected: 0
- Actual  : 1

The intermediate/root CA certificates are read from the signature and
added with CERT_NewTempCertificate(), which then does a lookup in the
database to find the trust flags of the certificate:

 0  nssTrust_GetCERTCertTrustForCert () at pki3hack.c:610
 1  fill_CERTCertificateFields () at pki3hack.c:819
 2  stan_GetCERTCertificate () at pki3hack.c:926
 3  STAN_GetCERTCertificate () at pki3hack.c:973
 4  add_cert_to_cache () at tdcache.c:721
 5  nssTrustDomain_AddCertsToCache () at tdcache.c:849
 6  cert_createObject () at pkibase.c:1023
 7  nssPKIObjectCollection_GetObjects () at pkibase.c:853
 8  nssPKIObjectCollection_GetCertificates () at pkibase.c:1077
 9  nssTrustDomain_FindCertificateByIssuerAndSerialNumber () at 
trustdomain.c:796
 10 nssTrustDomain_FindCertificateByEncodedCertificate () at 
trustdomain.c:839
 11 NSSTrustDomain_FindCertificateByEncodedCertificate () at 
trustdomain.c:852
 12 CERT_NewTempCertificate () at stanpcertdb.c:366
 13 __CERT_NewTempCertificate () at stanpcertdb.c:474
 14 SecurityEnvironment_NssImpl::verifyCertificate() () at 
xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:524

Change-Id: If334d056a9e13ad806e3ea1a03d395d606fd3d84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133622
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 55b9b3c9d4a71de1f4e4c79bfce2766d3ef73e28)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134292
Reviewed-by: Caolán McNamara 

diff --git a/unotest/source/cpp/macros_test.cxx 
b/unotest/source/cpp/macros_test.cxx
index 718c0b1b8954..4c48574e759a 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -129,7 +129,8 @@ void MacrosTest::setUpNssGpg(const test::Directories& 
rDirectories, const OUStri
 osl_setEnvironment(caVar.pData, aTargetPath.pData);
 #else
 OUString mozCertVar("MOZILLA_CERTIFICATE_FOLDER");
-osl_setEnvironment(mozCertVar.pData, aTargetPath.pData);
+// explicit prefix with "sql:" needed for CentOS7 system NSS 3.67
+osl_setEnvironment(mozCertVar.pData, OUString("sql:" + aTargetPath).pData);
 #endif
 OUString gpgHomeVar("GNUPGHOME");
 osl_setEnvironment(gpgHomeVar.pData, aTargetPath.pData);


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

2022-05-14 Thread Olivier Hallot (via logerrit)
 dbaccess/uiconfig/ui/directsqldialog.ui |   30 ++
 1 file changed, 30 insertions(+)

New commits:
commit 3a91c52b5a8a4fa131c2b74ba83032c835da313f
Author: Olivier Hallot 
AuthorDate: Fri May 13 20:32:06 2022 -0300
Commit: Olivier Hallot 
CommitDate: Sat May 14 17:23:11 2022 +0200

Add extended tips for Direct SQL dialog

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

diff --git a/dbaccess/uiconfig/ui/directsqldialog.ui 
b/dbaccess/uiconfig/ui/directsqldialog.ui
index d3107578b1e7..c1c06f40a383 100644
--- a/dbaccess/uiconfig/ui/directsqldialog.ui
+++ b/dbaccess/uiconfig/ui/directsqldialog.ui
@@ -94,6 +94,11 @@
 True
 True
 GDK_BUTTON_MOTION_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | 
GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK
+
+  
+Enter the SQL administration command 
that you want to run.
+  
+
   
 
   
@@ -132,6 +137,11 @@
 False
 True
 True
+
+  
+Execute the 
SQL command directly without escape processing.
+  
+
   
   
 0
@@ -147,6 +157,11 @@
 False
 True
 True
+
+  
+Show the 
result of the SQL SELECT command in the Output box.
+  
+
   
   
 0
@@ -178,6 +193,11 @@
   
 True
 False
+
+  
+Lists the 
previously executed SQL commands. To run a command again, click the command, 
and then click Execute.
+  
+
   
   
 0
@@ -235,6 +255,11 @@
 True
 True
 False
+
+  
+Displays the 
results, including errors, of the SQL command that you ran.
+  
+
   
 
   
@@ -274,6 +299,11 @@
 True
 True
 False
+
+  
+Displays the 
results of the SQL command that you ran.
+  
+
   
 
   


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

2022-05-14 Thread Noel Grandin (via logerrit)
 include/unotools/eventcfg.hxx|3 +++
 sfx2/source/inc/eventsupplier.hxx|4 ++--
 sfx2/source/notify/eventsupplier.cxx |   14 +-
 sfx2/source/notify/globalevents.cxx  |   12 +++-
 unotools/source/config/eventcfg.cxx  |   12 +++-
 5 files changed, 24 insertions(+), 21 deletions(-)

New commits:
commit ce214d56727ecf8fb212910a711b4e3ef38e4b63
Author: Noel Grandin 
AuthorDate: Fri May 13 15:30:37 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 17:30:08 2022 +0200

bypass some unnecessary wrapping in Any in SfxEvents_Impl

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

diff --git a/include/unotools/eventcfg.hxx b/include/unotools/eventcfg.hxx
index 5999d0bc1ea3..7ddca4a96be0 100644
--- a/include/unotools/eventcfg.hxx
+++ b/include/unotools/eventcfg.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_UNOTOOLS_EVENTCFG_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -75,6 +76,8 @@ class UNOTOOLS_DLLPUBLIC GlobalEventConfig final :
 sal_Bool SAL_CALL hasElements(  ) override;
 static OUString GetEventName( GlobalEventId nID );
 
+css::uno::Sequence < css::beans::PropertyValue > getByName2( const 
OUString& aName );
+
 private:
 static GlobalEventConfig_Impl* m_pImpl;
 static sal_Int32 m_nRefCount;
diff --git a/sfx2/source/inc/eventsupplier.hxx 
b/sfx2/source/inc/eventsupplier.hxx
index 0a6c1a971daf..56aa8f95e75f 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -44,7 +44,7 @@ class SvxMacro;
 class SfxEvents_Impl final : public ::cppu::WeakImplHelper< 
css::container::XNameReplace, css::document::XDocumentEventListener >
 {
 css::uno::Sequence< OUString > maEventNames;
-std::vector< css::uno::Any >   maEventData;
+std::vector< css::uno::Sequence < css::beans::PropertyValue > >  
maEventData;
 css::uno::Reference< css::document::XDocumentEventBroadcaster >  
mxBroadcaster;
 std::mutex maMutex;
 SfxObjectShell *mpObjShell;
@@ -79,7 +79,7 @@ public:
 const ::comphelper::NamedValueCollection& 
i_eventDescriptor,
 ::comphelper::NamedValueCollection& 
o_normalizedDescriptor,
 SfxObjectShell* i_document );
-static void Execute( css::uno::Any const & aEventData, const 
css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
+static void Execute( css::uno::Sequence < css::beans::PropertyValue > 
const & aEventData, const css::document::DocumentEvent& aTrigger, 
SfxObjectShell* pDoc );
 
 private:
 /// Check if script URL whitelist exists, and if so, if current script url 
is part of it
diff --git a/sfx2/source/notify/eventsupplier.cxx 
b/sfx2/source/notify/eventsupplier.cxx
index 7ac2fd7d830d..d6bff98de8f0 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -98,11 +98,11 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUString 
& aName, const uno::
 
 if ( !aNormalizedDescriptor.empty() )
 {
-maEventData[nIndex] <<= aNormalizedDescriptor.getPropertyValues();
+maEventData[nIndex] = aNormalizedDescriptor.getPropertyValues();
 }
 else
 {
-maEventData[nIndex].clear();
+maEventData[nIndex] = {};
 }
 }
 
@@ -117,7 +117,7 @@ uno::Any SAL_CALL SfxEvents_Impl::getByName( const 
OUString& aName )
 
 auto nIndex = comphelper::findValue(maEventNames, aName);
 if (nIndex != -1)
-return maEventData[nIndex];
+return uno::Any(maEventData[nIndex]);
 
 throw container::NoSuchElementException();
 }
@@ -180,12 +180,8 @@ bool SfxEvents_Impl::isScriptURLAllowed(const OUString& 
aScriptURL)
 return false;
 }
 
-void SfxEvents_Impl::Execute( uno::Any const & aEventData, const 
document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
+void SfxEvents_Impl::Execute( css::uno::Sequence < css::beans::PropertyValue > 
const & aProperties, const document::DocumentEvent& aTrigger, SfxObjectShell* 
pDoc )
 {
-uno::Sequence < beans::PropertyValue > aProperties;
-if ( !(aEventData >>= aProperties) )
-return;
-
 OUString aType;
 OUString aScript;
 OUString aLibrary;
@@ -292,7 +288,7 @@ void SAL_CALL SfxEvents_Impl::documentEventOccured( const 
document::DocumentEven
 if ( nIndex == -1 )
 return;
 
-uno::Any aEventData = maEventData[ nIndex ];
+css::uno::Sequence < css::beans::PropertyValue > aEventData = maEventData[ 
nIndex ];
 aGuard.unlock();
 Execute( aEventData, aEvent, mpObjShell );
 }
diff --git a/sfx2/source/notify/globalevents.cxx 
b/sfx2/source/notify/globalevents.cxx
index 87564e74ed65..cd6b08007115 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globaleve

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

2022-05-14 Thread Noel Grandin (via logerrit)
 filter/source/config/cache/cacheitem.cxx |  208 ++-
 starmath/source/mathml/mathmlexport.cxx  |   33 ++--
 2 files changed, 119 insertions(+), 122 deletions(-)

New commits:
commit 652ac2fb11adaea2ab6b07718aa86579de025a72
Author: Noel Grandin 
AuthorDate: Fri May 13 16:02:42 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 17:30:58 2022 +0200

cheaper to let Any do the comparison in isSubSet

rather than constructing temporary OUStrings

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

diff --git a/filter/source/config/cache/cacheitem.cxx 
b/filter/source/config/cache/cacheitem.cxx
index 0814e7c49733..b7993eba1b2d 100644
--- a/filter/source/config/cache/cacheitem.cxx
+++ b/filter/source/config/cache/cacheitem.cxx
@@ -122,151 +122,141 @@ static bool isSubSet(const css::uno::Any& aSubSet,
 return false;
 }
 
-css::uno::TypeClass aTypeClass = aT1.getTypeClass();
-switch(aTypeClass)
+if (aSubSet.hasValue() && aSet.hasValue())
 {
-
-case css::uno::TypeClass_BOOLEAN :
-case css::uno::TypeClass_BYTE :
-case css::uno::TypeClass_SHORT :
-case css::uno::TypeClass_UNSIGNED_SHORT :
-case css::uno::TypeClass_LONG :
-case css::uno::TypeClass_UNSIGNED_LONG :
-case css::uno::TypeClass_HYPER :
-case css::uno::TypeClass_UNSIGNED_HYPER :
-case css::uno::TypeClass_FLOAT :
-case css::uno::TypeClass_DOUBLE :
-{
-bool bIs = (aSubSet == aSet);
-return bIs;
-}
-
-
-case css::uno::TypeClass_STRING :
+css::uno::TypeClass aTypeClass = aT1.getTypeClass();
+switch(aTypeClass)
 {
-OUString v1;
-OUString v2;
 
-if (
-(aSubSet >>= v1) &&
-(aSet>>= v2)
-   )
+case css::uno::TypeClass_BOOLEAN :
+case css::uno::TypeClass_BYTE :
+case css::uno::TypeClass_SHORT :
+case css::uno::TypeClass_UNSIGNED_SHORT :
+case css::uno::TypeClass_LONG :
+case css::uno::TypeClass_UNSIGNED_LONG :
+case css::uno::TypeClass_HYPER :
+case css::uno::TypeClass_UNSIGNED_HYPER :
+case css::uno::TypeClass_FLOAT :
+case css::uno::TypeClass_DOUBLE :
 {
-bool bIs = v1 == v2;
+bool bIs = (aSubSet == aSet);
 return bIs;
 }
-}
-break;
 
 
-case css::uno::TypeClass_STRUCT :
-{
-css::beans::PropertyValue p1;
-css::beans::PropertyValue p2;
+case css::uno::TypeClass_STRING :
+return aSubSet == aSet;
+break;
 
-if (
-(aSubSet >>= p1) &&
-(aSet>>= p2)
-   )
-{
-bool bIs = (p1.Name == p2.Name) && isSubSet(p1.Value, 
p2.Value);
-return bIs;
-}
-
-css::beans::NamedValue n1;
-css::beans::NamedValue n2;
 
-if (
-(aSubSet >>= n1) &&
-(aSet>>= n2)
-   )
+case css::uno::TypeClass_STRUCT :
 {
-bool bIs = (n1.Name == n2.Name) && isSubSet(n1.Value, 
n2.Value);
-return bIs;
-}
-}
-break;
-
+css::beans::PropertyValue p1;
+css::beans::PropertyValue p2;
 
-case css::uno::TypeClass_SEQUENCE :
-{
-css::uno::Sequence< OUString > uno_s1;
-css::uno::Sequence< OUString > uno_s2;
+if (
+(aSubSet >>= p1) &&
+(aSet>>= p2)
+   )
+{
+bool bIs = (p1.Name == p2.Name) && isSubSet(p1.Value, 
p2.Value);
+return bIs;
+}
 
-if (
-(aSubSet >>= uno_s1) &&
-(aSet>>= uno_s2)
-   )
-{
-auto s2Begin = uno_s2.getConstArray();
-auto s2End = uno_s2.getConstArray() + uno_s2.getLength();
+css::beans::NamedValue n1;
+css::beans::NamedValue n2;
 
-for (auto const& elem : uno_s1)
+if (
+(aSubSet >>= n1) &&
+(aSet>>= n2)
+   )
 {
-if (::std::find(s2Begin, s2End, elem) == s2End)
-{
-return false;
-}
+bool bIs = (n1.Name == n2.Name) && isSubSet(n1.Value, 
n2.Value);
+return bIs;
 }
-return true;
 }
+   

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

2022-05-14 Thread Noel Grandin (via logerrit)
 framework/source/uielement/toolbarmanager.cxx |   32 +++---
 vcl/source/image/ImplImageTree.cxx|   22 -
 2 files changed, 20 insertions(+), 34 deletions(-)

New commits:
commit 37bbac7f8b8649c8c3a759d4ae225ead7af2d69c
Author: Noel Grandin 
AuthorDate: Fri May 13 12:11:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 17:31:40 2022 +0200

simplify initialisation in ToolBarManager::CreateControllers

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

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 4213271f2cf1..f12cbc62fd26 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1196,30 +1196,16 @@ void ToolBarManager::CreateControllers()
 {
 if ( bInit )
 {
-PropertyValue aPropValue;
-std::vector< Any > aPropertyVector;
-
-aPropValue.Name = "Frame";
-aPropValue.Value <<= m_xFrame;
-aPropertyVector.push_back( Any( aPropValue ));
-aPropValue.Name = "CommandURL";
-aPropValue.Value <<= aCommandURL;
-aPropertyVector.push_back( Any( aPropValue ));
-aPropValue.Name = "ServiceManager";
 Reference 
xMSF(m_xContext->getServiceManager(), UNO_QUERY_THROW);
-aPropValue.Value <<= xMSF;
-aPropertyVector.push_back( Any( aPropValue ));
-aPropValue.Name = "ParentWindow";
-aPropValue.Value <<= xToolbarWindow;
-aPropertyVector.push_back( Any( aPropValue ));
-aPropValue.Name = "ModuleIdentifier";
-aPropValue.Value <<= m_aModuleIdentifier;
-aPropertyVector.push_back( Any( aPropValue ));
-aPropValue.Name = "Identifier";
-aPropValue.Value<<= sal_uInt16(nId);
-aPropertyVector.push_back( uno::Any( aPropValue ) );
-
-Sequence< Any > aArgs( comphelper::containerToSequence( 
aPropertyVector ));
+Sequence< Any > aArgs {
+Any( comphelper::makePropertyValue("Frame", m_xFrame) ),
+Any( comphelper::makePropertyValue("CommandURL", 
aCommandURL) ),
+Any( comphelper::makePropertyValue("ServiceManager", xMSF) 
),
+Any( comphelper::makePropertyValue("ParentWindow", 
xToolbarWindow) ),
+Any( comphelper::makePropertyValue("ModuleIdentifier", 
m_aModuleIdentifier) ),
+Any( comphelper::makePropertyValue("Identifier", 
sal_uInt16(nId)) ),
+};
+
 xInit->initialize( aArgs );
 
 if (pController)
commit d4f2b8eb74f430f5fc3622d668b33df1f99a0c1d
Author: Noel Grandin 
AuthorDate: Fri May 13 12:12:13 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 17:31:16 2022 +0200

use more string_view in getNameNoExtension

to avoid some allocation

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

diff --git a/vcl/source/image/ImplImageTree.cxx 
b/vcl/source/image/ImplImageTree.cxx
index 5f2d1e94af6a..ae9baacd55ca 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -134,10 +134,10 @@ bool urlExists(OUString const & sUrl)
 return osl::FileBase::E_None == eRC;
 }
 
-OUString getNameNoExtension(std::u16string_view sName)
+std::u16string_view getNameNoExtension(std::u16string_view sName)
 {
 size_t nDotPosition = sName.rfind('.');
-return OUString(sName.substr(0, nDotPosition));
+return sName.substr(0, nDotPosition);
 }
 
 std::shared_ptr wrapStream(uno::Reference 
const & rInputStream)
@@ -222,15 +222,15 @@ std::vector ImplImageTree::getPaths(OUString 
const & name, LanguageTag
 {
 for (const OUString& rFallback : rLanguageTag.getFallbackStrings(true))
 {
-OUString aFallbackName = 
getNameNoExtension(getRealImageName(createPath(name, pos, rFallback)));
-sPaths.emplace_back(aFallbackName + ".png");
-sPaths.emplace_back(aFallbackName + ".svg");
+std::u16string_view aFallbackName = 
getNameNoExtension(getRealImageName(createPath(name, pos, rFallback)));
+sPaths.emplace_back(OUString::Concat(aFallbackName) + ".png");
+sPaths.emplace_back(OUString::Concat(aFallbackName) + ".svg");
 }
 }
 
-OUString aRealName = getNameNoExtension(getRealImageName(name));
-sPaths.emplace_back(aRealName + ".png");
-sPaths.emplace_back(aRealName + ".svg");
+std::u16string_view aRealName =

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

2022-05-14 Thread Andrea Gelmini (via logerrit)
 drawinglayer/source/tools/emfphelperdata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0d028269b67aaa1cc36473a4c9f5fc3c01499d3e
Author: Andrea Gelmini 
AuthorDate: Sat May 14 16:30:37 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 18:14:41 2022 +0200

Fix typo

Change-Id: Ib0913aef00cd252d3f082ec5e8b39064df63a7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134319
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx 
b/drawinglayer/source/tools/emfphelperdata.cxx
index 4d0db58c026b..0734dad6d6ea 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -596,7 +596,7 @@ namespace emfplushelper
 const double transformedPenWidth = mdExtractedYScale * pen->penWidth;
 drawinglayer::attribute::LineAttribute lineAttribute(
 pen->GetColor().getBColor(), transformedPenWidth, 
pen->GetLineJoinType(),
-css::drawing::LineCap_BUTT, //TODO implement PenDataDashedLineCap 
supportr here
+css::drawing::LineCap_BUTT, //TODO implement PenDataDashedLineCap 
support here
 pen->fMiterMinimumAngle);
 
 drawinglayer::attribute::LineStartEndAttribute aStart;


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

2022-05-14 Thread Andrea Gelmini (via logerrit)
 svx/source/svdraw/sdrundomanager.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ef96de2252bca350a491185704de10b137a29ab3
Author: Andrea Gelmini 
AuthorDate: Sat May 14 16:30:47 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 18:15:20 2022 +0200

Fix typo

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

diff --git a/svx/source/svdraw/sdrundomanager.cxx 
b/svx/source/svdraw/sdrundomanager.cxx
index 2f286096c160..3d5fde475ac8 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -102,8 +102,8 @@ bool SdrUndoManager::Redo()
 // The problem here is that Undo/Redo actions historically 
reference
 // XShapes/SdrShapes by pointer/reference, e.g. deleting means: 
remove
 // from an SdrObjList and add to an Undo action. I is *not*
-// adddress/incarnation-invariant in the sense to remember e.g. to
-// remove the Nth object in tha list (that would work).
+// address/incarnation-invariant in the sense to remember e.g. to
+// remove the Nth object in the list (that would work).
 
 // It might be possible to solve/correct this better, but since 
it's
 // a rare corner case just avoid the possible crash when 
continuing Redos


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

2022-05-14 Thread Andrea Gelmini (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1983a1fc803fe3bd35ee1f3b80b44c99582ca95
Author: Andrea Gelmini 
AuthorDate: Sat May 14 16:30:57 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 18:15:49 2022 +0200

Fix typo

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

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 9cd969fcfbdc..6cf4c18a3bea 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -988,7 +988,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf148863)
 double nB1 = pDoc->GetValue(ScAddress(1, 0, 0));
 double nC1 = pDoc->GetValue(ScAddress(2, 0, 0));
 
-// Without the fix in place, this test woul have failed here
+// Without the fix in place, this test would have failed here
 CPPUNIT_ASSERT(nA1 != nB1);
 CPPUNIT_ASSERT(nA1 != nC1);
 CPPUNIT_ASSERT(nB1 != nC1);


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

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

New commits:
commit 5cc5cbc6aefae06f547529bc0d417e14dc486fc4
Author: Andrea Gelmini 
AuthorDate: Sat May 14 16:29:18 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 18:17:04 2022 +0200

Fix typo

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

diff --git a/source/text/sbasic/shared/03/sf_calc.xhp 
b/source/text/sbasic/shared/03/sf_calc.xhp
index 38ab58caa..7be0ecaf7 100644
--- a/source/text/sbasic/shared/03/sf_calc.xhp
+++ b/source/text/sbasic/shared/03/sf_calc.xhp
@@ -822,7 +822,7 @@
   
   
   range: 
The range from which rows will be deleted, as a string.
-  wholerow: If this option is set to 
True the entire row will be deleted from the sheet. The 
default vaule is False, which means that the deleted row 
will be limited to the width of the specified 
range.
+  wholerow: If this option is set to 
True the entire row will be deleted from the sheet. The 
default value is False, which means that the deleted row 
will be limited to the width of the specified 
range.
   filterformula: The filter to be applied 
to each row to determine whether or not it will be deleted. The filter is 
expressed as a Calc formula that should be applied to the first row. When the 
formula returns True for a row, that row will be deleted. The 
default filter deletes all empty rows.
   For example, suppose 
range A1:J200 is selected (width = 10), so the default formula is 
=(COUNTBLANK(A1:J1)=10). This means that if all 10 cells are empty 
in the first row (Row 1), then the row is deleted. Note that the formula is 
expressed with respect to the first row only. Internally the 
CompactUp method will generalize this formula for all the 
remaining rows.
   


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit e4bbd65376497585d035fd9d29490668bcce815e
Author: Andrea Gelmini 
AuthorDate: Sat May 14 18:17:06 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Sat May 14 18:17:06 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 5cc5cbc6aefae06f547529bc0d417e14dc486fc4
  - Fix typo

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

diff --git a/helpcontent2 b/helpcontent2
index a6b0ba3babd4..5cc5cbc6aefa 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a6b0ba3babd4f6ed7aa55d9ccd85361970857977
+Subproject commit 5cc5cbc6aefae06f547529bc0d417e14dc486fc4


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

2022-05-14 Thread Andrea Gelmini (via logerrit)
 vcl/source/treelist/treelistbox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e4b2830d01efbfe11fb138e1307b9b05695006a
Author: Andrea Gelmini 
AuthorDate: Fri May 13 11:23:20 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 18:17:24 2022 +0200

Fix typo

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

diff --git a/vcl/source/treelist/treelistbox.cxx 
b/vcl/source/treelist/treelistbox.cxx
index 14089dc53b2e..a244e97f809a 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2810,7 +2810,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, 
tools::Long nLine, vcl:
 
 if (!bDefaultImage)
 {
-// If its a custom image then draw what was explicitly set to use
+// If it's a custom image then draw what was explicitly set to use
 DrawImageFlags nStyle = DrawImageFlags::NONE;
 if (!IsEnabled())
 nStyle |= DrawImageFlags::Disable;


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

2022-05-14 Thread Olivier Hallot (via logerrit)
 source/text/sdatabase/02010100.xhp |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 5c82eb12e524d454c02798994d08d50548c9734c
Author: Olivier Hallot 
AuthorDate: Sat May 14 12:39:47 2022 -0300
Commit: Olivier Hallot 
CommitDate: Sat May 14 18:21:32 2022 +0200

Fix bad filename and links in Query Desing Help page

+ Remove internal links that breaks reading comfort.

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

diff --git a/source/text/sdatabase/02010100.xhp 
b/source/text/sdatabase/02010100.xhp
index 0e6cd9e99..85233468a 100644
--- a/source/text/sdatabase/02010100.xhp
+++ b/source/text/sdatabase/02010100.xhp
@@ -21,7 +21,7 @@
 
   
 Query Design
-/text/sdatabase/020010100.xhp
+/text/sdatabase/02010100.xhp
   
 
 
@@ -49,7 +49,7 @@
 mw added "(Base)" to all entries
 
 
-Query Design
+Query Design
 The Query Design View allows you to create and edit a 
database query.
 
 
@@ -61,7 +61,7 @@
 
 The Design View
 To create a 
query, click the Queries icon in a database document, then click 
Create Query in Design View.
-The lower pane 
of the Design View is where you define the query. To define a query, specify the database 
field names 
to include and the criteria for displaying the fields. To rearrange the 
columns in the lower pane of the Design View, drag a column header to a new 
location, or select the column and press Command
+The lower pane 
of the Design View is where you define the query. To define a query, specify 
the database field names to include and the  criteria for displaying the 
fields. To rearrange the columns in the lower pane of the Design View, drag a 
column header to a new location, or select the column and press Command
 Ctrl+arrow 
key.
 In the top of 
the query Design View window, the icons of the Query Design Bar and the 
Design bar are displayed.
 If you want to 
test a query, double-click the query name in the database document. The query 
result is displayed in a table similar to the Data Source View. Note: the table 
displayed is only temporary.
@@ -185,7 +185,7 @@
 
 
 Criteria
-Specifies a first criteria by which 
the content of the data field is to be filtered.
+Specifies a first criteria by which the content of 
the data field is to be filtered.
 
 or
 Here you can 
enter one additional filter criterion for each line. Multiple criteria in a 
single column will be interpreted as boolean OR.
@@ -814,9 +814,9 @@
 Parameter queries
 Parameter queries allow the user to input values at run-time. 
These values are used within the criteria for selecting the records to be 
displayed. Each such value has a parameter name associated with it, which is 
used to prompt the user when the query is run. 
 Parameter names are preceded by a colon in both the Design and 
SQL views of a query. This can be used wherever a value can appear. If the same 
value is to appear more than once in the query, the same parameter name is 
used.
-In 
the simplest case, where the user enters a value which is matched for equality, 
the parameter name with its preceding colon is simply entered in the Criterion 
row. In SQL mode this 
should be typed as WHERE "Field" = 
:Parameter_name
+In 
the simplest case, where the user enters a value which is matched for equality, 
the parameter name with its preceding colon is simply entered in the Criterion 
row. In SQL mode this 
should be typed as WHERE "Field" = 
:Parameter_name
 Parameter names may not contain any of 
the characters `!"$%^*()+={}[]@'~#<>?/,. They may not 
be the same as field names or SQL reserved words. They may be the same as 
aliases.
-A useful construction for selecting records 
based on parts of a text field's content is to add a hidden column with "LIKE '%' || :Part_of_field || '%'" as the criterion. This 
will select records with an exact match. If a case-insensitive test is wanted, 
one solution is to use LOWER (Field_Name) as the 
field and LIKE LOWER ( '%' || :Part_of_field || '%' ) 
as the criterion. Note that the spaces in the criterion are important; if they 
are left out the SQL parser interprets the entire criterion as a string to be 
matched. In SQL mode 
this should be typed as LOWER ( "Field_Name" ) LIKE LOWER ( 
'%' || :Part_of_field || '%' ).
+A useful construction for selecting records 
based on parts of a text field's content is to add a hidden column with "LIKE '%' || :Part_of_field || '%'" as the criterion. This 
will select records with an exact match. If a case-insensitive test is wanted, 
one solution is to use LOWER (Field_Name) as the 
field and LIKE LOWER ( '%' || :Part_of_field || '%' ) 
as the criterion. Note that the spaces in the criterion are important; if they 
are left out the SQL parser interprets the entire criterion as a string to be 
matched. In SQL mode 
this should be typed as LOWER ( "Field_Name

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit a3d45682089932ec36eb5a2ee9c7dedf5d683751
Author: Olivier Hallot 
AuthorDate: Sat May 14 13:21:34 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Sat May 14 18:21:34 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 5c82eb12e524d454c02798994d08d50548c9734c
  - Fix bad filename and links in Query Desing Help page

+ Remove internal links that breaks reading comfort.

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

diff --git a/helpcontent2 b/helpcontent2
index 5cc5cbc6aefa..5c82eb12e524 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5cc5cbc6aefae06f547529bc0d417e14dc486fc4
+Subproject commit 5c82eb12e524d454c02798994d08d50548c9734c


[Libreoffice-commits] help.git: help3xsl/prism.css help3xsl/prism.js help3xsl/README.prism.js.txt

2022-05-14 Thread Olivier Hallot (via logerrit)
 help3xsl/README.prism.js.txt |   12 +++
 help3xsl/prism.css   |4 +--
 help3xsl/prism.js|   44 +++
 3 files changed, 50 insertions(+), 10 deletions(-)

New commits:
commit 789bc6e2c10536e5a876c5c4fb0126dbffe4dcbf
Author: Olivier Hallot 
AuthorDate: Sat May 14 13:27:28 2022 -0300
Commit: Olivier Hallot 
CommitDate: Sat May 14 18:39:51 2022 +0200

Bump Prism.js to 1.28

+ Add SQL coloring syntax

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

diff --git a/help3xsl/README.prism.js.txt b/help3xsl/README.prism.js.txt
index 2f3f004b6..96a42aa13 100644
--- a/help3xsl/README.prism.js.txt
+++ b/help3xsl/README.prism.js.txt
@@ -1,6 +1,6 @@
 Latest download version
 
-PrismJS 1.27.0
+PrismJS 1.28.0
 
 Using prism.js for Basic code highlight
 
@@ -12,10 +12,14 @@ Download page http://prismjs.com/download
 
 Theme: Coy
 
-Languages to download: Visual Basic + Python + defaults pre-sets
-
-Plugins: line numbers,
+Languages to download: 
+Visual Basic + 
+Python + 
+SQL + 
+defaults Prism pre-sets
 
+Plugins: 
+line numbers,
 normalize-whitespace: configure after 
https://prismjs.com/plugins/normalize-whitespace/
 
 Prism.plugins.NormalizeWhitespace = new NormalizeWhitespace({
diff --git a/help3xsl/prism.css b/help3xsl/prism.css
index 79d07d18a..461090981 100644
--- a/help3xsl/prism.css
+++ b/help3xsl/prism.css
@@ -1,5 +1,5 @@
-/* PrismJS 1.27.0
-https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+python+visual-basic&plugins=line-numbers+normalize-whitespace
 */
+/* PrismJS 1.28.0
+https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+python+sql+visual-basic&plugins=line-numbers+normalize-whitespace
 */
 /**
  * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML
  * Based on https://github.com/tshedor/workshop-wp-theme (Example: 
http://workshop.kansan.com/category/sessions/basics or 
http://workshop.timshedor.com/category/sessions/basics);
diff --git a/help3xsl/prism.js b/help3xsl/prism.js
index 4e00aeb04..6ed382590 100644
--- a/help3xsl/prism.js
+++ b/help3xsl/prism.js
@@ -1,5 +1,5 @@
-/* PrismJS 1.27.0
-https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+python+visual-basic&plugins=line-numbers+normalize-whitespace
 */
+/* PrismJS 1.28.0
+https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+python+sql+visual-basic&plugins=line-numbers+normalize-whitespace
 */
 /// 
 
 var _self = (typeof window !== 'undefined')
@@ -1317,7 +1317,10 @@ Prism.languages.markup = {
pattern: /^=/,
alias: 'attr-equals'
},
-   /"|'/
+   {
+   pattern: 
/^(\s*)["']|["']$/,
+   lookbehind: true
+   }
]
}
},
@@ -1455,7 +1458,7 @@ Prism.languages.rss = Prism.languages.xml;
Prism.languages.css = {
'comment': /\/\*[\s\S]*?\*\//,
'atrule': {
-   pattern: 
/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,
+   pattern: RegExp('@[\\w-](?:' + 
/[^;{\s"']|\s+(?!\s)/.source + '|' + string.source + ')*?' + 
/(?:;|(?=\s*\{))/.source),
inside: {
'rule': /^@[\w-]+/,
'selector-function-argument': {
@@ -1784,6 +1787,39 @@ 
Prism.languages.python['string-interpolation'].inside['interpolation'].inside.re
 
 Prism.languages.py = Prism.languages.python;
 
+Prism.languages.sql = {
+   'comment': {
+   pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
+   lookbehind: true
+   },
+   'variable': [
+   {
+   pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
+   greedy: true
+   },
+   /@[\w.$]+/
+   ],
+   'string': {
+   pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
+   greedy: true,
+   lookbehind: true
+   },
+   'identifier': {
+   pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
+   greedy: true,
+   lookbehind: true,
+   inside: {
+   'punctuation': /^`|`$/
+   }
+   },
+   'function': 
/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit b86f167e9d2947077d7950cea735a5673ca53fb2
Author: Olivier Hallot 
AuthorDate: Sat May 14 13:39:59 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Sat May 14 18:39:59 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 789bc6e2c10536e5a876c5c4fb0126dbffe4dcbf
  - Bump Prism.js to 1.28

+ Add SQL coloring syntax

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

diff --git a/helpcontent2 b/helpcontent2
index 5c82eb12e524..789bc6e2c105 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5c82eb12e524d454c02798994d08d50548c9734c
+Subproject commit 789bc6e2c10536e5a876c5c4fb0126dbffe4dcbf


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

2022-05-14 Thread Noel Grandin (via logerrit)
 sfx2/source/bastyp/fltfnc.cxx |   72 --
 1 file changed, 42 insertions(+), 30 deletions(-)

New commits:
commit 2a274f47ee5759b17ab22497dbe64ef6135d4cd6
Author: Noel Grandin 
AuthorDate: Fri May 13 16:04:10 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 18:40:33 2022 +0200

optimise SfxFilterMatcher::GetFilterForProps a little

- avoid repeated construction of SequenceAsHashMap
- avoid construction of OUString

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

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 06d3afbd043f..e1dadb2a1fb9 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -559,45 +559,55 @@ ErrCode SfxFilterMatcher::DetectFilter( SfxMedium& 
rMedium, std::shared_ptr SfxFilterMatcher::GetFilterForProps( const 
css::uno::Sequence < beans::NamedValue >& aSeq, SfxFilterFlags nMust, 
SfxFilterFlags nDont ) const
 {
 uno::Reference< lang::XMultiServiceFactory > xServiceManager = 
::comphelper::getProcessServiceFactory();
-uno::Reference< container::XContainerQuery > xTypeCFG;
-if( xServiceManager.is() )
-xTypeCFG.set( xServiceManager->createInstance( 
"com.sun.star.document.TypeDetection" ), uno::UNO_QUERY );
-if ( xTypeCFG.is() )
+if( !xServiceManager )
+return nullptr;
+
+static constexpr OUStringLiteral sTypeDetection = 
u"com.sun.star.document.TypeDetection";
+uno::Reference< container::XContainerQuery > xTypeCFG( 
xServiceManager->createInstance( sTypeDetection ), uno::UNO_QUERY );
+if ( !xTypeCFG )
+return nullptr;
+
+// make query for all types matching the properties
+uno::Reference < css::container::XEnumeration > xEnum = 
xTypeCFG->createSubSetEnumerationByProperties( aSeq );
+::comphelper::SequenceAsHashMap aProps;
+while ( xEnum->hasMoreElements() )
 {
-// make query for all types matching the properties
-uno::Reference < css::container::XEnumeration > xEnum = 
xTypeCFG->createSubSetEnumerationByProperties( aSeq );
-while ( xEnum->hasMoreElements() )
+aProps << xEnum->nextElement();
+
+OUString aValue;
+static constexpr OUStringLiteral sPreferredFilter = u"PreferredFilter";
+// try to get the preferred filter (works without loading all filters!)
+auto it = aProps.find(sPreferredFilter);
+if ( it != aProps.end() && (it->second >>= aValue) && 
!aValue.isEmpty() )
 {
-::comphelper::SequenceAsHashMap aProps( xEnum->nextElement() );
-OUString aValue;
+std::shared_ptr pFilter = 
SfxFilter::GetFilterByName( aValue );
+if ( !pFilter || (pFilter->GetFilterFlags() & nMust) != nMust || 
(pFilter->GetFilterFlags() & nDont ) )
+// check for filter flags
+// pFilter == 0: if preferred filter is a Writer filter, but 
Writer module is not installed
+continue;
 
-// try to get the preferred filter (works without loading all 
filters!)
-if ( (aProps[OUString("PreferredFilter")] >>= aValue) && 
!aValue.isEmpty() )
+if ( !m_rImpl.aName.isEmpty() )
 {
-std::shared_ptr pFilter = 
SfxFilter::GetFilterByName( aValue );
-if ( !pFilter || (pFilter->GetFilterFlags() & nMust) != nMust 
|| (pFilter->GetFilterFlags() & nDont ) )
-// check for filter flags
-// pFilter == 0: if preferred filter is a Writer filter, 
but Writer module is not installed
-continue;
-
-if ( !m_rImpl.aName.isEmpty() )
+// if this is not the global FilterMatcher: check if filter 
matches the document type
+if ( pFilter->GetServiceName() != m_rImpl.aName )
 {
-// if this is not the global FilterMatcher: check if 
filter matches the document type
-if ( pFilter->GetServiceName() != m_rImpl.aName )
-{
-// preferred filter belongs to another document type; 
now we must search the filter
-m_rImpl.InitForIterating();
-aProps[OUString("Name")] >>= aValue;
-pFilter = GetFilter4EA( aValue, nMust, nDont );
-if ( pFilter )
-return pFilter;
-}
+// preferred filter belongs to another document type; now 
we must search the filter
+m_rImpl.InitForIterating();
+static constexpr OUStringLiteral sName = u"Name";
+it = aProps.find(sName);
+if (it != aProps.end())
+it->second >>= aValue;
 e

[Libreoffice-commits] core.git: comphelper/source embeddedobj/source filter/source framework/source include/comphelper package/source sw/source

2022-05-14 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/sequenceashashmap.cxx |   13 +++--
 embeddedobj/source/msole/olemisc.cxx |8 ++---
 filter/source/config/cache/cacheitem.cxx |2 -
 framework/source/services/modulemanager.cxx  |2 -
 include/comphelper/sequenceashashmap.hxx |   39 ++-
 package/source/xstor/owriteablestream.cxx|2 -
 sw/source/filter/ww8/docxsdrexport.cxx   |   24 +---
 7 files changed, 63 insertions(+), 27 deletions(-)

New commits:
commit 22e08a3d8b043ce0ff2424d3fa0a704804afc567
Author: Noel Grandin 
AuthorDate: Fri May 13 15:06:52 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 14 19:14:19 2022 +0200

tdf#121740 cache hashcode in SequenceAsHashMap

shaves 2% off load time

Change-Id: I5bd4eabf61205df21a27d2822acd2676a7732a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134315
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/comphelper/source/misc/sequenceashashmap.cxx 
b/comphelper/source/misc/sequenceashashmap.cxx
index b9662fbddbab..34a6a0c8a580 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -232,7 +232,7 @@ void SequenceAsHashMap::operator>>(css::uno::Sequence< 
css::beans::PropertyValue
 pThis != end()  ;
   ++pThis   )
 {
-pDestination[i].Name  = pThis->first ;
+pDestination[i].Name  = pThis->first.maString;
 pDestination[i].Value = pThis->second;
 ++i;
 }
@@ -249,7 +249,7 @@ void SequenceAsHashMap::operator>>(css::uno::Sequence< 
css::beans::NamedValue >&
 pThis != end()  ;
   ++pThis   )
 {
-pDestination[i].Name  = pThis->first ;
+pDestination[i].Name  = pThis->first.maString;
 pDestination[i].Value = pThis->second;
 ++i;
 }
@@ -283,7 +283,7 @@ bool SequenceAsHashMap::match(const SequenceAsHashMap& 
rCheck) const
 {
 for (auto const& elem : rCheck)
 {
-const OUString& sCheckName  = elem.first;
+const OUString& sCheckName  = elem.first.maString;
 const css::uno::Any&   aCheckValue = elem.second;
 const_iterator pFound  = find(sCheckName);
 
@@ -301,12 +301,9 @@ bool SequenceAsHashMap::match(const SequenceAsHashMap& 
rCheck) const
 void SequenceAsHashMap::update(const SequenceAsHashMap& rUpdate)
 {
 m_aMap.reserve(std::max(size(), rUpdate.size()));
-for (auto const& elem : rUpdate)
+for (auto const& elem : rUpdate.m_aMap)
 {
-const OUString& sName  = elem.first;
-const css::uno::Any&   aValue = elem.second;
-
-(*this)[sName] = aValue;
+m_aMap[elem.first] = elem.second;
 }
 }
 
diff --git a/embeddedobj/source/msole/olemisc.cxx 
b/embeddedobj/source/msole/olemisc.cxx
index 8f9a93a65cb4..e1007fbb13cc 100644
--- a/embeddedobj/source/msole/olemisc.cxx
+++ b/embeddedobj/source/msole/olemisc.cxx
@@ -677,11 +677,9 @@ void OleEmbeddedObject::initialize(const 
uno::Sequence& rArguments)
 return;
 
 comphelper::SequenceAsHashMap aValues(rArguments[0]);
-for (const auto& rValue : aValues)
-{
-if (rValue.first == "StreamReadOnly")
-rValue.second >>= m_bStreamReadOnly;
-}
+auto it = aValues.find("StreamReadOnly");
+if (it != aValues.end())
+it->second >>= m_bStreamReadOnly;
 }
 
 OUString SAL_CALL OleEmbeddedObject::getImplementationName()
diff --git a/filter/source/config/cache/cacheitem.cxx 
b/filter/source/config/cache/cacheitem.cxx
index b7993eba1b2d..e39278c2048b 100644
--- a/filter/source/config/cache/cacheitem.cxx
+++ b/filter/source/config/cache/cacheitem.cxx
@@ -95,7 +95,7 @@ css::uno::Sequence< css::beans::PropertyValue > 
CacheItem::getAsPackedPropertyVa
 pProp != end()  ;
   ++pProp   )
 {
-const OUString& rName  = pProp->first;
+const OUString& rName  = pProp->first.maString;
 const css::uno::Any&   rValue = pProp->second;
 
 if (!rValue.hasValue())
diff --git a/framework/source/services/modulemanager.cxx 
b/framework/source/services/modulemanager.cxx
index ceb8041238be..3e3f9d46949a 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -233,7 +233,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& 
sName ,
 {
 // let "NoSuchElementException" out ! We support the same API ...
 // and without a flush() at the end all changed data before will be 
ignored !
-xModule->replaceByName(prop.first, prop.second);
+xModule->replaceByName(prop.first.maString, prop.second);
 }
 
 ::comphelper::ConfigurationHelper::flush(xCfg);
diff --git a/include/comphelper/sequenceashashmap.hxx 
b/include/comphelper/sequenceashashmap.hxx
index d6bcd77f0d1a..59ab4c298d76 100644
--- a/include/

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

2022-05-14 Thread Caolán McNamara (via logerrit)
 editeng/source/editeng/impedit.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit dba12ec9cf049812dfadade3ed6a84127a9dca6c
Author: Caolán McNamara 
AuthorDate: Sat May 14 16:27:46 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 14 19:17:03 2022 +0200

tdf#149079 don't skip disposing DnDListener

even if there is no longer a DropTarget don't return early and
omit to inform listeners of the disposing

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

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index d43e3053489f..b2ce6d198752 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -2693,18 +2693,18 @@ void ImpEditView::RemoveDragAndDropListeners()
 else if (auto xWindow = GetWindow())
 xDropTarget = xWindow->GetDropTarget();
 
-if (!xDropTarget.is())
-return;
-
-css::uno::Reference 
xDragGestureRecognizer(xDropTarget, uno::UNO_QUERY);
-if (xDragGestureRecognizer.is())
+if (xDropTarget.is())
 {
-uno::Reference 
xDGL(mxDnDListener, uno::UNO_QUERY);
-xDragGestureRecognizer->removeDragGestureListener(xDGL);
-}
+css::uno::Reference 
xDragGestureRecognizer(xDropTarget, uno::UNO_QUERY);
+if (xDragGestureRecognizer.is())
+{
+uno::Reference 
xDGL(mxDnDListener, uno::UNO_QUERY);
+xDragGestureRecognizer->removeDragGestureListener(xDGL);
+}
 
-uno::Reference xDTL(mxDnDListener, 
uno::UNO_QUERY);
-xDropTarget->removeDropTargetListener(xDTL);
+uno::Reference 
xDTL(mxDnDListener, uno::UNO_QUERY);
+xDropTarget->removeDropTargetListener(xDTL);
+}
 
 if ( mxDnDListener.is() )
 {


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

2022-05-14 Thread Julien Nabet (via logerrit)
 filter/source/pdf/impdialog.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 4d3a9d4ffec4bf9765f965d92c163c94201a3c9a
Author: Julien Nabet 
AuthorDate: Sat May 14 13:28:06 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 19:48:32 2022 +0200

tdf#149072: fix export PDF with PDF/UA in GUI after Index language was set

Regression of a1f9fea520f5b3f5d54a284886aa531693f32e7a
Make accessibility check dialog async

First add of m_xDialog->response(RET_OK) fixes the bug
the second one is just here to have same behaviour as before the quoted 
patch

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

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index d35396b40e14..bd8db83692a0 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -329,6 +329,14 @@ IMPL_LINK_NOARG(ImpPDFTabDialog, OkHdl, weld::Button&, 
void)
 m_xDialog->response(retValue);
 });
 }
+else
+{
+m_xDialog->response(RET_OK);
+}
+}
+else
+{
+m_xDialog->response(RET_OK);
 }
 }
 else


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

2022-05-14 Thread Julien Nabet (via logerrit)
 sw/source/core/access/AccessibilityCheck.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 86050db1b0c15651335d1b0bf89ee8f6409dee1d
Author: Julien Nabet 
AuthorDate: Sat May 14 13:53:23 2022 +0200
Commit: Julien Nabet 
CommitDate: Sat May 14 19:49:48 2022 +0200

Related tdf#149072: avoid warning "misuse of method"

complete warning log:
 - misuse of method

part of bt when opening attachment of tdf#149072
0  SwTextFormatColl::GetAssignedOutlineStyleLevel() const (this=0x77064d0) 
at sw/source/core/doc/fmtcol.cxx:608
1  0x7f8a52aa7941 in sw::(anonymous 
namespace)::HeaderCheck::check(SwNode*) (this=0xa457630, pCurrent=0x7705e98) at 
sw/source/core/access/AccessibilityCheck.cxx:622
2  0x7f8a52a9a6a3 in sw::AccessibilityCheck::check() 
(this=0x7ffe4a14ab10) at sw/source/core/access/AccessibilityCheck.cxx:947
3  0x7f8a53ed2ad7 in SwDocShell::runAccessibilityCheck() 
(this=0x74ef0e0) at sw/source/uibase/app/docst.cxx:1559
4  0x7f8a16e7fdec in ImpPDFTabDialog::OkHdl(weld::Button&) 
(this=0xa0e9990) at filter/source/pdf/impdialog.cxx:324
5  0x7f8a16e7fb2d in ImpPDFTabDialog::LinkStubOkHdl(void*, 
weld::Button&) (instance=0xa0e9990, data=...) at 
filter/source/pdf/impdialog.cxx:317

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

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 626e3e0463f1..1d4c0f57897d 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -619,10 +619,11 @@ public:
 
 SwTextNode* pTextNode = pCurrent->GetTextNode();
 SwTextFormatColl* pCollection = pTextNode->GetTextColl();
-int nLevel = pCollection->GetAssignedOutlineStyleLevel();
-if (nLevel < 0)
+if (!pCollection->IsAssignedToListLevelOfOutlineStyle())
 return;
 
+int nLevel = pCollection->GetAssignedOutlineStyleLevel();
+assert(nLevel >= 0);
 if (nLevel > m_nPreviousLevel && std::abs(nLevel - m_nPreviousLevel) > 
1)
 {
 lclAddIssue(m_rIssueCollection, 
SwResId(STR_HEADINGS_NOT_IN_ORDER));


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

2022-05-14 Thread dldld (via logerrit)
 vcl/headless/CairoCommon.cxx|   11 +--
 vcl/headless/SvpGraphicsBackend.cxx |   28 
 2 files changed, 17 insertions(+), 22 deletions(-)

New commits:
commit 20f0ab23b1c0b60ca36a053464f3ba41bf27c80e
Author: dldld 
AuthorDate: Sat May 14 17:54:35 2022 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 14 20:00:56 2022 +0200

tdf#133716: Fix edge gradient when upscaling image

When an image is getting upscaled with cario as engine it got blured 
borders.
The issue that was worked on showed, in the PresenterConsole, that the
borders of the previews and control area had an unnecessary gradient in it.
As these borders are build from images which are getting upscaled,
either in width or height a graident ocurred. This was because the cairo
rending didn't had the correct pattern extention set: CAIRO_EXTEND_PAD.

Nearly same issue also occured when adding an image to a presentation
and upscaling it, the borders got blured. For images with either height or
width equal to one this was a while back fixed: tdf#114117, but not for the
general case. Using another extend mode fixes this, because the PAD
extend mode doesn't blur the borders.

CAIRO_EXTEND_PAD:
pixels outside of the pattern copy the closest pixel from the source

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

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 73a6b72f802e..9897334d4532 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -876,12 +876,11 @@ basegfx::B2DRange renderWithOperator(cairo_t* cr, const 
SalTwoRect& rTR, cairo_s
 
 cairo_save(cr);
 cairo_set_source_surface(cr, source, -rTR.mnSrcX, -rTR.mnSrcY);
-if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && 
rTR.mnSrcHeight == 1))
-{
-cairo_pattern_t* sourcepattern = cairo_get_source(cr);
-cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
-cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
-}
+
+//tdf#133716 borders of upscaled images should not be blured
+cairo_pattern_t* sourcepattern = cairo_get_source(cr);
+cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_PAD);
+
 cairo_set_operator(cr, eOperator);
 cairo_paint(cr);
 cairo_restore(cr);
diff --git a/vcl/headless/SvpGraphicsBackend.cxx 
b/vcl/headless/SvpGraphicsBackend.cxx
index 14a9a017ed94..0566f444013d 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -488,12 +488,11 @@ void SvpGraphicsBackend::drawMask(const SalTwoRect& rTR, 
const SalBitmap& rSalBi
 double fYScale = static_cast(rTR.mnDestHeight) / rTR.mnSrcHeight;
 cairo_scale(cr, fXScale, fYScale);
 cairo_set_source_surface(cr, aSurface.getSurface(), -rTR.mnSrcX, 
-rTR.mnSrcY);
-if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && 
rTR.mnSrcHeight == 1))
-{
-cairo_pattern_t* sourcepattern = cairo_get_source(cr);
-cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
-cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
-}
+
+//tdf#133716 borders of upscaled images should not be blured
+cairo_pattern_t* sourcepattern = cairo_get_source(cr);
+cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_PAD);
+
 cairo_paint(cr);
 
 m_rCairoCommon.releaseCairoContext(cr, false, extents);
@@ -674,16 +673,13 @@ bool SvpGraphicsBackend::drawAlphaBitmap(const 
SalTwoRect& rTR, const SalBitmap&
 cairo_scale(cr, fXScale, fYScale);
 cairo_set_source_surface(cr, source, -rTR.mnSrcX, -rTR.mnSrcY);
 
-//tdf#114117 when stretching a single pixel width/height source to fit an 
area
-//set extend and filter to stretch it with simplest expected interpolation
-if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && 
rTR.mnSrcHeight == 1))
-{
-cairo_pattern_t* sourcepattern = cairo_get_source(cr);
-cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
-cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
-cairo_pattern_set_extend(maskpattern, CAIRO_EXTEND_REPEAT);
-cairo_pattern_set_filter(maskpattern, CAIRO_FILTER_NEAREST);
-}
+cairo_pattern_t* sourcepattern = cairo_get_source(cr);
+
+//tdf#133716 borders of upscaled images should not be blured
+//tdf#114117 when stretching a single or multi pixel width/height source 
to fit an area
+//the image will be extended into that size.
+cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_PAD);
+cairo_pattern_set_extend(maskpattern, CAIRO_EXTEND_PAD);
 
 //this block is just "cairo_mask_surface", but we have to make it explicit
 //because of the cairo_pattern_set_filter etc we may want app

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

2022-05-14 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/gdi/cairotextrender.cxx |   18 ++
 vcl/workben/svmfuzzer.cxx   |5 -
 2 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 163e4686914ecf04f1cbef2f6a087cadbfe59f81
Author: Caolán McNamara 
AuthorDate: Sat May 14 19:40:50 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 14 22:55:47 2022 +0200

ofz#47323 suppress Direct-leak

__lsan_default_suppressions works in a local oss-fuzz image but seems
to have no effect when deployed which fits with the report of
https://github.com/google/oss-fuzz/issues/6066

try explicit __lsan_disable/__lsan_enable guards which also works
locally

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

diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx 
b/vcl/unx/generic/gdi/cairotextrender.cxx
index 31c2a73c2eb4..0be33e9436c9 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -117,6 +117,14 @@ namespace
 }
 }
 
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+extern "C"
+{
+__attribute__((weak)) void __lsan_disable();
+__attribute__((weak)) void __lsan_enable();
+}
+#endif
+
 void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const 
SalGraphics& rGraphics)
 {
 const FreetypeFontInstance& rInstance = 
static_cast(rLayout.GetFont());
@@ -178,6 +186,11 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 return;
 }
 
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+if (__lsan_disable)
+__lsan_disable();
+#endif
+
 if (const cairo_font_options_t* pFontOptions = 
GetSalInstance()->GetCairoFontOptions())
 {
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
@@ -305,6 +318,11 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 }
 
 releaseCairoContext(cr);
+
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+if (__lsan_enable)
+__lsan_enable();
+#endif
 }
 
 void FontConfigFontOptions::cairo_font_options_substitute(FcPattern* pPattern)
diff --git a/vcl/workben/svmfuzzer.cxx b/vcl/workben/svmfuzzer.cxx
index f0c129e76cd4..53757e3199c7 100644
--- a/vcl/workben/svmfuzzer.cxx
+++ b/vcl/workben/svmfuzzer.cxx
@@ -73,11 +73,6 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
 return 0;
 }
 
-extern "C" const char* __lsan_default_suppressions()
-{
-return "leak:CairoTextRender::DrawTextLayout\n";
-}
-
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
 {
 SvMemoryStream aStream(const_cast(data), size, StreamMode::READ);


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

2022-05-14 Thread Noel Grandin (via logerrit)
 unotools/source/config/lingucfg.cxx |   46 
 1 file changed, 21 insertions(+), 25 deletions(-)

New commits:
commit 7e2d26ef0ed47bf01d7396aa7c749062f9bdde98
Author: Noel Grandin 
AuthorDate: Mon May 9 18:18:47 2022 +0200
Commit: Noel Grandin 
CommitDate: Sun May 15 08:20:49 2022 +0200

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

and fix SvtLinguConfigItem::GetOptions so that it only
accesses state while holding the lock.

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

diff --git a/unotools/source/config/lingucfg.cxx 
b/unotools/source/config/lingucfg.cxx
index 882a3ead73e1..a38fb51b61b7 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -38,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "itemholder1.hxx"
 
@@ -47,9 +47,9 @@ constexpr OUStringLiteral FILE_PROTOCOL = u"file:///";
 
 namespace
 {
-osl::Mutex& theSvtLinguConfigItemMutex()
+std::mutex& theSvtLinguConfigItemMutex()
 {
-static osl::Mutex SINGLETON;
+static std::mutex SINGLETON;
 return SINGLETON;
 }
 }
@@ -183,7 +183,7 @@ public:
 boolSetProperty( sal_Int32 nPropertyHandle,
  const css::uno::Any &rValue );
 
-const SvtLinguOptions& GetOptions() const;
+void GetOptions( SvtLinguOptions& ) const;
 
 boolIsReadOnly( std::u16string_view rPropertyName ) const;
 boolIsReadOnly( sal_Int32 nPropertyHandle ) const;
@@ -202,7 +202,10 @@ SvtLinguConfigItem::SvtLinguConfigItem() :
 
 void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > 
&rPropertyNames )
 {
-LoadOptions( rPropertyNames );
+{
+std::unique_lock aGuard(theSvtLinguConfigItemMutex());
+LoadOptions( rPropertyNames );
+}
 NotifyListeners(ConfigurationHints::NONE);
 }
 
@@ -322,15 +325,13 @@ bool SvtLinguConfigItem::GetHdlByName(
 
 uno::Any SvtLinguConfigItem::GetProperty( std::u16string_view rPropertyName ) 
const
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
-
 sal_Int32 nHdl;
 return GetHdlByName( nHdl, rPropertyName ) ? GetProperty( nHdl ) : 
uno::Any();
 }
 
 uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
+std::unique_lock aGuard(theSvtLinguConfigItemMutex());
 
 uno::Any aRes;
 
@@ -412,8 +413,6 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 
nPropertyHandle ) const
 
 bool SvtLinguConfigItem::SetProperty( std::u16string_view rPropertyName, const 
uno::Any &rValue )
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
-
 bool bSucc = false;
 sal_Int32 nHdl;
 if (GetHdlByName( nHdl, rPropertyName ))
@@ -423,7 +422,7 @@ bool SvtLinguConfigItem::SetProperty( std::u16string_view 
rPropertyName, const u
 
 bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const 
uno::Any &rValue )
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
+std::unique_lock aGuard(theSvtLinguConfigItemMutex());
 
 bool bSucc = false;
 if (!rValue.hasValue())
@@ -560,16 +559,14 @@ bool SvtLinguConfigItem::SetProperty( sal_Int32 
nPropertyHandle, const uno::Any
 return bSucc;
 }
 
-const SvtLinguOptions& SvtLinguConfigItem::GetOptions() const
+void SvtLinguConfigItem::GetOptions(SvtLinguOptions &rOptions) const
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
-return aOpt;
+std::unique_lock aGuard(theSvtLinguConfigItemMutex());
+rOptions = aOpt;
 }
 
 void SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > 
&rProperyNames )
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
-
 bool bRes = false;
 
 const OUString *pProperyNames = rProperyNames.getConstArray();
@@ -687,7 +684,7 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< 
OUString > &rProperyN
 if (!IsModified())
 return true;
 
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
+std::unique_lock aGuard(theSvtLinguConfigItemMutex());
 
 bool bRet = false;
 
@@ -749,8 +746,6 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< 
OUString > &rProperyN
 
 bool SvtLinguConfigItem::IsReadOnly( std::u16string_view rPropertyName ) const
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
-
 bool bReadOnly = false;
 sal_Int32 nHdl;
 if (GetHdlByName( nHdl, rPropertyName ))
@@ -760,7 +755,7 @@ bool SvtLinguConfigItem::IsReadOnly( std::u16string_view 
rPropertyName ) const
 
 bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const
 {
-osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
+std::unique_lock aGuard(theSvtLinguConfigItemMutex());
 
 bool bRead