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

2022-05-09 Thread Noel Grandin (via logerrit)
 ucb/source/ucp/hierarchy/hierarchydata.cxx |   17 +
 ucb/source/ucp/hierarchy/hierarchydata.hxx |4 ++--
 2 files changed, 7 insertions(+), 14 deletions(-)

New commits:
commit 63a2f314250b05d484747fafc4a814a4553f461e
Author: Noel Grandin 
AuthorDate: Mon May 9 17:55:50 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue May 10 08:13:40 2022 +0200

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

Several methods actually do not need locking because they are
calling other methods which are already locked, and thereafter
they touch only function-local state.

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

diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx 
b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index bbdde5c2d1ff..3e802a4fd53d 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -123,7 +123,6 @@ HierarchyEntry::HierarchyEntry(
 
 bool HierarchyEntry::hasData()
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
 uno::Reference< container::XHierarchicalNameAccess > xRootReadAccess
 = getRootReadAccess();
 
@@ -140,8 +139,6 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
 {
 try
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
-
 uno::Reference< container::XHierarchicalNameAccess > xRootReadAccess
 = getRootReadAccess();
 
@@ -242,7 +239,7 @@ bool HierarchyEntry::setData( const HierarchyEntryData& 
rData )
 {
 try
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( !m_xConfigProvider.is() )
 m_xConfigProvider.set(
@@ -454,10 +451,10 @@ bool HierarchyEntry::setData( const HierarchyEntryData& 
rData )
 bool HierarchyEntry::move(
 const OUString& rNewURL, const HierarchyEntryData& rData )
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
-
 OUString aNewPath = createPathFromHierarchyURL( HierarchyUri(rNewURL) );
 
+std::unique_lock aGuard( m_aMutex );
+
 if ( aNewPath == m_aPath )
 return true;
 
@@ -736,7 +733,7 @@ bool HierarchyEntry::remove()
 {
 try
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( !m_xConfigProvider.is() )
 m_xConfigProvider.set(
@@ -844,8 +841,6 @@ bool HierarchyEntry::remove()
 
 bool HierarchyEntry::first( iterator & it )
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
-
 if ( it.pos == -1 )
 {
 // Init...
@@ -912,8 +907,6 @@ bool HierarchyEntry::first( iterator & it )
 
 bool HierarchyEntry::next( iterator& it )
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
-
 if ( it.pos == -1 )
 return first( it );
 
@@ -972,7 +965,7 @@ HierarchyEntry::getRootReadAccess()
 {
 if ( !m_xRootReadAccess.is() )
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 if ( !m_xRootReadAccess.is() )
 {
 if ( m_bTriedToGetRootReadAccess )
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx 
b/ucb/source/ucp/hierarchy/hierarchydata.hxx
index 34e24cdb6c35..e81364243d31 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.hxx
@@ -20,9 +20,9 @@
 #pragma once
 
 #include 
-#include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star {
 namespace container {
@@ -77,7 +77,7 @@ class HierarchyEntry
 OUString m_aServiceSpecifier;
 OUString m_aName;
 OUString m_aPath;
-::osl::Mutexm_aMutex;
+std::mutex m_aMutex;
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
 css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider;
 css::uno::Reference< css::container::XHierarchicalNameAccess >


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

2022-05-09 Thread Miklos Vajna (via logerrit)
 sw/source/core/inc/unofield.hxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3ce14653edd9a7f845f81d9e727b5031a3349291
Author: Miklos Vajna 
AuthorDate: Mon May 9 20:08:13 2022 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 10 08:06:49 2022 +0200

sw: document SwXTextField

I.e. the UNO class wraps SwFormatField, and that wraps SwField.

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

diff --git a/sw/source/core/inc/unofield.hxx b/sw/source/core/inc/unofield.hxx
index 67960cb74cac..b6b281cec582 100644
--- a/sw/source/core/inc/unofield.hxx
+++ b/sw/source/core/inc/unofield.hxx
@@ -120,6 +120,10 @@ typedef ::cppu::WeakImplHelper
 ,   css::util::XUpdatable
 > SwXTextField_Base;
 
+/**
+ * UNO wrapper around an SwFormatField, i.e. a Writer field that the user 
creates via Insert ->
+ * Field.
+ */
 class SwXTextField final
 : public SwXTextField_Base
 {


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit bedd7279bccc490fd330c94420d6cf108202d5c6
Author: Andrea Gelmini 
AuthorDate: Tue May 10 07:06:40 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Tue May 10 07:06:40 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to faf6e6882194bbd7e1dddbe7559bce0d041297b0
  - Fix typo

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

diff --git a/helpcontent2 b/helpcontent2
index 084d84f09882..faf6e6882194 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 084d84f09882ec35007ad4566247932a30899799
+Subproject commit faf6e6882194bbd7e1dddbe7559bce0d041297b0


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

2022-05-09 Thread Andrea Gelmini (via logerrit)
 source/text/sbasic/shared/03090402.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit faf6e6882194bbd7e1dddbe7559bce0d041297b0
Author: Andrea Gelmini 
AuthorDate: Tue May 10 00:00:35 2022 +0200
Commit: Julien Nabet 
CommitDate: Tue May 10 07:06:36 2022 +0200

Fix typo

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

diff --git a/source/text/sbasic/shared/03090402.xhp 
b/source/text/sbasic/shared/03090402.xhp
index 12b5d7f62..18d47e98c 100644
--- a/source/text/sbasic/shared/03090402.xhp
+++ b/source/text/sbasic/shared/03090402.xhp
@@ -43,7 +43,7 @@
   Choose (Index 
As Integer, Expression1[, Expression2, ... [, Expression_n]]) As 
Variant
 
 
-Variant. A value 
infered from the Index parameter.
+Variant. A value 
inferred from the Index parameter.
 
 
  
Index: Any numeric expression rounded to a whole number. 
Index accepts integer values starting at 1 that specify 
which of the possible choices to return.
@@ -78,4 +78,4 @@
 
 
 
-
\ No newline at end of file
+


[Libreoffice-commits] core.git: basic/source vbahelper/source

2022-05-09 Thread Mike Kaganski (via logerrit)
 basic/source/runtime/methods1.cxx |3 +--
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit bc1ab88ffa21ab67dbd56b5d3c724fe28c2b5a5b
Author: Mike Kaganski 
AuthorDate: Mon May 9 18:32:54 2022 +0100
Commit: Mike Kaganski 
CommitDate: Tue May 10 06:58:24 2022 +0200

More usual 1899-12-30 base Date in Basic

Omissions from commit 8189d815641c583b5506d482f0b4f1ab47924f6a

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

diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index 6ce744dbe034..f0c26ae5a9de 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -3033,9 +3033,8 @@ bool LibreOffice6FloatingPointMode()
 
 sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 
nFirstDay )
 {
-Date aRefDate( 1,1,1900 );
+Date aRefDate(1899'12'30);
 sal_Int32 nDays = static_cast(aDate);
-nDays -= 2; // normalize: 1.1.1900 => 0
 aRefDate.AddDays( nDays);
 DayOfWeek aDay = aRefDate.GetDayOfWeek();
 sal_Int16 nDay;
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx 
b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index f5624d40bc9f..fe00e0c89739 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -75,9 +75,8 @@ public:
 static double GetNow()
 {
 DateTime aNow( DateTime::SYSTEM );
-Date aRefDate( 1,1,1900 );
+Date aRefDate(1899'12'30);
 tools::Long nDiffDays = aNow - aRefDate;
-nDiffDays += 2; // Change VisualBasic: 1.Jan.1900 == 2
 
 tools::Long nDiffSeconds = aNow.GetHour() * 3600 + aNow.GetMin() * 60 
+ aNow.GetSec();
 return static_cast(nDiffDays) + 
static_cast(nDiffSeconds)/double(24*3600);


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

2022-05-09 Thread Andrea Gelmini (via logerrit)
 android/source/src/java/org/libreoffice/ui/PageView.java |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e5fb120a32d04e241b35a7e63894c744196f576b
Author: Andrea Gelmini 
AuthorDate: Mon May 9 12:15:41 2022 +0200
Commit: Andrea Gelmini 
CommitDate: Mon May 9 23:45:49 2022 +0200

Fix typo in code

Change-Id: I6fae9a4df450f80ee2af59e271a8cb1dd8bc918f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134047
Reviewed-by: Julien Nabet 
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/android/source/src/java/org/libreoffice/ui/PageView.java 
b/android/source/src/java/org/libreoffice/ui/PageView.java
index 11b365f2bbcc..4c3f69562250 100644
--- a/android/source/src/java/org/libreoffice/ui/PageView.java
+++ b/android/source/src/java/org/libreoffice/ui/PageView.java
@@ -22,21 +22,21 @@ public class PageView extends View{
 public PageView(Context context ) {
 super(context);
 bmp = BitmapFactory.decodeResource(getResources(), 
R.drawable.dummy_page);
-intialise();
+initialise();
 }
 public PageView(Context context, AttributeSet attrs) {
 super(context, attrs);
 bmp = BitmapFactory.decodeResource(getResources(), 
R.drawable.dummy_page);
 Log.d(LOGTAG, bmp.toString());
-intialise();
+initialise();
 }
 public PageView(Context context, AttributeSet attrs, int defStyle) {
 super(context, attrs, defStyle);
 bmp = BitmapFactory.decodeResource(getResources(), 
R.drawable.dummy_page);//load a "page"
-intialise();
+initialise();
 }
 
-private void intialise(){
+private void initialise(){
 mPaintBlack = new Paint();
 mPaintBlack.setARGB(255, 0, 0, 0);
 Log.d(LOGTAG, " Doing some set-up");


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

2022-05-09 Thread Stephan Bergmann (via logerrit)
 configure.ac |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 7a4aa62a1ed171a5edd73090de8a7db381ea76e0
Author: Stephan Bergmann 
AuthorDate: Mon May 9 17:08:53 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 22:45:12 2022 +0200

That AC_SUBST is already done by libo_CHECK_SYSTEM_MODULE

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

diff --git a/configure.ac b/configure.ac
index 3d66af5cdc8f..6bd06894085f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11368,7 +11368,6 @@ else
 fi
 AC_SUBST(SYSTEM_LIBNUMBERTEXT)
 AC_SUBST(SYSTEM_LIBNUMBERTEXT_DATA)
-AC_SUBST(LIBNUMBERTEXT_CFLAGS)
 
 dnl ***
 dnl testing libc version for Linux...


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

2022-05-09 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/graphicfilter.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 52dfeeb636d2502ec639346736c420b636f1140f
Author: Caolán McNamara 
AuthorDate: Mon May 9 18:21:54 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 9 22:30:46 2022 +0200

crashtesting: use of negative return indication failure as length

a problem since...

commit e9c50fbbc3b07ef927d133da9cf2395c55611e0f
Date:   Sat Apr 2 15:49:32 2022 +0300

tdf#103954: Z compressed graphic formats support for EMF/WMF

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

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 9651861655b6..44534025337a 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1175,10 +1175,14 @@ ErrCode GraphicFilter::readWMF_EMF(SvStream & rStream, 
Graphic & rGraphic, GfxLi
 {
 ZCodec aCodec;
 aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true);
-nStreamLength = aCodec.Decompress(rStream, aMemStream);
+auto nDecompressLength = aCodec.Decompress(rStream, aMemStream);
 aCodec.EndCompression();
 aMemStream.Seek(STREAM_SEEK_TO_BEGIN);
-aNewStream = &aMemStream;
+if (nDecompressLength >= 0)
+{
+nStreamLength = nDecompressLength;
+aNewStream = &aMemStream;
+}
 }
 VectorGraphicDataArray aNewData(nStreamLength);
 aNewStream->ReadBytes(aNewData.getArray(), nStreamLength);


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

2022-05-09 Thread Caolán McNamara (via logerrit)
 vcl/headless/CairoCommon.cxx |   14 +++---
 vcl/source/window/cursor.cxx |8 +++-
 2 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 6dc41e33e087032a52ee11832ff1299632b4f5dd
Author: Caolán McNamara 
AuthorDate: Mon May 9 17:34:46 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 9 22:30:22 2022 +0200

Related: tdf#148433 experiment with SAL_DISABLE_CURSOR_INDICATOR

to turn off the arrow indicators in BiDi cursor

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

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 2e2dcaecec6f..73a6b72f802e 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -960,16 +960,8 @@ cairo_pattern_t* create_stipple()
 }
 } // end anonymous ns
 
-namespace
-{
-// check for env var that deciding to disable CAIRO_OPERATOR_DIFFERENCE
-const char* pDisableDifference(getenv("SAL_DISABLE_CAIRO_DIFFERENCE"));
-bool bDisableDifference(nullptr != pDisableDifference);
-}
-
 #if defined CAIRO_VERSION && CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
 #define CAIRO_OPERATOR_DIFFERENCE (static_cast(23))
-#define CAIRO_OPERATOR_EXCLUSION (static_cast(24))
 #endif
 
 void CairoCommon::invert(const basegfx::B2DPolygon& rPoly, SalInvert nFlags, 
bool bAntiAlias)
@@ -984,13 +976,13 @@ void CairoCommon::invert(const basegfx::B2DPolygon& 
rPoly, SalInvert nFlags, boo
 
 cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
 
-if (bDisableDifference)
+if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 10, 0))
 {
-cairo_set_operator(cr, CAIRO_OPERATOR_EXCLUSION);
+cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
 }
 else
 {
-cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
+SAL_WARN("vcl.gdi", "SvpSalGraphics::invert, archaic cairo");
 }
 
 if (nFlags & SalInvert::TrackFrame)
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 6a186da9432c..406491ed1d65 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -43,6 +43,12 @@ struct ImplCursorData
 VclPtr mpWindow;   // assigned window
 };
 
+namespace
+{
+const char* pDisableCursorIndicator(getenv("SAL_DISABLE_CURSOR_INDICATOR"));
+bool bDisableCursorIndicator(nullptr != pDisableCursorIndicator);
+}
+
 static tools::Rectangle ImplCursorInvert(vcl::RenderContext* pRenderContext, 
ImplCursorData const * pData)
 {
 tools::Rectangle aPaintRect;
@@ -65,7 +71,7 @@ static tools::Rectangle ImplCursorInvert(vcl::RenderContext* 
pRenderContext, Imp
 aPoly[2].AdjustX(1 );
 
 // apply direction flag after slant to use the correct shape
-if ( pData->mnDirection != CursorDirection::NONE)
+if (!bDisableCursorIndicator && pData->mnDirection != 
CursorDirection::NONE)
 {
 Point pAry[7];
 // Related system settings for "delta" could be:


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

2022-05-09 Thread Mike Kaganski (via logerrit)
 basic/source/runtime/methods.cxx |   19 ++-
 1 file changed, 6 insertions(+), 13 deletions(-)

New commits:
commit ced3501a93fd44621d7d5e0479df72657a0f085d
Author: Mike Kaganski 
AuthorDate: Mon May 9 16:31:32 2022 +0100
Commit: Mike Kaganski 
CommitDate: Mon May 9 21:42:29 2022 +0200

Unify and simplify SbRtl_Hex and SbRtl_Oct

OUStringNumber::toAsciiUpperCase is cheaper than OUString::toAsciiUpperCase.

Let SbRtl_Oct use OUString::number as well.

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

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 2ebae2751157..4393041b7808 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -783,9 +783,7 @@ void SbRtl_Hex(StarBASIC *, SbxArray & rPar, bool)
 sal_uInt32 nVal = pArg->IsInteger() ?
 static_cast(pArg->GetInteger()) :
 static_cast(pArg->GetLong());
-OUString aStr(OUString::number( nVal, 16 ));
-aStr = aStr.toAsciiUpperCase();
-rPar.Get(0)->PutString(aStr);
+rPar.Get(0)->PutString(OUString::number(nVal, 16).toAsciiUpperCase());
 }
 }
 
@@ -1202,17 +1200,12 @@ void SbRtl_Oct(StarBASIC *, SbxArray & rPar, bool)
 }
 else
 {
-char aBuffer[16];
 SbxVariableRef pArg = rPar.Get(1);
-if ( pArg->IsInteger() )
-{
-snprintf( aBuffer, sizeof(aBuffer), "%o", pArg->GetInteger() );
-}
-else
-{
-snprintf( aBuffer, sizeof(aBuffer), "%lo", static_cast(pArg->GetLong()) );
-}
-rPar.Get(0)->PutString(OUString::createFromAscii(aBuffer));
+// converting value to unsigned and limit to 2 or 4 byte representation
+sal_uInt32 nVal = pArg->IsInteger() ?
+static_cast(pArg->GetInteger()) :
+static_cast(pArg->GetLong());
+rPar.Get(0)->PutString(OUString::number(nVal, 8));
 }
 }
 


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

2022-05-09 Thread Luboš Luňák (via logerrit)
 sc/inc/document.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cbbdcfd49db545f4f3e4041453706f33065267b7
Author: Luboš Luňák 
AuthorDate: Mon May 9 11:10:43 2022 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 9 21:12:14 2022 +0200

make ScDocument::FetchTable() public

I don't see why it should be private, it's range checked,
so there should be no harm. Especially when a number of classes get
declared as friends to get access to it anyway.

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 8e79d31e5ff3..2518acd63773 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2657,9 +2657,6 @@ private:
 ScDocument& mrDoc;
 };
 
-ScTable* FetchTable( SCTAB nTab );
-const ScTable* FetchTable( SCTAB nTab ) const;
-
 voidMergeNumberFormatter(const ScDocument& rSrcDoc);
 
 voidImplCreateOptions(); // Suggestion: switch to on-demand?
@@ -2684,6 +2681,9 @@ private:
 boolHasPartOfMerged( const ScRange& rRange );
 
 public:
+ScTable* FetchTable( SCTAB nTab );
+const ScTable* FetchTable( SCTAB nTab ) const;
+
 ScRefCellValue GetRefCellValue( const ScAddress& rPos );
 private:
 ScRefCellValue GetRefCellValue( const ScAddress& rPos, 
sc::ColumnBlockPosition& rBlockPos );


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

2022-05-09 Thread Bartosz Kosiorek (via logerrit)
 drawinglayer/source/tools/emfphelperdata.cxx  |  144 ++
 drawinglayer/source/tools/emfphelperdata.hxx  |4 
 drawinglayer/source/tools/emfppen.cxx |   17 -
 drawinglayer/source/tools/emfppen.hxx |1 
 drawinglayer/source/tools/primitive2dxmldump.cxx  |   44 
 emfio/qa/cppunit/emf/EmfImportTest.cxx|  116 +--
 emfio/qa/cppunit/emf/data/TestDrawLine.emf|binary
 emfio/qa/cppunit/emf/data/TestEmfPlusDrawLineWithCaps.emf |binary
 8 files changed, 260 insertions(+), 66 deletions(-)

New commits:
commit 1440ab87386bb5d1ad3634082577bf27f279e066
Author: Bartosz Kosiorek 
AuthorDate: Sun Apr 24 02:29:59 2022 +0200
Commit: Bartosz Kosiorek 
CommitDate: Mon May 9 20:50:37 2022 +0200

tdf#143875 tdf#55058 EMF+ Add support for individual line endings

EMF+ is allowing different caps and arrows on both ends
It is not possible to implement that with css::drawing::LineCap,
as it is set line endings on both line start and line end.
Additionally when the Dash Pattern is used, the css::drawing::LineCap
is also applied there.

To resolve that limitation, the Cap needs to be implemented
independetly by using PolygonStrokeArrowPrimitive2D, and
the css::drawing::LineCap inside drawinglayer::attribute::LineAttribute
always set to css::drawing::LineCap_BUTT

Change-Id: I4be76e2dbefcb34154a1404c3b57dc4b7f7ada85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133299
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx 
b/drawinglayer/source/tools/emfphelperdata.cxx
index c405a4c4876b..c5b282998d71 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -29,6 +29,7 @@
 #include "emfpstringformat.hxx"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -519,7 +520,72 @@ namespace emfplushelper
 }
 }
 
-void EmfPlusHelperData::EMFPPlusDrawPolygon(const 
::basegfx::B2DPolyPolygon& polygon, sal_uInt32 penIndex)
+drawinglayer::attribute::LineStartEndAttribute
+EmfPlusHelperData::CreateLineEnd(const sal_Int32 aCap, const float 
aPenWidth) const
+{
+const double pw = mdExtractedYScale * aPenWidth;
+if (aCap == LineCapTypeSquare)
+{
+basegfx::B2DPolygon aCapPolygon(
+{ {-1.0, -1.0}, {1.0, -1.0}, {1.0, 1.0}, {-1.0, 1.0} });
+aCapPolygon.setClosed(true);
+return drawinglayer::attribute::LineStartEndAttribute(
+pw, basegfx::B2DPolyPolygon(aCapPolygon), true);
+}
+else if (aCap == LineCapTypeRound)
+{
+basegfx::B2DPolygon aCapPolygon(
+{ {-1.0, 1.0}, {1.0, 1.0}, {1.0, 0.0}, {0.9236, -0.3827},
+  {0.7071, -0.7071}, {0.3827, -0.9236}, {0.0, -1.0}, {-0.3827, 
-0.9236},
+  {-0.7071, -0.7071}, {-0.9236, -0.3827}, {-1.0, 0.0} });
+aCapPolygon.setClosed(true);
+return drawinglayer::attribute::LineStartEndAttribute(
+pw, basegfx::B2DPolyPolygon(aCapPolygon), true);
+}
+else if (aCap == LineCapTypeTriangle)
+{
+basegfx::B2DPolygon aCapPolygon(
+{ {-1.0, 1.0}, {1.0, 1.0}, {1.0, 0.0}, {0.0, -1.0}, {-1.0, 
0.0} });
+aCapPolygon.setClosed(true);
+return drawinglayer::attribute::LineStartEndAttribute(
+pw, basegfx::B2DPolyPolygon(aCapPolygon), true);
+}
+else if (aCap == LineCapTypeSquareAnchor)
+{
+basegfx::B2DPolygon aCapPolygon(
+{ {-1.0, -1.0}, {1.0, -1.0}, {1.0, 1.0}, {-1.0, 1.0} });
+aCapPolygon.setClosed(true);
+return drawinglayer::attribute::LineStartEndAttribute(
+1.5 * pw, basegfx::B2DPolyPolygon(aCapPolygon), true);
+}
+else if (aCap == LineCapTypeRoundAnchor)
+{
+const basegfx::B2DPolygon aCapPolygon
+= 
::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 1.0, 
1.0);
+return drawinglayer::attribute::LineStartEndAttribute(
+2.0 * pw, basegfx::B2DPolyPolygon(aCapPolygon), true);
+}
+else if (aCap == LineCapTypeDiamondAnchor)
+{
+basegfx::B2DPolygon aCapPolygon({ {0.0, -1.0}, {1.0, 0.0}, {0.5, 
0.5},
+  {0.5, 1.0}, {-0.5, 1.0}, {-0.5, 
0.5},
+  {-1.0, 0.0} });
+aCapPolygon.setClosed(true);
+return drawinglayer::attribute::LineStartEndAttribute(
+2.0 * pw, basegfx::B2DPolyPolygon(aCapPolygon), true);
+}
+else if (aCap == LineCapTypeArrowAnchor)
+{
+basegfx::B2DPolygon aCapPolygon({ {0.0, -1.0},

[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source canvas/workben chart2/source comphelper/source connectivity/source cppcanvas/source cppuhelper/qa cppuhelper/source cui/sour

2022-05-09 Thread Pragat Pandya (via logerrit)
 basctl/source/dlged/propbrw.cxx   |2 
 basic/source/comp/token.cxx   |2 
 basic/source/sbx/sbxscan.cxx  |2 
 binaryurp/source/bridge.cxx   |2 
 canvas/workben/canvasdemo.cxx |2 
 chart2/source/tools/ConfigColorScheme.cxx |2 
 comphelper/source/misc/base64.cxx |4 
 comphelper/source/misc/graphicmimetype.cxx|2 
 comphelper/source/misc/syntaxhighlight.cxx|4 
 connectivity/source/commontools/TDatabaseMetaDataBase.cxx |2 
 connectivity/source/drivers/ado/Awrapado.cxx  |   24 +--
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx  |2 
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx |2 
 connectivity/source/drivers/postgresql/pq_statics.cxx |   32 ++--
 connectivity/source/parse/sqlnode.cxx |2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 
 cppuhelper/qa/unourl/cppu_unourl.cxx  |   18 +-
 cppuhelper/source/bootstrap.cxx   |4 
 cui/source/customize/acccfg.cxx   |2 
 cui/source/options/optcolor.cxx   |2 
 cui/source/options/optgenrl.cxx   |2 
 cui/source/options/treeopt.cxx|   24 +--
 cui/source/tabpages/border.cxx|4 
 cui/source/tabpages/chardlg.cxx   |4 
 cui/source/tabpages/numfmt.cxx|2 
 cui/source/tabpages/page.cxx  |4 
 cui/source/tabpages/swpossizetabpage.cxx  |   96 +++---
 27 files changed, 125 insertions(+), 125 deletions(-)

New commits:
commit 6abc09926c9b55a445b906303f56c6ec7fdeabf9
Author: Pragat Pandya 
AuthorDate: Sun May 8 23:56:45 2022 +0530
Commit: Bartosz Kosiorek 
CommitDate: Mon May 9 20:42:03 2022 +0200

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027
Reviewed-by: Bartosz Kosiorek 
Tested-by: Jenkins

diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 4a8481249640..d7ab2ee633ef 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -137,7 +137,7 @@ void PropBrw::ImplReCreateController()
 ::cppu::ContextEntry_Init( "ContextDocument", Any( 
m_xContextDocument ) )
 };
 Reference< XComponentContext > xInspectorContext(
-::cppu::createComponentContext( aHandlerContextInfo, 
SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) );
+::cppu::createComponentContext( aHandlerContextInfo, std::size( 
aHandlerContextInfo ), xOwnContext ) );
 
 // create a property browser controller
 Reference< XMultiComponentFactory > xFactory( 
xInspectorContext->getServiceManager(), UNO_SET_THROW );
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 9be47bf41ba1..a060b3fd9318 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -377,7 +377,7 @@ SbiToken SbiTokenizer::Next()
 }
 // valid token?
 short lb = 0;
-short ub = SAL_N_ELEMENTS(aTokTable_Basic)-1;
+short ub = std::size(aTokTable_Basic)-1;
 short delta;
 do
 {
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 82080df4a62a..ec2783b1b837 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -600,7 +600,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt 
) const
  sal_Unicode aBuf[2];
  aBuf[0] = '0';
  aBuf[1] = '0' + nMin;
- rRes = OUString(aBuf, SAL_N_ELEMENTS(aBuf));
+ rRes = OUString(aBuf, std::size(aBuf));
 }
 else
 {
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 050ebec7403c..d06e7d29f31a 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -991,7 +991,7 @@ void Bridge::makeReleaseCall(
 // its own:
 static auto const tid = [] {
 static sal_Int8 const id[] = {'r', 'e', 'l', 'e', 'a', 's', 'e', 
'h', 'a', 'c', 'k'};
-return rtl::ByteSequence(id, SAL_N_ELEMENTS(id));
+return rtl::ByteSequence(id, std::size(id));
 }();
 sendRequest(
 tid, oid, type,
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 031068adf9e9..431f9cee04a1 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -208,7 +208,7 @@ class DemoRenderer
 {
 const 

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

2022-05-09 Thread Stephan Bergmann (via logerrit)
 configure.ac |   11 ---
 1 file changed, 11 deletions(-)

New commits:
commit 0c3950c4954848fde1515a932cc16b38ab961a7d
Author: Stephan Bergmann 
AuthorDate: Mon May 9 17:51:29 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 20:19:34 2022 +0200

Remove dated check for C++11 ,  headers

...which should always be available with our C++17 toolchains

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

diff --git a/configure.ac b/configure.ac
index 8299b26be0ea..3d66af5cdc8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11365,17 +11365,6 @@ if test "$with_system_libnumbertext" = "yes"; then
 SYSTEM_LIBNUMBERTEXT=YES
 else
 SYSTEM_LIBNUMBERTEXT=
-AC_LANG_PUSH([C++])
-save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $CXXFLAGS_CXX11"
-AC_CHECK_HEADERS([codecvt regex])
-AS_IF([test "x$ac_cv_header_codecvt" != xyes -o "x$ac_cv_header_regex" != 
xyes],
-[ LIBNUMBERTEXT_CFLAGS=''
-  AC_MSG_WARN([No system-provided libnumbertext or codecvt/regex 
C++11 headers (min. libstdc++ 4.9).
-   Enable libnumbertext fallback (missing number to 
number name conversion).])
-])
-CPPFLAGS=$save_CPPFLAGS
-AC_LANG_POP([C++])
 fi
 AC_SUBST(SYSTEM_LIBNUMBERTEXT)
 AC_SUBST(SYSTEM_LIBNUMBERTEXT_DATA)


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

2022-05-09 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/dataaccess/documentdefinition.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1f37a0ff46a7f1a2a52ee78ff99731cfb3bbc2f8
Author: Andrea Gelmini 
AuthorDate: Mon May 9 12:17:19 2022 +0200
Commit: Julien Nabet 
CommitDate: Mon May 9 19:51:05 2022 +0200

Fix typo in code

I find _rContext not _rContxt

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

diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx 
b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 389ab601f2ab..5569276d4a7d 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -207,7 +207,7 @@ private:
 @throws css::uno::RuntimeException
 */
 static void impl_removeFrameFromDesktop_throw(
-const css::uno::Reference< css::uno::XComponentContext >& 
_rContxt,
+const css::uno::Reference< css::uno::XComponentContext >& 
_rContext,
 const css::uno::Reference< css::frame::XFrame >& _rxFrame
 );
 


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

2022-05-09 Thread Caolán McNamara (via logerrit)
 sd/source/ui/animations/CustomAnimationPane.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 502a45e112cdc5e296311ef8f3c220b706340e06
Author: Caolán McNamara 
AuthorDate: Mon May 9 10:11:22 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon May 9 19:14:35 2022 +0200

Resolves: tdf#148985 crash on searching for non-existing prefix

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

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 5782005d0870..dc865670c397 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2108,6 +2108,8 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, 
Timer*, void)
 }
 
 int nSelected = mxLBAnimation->get_selected_index();
+if (nSelected == -1)
+return;
 
 // tdf#99137, the selected entry may also be a subcategory title, so not 
an effect
 // just skip it and move to the next one in this case


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

2022-05-09 Thread Mike Kaganski (via logerrit)
 basic/source/runtime/methods.cxx |   33 ++---
 1 file changed, 6 insertions(+), 27 deletions(-)

New commits:
commit 8189d815641c583b5506d482f0b4f1ab47924f6a
Author: Mike Kaganski 
AuthorDate: Mon May 9 16:09:21 2022 +0100
Commit: Mike Kaganski 
CommitDate: Mon May 9 19:04:46 2022 +0200

Use usual 1899-12-30 base Date in Basic

It matches VBA, has an optimization in the code, and doesn't
need any additional "-2" hackery.

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

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e86ac2d64c63..2ebae2751157 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -133,7 +133,7 @@ static void FilterWhiteSpace( OUString& rStr )
 rStr = aRet.makeStringAndClear();
 }
 
-static tools::Long GetDayDiff( const Date& rDate );
+static sal_Int32 GetDayDiff(const Date& rDate) { return rDate - 
Date(1899'12'30); }
 
 static const CharClass& GetCharClass()
 {
@@ -1681,9 +1681,8 @@ void SbRtl_Val(StarBASIC *, SbxArray & rPar, bool)
 // Helper functions for date conversion
 sal_Int16 implGetDateDay( double aDate )
 {
-aDate -= 2.0; // standardize: 1.1.1900 => 0.0
 aDate = floor( aDate );
-Date aRefDate( 1, 1, 1900 );
+Date aRefDate(1899'12'30);
 aRefDate.AddDays( aDate );
 
 sal_Int16 nRet = static_cast( aRefDate.GetDay() );
@@ -1692,9 +1691,8 @@ sal_Int16 implGetDateDay( double aDate )
 
 sal_Int16 implGetDateMonth( double aDate )
 {
-Date aRefDate( 1,1,1900 );
+Date aRefDate(1899'12'30);
 sal_Int32 nDays = static_cast(aDate);
-nDays -= 2; // standardize: 1.1.1900 => 0.0
 aRefDate.AddDays( nDays );
 sal_Int16 nRet = static_cast( aRefDate.GetMonth() );
 return nRet;
@@ -4653,28 +4651,10 @@ void SbRtl_Partition(StarBASIC *, SbxArray & rPar, bool)
 
 #endif
 
-static tools::Long GetDayDiff( const Date& rDate )
-{
-Date aRefDate( 1,1,1900 );
-tools::Long nDiffDays;
-if ( aRefDate > rDate )
-{
-nDiffDays = aRefDate - rDate;
-nDiffDays *= -1;
-}
-else
-{
-nDiffDays = rDate - aRefDate;
-}
-nDiffDays += 2; // adjustment VisualBasic: 1.Jan.1900 == 2
-return nDiffDays;
-}
-
 sal_Int16 implGetDateYear( double aDate )
 {
-Date aRefDate( 1,1,1900 );
-tools::Long nDays = static_cast(aDate);
-nDays -= 2; // standardize: 1.1.1900 => 0.0
+Date aRefDate(1899'12'30);
+sal_Int32 nDays = static_cast(aDate);
 aRefDate.AddDays( nDays );
 sal_Int16 nRet = aRefDate.GetYear();
 return nRet;
@@ -4786,8 +4766,7 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, 
sal_Int16 nDay,
 }
 }
 
-tools::Long nDiffDays = GetDayDiff( aCurDate );
-rdRet = static_cast(nDiffDays);
+rdRet = GetDayDiff(aCurDate);
 return true;
 }
 


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

2022-05-09 Thread László Németh (via logerrit)
 sc/source/filter/excel/xeformula.cxx |4 +++-
 sc/source/filter/excel/xename.cxx|4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ac9de05cc79e76392891c18814e8f120178ccf38
Author: László Németh 
AuthorDate: Mon May 9 14:30:59 2022 +0200
Commit: László Németh 
CommitDate: Mon May 9 19:01:28 2022 +0200

tdf#148993 XLS export: fix broken formula regression

Exported XLS documents lost their formulas opened in MSO.

Regression from commit 12ee423c7549ddd2b86dfc3fc6fed2c617dcca7f
"tdf#144397 tdf#144636 XLSX: cache external named ranges and their 
formulas".

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

diff --git a/sc/source/filter/excel/xeformula.cxx 
b/sc/source/filter/excel/xeformula.cxx
index 9b318ff3726b..e6eabd69c3d5 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -611,7 +611,9 @@ void XclExpFmlaCompImpl::Init( XclFormulaType eType, const 
ScTokenArray& rScTokA
 // token array iterator (use cloned token array if present)
 mxData->maTokArrIt.Init( mxData->mxOwnScTokArr ? 
*mxData->mxOwnScTokArr : rScTokArr, false );
 mxData->mpRefLog = pRefLog;
-mxData->mpScBasePos = pScBasePos;
+// Only for OOXML
+if (GetOutput() == EXC_OUTPUT_XML_2007)
+mxData->mpScBasePos = pScBasePos;
 }
 }
 
diff --git a/sc/source/filter/excel/xename.cxx 
b/sc/source/filter/excel/xename.cxx
index 513daf2795f0..4bf336a16d09 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -648,7 +648,9 @@ sal_uInt16 XclExpNameManagerImpl::CreateName( SCTAB nTab, 
const ScRangeData& rRa
 }
 else
 {
-xTokArr = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_NAME, 
*pScTokArr, &rRangeData.GetPos() );
+bool bOOXML = GetOutput() == EXC_OUTPUT_XML_2007;
+xTokArr = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_NAME, 
*pScTokArr, bOOXML ?
+ &rRangeData.GetPos() : nullptr );
 sSymbol = rRangeData.GetSymbol( (GetOutput() == EXC_OUTPUT_BINARY) 
?
  formula::FormulaGrammar::GRAM_ENGLISH_XL_A1 : 
formula::FormulaGrammar::GRAM_OOXML);
 }


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

2022-05-09 Thread Caolán McNamara (via logerrit)
 vcl/workben/svmfuzzer.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 696be1cbd7097510702f8343853239af51085ab1
Author: Caolán McNamara 
AuthorDate: Mon May 9 12:35:56 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 9 18:43:19 2022 +0200

ofz#47323 suppress Direct-leak

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

diff --git a/vcl/workben/svmfuzzer.cxx b/vcl/workben/svmfuzzer.cxx
index 53757e3199c7..f0c129e76cd4 100644
--- a/vcl/workben/svmfuzzer.cxx
+++ b/vcl/workben/svmfuzzer.cxx
@@ -73,6 +73,11 @@ 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: configure.ac

2022-05-09 Thread Stephan Bergmann (via logerrit)
 configure.ac |   25 -
 1 file changed, 25 deletions(-)

New commits:
commit b125784fa5b17272577d46fae8f915ab48e57dd5
Author: Stephan Bergmann 
AuthorDate: Mon May 9 16:54:56 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 18:38:55 2022 +0200

Drop an obsolete configure check

We require at least GCC 7.0.0 anyway, per README.md

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

diff --git a/configure.ac b/configure.ac
index 80058aaafb4c..8299b26be0ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7517,31 +7517,6 @@ if test "$GCC" = "yes"; then
 AC_SUBST(ATOMIC_LIB)
 fi
 
-dnl Test for temporarily incompatible libstdc++ 4.7.{0,1}, where
-dnl  introduced
-dnl an additional member _M_size into C++11 std::list towards 4.7.0 and
-dnl  removed it
-dnl again towards 4.7.2:
-if test $CPP_LIBRARY = GLIBCXX; then
-AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI 
breakage])
-AC_LANG_PUSH([C++])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include 
-#if !defined __GLIBCXX__ || (__GLIBCXX__ != 20120322 && __GLIBCXX__ != 
20120614)
-// according to :
-//   GCC 4.7.0: 20120322
-//   GCC 4.7.1: 20120614
-// and using a range check is not possible as the mapping between
-// __GLIBCXX__ values and GCC versions is not monotonic
-/* ok */
-#else
-abi broken
-#endif
-]])], [AC_MSG_RESULT(no, ok)],
-[AC_MSG_ERROR(yes)])
-AC_LANG_POP([C++])
-fi
-
 AC_MSG_CHECKING([whether $CXX_BASE supports C++11 without Language Defect 757])
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"


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

