[Libreoffice-commits] core.git: basic/inc compilerplugins/clang forms/source include/comphelper include/editeng include/filter include/formula include/oox include/svx starmath/inc sw/inc sw/source vcl

2022-03-13 Thread Noel Grandin (via logerrit)
 basic/inc/sbxfac.hxx |1 
 compilerplugins/clang/trivialconstructor.cxx |  146 +++
 forms/source/xforms/namedcollection.hxx  |1 
 include/comphelper/SelectionMultiplex.hxx|1 
 include/editeng/editview.hxx |1 
 include/editeng/svxacorr.hxx |1 
 include/filter/msfilter/escherex.hxx |2 
 include/formula/IFunctionDescription.hxx |4 
 include/oox/drawingml/chart/modelbase.hxx|4 
 include/svx/gridctrl.hxx |1 
 starmath/inc/parsebase.hxx   |1 
 sw/inc/IDocumentExternalData.hxx |1 
 sw/source/core/inc/SwPortionHandler.hxx  |2 
 vcl/inc/salmenu.hxx  |2 
 vcl/inc/salsys.hxx   |1 
 15 files changed, 146 insertions(+), 23 deletions(-)

New commits:
commit ef82ccdda93186b4cab55aeac3844295194120a4
Author: Noel Grandin 
AuthorDate: Fri Mar 11 10:48:06 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 14 07:36:13 2022 +0100

new loplugin:trivialconstructor

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

diff --git a/basic/inc/sbxfac.hxx b/basic/inc/sbxfac.hxx
index bbdbcb018f0b..5493a6687e00 100644
--- a/basic/inc/sbxfac.hxx
+++ b/basic/inc/sbxfac.hxx
@@ -26,7 +26,6 @@ class SbxFactory
 {
 public:
 virtual ~SbxFactory();
-SbxFactory() {}
 virtual SbxBaseRef Create(sal_uInt16 nSbxId, sal_uInt32);
 virtual SbxObjectRef CreateObject(const OUString&);
 };
