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

2022-09-26 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf |   14 
+
 writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx   |   25 
++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx|4 -
 3 files changed, 41 insertions(+), 2 deletions(-)

New commits:
commit a974bccd06ac6c7081256d32d2372ea05b253fbb
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 08:14:21 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 26 09:05:50 2022 +0200

tdf#150762 RTF import: fix missing left margin on numbered paragraph

The bugdoc has a numbered paragraph with a custom left margin, but this
left margin is missing in Writer.

This went wrong in commit 61b7034824dead1635f9e9c6ec996297e10f6910
(tdf#104016 RTF import: deduplicate before text indent from numbering,
2017-12-05), and now it's broken because the numbering properties are
applied before paragraph properties in the DOCX case, but the RTF
tokenizer didn't do this ordering.

This behavior of sw core somewhat makes sense, users expect the margins
from direct formatting to go away if you apply a new numbering. So fix
the problem by tweaking the RTF tokenizer to emit the numbering tokens
first and only then the paragraph tokens, which is an order that's
closer to the working DOCX tokenizer.

This only affects the old (WW6-style) paragraph numbering markup, not
the newer (WW8-style) numbering markup.

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

diff --git 
a/writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf
new file mode 100644
index ..99825370e3b4
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf
@@ -0,0 +1,14 @@
+{\rtf1\ansi
+\margt1497\margb590\margl590\margr590\pgwsxn11906\pghsxn16838
+\pard\plain First\par
+\pard\plain
+{\*\pn \pnlvlbody
+{\pntxtb \'78}
+}
+{\b\f7\fs22 Second\par}
+\pard\plain\li1191
+{\*\pn \pnlvlbody
+{\pntxtb \'78}
+}
+{\f7\fs22 Third, with left indent\par}
+}
diff --git a/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx
index 6020453ba783..f33f0f0e58be 100644
--- a/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -119,6 +120,30 @@ CPPUNIT_TEST_FIXTURE(Test, testDuplicatedImage)
 // i.e. there was a 3rd, duplicated image.
 CPPUNIT_ASSERT_EQUAL(static_cast(2), xDrawPage->getCount());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testOldParaNumLeftMargin)
+{
+// Given a document with 3 paragraphs, the third one with a left indent:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"old-para-num-left-margin.rtf";
+
+// When importing that document:
+getComponent() = loadFromDesktop(aURL);
+
+// Then make sure that the third paragraph has a left indent:
+uno::Reference xTextDocument(getComponent(), 
uno::UNO_QUERY);
+uno::Reference 
xText(xTextDocument->getText(), uno::UNO_QUERY);
+uno::Reference xParagraphs = 
xText->createEnumeration();
+xParagraphs->nextElement();
+xParagraphs->nextElement();
+uno::Reference xParagraph(xParagraphs->nextElement(), 
uno::UNO_QUERY);
+sal_Int32 nParaLeftMargin{};
+xParagraph->getPropertyValue("ParaLeftMargin") >>= nParaLeftMargin;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 2101
+// - Actual  : 0
+// i.e. the left indent was 0, not 1191 twips (from the file) in mm100.
+CPPUNIT_ASSERT_EQUAL(static_cast(2101), nParaLeftMargin);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index ad96a449befb..3df44f0124c9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3383,9 +3383,9 @@ void RTFDocumentImpl::afterPopState(RTFParserState& 
rState)
 
 // Use it
 putNestedSprm(m_aStates.top().getParagraphSprms(), 
NS_ooxml::LN_CT_PPrBase_numPr,
-  NS_ooxml::LN_CT_NumPr_ilvl, pIlvlValue);
+  NS_ooxml::LN_CT_NumPr_ilvl, pIlvlValue, 
RTFOverwrite::YES_PREPEND);
 putNestedSprm(m_aStates.top().getParagraphSprms(), 
NS_ooxml::LN_CT_PPrBase_numPr,
-  NS_ooxml::LN_CT_NumPr_numId, pIdValue);
+  NS_ooxml::LN_CT_NumPr_numId, pIdValue, 
RTFOverwrite::YES_PREPEND);
 }
 }
 break;


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

2022-09-26 Thread Miklos Vajna (via logerrit)
 sw/source/ui/dialog/uiregionsw.cxx |4 +-
 sw/source/ui/envelp/labfmt.cxx |   34 +++
 sw/source/ui/envelp/labfmt.hxx |4 +-
 sw/source/ui/table/instable.cxx|   42 ++---
 sw/source/ui/utlui/swrenamexnameddlg.cxx   |   16 +--
 sw/source/uibase/inc/instable.hxx  |8 ++---
 sw/source/uibase/inc/regionsw.hxx  |2 -
 sw/source/uibase/inc/swrenamexnameddlg.hxx |   12 
 8 files changed, 61 insertions(+), 61 deletions(-)

New commits:
commit f7c88bacd214394fff3826b6ab759285f3411f56
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 08:13:09 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 26 09:10:05 2022 +0200

sw: prefix members of SwInsTableDlg, SwRenameXNamedDlg, SwSaveLabelDlg ...

... and SwSectionPropertyTabDialog

See tdf#94879 for motivation.

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

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index c71f64383de4..4e775594745b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1998,7 +1998,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
 weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh)
 : SfxTabDialogController(pParent, 
"modules/swriter/ui/formatsectiondialog.ui",
  "FormatSectionDialog", &rSet)
-, rWrtSh(rSh)
+, m_rWrtSh(rSh)
 {
 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 AddTabPage("columns",   SwColumnPage::Create, nullptr);
@@ -2035,7 +2035,7 @@ void SwSectionPropertyTabDialog::PageCreated(const 
OString& rId, SfxTabPage &rPa
 static_cast(rPage).SetInSection(true);
 }
 else if (rId == "indents")
-static_cast(rPage).SetWrtShell(rWrtSh);
+static_cast(rPage).SetWrtShell(m_rWrtSh);
 }
 
 SwSectionIndentTabPage::SwSectionIndentTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet &rAttrSet)
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 7b7b0b33a90f..3f723ca2285d 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -516,9 +516,9 @@ IMPL_LINK_NOARG(SwLabFormatPage, SaveHdl, weld::Button&, 
void)
 
 SwSaveLabelDlg::SwSaveLabelDlg(SwLabDlg* pParent, SwLabRec& rRec)
 : GenericDialogController(pParent->getDialog(), 
"modules/swriter/ui/savelabeldialog.ui", "SaveLabelDialog")
-, bSuccess(false)
+, m_bSuccess(false)
 , m_pLabDialog(pParent)
-, rLabRec(rRec)
+, m_rLabRec(rRec)
 , m_xMakeCB(m_xBuilder->weld_combo_box("brand"))
 , m_xTypeED(m_xBuilder->weld_entry("type"))
 , m_xOKPB(m_xBuilder->weld_button("ok"))
@@ -565,9 +565,9 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl, weld::Button&, void)
 if (RET_YES != xQuery->run())
 return;
 }
-rLabRec.m_aType = sType;
-rCfg.SaveLabel(sMake, sType, rLabRec);
-bSuccess = true;
+m_rLabRec.m_aType = sType;
+rCfg.SaveLabel(sMake, sType, m_rLabRec);
+m_bSuccess = true;
 m_xDialog->response(RET_OK);
 }
 
@@ -588,22 +588,22 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, ModifyEntryHdl, 
weld::Entry&, void)
 
 bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
 {
-if(bSuccess)
+if(m_bSuccess)
 {
 rItem.m_aMake = m_xMakeCB->get_active_text();
 rItem.m_aType = m_xTypeED->get_text();
-rItem.m_lHDist  = rLabRec.m_nHDist;
-rItem.m_lVDist  = rLabRec.m_nVDist;
-rItem.m_lWidth  = rLabRec.m_nWidth;
-rItem.m_lHeight = rLabRec.m_nHeight;
-rItem.m_lLeft   = rLabRec.m_nLeft;
-rItem.m_lUpper  = rLabRec.m_nUpper;
-rItem.m_nCols   = rLabRec.m_nCols;
-rItem.m_nRows   = rLabRec.m_nRows;
-rItem.m_lPWidth  = rLabRec.m_nPWidth;
-rItem.m_lPHeight = rLabRec.m_nPHeight;
+rItem.m_lHDist  = m_rLabRec.m_nHDist;
+rItem.m_lVDist  = m_rLabRec.m_nVDist;
+rItem.m_lWidth  = m_rLabRec.m_nWidth;
+rItem.m_lHeight = m_rLabRec.m_nHeight;
+rItem.m_lLeft   = m_rLabRec.m_nLeft;
+rItem.m_lUpper  = m_rLabRec.m_nUpper;
+rItem.m_nCols   = m_rLabRec.m_nCols;
+rItem.m_nRows   = m_rLabRec.m_nRows;
+rItem.m_lPWidth  = m_rLabRec.m_nPWidth;
+rItem.m_lPHeight = m_rLabRec.m_nPHeight;
 }
-return bSuccess;
+return m_bSuccess;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 032917948640..b6a7f491505a 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -112,9 +112,9 @@ public:
 
 class SwSaveLabelDlg : public weld::GenericDialogController
 {
-bool bSuccess;
+bool m_bSuccess;
 SwLabDlg* m_pLabDia

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

2022-09-26 Thread Bjoern Michaelsen (via logerrit)
 include/svl/hint.hxx   |1 
 sw/inc/hintids.hxx |2 -
 sw/inc/hints.hxx   |6 
 sw/source/core/docnode/section.cxx |   47 -
 4 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit b89a5eef6daa23c27265f7451ec617dfedd2ce67
Author: Bjoern Michaelsen 
AuthorDate: Sun Sep 25 13:15:03 2022 +0200
Commit: Bjoern Michaelsen 
CommitDate: Mon Sep 26 09:30:22 2022 +0200

introduce sw::SectionHidden as plain SfxHint

Change-Id: I7412c16d0ffd4cf38a1b4186f81703443cdf6fbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140576
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 22f0bb8eb7e2..e0807ca89cae 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -143,6 +143,7 @@ enum class SfxHintId {
 SwInsertText,
 SwDeleteText,
 SwDeleteChar,
+SwSectionHidden,
 
 ThisIsAnSdrHint
 };
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 497635f71f5b..22dba273ec1b 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -428,8 +428,6 @@ constexpr TypedWhichId 
RES_TABLEFML_UPDATE(170);
 constexpr TypedWhichId RES_UPDATEDDETBL(171);
 constexpr TypedWhichId RES_TBLHEADLINECHG(172);
 constexpr TypedWhichId RES_AUTOFMT_DOCNODE(173);
-constexpr TypedWhichId RES_SECTION_HIDDEN(174);
-constexpr TypedWhichId RES_SECTION_NOT_HIDDEN(175);
 constexpr TypedWhichId RES_GRAPHIC_PIECE_ARRIVED(177);
 constexpr TypedWhichId RES_HIDDENPARA_PRINT(178);
 constexpr TypedWhichId RES_VIRTPAGENUM_INFO(180);
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 777825ae4969..1148af5c1598 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -200,6 +200,12 @@ public:
 const OUString m_sNew;
 NameChanged(const OUString& rOld, const OUString& rNew) : 
SfxHint(SfxHintId::NameChanged), m_sOld(rOld), m_sNew(rNew) {};
 };
+class SectionHidden final: public SfxHint
+{
+public:
+const bool m_isHidden;
+SectionHidden(const bool isHidden = true) : 
SfxHint(SfxHintId::SwSectionHidden), m_isHidden(isHidden) {};
+};
 }
 
 class SwUpdateAttr final : public SwMsgPoolItem
diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index a2f7d37ef581..975f72a9d607 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -289,8 +289,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, 
bool const bCondition)
 // This should be shown by the bHiddenFlag.
 
 // Tell all Children that they are hidden
-const SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN );
-pFormat->CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, 
&aMsgItem));
+const sw::SectionHidden aHint;
+pFormat->CallSwClientNotify(aHint);
 
 // Delete all Frames
 pFormat->DelFrames();
@@ -304,8 +304,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, 
bool const bCondition)
 if( !pParentSect || !pParentSect->IsHiddenFlag() )
 {
 // Tell all Children that the Parent is not hidden anymore
-const SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN );
-pFormat->CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, 
&aMsgItem));
+const sw::SectionHidden aHint(false);
+pFormat->CallSwClientNotify(aHint);
 
 pFormat->MakeFrames();
 }
@@ -393,7 +393,12 @@ void SwSection::SwClientNotify(const SwModify&, const 
SfxHint& rHint)
 
 void SwSection::Notify(SfxHint const& rHint)
 {
-if (rHint.GetId() != SfxHintId::SwLegacyModify)
+if (rHint.GetId() == SfxHintId::SwSectionHidden)
+{
+auto rSectionHidden = static_cast(rHint);
+m_Data.SetHiddenFlag(rSectionHidden.m_isHidden || (m_Data.IsHidden() 
&& m_Data.IsCondHidden()));
+return;
+} else if (rHint.GetId() != SfxHintId::SwLegacyModify)
 return;
 auto pLegacy = static_cast(&rHint);
 auto pOld = pLegacy->m_pOld;
@@ -457,14 +462,6 @@ void SwSection::Notify(SfxHint const& rHint)
 }
 return;
 
-case RES_SECTION_HIDDEN:
-m_Data.SetHiddenFlag(true);
-return;
-
-case RES_SECTION_NOT_HIDDEN:
-m_Data.SetHiddenFlag( m_Data.IsHidden() && m_Data.IsCondHidden() );
-return;
-
 case RES_COL:
 // Is handled by the Layout, if appropriate
 break;