2022-05-09 Thread Xisco Fauli (via logerrit)
 basic/source/sbx/sbxarray.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 7251f9c1b840721b5ba1f1d5f8b65b405260945b
Author: Xisco Fauli 
AuthorDate: Mon May 9 17:03:50 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon May 9 18:30:35 2022 +0200

basic: remove commented out line

Introduced in 90d33f5945336fa46b7c02f425100af794768b15
"tdf#148358 - Compare Non-ASCII variable names case-insensitive"

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

diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 5f70345e6f2a..53c0ed36fa73 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -277,7 +277,6 @@ SbxVariable* SbxArray::Find( const OUString& rName, 
SbxClassType t )
 return nullptr;
 bool bExtSearch = IsSet( SbxFlagBits::ExtSearch );
 sal_uInt16 nHash = SbxVariable::MakeHashCode( rName );
-//const OUString aNameCI = SbxVariable::NameToCaseInsensitiveName(rName);
 const OUString aNameCI = SbxVariable::NameToCaseInsensitiveName(rName);
 for (auto& rEntry : mVarEntries)
 {


[Libreoffice-commits] core.git: stoc/Library_bootstrap.mk

2022-05-09 Thread Stephan Bergmann (via logerrit)
 stoc/Library_bootstrap.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 57b58d4fb85579a9aacbd6b2d7e389cce46f5fbc
Author: Stephan Bergmann 
AuthorDate: Mon May 9 16:17:15 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 17:58:29 2022 +0200

URE Library_boostrap should not depend on Library_comphelper

...and apparently doesn't need to, even though that dependency got added 
with
6ffdc88e79904882e319bdd0b901e7491abae0b3 "Simplify Sequence iterations in
shell..svgio"

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

diff --git a/stoc/Library_bootstrap.mk b/stoc/Library_bootstrap.mk
index ca1f49618bb8..62e2360581db 100644
--- a/stoc/Library_bootstrap.mk
+++ b/stoc/Library_bootstrap.mk
@@ -26,7 +26,6 @@ $(eval $(call 
gb_Library_use_internal_bootstrap_api,bootstrap,\
 ))
 
 $(eval $(call gb_Library_use_libraries,bootstrap,\
-comphelper \
 cppu \
 cppuhelper \
 reg \


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

2022-05-09 Thread Stephan Bergmann (via logerrit)
 vcl/qa/cppunit/text.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 52bd9c25d1e1150cb5f5a8890c4d5dcce4e32954
Author: Stephan Bergmann 
AuthorDate: Mon May 9 14:57:36 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 17:57:29 2022 +0200

SvFileStream needs an absolute file URL

...and fail loudly if writing the file fails for any reason

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

diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index 899217347085..668e84ef2aad 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -7,11 +7,14 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+#include 
 #include 
 #include 
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -32,8 +35,14 @@ class VclTextTest : public test::BootstrapFixture
 if (mbExportBitmap)
 {
 BitmapEx aBitmapEx(device->GetBitmapEx(Point(0, 0), 
device->GetOutputSizePixel()));
-SvFileStream aStream(filename, StreamMode::WRITE | 
StreamMode::TRUNC);
-GraphicFilter::GetGraphicFilter().compressAsPNG(aBitmapEx, 
aStream);
+OUString cwd;
+CPPUNIT_ASSERT_EQUAL(osl_Process_E_None, 
osl_getProcessWorkingDir(&cwd.pData));
+OUString url;
+CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None,
+ osl::FileBase::getAbsoluteFileURL(cwd, 
filename, url));
+SvFileStream aStream(url, StreamMode::WRITE | StreamMode::TRUNC);
+CPPUNIT_ASSERT_EQUAL(
+ERRCODE_NONE, 
GraphicFilter::GetGraphicFilter().compressAsPNG(aBitmapEx, aStream));
 }
 }
 


[Libreoffice-commits] core.git: io/Library_io.mk

2022-05-09 Thread Stephan Bergmann (via logerrit)
 io/Library_io.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit c5e38abb10914ab262d970902743b204e4a99a99
Author: Stephan Bergmann 
AuthorDate: Mon May 9 15:30:59 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 17:56:47 2022 +0200

URE Library_io should not depend on Library_comphelper

...and apparently doesn't need to, even though that dependency got added 
with
6af2e7d21ce050758ad07fbb951a38b2da2b6c4c "use more
comphelper::OInterfaceContainerHelper2"

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

diff --git a/io/Library_io.mk b/io/Library_io.mk
index 6c70822eece1..d2c60b303984 100644
--- a/io/Library_io.mk
+++ b/io/Library_io.mk
@@ -14,7 +14,6 @@ $(eval $(call gb_Library_use_external,io,boost_headers))
 $(eval $(call gb_Library_use_udk_api,io))
 
 $(eval $(call gb_Library_use_libraries,io,\
-comphelper \
 cppu \
 cppuhelper \
 sal \


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

2022-05-09 Thread Stephan Bergmann (via logerrit)
 include/rtl/string.hxx  |4 ++--
 include/rtl/ustring.hxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 81d55a0a8b999c58b5b347abd6214d6571ed9923
Author: Stephan Bergmann 
AuthorDate: Mon May 9 14:02:26 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 9 17:55:16 2022 +0200

Revert "prevent using O[U]String::subView on temporaties"

This reverts commit 59059d00c29334414a26bf5452572433f5735489, as it 
effectively
did nothing, as rvalues can bind to `const &` just fine.
 "Acutally do prevent using
O[U]String::subView on temporaties" would have fixed that, but (a) it didn't
find any actual mis-uses and (b) rather would have required a handful of
legitimate cases to be dressed up with o3tl::temporary now, so is arguably 
not
worth it.

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

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index f64f2d651730..e99581cd6f94 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -1540,7 +1540,7 @@ public:
   @param beginIndex   the beginning index, inclusive.
   @returnthe specified substring.
 */
-SAL_WARN_UNUSED_RESULT std::string_view subView( sal_Int32 beginIndex ) 
const &
+SAL_WARN_UNUSED_RESULT std::string_view subView( sal_Int32 beginIndex ) 
const
 {
 assert(beginIndex >= 0);
 assert(beginIndex <= getLength());
@@ -1559,7 +1559,7 @@ public:
   @param countthe number of characters.
   @returnthe specified substring.
 */
-SAL_WARN_UNUSED_RESULT std::string_view subView( sal_Int32 beginIndex, 
sal_Int32 count ) const &
+SAL_WARN_UNUSED_RESULT std::string_view subView( sal_Int32 beginIndex, 
sal_Int32 count ) const
 {
 assert(beginIndex >= 0);
 assert(count >= 0);
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index b7cebaf90647..e6d3ed682932 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -2191,7 +2191,7 @@ public:
   @param beginIndex   the beginning index, inclusive.
   @returnthe specified substring.
 */
-SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex ) 
const &
+SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex ) 
const
 {
 assert(beginIndex >= 0);
 assert(beginIndex <= getLength());
@@ -2210,7 +2210,7 @@ public:
   @param countthe number of characters.
   @returnthe specified substring.
 */
-SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex, 
sal_Int32 count ) const &
+SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex, 
sal_Int32 count ) const
 {
 assert(beginIndex >= 0);
 assert(count >= 0);


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

2022-05-09 Thread Mike Kaganski (via logerrit)
 basic/source/runtime/methods.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c8f27e3d8ff9c22409313a093bf538256fa2f7f
Author: Mike Kaganski 
AuthorDate: Mon May 9 15:39:39 2022 +0100
Commit: Mike Kaganski 
CommitDate: Mon May 9 17:52:11 2022 +0200

sal_Int32 cast to tools::Long to pass to a function taking sal_Int32

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

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 8cc49c2a5024..e86ac2d64c63 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -765,7 +765,7 @@ void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool)
 (void)aItem.getFileStatus( aFileStatus );
 nLen = static_cast(aFileStatus.getFileSize());
 }
-rPar.Get(0)->PutLong(static_cast(nLen));
+rPar.Get(0)->PutLong(nLen);
 }
 }
 


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 7f987c7218b1124ce8b8fe4df9388a85b8f1a3fd
Author: Alain Romedenne 
AuthorDate: Mon May 9 16:43:37 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Mon May 9 17:43:37 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 084d84f09882ec35007ad4566247932a30899799
  - tdf#141474 tdf#148466 Choose function accepts keyword arguments

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