diff --git a/compilerplugins/clang/trivialconstructor.cxx 
b/compilerplugins/clang/trivialconstructor.cxx
new file mode 100644
index ..6f5bb640b760
--- /dev/null
+++ b/compilerplugins/clang/trivialconstructor.cxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "plugin.hxx"
+#include "check.hxx"
+#include "config_clang.h"
+#include "clang/AST/CXXInheritance.h"
+#include "clang/AST/StmtVisitor.h"
+
+// Look for declared constructors that can be trivial (and therefore don't 
need to be declared)
+
+namespace
+{
+class TrivialConstructor : public loplugin::FilteringPlugin
+{
+public:
+explicit TrivialConstructor(loplugin::InstantiationData const& data)
+: FilteringPlugin(data)
+{
+}
+
+virtual void run() override { 
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
+
+bool VisitCXXConstructorDecl(CXXConstructorDecl const*);
+
+private:
+bool HasTrivialConstructorBody(const CXXRecordDecl* BaseClassDecl,
+   const CXXRecordDecl* MostDerivedClassDecl);
+bool FieldHasTrivialConstructorBody(const FieldDecl* Field);
+};
+
+bool TrivialConstructor::VisitCXXConstructorDecl(CXXConstructorDecl const* 
constructorDecl)
+{
+if (ignoreLocation(constructorDecl))
+return true;
+if (!constructorDecl->hasTrivialBody())
+return true;
+if (constructorDecl->isExplicit())
+return true;
+if (!constructorDecl->isDefaultConstructor())
+return true;
+if (!constructorDecl->inits().empty())
+return true;
+if (constructorDecl->getExceptionSpecType() != EST_None)
+return true;
+if (constructorDecl->getAccess() != AS_public)
+return true;
+if (!constructorDecl->isThisDeclarationADefinition())
+return true;
+if (isInUnoIncludeFile(
+
compiler.getSourceManager().getSpellingLoc(constructorDecl->getLocation(
+return true;
+const CXXRecordDecl* recordDecl = constructorDecl->getParent();
+if (std::distance(recordDecl->ctor_begin(), recordDecl->ctor_end()) != 1)
+return true;
+if (!HasTrivialConstructorBody(recordDecl, recordDecl))
+return true;
+
+// template magic in sc/inc/stlalgorithm.hxx
+if (recordDecl->getIdentifier() && recordDecl->getName() == 
"AlignedAllocator")
+return true;
+
+report(DiagnosticsEngine::Warning, "no need for explicit constructor decl",
+   constructorDecl->getLocation())
+<< constructorDecl->getSourceRange();
+if (constructorDecl->getCanonicalDecl() != constructorDecl)
+{
+constructorDecl = constructorDecl->getCanonicalDecl();
+report(DiagnosticsEngine::Warning, "no need for explicit constructor 
decl",
+   constructorDecl->getLocation())
+<< constructorDecl->getSourceRange();
+}
+return true;
+}
+
+bool TrivialConstructor::HasTrivialConstructorBody(const 

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

2022-03-13 Thread Jim Raykowski (via logerrit)
 vcl/source/window/event.cxx  |3 ++-
 vcl/uiconfig/ui/interimtearableparent.ui |1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5247e5e254632e111bbdb798ee1c714c0c9ebde8
Author: Jim Raykowski 
AuthorDate: Mon Feb 7 19:34:51 2022 -0900
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Mar 14 06:10:49 2022 +0100

tdf#140222 make InterimTearableParent docking windows not dockable

and only allow dockable type docking windows to be undocked/docked

Change-Id: Ia1b0ccbdd911c24f83baf1c0514954e354c9070b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129650
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 99ac14c8ccf89a51de1b3fb9d14789406f2dc95f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131019
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index aca9fbb803da..4b94b70bc11c 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -111,7 +111,8 @@ bool Window::EventNotify( NotifyEvent& rNEvt )
 // check for docking window
 // but do nothing if window is docked and locked
 ImplDockingWindowWrapper *pWrapper = 
ImplGetDockingManager()->GetDockingWindowWrapper( this );
-if (pWrapper && ( pWrapper->IsFloatingMode() || !pWrapper->IsLocked() ))
+if ((GetStyle() & WB_DOCKABLE) &&
+pWrapper && ( pWrapper->IsFloatingMode() || !pWrapper->IsLocked() 
))
 {
 const bool bDockingSupportCrippled = 
!StyleSettings::GetDockingFloatsSupported();
 
diff --git a/vcl/uiconfig/ui/interimtearableparent.ui 
b/vcl/uiconfig/ui/interimtearableparent.ui
index ad8e952b3582..4ab25d2e9b3e 100644
--- a/vcl/uiconfig/ui/interimtearableparent.ui
+++ b/vcl/uiconfig/ui/interimtearableparent.ui
@@ -9,7 +9,6 @@
 4
 False
 True
-dock
 
   
 True


[Libreoffice-commits] core.git: Branch 'feature/sparklines' - 7 commits - officecfg/registry sc/CppunitTest_sc_sparkline_test.mk sc/inc sc/Library_scfilt.mk sc/Library_sc.mk sc/qa sc/sdi sc/source sc/

2022-03-13 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 7f9a971fc7216081753d2134575722cca71ac1ea
Author: Tomaž Vajngerl 
AuthorDate: Sat Mar 12 23:30:40 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Mar 12 23:56:51 2022 +0900

sc: SparklineDialog add type, colors and properties

Change-Id: Ie8243985d61cc719fd0444b0e1aaf18f43489d5c

diff --git a/sc/inc/SparklineGroup.hxx b/sc/inc/SparklineGroup.hxx
index f87475559547..ec3a8c8a971f 100644
--- a/sc/inc/SparklineGroup.hxx
+++ b/sc/inc/SparklineGroup.hxx
@@ -76,13 +76,13 @@ public:
 
 SparklineGroup()
 : m_aColorSeries(COL_BLUE)
-, m_aColorNegative(COL_TRANSPARENT)
-, m_aColorAxis(COL_TRANSPARENT)
-, m_aColorMarkers(COL_TRANSPARENT)
-, m_aColorFirst(COL_TRANSPARENT)
-, m_aColorLast(COL_TRANSPARENT)
-, m_aColorHigh(COL_TRANSPARENT)
-, m_aColorLow(COL_TRANSPARENT)
+, m_aColorNegative(COL_RED)
+, m_aColorAxis(COL_RED)
+, m_aColorMarkers(COL_RED)
+, m_aColorFirst(COL_RED)
+, m_aColorLast(COL_RED)
+, m_aColorHigh(COL_RED)
+, m_aColorLow(COL_RED)
 , m_eMinAxisType(AxisType::Individual)
 , m_eMaxAxisType(AxisType::Individual)
 , m_fLineWeight(0.75)
diff --git a/sc/source/ui/dialogs/SparklineDialog.cxx 
b/sc/source/ui/dialogs/SparklineDialog.cxx
index 5a167fe8b7c1..fac1d8274be5 100644
--- a/sc/source/ui/dialogs/SparklineDialog.cxx
+++ b/sc/source/ui/dialogs/SparklineDialog.cxx
@@ -12,6 +12,8 @@
 #include 
 #include 
 
+#include 
+
 namespace sc
 {
 SparklineDialog::SparklineDialog(SfxBindings* pBindings, SfxChildWindow* 
pChildWindow,
@@ -30,6 +32,30 @@ SparklineDialog::SparklineDialog(SfxBindings* pBindings, 
SfxChildWindow* pChildW
 , mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
 , mxOutputRangeEdit(new 
formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
 , mxOutputRangeButton(new 
formula::RefButton(m_xBuilder->weld_button("output-range-button")))
+, mxColorSeries(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-series"),
+ [pWindow] { return pWindow; }))
+, mxColorNegative(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-negative"),
+   [pWindow] { return pWindow; }))
+, mxColorMarker(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-marker"),
+ [pWindow] { return pWindow; }))
+, mxColorHigh(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-high"),
+   [pWindow] { return pWindow; }))
+, mxColorLow(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-low"),
+  [pWindow] { return pWindow; }))
+, mxColorFirst(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-first"),
+[pWindow] { return pWindow; }))
+, mxColorLast(new 
ColorListBox(m_xBuilder->weld_menu_button("color-button-last"),
+   [pWindow] { return pWindow; }))
+, mxCheckButtonNegative(m_xBuilder->weld_check_button("check-negative"))
+, mxCheckButtonMarker(m_xBuilder->weld_check_button("check-marker"))
+, mxCheckButtonHigh(m_xBuilder->weld_check_button("check-high"))
+, mxCheckButtonLow(m_xBuilder->weld_check_button("check-low"))
+, mxCheckButtonFirst(m_xBuilder->weld_check_button("check-first"))
+, mxCheckButtonLast(m_xBuilder->weld_check_button("check-last"))
+, mxRadioLine(m_xBuilder->weld_radio_button("line-radiobutton"))
+, mxRadioColumn(m_xBuilder->weld_radio_button("column-radiobutton"))
+, mxRadioStacked(m_xBuilder->weld_radio_button("stacked-radiobutton"))
+, mpLocalSparklineGroup(new sc::SparklineGroup())
 {
 mxInputRangeEdit->SetReferences(this, mxInputRangeText.get());
 mxInputRangeButton->SetReferences(this, mxInputRangeEdit.get());
@@ -59,13 +85,60 @@ SparklineDialog::SparklineDialog(SfxBindings* pBindings, 
SfxChildWindow* pChildW
 mxInputRangeEdit->SetModifyHdl(aModifyLink);
 mxOutputRangeEdit->SetModifyHdl(aModifyLink);
 
-mxOutputRangeEdit->GrabFocus();
+Link aRadioButtonLink
+= LINK(this, SparklineDialog, SelectSparklineType);
+mxRadioLine->connect_toggled(aRadioButtonLink);
+mxRadioColumn->connect_toggled(aRadioButtonLink);
+mxRadioStacked->connect_toggled(aRadioButtonLink);
+
+Link aLink = LINK(this, SparklineDialog, 
ToggleHandler);
+mxCheckButtonNegative->connect_toggled(aLink);
+mxCheckButtonMarker->connect_toggled(aLink);
+mxCheckButtonHigh->connect_toggled(aLink);
+mxCheckButtonLow->connect_toggled(aLink);
+mxCheckButtonFirst->connect_toggled(aLink);
+mxCheckButtonLast->connect_toggled(aLink);
+
+setupValues(mpLocalSparklineGroup);
 
 GetRangeFromSelection();
+
+mxOutputRangeEdit->GrabFocus();
 }
 
 SparklineDialog::~SparklineDialo

Infra call on Tue, Mar 15 at 17:30 UTC

2022-03-13 Thread Guilhem Moulin
Hi there,

The next infra call will take place at `date -d "Tue, 15 Mar 2022 17:30 UTC"`
(18:30 Berlin time).

We'll meet at https://jitsi.documentfoundation.org/infra and write the minutes
to https://pad.documentfoundation.org/p/infra .  Agenda TBA.

See you there!
Cheers,
-- 
Guilhem.


signature.asc
Description: PGP signature


[Libreoffice-commits] core.git: icon-themes/colibre icon-themes/colibre_dark icon-themes/colibre_dark_svg icon-themes/colibre_svg

2022-03-13 Thread Rizal Muttaqin (via logerrit)
 icon-themes/colibre/res/calc128.png |binary
 icon-themes/colibre/sfx2/res/128x128_calc_doc-p.png |binary
 icon-themes/colibre/sfx2/res/128x128_draw_doc-p.png |binary
 icon-themes/colibre/sfx2/res/128x128_impress_doc-p.png  |binary
 icon-themes/colibre/sfx2/res/128x128_math_doc-p.png |binary
 icon-themes/colibre/sfx2/res/128x128_writer_doc-p.png   |binary
 icon-themes/colibre_dark/sfx2/res/128x128_calc_doc-p.png|binary
 icon-themes/colibre_dark/sfx2/res/128x128_draw_doc-p.png|binary
 icon-themes/colibre_dark/sfx2/res/128x128_impress_doc-p.png |binary
 icon-themes/colibre_dark/sfx2/res/128x128_math_doc-p.png|binary
 icon-themes/colibre_dark/sfx2/res/128x128_writer_doc-p.png  |binary
 icon-themes/colibre_dark_svg/sfx2/res/128x128_calc_doc-p.svg|2 +-
 icon-themes/colibre_dark_svg/sfx2/res/128x128_draw_doc-p.svg|2 +-
 icon-themes/colibre_dark_svg/sfx2/res/128x128_impress_doc-p.svg |2 +-
 icon-themes/colibre_dark_svg/sfx2/res/128x128_math_doc-p.svg|2 +-
 icon-themes/colibre_dark_svg/sfx2/res/128x128_writer_doc-p.svg  |2 +-
 icon-themes/colibre_svg/res/calc128.svg |2 +-
 icon-themes/colibre_svg/sfx2/res/128x128_calc_doc-p.svg |2 +-
 icon-themes/colibre_svg/sfx2/res/128x128_draw_doc-p.svg |2 +-
 icon-themes/colibre_svg/sfx2/res/128x128_impress_doc-p.svg  |2 +-
 icon-themes/colibre_svg/sfx2/res/128x128_math_doc-p.svg |2 +-
 icon-themes/colibre_svg/sfx2/res/128x128_writer_doc-p.svg   |2 +-
 22 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit d156995180b565f34b52859aa1d6953995a76b9a
Author: Rizal Muttaqin 
AuthorDate: Sun Mar 13 06:52:42 2022 +0700
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Mar 14 01:36:13 2022 +0100

Colibre: Resolves tdf#146232 Adjust lock overlay icons

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

diff --git a/icon-themes/colibre/res/calc128.png 
b/icon-themes/colibre/res/calc128.png
index e4636928e5f5..41971f427d96 100644
Binary files a/icon-themes/colibre/res/calc128.png and 
b/icon-themes/colibre/res/calc128.png differ
diff --git a/icon-themes/colibre/sfx2/res/128x128_calc_doc-p.png 
b/icon-themes/colibre/sfx2/res/128x128_calc_doc-p.png
index d1e2da506568..733d7dec0de8 100644
Binary files a/icon-themes/colibre/sfx2/res/128x128_calc_doc-p.png and 
b/icon-themes/colibre/sfx2/res/128x128_calc_doc-p.png differ
diff --git a/icon-themes/colibre/sfx2/res/128x128_draw_doc-p.png 
b/icon-themes/colibre/sfx2/res/128x128_draw_doc-p.png
index f7c4b73c96d2..d671ac2e1d51 100644
Binary files a/icon-themes/colibre/sfx2/res/128x128_draw_doc-p.png and 
b/icon-themes/colibre/sfx2/res/128x128_draw_doc-p.png differ
diff --git a/icon-themes/colibre/sfx2/res/128x128_impress_doc-p.png 
b/icon-themes/colibre/sfx2/res/128x128_impress_doc-p.png
index f344f3bf8435..bf4613cb0e2e 100644
Binary files a/icon-themes/colibre/sfx2/res/128x128_impress_doc-p.png and 
b/icon-themes/colibre/sfx2/res/128x128_impress_doc-p.png differ
diff --git a/icon-themes/colibre/sfx2/res/128x128_math_doc-p.png 
b/icon-themes/colibre/sfx2/res/128x128_math_doc-p.png
index 1b2ba12e960e..ee413579e5d1 100644
Binary files a/icon-themes/colibre/sfx2/res/128x128_math_doc-p.png and 
b/icon-themes/colibre/sfx2/res/128x128_math_doc-p.png differ
diff --git a/icon-themes/colibre/sfx2/res/128x128_writer_doc-p.png 
b/icon-themes/colibre/sfx2/res/128x128_writer_doc-p.png
index c470c76f8fd8..19f661a7f514 100644
Binary files a/icon-themes/colibre/sfx2/res/128x128_writer_doc-p.png and 
b/icon-themes/colibre/sfx2/res/128x128_writer_doc-p.png differ
diff --git a/icon-themes/colibre_dark/sfx2/res/128x128_calc_doc-p.png 
b/icon-themes/colibre_dark/sfx2/res/128x128_calc_doc-p.png
index 2dd586c5fab6..ac443d08e2cd 100644
Binary files a/icon-themes/colibre_dark/sfx2/res/128x128_calc_doc-p.png and 
b/icon-themes/colibre_dark/sfx2/res/128x128_calc_doc-p.png differ
diff --git a/icon-themes/colibre_dark/sfx2/res/128x128_draw_doc-p.png 
b/icon-themes/colibre_dark/sfx2/res/128x128_draw_doc-p.png
index cc15d63e5051..682c9b387b75 100644
Binary files a/icon-themes/colibre_dark/sfx2/res/128x128_draw_doc-p.png and 
b/icon-themes/colibre_dark/sfx2/res/128x128_draw_doc-p.png differ
diff --git a/icon-themes/colibre_dark/sfx2/res/128x128_impress_doc-p.png 
b/icon-themes/colibre_dark/sfx2/res/128x128_impress_doc-p.png
index ba81e9c49400..380288754268 100644
Binary files a/icon-themes/colibre_dark/sfx2/res/128x128_impress_doc-p.png and 
b/icon-themes/colibre_dark/sfx2/res/128x128_impress_doc-p.png differ
diff --git a/icon-themes/colibre_dark/sfx2/res/128x128_math_doc-p.png 
b/icon-themes/colibre_dark/sfx2/res/128x128_math_doc-p.png
index 590cf569a100..3afada509d93 100644
Binary files a/ico

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

2022-03-13 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |   29 ++-
 1 file changed, 11 insertions(+), 18 deletions(-)

New commits:
commit d0a5d8429c9338056ae0b0c22128db9f6a07e159
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 11:46:34 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 21:51:55 2022 +0100

cid#1502949 Logically dead code

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

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2915d96c5722..45d8d809084f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1921,25 +1921,18 @@ void 
DocxAttributeOutput::DoWriteMoveRangeTagStart(const OString & bookmarkName,
 const DateTime aDateTime = pRedlineData->GetTimeStamp();
 bool bNoDate = bRemovePersonalInfo ||
 ( aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 && 
aDateTime.GetDay() == 1 );
-if ( bNoDate )
-m_pSerializer->singleElementNS(XML_w, bFrom
-? XML_moveFromRangeStart
-: XML_moveToRangeStart,
-FSNS(XML_w, XML_id), OString::number(m_nNextBookmarkId),
-FSNS(XML_w, XML_author ), bRemovePersonalInfo
-? "Author" + OString::number( 
GetExport().GetInfoID(rAuthor) )
-: OUStringToOString(rAuthor, RTL_TEXTENCODING_UTF8),
-FSNS(XML_w, XML_name), bookmarkName);
-else
-m_pSerializer->singleElementNS(XML_w, bFrom
-? XML_moveFromRangeStart
-: XML_moveToRangeStart,
-FSNS(XML_w, XML_id), OString::number(m_nNextBookmarkId),
-FSNS(XML_w, XML_author ), bRemovePersonalInfo
+
+rtl::Reference pAttributeList
+= sax_fastparser::FastSerializerHelper::createAttrList();
+
+pAttributeList->add(FSNS(XML_w, XML_id), 
OString::number(m_nNextBookmarkId));
+pAttributeList->add(FSNS(XML_w, XML_author ), bRemovePersonalInfo
 ? "Author" + OString::number( 
GetExport().GetInfoID(rAuthor) )
-: OUStringToOString(rAuthor, RTL_TEXTENCODING_UTF8),
-FSNS(XML_w, XML_date ), DateTimeToOString( aDateTime ),
-FSNS(XML_w, XML_name), bookmarkName);
+: OUStringToOString(rAuthor, RTL_TEXTENCODING_UTF8));
+if (!bNoDate)
+pAttributeList->add(FSNS(XML_w, XML_date ), DateTimeToOString( 
aDateTime ));
+pAttributeList->add(FSNS(XML_w, XML_name), bookmarkName);
+m_pSerializer->singleElementNS( XML_w, bFrom ? XML_moveFromRangeStart : 
XML_moveToRangeStart, pAttributeList );
 }
 
 void DocxAttributeOutput::DoWriteMoveRangeTagEnd(sal_Int32 const nId, bool 
bFrom)


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

2022-03-13 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 13cb7e8f06e74dc7558333640760ce6ada3d8ad5
Author: Andras Timar 
AuthorDate: Sun Mar 13 10:53:05 2022 +0100
Commit: Andras Timar 
CommitDate: Sun Mar 13 21:31:39 2022 +0100

do not build HELPTOOLS for 'host' when cross compling

* it's unnecessary, HELPTOOLS are only needed for the build
* on armv7-32-bit we had build issues
  LinkTarget Library/libclucene.a not defined.  Stop.
  probably because of the refactoring of help related options:
  14069d84174ca7a4e60db4d75912903e9679b643

Change-Id: Ia32e7dba1d745eee80fb487f8749767d5d6648e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131463
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/configure.ac b/configure.ac
index a7d6267c73cc..e55f8c8564c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5412,7 +5412,7 @@ else
 fi
 
 AC_MSG_CHECKING([if we need to build the help index tooling])
-if test "$with_help" = yes -o "$enable_extension_integration" != no; then
+if test "$cross_compiling" != yes -a \( "$with_help" = yes -o 
"$enable_extension_integration" != no \); then
 BUILD_TYPE="$BUILD_TYPE HELPTOOLS"
 test_clucene=yes
 AC_MSG_RESULT([yes])


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 include/vcl/outdev.hxx |1 +
 vcl/source/outdev/font.cxx |   40 
 2 files changed, 25 insertions(+), 16 deletions(-)

New commits:
commit 0898179afc9334bc2370cdccbf3392337585b860
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 13:41:31 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 20:53:19 2022 +0100

ofz: Divide-by-zero

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index a777f9d73569..fe1d9583e2ba 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1113,6 +1113,7 @@ private:
 SAL_DLLPRIVATE void ImplDrawStrikeoutChar( tools::Long nBaseX, 
tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, 
FontStrikeout eStrikeout, Color aColor );
 SAL_DLLPRIVATE void ImplDrawMnemonicLine( tools::Long nX, 
tools::Long nY, tools::Long nWidth );
 
+SAL_DLLPRIVATE bool AttemptOLEFontScaleFix(vcl::Font& rFont, 
tools::Long nHeight) const;
 
 ///@}
 
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 71e4091e754e..ba487b0198c3 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -990,24 +990,32 @@ bool OutputDevice::ImplNewFont() const
 bool bRet = true;
 
 // #95414# fix for OLE objects which use scale factors very creatively
-if( mbMap && !aSize.Width() )
+if (mbMap && !aSize.Width())
+bRet = AttemptOLEFontScaleFix(const_cast(maFont), 
aSize.Height());
+
+return bRet;
+}
+
+bool OutputDevice::AttemptOLEFontScaleFix(vcl::Font& rFont, tools::Long 
nHeight) const
+{
+const float fDenominator = static_cast(maMapRes.mnMapScNumY) * 
maMapRes.mnMapScDenomX;
+if (fDenominator == 0.0)
+return false;
+const float fNumerator = static_cast(maMapRes.mnMapScNumX) * 
maMapRes.mnMapScDenomY;
+float fStretch = fNumerator / fDenominator;
+int nOrigWidth = mpFontInstance->mxFontMetric->GetWidth();
+int nNewWidth = static_cast(nOrigWidth * fStretch + 0.5);
+bool bRet = true;
+if (nNewWidth != nOrigWidth && nNewWidth != 0)
 {
-int nOrigWidth = pFontInstance->mxFontMetric->GetWidth();
-float fStretch = static_cast(maMapRes.mnMapScNumX) * 
maMapRes.mnMapScDenomY;
-fStretch /= static_cast(maMapRes.mnMapScNumY) * 
maMapRes.mnMapScDenomX;
-int nNewWidth = static_cast(nOrigWidth * fStretch + 0.5);
-if( (nNewWidth != nOrigWidth) && (nNewWidth != 0) )
-{
-Size aOrigSize = maFont.GetFontSize();
-const_cast(maFont).SetFontSize( Size( nNewWidth, 
aSize.Height() ) );
-mbMap = false;
-mbNewFont = true;
-bRet = ImplNewFont();  // recurse once using stretched width
-mbMap = true;
-const_cast(maFont).SetFontSize( aOrigSize );
-}
+Size aOrigSize = rFont.GetFontSize();
+rFont.SetFontSize(Size(nNewWidth, nHeight));
+mbMap = false;
+mbNewFont = true;
+bRet = ImplNewFont();  // recurse once using stretched width
+mbMap = true;
+rFont.SetFontSize(aOrigSize);
 }
-
 return bRet;
 }
 


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

2022-03-13 Thread Julien Nabet (via logerrit)
 connectivity/source/drivers/firebird/View.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 924791c51b27226e34fd1e0a32cc7d3d66683d0b
Author: Julien Nabet 
AuthorDate: Sun Mar 13 19:29:13 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 13 20:47:57 2022 +0100

Remove forgotten remnant test code

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

diff --git a/connectivity/source/drivers/firebird/View.cxx 
b/connectivity/source/drivers/firebird/View.cxx
index 506cafb40463..6dcbf6bce2b2 100644
--- a/connectivity/source/drivers/firebird/View.cxx
+++ b/connectivity/source/drivers/firebird/View.cxx
@@ -7,7 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 #include "View.hxx"
-#include 
 
 #include 
 
@@ -68,10 +67,6 @@ OUString View::impl_getCommand() const
 {
 OUString aCommand("SELECT RDB$VIEW_SOURCE FROM RDB$RELATIONS WHERE 
RDB$RELATION_NAME = '"
   + m_Name + "'");
-std::cerr << "TODO aCommand=" << aCommand << "\n";
-// OUString aCommand("SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS 
WHERE TABLE_SCHEMA = '"
-//  + m_SchemaName + "' AND TABLE_NAME = '" + m_Name + 
"'");
-//::utl::SharedUNOComponent< XStatement > xStatement; xStatement.set( 
m_xConnection->createStatement(), UNO_QUERY_THROW );
 css::uno::Reference statement = 
m_xConnection->createStatement();
 css::uno::Reference xResult = 
statement->executeQuery(aCommand);
 


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

2022-03-13 Thread Heiko Tietze (via logerrit)
 configure.ac |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 122e9364ab297661ed91854f192c7a880eb08634
Author: Heiko Tietze 
AuthorDate: Sun Mar 13 09:35:43 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Mar 13 20:40:13 2022 +0100

Related tdf#146545 - Make Colibre (Dark) available in icon themes

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

diff --git a/configure.ac b/configure.ac
index 10529032c5fe..4011e8e5a849 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2104,8 +2104,12 @@ AC_ARG_WITH(galleries,
 AC_ARG_WITH(theme,
 AS_HELP_STRING([--with-theme="theme1 theme2..."],
 [Choose which themes to include. By default those themes with an '*' 
are included.
- Possible choices: *breeze, *breeze_dark, *breeze_dark_svg, 
*breeze_svg, *colibre, *colibre_svg, *elementary,
- *elementary_svg, *karasa_jaga, *karasa_jaga_svg, *sifr, *sifr_dark, 
*sifr_dark_svg, *sifr_svg, *sukapura, *sukapura_svg.]),
+ Possible choices: *breeze, *breeze_dark, *breeze_dark_svg, 
*breeze_svg,
+ *colibre, *colibre_svg, *colibre_dark, *colibre_dark_svg,
+ *elementary, *elementary_svg,
+ *karasa_jaga, *karasa_jaga_svg,
+ *sifr, *sifr_dark, *sifr_dark_svg, *sifr_svg,
+ *sukapura, *sukapura_svg.]),
 ,)
 
 libo_FUZZ_ARG_WITH(helppack-integration,
@@ -13211,14 +13215,14 @@ dnl 
===
 AC_MSG_CHECKING([which themes to include])
 # if none given use default subset of available themes
 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
-with_theme="breeze breeze_dark breeze_dark_svg breeze_svg colibre 
colibre_svg elementary elementary_svg karasa_jaga karasa_jaga_svg sifr sifr_svg 
sifr_dark sifr_dark_svg sukapura sukapura_svg"
+with_theme="breeze breeze_dark breeze_dark_svg breeze_svg colibre 
colibre_svg colibre_dark colibre_dark_svg elementary elementary_svg karasa_jaga 
karasa_jaga_svg sifr sifr_svg sifr_dark sifr_dark_svg sukapura sukapura_svg"
 fi
 
 WITH_THEMES=""
 if test "x$with_theme" != "xno"; then
 for theme in $with_theme; do
 case $theme in
-
breeze|breeze_dark|breeze_dark_svg|breeze_svg|colibre|colibre_svg|elementary|elementary_svg|karasa_jaga|karasa_jaga_svg|sifr|sifr_svg|sifr_dark|sifr_dark_svg|sukapura|sukapura_svg)
 real_theme="$theme" ;;
+
breeze|breeze_dark|breeze_dark_svg|breeze_svg|colibre|colibre_svg|colibre_dark|colibre_dark_svg|elementary|elementary_svg|karasa_jaga|karasa_jaga_svg|sifr|sifr_svg|sifr_dark|sifr_dark_svg|sukapura|sukapura_svg)
 real_theme="$theme" ;;
 default) real_theme=colibre ;;
 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
 esac


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/TypeSerializer.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 020e26dcdcbc9d95076350a61190fb9d3a9e3844
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 12:02:06 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 20:07:05 2022 +0100

ofz#45528 we assert on using a negative y-scale so don't import one

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

diff --git a/vcl/source/gdi/TypeSerializer.cxx 
b/vcl/source/gdi/TypeSerializer.cxx
index 3a7eb6859e22..03d6f6ec90e9 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -443,7 +443,8 @@ void TypeSerializer::readMapMode(MapMode& rMapMode)
 
 const bool bBogus = !aScaleX.IsValid() || !aScaleY.IsValid()
 || aScaleX.GetNumerator() == 
std::numeric_limits::min()
-|| aScaleY.GetNumerator() == 
std::numeric_limits::min();
+|| aScaleY.GetNumerator() == 
std::numeric_limits::min()
+|| static_cast(aScaleY) < 0.0;
 SAL_WARN_IF(bBogus, "vcl", "invalid scale");
 
 if (bSimple || bBogus)


[Libreoffice-commits] core.git: bin/sanitize-excludelist.txt

2022-03-13 Thread Caolán McNamara (via logerrit)
 bin/sanitize-excludelist.txt |1 -
 1 file changed, 1 deletion(-)

New commits:
commit b8bb44132f859c7f65d4be8740ae86af943cfc8f
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 13:42:57 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 20:06:48 2022 +0100

don't need this exclude entry anymore

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

diff --git a/bin/sanitize-excludelist.txt b/bin/sanitize-excludelist.txt
index 44f26b508efb..ff7c71a0ac49 100644
--- a/bin/sanitize-excludelist.txt
+++ b/bin/sanitize-excludelist.txt
@@ -6,7 +6,6 @@ src:*/scaddins/source/analysis/financial.cxx
 [memory]
 fun:generate_hash_secret_salt
 [signed-integer-overflow]
-fun:_cairo_*
 src:cairo*.c
 src:*/boost/boost/rational.hpp
 src:*/include/tools/gen.hxx


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

2022-03-13 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 9ae74207e02d3a0ecc8f360720eb4e1c14bba0d3
Author: Jim Raykowski 
AuthorDate: Wed Feb 23 12:16:35 2022 -0900
Commit: Jim Raykowski 
CommitDate: Sun Mar 13 19:55:46 2022 +0100

SwNavigator: Gray out Comments members not visible in the document

Grays out comment members in the Navigator Comments member list that
are in hidden sections and folded outline content. Not showing comment
annotation windows will not cause comment member graying. The patch
also fixes comments sometimes not showing in the member list after
document load due to the document layout of comments not being
completed before the comment content array is initially filled.

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

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 1791887b1f43..6a4bf1d9456d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -779,8 +779,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 {
 if (const SwFormatField* pFormatField = dynamic_cast((*i)->GetBroadcaster())) // SwPostit
 {
-if (pFormatField->GetTextField() && 
pFormatField->IsFieldInDoc() &&
-(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
+if (pFormatField->GetTextField() && 
pFormatField->IsFieldInDoc())
 {
 OUString sEntry = 
pFormatField->GetField()->GetPar2();
 sEntry = RemoveNewline(sEntry);
@@ -789,6 +788,17 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 sEntry,
 pFormatField,
 nYPos));
+if 
(!pFormatField->GetTextField()->GetTextNode().getLayoutFrame(
+m_pWrtShell->GetLayout()))
+pCnt->SetInvisible();
+if (pOldMember)
+{
+assert(pbContentChanged && "pbContentChanged 
is always set if pOldMember is");
+if (!*pbContentChanged &&
+nOldMemberCount > 
o3tl::make_unsigned(nYPos) &&
+(*pOldMember)[nYPos]->IsInvisible() != 
pCnt->IsInvisible())
+*pbContentChanged = true;
+}
 m_pMember->insert(std::move(pCnt));
 nYPos++;
 }


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

2022-03-13 Thread Noel Grandin (via logerrit)
 sw/source/core/edit/autofmt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c7f00a89a675dad541d32ea60695a7b11210102
Author: Noel Grandin 
AuthorDate: Sun Mar 13 19:15:20 2022 +0200
Commit: Noel Grandin 
CommitDate: Sun Mar 13 19:32:59 2022 +0100

tdf#147961 Crash Typing "++" and press Enter (AutoCorrect Create Table)

regression from
commit 7cd5b35caa8d4fa9d0ba2b2c6ce4b88726ed2be6
Author: Noel Grandin 
Date:   Fri Sep 24 13:21:35 2021 +0200
return SwCursor from IShellCursorSupplier

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

diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 60c14ad81d17..cd5d0e128864 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2371,7 +2371,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, 
SvxSwAutoFormatFlags const &
 {
 //JP 30.09.96: DoTable() builds on PopCursor and 
MoveCursor after AutoFormat!
 pEdShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
-*pEdShell->GetCursor() = static_cast(m_aDelPam);
+static_cast(*pEdShell->GetCursor()) = m_aDelPam;
 pEdShell->Push();
 
 eStat = IS_END;


Abhinav Borah license statement

2022-03-13 Thread Abhinav Borah
All of my past & future contributions to LibreOffice may be licensed
under the MPLv2/LGPLv3+ dual license.


[Libreoffice-commits] core.git: include/oox odk/examples oox/source sw/source .vscode/vs-code-template.code-workspace.in

2022-03-13 Thread Andrea Gelmini (via logerrit)
 .vscode/vs-code-template.code-workspace.in|2 +-
 include/oox/drawingml/shape.hxx   |2 +-
 odk/examples/DevelopersGuide/UCB/ResourceManager.java |2 +-
 oox/source/drawingml/diagram/diagramhelper.cxx|2 +-
 oox/source/drawingml/diagram/diagramhelper.hxx|4 ++--
 oox/source/drawingml/shape.cxx|2 +-
 sw/source/filter/ww8/ww8scan.cxx  |2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 34cd775646a7f21f0d2d40462ae716671bab67c9
Author: Andrea Gelmini 
AuthorDate: Sun Mar 13 12:41:36 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 13 19:17:37 2022 +0100

Fix typos

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

diff --git a/.vscode/vs-code-template.code-workspace.in 
b/.vscode/vs-code-template.code-workspace.in
index 479bff58035e..f6078155e8dc 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -164,7 +164,7 @@
"MIMode": "lldb",
"setupCommands": [
{
-   "description": "load 
helpers for for lldb",
+   "description": "load 
helpers for lldb",
"text": "command script 
import ${workspaceFolder:srcdir}/solenv/lldb/libreoffice/LO.py",
"ignoreFailures": false
}
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index dc2a06a78b56..734e805ccac5 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -395,7 +395,7 @@ private:
 bool mbUseBgFill = false;
 
 // temporary space for DiagramHelper in preparation for collecting data
-// Note: I tried to use a unique_ptr here, but existing constuctor func 
does not allow that
+// Note: I tried to use a unique_ptr here, but existing constructor func 
does not allow that
 IDiagramHelper* mpDiagramHelper;
 };
 
diff --git a/odk/examples/DevelopersGuide/UCB/ResourceManager.java 
b/odk/examples/DevelopersGuide/UCB/ResourceManager.java
index 6c6b8d6e2a20..61d64c8c0260 100644
--- a/odk/examples/DevelopersGuide/UCB/ResourceManager.java
+++ b/odk/examples/DevelopersGuide/UCB/ResourceManager.java
@@ -153,7 +153,7 @@ public class ResourceManager {
 /**
  * Get transferring Operation.
  *
- *@return StringThat contains the trasfering Operation
+ *@return StringThat contains the transferring Operation
  */
 public String getTransOperation() {
 return m_transOperation;
diff --git a/oox/source/drawingml/diagram/diagramhelper.cxx 
b/oox/source/drawingml/diagram/diagramhelper.cxx
index f3792b295f7e..b61c6b12994a 100644
--- a/oox/source/drawingml/diagram/diagramhelper.cxx
+++ b/oox/source/drawingml/diagram/diagramhelper.cxx
@@ -82,7 +82,7 @@ void AdvancedDiagramHelper::reLayout(SdrObjGroup& rTarget)
 // For re-creation we need to use ::addShape functionality from the
 // oox import filter since currently Shape import is very tightly
 // coupled to Shape creation. It converts a oox::Shape representation
-// combined with an oox::Theme to incarrnated XShapes representing the
+// combined with an oox::Theme to incarnated XShapes representing the
 // Diagram.
 // To use that functionality, we have to create a temporary filter
 // (based on ShapeFilterBase). Problems are that this needs to know
diff --git a/oox/source/drawingml/diagram/diagramhelper.hxx 
b/oox/source/drawingml/diagram/diagramhelper.hxx
index 76dffdb88f5a..0c1240bdd4ba 100644
--- a/oox/source/drawingml/diagram/diagramhelper.hxx
+++ b/oox/source/drawingml/diagram/diagramhelper.hxx
@@ -30,12 +30,12 @@ class Diagram;
 
 // Advanced DiagramHelper
 //
-// This helper tries to hold all neccessary data to re-layout
+// This helper tries to hold all necessary data to re-layout
 // all XShapes/SdrObjects of an already imported Diagram. The
 // Diagram holds the SmarArt model data before it gets layouted,
 // while Theme holds the oox Fill/Line/Style definitions to
 // apply.
-// Re-Layouting (re-reating) is rather complex, for detailed
+// Re-Layouting (re-creating) is rather complex, for detailed
 // information see ::reLayout implementation.
 // This helper class may/should be extended to:
 // - deliver representative data from the Diagram-Model
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 0192ff8aa3de..ac2ff8891add 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -205,7 +205,7 @@ void Shape::

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

2022-03-13 Thread Andrea Gelmini (via logerrit)
 oox/source/ole/vbaexport.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 36ad7bf558295a4b8474127b3c9bcc954f459bbe
Author: Andrea Gelmini 
AuthorDate: Sun Mar 13 12:28:21 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 13 19:17:11 2022 +0100

Fix typo in code

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

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index a5f54160094b..fa9640e54137 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -730,7 +730,7 @@ void writePROJECTMODULE(SvStream& rStrm, const OUString& 
name, const sal_uInt16
 }
 
 // section 2.3.4.2.3
-void writePROJECTMODULES(SvStream& rStrm, const 
css::uno::Reference& xNameContainer, const 
std::vector& rLibrayMap)
+void writePROJECTMODULES(SvStream& rStrm, const 
css::uno::Reference& xNameContainer, const 
std::vector& rLibraryMap)
 {
 const css::uno::Sequence aElementNames = 
xNameContainer->getElementNames();
 sal_Int32 n = aElementNames.getLength();
@@ -746,7 +746,7 @@ void writePROJECTMODULES(SvStream& rStrm, const 
css::uno::ReferencegetModuleInfo(rModuleName);
 writePROJECTMODULE(rStrm, rModuleName, aModuleInfo.ModuleType);
 }


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

2022-03-13 Thread Andrea Gelmini (via logerrit)
 sw/source/core/inc/swfntcch.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f13c92951d242b8c19d93a757a0b45ce1ff0f987
Author: Andrea Gelmini 
AuthorDate: Sun Mar 13 12:32:23 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 13 19:16:48 2022 +0100

Fix typo in code

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

diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index 8c9e59b6897f..7e25d4d096ff 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -33,13 +33,13 @@ public:
 
 SwFontCache() : SwCache(50
 #ifdef DBG_UTIL
-, "Global AttributSet/Font-Cache pSwFontCache"
+, "Global AttributeSet/Font-Cache pSwFontCache"
 #endif
 ) {}
 
 };
 
-// AttributSet/Font-Cache, globale Variable, in FontCache.Cxx angelegt
+// AttributeSet/Font-Cache, globale Variable, in FontCache.Cxx angelegt
 extern SwFontCache *pSwFontCache;
 
 class SwFontObj final : public SwCacheObj


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

2022-03-13 Thread Andrea Gelmini (via logerrit)
 include/vcl/transfer.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3c6e9593094a6a1e1fd4974f962da67b8dacf4c5
Author: Andrea Gelmini 
AuthorDate: Sun Mar 13 12:24:09 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 13 19:16:24 2022 +0100

Fix typo in code

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

diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index ec1d0955d85c..58b43426e07b 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -509,7 +509,7 @@ public:
 
 using TransferableHelper::StartDrag;
 voidStartDrag( vcl::Window* pWindow, sal_Int8 
nDragSourceActions,
-   const Link& rCallbck );
+   const Link& rCallback );
 virtual voidDragFinished( sal_Int8 nDropAction ) override;
 };
 


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

2022-03-13 Thread Andrea Gelmini (via logerrit)
 lotuswordpro/source/filter/lwpgrfobj.cxx |2 +-
 lotuswordpro/source/filter/lwpgrfobj.hxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 15cf536adce74c6ca3fb401e0e232aacadd87f8f
Author: Andrea Gelmini 
AuthorDate: Sun Mar 13 12:26:02 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 13 19:15:47 2022 +0100

Fix typo in code

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

diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx 
b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 986cdff85195..76c8aa76c52a 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -126,7 +126,7 @@ void LwpGraphicObject::Read()
 {
 m_aIPData.nBrightness = aServerContext[14];
 m_aIPData.nContrast = aServerContext[19];
-m_aIPData.nEdgeEnchancement = aServerContext[24];
+m_aIPData.nEdgeEnhancement = aServerContext[24];
 m_aIPData.nSmoothing = aServerContext[29];
 m_aIPData.bInvertImage = (aServerContext[34] == 0x01);
 m_aIPData.bAutoContrast = (aServerContext[44] == 0x00);
diff --git a/lotuswordpro/source/filter/lwpgrfobj.hxx 
b/lotuswordpro/source/filter/lwpgrfobj.hxx
index 406f5883d6bb..5c05bf218059 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.hxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.hxx
@@ -70,7 +70,7 @@ struct ImageProcessingData
 {
 sal_uInt8 nBrightness;
 sal_uInt8 nContrast;
-sal_uInt8 nEdgeEnchancement;
+sal_uInt8 nEdgeEnhancement;
 sal_uInt8 nSmoothing;
 bool bAutoContrast;
 bool bInvertImage;
@@ -78,7 +78,7 @@ struct ImageProcessingData
 ImageProcessingData()
   : nBrightness(50),
 nContrast(50),
-nEdgeEnchancement(0),
+nEdgeEnhancement(0),
 nSmoothing(0),
 bAutoContrast(false),
 bInvertImage(false)


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |   26 --
 1 file changed, 12 insertions(+), 14 deletions(-)

New commits:
commit d71323b29cdf9714c2979484b359c15b50c778a5
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 11:40:35 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 18:36:49 2022 +0100

cid#1502951 Logically dead code

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

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8e548cbebab3..2915d96c5722 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3515,19 +3515,17 @@ void DocxAttributeOutput::Redline( const SwRedlineData* 
pRedlineData)
 break;
 
 case RedlineType::Format:
-if ( bNoDate )
-m_pSerializer->startElementNS( XML_w, XML_rPrChange,
-FSNS( XML_w, XML_id ), aId,
-FSNS( XML_w, XML_author ), bRemovePersonalInfo
-? "Author" + OUString::number( 
GetExport().GetInfoID(rAuthor) )
-: rAuthor );
-else
-m_pSerializer->startElementNS( XML_w, XML_rPrChange,
-FSNS( XML_w, XML_id ), aId,
-FSNS( XML_w, XML_author ), bRemovePersonalInfo
-? "Author" + OUString::number( 
GetExport().GetInfoID(rAuthor) )
-: rAuthor,
-FSNS( XML_w, XML_date ), DateTimeToOString( aDateTime ) );
+{
+rtl::Reference pAttributeList
+= sax_fastparser::FastSerializerHelper::createAttrList();
+
+pAttributeList->add(FSNS( XML_w, XML_id ), aId);
+pAttributeList->add(FSNS( XML_w, XML_author ), bRemovePersonalInfo
+? "Author" + OString::number( 
GetExport().GetInfoID(rAuthor) )
+: rAuthor.toUtf8());
+if (!bNoDate)
+pAttributeList->add(FSNS( XML_w, XML_date ), DateTimeToOString( 
aDateTime ));
+m_pSerializer->startElementNS( XML_w, XML_rPrChange, pAttributeList );
 
 // Check if there is any extra data stored in the redline object
 if (pRedlineData->GetExtraData())
@@ -3559,7 +3557,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* 
pRedlineData)
 
 m_pSerializer->endElementNS( XML_w, XML_rPrChange );
 break;
-
+}
 case RedlineType::ParagraphFormat:
 if ( bNoDate )
 m_pSerializer->startElementNS( XML_w, XML_pPrChange,


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 hwpfilter/source/hwpreader.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 92e3d17dbea13f1ad2f33824d0e2dc2a0a8c4014
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 10:41:43 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 16:46:02 2022 +0100

ofz#45525 Null-dereference

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

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 60af8216f97b..6c757409e8dc 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3449,7 +3449,7 @@ void HwpReader::makeTextBox(TxtBox * hbox)
 OUString::number(WTMM( hbox->box_ys + hbox->cap_ys )) + "mm");
 startEl("draw:text-box");
 mxList->clear();
-if( hbox->cap_pos % 2 )   /* The caption is on the top 
*/
+if (!hbox->caption.empty() && hbox->cap_pos % 2)  /* The caption is on 
the top */
 {
 parsePara(hbox->caption.front().get());
 }


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

2022-03-13 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_UI.xba |   63 +++
 wizards/source/scriptforge/python/scriptforge.py |2 
 2 files changed, 64 insertions(+), 1 deletion(-)

New commits:
commit ae24ce8c633a85e06aa8701c839b100b3dd5b6bf
Author: Jean-Pierre Ledure 
AuthorDate: Sat Mar 12 15:57:52 2022 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Sun Mar 13 16:11:07 2022 +0100

ScriptForge - (UI) size and position of the active window

The UI service receives next 4 new properties:
  Height
  Width
  X
  Y

They all return a Long value representing the size or position
of the active window. The active window does not need to be a
document, it may f.i. be the Basic IDE.

Those properties are read-only.
To modify the size or the position of the window,
use the the Resize() method.

They are implemented for use from Basic and Python scripts.

Change-Id: I0021663e39612f411cefa5c7ec9ec594a4cb6f39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131444
Tested-by: Jean-Pierre Ledure 
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure 

diff --git a/wizards/source/scriptforge/SF_UI.xba 
b/wizards/source/scriptforge/SF_UI.xba
index 8c511a35cc8d..c8a7f9a8f861 100644
--- a/wizards/source/scriptforge/SF_UI.xba
+++ b/wizards/source/scriptforge/SF_UI.xba
@@ -118,6 +118,14 @@ Dim oComp As Object'  
com.sun.star.lang.XComponent
 
 End Function   '  ScriptForge.SF_UI.ActiveWindow
 
+REM 
-
+Property Get Height() As Long
+''' Returns the height of the active window
+Dim oPosSize As Object '  com.sun.star.awt.Rectangle
+   Set oPosSize = SF_UI._PosSize()
+   If Not IsNull(oPosSize) Then Height = oPosSize.Height Else Height = -1
+End Property   '  ScriptForge.SF_UI.Height
+
 REM 
-
 Property Get MACROEXECALWAYS As Integer
 ''' Macros are always executed
@@ -148,6 +156,30 @@ Property Get ServiceName As String
ServiceName = "ScriptForge.UI"
 End Property   '  ScriptForge.SF_UI.ServiceName
 
+REM 
-
+Property Get Width() As Long
+''' Returns the width of the active window
+Dim oPosSize As Object '  com.sun.star.awt.Rectangle
+   Set oPosSize = SF_UI._PosSize()
+   If Not IsNull(oPosSize) Then Width = oPosSize.Width Else Width = -1
+End Property   '  ScriptForge.SF_UI.Width
+
+REM 
-
+Property Get X() As Long
+''' Returns the X coordinate of the active window
+Dim oPosSize As Object '  com.sun.star.awt.Rectangle
+   Set oPosSize = SF_UI._PosSize()
+   If Not IsNull(oPosSize) Then X = oPosSize.X Else X = -1
+End Property   '  ScriptForge.SF_UI.X
+
+REM 
-
+Property Get Y() As Long
+''' Returns the Y coordinate of the active window
+Dim oPosSize As Object '  com.sun.star.awt.Rectangle
+   Set oPosSize = SF_UI._PosSize()
+   If Not IsNull(oPosSize) Then Y = oPosSize.Y Else Y = -1
+End Property   '  ScriptForge.SF_UI.Y
+
 REM = 
METHODS
 
 REM 
-
@@ -495,6 +527,11 @@ Check:
 Try:
Select Case UCase(PropertyName)
Case "ACTIVEWINDOW"   :   
GetProperty = ActiveWindow()
+   Case "HEIGHT" :   
GetProperty = SF_UI.Height
+   Case "WIDTH"  :   
GetProperty = SF_UI.Width
+   Case "X"  :   
GetProperty = SF_UI.X
+   Case "Y"  :   
GetProperty = SF_UI.Y
+   
Case Else
End Select
 
@@ -827,6 +864,10 @@ Public Function Properties() As Variant
 
Properties = Array( _
"ActiveWindow" _
+   , "Height" _
+   , "Width" _
+   , "X" _
+   , "Y" _
)
 
 End Function   '  ScriptForge.SF_UI.Properties
@@ -1272,6 +1313,28 @@ Catch:
GoTo Finally
 End Function   '  ScriptForge.SF_UI._IdentifyWindow
 
+REM 
-
+Public Function _PosSize() As Object
+''' Returns the PosSize structure of the active window
+
+Dim vWindow As Window  '  A single component
+Dim oContainer As Object  

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

2022-03-13 Thread Tomaž Vajngerl (via logerrit)
 sc/source/ui/inc/output.hxx|1 
 sc/source/ui/view/gridwin4.cxx |2 
 sc/source/ui/view/output.cxx   |  202 -
 3 files changed, 204 insertions(+), 1 deletion(-)

New commits:
commit f2d07a3b17430d21d4567f7a01525a702544ed8d
Author: Tomaž Vajngerl 
AuthorDate: Thu Feb 24 17:43:00 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Mar 13 15:34:16 2022 +0100

sc: initial code to draw sparkline into a cell

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

diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 61873156d264..d44f7052589b 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -382,6 +382,7 @@ public:
 
 voidDrawNoteMarks(vcl::RenderContext& rRenderContext);
 voidAddPDFNotes();
+voidDrawSparklines(vcl::RenderContext& rRenderContext);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 3598d5794828..e1a2aa318df3 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -903,6 +903,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const 
ScTableInfo& rTableI
 aOutputData.DrawShadow();
 aOutputData.DrawFrame(*pContentDev);
 
+aOutputData.DrawSparklines(*pContentDev);
+
 // Show Note Mark
 if ( rOpts.GetOption( VOPT_NOTES ) )
 aOutputData.DrawNoteMarks(*pContentDev);
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 09a1fc041eeb..d986460bca52 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -39,6 +38,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -60,6 +63,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -2315,6 +2319,202 @@ void ScOutputData::DrawChangeTrack()
 }
 }
 
+namespace
+{
+
+/** Draw a line chart into the rectangle bounds */
+void drawLine(vcl::RenderContext& rRenderContext, tools::Rectangle const & 
rRectangle,
+std::vector const & rValues, double nMin, double nMax)
+{
+basegfx::B2DPolygon aPolygon;
+double numebrOfSteps = rValues.size() - 1;
+double xStep = 0;
+double nDelta = nMax - nMin;
+
+for (double aValue : rValues)
+{
+double nP = (aValue - nMin) / nDelta;
+double x = rRectangle.GetWidth() * (xStep / numebrOfSteps);
+double y = rRectangle.GetHeight() - rRectangle.GetHeight() * nP;
+
+aPolygon.append({ x, y } );
+xStep++;
+}
+
+basegfx::B2DHomMatrix aMatrix;
+aMatrix.translate(rRectangle.Left(), rRectangle.Top());
+aPolygon.transform(aMatrix);
+
+rRenderContext.DrawPolyLine(aPolygon);
+}
+
+/** Draw a column chart into the rectangle bounds */
+void drawColumn(vcl::RenderContext& rRenderContext, tools::Rectangle const & 
rRectangle,
+std::vector const & rValues, double nMin, double nMax)
+{
+basegfx::B2DPolygon aPolygon;
+
+double xStep = 0;
+double numberOfSteps = rValues.size();
+double nDelta = nMax - nMin;
+
+double nColumnSize = rRectangle.GetWidth() / numberOfSteps;
+
+double nZero = (0 - nMin) / nDelta;
+double nZeroPosition;
+if (nZero >= 0)
+nZeroPosition = rRectangle.GetHeight() - rRectangle.GetHeight() * 
nZero;
+else
+nZeroPosition = rRectangle.GetHeight();
+
+for (double aValue : rValues)
+{
+if (aValue != 0.0)
+{
+double nP = (aValue - nMin) / nDelta;
+double x = rRectangle.GetWidth() * (xStep / numberOfSteps);
+double y = rRectangle.GetHeight() - rRectangle.GetHeight() * nP;
+
+basegfx::B2DRectangle aRectangle(x, y, x + nColumnSize, 
nZeroPosition);
+aPolygon = basegfx::utils::createPolygonFromRect(aRectangle);
+
+basegfx::B2DHomMatrix aMatrix;
+aMatrix.translate(rRectangle.Left(), rRectangle.Top());
+aPolygon.transform(aMatrix);
+rRenderContext.DrawPolygon(aPolygon);
+}
+xStep++;
+}
+}
+
+void drawSparkline(sc::Sparkline* pSparkline, vcl::RenderContext& 
rRenderContext, ScDocument* pDocument,
+ tools::Rectangle const & rRectangle)
+{
+auto const & rRangeList = pSparkline->getInputRange();
+
+if (rRangeList.empty())
+return;
+
+auto pSparklineGroup = pSparkline->getSparklineGroup();
+
+rRenderContext.SetAntialiasing(AntialiasingFlags::Enable);
+
+rRenderContext.SetLineColor(pSparklineGroup->m_aColorSeries);
+rRenderContext.SetFillColor(pSparklineGroup->m_aColorSeries);
+
+ScRange aRange = rRangeList[0];
+
+std::vector aValues;
+
+double

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

2022-03-13 Thread Caolán McNamara (via logerrit)
 tools/source/generic/poly.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 841788923ce185c140ebeac6d34faffa348c8b6e
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 11:23:07 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 14:51:53 2022 +0100

ofz#45527 detect too many points earlier

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

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index b3f53cb0e673..687cb6a5d4fb 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1156,7 +1156,8 @@ static void ImplAdaptiveSubdivide( std::vector& 
rPoints,
 // stop if distance from line is guaranteed to be bounded by d
 if( old_d2 > d2 &&
 recursionDepth < maxRecursionDepth &&
-distance2 >= d2 )
+distance2 >= d2 &&
+rPoints.size() < SAL_MAX_UINT16 )
 {
 // deCasteljau bezier arc, split at t=0.5
 // Foley/vanDam, p. 508
commit f7151c8ab4e4928de8f29c2b4ac232b0a7cefa74
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 11:19:55 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 14:51:40 2022 +0100

pass reference to the target vector instead

no logic change intended here

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

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index ed0086a9df37..b3f53cb0e673 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1106,8 +1106,8 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
 
 /** Recursively subdivide cubic bezier curve via deCasteljau.
 
-   @param rPointIter
-   Output iterator, where the subdivided polylines are written to.
+   @param rPoints
+   Output vector, where the subdivided polylines are written to.
 
@param d
Squared difference of curve to a straight line
@@ -1120,7 +1120,7 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
curve does not deviate more than one pixel from a straight line.
 
 */
-static void ImplAdaptiveSubdivide( ::std::back_insert_iterator< ::std::vector< 
Point > >& rPointIter,
+static void ImplAdaptiveSubdivide( std::vector& rPoints,
const double old_d2,
int recursionDepth,
const double d2,
@@ -1172,15 +1172,15 @@ static void ImplAdaptiveSubdivide( 
::std::back_insert_iterator< ::std::vector< P
 
 // subdivide further
 ++recursionDepth;
-ImplAdaptiveSubdivide(rPointIter, distance2, recursionDepth, d2, L1x, 
L1y, L2x, L2y, L3x, L3y, L4x, L4y);
-ImplAdaptiveSubdivide(rPointIter, distance2, recursionDepth, d2, R1x, 
R1y, R2x, R2y, R3x, R3y, R4x, R4y);
+ImplAdaptiveSubdivide(rPoints, distance2, recursionDepth, d2, L1x, 
L1y, L2x, L2y, L3x, L3y, L4x, L4y);
+ImplAdaptiveSubdivide(rPoints, distance2, recursionDepth, d2, R1x, 
R1y, R2x, R2y, R3x, R3y, R4x, R4y);
 }
 else
 {
 // requested resolution reached.
 // Add end points to output iterator.
 // order is preserved, since this is so to say depth first traversal.
-*rPointIter++ = Point( FRound(P1x), FRound(P1y) );
+rPoints.push_back(Point(FRound(P1x), FRound(P1y)));
 }
 }
 
@@ -1196,7 +1196,6 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const 
double d ) const
 sal_uInt16 nPts( GetSize() );
 ::std::vector< Point > aPoints;
 aPoints.reserve( nPts );
-::std::back_insert_iterator< ::std::vector< Point > > aPointIter( 
aPoints );
 
 for(i=0; imxFlagAry[ i + 2 ] 
) &&
 ( PolyFlags::Normal == P4 || PolyFlags::Smooth == P4 || 
PolyFlags::Symmetric == P4 ) )
 {
-ImplAdaptiveSubdivide( aPointIter, d*d+1.0, 0, d*d,
+ImplAdaptiveSubdivide( aPoints, d*d+1.0, 0, d*d,
mpImplPolygon->mxPointAry[ i ].X(), 
  mpImplPolygon->mxPointAry[ i ].Y(),
mpImplPolygon->mxPointAry[ i+1 
].X(), mpImplPolygon->mxPointAry[ i+1 ].Y(),
mpImplPolygon->mxPointAry[ i+2 
].X(), mpImplPolygon->mxPointAry[ i+2 ].Y(),
@@ -1220,7 +1219,7 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const 
double d ) const
 }
 }
 
-*aPointIter++ = mpImplPolygon->mxPointAry[ i++ ];
+aPoints.push_back(mpImplPolygon->mxPointAry[i++]);
 
 if (aPoints.size() >= SAL_MAX_UINT16)
 {


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/hatch.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a1cb80dc55a708733ea0822150718a7c8076f7ba
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 10:54:38 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 14:24:41 2022 +0100

Degree10 has underlying Int16 type

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

diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index c7665f610a92..e097f2f36dd3 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -91,8 +91,8 @@ SvStream& ReadHatch( SvStream& rIStm, Hatch& rHatch )
 rIStm.ReadInt32(nTmp32);
 rHatch.mpImplHatch->mnDistance = nTmp32;
 
-sal_uInt16 nTmpAngle(0);
-rIStm.ReadUInt16(nTmpAngle);
+sal_Int16 nTmpAngle(0);
+rIStm.ReadInt16(nTmpAngle);
 rHatch.mpImplHatch->mnAngle = Degree10(nTmpAngle);
 
 return rIStm;
@@ -106,7 +106,7 @@ SvStream& WriteHatch( SvStream& rOStm, const Hatch& rHatch )
 
 tools::GenericTypeSerializer aSerializer(rOStm);
 aSerializer.writeColor(rHatch.mpImplHatch->maColor);
-rOStm.WriteInt32( rHatch.mpImplHatch->mnDistance ).WriteUInt16( 
rHatch.mpImplHatch->mnAngle.get() );
+rOStm.WriteInt32( rHatch.mpImplHatch->mnDistance ).WriteInt16( 
rHatch.mpImplHatch->mnAngle.get() );
 
 return rOStm;
 }


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 xmloff/source/style/GradientStyle.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit e4bc01d9f57d47d943ff1910e42abda3d9033f46
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 10:38:28 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 13:04:06 2022 +0100

ofz: Use-of-uninitialized-value

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

diff --git a/xmloff/source/style/GradientStyle.cxx 
b/xmloff/source/style/GradientStyle.cxx
index 17c058727679..7626db9db8ce 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -65,12 +65,16 @@ void XMLGradientStyleImport::importXML(
 OUString aDisplayName;
 
 awt::Gradient aGradient;
+aGradient.Style = css::awt::GradientStyle_LINEAR;
+aGradient.StartColor = 0;
+aGradient.EndColor = 0;
+aGradient.Angle = 0;
+aGradient.Border = 0;
 aGradient.XOffset = 0;
 aGradient.YOffset = 0;
 aGradient.StartIntensity = 100;
 aGradient.EndIntensity = 100;
-aGradient.Angle = 0;
-aGradient.Border = 0;
+aGradient.StepCount = 0;
 
 for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
 {


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpdrawobj.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 71fc9f50ac69da474c1767cef9abaf7edf529675
Author: Caolán McNamara 
AuthorDate: Sun Mar 13 10:48:47 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 12:58:31 2022 +0100

ofz#45524 string is presumed to be at least length 1

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

diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx 
b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 130e729f6fc6..5b704c1d5065 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1244,7 +1244,11 @@ void LwpDrawTextArt::Read()
 - 
(m_aTextArtRec.aPath[1].n*3 + 1)*4;
 
 
-if (!m_pStream->good() || m_aTextArtRec.nTextLen > 
m_pStream->remainingSize())
+if (!m_pStream->good())
+throw BadRead();
+if (m_aTextArtRec.nTextLen > m_pStream->remainingSize())
+throw BadRead();
+if (m_aTextArtRec.nTextLen < 1)
 throw BadRead();
 
 m_aTextArtRec.pTextString = new sal_uInt8 [m_aTextArtRec.nTextLen];


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/annotsh.cxx |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 15fb24db540dc29883346d7e8e37d96e4fe8dfb1
Author: Caolán McNamara 
AuthorDate: Sat Mar 12 20:24:45 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Mar 13 12:50:00 2022 +0100

tdf#147928 "undo" may delete the current SwAnnotationShell

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

diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index b05fedf7c5ae..4647656a0226 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1505,8 +1505,12 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
 SwWrtShell &rSh = m_rView.GetWrtShell();
 SwUndoId nUndoId(SwUndoId::EMPTY);
 
-tools::Long aOldHeight = m_rView.GetPostItMgr()->HasActiveSidebarWin()
-  ? 
m_rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
+// tdf#147929 get these before "undo" which may delete this 
SwAnnotationShell
+SwPostItMgr* pPostItMgr = m_rView.GetPostItMgr();
+SfxBindings& rBindings = m_rView.GetViewFrame()->GetBindings();
+
+tools::Long aOldHeight = pPostItMgr->HasActiveSidebarWin()
+  ? 
pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight()
   : 0;
 
 sal_uInt16 nId = rReq.GetSlot();
@@ -1579,10 +1583,10 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
 }
 }
 
-m_rView.GetViewFrame()->GetBindings().InvalidateAll(false);
+rBindings.InvalidateAll(false);
 
-if (m_rView.GetPostItMgr()->HasActiveSidebarWin())
-
m_rView.GetPostItMgr()->GetActiveSidebarWin()->ResizeIfNecessary(aOldHeight,m_rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight());
+if (pPostItMgr->HasActiveSidebarWin())
+pPostItMgr->GetActiveSidebarWin()->ResizeIfNecessary(aOldHeight, 
pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight());
 }
 
 void SwAnnotationShell::StateUndo(SfxItemSet &rSet)


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/ww8scan.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 434c221dcfff7b5d8243a970b7a63064163033a9
Author: Caolán McNamara 
AuthorDate: Sat Mar 12 14:35:09 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 11:24:57 2022 +0100

treat archaic sprmTDefTable10 like sprmTDefTable

we don't import this, but parse its length like sprmTDefTable as documented

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 29422991cc15..7cac9f292afb 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -216,7 +216,7 @@ const wwSprmSearcher *wwSprmParser::GetWW2SprmSearcher()
 {147, { 2, L_FIX} }, // "sprmTDxaLeft" tap.rgdxaCenter dxa word
 {148, { 2, L_FIX} }, // "sprmTDxaGapHalf" tap.dxaGapHalf, 
tap.rgdxaCenter
 {149, { 1, L_FIX} }, // "sprmTFBiDi" ;;;
-{152, { 0, L_VAR} }, // "sprmTDefTable10" tap.rgdxaCenter, tap.rgtc 
complex
+{152, { 0, L_VAR2} },// "sprmTDefTable10" tap.rgdxaCenter, tap.rgtc 
complex
 {153, { 2, L_FIX} }, // "sprmTDyaRowHeight" tap.dyaRowHeight dya word
 {154, { 0, L_VAR2} },// "sprmTDefTable" tap.rgtc complex
 {155, { 1, L_VAR} }, // "sprmTDefTableShd" tap.rgshd complex
@@ -397,7 +397,7 @@ const wwSprmSearcher 
*wwSprmParser::GetWW6SprmSearcher(const WW8Fib& rFib)
 {NS_sprm::v6::sprmTFCantSplit, { 1, L_FIX} }, // tap.fCantSplit 1 or 0 
byte
 {NS_sprm::v6::sprmTTableHeader, { 1, L_FIX} }, // tap.fTableHeader 1 
or 0 byte
 {NS_sprm::v6::sprmTTableBorders, {12, L_FIX} }, // tap.rgbrcTable 
complex 12 bytes
-{NS_sprm::v6::sprmTDefTable10, { 0, L_VAR} }, // tap.rgdxaCenter, 
tap.rgtc complex
+{NS_sprm::v6::sprmTDefTable10, { 0, L_VAR2} }, // tap.rgdxaCenter, 
tap.rgtc complex
 {NS_sprm::v6::sprmTDyaRowHeight, { 2, L_FIX} }, // tap.dyaRowHeight 
dya word
 {NS_sprm::v6::sprmTDefTable, { 0, L_VAR2} }, // tap.rgtc complex
 {NS_sprm::v6::sprmTDefTableShd, { 1, L_VAR} }, // tap.rgshd complex
@@ -701,7 +701,7 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher()
 InfoRow(), // tap.fTableHeader;1 or 0;byte;
 InfoRow(), // tap.fCantSplit;1 or 0;byte;
 InfoRow(), // tap.rgbrcTable;complex
-{NS_sprm::LN_TDefTable10, { 0, L_VAR} }, // "sprmTDefTable10" 
tap.rgdxaCenter,
+{NS_sprm::LN_TDefTable10, { 0, L_VAR2} }, // "sprmTDefTable10" 
tap.rgdxaCenter,
 // tap.rgtc;complex
 InfoRow(), // tap.dyaRowHeight;dya;word;
 {NS_sprm::LN_TDefTable, { 0, L_VAR2} }, // "sprmTDefTable" 
tap.rgtc;complex


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

2022-03-13 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/annotsh.cxx |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit e54ac357ee669cfc7cb5c68eca4ddce27824ae9a
Author: Caolán McNamara 
AuthorDate: Sat Mar 12 20:24:45 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Mar 13 11:24:35 2022 +0100

tdf#147929 "undo" may delete the current SwAnnotationShell

Change-Id: I69fb7e65e28743aa73e943e02d5029654b5543cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131450
Tested-by: Julien Nabet 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index ce410ba0e3a9..481d550a0328 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1518,8 +1518,12 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
 SwWrtShell &rSh = m_rView.GetWrtShell();
 SwUndoId nUndoId(SwUndoId::EMPTY);
 
-tools::Long aOldHeight = m_rView.GetPostItMgr()->HasActiveSidebarWin()
-  ? 
m_rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
+// tdf#147929 get these before "undo" which may delete this 
SwAnnotationShell
+SwPostItMgr* pPostItMgr = m_rView.GetPostItMgr();
+SfxBindings& rBindings = m_rView.GetViewFrame()->GetBindings();
+
+tools::Long aOldHeight = pPostItMgr->HasActiveSidebarWin()
+  ? 
pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight()
   : 0;
 
 sal_uInt16 nId = rReq.GetSlot();
@@ -1592,10 +1596,10 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
 }
 }
 
-m_rView.GetViewFrame()->GetBindings().InvalidateAll(false);
+rBindings.InvalidateAll(false);
 
-if (m_rView.GetPostItMgr()->HasActiveSidebarWin())
-
m_rView.GetPostItMgr()->GetActiveSidebarWin()->ResizeIfNecessary(aOldHeight,m_rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight());
+if (pPostItMgr->HasActiveSidebarWin())
+pPostItMgr->GetActiveSidebarWin()->ResizeIfNecessary(aOldHeight, 
pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight());
 }
 
 void SwAnnotationShell::StateUndo(SfxItemSet &rSet)


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

2022-03-13 Thread Adityarup Laha (via logerrit)
 sfx2/source/appl/appopen.cxx |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 69656132a00491b96da3a898c350f11e9619da64
Author: Adityarup Laha 
AuthorDate: Sun Mar 13 01:19:34 2022 +0530
Commit: Mike Kaganski 
CommitDate: Sun Mar 13 10:15:04 2022 +0100

tdf#136427: Attempt opening native documents for known protocols only.

Only try to open native documents (ODT, ODS, etc.) in frame for known 
protocols.

This is to prevent LO from trying to handle internal protocol links when the
file has a native extension.

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

diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index a2e3fc5e3f10..89d8266aa9bd 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -843,9 +843,18 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
 return;
 }
 
-const OUString aTypeName { xTypeDetection->queryTypeByURL( 
aURL.Main ) };
-SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
-std::shared_ptr pFilter = rMatcher.GetFilter4EA( 
aTypeName );
+std::shared_ptr pFilter{};
+
+// attempt loading native documents only if they are from a known 
protocol
+// it might be sensible to limit the set of protocols even 
further, but that
+// may cause regressions, needs further testing
+// see tdf#136427 for details
+if (aINetProtocol != INetProtocol::NotValid) {
+const OUString aTypeName { xTypeDetection->queryTypeByURL( 
aURL.Main ) };
+SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
+pFilter = rMatcher.GetFilter4EA( aTypeName );
+}
+
 if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
 {
 // hyperlink does not link to own type => special handling 
(http, ftp) browser and (other external protocols) OS