@@ -700,7 +697,15 @@ void SwSectionFormat::MakeFrames()
 
 void SwSectionFormat::SwClientNotify(const SwModify& rMod, const SfxHint& 
rHint)
 {
-if (rHint.GetId() != SfxHintId::SwLegacyModify)
+if (rHint.GetId() == SfxHintId::SwSectionHidden)
+{
+auto rSectionHidden = static_cast(rHint);
+auto pSect = GetSection();
+if(!pSect || rSectionHidden.m_isHidden == pSect->IsHiddenFlag()) // 
already at target state, skipping.
+return;
+GetNotifier().Broadcast(rSe

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

2022-09-26 Thread Armin Le Grand (allotropia) (via logerrit)
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit a96c9d7c5bb1ca6eaf72da49e29489f0f0ab1545
Author: Armin Le Grand (allotropia) 
AuthorDate: Sat Sep 24 16:28:03 2022 +0200
Commit: Armin Le Grand 
CommitDate: Mon Sep 26 09:49:20 2022 +0200

tdf#151104 correct missing ColorModification

Presentation still uses Metafiles as transfer for
Graphic content, so uses VclMetafileProcessor2D.
Unfortunately processPolyPolygonGraphicPrimitive2D
does not support an active BColorModifierStack,
so use the default as working fallback to create
correct GraphicData for the Metafile.

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

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 25142b778278..7b46015003fa 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -837,8 +837,17 @@ void VclMetafileProcessor2D::processBasePrimitive2D(const 
primitive2d::BasePrimi
 }
 case PRIMITIVE2D_ID_POLYPOLYGONGRAPHICPRIMITIVE2D:
 {
-processPolyPolygonGraphicPrimitive2D(
-static_cast(rCandidate));
+if (maBColorModifierStack.count())
+{
+// tdf#151104 unfortunately 
processPolyPolygonGraphicPrimitive2D below
+// does not support an active BColorModifierStack, so use the 
default
+process(rCandidate);
+}
+else
+{
+processPolyPolygonGraphicPrimitive2D(
+static_cast(rCandidate));
+}
 break;
 }
 case PRIMITIVE2D_ID_POLYPOLYGONHATCHPRIMITIVE2D:


[Libreoffice-commits] core.git: 2 commits - chart2/source cui/uiconfig solenv/bin sw/source

2022-09-26 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/dialogs/dlg_NumberFormat.cxx |3 +-
 chart2/source/controller/dialogs/dlg_NumberFormat.hxx |3 ++
 cui/uiconfig/ui/formatnumberdialog.ui |   21 --
 solenv/bin/native-code.py |1 
 sw/source/ui/chrdlg/tblnumfm.cxx  |3 +-
 sw/source/uibase/inc/tblnumfm.hxx |3 ++
 6 files changed, 26 insertions(+), 8 deletions(-)

New commits:
commit c4c664e1413b9d4f830a994ee9fa44c1b002f45f
Author: Szymon Kłos 
AuthorDate: Mon Aug 22 11:35:30 2022 +0200
Commit: Szymon Kłos 
CommitDate: Mon Sep 26 10:23:05 2022 +0200

Be sure the number format dialog content is in correct place

- use special container for content which is always above
  action area (place where ok/cancel buttons are)

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

diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx 
b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
index 7750588ccaa7..f5cfe8e3bda4 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
@@ -31,12 +31,13 @@ using namespace ::com::sun::star;
 
 NumberFormatDialog::NumberFormatDialog(weld::Window* pParent, const 
SfxItemSet& rSet)
 : SfxSingleTabDialogController(pParent, &rSet, 
"cui/ui/formatnumberdialog.ui", "FormatNumberDialog")
+, m_xContent( m_xBuilder->weld_container("content") )
 {
 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_NUMBERFORMAT );
 if (fnCreatePage)
 {
-std::unique_ptr xTabPage = 
(*fnCreatePage)(get_content_area(), this, &rSet);
+std::unique_ptr xTabPage = 
(*fnCreatePage)(m_xContent.get(), this, &rSet);
 xTabPage->PageCreated(rSet);
 SetTabPage(std::move(xTabPage));
 }
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx 
b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
index 56d5acd20867..be02edeb6257 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
@@ -23,6 +23,7 @@
 namespace weld
 {
 class Window;
+class Container;
 }
 class SfxItemSet;
 class SfxItemPool;
@@ -31,6 +32,8 @@ namespace chart
 {
 class NumberFormatDialog : public SfxSingleTabDialogController
 {
+std::unique_ptr m_xContent;
+
 public:
 NumberFormatDialog(weld::Window* pParent, const SfxItemSet& rSet);
 
diff --git a/cui/uiconfig/ui/formatnumberdialog.ui 
b/cui/uiconfig/ui/formatnumberdialog.ui
index 1a686ca496b4..10c2c04f73dc 100644
--- a/cui/uiconfig/ui/formatnumberdialog.ui
+++ b/cui/uiconfig/ui/formatnumberdialog.ui
@@ -11,14 +11,26 @@
 0
 0
 dialog
-
-  
-
 
   
 False
 vertical
 2
+
+  
+True
+False
+vertical
+
+  
+
+  
+  
+True
+True
+0
+  
+
 
   
 False
@@ -76,9 +88,6 @@
 0
   
 
-
-  
-
   
 
 
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index 1576602143be..dd3f575e2bdc 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -28,13 +28,14 @@
 
 SwNumFormatDlg::SwNumFormatDlg(weld::Widget* pParent, const SfxItemSet& rSet)
 : SfxSingleTabDialogController(pParent, &rSet, 
"cui/ui/formatnumberdialog.ui", "FormatNumberDialog")
+, m_xContent( m_xBuilder->weld_container("content") )
 {
 // Create TabPage
 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 ::CreateTabPage fnCreatePage = 
pFact->GetTabPageCreatorFunc(RID_SVXPAGE_NUMBERFORMAT);
 if ( fnCreatePage )
 {
-std::unique_ptr xNewPage = 
(*fnCreatePage)(get_content_area(), this, &rSet);
+std::unique_ptr xNewPage = 
(*fnCreatePage)(m_xContent.get(), this, &rSet);
 SfxAllItemSet aSet(*(rSet.GetPool()));
 aSet.Put(xNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO));
 xNewPage->PageCreated(aSet);
diff --git a/sw/source/uibase/inc/tblnumfm.hxx 
b/sw/source/uibase/inc/tblnumfm.hxx
index 8e0f32f3eabb..81f065265d1d 100644
--- a/sw/source/uibase/inc/tblnumfm.hxx
+++ b/sw/source/uibase/inc/tblnumfm.hxx
@@ -24,11 +24,14 @@
 namespace weld
 {
 class Window;
+class Container;
 }
 class SfxItemSet;
 
 class SwNumFormatDlg final : public SfxSingleTabDialogController
 {
+std::unique_ptr m_xContent;
+
 public:
 SwNumFormatDlg(weld::Widget* pParent, const

[Libreoffice-commits] core.git: 2 commits - desktop/qa desktop/source include/sfx2 sfx2/source vcl/inc vcl/jsdialog

2022-09-26 Thread Szymon Kłos (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx   |   37 +++---
 desktop/source/lib/init.cxx   |   12 +++-
 include/sfx2/sidebar/SidebarDockingWindow.hxx |1 
 sfx2/source/sidebar/SidebarDockingWindow.cxx  |   15 +-
 vcl/inc/salvtables.hxx|4 ++
 vcl/jsdialog/jsdialogbuilder.cxx  |6 +++-
 6 files changed, 60 insertions(+), 15 deletions(-)

New commits:
commit cd0e3d61f2285b81d9c2bd8fa3d12e0deb505681
Author: Szymon Kłos 
AuthorDate: Fri Sep 9 16:05:12 2022 +0200
Commit: Szymon Kłos 
CommitDate: Mon Sep 26 10:23:48 2022 +0200

lok: create sidebar on demand

Change-Id: I5393bba647aa4667643262e77acc6b6873afb571
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139729
Reviewed-by: Ashod Nakashian 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140580
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index aa52f3edc16b..54c8a8189ab5 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -45,6 +45,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -3270,10 +3272,35 @@ void DesktopLOKTest::testMultiDocuments()
 }
 }
 
+namespace
+{
+SfxChildWindow* lcl_initializeSidebar()
+{
+// in init.cxx we do setupSidebar which creaes the controller, do it 
here
+
+SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
+
+SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+CPPUNIT_ASSERT(pViewFrame);
+
+SfxChildWindow* pSideBar = pViewFrame->GetChildWindow(SID_SIDEBAR);
+CPPUNIT_ASSERT(pSideBar);
+
+auto pDockingWin = dynamic_cast(pSideBar->GetWindow());
+CPPUNIT_ASSERT(pDockingWin);
+
+pDockingWin->GetOrCreateSidebarController(); // just to create the 
controller
+
+return pSideBar;
+}
+};
+
 void DesktopLOKTest::testControlState()
 {
 LibLODocument_Impl* pDocument = loadDoc("search.ods");
 pDocument->pClass->postUnoCommand(pDocument, ".uno:StarShapes", nullptr, 
false);
+lcl_initializeSidebar();
 Scheduler::ProcessEventsToIdle();
 
 boost::property_tree::ptree aState;
@@ -3287,17 +3314,9 @@ void DesktopLOKTest::testMetricField()
 {
 LibLODocument_Impl* pDocument = loadDoc("search.ods");
 pDocument->pClass->postUnoCommand(pDocument, ".uno:StarShapes", nullptr, 
false);
+SfxChildWindow* pSideBar = lcl_initializeSidebar();
 Scheduler::ProcessEventsToIdle();
 
-SfxViewShell* pViewShell = SfxViewShell::Current();
-CPPUNIT_ASSERT(pViewShell);
-
-SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
-CPPUNIT_ASSERT(pViewFrame);
-
-SfxChildWindow* pSideBar = pViewFrame->GetChildWindow(SID_SIDEBAR);
-CPPUNIT_ASSERT(pSideBar);
-
 vcl::Window* pWin = pSideBar->GetWindow();
 CPPUNIT_ASSERT(pWin);
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7d9c4cfc3643..b3fae56f721f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -874,13 +874,21 @@ void setupSidebar(std::u16string_view sidebarDeckId = u"")
 if (!pDockingWin)
 return;
 
+pViewFrame->ShowChildWindow( SID_SIDEBAR );
+
+const rtl::Reference& xController
+= pDockingWin->GetOrCreateSidebarController();
+
+xController->FadeIn();
+xController->RequestOpenDeck();
+
 if (!sidebarDeckId.empty())
 {
-pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
+xController->SwitchToDeck(sidebarDeckId);
 }
 else
 {
-pDockingWin->GetSidebarController()->SwitchToDefaultDeck();
+xController->SwitchToDefaultDeck();
 }
 
 pDockingWin->SyncUpdate();
diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx 
b/include/sfx2/sidebar/SidebarDockingWindow.hxx
index 9bad1f5a8464..b22aefcb34a9 100644
--- a/include/sfx2/sidebar/SidebarDockingWindow.hxx
+++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx
@@ -46,6 +46,7 @@ public:
 void SyncUpdate();
 
 auto& GetSidebarController() const { return mpSidebarController; }
+rtl::Reference& 
GetOrCreateSidebarController();
 using SfxDockingWindow::Close;
 
 private:
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx 
b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 18000601bfd0..23c3b459c3be 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -49,11 +50,21 @@ SidebarDockingWindow::SidebarDockingWindow(SfxBindings* 
pSfxBindings, SidebarChi
 OSL_ASSERT(pSfxBindings!=nullptr);
 OS

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

2022-09-26 Thread Stephan Bergmann (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleRole.idl |4 
 1 file changed, 4 insertions(+)

New commits:
commit 92166dba58980fddb234cd7069694cbbca69a8f7
Author: Stephan Bergmann 
AuthorDate: Mon Sep 26 09:57:31 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Sep 26 11:00:27 2022 +0200

Add some missing @since tags

...for constants introduced with 4917430c1c5e8105987e81d65d31df21955ad60e
"tdf#116542 a11y: introduce STATIC role" and
947fe0d89dee75ee43515ef7dfb43837d65a45bc "tdf#119788 tdf#117173 add
accessibility NOTIFICATION role", resp.

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

diff --git a/offapi/com/sun/star/accessibility/AccessibleRole.idl 
b/offapi/com/sun/star/accessibility/AccessibleRole.idl
index c8e8ccc03ec2..c25b3d465d1a 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRole.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRole.idl
@@ -734,6 +734,8 @@ constants AccessibleRole
label.
 
 See also LABEL and TEXT.
+
+@since LibreOffice 6.2
 */
 const short STATIC = 86;
 
@@ -741,6 +743,8 @@ constants AccessibleRole
 
 An object that presents information to the user when the SHOWING 
state change event is
fired for the object.
+
+@since LibreOffice 7.5
 */
 const short NOTIFICATION = 87;
 


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

2022-09-26 Thread Xisco Fauli (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx |2 +-
 svgio/qa/cppunit/data/textXmlSpace.svg |4 ++--
 svgio/source/svgreader/svgtools.cxx|8 +++-
 3 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit f5af51332344b35bc5d7a2588e785c01116277a8
Author: Xisco Fauli 
AuthorDate: Fri Sep 23 13:25:06 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 11:02:45 2022 +0200

tdf#151118: don't trim leading/trailing spaces in 'preserve' case

Thanks again to Mike Kaganski for spotting

Change-Id: Ifd8dcf15d7714ebc4f19083fefe0d78d27d46b4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140483
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 5e6b02055a887bc49c5252c1ae359ae96947e80c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140500

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 49f88768d148..28a6d0b8784a 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -409,7 +409,7 @@ void Test::testTextXmlSpace()
 assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]", 
"text", "a b");
 assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]", 
"text", "a b");
 assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]", 
"text", "ab");
-assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[5]", 
"text", "a  b");
+assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[5]", 
"text", " a  b ");
 assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[6]", 
"text", "a b");
 assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[7]", 
"text", "a   b");
 assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[8]", 
"text", "a b");
diff --git a/svgio/qa/cppunit/data/textXmlSpace.svg 
b/svgio/qa/cppunit/data/textXmlSpace.svg
index f200d74dd3f3..fe1bc8ceeb79 100644
--- a/svgio/qa/cppunit/data/textXmlSpace.svg
+++ b/svgio/qa/cppunit/data/textXmlSpace.svg
@@ -1,12 +1,12 @@
 http://www.w3.org/2000/svg"; version="1.1"
viewBox="0 0 250 250">
-  a  b
+   a  b 
   a   b
   a
   b
   a
 b
-  a  b
+   a  b 
   a b
   a
   b
diff --git a/svgio/source/svgreader/svgtools.cxx 
b/svgio/source/svgreader/svgtools.cxx
index e4303bbb8fc8..0da6e4f8219a 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -1512,13 +1512,11 @@ namespace svgio::svgreader
 // convert tab to space
 aRetval = convert(aRetval, aTab, aSpace, false);
 
-// strip of all leading and trailing spaces
-aRetval = aRetval.trim();
-
 if(bIsDefault)
 {
-// consolidate contiguous space
-aRetval = consolidateContiguousSpace(aRetval);
+// strip of all leading and trailing spaces
+// and consolidate contiguous space
+aRetval = consolidateContiguousSpace(aRetval.trim());
 }
 
 return aRetval;


Fix some headless window sizes on Windows, to make `make check` more reliable

2022-09-26 Thread Stephan Bergmann
I wonder if anybody has any thoughts on 
 "Fix some headless 
window sizes on Windows, to make `make check` more reliable".  It's a 
bit of a hack, but seems to get its job done.  (And I'm not aware of any 
work to make something like the "true headless" Linux svp backend also 
available on macOS and Windows, which would make this hack moot?)




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

2022-09-26 Thread Noel Grandin (via logerrit)
 sd/source/core/CustomAnimationEffect.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8c9785c2aae779dadd1c7e152a4efd5c7f149bff
Author: Noel Grandin 
AuthorDate: Sun Sep 25 18:09:25 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 12:19:19 2022 +0200

tdf#150715 Animations in LO Impress do not work properly

Revert "updatePathFromSdrPathObj can just call getRange"
This reverts commit 7c52337f9517135db13d75ecbbc10d7e26e01489.

Not sure why this change did not work.

Change-Id: I2c42b9b7ff4b85f3018bea289efd3d934dbe2be1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140570
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 916d30ba7e8a5293f57ec04258f6c3839736295e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140512
Reviewed-by: Xisco Fauli 

diff --git a/sd/source/core/CustomAnimationEffect.cxx 
b/sd/source/core/CustomAnimationEffect.cxx
index e645bbca09d5..b1816784f085 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1605,8 +1605,10 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( 
const SdrPathObj& rPathObj
 {
 ::tools::Rectangle aBoundRect(0,0,0,0);
 
+drawinglayer::primitive2d::Primitive2DContainer xPrimitives;
+
pObj->GetViewContact().getViewIndependentPrimitive2DContainer(xPrimitives);
 const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
-const basegfx::B2DRange aRange = 
pObj->GetViewContact().getRange(aViewInformation2D);
+const basegfx::B2DRange 
aRange(xPrimitives.getB2DRange(aViewInformation2D));
 
 if(!aRange.isEmpty())
 {


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

2022-09-26 Thread Noel Grandin (via logerrit)
 i18npool/source/transliteration/fullwidthToHalfwidth.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5b6ddf3f0055cebe2713af34c304a647af6c76a
Author: Noel Grandin 
AuthorDate: Sat Sep 24 12:49:03 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 12:20:31 2022 +0200

tdf#151148 Finding KATAKANA which has voice consonant mark wrong

regression from
commit c7551e8a46e2f9f8142aa7921a0494221ae096e8
Author: Noel Grandin 
Date:   Thu Sep 16 10:36:48 2021 +0200
speedup CharacterClassificationImpl::toUpper

Change-Id: I0309dec3d08220b9616be185360013869598fa1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140541
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 222e56157c6317435088e09e52a0705bc6a1a83a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140508
Reviewed-by: Xisco Fauli 

diff --git a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx 
b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
index 6a90a957f038..fbd2624e149b 100644
--- a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
+++ b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
@@ -50,7 +50,7 @@ fullwidthToHalfwidth::transliterateImpl( const OUString& 
inStr, sal_Int32 startP
 const OUString& newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
 
 // One to One mapping
-return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), pOffset);
+return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), nullptr);
 }
 
 sal_Unicode SAL_CALL


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

