[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source connectivity/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/sour

2022-04-29 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow.cxx   |2 
 basctl/source/basicide/baside2b.cxx |1 
 basctl/source/basicide/baside3.cxx  |2 
 basic/source/basmgr/basicmanagerrepository.cxx  |5 
 basic/source/basmgr/basmgr.cxx  |6 
 basic/source/inc/namecont.hxx   |4 
 basic/source/runtime/methods.cxx|2 
 basic/source/uno/namecont.cxx   |   31 ++--
 connectivity/source/drivers/dbase/DTable.cxx|2 
 connectivity/source/inc/dbase/DTable.hxx|2 
 cui/source/dialogs/AdditionsDialog.cxx  |2 
 cui/source/dialogs/cuigaldlg.cxx|2 
 cui/source/dialogs/hldocntp.cxx |2 
 cui/source/dialogs/hldoctp.cxx  |2 
 cui/source/dialogs/scriptdlg.cxx|4 
 cui/source/inc/cuigaldlg.hxx|2 
 cui/source/inc/hldocntp.hxx |2 
 cui/source/inc/hldoctp.hxx  |2 
 cui/source/inc/scriptdlg.hxx|2 
 cui/source/options/personalization.cxx  |2 
 dbaccess/source/core/dataaccess/databaseregistrations.cxx   |6 
 dbaccess/source/ui/dlg/ConnectionHelper.cxx |2 
 dbaccess/source/ui/dlg/ConnectionHelper.hxx |2 
 dbaccess/source/ui/dlg/dbwizsetup.cxx   |2 
 dbaccess/source/ui/inc/dbwizsetup.hxx   |2 
 desktop/source/migration/migration.cxx  |6 
 desktop/source/migration/migration_impl.hxx |2 
 drawinglayer/source/tools/emfpimage.cxx |4 
 editeng/source/items/frmitems.cxx   |2 
 editeng/source/items/legacyitem.cxx |4 
 extensions/source/propctrlr/defaultforminspection.cxx   |2 
 extensions/source/propctrlr/pcrcommon.cxx   |4 
 extensions/source/propctrlr/pcrcommon.hxx   |4 
 filter/source/graphic/GraphicExportFilter.cxx   |2 
 filter/source/msfilter/escherex.cxx |4 
 filter/source/msfilter/msdffimp.cxx |2 
 filter/source/svg/svgfilter.cxx |2 
 filter/source/xsltdialog/xmlfilterjar.cxx   |2 
 filter/source/xsltdialog/xmlfilterjar.hxx   |2 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx|2 
 forms/source/xforms/submission/submission.hxx   |2 
 forms/source/xforms/submission/submission_get.cxx   |2 
 forms/source/xforms/submission/submission_get.hxx   |2 
 forms/source/xforms/submission/submission_post.cxx  |2 
 forms/source/xforms/submission/submission_post.hxx  |2 
 forms/source/xforms/submission/submission_put.cxx   |2 
 forms/source/xforms/submission/submission_put.hxx   |2 
 fpicker/source/office/fileview.cxx  |4 
 fpicker/source/office/foldertree.cxx|2 
 fpicker/source/office/foldertree.hxx|2 
 fpicker/source/office/iodlg.cxx |4 
 fpicker/source/office/iodlg.hxx |2 
 framework/source/fwe/classes/addonsoptions.cxx  |2 
 framework/source/fwe/helper/titlehelper.cxx |2 
 framework/source/services/pathsettings.cxx  |4 
 framework/source/uielement/generictoolbarcontroller.cxx |6 
 framework/source/uielement/imagebuttontoolbarcontroller.cxx |2 
 include/avmedia/mediawindow.hxx |2 
 include/basic/basmgr.hxx|4 
 include/framework/titlehelper.hxx   |2 
 include/sfx2/docfile.hxx|2 
 include/sfx2/doctempl.hxx   |4 
 include/sfx2/frmdescr.hxx   |2 
 include/sfx2/frmhtml.hxx|2 
 include/sfx2/objsh.hxx  |2 
 include/sfx2/sfxhtml.hxx|6 
 include/sfx2/templatelocalview.hxx  |6 
 include/svl/documentlockfile.hxx|2 
 include/svl/inethist.hxx|2 
 include/svl/lockfilecommon.hxx  |2 
 include/svl/msodocumentlockfile.hxx |6 
 include/svl/sharecontrolfile.hxx|2 
 include/svtools/parhtml.hx

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

2022-04-29 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx  |   46 
 writerfilter/qa/cppunittests/dmapper/data/sdt-run-checkbox.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx|   57 
+-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |   21 +++
 writerfilter/source/dmapper/DomainMapper_Impl.hxx   |4 
 writerfilter/source/dmapper/SdtHelper.cxx   |   18 +++
 writerfilter/source/dmapper/SdtHelper.hxx   |   23 +++-
 writerfilter/source/dmapper/TextEffectsHandler.cxx  |1 
 writerfilter/source/dmapper/TextEffectsHandler.hxx  |8 -
 writerfilter/source/ooxml/model.xml |7 -
 10 files changed, 172 insertions(+), 13 deletions(-)

New commits:
commit c53d3a1f4b8430507d54f5fac336870df7a700af
Author: Miklos Vajna 
AuthorDate: Fri Apr 29 08:12:25 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 29 09:03:01 2022 +0200

sw content controls, checkbox: add DOCX import

My expectation was that  would be mapped to a
single SPRM where the int value is 0 or 1 depending on if this is a true
or false boolean. But the w14 tokenizer rules actually created a
NS_ooxml::LN_CT_SdtCheckbox_checked token with a
NS_ooxml::LN_CT_OnOff_val token in it, which itself again didn't contain
just a bool but dedicated NS_ooxml::LN_ST_OnOff_true,
NS_ooxml::LN_ST_OnOff_1, etc values.

To make this more complicated, TextEffectsHandler even depends on this
weird behavior.

Bring the w14 rules closer to the "main" wml rules by folding the
NS_ooxml::LN_CT_OnOff_val token into the parent token
(NS_ooxml::LN_CT_SdtCheckbox_checked in this case), but leave the
NS_ooxml::LN_ST_OnOff_* values unchanged for now.

The rest of the changes are more straightforward: we now handle
inline/run checkbox SDTs similar to rich text ones, i.e. map them to
Writer content controls, rather than just doing a poor mapping to
grab-bags.

The main benefit here is that the checkbox type of Writer content
controls actually change their value on mouse click, so it's possible to
fill in such forms.

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

diff --git a/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx 
b/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx
index da2663b93409..c96cb604f91f 100644
--- a/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx
@@ -84,6 +84,52 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunRichText)
 xContent->getPropertyValue("CharHeight") >>= fCharheight;
 CPPUNIT_ASSERT_EQUAL(24.f, fCharheight);
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtRunCheckbox)
+{
+// Given a document with a checkbox inline/run SDT:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"sdt-run-checkbox.docx";
+
+// When loading the document:
+getComponent() = loadFromDesktop(aURL);
+
+// Then make sure that the doc model has a clickable checkbox content 
control:
+uno::Reference xTextDocument(getComponent(), 
uno::UNO_QUERY);
+uno::Reference 
xParaEnumAccess(xTextDocument->getText(),
+  
uno::UNO_QUERY);
+uno::Reference xParaEnum = 
xParaEnumAccess->createEnumeration();
+uno::Reference 
xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+uno::Reference xPortionEnum = 
xPara->createEnumeration();
+uno::Reference xPortion(xPortionEnum->nextElement(), 
uno::UNO_QUERY);
+OUString aTextPortionType;
+xPortion->getPropertyValue("TextPortionType") >>= aTextPortionType;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: ContentControl
+// - Actual  : Text
+// i.e. the SDT was imported as plain text, making it hard to fill in 
checkboxes.
+CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aTextPortionType);
+uno::Reference xContentControl;
+xPortion->getPropertyValue("ContentControl") >>= xContentControl;
+uno::Reference xContentControlProps(xContentControl, 
uno::UNO_QUERY);
+bool bCheckbox{};
+xContentControlProps->getPropertyValue("Checkbox") >>= bCheckbox;
+CPPUNIT_ASSERT(bCheckbox);
+bool bChecked{};
+xContentControlProps->getPropertyValue("Checked") >>= bChecked;
+CPPUNIT_ASSERT(bChecked);
+OUString aCheckedState;
+xContentControlProps->getPropertyValue("CheckedState") >>= aCheckedState;
+CPPUNIT_ASSERT_EQUAL(OUString(u"☒"), aCheckedState);
+OUString aUncheckedState;
+xContentControlProps->getPropertyValue("UncheckedState") >>= 
aUncheckedState;
+CPPUNIT_ASSERT_EQUAL(OUString(u"☐"), aUncheckedState);
+uno::Reference xContentControlRange(xContentControl, 

[Libreoffice-commits] core.git: test/user-template

2022-04-29 Thread Caolán McNamara (via logerrit)
 test/user-template/registry/modifications.xcd |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 75277f27e38c3469bf9075e3fb4f823bdb29048f
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 14:27:02 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:46:17 2022 +0200

set CTL_HEADING for cppunit tests to something from more_fonts

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

diff --git a/test/user-template/registry/modifications.xcd 
b/test/user-template/registry/modifications.xcd
index 55daed60eaec..dfb8aed6e74f 100644
--- a/test/user-template/registry/modifications.xcd
+++ b/test/user-template/registry/modifications.xcd
@@ -11,7 +11,10 @@
  http://openoffice.org/2004/installation"; 
oor:name="VCL" oor:package="org.openoffice">
   

-
+   
+ DejaVu Sans
+
+   
  DejaVu Sans
 



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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint102.rtf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70dec6deba251e3bc5b41be2829cdd7f773c9969
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 15:45:55 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:47:33 2022 +0200

use "Rubik" from more_fonts instead of "System" for consistent layout

using Rubik with trailing 0 because need to overwrite the binary
fontname in the embedded wmf in this rtf

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

diff --git a/sw/qa/extras/layout/data/forcepoint102.rtf 
b/sw/qa/extras/layout/data/forcepoint102.rtf
index 2a830ff73c10..337e964c3b58 100644
--- a/sw/qa/extras/layout/data/forcepoint102.rtf
+++ b/sw/qa/extras/layout/data/forcepoint102.rtf
@@ -175,4 +175,4 @@ sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 
41.}\par \pard\plain
 ginger - Theresia Bachmayr 1795", 23.11.1795, Pfarre Sievering, Trauungsreg 
BD/ III (1784-1798) Fol. 36-Nov 1795.}\par \pard\plain 
\ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 18. 
"Geburt Karl W\'f6
 ginger 1796", 23.1.1796, Pfarre Sievering, aufreg. BD. V (1796 - 1813) Fol. 
1-Jan 1796.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain 
\ql\sl180\widctlpar{\fs18\f2 19. "Geburt Barbara Schreiber 1796", 22.3.1796, 
Pfarre Sievering, ufreg. BD. V (1796 - 1813) Fol. 1-Mrz 1796.}\par \pard\plain 
\ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 20. 
Sievering Taufen BD. 5 (1796-1813) Fol. 13, Sievering Taufen BD. 5 Fol. 13, 
(1796-1813), Sievering - St. Severin, Fr\'f6
 schelgasse 20, Wien, \'d6
-sterreich. Hereinafter cited as Sievering Taufen BD. 5 Fol. 13.}\par 
\pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain 
\ql\sl180\widctlpar{\fs18\f2 21. "Trauung Johann Lettner - Barbara Schreiber 
1799", 17.7.1799, Pfarre Sievering, Trauungsreg. BD IV (1798-1829) Fol. 5-Jul 
1799.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain 
\ql\sl180\widctlpar{\fs18\f2 22. "Trauung Severin Schadelberger - Theresia 
Schuster 1800", 28.4.1800, Pfarre Sievering, Trauungsreg. BD IV (1798-1829) 
Fol. 8-Apr 1800.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain 
\ql\sl180\widctlpar\fs18\par {\headerf\pgnstart1\pard\plain 
\ql\sl200\widctlpar\fs20\par {\pict{\*\picprop\shplid1025{\sp{\sn 
shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn 
fillColor}{\sv 10070188}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 
0}}{\sp{\sn alignHR}{\sv 1}}{\sp{\sn dxHeightHR}{\sv 30}}{\sp{\sn 
fLayoutInCell}{\sv 1}}{\sp{\sn fStandardHR}{\sv 1}}{\sp{\sn fHorizRule}{\sv 
1}}{\sp{\sn fLayo
 utInCell}{\sv 
1}}}\picscalex864\picscaley6\piccropl0\piccropr0\piccropt0\piccropb0\picw1764\pich882\picwgoal1000\pichgoal500\wmetafile8\bliptag-1602651790\blipupi1752{\*\blipuid
 
a07979727e802d02da96f878ba973054}01000903b70006001c0004000301080005000b0205000c021a00080704002e0118001c00fb02ceff90010440001254696d6573204e657720526f6d616e0004002d010400020101000500090200020d00320a2c0001000400080719002063160003001e000700fc02aca8990004002d0101000800fa020500ff0004002d0102000e002403050018000807180008070800fa0204002d0103000700fc02ff0004002d010400040027011c00fb021700bc020102022253797374656dde60e7770806080298030802200408025ae7833904002d0105000300}\pard\plain
 \ql\sl200\widctlpar\fs20}{\headerr\pg
 nstart1\pard\plain \ql\sl200\widctlpar\fs20\par 
{\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 
0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 10070188}}{\sp{\sn 
fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn alignHR}{\sv 1}}{\sp{\sn 
dxHeightHR}{\sv 30}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fStandardHR}{\sv 
1}}{\sp{\sn fHorizRule}{\sv 1}}{\sp{\sn fLayoutInCell}{\%n 
1}}}\picscalex864\picscaley6\piccropl0\piccropr0\piccropt0\piccropb0\picw1764\pich882\picwgoal1000\pichgoal500\wmetafile8\bliptag-1602651790\blipupi1752{\*\blipuid
 
a07979727e802d02da96f878ba973054}01000903b70006001c0004000301080005000b0205000c021a00080704002e0118001c00fb02ceff90010440001254696d6573204e657720526f6d616e0004002d010400020101000500090200020d00320a2c0001000400080719002063160003001e000700fc02aca8990004002d0101000800fa0205000
 
000ff0004002d0102000e002403050018000807180008070800fa0204002d0103000700fc02ff0004002d010400

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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint75-1.rtf |binary
 1 file changed

New commits:
commit 1b198e0b69484905a66fce852207c33849125b0f
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 15:51:44 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:48:03 2022 +0200

repair fontname to ensure a reproducible layout

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

diff --git a/sw/qa/extras/layout/data/forcepoint75-1.rtf 
b/sw/qa/extras/layout/data/forcepoint75-1.rtf
index 1ece65ad69bc..04cb7232768f 100644
Binary files a/sw/qa/extras/layout/data/forcepoint75-1.rtf and 
b/sw/qa/extras/layout/data/forcepoint75-1.rtf differ


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint92.doc |binary
 1 file changed

New commits:
commit 0693458e6f00bd278b244e790b99dfd0368d4282
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 16:31:48 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:48:39 2022 +0200

binary patch in a non-empty fontname for this test

xxd for the win here

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

diff --git a/sw/qa/extras/layout/data/forcepoint92.doc 
b/sw/qa/extras/layout/data/forcepoint92.doc
index 49c4a7f11dfe..7d9e02deca99 100644
Binary files a/sw/qa/extras/layout/data/forcepoint92.doc and 
b/sw/qa/extras/layout/data/forcepoint92.doc differ


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint-swfootnoteframe-1.rtf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9cdc915f3b831ab34452ebb9c504fdbebcbab484
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 16:38:37 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:49:06 2022 +0200

repair fontname so no font substitution is needed

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

