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

2022-09-07 Thread Mike Kaganski (via logerrit)
 filter/source/pdf/pdffilter.cxx |   18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 467308d679a3f2b4bbdd117fcc73636d57d66c09
Author: Mike Kaganski 
AuthorDate: Wed Sep 7 21:50:24 2022 +0300
Commit: Miklos Vajna 
CommitDate: Thu Sep 8 08:25:17 2022 +0200

tdf#150846: FilterOptions in descriptor could come from import filter

Tolerate failure parsing json here. Unfortunately this means that
we can't provide a diagnostics to user when they provide bad json
in the command line parameters.

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

diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index d7fc558d198e..f12559bfe3df 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -33,6 +33,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star::io;
 
 PDFFilter::PDFFilter( const Reference< XComponentContext > &rxContext ) :
@@ -78,11 +80,19 @@ bool PDFFilter::implExport( const Sequence< PropertyValue 
>& rDescriptor )
 pValue[i].Value >>= bIsRedactMode;
 }
 
-if (!aFilterData.hasElements() && !aFilterOptions.isEmpty())
+if (!aFilterData.hasElements() && aFilterOptions.startsWith("{"))
 {
-// Allow setting filter data keys from the cmdline.
-std::vector aData = 
comphelper::JsonToPropertyValues(aFilterOptions.toUtf8());
-aFilterData = comphelper::containerToSequence(aData);
+try
+{
+// Allow setting filter data keys from the cmdline.
+std::vector aData
+= comphelper::JsonToPropertyValues(aFilterOptions.toUtf8());
+aFilterData = comphelper::containerToSequence(aData);
+}
+catch (const boost::property_tree::json_parser::json_parser_error&)
+{
+// This wasn't a valid json; maybe came from import filter 
(tdf#150846)
+}
 }
 
 /* we don't get FilterData if we are exporting directly


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

2022-09-07 Thread Andrea Gelmini (via logerrit)
 sw/qa/extras/rtfexport/data/tdf136587_noStyleName.rtf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eeca59964629f302802eeb03c4537fa6f7558a66
Author: Andrea Gelmini 
AuthorDate: Fri Aug 19 16:30:48 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Sep 8 06:41:03 2022 +0200

Fix typo

It passed "make check" on my laptop

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

diff --git a/sw/qa/extras/rtfexport/data/tdf136587_noStyleName.rtf 
b/sw/qa/extras/rtfexport/data/tdf136587_noStyleName.rtf
index 7255d893f392..2b029afff22c 100644
--- a/sw/qa/extras/rtfexport/data/tdf136587_noStyleName.rtf
+++ b/sw/qa/extras/rtfexport/data/tdf136587_noStyleName.rtf
@@ -10,4 +10,4 @@
 \b0\i0\strike0\ul0\f0\fs20\cf0\chcbpat0
 {\footer
 \plain\fs20\sl-228\s15\tqc\tx5670\fs20\tqc\tx5670  \cf1 Page 1 of 
4\par\pard\cf0\sl-252\par\pard\sl-228\s16\tx60\fs20\tx60 \cf1 Printed:  
5/11/2012\par}
-\cf0\sl-355\tqc\tx5789 \cf1\fs24\b 
AGENDA\par\pard\b0\fs20\cf0\sl-283\par\pard\sl-283\tqc\tx5790   \cf1\fs24\b 
MUNICIPAL CODE ENFORCEMENT BOARD\par\pard\sl-283\b0\fs20\cf0\tqc\tx5790 
\cf1\fs24\b Commission Chambers\par\pard\sl-283\b0\fs20\cf0\tqc\tx5790  
\cf1\fs24\b 201 Highland Ave\par\pard\sl-283\b0\fs20\cf0\tqc\tx5790 
\cf1\fs24\b Thursday, May 31, 2012\par\pard\sl-283\b0\fs20\cf0\tqc\tx5790   
\cf1\fs24\b 1:30 P. M.\par\pard\b0\fs20\cf0\sl-283\par\pard\sl-283\tqc\tx5790   
\cf1\fs24\b\ul Cases may be heard in the order listed on the sign in 
sheet.\par\pard\sl-283\b0\ul0\fs20\cf0\tqc\tx5789  \cf1\fs24\b\ul Sign in 
starts at 1:15 p.m. on the day of the hearing in the Commission 
Chambers.\par\pard\b0\ul0\fs20\cf0\sl-283\par\pard\sl-263\tx240\tx600\tx960 
 \cf1\fs22\b I.CALL TO 
ORDER\par\pard\sl-263\b0\fs20\cf0\tx240\tx600\tx960\tx1320\tx1680   
  \cf1\fs22 Pledge of 
Allegiance\par\pard\fs20\cf0\sl-263\par\pard\sl-263\tx240\tx600\tx960   
\cf1\fs22\b II.   APPROVAL OF MINUTES\par\pard\sl-263\b0
 \fs20\cf0\tx240\tx600\tx960\tx1320\tx1680  
\cf1\fs22 April 26, 2012\par\pard\fs20\cf0\sl-372\par\pard\sl-100\tx10440   
\par\pard\sl-125\par\pard\sl-220\tx240\tx1080   \cf1\fs22\b III.CASES 
NOT BEING HEARD\par\pard\b0\fs20\cf0\sl-308\par\pard\sl-311\tx240\tx1080  
\cf1\fs22\b IV. PUBLIC HEARING\par\pard\sl-291\b0\fs20\cf0\tx1000   \cf1 
Swearing in of Speakers\par\pard\sl-250\cf0\tx1000 \cf1 Presentation 
Proceedures and Processes of the Code Enforcement 
Board\par\pard\cf0\sl-308\par\pard\sl-248\tx240\tx1080  \cf1\fs22\b V.  
CODE ENFORCEMENT BOARD CONSENT DOCKET\par\pard\sl-319\b0\fs20\cf0\tx1000
\cf1 The Respondents in the following cases came into compliance by the date 
Ordered by the Board. \par\pard\sl-228\cf0\tx1000  \cf1 There are no fines due. 
Request the Board to accept the Affidavits of 
Compliance.\par\pard\sl-300\cf0\tx60\tx779\tx2400\tqr\tx11400
\cf1\fs18\b  1  2012030118  \b0 A H F\_BAY FUND LLC 
In\_Compliance\par\pard\fs20\cf0\sl-104\par\pard\sl-204\tx2325  \cf1\fs18 1201  
SEMINOLE 
 BLVD  BLG 16 LARGO, FL  \par\pard\sl-204\fs20\cf0\tx2325   \cf1\fs18 
33771\par\pard\fs20\cf0\sl-127\par\pard\sl-204\tx660  \cf1\fs18 CDC 3203(F)1,  
PMC (EXTERMINATION; 
INFESTATION)\par\pard\fs20\cf0\sl-157\par\pard\sl-175\par\pard\sl-300\tx60\tx779\tx2400\tqr\tx11400
\cf1\fs18\b  2  2012030077  \b0 KEMP, JANET L / 
In\_Compliance\par\pard\fs20\cf0\sl-104\par\pard\sl-180\tx2325  \cf1\fs18 305  
INLET CT   CLEARWATER, FL  33756\par\pard\fs20\cf0\sl-355\par\pard\sl-204\tx660 
 \cf1\fs18 COO 11\_48,  (OVERGROWTH) REMOVAL OF EXCESSIVE GROWTH OF WEEDS AND 
DEBRIS.\par\pard\fs20\cf0\sl-157\par\pard\sl-175\par\pard\sl-300\tx60\tx779\tx2400\tqr\tx11400
 \cf1\fs18\b  3  2012030022  \b0 ANDERSON, DANNA G / 
In\_Compliance\par\pard\fs20\cf0\sl-104\par\pard\sl-180\tx2325  \cf1\fs18 7202  
AMHURST WAY   CLEARWATER, FL  
33764\par\pard\fs20\cf0\sl-355\par\pard\sl-204\tx660  \cf1\fs18 COO 11\_47, 
 DUTY OF OWNERS AND OCCUPANTS (DEBRIS).\par\pard\sl-204\fs20\cf0\tx660
\cf1\fs18 COO 11\_75,  INOPERABLE VEHICLE(S) VIOLAT
 ION\par\pard\fs20\cf0\sl-175\par\pard\sl-308\par\pard\sl-220\tx240\tx1080  
\cf1\fs22\b VI. AFFIDAVIT OF COMPLIANCE/NON\_COMPLIANCE & SECOND 
ORDERS\par\pard\sl-319\b0\fs20\cf0\tx1000  \cf1 Second Orders either did 
not come into compliance or came into compliance but did not pay the 
\par\pard\sl-228\cf0\tx1000  \cf1 
fines.\par\par\pard\sl-300\cf0\tx60\tx779\tx2400\tqr\tx11400   \cf1\fs18\b  
4  2012030153  \b0 FETTERS, RONALD E / REPEAT VIOLATOR \_ 
In\_Compliance\par\pard\fs20\cf0\sl-104\par\pard\sl-204\tx2325\tx6600
\cf1\fs18 1980  1ST AVE SE  LARGO, FL  33771Fine Ran:04/03/2012 \_ 
04/04/2012\par\pard\sl-249\fs20\cf0\tx6600   \cf1\fs18

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

2022-09-07 Thread Rene Engelhard (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 429a4af9bb53bd0b69170e5e518352c47b3c00a0
Author: Rene Engelhard 
AuthorDate: Thu Sep 8 05:07:45 2022 +0200
Commit: René Engelhard 
CommitDate: Thu Sep 8 05:18:35 2022 +0200

revert configure.ac check for graphite2 to 0.9.3

root@frodo:/# grep Version /usr/lib/x86_64-linux-gnu/pkgconfig/graphite2.pc
Version: 3.0.1
root@frodo:/# dpkg -l libgraphite2-dev
Desired=Unknown/Install/Remove/Purge/Hold
| 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  Architecture Description

+++-==---==>
ii  libgraphite2-dev:amd64 1.3.14-1 amd64Development files for 
libg

2.0.0 is a internal version (see
  
https://github.com/silnrsi/graphite/commit/175151a45f4c228af912d52f8c299b96b124a136).
 At least 2.0.0 is fullfilled, but probably we shouldn't use it
for checks

Change-Id: I70ac1ff20ca5d583bbfa961bfd275ff6432d243c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139627
Reviewed-by: خالد حسني 
Tested-by: René Engelhard 

diff --git a/configure.ac b/configure.ac
index 6f8158940266..7b03df8ee0aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10878,7 +10878,7 @@ dnl 
===
 
 GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include 
-DGRAPHITE2_STATIC"
 GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"
-libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 2.0.0])
+libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
 
 HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src"
 HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs 
-lharfbuzz"


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

2022-09-07 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 77689ceb8171943bfea272ce3c875b061e76e23b
Author: Justin Luth 
AuthorDate: Wed Sep 7 19:50:47 2022 -0400
Commit: Justin Luth 
CommitDate: Thu Sep 8 04:24:00 2022 +0200

tdf#149292 docx: pre-emptive unit test

This document has floating tables.
However, these tables should not get the page style property,
so make sure that paragraph 1 contains RES_PAGEDESC.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index cf5877ea873d..6eca75bf9087 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -473,6 +473,9 @@ DECLARE_OOXMLEXPORT_TEST(testFloatingTablesAnchor, 
"floating-tables-anchor.docx"
 xRange = xTextContent->getAnchor();
 xText = xRange->getText();
 CPPUNIT_ASSERT_EQUAL(OUString("Anchor point"), xText->getString());
+
+// tdf#149292 pre-emptive test - ensure "First Page" page style
+CPPUNIT_ASSERT_EQUAL(OUString("First Page"), 
getProperty(getParagraph(1), "PageDescName"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testAnnotationFormatting, 
"annotation-formatting.docx")


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

2022-09-07 Thread Khaled Hosny (via logerrit)
 configure.ac   |4 ++--
 vcl/source/gdi/CommonSalLayout.cxx |   33 ++---
 2 files changed, 4 insertions(+), 33 deletions(-)

New commits:
commit a3bd84703ada964441c17971b5fc1ce1258b3b05
Author: Khaled Hosny 
AuthorDate: Wed Sep 7 18:04:56 2022 +0200
Commit: خالد حسني 
CommitDate: Thu Sep 8 03:35:45 2022 +0200

Require HarfBuzz 2.0.0

Released October 2018. We want to use some newer APIs than the currently
required version.

Change-Id: I85f572ad3b7155926ad36a11b3afaf08a2a11714
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139607
Tested-by: Jenkins
Reviewed-by: René Engelhard 
Reviewed-by: خالد حسني 

diff --git a/configure.ac b/configure.ac
index f9d52805053b..6f8158940266 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10878,11 +10878,11 @@ dnl 
===
 
 GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include 
-DGRAPHITE2_STATIC"
 GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"
-libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
+libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 2.0.0])
 
 HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src"
 HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs 
-lharfbuzz"
-libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 0.9.42])
+libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 2.0.0])
 
 if test "$COM" = "MSC"; then # override the above
 GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib"
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index aab404ebe73f..6caeca7c86a1 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -42,24 +42,6 @@
 
 #include 
 
-#if !HB_VERSION_ATLEAST(1, 1, 0)
-// Disabled Unicode compatibility decomposition, see fdo#66715
-static unsigned int unicodeDecomposeCompatibility(hb_unicode_funcs_t* 
/*ufuncs*/,
-  hb_codepoint_t  /*u*/,
-  hb_codepoint_t* 
/*decomposed*/,
-  void*   
/*user_data*/)
-{
-return 0;
-}
-
-static hb_unicode_funcs_t* getUnicodeFuncs()
-{
-static hb_unicode_funcs_t* ufuncs = 
hb_unicode_funcs_create(hb_icu_get_unicode_funcs());
-hb_unicode_funcs_set_decompose_compatibility_func(ufuncs, 
unicodeDecomposeCompatibility, nullptr, nullptr);
-return ufuncs;
-}
-#endif
-
 GenericSalLayout::GenericSalLayout(LogicalFontInstance &rFont)
 : m_GlyphItems(rFont)
 , mpVertGlyphs(nullptr)
@@ -309,10 +291,6 @@ bool 
GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay
 
 hb_buffer_t* pHbBuffer = hb_buffer_create();
 hb_buffer_pre_allocate(pHbBuffer, nGlyphCapacity);
-#if !HB_VERSION_ATLEAST(1, 1, 0)
-static hb_unicode_funcs_t* pHbUnicodeFuncs = getUnicodeFuncs();
-hb_buffer_set_unicode_funcs(pHbBuffer, pHbUnicodeFuncs);
-#endif
 
 const vcl::font::FontSelectPattern& rFontSelData = 
GetFont().GetFontSelectPattern();
 if (rArgs.mnFlags & SalLayoutFlags::DisableKerning)
@@ -470,10 +448,8 @@ bool 
GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay
 hb_buffer_set_cluster_level(pHbBuffer, 
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
 
 // The shapers that we want HarfBuzz to use, in the order of
-// preference. The coretext_aat shaper is available only on macOS,
-// but there is no harm in always including it, HarfBuzz will
-// ignore unavailable shapers.
-const char*const pHbShapers[] = { "graphite2", "coretext_aat", 
"ot", "fallback", nullptr };
+// preference.
+const char*const pHbShapers[] = { "graphite2", "ot", "fallback", 
nullptr };
 bool ok = hb_shape_full(pHbFont, pHbBuffer, maFeatures.data(), 
maFeatures.size(), pHbShapers);
 assert(ok);
 (void) ok;
@@ -570,13 +546,8 @@ bool 
GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay
 if (u_isUWhiteSpace(aChar))
 nGlyphFlags |= GlyphItemFlags::IS_SPACING;
 
-#if HB_VERSION_ATLEAST(1, 5, 0)
 if (hb_glyph_info_get_glyph_flags(&pHbGlyphInfos[i]) & 
HB_GLYPH_FLAG_UNSAFE_TO_BREAK)
 nGlyphFlags |= GlyphItemFlags::IS_UNSAFE_TO_BREAK;
-#else
-// If support is not present, then always prevent breaking.
-nGlyphFlags |= GlyphItemFlags::IS_UNSAFE_TO_BREAK;
-#endif
 
 #if HB_VERSION_ATLEAST(5, 1, 0)
 if (hb_glyph_info_get_glyph_flags(&pHbGlyphInfos[i]) & 
HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL)


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

2022-09-07 Thread Khaled Hosny (via logerrit)
 include/vcl/fontcharmap.hxx |2 
 vcl/inc/impfontcharmap.hxx  |2 
 vcl/source/font/fontcharmap.cxx |  121 +---
 3 files changed, 4 insertions(+), 121 deletions(-)

New commits:
commit 10ac07e03276889a68ebc9abc9bd14e88b49a27c
Author: Khaled Hosny 
AuthorDate: Wed Sep 7 17:07:52 2022 +0200
Commit: خالد حسني 
CommitDate: Thu Sep 8 03:35:25 2022 +0200

vcl: Drop now unused FontCharMap::GetGlyphIndex()

Change-Id: Icf687d09c2d25a3d578faf7ae574b3e655b8540f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139600
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/include/vcl/fontcharmap.hxx b/include/vcl/fontcharmap.hxx
index ae4735376e14..4b21142509da 100644
--- a/include/vcl/fontcharmap.hxx
+++ b/include/vcl/fontcharmap.hxx
@@ -162,8 +162,6 @@ public:
 const sal_UCS4* pRangeCodes = nullptr, int 
nRangeCount = 0 );
 
 const sal_UCS4* mpRangeCodes;
-const int*  mpStartGlyphs;
-const sal_uInt16*   mpGlyphIds;
 int mnRangeCount;
 boolmbSymbolic;
 boolmbRecoded;
diff --git a/vcl/inc/impfontcharmap.hxx b/vcl/inc/impfontcharmap.hxx
index 6ca04b9f3111..8a8428d7e34e 100644
--- a/vcl/inc/impfontcharmap.hxx
+++ b/vcl/inc/impfontcharmap.hxx
@@ -45,8 +45,6 @@ private:
 
 private:
 const sal_uInt32*   mpRangeCodes; // pairs of StartCode/(EndCode+1)
-const int*  mpStartGlyphs;// range-specific mapper to glyphs
-const sal_uInt16*   mpGlyphIds;   // individual glyphid mappings
 int mnRangeCount;
 int mnCharCount;  // covered codepoints
 const bool m_bSymbolic;
diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index d1d022c26eed..cb42e3b9620c 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -29,8 +29,6 @@
 CmapResult::CmapResult( bool bSymbolic,
 const sal_UCS4* pRangeCodes, int nRangeCount )
 :   mpRangeCodes( pRangeCodes)
-,   mpStartGlyphs( nullptr)
-,   mpGlyphIds( nullptr)
 ,   mnRangeCount( nRangeCount)
 ,   mbSymbolic( bSymbolic)
 ,   mbRecoded( false)
@@ -45,15 +43,11 @@ ImplFontCharMap::~ImplFontCharMap()
 if( !isDefaultMap() )
 {
 delete[] mpRangeCodes;
-delete[] mpStartGlyphs;
-delete[] mpGlyphIds;
 }
 }
 
 ImplFontCharMap::ImplFontCharMap( const CmapResult& rCR )
 :   mpRangeCodes( rCR.mpRangeCodes )
-,   mpStartGlyphs( rCR.mpStartGlyphs )
-,   mpGlyphIds( rCR.mpGlyphIds )
 ,   mnRangeCount( rCR.mnRangeCount )
 ,   mnCharCount( 0 )
 , m_bSymbolic(rCR.mbSymbolic)
@@ -91,14 +85,11 @@ bool ImplFontCharMap::isDefaultMap() const
 
 static unsigned GetUInt( const unsigned char* p ) { 
return((p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]);}
 static unsigned GetUShort( const unsigned char* p ){ return((p[0]<<8) | p[1]);}
-static int GetSShort( const unsigned char* p ){ return 
static_cast((p[0]<<8)|p[1]);}
 
 // TODO: move CMAP parsing directly into the ImplFontCharMap class
 bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
 {
 rResult.mpRangeCodes = nullptr;
-rResult.mpStartGlyphs= nullptr;
-rResult.mpGlyphIds   = nullptr;
 rResult.mnRangeCount = 0;
 rResult.mbRecoded= false;
 rResult.mbSymbolic   = false;
@@ -114,8 +105,6 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 if( (nSubTables <= 0) || (nSubTables > (nLength - 24) / 8) )
 return false;
 
-const unsigned char* pEndValidArea = pCmap + nLength;
-
 // find the most interesting subtable in the CMAP
 rtl_TextEncoding eRecodeFrom = RTL_TEXTENCODING_UNICODE;
 int nOffset = 0;
@@ -175,11 +164,6 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 // parse the best CMAP subtable
 int nRangeCount = 0;
 sal_UCS4* pCodePairs = nullptr;
-int* pStartGlyphs = nullptr;
-
-std::vector aGlyphIdArray;
-aGlyphIdArray.reserve( 0x1000 );
-aGlyphIdArray.push_back( 0 );
 
 // format 4, the most common 16bit char mapping table
 if( (nFormat == 4) && ((nOffset+16) < nLength) )
@@ -207,15 +191,12 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 }
 
 pCodePairs = new sal_UCS4[ nRangeCount * 2 ];
-pStartGlyphs = new int[ nRangeCount ];
 
 sal_UCS4* pCP = pCodePairs;
 for( int i = 0; i < nRangeCount; ++i )
 {
 const sal_UCS4 cMinChar = GetUShort( pBeginBase + 2*i );
 const sal_UCS4 cMaxChar = GetUShort( pLimitBase + 2*i );
-const int nGlyphDelta  = GetSShort( pDeltaBase + 2*i );
-const int nRangeOffset = GetUShort( pOffsetBase + 2*i );
 if( cMinChar > cMaxChar ) {  // no sane font should trigger this
 SAL_WARN("vcl.gdi", "Min char should never be more than the 
max char!");
 

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

2022-09-07 Thread Khaled Hosny (via logerrit)
 vcl/inc/font/LogicalFontInstance.hxx|2 ++
 vcl/source/font/LogicalFontInstance.cxx |   21 +
 vcl/source/gdi/CommonSalLayout.cxx  |   13 +
 vcl/source/gdi/pdfwriter_impl.cxx   |9 +++--
 4 files changed, 23 insertions(+), 22 deletions(-)

New commits:
commit e34d6e017ccfa2279f7e855eb6fd5fbbbd056714
Author: Khaled Hosny 
AuthorDate: Wed Sep 7 11:10:11 2022 +0200
Commit: خالد حسني 
CommitDate: Thu Sep 8 03:34:28 2022 +0200

vcl: Add LogicalFontInstance::GetGlyphIndex()

And use it in a few places, particularly where we get glyph ID from
FontCharMap. We want to get the glyph indices from HarfBuzz like we do
for shaping, to avoid any potential discrepancy (e.g. a new “cmap”
subtable that our ParseCMAP() would not automatically support).

Change-Id: Ie80993b35f0586d8567b6bda0ea56ba453316e81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139578
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/font/LogicalFontInstance.hxx 
b/vcl/inc/font/LogicalFontInstance.hxx
index c08e3e5bc937..d1f19760a9a3 100644
--- a/vcl/inc/font/LogicalFontInstance.hxx
+++ b/vcl/inc/font/LogicalFontInstance.hxx
@@ -100,6 +100,8 @@ public: // TODO: make data members private
 bool GetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const;
 virtual bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, bool) 
const = 0;
 
+sal_GlyphId GetGlyphIndex(uint32_t, uint32_t = 0) const;
+
 double GetGlyphWidth(sal_GlyphId, bool = false, bool = false) const;
 
 int GetKashidaWidth() const;
diff --git a/vcl/source/font/LogicalFontInstance.cxx 
b/vcl/source/font/LogicalFontInstance.cxx
index 611c84f44610..ce6ea99ee8f3 100644
--- a/vcl/source/font/LogicalFontInstance.cxx
+++ b/vcl/source/font/LogicalFontInstance.cxx
@@ -66,14 +66,10 @@ hb_font_t* LogicalFontInstance::InitHbFont()
 
 int LogicalFontInstance::GetKashidaWidth() const
 {
-hb_font_t* pHbFont = const_cast(this)->GetHbFont();
-hb_position_t nWidth = 0;
-hb_codepoint_t nIndex = 0;
-
-if (hb_font_get_glyph(pHbFont, 0x0640, 0, &nIndex))
-nWidth = std::ceil(GetGlyphWidth(nIndex));
-
-return nWidth;
+sal_GlyphId nGlyph = GetGlyphIndex(0x0640);
+if (nGlyph)
+return std::ceil(GetGlyphWidth(nGlyph));
+return 0;
 }
 
 void LogicalFontInstance::GetScale(double* nXScale, double* nYScale) const
@@ -146,6 +142,15 @@ bool LogicalFontInstance::GetGlyphBoundRect(sal_GlyphId 
nID, tools::Rectangle& r
 return res;
 }
 
+sal_GlyphId LogicalFontInstance::GetGlyphIndex(uint32_t nUnicode, uint32_t 
nVariationSelector) const
+{
+auto* pHbFont = const_cast(this)->GetHbFont();
+sal_GlyphId nGlyph = 0;
+if (hb_font_get_glyph(pHbFont, nUnicode, nVariationSelector, &nGlyph))
+return nGlyph;
+return 0;
+}
+
 double LogicalFontInstance::GetGlyphWidth(sal_GlyphId nGlyph, bool bVertical, 
bool bPDF) const
 {
 auto* pHbFont = const_cast(this)->GetHbFont();
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index db5575fb8c82..aab404ebe73f 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -221,14 +221,13 @@ void GenericSalLayout::DrawText(SalGraphics& 
rSalGraphics) const
 // script/language then we want to always treat it as upright glyph.
 bool GenericSalLayout::HasVerticalAlternate(sal_UCS4 aChar, sal_UCS4 
aVariationSelector)
 {
-hb_codepoint_t nGlyphIndex = 0;
-hb_font_t *pHbFont = GetFont().GetHbFont();
-if (!hb_font_get_glyph(pHbFont, aChar, aVariationSelector, &nGlyphIndex))
+sal_GlyphId nGlyphIndex = GetFont().GetGlyphIndex(aChar, 
aVariationSelector);
+if (!nGlyphIndex)
 return false;
 
 if (!mpVertGlyphs)
 {
-hb_face_t* pHbFace = hb_font_get_face(pHbFont);
+hb_face_t* pHbFace = hb_font_get_face(GetFont().GetHbFont());
 mpVertGlyphs = hb_set_create();
 
 // Find all GSUB lookups for “vert” feature.
@@ -850,10 +849,8 @@ void GenericSalLayout::ApplyDXArray(const double* 
pDXArray, const sal_Bool* pKas
 return;
 
 // Find Kashida glyph width and index.
-double nKashidaWidth = 0;
-hb_codepoint_t nKashidaIndex = 0;
-if (hb_font_get_glyph(GetFont().GetHbFont(), 0x0640, 0, &nKashidaIndex))
-nKashidaWidth = GetFont().GetKashidaWidth();
+sal_GlyphId nKashidaIndex = GetFont().GetGlyphIndex(0x0640);
+double nKashidaWidth = GetFont().GetKashidaWidth();
 
 if (nKashidaWidth <= 0)
 {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 3e01a6c76b9d..1f032c25a79e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2335,12 +2335,11 @@ std::map< sal_Int32, sal_Int32 > 
PDFWriterImpl::emitSystemFont( const vcl::font:
 OUString aTmpName;
 osl_createTempFile( nullptr, nullptr, &aTmpName.pData );
 
-sal_Int32 pWidths[256] = {};
-

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

2022-09-07 Thread Khaled Hosny (via logerrit)
 vcl/inc/glyphid.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ba02639c9c17d75e73fc2eff83e64c116fcdaeb2
Author: Khaled Hosny 
AuthorDate: Wed Sep 7 11:00:26 2022 +0200
Commit: خالد حسني 
CommitDate: Thu Sep 8 03:33:39 2022 +0200

vcl: Make glyph IDs 32bit

To match corresponding HarfBuzz and Cairo types, and would eventually
help us in supporting fonts with more than 65535 glyphs (currently
supported only by HarfBuzz).

Change-Id: I239421bcef6e1b26f17a4666243a239174ea4943
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139576
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/glyphid.hxx b/vcl/inc/glyphid.hxx
index 6f32a429dde4..565beb618327 100644
--- a/vcl/inc/glyphid.hxx
+++ b/vcl/inc/glyphid.hxx
@@ -21,6 +21,6 @@
 
 #include 
 
-typedef sal_uInt16 sal_GlyphId;
+typedef uint32_t sal_GlyphId;
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-09-07 Thread Eike Rathke (via logerrit)
 sc/source/core/data/dpsave.cxx |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 5aa3f046f934092fbfd7cc92b93d79b4f548cc13
Author: Eike Rathke 
AuthorDate: Wed Sep 7 18:34:05 2022 +0200
Commit: Eike Rathke 
CommitDate: Wed Sep 7 22:29:38 2022 +0200

crashtesting: prevent nullptr access

There's a xlsx export crash on *2nd* export with data pilot data
of forum-en-38962.ods. We export without crash this .ods to xlsx
*once*, but on saving again to xlsx it crashes. It also crashes with an
export to .xls and then an export to .xlsx. Repeated exports to xls are
crash free.

Already on the first export there are loads of warning messages of

ScDPMember::GetItemData: what data? nDim 0, mnDataId #
ScNameToIndexAccess getByIndex failed 
com.sun.star.container.NoSuchElementException message: "at 
sc/source/core/data/dptabsrc.cxx:2267

The pivot tables are broken on both exports.

This smells like some sort of data pilot cache
corruption/insufficiency during .xlsx export but the root cause is
yet unknown. This only fixes the crash symptom.

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

diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index cf694258bcd9..9088e51999f8 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1286,8 +1286,20 @@ void 
ScDPSaveData::SyncAllDimensionMembers(ScDPTableData* pData)
 for (size_t j = 0; j < nMemberCount; ++j)
 {
 const ScDPItemData* pMemberData = pData->GetMemberById(nDimIndex, 
rMembers[j]);
-OUString aMemName = pData->GetFormattedString(nDimIndex, 
*pMemberData, false);
-aMemNames.insert(aMemName);
+// ScDPCache::GetItemDataById() (via
+// ScDPTableData::GetMemberById(),
+// ScDPGroupTableData::GetMemberById() through
+// GetCacheTable().getCache()) may return nullptr.
+if (pMemberData)
+{
+OUString aMemName = pData->GetFormattedString(nDimIndex, 
*pMemberData, false);
+aMemNames.insert(aMemName);
+}
+else
+{
+SAL_WARN("sc.core", "No pMemberData for nDimIndex " << 
nDimIndex << ", rMembers[j] " << rMembers[j]
+<< ", j " << j);
+}
 }
 
 it->RemoveObsoleteMembers(aMemNames);


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

2022-09-07 Thread Tomoyuki Kubota (via logerrit)
 setup_native/source/win32/customactions/shellextensions/checkpatches.cxx |
5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 86498bcd73050e44ea5ea53c384edb0baf033d16
Author: Tomoyuki Kubota 
AuthorDate: Sun Mar 20 05:07:48 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 22:18:04 2022 +0200

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

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

diff --git 
a/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx 
b/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx
index 9bad21377b0b..d573161fb11b 100644
--- a/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx
@@ -20,9 +20,6 @@
 #include "shlxtmsi.hxx"
 #include 
 #include 
-#ifdef DEBUG
-#include 
-#endif
 
 #ifdef DEBUG
 inline void OutputDebugStringFormatW( PCWSTR pFormat, ... )
@@ -31,7 +28,7 @@ inline void OutputDebugStringFormatW( PCWSTR pFormat, ... )
 va_list args;
 
 va_start( args, pFormat );
-StringCchVPrintfW( buffer, SAL_N_ELEMENTS(buffer), pFormat, args );
+StringCchVPrintfW( buffer, std::size(buffer), pFormat, args );
 OutputDebugStringW( buffer );
 va_end(args);
 }


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 sc/source/core/data/documen2.cxx   |4 ++--
 sc/source/core/tool/rangecache.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f8ef0f78ed1432659cc0537a0ebb85abe9211369
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 16:33:16 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 22:17:40 2022 +0200

cid#1509288 rearrange to make clearer what actually happens

similar to

commit ce36d36233053cea8b5db7f39f2693726a43940a
Author: Caolán McNamara 
Date:   Tue Sep 6 14:25:09 2022 +0100

cid#1500385 rearrange to make clearer what actually happens

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

diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index bda0ac8b06e9..124089bd7139 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1259,10 +1259,10 @@ void ScDocument::RemoveSortedRangeCache( 
ScSortedRangeCache & rCache )
 auto it(mxScSortedRangeCache->aCacheMap.find(rCache.getHashKey()));
 if (it != mxScSortedRangeCache->aCacheMap.end())
 {
-ScSortedRangeCache* pCache = (*it).second.release();
+std::unique_ptr xCache = std::move(it->second);
 mxScSortedRangeCache->aCacheMap.erase(it);
 assert(!IsThreadedGroupCalcInProgress()); // EndListeningArea() is not 
thread-safe
-EndListeningArea(pCache->getRange(), false, &rCache);
+EndListeningArea(xCache->getRange(), false, &rCache);
 return;
 }
 OSL_FAIL( "ScDocument::RemoveSortedRangeCache: range not found in hash 
map");
diff --git a/sc/source/core/tool/rangecache.cxx 
b/sc/source/core/tool/rangecache.cxx
index a96db0f0be03..f42d36843619 100644
--- a/sc/source/core/tool/rangecache.cxx
+++ b/sc/source/core/tool/rangecache.cxx
@@ -180,7 +180,7 @@ void ScSortedRangeCache::Notify(const SfxHint& rHint)
 if (rHint.GetId() == SfxHintId::ScDataChanged || rHint.GetId() == 
SfxHintId::ScAreaChanged)
 {
 mpDoc->RemoveSortedRangeCache(*this);
-delete this;
+// this ScSortedRangeCache is deleted by RemoveSortedRangeCache
 }
 }
 }


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 sw/source/core/layout/paintfrm.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 0fe9ce208190d2329707a8684ed705c2e7d6f1d0
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 16:47:25 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 22:17:18 2022 +0200

cid#1509283 silence Dereference after null check

and

cid#1509253 Dereference after null check

which seem to exist since:

commit 42ba2b6c03a74815d2041e554fea83350d554dd1
Date:   Mon Sep 19 15:37:25 2011 +0200

Text Boundaries: draw small inner corners for the columns areas

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

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index dd76c8609fda..5a37468f0d72 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6935,6 +6935,8 @@ void SwPageFrame::PaintSubsidiaryLines( const SwPageFrame 
*,
 pLay = pLay->GetNext();
 }
 
+assert(pPageBody && "presumably this is impossible");
+
 SwRect aArea( pPageBody->getFrameArea() );
 if ( pFootnoteCont )
 aArea.AddBottom( pFootnoteCont->getFrameArea().Bottom() - 
aArea.Bottom() );
@@ -6960,6 +6962,8 @@ void SwColumnFrame::PaintSubsidiaryLines( const 
SwPageFrame *,
 pLay = pLay->GetNext();
 }
 
+assert(pColBody && "presumably this is impossible");
+
 SwRect aArea( pColBody->getFrameArea() );
 
 // #i3662# - enlarge top of column body frame's printing area


Openssl 1.1.1 support ending in 2023-09-11

2022-09-07 Thread Julien Nabet

Hello,

Reading https://www.openssl.org/policies/releasestrat.html, I noticed:

"Version 1.1.1 will be supported until 2023-09-11 (LTS)."

There's OpenSsl 3.0.5 now, I don't know if it can be considered stable 
enough and perhaps it could be interesting to use V1.1.1 until the last 
moment to give maximum time OpenSsl guys hardening 3.0 branch.


However I leafed through this link 
https://www.openssl.org/docs/man3.0/man7/migration_guide.html and it 
seems there are some changes to do to prepare the migration.


I suppose some LO code should be modified but there are also external 
libs/apps like Postgresql and Python to take into account and perhaps it 
could be the tricky part since we're autonomous here.


I don't pretend having a solution, great ideas or working on it, my goal 
here is just to be sure that people know about the end of v1.1.1 support 
; 1 year before the end date may be not much considering what has to be 
done.


Now perhaps someone is already working on it, if it's the case, sorry 
for having missed the info.


Julien



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

2022-09-07 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/security.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1bd83f0f6ad3d9fa84b4eae38b3393526e233771
Author: Stephan Bergmann 
AuthorDate: Wed Sep 7 18:22:27 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 7 21:39:41 2022 +0200

Be careful with failed realloc

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

diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx
index f541c90001b3..1b1f16a54edc 100644
--- a/sal/osl/unx/security.cxx
+++ b/sal/osl/unx/security.cxx
@@ -105,7 +105,9 @@ static oslSecurityImpl * growSecurityImpl(
 n = std::numeric_limits::max();
 }
 p = static_cast(realloc(impl, n));
-memset (p, 0, n);
+if (p != nullptr) {
+memset (p, 0, n);
+}
 }
 if (p == nullptr) {
 free(impl);


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 12 commits - desktop/source download.lst external/nss hwpfilter/source include/sfx2 officecfg/registry sc/inc sc/source sfx2/source

2022-09-07 Thread Caolán McNamara (via logerrit)
 desktop/source/app/cmdlineargs.cxx |   10 
 download.lst   |4 
 external/nss/ExternalProject_nss.mk|3 
 external/nss/asan.patch.1  |8 
 external/nss/nss.patch |8 
 hwpfilter/source/hwpfile.cxx   |5 
 hwpfilter/source/hwpfile.h |4 
 include/sfx2/sfx.hrc   |2 
 include/sfx2/viewfrm.hxx   |1 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   16 +
 sc/inc/documentimport.hxx  |2 
 sc/inc/table.hxx   |2 
 sc/source/core/data/document.cxx   |9 
 sc/source/core/data/documentimport.cxx |   14 +
 sc/source/core/data/table2.cxx |   15 +
 sc/source/filter/oox/sheetdatabuffer.cxx   |   13 +
 sfx2/source/appl/macroloader.cxx   |9 
 sfx2/source/doc/iframe.cxx |   20 +
 sfx2/source/inc/macroloader.hxx|2 
 sfx2/source/view/view.src  |   10 
 sfx2/source/view/viewfrm.cxx   |   41 +++
 svl/source/inc/passwordcontainer.hxx   |   69 -
 svl/source/passwordcontainer/passwordcontainer.cxx |  165 ++---
 sw/source/filter/html/htmlplug.cxx |7 
 sw/source/filter/xml/xmltexti.cxx  |9 
 uui/source/iahndl-authentication.cxx   |5 
 wizards/source/access2base/DoCmd.xba   |2 
 xmloff/source/draw/ximpshap.cxx|4 
 28 files changed, 385 insertions(+), 74 deletions(-)

New commits:
commit c1c659ad31a569816432e4e17af3af904792a3b6
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 11:38:55 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Sep 7 21:01:51 2022 +0200

check impress/calc IFrame "FrameURL" target

similar to

commit c7450d0b9d02c64ae3da467d329040787039767e
Date:   Tue Aug 30 17:01:08 2022 +0100

check IFrame "FrameURL" target

Conflicts:
xmloff/source/draw/ximpshap.cxx

Change-Id: Ibf28c29acb4476830431d02772f3ecd4b23a6a27

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 4477ff92e957..7c6d41a75b82 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -82,6 +82,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -3257,6 +3258,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const 
css::uno::Reference< cs
 
 if( !maHref.isEmpty() )
 {
+if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+GetImport().NotifyMacroEventRead();
+
 xProps->setPropertyValue("FrameURL", Any(maHref) );
 }
 }
commit fae9b131c776b9d75dd51c8a9175abc2b89a572a
Author: Stephan Bergmann 
AuthorDate: Thu Sep 1 17:33:51 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Sep 7 21:01:01 2022 +0200

Filter out unwanted command URIs

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

Conflicts:
desktop/source/app/cmdlineargs.cxx

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index ad07af0f045a..48336da1b71d 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -28,6 +28,7 @@
 #include "cmdlineargs.hxx"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -163,7 +164,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& 
arg, CommandLineEvent cur
 }
 if (nURIlen < 0)
 nURIlen = rest2.getLength();
-arg = rest2.copy(0, nURIlen);
+auto const uri = rest2.copy(0, nURIlen);
+if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+// Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
+// as the "Open" machinery does not know about those command URI 
schemes):
+curEvt = CommandLineEvent::Open;
+} else {
+arg = uri;
+}
 return curEvt;
 }
 
commit 042625161668f19157ddcde5da9c21b981897dff
Author: Caolán McNamara 
AuthorDate: Tue Aug 30 17:01:08 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Sep 7 21:00:26 2022 +0200

check IFrame "FrameURL" target

similiar to

commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627
Date:   Wed Aug 7 17:37:11 2019 +0100

warn on load when a document

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

2022-09-07 Thread Tor Lillqvist (via logerrit)
 bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx |   51 
 1 file changed, 22 insertions(+), 29 deletions(-)

New commits:
commit 0c05d4dc4810749e65e81e98f04805b251d61e5a
Author: Tor Lillqvist 
AuthorDate: Wed Sep 7 17:16:46 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Sep 7 20:53:36 2022 +0200

Fix register clobber information and simplify in the C++/UNO bridge for iOS

Avoid the use of unnecessary local variables to temporarily keep
return values from a function called by the inline assembly. Instead
use the GPR and FPR arrays also to temporarily keep such return
values, like the Linux aarch64 code does.

This fixes https://github.com/CollaboraOnline/online/issues/5204

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

diff --git a/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
index 07ec8501f0df..2614fd041ae9 100644
--- a/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
@@ -77,13 +77,13 @@ namespace arm
 }
 }
 
-void MapReturn(sal_uInt64 x0, sal_uInt64 x1, double d0, 
typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
+void MapReturn(sal_uInt64 *pGPR, double *pFPR, 
typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
 {
 switch( pReturnType->eTypeClass )
 {
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
-pRegisterReturn[1] = x1;
+pRegisterReturn[1] = pGPR[1];
 [[fallthrough]];
 case typelib_TypeClass_LONG:
 case typelib_TypeClass_UNSIGNED_LONG:
@@ -93,20 +93,20 @@ void MapReturn(sal_uInt64 x0, sal_uInt64 x1, double d0, 
typelib_TypeDescriptionR
 case typelib_TypeClass_UNSIGNED_SHORT:
 case typelib_TypeClass_BOOLEAN:
 case typelib_TypeClass_BYTE:
-pRegisterReturn[0] = x0;
+pRegisterReturn[0] = pGPR[0];
 break;
 case typelib_TypeClass_FLOAT:
-*(float*)pRegisterReturn = *(float*)&d0;
+*(float*)pRegisterReturn = *(float*)&pFPR[0];
 break;
 case typelib_TypeClass_DOUBLE:
-*(double*)pRegisterReturn = d0;
+*(double*)pRegisterReturn = pFPR[0];
 break;
 case typelib_TypeClass_STRUCT:
 case typelib_TypeClass_EXCEPTION:
 if (!arm::return_in_x8(pReturnType))
 {
-pRegisterReturn[0] = x0;
-pRegisterReturn[1] = x1;
+pRegisterReturn[0] = pGPR[0];
+pRegisterReturn[1] = pGPR[1];
 }
 break;
 default:
@@ -142,11 +142,6 @@ void callVirtualMethod(
 pMethod += 8 * nVtableIndex;
 pMethod = *((sal_uInt64 *)pMethod);
 
-// For value returned in registers
-sal_uInt64 x0;
-sal_uInt64 x1;
-double d0;
-
 __asm__ __volatile__
 (
  // Assembly string
@@ -160,27 +155,25 @@ void callVirtualMethod(
  "  ldp d4, d5, %[pfpr_4]\n"
  "  ldp d6, d7, %[pfpr_6]\n"
  "  blr %[pmethod]\n"
- "  str x0, %[x0]\n"
- "  str x1, %[x1]\n"
- "  str d0, %[d0]\n"
- // Output operands
- : [x0]"=m" (x0), [x1]"=m" (x1), [d0]"=m" (d0)
+ "  stp x0, x1, %[pgpr_0]\n"
+ "  str d0, %[pfpr_0]\n"
  // Input operands
- : [pgpr_0]"m" (pGPR[0]),
-   [pgpr_2]"m" (pGPR[2]),
-   [pgpr_4]"m" (pGPR[4]),
-   [pgpr_6]"m" (pGPR[6]),
-   [pregisterreturn]"m" (pRegisterReturn),
-   [pfpr_0]"m" (pFPR[0]),
-   [pfpr_2]"m" (pFPR[2]),
-   [pfpr_4]"m" (pFPR[4]),
-   [pfpr_6]"m" (pFPR[6]),
-   [pmethod]"r" (pMethod)
+ :: [pgpr_0]"m" (pGPR[0]),
+[pgpr_2]"m" (pGPR[2]),
+[pgpr_4]"m" (pGPR[4]),
+[pgpr_6]"m" (pGPR[6]),
+[pregisterreturn]"m" (pRegisterReturn),
+[pfpr_0]"m" (pFPR[0]),
+[pfpr_2]"m" (pFPR[2]),
+[pfpr_4]"m" (pFPR[4]),
+[pfpr_6]"m" (pFPR[6]),
+[pmethod]"r" (pMethod)
  // Clobbers
- : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "d0", "d1", "d2", 
"d3", "d4", "d5", "d6", "d7"
+ : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", 
"x11", "x12", "x13", "x14", "x15", "x16", "x17",
+   "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7"
  );
 
-MapReturn(x0, x1, d0, pReturnType, (sal_uInt64 *) pRegisterReturn);
+MapReturn(pGPR, pFPR, pReturnType, (sal_uInt64 *) pRegisterReturn);
 }
 }
 


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

2022-09-07 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/range_name/tdf150307.py |   77 +++
 1 file changed, 77 insertions(+)

New commits:
commit cb4216a9c933bf64ec7a30340b596cb83fe1b599
Author: Xisco Fauli 
AuthorDate: Wed Sep 7 13:01:32 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Sep 7 20:40:53 2022 +0200

tdf#150307, tdf#150829: sc: Add UItest

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

diff --git a/sc/qa/uitest/range_name/tdf150307.py 
b/sc/qa/uitest/range_name/tdf150307.py
new file mode 100644
index ..30d0e15a60e7
--- /dev/null
+++ b/sc/qa/uitest/range_name/tdf150307.py
@@ -0,0 +1,77 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+
+class tdf150307(UITestCase):
+
+def check_navigator(self, xGridWin, nLen):
+xGridWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": 
"ScNavigatorPanel"}))
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xNavigatorPanel = xCalcDoc.getChild("NavigatorPanel")
+xContentBox = xNavigatorPanel.getChild('contentbox')
+xSheets = xContentBox.getChild("0")
+self.assertEqual('Sheets', get_state_as_dict(xSheets)['Text'])
+
+self.ui_test.wait_until_property_is_updated(xSheets, "Children", 
str(nLen))
+self.assertEqual(nLen, len(xSheets.getChildren()))
+self.assertEqual('Sheet1', 
get_state_as_dict(xSheets.getChild('0'))['Text'])
+
+if nLen == 2:
+self.assertEqual('Sheet1_2', 
get_state_as_dict(xSheets.getChild('1'))['Text'])
+
+xRangeNames = xContentBox.getChild("1")
+self.assertEqual('Range names', get_state_as_dict(xRangeNames)['Text'])
+
+self.ui_test.wait_until_property_is_updated(xRangeNames, "Children", 
str(nLen))
+self.assertEqual(nLen, len(xRangeNames.getChildren()))
+self.assertEqual('Test', 
get_state_as_dict(xRangeNames.getChild('0'))['Text'])
+
+if nLen == 2:
+self.assertEqual('Test (Sheet1_2)', 
get_state_as_dict(xRangeNames.getChild('1'))['Text'])
+
+def test_tdf150307(self):
+
+with self.ui_test.create_doc_in_start_center("calc"):
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xGridWin = xCalcDoc.getChild("grid_window")
+xPosWindow = xCalcDoc.getChild('pos_window')
+
+self.xUITest.executeCommand(".uno:Sidebar")
+
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", 
close_button="add") as xAddNameDlg:
+xEdit = xAddNameDlg.getChild("edit")
+type_text(xEdit, "Test")
+
+self.check_navigator(xGridWin, 1)
+
+self.xUITest.executeCommand(".uno:DuplicateSheet")
+
+self.check_navigator(xGridWin, 2)
+
+with self.ui_test.execute_dialog_through_command(".uno:Remove", 
close_button="yes"):
+pass
+
+self.check_navigator(xGridWin, 1)
+
+self.xUITest.executeCommand(".uno:DuplicateSheet")
+
+self.check_navigator(xGridWin, 2)
+
+# Now test tdf#150829
+self.xUITest.executeCommand(".uno:Undo")
+
+self.check_navigator(xGridWin, 1)
+
+self.xUITest.executeCommand(".uno:Sidebar")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


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

2022-09-07 Thread Stephan Bergmann (via logerrit)
 external/python3/UnpackedTarball_python3.mk |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 3b98992ce119610d0d173939201dee1a331638f6
Author: Stephan Bergmann 
AuthorDate: Wed Sep 7 18:13:01 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 7 20:22:23 2022 +0200

Remove obsolete comment

...after c8fd50f9ec02a131fd4c99e80f7252b49015653a "python3: upgrade to 
release
3.8.13"

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

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 06c64d7d5688..127dea4a8ee4 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -15,9 +15,6 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
PCbuild/pcbuild.sln \
 ))
 
-# For the configure part of external/python3/darwin.patch.0, see
-#  "'configure: error: internal configure 
error for the platform
-# triplet' on macOS with Clang supporting --print-multiarch:"
 $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 sw/source/core/undo/unins.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 4e55e2a10945d57aa39662e795a8a5c3b8ca41a0
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 16:14:28 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 19:58:07 2022 +0200

cid#1513730 Useless call

since:

commit 3a8c74efa2da18f16af4f395e46ee13bfdfa76cc
Date:   Mon Sep 5 14:16:28 2022 +0200

use more SwPosition::Assign

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

diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 4ced606b27ff..e69b6a311caf 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -723,13 +723,9 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & 
rContext)
 rPam.DeleteMark();
 rPam.GetPoint()->Assign( m_nSttNd, m_nSttCnt );
 
-rPam.GetPoint()->GetNode().GetTextNode();
 rPam.SetMark();
 if( m_bSplitNext )
-{
 rPam.GetPoint()->Assign( m_nSttNd + 1 );
-rPam.GetPoint()->GetNode().GetTextNode();
-}
 rPam.GetPoint()->SetContent( m_nSelEnd );
 
 if( m_pHistory )


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 xmloff/source/draw/ximpshap.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3d097586a39f9b9d89e5741c3c797d92cbc4946e
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 11:38:55 2022 +0100
Commit: Andras Timar 
CommitDate: Wed Sep 7 18:39:03 2022 +0200

check impress/calc IFrame "FrameURL" target

similar to

commit c7450d0b9d02c64ae3da467d329040787039767e
Date:   Tue Aug 30 17:01:08 2022 +0100

check IFrame "FrameURL" target

Conflicts:
xmloff/source/draw/ximpshap.cxx

Change-Id: Ibf28c29acb4476830431d02772f3ecd4b23a6a27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139524
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 90bec969bcae..055f5dbb020b 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -3243,6 +3244,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const 
css::uno::Reference< cs
 
 if( !maHref.isEmpty() )
 {
+if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+GetImport().NotifyMacroEventRead();
+
 xProps->setPropertyValue("FrameURL", Any(maHref) );
 }
 }


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 xmloff/source/draw/ximpshap.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 76ffed48d21f079bc3a579099da6a8bc8cd31653
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 11:38:55 2022 +0100
Commit: Andras Timar 
CommitDate: Wed Sep 7 18:36:54 2022 +0200

check impress/calc IFrame "FrameURL" target

similar to

commit c7450d0b9d02c64ae3da467d329040787039767e
Date:   Tue Aug 30 17:01:08 2022 +0100

check IFrame "FrameURL" target

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

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 91ab73783590..d52758f76160 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -3238,6 +3239,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const 
css::uno::Reference< cs
 
 if( !maHref.isEmpty() )
 {
+if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+GetImport().NotifyMacroEventRead();
+
 xProps->setPropertyValue("FrameURL", Any(maHref) );
 }
 }


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 xmloff/source/draw/ximpshap.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 60711395552923a1a98b7d83bff5cc6d190f1a1a
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 11:38:55 2022 +0100
Commit: Andras Timar 
CommitDate: Wed Sep 7 18:35:45 2022 +0200

check impress/calc IFrame "FrameURL" target

similar to

commit c7450d0b9d02c64ae3da467d329040787039767e
Date:   Tue Aug 30 17:01:08 2022 +0100

check IFrame "FrameURL" target

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

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 442116980270..f628530bee7e 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -3141,6 +3142,9 @@ void SdXMLFloatingFrameShapeContext::startFastElement 
(sal_Int32 /*nElement*/,
 
 if( !maHref.isEmpty() )
 {
+if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+GetImport().NotifyMacroEventRead();
+
 xProps->setPropertyValue("FrameURL", Any(maHref) );
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-2' - xmloff/source

2022-09-07 Thread Caolán McNamara (via logerrit)
 xmloff/source/draw/ximpshap.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit dc961a90d6bdd513021060617a94407c5c26
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 11:38:55 2022 +0100
Commit: Andras Timar 
CommitDate: Wed Sep 7 18:33:57 2022 +0200

check impress/calc IFrame "FrameURL" target

similar to

commit c7450d0b9d02c64ae3da467d329040787039767e
Date:   Tue Aug 30 17:01:08 2022 +0100

check IFrame "FrameURL" target

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

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 068205635e75..0c4310cbbacf 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -3104,6 +3105,9 @@ void SdXMLFloatingFrameShapeContext::startFastElement 
(sal_Int32 /*nElement*/,
 
 if( !maHref.isEmpty() )
 {
+if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+GetImport().NotifyMacroEventRead();
+
 xProps->setPropertyValue("FrameURL", Any(maHref) );
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-2' - 3 commits - desktop/source sfx2/source sw/source wizards/source

2022-09-07 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/cmdlineargs.cxx|   10 +-
 sfx2/source/appl/macroloader.cxx  |9 +++--
 sfx2/source/doc/iframe.cxx|   20 +++-
 sfx2/source/inc/macroloader.hxx   |2 ++
 sw/source/filter/html/htmlplug.cxx|7 ++-
 sw/source/filter/xml/xmltexti.cxx |9 +++--
 wizards/source/access2base/DoCmd.xba  |2 +-
 wizards/source/scriptforge/SF_Session.xba |2 +-
 8 files changed, 48 insertions(+), 13 deletions(-)

New commits:
commit 451c404aece863f7fc4c70c13ed5ec470dbc3b05
Author: Stephan Bergmann 
AuthorDate: Thu Sep 1 17:33:51 2022 +0200
Commit: Andras Timar 
CommitDate: Wed Sep 7 15:38:38 2022 +0200

Filter out unwanted command URIs

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139225
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 27d29f7df428885865a8e2313283839b20f2a34b)
Conflicts:
desktop/source/app/cmdlineargs.cxx

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

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 4d5a3bb78396..93d9e8742ba8 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -28,6 +28,7 @@
 #include "cmdlineargs.hxx"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -166,7 +167,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& 
arg, CommandLineEvent cur
 }
 if (nURIlen < 0)
 nURIlen = rest2.getLength();
-arg = rest2.copy(0, nURIlen);
+auto const uri = rest2.copy(0, nURIlen);
+if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+// Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
+// as the "Open" machinery does not know about those command URI 
schemes):
+curEvt = CommandLineEvent::Open;
+} else {
+arg = uri;
+}
 return curEvt;
 }
 
commit a6a7191d99d574373194dfb895e64c295fe6bbe1
Author: Caolán McNamara 
AuthorDate: Tue Aug 30 17:01:08 2022 +0100
Commit: Andras Timar 
CommitDate: Wed Sep 7 15:37:30 2022 +0200

check IFrame "FrameURL" target

similiar to

commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627
Date:   Wed Aug 7 17:37:11 2019 +0100

warn on load when a document binds an event to a macro

Change-Id: Iea888b1c083d2dc69ec322309ac9ae8c5e5eb315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139059
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit c7450d0b9d02c64ae3da467d329040787039767e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139117
Reviewed-by: Christian Lohmaier 

diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index f77d557f09f4..e06edade17a8 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -68,10 +68,10 @@ css::uno::Sequence SAL_CALL 
SfxMacroLoader::getSupportedServiceNames()
 return { "com.sun.star.frame.ProtocolHandler" };
 }
 
-SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+SfxObjectShell* SfxMacroLoader::GetObjectShell(const Reference & 
xFrame)
 {
 SfxObjectShell* pDocShell = nullptr;
-Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+
 if ( xFrame.is() )
 {
 SfxFrame* pFrame=nullptr;
@@ -88,6 +88,11 @@ SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
 return pDocShell;
 }
 
+SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+{
+Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+return SfxMacroLoader::GetObjectShell(xFrame);
+}
 
 uno::Reference SAL_CALL SfxMacroLoader::queryDispatch(
 const util::URL&   aURL,
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index eff4588b3b5f..16eca54e97f6 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -38,10 +38,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -157,6 +159,19 @@ sal_Bool SAL_CALL IFrameObject::load(
 {
 if ( officecfg::Office::Common::Misc::PluginsEnabled::get() )
 {
+util::URL aTargetURL;
+aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+uno::Reference < util::XURLTransformer > xTrans( 
util::URLTransformer::create( mxContext ) );
+xTrans->parseStrict( aTargetURL );
+
+if (INetURLObject(aTargetURL.Complete).GetProtocol() == 
INetProtocol::Macro)
+{
+uno::Reference xParentFrame = 
xFrame->getCreator();
+SfxObjectShell* pDoc = 
SfxMacroLoader::GetObjectShell(xParentFrame);
+if (pDoc && !pDoc->AdjustMacroMode())
+

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

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

New commits:
commit 3b62c0018106adf493246cf129a4ff8b47067523
Author: Andrea Gelmini 
AuthorDate: Wed Sep 7 13:25:09 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Sep 7 18:05:27 2022 +0200

Fix typo

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

diff --git a/drawinglayer/source/tools/converters.cxx 
b/drawinglayer/source/tools/converters.cxx
index 6139fb296d71..84294b24af26 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -78,7 +78,7 @@ namespace drawinglayer
 // Create target VirtualDevice. Use a VirtualDevice in the Alpha-mode.
 // This creates the needed alpha channel 'in parallel'. It is not
 // cheaper though since the VDev in that mode internally uses two 
VDevs,
-// so ressoure-wise it's more expensive, speed-wise pretty much the 
same
+// so resource-wise it's more expensive, speed-wise pretty much the 
same
 // (the former two-path rendering created content & alpha separately in
 // two runs). The former method always created the correct Alpha, but
 // when transparent geometry was involved, the created content was


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

2022-09-07 Thread Julien Nabet (via logerrit)
 include/vcl/graphicfilter.hxx   |1 +
 vcl/source/filter/graphicfilter.cxx |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e485d917058ff3c5ebf348c1e0ec28f0fa9b1b93
Author: Julien Nabet 
AuthorDate: Tue Sep 6 21:35:03 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Sep 7 18:04:37 2022 +0200

tdf#150808: General error importing svgz file

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

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 8985b09eab32..72a767b3d551 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -79,6 +79,7 @@ namespace o3tl
 #define IMP_XBM "SVIXBM"
 #define IMP_XPM "SVIXPM"
 #define IMP_SVG "SVISVG"
+#define IMP_SVGZ"SVISVGZ"
 #define IMP_PDF "SVIPDF"
 #define IMP_TIFF"SVTIFF"
 #define IMP_TGA "SVTGA"
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 6aa2af7d23aa..e616c09853f4 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1428,7 +1428,7 @@ ErrCode GraphicFilter::ImportGraphic(Graphic& rGraphic, 
std::u16string_view rPat
 {
 nStatus = readJPEG(rIStream, rGraphic, eLinkType, nImportFlags);
 }
-else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG))
+else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG) || 
aFilterName.equalsIgnoreAsciiCase(IMP_SVGZ))
 {
 nStatus = readSVG(rIStream, rGraphic, eLinkType, pGraphicContent, 
nGraphicContentSize);
 }


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

2022-09-07 Thread Xisco Fauli (via logerrit)
 vcl/skia/skia_denylist_vulkan.xml |6 --
 1 file changed, 6 deletions(-)

New commits:
commit ce79edd7e79c28516ba43814e4f900b2c05ab23a
Author: Xisco Fauli 
AuthorDate: Wed Sep 7 08:24:21 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Sep 7 18:04:04 2022 +0200

Revert "tdf#150555: Skia seems to fail with Windows 8/8.1"

This reverts commit e2a16489ff4a65e747e93b28d39096cb259bddd7.

Reason for revert: See discussion in 
https://gerrit.libreoffice.org/c/core/+/138549

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

diff --git a/vcl/skia/skia_denylist_vulkan.xml 
b/vcl/skia/skia_denylist_vulkan.xml
index ee7ca9e01e02..39163fc9a71e 100644
--- a/vcl/skia/skia_denylist_vulkan.xml
+++ b/vcl/skia/skia_denylist_vulkan.xml
@@ -42,11 +42,5 @@
 
 
 
-
-
-
-
-
-
 
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - configure.ac download.lst external/python3

2022-09-07 Thread Taichi Haradaguchi (via logerrit)
 configure.ac|2 +-
 download.lst|4 ++--
 external/python3/darwin.patch.0 |   12 
 3 files changed, 3 insertions(+), 15 deletions(-)

New commits:
commit 26d2a8d9a70255f2211f4256f27286653fbfba44
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Tue Sep 6 21:10:53 2022 +0900
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 17:34:11 2022 +0200

python3: upgrade to release 3.8.13

Remove some code in external/python3/darwin.patch.0 as it was fixed 
upstream(https://bugs.python.org/issue45405).

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

diff --git a/configure.ac b/configure.ac
index 94f1224df8a3..e6671da20ce2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9973,7 +9973,7 @@ if test \( "$cross_compiling" = yes -a -z 
"$PYTHON_FOR_BUILD" \) -o "$enable_pyt
 SYSTEM_PYTHON=
 PYTHON_VERSION_MAJOR=3
 PYTHON_VERSION_MINOR=8
-PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.12
+PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.13
 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
 AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in 
download.lst])
 fi
diff --git a/download.lst b/download.lst
index f09b505f8b6e..19874ea935ea 100644
--- a/download.lst
+++ b/download.lst
@@ -216,8 +216,8 @@ export POPPLER_DATA_SHA256SUM := 
2cec05cd1bb03af98a8b06a1e22f6e6e1a65b1e2f3816cb
 export POPPLER_DATA_TARBALL := poppler-data-0.4.11.tar.gz
 export POSTGRESQL_SHA256SUM := 
9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3
 export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
-export PYTHON_SHA256SUM := 
b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea
-export PYTHON_TARBALL := Python-3.8.12.tar.xz
+export PYTHON_SHA256SUM := 
6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57
+export PYTHON_TARBALL := Python-3.8.13.tar.xz
 export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
 export QXP_TARBALL := libqxp-0.0.2.tar.xz
 export RAPTOR_SHA256SUM := 
ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
diff --git a/external/python3/darwin.patch.0 b/external/python3/darwin.patch.0
index 30d20ed57578..139cdc9780bb 100644
--- a/external/python3/darwin.patch.0
+++ b/external/python3/darwin.patch.0
@@ -8,15 +8,3 @@
  .text
  
  /* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
 configure
-+++ configure
-@@ -5167,7 +5167,9 @@
- fi
- 
- 
-+if test "$(uname -s)" = Darwin; then MULTIARCH=; else
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-+fi
- 
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet 
based on compiler characteristics" >&5


New Defects reported by Coverity Scan for LibreOffice

2022-09-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1513730:(USELESS_CALL)



*** CID 1513730:(USELESS_CALL)
/sw/source/core/undo/unins.cxx: 731 in 
SwUndoReplace::Impl::RedoImpl(sw::UndoRedoContext &)()
725 
726 rPam.GetPoint()->GetNode().GetTextNode();
727 rPam.SetMark();
728 if( m_bSplitNext )
729 {
730 rPam.GetPoint()->Assign( m_nSttNd + 1 );
>>> CID 1513730:(USELESS_CALL)
>>> Calling "rPam->GetPoint()->GetNode()->GetTextNode()" is only useful for 
>>> its return value, which is ignored.
731 rPam.GetPoint()->GetNode().GetTextNode();
732 }
733 rPam.GetPoint()->SetContent( m_nSelEnd );
734 
735 if( m_pHistory )
736 {
/sw/source/core/undo/unins.cxx: 726 in 
SwUndoReplace::Impl::RedoImpl(sw::UndoRedoContext &)()
720 {
721 SwDoc & rDoc = rContext.GetDoc();
722 SwCursor & 
rPam(rContext.GetCursorSupplier().CreateNewShellCursor());
723 rPam.DeleteMark();
724 rPam.GetPoint()->Assign( m_nSttNd, m_nSttCnt );
725 
>>> CID 1513730:(USELESS_CALL)
>>> Calling "rPam->GetPoint()->GetNode()->GetTextNode()" is only useful for 
>>> its return value, which is ignored.
726 rPam.GetPoint()->GetNode().GetTextNode();
727 rPam.SetMark();
728 if( m_bSplitNext )
729 {
730 rPam.GetPoint()->Assign( m_nSttNd + 1 );
731 rPam.GetPoint()->GetNode().GetTextNode();



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DNwPE_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJieIM4tYihIDxkqtaTTXX-2FPD0HX-2F2jLHffrhrTYjVwJZ-2BjP9NSDvaplQGOS8PSttq32d2XHWvOHlH2m07yQQZcOLgiAFiRPCjGPtqKvHfciPSBlGQxJY8zcvDzEji-2FfdY753C71JvKsMcQky-2FHwK-2B-2BTqPK0kd32re51T8v6fVDTLk-3D



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

2022-09-07 Thread Caolán McNamara (via logerrit)
 filter/source/msfilter/escherex.cxx   |7 ++-
 include/filter/msfilter/escherex.hxx  |4 ++--
 oox/source/export/vmlexport.cxx   |2 --
 sw/source/filter/ww8/rtfsdrexport.cxx |6 +-
 4 files changed, 5 insertions(+), 14 deletions(-)

New commits:
commit 86b55d24940b476162c1a9d218082fbe9a0bf1e1
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 20:09:34 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 16:46:57 2022 +0200

cid#1500419 rearrange to silence Use after free

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

diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 3044762de92a..9c754b236988 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4867,7 +4867,6 @@ public:
 EscherEx::EscherEx(std::shared_ptr xGlobal, SvStream* 
pOutStrm, bool bOOXML)
 : mxGlobal(std::move(xGlobal))
 , mpOutStrm(pOutStrm)
-, mbOwnsStrm(false)
 , mnCurrentDg(0)
 , mnCountOfs(0)
 , mnGroupLevel(0)
@@ -4878,8 +4877,8 @@ EscherEx::EscherEx(std::shared_ptr 
xGlobal, SvStream* pOutStrm,
 {
 if (!mpOutStrm)
 {
-mpOutStrm = new SvNullStream();
-mbOwnsStrm = true;
+mxOwnStrm = std::make_unique();
+mpOutStrm = mxOwnStrm.get();
 }
 mnStrmStartOfs = mpOutStrm->Tell();
 mpImplEESdrWriter.reset( new ImplEESdrWriter( *this ) );
@@ -4887,8 +4886,6 @@ EscherEx::EscherEx(std::shared_ptr 
xGlobal, SvStream* pOutStrm,
 
 EscherEx::~EscherEx()
 {
-if (mbOwnsStrm)
-delete mpOutStrm;
 }
 
 void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ )
diff --git a/include/filter/msfilter/escherex.hxx 
b/include/filter/msfilter/escherex.hxx
index ac6b4cc004a3..f6906173ee1a 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -1048,9 +1048,9 @@ class MSFILTER_DLLPUBLIC EscherEx : public 
EscherPersistTable
 {
 protected:
 std::shared_ptr   mxGlobal;
-::std::unique_ptr< ImplEESdrWriter > mpImplEESdrWriter;
+std::unique_ptr mpImplEESdrWriter;
+std::unique_ptr mxOwnStrm;
 SvStream*   mpOutStrm;
-boolmbOwnsStrm;
 sal_uInt32  mnStrmStartOfs;
 std::vector< sal_uInt32 >   mOffsets;
 std::vector< sal_uInt16 >   mRecTypes;
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 8f9269db0de3..fa21068cf4b6 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -89,8 +89,6 @@ void VMLExport::SetFS( const ::sax_fastparser::FSHelperPtr& 
pSerializer )
 
 VMLExport::~VMLExport()
 {
-delete mpOutStrm;
-mpOutStrm = nullptr;
 }
 
 void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx 
b/sw/source/filter/ww8/rtfsdrexport.cxx
index 6b41e7ce044e..2820aa68eb89 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -56,11 +56,7 @@ RtfSdrExport::RtfSdrExport(RtfExport& rExport)
 memset(m_pShapeTypeWritten.get(), 0, ESCHER_ShpInst_COUNT * sizeof(bool));
 }
 
-RtfSdrExport::~RtfSdrExport()
-{
-delete mpOutStrm;
-mpOutStrm = nullptr;
-}
+RtfSdrExport::~RtfSdrExport() {}
 
 void RtfSdrExport::OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance)
 {


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

2022-09-07 Thread Justin Luth (via logerrit)
 sw/qa/extras/odfexport/odfexport2.cxx |3 +++
 sw/source/core/unocore/unosett.cxx|2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit c24fe44064c6624fefe642508086c8562c372fba
Author: Justin Luth 
AuthorDate: Wed Sep 7 07:00:59 2022 -0400
Commit: Justin Luth 
CommitDate: Wed Sep 7 16:41:47 2022 +0200

tdf#149547 fix "tdf#75297 sw uno: override default num char style"

The problem was that things like chapter numbering were
creating this style on import.
Interesting that it didn't do it for my use case.

This fixes 7.5 commit 758945b077220fe151c1565c6d5b0bad02de6d58.

Originally I left this clause "as is" because I had not yet removed
the obsolete part of the condition. But now I can change anything
in that .isEmpty() clause since
commit 1a57418e2837e7fd07b0619804feed06e1acfe41
remove unused sw UNO_NAME_CHARACTER_FORMAT_NONE

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

diff --git a/sw/qa/extras/odfexport/odfexport2.cxx 
b/sw/qa/extras/odfexport/odfexport2.cxx
index 5d2f91b92d5d..018f7afd0cb6 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -36,6 +36,9 @@ DECLARE_ODFEXPORT_TEST(testTdf52065_centerTabs, 
"testTdf52065_centerTabs.odt")
 CPPUNIT_ASSERT(nTabStop < 4000);
 CPPUNIT_ASSERT(3000 < nTabStop);
 CPPUNIT_ASSERT_EQUAL(OUString(u"Pečiatka zamestnávateľa"), 
parseDump("//body/txt[4]/SwParaPortion/SwLineLayout/child::*[4]", "portion"));
+
+// tdf#149547: __XXX___invalid CharacterStyles should not be 
imported/exported
+
CPPUNIT_ASSERT(!getStyles("CharacterStyles")->hasByName("__XXX___invalid"));
 }
 
 DECLARE_ODFEXPORT_TEST(testTdf104254_noHeaderWrapping, 
"tdf104254_noHeaderWrapping.odt")
diff --git a/sw/source/core/unocore/unosett.cxx 
b/sw/source/core/unocore/unosett.cxx
index 064f23b30a48..e92bade7875f 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1567,7 +1567,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
 SwDoc *const pLocalDoc = pDocShell ? pDocShell->GetDoc() : pDoc;
 if (sCharFormatName.isEmpty())
 {
-rCharStyleName = aInvalidStyle;
+rCharStyleName.clear();
 aFormat.SetCharFormat(nullptr);
 aFormat.SetCharFormatName("");
 }


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |  145 +++
 1 file changed, 145 insertions(+)

New commits:
commit 9220716bed8ff4337453f06788233aa73463d63b
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 12:24:44 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 16:06:29 2022 +0200

tdf#150810 get visible placeholder text in GtkEntry with focus

in gtk3 focus causes placeholders to be not rendered
https://gitlab.gnome.org/GNOME/gtk/-/issues/378
https://bugzilla.gnome.org/show_bug.cgi?id=657613

FWIW, currently in gtk4 they are shown when focused

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 326c1aa9ee27..499215667252 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -13331,16 +13331,161 @@ public:
 
 class GtkInstanceEntry : public GtkInstanceEditable
 {
+private:
+#if !GTK_CHECK_VERSION(4, 0, 0)
+GtkEntry* m_pEntry;
+GtkOverlay* m_pPlaceHolderReplacement;
+GtkLabel* m_pPlaceHolderLabel;
+gulong m_nEntryFocusInSignalId;
+gulong m_nEntryFocusOutSignalId;
+gulong m_nEntryTextLengthSignalId;
+gulong m_nEntryScrollOffsetSignalId;
+guint m_nUpdatePlaceholderReplacementIdle;
+
+static gboolean do_update_placeholder_replacement(gpointer widget)
+{
+GtkInstanceEntry* pThis = static_cast(widget);
+pThis->update_placeholder_replacement();
+return false;
+}
+
+void update_placeholder_replacement()
+{
+m_nUpdatePlaceholderReplacementIdle = 0;
+
+const char* placeholder_text = 
gtk_entry_get_placeholder_text(m_pEntry);
+const bool bShow = placeholder_text && 
!gtk_entry_get_text_length(m_pEntry) &&
+   gtk_widget_has_focus(GTK_WIDGET(m_pEntry));
+if (bShow)
+{
+GdkRectangle text_area;
+gtk_entry_get_text_area(m_pEntry, &text_area);
+gint x;
+gtk_entry_get_layout_offsets(m_pEntry, &x, nullptr);
+gtk_widget_set_margin_start(GTK_WIDGET(m_pPlaceHolderLabel), x);
+gtk_widget_set_margin_end(GTK_WIDGET(m_pPlaceHolderLabel), x);
+gtk_label_set_text(m_pPlaceHolderLabel, placeholder_text);
+gtk_widget_show(GTK_WIDGET(m_pPlaceHolderLabel));
+}
+else
+gtk_widget_hide(GTK_WIDGET(m_pPlaceHolderLabel));
+}
+
+void launch_update_placeholder_replacement()
+{
+// do it in the next event cycle so the GtkEntry has done its layout
+// and gtk_entry_get_layout_offsets returns the right results
+if (m_nUpdatePlaceholderReplacementIdle)
+return;
+// G_PRIORITY_LOW so gtk's idles are run before this
+m_nUpdatePlaceholderReplacementIdle = g_idle_add_full(G_PRIORITY_LOW, 
do_update_placeholder_replacement, this, nullptr);
+}
+
+static gboolean signalEntryFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
+{
+GtkInstanceEntry* pThis = static_cast(widget);
+pThis->launch_update_placeholder_replacement();
+return false;
+}
+
+static gboolean signalEntryFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
+{
+GtkInstanceEntry* pThis = static_cast(widget);
+pThis->launch_update_placeholder_replacement();
+return false;
+}
+
+static void signalEntryTextLength(void*, GParamSpec*, gpointer widget)
+{
+GtkInstanceEntry* pThis = static_cast(widget);
+pThis->launch_update_placeholder_replacement();
+}
+
+static void signalEntryScrollOffset(void*, GParamSpec*, gpointer widget)
+{
+// this property affects the x-position of the text area
+GtkInstanceEntry* pThis = static_cast(widget);
+pThis->launch_update_placeholder_replacement();
+}
+
+#endif
+
 public:
 GtkInstanceEntry(GtkEntry* pEntry, GtkInstanceBuilder* pBuilder, bool 
bTakeOwnership)
 : GtkInstanceEditable(GTK_WIDGET(pEntry), pBuilder, bTakeOwnership)
+#if !GTK_CHECK_VERSION(4, 0, 0)
+, m_pEntry(pEntry)
+, m_pPlaceHolderReplacement(nullptr)
+, m_pPlaceHolderLabel(nullptr)
+, m_nEntryFocusInSignalId(0)
+, m_nEntryFocusOutSignalId(0)
+, m_nEntryTextLengthSignalId(0)
+, m_nEntryScrollOffsetSignalId(0)
+, m_nUpdatePlaceholderReplacementIdle(0)
+#endif
 {
+#if !GTK_CHECK_VERSION(4, 0, 0)
+// tdf#150810 fake getting placeholders visible even when GtkEntry has 
focus in gtk3.
+// In gtk4 this works out of the box, for gtk3 fake it by having a 
GtkLabel in an
+// overlay and show that label if the placeholder would be shown if 
there was
+// no focus
+const char* pPlaceHolderText = 
gtk_entry_get_placeholder_text(m_pEntry);
+if (pPlaceHold

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

2022-09-07 Thread Eike Rathke (via logerrit)
 formula/source/core/api/FormulaCompiler.cxx |2 +-
 sc/source/core/tool/compiler.cxx|7 +--
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 75eb756e25bfe78fd0bc3f92c53fe93a4a87c80c
Author: Eike Rathke 
AuthorDate: Tue Sep 6 13:48:29 2022 +0200
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 16:03:16 2022 +0200

A ColRowName (label) is a QuotedLabel is a SingleQuoted

 This is a combination of 2 commits.

A ColRowName (label) is a QuotedLabel is a SingleQuoted

Hence a ' is not escaped by \' but by '' doubling it.

See also ODFF 5.10 Quoted Label

https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#__RefHeading__1017950_715980110

Apparently this was always wrong and even stored in files and
never correctly read/compiled back.

Change-Id: I94bdb7d1fdffe9bbd77cf443883dd76637be981b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139491
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 64f673238cf9b645a751e8f8137ca14e595a779a)

 Conflicts:
sc/source/core/tool/compiler.cxx

Always enquote ColRowName (label) as SingleQuoted

It's anyway required by ODFF and also in UI prevents confusion
between defined names and labels of the same name.

Change-Id: Iba03f15f1f778132696101507e61cc0ef8de6c6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139533
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 55e7de171b666a87f29f072e0a4787480946c066)

 Conflicts:
sc/source/core/tool/compiler.cxx

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

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 044921d70cc0..192cb56173fc 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1203,7 +1203,7 @@ bool FormulaCompiler::DeQuote( OUString& rStr )
 if ( nLen > 1 && rStr[0] == '\'' && rStr[ nLen-1 ] == '\'' )
 {
 rStr = rStr.copy( 1, nLen-2 );
-rStr = rStr.replaceAll( "\\\'", "\'" );
+rStr = rStr.replaceAll( "''", "'" );
 return true;
 }
 return false;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7bcb949c8fe5..7be5a364a3af 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5506,15 +5506,10 @@ void ScCompiler::LocalizeString( OUString& rName ) const
 // quote characters contained within are escaped by '\\'.
 bool ScCompiler::EnQuote( OUString& rStr )
 {
-sal_Int32 nType = ScGlobal::getCharClass().getStringType( rStr, 0, 
rStr.getLength() );
-if ( !CharClass::isNumericType( nType )
-&& CharClass::isAlphaNumericType( nType ) )
-return false;
-
 sal_Int32 nPos = 0;
 while ( (nPos = rStr.indexOf( '\'', nPos)) != -1 )
 {
-rStr = rStr.replaceAt( nPos, 0, u"\\" );
+rStr = rStr.replaceAt( nPos, 0, u"'" );
 nPos += 2;
 }
 rStr = "'" + rStr + "'";


[Libreoffice-commits] core.git: configure.ac download.lst external/python3

2022-09-07 Thread Taichi Haradaguchi (via logerrit)
 configure.ac|2 +-
 download.lst|4 ++--
 external/python3/darwin.patch.0 |   12 
 3 files changed, 3 insertions(+), 15 deletions(-)

New commits:
commit c8fd50f9ec02a131fd4c99e80f7252b49015653a
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Tue Sep 6 21:10:53 2022 +0900
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 16:02:03 2022 +0200

python3: upgrade to release 3.8.13

Remove some code in external/python3/darwin.patch.0 as it was fixed 
upstream(https://bugs.python.org/issue45405).

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

diff --git a/configure.ac b/configure.ac
index 61806988b94b..f9d52805053b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9984,7 +9984,7 @@ if test \( "$cross_compiling" = yes -a -z 
"$PYTHON_FOR_BUILD" \) -o "$enable_pyt
 SYSTEM_PYTHON=
 PYTHON_VERSION_MAJOR=3
 PYTHON_VERSION_MINOR=8
-PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.12
+PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.13
 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
 AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in 
download.lst])
 fi
diff --git a/download.lst b/download.lst
index 371ff954e2ba..6a86898646d8 100644
--- a/download.lst
+++ b/download.lst
@@ -216,8 +216,8 @@ export POPPLER_DATA_SHA256SUM := 
2cec05cd1bb03af98a8b06a1e22f6e6e1a65b1e2f3816cb
 export POPPLER_DATA_TARBALL := poppler-data-0.4.11.tar.gz
 export POSTGRESQL_SHA256SUM := 
9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3
 export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
-export PYTHON_SHA256SUM := 
b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea
-export PYTHON_TARBALL := Python-3.8.12.tar.xz
+export PYTHON_SHA256SUM := 
6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57
+export PYTHON_TARBALL := Python-3.8.13.tar.xz
 export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
 export QXP_TARBALL := libqxp-0.0.2.tar.xz
 export RAPTOR_SHA256SUM := 
ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
diff --git a/external/python3/darwin.patch.0 b/external/python3/darwin.patch.0
index 30d20ed57578..139cdc9780bb 100644
--- a/external/python3/darwin.patch.0
+++ b/external/python3/darwin.patch.0
@@ -8,15 +8,3 @@
  .text
  
  /* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
 configure
-+++ configure
-@@ -5167,7 +5167,9 @@
- fi
- 
- 
-+if test "$(uname -s)" = Darwin; then MULTIARCH=; else
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-+fi
- 
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet 
based on compiler characteristics" >&5


[Libreoffice-commits] core.git: 2 commits - dbaccess/uiconfig libreofficekit/qa sc/uiconfig svx/uiconfig vcl/uiconfig

2022-09-07 Thread Caolán McNamara (via logerrit)
 dbaccess/uiconfig/ui/useradminpage.ui|1 +
 libreofficekit/qa/gtktiledviewer/gtv.ui  |1 +
 sc/uiconfig/scalc/ui/sortcriteriapage.ui |1 -
 svx/uiconfig/ui/dockingfontwork.ui   |   15 ---
 vcl/uiconfig/ui/openlockedquerybox.ui|2 --
 5 files changed, 2 insertions(+), 18 deletions(-)

New commits:
commit 0797eaaa04f2c932ef428c664b4f3fa32fa74a7a
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 12:52:28 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 15:56:05 2022 +0200

apply ui-rules

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

diff --git a/dbaccess/uiconfig/ui/useradminpage.ui 
b/dbaccess/uiconfig/ui/useradminpage.ui
index e76349a49b90..7407e2574757 100644
--- a/dbaccess/uiconfig/ui/useradminpage.ui
+++ b/dbaccess/uiconfig/ui/useradminpage.ui
@@ -75,6 +75,7 @@
 True
 end
 menu
+True
 
   
 
diff --git a/libreofficekit/qa/gtktiledviewer/gtv.ui 
b/libreofficekit/qa/gtktiledviewer/gtv.ui
index 79cb9a9ec409..a66cefefef3f 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv.ui
+++ b/libreofficekit/qa/gtktiledviewer/gtv.ui
@@ -455,6 +455,7 @@
 False
 Content control date
 calendar
+True
 
   
 
diff --git a/sc/uiconfig/scalc/ui/sortcriteriapage.ui 
b/sc/uiconfig/scalc/ui/sortcriteriapage.ui
index df7e23219161..67ebed40ab82 100644
--- a/sc/uiconfig/scalc/ui/sortcriteriapage.ui
+++ b/sc/uiconfig/scalc/ui/sortcriteriapage.ui
@@ -96,7 +96,6 @@
 True
 False
 True
-True
 True
 rbTopDown
   
diff --git a/svx/uiconfig/ui/dockingfontwork.ui 
b/svx/uiconfig/ui/dockingfontwork.ui
index ecfd6a543b15..797bf9527036 100644
--- a/svx/uiconfig/ui/dockingfontwork.ui
+++ b/svx/uiconfig/ui/dockingfontwork.ui
@@ -44,7 +44,6 @@
 
   
 True
-True
 Baseline Off
 True
 svx/res/fw01.png
@@ -73,7 +72,6 @@
 
   
 True
-True
 Rotate
 True
 svx/res/fw02.png
@@ -92,7 +90,6 @@
 
   
 True
-True
 Upright
 True
 svx/res/fw03.png
@@ -111,7 +108,6 @@
 
   
 True
-True
 Slant Horizontal
 True
 svx/res/fw04.png
@@ -130,7 +126,6 @@
 
   
 True
-True
 Slant Vertical
 True
 svx/res/fw05.png
@@ -160,7 +155,6 @@
 
   
 True
-True
 Orientation
 True
 svx/res/fw06.png
@@ -188,7 +182,6 @@
 
   
 True
-True
 Align Left
 True
 svx/res/fw07.png
@@ -207,7 +200,6 @@
 
   
 True
-True
 Align Center
 True
 svx/res/fw08.png
@@ -226,7 +218,6 @@
 
   
 True
-True
 Align Right
 True
 svx/res/fw09.png
@@ -245,7 +236,6 @@
 
   
 True
-True
 AutoSize Text
 True
 svx/res/fw010.png
@@ -364,7 +354,6 @@
 
   
 True
-True
 Contour
 True
 svx/res/fw011.png
@@ -382,7 +371,6 @@
 
   
 True
-True
 Text Contour
 True
 svx/res/fw012.png
@@ -410,7 +398,6 @@
 
   
 True
-True
 No Text Shadow
 True
 svx/res/fw013.png
@@ -429,7 +416,6 @@
 
   
 True
-True
 Add Text Shadow
 True
 svx/res/fw014.png
@@ -448,7 +434,6 @@
 
   
 True
-True
 Slant Text Shadow
 True
 svx/res/fw015.png
commit fa877608bb65dc4d115455be5ce72f009ce0334b
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 12:49:19 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep

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

2022-09-07 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/charnamepage.ui |9 +
 cui/uiconfig/ui/langtoolconfigpage.ui   |9 ++---
 sfx2/uiconfig/ui/documentinfopage.ui|1 +
 sw/uiconfig/swriter/ui/contentcontroldlg.ui |2 ++
 4 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit 28f40b79639c37da8af810d9d327b1af5baf8447
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 12:45:45 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 15:55:32 2022 +0200

add truncate-multiline for consistency with vcl and all the others

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

diff --git a/cui/uiconfig/ui/charnamepage.ui b/cui/uiconfig/ui/charnamepage.ui
index 4721506d5e2a..8961ee260f8f 100644
--- a/cui/uiconfig/ui/charnamepage.ui
+++ b/cui/uiconfig/ui/charnamepage.ui
@@ -142,6 +142,7 @@
 
 
   
+True
 False
   
 
@@ -177,6 +178,7 @@
 True
 
   
+True
 False
   
 
@@ -213,6 +215,7 @@
 True
 
   
+True
 False
   
 
@@ -408,6 +411,7 @@
 True
 
   
+True
 False
   
 
@@ -430,6 +434,7 @@
 True
 
   
+True
 False
   
 
@@ -562,6 +567,7 @@
 
 
   
+True
 False
   
 
@@ -674,6 +680,7 @@
 True
 
   
+True
 False
   
 
@@ -696,6 +703,7 @@
 True
 
   
+True
 False
   
 
@@ -755,6 +763,7 @@
 
 
   
+True
 False
   
 
diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui 
b/cui/uiconfig/ui/langtoolconfigpage.ui
index 846961baa427..38aa184c2469 100644
--- a/cui/uiconfig/ui/langtoolconfigpage.ui
+++ b/cui/uiconfig/ui/langtoolconfigpage.ui
@@ -96,6 +96,7 @@
   
 True
 True
+True
 True
   
   
@@ -134,6 +135,7 @@
 
   
 True
+True
 True
   
   
@@ -144,6 +146,7 @@
 
   
 True
+True
 True
   
   
@@ -157,9 +160,9 @@
 False
 start
 Please use the base URL, i.e., without 
“/check”, at the end.
-  
-
-  
+
+  
+
   
   
 1
diff --git a/sfx2/uiconfig/ui/documentinfopage.ui 
b/sfx2/uiconfig/ui/documentinfopage.ui
index a03236d7fcc7..919fb9934563 100644
--- a/sfx2/uiconfig/ui/documentinfopage.ui
+++ b/sfx2/uiconfig/ui/documentinfopage.ui
@@ -443,6 +443,7 @@
 
 
   
+True
 False
   
 
diff --git a/sw/uiconfig/swriter/ui/contentcontroldlg.ui 
b/sw/uiconfig/swriter/ui/contentcontroldlg.ui
index ef6b2081426c..f602bd00712c 100644
--- a/sw/uiconfig/swriter/ui/contentcontroldlg.ui
+++ b/sw/uiconfig/swriter/ui/contentcontroldlg.ui
@@ -183,6 +183,7 @@
 
   
 True
+True
 True
   
   
@@ -193,6 +194,7 @@
 
   
 True
+True
 True
   
   


[Libreoffice-commits] core.git: include/vcl solenv/clang-format vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source

2022-09-07 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx|2 
 solenv/clang-format/excludelist   |1 
 vcl/Library_vcl.mk|1 
 vcl/inc/font/EmphasisMark.hxx |   45 +
 vcl/qa/cppunit/font.cxx   |   71 ++
 vcl/source/font/EmphasisMark.cxx  |  174 +++
 vcl/source/gdi/pdfwriter_impl.cxx |   45 +++--
 vcl/source/outdev/font.cxx|  188 ++
 8 files changed, 319 insertions(+), 208 deletions(-)

New commits:
commit 5791c779635b5d42de3c5691bdbadf4a079e096e
Author: Chris Sherlock 
AuthorDate: Sat Aug 13 17:20:32 2022 +1000
Commit: Tomaž Vajngerl 
CommitDate: Wed Sep 7 15:26:55 2022 +0200

vcl: convert ImplGetEmphasisMark() to EmphasisMark class

It makes more sense for an emphasis mark to be an object that can be
queried, than it is for it to be a function with lots of output
parameters.

I have added a unit test, note that for now something doesn't seem right
with polypolygon equality checks (test fails, but the disc is generated
the same way) so not testing the shape creation.

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 1162ef3c116e..66cd10f2a53f 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1133,8 +1133,6 @@ public:
 
 bool GetFontFeatures(std::vector& rFontFeatures) const;
 
-SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& 
rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
- tools::Long& rYOff, 
tools::Long& rWidth, FontEmphasisMark eEmphasis, tools::Long nHeight );
 boolGetGlyphBoundRects( const Point& rOrigin, 
const OUString& rStr, int nIndex,
 int nLen, std::vector< 
tools::Rectangle >& rVector ) const;
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 4802408e4117..d1239f3a09fa 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14808,6 +14808,7 @@ vcl/source/filter/wmf/wmf.cxx
 vcl/source/filter/wmf/wmfwr.cxx
 vcl/source/filter/wmf/wmfwr.hxx
 vcl/source/font/DirectFontSubstitution.cxx
+vcl/source/font/EmphasisMark.cxx
 vcl/source/font/FontSelectPattern.cxx
 vcl/source/font/PhysicalFontCollection.cxx
 vcl/source/font/PhysicalFontFamily.cxx
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index b4135d502b2e..10907d6c420c 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -476,6 +476,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/filter/webp/reader \
 vcl/source/filter/webp/writer \
 vcl/source/font/DirectFontSubstitution \
+vcl/source/font/EmphasisMark \
 vcl/source/font/Feature \
 vcl/source/font/FeatureCollector \
 vcl/source/font/FeatureParser \
diff --git a/vcl/inc/font/EmphasisMark.hxx b/vcl/inc/font/EmphasisMark.hxx
new file mode 100644
index ..5e902da26294
--- /dev/null
+++ b/vcl/inc/font/EmphasisMark.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+namespace vcl::font
+{
+class VCL_DLLPUBLIC EmphasisMark
+{
+public:
+EmphasisMark(FontEmphasisMark eEmphasis, tools::Long nHeight, sal_Int32 
nDPIY);
+
+tools::PolyPolygon GetShape() const { return maPolyPoly; }
+bool IsShapePolyLine() const { return mbIsPolyLine; }
+tools::Rectangle GetRect1() const { return maRect1; }
+tools::Rectangle GetRect2() const { return maRect2; }
+tools::Long GetYOffset() const { return mnYOff; }
+tools::Long GetWidth() const { return mnWidth; }
+
+private:
+tools::PolyPolygon maPolyPoly;
+bool mbIsPolyLine;
+tools::Rectangle maRect1;
+tools::Rectangle maRect2;
+tools::Long mnYOff;
+tools::Long mnWidth;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx
index 8023de9d6f07..d989b01cb051 100644
--- a/vcl/qa/cppunit/font.cxx
+++ b/vcl/qa/cppunit/font.cxx
@@ -12,6 +12,8 @@
 
 #include 
 
+#include 
+
 class VclFontTest : public test::BootstrapFixture
 {
 public:
@@ -27,6 +29,11 @@ public:
 void testSymbolFlagAndCharSet();
 void testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese();
 void testEmphasisMarkShouldBePosAboveWhe

[Libreoffice-commits] core.git: bin/ui-rules-enforcer.py sfx2/uiconfig

2022-09-07 Thread Caolán McNamara (via logerrit)
 bin/ui-rules-enforcer.py |   12 ++--
 sfx2/uiconfig/ui/commandpopup.ui |1 -
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 980c3721f0eb7665a2af5d7d5c363f8b5d0c3152
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 09:32:36 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 15:05:37 2022 +0200

gtk4: caps-lock-warning is gone as a property

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

diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 6f2d56bf935f..8c222793d700 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -242,19 +242,19 @@ def remove_spin_button_input_purpose(current):
 if input_purpose != None:
   current.remove(input_purpose)
 
-def remove_spin_button_caps_lock_warning(current):
+def remove_caps_lock_warning(current):
   caps_lock_warning = None
-  isspinbutton = current.get('class') == "GtkSpinButton"
+  iscandidate = current.get('class') == "GtkSpinButton" or 
current.get('class') == "GtkEntry"
   for child in current:
-remove_spin_button_caps_lock_warning(child)
-if not isspinbutton:
+remove_caps_lock_warning(child)
+if not iscandidate:
 continue
 if child.tag == "property":
   attributes = child.attrib
   if attributes.get("name") == "caps_lock_warning" or 
attributes.get("name") == "caps-lock-warning":
 caps_lock_warning = child
 
-  if isspinbutton:
+  if iscandidate:
 if caps_lock_warning != None:
   current.remove(caps_lock_warning)
 
@@ -628,7 +628,7 @@ remove_check_button_align(root)
 remove_check_button_relief(root)
 remove_check_button_image_position(root)
 remove_spin_button_input_purpose(root)
-remove_spin_button_caps_lock_warning(root)
+remove_caps_lock_warning(root)
 remove_spin_button_max_length(root)
 remove_track_visited_links(root)
 remove_label_pad(root)
diff --git a/sfx2/uiconfig/ui/commandpopup.ui b/sfx2/uiconfig/ui/commandpopup.ui
index 9630f2994cf9..08e82423e394 100644
--- a/sfx2/uiconfig/ui/commandpopup.ui
+++ b/sfx2/uiconfig/ui/commandpopup.ui
@@ -31,7 +31,6 @@
   
 True
 True
-False
 True
 Search command
   


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 sfx2/uiconfig/ui/commandpopup.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ddca05e0b38ebf113cec8f8803b4640fee50db69
Author: Caolán McNamara 
AuthorDate: Wed Sep 7 09:28:41 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 15:05:17 2022 +0200

every other .ui is version="3.20"

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

diff --git a/sfx2/uiconfig/ui/commandpopup.ui b/sfx2/uiconfig/ui/commandpopup.ui
index 2b8f52253502..9630f2994cf9 100644
--- a/sfx2/uiconfig/ui/commandpopup.ui
+++ b/sfx2/uiconfig/ui/commandpopup.ui
@@ -1,7 +1,7 @@
 
 
 
-  
+  
   
 
   


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

2022-09-07 Thread Caolán McNamara (via logerrit)
 sfx2/source/appl/macroloader.cxx   |9 +++--
 sfx2/source/doc/iframe.cxx |   20 +++-
 sfx2/source/inc/macroloader.hxx|2 ++
 sw/source/filter/html/htmlplug.cxx |7 ++-
 sw/source/filter/xml/xmltexti.cxx  |9 +++--
 5 files changed, 37 insertions(+), 10 deletions(-)

New commits:
commit 2bb39d95caf3e119d908abc176f52864d7dc7c3e
Author: Caolán McNamara 
AuthorDate: Tue Aug 30 17:01:08 2022 +0100
Commit: Andras Timar 
CommitDate: Wed Sep 7 14:41:29 2022 +0200

check IFrame "FrameURL" target

similiar to

commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627
Date:   Wed Aug 7 17:37:11 2019 +0100

warn on load when a document binds an event to a macro

Conflicts:
sfx2/source/doc/iframe.cxx
sw/source/filter/html/htmlplug.cxx
sw/source/filter/xml/xmltexti.cxx

Change-Id: Iea888b1c083d2dc69ec322309ac9ae8c5e5eb315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139059
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139246
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 6ae9c760e7e05e104adf84944b711e99e15bee7e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139508
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 98e036e0a7ea..b50d1e63c789 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -76,10 +76,10 @@ css::uno::Sequence SAL_CALL 
SfxMacroLoader::getSupportedServiceNames()
 return aSeq;
 }
 
-SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+SfxObjectShell* SfxMacroLoader::GetObjectShell(const Reference & 
xFrame)
 {
 SfxObjectShell* pDocShell = nullptr;
-Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+
 if ( xFrame.is() )
 {
 SfxFrame* pFrame=nullptr;
@@ -96,6 +96,11 @@ SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
 return pDocShell;
 }
 
+SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+{
+Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+return SfxMacroLoader::GetObjectShell(xFrame);
+}
 
 uno::Reference SAL_CALL SfxMacroLoader::queryDispatch(
 const util::URL&   aURL,
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 8b1271545dfb..aea851894286 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -39,11 +39,13 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -159,6 +161,19 @@ sal_Bool SAL_CALL IFrameObject::load(
 {
 if ( SvtMiscOptions().IsPluginsEnabled() )
 {
+util::URL aTargetURL;
+aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+uno::Reference < util::XURLTransformer > xTrans( 
util::URLTransformer::create( mxContext ) );
+xTrans->parseStrict( aTargetURL );
+
+if (INetURLObject(aTargetURL.Complete).GetProtocol() == 
INetProtocol::Macro)
+{
+uno::Reference xParentFrame = 
xFrame->getCreator();
+SfxObjectShell* pDoc = 
SfxMacroLoader::GetObjectShell(xParentFrame);
+if (pDoc && !pDoc->AdjustMacroMode())
+return false;
+}
+
 DBG_ASSERT( !mxFrame.is(), "Frame already existing!" );
 VclPtr pParent = VCLUnoHelper::GetWindow( 
xFrame->getContainerWindow() );
 VclPtr pWin = VclPtr::Create( 
pParent, maFrmDescr.IsFrameBorderOn() );
@@ -181,11 +196,6 @@ sal_Bool SAL_CALL IFrameObject::load(
 if ( xFramesSupplier.is() )
 mxFrame->setCreator( xFramesSupplier );
 
-util::URL aTargetURL;
-aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
-uno::Reference < util::XURLTransformer > xTrans( 
util::URLTransformer::create( mxContext ) );
-xTrans->parseStrict( aTargetURL );
-
 uno::Sequence < beans::PropertyValue > aProps(2);
 aProps[0].Name = "PluginMode";
 aProps[0].Value <<= sal_Int16(2);
diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx
index 9e1dfba18ed0..b3e7a5ec1abc 100644
--- a/sfx2/source/inc/macroloader.hxx
+++ b/sfx2/source/inc/macroloader.hxx
@@ -82,6 +82,8 @@ public:
 virtual void SAL_CALL addStatusListener( const css::uno::Reference< 
css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
 
 virtual void SAL_CALL removeStatusListener( const css::uno::Reference< 
css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
+
+static SfxObjectShell* GetObjectShell(const 
css::uno::Reference& xFrame);
 };
 
 #endif
diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filt

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

2022-09-07 Thread Mike Kaganski (via logerrit)
 include/basegfx/numeric/ftools.hxx |   12 
 vcl/source/opengl/win/context.cxx  |9 +
 2 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 48a822fe60fa6cdb8d105604f4511bd7f7d69903
Author: Mike Kaganski 
AuthorDate: Wed Sep 7 11:49:13 2022 +0200
Commit: Mike Kaganski 
CommitDate: Wed Sep 7 14:01:40 2022 +0200

Use exactly two comparisons in fround

It is used extensively in drawinglayer; the typical path for values
inside sal_Int32 range used three comparisons.

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

diff --git a/include/basegfx/numeric/ftools.hxx 
b/include/basegfx/numeric/ftools.hxx
index 14deaa059020..4f1bc168 100644
--- a/include/basegfx/numeric/ftools.hxx
+++ b/include/basegfx/numeric/ftools.hxx
@@ -37,11 +37,15 @@ namespace basegfx
 */
 inline sal_Int32 fround( double fVal )
 {
-if (fVal >= std::numeric_limits::max() - .5)
-return std::numeric_limits::max();
-else if (fVal <= std::numeric_limits::min() + .5)
+if (fVal >= 0.0)
+{
+if (fVal >= std::numeric_limits::max() - .5)
+return std::numeric_limits::max();
+return static_cast(fVal + .5);
+}
+if (fVal <= std::numeric_limits::min() + .5)
 return std::numeric_limits::min();
-return fVal > 0.0 ? static_cast( fVal + .5 ) : 
static_cast( fVal - .5 );
+return static_cast(fVal - .5);
 }
 
 /** Round double to nearest integer
commit ca6888484e643e0c55918d9c882241e6dd6b734f
Author: Mike Kaganski 
AuthorDate: Wed Sep 7 13:11:44 2022 +0300
Commit: Mike Kaganski 
CommitDate: Wed Sep 7 14:01:23 2022 +0200

Related: tdf#122737 A hack to keep backing window opaque on context 
destruction

Also this incidentally improves OpenGL frame rate, which could decrease
the problem visibility (but indeed, this is not a proper fix).

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

diff --git a/vcl/source/opengl/win/context.cxx 
b/vcl/source/opengl/win/context.cxx
index 3111048a2e23..cadd213a1ce3 100644
--- a/vcl/source/opengl/win/context.cxx
+++ b/vcl/source/opengl/win/context.cxx
@@ -146,6 +146,15 @@ void WinOpenGLContext::initWindow()
 
 InitChildWindow(m_pChildWindow.get());
 const SystemEnvData* sysData(m_pChildWindow->GetSystemData());
+
+// Hack: the performance of OpenGL increases with non-child window.
+// Also, this keeps the backing window opaque on GL context destruction,
+// which doesn't prevent the flicker (tdf#122737) completely, but at
+// least doesn't show user desktop during the flicker.
+LONG_PTR style = GetWindowLongPtrW(sysData->hWnd, GWL_STYLE);
+style &= ~WS_CHILD;
+SetWindowLongPtrW(sysData->hWnd, GWL_STYLE, style);
+
 m_aGLWin.hWnd = sysData->hWnd;
 
 m_aGLWin.hDC = GetDC(m_aGLWin.hWnd);


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

2022-09-07 Thread Miklos Vajna (via logerrit)
 sd/source/filter/eppt/pptx-animations.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit f8a1dd7388403ecd7eecb4bfbc26e2732e01891e
Author: Miklos Vajna 
AuthorDate: Wed Sep 7 11:33:15 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Sep 7 13:52:50 2022 +0200

sd: rename WriteAnimationNodeAudio to Media

Because XAudio means both video and audio, see
.

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

diff --git a/sd/source/filter/eppt/pptx-animations.cxx 
b/sd/source/filter/eppt/pptx-animations.cxx
index 1c901573c00a..1d53833fa89f 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -633,7 +633,8 @@ class PPTXAnimationExport
 void WriteAnimationNodeSeq();
 void WriteAnimationNodeEffect();
 void WriteAnimationNodeCommand();
-void WriteAnimationNodeAudio();
+/// Handles XAudio nodes, used for both video and audio.
+void WriteAnimationNodeMedia();
 void WriteAnimationNodeCommonPropsStart();
 void WriteAnimationTarget(const Any& rTarget);
 void WriteAnimationCondList(const Any& rAny, sal_Int32 nToken);
@@ -1217,9 +1218,9 @@ void PPTXAnimationExport::WriteAnimationNodeCommand()
 mpFS->endElementNS(XML_p, XML_cmd);
 }
 
-void PPTXAnimationExport::WriteAnimationNodeAudio()
+void PPTXAnimationExport::WriteAnimationNodeMedia()
 {
-SAL_INFO("sd.eppt", "write animation node audio");
+SAL_INFO("sd.eppt", "write animation node media");
 Reference xAudio(getCurrentNode(), UNO_QUERY);
 
 OUString sUrl;
@@ -1350,7 +1351,7 @@ void PPTXAnimationExport::WriteAnimationNode(const 
NodeContextPtr& pContext)
 WriteAnimationNodeCommand();
 break;
 case XML_audio:
-WriteAnimationNodeAudio();
+WriteAnimationNodeMedia();
 break;
 default:
 SAL_WARN("sd.eppt", "export ooxml node type: " << xmlNodeType);


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

2022-09-07 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/cmdlineargs.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 050c48d8d9eb84d171949d9561dee1a354e9f90b
Author: Stephan Bergmann 
AuthorDate: Thu Sep 1 17:33:51 2022 +0200
Commit: Andras Timar 
CommitDate: Wed Sep 7 13:19:00 2022 +0200

Filter out unwanted command URIs

Conflicts:
desktop/source/app/cmdlineargs.cxx

Change-Id: I0b7e5329af8cc053d14d5c60ec14fe7f364ef993
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139225
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139247
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 79e7b374e7650758dbbbe91d9b36725e3d13a0ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139509
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 381147cd534e..846714158e25 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -169,7 +170,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& 
arg, CommandLineEvent cur
 }
 if (nURIlen < 0)
 nURIlen = rest2.getLength();
-arg = rest2.copy(0, nURIlen);
+auto const uri = rest2.copy(0, nURIlen);
+if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+// Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
+// as the "Open" machinery does not know about those command URI 
schemes):
+curEvt = CommandLineEvent::Open;
+} else {
+arg = uri;
+}
 return curEvt;
 }
 


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

2022-09-07 Thread Stephan Bergmann (via logerrit)
 wizards/source/access2base/DoCmd.xba |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2231c91ac825dba9ee4d764806ad49080b9d4bad
Author: Stephan Bergmann 
AuthorDate: Tue Aug 30 14:04:52 2022 +0200
Commit: Andras Timar 
CommitDate: Wed Sep 7 13:16:20 2022 +0200

These commands are always URLs already

Conflicts:
wizards/source/scriptforge/SF_Session.xba

Change-Id: I5083765c879689d7f933bbe00ad70bb68e635a21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139042
Tested-by: Jean-Pierre Ledure 
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139245
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 8e11376b0964451b1132c094dbc98a828b0ede4b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139507
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/wizards/source/access2base/DoCmd.xba 
b/wizards/source/access2base/DoCmd.xba
index 27b0d74be34f..26755a8d901d 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -2655,7 +2655,7 @@ Private Sub _ShellExecute(sCommand As String)
 
 Dim oShell As Object
Set oShell = 
createUnoService("com.sun.star.system.SystemShellExecute")
-   oShell.execute(sCommand, "" , 
com.sun.star.system.SystemShellExecuteFlags.DEFAULTS)
+   oShell.execute(sCommand, "" , 
com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY)
 
 End Sub'  _ShellExecute   
V0.8.5
 


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

2022-09-07 Thread Stephan Bergmann (via logerrit)
 wizards/source/access2base/DoCmd.xba  |2 +-
 wizards/source/scriptforge/SF_Session.xba |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1d995d23c3229e7e1cec29eabc5d76d7e6606f8e
Author: Stephan Bergmann 
AuthorDate: Tue Aug 30 14:04:52 2022 +0200
Commit: Andras Timar 
CommitDate: Wed Sep 7 13:13:46 2022 +0200

These commands are always URLs already

Change-Id: I5083765c879689d7f933bbe00ad70bb68e635a21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139042
Tested-by: Jean-Pierre Ledure 
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit e61701e1ee6763de72b397e6ade1124eca9400f3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138980
Reviewed-by: Caolán McNamara 
(cherry picked from commit 5b4025bb56999f5c895c6f7e0b52f521800d65b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139505
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/wizards/source/access2base/DoCmd.xba 
b/wizards/source/access2base/DoCmd.xba
index 089486a872fa..20051553c47f 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -2655,7 +2655,7 @@ Private Sub _ShellExecute(sCommand As String)
 
 Dim oShell As Object
Set oShell = 
createUnoService("com.sun.star.system.SystemShellExecute")
-   oShell.execute(sCommand, "" , 
com.sun.star.system.SystemShellExecuteFlags.DEFAULTS)
+   oShell.execute(sCommand, "" , 
com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY)
 
 End Sub'  _ShellExecute   
V0.8.5
 
diff --git a/wizards/source/scriptforge/SF_Session.xba 
b/wizards/source/scriptforge/SF_Session.xba
index a41bffa51377..7c709897947a 100644
--- a/wizards/source/scriptforge/SF_Session.xba
+++ b/wizards/source/scriptforge/SF_Session.xba
@@ -513,7 +513,7 @@ Check:
 Try:
Set oShell = SF_Utils._GetUNOService("SystemShellExecute")
sCommand = SF_FileSystem._ConvertToUrl(Command)
-   oShell.execute(sCommand, Parameters, 
com.sun.star.system.SystemShellExecuteFlags.DEFAULTS)
+   oShell.execute(sCommand, Parameters, 
com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY)
bReturn = True
 
 Finally:


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

2022-09-07 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/app/AppController.cxx   |   16 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |   14 +++---
 dbaccess/source/ui/inc/AppElementType.hxx  |8 
 sw/source/filter/xml/xmlitemm.cxx  |   24 ++--
 sw/source/filter/xml/xmlitmap.hxx  |   16 
 sw/source/filter/xml/xmlitmpr.cxx  |   23 +--
 6 files changed, 42 insertions(+), 59 deletions(-)

New commits:
commit b4a82907eb13de4feabc9f09f8fa7d45d6c9eaec
Author: Noel Grandin 
AuthorDate: Tue Sep 6 21:07:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 13:04:15 2022 +0200

use o3tl::span in SvXMLItemMapEntries

which means we don't need to calculate the size of the map
at construction

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

diff --git a/sw/source/filter/xml/xmlitemm.cxx 
b/sw/source/filter/xml/xmlitemm.cxx
index 6464149d766e..cd1b219ad894 100644
--- a/sw/source/filter/xml/xmlitemm.cxx
+++ b/sw/source/filter/xml/xmlitemm.cxx
@@ -38,9 +38,7 @@ using namespace ::xmloff::token;
 #define M_E_SIE( p, l, w, m ) \
 { XML_NAMESPACE_##p, XML_##l, o3tl::narrowing(w), 
MID_SW_FLAG_SPECIAL_ITEM_EXPORT|MID_SW_FLAG_SPECIAL_ITEM_IMPORT|m }
 
-#define M_END { 0, XML_TOKEN_INVALID, 0, 0 }
-
-SvXMLItemMapEntry const aXMLTableItemMap[] =
+const SvXMLItemMapEntry aTableItemMap[] =
 {
 // RES_FILL_ORDER
 // not required
@@ -115,19 +113,18 @@ SvXMLItemMapEntry const aXMLTableItemMap[] =
 MAP_ENTRY( STYLE, WRITING_MODE, RES_FRAMEDIR, 0 ),
 
 // RES_COLLAPSING_BORDERS
-MAP_ENTRY( TABLE, BORDER_MODEL, RES_COLLAPSING_BORDERS, 0 ),
-
-M_END
+MAP_ENTRY( TABLE, BORDER_MODEL, RES_COLLAPSING_BORDERS, 0 )
 };
+const o3tl::span aXMLTableItemMap(aTableItemMap);
 
-SvXMLItemMapEntry const aXMLTableColItemMap[] =
+const SvXMLItemMapEntry aTableColItemMap[] =
 {
 M_E_SI( STYLE,  COLUMN_WIDTH, RES_FRM_SIZE, MID_FRMSIZE_COL_WIDTH ),
 MAP_ENTRY( STYLE,REL_COLUMN_WIDTH, RES_FRM_SIZE, 
MID_FRMSIZE_REL_COL_WIDTH ),
-M_END
 };
+const o3tl::span 
aXMLTableColItemMap(aTableColItemMap);
 
-SvXMLItemMapEntry const aXMLTableRowItemMap[] =
+const SvXMLItemMapEntry aTableRowItemMap[] =
 {
 // RES_FILL_ORDER
 // not required
@@ -196,11 +193,11 @@ SvXMLItemMapEntry const aXMLTableRowItemMap[] =
 // RES_END_AT_TXTEND
 // not required
 // RES_UNKNOWNATR_CONTAINER
-M_E_SE( TEXT, XMLNS, RES_UNKNOWNATR_CONTAINER, 0 ),
-M_END
+M_E_SE( TEXT, XMLNS, RES_UNKNOWNATR_CONTAINER, 0 )
 };
+const o3tl::span 
aXMLTableRowItemMap(aTableRowItemMap);
 
-SvXMLItemMapEntry const aXMLTableCellItemMap[] =
+const SvXMLItemMapEntry aTableCellItemMap[] =
 {
 // RES_FILL_ORDER
 // not required
@@ -283,8 +280,7 @@ SvXMLItemMapEntry const aXMLTableCellItemMap[] =
 // RES_FRAMEDIR
 MAP_ENTRY( STYLE, WRITING_MODE, RES_FRAMEDIR, 0 ),
 MAP_ENTRY( LO_EXT, WRITING_MODE, RES_FRAMEDIR, 0 ),
-
-M_END
 };
+const o3tl::span 
aXMLTableCellItemMap(aTableCellItemMap);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitmap.hxx 
b/sw/source/filter/xml/xmlitmap.hxx
index da42805c8206..eacd530ef62b 100644
--- a/sw/source/filter/xml/xmlitmap.hxx
+++ b/sw/source/filter/xml/xmlitmap.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #define MID_SW_FLAG_MASK0x
@@ -62,25 +63,24 @@ struct SvXMLItemMapEntry
 or export */
 class SvXMLItemMapEntries final : public SvRefBase
 {
-SvXMLItemMapEntry const * mpEntries;
-sal_uInt16 mnCount;
+o3tl::span mpEntries;
 
 public:
-explicit SvXMLItemMapEntries(SvXMLItemMapEntry const * pEntrys);
+explicit SvXMLItemMapEntries(o3tl::span pEntries) 
: mpEntries(pEntries) {}
 virtual ~SvXMLItemMapEntries() override;
 
 SvXMLItemMapEntry const * getByName( sal_Int32 nElement ) const;
 SvXMLItemMapEntry const & getByIndex( sal_uInt16 nIndex ) const { return 
mpEntries[nIndex]; }
 
-sal_uInt16 getCount() const { return mnCount; }
+sal_uInt16 getCount() const { return mpEntries.size(); }
 };
 
 typedef tools::SvRef SvXMLItemMapEntriesRef;
 
-extern SvXMLItemMapEntry const aXMLTableItemMap[];
-extern SvXMLItemMapEntry const aXMLTableColItemMap[];
-extern SvXMLItemMapEntry const aXMLTableRowItemMap[];
-extern SvXMLItemMapEntry const aXMLTableCellItemMap[];
+extern const o3tl::span aXMLTableItemMap;
+extern const o3tl::span aXMLTableColItemMap;
+extern const o3tl::span aXMLTableRowItemMap;
+extern const o3tl::span aXMLTableCellItemMap;
 
 #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX
 
diff --git a/sw/source/filter/xml/xmlitmpr.cxx 
b/sw/source/filter/xml/xmlitmpr.cxx
index 6731f086bbe3..cb7700fd91fe 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/

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

2022-09-07 Thread jucasaca (via logerrit)
 extensions/source/propctrlr/standardcontrol.cxx |4 ++--
 forms/source/component/Date.cxx |2 +-
 toolkit/source/controls/unocontrolmodel.cxx |4 ++--
 toolkit/source/controls/unocontrols.cxx |4 ++--
 vcl/source/app/weldutils.cxx|4 ++--
 vcl/source/control/field2.cxx   |4 ++--
 6 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit b20594f2fc8f6f9fdbf0b257b4e74d95a8d90139
Author: jucasaca 
AuthorDate: Thu Aug 25 20:21:24 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 12:48:16 2022 +0200

tdf#150569 Modify hardcoded dates to extend the range of accepted dates

Replaces date range limits to allow entry of dates between 1/1/0001 and
31/12/, which is the normal date range in most database manager

May need some discussion

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

diff --git a/extensions/source/propctrlr/standardcontrol.cxx 
b/extensions/source/propctrlr/standardcontrol.cxx
index 95b4143c76b8..1c88f98ecf8c 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -99,8 +99,8 @@ namespace pcr
 m_xEntryFormatter.reset(new weld::DateFormatter(*m_xEntry));
 
 m_xEntryFormatter->SetStrictFormat(true);
-m_xEntryFormatter->SetMin(::Date(1, 1, 1600));
-m_xEntryFormatter->SetMax(::Date(1, 1, ));
+m_xEntryFormatter->SetMin(::Date(1, 1, 0001));
+m_xEntryFormatter->SetMax(::Date(31, 12, ));
 
 
m_xEntryFormatter->SetExtDateFormat(ExtDateFieldFormat::SystemShort);
 m_xEntryFormatter->EnableEmptyField(true);
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 3305e7695dff..e2be9e2ef8c1 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -86,7 +86,7 @@ ODateModel::ODateModel(const Reference& 
_rxFactory)
 try
 {
 if ( m_xAggregateSet.is() )
-m_xAggregateSet->setPropertyValue( PROPERTY_DATEMIN, 
Any(util::Date(1, 1, 1800)) );
+m_xAggregateSet->setPropertyValue( PROPERTY_DATEMIN, 
Any(util::Date(1, 1, 0001)) );
 }
 catch( const Exception& )
 {
diff --git a/toolkit/source/controls/unocontrolmodel.cxx 
b/toolkit/source/controls/unocontrolmodel.cxx
index 986f55efbc50..efd25aa998e7 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -226,8 +226,8 @@ css::uno::Any UnoControlModel::ImplGetDefaultValue( 
sal_uInt16 nPropId ) const
 case BASEPROPERTY_PUSHBUTTONTYPE:   aDefault <<= sal_Int16(0) 
/*PushButtonType::STANDARD*/; break;
 case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:aDefault <<= 
sal_Int16(awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY); break;
 
-case BASEPROPERTY_DATEMAX:  aDefault <<= util::Date( 
31, 12, 2200 );break;
-case BASEPROPERTY_DATEMIN:  aDefault <<= util::Date( 
1, 1, 1900 );  break;
+case BASEPROPERTY_DATEMAX:  aDefault <<= util::Date( 
31, 12,  );break;
+case BASEPROPERTY_DATEMIN:  aDefault <<= util::Date( 
1, 1, 0001 );  break;
 case BASEPROPERTY_TIMEMAX:  aDefault <<= util::Time(0, 
0, 59, 23, false);  break;
 case BASEPROPERTY_TIMEMIN:  aDefault <<= util::Time(); 
 break;
 case BASEPROPERTY_VALUEMAX_DOUBLE:  aDefault <<= 
double(100);  break;
diff --git a/toolkit/source/controls/unocontrols.cxx 
b/toolkit/source/controls/unocontrols.cxx
index 3bc095cf3f03..de764e7b8be1 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -3433,8 +3433,8 @@ 
stardiv_Toolkit_UnoControlDateFieldModel_get_implementation(
 
 UnoDateFieldControl::UnoDateFieldControl()
 {
-mnFirst = util::Date( 1, 1, 1900 );
-mnLast = util::Date( 31, 12, 2200 );
+mnFirst = util::Date( 1, 1, 0001 );
+mnLast = util::Date( 31, 12,  );
 mbLongFormat = TRISTATE_INDET;
 }
 
diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx
index f17aed238ae8..8e916ce984b9 100644
--- a/vcl/source/app/weldutils.cxx
+++ b/vcl/source/app/weldutils.cxx
@@ -444,8 +444,8 @@ void DateFormatter::Init()
 SetOutputHdl(LINK(this, DateFormatter, FormatOutputHdl));
 SetInputHdl(LINK(this, DateFormatter, ParseInputHdl));
 
-SetMin(Date(1, 1, 1900));
-SetMax(Date(31, 12, 2200));
+SetMin(Date(1, 1, 0001));
+SetMax(Date(31, 12, ));
 }
 
 void DateFormatter::SetExtDateFormat(ExtDateFieldFormat eFormat)
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 89efabf08c3f..6af391a6cede 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/fie

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

2022-09-07 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/uiwriter5.cxx |   39 +++
 sw/source/core/docnode/ndtbl1.cxx   |   40 ++--
 2 files changed, 77 insertions(+), 2 deletions(-)

New commits:
commit b251228d2e5e2832e0a617213173e8841f5b7428
Author: László Németh 
AuthorDate: Wed Sep 7 09:27:00 2022 +0200
Commit: László Németh 
CommitDate: Wed Sep 7 11:53:38 2022 +0200

tdf#150666 sw: allow to delete tracked table row insertions

It was not possible to delete tracked table row insertions,
if only those were selected, or if they were own insertions.

Regression from commit 95213407dfcbf34056037d60243ff915340d1a2e
"tdf#146622 sw crash fix: don't delete already deleted rows".

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

diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx 
b/sw/qa/extras/uiwriter/uiwriter5.cxx
index 28f67d633b32..ea2542a40044 100644
--- a/sw/qa/extras/uiwriter/uiwriter5.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter5.cxx
@@ -2047,6 +2047,45 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143215)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150666)
+{
+// load a table with tracked insertion of an empty row
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-rowadd.docx");
+
+// check table count
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+// check table row count
+uno::Reference xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+// select the second row (tracked table row insertion)
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Down(/*bSelect=*/false);
+
+// delete it, and accept all tracked changes
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+// This was 4 (it was not possible to delete only the tracked row 
insertions)
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+
+// insert a new table row with track changes
+dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+// select and delete it
+pWrtShell->Down(/*bSelect=*/false);
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+// This was 4 (it was not possible to delete own tracked row insertions)
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf144748)
 {
 // load a table with an empty row, and an empty line before the table
diff --git a/sw/source/core/docnode/ndtbl1.cxx 
b/sw/source/core/docnode/ndtbl1.cxx
index 913f8ce71389..0f1dac38ea25 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
@@ -540,6 +541,7 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, 
std::unique_ptrGetNode().FindTableNode();
@@ -552,12 +554,26 @@ bool SwDoc::HasRowNotTracked( const SwCursor& rCursor )
 if( aRowArr.empty() )
 return false;
 
+SwRedlineTable::size_type nRedlinePos = 0;
+SwDoc* pDoc = aRowArr[0]->GetFrameFormat()->GetDoc();
+const IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess();
+
 for( auto pLn : aRowArr )
 {
 auto pHasTextChangesOnlyProp = 
pLn->GetFrameFormat()->GetAttrSet().GetItem(RES_PRINT);
 if ( !pHasTextChangesOnlyProp || pHasTextChangesOnlyProp->GetValue() )
-// there is a not deleted row in the table selection
+// there is a not tracked row in the table selection
 return true;
+
+// tdf#150666 examine tracked row: it's possible to delete a tracked 
insertion
+SwRedlineTable::size_type nPos = 
pLn->UpdateTextChangesOnly(nRedlinePos);
+if ( nPos != SwRedlineTable::npos )
+{
+const SwRedlineTable& aRedlineTable = rIDRA.GetRedlineTable();
+SwRangeRedline* pTmp = aRedlineTable[ nPos ];
+if ( RedlineType::Insert == pTmp->GetType() )
+return true;
+}
 }
 return false;
 }
@@ -588,8 +604,28 @@ void SwDoc::SetRowNotTracked( const SwCursor& rCursor, 
const SvxPrintItem &rNew,
 std::vector> aFormatCmp;
 aFormatCmp.reserve( std::max( 255, static_cast(aRowArr.size()) ) );
 
+SwRedl

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

2022-09-07 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/app/AppController.cxx   |   24 +-
 dbaccess/source/ui/app/AppControllerGen.cxx|8 +++---
 dbaccess/source/ui/app/subcomponentmanager.cxx |2 -
 dbaccess/source/ui/inc/AppElementType.hxx  |8 +++---
 dbaccess/source/ui/misc/linkeddocuments.cxx|6 ++--
 reportdesign/source/ui/dlg/Navigator.cxx   |   33 -
 reportdesign/source/ui/inc/Navigator.hxx   |8 --
 7 files changed, 36 insertions(+), 53 deletions(-)

New commits:
commit 87d03edf08cda2f9f6a9d4ef9e5b7fe71964c71f
Author: Noel Grandin 
AuthorDate: Tue Sep 6 22:04:22 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 11:42:04 2022 +0200

convert ElementOpenMode to scoped enum

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

diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index 52106a2fd099..2e30cf1fce38 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1211,7 +1211,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 
 const Reference< XDataSource > xDataSource( 
m_xDataSource, UNO_QUERY );
 const Reference< XComponent > xComponent = 
aDesigner.createNew( xDataSource, aCreationArgs );
-onDocumentOpened( OUString(), E_QUERY, E_OPEN_DESIGN, 
xComponent, nullptr );
+onDocumentOpened( OUString(), E_QUERY, 
ElementOpenMode::Design, xComponent, nullptr );
 }
 }
 break;
@@ -1235,17 +1235,17 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 case SID_DB_APP_QUERY_EDIT:
 case SID_DB_APP_FORM_EDIT:
 case SID_DB_APP_REPORT_EDIT:
-doAction( _nId, E_OPEN_DESIGN );
+doAction( _nId, ElementOpenMode::Design );
 break;
 case SID_DB_APP_OPEN:
 case SID_DB_APP_TABLE_OPEN:
 case SID_DB_APP_QUERY_OPEN:
 case SID_DB_APP_FORM_OPEN:
 case SID_DB_APP_REPORT_OPEN:
-doAction( _nId, E_OPEN_NORMAL );
+doAction( _nId, ElementOpenMode::Normal );
 break;
 case SID_DB_APP_CONVERTTOVIEW:
-doAction( _nId, E_OPEN_NORMAL );
+doAction( _nId, ElementOpenMode::Normal );
 break;
 case SID_SELECTALL:
 getContainer()->selectAll();
@@ -1254,7 +1254,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 case SID_DB_APP_DSRELDESIGN:
 {
 Reference< XComponent > xRelationDesigner;
-if ( !m_pSubComponentManager->activateSubFrame( OUString(), 
SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) )
+if ( !m_pSubComponentManager->activateSubFrame( OUString(), 
SID_DB_APP_DSRELDESIGN, ElementOpenMode::Design, xRelationDesigner ) )
 {
 SharedConnection xConnection( ensureConnection() );
 if ( xConnection.is() )
@@ -1263,7 +1263,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 
 const Reference< XDataSource > xDataSource( 
m_xDataSource, UNO_QUERY );
 const Reference< XComponent > xComponent = 
aDesigner.createNew( xDataSource );
-onDocumentOpened( OUString(), SID_DB_APP_DSRELDESIGN, 
E_OPEN_DESIGN, xComponent, nullptr );
+onDocumentOpened( OUString(), SID_DB_APP_DSRELDESIGN, 
ElementOpenMode::Design, xComponent, nullptr );
 }
 }
 }
@@ -1336,7 +1336,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 }
 break;
 case SID_DB_APP_SENDREPORTASMAIL:
-doAction( _nId, E_OPEN_FOR_MAIL );
+doAction( _nId, ElementOpenMode::Mail );
 break;
 }
 }
@@ -1701,7 +1701,7 @@ bool OApplicationController::onEntryDoubleClick(const 
weld::TreeView& rTreeView)
 openElementWithArguments(
 getContainer()->getQualifiedName(xHdlEntry.get()),
 getContainer()->getElementType(),
-E_OPEN_NORMAL,
+ElementOpenMode::Normal,
 0,
 ::comphelper::NamedValueCollection() );
 return true;// handled
@@ -1747,7 +1747,7 @@ Reference< XComponent > 
OApplicationController::openElementWithArguments( const
 return nullptr;
 
 Reference< XComponent > xRet;
-if ( _eOpenMode == E_OPEN_DESIGN )
+if ( _eOpenMode == ElementOpenMode::Desi

[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 2 commits - sw/CppunitTest_sw_filter_html.mk sw/Module_sw.mk sw/qa sw/source

2022-09-07 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_filter_html.mk  |   74 +
 sw/Module_sw.mk   |1 
 sw/qa/filter/html/data/empty-paragraph.xhtml  |3 
 sw/qa/filter/html/data/ole2.ole   | 1014 ++
 sw/qa/filter/html/data/ole2.png   |binary
 sw/qa/filter/html/data/relative-keep-aspect.xhtml |5 
 sw/qa/filter/html/html.cxx|   85 +
 sw/source/filter/html/htmlplug.cxx|   18 
 sw/source/filter/html/swhtml.cxx  |5 
 9 files changed, 1201 insertions(+), 4 deletions(-)

New commits:
commit c0bdcbb0e65f0f397941db2cf13be65f3307cede
Author: Miklos Vajna 
AuthorDate: Tue Sep 6 16:14:47 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Sep 7 11:22:45 2022 +0200

sw HTML import: fix height of OLE objs when it is missing and width is 
relative

In case an OLE object's fallback bitmap had a width=100% size but no
explicit height, we used to set the OLE object's size to a fixed value,
based on the bitmap's pixel size.

Falling back to the pixel size based on the current DPI is sensible if
there is no height specified, but browsers keep the aspect ratio when
only width or height is specified and we didn't.

Fix the problem by explicitly checking for the "one axis has percent
size, the other is unset" scenario in SwHTMLParser::InsertEmbed() and
then handling the new SwFormatFrameSize::SYNCED value in
SwHTMLParser::SetFixSize().

Note that SetFixSize() is not used for bitmaps (only for OLE objects),
so that codepath may still need a similar fix.

(cherry picked from commit 456abae730a787693c3ad98f7e57eba5f6163a76)

Change-Id: I9f70307edbfbb06e228494fb5c04e7381ed8e5cc

diff --git a/sw/qa/filter/html/data/ole2.ole b/sw/qa/filter/html/data/ole2.ole
new file mode 100644
index ..96407e88fa3d
--- /dev/null
+++ b/sw/qa/filter/html/data/ole2.ole
@@ -0,0 +1,1014 @@
+{\object\objemb{\*\objclass PowerPoint.Show.12}\objw10020\objh5638{\*\objdata 
+0105
+0200
+1300
+506f776572506f696e742e53686f772e313200
+
+
+0094
+d0cf11e0a1b11ae13e000300feff090006
+000100011002000100feff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+fffdff4700feff480005000600070008000900
+0a000b000c000d000e000f0010001100120013
+001400150016001700180019001a001b001c00
+1d001e001f0020002100220023002400250026
+002700280029002a002b002c002d002e002f003000
+3100320033003400350036003700380039003a
+003b003c003d003e003f004000410042004300
+440045004600fefffefffe
+ff
+ff
+ff
+ff
+ff
+52006f006f007400200045006e007400720079
+0016000500
+0200f4554fcf878f474d80bb5808164bb3f800
+0080609bf8f8bcd301030301004f006c006500
+00
+000a000201
+14005000610063006b
+00610067006500
+12010100040000
+00

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

2022-09-07 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/itiff/itiff.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 65eb1595fc320b71937052da70bfc717ff34b18b
Author: Caolán McNamara 
AuthorDate: Tue Sep 6 21:30:55 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 7 10:59:05 2022 +0200

ofz#50118 Timeout

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

diff --git a/vcl/source/filter/itiff/itiff.cxx 
b/vcl/source/filter/itiff/itiff.cxx
index 1e71c6cb8adc..762c31fe5667 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -75,21 +75,21 @@ static toff_t tiff_seek(thandle_t handle, toff_t offset, 
int whence)
 switch (whence)
 {
 case SEEK_SET:
-pContext->rStream.Seek(offset);
 break;
 case SEEK_CUR:
-pContext->rStream.SeekRel(offset);
+offset = pContext->rStream.Tell() + offset;;
 break;
 case SEEK_END:
-pContext->rStream.Seek(STREAM_SEEK_TO_END);
-pContext->rStream.SeekRel(offset);
+offset = pContext->rStream.TellEnd() + offset;
 break;
 default:
 assert(false && "unknown seek type");
 break;
 }
 
-return pContext->rStream.Tell();
+pContext->rStream.Seek(offset);
+
+return offset;
 }
 
 static int tiff_close(thandle_t)


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

2022-09-07 Thread Miklos Vajna (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 95843ba6f75b2438a1a9b8c0cc4a001c45f3091d
Author: Miklos Vajna 
AuthorDate: Wed Sep 7 09:59:44 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Sep 7 10:43:25 2022 +0200

sw: clean up DocxAttributeOutput::EndContentControl()

This always felt dirty, and seems it's no longer needed. Remove the fly
frame condition before somebody starts depending on it.

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

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 1b850055b189..de5bd79bcc4b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -370,7 +370,7 @@ void DocxAttributeOutput::StartContentControl(const 
SwFormatContentControl& rFor
 
 void DocxAttributeOutput::EndContentControl(const SwTextNode& rNode, sal_Int32 
nPos)
 {
-if (rNode.GetTextAttrForCharAt(nPos, RES_TXTATR_FLYCNT) || 
rNode.GetTextAttrForCharAt(nPos, RES_TXTATR_CONTENTCONTROL))
+if (rNode.GetTextAttrForCharAt(nPos, RES_TXTATR_CONTENTCONTROL))
 {
 ++m_nCloseContentControlInPreviousRun;
 }


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

2022-09-07 Thread Armin Le Grand (allotropia) (via logerrit)
 drawinglayer/source/tools/converters.cxx |  179 +++
 1 file changed, 68 insertions(+), 111 deletions(-)

New commits:
commit 3d4895e0720f5f0f5dc748470bd42d0aba2f6244
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Sep 2 19:15:13 2022 +0200
Commit: Armin Le Grand 
CommitDate: Wed Sep 7 10:33:11 2022 +0200

ConvertToBitmapEx slightly too bright if transparency involved

Stumbled about this error when working on re-designing the blend
primitives for shapes. Using convertToBitmapEx is the base for
these (also for the UNO API conversion from Primitives to
BitmapEx).

Use a VirtualDevice in the Alpha-mode now to solve it. This
creates the needed alpha channel 'in parallel'. It is not cheaper
though since the VDev in that mode internally uses two VDevs,
so ressoure-wise it's more expensive, speed-wise pretty much the
same (the former two-path rendering created content & alpha
separately in two runs).
The former method always created the correct Alpha, but when
transparent geometry is involved, the created content was
blended against white (COL_WHITE) due to the starting conditions
of the content creation.
There are more ways than using a VirtualDevice in the Alpha-mode,
to do this correctly, but this is the most simple for now - and
I was persuaded by the following argument:
Due to hoping to be able to render to RGBA in the future anyways
there is no need to experiment trying to do the correct thing
using an expanded version of the former method.

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

diff --git a/drawinglayer/source/tools/converters.cxx 
b/drawinglayer/source/tools/converters.cxx
index 7dc1259edfaa..6139fb296d71 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -37,7 +37,6 @@
 
 namespace drawinglayer
 {
-
 BitmapEx convertToBitmapEx(
 drawinglayer::primitive2d::Primitive2DContainer&& rSeq,
 const geometry::ViewInformation2D& rViewInformation2D,
@@ -47,132 +46,90 @@ namespace drawinglayer
 {
 BitmapEx aRetval;
 
-if(!rSeq.empty() && nDiscreteWidth && nDiscreteHeight)
-{
-// get destination size in pixels
-const MapMode aMapModePixel(MapUnit::MapPixel);
-const sal_uInt32 nViewVisibleArea(nDiscreteWidth * 
nDiscreteHeight);
-drawinglayer::primitive2d::Primitive2DContainer aSequence;
+if(rSeq.empty())
+return aRetval;
 
-if(nViewVisibleArea > nMaxSquarePixels)
-{
-// reduce render size
-double fReduceFactor = 
sqrt(static_cast(nMaxSquarePixels) / 
static_cast(nViewVisibleArea));
-nDiscreteWidth = 
basegfx::fround(static_cast(nDiscreteWidth) * fReduceFactor);
-nDiscreteHeight = 
basegfx::fround(static_cast(nDiscreteHeight) * fReduceFactor);
+if(nDiscreteWidth <= 0 || nDiscreteHeight <= 0)
+return aRetval;
 
-const drawinglayer::primitive2d::Primitive2DReference aEmbed(
-new drawinglayer::primitive2d::TransformPrimitive2D(
-basegfx::utils::createScaleB2DHomMatrix(fReduceFactor, 
fReduceFactor),
-std::move(rSeq)));
+// get destination size in pixels
+const MapMode aMapModePixel(MapUnit::MapPixel);
+const sal_uInt32 nViewVisibleArea(nDiscreteWidth * nDiscreteHeight);
+drawinglayer::primitive2d::Primitive2DContainer 
aSequence(std::move(rSeq));
 
-aSequence = drawinglayer::primitive2d::Primitive2DContainer { 
aEmbed };
-}
-else
-aSequence = std::move(rSeq);
+if(nViewVisibleArea > nMaxSquarePixels)
+{
+// reduce render size
+double fReduceFactor = sqrt(static_cast(nMaxSquarePixels) 
/ static_cast(nViewVisibleArea));
+nDiscreteWidth = 
basegfx::fround(static_cast(nDiscreteWidth) * fReduceFactor);
+nDiscreteHeight = 
basegfx::fround(static_cast(nDiscreteHeight) * fReduceFactor);
 
-const Point aEmptyPoint;
-const Size aSizePixel(nDiscreteWidth, nDiscreteHeight);
-ScopedVclPtrInstance< VirtualDevice > pContent;
+const drawinglayer::primitive2d::Primitive2DReference aEmbed(
+new drawinglayer::primitive2d::TransformPrimitive2D(
+basegfx::utils::createScaleB2DHomMatrix(fReduceFactor, 
fReduceFactor),
+std::move(aSequence)));
 
-// prepare vdev
-if (!pContent->SetOutputSizePixel(aSizePixel, false))
-{
-SAL_WARN("vcl", "Cannot set VirtualDevice to size : " << 
aSizePixel.Width() << "x" << aSizePixel

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

2022-09-07 Thread Noel Grandin (via logerrit)
 sw/source/filter/xml/xmlitmap.hxx |9 -
 sw/source/filter/xml/xmlitmpr.cxx |   28 
 2 files changed, 8 insertions(+), 29 deletions(-)

New commits:
commit 329c1e6c0310429163a77d760acd5b3043873bc7
Author: Noel Grandin 
AuthorDate: Tue Sep 6 20:54:06 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 10:29:34 2022 +0200

SvXMLItemMapEntries does not need an impl

it is module private

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

diff --git a/sw/source/filter/xml/xmlitmap.hxx 
b/sw/source/filter/xml/xmlitmap.hxx
index 8d5adb4af4f9..da42805c8206 100644
--- a/sw/source/filter/xml/xmlitmap.hxx
+++ b/sw/source/filter/xml/xmlitmap.hxx
@@ -57,23 +57,22 @@ struct SvXMLItemMapEntry
 : nNameSpace(nameSpace), nWhichId(whichId), eLocalName(localName), 
nMemberId(memberId) {}
 };
 
-class SvXMLItemMapEntries_impl;
-
 /** this class manages an array of SvXMLItemMapEntry. It is
 used for optimizing the static array on startup of import
 or export */
 class SvXMLItemMapEntries final : public SvRefBase
 {
-std::unique_ptr mpImpl;
+SvXMLItemMapEntry const * mpEntries;
+sal_uInt16 mnCount;
 
 public:
 explicit SvXMLItemMapEntries(SvXMLItemMapEntry const * pEntrys);
 virtual ~SvXMLItemMapEntries() override;
 
 SvXMLItemMapEntry const * getByName( sal_Int32 nElement ) const;
-SvXMLItemMapEntry const & getByIndex( sal_uInt16 nIndex ) const;
+SvXMLItemMapEntry const & getByIndex( sal_uInt16 nIndex ) const { return 
mpEntries[nIndex]; }
 
-sal_uInt16 getCount() const;
+sal_uInt16 getCount() const { return mnCount; }
 };
 
 typedef tools::SvRef SvXMLItemMapEntriesRef;
diff --git a/sw/source/filter/xml/xmlitmpr.cxx 
b/sw/source/filter/xml/xmlitmpr.cxx
index 9250d079bcba..6731f086bbe3 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -23,24 +23,14 @@
 using ::xmloff::token::IsXMLToken;
 using ::xmloff::token::XML_TOKEN_INVALID;
 
-// TODO: optimize this!
-class SvXMLItemMapEntries_impl
-{
-public:
-SvXMLItemMapEntry const * mpEntries;
-sal_uInt16 mnCount;
-};
-
 SvXMLItemMapEntries::SvXMLItemMapEntries( SvXMLItemMapEntry const * pEntries )
-   : mpImpl( new SvXMLItemMapEntries_impl )
+: mpEntries(pEntries)
 {
-mpImpl->mpEntries = pEntries;
-
-mpImpl->mnCount = 0;
+mnCount = 0;
 while( pEntries->eLocalName != XML_TOKEN_INVALID )
 {
 pEntries++;
-mpImpl->mnCount++;
+mnCount++;
 }
 }
 
@@ -50,7 +40,7 @@ SvXMLItemMapEntries::~SvXMLItemMapEntries()
 
 SvXMLItemMapEntry const * SvXMLItemMapEntries::getByName(  sal_Int32 nElement  
) const
 {
-SvXMLItemMapEntry const * pMap = mpImpl->mpEntries;
+SvXMLItemMapEntry const * pMap = mpEntries;
 while( pMap && (pMap->eLocalName != XML_TOKEN_INVALID) )
 {
 if( IsTokenInNamespace(nElement, pMap->nNameSpace) &&
@@ -62,14 +52,4 @@ SvXMLItemMapEntry const * SvXMLItemMapEntries::getByName(  
sal_Int32 nElement  )
 return (pMap && (pMap->eLocalName != XML_TOKEN_INVALID)) ? pMap : nullptr;
 }
 
-SvXMLItemMapEntry const & SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) 
const
-{
-return mpImpl->mpEntries[nIndex];
-}
-
-sal_uInt16 SvXMLItemMapEntries::getCount() const
-{
-return mpImpl->mnCount;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


License Statement

2022-09-07 Thread Galdam Jitsu
Hello
I'm sending my license statement:

   All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.

   Additionally, to the extent possible under law, I waive all
   copyright and related or neighboring rights to my past & future
   Artwork and Design contributions to the LibreOffice project, and
   similarly to The Document Foundation, placing such contributions
   under CC0: https://creativecommons.org/publicdomain/zero/1.0

Galdam Jitsu


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

2022-09-07 Thread Miklos Vajna (via logerrit)
 filter/source/svg/presentation_engine.js |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 22ed308622c1ab07d4f00a6b8150630b5d168906
Author: Miklos Vajna 
AuthorDate: Wed Sep 7 08:30:19 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Sep 7 09:58:23 2022 +0200

filter: remove no longer needed back-compat of the svg presentation engine

This was added in commit 4063dcdc7305177b167bd20b009b1dfede8b25ec
(Revert naming back to lool to fix break with LibreOffice Online,
2022-08-26), to give consumers of that API time to switch from the
product name to the API name.

Now this patch removes the product name, only on master.

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

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index e08689d4901d..1e22be233b7a 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -18899,11 +18899,6 @@ SlideShow.prototype.exitSlideShowInApp = function()
 window.webkit.messageHandlers !== undefined &&
 window.webkit.messageHandlers.lok !== undefined)
 window.webkit.messageHandlers.lok.postMessage('EXITSLIDESHOW', '*');
-// FIXME remove this in a follow-up commit
-if (window.webkit !== undefined &&
-window.webkit.messageHandlers !== undefined &&
-window.webkit.messageHandlers.cool !== undefined)
-window.webkit.messageHandlers.cool.postMessage('EXITSLIDESHOW', '*');
 }
 
 SlideShow.prototype.displaySlide = function( nNewSlide, bSkipSlideTransition )


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

2022-09-07 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/inputLine/tdf142031.py |   41 
 1 file changed, 41 insertions(+)

New commits:
commit 5f8b4b4023f32edf78ab1ba87e11dc063d85b48f
Author: Xisco Fauli 
AuthorDate: Tue Sep 6 13:27:44 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Sep 7 09:39:16 2022 +0200

tdf#142031: sc: Add UItest

Change-Id: Icfe8229a0079bbe5be8394883299b2f959a74efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139489
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 3169bb4de48e8a63082e49201083455a29411445)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139503

diff --git a/sc/qa/uitest/inputLine/tdf142031.py 
b/sc/qa/uitest/inputLine/tdf142031.py
new file mode 100755
index ..588c3cdf152c
--- /dev/null
+++ b/sc/qa/uitest/inputLine/tdf142031.py
@@ -0,0 +1,41 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, type_text
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf142031(UITestCase):
+
+def test_tdf142031(self):
+with self.ui_test.create_doc_in_start_center("calc") as document:
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+xPosWindow = xCalcDoc.getChild('pos_window')
+
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", 
close_button="add") as xAddNameDlg:
+xEdit = xAddNameDlg.getChild("edit")
+type_text(xEdit, "crédit")
+
+self.assertEqual('crédit', get_state_as_dict(xPosWindow)['Text'])
+
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B1"}))
+
+xInputWin = xCalcDoc.getChild("sc_input_window")
+xInputWin.executeAction("TYPE", mkPropertyValues({"TEXT":"=cré"}))
+xInputWin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RETURN"}))
+
+# Without the fix in place, this test would have failed here
+self.assertEqual("=crédit", get_state_as_dict(xInputWin)["Text"])
+
+xInputWin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RETURN"}))
+
+self.assertEqual("0", get_cell_by_position(document, 0, 1, 
0).getString())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


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

2022-09-07 Thread Noel Grandin (via logerrit)
 reportdesign/source/ui/inc/ReportControllerObserver.hxx|   14 ++--
 reportdesign/source/ui/report/ReportControllerObserver.cxx |   44 +++--
 2 files changed, 21 insertions(+), 37 deletions(-)

New commits:
commit f5c6ef40dd494f6984c6ed784fccc02806999836
Author: Noel Grandin 
AuthorDate: Tue Sep 6 18:44:10 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 09:38:15 2022 +0200

OXReportControllerObserver does not need a pimpl

it is module private

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

diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx 
b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
index d77fb3f2ef78..ac317e13d427 100644
--- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx
+++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
@@ -21,14 +21,15 @@
 
 #include 
 #include 
+#include 
 #include 
-
-#include 
-
+#include 
 #include 
-
 #include "FormattedFieldBeautifier.hxx"
 #include "FixedTextColor.hxx"
+#include 
+#include 
+
 
 class VclSimpleEvent;
 
@@ -45,8 +46,9 @@ namespace rptui
 >
 {
 
-const ::std::unique_ptr m_pImpl;
-
+::std::vector< css::uno::Reference< css::container::XChild> > 
m_aSections;
+::osl::Mutex m_aMutex;
+oslInterlockedCount  m_nLocks;
 FormattedFieldBeautifier m_aFormattedFieldBeautifier;
 FixedTextColor   m_aFixedTextColor;
 
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx 
b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 8ad7540886cd..b05d3b3d1359 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -23,7 +23,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -40,27 +39,10 @@ namespace rptui
 typedef std::map AllProperties;
 typedef std::map, AllProperties> 
PropertySetInfoCache;
 
-class OXReportControllerObserverImpl
-{
-public:
-::std::vector< uno::Reference< container::XChild> > m_aSections;
-::osl::Mutexm_aMutex;
-oslInterlockedCount m_nLocks;
-
-explicit OXReportControllerObserverImpl();
-OXReportControllerObserverImpl(const OXReportControllerObserverImpl&) = 
delete;
-OXReportControllerObserverImpl& operator=(const 
OXReportControllerObserverImpl&) = delete;
-};
-
-
-OXReportControllerObserverImpl::OXReportControllerObserverImpl()
-:m_nLocks(0)
-{
-}
 
 
 OXReportControllerObserver::OXReportControllerObserver(const 
OReportController& _rController)
-:m_pImpl(new OXReportControllerObserverImpl )
+:m_nLocks(0)
 ,m_aFormattedFieldBeautifier(_rController)
 ,m_aFixedTextColor(_rController)
 {
@@ -91,7 +73,7 @@ public:
 
 // send all Section Objects a 'tingle'
 // maybe they need a change in format, color, etc
-for (const uno::Reference& xChild : 
m_pImpl->m_aSections)
+for (const uno::Reference& xChild : m_aSections)
 {
 if (xChild.is())
 {
@@ -132,15 +114,15 @@ public:
 void OXReportControllerObserver::Clear()
 {
 OEnvLock aLock(*this);
-m_pImpl->m_aSections.clear();
+m_aSections.clear();
 }
 
 // XPropertyChangeListener
 void SAL_CALL OXReportControllerObserver::propertyChange(const 
beans::PropertyChangeEvent& _rEvent)
 {
-osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+osl::MutexGuard aGuard( m_aMutex );
 
-if ( m_pImpl->m_nLocks != 0 )
+if ( m_nLocks != 0 )
 return;
 
 m_aFormattedFieldBeautifier.notifyPropertyChange(_rEvent);
@@ -151,14 +133,14 @@ public:
 void OXReportControllerObserver::Lock()
 {
 OSL_ENSURE(m_refCount,"Illegal call to dead object!");
-osl_atomic_increment( &m_pImpl->m_nLocks );
+osl_atomic_increment( &m_nLocks );
 }
 
 void OXReportControllerObserver::UnLock()
 {
 OSL_ENSURE(m_refCount,"Illegal call to dead object!");
 
-osl_atomic_decrement( &m_pImpl->m_nLocks );
+osl_atomic_decrement( &m_nLocks );
 }
 
 void OXReportControllerObserver::AddSection(const uno::Reference< 
report::XSection > & _xSection)
@@ -167,7 +149,7 @@ void OXReportControllerObserver::AddSection(const 
uno::Reference< report::XSecti
 try
 {
 uno::Reference xChild = _xSection;
-m_pImpl->m_aSections.push_back(xChild);
+m_aSections.push_back(xChild);
 uno::Reference< uno::XInterface >  xInt(_xSection);
 AddElement(xInt);
 }
@@ -184,8 +166,8 @@ void OXReportControllerObserver::RemoveSection(const 
uno::Reference< report::XSe
 try
 {
 uno::Reference xChild(_xSection

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

2022-09-07 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |   23 -
 dbaccess/source/core/dataaccess/databasedocument.cxx   |8 ++---
 dbaccess/source/core/dataaccess/datasource.cxx |4 +-
 dbaccess/source/core/dataaccess/documentcontainer.cxx  |2 -
 dbaccess/source/core/dataaccess/documentdefinition.cxx |4 +-
 dbaccess/source/core/inc/ModelImpl.hxx |   16 +++
 6 files changed, 31 insertions(+), 26 deletions(-)

New commits:
commit e801c211911deb673c8f75b5072a58c88832b720
Author: Noel Grandin 
AuthorDate: Tue Sep 6 21:42:56 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 09:24:55 2022 +0200

convert ObjectType to scoped enum

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

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index c482e09eb2ae..14d05bb53b35 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -354,7 +354,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const 
css::lang::EventObject& So
 // ODatabaseModelImpl
 
 ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& 
_rxContext, ODatabaseContext& _rDBContext )
-:m_aContainer(4)
+:m_aContainer()
 ,m_aMacroMode( *this )
 ,m_nImposedMacroExecMode( MacroExecMode::NEVER_EXECUTE )
 ,m_rDBContext( _rDBContext )
@@ -384,7 +384,7 @@ ODatabaseModelImpl::ODatabaseModelImpl(
 const Reference< XComponentContext >& _rxContext,
 ODatabaseContext& _rDBContext
 )
-:m_aContainer(4)
+:m_aContainer()
 ,m_aMacroMode( *this )
 ,m_nImposedMacroExecMode( MacroExecMode::NEVER_EXECUTE )
 ,m_rDBContext( _rDBContext )
@@ -468,10 +468,10 @@ namespace
 const char* pAsciiName( nullptr );
 switch ( _eType )
 {
-case ODatabaseModelImpl::E_FORM:   pAsciiName = "forms"; break;
-case ODatabaseModelImpl::E_REPORT: pAsciiName = "reports"; break;
-case ODatabaseModelImpl::E_QUERY:  pAsciiName = "queries"; break;
-case ODatabaseModelImpl::E_TABLE:  pAsciiName = "tables"; break;
+case ODatabaseModelImpl::ObjectType::Form:   pAsciiName = "forms"; 
break;
+case ODatabaseModelImpl::ObjectType::Report: pAsciiName = "reports"; 
break;
+case ODatabaseModelImpl::ObjectType::Query:  pAsciiName = "queries"; 
break;
+case ODatabaseModelImpl::ObjectType::Table:  pAsciiName = "tables"; 
break;
 default:
 throw RuntimeException();
 }
@@ -561,7 +561,8 @@ bool ODatabaseModelImpl::objectHasMacros( const Reference< 
XStorage >& _rxContai
 void ODatabaseModelImpl::reset()
 {
 m_bReadOnly = false;
-std::vector(4).swap(m_aContainer);
+for (auto & i : m_aContainer)
+i.reset();
 
 if ( m_pStorageAccess.is() )
 {
@@ -650,7 +651,8 @@ void ODatabaseModelImpl::dispose()
 if ( elem )
 elem->m_pDataSource = nullptr;
 }
-m_aContainer.clear();
+for (auto & i : m_aContainer)
+i.reset();
 
 clearConnections();
 
@@ -1103,7 +1105,6 @@ const AsciiPropertyValue* 
ODatabaseModelImpl::getDefaultDataSourceSettings()
 
 TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
 {
-OSL_PRECOND( _eType >= E_FORM && _eType <= E_TABLE, 
"ODatabaseModelImpl::getObjectContainer: illegal index!" );
 TContentPtr& rContentPtr = m_aContainer[ _eType ];
 
 if ( !rContentPtr )
@@ -1324,8 +1325,8 @@ ODatabaseModelImpl::EmbeddedMacros 
ODatabaseModelImpl::determineEmbeddedMacros()
 {
 m_aEmbeddedMacros = eDocumentWideMacros;
 }
-else if (   lcl_hasObjectsWithMacros_nothrow( *this, E_FORM )
-||  lcl_hasObjectsWithMacros_nothrow( *this, E_REPORT )
+else if (   lcl_hasObjectsWithMacros_nothrow( *this, ObjectType::Form )
+||  lcl_hasObjectsWithMacros_nothrow( *this, 
ObjectType::Report )
 )
 {
 m_aEmbeddedMacros = eSubDocumentMacros;
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 5fed5b674e9a..681966020696 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1413,10 +1413,10 @@ void ODatabaseDocument::clearObjectContainer( 
WeakReference< XNameAccess >& _rxC
 
 Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( 
ODatabaseModelImpl::ObjectType _eType )
 {
-if ( ( _eType != ODatabaseModelImpl::E_FORM ) && ( _eType != 
ODatabaseModelImpl::E_REPORT ) )
+if ( ( _eType != ODatabaseModelImpl::ObjectType::Form ) &