2022-09-26 Thread Luboš Luňák (via logerrit)
 include/svl/sharedstringpool.hxx |3 +
 sc/qa/unit/ucalc.cxx |   29 ---
 svl/qa/unit/svl.cxx  |   67 +--
 svl/source/misc/sharedstringpool.cxx |3 +
 4 files changed, 69 insertions(+), 33 deletions(-)

New commits:
commit 15d1660ef04492bfffe4fd30d7c1942499d44f0c
Author: Luboš Luňák 
AuthorDate: Thu Sep 22 10:34:04 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 12:35:28 2022 +0200

make sure SharedString::EMPTY_STRING is interned in pools (tdf#150647)

Without this, it may not actually be there, so interning "" would
use a different string instance, and then comparing with
SharedString::getEmptyString() would actually compare non-equal.

Change-Id: I22660f63aa321e3a8f72cfb96df1db56e08fbb84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140402
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit e47e0cb0ad1dc3554e9b57f8562a217cf785edbf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140497
Reviewed-by: Xisco Fauli 

diff --git a/include/svl/sharedstringpool.hxx b/include/svl/sharedstringpool.hxx
index ff270eef5aa6..6880fec2a101 100644
--- a/include/svl/sharedstringpool.hxx
+++ b/include/svl/sharedstringpool.hxx
@@ -53,8 +53,9 @@ public:
  */
 void purge();
 
+// For unit tests. Note that an "empty" pool may contain some internal 
items,
+// such as SharedString::getEmptyString().
 size_t getCount() const;
-
 size_t getCountIgnoreCase() const;
 };
 }
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index db371c46ddc8..df937c50f2d3 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -380,6 +380,10 @@ void Test::testSharedStringPool()
 {
 m_pDoc->InsertTab(0, "foo");
 
+svl::SharedStringPool& rPool = m_pDoc->GetSharedStringPool();
+size_t extraCount = rPool.getCount(); // internal items such as 
SharedString::getEmptyString()
+size_t extraCountIgnoreCase = rPool.getCountIgnoreCase();
+
 // Strings that are identical.
 m_pDoc->SetString(ScAddress(0,0,0), "Andy");  // A1
 m_pDoc->SetString(ScAddress(0,1,0), "Andy");  // A2
@@ -417,40 +421,39 @@ void Test::testSharedStringPool()
 }
 
 // Check the string counts after purging. Purging shouldn't remove any 