diff --git a/sw/qa/extras/layout/data/forcepoint-swfootnoteframe-1.rtf 
b/sw/qa/extras/layout/data/forcepoint-swfootnoteframe-1.rtf
index 7ff7c82e46ba..271c691eeeb0 100644
--- a/sw/qa/extras/layout/data/forcepoint-swfootnoteframe-1.rtf
+++ b/sw/qa/extras/layout/data/forcepoint-swfootnoteframe-1.rtf
@@ -1 +1 @@
-{\rtf1\cnsi 
\ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue98;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset186
 DejaVu Serif;}{\f1\froman\cpg0\fcharset0 DejaVu 
Serif;}{\f2\froman\cpg1252\fcharset0 DejaVu 
Serif;}{\f3\fswiss\cpg1257\fcharset186 DejaVu Sans;}{\f4\fswiss\cpg0\fcharset0 
DejaVu Sans;}{\f5\fswiss\cpg1252\fcharset0 DejaVu 
Sans;}{\f6\fro-an\cpg1257\fcharset186 Times New 
Roman;}{\f7\froman\cpg0\fcharset0 Times New 
Roman;}{\f8\froman\cpg1252\fcharset0 Times New 
Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier 
New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 
Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 
Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\
 sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 
Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql 
Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr 
Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 
Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 
Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql 
Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 
Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql 
Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql 
Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 
Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql 
Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 
Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql 
Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql 
Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 
Style28;}{\s29\sbasedon0\ql\fi568\sl-322\slmult0 Style29;}{\
 s30\sbasedon0\ql Style30;}{\s31\sbasedon0\ql Style31;}{\s32\sbasedon0\ql 
Style32;}{\s33\sbasedon0\ql Style33;}{\s34\sbasedon0\ql 
Style34;}{\s35\sbasedon0\ql Style35;}{\*\cs36\additive Default Paragraph 
Font;}{\*\cs37\sbasedon36\additive\b\charscalex120\f2\fs58 Font 
Style37;}{\*\cs38\sbasedon36\additive\b\charscalex30\f2\fs400 Font 
Style38;}{\*\cs39\sbasedon36\additive\i\f2\fs22 Font 
Style39;}{\*\cs40\sbasedon36\additive\scaps\f8\fs8 Font 
Style40;}{\*\cs41\sbasedon36\additive\i\b\f2\fs10 Font 
Style41;}{\*\cs42\sbasedon36\additive\f5\fs8 Font 
Style42;}{\*\cs43\sbasedon36\additive\b\expndtw200\f2\fs10 Font 
Style43;}{\*\cs44\sbasedon36\additive\f2\fs22 Font 
Style44;}{\*\cs45\sbasedon36\additive\b\expndtw-10\f2\fs22 Font 
Style45;}{\*\cs46\sbasedon36\additive\scaps\f2\fs20 Font 
Style46;}{\*\cs47\sbasedon36\additive\charscalex20\f2\fs104 Font 
Style47;}{\*\cs48\sbasedon36\additive\b\f2\fs20 Font 
Style48;}{\*\cs49\sbasedon36\additive\f2\fs22 Font 
Style49;}{\*\cs50\sbasedon36\additive\b\f2\fs
 38 Font Style50;}{\*\cs51\sbasedon36\additive\f2\fs20 Font 
Style51;}{\*\cs52\sbasedon36\additive\expndtw-20\f2\fs30 Font 
Style52;}{\*\cs53\sbasedon36\additive\i\expndtw-10\f2\fs22 Font 
Style53;}{\*\cs54\sbasedon36\additive\i\expndtw-20\f2\fs22 Font 
Style54;}{\*\cs55\sbasedon36\additive\f2\fs22 Font 
Style55;}{\*\cs56\sbasedon36\additive\f2\fs18 Font 
Style56;}{\*\cs57\sbasedon36\additive\b\expndtw10\f2\fs16 Font 
Style57;}{\*\cs58\sbasedon36\additive\b\f2\fs20 Font 
Style58;}{\*\cs59\sbasedon36\additive\i\b\expndtw-10\f11\fs22 Font 
Style59;}{\*\cs60\sbasedon36\additive\f2\fs20 Font 
Style60;}{\*\cs61\sbasedon36\additive\f2\fs12 Font 
Style61;}{\*\cs62\sbasedon36\additive\f2\fs18 Font 
Style62;}{\*\cs63\sbasedon36\additive\i\expndtw-20\f2\fs22 Font 
Style63;}{\*\cs64\sbasedon36\additive\b\expndtw-20\f2\fs26 Font 
Style64;}}\fet2{\*\ftnsep {\chftnsep\par }}{\*\aftnsep {\chftnsep\par 
}}\expshrtn\widowctrl\paperw20384\paperh12312\margl360\margr360\margt360\margb360
 \sectd \sbknone\pgwsxn20384\pg
 
hsxn12312\marglsxn360\margrsxn360\margtsxn360\margbsxn360\titlepg\col

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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 392a805cbb243a65be6e13132cca791a79715d12
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 20:57:23 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:49:37 2022 +0200

don't use fonts named '0' to avoid font fallback for writer layout tests

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

diff --git a/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf 
b/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
index 2f6d56a194a1..eaa80c7c4f07 100644
--- a/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
+++ b/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
@@ -202,7 +202,7 @@ clvertalt
 \pard\intbl
 \cell
 \pard\intbl\qc
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
 \chpgn
 }
 \cell
@@ -221,7 +221,7 @@ clvertalt
 \pard\intbl
 \cell
 \pard\intbl\qc
-{\plain\f0\fs20|cf2
+{\plain\fs20|cf2
 \chpgn
 }
 \cell
@@ -240,7 +240,7 @@ clvertalt
 \pard\intbl
 \cell
 \pard\intbl\qc
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
 \chpgn
 }
 \cell
@@ -250,28 +250,28 @@ clvertalt
 }
 {\*\bkmkstart toc_2e__2e__2e_id2754642}
 \pard\sb518\qj
-{\plain\f00128\fs35\b\cf2
+{\plain\fs35\b\cf2
 Table of %nntentsmpUMjkI
 }
 \par
 {\*\bkmkend toc_2e__2e__2e_id2754642}
 \pard\sb291\li960\ri480\tldot\tx4920
 {\field{\*|fldinst HYPERLINK \\l id2884528}{\fldrslt
-{\plai~\f0\fs20cf2
+{\plai~\fs20cf2
 1. 
 }
 }}
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
  
 }
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
 \tab
 }
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
  
 }
 {\field{\*\fldinst HYPERLINK \\n id2884528}{\fldrslt
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
 {\field{\*\fldinst PAGEREF id2884528}{\fldrslt 0}}
 }
 }}
@@ -313,7 +313,7 @@ mkend toc_2e__2e__2e_id2754642}
 \pard\intbl
 \cell
 \pard\intbl\qc
-{\%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain\f0\fs20\cf2
+{\%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain\fs20\cf2
 \chpgn
 }
 Xcell
@@ -332,7 +332,7 @@ Xcell
 \pard\intbl
 \cell
 \pard\intbl\qc
-{\plain\f0\fs20\cf2
+{\plain\fs20\cf2
 \chpgn
 }
 \cell


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/tdf115094.docx |binary
 1 file changed

New commits:
commit 976c456be6d5e227ba1999da5ae37ee108b43ca7
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 21:01:09 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:49:56 2022 +0200

Open Sans Light -> DejaVu Sans for repeatable layout in test

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

diff --git a/sw/qa/extras/layout/data/tdf115094.docx 
b/sw/qa/extras/layout/data/tdf115094.docx
index 49a7c9194f1a..6ad095db94b0 100644
Binary files a/sw/qa/extras/layout/data/tdf115094.docx and 
b/sw/qa/extras/layout/data/tdf115094.docx differ


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/tdf115094.docx |binary
 sw/qa/extras/layout/data/tdf116486.docx |binary
 2 files changed

New commits:
commit 50e40364f5f60d1e4aa6aaacd48383cd98b3a25e
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 21:13:38 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 09:50:26 2022 +0200

Open Sans -> DejaVu Sans for repeatable layout in test

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

diff --git a/sw/qa/extras/layout/data/tdf115094.docx 
b/sw/qa/extras/layout/data/tdf115094.docx
index 6ad095db94b0..c6c0176c2af4 100644
Binary files a/sw/qa/extras/layout/data/tdf115094.docx and 
b/sw/qa/extras/layout/data/tdf115094.docx differ
diff --git a/sw/qa/extras/layout/data/tdf116486.docx 
b/sw/qa/extras/layout/data/tdf116486.docx
index 825b0ef33a55..a90651ff6fc6 100644
Binary files a/sw/qa/extras/layout/data/tdf116486.docx and 
b/sw/qa/extras/layout/data/tdf116486.docx differ


Re: SalAbort:Unspecified application error

2022-04-29 Thread di liu
>
> Is that file confidential or can it be shared publicly (attached to a
> Bugzilla ticket)? (I can't read most of the text in it. :-))
>

 The file is not confidential and can be shared publicly (haha,The text in
it is chiness)


so with your config that uses --enable-debug and restricts for what
> modules symbols are enabled, even less should be needed.
>

 My compile machine only has 4GB RAM so that i must restrict the symbols
but even so the memory is also not enough(because of that link error
"clang++ error:unable to execute command Killed")

Can you try whether the demo patch at
> https://gerrit.libreoffice.org/c/core/+/133581 makes the crash go away
> for you as well?
>

Ok, I will make a try (recompile the source code will spend me hours... )

Michael Weghorn  于2022年4月29日周五 03:06写道:

>
> On 28/04/2022 05.04, di liu wrote:
> > Thank you for your response ^_^
> >
> > The video appears to be inaccessible unless access has specifically
> been
> > granted in Google Drive.
> >
> > I am sorry, have made it
> >
> >   Does that device have a 64-bit ARM processor?
> >
> > Yeah ,my device abi is arm64-v8a,And the so is compiled for armeabi-v7a
> >
> > i.e. the crash is not 100% reproducible? Can you give a rough
> estimation
> > of how often it happens? (like "almost always", "about every third
> > time",...)?
> >
> > almost always
> >
> >   It might also help to share a sample doc (e.g. attaching one to a
> bug
> >
> > report on Bugzilla) if it happens more often with specific files.
> > see the accessories
>
> Thanks for sharing the video and a sample file. With those, I can
> reproduce a crash.
>
> Is that file confidential or can it be shared publicly (attached to a
> Bugzilla ticket)? (I can't read most of the text in it. :-))
>
> > What does your autogen.input look like? (Or what options are you
> passing
> > to ./autogen.sh manually?)
> >
> > passing nothing to ./autogen.sh
> > the autogen.input containing this:
> > --with-distro=LibreOfficeAndroid
> > --with-android-sdk=/home/disco/Documents/dev_env/android_sdk
> >
> --with-android-ndk=/home/disco/Documents/dev_env/android_sdk/ndk/20.1.5948944
> > --with-ant-home=/home/disco/Documents/dev_env/apache-ant-1.10.12
> > --enable-debug
> > --enable-symbols="vcl/source/app/"
> >
> > For a 64-bit ARM debug build, using LLD with NDK 22.1.7171670 worked
> for
> > me in the past, by applying this change on top of master:
> > https://gerrit.libreoffice.org/c/core/+/130947
> > 
> >
> > and then using an autogen.input containing this:
> >
> > --build=x86_64-unknown-linux-gnu
> > --with-android-ndk=/home/michi/Android/Sdk/ndk/21.0.6113669
> > --with-android-sdk=/home/michi/Android/Sdk
> > --with-distro=LibreOfficeAndroidAarch64
> > --enable-sal-log
> > --with-external-tar=/home/michi/development/libreoffice-external
> > --enable-ccache
> > --enable-ld=lld
> > --enable-dbgutil
> > --with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/
> >
> > If i want to build debug version so must build a 64-bit ?
>
> I suppose, in theory, 32-bit should also work. My practical experience
> with the Android toolchain was that several things that should work in
> theory didn't work in reality, and trying a different architecture, NDK
> version, or linker could give better results.
>
> Trying an x86 or x86_64 AVD might also be worth trying.
> A dbgutil build works fine for me on a Debian testing machine with 16 GB
> of RAM and an autogen.input containing
>
> --build=x86_64-unknown-linux-gnu
> --with-android-ndk=/home/michi/Android/Sdk/ndk/20.0.5594570/
> --with-android-sdk=/home/michi/Android/Sdk
> --with-distro=LibreOfficeAndroidX86
> --enable-sal-log
> --enable-ccache
> --enable-dbgutil
> --with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/
>
> so with your config that uses --enable-debug and restricts for what
> modules symbols are enabled, even less should be needed.
>
> > Addition:
> > Yesterday i use "bugreport" command on my device and found below logs:
> >
> > 04-27 15:53:50.551 10316  3015  3287 W libc: malloc(2292954)
> > failed: returning null pointer
> > 04-27 15:53:50.552  1000  2433  6251 I chatty  : uid=1000(system)
> > Binder:2433_6 expire 4 lines
> > 04-27 15:53:50.553 10316  3015  3287 E LibreOffice/androidinst:
> > SalAbort: 'Unspecified application error'
> >
> >
> > There have a log "malloc(2292954) failed: returning null pointer" before
> > the error 'Unspecified application error' (both of them come from my
> > app(pid=10316))
> > So i wonder if it is possible that the crash was happened in java ?
> > Because i found every time i slide the screen it's will trigger the
> > render redraw which will trigger allocate a direct buffer
>
>  From what I have seen so far, the problem is that the app/system is
> running out of memory, caused by a memory leak on the C++ side.
>
> Can you try whether the dem

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

2022-04-29 Thread Xisco Fauli (via logerrit)
 oox/inc/drawingml/textparagraphproperties.hxx   |1 +
 oox/source/drawingml/textparagraphproperties.cxx|   14 +++---
 oox/source/drawingml/textparagraphpropertiescontext.cxx |2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 3240820acaa2f87e4917d1fa387255c2101460a2
Author: Xisco Fauli 
AuthorDate: Wed Apr 27 16:59:09 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Apr 29 10:24:08 2022 +0200

oox: make buSzTx and buFontTx behave the same way as buClrTx

I believe this is the right thing to do although this is
a blind fix, since I couldn't find any file affected

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

diff --git a/oox/inc/drawingml/textparagraphproperties.hxx 
b/oox/inc/drawingml/textparagraphproperties.hxx
index 7bda257d445e..8ea56a7b0736 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -58,6 +58,7 @@ public:
 std::shared_ptr< ::oox::drawingml::Color > maBulletColorPtr;
 css::uno::Any   mbBulletColorFollowText;
 css::uno::Any   mbBulletFontFollowText;
+css::uno::Any   mbBulletSizeFollowText;
 ::oox::drawingml::TextFont  maBulletFont;
 css::uno::Any   msBulletChar;
 css::uno::Any   mnStartAt;
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index ce40f69eb4f6..bcf51d290794 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -59,7 +59,9 @@ namespace oox::drawingml {
 
 BulletList::BulletList( )
 : maBulletColorPtr( std::make_shared() ),
-  mbBulletColorFollowText ( false )
+  mbBulletColorFollowText ( false ),
+  mbBulletFontFollowText ( false ),
+  mbBulletSizeFollowText ( false )
 {
 }
 
@@ -266,6 +268,8 @@ void BulletList::apply( const BulletList& rSource )
 mbBulletColorFollowText = rSource.mbBulletColorFollowText;
 if ( rSource.mbBulletFontFollowText.hasValue() )
 mbBulletFontFollowText = rSource.mbBulletFontFollowText;
+if ( rSource.mbBulletSizeFollowText.hasValue() )
+mbBulletSizeFollowText = rSource.mbBulletSizeFollowText;
 maBulletFont.assignIfUsed( rSource.maBulletFont );
 if ( rSource.msBulletChar.hasValue() )
 msBulletChar = rSource.msBulletChar;
@@ -308,7 +312,9 @@ void BulletList::pushToPropMap( const 
::oox::core::XmlFilterBase* pFilterBase, P
 float nBulletFontWeight = css::awt::FontWeight::NORMAL;
 bool bSymbolFont = false;
 if( pFilterBase) {
-if (maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, 
nBulletFontFamily, *pFilterBase ) )
+bool bFollowTextFont = false;
+mbBulletFontFollowText >>= bFollowTextFont;
+if (!bFollowTextFont && maBulletFont.getFontData( aBulletFontName, 
nBulletFontPitch, nBulletFontFamily, *pFilterBase ) )
 {
 FontDescriptor aFontDesc;
 sal_Int16 nFontSize = 0;
@@ -357,7 +363,9 @@ void BulletList::pushToPropMap( const 
::oox::core::XmlFilterBase* pFilterBase, P
 if (xBitmap.is())
 rPropMap.setProperty(PROP_GraphicBitmap, xBitmap);
 }
-if( mnSize.hasValue() )
+bool bFollowTextSize = false;
+mbBulletSizeFollowText >>= bFollowTextSize;
+if( !bFollowTextSize && mnSize.hasValue() )
 rPropMap.setAnyProperty( PROP_BulletRelSize, mnSize);
 if ( maStyleName.hasValue() )
 rPropMap.setAnyProperty( PROP_CharStyleName, maStyleName);
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 20810ce1b5c8..c1b8763a961a 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -213,7 +213,7 @@ ContextHandlerRef 
TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
 return new ColorContext( *this, *mrBulletList.maBulletColorPtr );
 // EG_TextBulletSize
 case A_TOKEN( buSzTx ): // CT_TextBulletSizeFollowText
-mrBulletList.setBulletSize(100);
+mrBulletList.mbBulletSizeFollowText <<= true;
 break;
 case A_TOKEN( buSzPct ):// CT_TextBulletSizePercent
 mrBulletList.setBulletSize( std::lround( GetPercent( 
rAttribs.getString( XML_val ).get() ) / 1000.f ) );


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

2022-04-29 Thread Noel Grandin (via logerrit)
 codemaker/source/codemaker/unotype.cxx  |   20 ++--
 codemaker/source/cppumaker/includes.cxx |2 +-
 codemaker/source/cppumaker/includes.hxx |2 +-
 include/codemaker/unotype.hxx   |3 +--
 4 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit fa88fd0fc8434a4a6077dd80afcd47464669d907
Author: Noel Grandin 
AuthorDate: Fri Apr 29 09:30:29 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 11:12:54 2022 +0200

Revert "use more string_view in codemaker"

This reverts commit 9463550eabd0455c374c1369bc72388108baccad.

Reason for revert: The codemaker::UnoType::decompose was previously mostly 
returning the same OString it receives, so this change is likely a pessimisation

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

diff --git a/codemaker/source/codemaker/unotype.cxx 
b/codemaker/source/codemaker/unotype.cxx
index 2b8a2bfc6d1f..8c25ac8ae0dd 100644
--- a/codemaker/source/codemaker/unotype.cxx
+++ b/codemaker/source/codemaker/unotype.cxx
@@ -26,25 +26,25 @@
 
 
 OString codemaker::UnoType::decompose(
-std::string_view type, sal_Int32 * rank,
+OString const & type, sal_Int32 * rank,
 std::vector< OString > * arguments)
 {
-size_t len = type.size();
-size_t i = 0;
+sal_Int32 len = type.getLength();
+sal_Int32 i = 0;
 while (len - i > 1 && type[i + 1] == ']') {
 i += 2;
 }
 if (rank != nullptr) {
 *rank = i / 2;
 }
-size_t j = arguments == nullptr ? std::string_view::npos : type.find('<', 
i);
-if (j == std::string_view::npos) {
-return OString(type.substr(i));
+sal_Int32 j = arguments == nullptr ? -1 : type.indexOf('<', i);
+if (j < 0) {
+return type.copy(i);
 }
-size_t k = j;
+sal_Int32 k = j;
 do {
 ++k; // skip '<' or ','
-size_t l = k;
+sal_Int32 l = k;
 for (sal_Int32 level = 0; l != len; ++l) {
 char c = type[l];
 if (c == ',') {
@@ -60,11 +60,11 @@ OString codemaker::UnoType::decompose(
 --level;
 }
 }
-arguments->push_back(OString(type.substr(k, l - k)));
+arguments->push_back(type.copy(k, l - k));
 k = l;
 } while (k != len && type[k] != '>');
 OSL_ASSERT(k == len - 1 && type[k] == '>');
-return OString(type.substr(i, j - i));
+return type.copy(i, j - i);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/source/cppumaker/includes.cxx 
b/codemaker/source/cppumaker/includes.cxx
index 470d59ef3554..db7dae46bccc 100644
--- a/codemaker/source/cppumaker/includes.cxx
+++ b/codemaker/source/cppumaker/includes.cxx
@@ -68,7 +68,7 @@ Includes::Includes(
 Includes::~Includes()
 {}
 
-void Includes::add(std::string_view entityName) {
+void Includes::add(OString const & entityName) {
 sal_Int32 k;
 std::vector< OString > args;
 OUString n(b2u(codemaker::UnoType::decompose(entityName, &k, &args)));
diff --git a/codemaker/source/cppumaker/includes.hxx 
b/codemaker/source/cppumaker/includes.hxx
index 00c784408077..0362c417ac2a 100644
--- a/codemaker/source/cppumaker/includes.hxx
+++ b/codemaker/source/cppumaker/includes.hxx
@@ -38,7 +38,7 @@ public:
 
 ~Includes();
 
-void add(std::string_view entityName);
+void add(OString const & entityName);
 void addCassert() { m_includeCassert = true; }
 void addAny() { m_includeAny = true; }
 void addReference() { m_includeReference = true; }
diff --git a/include/codemaker/unotype.hxx b/include/codemaker/unotype.hxx
index 38c66f6441b8..606321873242 100644
--- a/include/codemaker/unotype.hxx
+++ b/include/codemaker/unotype.hxx
@@ -22,7 +22,6 @@
 
 #include 
 
-#include 
 #include 
 
 namespace rtl { class OString; }
@@ -79,7 +78,7 @@ namespace codemaker::UnoType {
@return the base part of the given type
  */
 rtl::OString decompose(
-std::string_view type, sal_Int32 * rank = nullptr,
+rtl::OString const & type, sal_Int32 * rank = nullptr,
 std::vector< rtl::OString > * arguments = nullptr);
 
 }


Support for touch screen

2022-04-29 Thread Sanasinko
I hope that in Libre Office Writer there would be support for touch screen
use.

With kind regards,

Terhi


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

2022-04-29 Thread xuenhua (via logerrit)
 vcl/source/window/mnemonic.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1de6d6c539ec49a9cbeba9ab4c11fe8b6b5f14e7
Author: xuenhua 
AuthorDate: Fri Apr 29 12:34:28 2022 +0800
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 12:00:18 2022 +0200

Fix Method EraseAllMnemonicChars bug

MNEMONIC_RANGE_2_START and MNEMONIC_RANGE_2_END defined in 
'core/include/vcl/mnemonic.hxx'  are 'a' and 'z'
This variable c is UpperCase, should be converted to lowercase, and 
thencompare with MNEMONIC_RANGE_2_START and MNEMONIC_RANGE_2_END.

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

diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index d412b2ad4071..6e4b155c2af5 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -322,7 +322,7 @@ OUString MnemonicGenerator::EraseAllMnemonicChars( const 
OUString& rStr )
 // check for CJK-style mnemonic
 if( i > 0 && (i+2) < nLen )
 {
-sal_Unicode c = sal_Unicode(rtl::toAsciiUpperCase(aStr[i+1]));
+sal_Unicode c = sal_Unicode(rtl::toAsciiLowerCase(aStr[i+1]));
 if( aStr[ i-1 ] == '(' &&
 aStr[ i+2 ] == ')' &&
 c >= MNEMONIC_RANGE_2_START && c <= MNEMONIC_RANGE_2_END )


Re: SalAbort:Unspecified application error

2022-04-29 Thread di liu
>
> Ok, I will make a try (recompile the source code will spend me hours... )
>

Unfortunately it's also crash with same error when i swipe up and down more
times.
I suppose the memory leak maybe exit in this method
"desktop/source/lib/init.cxx -> doc_paintTile".Because every time i swipe
the screen the java code will call this method to paint tile where crash
was happened

di liu  于2022年4月29日周五 16:06写道:

> Is that file confidential or can it be shared publicly (attached to a
>> Bugzilla ticket)? (I can't read most of the text in it. :-))
>>
>
>  The file is not confidential and can be shared publicly (haha,The text in
> it is chiness)
>
>
> so with your config that uses --enable-debug and restricts for what
>> modules symbols are enabled, even less should be needed.
>>
>
>  My compile machine only has 4GB RAM so that i must restrict the symbols
> but even so the memory is also not enough(because of that link error
> "clang++ error:unable to execute command Killed")
>
> Can you try whether the demo patch at
>> https://gerrit.libreoffice.org/c/core/+/133581 makes the crash go away
>> for you as well?
>>
>
> Ok, I will make a try (recompile the source code will spend me hours... )
>
> Michael Weghorn  于2022年4月29日周五 03:06写道:
>
>>
>> On 28/04/2022 05.04, di liu wrote:
>> > Thank you for your response ^_^
>> >
>> > The video appears to be inaccessible unless access has specifically
>> been
>> > granted in Google Drive.
>> >
>> > I am sorry, have made it
>> >
>> >   Does that device have a 64-bit ARM processor?
>> >
>> > Yeah ,my device abi is arm64-v8a,And the so is compiled for armeabi-v7a
>> >
>> > i.e. the crash is not 100% reproducible? Can you give a rough
>> estimation
>> > of how often it happens? (like "almost always", "about every third
>> > time",...)?
>> >
>> > almost always
>> >
>> >   It might also help to share a sample doc (e.g. attaching one to a
>> bug
>> >
>> > report on Bugzilla) if it happens more often with specific files.
>> > see the accessories
>>
>> Thanks for sharing the video and a sample file. With those, I can
>> reproduce a crash.
>>
>> Is that file confidential or can it be shared publicly (attached to a
>> Bugzilla ticket)? (I can't read most of the text in it. :-))
>>
>> > What does your autogen.input look like? (Or what options are you
>> passing
>> > to ./autogen.sh manually?)
>> >
>> > passing nothing to ./autogen.sh
>> > the autogen.input containing this:
>> > --with-distro=LibreOfficeAndroid
>> > --with-android-sdk=/home/disco/Documents/dev_env/android_sdk
>> >
>> --with-android-ndk=/home/disco/Documents/dev_env/android_sdk/ndk/20.1.5948944
>> > --with-ant-home=/home/disco/Documents/dev_env/apache-ant-1.10.12
>> > --enable-debug
>> > --enable-symbols="vcl/source/app/"
>> >
>> > For a 64-bit ARM debug build, using LLD with NDK 22.1.7171670
>> worked for
>> > me in the past, by applying this change on top of master:
>> > https://gerrit.libreoffice.org/c/core/+/130947
>> > 
>> >
>> > and then using an autogen.input containing this:
>> >
>> > --build=x86_64-unknown-linux-gnu
>> > --with-android-ndk=/home/michi/Android/Sdk/ndk/21.0.6113669
>> > --with-android-sdk=/home/michi/Android/Sdk
>> > --with-distro=LibreOfficeAndroidAarch64
>> > --enable-sal-log
>> > --with-external-tar=/home/michi/development/libreoffice-external
>> > --enable-ccache
>> > --enable-ld=lld
>> > --enable-dbgutil
>> > --with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/
>> >
>> > If i want to build debug version so must build a 64-bit ?
>>
>> I suppose, in theory, 32-bit should also work. My practical experience
>> with the Android toolchain was that several things that should work in
>> theory didn't work in reality, and trying a different architecture, NDK
>> version, or linker could give better results.
>>
>> Trying an x86 or x86_64 AVD might also be worth trying.
>> A dbgutil build works fine for me on a Debian testing machine with 16 GB
>> of RAM and an autogen.input containing
>>
>> --build=x86_64-unknown-linux-gnu
>> --with-android-ndk=/home/michi/Android/Sdk/ndk/20.0.5594570/
>> --with-android-sdk=/home/michi/Android/Sdk
>> --with-distro=LibreOfficeAndroidX86
>> --enable-sal-log
>> --enable-ccache
>> --enable-dbgutil
>> --with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/
>>
>> so with your config that uses --enable-debug and restricts for what
>> modules symbols are enabled, even less should be needed.
>>
>> > Addition:
>> > Yesterday i use "bugreport" command on my device and found below logs:
>> >
>> > 04-27 15:53:50.551 10316  3015  3287 W libc: malloc(2292954)
>> > failed: returning null pointer
>> > 04-27 15:53:50.552  1000  2433  6251 I chatty  : uid=1000(system)
>> > Binder:2433_6 expire 4 lines
>> > 04-27 15:53:50.553 10316  3015  3287 E LibreOffice/androidinst:
>> > SalAbort: 'Unspecified application error'
>> >
>> >
>> > T

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

2022-04-29 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx |   13 +
 writerfilter/source/dmapper/DomainMapper_Impl.cxx  |6 --
 3 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit f56f8be65b26cb3c8e83af05f10ba9f717ff76b2
Author: Justin Luth 
AuthorDate: Fri Apr 22 19:46:16 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 29 12:25:01 2022 +0200

tdf#126636 writerfilter: import USERNAME field as fixed

This depends on and mimics some of the fixes for tdf#148380.

Microsoft Word doesn't immediately/automatically update field contents
like LO does. Instead, the user needs to press F9 on each field.
So, these USERNAME or USERINITIALS fields just show the
when-last-updated text that was saved in the document
instead of the actual current value of the field.

Although LO doesn't have that ability, we can flag them as FIXED
and achieve a very similar result. Doing so fixes this bug report
which might be quite common since USERNAME might be mistaken
for AUTHOR or LASTSAVEDBY by the user - since in practice
they tend to be the same thing.

We already did this for AUTHOR (which is extremely safe since
that can never change). I almost hate to do it with this one
because even this bug shows it is too often a case of mis-use,
but that is the way it is, and this seems to be the best solution.

Change-Id: I48dc6d45992aff740023e80f619b56ad01231782
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133346
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx 
b/sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx
new file mode 100644
index ..241632bc80e9
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index f03901f5180d..bbbc8e7cfb73 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -104,6 +104,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf148380_fldLocked, 
"tdf148380_fldLocked.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Last printed (fixed)"), 
xField->getPresentation(true));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf148380_usernameField, 
"tdf148380_usernameField.docx")
+{
+// Verify that these are fields, and not just plain text
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+uno::Reference xField(xFields->nextElement(), 
uno::UNO_QUERY);
+// These should match the as-last-seen-in-the-text name, and not the 
application's user name
+CPPUNIT_ASSERT_EQUAL(OUString("Charlie Brown"), 
xField->getPresentation(false));
+xField.set(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("CB"), xField->getPresentation(false));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf148380_modifiedField, 
"tdf148380_modifiedField.docx")
 {
 getParagraph(2, "4/5/2022 3:29:00 PM"); // default (unspecified) date 
format
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2d956b5ab09c..b59b9eac066f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5547,7 +5547,7 @@ void DomainMapper_Impl::handleAutoNum
 }
 
 void DomainMapper_Impl::handleAuthor
-(std::u16string_view rFirstParam,
+(std::u16string_view,
  uno::Reference< beans::XPropertySet > const& xFieldProperties,
  FieldId  eFieldId )
 {
@@ -,7 +,9 @@ void DomainMapper_Impl::handleAuthor
 xFieldProperties->setPropertyValue
 ( getPropertyName(PROP_FULL_NAME), uno::makeAny( true ));
 
-if (!rFirstParam.empty() || eFieldId == FIELD_AUTHOR)
+// Always set as FIXED b/c MS Word only updates these fields via user 
intervention (F9)
+// AUTHOR of course never changes and USERNAME is easily mis-used as an 
original author field.
+// Additionally, this was forced as fixed if any special case-formatting 
was provided.
 {
 xFieldProperties->setPropertyValue(
 getPropertyName( PROP_IS_FIXED ),


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

2022-04-29 Thread Noel Grandin (via logerrit)
 include/oox/ole/olehelper.hxx |6 +++---
 oox/source/drawingml/hyperlinkcontext.cxx |4 ++--
 oox/source/dump/oledumper.cxx |9 +
 oox/source/export/drawingml.cxx   |4 ++--
 oox/source/ole/olehelper.cxx  |6 ++
 oox/source/ole/vbamodule.cxx  |4 ++--
 oox/source/vml/vmlformatting.cxx  |   12 ++--
 7 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit 38d4b6eb42246c0dbd4958a50ed8437bc93508d6
Author: Noel Grandin 
AuthorDate: Fri Apr 29 10:29:11 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 12:35:47 2022 +0200

use more string_view in oox

found by examining uses of OUString::copy() for likely places

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

diff --git a/include/oox/ole/olehelper.hxx b/include/oox/ole/olehelper.hxx
index f15642760f3d..e01e6025723a 100644
--- a/include/oox/ole/olehelper.hxx
+++ b/include/oox/ole/olehelper.hxx
@@ -146,11 +146,11 @@ public:
 OleFormCtrlExportHelper( const css::uno::Reference< 
css::uno::XComponentContext >& rxCtx, const css::uno::Reference< 
css::frame::XModel >& xDocModel, const css::uno::Reference< 
css::awt::XControlModel >& xModel );
 ~OleFormCtrlExportHelper();
 
-OUString getGUID() const
+std::u16string_view getGUID() const
 {
-OUString sResult;
+std::u16string_view sResult;
 if ( maGUID.getLength() > 2 )
-sResult = maGUID.copy(1, maGUID.getLength() - 2 );
+sResult = maGUID.subView(1, maGUID.getLength() - 2 );
 return sResult;
 }
 const OUString& getFullName() const { return maFullName; }
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx 
b/oox/source/drawingml/hyperlinkcontext.cxx
index 7bb6930eca13..352eb7bf5efa 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -91,8 +91,8 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper 
const & rParent,
 static const OUStringLiteral sJump( u"jump=" );
 if ( aPPAct.match( sJump, nIndex + 1 ) )
 {
-OUString aDestination( aPPAct.copy( nIndex + 1 + 
sJump.getLength() ) );
-sURL += "#action?jump=" + aDestination;
+std::u16string_view aDestination( aPPAct.subView( nIndex + 
1 + sJump.getLength() ) );
+sURL += OUString::Concat("#action?jump=") + aDestination;
 }
 }
 else if ( aPPAction.match( "hlinksldjump" ) )
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index 036c12a5670e..92e67c04590f 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #ifdef DBG_UTIL
@@ -1830,10 +1831,10 @@ bool VbaContainerStorageObject::isFormStorage( const 
OUString& rStrgPath ) const
 {
 if( (rStrgPath.getLength() >= 3) && (rStrgPath[ 0 ] == 'i') )
 {
-OUString aId = rStrgPath.copy( 1 );
-if( (aId.getLength() == 2) && (aId[ 0 ] == '0') )
-aId = aId.copy( 1 );
-sal_Int32 nId = aId.toInt32();
+std::u16string_view aId = rStrgPath.subView( 1 );
+if( (aId.size() == 2) && (aId[ 0 ] == '0') )
+aId = aId.substr( 1 );
+sal_Int32 nId = o3tl::toInt32(aId);
 if( (nId > 0) && (std::u16string_view(OUString::number( nId )) == aId) 
)
 for (auto const& siteInfo : maFormData.maSiteInfos)
 if( siteInfo.mnId == nId )
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 609528cd33bf..bbeea30af4e5 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2389,9 +2389,9 @@ void DrawingML::WriteRunProperties( const Reference< 
XPropertySet >& rRun, bool
 else
 {
 sal_Int32 nIndex = sURL.indexOf('=');
-OUString aDestination(sURL.copy(nIndex + 1));
+std::u16string_view aDestination(sURL.subView(nIndex + 1));
 mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, 
XML_id), "", XML_action,
-  "ppaction://hlinkshowjump?jump=" + 
aDestination);
+  
OUString::Concat("ppaction://hlinkshowjump?jump=") + aDestination);
 }
 }
 }
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 16b38919a213..41ab34febea3 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -525,8 +525,7 @@ bool MSConvertOCXControls::WriteOCXExcelKludgeStream( const 
css::uno::Reference<
 return false;
 rName = exportHelper.getTypeName();
 SvGlobalName aName;
-OUString sId = ex

Re: SalAbort:Unspecified application error

2022-04-29 Thread Michael Weghorn

Is that file confidential or can it be shared publicly (attached to a
Bugzilla ticket)? (I can't read most of the text in it. :-))


 The file is not confidential and can be shared publicly (haha,The text in it 
is chiness)


Great, thanks.


On 29/04/2022 12.07, di liu wrote:

Ok, I will make a try (recompile the source code will spend me
hours... )


Unfortunately it's also crash with same error when i swipe up and down 
more times.


Does "more times" here mean that it takes longer now than previously 
until the problem shows up? Or is it pretty much unchanged for you?


Is that with experimental mode enabled or disabled in the app settings?

I suppose the memory leak maybe exit in this method 
"desktop/source/lib/init.cxx -> doc_paintTile".Because every time i 
swipe the screen the java code will call this method to paint tile where 
crash was happened


Yes, that's most likely.
The one from https://gerrit.libreoffice.org/c/core/+/133581 is also 
called further down in the stack from there and was clearly showing up 
in the memory profile.


The app was working fine with the sample file in non-editing mode  for 
me with that hack in place in a quick test.

But it's well possible that there are more leaks elsewhere.


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

2022-04-29 Thread Noel Grandin (via logerrit)
 ucbhelper/source/client/proxydecider.cxx |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 183dd9deec869209c45378ff09f063cc9bf03e26
Author: Noel Grandin 
AuthorDate: Fri Apr 29 09:22:20 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 13:00:29 2022 +0200

Revert "use more string_view in ucbhelper"

This reverts commit d9c3f05dcb6c03633bbcc8d88e55237a0855d9a5.

This is likely a pessimisation since the
   OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
was previously likely mostly just copying the whole string in which case it 
would return the same object.

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

diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index cf10fda8baa3..10228b72aedc 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -157,7 +157,7 @@ public:
 virtual void SAL_CALL disposing( const lang::EventObject& Source ) 
override;
 
 private:
-void setNoProxyList( std::u16string_view rNoProxyList );
+void setNoProxyList( const OUString & rNoProxyList );
 };
 
 
@@ -809,28 +809,29 @@ void SAL_CALL InternetProxyDecider_Impl::disposing(const 
lang::EventObject&)
 }
 
 
-void InternetProxyDecider_Impl::setNoProxyList( std::u16string_view 
rNoProxyList )
+void InternetProxyDecider_Impl::setNoProxyList(
+const OUString & rNoProxyList )
 {
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
 m_aNoProxyList.clear();
 
-if ( rNoProxyList.empty() )
+if ( rNoProxyList.isEmpty() )
 return;
 
 // List of connection endpoints hostname[:port],
 // separated by semicolon. Wildcards allowed.
 
-size_t nPos = 0;
-size_t nEnd = rNoProxyList.find( ';' );
-size_t nLen = rNoProxyList.size();
+sal_Int32 nPos = 0;
+sal_Int32 nEnd = rNoProxyList.indexOf( ';' );
+sal_Int32 nLen = rNoProxyList.getLength();
 
 do
 {
-if ( nEnd == std::u16string_view::npos )
+if ( nEnd == -1 )
 nEnd = nLen;
 
-OUString aToken( rNoProxyList.substr( nPos, nEnd - nPos ) );
+OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
 
 if ( !aToken.isEmpty() )
 {
@@ -909,7 +910,7 @@ void InternetProxyDecider_Impl::setNoProxyList( 
std::u16string_view rNoProxyList
 if ( nEnd != nLen )
 {
 nPos = nEnd + 1;
-nEnd = rNoProxyList.find( ';', nPos );
+nEnd = rNoProxyList.indexOf( ';', nPos );
 }
 }
 while ( nEnd != nLen );


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - configure.ac

2022-04-29 Thread Stephan Bergmann (via logerrit)
 configure.ac |   28 +---
 1 file changed, 25 insertions(+), 3 deletions(-)

New commits:
commit 320b5de4f005ce317ab5873625be55c19f32b807
Author: Stephan Bergmann 
AuthorDate: Tue Apr 19 22:03:37 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 13:02:53 2022 +0200

Fix determining ZXING_CFLAGS for --with-system-zxing

While at least Linux distros typically provide the zxing include files in a
dedicated ZXing sub-directory (i.e., /usr/include/ZXing/), the bundled
external/zxing does not (it rather provides them in
workdir/UnpackedTarball/zxing/core/src/, cf. RepositoryExternal.mk).  
Therefore,
source files like cui/source/dialogs/QrCodeGenDialog.cxx

  #include 

etc. rather than

  #include 

etc., and for --with-system-zxing ad92c7dfa64c9e08aa2bcf612a9a4a68e9deae22 
"fix
system zxing build" simply hardcoded ZXING_CFLAGS=-I/usr/include/ZXing 
(i.e.,
the typical location for these include files).

However, for e.g. a Fedora Flatpak-from-RPM build of --with-system-zxing
LibreOffice, the include files will be in /app/include/ZXing/ rather than in
/usr/include/ZXing/.  (And which AC_CHECK_HEADER would find via
CPLUS_INCLUDE_PATH containing /app/include for such a build.  But the 
hardcoded
ZXING_CFLAGS then caused compiling e.g. 
cui/source/dialogs/QrCodeGenDialog.cxx
to fail because it didn't find BarcodeFormat.h etc. in the hardcoded
/usr/include/ZXing/.)

So when checking for the sample zxing include file (MultiFormatWriter.h), 
try
any $CPLUS_INCLUDE_PATH paths one by one (and with a fallback to 
/usr/include).
(The explicit unset ac_cv_header_MultiFormatWriter_h is needed so that the
second and later iterations of the for loop don't erroneously reuse a cached
"no" result.)

Change-Id: Id85f9960ffd3759c7960ef3a81982b85bc3c04c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133189
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 27c850b2ea3d004b380921de6664c50e6d54d4f5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133484
Reviewed-by: Michael Stahl 

diff --git a/configure.ac b/configure.ac
index dab4326616b0..0be3513046e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11131,10 +11131,32 @@ else
 if test "$with_system_zxing" = "yes"; then
 AC_MSG_RESULT([external])
 SYSTEM_ZXING=TRUE
+ZXING_CFLAGS=
 AC_LANG_PUSH([C++])
-AC_CHECK_HEADER(ZXing/MultiFormatWriter.h, [],
-[AC_MSG_ERROR(zxing headers not found.)], [#include ])
-ZXING_CFLAGS=-I/usr/include/ZXing
+save_CXXFLAGS=$CXXFLAGS
+save_IFS=$IFS
+IFS=$P_SEP
+for i in $CPLUS_INCLUDE_PATH /usr/include; do
+dnl Reset IFS as soon as possible, to avoid unexpected side 
effects (and the
+dnl "/usr/include" fallback makes sure we get here at least once; 
resetting rather than
+dnl unsetting follows the advice at 
 "Add 
recommendation on (not)
+dnl unsetting IFS."):
+IFS=$save_IFS
+dnl TODO: GCC and Clang treat empty paths in CPLUS_INCLUDE_PATH 
like ".", but we simply
+dnl ignore them here:
+if test -z "$i"; then
+continue
+fi
+dnl TODO: White space in $i would cause problems:
+CXXFLAGS="$save_CXXFLAGS -I$i/ZXing"
+AC_CHECK_HEADER(MultiFormatWriter.h, [ZXING_CFLAGS=-I$i/ZXing; 
break],
+[unset ac_cv_header_MultiFormatWriter_h], [#include 
])
+done
+CXXFLAGS=$save_CXXFLAGS
+if test -z "$ZXING_CFLAGS"; then
+AC_MSG_ERROR(zxing headers not found.)
+fi
 AC_CHECK_LIB([ZXing], [main], [ZXING_LIBS=-lZXing],
 [ AC_CHECK_LIB([ZXingCore], [main], [ZXING_LIBS=-lZXingCore],
 [ AC_MSG_ERROR(zxing C++ library not found.) ])], [])


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

2022-04-29 Thread Michael Stahl (via logerrit)
 sw/source/filter/ascii/ascatr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c0b638bad9f60289d44101fce89c252a26260b69
Author: Michael Stahl 
AuthorDate: Tue Apr 26 16:13:53 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 13:05:05 2022 +0200

sw: ascii filter: tweak copying of numbering

Add an env var to copy the numbering when selecting a whole paragraph.

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

diff --git a/sw/source/filter/ascii/ascatr.cxx 
b/sw/source/filter/ascii/ascatr.cxx
index 805f3ba48bc1..97e98784afc8 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -250,7 +250,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, 
SwContentNode& rNode )
 if( bLastNd )
 nEnd = rWrt.m_pCurrentPam->GetMark()->nContent.GetIndex();
 
-bool bIsOneParagraph = rWrt.m_pOrigPam->Start()->nNode == 
rWrt.m_pOrigPam->End()->nNode;
+bool bIsOneParagraph = rWrt.m_pOrigPam->Start()->nNode == 
rWrt.m_pOrigPam->End()->nNode && !getenv("SW_ASCII_COPY_NUMBERING");
 
 SwASC_AttrIter aAttrIter( static_cast(rWrt), rNd, nStrPos );
 SwASC_RedlineIter redlineIter(static_cast(rWrt), rNd);


[Libreoffice-commits] core.git: 2 commits - sal/qa xmlsecurity/source

2022-04-29 Thread Michael Stahl (via logerrit)
 sal/qa/osl/file/osl_File.cxx |   33 ---
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   21 +-
 2 files changed, 43 insertions(+), 11 deletions(-)

New commits:
commit e4184fa0b0b9b34872a0d1fbc6cca41170899a33
Author: Michael Stahl 
AuthorDate: Wed Apr 27 13:06:26 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 13:05:47 2022 +0200

xmlsecurity: fix init of temp NSS DB when running with uid 0

The problem is that in SecurityEnvironment_NssImpl::insertPrivateKey()
the PK11_ImportDERPrivateKeyInfoAndReturnKey() fails because
NSC_CreateObject() finds a slot->needLogin = 1.

This value is set during the first NSS_InitReadWrite() in
nsscrypto_initialize(), usually this fails, and the fallback path ends
up calling PK11_InitPin(), which sets slot->needLogin = 0, whereas
running with uid 0, the first call succeeds and PK11_InitPin() wasn't
called.

This causes test failures in CppunitTest_desktop_lib
testInsertCertificate_PEM_ODT.

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

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 75db8de5bcb5..80d4e108ac3e 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -405,15 +405,20 @@ bool 
nsscrypto_initialize(css::uno::Reference const
 }
 return false;
 }
-// Initialize and set empty password if needed
-PK11SlotInfo* pSlot = PK11_GetInternalKeySlot();
-if (pSlot)
-{
-if (PK11_NeedUserInit(pSlot))
-PK11_InitPin(pSlot, nullptr, nullptr);
-PK11_FreeSlot(pSlot);
-}
 }
+
+// Initialize and set empty password if needed
+// note: it's possible that the first NSS_InitReadWrite() succeeds by
+// creating a new DB; in this case it may also be necessary to call
+// PK11_InitPin()
+PK11SlotInfo* pSlot = PK11_GetInternalKeySlot();
+if (pSlot)
+{
+if (PK11_NeedUserInit(pSlot))
+PK11_InitPin(pSlot, nullptr, nullptr);
+PK11_FreeSlot(pSlot);
+}
+
 out_nss_init = true;
 
 #ifdef XMLSEC_CRYPTO_NSS
commit 38258c7e1d55f23b8a73e5f1ba53d9f9fce34832
Author: Michael Stahl 
AuthorDate: Tue Apr 26 16:57:42 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 13:05:27 2022 +0200

sal: tweak CppunitTest_sal_osl to run as uid 0

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

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 2eac7d1688af..718fb65423d1 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -1716,9 +1716,18 @@ namespace osl_FileStatus
 osl::FileBase::RC nError = rItem.getFileStatus(rFileStatus);
 CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError);
 
-CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getAttributes function: 
ReadOnly, GrpRead, OwnRead, OthRead(UNX version) ",
+if (geteuid() == 0) // as root, access(W_OK) may be true despite 
mode
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getAttributes function: 
(not ReadOnly,) GrpRead, OwnRead, OthRead(UNX version) ",
+
static_cast(osl_File_Attribute_GrpRead | osl_File_Attribute_OwnRead 
| osl_File_Attribute_OthRead),
+rFileStatus.getAttributes());
+}
+else
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getAttributes function: 
ReadOnly, GrpRead, OwnRead, OthRead(UNX version) ",
 
static_cast(osl_File_Attribute_ReadOnly | 
osl_File_Attribute_GrpRead | osl_File_Attribute_OwnRead | 
osl_File_Attribute_OthRead),
 rFileStatus.getAttributes());
+}
 }
 #else // Windows version
 void getAttributes_001()
@@ -1737,9 +1746,18 @@ namespace osl_FileStatus
 osl::FileBase::RC nError = rItem.getFileStatus(rFileStatus);
 CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError);
 
-CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getAttributes function: 
Executable, GrpExe, OwnExe, OthExe, the result is Readonly, Executable, GrpExe, 
OwnExe, OthExe, it partly not pass(Solaris version)",
+if (geteuid() == 0) // as root, access(W_OK) may be true despite 
mode
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getAttributes function: 
Executable, GrpExe, OwnExe, OthExe, the result is (not Readonly,) Executable, 
GrpExe, OwnExe, OthExe, it partly not pass(S

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

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

New commits:
commit c9e758e3961b71c83a781da4cb12e454f09b094e
Author: Michael Stahl 
AuthorDate: Thu Apr 28 12:39:23 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 13:06:11 2022 +0200

xmlsecurity: fix testInsertCertificate_PEM_ODT with "dbm:" NSS DB

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

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

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


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

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

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

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

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

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


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

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

New commits:
commit 5592ee094ca9f09bfcc16537d931518d4e6b2231
Author: Michael Stahl 
AuthorDate: Thu Apr 28 16:31:51 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 13:06:31 2022 +0200

svl: fix testSignDocument_PEM_PDF with "dbm:" NSS DB

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

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

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

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

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

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


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

2022-04-29 Thread Michael Weghorn (via logerrit)
 solenv/Module_solenv.mk   |2 --
 solenv/gbuild/extensions/post_GbuildToJson.mk |4 
 2 files changed, 6 deletions(-)

New commits:
commit 779c01a9e1eb3ed176d57e1e04073e25aca34a64
Author: Michael Weghorn 
AuthorDate: Fri Apr 29 10:56:55 2022 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 29 13:07:28 2022 +0200

gbuild: Drop obsolete checks for make version 3.81

make 3.81 is no more suppoprted, see

commit 4688e74bcf0c58ab1bbf60e9c19331d25ebfe95b
Date:   Fri Apr 8 11:22:27 2022 +0200

configure: require GNU make 3.82

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

diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index 6b9f7d0f1a8c..89e40c6d43c0 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_Module_add_targets,solenv,\
 endif
 
 ifneq ($(DISABLE_PYTHON),TRUE)
-ifneq ($(MAKE_VERSION),3.81) # gbuildtojson requires 3.82+
 ifneq ($(OS),WNT) # disable on Windows for now, causes gerrit/jenkins failures
 ifneq ($(OS),MACOSX) # disable on macOS too, fails at least for me and would 
be pointless anyway surely
 $(eval $(call gb_Module_add_subsequentcheck_targets,solenv,\
@@ -39,7 +38,6 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,solenv,\
 endif
 endif
 endif
-endif
 
 ifneq ($(COMPILER_PLUGINS),)
 ifeq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
diff --git a/solenv/gbuild/extensions/post_GbuildToJson.mk 
b/solenv/gbuild/extensions/post_GbuildToJson.mk
index 52c61b722ee6..f1707a488f43 100644
--- a/solenv/gbuild/extensions/post_GbuildToJson.mk
+++ b/solenv/gbuild/extensions/post_GbuildToJson.mk
@@ -24,10 +24,6 @@
 
 ifneq ($(filter gbuildtojson,$(MAKECMDGOALS)),)
 
-ifeq ($(MAKE_VERSION),3.81)
-$(error make version 3.81 not supported for gbuildtojson; install newer make 
via LODE)
-endif
-
 # possibly recurse to ensure gbuildtojson was build before running the modded 
make
 gb_GbuildToJson_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile 
Executable_gbuildtojson)
 gb_FULLDEPS:=


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

2022-04-29 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/fakebool.cxx |   57 +
 cppu/qa/test_any.cxx   |   20 
 cppu/source/uno/check.cxx  |5 +++
 3 files changed, 33 insertions(+), 49 deletions(-)

New commits:
commit 5b6bc8182bc1586facca5c3a019c9985e0d7b411
Author: Stephan Bergmann 
AuthorDate: Fri Apr 29 11:08:37 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 29 13:09:40 2022 +0200

Use the false warning suppression mechanism for loplugin:fakebool

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

diff --git a/compilerplugins/clang/fakebool.cxx 
b/compilerplugins/clang/fakebool.cxx
index 3d5120153d0b..80efa55bd432 100644
--- a/compilerplugins/clang/fakebool.cxx
+++ b/compilerplugins/clang/fakebool.cxx
@@ -213,8 +213,6 @@ public:
 
 bool VisitValueDecl(ValueDecl const * decl);
 
-bool TraverseStaticAssertDecl(StaticAssertDecl * decl);
-
 bool TraverseLinkageSpecDecl(LinkageSpecDecl * decl);
 
 private:
@@ -222,8 +220,6 @@ private:
 
 bool isSharedCAndCppCode(SourceLocation location) const;
 
-bool isInSpecialMainFile(SourceLocation spellingLocation) const;
-
 bool rewrite(SourceLocation location, FakeBoolKind kind);
 
 std::map varDecls_;
@@ -270,7 +266,7 @@ void FakeBool::run() {
 }
 }
 }
-if (!rewrite(loc, fbk)) {
+if (!(suppressWarningAt(loc) || rewrite(loc, fbk))) {
 report(
 DiagnosticsEngine::Warning,
 "VarDecl, use \"bool\" instead of %0", loc)
@@ -312,7 +308,7 @@ void FakeBool::run() {
 }
 }
 }
-if (!rewrite(loc, fbk)) {
+if (!(suppressWarningAt(loc) || rewrite(loc, fbk))) {
 report(
 DiagnosticsEngine::Warning,
 "FieldDecl, use \"bool\" instead of %0", loc)
@@ -561,6 +557,9 @@ bool FakeBool::VisitCStyleCastExpr(CStyleCastExpr * expr) {
 // arguments to CPPUNIT_ASSERT_EQUAL:
 return true;
 }
+if (suppressWarningAt(callLoc)) {
+return true;
+}
 bool b = k == FBK_sal_Bool && name == "sal_True";
 if (rewriter != nullptr) {
 auto callSpellLoc = compiler.getSourceManager()
@@ -603,14 +602,10 @@ bool FakeBool::VisitCXXStaticCastExpr(CXXStaticCastExpr * 
expr) {
 if (ignoreLocation(expr)) {
 return true;
 }
-auto const k = isFakeBool(expr->getType());
-if (k == FBK_No) {
+if (isFakeBool(expr->getType()) == FBK_No) {
 return true;
 }
-if (k == FBK_sal_Bool
-&& isInSpecialMainFile(
-compiler.getSourceManager().getSpellingLoc(expr->getBeginLoc(
-{
+if (suppressWarningAt(expr->getBeginLoc())) {
 return true;
 }
 report(
@@ -777,14 +772,7 @@ bool FakeBool::VisitVarDecl(VarDecl const * decl) {
 if (k == FBK_No) {
 return true;
 }
-auto const loc = decl->getBeginLoc();
-if (k == FBK_sal_Bool
-&& isInSpecialMainFile(
-compiler.getSourceManager().getSpellingLoc(loc)))
-{
-return true;
-}
-auto l = loc;
+auto l = decl->getBeginLoc();
 while (compiler.getSourceManager().isMacroArgExpansion(l)) {
 l = compiler.getSourceManager().getImmediateMacroCallerLoc(l);
 }
@@ -815,12 +803,6 @@ bool FakeBool::VisitFieldDecl(FieldDecl const * decl) {
 if (!handler.isAllRelevantCodeDefined(decl)) {
 return true;
 }
-if (k == FBK_sal_Bool
-&& isInSpecialMainFile(
-compiler.getSourceManager().getSpellingLoc(decl->getBeginLoc(
-{
-return true;
-}
 TagDecl const * td = dyn_cast(decl->getDeclContext());
 if (td == nullptr) {
 //TODO: ObjCInterface
@@ -877,19 +859,6 @@ bool FakeBool::VisitValueDecl(ValueDecl const * decl) {
 return true;
 }
 
-bool FakeBool::TraverseStaticAssertDecl(StaticAssertDecl * decl) {
-// Ignore special code like
-//
-//   static_cast(true) == sal_True
-//
-// inside static_assert in cppu/source/uno/check.cxx:
-return
-loplugin::isSamePathname(
-getFilenameOfLocation(decl->getLocation()),
-SRCDIR "/cppu/source/uno/check.cxx")
-|| RecursiveASTVisitor::TraverseStaticAssertDecl(decl);
-}
-
 bool FakeBool::TraverseLinkageSpecDecl(LinkageSpecDecl * decl) {
 assert(externCContexts_ != std::numeric_limits::max()); 
//TODO
 ++externCContexts_;
@@ -917,16 +886,6 @@ bool FakeBool::isSharedCAndCppCode(SourceLocation 
location) const {
 || compiler.getSourceManager().isMacroBodyExpansion(location));
 }
 
-bool FakeBool::isInSpe

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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/tdf116501.odt |binary
 1 file changed

New commits:
commit e188b24e1c4211557209d857638ee425d107d0c8
Author: Caolán McNamara 
AuthorDate: Thu Apr 28 21:25:37 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 13:30:43 2022 +0200

Segoe UI->DejaVu Sans for repeatable writer layout tests

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

diff --git a/sw/qa/extras/layout/data/tdf116501.odt 
b/sw/qa/extras/layout/data/tdf116501.odt
index 7d38b8be53c2..9e9d03f61f56 100644
Binary files a/sw/qa/extras/layout/data/tdf116501.odt and 
b/sw/qa/extras/layout/data/tdf116501.odt differ


[Libreoffice-commits] core.git: test/user-template

2022-04-29 Thread Caolán McNamara (via logerrit)
 test/user-template/registry/modifications.xcd |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 60f073c1851ffbbef80acee794ee590c61b7664d
Author: Caolán McNamara 
AuthorDate: Fri Apr 29 09:55:12 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 13:58:16 2022 +0200

set a CTL_SPREADSHEET font from more_fonts for cppunit tests

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

diff --git a/test/user-template/registry/modifications.xcd 
b/test/user-template/registry/modifications.xcd
index dfb8aed6e74f..5754d21062b3 100644
--- a/test/user-template/registry/modifications.xcd
+++ b/test/user-template/registry/modifications.xcd
@@ -11,10 +11,10 @@
  http://openoffice.org/2004/installation"; 
oor:name="VCL" oor:package="org.openoffice">
   

-   
+
  DejaVu Sans
 
-   
+
  DejaVu Sans
 

@@ -36,6 +36,9 @@
 
  DejaVu Sans
 
+
+ DejaVu Sans
+
 
  DejaVu Sans
 
@@ -44,6 +47,9 @@
 
  DejaVu Sans
 
+
+ DejaVu Sans
+
 
  DejaVu Sans
 


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

2022-04-29 Thread Noel Grandin (via logerrit)
 svx/source/xml/xmlxtimp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d606b6bb3e03467fb66a19f0acb85e46b0d4ff41
Author: Noel Grandin 
AuthorDate: Fri Apr 29 12:32:23 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 15:29:48 2022 +0200

fix regression in linked bitmap import

from
commit 0527778df5f1ace8731043d070cf54b7b8648545
Author: Noel Grandin 
Date:   Fri Aug 21 13:19:36 2020 +0200
use fastparser for fill styles

spotted dodgy code while doing other work

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

diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index e79ec19daea8..9fd5481d5c8b 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -114,7 +114,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler >
 if( aIter.first == XML_ELEMENT(XLINK, XML_HREF) &&
 SvxXMLTableImportContextEnum::Bitmap == meContext )
 {
-OString rValue = aIter.second;
+OString& rValue = aIter.second;
 if( !rValue.isEmpty() && '#' == rValue[0] )
 rValue = rValue.copy( 1 );
 }


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 vcl/qa/cppunit/mnemonic.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3a4a12b3801b0b88d119c6e7aaca1e183f7e470f
Author: Caolán McNamara 
AuthorDate: Fri Apr 29 10:48:54 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 15:48:37 2022 +0200

add a cppunit test for EraseAllMnemonicChars

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

diff --git a/vcl/qa/cppunit/mnemonic.cxx b/vcl/qa/cppunit/mnemonic.cxx
index ed4c8a86f61e..5a2131da2e3b 100644
--- a/vcl/qa/cppunit/mnemonic.cxx
+++ b/vcl/qa/cppunit/mnemonic.cxx
@@ -49,6 +49,8 @@ void VclMnemonicTest::testMnemonic()
 static constexpr OUStringLiteral TEST = u"\u4E00";
 OUString sResult = aGenerator.CreateMnemonic(TEST);
 CPPUNIT_ASSERT_EQUAL(OUString("(~C)"), 
sResult.copy(sResult.getLength() - 4));
+sResult = MnemonicGenerator::EraseAllMnemonicChars(sResult);
+CPPUNIT_ASSERT_EQUAL(OUString(TEST), sResult);
 }
 }
 


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

2022-04-29 Thread Xisco Fauli (via logerrit)
 sw/source/core/text/porrst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c8b9fa98f4c5f7f5620e797dbbe24081e252548
Author: Xisco Fauli 
AuthorDate: Thu Apr 28 15:38:56 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Apr 29 16:45:15 2022 +0200

sw: avoid EXCEPTION_INT_DIVIDE_BY_ZERO

Seen in

https://crashreport.libreoffice.org/stats/signature/SwBookmarkPortion::DoPaint(SwTextPaintInfo%20const%20&,rtl::OUString%20&,SwFont%20&,int%20&)

Introduced by 4ce8120f1e53f7b81e653b01d141643013bc69ab
"tdf#45589 sw: create and paint text portions for bookmarks"

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

diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 2a61f67f76c2..498d1006108a 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -644,7 +644,7 @@ bool SwBookmarkPortion::DoPaint(SwTextPaintInfo const& 
rTextPaintInfo,
 Size aSize(rFont.GetSize(rFont.GetActual()));
 // use also the external leading (line gap) of the portion, but don't use
 // 100% of it because i can't figure out how to baseline align that
-auto const nFactor = (Height() * 95) / aSize.Height();
+auto const nFactor = aSize.Height() > 0 ? (Height() * 95) / aSize.Height() 
: Height();
 rFont.SetProportion(nFactor);
 rFont.SetWeight(WEIGHT_THIN, rFont.GetActual());
 rFont.SetColor(SwViewOption::GetFieldShadingsColor());


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

2022-04-29 Thread Mike Kaganski (via logerrit)
 comphelper/source/misc/syntaxhighlight.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7cc3d290779796b54f5b6fb1a4a32066f177d323
Author: Mike Kaganski 
AuthorDate: Fri Apr 29 12:29:25 2022 +0100
Commit: Mike Kaganski 
CommitDate: Fri Apr 29 16:45:45 2022 +0200

Check iterator before dereference

... since commit b1148c31ed2786396f0b018a988fce8288f1797d
  Author Noel Grandin 
  Date   Wed Apr 27 16:47:53 2022 +0200
use more string_view in comphelper

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

diff --git a/comphelper/source/misc/syntaxhighlight.cxx 
b/comphelper/source/misc/syntaxhighlight.cxx
index 304e9e6b271f..de25fd158965 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -487,7 +487,7 @@ bool 
SyntaxHighlighter::Tokenizer::getNextToken(std::u16string_view::const_itera
 }
 
 // Object separator? Must be handled before Number
-else if( c == '.' && ( *pos < '0' || *pos > '9' ) )
+else if( c == '.' && ( pos == end || *pos < '0' || *pos > '9' ) )
 {
 reType = TokenType::Operator;
 }


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

2022-04-29 Thread Noel Grandin (via logerrit)
 xmloff/inc/xmlversion.hxx  |2 +-
 xmloff/source/chart/SchXMLTools.cxx|   28 ++--
 xmloff/source/core/namespacemap.cxx|5 +++--
 xmloff/source/draw/sdxmlexp.cxx|2 +-
 xmloff/source/draw/ximpbody.cxx|2 +-
 xmloff/source/draw/ximpcustomshape.cxx |2 +-
 xmloff/source/forms/elementimport.cxx  |   13 ++---
 xmloff/source/meta/xmlversion.cxx  |   24 
 xmloff/source/style/xmlbahdl.cxx   |2 +-
 9 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit dc3d56e5cf49a23b3c3fd08590fa497b72e6ff20
Author: Noel Grandin 
AuthorDate: Fri Apr 29 10:41:50 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 17:21:50 2022 +0200

use more string_view in xmloff

found by examining uses of OUString::copy() for likely places

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

diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index 284e998c5bf1..5039fc7d7cce 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -85,7 +85,7 @@ class XMLVersionContext final : public SvXMLImportContext
 {
 private:
 static bool ParseISODateTimeString(
-const OUString& rString,
+std::u16string_view rString,
 css::util::DateTime& rDateTime );
 
 public:
diff --git a/xmloff/source/chart/SchXMLTools.cxx 
b/xmloff/source/chart/SchXMLTools.cxx
index 2e90a3e37f5e..b6bfaab104aa 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -295,30 +295,30 @@ XMLTokenEnum getTokenByChartType(
 // if postfix matches and leaves a non-empty type
 if( nTypeLength > 0 && rChartTypeService.match( aPostfix, nSkip + 
nTypeLength ))
 {
-OUString aServiceName( rChartTypeService.copy( nSkip, nTypeLength 
));
+std::u16string_view aServiceName( rChartTypeService.subView( 
nSkip, nTypeLength ));
 
-if ( aServiceName == "Line" )
+if ( aServiceName == u"Line" )
 eResult = XML_LINE;
-else if ( aServiceName == "Area" )
+else if ( aServiceName == u"Area" )
 eResult = XML_AREA;
-else if( aServiceName == "Bar" ||
- (!bUseOldNames && aServiceName == "Column"))
+else if( aServiceName == u"Bar" ||
+ (!bUseOldNames && aServiceName == u"Column"))
 eResult = XML_BAR;
-else if ( aServiceName == "Pie" )
+else if ( aServiceName == u"Pie" )
 eResult = XML_CIRCLE;
-else if ( aServiceName == "Donut" )
+else if ( aServiceName == u"Donut" )
 eResult = XML_RING;
-else if( (bUseOldNames && aServiceName == "XY") ||
- (!bUseOldNames && aServiceName == "Scatter"))
+else if( (bUseOldNames && aServiceName == u"XY") ||
+ (!bUseOldNames && aServiceName == u"Scatter"))
 eResult = XML_SCATTER;
-else if ( aServiceName == "Bubble" )
+else if ( aServiceName == u"Bubble" )
 eResult = XML_BUBBLE;
-else if ( aServiceName == "Net" )
+else if ( aServiceName == u"Net" )
 eResult = XML_RADAR;
-else if ( aServiceName == "FilledNet" )
+else if ( aServiceName == u"FilledNet" )
 eResult = XML_FILLED_RADAR;
-else if( (bUseOldNames && aServiceName == "Stock") ||
- (!bUseOldNames && aServiceName == "CandleStick"))
+else if( (bUseOldNames && aServiceName == u"Stock") ||
+ (!bUseOldNames && aServiceName == u"CandleStick"))
 eResult = XML_STOCK;
 }
 }
diff --git a/xmloff/source/core/namespacemap.cxx 
b/xmloff/source/core/namespacemap.cxx
index 4d5ec0d503da..e6e2a68a84c9 100644
--- a/xmloff/source/core/namespacemap.cxx
+++ b/xmloff/source/core/namespacemap.cxx
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 
 
 using namespace ::xmloff::token;
@@ -517,9 +518,9 @@ bool SvXMLNamespaceMap::NormalizeOasisURN( OUString& rName )
 
 // :urn:oasis:names:tc:[^:]:xmlns.*
 nPos = nTCIdEnd + 1;
-OUString sTmp( rName.copy( nPos ) );
+std::u16string_view sTmp( rName.subView( nPos ) );
 const OUString& rXMLNS = GetXMLToken( XML_XMLNS );
-if( !sTmp.startsWith( rXMLNS ) )
+if( !o3tl::starts_with(sTmp, rXMLNS ) )
 return false;
 
 // :urn:oasis:names:tc:[^:]:xmlns:.*
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index b789f7342d90..3cb6034193b0 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1693,7 +16

Re: SalAbort:Unspecified application error

2022-04-29 Thread Michael Weghorn



On 29/04/2022 12.54, Michael Weghorn wrote:

    Is that file confidential or can it be shared publicly (attached to a
    Bugzilla ticket)? (I can't read most of the text in it. :-))


 The file is not confidential and can be shared publicly (haha,The 
text in it is chiness)


Great, thanks.


I've now created a Bugzilla ticket for the initial issue that I could 
reproduce and have a pending fix for that in Gerrit:

https://bugs.documentfoundation.org/show_bug.cgi?id=148851
https://gerrit.libreoffice.org/c/core/+/133581

With that in place, I didn't see any more crashes or unexpected memory 
usage increase when testing more with your sample doc and experimental 
mode *disabled*.


I can still reproduce a crash due to running out of memory with 
experimental mode *enabled*, though.


I have created a separate ticket in Bugzilla for that one and added some 
more information, also mentioning a potential workaround:

https://bugs.documentfoundation.org/show_bug.cgi?id=148854

I suggest to continue discussion about that particular issue in Bugzilla 
(e.g. I'd be interested whether your crash also disappears when you do 
that change locally).



 My compile machine only has 4GB RAM so that i must restrict the symbols but even so the 
memory is also not enough(because of that link error "clang++ error:unable to 
execute command Killed")


4 GB are actually not much. I have no further ideas what you could 
do/try to do a build with debug symbols in that setup, other than having 
lots of swap, which will probably be very slow.


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/tdf124601b.doc |binary
 1 file changed

New commits:
commit 9550760e7fff134a1a84e21f88f6d48f0db19a75
Author: Caolán McNamara 
AuthorDate: Fri Apr 29 10:06:25 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 18:11:41 2022 +0200

binary patch fontname from Open Sans to Carlito for repeatable layout test

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

diff --git a/sw/qa/extras/layout/data/tdf124601b.doc 
b/sw/qa/extras/layout/data/tdf124601b.doc
index 4428a7daf7b3..a580e81d3d7e 100644
Binary files a/sw/qa/extras/layout/data/tdf124601b.doc and 
b/sw/qa/extras/layout/data/tdf124601b.doc differ


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

2022-04-29 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/tdf138465min.docx |binary
 1 file changed

New commits:
commit c16128bba6da5f2c51e970631c6cccf3b561ff7c
Author: Caolán McNamara 
AuthorDate: Fri Apr 29 12:52:38 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 29 18:12:45 2022 +0200

use "Rubik" from more_fonts instead of "System" for consistent layout

using Rubik with trailing 0 because need to overwrite the binary
fontname in the embedded wmf in this docx

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

diff --git a/sw/qa/extras/layout/data/tdf138465min.docx 
b/sw/qa/extras/layout/data/tdf138465min.docx
index d576a54f281f..7136d27b35c3 100644
Binary files a/sw/qa/extras/layout/data/tdf138465min.docx and 
b/sw/qa/extras/layout/data/tdf138465min.docx differ


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

2022-04-29 Thread Laurent BP (via logerrit)
 sc/qa/uitest/calc_tests6/moveCopySheet.py |   17 +
 sc/source/ui/inc/mvtabdlg.hxx |1 +
 sc/source/ui/miscdlgs/mvtabdlg.cxx|   11 +++
 3 files changed, 29 insertions(+)

New commits:
commit 170cdf5e335f8803b6d851a9d16020d277e73288
Author: Laurent BP 
AuthorDate: Mon Apr 25 09:30:38 2022 +0200
Commit: Andreas Heinisch 
CommitDate: Fri Apr 29 19:04:10 2022 +0200

tdf#139464 Change label of OK button

In Move/copy sheet UI, change label
according to selected action
 update: with UI test

Change-Id: I8244b1635f56574c7641191be7e15ee4a098dce9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133364
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sc/qa/uitest/calc_tests6/moveCopySheet.py 
b/sc/qa/uitest/calc_tests6/moveCopySheet.py
index 9436364dd053..41019b371a83 100644
--- a/sc/qa/uitest/calc_tests6/moveCopySheet.py
+++ b/sc/qa/uitest/calc_tests6/moveCopySheet.py
@@ -65,5 +65,22 @@ class moveCopySheet(UITestCase):
 self.assertEqual(document.Sheets[1].Name, "Sheet1")
 self.assertEqual(document.Sheets[2].Name, "moveName")
 
+#tdf#139464 Set OK button label to selected action: Move or Copy
+def test_tdf139464_move_sheet(self):
+with self.ui_test.create_doc_in_start_center("calc") as document:
+with self.ui_test.execute_dialog_through_command(".uno:Move") as 
xDialog:
+xOkButton = xDialog.getChild("ok")
+xCopyButton = xDialog.getChild("copy")
+self.assertEqual(get_state_as_dict(xCopyButton)['Text'], 
get_state_as_dict(xOkButton)['Text'])
+with self.ui_test.execute_dialog_through_command(".uno:Move") as 
xDialog:
+xOkButton = xDialog.getChild("ok")
+xCopyButton = xDialog.getChild("copy")
+xMoveButton = xDialog.getChild("move")
+self.assertEqual(get_state_as_dict(xMoveButton)['Text'], 
get_state_as_dict(xOkButton)['Text'])
+xCopyButton.executeAction("CLICK", tuple())
+self.assertEqual(get_state_as_dict(xCopyButton)['Text'], 
get_state_as_dict(xOkButton)['Text'])
+xMoveButton.executeAction("CLICK", tuple())
+self.assertEqual(get_state_as_dict(xMoveButton)['Text'], 
get_state_as_dict(xOkButton)['Text'])
+
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 2f11fd3868b4..9d121a928fa6 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -37,6 +37,7 @@ public:
 voidGetTabNameString( OUString& rString ) const;
 voidSetForceCopyTable   ();
 voidEnableRenameTable   (bool bFlag);
+voidSetOkBtnLabel   ();
 
 private:
 void ResetRenameInput();
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx 
b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 6ec7712f87ea..80eeaeadecfa 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -74,6 +74,7 @@ void ScMoveTableDlg::SetForceCopyTable()
 m_xBtnCopy->set_active(true);
 m_xBtnMove->set_sensitive(false);
 m_xBtnCopy->set_sensitive(false);
+SetOkBtnLabel();
 }
 
 void ScMoveTableDlg::EnableRenameTable(bool bFlag)
@@ -185,6 +186,7 @@ void ScMoveTableDlg::Init()
 m_xBtnOk->connect_clicked(LINK(this, ScMoveTableDlg, OkHdl));
 m_xLbDoc->connect_changed(LINK(this, ScMoveTableDlg, SelHdl));
 m_xBtnCopy->connect_toggled(LINK(this, ScMoveTableDlg, CheckBtnHdl));
+m_xBtnMove->connect_toggled(LINK(this, ScMoveTableDlg, CheckBtnHdl));
 m_xEdTabName->connect_changed(LINK(this, ScMoveTableDlg, CheckNameHdl));
 m_xBtnMove->set_active(true);
 m_xBtnCopy->set_active(false);
@@ -197,6 +199,7 @@ void ScMoveTableDlg::Init()
 m_xFtDoc->hide();
 m_xLbDoc->hide();
 }
+SetOkBtnLabel();
 }
 
 void ScMoveTableDlg::InitDocListBox()
@@ -236,12 +239,20 @@ void ScMoveTableDlg::InitDocListBox()
 m_xLbDoc->set_active(nSelPos);
 }
 
+void ScMoveTableDlg::SetOkBtnLabel()
+{
+// tdf#139464 Write "Copy" or "Move" on OK button
+m_xBtnOk->set_label(m_xBtnCopy->get_active() ? m_xBtnCopy->get_label()
+ : m_xBtnMove->get_label());
+}
+
 // Handler:
 
 IMPL_LINK(ScMoveTableDlg, CheckBtnHdl, weld::Toggleable&, rBtn, void)
 {
 if (&rBtn == m_xBtnCopy.get())
 ResetRenameInput();
+SetOkBtnLabel();
 }
 
 IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl, weld::Button&, void)


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

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

New commits:
commit 55b9b3c9d4a71de1f4e4c79bfce2766d3ef73e28
Author: Michael Stahl 
AuthorDate: Fri Apr 29 11:58:51 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 20:23:02 2022 +0200

unotest: fix NSS initialization for CentOS7 system NSS

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

This causes:


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

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

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

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

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


[Libreoffice-commits] core.git: bin/check-elf-dynamic-objects configure.ac m4/libo_externals.m4

2022-04-29 Thread Michael Stahl (via logerrit)
 bin/check-elf-dynamic-objects |2 +-
 configure.ac  |2 +-
 m4/libo_externals.m4  |   17 ++---
 3 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 0028266e34a683b1650410cee65dac502e304c9f
Author: Michael Stahl 
AuthorDate: Thu Aug 12 13:04:54 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 29 20:24:58 2022 +0200

configure: default to --with-system-nss on Linux

NSS is very ABI compatible and part of current LSB 5.0 and so it should
just work to use the one from the system, i'm not aware of a Linux that
doesn't ship it.

There used to be some feature patch in external/nss but this was removed
years ago, now it just contains build fixes.

Problems can occur if a mixture of system and bundled NSS libraries is
loaded, if first an old version .so is loaded and then newer version .so
depends on it but can't find some required symbol.

See for example:

https://www.mail-archive.com/libreoffice@lists.freedesktop.org/msg287043.html

Another issue is that e.g. Fedora ships libnsspem.so in the nss-pem
package, which may cause trouble in ASAN builds, where the internal NSS
is built to call __asan_poison_memory_region but the system
libnss-pem.so doesn't call __asan_unpoison_memory_region so we get:

  ==2568944==ERROR: AddressSanitizer: use-after-poison on address 
0x61d0019afab0
  WRITE of size 192 at 0x61d0019afab0 thread T28 (utl::Moderator)
0 in __interceptor_memset.part.0 (instdir/program/soffice.bin+0x466460)
1  (/lib64/libnsspem.so+0x15f3d)
2  (/lib64/libnsspem.so+0x16185)
3  (/lib64/libnsspem.so+0x8a9b)
4  (/lib64/libnsspem.so+0xe13b)
5 in secmod_ModuleInit 
workdir/UnpackedTarball/nss/nss/lib/pk11wrap/pk11load.c:244:11
..
21 in curl_easy_perform workdir/UnpackedTarball/curl/lib/easy.c:715:10

Also, with system NSS, things like p11-kit integration become
responsibility of the OS.

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

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 7d4011597f8f..133f58d34dda 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -88,7 +88,7 @@ programfiles=$(echo ${files} | grep -o '/program/[^/]* ' | 
xargs -n 1 basename)
 # of maintaining ABI stability
 # allow extending the allowlist using the environment variable to be able to 
work
 # on the installer stuff without the need for a baseline setup
-globalallowlist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 libm.so.6 
libdl.so.2 libpthread.so.0 librt.so.1 libutil.so.1 libnsl.so.1 libcrypt.so.1 
libgcc_s.so.1 libstdc++.so.6 libz.so.1 libfontconfig.so.1 libfreetype.so.6 
libxml2.so.2 libxslt.so.1 libexslt.so.0 ${LO_ELFCHECK_ALLOWLIST-}"
+globalallowlist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 libm.so.6 
libdl.so.2 libpthread.so.0 librt.so.1 libutil.so.1 libnsl.so.1 libcrypt.so.1 
libgcc_s.so.1 libstdc++.so.6 libz.so.1 libfontconfig.so.1 libfreetype.so.6 
libxml2.so.2 libxslt.so.1 libexslt.so.0 libnspr4.so libnss3.so libnssutil3.so 
libplc4.so libplds4.so libsmime3.so libssl3.so ${LO_ELFCHECK_ALLOWLIST-}"
 x11allowlist="libX11.so.6 libX11-xcb.so.1 libXext.so.6 libSM.so.6 libICE.so.6 
libXinerama.so.1 libXrender.so.1 libXrandr.so.2 libcairo.so.2"
 openglallowlist="libGL.so.1"
 gobjectallowlist="libgobject-2.0.so.0 libglib-2.0.so.0"
diff --git a/configure.ac b/configure.ac
index b40d16003d44..cdef1a6507e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10591,7 +10591,7 @@ dnl 
===
 dnl Check for system NSS
 dnl ===
 if test "$enable_fuzzers" != "yes" -a "$enable_nss" = "yes"; then
-libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
+libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 
4.8],,system-if-linux)
 AC_DEFINE(HAVE_FEATURE_NSS)
 ENABLE_NSS=TRUE
 elif test $_os != iOS ; then
diff --git a/m4/libo_externals.m4 b/m4/libo_externals.m4
index 07df27f874ca..7f2b04305c47 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -10,11 +10,11 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: 
nil; fill-column: 102 -*
 # <$2 uppercase variable part - used for configure.ac and make variables>
 # <$3 pkg-config query string>
 # [$4 if optional, default to: enabled, disabled or fixed (default: fixed)]
-# [$5 which is preferred: (fixed-|test-)system or (fixed-)internal (default: 
internal)]
+# [$5 which is preferred: (fixed-|test-)system or (fixed-)internal or 
system-if-linux (default: internal)]
 # [$6 ignore $with_system_libs: TRUE or blank (default: blank/false)]
 #
 # $4 fixed: fixed-enabled, as fixed-disabled makes no sen

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

2022-04-29 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_text.mk  |1 
 sw/qa/core/text/text.cxx|   44 +++-
 sw/source/core/text/frmform.cxx |   18 
 3 files changed, 62 insertions(+), 1 deletion(-)

New commits:
commit 515bf5d4afa3a8ed413fd6f17f66fa98b6dbf29e
Author: Miklos Vajna 
AuthorDate: Fri Apr 29 12:10:13 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 29 20:59:50 2022 +0200

tdf#148683 sw: fix crash on deleting text with redlining enabled, but hidden

Regression from commit 32902f66e7749b2d06d13f50416be5323a0c0ea9
(sw_redlinehide: make layout based Show/Hide mode the default,
2018-11-30), deleting some text in the middle of the paragraph with the
bugdoc results in an assertion failure in the SwDrawTextInfo ctor.

Normally this doesn't happen on text deletion as we already have a
mechanism for truncating no longer needed lines in
SwTextFrame::Format_(), though that only checks the length of the
current line.

Fix the problem by extending this mechanism to also check the remaining
lines: if change tracking is on and the total of all line lengths is
more than the string length of the text frame, then time to
re-calculate.

It seems this is not needed in practice when redlining is disabled,
though we might want to enable this for the non-redline case as well in
the future.

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

diff --git a/sw/CppunitTest_sw_core_text.mk b/sw/CppunitTest_sw_core_text.mk
index 19d8cd422edc..c3025f007a9a 100644
--- a/sw/CppunitTest_sw_core_text.mk
+++ b/sw/CppunitTest_sw_core_text.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_text, \
 comphelper \
 cppu \
 cppuhelper \
+editeng \
 sal \
 sfx \
 svl \
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index f847df9c5e56..f6c4023af944 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -24,13 +24,14 @@
 #include 
 #include 
 #include 
-
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/text/data/";
 
@@ -428,6 +429,47 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testAsCharImageDocModelFromViewPoint)
 CPPUNIT_ASSERT_EQUAL(aGraphicNode, pShellCursor->GetMark()->nNode);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRedlineDelete)
+{
+// Given a document with A4 paper size, some text, redlining on, but 
hidden:
+SwDoc* pDoc = createSwDoc();
+SwDocShell* pDocShell = pDoc->GetDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+{
+// Set page size to A4.
+size_t nCurIdx = pWrtShell->GetCurPageDesc();
+SwPageDesc aPageDesc(pWrtShell->GetPageDesc(nCurIdx));
+SwFrameFormat& rMaster = aPageDesc.GetMaster();
+SwFormatFrameSize aSize(SwFrameSize::Fixed);
+aSize.SetSize(Size(11906, 16838));
+rMaster.SetFormatAttr(aSize);
+pWrtShell->ChgPageDesc(nCurIdx, aPageDesc);
+}
+OUString aBefore("a aa aa aa aa ");
+OUString aDelete("delete eee ee eee ee ee");
+pWrtShell->Insert(aBefore + " " + aDelete
+  + " zz zzz z zzz   z zz zzz 
zzz zzz");
+// Enable redlining.
+pDocShell->SetChangeRecording(/*bActivate=*/true);
+// Hide redlining.
+pWrtShell->StartAllAction();
+pWrtShell->GetLayout()->SetHideRedlines(true);
+pWrtShell->EndAllAction();
+
+// When deleting content in the middle of the paragraph:
+pWrtShell->SttEndDoc(/*bStt=*/true);
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 
/*nCount=*/aBefore.getLength(),
+ /*bBasicCall=*/false);
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 
/*nCount=*/aDelete.getLength(),
+ /*bBasicCall=*/false);
+// Without the accompanying fix in place, this test would have crashed:
+pWrtShell->Delete();
+
+// Then make sure that the redline is created:
+CPPUNIT_ASSERT_EQUAL(static_cast(1),
+ 
pDoc->getIDocumentRedlineAccess().GetRedlineTable().size());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 861d143dc96a..e2bff47bd305 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1620,8 +1620,26 @@ void SwTextFrame::Format_( SwTextFormatter &rLine, 
SwTextFormatInfo &rInf,
 // If we're finished formatting the text and we still
 // have other line objects left, these are superfluous
 // now because the text has gotten shorter.
+bool bTruncLines = false;
 if( rLine

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

2022-04-29 Thread Michael Weghorn (via logerrit)
 i18npool/inc/xdictionary.hxx  |6 
 i18npool/source/breakiterator/xdictionary.cxx |   34 --
 2 files changed, 28 insertions(+), 12 deletions(-)

New commits:
commit d4370761421508522a29c5206aea6e538d71b342
Author: Michael Weghorn 
AuthorDate: Fri Apr 29 15:23:41 2022 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 29 21:10:25 2022 +0200

tdf#148851 Unmap + close file again in xdictionary dtor

The file opened and mapped to memory in
the `xdictionary` ctor was never unmapped
and closed again, resulting in a memory leak.

For Android Viewer, this resulted in the app
running out of memory after a while when
scrolling up and down in the Chinese sample
doc from tdf#148851.

On Android, closing the file is actually the relevant part,
because the content of files from `/assets` is automatically
loaded into memory when the files are opened (s. the call to
`openMemoryAsFile` in `openFilePath` in `sal/osl/unx/file.cxx`)
and that memory is only freed when the file is closed
again (s. `osl_closeFile`).

When using the sample doc, the file in question
was "file:///assets/share/dict_zh.data", which
has a size of 2.2 MB and is therefore actually
loaded into memory anew every time, since only
files below 50 KiB are handled by the file cache
introduced in

commit 26a46c1143e34e361d76d6459535c2056c59de77
Date:   Fri Dec 20 14:46:36 2019 +

android: file-cache to improve performance.

Fix the memory leak by unmapping and closing
the file again in the dtor.

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

diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index cc7364bd14fc..f0861408bbd6 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -18,6 +18,7 @@
  */
 #pragma once
 
+#include 
 #include 
 
 #include 
@@ -63,6 +64,11 @@ private:
 
 css::i18n::Boundary boundary;
 bool japaneseWordBreak;
+#ifdef DICT_JA_ZH_IN_DATAFILE
+oslFileHandle m_aFileHandle;
+sal_uInt64 m_nFileSize;
+char* m_pMapping;
+#endif
 
 public:
 xdictionary(const char *lang);
diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index dd1f83f8baa7..6c326f69e48f 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -62,6 +62,11 @@ sal_Unicode* getDataArea_zh();
 
 xdictionary::xdictionary(const char *lang) :
 japaneseWordBreak( false )
+#ifdef DICT_JA_ZH_IN_DATAFILE
+, m_aFileHandle(nullptr),
+m_nFileSize(-1),
+m_pMapping(nullptr)
+#endif
 {
 
 #ifdef DICT_JA_ZH_IN_DATAFILE
@@ -76,21 +81,18 @@ xdictionary::xdictionary(const char *lang) :
 else if( strcmp( lang, "zh" ) == 0 )
 sUrl += "zh.data";
 
-oslFileHandle aFileHandle;
-sal_uInt64 nFileSize;
-char *pMapping;
-if( osl_openFile( sUrl.pData, &aFileHandle, osl_File_OpenFlag_Read ) 
== osl_File_E_None &&
-osl_getFileSize( aFileHandle, &nFileSize) == osl_File_E_None &&
-osl_mapFile( aFileHandle, (void **) &pMapping, nFileSize, 0, 
osl_File_MapFlag_RandomAccess ) == osl_File_E_None )
+if( osl_openFile( sUrl.pData, &m_aFileHandle, osl_File_OpenFlag_Read ) 
== osl_File_E_None &&
+osl_getFileSize( m_aFileHandle, &m_nFileSize) == osl_File_E_None &&
+osl_mapFile( m_aFileHandle, (void **) &m_pMapping, m_nFileSize, 0, 
osl_File_MapFlag_RandomAccess ) == osl_File_E_None )
 {
 // We have the offsets to the parts of the file at its end, see 
gendict.cxx
-sal_Int64 *pEOF = (sal_Int64*)(pMapping + nFileSize);
+sal_Int64 *pEOF = (sal_Int64*)(m_pMapping + m_nFileSize);
 
-data.existMark = (sal_uInt8*) (pMapping + pEOF[-1]);
-data.index2 = (sal_Int32*) (pMapping + pEOF[-2]);
-data.index1 = (sal_Int16*) (pMapping + pEOF[-3]);
-data.lenArray = (sal_Int32*) (pMapping + pEOF[-4]);
-data.dataArea = (sal_Unicode*) (pMapping + pEOF[-5]);
+data.existMark = (sal_uInt8*) (m_pMapping + pEOF[-1]);
+data.index2 = (sal_Int32*) (m_pMapping + pEOF[-2]);
+data.index1 = (sal_Int16*) (m_pMapping + pEOF[-3]);
+data.lenArray = (sal_Int32*) (m_pMapping + pEOF[-4]);
+data.dataArea = (sal_Unicode*) (m_pMapping + pEOF[-5]);
 }
 }
 
@@ -131,6 +133,14 @@ xdictionary::~xdictionary()
 delete [] i.wordboundary;
 }
 }
+#ifdef DICT_JA_ZH_IN_DATAFILE
+if (m_aFileHandle) {
+if (m_pMapping) {
+osl_unmapMappedFile(m_aFileHandle, m_pMapping, m_nFileSize);
+}
+osl_closeFile(m_aFileHan

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

2022-04-29 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/inc/content.hxx   |2 +-
 sw/source/uibase/inc/swcont.hxx|4 ++--
 sw/source/uibase/utlui/content.cxx |   29 ++---
 3 files changed, 21 insertions(+), 14 deletions(-)

New commits:
commit c81f4a4ecbfa7dc97d8c28b5ec5f00d1d561b6bb
Author: Jim Raykowski 
AuthorDate: Sun Apr 24 12:07:35 2022 -0800
Commit: Jim Raykowski 
CommitDate: Fri Apr 29 22:43:38 2022 +0200

tdf#143569 SwNavigator: Make Headings entries from headings in frames

be in document layout order, not alphabetical order

Change-Id: I75328311a7ddbda1eb050135709da20fed5d054a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133359
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 2d6ac1a7d925..0acc45197e76 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -46,7 +46,7 @@ class SwOutlineContent final : public SwContent
 SwOutlineNodes::size_type nArrPos,
 sal_uInt8 nLevel,
 bool bMove,
-tools::Long nYPos) :
+double nYPos) :
 SwContent(pCnt, rName, nYPos),
 m_nOutlinePos(nArrPos), m_nOutlineLevel(nLevel), 
m_bIsMoveable(bMove) {}
 
diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx
index a965b0fadbc6..77b9d5656030 100644
--- a/sw/source/uibase/inc/swcont.hxx
+++ b/sw/source/uibase/inc/swcont.hxx
@@ -75,13 +75,13 @@ class SwContent : public SwTypeNumber
 {
 const SwContentType*m_pParent;
 OUStringm_sContentName;
-tools::Longm_nYPosition;
+double m_nYPosition;
 // some subclasses appear to use this for a tools/gen.hxx-style
 // geometric Y position, while e.g. SwOutlineContent wants to store
 // the index in its subtree
 boolm_bInvisible;
 public:
-SwContent(const SwContentType* pCnt, const OUString& rName, 
tools::Long nYPos );
+SwContent(const SwContentType* pCnt, const OUString& rName, double 
nYPos);
 
 virtual boolIsProtect() const;
 const SwContentType*GetParent() const {return m_pParent;}
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index e9d4468d1df7..3cb1fd4aede2 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -183,7 +183,7 @@ namespace
 
 // Content, contains names and reference at the content type.
 
-SwContent::SwContent(const SwContentType* pCnt, const OUString& rName, 
tools::Long nYPos) :
+SwContent::SwContent(const SwContentType* pCnt, const OUString& rName, double 
nYPos) :
 SwTypeNumber(CTYPE_CNT),
 m_pParent(pCnt),
 m_sContentName(rName),
@@ -424,23 +424,30 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 {
 case ContentTypeId::OUTLINE   :
 {
-const size_t nOutlineCount =
-
m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount();
+const SwNodeOffset nEndOfExtrasIndex = 
m_pWrtShell->GetNodes().GetEndOfExtras().GetIndex();
+// provide for up to 9 outline nodes in frames to be sorted in 
document layout order
+double nOutlinesInFramesIndexAdjustment = 0.1;
+const SwOutlineNodes& 
rOutlineNodes(m_pWrtShell->GetNodes().GetOutLineNds());
+const size_t nOutlineCount = rOutlineNodes.size();
 
 for (size_t i = 0; i < nOutlineCount; ++i)
 {
-const sal_uInt8 nLevel = 
m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineLevel(i);
-if (nLevel >= m_nOutlineLevel || 
!m_pWrtShell->getIDocumentOutlineNodesAccess()->
-isOutlineInLayout(i, *m_pWrtShell->GetLayout()))
+SwTextNode* pNode = rOutlineNodes[i]->GetTextNode();
+const sal_uInt8 nLevel = pNode->GetAttrOutlineLevel() - 1;
+if (nLevel >= m_nOutlineLevel || 
!pNode->getLayoutFrame(m_pWrtShell->GetLayout()))
 continue;
-tools::Long nYPos = m_bAlphabeticSort ? 0 : getYPos(
-
*m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNode(i));
+double nYPos = m_bAlphabeticSort ? 0 : 
static_cast(getYPos(*pNode));
+if (nEndOfExtrasIndex >= pNode->GetIndex() && 
pNode->GetFlyFormat())
+{
+nYPos += nOutlinesInFramesIndexAdjustment;
+nOutlinesInFramesIndexAdjustment += 0.1;
+}
 OUString aEntry(comphelper::string::stripStart(
-
m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineText(
-i, m_pWrtShell->GetLayout(), true, 
false, fal

Re: Standalone Excel to csv conversion?

2022-04-29 Thread sa212+lo

Thanks for the responses - if I can reply to everyone at once:

Joao - thanks, rows looks good, but I'm trying to move away from Python 
- I currently only need it for Excel handling


Kohei - yes, pretty much what I was expecting, thanks. Unfortunately, I 
do need xls, for at least another year or so. The C libs I've looked 
(briefly) at are:


xlnt (https://github.com/tfussell/xlnt) - looks good, but doesn't handle 
xls, and it's not obvious that it can yet export csv files


OpenXLSX (https://github.com/troldal/OpenXLSX) - doesn't seem as mature 
as xlnt; again, xlsx only, not obvious that it can export csv


Michael - good idea, at least in the short term. Both LibreOffice and 
ssconvert (gnumeric) can handle my test spreadsheets and generate csv 
output. I'm sticking with ssconvert at the moment, as I suspect that a 
gnumeric headless install is (much?) less resource intensive than a 
LibreOffice install and then running it headless (I need to run headless 
on a server). I've covered this on SO at 
https://serverfault.com/a/1099802/221197.


There are also other potential solutions - there are at least 3 program 
called xlsx2csv, for example. All 3 are minimally documented and 
probably don't work. I've tried the Python version, but can't persuade 
it to produce anything other than floating-point output for times.




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

2022-04-29 Thread Seth Chaiklin (via logerrit)
 source/text/shared/02/0610.xhp |   10 +++---
 source/text/shared/02/0611.xhp |   10 +++---
 2 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit b218d6ebe0f497748414b3a7fd173cff363b76ae
Author: Seth Chaiklin 
AuthorDate: Sat Apr 30 00:58:33 2022 +0100
Commit: Seth Chaiklin 
CommitDate: Sat Apr 30 03:03:45 2022 +0200

refactor some switchinlines to avoid translation problems

   shared/02/0610.xhp  (Move Up)
   shared/02/0611.xhp  (Move Down)

Change-Id: Ib67c383db0ee8690a9fcedb4850455319e34f7b8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133603
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/source/text/shared/02/0610.xhp 
b/source/text/shared/02/0610.xhp
index 9232fd1de..ec2ad6835 100644
--- a/source/text/shared/02/0610.xhp
+++ b/source/text/shared/02/0610.xhp
@@ -31,19 +31,23 @@
 
 
 
-Move Item 
Up
+Move Item 
UpMove Up
 Moves the paragraph where the cursor is located, or selected 
paragraphs, to before the previous paragraph.
 
-If you have 
numbered paragraphs and use the Move Item 
Up command, then 
the numbers are adjusted automatically to the current order. 
 
 
+If you have 
numbered paragraphs and use the Move Item Up command, then 
the numbers are adjusted automatically to the current order.
 The Move Item 
Up icon appears on the Bullets and Numbering 
bar.
 The 
Move Item Up command is always active. This function can 
also be called by pressing CommandCtrl+Alt+Up
 Arrow.
 
 
+ If you 
have numbered paragraphs and use the Move Up command, then 
the numbers are adjusted automatically to the current order.
 The Move 
Up icon appears on the Outline bar.
 The Move 
Up command is always active. This function can also be called by 
pressing Alt+Shift+Up Arrow.
 
+
+If you have 
numbered paragraphs and use Move Down, then the numbers 
are adjusted automatically to the current order.
+
 
 No shortcut keys or toolbars for CALC and DRAW
 
@@ -55,7 +59,7 @@
   Icon Move Up
 
 
-  Move 
Item Up
+  Move 
Item UpMove 
Up
 
   
 
diff --git a/source/text/shared/02/0611.xhp 
b/source/text/shared/02/0611.xhp
index 533c841c6..3d99053de 100644
--- a/source/text/shared/02/0611.xhp
+++ b/source/text/shared/02/0611.xhp
@@ -31,19 +31,23 @@
 
 
 
-Move 
Item Down
+Move Item 
DownMove 
Down
 Moves the paragraph where the cursor is located, or selected 
paragraphs, to after the next paragraph.
 
-If you have 
numbered paragraphs and use Move 
Item 
Down, then the numbers are adjusted automatically to the 
current order.
 
 
+If you have 
numbered paragraphs and use Move Item Down, then the 
numbers are adjusted automatically to the current order.
 The Move Item 
Down icon appears on the Bullets and Numbering 
bar.
 The 
Move Item Down command is always active. This function can 
also be called by pressing CommandCtrl+Alt+Down
 Arrow.
 
 
+If you 
have numbered paragraphs and use Move Down, then the 
numbers are adjusted automatically to the current order.
 The Move 
Down icon appears on the Outline 
bar.
 The Move 
Down command is always active. This function can also be called by 
pressing Alt+Shift+Down Arrow.
 
+
+If you have 
numbered paragraphs and use Move Down, then the numbers 
are adjusted automatically to the current order.
+
 
 No shortcut keys or toolbars for CALC and DRAW.
 
@@ -55,7 +59,7 @@
   Icon Move Down
 
 
-  Move 
Item Down
+  Move 
Item DownMove 
Down
 
   
 


[Libreoffice-commits] core.git: helpcontent2

2022-04-29 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bd950c4bfd2753589bb4b4b89aab6b05eaa1e346
Author: Seth Chaiklin 
AuthorDate: Sat Apr 30 02:03:52 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Sat Apr 30 03:03:52 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to b218d6ebe0f497748414b3a7fd173cff363b76ae
  - refactor some switchinlines to avoid translation problems

   shared/02/0610.xhp  (Move Up)
   shared/02/0611.xhp  (Move Down)

Change-Id: Ib67c383db0ee8690a9fcedb4850455319e34f7b8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133603
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/helpcontent2 b/helpcontent2
index d7890e971698..b218d6ebe0f4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d7890e97169844d9a2f46703b893c1123dd8ebce
+Subproject commit b218d6ebe0f497748414b3a7fd173cff363b76ae


Re: SalAbort:Unspecified application error

2022-04-29 Thread di liu
>
> Does "more times" here mean that it takes longer now than previously
> until the problem shows up? Or is it pretty much unchanged for you?
>
> Is that with experimental mode enabled or disabled in the app settings?
>

I am so sorry,I made a mistake (I made some local changes but did not
restore the code completely which interferes the test result.)
After my initial test(on the same devices) the crash disappeared.
I will continue to test this issue on different devices and scenarios to
make sure it be fixed completely

Yes, that's most likely.
> The one from https://gerrit.libreoffice.org/c/core/+/133581 is also
> called further down in the stack from there and was clearly showing up
> in the memory profile.
>
> The app was working fine with the sample file in non-editing mode  for
> me with that hack in place in a quick test.
> But it's well possible that there are more leaks elsewhere.
>


 Yeah,thank you so much for all you do.

Michael Weghorn  于2022年4月29日周五 18:54写道:

> > Is that file confidential or can it be shared publicly (attached to a
> > Bugzilla ticket)? (I can't read most of the text in it. :-))
> >
> >
> >  The file is not confidential and can be shared publicly (haha,The text
> in it is chiness)
>
> Great, thanks.
>
>
> On 29/04/2022 12.07, di liu wrote:
> > Ok, I will make a try (recompile the source code will spend me
> > hours... )
> >
> >
> > Unfortunately it's also crash with same error when i swipe up and down
> > more times.
>
> Does "more times" here mean that it takes longer now than previously
> until the problem shows up? Or is it pretty much unchanged for you?
>
> Is that with experimental mode enabled or disabled in the app settings?
>
> > I suppose the memory leak maybe exit in this method
> > "desktop/source/lib/init.cxx -> doc_paintTile".Because every time i
> > swipe the screen the java code will call this method to paint tile where
> > crash was happened
>
> Yes, that's most likely.
> The one from https://gerrit.libreoffice.org/c/core/+/133581 is also
> called further down in the stack from there and was clearly showing up
> in the memory profile.
>
> The app was working fine with the sample file in non-editing mode  for
> me with that hack in place in a quick test.
> But it's well possible that there are more leaks elsewhere.
>


Re: SalAbort:Unspecified application error

2022-04-29 Thread di liu
>
> I have created a separate ticket in Bugzilla for that one and added some
> more information, also mentioning a potential workaround:
> https://bugs.documentfoundation.org/show_bug.cgi?id=148854
>
> I suggest to continue discussion about that particular issue in Bugzilla
> (e.g. I'd be interested whether your crash also disappears when you do
> that change locally).
>

Ok,I will post the follow-up questions here

Michael Weghorn  于2022年4月29日周五 23:39写道:

>
> On 29/04/2022 12.54, Michael Weghorn wrote:
> >> Is that file confidential or can it be shared publicly (attached to
> a
> >> Bugzilla ticket)? (I can't read most of the text in it. :-))
> >>
> >>
> >>  The file is not confidential and can be shared publicly (haha,The
> >> text in it is chiness)
> >
> > Great, thanks.
>
> I've now created a Bugzilla ticket for the initial issue that I could
> reproduce and have a pending fix for that in Gerrit:
> https://bugs.documentfoundation.org/show_bug.cgi?id=148851
> https://gerrit.libreoffice.org/c/core/+/133581
>
> With that in place, I didn't see any more crashes or unexpected memory
> usage increase when testing more with your sample doc and experimental
> mode *disabled*.
>
> I can still reproduce a crash due to running out of memory with
> experimental mode *enabled*, though.
>
> I have created a separate ticket in Bugzilla for that one and added some
> more information, also mentioning a potential workaround:
> https://bugs.documentfoundation.org/show_bug.cgi?id=148854
>
> I suggest to continue discussion about that particular issue in Bugzilla
> (e.g. I'd be interested whether your crash also disappears when you do
> that change locally).
>
> >  My compile machine only has 4GB RAM so that i must restrict the symbols
> but even so the memory is also not enough(because of that link error
> "clang++ error:unable to execute command Killed")
>
> 4 GB are actually not much. I have no further ideas what you could
> do/try to do a build with debug symbols in that setup, other than having
> lots of swap, which will probably be very slow.
>


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

2022-04-29 Thread Michael Weghorn (via logerrit)
 android/source/AndroidManifest.xml|2 +-
 android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +-
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 965205931162b7fcdc175672354103b40985c6ed
Author: Michael Weghorn 
AuthorDate: Fri Apr 29 21:55:54 2022 +0200
Commit: Michael Weghorn 
CommitDate: Sat Apr 30 07:10:35 2022 +0200

tdf#111427 android: Enable support for .ppsx

Opening the sample file of MIME type
"application/vnd.openxmlformats-officedocument.presentationml.slideshow"
attached to tdf#111427 worked fine now when testing in an x86_64 AVD
with API level 31, so declare support for it.

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

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 0af368c8460b..c50ad77ae71d 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -70,7 +70,7 @@
 
 
 
-
+
 
 
 
diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java 
b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index 72da47b8cc3a..4675ca1d0709 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -74,7 +74,7 @@ public class FileUtilities {
 // OOXML
 mExtnMap.put(".docx", DOC);
 mExtnMap.put(".pptx", IMPRESS);
-// mExtnMap.put(".ppsx", IMPRESS);
+mExtnMap.put(".ppsx", IMPRESS);
 mExtnMap.put(".xlsx", CALC);
 
 // OOXML templates
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 965639e6e2ba..e7b38b4cac86 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -103,6 +103,7 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 "application/x-mspublisher",
 
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
 
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
 
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
 
"application/vnd.openxmlformats-officedocument.wordprocessingml.template",
 
"application/vnd.openxmlformats-officedocument.spreadsheetml.template",


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

2022-04-29 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c50afd45d2f6a7c70bb3a7591747b162a2675311
Author: Michael Weghorn 
AuthorDate: Fri Apr 29 22:01:07 2022 +0200
Commit: Michael Weghorn 
CommitDate: Sat Apr 30 07:11:04 2022 +0200

android: Show Impress icon for .pps files

For some reason, that was commented out.
Opening such a PowerPoint file worked just
fine, and with this commit in place, the
Impress icon is shown in the "Recent Files"
view as well.

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

diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java 
b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index 4675ca1d0709..52b92534947f 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -63,7 +63,7 @@ public class FileUtilities {
 mExtnMap.put(".vsdx", DRAWING);
 mExtnMap.put(".pub", DRAWING);
 mExtnMap.put(".ppt",  IMPRESS);
-// mExtnMap.put(".pps",  IMPRESS);
+mExtnMap.put(".pps",  IMPRESS);
 mExtnMap.put(".xls",  CALC);
 
 // MS templates


Re: SalAbort:Unspecified application error

2022-04-29 Thread Michael Weghorn

On 30/04/2022 06.14, di liu wrote:
I am so sorry,I made a mistake (I made some local changes but did not 
restore the code completely which interferes the test result.)

After my initial test(on the same devices) the crash disappeared.
I will continue to test this issue on different devices and scenarios to 
make sure it be fixed completely


Great, thanks for the update.


  Yeah,thank you so much for all you do.


Thank you for your valuable input. :-)


OpenPGP_signature
Description: OpenPGP digital signature


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

2022-04-29 Thread Noel Grandin (via logerrit)
 svx/source/xml/xmlxtimp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b0abe43fd623e4f0e378c841c9de9e73fdd01fd6
Author: Noel Grandin 
AuthorDate: Fri Apr 29 12:32:23 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 30 08:55:43 2022 +0200

fix regression in linked bitmap import

from
commit 0527778df5f1ace8731043d070cf54b7b8648545
Author: Noel Grandin 
Date:   Fri Aug 21 13:19:36 2020 +0200
use fastparser for fill styles

spotted dodgy code while doing other work

Change-Id: I339e8fbdb9df4d5f17ded76de199a3282f7c2d6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133621
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit d606b6bb3e03467fb66a19f0acb85e46b0d4ff41)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133598

diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index 9bf7b6996b43..f1a4a0989c84 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -114,7 +114,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler >
 if( aIter.first == XML_ELEMENT(XLINK, XML_HREF) &&
 SvxXMLTableImportContextEnum::Bitmap == meContext )
 {
-OString rValue = aIter.second;
+OString& rValue = aIter.second;
 if( !rValue.isEmpty() && '#' == rValue[0] )
 rValue = rValue.copy( 1 );
 }