diff --git a/helpcontent2 b/helpcontent2
index 886426b32dfe..084d84f09882 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 886426b32dfefc962fc700dbf3adfeca7ca3c15e
+Subproject commit 084d84f09882ec35007ad4566247932a30899799


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

2022-05-09 Thread Alain Romedenne (via logerrit)
 source/text/sbasic/shared/03090102.xhp |4 ++
 source/text/sbasic/shared/03090402.xhp |   48 -
 source/text/sbasic/shared/03090410.xhp |   18 +++-
 3 files changed, 44 insertions(+), 26 deletions(-)

New commits:
commit 084d84f09882ec35007ad4566247932a30899799
Author: Alain Romedenne 
AuthorDate: Mon Apr 4 16:58:11 2022 +0100
Commit: Alain Romedenne 
CommitDate: Mon May 9 17:43:19 2022 +0200

tdf#141474 tdf#148466 Choose function accepts keyword arguments

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

diff --git a/source/text/sbasic/shared/03090102.xhp 
b/source/text/sbasic/shared/03090102.xhp
index 55791f203..571abc33d 100644
--- a/source/text/sbasic/shared/03090102.xhp
+++ b/source/text/sbasic/shared/03090102.xhp
@@ -35,7 +35,7 @@
 
 
 
-Select...Case Statement
+Select...Case Statement
 Defines one or 
more statement blocks depending on the value of an expression.
 
 
@@ -75,6 +75,8 @@
 
 
 
+   
+   
   If statement
   Iif or Switch 
functions
 
diff --git a/source/text/sbasic/shared/03090402.xhp 
b/source/text/sbasic/shared/03090402.xhp
index 3f70ca35e..12b5d7f62 100644
--- a/source/text/sbasic/shared/03090402.xhp
+++ b/source/text/sbasic/shared/03090402.xhp
@@ -34,36 +34,48 @@
 
 
 
-Choose 
Function
+Choose 
Function
 Returns a 
selected value from a list of arguments.
 
 
-Syntax:
+
 
-Choose (Index, 
Selection1[, Selection2, ... [,Selection_n]])
+  Choose (Index 
As Integer, Expression1[, Expression2, ... [, Expression_n]]) As 
Variant
 
+
+Variant. A value 
infered from the Index parameter.
 
-Parameters:
- 
Index: Integer value starting at 1 that specifies which of the 
possible choices to return.
- 
Selection1: Any expression that contains one of the possible 
choices.
+
+ 
Index: Any numeric expression rounded to a whole number. 
Index accepts integer values starting at 1 that specify 
which of the possible choices to return.
+ 
Expression1, Expression2, …, Expression_n: Expressions 
representing each of the possible choices.
 The 
Choose function returns a value from the list of expressions based 
on the index value. If Index = 1, the function returns the first 
expression in the list, if Index = 2, it returns the second 
expression, and so on.
-If the index 
value is less than 1 or greater than the number of expressions listed, the 
function returns a Null value.
-The following 
example uses the Choose function to select a string from several 
strings that form a menu:
+If the index 
value is less than 1 or greater than the number of expressions listed, the 
function returns a Null value.
+Error #5 occurs when 
parameters are omitted. Error #13 occurs if Index equals 
Null.  
+ If expressions are omitted - e.g. Choose(5) - or Index=Null, Basic 
runtime raises error #13. If the chosen expression is not defined -e.g. 
Choose(2,"a",,45) - "Error 448" is returned !!.
+
 
 
+
+
+
+The following 
example uses the  or Choose function to select a string from 
several strings that form a menu:
 
-Example:
 
-Sub ExampleChoose
-Dim sReturn As String
-sReturn = ChooseMenu(2)
-Print sReturn
-End Sub
- 
-Function ChooseMenu(Index As Integer)
+Sub 
ExampleChoose
+Print 
ChooseMenu(2) ' "Save Format"
+
MsgBox Choose(index :=  -5, 9, "Basic", PI) ' Null
+
MsgBox Choose(index := 3.14, 9, "Basic", PI) ' PI
+End 
Sub
+ 
+Function 
ChooseMenu(Index As Integer)
 ChooseMenu = 
Choose(Index, "Quick Format", "Save Format", "System Format")
-End Function
+End 
Function
 
-
 
+
+   
+   
+
+
+
 
\ No newline at end of file
diff --git a/source/text/sbasic/shared/03090410.xhp 
b/source/text/sbasic/shared/03090410.xhp
index cec093067..acade098e 100644
--- a/source/text/sbasic/shared/03090410.xhp
+++ b/source/text/sbasic/shared/03090410.xhp
@@ -33,17 +33,16 @@
   Switch function
 
 
-
-Switch 
Function
+Switch 
Function
 Evaluates a 
list of arguments, consisting of an expression followed by a value. The Switch 
function returns a value that is associated with the expression that is passed 
by this function.
 
 
-Syntax:
+
 
-Switch 
(Expression1, Value1[, Expression2, Value2[..., Expression_n, 
Value_n]])
+Switch 
(Expression1, Value1[, Expression2, Value2[..., Expression_n, Value_n]]) As 
Variant
 
 
-Parameters:
+
 The 
Switch function evaluates the expressions from left to right, and 
then returns the value that is assigned to the function expression. If 
expression and value are not given as a pair, a runtime error 
occurs.
  
Expression: The expression that you want to evaluate.
  
Value: The value that you want to return if the expression is 
True.
@@ -51,7 +50,7 @@
 
 
 
-Example:
+
 
 Sub ExampleSwitch
 Dim sGender As String
@@ -63,6 +62,11 @@
 
GetGenderIndex = Switch(sName = "Jane", "female", sName = "John", 
"male")
 End Function
 
-
 
+
+   
+   
+
+
+
 
\ No newline at end of file


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - 31 commits - connectivity/source download.lst external/liborcus external/nss hwpfilter/source include/sfx2 officecfg/registry sfx2

2022-05-09 Thread Michael Stahl (via logerrit)
 connectivity/source/drivers/dbase/DTable.cxx   |2 
 download.lst   |4 
 external/liborcus/UnpackedTarball_liborcus.mk  |   16 
 external/liborcus/forcepoint-83.patch.1|   38 
 external/liborcus/forcepoint-84.patch.1|   38 
 external/liborcus/forcepoint-87.patch.1|   27 
 external/liborcus/forcepoint-95.patch.1|   11 
 external/nss/ExternalProject_nss.mk|4 
 hwpfilter/source/hwpreader.cxx |   12 
 include/sfx2/strings.hrc   |2 
 include/sfx2/viewfrm.hxx   |1 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   16 
 sfx2/source/view/viewfrm.cxx   |   40 
 solenv/clang-format/blacklist  |1 
 svl/source/passwordcontainer/passwordcontainer.cxx |  166 ++-
 svl/source/passwordcontainer/passwordcontainer.hxx |   69 +
 sw/inc/IDocumentMarkAccess.hxx |5 
 sw/inc/deletelistener.hxx  |   92 ++
 sw/qa/core/data/rtf/fail/forcepoint-82.rtf |   28 
 sw/qa/core/data/rtf/pass/forcepoint-96.rtf |8 
 sw/qa/core/data/rtf/pass/forcepoint104.rtf |  571 +
 sw/qa/core/layout/data/tdf122894-4.doc |binary
 sw/qa/core/layout/layout.cxx   |5 
 sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf  |binary
 sw/qa/extras/layout/data/forcepoint102.rtf |  178 
 sw/qa/extras/layout/data/forcepoint89.html |binary
 sw/qa/extras/layout/data/forcepoint90.rtf  |1 
 sw/qa/extras/layout/data/forcepoint91.html |binary
 sw/qa/extras/layout/data/forcepoint92.doc  |binary
 sw/qa/extras/layout/data/forcepoint93-1.rtf|binary
 sw/qa/extras/layout/data/forcepoint93-2.rtf|binary
 sw/qa/extras/layout/data/forcepoint94.html |binary
 sw/qa/extras/layout/data/forcepoint98.html |binary
 sw/qa/extras/layout/data/forcepoint99.html |binary
 sw/qa/extras/layout/data/tdf147485-forcepoint.doc  |binary
 sw/qa/extras/layout/layout.cxx |   80 +
 sw/qa/extras/uiwriter/uiwriter.cxx |4 
 sw/source/core/doc/DocumentContentOperationsManager.cxx|   31 
 sw/source/core/doc/docbm.cxx   |   22 
 sw/source/core/inc/MarkManager.hxx |2 
 sw/source/core/inc/frame.hxx   |   11 
 sw/source/core/layout/ftnfrm.cxx   |3 
 sw/source/core/layout/layact.cxx   |3 
 sw/source/core/layout/objectformattertxtfrm.cxx|   54 -
 sw/source/core/layout/sectfrm.cxx  |3 
 sw/source/core/layout/tabfrm.cxx   |   73 +
 sw/source/core/layout/wsfrm.cxx|2 
 sw/source/core/text/itratr.cxx |2 
 sw/source/core/text/itrform2.cxx   |   15 
 sw/source/core/text/itrform2.hxx   |2 
 sw/source/core/text/porfld.cxx |   13 
 sw/source/core/text/porlay.cxx |4 
 sw/source/core/text/porrst.cxx |2 
 sw/source/core/text/txtfrm.cxx |8 
 sw/source/core/undo/unbkmk.cxx |2 
 sw/source/core/undo/undobj.cxx |2 
 sw/source/ui/misc/bookmark.cxx |2 
 sw/source/uibase/dochdl/swdtflvr.cxx   |4 
 sw/source/uibase/shells/textsh1.cxx|2 
 sw/source/uibase/utlui/content.cxx |2 
 sw/source/uibase/utlui/navipi.cxx  |2 
 ucb/source/ucp/webdav-curl/CurlSession.cxx |   79 +
 ucb/source/ucp/webdav-curl/DAVProperties.cxx   |3 
 ucb/source/ucp/webdav-curl/webdavcontent.cxx   |4 
 ucb/source/ucp/webdav-curl/webdavresponseparser.cxx|   19 
 uui/source/iahndl-authentication.cxx   |5 
 vcl/source/helper/strhelper.cxx|3 
 vcl/source/outdev/textline.cxx |2 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx   |2 
 69 files changed, 1630 insertions(+), 172 deletions(-)

New commits:
commit 2930cdcc11a191c2c4f328ac123c7d651f5360dd
Author: Michael Stahl 
AuthorDate: Wed May 4 18:04:14 2022 +0200
Commit: Michael Stahl 
CommitDate: Mon May 9 10:47:57 2022 +0200

ucb: webdav-curl: i

[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - basic/qa

2022-05-09 Thread Mike Kaganski (via logerrit)
 basic/qa/basic_coverage/test_non_ascii_names.bas |   28 +++
 1 file changed, 28 insertions(+)

New commits:
commit d314ea8f769b13a0dffa7e1560c70b2b9001c53d
Author: Mike Kaganski 
AuthorDate: Sun Apr 17 10:18:32 2022 +0300
Commit: Xisco Fauli 
CommitDate: Mon May 9 16:54:23 2022 +0200

Test StarBasic's native non-ASCII name syntax

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

diff --git a/basic/qa/basic_coverage/test_non_ascii_names.bas 
b/basic/qa/basic_coverage/test_non_ascii_names.bas
new file mode 100644
index ..a9ef0f159da2
--- /dev/null
+++ b/basic/qa/basic_coverage/test_non_ascii_names.bas
@@ -0,0 +1,28 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Option Explicit
+
+Function doUnitTest as String
+  [Prüfung]
+  doUnitTest = TestUtil.GetResult()
+End Function
+
+Function [Функция]([😁])
+  [Функция] = [😁] & " and some text"
+End Function
+
+Sub [Prüfung]
+  On Error GoTo errorHandler
+
+  TestUtil.AssertEqual([Функция]("Smiley"), "Smiley and some text", 
"[Функция](""Smiley"")")
+
+  Exit Sub
+errorHandler:
+  TestUtil.ReportErrorHandler("Prüfung", Err, Error$, Erl)
+End Sub


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

2022-05-09 Thread Caolán McNamara (via logerrit)
 vcl/headless/CairoCommon.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 10f3cb6aa8794d063ae5990066fcfa006d47c512
Author: Caolán McNamara 
AuthorDate: Mon May 9 12:10:16 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 9 16:07:01 2022 +0200

ofz#46070 Out-of-memory

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

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 7cf2951b9da6..2e2dcaecec6f 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -313,9 +314,11 @@ 
SystemDependentData_CairoPath::SystemDependentData_CairoPath(
 , mbNoJoin(bNoJoin)
 , mbAntiAlias(bAntiAlias)
 {
+static const bool bFuzzing = utl::ConfigManager::IsFuzzing();
+
 // tdf#129845 only create a copy of the path when nSizeMeasure is
 // bigger than some decent threshold
-if (nSizeMeasure > 50)
+if (!bFuzzing && nSizeMeasure > 50)
 {
 mpCairoPath = cairo_copy_path(cr);
 


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

2022-05-09 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/functions/mathematical/fods/aggregate.fods |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit 7d0b19f3ea3932c9c9bd73604987373681440a1c
Author: Xisco Fauli 
AuthorDate: Mon May 9 11:16:43 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon May 9 16:01:24 2022 +0200

tdf#148843: sc_mathematical_functions: Add unittest

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

diff --git a/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods 
b/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods
index e7042ae9b6ea..19b91451330c 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods
@@ -2540,6 +2540,31 @@
  
  
 
+
+ 
+  18
+ 
+ 
+  18
+ 
+ 
+  TRUE
+ 
+ 
+  =AGGREGATE(9;6;M38;N38;O38)
+ 
+ 
+ 
+  13
+ 
+ 
+  #DIV/0!
+ 
+ 
+  5
+ 
+ 
+
 
  
  


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

2022-05-09 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/functions/statistical/fods/countif.fods |   48 
 1 file changed, 48 insertions(+)

New commits:
commit 8bd91a40eae95f38c15d570d6af87b997c7eee39
Author: Xisco Fauli 
AuthorDate: Mon May 9 10:55:53 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon May 9 14:18:03 2022 +0200

tdf#148948: sc_statistical_functions: Add unittest

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

diff --git a/sc/qa/unit/data/functions/statistical/fods/countif.fods 
b/sc/qa/unit/data/functions/statistical/fods/countif.fods
index 1277ebcd9452..3e77a2ed49c8 100644
--- a/sc/qa/unit/data/functions/statistical/fods/countif.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/countif.fods
@@ -3999,6 +3999,54 @@
  
  
 
+
+ 
+  4
+ 
+ 
+  3
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF(I44:L44;"=")
+ 
+ 
+  Tdf#148948
+ 
+ 
+ 
+  
+ 
+ 
+ 
+ 
+
+
+ 
+  0
+ 
+ 
+  1
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF(I45:L45;"<>")
+ 
+ 
+  Tdf#148948
+ 
+ 
+ 
+  
+ 
+ 
+ 
+ 
+
 
  
  


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

2022-05-09 Thread Caolán McNamara (via logerrit)
 sd/source/ui/animations/CustomAnimationPane.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 247f4aefb9879dd465e34a2072218a0f1748de53
Author: Caolán McNamara 
AuthorDate: Mon May 9 10:11:22 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 9 12:36:33 2022 +0200

Resolves: tdf#148985 crash on searching for non-existing prefix

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

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index b3248aeaa15b..0910ba96efe4 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2117,6 +2117,8 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, 
Timer*, void)
 }
 
 int nSelected = mxLBAnimation->get_selected_index();
+if (nSelected == -1)
+return;
 
 // tdf#99137, the selected entry may also be a subcategory title, so not 
an effect
 // just skip it and move to the next one in this case


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

2022-05-09 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/wrtsh/wrtsh1.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 0db2cd321fef8db7c17c6c588b6593c7d59a9688
Author: Miklos Vajna 
AuthorDate: Mon May 9 11:19:48 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 9 12:27:54 2022 +0200

sw content controls: only try to insert placeholders if there is no 
selection

The logic is that in case there is no selection, we insert a placeholder
like "type here", but if there is a selection, that can be a custom
placeholder.

Without this fix, we would hit an assertion failure on inserting content
control when there is a selection, as the placeholder is empty and
operator[](0) is not allowed for empty OUStrings.

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

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index ca1c55c0f8c7..f0c1b47b95d1 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1050,9 +1050,12 @@ void 
SwWrtShell::InsertContentControl(SwContentControlType eType)
 break;
 }
 }
-Insert(aPlaceholder);
-Left(CRSR_SKIP_CHARS, /*bSelect=*/true, aPlaceholder.getLength(),
-/*bBasicCall=*/false);
+if (aPlaceholder.getLength())
+{
+Insert(aPlaceholder);
+Left(CRSR_SKIP_CHARS, /*bSelect=*/true, aPlaceholder.getLength(),
+/*bBasicCall=*/false);
+}
 SwFormatContentControl aContentControl(pContentControl, 
RES_TXTATR_CONTENTCONTROL);
 SetAttrItem(aContentControl);
 }


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

2022-05-09 Thread Mike Kaganski (via logerrit)
 vcl/inc/impanmvw.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0c87c0b87a3bbc2c57b2dd65ba2dd0aeb2f0b0c3
Author: Mike Kaganski 
AuthorDate: Mon May 9 10:27:03 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon May 9 11:57:06 2022 +0200

Fix --disable-pch build: explicitly delete move constructor

Without this, the implicitly created constructor is exported by MSVC
for the DLLPUBLIC class, and requires that VirtualDevice is defined,
resulting in this error in PCH-disabled builds:

  [build CXX] vcl/source/animate/Animation.cxx
  C:\lo\src\core\include\rtl/ref.hxx(129): error C2027: use of undefined 
type 'VirtualDevice'
  C:\lo\src\core\vcl\inc\impanmvw.hxx(29): note: see declaration of 
'VirtualDevice'
  C:\lo\src\core\include\rtl/ref.hxx(127): note: while compiling class 
template member function 'rtl::Reference::~Reference(void)'
  with
  [
  reference_type=VirtualDevice
  ]
  C:\lo\src\core\include\vcl/vclptr.hxx(216): note: see reference to 
function template instantiation 
'rtl::Reference::~Reference(void)' being comp
  iled
  with
  [
  reference_type=VirtualDevice
  ]
  C:\lo\src\core\include\vcl/vclptr.hxx(64): note: see reference to class 
template instantiation 'rtl::Reference' being compiled
  with
  [
  reference_type=VirtualDevice
  ]
  C:\lo\src\core\include\vcl/outdev.hxx(202): note: see reference to class 
template instantiation 'VclPtr' being compiled
  make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:337: 
C:/lo/src/build/workdir/CxxObject/vcl/source/animate/Animation.o] Error 2

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

diff --git a/vcl/inc/impanmvw.hxx b/vcl/inc/impanmvw.hxx
index be48421f5abd..5323afbccebc 100644
--- a/vcl/inc/impanmvw.hxx
+++ b/vcl/inc/impanmvw.hxx
@@ -72,6 +72,7 @@ public:
 ImplAnimView( Animation* pParent, OutputDevice* pOut,
   const Point& rPt, const Size& rSz, sal_uLong 
nExtraData,
   OutputDevice* pFirstFrameOutDev = nullptr );
+ImplAnimView(ImplAnimView&&) = delete;
 ~ImplAnimView();
 
 boolmatches(const OutputDevice* pOut, tools::Long nExtraData) 
const;


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

2022-05-09 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_txtnode.mk |1 +
 sw/qa/core/txtnode/txtnode.cxx|   25 +
 sw/source/core/txtnode/ndtxt.cxx  |   31 +++
 3 files changed, 57 insertions(+)

New commits:
commit 715905b2c596befa6a92013f75b2685569f706b5
Author: Miklos Vajna 
AuthorDate: Fri May 6 15:21:45 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon May 9 11:54:48 2022 +0200

sw: don't copy useless char escapement to next node on split

Unless autocorrect notices such a just-typed content, pressing enter at
the end of a paragraph which ends with superscript or subscript text
will carry over that formatting to the next paragraph, which is hardly
wanted by any user. Technically this is not copying: paragraph split
works by creating a next text node, moving all content & formatting to
this next node, then move part of the content back to the previous node,
which is all content in case of an enter at the end of a paragraph.

Copying character formatting over to the next text node makes sense:
e.g. paragraph alignment or boldness is probably something a user wants
to continue using in the next text node. But superscript is typically
created by autocorrect in English text for "1st" and similar input, this
is usually unwanted in the next paragraph.

Fix the problem by special-casing the RES_CHRATR_ESCAPEMENT case and
remove the matching SvxEscapementItem from the hints of the just created
next paragraph in case it's there.

A possible future improvement would be to support this when there are
other active (direct formatting) hints, in which case going via
SwDoc::ResetAttrs() is probably a better choice, but the effects of that
for undo and redlining is not clear.

Change-Id: I57feb99d9a31f16c277eba44f464ab49936b65aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133936
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 71019ec15bd3fe15385443b68614fd2402e0040f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133867
Reviewed-by: Xisco Fauli 

diff --git a/sw/CppunitTest_sw_core_txtnode.mk 
b/sw/CppunitTest_sw_core_txtnode.mk
index 54aa0865cce3..441e415267b7 100644
--- a/sw/CppunitTest_sw_core_txtnode.mk
+++ b/sw/CppunitTest_sw_core_txtnode.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_txtnode, \
 comphelper \
 cppu \
 cppuhelper \
+editeng \
 sal \
 sfx \
 svxcore \
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
index 72763909122f..ed8759112ae1 100644
--- a/sw/qa/core/txtnode/txtnode.cxx
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -183,6 +184,30 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testFlyAnchorUndo)
 CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testSplitNodeSuperscriptCopy)
+{
+// Given a document with superscript text at the end of a paragraph:
+SwDoc* pDoc = createSwDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Insert("1st");
+pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 2, 
/*bBasicCall=*/false);
+SfxItemSetFixed 
aSet(pWrtShell->GetAttrPool());
+SvxEscapementItem aItem(SvxEscapement::Superscript, RES_CHRATR_ESCAPEMENT);
+aSet.Put(aItem);
+pWrtShell->SetAttrSet(aSet);
+
+// When hitting enter at the end of the paragraph:
+pWrtShell->SttEndDoc(/*bStt=*/false);
+pWrtShell->SplitNode(/*bAutoFormat=*/true);
+
+// Then make sure that the superscript formatting doesn't appear on the 
next paragraph:
+aSet.ClearItem(RES_CHRATR_ESCAPEMENT);
+pWrtShell->GetCurAttr(aSet);
+// Without the accompanying fix in place, this test would have failed, the 
unexpected
+// superscript appeared in the next paragraph.
+CPPUNIT_ASSERT(!aSet.HasItem(RES_CHRATR_ESCAPEMENT));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 5c8a501386fa..0b05bd0d5cb8 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -699,6 +699,37 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition 
& rPos,
 }
 }
 
+// pNode is the previous node, 'this' is the next node from the split.
+if (nSplitPos == nTextLen && m_pSwpHints)
+{
+// We just created an empty next node: avoid unwanted superscript in 
the new node if it's
+// there.
+for (size_t i = 0; i < m_pSwpHints->Count(); ++i)
+{
+SwTextAttr* pHt = m_pSwpHints->Get(i);
+if (pHt->Which() != RES_TXTATR_AUTOFMT)
+{
+continue;
+}
+
+const sal_Int32* pEnd = pHt->GetEnd();
+if (!pEnd || p

[Libreoffice-commits] core.git: include/xmloff schema/libreoffice xmloff/qa xmloff/source

2022-05-09 Thread Miklos Vajna (via logerrit)
 include/xmloff/xmltoken.hxx |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   10 +
 xmloff/qa/unit/data/content-control-dropdown.fodt   |8 
 xmloff/qa/unit/text.cxx |  107 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/text/txtparae.cxx |   26 ++
 xmloff/source/text/xmlcontentcontrolcontext.cxx |   60 ++
 xmloff/source/text/xmlcontentcontrolcontext.hxx |   19 ++
 xmloff/source/token/tokens.txt  |1 
 9 files changed, 232 insertions(+), 1 deletion(-)

New commits:
commit c3f4c43694f0f9aec35193ccf40f0e7c8476fdc3
Author: Miklos Vajna 
AuthorDate: Mon May 9 10:14:29 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 9 11:16:54 2022 +0200

sw content controls, drop-down: add ODT filter

Map each list item to a dedicated XML element:



And do the opposite on import.

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

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 5d1dc09e9937..cb088d6cb966 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3493,6 +3493,7 @@ namespace xmloff::token {
 XML_SHOWING_PLACE_HOLDER,
 XML_CHECKED_STATE,
 XML_UNCHECKED_STATE,
+XML_DISPLAY_TEXT,
 
 XML_TOKEN_END
 };
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index cc9db62a04a3..f46fca27ffb8 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -2844,6 +2844,16 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
 
   
+  
+
+  
+
+  
+  
+
+  
+
+  
   
 
   
diff --git a/xmloff/qa/unit/data/content-control-dropdown.fodt 
b/xmloff/qa/unit/data/content-control-dropdown.fodt
new file mode 100644
index ..97344d1e8bec
--- /dev/null
+++ b/xmloff/qa/unit/data/content-control-dropdown.fodt
@@ -0,0 +1,8 @@
+
+
+  
+
+  choose a color
+
+  
+
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index ba932d77b069..861a9230d609 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -12,6 +12,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -537,6 +538,112 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, 
testCheckboxContentControlImport)
 CPPUNIT_ASSERT_EQUAL(OUString(u"☒"), xContent->getString());
 }
 
+CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlExport)
+{
+// Given a document with a dropdown content control around a text portion:
+getComponent() = loadFromDesktop("private:factory/swriter");
+uno::Reference xMSF(getComponent(), 
uno::UNO_QUERY);
+uno::Reference xTextDocument(getComponent(), 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertString(xCursor, "choose an item", /*bAbsorb=*/false);
+xCursor->gotoStart(/*bExpand=*/false);
+xCursor->gotoEnd(/*bExpand=*/true);
+uno::Reference xContentControl(
+xMSF->createInstance("com.sun.star.text.ContentControl"), 
uno::UNO_QUERY);
+uno::Reference xContentControlProps(xContentControl, 
uno::UNO_QUERY);
+{
+uno::Sequence aListItems = {
+{
+comphelper::makePropertyValue("DisplayText", 
uno::Any(OUString("red"))),
+comphelper::makePropertyValue("Value", 
uno::Any(OUString("R"))),
+},
+{
+comphelper::makePropertyValue("DisplayText", 
uno::Any(OUString("green"))),
+comphelper::makePropertyValue("Value", 
uno::Any(OUString("G"))),
+},
+{
+comphelper::makePropertyValue("DisplayText", 
uno::Any(OUString("blue"))),
+comphelper::makePropertyValue("Value", 
uno::Any(OUString("B"))),
+},
+};
+xContentControlProps->setPropertyValue("ListItems", 
uno::Any(aListItems));
+}
+xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+// When exporting to ODT:
+uno::Reference xStorable(getComponent(), uno::UNO_QUERY);
+uno::Sequence aStoreProps = 
comphelper::InitPropertySequence({
+{ "FilterName", uno::Any(OUString("writer8")) },
+});
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
+validate(aTempFile.GetFileName(), test::ODF);
+
+// Then make su

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

2022-05-09 Thread xuenhua (via logerrit)
 vcl/osx/salmenu.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a2dad54834e885891bc56a83b03767869e646817
Author: xuenhua 
AuthorDate: Sat May 7 16:53:54 2022 +0800
Commit: Caolán McNamara 
CommitDate: Mon May 9 11:15:06 2022 +0200

Delete CJK-style mnemonics on macOS

Delete CJK-style mnemonics for the dropdown menu of the 'New button' and 
lower menu of 'File > New' on macOS

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

diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 12291be3df83..92b1d44abdd4 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -855,7 +855,8 @@ AquaSalMenuItem::AquaSalMenuItem( const SalItemParams* 
pItemData ) :
 [mpMenuItem setEnabled: YES];
 
 // peel mnemonics because on mac there are no such things for menu 
items
-NSString* pString = CreateNSString( pItemData->aText.replaceAll( "~", 
"" ) );
+// Delete CJK-style mnemonics for the dropdown menu of the 'New 
button' and lower menu of 'File > New'
+NSString* pString = 
CreateNSString(MnemonicGenerator::EraseAllMnemonicChars((pItemData->aText)));
 if (pString)
 {
 [mpMenuItem setTitle: pString];


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

2022-05-09 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/queryparam.cxx |   29 +
 1 file changed, 25 insertions(+), 4 deletions(-)

New commits:
commit f52f599518b5b3aef78b7af1d3a62996eec53a1f
Author: Eike Rathke 
AuthorDate: Sun May 8 00:55:12 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon May 9 11:11:41 2022 +0200

Resolves: tdf#148948 Use QueryBy(Non)Empty for "=" and "<>" criteria

Change-Id: I94e29370076fff977b6552d10883878633bee313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134000
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 920a083f3818765528899ab38170db5a2917a06c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134054
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/core/tool/queryparam.cxx 
b/sc/source/core/tool/queryparam.cxx
index 918bb0d5cdab..9890b2125c07 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -229,6 +229,8 @@ void ScQueryParamBase::FillInExcelSyntax(
 
 ScQueryEntry& rEntry = GetEntry(nIndex);
 ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+bool bByEmpty = false;
+bool bByNonEmpty = false;
 
 if (rCellStr.isEmpty())
 rItem.maString = svl::SharedString::getEmptyString();
@@ -242,6 +244,8 @@ void ScQueryParamBase::FillInExcelSyntax(
 {
 rItem.maString = rPool.intern(rCellStr.copy(2));
 rEntry.eOp   = SC_NOT_EQUAL;
+if (rCellStr.getLength() == 2)
+bByNonEmpty = true;
 }
 else if (rCellStr.getLength() > 1 && rCellStr[1] == '=')
 {
@@ -270,7 +274,11 @@ void ScQueryParamBase::FillInExcelSyntax(
 else
 {
 if (rCellStr[0] == '=')
+{
 rItem.maString = rPool.intern(rCellStr.copy(1));
+if (rCellStr.getLength() == 1)
+bByEmpty = true;
+}
 else
 rItem.maString = rPool.intern(rCellStr);
 rEntry.eOp = SC_EQUAL;
@@ -280,19 +288,32 @@ void ScQueryParamBase::FillInExcelSyntax(
 if (!pFormatter)
 return;
 
-sal_uInt32 nFormat = 0;
-bool bNumber = pFormatter->IsNumberFormat( rItem.maString.getString(), 
nFormat, rItem.mfVal);
-rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
-
 /* TODO: pFormatter currently is also used as a flag whether matching
  * empty cells with an empty string is triggered from the interpreter.
  * This could be handled independently if all queries should support
  * it, needs to be evaluated if that actually is desired. */
 
+// Interpreter queries have only one query, also QueryByEmpty and
+// QueryByNonEmpty rely on that.
+if (nIndex != 0)
+return;
+
 // (empty = empty) is a match, and (empty <> not-empty) also is a
 // match. (empty = 0) is not a match.
 rItem.mbMatchEmpty = ((rEntry.eOp == SC_EQUAL && rItem.maString.isEmpty())
 || (rEntry.eOp == SC_NOT_EQUAL && !rItem.maString.isEmpty()));
+
+// SetQueryBy override item members with special values, so do this last.
+if (bByEmpty)
+rEntry.SetQueryByEmpty();
+else if (bByNonEmpty)
+rEntry.SetQueryByNonEmpty();
+else
+{
+sal_uInt32 nFormat = 0;
+bool bNumber = pFormatter->IsNumberFormat( rItem.maString.getString(), 
nFormat, rItem.mfVal);
+rItem.meType = bNumber ? ScQueryEntry::ByValue : 
ScQueryEntry::ByString;
+}
 }
 
 ScQueryParamTable::ScQueryParamTable() :


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

2022-05-09 Thread Bartosz Kosiorek (via logerrit)
 drawinglayer/source/tools/wmfemfhelper.cxx |   11 -
 emfio/inc/mtftools.hxx |   79 +++-
 emfio/qa/cppunit/emf/EmfImportTest.cxx |   19 +++
 emfio/qa/cppunit/wmf/data/TestLineTo.wmf   |binary
 emfio/source/reader/emfreader.cxx  |  180 ++---
 emfio/source/reader/wmfreader.cxx  |   65 --
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   12 -
 7 files changed, 120 insertions(+), 246 deletions(-)

New commits:
commit 32cb4e4fe55e662d2e515e9a6facabffe3684754
Author: Bartosz Kosiorek 
AuthorDate: Fri Apr 29 13:36:10 2022 +0200
Commit: Bartosz Kosiorek 
CommitDate: Mon May 9 11:08:25 2022 +0200

tdf#89331 EMF/WMF Fix holes in lines created with LINETO

If the lines are created with MOVETO, LINETO, LINETO...
then Line Join NONE is applied. As a result the charts are looks ugly,
with the holes inside it.
For example:
https://bugs.documentfoundation.org/attachment.cgi?id=179962
and
https://bugs.documentfoundation.org/attachment.cgi?id=179837

Additinally commit changed default line join style to miter,
as during experimenting with MS Paint and MS Word,
it appear that default Join Style is PS_JOIN_MITER and
Line Cap is Flat/Butter.

The PDF export tests has been updated, as there is less number
of PDF object after using joiners.
The size of the exported tdf145873.pptx to PDF,
was slighltly decreased from 22.8kB to 22.0KB

Change-Id: I131cc3c5e90f827d67d2360eb18167eed6315abb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133624
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index 592e67bab9a5..1f5b8a10fcf2 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1548,7 +1548,6 @@ namespace wmfemfhelper
 }
 else
 {
-
aLineInfo.SetLineJoin(basegfx::B2DLineJoin::NONE); // It were lines; force to 
NONE
 createLinePrimitive(aLinePolygon, 
aLineInfo, rTargetHolders.Current(), rPropertyHolders.Current());
 aLinePolygon.clear();
 aLineInfo = pA->GetLineInfo();
@@ -1563,16 +1562,14 @@ namespace wmfemfhelper
 aLinePolygon.append(aEnd);
 }
 
-nAction++; if(nAction < nCount) pAction = 
rMetaFile.GetAction(nAction);
+nAction++;
+if (nAction < nCount)
+pAction = rMetaFile.GetAction(nAction);
 }
 
 nAction--;
-
-if(aLinePolygon.count())
-{
-aLineInfo.SetLineJoin(basegfx::B2DLineJoin::NONE); 
// It were lines; force to NONE
+if (aLinePolygon.count())
 createLinePrimitive(aLinePolygon, aLineInfo, 
rTargetHolders.Current(), rPropertyHolders.Current());
-}
 }
 
 break;
diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx
index 0290c487c574..997f2287f010 100644
--- a/emfio/inc/mtftools.hxx
+++ b/emfio/inc/mtftools.hxx
@@ -204,8 +204,6 @@ namespace emfio
 enum PenStyle : sal_uInt32
 {
 PS_COSMETIC  = 0x,
-PS_ENDCAP_ROUND  = 0x,
-PS_JOIN_ROUND= 0x,
 PS_SOLID = 0x,
 PS_DASH  = 0x0001,
 PS_DOT   = 0x0002,
@@ -216,12 +214,17 @@ namespace emfio
 PS_USERSTYLE = 0x0007,
 PS_ALTERNATE = 0x0008,
 PS_STYLE_MASK= 0x000F,
+
+PS_ENDCAP_ROUND  = 0x,
 PS_ENDCAP_SQUARE = 0x0100,
 PS_ENDCAP_FLAT   = 0x0200,
 PS_ENDCAP_STYLE_MASK = 0x0F00,
+
+PS_JOIN_ROUND= 0x,
 PS_JOIN_BEVEL= 0x1000,
 PS_JOIN_MITER= 0x2000,
 PS_JOIN_STYLE_MASK   = 0xF000,
+
 PS_GEOMETRIC = 0x0001
 };
 
@@ -461,11 +464,75 @@ namespace emfio
 , bTransparent(bTrans)
 {}
 
-WinMtfLineStyle(const Color& rColor, const LineInfo& rStyle, bool 
bTrans)
+WinMtfLineStyle(const Color& rColor, const sal_uInt32 nStyle, const 
sal_Int32 nPenWidth)
 : aLineColor(rColor)
-, aLineInfo(rStyle)
-, bTransparent(bTrans)
-{}
+{
+// According to documentation: nStyle = PS_COSMETIC = 0x0 - line 
with a width of one logical unit and a style that is a solid 

[Libreoffice-commits] core.git: bin/oss-fuzz-build.sh

2022-05-09 Thread Caolán McNamara (via logerrit)
 bin/oss-fuzz-build.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d4ec15d5b7c64cd62b6f729c1334c167da5886b4
Author: Caolán McNamara 
AuthorDate: Sun May 8 21:29:10 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 9 10:22:05 2022 +0200

rsc is no more, but concat-deps leaks instead so still need this

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

diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh
index 3d0685f88e2a..d0a206e33bb9 100755
--- a/bin/oss-fuzz-build.sh
+++ b/bin/oss-fuzz-build.sh
@@ -28,7 +28,7 @@ export CC_FOR_BUILD="$CC"
 #similarly force the -fsanitize etc args in as well as pthread to get
 #things to link successfully during the build
 export LDFLAGS="$CFLAGS -Wl,--compress-debug-sections,zlib -lpthread"
-#build-time rsc tool leaks a titch
+#build-time concat-deps tool leaks a titch
 export ASAN_OPTIONS="detect_leaks=0"
 
 cd $WORK


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

2022-05-09 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |   79 +
 1 file changed, 47 insertions(+), 32 deletions(-)

New commits:
commit 061fbad1e33f68726ee5605c7903f4ae219d8539
Author: Michael Stahl 
AuthorDate: Wed May 4 18:04:14 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Mon May 9 10:19:59 2022 +0200

ucb: webdav-curl: if LOCK fails, display error message

Sharepoint may reject LOCK with HTTP/1.1 403 FORBIDDEN
and then a dialog pops up via UUIInteractionHelper that says
"Server error message: ."

Let's actually put some error message in the dialog, why not the
HTTP status line, plus a little prefix to see which method failed.

Change-Id: Ied895787f813c5cddcb18eb4f693d5bfc8c62076
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133835
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit cb64a52afc92891ab853b9bb1294610bb9ca98d0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133856
Reviewed-by: Thorsten Behrens 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 66232a73a15f..ef3241f1c3dc 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -19,6 +19,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -754,15 +755,15 @@ struct CurlProcessor
 static auto URIReferenceToURI(CurlSession& rSession, OUString const& 
rURIReference) -> CurlUri;
 
 static auto ProcessRequestImpl(
-CurlSession& rSession, CurlUri const& rURI, curl_slist* 
pRequestHeaderList,
-uno::Reference const* pxOutStream,
+CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+curl_slist* pRequestHeaderList, uno::Reference 
const* pxOutStream,
 uno::Sequence const* pInData,
 ::std::pair<::std::vector const&, DAVResource&> const* 
pRequestedHeaders,
 ResponseHeaders& rHeaders) -> void;
 
 static auto ProcessRequest(
-CurlSession& rSession, CurlUri const& rURI, ::std::vector 
const& rOptions,
-DAVRequestEnvironment const* pEnv,
+CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+::std::vector const& rOptions, DAVRequestEnvironment 
const* pEnv,
 ::std::unique_ptr>
 pRequestHeaderList,
 uno::Reference const* pxOutStream,
@@ -809,7 +810,8 @@ auto CurlProcessor::URIReferenceToURI(CurlSession& 
rSession, OUString const& rUR
 
 /// main function to initiate libcurl requests
 auto CurlProcessor::ProcessRequestImpl(
-CurlSession& rSession, CurlUri const& rURI, curl_slist* const 
pRequestHeaderList,
+CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+curl_slist* const pRequestHeaderList,
 uno::Reference const* const pxOutStream,
 uno::Sequence const* const pInData,
 ::std::pair<::std::vector const&, DAVResource&> const* const 
pRequestedHeaders,
@@ -1009,6 +1011,14 @@ auto CurlProcessor::ProcessRequestImpl(
 }
 else
 {
+// create message containing the HTTP method and response status line
+OUString statusLine("\n" + rMethod + "\n=>\n");
+if (!rHeaders.HeaderFields.empty() && 
!rHeaders.HeaderFields.back().first.empty()
+&& rHeaders.HeaderFields.back().first.front().startsWith("HTTP"))
+{
+statusLine += ::rtl::OStringToOUString(
+rHeaders.HeaderFields.back().first.front().trim(), 
RTL_TEXTENCODING_ASCII_US);
+}
 switch (statusCode)
 {
 case SC_REQUEST_TIMEOUT:
@@ -1043,7 +1053,7 @@ auto CurlProcessor::ProcessRequestImpl(
 [[fallthrough]];
 }
 default:
-throw DAVException(DAVException::DAV_HTTP_ERROR, "", 
statusCode);
+throw DAVException(DAVException::DAV_HTTP_ERROR, statusLine, 
statusCode);
 }
 }
 
@@ -1100,8 +1110,8 @@ static auto TryRemoveExpiredLockToken(CurlSession& 
rSession, CurlUri const& rURI
 }
 
 auto CurlProcessor::ProcessRequest(
-CurlSession& rSession, CurlUri const& rURI, ::std::vector 
const& rOptions,
-DAVRequestEnvironment const* const pEnv,
+CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+::std::vector const& rOptions, DAVRequestEnvironment const* 
const pEnv,
 ::std::unique_ptr>
 pRequestHeaderList,
 uno::Reference const* const pxOutStream,
@@ -1295,7 +1305,7 @@ auto CurlProcessor::ProcessRequest(
 
 try
 {
-ProcessRequestImpl(rSession, rURI, pRequestHeaderList.get(), 
&xTempOutStream,
+ProcessRequestImpl(rSession, rURI, rMethod, 
pRequestHeaderList.get(), &xTempOutStream,
pxInStream ? &data : nullptr, 
pRequestedHeaders, headers);
 if (pxOutStream)
 { // only copy to result stream if transfer was successful
@@ -1484,7 +1494,8 @@ auto CurlSession:

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

2022-05-09 Thread Noel Grandin (via logerrit)
 vcl/inc/salusereventlist.hxx|   14 ++
 vcl/source/app/salusereventlist.cxx |   16 
 2 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 90523fd368cf249cb00bd1d881a2a19e1510ca85
Author: Noel Grandin 
AuthorDate: Thu May 5 22:22:51 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon May 9 10:18:41 2022 +0200

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

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

diff --git a/vcl/inc/salusereventlist.hxx b/vcl/inc/salusereventlist.hxx
index cc5aa88c930c..864802c50a0b 100644
--- a/vcl/inc/salusereventlist.hxx
+++ b/vcl/inc/salusereventlist.hxx
@@ -22,7 +22,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -57,7 +57,7 @@ public:
 };
 
 protected:
-mutable osl::Mutex m_aUserEventsMutex;
+mutable std::mutex m_aUserEventsMutex;
 std::list< SalUserEvent >  m_aUserEvents;
 std::list< SalUserEvent >  m_aProcessingUserEvents;
 bool   m_bAllUserEventProcessedSignaled;
@@ -68,6 +68,7 @@ protected:
 virtual void TriggerUserEventProcessing() = 0;
 virtual void TriggerAllUserEventsProcessed() {}
 
+inline bool HasUserEvents_NoLock() const;
 public:
 SalUserEventList();
 virtual ~SalUserEventList() COVERITY_NOEXCEPT_FALSE;
@@ -100,13 +101,18 @@ inline bool SalUserEventList::isFrameAlive( const 
SalFrame* pFrame ) const
 
 inline bool SalUserEventList::HasUserEvents() const
 {
-osl::MutexGuard aGuard( m_aUserEventsMutex );
+std::unique_lock aGuard( m_aUserEventsMutex );
+return HasUserEvents_NoLock();
+}
+
+inline bool SalUserEventList::HasUserEvents_NoLock() const
+{
 return !(m_aUserEvents.empty() && m_aProcessingUserEvents.empty());
 }
 
 inline void SalUserEventList::PostEvent( SalFrame* pFrame, void* pData, 
SalEvent nEvent )
 {
-osl::MutexGuard aGuard( m_aUserEventsMutex );
+std::unique_lock aGuard( m_aUserEventsMutex );
 m_aUserEvents.push_back( SalUserEvent( pFrame, pData, nEvent ) );
 m_bAllUserEventProcessedSignaled = false;
 TriggerUserEventProcessing();
diff --git a/vcl/source/app/salusereventlist.cxx 
b/vcl/source/app/salusereventlist.cxx
index 949467ae218c..1e3f78cc43bf 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -62,7 +62,7 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 oslThreadIdentifier aCurId = osl::Thread::getCurrentIdentifier();
 
 DBG_TESTSOLARMUTEX();
-osl::ResettableMutexGuard aResettableListGuard(m_aUserEventsMutex);
+std::unique_lock aResettableListGuard(m_aUserEventsMutex);
 
 if (!m_aUserEvents.empty())
 {
@@ -80,7 +80,7 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 }
 }
 
-if (HasUserEvents())
+if (HasUserEvents_NoLock())
 {
 bWasEvent = true;
 m_aProcessingThread = aCurId;
@@ -93,13 +93,13 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 m_aProcessingUserEvents.pop_front();
 
 // remember to reset the guard before break or continue the loop
-aResettableListGuard.clear();
+aResettableListGuard.unlock();
 
 if ( !isFrameAlive( aEvent.m_pFrame ) )
 {
 if ( aEvent.m_nEvent == SalEvent::UserEvent )
 delete static_cast< ImplSVEvent* >( aEvent.m_pData );
-aResettableListGuard.reset();
+aResettableListGuard.lock();
 continue;
 }
 
@@ -119,14 +119,14 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 auto process = [&aEvent, this] () noexcept { ProcessEvent(aEvent); 
};
 process();
 #endif
-aResettableListGuard.reset();
+aResettableListGuard.lock();
 if (!bHandleAllCurrentEvents)
 break;
 }
 while( true );
 }
 
-if ( !m_bAllUserEventProcessedSignaled && !HasUserEvents() )
+if ( !m_bAllUserEventProcessedSignaled && !HasUserEvents_NoLock() )
 {
 m_bAllUserEventProcessedSignaled = true;
 TriggerAllUserEventsProcessed();
@@ -139,7 +139,7 @@ void SalUserEventList::RemoveEvent( SalFrame* pFrame, void* 
pData, SalEvent nEve
 {
 SalUserEvent aEvent( pFrame, pData, nEvent );
 
-osl::MutexGuard aGuard( m_aUserEventsMutex );
+std::unique_lock aGuard( m_aUserEventsMutex );
 auto it = std::find( m_aUserEvents.begin(), m_aUserEvents.end(), aEvent );
 if ( it != m_aUserEvents.end() )
 {
@@ -154,7 +154,7 @@ void SalUserEventList::RemoveEvent( SalFrame* pFrame, void* 
pData, SalEvent nEve
 }
 }
 
-if ( !m_bAllUserEventProcessedSignaled && !HasUserEvents() )
+if ( !m_bAllUserEventProcess

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

2022-05-09 Thread Noel Grandin (via logerrit)
 desktop/source/offacc/acceptor.cxx |8 
 desktop/source/offacc/acceptor.hxx |5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 7537c81fd6a141a6e04b0de00608f147ca9ea7dc
Author: Noel Grandin 
AuthorDate: Sun May 8 19:48:31 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon May 9 10:17:38 2022 +0200

osl::Mutex->std::mutex in desktop::Acceptor

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

diff --git a/desktop/source/offacc/acceptor.cxx 
b/desktop/source/offacc/acceptor.cxx
index 8c6cdbff0461..66afe6c18bb4 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -63,7 +63,7 @@ Acceptor::~Acceptor()
 m_rAcceptor->stopAccepting();
 oslThread t;
 {
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 t = m_thread;
 }
 //prevent locking if the thread is still waiting
@@ -75,7 +75,7 @@ Acceptor::~Acceptor()
 // Make the final state of m_bridges visible to this thread (since
 // m_thread is joined, the code that follows is the only one left
 // accessing m_bridges):
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 }
 for (;;) {
 css::uno::Reference< css::bridge::XBridge > b(m_bridges.remove());
@@ -118,7 +118,7 @@ void Acceptor::run()
 // the bridge, it will be destructed.
 Reference< XBridge > rBridge = m_rBridgeFactory->createBridge(
 "", m_aProtocol, rConnection, rInstanceProvider);
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 m_bridges.add(rBridge);
 } catch (const Exception&) {
 TOOLS_WARN_EXCEPTION("desktop.offacc", "");
@@ -133,7 +133,7 @@ void Acceptor::run()
 void Acceptor::initialize( const Sequence& aArguments )
 {
 // prevent multiple initialization
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 SAL_INFO( "desktop.offacc", "Acceptor::initialize()" );
 
 bool bOk = false;
diff --git a/desktop/source/offacc/acceptor.hxx 
b/desktop/source/offacc/acceptor.hxx
index 36b3e181cc93..9e210459a544 100644
--- a/desktop/source/offacc/acceptor.hxx
+++ b/desktop/source/offacc/acceptor.hxx
@@ -30,10 +30,11 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 
+#include 
+
 namespace com::sun::star::uno { class XComponentContext; }
 
 namespace desktop {
@@ -42,7 +43,7 @@ class  Acceptor
 : public ::cppu::WeakImplHelper
 {
 private:
-osl::Mutex m_aMutex;
+std::mutex m_aMutex;
 
 oslThread m_thread;
 comphelper::WeakBag< css::bridge::XBridge > m_bridges;


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

2022-05-09 Thread Noel Grandin (via logerrit)
 cppuhelper/source/servicemanager.cxx |   12 ++--
 cppuhelper/source/servicemanager.hxx |4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 9277faf14a713b8ae88596785874bdcdfc47957c
Author: Noel Grandin 
AuthorDate: Sun May 8 19:45:23 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon May 9 10:16:39 2022 +0200

osl::Mutex->std::mutex in cppuhelper::ServiceManager

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

diff --git a/cppuhelper/source/servicemanager.cxx 
b/cppuhelper/source/servicemanager.cxx
index 12167739da8d..1a0e85780b21 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -665,7 +665,7 @@ 
cppuhelper::ServiceManager::Data::Implementation::createInstance(
 {
 css::uno::Reference inst;
 if (isSingleInstance) {
-osl::MutexGuard g(mutex);
+std::unique_lock g(mutex);
 if (!singleInstance.is()) {
 singleInstance = doCreateInstance(context);
 }
@@ -684,7 +684,7 @@ 
cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments(
 {
 css::uno::Reference inst;
 if (isSingleInstance) {
-osl::MutexGuard g(mutex);
+std::unique_lock g(mutex);
 if (!singleInstance.is()) {
 singleInstance = doCreateInstanceWithArguments(context, arguments);
 }
@@ -751,14 +751,14 @@ void 
cppuhelper::ServiceManager::Data::Implementation::updateDisposeInstance(
 // at most one of the instances obtained via the service manager, in case
 // the implementation hands out different instances):
 if (singletonRequest) {
-osl::MutexGuard g(mutex);
+std::unique_lock g(mutex);
 disposeInstance.clear();
 dispose = false;
 } else if (shallDispose()) {
 css::uno::Reference comp(
 instance, css::uno::UNO_QUERY);
 if (comp.is()) {
-osl::MutexGuard g(mutex);
+std::unique_lock g(mutex);
 if (dispose) {
 disposeInstance = comp;
 }
@@ -891,7 +891,7 @@ void cppuhelper::ServiceManager::disposing() {
 {
 assert(rEntry.second);
 if (rEntry.second->shallDispose()) {
-osl::MutexGuard g2(rEntry.second->mutex);
+std::unique_lock g2(rEntry.second->mutex);
 if (rEntry.second->disposeInstance.is()) {
 sngls.push_back(rEntry.second->disposeInstance);
 }
@@ -901,7 +901,7 @@ void cppuhelper::ServiceManager::disposing() {
 {
 assert(rEntry.second);
 if (rEntry.second->shallDispose()) {
-osl::MutexGuard g2(rEntry.second->mutex);
+std::unique_lock g2(rEntry.second->mutex);
 if (rEntry.second->disposeInstance.is()) {
 sngls.push_back(rEntry.second->disposeInstance);
 }
diff --git a/cppuhelper/source/servicemanager.hxx 
b/cppuhelper/source/servicemanager.hxx
index 2228cd1fbbf1..b47d188ca82b 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -29,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace com::sun::star::lang {
@@ -146,7 +146,7 @@ public:
 css::uno::Reference< css::lang::XComponent > component;
 Status status;
 
-osl::Mutex mutex;
+std::mutex mutex;
 css::uno::Reference singleInstance;
 css::uno::Reference< css::lang::XComponent > disposeInstance;
 bool dispose;


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

2022-05-09 Thread Noel Grandin (via logerrit)
 cppu/source/uno/lbmap.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f0ed5d46373f34a78a260617cf22606f7fd3c399
Author: Noel Grandin 
AuthorDate: Sun May 8 19:40:03 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon May 9 10:15:24 2022 +0200

osl::Mutex->std::mutex in cppu::MappingsData

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

diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 43818eb85025..102ef135ef1a 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -154,7 +154,7 @@ struct MappingsData
 t_OUString2EntryaName2Entry;
 t_Mapping2Entry aMapping2Entry;
 
-Mutex   aCallbacksMutex;
+std::mutex  aCallbacksMutex;
 std::set< uno_getMappingFunc >
 aCallbacks;
 
@@ -621,7 +621,7 @@ void SAL_CALL uno_getMapping(
 
 // try callback chain
 {
-MutexGuard aGuard(rData.aCallbacksMutex);
+std::unique_lock aGuard(rData.aCallbacksMutex);
 for (const auto& rCallback : rData.aCallbacks)
 {
 (*rCallback)(ppMapping, pFrom, pTo, aAddPurpose.pData);
@@ -735,7 +735,7 @@ void SAL_CALL uno_registerMappingCallback(
 {
 OSL_ENSURE( pCallback, "### null ptr!" );
 MappingsData & rData = getMappingsData();
-MutexGuard aGuard( rData.aCallbacksMutex );
+std::unique_lock aGuard( rData.aCallbacksMutex );
 rData.aCallbacks.insert( pCallback );
 }
 
@@ -745,7 +745,7 @@ void SAL_CALL uno_revokeMappingCallback(
 {
 OSL_ENSURE( pCallback, "### null ptr!" );
 MappingsData & rData = getMappingsData();
-MutexGuard aGuard( rData.aCallbacksMutex );
+std::unique_lock aGuard( rData.aCallbacksMutex );
 rData.aCallbacks.erase( pCallback );
 }
 } // extern "C"


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

2022-05-09 Thread Miklos Vajna (via logerrit)
 sw/source/filter/inc/rtf.hxx   |   10 +-
 sw/source/filter/ww8/WW8Sttbf.hxx  |8 
 sw/source/filter/ww8/rtfexport.cxx |2 +-
 sw/source/filter/ww8/wrtw8esh.cxx  |2 +-
 sw/source/filter/ww8/wrtw8sty.cxx  |2 +-
 sw/source/filter/ww8/wrtww8.hxx|4 ++--
 sw/source/filter/ww8/ww8par.hxx|2 +-
 sw/source/filter/ww8/ww8par3.cxx   |2 +-
 8 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit c06b2ac50ec198a4c75345c15103541ab45462a4
Author: Miklos Vajna 
AuthorDate: Mon May 9 08:11:56 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 9 10:13:13 2022 +0200

sw: prefix members of RTFSurround, SwMSConvertControls, ww8::WW8Sttb and ...

... wwFontHelper

See tdf#94879 for motivation.

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

diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index f0bff55c5923..ed64c08b76eb 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -31,17 +31,17 @@ class RTFSurround
 sal_uInt8 nJunk : 3;
 } Flags;
 sal_uInt8 nVal;
-} Value;
+} m_Value;
 
 public:
 RTFSurround(bool bGoldCut, sal_uInt8 nOrder)
 {
-Value.Flags.nGoldCut = sal_uInt8(bGoldCut);
-Value.Flags.nOrder = nOrder;
-Value.Flags.nJunk = 0;
+m_Value.Flags.nGoldCut = sal_uInt8(bGoldCut);
+m_Value.Flags.nOrder = nOrder;
+m_Value.Flags.nJunk = 0;
 }
 
-sal_uInt16 GetValue() const { return Value.nVal; }
+sal_uInt16 GetValue() const { return m_Value.nVal; }
 };
 
 #endif // INCLUDED_SW_SOURCE_FILTER_INC_RTF_HXX
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx 
b/sw/source/filter/ww8/WW8Sttbf.hxx
index 3bc04e3d870b..c061362bf829 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -54,7 +54,7 @@ namespace ww8
 class WW8Sttb : public WW8Struct
 {
 typedef std::shared_ptr< void > ExtraPointer_t;
-boolbDoubleByteCharacters;
+boolm_bDoubleByteCharacters;
 std::vector   m_Strings;
 std::vector< ExtraPointer_t >   m_Extras;
 
@@ -70,13 +70,13 @@ namespace ww8
 
 template 
 WW8Sttb::WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize)
-: WW8Struct(rSt, nPos, nSize), bDoubleByteCharacters(false)
+: WW8Struct(rSt, nPos, nSize), m_bDoubleByteCharacters(false)
 {
 sal_uInt32 nOffset = 0;
 
 if (getU16(nOffset) == 0x)
 {
-bDoubleByteCharacters = true;
+m_bDoubleByteCharacters = true;
 nOffset += 2;
 }
 
@@ -86,7 +86,7 @@ namespace ww8
 nOffset += 4;
 for (sal_uInt16 i = 0; i < nCount; i++)
 {
-if (bDoubleByteCharacters)
+if (m_bDoubleByteCharacters)
 {
 sal_uInt16 nStrLen = getU16(nOffset);
 
diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 6c8880aca65d..e3a05b346bda 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1044,7 +1044,7 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc& 
rDocument,
 // that just causes problems for RTF
 m_bSubstituteBullets = false;
 // needed to have a complete font table
-m_aFontHelper.bLoadAllFonts = true;
+m_aFontHelper.m_bLoadAllFonts = true;
 // the related SdrExport
 m_pSdrExport = std::make_unique(*this);
 
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index e9a00f95ec89..f776fdc10d2f 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2988,7 +2988,7 @@ sal_uInt32 SwEscherEx::QueryTextID(
 }
 
 SwMSConvertControls::SwMSConvertControls( SfxObjectShell const *pDSh, SwPaM 
*pP ) : oox
-::ole::MSConvertOCXControls(  pDSh ? pDSh->GetModel() : nullptr ), pPaM( pP ), 
mnObjectId(0)
+::ole::MSConvertOCXControls(  pDSh ? pDSh->GetModel() : nullptr ), m_pPaM( pP 
), mnObjectId(0)
 {
 }
 
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 7dc45d1c7114..44d437dbf772 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -896,7 +896,7 @@ void wwFontHelper::InitFontTable(const SwDoc& rDoc)
 pFont->GetFamily(), pFont->GetCharSet()));
 }
 
-if (!bLoadAllFonts)
+if (!m_bLoadAllFonts)
 return;
 
 const sal_uInt16 aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, 
RES_CHRATR_CTL_FONT, 0 };
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 28428a199eb6..f168ad7e2571 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -325,7 +325,7 @@ private:
 std::vector< const wwFont* 

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

2022-05-09 Thread Pranam Lashkari (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit db6c5c7f981a8f18a74d6051555680837adc
Author: Pranam Lashkari 
AuthorDate: Tue Apr 26 22:12:48 2022 +0530
Commit: Pranam Lashkari 
CommitDate: Mon May 9 10:05:42 2022 +0200

svx: calculate object range before using it

Change-Id: I01f0176542e9d6f36a2f7bbc870a9e337705a5a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133454
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit b604f17732b0b31d69781f812357d34f3da7175d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133486
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 1a66760ec6d5..266b3151873f 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -162,7 +162,7 @@ ViewObjectContact::ViewObjectContact(ObjectContact& 
rObjectContact, ViewContact&
 ViewObjectContact::~ViewObjectContact()
 {
 // invalidate in view
-if(!maObjectRange.isEmpty())
+if(!getObjectRange().isEmpty())
 {
 GetObjectContact().InvalidatePartOfView(maObjectRange);
 }
@@ -224,7 +224,7 @@ void ViewObjectContact::ActionChanged()
 // force ObjectRange
 getObjectRange();
 
-if(!maObjectRange.isEmpty())
+if(!getObjectRange().isEmpty())
 {
 // invalidate current valid range
 GetObjectContact().InvalidatePartOfView(maObjectRange);
@@ -251,7 +251,7 @@ void ViewObjectContact::triggerLazyInvalidate()
 // force ObjectRange
 getObjectRange();
 
-if(!maObjectRange.isEmpty())
+if(!getObjectRange().isEmpty())
 {
 // invalidate current valid range
 GetObjectContact().InvalidatePartOfView(maObjectRange);


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

2022-05-09 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/queryparam.cxx |   29 +
 1 file changed, 25 insertions(+), 4 deletions(-)

New commits:
commit 920a083f3818765528899ab38170db5a2917a06c
Author: Eike Rathke 
AuthorDate: Sun May 8 00:55:12 2022 +0200
Commit: Eike Rathke 
CommitDate: Mon May 9 09:46:18 2022 +0200

Resolves: tdf#148948 Use QueryBy(Non)Empty for "=" and "<>" criteria

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

diff --git a/sc/source/core/tool/queryparam.cxx 
b/sc/source/core/tool/queryparam.cxx
index eb479c27bf73..80aa2185c0b3 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -208,6 +208,8 @@ void ScQueryParamBase::FillInExcelSyntax(
 
 ScQueryEntry& rEntry = GetEntry(nIndex);
 ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+bool bByEmpty = false;
+bool bByNonEmpty = false;
 
 if (rCellStr.isEmpty())
 rItem.maString = svl::SharedString::getEmptyString();
@@ -221,6 +223,8 @@ void ScQueryParamBase::FillInExcelSyntax(
 {
 rItem.maString = rPool.intern(rCellStr.copy(2));
 rEntry.eOp   = SC_NOT_EQUAL;
+if (rCellStr.getLength() == 2)
+bByNonEmpty = true;
 }
 else if (rCellStr.getLength() > 1 && rCellStr[1] == '=')
 {
@@ -249,7 +253,11 @@ void ScQueryParamBase::FillInExcelSyntax(
 else
 {
 if (rCellStr[0] == '=')
+{
 rItem.maString = rPool.intern(rCellStr.copy(1));
+if (rCellStr.getLength() == 1)
+bByEmpty = true;
+}
 else
 rItem.maString = rPool.intern(rCellStr);
 rEntry.eOp = SC_EQUAL;
@@ -259,19 +267,32 @@ void ScQueryParamBase::FillInExcelSyntax(
 if (!pFormatter)
 return;
 
-sal_uInt32 nFormat = 0;
-bool bNumber = pFormatter->IsNumberFormat( rItem.maString.getString(), 
nFormat, rItem.mfVal);
-rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
-
 /* TODO: pFormatter currently is also used as a flag whether matching
  * empty cells with an empty string is triggered from the interpreter.
  * This could be handled independently if all queries should support
  * it, needs to be evaluated if that actually is desired. */
 
+// Interpreter queries have only one query, also QueryByEmpty and
+// QueryByNonEmpty rely on that.
+if (nIndex != 0)
+return;
+
 // (empty = empty) is a match, and (empty <> not-empty) also is a
 // match. (empty = 0) is not a match.
 rItem.mbMatchEmpty = ((rEntry.eOp == SC_EQUAL && rItem.maString.isEmpty())
 || (rEntry.eOp == SC_NOT_EQUAL && !rItem.maString.isEmpty()));
+
+// SetQueryBy override item members with special values, so do this last.
+if (bByEmpty)
+rEntry.SetQueryByEmpty();
+else if (bByNonEmpty)
+rEntry.SetQueryByNonEmpty();
+else
+{
+sal_uInt32 nFormat = 0;
+bool bNumber = pFormatter->IsNumberFormat( rItem.maString.getString(), 
nFormat, rItem.mfVal);
+rItem.meType = bNumber ? ScQueryEntry::ByValue : 
ScQueryEntry::ByString;
+}
 }
 
 ScQueryParamTable::ScQueryParamTable() :


[Libreoffice-commits] core.git: config_host/config_skia.h.in

2022-05-09 Thread Luboš Luňák (via logerrit)
 config_host/config_skia.h.in |4 
 1 file changed, 4 insertions(+)

New commits:
commit b06663135f9c7c08f5866a87a1fb0932df5af8bd
Author: Luboš Luňák 
AuthorDate: Mon May 9 07:28:05 2022 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 9 09:14:11 2022 +0200

enable Skia on big-endian too

Without this the build will #error out, and despite the disclaimer
it reportedly works fine.
https://lists.freedesktop.org/archives/libreoffice/2022-May/088838.html

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

diff --git a/config_host/config_skia.h.in b/config_host/config_skia.h.in
index b98ba14d31ec..c81e648a0d6f 100644
--- a/config_host/config_skia.h.in
+++ b/config_host/config_skia.h.in
@@ -62,6 +62,10 @@ are the same.
 // the default X11 visual is actually also BGRA.
 #define SK_R32_SHIFT 16
 
+// Enable skia on big-endian too. Despite the disclaimer it reportedly
+// actually works fine.
+#define I_ACKNOWLEDGE_SKIA_DOES_NOT_SUPPORT_BIG_ENDIAN 1
+
 // Enable Skia's internal checks depending on DBG_UTIL mode. ENABLE_SKIA_DEBUG
 // controls whether to build with or without optimizations (set in Makefile).
 #ifdef DBG_UTIL


Re: Skia on PPC

2022-05-09 Thread Luboš Luňák
On Friday 06 of May 2022, Michael Meeks wrote:
> Hi there,
>
>   Despite the pessimism in the code, PPC Skia seems to be ~working[1]for
> Firefox on PPC and accepting big-endian patches.
>
>   FreeBSD seems to patch the acknowledgement out[2] ;-)
>
>   Firefox has:
>
> #define I_ACKNOWLEDGE_SKIA_DOES_NOT_SUPPORT_BIG_ENDIAN

 Ok, I've added the same to our config.

-- 
 Luboš Luňák
 l.lu...@collabora.com


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

2022-05-09 Thread Luboš Luňák (via logerrit)
 config_host.mk.in  |1 -
 configure.ac   |   20 
 solenv/gbuild/platform/com_GCC_defs.mk |4 
 3 files changed, 25 deletions(-)

New commits:
commit c0f9157cf64242adbc4a9eb7cfac66fffa97e5a2
Author: Luboš Luňák 
AuthorDate: Sun May 8 14:52:10 2022 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 9 09:13:41 2022 +0200

remove HAVE_LIBCPP_DEBUG (libc++ debug mode)

It's currently too broken (https://reviews.llvm.org/D125184),
but they're working on fixing it, so hopefully somewhen later.

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

diff --git a/config_host.mk.in b/config_host.mk.in
index df8205e8ad1d..4d1a98967551 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -305,7 +305,6 @@ export HAVE_GNUMAKE_FILE_FUNC=@HAVE_GNUMAKE_FILE_FUNC@
 export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
 export HAVE_LD_HASH_STYLE=@HAVE_LD_HASH_STYLE@
 export HAVE_LIBCPP=@HAVE_LIBCPP@
-export HAVE_LIBCPP_DEBUG=@HAVE_LIBCPP_DEBUG@
 export HAVE_LIBSTDCPP=@HAVE_LIBSTDCPP@
 export HAVE_POSIX_FALLOCATE=@HAVE_POSIX_FALLOCATE@
 export HAVE_WDEPRECATED_COPY_DTOR=@HAVE_WDEPRECATED_COPY_DTOR@
diff --git a/configure.ac b/configure.ac
index ff4aa9cd1c8b..80058aaafb4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7419,26 +7419,6 @@ AC_LANG_POP([C++])
 AC_SUBST([HAVE_LIBSTDCPP])
 AC_SUBST([HAVE_LIBCPP])
 
-HAVE_LIBCPP_DEBUG=
-if test -n "$HAVE_LIBCPP" -a -n "$ENABLE_DBGUTIL"; then
-# libc++ supports debug mode only if built for it, Mac libc++ isn't,
-# and there would be undefined references to debug functions
-AC_MSG_CHECKING([if libc++ is built with debug mode])
-AC_LANG_PUSH([C++])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#define _LIBCPP_DEBUG 1
-#include 
-int foo(const std::vector& v) { return *v.begin(); }
-]])],
-[AC_MSG_RESULT(yes)
- HAVE_LIBCPP_DEBUG=1
-],
-[AC_MSG_RESULT(no)]
-)
-AC_LANG_POP([C++])
-fi
-AC_SUBST([HAVE_LIBCPP_DEBUG])
-
 dnl ===
 dnl Check for gperf
 dnl ===
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index c2db27243457..c7cc1c3ef577 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -53,10 +53,6 @@ gb_COMPILERDEFS := \
 ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 ifneq ($(HAVE_LIBSTDCPP),)
 gb_COMPILERDEFS_STDLIB_DEBUG = -D_GLIBCXX_DEBUG
-else
-ifneq ($(HAVE_LIBCPP_DEBUG),)
-gb_COMPILERDEFS_STDLIB_DEBUG = -D_LIBCPP_DEBUG=1
-endif
 endif
 gb_COMPILERDEFS += $(gb_COMPILERDEFS_STDLIB_DEBUG)
 endif