strings in this case.
-svl::SharedStringPool& rPool = m_pDoc->GetSharedStringPool();
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(5), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(5+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A1 and purge again.
 clearRange(m_pDoc, ScAddress(0,0,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(5), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(5+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A2 and purge again.
 clearRange(m_pDoc, ScAddress(0,1,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(4), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(4+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A3 and purge again.
 clearRange(m_pDoc, ScAddress(0,2,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(3), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(3+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A4 and purge again.
 clearRange(m_pDoc, ScAddress(0,3,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(1), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(1), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(1+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(1+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A5 and the pool should be completely empty.
 clearRange(m_pDoc, ScAddress(0,4,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(0), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(0), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Now, compare string and edit text cells.
 m_pDoc->SetString(ScAddress(0,0,0), "Andy and Bruce"); // A1
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index f125305783c5..19a8c2b3baab 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -48,6 +48,15 @@ static std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor)
 return rStrm;
 }
 
+namespace svl
+{
+stat

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

2022-09-26 Thread Luboš Luňák (via logerrit)
 include/svl/sharedstringpool.hxx |3 +
 sc/qa/unit/ucalc.cxx |   29 ---
 svl/qa/unit/svl.cxx  |   67 +--
 svl/source/misc/sharedstringpool.cxx |3 +
 4 files changed, 69 insertions(+), 33 deletions(-)

New commits:
commit 66ebf61975a5d8d860eda5e661c5a82a9ca763b7
Author: Luboš Luňák 
AuthorDate: Thu Sep 22 10:34:04 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 12:36:23 2022 +0200

make sure SharedString::EMPTY_STRING is interned in pools (tdf#150647)

Without this, it may not actually be there, so interning "" would
use a different string instance, and then comparing with
SharedString::getEmptyString() would actually compare non-equal.

Change-Id: I22660f63aa321e3a8f72cfb96df1db56e08fbb84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140402
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit e47e0cb0ad1dc3554e9b57f8562a217cf785edbf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140498
Reviewed-by: Xisco Fauli 

diff --git a/include/svl/sharedstringpool.hxx b/include/svl/sharedstringpool.hxx
index ff270eef5aa6..6880fec2a101 100644
--- a/include/svl/sharedstringpool.hxx
+++ b/include/svl/sharedstringpool.hxx
@@ -53,8 +53,9 @@ public:
  */
 void purge();
 
+// For unit tests. Note that an "empty" pool may contain some internal 
items,
+// such as SharedString::getEmptyString().
 size_t getCount() const;
-
 size_t getCountIgnoreCase() const;
 };
 }
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 1e7cde76d9f0..a5cdebe12569 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -400,6 +400,10 @@ void Test::testSharedStringPool()
 {
 m_pDoc->InsertTab(0, "foo");
 
+svl::SharedStringPool& rPool = m_pDoc->GetSharedStringPool();
+size_t extraCount = rPool.getCount(); // internal items such as 
SharedString::getEmptyString()
+size_t extraCountIgnoreCase = rPool.getCountIgnoreCase();
+
 // Strings that are identical.
 m_pDoc->SetString(ScAddress(0,0,0), "Andy");  // A1
 m_pDoc->SetString(ScAddress(0,1,0), "Andy");  // A2
@@ -437,40 +441,39 @@ void Test::testSharedStringPool()
 }
 
 // Check the string counts after purging. Purging shouldn't remove any 
strings in this case.
-svl::SharedStringPool& rPool = m_pDoc->GetSharedStringPool();
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(5), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(5+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A1 and purge again.
 clearRange(m_pDoc, ScAddress(0,0,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(5), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(5+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A2 and purge again.
 clearRange(m_pDoc, ScAddress(0,1,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(4), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(4+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A3 and purge again.
 clearRange(m_pDoc, ScAddress(0,2,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(3), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(2), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(3+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(2+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A4 and purge again.
 clearRange(m_pDoc, ScAddress(0,3,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(1), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(1), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(1+extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(1+extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Clear A5 and the pool should be completely empty.
 clearRange(m_pDoc, ScAddress(0,4,0));
 rPool.purge();
-CPPUNIT_ASSERT_EQUAL(static_cast(0), rPool.getCount());
-CPPUNIT_ASSERT_EQUAL(static_cast(0), rPool.getCountIgnoreCase());
+CPPUNIT_ASSERT_EQUAL(extraCount, rPool.getCount());
+CPPUNIT_ASSERT_EQUAL(extraCountIgnoreCase, rPool.getCountIgnoreCase());
 
 // Now, compare string and edit text cells.
 m_pDoc->SetString(ScAddress(0,0,0), "Andy and Bruce"); // A1
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 523e998c60c1..9b7c78ebe062 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -48,6 +48,15 @@ static std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor)
 return rStrm;
 }
 
+namespace svl
+{
+stat

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

2022-09-26 Thread Noel Grandin (via logerrit)
 i18npool/source/transliteration/fullwidthToHalfwidth.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a288453c50f49852c2a83cc4716ec44d6230d37c
Author: Noel Grandin 
AuthorDate: Sat Sep 24 12:49:03 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 13:07:58 2022 +0200

tdf#151148 Finding KATAKANA which has voice consonant mark wrong

regression from
commit c7551e8a46e2f9f8142aa7921a0494221ae096e8
Author: Noel Grandin 
Date:   Thu Sep 16 10:36:48 2021 +0200
speedup CharacterClassificationImpl::toUpper

Change-Id: I0309dec3d08220b9616be185360013869598fa1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140541
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 222e56157c6317435088e09e52a0705bc6a1a83a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140508
Reviewed-by: Xisco Fauli 
(cherry picked from commit a5b6ddf3f0055cebe2713af34c304a647af6c76a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140600

diff --git a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx 
b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
index 6a90a957f038..fbd2624e149b 100644
--- a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
+++ b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
@@ -50,7 +50,7 @@ fullwidthToHalfwidth::transliterateImpl( const OUString& 
inStr, sal_Int32 startP
 const OUString& newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
 
 // One to One mapping
-return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), pOffset);
+return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), nullptr);
 }
 
 sal_Unicode SAL_CALL


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

2022-09-26 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/autofilter2/tdf101165.py |   20 
 sc/qa/uitest/autofilter2/tdf140754.py |   14 ++
 2 files changed, 34 insertions(+)

New commits:
commit fbc2e86a97c6499537f6054e7eabf1c96d3d975f
Author: Xisco Fauli 
AuthorDate: Mon Sep 26 13:05:29 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 26 14:38:01 2022 +0200

uitest: sc: check 'all' button in autofilter

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

diff --git a/sc/qa/uitest/autofilter2/tdf101165.py 
b/sc/qa/uitest/autofilter2/tdf101165.py
index 1cfe32e3aef8..65a1060a5369 100644
--- a/sc/qa/uitest/autofilter2/tdf101165.py
+++ b/sc/qa/uitest/autofilter2/tdf101165.py
@@ -10,6 +10,7 @@ from uitest.framework import UITestCase
 from libreoffice.calc.document import get_cell_by_position
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_url_for_data_file
+from uitest.uihelper.common import get_state_as_dict
 
 #Bug 101165 - Crashing on a filter selection, every time
 
@@ -24,6 +25,25 @@ class tdf101165(UITestCase):
 xAll = xFloatWindow.getChild("toggle_all")
 xAll.executeAction("CLICK", tuple())
 
+xCheckListMenu = xFloatWindow.getChild("FilterDropDown")
+xTreeList = xCheckListMenu.getChild("check_tree_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+for i in range(3):
+xChild = xTreeList.getChild(str(i))
+self.assertEqual("false", 
get_state_as_dict(xChild)["IsChecked"])
+
+if i == 0 :
+self.assertEqual(2, len(xChild.getChildren()))
+for j in range(2):
+self.assertEqual("false", 
get_state_as_dict(xChild.getChild(str(j)))["IsChecked"])
+elif i == 1:
+self.assertEqual(6, len(xChild.getChildren()))
+for j in range(6):
+self.assertEqual("false", 
get_state_as_dict(xChild.getChild(str(j)))["IsChecked"])
+else:
+self.assertEqual(0, len(xChild.getChildren()))
+
+
 self.assertEqual(get_cell_by_position(calc_doc, 1, 0, 
1).getValue(), 6494)
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/autofilter2/tdf140754.py 
b/sc/qa/uitest/autofilter2/tdf140754.py
index 10ffcd5ec75a..1d298f832e3f 100644
--- a/sc/qa/uitest/autofilter2/tdf140754.py
+++ b/sc/qa/uitest/autofilter2/tdf140754.py
@@ -49,6 +49,13 @@ class tdf140754(UITestCase):
 # since tdf#117267, we are showing the hidden filter rows as 
inactive elements (25 active + 140 inactive)
 self.assertEqual(165, len(xList.getChildren()))
 
+for i in range(165):
+xChild = xList.getChild(str(i))
+if i < 25:
+self.assertEqual("true", 
get_state_as_dict(xChild)["IsChecked"])
+else:
+self.assertEqual("false", 
get_state_as_dict(xChild)["IsChecked"])
+
 # Without the fix in place, this test would have crashed here
 xOkBtn = xFloatWindow.getChild("ok")
 xOkBtn.executeAction("CLICK", tuple())
@@ -69,6 +76,13 @@ class tdf140754(UITestCase):
 # since tdf#117267, we are showing the hidden filter rows as 
inactive elements (10 active + 35 inactive)
 self.assertEqual(45, len(xList.getChildren()))
 
+for i in range(45):
+xChild = xList.getChild(str(i))
+if i < 10:
+self.assertEqual("true", 
get_state_as_dict(xChild)["IsChecked"])
+else:
+self.assertEqual("false", 
get_state_as_dict(xChild)["IsChecked"])
+
 xOkBtn = xFloatWindow.getChild("ok")
 xOkBtn.executeAction("CLICK", tuple())
 


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

2022-09-26 Thread Noel Grandin (via logerrit)
 i18npool/source/transliteration/fullwidthToHalfwidth.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b46221a4817ca41776446d2a8d81272ce1022c29
Author: Noel Grandin 
AuthorDate: Sat Sep 24 12:49:03 2022 +0200
Commit: Michael Stahl 
CommitDate: Mon Sep 26 15:09:07 2022 +0200

tdf#151148 Finding KATAKANA which has voice consonant mark wrong

regression from
commit c7551e8a46e2f9f8142aa7921a0494221ae096e8
Author: Noel Grandin 
Date:   Thu Sep 16 10:36:48 2021 +0200
speedup CharacterClassificationImpl::toUpper

Change-Id: I0309dec3d08220b9616be185360013869598fa1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140541
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 222e56157c6317435088e09e52a0705bc6a1a83a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140508
Reviewed-by: Xisco Fauli 
(cherry picked from commit 3f37523fb804c724bc2a33ec21786aa9a72f0422)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140599
Reviewed-by: Eike Rathke 
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx 
b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
index 6a90a957f038..fbd2624e149b 100644
--- a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
+++ b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
@@ -50,7 +50,7 @@ fullwidthToHalfwidth::transliterateImpl( const OUString& 
inStr, sal_Int32 startP
 const OUString& newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
 
 // One to One mapping
-return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), pOffset);
+return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), nullptr);
 }
 
 sal_Unicode SAL_CALL


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

2022-09-26 Thread Bjoern Michaelsen (via logerrit)
 sw/source/core/docnode/node.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cb43334ee9938d7b8e250f9ddbdc81e53779f8d0
Author: Bjoern Michaelsen 
AuthorDate: Sun Sep 25 04:34:54 2022 +0200
Commit: Michael Stahl 
CommitDate: Mon Sep 26 15:16:22 2022 +0200

tdf#144939: fix chapter numbering updates

Change-Id: Icd29a380663a1c5f70e3a8ee86db64ec4eae8d86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140558
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 
(cherry picked from commit 2aed71fa9e8a36ff2dc9f48897092c26ab89ea9e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140594
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 444e6dda6613..d95b18ceeded 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1257,7 +1257,7 @@ SwFormatColl *SwContentNode::ChgFormatColl( SwFormatColl 
*pNewColl )
 ChkCondColl(static_cast(pNewColl));
 SwFormatChg aTmp1( pOldColl );
 SwFormatChg aTmp2( pNewColl );
-SwClientNotify( *this, sw::LegacyModifyHint(&aTmp1, &aTmp2) );
+CallSwClientNotify( sw::LegacyModifyHint(&aTmp1, &aTmp2) );
 }
 }
 InvalidateInSwCache(RES_ATTRSET_CHG);


[Libreoffice-commits] core.git: 2 commits - chart2/source include/svl sc/source

2022-09-26 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/DataBrowser.cxx |2 -
 chart2/source/controller/dialogs/ObjectNameProvider.cxx  |   14 
 chart2/source/controller/inc/ChartController.hxx |2 -
 chart2/source/controller/main/ChartController_Window.cxx |8 ++--
 chart2/source/inc/CommonConverters.hxx   |2 -
 chart2/source/inc/ObjectIdentifier.hxx   |6 +--
 chart2/source/tools/CommonConverters.cxx |4 +-
 chart2/source/tools/InternalData.cxx |8 ++--
 chart2/source/tools/ObjectIdentifier.cxx |   26 +++
 chart2/source/tools/PropertyHelper.cxx   |6 +--
 chart2/source/view/axes/VCartesianAxis.cxx   |   12 +++---
 chart2/source/view/charttypes/VSeriesPlotter.cxx |2 -
 include/svl/sharedstring.hxx |6 +++
 sc/source/core/tool/interpr1.cxx |2 -
 14 files changed, 53 insertions(+), 47 deletions(-)

New commits:
commit d9e044f04ac11b76b9a3dac575f4e9155b67490e
Author: Noel Grandin 
AuthorDate: Mon Sep 26 13:06:44 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Sep 26 15:19:54 2022 +0200

use more string_view in chart2

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

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx 
b/chart2/source/controller/dialogs/DataBrowser.cxx
index eb15e8f3d87b..ce7687162eb1 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -620,7 +620,7 @@ void DataBrowser::RenewTable()
 GetDataWindow().LogicToPixel( Size( 42, 0 
)).getWidth() ));
 
 OUString aDefaultSeriesName(SchResId(STR_COLUMN_LABEL));
-replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", 
OUString::number( 24 ) );
+replaceParamterInString( aDefaultSeriesName, u"%COLUMNNUMBER", 
OUString::number( 24 ) );
 sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
 + GetDataWindow().LogicToPixel(Point(8 + 
impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0), 
MapMode(MapUnit::MapAppFont)).X();
 sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx 
b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 987e5c7412cc..2bf6af62 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -732,7 +732,7 @@ OUString ObjectNameProvider::getSelectedObjectText( 
std::u16string_view rObjectC
 sal_Int32 nPointIndex = o3tl::toInt32( 
ObjectIdentifier::getParticleID(rObjectCID) );
 
 // replace data point index
-replaceParamterInString( aRet, "%POINTNUMBER", OUString::number( 
nPointIndex + 1 ));
+replaceParamterInString( aRet, u"%POINTNUMBER", OUString::number( 
nPointIndex + 1 ));
 
 // replace data series index
 {
@@ -744,11 +744,11 @@ OUString ObjectNameProvider::getSelectedObjectText( 
std::u16string_view rObjectC
 if( aSeriesVector[nSeriesIndex] == xSeries )
 break;
 }
-replaceParamterInString( aRet, "%SERIESNUMBER", 
OUString::number( nSeriesIndex + 1 ) );
+replaceParamterInString( aRet, u"%SERIESNUMBER", 
OUString::number( nSeriesIndex + 1 ) );
 }
 
 // replace point value
-replaceParamterInString( aRet, "%POINTVALUES", 
lcl_getDataPointValueText(
+replaceParamterInString( aRet, u"%POINTVALUES", 
lcl_getDataPointValueText(
 xSeries, nPointIndex, 
DataSeriesHelper::getCoordinateSystemOfSeries(xSeries, xDiagram), 
xChartDocument ) );
 }
 }
@@ -760,7 +760,7 @@ OUString ObjectNameProvider::getSelectedObjectText( 
std::u16string_view rObjectC
 if( !aHelpText.isEmpty())
 {
 aRet = SchResId( STR_STATUS_OBJECT_MARKED );
-replaceParamterInString( aRet, "%OBJECTNAME", aHelpText );
+replaceParamterInString( aRet, u"%OBJECTNAME", aHelpText );
 }
 }
 
@@ -843,8 +843,8 @@ OUString ObjectNameProvider::getName_ObjectForSeries(
 if( xSeries.is() )
 {
 OUString aRet = SchResId(STR_OBJECT_FOR_SERIES);
-replaceParamterInString( aRet, "%OBJECTNAME", getName( eObjectType ) );
-replaceParamterInString( aRet, "%SERIESNAME", lcl_getDataSeriesName( 
rSeriesCID, xChartDocument ) );
+replaceParamterInString( aRet, u"%OBJECTNAME", getName( eObjectType ) 
);
+replaceParamterInString( aRet, u"%SERIESNAME", lcl_getDataSeriesName( 
rSeriesCID, xChartDocument ) );
 return aRet;
 }
 else
@@ -854,7 +854,7 @@ OUString O

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

2022-09-26 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf |   14 
+
 writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx   |   25 
++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx|4 -
 3 files changed, 41 insertions(+), 2 deletions(-)

New commits:
commit 403ff3d3ccba1498568e82e4840a12e53a188406
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 08:14:21 2022 +0200
Commit: Michael Stahl 
CommitDate: Mon Sep 26 15:20:34 2022 +0200

tdf#150762 RTF import: fix missing left margin on numbered paragraph

The bugdoc has a numbered paragraph with a custom left margin, but this
left margin is missing in Writer.

This went wrong in commit 61b7034824dead1635f9e9c6ec996297e10f6910
(tdf#104016 RTF import: deduplicate before text indent from numbering,
2017-12-05), and now it's broken because the numbering properties are
applied before paragraph properties in the DOCX case, but the RTF
tokenizer didn't do this ordering.

This behavior of sw core somewhat makes sense, users expect the margins
from direct formatting to go away if you apply a new numbering. So fix
the problem by tweaking the RTF tokenizer to emit the numbering tokens
first and only then the paragraph tokens, which is an order that's
closer to the working DOCX tokenizer.

This only affects the old (WW6-style) paragraph numbering markup, not
the newer (WW8-style) numbering markup.

Change-Id: I39698f57684d47c03ea4848fc8eb6b2e855c4fbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140584
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit a974bccd06ac6c7081256d32d2372ea05b253fbb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140510
Reviewed-by: Michael Stahl 

diff --git 
a/writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf
new file mode 100644
index ..99825370e3b4
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/old-para-num-left-margin.rtf
@@ -0,0 +1,14 @@
+{\rtf1\ansi
+\margt1497\margb590\margl590\margr590\pgwsxn11906\pghsxn16838
+\pard\plain First\par
+\pard\plain
+{\*\pn \pnlvlbody
+{\pntxtb \'78}
+}
+{\b\f7\fs22 Second\par}
+\pard\plain\li1191
+{\*\pn \pnlvlbody
+{\pntxtb \'78}
+}
+{\f7\fs22 Third, with left indent\par}
+}
diff --git a/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx
index 6020453ba783..f33f0f0e58be 100644
--- a/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -119,6 +120,30 @@ CPPUNIT_TEST_FIXTURE(Test, testDuplicatedImage)
 // i.e. there was a 3rd, duplicated image.
 CPPUNIT_ASSERT_EQUAL(static_cast(2), xDrawPage->getCount());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testOldParaNumLeftMargin)
+{
+// Given a document with 3 paragraphs, the third one with a left indent:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"old-para-num-left-margin.rtf";
+
+// When importing that document:
+getComponent() = loadFromDesktop(aURL);
+
+// Then make sure that the third paragraph has a left indent:
+uno::Reference xTextDocument(getComponent(), 
uno::UNO_QUERY);
+uno::Reference 
xText(xTextDocument->getText(), uno::UNO_QUERY);
+uno::Reference xParagraphs = 
xText->createEnumeration();
+xParagraphs->nextElement();
+xParagraphs->nextElement();
+uno::Reference xParagraph(xParagraphs->nextElement(), 
uno::UNO_QUERY);
+sal_Int32 nParaLeftMargin{};
+xParagraph->getPropertyValue("ParaLeftMargin") >>= nParaLeftMargin;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 2101
+// - Actual  : 0
+// i.e. the left indent was 0, not 1191 twips (from the file) in mm100.
+CPPUNIT_ASSERT_EQUAL(static_cast(2101), nParaLeftMargin);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 04ab247a540e..f4844765fc68 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3377,9 +3377,9 @@ void RTFDocumentImpl::afterPopState(RTFParserState& 
rState)
 
 // Use it
 putNestedSprm(m_aStates.top().getParagraphSprms(), 
NS_ooxml::LN_CT_PPrBase_numPr,
-  NS_ooxml::LN_CT_NumPr_ilvl, pIlvlValue);
+  NS_ooxml::LN_CT_NumPr_ilvl, pIlvlValue, 
RTFOverwrite::YES_PREPEND);
 putNestedSprm(m_aStates.top().getParagraphSprms(), 
NS_ooxml::LN_CT_PPrBase_numPr,
-  NS_ooxml::LN_CT_NumPr_numId, pIdValue);
+

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

2022-09-26 Thread Noel Grandin (via logerrit)
 sfx2/source/dialog/filtergrouping.cxx  |4 ++--
 sfx2/source/doc/DocumentMetadataAccess.cxx |   16 +++-
 sfx2/source/doc/oleprops.cxx   |   10 +-
 sfx2/source/doc/oleprops.hxx   |6 +++---
 4 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 749573bfce08879587b4bd0c2cfeb6eada4c9912
Author: Noel Grandin 
AuthorDate: Mon Sep 26 13:08:14 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Sep 26 15:42:22 2022 +0200

use more string_view in sfx2

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

diff --git a/sfx2/source/dialog/filtergrouping.cxx 
b/sfx2/source/dialog/filtergrouping.cxx
index 1d9a68952520..b6232e301e43 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -415,7 +415,7 @@ namespace sfx2
 
 explicit CheckAppendSingleWildcard( OUString& _rBase ) : 
_rToBeExtended( _rBase ) { }
 
-void operator() ( const OUString& _rWC )
+void operator() ( std::u16string_view _rWC )
 {
 // check for double wildcards
 sal_Int32 nExistentPos = _rToBeExtended.indexOf( _rWC );
@@ -425,7 +425,7 @@ namespace sfx2
 ||  ( s_cWildcardSeparator == _rToBeExtended[ nExistentPos 
- 1 ] )
 )
 {   // the wildcard really starts at this position (it starts 
at pos 0 or the previous character is a separator
-sal_Int32 nExistentWCEnd = nExistentPos + _rWC.getLength();
+sal_Int32 nExistentWCEnd = nExistentPos + _rWC.size();
 if  (   ( _rToBeExtended.getLength() == nExistentWCEnd )
 ||  ( s_cWildcardSeparator == _rToBeExtended[ 
nExistentWCEnd ] )
 )
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx 
b/sfx2/source/doc/DocumentMetadataAccess.cxx
index cdf4c329a074..309728d816e3 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -282,17 +282,15 @@ splitPath(OUString const & i_rPath,
 }
 
 static bool
-splitXmlId(OUString const & i_XmlId,
+splitXmlId(std::u16string_view i_XmlId,
 OUString & o_StreamName, OUString& o_Idref )
 {
-const sal_Int32 idx(i_XmlId.indexOf(u'#'));
-if ((idx <= 0) || (idx >= i_XmlId.getLength() - 1)) {
+const size_t idx(i_XmlId.find(u'#'));
+if (idx == std::u16string_view::npos)
 return false;
-} else {
-o_StreamName = i_XmlId.copy(0, idx);
-o_Idref  = i_XmlId.copy(idx+1);
-return isValidXmlId(o_StreamName, o_Idref);
-}
+o_StreamName = i_XmlId.substr(0, idx);
+o_Idref  = i_XmlId.substr(idx+1);
+return isValidXmlId(o_StreamName, o_Idref);
 }
 
 
@@ -912,7 +910,7 @@ DocumentMetadataAccess::getElementByURI(
 }
 OUString path;
 OUString idref;
-if (!splitXmlId(name.copy(baseURI.getLength()), path, idref)) {
+if (!splitXmlId(name.subView(baseURI.getLength()), path, idref)) {
 return nullptr;
 }
 
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index a79ac984222e..4cde3ed014ba 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -249,7 +249,7 @@ OUString SfxOleStringHelper::LoadString8( SvStream& rStrm ) 
const
 return IsUnicode() ? ImplLoadString16( rStrm ) : ImplLoadString8( rStrm );
 }
 
-void SfxOleStringHelper::SaveString8( SvStream& rStrm, const OUString& rValue 
) const
+void SfxOleStringHelper::SaveString8( SvStream& rStrm, std::u16string_view 
rValue ) const
 {
 if( IsUnicode() )
 ImplSaveString16( rStrm, rValue );
@@ -262,7 +262,7 @@ OUString SfxOleStringHelper::LoadString16( SvStream& rStrm )
 return ImplLoadString16( rStrm );
 }
 
-void SfxOleStringHelper::SaveString16( SvStream& rStrm, const OUString& rValue 
)
+void SfxOleStringHelper::SaveString16( SvStream& rStrm, std::u16string_view 
rValue )
 {
 ImplSaveString16( rStrm, rValue );
 }
@@ -316,13 +316,13 @@ void SfxOleStringHelper::ImplSaveString8( SvStream& 
rStrm, std::u16string_view r
 rStrm.WriteUChar( 0 );
 }
 
-void SfxOleStringHelper::ImplSaveString16( SvStream& rStrm, const OUString& 
rValue )
+void SfxOleStringHelper::ImplSaveString16( SvStream& rStrm, 
std::u16string_view rValue )
 {
 // write size field (including trailing NUL character)
-sal_Int32 nSize = static_cast< sal_Int32 >( rValue.getLength() + 1 );
+sal_Int32 nSize = static_cast< sal_Int32 >( rValue.size() + 1 );
 rStrm.WriteInt32( nSize );
 // write character array with trailing NUL character
-for( sal_Int32 nIdx = 0; nIdx < rValue.getLength(); ++nIdx )
+for( size_t nIdx = 0; nIdx < rValue.size(); ++nIdx )
 rStrm.WriteUInt16( rValue[ nIdx ] );
 rStrm.WriteUInt16( 0 );
 // stream is always padded to 32-bit boundary, add 2 by

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

2022-09-26 Thread Rafael Lima (via logerrit)
 sfx2/source/control/listview.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d8789d175af75e7768e601662619b116e9780937
Author: Rafael Lima 
AuthorDate: Fri Sep 23 20:48:16 2022 +0200
Commit: Rafael Lima 
CommitDate: Mon Sep 26 15:47:29 2022 +0200

tdf#151143 Fix the size of Template Manager in ListView mode

A previous patch (410bff99a708371eed6a82677b44e2151a4a990a) fixed the size 
of the ThumbnailView in the Template Manager.

However it did not fix the size in ListView mode. So when the Template 
Manager opened in ListView, the height of the ListView the same as the number 
of available styles (rows in the list). The problem was most noticeable in 
Draw, which has just one template, but it actually affected all modules.

This patch fixes this issue in ListView.

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

diff --git a/sfx2/source/control/listview.cxx b/sfx2/source/control/listview.cxx
index d516eea5d160..ca3818ab9d70 100644
--- a/sfx2/source/control/listview.cxx
+++ b/sfx2/source/control/listview.cxx
@@ -57,6 +57,9 @@ ListView::ListView(std::unique_ptr xTreeView)
 static_cast(nDigitWidth * 18) /* Modify Column */
 };
 
+// tdf#151143 Make the size of ListView and ThumbnailView the same
+mxTreeView->set_size_request(TEMPLATE_ITEM_MAX_WIDTH * 5, 
TEMPLATE_ITEM_MAX_HEIGHT_SUB * 3);
+
 mxTreeView->set_column_fixed_widths(aWidths);
 mxTreeView->set_selection_mode(SelectionMode::Multiple);
 mxTreeView->connect_query_tooltip(LINK(this, ListView, QueryTooltipHdl));


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

2022-09-26 Thread Mike Kaganski (via logerrit)
 sfx2/source/view/lokstarmathhelper.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5e0a3293ecfba225e144241e750359b7d3998666
Author: Mike Kaganski 
AuthorDate: Wed Apr 20 12:17:28 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon Sep 26 16:04:35 2022 +0200

lok: use correct window for the MapMode

... otherwise, using a zoomed document, the returned bounding box
does not account for that zoom.

Change-Id: Id7834bbc2bebaa923414cf029c37a8e22f9c1078
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133205
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 89948bd544516604af057588676b0f979f21c163)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140602
Tested-by: Jenkins CollaboraOffice 

diff --git a/sfx2/source/view/lokstarmathhelper.cxx 
b/sfx2/source/view/lokstarmathhelper.cxx
index 62c2fd56b102..9a704683aaec 100644
--- a/sfx2/source/view/lokstarmathhelper.cxx
+++ b/sfx2/source/view/lokstarmathhelper.cxx
@@ -131,7 +131,9 @@ tools::Rectangle LokStarMathHelper::GetBoundingBox()
 {
 // In all cases, the following code fragment
 // returns the bounding box in twips.
-const MapMode& aMapMode = pWindow->GetMapMode();
+// Note: the correct mapmode (representing document zoom) 
is provided by
+// GraphicWindow, not WidgetWindow
+const MapMode& aMapMode = GetGraphicWindow()->GetMapMode();
 const auto & [ m, d ]
 = o3tl::getConversionMulDiv(o3tl::Length::px, 
o3tl::Length::twip);
 const Fraction& scaleX = aMapMode.GetScaleX();


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

2022-09-26 Thread Michael Weghorn (via logerrit)
 toolkit/source/awt/vclxaccessiblecomponent.cxx|   32 ++
 winaccessibility/source/service/AccComponentEventListener.cxx |1 
 winaccessibility/source/service/AccObjectWinManager.cxx   |5 +
 3 files changed, 38 insertions(+)

New commits:
commit 995d17697d1e46f66df67ca3132369d76caea29e
Author: Michael Weghorn 
AuthorDate: Mon Sep 19 14:45:05 2022 +0200
Commit: Michael Weghorn 
CommitDate: Mon Sep 26 16:15:06 2022 +0200

tdf#117173 wina11y: Send EVENT_SYSTEM_ALERT when notification shows

Together with
Change-Id Ifcf9304883e2e824ea1b7998d7767e474b87c8b6
("tdf#119788 tdf#117173 add accessibility NOTIFICATION role")
and Change-Id Id62b3942dc17c3a1ed6a08d23438406e5a19c39d
("tdf#117173 a11y: Send SHOWING state change event on
 Window{Show,Hide}"), this makes NVDA announce the notification
in the Search and Replace dialog as an alert, similar
to what browsers do e.g. in the alert on empty input
for the input validation example at
https://www.w3.org/WAI/tutorials/forms/validation/ .

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

diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx 
b/winaccessibility/source/service/AccComponentEventListener.cxx
index ca0dec0fa311..060fb201136c 100644
--- a/winaccessibility/source/service/AccComponentEventListener.cxx
+++ b/winaccessibility/source/service/AccComponentEventListener.cxx
@@ -237,6 +237,7 @@ void 
AccComponentEventListener::FireStatePropertyChange(sal_Int64 state, bool se
 pAgent->DecreaseState(m_xAccessible.get(), 
AccessibleStateType::DEFUNC);
 // UNO !SHOWING == MSAA OFFSCREEN
 pAgent->IncreaseState(m_xAccessible.get(), 
AccessibleStateType::SHOWING );
+pAgent->NotifyAccEvent(UnoMSAAEvent::STATE_SHOWING, 
m_xAccessible.get());
 break;
 case AccessibleStateType::VISIBLE:
 // UNO !VISIBLE == MSAA INVISIBLE
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index 44dbcb98ac3a..de527270a8e0 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -198,6 +198,11 @@ bool AccObjectWinManager::NotifyAccEvent(XAccessible* 
pXAcc, UnoMSAAEvent eEvent
 UpdateAccFocus(pXAcc);
 NotifyWinEvent( EVENT_OBJECT_FOCUS,hAcc, OBJID_CLIENT,dChildID  );
 break;
+case UnoMSAAEvent::STATE_SHOWING:
+// send EVENT_SYSTEM_ALERT when notification gets shown
+if (pRContext->getAccessibleRole() == AccessibleRole::NOTIFICATION)
+NotifyWinEvent(EVENT_SYSTEM_ALERT, hAcc, OBJID_CLIENT, dChildID);
+break;
 case UnoMSAAEvent::MENU_START:
 NotifyWinEvent( EVENT_SYSTEM_MENUSTART,hAcc, OBJID_CLIENT,dChildID  );
 break;
commit c26d6cc3c4878d356328a538b5bf11e4e6a0e7dc
Author: Michael Weghorn 
AuthorDate: Mon Sep 19 14:44:46 2022 +0200
Commit: Michael Weghorn 
CommitDate: Mon Sep 26 16:14:51 2022 +0200

tdf#117173 a11y: Send SHOWING state change event on Window{Show,Hide}

When a `vcl::Window` becomes visible, `Window::ImplSetReallyVisible`
calls the registered event listeners with a
`VclEventId::WindowShow` event. Likewise, a
`VclEventId::WindowHide` events is sent in
`Window::ImplResetReallyVisible` when the window
is no longer visible.

Handle that event in `VCLXAccessibleComponent` by
sending a state change event for the SHOWING state,
so assistive technology gets notified about this.
(Similar handling can already be found e.g. in
`AccessibleTabBar::ProcessWindowEvent` or
`AccessibleTabBarPageList::ProcessWindowEvent`.)

While doing so in `VCLXAccessibleComponent::ProcessWindowEvent`
for the object itself would generally seem like a more straightforward
and conceptually nicer approach, this would have the problem
that the event wouldn't get propagated to the platform-specific
a11y integration layer (like winaccessibility) for the
`VclEventId::WindowShow` case, since the a11y event
listeners are registered and unregistered as a response to the CHILD
event (at least for winaccessibility and gtk3, qt6 doesn't do that
(yet?)), and if the accessible event listener is not (yet) registered,
the event is simply ignored.
Since the CHILD event is sent in
`VCLXAccessibleComponent::ProcessChildWindowEvent` and that gets
called on the parent *after* `VCLXAccessibleComponent::ProcessWindowEvent`
gets called for the object that became shown/hidden
(s. `Window::CallEventListeners`), also send the state change
event for the SHOWING state of the child from there, so the
proper order can be made sure.

The reverse order 

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

2022-09-26 Thread Miklos Vajna (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 5a4c34d325a6206b1a353d54eb4c216fc84c2886
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 08:51:10 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 26 16:25:52 2022 +0200

cui: fix crash in SpellDialog::SpellContinue_Impl

Crashreport signature:

Fatal signal received: SIGSEGV code: 128 for address: 0x0
program/libcuilo.so

svx::SpellDialog::GetNextSentence_Impl(std::unique_ptr >*, bool, bool)
include/com/sun/star/uno/Reference.hxx:114
program/libcuilo.so

svx::SpellDialog::SpellContinue_Impl(std::unique_ptr >*, bool, bool)
cui/source/dialogs/SpellDialog.cxx:355
program/libcuilo.so
svx::SpellDialog::ChangeHdl(weld::Button&)
include/rtl/ustring.hxx:527
program/libmergedlo.so
Control::ImplCallEventListenersAndHandler(VclEventId, 
std::function const&)
include/rtl/ref.hxx:208
program/libmergedlo.so
Button::Click()

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/std_function.h:244

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 329b20d54e29..9f110c6a5aa1 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -351,6 +351,11 @@ void 
SpellDialog::SpellContinue_Impl(std::unique_ptr* pGua
 //then GetNextSentence() has to be called followed again by MarkNextError()
 //MarkNextError is not initially called if the UndoEdit mode is active
 bool bNextSentence = false;
+if (!m_xSentenceED)
+{
+return;
+}
+
 if(!((!m_xSentenceED->IsUndoEditMode() && m_xSentenceED->MarkNextError( 
bIgnoreCurrentError, xSpell )) ||
 ( bNextSentence = GetNextSentence_Impl(pGuard, bUseSavedSentence, 
m_xSentenceED->IsUndoEditMode()) && m_xSentenceED->MarkNextError( false, xSpell 

 return;


[Libreoffice-commits] core.git: Changes to 'feature/cib_contract57d_p1'

2022-09-26 Thread Samuel Mehrbrodt (via logerrit)
New branch 'feature/cib_contract57d_p1' available with the following commits:
commit 649dbebfde2e3111bbdd1d22eb12c6866469b010
Author: Samuel Mehrbrodt 
Date:   Mon Sep 26 16:32:27 2022 +0200

Release 6.3.6.17.p1

Change-Id: Ic3af4f1413d8a6a95f09f992e09e586a2244610f

commit 569808949dc44bc3b18f88479f609a8316cba9d3
Author: Samuel Mehrbrodt 
Date:   Wed May 18 10:28:01 2022 +0200

tdf#149106 Remove RenamePrgFolder and RemovePrgFolder custom msi actions

This duplicates MSI functionality - if a folder cannot be written,
MSI should request a reboot automatically.

See https://bugs.documentfoundation.org/show_bug.cgi?id=149106#c17 for 
details.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134513
Reviewed-by: Mike Kaganski 
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Jenkins
(cherry picked from commit 955fd1c534c061b3b6992dfe034b62b46ee2e844)

Change-Id: I65f295ff6e3bb22afc616feb2ba529413f3e24c0



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

2022-09-26 Thread Caolán McNamara (via logerrit)
 vcl/source/fontsubset/sft.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b98c6e213fa8cbae54c63ce30e7c07cca73b8860
Author: Caolán McNamara 
AuthorDate: Mon Sep 26 12:28:26 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 26 16:34:14 2022 +0200

crashtesting: don't assert on bogus font name in embedded ttf

seen with kde156448-1.pdf, fontforge also warns about the fontname.
Looks like the name starts in little endian (wrong) before switching
to big endian and/or is initially out by one.

䄀爀椀愀氀-BoldItalic
should have been
Arial-BoldItalic

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

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 5c9cc85201e3..80a355423c6b 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -894,7 +894,7 @@ static OString nameExtract( const sal_uInt8* name, int 
nTableSize, int n, int db
 for (int i = 0; i < len/2; i++)
 {
 res[i] = *(ptr + i * 2 + 1);
-assert(res[i] != 0);
+SAL_WARN_IF(res[i] == 0, "vcl.fonts", "font name is bogus");
 }
 if( ucs2result )
 {
@@ -903,7 +903,7 @@ static OString nameExtract( const sal_uInt8* name, int 
nTableSize, int n, int db
 for (int i = 0; i < len/2; i++ )
 {
 buf[i] = GetUInt16( ptr, 2*i );
-assert(buf[i] != 0);
+SAL_WARN_IF(buf[i] == 0, "vcl.fonts", "font name is bogus");
 }
 *ucs2result = buf.makeStringAndClear();
 }


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

2022-09-26 Thread galjit (via logerrit)
 dev/null   
 |binary
 sysui/desktop/icons/hicolor/1024x1024/apps/base.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/calc.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/draw.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/impress.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/main.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/math.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/apps/writer.svg  
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-database.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-drawing-template.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-drawing.svg  
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-formula.svg  
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-master-document.svg  
 |1 -
 
sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-presentation-template.svg 
|1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-presentation.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-spreadsheet-template.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-spreadsheet.svg  
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-text-template.svg
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-text.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-web-template.svg 
 |1 -
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-web.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/base.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/calc.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/chart.svg 
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/draw.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/impress.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/main.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/math.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/apps/writer.svg
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-database.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-drawing-template.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-drawing.svg
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-formula.svg
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-master-document.svg
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-presentation-template.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-presentation.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-spreadsheet-template.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-spreadsheet.svg
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-text-template.svg  
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-text.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-web-template.svg   
 |1 -
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-web.svg
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-drawing-template.svg 
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-presentation-template.svg
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-spreadsheet-template.svg 
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-text-template.svg
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-web-template.svg 
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/presentation-template.svg  
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/presentation.svg   
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/spreadsheet-template.svg   
 |1 -
 sysui/desktop/icons/hicolor/16x16/mimetypes/spreadsheet.svg
 |  

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

2022-09-26 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx  |   78 +---
 sw/qa/filter/html/html.cxx  |   39 
 sw/qa/inc/swmodeltestbase.hxx   |6 ++
 sw/qa/unit/swmodeltestbase.cxx  |9 +++
 sw/source/filter/html/htmlflywriter.cxx |7 ++
 5 files changed, 93 insertions(+), 46 deletions(-)

New commits:
commit 92259b092e7271a638c2f88d7565983dfe49f0b1
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 15:40:29 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 26 19:11:30 2022 +0200

sw HTML export: fix PNG export of Writer images containing metafiles

We attempted to export SVM metafiles as SVM+PNG, but then the SVM was
turned into GIF. A GIF+PNG pair is not useful, just write PNG.

This is similar to commit c8a9396e5695675ffe92935a9ba40354fc76ed79 (sw
XHTML / reqif export: fix PNG export of shapes, 2021-06-03), which did
the same for non-SdrGrafObj shapes.

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

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 103f7bcc5a84..3a212d2242f5 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -196,20 +196,6 @@ public:
 {
 }
 
-/**
- * Wraps a reqif-xhtml fragment into an XHTML file, so an XML parser can
- * parse it.
- */
-static void wrapFragment(const utl::TempFile& rTempFile, SvMemoryStream& 
rStream)
-{
-rStream.WriteCharPtr(
-"http://www.w3.org/1999/xhtml\";>\n");
-SvFileStream aFileStream(rTempFile.GetURL(), StreamMode::READ);
-rStream.WriteStream(aFileStream);
-rStream.WriteCharPtr("\n");
-rStream.Seek(0);
-}
-
 /// Wraps an RTF fragment into a complete RTF file, so an RTF parser can 
handle it.
 static void wrapRtfFragment(const OUString& rURL, SvMemoryStream& rStream)
 {
@@ -286,7 +272,7 @@ public:
 OUString SwHtmlDomExportTest::GetOlePath()
 {
 SvMemoryStream aStream;
-HtmlExportTest::wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 CPPUNIT_ASSERT(pDoc);
 OUString aOlePath = getXPath(
@@ -302,7 +288,7 @@ OUString SwHtmlDomExportTest::GetOlePath()
 OUString SwHtmlDomExportTest::GetPngPath()
 {
 SvMemoryStream aStream;
-HtmlExportTest::wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 CPPUNIT_ASSERT(pDoc);
 OUString aPngPath = getXPath(
@@ -836,7 +822,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqIfTableHeight)
 
 // Then make sure that the explicit cell height is omitted from the output:
 SvMemoryStream aStream;
-HtmlExportTest::wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 // Without the accompanying fix in place, this test would have failed, 
explicit height was
 // written, which is not valid reqif-xhtml.
@@ -897,7 +883,7 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOle2, 
"reqif-ole2.xhtml")
 {
 // Check that the replacement graphic is exported at RTF level.
 SvMemoryStream aStream;
-wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 CPPUNIT_ASSERT(pDoc);
 // Get the path of the RTF data.
@@ -969,7 +955,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testTransparentImageReqIf)
 };
 xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
 SvMemoryStream aStream;
-HtmlExportTest::wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 CPPUNIT_ASSERT(pDoc);
 
@@ -986,7 +972,7 @@ DECLARE_HTMLEXPORT_TEST(testOleNodataReqIf, 
"reqif-ole-nodata.odt")
 {
 // This failed, io::IOException was thrown during the filter() call.
 SvMemoryStream aStream;
-wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 CPPUNIT_ASSERT(pDoc);
 
@@ -1001,7 +987,7 @@ DECLARE_HTMLEXPORT_TEST(testOleNodataReqIf, 
"reqif-ole-nodata.odt")
 DECLARE_HTMLEXPORT_TEST(testNoLangReqIf, "reqif-no-lang.odt")
 {
 SvMemoryStream aStream;
-wrapFragment(maTempFile, aStream);
+WrapReqifFromTempFile(aStream);
 xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
 CPPUNIT_ASSERT(pDoc);
 
@@ -1077,7 +1063,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testBlockQuoteReqIf)
 aMediaDescriptor["FilterOptions"] <<= OUString("xhtmlns=reqif-xhtml");
 xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
 SvMemoryStream aStre

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

2022-09-26 Thread Andrea Gelmini (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 920ca8c8eea0ccd40f42d3d72a3c43f59e6373e8
Author: Andrea Gelmini 
AuthorDate: Mon Sep 26 16:02:03 2022 +0200
Commit: Julien Nabet 
CommitDate: Mon Sep 26 20:10:11 2022 +0200

Fix typo

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 54c8a8189ab5..437acd28df42 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3276,7 +3276,7 @@ namespace
 {
 SfxChildWindow* lcl_initializeSidebar()
 {
-// in init.cxx we do setupSidebar which creaes the controller, do it 
here
+// in init.cxx we do setupSidebar which creates the controller, do it 
here
 
 SfxViewShell* pViewShell = SfxViewShell::Current();
 CPPUNIT_ASSERT(pViewShell);


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

2022-09-26 Thread Andrea Gelmini (via logerrit)
 toolkit/source/awt/vclxaccessiblecomponent.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 55219f771cd4e255a079cb4272f640807c805e0f
Author: Andrea Gelmini 
AuthorDate: Mon Sep 26 18:58:20 2022 +0200
Commit: Julien Nabet 
CommitDate: Mon Sep 26 20:16:04 2022 +0200

Fix typo

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

diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx 
b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 5d3b15653ba3..7fbb1ea1ccd6 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -185,7 +185,7 @@ void VCLXAccessibleComponent::ProcessWindowChildEvent( 
const VclWindowEvent& rVc
 xAcc = GetChildAccessible( rVclWindowEvent );
 if( xAcc.is() )
 {
-// send send state change event for SHOWING before sending the 
CHILD event below,
+// send state change event for SHOWING before sending the 
CHILD event below,
 // since that one results in a11y event listeners getting 
removed
 uno::Reference xChildContext = 
xAcc->getAccessibleContext();
 if (xChildContext.is())


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - bin/check-elf-dynamic-objects configure.ac m4/libo_externals.m4

2022-09-26 Thread Tor Lillqvist (via logerrit)
 bin/check-elf-dynamic-objects |2 +-
 configure.ac  |   10 +-
 m4/libo_externals.m4  |2 +-
 3 files changed, 3 insertions(+), 11 deletions(-)

New commits:
commit c9409ff2d467f0b29f0fa0a1f16e33bdf165bc1e
Author: Tor Lillqvist 
AuthorDate: Thu Sep 8 13:51:07 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:53:31 2022 +0200

Temporarily revert "tdf#147250 configure: default to --with-system-nss 
on..."

I am going to back-port some other commits that interfere with this,
and will then re-apply this as part of that.

This reverts commit 16ad0a66321530b185138af3a5b01b38c572e396.

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

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 712856d1104c..523a892e4259 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 libnspr4.so libnss3.so libnssutil3.so 
libplc4.so libplds4.so libsmime3.so libssl3.so ${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 ${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 121af3c74626..910c6f6655b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10505,15 +10505,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],,,[
-case "$_os" in
-Linux)
-with_system_nss=yes
-;;
-*)
-with_system_nss=no
-;;
-esac])
+libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
 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 659b539dc539..f755358bb395 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -10,7 +10,7 @@ AC_DEFUN([libo_CHECK_SYSTEM_MODULE], [
 AC_ARG_WITH(system-$1,
 AS_HELP_STRING([--with-system-$1],
 [Use $1 from operating system instead of building and bundling it.]),,
-ifelse([$6],,[with_system_$1="$with_system_libs"],[[$6]]))
+[with_system_$1="$with_system_libs"])
 AC_MSG_CHECKING([which $1 to use])
 if test "$with_system_$1" = "yes"; then
 AC_MSG_RESULT([external])


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

2022-09-26 Thread Jan-Marek Glogowski (via logerrit)
 m4/libo_externals.m4 |   30 ++
 1 file changed, 18 insertions(+), 12 deletions(-)

New commits:
commit df45cb78617eebcace731c2a8e61cc4aaec2a8cf
Author: Jan-Marek Glogowski 
AuthorDate: Tue May 25 14:57:29 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:54:32 2022 +0200

m4: Add test flag to libo_CHECK_SYSTEM_MODULE

Automatically adds an ENABLE_* AC_SUBST and test for a disabled
test via test_*, like ENABLE_EPUBGEN and test_libepubgen.

Change-Id: Ifaf27d4d1193f41de6291ab70d973fe151f36b2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126169
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140049
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/m4/libo_externals.m4 b/m4/libo_externals.m4
index f755358bb395..d19178ab8250 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -12,20 +12,26 @@ AC_ARG_WITH(system-$1,
 [Use $1 from operating system instead of building and bundling it.]),,
 [with_system_$1="$with_system_libs"])
 AC_MSG_CHECKING([which $1 to use])
-if test "$with_system_$1" = "yes"; then
-AC_MSG_RESULT([external])
-SYSTEM_$2=TRUE
-PKG_CHECK_MODULES([$2], [$3])
-$2_CFLAGS=$(printf '%s' "${$2_CFLAGS}" | sed -e "s/-I/${ISYSTEM?}/g")
-FilterLibs "${$2_LIBS}"
-$2_LIBS="$filteredlibs"
+if test "$test_$1" != "no"; then
+ENABLE_$2=TRUE
+if test "$with_system_$1" = "yes"; then
+AC_MSG_RESULT([external])
+SYSTEM_$2=TRUE
+PKG_CHECK_MODULES([$2], [$3])
+$2_CFLAGS=$(printf '%s' "${$2_CFLAGS}" | sed -e "s/-I/${ISYSTEM?}/g")
+FilterLibs "${$2_LIBS}"
+$2_LIBS="$filteredlibs"
+else
+AC_MSG_RESULT([internal])
+SYSTEM_$2=
+$2_CFLAGS=$4
+$2_LIBS=$5
+BUILD_TYPE="$BUILD_TYPE $2"
+fi
 else
-AC_MSG_RESULT([internal])
-SYSTEM_$2=
-$2_CFLAGS=$4
-$2_LIBS=$5
-BUILD_TYPE="$BUILD_TYPE $2"
+AC_MSG_RESULT([ignored])
 fi
+AC_SUBST([ENABLE_$2])
 AC_SUBST([SYSTEM_$2])
 AC_SUBST([$2_CFLAGS])
 AC_SUBST([$2_LIBS])


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - configure.ac m4/libo_externals.m4

2022-09-26 Thread Jan-Marek Glogowski (via logerrit)
 configure.ac |   62 ++-
 m4/libo_externals.m4 |   12 ++---
 2 files changed, 26 insertions(+), 48 deletions(-)

New commits:
commit be7a238c33dc02dfba40b2ad60485a56f4685d26
Author: Jan-Marek Glogowski 
AuthorDate: Tue Dec 7 05:19:01 2021 +0100
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:54:56 2022 +0200

Simplify FONTCONFIG and FREETYPE tests

Add an additional option to libo_CHECK_SYSTEM_MODULE to select
the default external lookup.

Don't "if" the libo_CHECK_SYSTEM_MODULE, so the AC_SUBST are
always run, but set the test_* flags instead.

Change-Id: Ie0a1204b34d596fdd57a7ee770418f91bf8c5d00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126464
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140050
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/configure.ac b/configure.ac
index 910c6f6655b9..c4de07a897b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1171,6 +1171,9 @@ if test "$using_freetype_fontconfig" = yes; then
 AC_DEFINE(ENABLE_HEADLESS)
 ENABLE_HEADLESS=TRUE
 fi
+else
+test_fontconfig=no
+test_freetype=no
 fi
 
 AC_SUBST(ENABLE_HEADLESS)
@@ -5863,23 +5866,7 @@ fi
 
 AC_SUBST(ENABLE_CUPS)
 
-# fontconfig checks
-if test "$using_freetype_fontconfig" = yes; then
-AC_MSG_CHECKING([which fontconfig to use])
-fi
-if test "$using_freetype_fontconfig" = yes -a "$test_system_fontconfig" != no; 
then
-AC_MSG_RESULT([external])
-PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.4.1])
-SYSTEM_FONTCONFIG=TRUE
-FilterLibs "${FONTCONFIG_LIBS}"
-FONTCONFIG_LIBS="${filteredlibs}"
-elif test "$using_freetype_fontconfig" = yes; then
-AC_MSG_RESULT([internal])
-BUILD_TYPE="$BUILD_TYPE FONTCONFIG"
-fi
-AC_SUBST(FONTCONFIG_CFLAGS)
-AC_SUBST(FONTCONFIG_LIBS)
-AC_SUBST([SYSTEM_FONTCONFIG])
+libo_CHECK_SYSTEM_MODULE([fontconfig],[FONTCONFIG],[fontconfig >= 
2.4.1],,,TRUE)
 
 dnl whether to find & fetch external tarballs?
 dnl ===
@@ -9511,38 +9498,25 @@ fi
 
 dnl ===
 dnl Check whether freetype is available
+dnl
+dnl FreeType has 3 different kinds of versions
+dnl * release, like 2.4.10
+dnl * libtool, like 13.0.7 (this what pkg-config returns)
+dnl * soname
+dnl FreeType's docs/VERSION.DLL provides a table mapping between the three
+dnl
+dnl 9.9.3 is 2.2.0
+dnl When the minimal version is at least 2.8.1, remove Skia's check down below.
 dnl ===
-if test "$using_freetype_fontconfig" = yes; then
-AC_MSG_CHECKING([which freetype to use])
-fi
-if test "$using_freetype_fontconfig" = yes -a "$test_system_freetype" != no; 
then
-AC_MSG_RESULT([external])
-# FreeType has 3 different kinds of versions
-# * release, like 2.4.10
-# * libtool, like 13.0.7 (this what pkg-config returns)
-# * soname
-# FreeType's docs/VERSION.DLL provides a table mapping between the three
-#
-# 9.9.3 is 2.2.0
-# When the minimal version is at least 2.8.1, remove Skia's check down 
below.
-PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.9.3)
-FREETYPE_CFLAGS=$(printf '%s' "$FREETYPE_CFLAGS" | sed -e 
"s/-I/${ISYSTEM?}/g")
-FilterLibs "${FREETYPE_LIBS}"
-FREETYPE_LIBS="${filteredlibs}"
-SYSTEM_FREETYPE=TRUE
-elif test "$using_freetype_fontconfig" = yes; then
-AC_MSG_RESULT([internal])
-FREETYPE_CFLAGS="${ISYSTEM}${WORKDIR}/UnpackedTarball/freetype/include"
+if test "$test_freetype" != no; then
 if test "x$ac_config_site_64bit_host" = xYES; then
-FREETYPE_LIBS="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib64 
-lfreetype"
+
FREETYPE_LIBS_INTERNAL="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib64 
-lfreetype"
 else
-FREETYPE_LIBS="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib 
-lfreetype"
+
FREETYPE_LIBS_INTERNAL="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib 
-lfreetype"
 fi
-BUILD_TYPE="$BUILD_TYPE FREETYPE"
 fi
-AC_SUBST(FREETYPE_CFLAGS)
-AC_SUBST(FREETYPE_LIBS)
-AC_SUBST([SYSTEM_FREETYPE])
+libo_CHECK_SYSTEM_MODULE([freetype],[FREETYPE],[freetype2 >= 9.9.3],
+
["${ISYSTEM}${WORKDIR}/UnpackedTarball/freetype/include"],["$FREETYPE_LIBS_INTERNAL"],TRUE)
 
 # ===
 # Check for system libxslt
diff --git a/m4/libo_externals.m4 b/m4/libo_externals.m4
index d19178ab8250..b2b314fec933 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -6,15 +6,19 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; 
fill-column: 102 -*
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
+# ,,,
+# ,,
 AC_DEFUN([l

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

2022-09-26 Thread Stephan Bergmann (via logerrit)
 external/fontconfig/ExternalProject_fontconfig.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1689ce98ce2b41470497a9c2468d47ee62ae638b
Author: Stephan Bergmann 
AuthorDate: Tue Jan 11 09:14:43 2022 +0100
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:55:24 2022 +0200

Make external/fontconfig use -fPIC

...to prevent Library_skia from failing to link with

> /usr/bin/ld.gold: error: 
workdir/UnpackedTarball/fontconfig/src/.libs/libfontconfig.a(fccfg.o): requires 
dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC

etc. in a --without-system-fontconfig build

Change-Id: Idd09785096d1a8be3f3086d6e565f307fa046a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128267
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140051
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/external/fontconfig/ExternalProject_fontconfig.mk 
b/external/fontconfig/ExternalProject_fontconfig.mk
index 1d65173ce0f5..8cb9498fe763 100644
--- a/external/fontconfig/ExternalProject_fontconfig.mk
+++ b/external/fontconfig/ExternalProject_fontconfig.mk
@@ -25,6 +25,7 @@ $(call gb_ExternalProject_get_state_target,fontconfig,build) :
$(gb_RUN_CONFIGURE) ./configure \
--disable-shared \
--disable-silent-rules \
+   --with-pic \
$(if $(filter ANDROID,$(OS)),--with-arch=arm) \
--with-expat-includes=$(call 
gb_UnpackedTarball_get_dir,expat)/lib \
--with-expat-lib=$(gb_StaticLibrary_WORKDIR) \


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

2022-09-26 Thread Stephan Bergmann (via logerrit)
 external/freetype/ExternalProject_freetype.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ac891f0ba9d4c2675d7dae8390a28f44a7a83eaf
Author: Stephan Bergmann 
AuthorDate: Sun Jan 2 12:31:14 2022 +0100
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:56:16 2022 +0200

Make external/freetype use -fPIC

...to prevent Library_pdfium from failing to link with

> ld.lld: error: relocation R_X86_64_64 cannot be used against local 
symbol; recompile with -fPIC
> >>> defined in 
workdir/UnpackedTarball/freetype/instdir/lib/libfreetype.a(ftinit.o)
> >>> referenced by ftinit.c:89 (src/base/ftinit.c:89)
> >>>   ftinit.o:(FT_Add_Default_Modules) in archive 
workdir/UnpackedTarball/freetype/instdir/lib/libfreetype.a

etc., presumably since 8677e994d37329a28ca8278358a99d18b9cada69 "Simplify
FONTCONFIG and FREETYPE tests" no longer implicitly forces use of system
freetype on Linux

Change-Id: I2743619768e2dd636ec431408fcb2871871504f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127864
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140052
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/external/freetype/ExternalProject_freetype.mk 
b/external/freetype/ExternalProject_freetype.mk
index 032e0362917a..a3e0a7ca3e4b 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -18,6 +18,7 @@ $(call gb_ExternalProject_get_state_target,freetype,build) :
$(call gb_ExternalProject_run,build,\
$(gb_RUN_CONFIGURE) ./configure \
--disable-shared \
+   --with-pic \
--without-zlib \
--without-brotli \
--without-bzip2 \


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

2022-09-26 Thread Stephan Bergmann (via logerrit)
 external/freetype/ExternalProject_freetype.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b48cb69dae4118fe4a471921510281bbd16f5c4f
Author: Stephan Bergmann 
AuthorDate: Wed Jan 5 08:07:11 2022 +0100
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:56:42 2022 +0200

Explicitly build external/freetype --without-png

...instead of having its configure.ac determine whether to support png 
based on
it being installed on the system, but which then might cause a Linux
--without-system-freetype build to fail to link Library_pdfium with

> workdir/UnpackedTarball/freetype/src/sfnt/pngshim.c:199: error: undefined 
reference to 'png_get_error_ptr'

etc.

Change-Id: Idf47ba5252b8f4d7f2e295f7adf6b761dbee4d2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127985
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140053
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/external/freetype/ExternalProject_freetype.mk 
b/external/freetype/ExternalProject_freetype.mk
index a3e0a7ca3e4b..4cb2920ae923 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -23,6 +23,7 @@ $(call gb_ExternalProject_get_state_target,freetype,build) :
--without-brotli \
--without-bzip2 \
--without-harfbuzz \
+   --without-png \
--prefix=$(call 
gb_UnpackedTarball_get_dir,freetype/instdir) \
--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
CFLAGS="$(CFLAGS) $(if $(debug),-g) 
$(gb_VISIBILITY_FLAGS)" \


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - external/skia sdext/Executable_xpdfimport.mk vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk

2022-09-26 Thread Tor Lillqvist (via logerrit)
 external/skia/Library_skia.mk  |1 +
 sdext/Executable_xpdfimport.mk |2 ++
 vcl/Library_vcl.mk |1 +
 vcl/Library_vclplug_gen.mk |1 +
 4 files changed, 5 insertions(+)

New commits:
commit 1c43b81320ee54e719661ca85a74ff5fd1e90720
Author: Tor Lillqvist 
AuthorDate: Thu Sep 15 12:53:54 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:57:48 2022 +0200

Fix building without system cairo, fontconfig, freetype, and harfbuzz

At least for me, this was needed when I added --without-system-cairo
--without-system-fontconfig --without-system-freetype
--without-system-harfbuzz to my otherwise fairly normal autogen.input
on Linux.

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

diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index d3c3dd2cae7c..48717bdcffb3 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -83,6 +83,7 @@ endif
 
 else
 $(eval $(call gb_Library_use_externals,skia,\
+expat \
 freetype \
 fontconfig \
 ))
diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index 495671a4ecae..bbdc76217c59 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_Executable_Executable,xpdfimport))
 
 $(eval $(call gb_Executable_use_externals,xpdfimport,\
 boost_headers \
+expat \
+freetype \
 poppler \
 $(if $(filter-out WNT MACOSX,$(OS)),fontconfig) \
 zlib \
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index fe0e0998ed4e..75b37832cfea 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_Library_use_libraries,vcl,\
 
 $(eval $(call gb_Library_use_externals,vcl,\
 boost_headers \
+expat \
 gio \
 glm_headers \
 graphite \
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 3ebf80034c91..a8d4bb5ac26f 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -54,6 +54,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\
cairo \
graphite \
epoxy \
+   expat \
glm_headers \
harfbuzz \
icu_headers \


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

2022-09-26 Thread Tor Lillqvist (via logerrit)
 configure.ac |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 2076ae6168a76c534262a191442448186692ea74
Author: Tor Lillqvist 
AuthorDate: Thu Sep 15 14:44:27 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:58:50 2022 +0200

Make --with-system-nss default on Linux again

Functionally revert what I did in the 'Temporarily revert "tdf#147250
configure: default to --with-system-nss on..."' commit.

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

diff --git a/configure.ac b/configure.ac
index c4de07a897b9..7b855a5e89a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10479,7 +10479,14 @@ 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])
+case "$_os" in
+Linux)
+libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 
4.8],,,TRUE)
+;;
+*)
+libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
+;;
+esac
 AC_DEFINE(HAVE_FEATURE_NSS)
 ENABLE_NSS=TRUE
 elif test $_os != iOS ; then


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source external/cairo external/fontconfig external/freetype external/harfbuzz vcl/source vcl/unx

2022-09-26 Thread Tor Lillqvist (via logerrit)
 desktop/source/lib/init.cxx  |   20 +++
 external/cairo/ExternalPackage_cairo.mk  |3 
 external/cairo/UnpackedTarball_cairo.mk  |2 
 external/cairo/cairo/cairo-fd-hack.patch.0   |   15 ++
 external/cairo/cairo/libcairo-bundled-soname.patch.0 |   12 ++
 external/fontconfig/ExternalPackage_fontconfig.mk|   16 ++
 external/fontconfig/ExternalProject_fontconfig.mk|   15 ++
 external/fontconfig/Module_fontconfig.mk |1 
 external/fontconfig/UnpackedTarball_fontconfig.mk|1 
 external/fontconfig/libfontconfig-bundled-soname.patch.0 |   11 +
 external/freetype/ExternalPackage_freetype.mk|   16 ++
 external/freetype/ExternalProject_freetype.mk|5 
 external/freetype/Module_freetype.mk |1 
 external/freetype/UnpackedTarball_freetype.mk|2 
 external/freetype/freetype-fd-hack.patch.0   |   53 
 external/freetype/libfreetype-bundled-soname.patch.0 |   11 +
 external/harfbuzz/ExternalPackage_harfbuzz.mk|   17 ++
 external/harfbuzz/ExternalProject_harfbuzz.mk|9 +
 external/harfbuzz/Module_harfbuzz.mk |1 
 external/harfbuzz/UnpackedTarball_harfbuzz.mk|4 
 external/harfbuzz/harfbuzz-fd-hack.patch.0   |   24 
 external/harfbuzz/libharfbuzz-bundled-soname.patch.0 |   24 
 vcl/source/fontsubset/sft.cxx|   23 +++
 vcl/unx/generic/fontmanager/fontmanager.cxx  |   90 ---
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx   |   13 ++
 25 files changed, 342 insertions(+), 47 deletions(-)

New commits:
commit d8b04077bb63f05efa256f353bfd6acb409a6983
Author: Tor Lillqvist 
AuthorDate: Tue Sep 20 16:07:14 2022 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Sep 26 20:59:18 2022 +0200

Enable opening of downloaded fonts only in ForKit in Online

We want that only the ForKit process needs to have access to new font
files added to a Collabora Online instance dynamically by downloading
from a server. There are however many locations in the Kit process, in
core and in external libraries like harfbuzz, where the code wants to
open a font file.

Handle this so that the ForKit process opens such a downloaded font
file and doesn't close it. The file descriptor is thus inherited by
Kit processes.  The font file pathname passed on to other code is a
fake on in the format "/:FD:/%d" where the %d is the file descriptor
of the opened font file. Add checks in all places where font files are
opened, look for this special pathname format, and modify the code to
just dup() the already open file descriptor in that case.

All this is relevant for Linux only, as Collabora Online runs on
Linux.

Do the above for harfbuzz, cairo, fontconfig, and freetype.

In addition make sure that these libraries when bundled, on Linux, are
built as shared libraries, and won't be confused with the
corresponding system libraries by making sure their sonames are
different.

Change-Id: I85ff853ac1d1f6b098a3c254a38e3fe3bca774c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140243
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4eed88331948..a08c6d8b275d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -24,6 +24,10 @@
 #include 
 #endif
 
+#ifdef LINUX
+#include 
+#endif
+
 #ifdef ANDROID
 #include 
 #endif
@@ -4330,13 +4334,27 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, 
const char *pOption, const c
 else
 sal_detail_set_log_selector(pCurrentSalLogOverride);
 }
+#ifdef LINUX
 else if (strcmp(pOption, "addfont") == 0)
 {
+if (memcmp(pValue, "file://", 7) == 0)
+pValue += 7;
+
+int fd = open(pValue, O_RDONLY);
+if (fd == -1)
+{
+std::cerr << "Could not open font file '" << pValue << "': " << 
strerror(errno) << std::endl;
+return;
+}
+
+OUString sMagicFileName = "file:///:FD:/" + OUString::number(fd);
+
 OutputDevice *pDevice = Application::GetDefaultDevice();
 OutputDevice::ImplClearAllFontData(false);
-pDevice->AddTempDevFont(OUString::fromUtf8(pValue), "");
+pDevice->AddTempDevFont(sMagicFileName, "");
 OutputDevice::ImplRefreshAllFontData(false);
 }
+#endif
 }
 
 static void lo_dumpState (LibreOfficeKit* pThis, const char* /* pOptions */, 
char** pState)
diff --git a/external/cairo/ExternalPackage_cairo.mk 
b/external/cairo/ExternalPackage_cairo.mk
index 116db8a3499d..74a46688406a 100644
--- a/external/cairo/ExternalPackage_cairo.mk
+++ b/external/cairo/Externa

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

2022-09-26 Thread Eike Rathke (via logerrit)
 svl/source/numbers/zforfind.cxx |   16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 0d3dd0aa54ad792f91d0905f3d46c13df3512d89
Author: Eike Rathke 
AuthorDate: Mon Sep 26 22:52:02 2022 +0200
Commit: Eike Rathke 
CommitDate: Tue Sep 27 00:33:39 2022 +0200

Prevent erroneous fraction detection of not yet accepted date

May had happened if the locale's date separator is not '/' but a
preset format uses it (for example DD/MM/) and the locale's
date acceptance patterns do not contain D/M/Y so the first '/' did
not already lead to a possible date before a match against the
format is to be tried.

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

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index a30bbf600ef6..56c929e44407 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -2633,15 +2633,17 @@ bool ImpSvNumberInputScan::ScanMidString( const 
OUString& rString, sal_uInt16 nS
 if (SkipChar('/', rString, nPos))   // fraction?
 {
 if ( eScannedType != SvNumFormatType::UNDEFINED &&  // already another 
type
- eScannedType != SvNumFormatType::DATE)   // except date
+ eScannedType != SvNumFormatType::DATE) // except date
 {
-return MatchedReturn(); // => jan/31/1994
+return MatchedReturn(); // => jan/31/1994
 }
-else if (eScannedType != SvNumFormatType::DATE &&// analyzed no 
date until now
- ( eSetType == SvNumFormatType::FRACTION ||  // and preset was 
fraction
-   (nNumericsCnt == 3 && // or 3 numbers
-(nStringPos == 3 ||  // and 3rd string 
particle
- (nStringPos == 4 && nSign)  // or 4th  if signed
+else if (eScannedType != SvNumFormatType::DATE &&   // analyzed no 
date until now
+ (eSetType == SvNumFormatType::FRACTION ||  // and preset was 
fraction
+  (nNumericsCnt == 3 && // or 3 numbers
+   (nStringPos == 3 ||  // and 4th string 
particle
+(nStringPos == 4 && nSign)) &&  // or 5th if signed
+   sStrArray[nStringPos-2].indexOf('/') == -1)))  // and not 
23/11/1999
+  // that was 
not accepted as date yet
 {
 SkipBlanks(rString, nPos);
 if (nPos == rString.getLength())


[Libreoffice-commits] core.git: Changes to 'refs/tags/cib-6.1-37'

2022-09-26 Thread Vasily Melenchuk (via logerrit)
Tag 'cib-6.1-37' created by Thorsten Behrens  
at 2022-09-26 07:46 +

Release CIB Office 6.1-37
-BEGIN PGP SIGNATURE-

iQKTBAABCgB9FiEEF13c36gxow74AXmeM3dpmHHuF/gFAmMxWL1fFIAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE3
NUREQ0RGQTgzMUEzMEVGODAxNzk5RTMzNzc2OTk4NzFFRTE3RjgACgkQM3dpmHHu
F/ggLA//f11Iv6eJJvR06zFm5K8IL1ZEp1OEXl54QR4CQ9IpEh7ffx2oAfxuj5u1
x1M4Au5n13zzenj0SnqrLK665lM5MRitJV8NontlMOM+7Okt33zwJ/fPHduhNsgs
aJxu15/GyXEFWY+KQN1514JFfxgMxHlo9LBcKzUQ6CkjqumVA7eslt3BL+i696E1
10BLI/CW9yZeIQi38R5QRTEVarvH+trhNTeNOtrnlO0lLiFGqj/xpOvg/DbLtzlm
YgXOfUCq9VYcVcqgmwU5JutnQbLc1BV7FVzvbZ1N/4Z7P1afmq91XGxbb0K6KRMP
xSUHGuAxaYivg0Q7uQhB4ZfgJ5g0vdRXAnKG7sHuECHTVMzckEt8wvSkINAu8Qz7
gDA1feImxLGbiaY6EuE+ceeuOwdMbnFlRb/f2M2zOpqoL3a5cxl2GrqlJMvE6xM+
HVjUGn4st6mUtf6W1XorHNvCmtkrO7VKlzf0Mwm0MdfAiScTpa3YXK65Kg00rMs6
v8ymfUh12vXUvxWnkWaITZX7BjSN/OLTVKp+QHLenUoZP8AaUM1DdClFztC5hgH3
Bc80TtjXNsUrDQs9AW/RdeHLZPdpv3jmB8K7qBqrBKBAo62szNYUo9r1nbLLsa54
DYigxqYCS9B73NNSW0qD3YnVpwOd7sCwjeWGLMb+jRPbcgmbHzo=
=TxV3
-END PGP SIGNATURE-

Changes since cib-6.1-36-10:
---
 0 files changed
---


[Libreoffice-commits] core.git: Changes to 'refs/tags/cib-6.4-10'

2022-09-26 Thread Michael Stahl (via logerrit)
Tag 'cib-6.4-10' created by Thorsten Behrens  
at 2022-09-27 00:38 +

Release CIB Office 6.4-10
-BEGIN PGP SIGNATURE-

iQKTBAABCgB9FiEEF13c36gxow74AXmeM3dpmHHuF/gFAmMyRg5fFIAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE3
NUREQ0RGQTgzMUEzMEVGODAxNzk5RTMzNzc2OTk4NzFFRTE3RjgACgkQM3dpmHHu
F/h7vQ//YmzKLGGcE0Uas2NkzVE42zoeJq20BkK3jicIaBCtlBc4IoSelNM0W9op
n19SWvB/a+dGjtFvDiCYoZ1KsN9PqX4fb7p2nwoDQtOQRxmy5mk7IiWyFq5X1z/3
9qAQvMILFE+M2XxsvE2sIOg15y+IKO64dq81sC0YlRgc1sHWtUe9Ul6LwV35+Sol
7o1LniXKjjfiCdsuaeNBRdebpQEGeiV+hzpFa2D3OApVh8p3+UPnjtR69PMMhqVe
HLXnVhzsmAcOARFn6/vJE80rT5YlN5rXRzupipRkaB9QqEbYu25RedcmHs1e94g2
ICk+7IUG72+ftIp+tl8/e6bGfmQwULu9AD1UuQ9MeBMJs/AZMmU6Qd6zr81bSKTt
PghxuZQj2usjN7uC4FFByktuvTbCmqtiqma/oL9bAWOW2gRsjgDqKS3aD/7tNDjv
udqrhs8eG5NUX5ehMaZpcttntlStkqM1Qv3cGAq1k3MftMVNWSkQrzUrhgRM6S+S
htpgec1v1jjkr8pq03Z01Ei1BMuUs57n+/TG4RDfoPLuFs4bT4zHoN7LwPGwhK6M
dCI2pH6qcFsDnAhq6aFiSSX2YxBClsKAf9jWzf85JinMB4hupc6v2wiXPwBEnudG
h2DB7cDD5UjGvtmJz7BtH8aDOGSDHsfP4YkysJ+2u+rUV2JsKJA=
=mdIH
-END PGP SIGNATURE-

Changes since cib-6.4-9-127:
---
 0 files changed
---


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

2022-09-26 Thread Noel Grandin (via logerrit)
 connectivity/source/drivers/hsqldb/HStorageMap.cxx  |4 +-
 connectivity/source/drivers/postgresql/pq_statement.cxx |6 +--
 connectivity/source/drivers/postgresql/pq_statement.hxx |2 -
 connectivity/source/drivers/postgresql/pq_tools.cxx |   28 
 connectivity/source/drivers/postgresql/pq_tools.hxx |4 +-
 connectivity/source/inc/hsqldb/HStorageMap.hxx  |2 -
 6 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 23a7bdecee5278673a7c79286fb3faea553a85b2
Author: Noel Grandin 
AuthorDate: Mon Sep 26 15:49:48 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 27 07:58:41 2022 +0200

use more string_view in connectivity

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

diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx 
b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 4d4863619186..01a9c3d34be3 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -132,9 +132,9 @@ namespace connectivity::hsqldb
 return OUString::number(s_nCount++);
 }
 
-OUString StorageContainer::removeURLPrefix(std::u16string_view 
_sURL,const OUString& _sFileURL)
+OUString StorageContainer::removeURLPrefix(std::u16string_view _sURL, 
std::u16string_view _sFileURL)
 {
-return OUString(_sURL.substr(_sFileURL.getLength()+1));
+return OUString(_sURL.substr(_sFileURL.size()+1));
 }
 
 OUString StorageContainer::removeOldURLPrefix(const OUString& _sURL)
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx 
b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 1dc5e8c420f6..9622bfee6b7a 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -590,7 +590,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
 ConnectionSettings *pConnectionSettings,
 const Reference< XConnection > &connection,
 sal_Int32 nLastOid,
-const OUString & lastTableInserted,
+std::u16string_view lastTableInserted,
 const OString & lastQuery )
 {
 Reference< XResultSet > ret;
@@ -599,7 +599,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
 splitConcatenatedIdentifier(
 lastTableInserted, &schemaName, &tableName );
 
-if( nLastOid && lastTableInserted.getLength() )
+if( nLastOid && lastTableInserted.size() )
 {
 OUStringBuffer buf( 128 );
 buf.append( "SELECT * FROM " );
@@ -611,7 +611,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
 buf.append( nLastOid );
 query = buf.makeStringAndClear();
 }
-else if ( lastTableInserted.getLength() && lastQuery.getLength() )
+else if ( lastTableInserted.size() && lastQuery.getLength() )
 {
 // extract nameValue Pairs
 String2StringMap namedValues;
diff --git a/connectivity/source/drivers/postgresql/pq_statement.hxx 
b/connectivity/source/drivers/postgresql/pq_statement.hxx
index fae6568bb505..816d2a55afaa 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.hxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.hxx
@@ -189,7 +189,7 @@ css::uno::Reference< css::sdbc::XResultSet > 
getGeneratedValuesFromLastInsert(
 ConnectionSettings *pConnectionSettings,
 const css::uno::Reference< css::sdbc::XConnection > &connection,
 sal_Int32 nLastOid,
-const OUString & lastTableInserted,
+std::u16string_view lastTableInserted,
 const OString & lastQuery );
 
 
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx 
b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 94f032f8c128..b9ff495a5105 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -315,30 +315,30 @@ bool isWhitespace( sal_Unicode c )
 return ' ' == c || 9 == c || 10 == c || 13 == c;
 }
 
-OUString extractTableFromInsert( const OUString & sql )
+OUString extractTableFromInsert( std::u16string_view sql )
 {
 OUString ret;
-int i = 0;
-while (i < sql.getLength() && isWhitespace(sql[i])) { i++; }
+size_t i = 0;
+while (i < sql.size() && isWhitespace(sql[i])) { i++; }
 
-if( sql.matchIgnoreAsciiCase("insert", i) )
+if( o3tl::matchIgnoreAsciiCase(sql, u"insert", i) )
 {
 i += 6;
-while (i < sql.getLength() && isWhitespace(sql[i])) { i++; }
-if( sql.matchIgnoreAsciiCase("into", i) )
+while (i < sql.size() && isWhitespace(sql[i])) { i++; }
+if( o3tl::matchIgnoreAsciiCase(sql, u"into", i) )
 {
 i +=4;
-while (i < sql.getLength() && isWhitespace(sql[i])) { i++; }
+while (i < sql.size() && isWhitespace(sql[i]))

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

2022-09-26 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |8 ++---
 dbaccess/source/core/misc/dsntypes.cxx |4 +-
 dbaccess/source/core/recovery/dbdocrecovery.cxx|   23 -
 dbaccess/source/filter/hsqldb/rowinputbinary.cxx   |4 +-
 dbaccess/source/filter/hsqldb/utils.cxx|4 +-
 dbaccess/source/filter/hsqldb/utils.hxx|2 -
 dbaccess/source/inc/dsntypes.hxx   |2 -
 dbaccess/source/ui/control/SqlNameEdit.cxx |8 ++---
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx  |2 -
 dbaccess/source/ui/dlg/DbAdminImpl.hxx |4 +-
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx|   14 +++---
 dbaccess/source/ui/dlg/dbwizsetup.cxx  |8 ++---
 dbaccess/source/ui/inc/SqlNameEdit.hxx |2 -
 13 files changed, 46 insertions(+), 39 deletions(-)

New commits:
commit 1026527a517fbdf35392d97f89b470a02d2e40e0
Author: Noel Grandin 
AuthorDate: Mon Sep 26 15:50:56 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 27 07:59:08 2022 +0200

use more string_view in dbaccess

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

diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f69742d4422a..45d9a8ce6595 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1524,9 +1524,9 @@ OUString OSingleSelectQueryComposer::getStatementPart( 
TGetParseNode const & _aG
 
 namespace
 {
-OUString lcl_getDecomposedColumnName(const OUString& rComposedName, const 
OUString& rQuoteString)
+OUString lcl_getDecomposedColumnName(const OUString& rComposedName, 
std::u16string_view rQuoteString)
 {
-const sal_Int32 nQuoteLength = rQuoteString.getLength();
+const size_t nQuoteLength = rQuoteString.size();
 OUString sName = rComposedName.trim();
 OUString sColumnName;
 sal_Int32 nPos, nRPos = 0;
@@ -1539,7 +1539,7 @@ namespace
 nRPos = sName.indexOf( rQuoteString, nPos + nQuoteLength );
 if ( nRPos > nPos )
 {
-if ( nRPos + nQuoteLength < sName.getLength() )
+if ( static_cast(nRPos + nQuoteLength) < 
sName.getLength() )
 {
 nRPos += nQuoteLength; // -1 + 1 skip dot
 }
@@ -1561,7 +1561,7 @@ namespace
 OUString lcl_getCondition(const Sequence< Sequence< PropertyValue > >& 
filter,
 const OPredicateInputController& i_aPredicateInputController,
 const Reference< XNameAccess >& i_xSelectColumns,
-const OUString& rQuoteString)
+std::u16string_view rQuoteString)
 {
 OUStringBuffer sRet;
 const Sequence< PropertyValue >* pOrIter = filter.getConstArray();
diff --git a/dbaccess/source/core/misc/dsntypes.cxx 
b/dbaccess/source/core/misc/dsntypes.cxx
index 91b93f353946..0038e0968c77 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -106,7 +106,7 @@ OUString ODsnTypeCollection::cutPrefix(std::u16string_view 
_sURL) const
 return sRet;
 }
 
-OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const
+OUString ODsnTypeCollection::getPrefix(std::u16string_view _sURL) const
 {
 OUString sRet;
 OUString sOldPattern;
@@ -119,7 +119,7 @@ OUString ODsnTypeCollection::getPrefix(const OUString& 
_sURL) const
 //   foo*
 // that is, the very concept of "prefix" applies.
 sRet = comphelper::string::stripEnd(dsnPrefix, '*');
-OSL_ENSURE(sRet.getLength() <= _sURL.getLength(), "How can A match 
B when A shorter than B?");
+OSL_ENSURE(sRet.getLength() <= 
static_cast(_sURL.size()), "How can A match B when A shorter than 
B?");
 sOldPattern = dsnPrefix;
 }
 }
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx 
b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index e027cc834e37..1c8763c02b4c 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -65,23 +66,23 @@ namespace dbaccess
 o_rBuffer.append( sal_Unicode( i_rComponentDesc.second.bForEditing 
? '1' : '0' ) );
 }
 
-bool lcl_extractCompDesc( const OUString& i_rIniLine, OUString& 
o_rStorName, SubComponentDescriptor& o_rCompDesc )
+bool lcl_extractCompDesc( std::u16string_view i_rIniLine, OUString& 
o_rStorName, SubComponentDescriptor& o_rCompDesc )
 {
-const sal_Int32 nEqualSignPos = i_rIniLine.indexOf( '=' );
-i

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

2022-09-26 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/inc/drpcps.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f01d7029601f01b591f8b36fb19d7c46742da880
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 19:30:29 2022 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 27 08:12:42 2022 +0200

sw: document SwDropCapsDlg

It works with the current view in the SwDropCapsPage ctor, which is a
bit poor, probably could figure out the relevant view via the parent it
gets.

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

diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx
index 7eca0dbd7958..8d5a5fb6dd6e 100644
--- a/sw/source/uibase/inc/drpcps.hxx
+++ b/sw/source/uibase/inc/drpcps.hxx
@@ -28,6 +28,8 @@
 
 class SwWrtShell;
 
+/// Dedicated drop caps dialog, opened by the .uno:FormatDropcap UNO command, 
which is not in the
+/// default menus.
 class SwDropCapsDlg final : public SfxSingleTabDialogController
 {
 public: