[Libreoffice-commits] core.git: Branch 'private/quwex/gsoc-box2d-experimental' - 3 commits - animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk officecfg/registry sd/inc sd/source sd/

2020-08-05 Thread Sarper Akdemir (via logerrit)
Rebased ref, commits from common ancestor:
commit 530a73bc4f9da5a0522fef3341fd559f193e14b1
Author: Sarper Akdemir 
AuthorDate: Mon Jul 27 23:02:48 2020 +0300
Commit: Sarper Akdemir 
CommitDate: Wed Aug 5 10:00:59 2020 +0300

work-in-progress complex shapes

Change-Id: I807bbde92c143b8c96792b3d8bf9603a31216486

diff --git a/slideshow/source/engine/box2dtools.cxx 
b/slideshow/source/engine/box2dtools.cxx
index 8729300184f6..90f1d1853dba 100644
--- a/slideshow/source/engine/box2dtools.cxx
+++ b/slideshow/source/engine/box2dtools.cxx
@@ -11,6 +11,13 @@
 #include 
 
 #include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
 
 #define BOX2D_SLIDE_SIZE_IN_METERS 100.00f
 
@@ -62,6 +69,124 @@ b2Vec2 convertB2DPointToBox2DVec2(const basegfx::B2DPoint& 
aPoint, const double
 return { static_cast(aPoint.getX() * fScaleFactor),
  static_cast(aPoint.getY() * -fScaleFactor) };
 }
+
+// expects rPolygon to have coordinates relative to it's center
+void addTriangleVectorToBody(const basegfx::triangulator::B2DTriangleVector& 
rTriangleVector,
+ b2Body* aBody, const float fDensity, const float 
fFriction,
+ const float fRestitution, const double 
fScaleFactor)
+{
+for (const basegfx::triangulator::B2DTriangle& aTriangle : rTriangleVector)
+{
+b2FixtureDef aFixture;
+b2PolygonShape aPolygonShape;
+b2Vec2 aTriangleVertices[3]
+= { convertB2DPointToBox2DVec2(aTriangle.getA(), fScaleFactor),
+convertB2DPointToBox2DVec2(aTriangle.getB(), fScaleFactor),
+convertB2DPointToBox2DVec2(aTriangle.getC(), fScaleFactor) };
+
+bool bValidPointDistance = true;
+for (int a = 0; a < 3; a++)
+{
+for (int b = 0; b < 3; b++)
+{
+if (a == b)
+continue;
+if (b2DistanceSquared(aTriangleVertices[a], 
aTriangleVertices[b]) < 0.003f)
+{
+bValidPointDistance = false;
+}
+}
+}
+if (bValidPointDistance)
+{
+aPolygonShape.Set(aTriangleVertices, 3);
+aFixture.shape = &aPolygonShape;
+aFixture.density = fDensity;
+aFixture.friction = fFriction;
+aFixture.restitution = fRestitution;
+aBody->CreateFixture(&aFixture);
+}
+}
+}
+
+// expects rPolygon to have coordinates relative to it's center
+void addEdgeShapeToBody(const basegfx::B2DPolygon& rPolygon, b2Body* aBody, 
const float fDensity,
+const float fFriction, const float fRestitution, const 
double fScaleFactor)
+{
+basegfx::B2DPolygon aPolygon = 
basegfx::utils::removeNeutralPoints(rPolygon);
+const float fHalfWidth = 0.1;
+bool bHaveEdgeA = false;
+b2Vec2 aEdgeBoxVertices[4];
+
+for (sal_uInt32 nIndex = 0; nIndex < aPolygon.count(); nIndex++)
+{
+b2FixtureDef aFixture;
+b2PolygonShape aPolygonShape;
+
+basegfx::B2DPoint aPointA;
+basegfx::B2DPoint aPointB;
+if (nIndex != 0)
+{
+aPointA = aPolygon.getB2DPoint(nIndex - 1);
+aPointB = aPolygon.getB2DPoint(nIndex);
+}
+else if (/* nIndex == 0 && */ aPolygon.isClosed())
+{
+// start by connecting the last point to the first one
+aPointA = aPolygon.getB2DPoint(aPolygon.count() - 1);
+aPointB = aPolygon.getB2DPoint(nIndex);
+}
+else // the polygon isn't closed, won't connect last and first points
+{
+continue;
+}
+
+b2Vec2 aEdgeUnitVec = (convertB2DPointToBox2DVec2(aPointB, 
fScaleFactor)
+   - convertB2DPointToBox2DVec2(aPointA, 
fScaleFactor));
+aEdgeUnitVec.Normalize();
+
+b2Vec2 aEdgeNormal(-aEdgeUnitVec.y, aEdgeUnitVec.x);
+
+if (!bHaveEdgeA)
+{
+aEdgeBoxVertices[0]
+= convertB2DPointToBox2DVec2(aPointA, fScaleFactor) + 
fHalfWidth * aEdgeNormal;
+aEdgeBoxVertices[1]
+= convertB2DPointToBox2DVec2(aPointA, fScaleFactor) + 
-fHalfWidth * aEdgeNormal;
+bHaveEdgeA = true;
+}
+aEdgeBoxVertices[2]
+= convertB2DPointToBox2DVec2(aPointB, fScaleFactor) + fHalfWidth * 
aEdgeNormal;
+aEdgeBoxVertices[3]
+= convertB2DPointToBox2DVec2(aPointB, fScaleFactor) + -fHalfWidth 
* aEdgeNormal;
+
+bool bValidPointDistance
+= (b2DistanceSquared(aEdgeBoxVertices[0], aEdgeBoxVertices[2]) > 
0.003f);
+
+if (bValidPointDistance)
+{
+aPolygonShape.Set(aEdgeBoxVertices, 4);
+aFixture.shape = &aPolygonShape;
+aFixture.density = fDensity;
+aFixture.friction = fFriction;
+aFixture.restitution = fRestitution;
+aBody->CreateFixt

[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - 3 commits - configure.ac include/vcl sd/source vcl/osx vcl/source vcl/unx

2020-08-05 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac   |2 -
 include/vcl/print.hxx  |3 +
 sd/source/ui/view/DocumentRenderer.cxx |   38 +
 vcl/osx/salprn.cxx |2 -
 vcl/source/gdi/print.cxx   |   58 ++---
 vcl/source/gdi/print3.cxx  |   14 ---
 vcl/unx/generic/print/genprnpsp.cxx|2 -
 7 files changed, 97 insertions(+), 22 deletions(-)

New commits:
commit 0cccd293f77a30d3a3d67dba7e5a947d325188be
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 09:36:24 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 09:36:24 2020 +0200

Release 6.2.9.10

Change-Id: I2ec4f4afe063952377fed1e7d80243e0020a5ae1

diff --git a/configure.ac b/configure.ac
index bc90cea801a8..670d715e0601 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.2.9.9],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.10],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit c614f280683533fc7c1e10d4f960efd420751c66
Author: Gabor Kelemen 
AuthorDate: Mon Jul 22 00:49:03 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 09:25:10 2020 +0200

tdf#39742 tdf#44786 Consider Impress/Draw default printing settings

Default settings can be set under Options - APP - Print but
Impress/Draw has not used these as defaults unlike other apps

Change-Id: I7d430f8fb24f9626cd628b4fe9e0520d9d42b848
Reviewed-on: https://gerrit.libreoffice.org/76079
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 844be49e7e511f0c397e1faebca10b4fa25ea937)

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index 09a227c0a854..e43c942bf70d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -59,6 +59,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
@@ -442,7 +445,7 @@ namespace {
 
SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_NAME),
 
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
 "IsPrintName" ,
-false
+
officecfg::Office::Impress::Print::Other::PageName::get()
 )
 );
 }
@@ -452,7 +455,7 @@ namespace {
 SdResId(STR_DRAW_PRINT_UI_IS_PRINT_NAME),
 
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
 "IsPrintName" ,
-false
+
officecfg::Office::Draw::Print::Other::PageName::get()
 )
 );
 }
@@ -461,7 +464,12 @@ namespace {
 SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_DATE),
 
".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" ,
 "IsPrintDateTime" ,
-false
+// Separate settings for time and date in 
Impress/Draw -> Print page, check that both are set
+mbImpress ?
+
officecfg::Office::Impress::Print::Other::Date::get() &&
+
officecfg::Office::Impress::Print::Other::Time::get() :
+
officecfg::Office::Draw::Print::Other::Date::get() &&
+
officecfg::Office::Draw::Print::Other::Time::get()
 )
 );
 
@@ -471,7 +479,7 @@ namespace {
 
SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN),
 
".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" ,
 "IsPrintHidden" ,
-false
+
officecfg::Office::Impress::Print::Other::HiddenPage::get()
 )
 );
 }
@@ -493,7 +501,9 @@ namespace {
 aHelpIds,
 "Quality" ,
 
CreateChoice(STR_IMPRESS_PRINT_UI_QUALITY_CHOICES, 
SAL_N_ELEMENTS(STR_IMPRESS_PRINT_UI_QUALITY_CHOICES)),
-0)
+mbImpress ? 
officecfg::Office::Impress::Print::Other::Quality::get() :
+   

[Libreoffice-commits] online.git: loleaflet/src

2020-08-05 Thread Szymon Kłos (via logerrit)
 loleaflet/src/control/Control.NotebookbarBuilder.js |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 36844c0e73305546e9664fdec2cdd504319be89c
Author: Szymon Kłos 
AuthorDate: Tue Aug 4 15:59:14 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Aug 5 09:39:44 2020 +0200

notebookbar: hide unsupported items

provide non async dialogs

Change-Id: I70b58cc3bbd6067553ca5d3b098fc48bb0dfc9a6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100116
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js 
b/loleaflet/src/control/Control.NotebookbarBuilder.js
index da036bf85..2420109cb 100644
--- a/loleaflet/src/control/Control.NotebookbarBuilder.js
+++ b/loleaflet/src/control/Control.NotebookbarBuilder.js
@@ -172,7 +172,12 @@ L.Control.NotebookbarBuilder = 
L.Control.JSDialogBuilder.extend({
this._toolitemHandlers['.uno:InsertExternalDataSource'] = 
function() {};
this._toolitemHandlers['.uno:RecalcPivotTable'] = function() {};
this._toolitemHandlers['.uno:DataProviderRefresh'] = function() 
{};
-   this._toolitemHandlers['.uno:Calculate'] = function() {};
+   this._toolitemHandlers['.uno:DataSubTotals'] = function() {};
+   this._toolitemHandlers['.uno:DefineDBName'] = function() {};
+   this._toolitemHandlers['.uno:SelectDB'] = function() {};
+   this._toolitemHandlers['.uno:DataAreaRefresh'] = function() {};
+   this._toolitemHandlers['.uno:TextToColumns'] = function() {};
+   this._toolitemHandlers['.uno:DataConsolidate'] = function() {};
 
this._toolitemHandlers['vnd.sun.star.findbar:FocusToFindbar'] = 
function() {};
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Szymon Kłos (via logerrit)
 sc/inc/scabstdlg.hxx   |7 +++---
 sc/source/ui/attrdlg/scdlgfact.cxx |   15 ++
 sc/source/ui/attrdlg/scdlgfact.hxx |6 ++---
 sc/source/ui/view/cellsh1.cxx  |   38 +++--
 4 files changed, 42 insertions(+), 24 deletions(-)

New commits:
commit 34b0e97c25a943c2e4ba98750b970bee542f5819
Author: Szymon Kłos 
AuthorDate: Tue Aug 4 16:18:42 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Aug 5 09:40:57 2020 +0200

Make Group dialog async

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

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 2991a224f3ea..a72573c808b9 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -173,12 +173,13 @@ public:
 virtual voidSetEdStartValEnabled(bool bFlag) = 0;
 };
 
-class AbstractScGroupDlg :  public VclAbstractDialog
+class AbstractScGroupDlg
 {
 protected:
-virtual ~AbstractScGroupDlg() override = default;
+virtual ~AbstractScGroupDlg() = default;
 public:
 virtual bool GetColsChecked() const = 0;
+virtual std::shared_ptr getDialogController() = 0;
 };
 
 class AbstractScInsertCellDlg : public VclAbstractDialog
@@ -445,7 +446,7 @@ public:
 double  
fMax,
 sal_uInt16 
 nPossDir) = 0;
 
-virtual VclPtr CreateAbstractScGroupDlg(weld::Window* 
pParent, bool bUnGroup = false) = 0;
+virtual std::shared_ptr 
CreateAbstractScGroupDlg(weld::Window* pParent, bool bUnGroup = false) = 0;
 
 virtual VclPtr 
CreateScInsertCellDlg(weld::Window* pParent,
  bool 
bDisallowCellMove) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 238a46fb725e..ab717e1ee05e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -148,11 +148,6 @@ short AbstractScFillSeriesDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
-short AbstractScGroupDlg_Impl::Execute()
-{
-return m_xDlg->run();
-}
-
 short AbstractScInsertCellDlg_Impl::Execute()
 {
 return m_xDlg->run();
@@ -493,7 +488,11 @@ void
AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(bool bFlag)
 
 bool AbstractScGroupDlg_Impl::GetColsChecked() const
 {
-return m_xDlg->GetColsChecked();
+ScGroupDlg* pDlg = dynamic_cast(m_xDlg.get());
+if (pDlg)
+return pDlg->GetColsChecked();
+
+return false;
 }
 
 InsCellCmd  AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
@@ -1034,9 +1033,9 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScFillSeries
 return 
VclPtr::Create(std::make_unique(pParent,
 rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir));
 }
 
-VclPtr 
ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg(weld::Window* pParent, 
bool bUnGroup)
+std::shared_ptr 
ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg(weld::Window* pParent, 
bool bUnGroup)
 {
-return 
VclPtr::Create(std::make_unique(pParent, 
bUnGroup, true/*bRows*/));
+return 
std::make_shared(std::make_unique(pParent, 
bUnGroup, true/*bRows*/));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScInsertCellDlg(weld::Window* pParent,
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index aa9c28a35ebb..4f8987bc4e1a 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -285,14 +285,14 @@ public:
 
 class AbstractScGroupDlg_Impl :  public AbstractScGroupDlg
 {
-std::unique_ptr m_xDlg;
+std::shared_ptr m_xDlg;
 public:
 explicit AbstractScGroupDlg_Impl(std::unique_ptr p)
 : m_xDlg(std::move(p))
 {
 }
-virtual short Execute() override;
 virtual bool GetColsChecked() const override;
+virtual std::shared_ptr getDialogController() 
override { return m_xDlg; }
 };
 
 class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg
@@ -714,7 +714,7 @@ public:
 double  
fStep,
 double  
fMax,
 sal_uInt16   
nPossDir) override;
-virtual VclPtr CreateAbstractScGroupDlg(weld::Window* 
pParent, bool bUnGroup = false) override;
+virtual std::shared_ptr 
CreateAbstractScGroupDlg(weld::Window* pParent, bool bUnGroup = false) override;
 
 virtual VclPtr 
CreateScInsertCellDlg(weld::Window* pParent,
   bool 
bDisallowCellMove) override;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 5873272f1dfe..e715c721c721 100644
--- a/sc/source/ui/

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

2020-08-05 Thread Stephan Bergmann (via logerrit)
 sw/source/core/frmedt/fecopy.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f2a18401f9e9bda9be043ee442078e31ff567357
Author: Stephan Bergmann 
AuthorDate: Wed Aug 5 08:18:57 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 5 09:48:50 2020 +0200

loplugin:indentation (--disable-assert-always-abort)

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

diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 77683bc821cb..3b68e1760787 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -152,7 +152,7 @@ void SwFEShell::Copy( SwDoc* pClpDoc, const OUString* 
pNewClpText )
 #ifndef NDEBUG
 bool inserted =
 #endif
-rSpzFrameFormats.newDefault( pFlyFormat );
+rSpzFrameFormats.newDefault( pFlyFormat );
 assert( !inserted && "Fly not contained in Spz-Array" );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libgpg-error

2020-08-05 Thread Stephan Bergmann (via logerrit)
 external/libgpg-error/UnpackedTarball_libgpg-error.mk |1 +
 external/libgpg-error/clang-cl.patch  |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 72f01ff8da8ffaad50eebc49182e49dee2aa5877
Author: Stephan Bergmann 
AuthorDate: Tue Aug 4 14:34:49 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 5 09:49:25 2020 +0200

external/libgpg-error: -Werror,-Wundef (clang-cl)

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

diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk 
b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index af74bb1d07c3..72ff13069c76 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
external/libgpg-error/w32-build-fixes-4.patch \
$(if $(filter 
MSC,$(COM)),external/libgpg-error/w32-build-fixes-5.patch) \
$(if $(filter 
LINUX,$(OS)),external/libgpg-error/libgpgerror-bundled-soname.patch.1) \
+   external/libgpg-error/clang-cl.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgpg-error/clang-cl.patch 
b/external/libgpg-error/clang-cl.patch
new file mode 100644
index ..3a635c5d8990
--- /dev/null
+++ b/external/libgpg-error/clang-cl.patch
@@ -0,0 +1,11 @@
+--- src/gpg-error.h.in
 src/gpg-error.h.in
+@@ -152,7 +152,7 @@
+ /*
+  * GCC feature test.
+  */
+-#if __GNUC__
++#ifdef __GNUC__
+ # define _GPG_ERR_GCC_VERSION (__GNUC__ * 1 \
++ __GNUC_MINOR__ * 100 \
++ __GNUC_PATCHLEVEL__)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - filter/source

2020-08-05 Thread Samuel Thibault (via logerrit)
 filter/source/graphicfilter/ieps/ieps.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2d73afe9a0166f926ca97fd82d3673f7a2d05827
Author: Samuel Thibault 
AuthorDate: Tue Aug 4 04:29:48 2020 +0200
Commit: Xisco Fauli 
CommitDate: Wed Aug 5 10:23:58 2020 +0200

tdf#135427 Make pstoedit delegate letter placement to us

As pstoedit documents itself, its wmf/emf driver uses a very approximate
interletter spacing, making the text look really awful. But it provides a
-nfw option that delegates the letter placement to the emf reader, and we
happen to be doing a proper job, thus getting a proper vectorized output.

This is not a concern on Windows (and the option is ignored there). The
option is available since version 3.40 (~2005). So we can just always pass
it on.

Change-Id: I8ffd3fbf046b5a80e8011651eeaf060a8f5107e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100035
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit c39b27a4d0dfc3b75d8486c0d7592c5209fb6b14)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100053
Reviewed-by: Xisco Fauli 

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx 
b/filter/source/graphicfilter/ieps/ieps.cxx
index 413e6725fc73..a6c764adaff2 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -220,9 +220,14 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 
nBytesRead, Graphic &r
 //-usebbfrominput forces pstoedit to take the original ps bounding box
 //as the bounding box as it sees it, instead of calculating its own
 //which also doesn't work for this example
+//
+//Under Linux, positioning of letters within pstoedit is very approximate.
+//Using the -nfw option delegates the positioning to the reader, and we
+//will do a proper job.  The option is ignored on Windows.
 OUString arg1("-usebbfrominput");   //-usebbfrominput use the original ps 
bounding box
 OUString arg2("-f");
-OUString arg3("emf:-OO -drawbb");   //-drawbb mark out the bounding box 
extent with bg pixels
+OUString arg3("emf:-OO -drawbb -nfw"); //-drawbb mark out the bounding box 
extent with bg pixels
+   //-nfw delegate letter placement to 
us
 rtl_uString *args[] =
 {
 arg1.pData, arg2.pData, arg3.pData, input.pData, output.pData
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Gülşah Köse (via logerrit)
 oox/source/ppt/pptshapecontext.cxx|   21 +++--
 sd/qa/unit/data/ppt/placeholder-priority.pptx |binary
 sd/qa/unit/import-tests.cxx   |   20 
 3 files changed, 39 insertions(+), 2 deletions(-)

New commits:
commit 802fa332fc05a119c525f20a46ac3aaea7900602
Author: Gülşah Köse 
AuthorDate: Sat Aug 1 01:39:26 2020 +0300
Commit: Xisco Fauli 
CommitDate: Wed Aug 5 10:23:32 2020 +0200

tdf#133687 Fix the placeholders priority order.

When we don't have type attribute on slide but have on
slidelayout we have to use it instead of default type.

Change-Id: Ibb874b5ee39c48641484fe1a8686f66c31695f76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99904
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 
(cherry picked from commit e0018be102edd6e376e0622e0a9384176d2f119c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100052
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/ppt/pptshapecontext.cxx 
b/oox/source/ppt/pptshapecontext.cxx
index 25bcc9200bef..72c96dd8d9c2 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -65,10 +65,28 @@ ContextHandlerRef PPTShapeContext::onCreateContext( 
sal_Int32 aElementToken, con
 }
 case PPT_TOKEN( ph ):
 {
+SlidePersistPtr pMasterPersist( 
mpSlidePersistPtr->getMasterPersist() );
+OptValue< sal_Int32 > oSubType( rAttribs.getToken( XML_type) );
 sal_Int32 nSubType( rAttribs.getToken( XML_type, XML_obj ) );
+sal_Int32 nSubTypeIndex;
+oox::drawingml::ShapePtr pTmpPlaceholder;
+
 mpShapePtr->setSubType( nSubType );
+
 if( rAttribs.hasAttribute( XML_idx ) )
-mpShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx 
).get().toInt32() );
+{
+nSubTypeIndex = rAttribs.getString( XML_idx ).get().toInt32();
+mpShapePtr->setSubTypeIndex( nSubTypeIndex );
+
+if(!oSubType.has() && pMasterPersist)
+{
+pTmpPlaceholder = PPTShape::findPlaceholderByIndex( 
nSubTypeIndex, pMasterPersist->getShapes()->getChildren() );
+
+if(pTmpPlaceholder)
+nSubType = pTmpPlaceholder->getSubType(); // When we 
don't have type attribute on slide but have on slidelayout we have to use it 
instead of default type
+}
+}
+
 if ( nSubType )
 {
 PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( 
mpShapePtr.get() );
@@ -125,7 +143,6 @@ ContextHandlerRef PPTShapeContext::onCreateContext( 
sal_Int32 aElementToken, con
   }
   else if ( eShapeLocation == Slide )   // normal 
slide shapes have to search within the corresponding master tree for referenced 
objects
   {
-  SlidePersistPtr pMasterPersist( 
mpSlidePersistPtr->getMasterPersist() );
   if ( pMasterPersist )
   {
   pPlaceholder = 
PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
diff --git a/sd/qa/unit/data/ppt/placeholder-priority.pptx 
b/sd/qa/unit/data/ppt/placeholder-priority.pptx
new file mode 100644
index ..d11dc4785f54
Binary files /dev/null and b/sd/qa/unit/data/ppt/placeholder-priority.pptx 
differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bc80fb5e3ca3..cec91cfb6387 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -133,6 +133,7 @@ public:
 void testN828390_2();
 void testN828390_3();
 void testFdo68594();
+void testPlaceholderPriority();
 void testFdo72998();
 void testFdo77027();
 void testStrictOOXML();
@@ -240,6 +241,7 @@ public:
 CPPUNIT_TEST(testN828390_2);
 CPPUNIT_TEST(testN828390_3);
 CPPUNIT_TEST(testFdo68594);
+CPPUNIT_TEST(testPlaceholderPriority);
 CPPUNIT_TEST(testFdo72998);
 CPPUNIT_TEST(testFdo77027);
 CPPUNIT_TEST(testStrictOOXML);
@@ -686,6 +688,24 @@ void SdImportTest::testFdo68594()
 xDocShRef->DoClose();
 }
 
+void SdImportTest::testPlaceholderPriority()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/placeholder-priority.pptx"),
 PPTX);
+
+const SdrPage* pPage = GetPage( 1, xDocShRef );
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Missing placeholder", sal_uInt32(2), 
sal_uInt32(pPage->GetObjCount()));
+
+tools::Rectangle pObj1Rect(9100, 3500, 29619, 4038);
+SdrObject *pObj1 = pPage->GetObj(0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Placeholder position is wrong, check the 
placeholder priority", pObj1Rect, pObj1->GetCurrentBoundRect());
+
+tools::Rectangle pObj2Rect(9102, 8643, 29619, 12642);
+SdrObject *pObj2 = pPage->GetObj(1);

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

2020-08-05 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/test/consttobool.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8324dfb50b1762a8a5b941da9d62bf6bab683364
Author: Stephan Bergmann 
AuthorDate: Tue Aug 4 22:22:02 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 5 10:25:26 2020 +0200

Adapt to --disable-assert-always-abort

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

diff --git a/compilerplugins/clang/test/consttobool.cxx 
b/compilerplugins/clang/test/consttobool.cxx
index 28184825556e..3d880cb4d5d1 100644
--- a/compilerplugins/clang/test/consttobool.cxx
+++ b/compilerplugins/clang/test/consttobool.cxx
@@ -55,6 +55,7 @@ int main()
 // expected-error@+1 {{implicit conversion of constant 3 of type 'int' to 
'bool'; use 'true' instead [loplugin:consttobool]}}
 b = (c1 | c2);
 
+#if !defined NDEBUG
 assert(b); // no warnings from within assert macro itself
 assert(b && "msg"); // no warnings for `&& "msg"`
 if (b)
@@ -63,6 +64,7 @@ int main()
 }
 // expected-error@+1 {{implicit conversion of constant &"msg"[0] of type 
'const char *' to 'bool'; use 'true' instead [loplugin:consttobool]}}
 assert("msg");
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loolwsd.service

2020-08-05 Thread Michael Meeks (via logerrit)
 loolwsd.service |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d8f3783864e46f8ae056e408027c79f42b07a017
Author: Michael Meeks 
AuthorDate: Tue Aug 4 19:30:20 2020 +0100
Commit: Andras Timar 
CommitDate: Wed Aug 5 10:32:47 2020 +0200

Remove default file descriptor limit.

Change-Id: I1b811bd2fbabaa7c23861b215dc254832d200324
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100064
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loolwsd.service b/loolwsd.service
index 93e98fd67..4f25a69f8 100644
--- a/loolwsd.service
+++ b/loolwsd.service
@@ -10,6 +10,7 @@ TimeoutStopSec=120
 User=lool
 KillMode=control-group
 Restart=always
+LimitNOFILE=infinity:infinity
 
 [Install]
 WantedBy=multi-user.target
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loolwsd.service

2020-08-05 Thread Michael Meeks (via logerrit)
 loolwsd.service |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 852135fa8515eff349983a3f387ec44c1173ab0a
Author: Michael Meeks 
AuthorDate: Tue Aug 4 19:30:20 2020 +0100
Commit: Andras Timar 
CommitDate: Wed Aug 5 10:36:02 2020 +0200

Remove default file descriptor limit.

Change-Id: I1b811bd2fbabaa7c23861b215dc254832d200324
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100063
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loolwsd.service b/loolwsd.service
index 93e98fd67..4f25a69f8 100644
--- a/loolwsd.service
+++ b/loolwsd.service
@@ -10,6 +10,7 @@ TimeoutStopSec=120
 User=lool
 KillMode=control-group
 Restart=always
+LimitNOFILE=infinity:infinity
 
 [Install]
 WantedBy=multi-user.target
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   48 
 sd/qa/unit/data/pptx/smartart-linear-rule.pptx  |binary
 sd/qa/unit/import-tests-smartart.cxx|8 +++
 3 files changed, 48 insertions(+), 8 deletions(-)

New commits:
commit b193ca37569f0e916a9d827e8a78ebbba4577a5b
Author: Miklos Vajna 
AuthorDate: Fri Jul 31 15:59:10 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 10:45:38 2020 +0200

oox smartart, linear layout: correctly scale spacings wrt constraints and 
rules

When constraints request a width which is larger than 100%, we scale
down. Then rules decide which children should be scaled down and which
ones stay as-is.

This commit adjusts the size of children which have no rule, but their
size has a constraint that they're a fraction of a scaled down child.

(cherry picked from commit 91f0f7e5e0a55cb1dbd729a1d7de52388b1cfb15)

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

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index b748298f7c1c..fc1b58e24d27 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -906,7 +906,7 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 const sal_Int32 nIncX = nDir==XML_fromL ? 1 : (nDir==XML_fromR ? 
-1 : 0);
 const sal_Int32 nIncY = nDir==XML_fromT ? 1 : (nDir==XML_fromB ? 
-1 : 0);
 
-sal_Int32 nCount = rShape->getChildren().size();
+double fCount = rShape->getChildren().size();
 sal_Int32 nConnectorAngle = 0;
 switch (nDir)
 {
@@ -953,18 +953,50 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 if (!aChildrenToShrink.empty())
 {
 // Have scaling info from rules: then only count scaled 
children.
+// Also count children which are a fraction of a scaled child.
+std::set aChildrenToShrinkDeps;
 for (auto& aCurrShape : rShape->getChildren())
 {
 if (aChildrenToShrink.find(aCurrShape->getInternalName())
 == aChildrenToShrink.end())
 {
-if (nCount > 1)
+if (fCount > 1.0)
 {
---nCount;
+fCount -= 1.0;
+
+for (const auto& rConstraint : rConstraints)
+{
+if (rConstraint.msForName != 
aCurrShape->getInternalName())
+{
+continue;
+}
+
+if 
(aChildrenToShrink.find(rConstraint.msRefForName) == aChildrenToShrink.end())
+{
+continue;
+}
+
+if ((nDir == XML_fromL || nDir == XML_fromR) 
&& rConstraint.mnType != XML_w)
+{
+continue;
+}
+if ((nDir == XML_fromT || nDir == XML_fromB) 
&& rConstraint.mnType != XML_h)
+{
+continue;
+}
+
+// At this point we have a child with a size 
which is a factor of an
+// other child which will be scaled.
+fCount += rConstraint.mfFactor;
+
aChildrenToShrinkDeps.insert(aCurrShape->getInternalName());
+break;
+}
 }
 }
 }
 
+aChildrenToShrink.insert(aChildrenToShrinkDeps.begin(), 
aChildrenToShrinkDeps.end());
+
 // No manual spacing: spacings are children as well.
 aSpaceSize = awt::Size();
 }
@@ -979,13 +1011,13 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
   && aChild->getChildren().empty();
}),
 rShape->getChildren().end());
-nCount = rShape->getChildren().size();
+fCount = rShape->getChildren().size();
 }
 awt::Size aChildSize = rShape->getSize();
 if (nDir == XML_fromL || nDir == XML_fromR)
-aChildSize.Width /= nCount;
+aChildSize.Width /

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

2020-08-05 Thread Miklos Vajna (via logerrit)
 sw/qa/core/uwriter.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit ed3ccdbde9ace7d2e3d67a9cc83a189cfaf1cad9
Author: Miklos Vajna 
AuthorDate: Tue Aug 4 21:05:54 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 10:45:08 2020 +0200

CppunitTest_sw_uwriter: make rng used in this test repeatable

So in case the test fails, it's possible to see the same failure
multiple times.

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

diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 079f7e311245..a2b5e99e079b 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -43,6 +43,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -1075,6 +1076,10 @@ getRandomPosition(SwDoc *pDoc, int /* nOffset */)
 
 void SwDocTest::randomTest()
 {
+OUString aEnvKey("SAL_RAND_REPEATABLE");
+OUString aEnvValue("1");
+osl_setEnvironment(aEnvKey.pData, aEnvValue.pData);
+
 CPPUNIT_ASSERT_MESSAGE("SwDoc::IsRedlineOn()", 
!m_pDoc->getIDocumentRedlineAccess().IsRedlineOn());
 RedlineFlags modes[] = {
 RedlineFlags::On,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - oox/source sd/qa

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   58 ++--
 sd/qa/unit/data/pptx/smartart-linear-rule.pptx  |binary
 sd/qa/unit/import-tests-smartart.cxx|   11 +++
 3 files changed, 66 insertions(+), 3 deletions(-)

New commits:
commit 2b4d3b05b345280368d6277dbbcf470e92937e46
Author: Miklos Vajna 
AuthorDate: Mon Aug 3 11:18:49 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 10:46:17 2020 +0200

oox smartart, linear layout: limit height of children to parent size

Constraints are OK to request more, but it seems PowerPoint doesn't
allow leaving the parent, which simplifies the layout as well.

(cherry picked from commit b7481a026348c3417fa13a440312521dccee9ec8)

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

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index e23226de61a8..13e684d7b76f 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -927,9 +927,21 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 
 LayoutProperty& rProperty = aProperties[rConstraint.msForName];
 if (rConstraint.mnType == XML_w)
+{
 rProperty[XML_w] = rShape->getSize().Width * 
rConstraint.mfFactor;
+if (rProperty[XML_w] > rShape->getSize().Width)
+{
+rProperty[XML_w] = rShape->getSize().Width;
+}
+}
 if (rConstraint.mnType == XML_h)
+{
 rProperty[XML_h] = rShape->getSize().Height * 
rConstraint.mfFactor;
+if (rProperty[XML_h] > rShape->getSize().Height)
+{
+rProperty[XML_h] = rShape->getSize().Height;
+}
+}
 
 // TODO: get values from differently named constraints as well
 if (rConstraint.msForName == "sp" || rConstraint.msForName == 
"space" || rConstraint.msForName == "sibTrans")
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index 7e5dd78b8b44..4425c560d676 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -1520,6 +1520,12 @@ void SdImportTestSmartArt::testLinearRule()
 sal_Int32 nArrowLeft = xShape->getPosition().X;
 CPPUNIT_ASSERT_EQUAL(nGroupLeft, nArrowLeft);
 
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected less or equal than: 10092
+// - Actual  : 20183
+// i.e. the arrow height was larger than the canvas given to the smartart 
on slide 1.
+CPPUNIT_ASSERT_LESSEQUAL(static_cast(10092), 
xShape->getSize().Height);
+
 xDocShRef->DoClose();
 }
 
commit 1d68ea619ca08264ec357e4388ac2da2b7473d2b
Author: Miklos Vajna 
AuthorDate: Mon Aug 3 09:57:57 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 10:46:00 2020 +0200

oox smartart, linear layout: fix scaling of spacing without rules

With this, finally the arrow shape has the correct horizontal position
and width, even if the markup is as complex as the PowerPoint UI
generates it (the previous version was a more minimal version).

(cherry picked from commit 880673412143a7db7ea1bf4766040662dfc085dc)

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

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index fc1b58e24d27..e23226de61a8 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -964,6 +964,8 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 {
 fCount -= 1.0;
 
+bool bIsDependency = false;
+double fFactor = 0;
 for (const auto& rConstraint : rConstraints)
 {
 if (rConstraint.msForName != 
aCurrShape->getInternalName())
@@ -971,16 +973,25 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 continue;
 }
 
-if 
(aChildrenToShrink.find(rConstraint.msRefForName) == aChildrenToShrink.end())
+if ((nDir == XML_fromL || nDir == XML_fromR) 
&& rConstraint.mnType != XML_w)
  

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

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   22 
 oox/source/drawingml/diagram/diagramlayoutatoms.hxx |1 
 oox/source/drawingml/diagram/layoutnodecontext.cxx  |   19 -
 sd/qa/unit/import-tests-smartart.cxx|5 ++--
 4 files changed, 44 insertions(+), 3 deletions(-)

New commits:
commit 8c653a9badf2b3383215ac5cfd2630a7af1853e7
Author: Miklos Vajna 
AuthorDate: Tue Aug 4 10:58:00 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 10:46:31 2020 +0200

oox smartart: add support for 

This changes the order of children, which matters when they have no
explicit ZOrder. With this, the text shapes on the arrow shape are on
top of the arrow, not behind it.

The trick is that nominally chOrder can be "t"(op) or "b"(ottom),
defaulting to bottom, but there is a difference between an explicit "b"
and not setting it. When not setting it, the layout node is expected to
inherit it from its parent layout node, recursively.

This would probably make sense for other algorithms as well, but set it
only for the linear algorithm for now, as that's where we have a bug
document showing the PowerPoint behavior.

(cherry picked from commit 3c185bf386b4c9609ab32d19bf95b83fe0a3)

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

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 13e684d7b76f..44a66f819e98 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -1147,6 +1147,28 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 if (aCurrShape->getSubType() == XML_conn)
 aCurrShape->setRotation(nConnectorAngle * PER_DEGREE);
 }
+
+// Newer shapes are behind older ones by default. Reverse this if 
requested.
+sal_Int32 nChildOrder = XML_b;
+const LayoutNode* pParentLayoutNode = nullptr;
+for (LayoutAtomPtr pAtom = getParent(); pAtom; pAtom = 
pAtom->getParent())
+{
+auto pLayoutNode = dynamic_cast(pAtom.get());
+if (pLayoutNode)
+{
+pParentLayoutNode = pLayoutNode;
+break;
+}
+}
+if (pParentLayoutNode)
+{
+nChildOrder = pParentLayoutNode->getChildOrder();
+}
+if (nChildOrder == XML_t)
+{
+std::reverse(rShape->getChildren().begin(), 
rShape->getChildren().end());
+}
+
 break;
 }
 
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index 8904e525a181..ab152bed0b70 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -272,6 +272,7 @@ public:
 { msStyleLabel = sLabel; }
 void setChildOrder( sal_Int32 nOrder )
 { mnChildOrder = nOrder; }
+sal_Int32 getChildOrder() const { return mnChildOrder; }
 void setExistingShape( const ShapePtr& pShape )
 { mpExistingShape = pShape; }
 const ShapePtr& getExistingShape() const
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx 
b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 7157176053d8..f7308b6623bf 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -195,7 +195,24 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
 {
 LayoutNodePtr pNode( new 
LayoutNode(mpNode->getLayoutNode().getDiagram()) );
 LayoutAtom::connect(mpNode, pNode);
-pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
+
+if (rAttribs.hasAttribute(XML_chOrder))
+{
+pNode->setChildOrder(rAttribs.getToken(XML_chOrder, XML_b));
+}
+else
+{
+for (LayoutAtomPtr pAtom = mpNode; pAtom; pAtom = 
pAtom->getParent())
+{
+auto pLayoutNode = dynamic_cast(pAtom.get());
+if (pLayoutNode)
+{
+pNode->setChildOrder(pLayoutNode->getChildOrder());
+break;
+}
+}
+}
+
 pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
 pNode->setStyleLabel( rAttribs.getString( XML_styleLbl ).get() );
 return new LayoutNodeContext( *this, rAttribs, pNode );
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index 4425c560d676..110b7d2c81ea 100644
--- a/sd/qa/unit/import-tests-smartart

[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/co-6.2-22'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'co-6.2-22' created by Andras Timar  at 
2020-08-05 08:53 +

co-6.2-22

Changes since CP-Android-iOS-4.2.0:
Andras Timar (1):
  tdf#130999 fix registration of Greek dictionary

---
 el_GR/META-INF/manifest.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.2-22'

2020-08-05 Thread Muhammet Kara (via logerrit)
Tag 'co-6.2-22' created by Andras Timar  at 
2020-08-05 08:53 +

co-6.2-22

Changes since cp-6.2-18-1:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/co-6.2-22'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'co-6.2-22' created by Andras Timar  at 
2020-08-05 08:53 +

co-6.2-22

Changes since CODE-4.2.2-2:
Andras Timar (1):
  [cp] add info about xapian omega search and the cp-query template

---
 xapian/cp-query   |  141 ++
 xapian/xapian.txt |  109 +
 2 files changed, 250 insertions(+)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-6.2-22'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'cp-6.2-22' created by Andras Timar  at 
2020-08-05 08:52 +

cp-6.2-22

Changes since CODE-4.2.2-2:
Andras Timar (1):
  [cp] add info about xapian omega search and the cp-query template

---
 xapian/cp-query   |  141 ++
 xapian/xapian.txt |  109 +
 2 files changed, 250 insertions(+)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.2-22'

2020-08-05 Thread Stephan Bergmann (via logerrit)
Tag 'cp-6.2-22' created by Andras Timar  at 
2020-08-05 08:52 +

cp-6.2-22

Changes since cp-6.2-21-46:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-6.2-22'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'cp-6.2-22' created by Andras Timar  at 
2020-08-05 08:52 +

cp-6.2-22

Changes since CP-Android-iOS-4.2.0:
Andras Timar (1):
  tdf#130999 fix registration of Greek dictionary

---
 el_GR/META-INF/manifest.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/co-6.2-22'

2020-08-05 Thread Stephan Bergmann (via logerrit)
Tag 'co-6.2-22' created by Andras Timar  at 
2020-08-05 08:53 +

co-6.2-22

Changes since cp-6.2-21-46:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-6.2-22'

2020-08-05 Thread Muhammet Kara (via logerrit)
Tag 'cp-6.2-22' created by Andras Timar  at 
2020-08-05 08:52 +

cp-6.2-22

Changes since cp-6.2-18-1:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'distro/collabora/co-4-2-7'

2020-08-05 Thread Michael Meeks (via logerrit)
New branch 'distro/collabora/co-4-2-7' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-7' - .gitreview

2020-08-05 Thread Andras Timar (via logerrit)
 .gitreview |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d2cef546001558db0259c2f62e2ce775633e1f86
Author: Andras Timar 
AuthorDate: Thu Jul 2 10:06:57 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Aug 5 10:56:04 2020 +0200

set .gitreview

Change-Id: Icc5306ea06b9152544aaef980fe9d334b470972f

diff --git a/.gitreview b/.gitreview
index 71d55941e..89f90061d 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=gerrit.libreoffice.org
 port=29418
 project=online
 defaultremote=logerrit
-defaultbranch=distro/collabora/co-4-2
+defaultbranch=distro/collabora/co-4-2-7
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-7' - configure.ac debian/changelog loolwsd.spec.in

2020-08-05 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 00a7bc58c05587e32aaf447280451e8483d7a083
Author: Andras Timar 
AuthorDate: Wed Aug 5 10:58:04 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Aug 5 10:58:04 2020 +0200

Bump package version to 4.2.7-1

Change-Id: I324478883290b675d9e0fa3274d8b729c48ec182

diff --git a/configure.ac b/configure.ac
index d02b515e1..fcfd432e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [4.2.6], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [4.2.7], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index 2d9a577cd..2364fab83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (4.2.7-1) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.7-1
+
+ -- Andras Timar   Wed, 04 Aug 2020 10:20:00 +0200
+
 loolwsd (4.2.6-2) unstable; urgency=medium
 
   * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.6-2
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 2da566289..b9667a7a8 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:2%{?dist}
+Release:1%{?dist}
 Vendor: %{vendor}
 Summary:LibreOffice Online WebSocket Daemon
 License:EULA
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/cp-4.2.7-1'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'cp-4.2.7-1' created by Andras Timar  at 
2020-08-05 08:58 +

cp-4.2.7-1

Changes since cp-4.2.4-2-169:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - oox/Library_oox.mk oox/source

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/Library_oox.mk |1 
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx|   16 
 oox/source/drawingml/diagram/diagramlayoutatoms.hxx|   24 ++-
 oox/source/drawingml/diagram/layoutatomvisitorbase.cxx |5 +
 oox/source/drawingml/diagram/layoutatomvisitorbase.hxx |4 -
 oox/source/drawingml/diagram/layoutatomvisitors.cxx|   20 +
 oox/source/drawingml/diagram/layoutatomvisitors.hxx|4 +
 oox/source/drawingml/diagram/layoutnodecontext.cxx |4 -
 oox/source/drawingml/diagram/rulelistcontext.cxx   |   58 +
 oox/source/drawingml/diagram/rulelistcontext.hxx   |   42 
 10 files changed, 172 insertions(+), 6 deletions(-)

New commits:
commit 88b58f002d0faec31f1a1a3d5d50d5f0beb6bd17
Author: Miklos Vajna 
AuthorDate: Fri Jul 24 15:52:10 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 11:24:55 2020 +0200

oox smartart: start parsing rule lists

I have a linear algorithm where some elements should be scaled down, but
not all of them. These requirements are described using rules. This
commit just adds the parsing for them, so that later
AlgAtom::layoutShape() can create an improved layout, taking rules into
account.

(cherry picked from commit 6ca5412bac9e3da5cd20f315fc853c7733f10858)

Change-Id: I5f0f9ffcaff75a804796851e48a9ce10583ec362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100101
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 3d8b46b2a24b..287a4bb70003 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -149,6 +149,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
 oox/source/drawingml/diagram/layoutatomvisitorbase \
 oox/source/drawingml/diagram/layoutatomvisitors \
 oox/source/drawingml/diagram/layoutnodecontext \
+oox/source/drawingml/diagram/rulelistcontext \
 oox/source/drawingml/drawingmltypes \
 oox/source/drawingml/effectproperties \
 oox/source/drawingml/effectpropertiescontext \
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 57af267c61ab..73f97c0b21cf 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -337,6 +337,11 @@ void ConstraintAtom::accept( LayoutAtomVisitor& rVisitor )
 rVisitor.visit(*this);
 }
 
+void RuleAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+rVisitor.visit(*this);
+}
+
 void ConstraintAtom::parseConstraint(std::vector& rConstraints,
  bool bRequireForName) const
 {
@@ -366,6 +371,14 @@ void 
ConstraintAtom::parseConstraint(std::vector& rConstraints,
 }
 }
 
+void RuleAtom::parseRule(std::vector& rRules) const
+{
+if (!maRule.msForName.isEmpty())
+{
+rRules.push_back(maRule);
+}
+}
+
 void AlgAtom::accept( LayoutAtomVisitor& rVisitor )
 {
 rVisitor.visit(*this);
@@ -466,7 +479,8 @@ void ApplyConstraintToLayout(const Constraint& rConstraint, 
LayoutPropertyMap& r
 }
 
 void AlgAtom::layoutShape( const ShapePtr& rShape,
-   const std::vector& rConstraints )
+   const std::vector& rConstraints,
+   const std::vector& /*rRules*/ )
 {
 switch(mnType)
 {
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index 65bfe5975a67..cb34f7a005f1 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -62,6 +62,7 @@ struct ConditionAttr
 sal_Int32 mnVal;
 };
 
+/// Constraints allow you to specify an ideal (or starting point) size for 
each shape.
 struct Constraint
 {
 sal_Int32 mnFor;
@@ -77,6 +78,12 @@ struct Constraint
 sal_Int32 mnOperator;
 };
 
+/// Rules allow you to specify what to do when constraints can't be fully 
satisfied.
+struct Rule
+{
+OUString msForName;
+};
+
 typedef std::map LayoutProperty;
 typedef std::map LayoutPropertyMap;
 
@@ -145,6 +152,20 @@ private:
 Constraint maConstraint;
 };
 
+/// Represents one  element.
+class RuleAtom
+: public LayoutAtom
+{
+public:
+RuleAtom(LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode) {}
+virtual void accept( LayoutAtomVisitor& ) override;
+Rule& getRule()
+{ return maRule; }
+void parseRule(std::vector& rRules) const;
+private:
+Rule maRule;
+};
+
 class AlgAtom
 : public LayoutAtom
 {
@@ -161,7 +182,8 @@ public:
 { maMap[nType]=nVal; }
 sal_Int32 getVerticalShapesCount(const ShapePtr& rShape);
 void layoutShape( const ShapePtr& rShape,
-  const std::vector& rConstraints );
+  const std::vector& rConstraints,
+  const std::vector& rRules );
 
 void setAspectRatio(do

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

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/source/drawingml/diagram/diagram.cxx|   20 +
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   72 ++--
 oox/source/drawingml/diagram/layoutatomvisitors.cxx |6 -
 sd/qa/unit/data/pptx/smartart-linear-rule.pptx  |binary
 sd/qa/unit/import-tests-smartart.cxx|   19 +
 5 files changed, 106 insertions(+), 11 deletions(-)

New commits:
commit 84a3c0a924dd074c2c3255739e037f475b7238a5
Author: Miklos Vajna 
AuthorDate: Fri Jul 31 11:04:02 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 11:25:42 2020 +0200

oox smartart: consider rules when scaling in linear layout

The bugdoc has an arrow shape which is 100% wide, and there are multiple
shapes before it, which also have a 100% wide constraint. The reason
PowerPoint scales down the shapes (but not the arrow) is because rules
declare it should happen this way.

So start taking rules into account in linear layouts.

(cherry picked from commit 0024c48b4822062995effed7db4f1281196384bb)
Change-Id: I352443277e88be0eb711659489587127727a258f

Conflicts:
sd/qa/unit/import-tests-smartart.cxx

Change-Id: I352443277e88be0eb711659489587127727a258f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100102
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/source/drawingml/diagram/diagram.cxx 
b/oox/source/drawingml/diagram/diagram.cxx
index 5a4fef99cfcb..8265ae7b3a88 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -82,6 +82,25 @@ static void sortChildrenByZOrder(const ShapePtr& pShape)
 sortChildrenByZOrder(rChild);
 }
 
+/// Removes empty group shapes, now that their spacing influenced the layout.
+static void removeUnneededGroupShapes(const ShapePtr& pShape)
+{
+std::vector& rChildren = pShape->getChildren();
+
+rChildren.erase(std::remove_if(rChildren.begin(), rChildren.end(),
+   [](const ShapePtr& aChild) {
+   return aChild->getServiceName()
+  == 
"com.sun.star.drawing.GroupShape"
+  && aChild->getChildren().empty();
+   }),
+rChildren.end());
+
+for (const auto& pChild : rChildren)
+{
+removeUnneededGroupShapes(pChild);
+}
+}
+
 void Diagram::addTo( const ShapePtr & pParentShape )
 {
 if (pParentShape->getSize().Width == 0 || pParentShape->getSize().Height 
== 0)
@@ -103,6 +122,7 @@ void Diagram::addTo( const ShapePtr & pParentShape )
 mpLayout->getNode()->accept(aLayoutingVisitor);
 
 sortChildrenByZOrder(pParentShape);
+removeUnneededGroupShapes(pParentShape);
 }
 
 ShapePtr pBackground = 
std::make_shared("com.sun.star.drawing.CustomShape");
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 73f97c0b21cf..42508f5984de 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -19,6 +19,8 @@
 
 #include "diagramlayoutatoms.hxx"
 
+#include 
+
 #include "layoutatomvisitorbase.hxx"
 
 #include 
@@ -478,10 +480,21 @@ void ApplyConstraintToLayout(const Constraint& 
rConstraint, LayoutPropertyMap& r
 }
 }
 
-void AlgAtom::layoutShape( const ShapePtr& rShape,
-   const std::vector& rConstraints,
-   const std::vector& /*rRules*/ )
+void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector& rConstraints,
+  const std::vector& rRules)
 {
+if (mnType != XML_lin)
+{
+// TODO Handle spacing from constraints for non-lin algorithms as well.
+rShape->getChildren().erase(
+std::remove_if(rShape->getChildren().begin(), 
rShape->getChildren().end(),
+   [](const ShapePtr& aChild) {
+   return aChild->getServiceName() == 
"com.sun.star.drawing.GroupShape"
+  && aChild->getChildren().empty();
+   }),
+rShape->getChildren().end());
+}
+
 switch(mnType)
 {
 case XML_composite:
@@ -928,6 +941,45 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
 }
 
 // first approximation of children size
+std::set aChildrenToShrink;
+for (const auto& rRule : rRules)
+{
+// Consider rules: when scaling down, only change children 
where the rule allows
+// doing so.
+aChildrenToShrink.insert(rRule.msForName);
+}
+
+if (!aChildrenToShrink.empty())
+{
+// Have scaling info from rules: then only count scaled 
children.
+for

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - 2 commits - oox/source sd/qa

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   88 ++--
 sd/qa/unit/data/pptx/smartart-linear-rule.pptx  |binary
 sd/qa/unit/import-tests-smartart.cxx|   13 ++
 3 files changed, 93 insertions(+), 8 deletions(-)

New commits:
commit d5bff7f5e4b10ec42395efa3cd0520c40c06a356
Author: Miklos Vajna 
AuthorDate: Mon Aug 3 09:57:57 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 11:26:17 2020 +0200

oox smartart, linear layout: fix scaling of spacing without rules

With this, finally the arrow shape has the correct horizontal position
and width, even if the markup is as complex as the PowerPoint UI
generates it (the previous version was a more minimal version).

(cherry picked from commit 880673412143a7db7ea1bf4766040662dfc085dc)

Change-Id: I59f237c582053067e890180a1ae40471e5f46dea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100104
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index e18e34e5c12a..24e5422ce654 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -963,6 +963,8 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 {
 fCount -= 1.0;
 
+bool bIsDependency = false;
+double fFactor = 0;
 for (const auto& rConstraint : rConstraints)
 {
 if (rConstraint.msForName != 
aCurrShape->getInternalName())
@@ -970,16 +972,25 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 continue;
 }
 
-if 
(aChildrenToShrink.find(rConstraint.msRefForName) == aChildrenToShrink.end())
+if ((nDir == XML_fromL || nDir == XML_fromR) 
&& rConstraint.mnType != XML_w)
 {
 continue;
 }
+if ((nDir == XML_fromL || nDir == XML_fromR) 
&& rConstraint.mnType == XML_w)
+{
+fFactor = rConstraint.mfFactor;
+}
 
-if ((nDir == XML_fromL || nDir == XML_fromR) 
&& rConstraint.mnType != XML_w)
+if ((nDir == XML_fromT || nDir == XML_fromB) 
&& rConstraint.mnType != XML_h)
 {
 continue;
 }
-if ((nDir == XML_fromT || nDir == XML_fromB) 
&& rConstraint.mnType != XML_h)
+if ((nDir == XML_fromT || nDir == XML_fromB) 
&& rConstraint.mnType == XML_h)
+{
+fFactor = rConstraint.mfFactor;
+}
+
+if 
(aChildrenToShrink.find(rConstraint.msRefForName) == aChildrenToShrink.end())
 {
 continue;
 }
@@ -988,8 +999,29 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 // other child which will be scaled.
 fCount += rConstraint.mfFactor;
 
aChildrenToShrinkDeps.insert(aCurrShape->getInternalName());
+bIsDependency = true;
 break;
 }
+
+if (!bIsDependency && aCurrShape->getServiceName() 
== "com.sun.star.drawing.GroupShape")
+{
+bool bScaleDownEmptySpacing = false;
+if (nDir == XML_fromL || nDir == XML_fromR)
+{
+oox::OptValue oWidth = 
findProperty(aProperties, aCurrShape->getInternalName(), XML_w);
+bScaleDownEmptySpacing = oWidth.has() && 
oWidth.get() > 0;
+}
+if (!bScaleDownEmptySpacing && (nDir == 
XML_fromT || nDir == XML_fromB))
+{
+oox::OptValue oHeight = 
findProperty(aProperties, aCurrShape->getInternalName(), XML_h);
+bScaleDownEmptySpacing = oHeight.has() && 
oHeight.get() > 0;
+}
+if (bScaleDownEmptySpacing && 
aCurrShape->getChildren().empty())
+

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - 2 commits - oox/source sd/qa

2020-08-05 Thread Miklos Vajna (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   34 
 oox/source/drawingml/diagram/diagramlayoutatoms.hxx |1 
 oox/source/drawingml/diagram/layoutnodecontext.cxx  |   19 ++-
 sd/qa/unit/import-tests-smartart.cxx|   11 +-
 4 files changed, 62 insertions(+), 3 deletions(-)

New commits:
commit 06afd008a453b261b120062589b0b961acdaadd3
Author: Miklos Vajna 
AuthorDate: Tue Aug 4 10:58:00 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 5 11:26:42 2020 +0200

oox smartart: add support for 

This changes the order of children, which matters when they have no
explicit ZOrder. With this, the text shapes on the arrow shape are on
top of the arrow, not behind it.

The trick is that nominally chOrder can be "t"(op) or "b"(ottom),
defaulting to bottom, but there is a difference between an explicit "b"
and not setting it. When not setting it, the layout node is expected to
inherit it from its parent layout node, recursively.

This would probably make sense for other algorithms as well, but set it
only for the linear algorithm for now, as that's where we have a bug
document showing the PowerPoint behavior.

(cherry picked from commit 3c185bf386b4c9609ab32d19bf95b83fe0a3)

Change-Id: I433f92c620149ef5590aebc8cbf43110e1d2fb85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100107
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index cc0e456fa25d..7493464842ef 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -1146,6 +1146,28 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const 
std::vector&
 if (aCurrShape->getSubType() == XML_conn)
 aCurrShape->setRotation(nConnectorAngle * PER_DEGREE);
 }
+
+// Newer shapes are behind older ones by default. Reverse this if 
requested.
+sal_Int32 nChildOrder = XML_b;
+const LayoutNode* pParentLayoutNode = nullptr;
+for (LayoutAtomPtr pAtom = getParent(); pAtom; pAtom = 
pAtom->getParent())
+{
+auto pLayoutNode = dynamic_cast(pAtom.get());
+if (pLayoutNode)
+{
+pParentLayoutNode = pLayoutNode;
+break;
+}
+}
+if (pParentLayoutNode)
+{
+nChildOrder = pParentLayoutNode->getChildOrder();
+}
+if (nChildOrder == XML_t)
+{
+std::reverse(rShape->getChildren().begin(), 
rShape->getChildren().end());
+}
+
 break;
 }
 
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index cb34f7a005f1..f36224f0f882 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -271,6 +271,7 @@ public:
 { msStyleLabel = sLabel; }
 void setChildOrder( sal_Int32 nOrder )
 { mnChildOrder = nOrder; }
+sal_Int32 getChildOrder() const { return mnChildOrder; }
 void setExistingShape( const ShapePtr& pShape )
 { mpExistingShape = pShape; }
 const ShapePtr& getExistingShape() const
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx 
b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 80ae1d5bb6a9..93f927531cf6 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -198,7 +198,24 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
 {
 LayoutNodePtr pNode = 
std::make_shared(mpNode->getLayoutNode().getDiagram());
 LayoutAtom::connect(mpNode, pNode);
-pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
+
+if (rAttribs.hasAttribute(XML_chOrder))
+{
+pNode->setChildOrder(rAttribs.getToken(XML_chOrder, XML_b));
+}
+else
+{
+for (LayoutAtomPtr pAtom = mpNode; pAtom; pAtom = 
pAtom->getParent())
+{
+auto pLayoutNode = dynamic_cast(pAtom.get());
+if (pLayoutNode)
+{
+pNode->setChildOrder(pLayoutNode->getChildOrder());
+break;
+}
+}
+}
+
 pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
 pNode->setStyleLabel( rAttribs.getString( XML_styleLbl ).get() );
 return new LayoutNodeContext( *this, rAttribs, pNode );
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index c8825f15fcc4..28dafbc1d9af 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit

[Libreoffice-commits] core.git: compilerplugins/clang emfio/source vcl/inc vcl/skia

2020-08-05 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/staticmethods.cxx |4 
 emfio/source/reader/emfreader.cxx   |8 
 vcl/inc/skia/salbmp.hxx |6 --
 vcl/skia/gdiimpl.cxx|7 +--
 4 files changed, 17 insertions(+), 8 deletions(-)

New commits:
commit 2e12d210cac8d031c21cdda9c37c1551f967ddc4
Author: Stephan Bergmann 
AuthorDate: Wed Aug 5 09:58:34 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 5 11:30:20 2020 +0200

Silence loplugin:staticmethods when the definition involves preprocessing

...to help avoid false positives.  (Another option to silence such warnings 
is
to add

  (void) this;

to false-positive function bodies, but this new approach may be more 
natural in
certain cases.)

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

diff --git a/compilerplugins/clang/staticmethods.cxx 
b/compilerplugins/clang/staticmethods.cxx
index 9b631c7eb659..86206022496f 100644
--- a/compilerplugins/clang/staticmethods.cxx
+++ b/compilerplugins/clang/staticmethods.cxx
@@ -218,6 +218,10 @@ bool StaticMethods::TraverseCXXMethodDecl(const 
CXXMethodDecl * pCXXMethodDecl)
 return true;
 }
 
+if 
(containsPreprocessingConditionalInclusion((pCXXMethodDecl->getSourceRange( 
{
+return true;
+}
+
 report(
 DiagnosticsEngine::Warning,
 "this member function can be declared static",
diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index 5d2749d16356..8c128d2965c6 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -386,9 +386,11 @@ namespace emfio
 const sal_uInt32 EMR_COMMENT_ENDGROUP = 0x0003;
 const sal_uInt32 EMR_COMMENT_MULTIFORMATS = 0x4004;
 const sal_uInt32 EMR_COMMENT_WINDOWS_METAFILE = 0x8001;
+#endif
 
 void EmfReader::ReadGDIComment(sal_uInt32 nCommentId)
 {
+#if OSL_DEBUG_LEVEL > 0
 sal_uInt32 nPublicCommentIdentifier;
 mpInputStream->ReadUInt32(nPublicCommentIdentifier);
 
@@ -442,12 +444,10 @@ namespace emfio
 SAL_WARN("emfio", "\t\tEMR_COMMENT_PUBLIC not implemented, id: 
0x" << std::hex << nCommentId << std::dec);
 break;
 }
-}
 #else
-void EmfReader::ReadGDIComment(sal_uInt32)
-{
-}
+(void) nCommentId;
 #endif
+}
 
 void EmfReader::ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC)
 {
diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index 3725c9f9a8ec..6ce94aad1b01 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -101,10 +101,12 @@ private:
 bool ComputeScanlineSize();
 void EraseInternal();
 SkBitmap GetAsSkBitmap() const;
+void verify() const
 #ifdef DBG_UTIL
-void verify() const;
+;
 #else
-void verify() const {};
+{
+}
 #endif
 
 template 
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 066311e97c2b..c092bb549a22 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -176,17 +176,20 @@ public:
 }
 #ifndef NDEBUG
 virtual ~SkiaFlushIdle() { free(debugname); }
+#endif
 const char* get_debug_name(SkiaSalGraphicsImpl* pGraphics)
 {
+#ifndef NDEBUG
 // Idle keeps just a pointer, so we need to store the string
 debugname = strdup(
 OString("skia idle 0x" + 
OString::number(reinterpret_cast(pGraphics), 16))
 .getStr());
 return debugname;
-}
 #else
-const char* get_debug_name(SkiaSalGraphicsImpl*) { return "skia idle"; }
+(void)pGraphics;
+return "skia idle";
 #endif
+}
 
 virtual void Invoke() override
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC Blurry Shadow Weekly Update

2020-08-05 Thread Ahmad Ganzouri
Hello,

I have been working on adding shadow blur to preview of the area dialog ->
shadow tab.
Also, I have started the documentation of the blurry shadow project.

Regards,
Ahmad.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Other build errors

2020-08-05 Thread Stephan Bergmann

On 04/08/2020 23:12, Stephan Bergmann wrote:
It appears that most people's --enable-compiler-plugins builds also use 
--enable-dbgutil, so various issues with 
--disable-dbgutil/--disable-assert-always-abort/etc. have sneaked in 
over time and went unnoticed.  I'm doing such a build right now, fixing 
whatever I find.


 
"Silence loplugin:staticmethods when the definition involves 
preprocessing" is the last of the fixes I pushed; should work now


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: solenv/clang-format

2020-08-05 Thread Stephan Bergmann (via logerrit)
 solenv/clang-format/reformat-formatted-files |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 786802539587f2fe08ef57443e58af50146db33b
Author: Stephan Bergmann 
AuthorDate: Wed Aug 5 10:47:58 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 5 11:51:44 2020 +0200

Propagate clang-format failure from reformat-formatted-files

Specifically, this allows to manually terminate a (long-running)
reformat-formatted-files through Ctrl-C.

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

diff --git a/solenv/clang-format/reformat-formatted-files 
b/solenv/clang-format/reformat-formatted-files
index 0302d3f9b244..a3a670f83a77 100755
--- a/solenv/clang-format/reformat-formatted-files
+++ b/solenv/clang-format/reformat-formatted-files
@@ -42,7 +42,7 @@ foreach my $filename (@filenames)
 print($filename . "\n");
 if (!$dry_run)
 {
-system($command);
+system($command) == 0 or die "failed to execute \"$command\": $?";
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/css loleaflet/images loleaflet/src

2020-08-05 Thread Szymon Kłos (via logerrit)
 loleaflet/css/notebookbar.css   |   17 +
 loleaflet/images/lc_fontdialog.svg  |1 
 loleaflet/images/lc_outlinebullet.svg   |1 
 loleaflet/images/lc_paragraphdialog.svg |1 
 loleaflet/images/lc_transformdialog.svg |1 
 loleaflet/src/control/Control.JSDialogBuilder.js|2 
 loleaflet/src/control/Control.NotebookbarBuilder.js |   12 +
 loleaflet/src/control/Control.NotebookbarImpress.js |  175 
 loleaflet/src/control/Control.NotebookbarWriter.js  |  163 ++
 9 files changed, 373 insertions(+)

New commits:
commit 936ea3eb1992f3abe87c0c1e7aad290ed2687f4e
Author: Szymon Kłos 
AuthorDate: Wed Aug 5 11:15:51 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Aug 5 11:57:13 2020 +0200

notebookbar: Format tab for writer & impress

Change-Id: Id4365aff42af94d23b398736d00c6c9cde02e4ee
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100156
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/css/notebookbar.css b/loleaflet/css/notebookbar.css
index 15924d608..70805ca81 100644
--- a/loleaflet/css/notebookbar.css
+++ b/loleaflet/css/notebookbar.css
@@ -283,6 +283,18 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, 
#SendToBack.notebookb
filter: grayscale(100%) brightness(100%);
 }
 
+.unotoolbutton.notebookbar {
+   text-align: center;
+}
+
+.unotoolbutton.notebookbar.has-label {
+   text-align: center;
+}
+
+.unotoolbutton.notebookbar.has-label:not(.inline) img {
+   width: 32px !important;
+   height: 32px !important;
+}
 
 /* unobuttons with inline labels */
 
@@ -473,6 +485,11 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, 
#SendToBack.notebookb
display: none;
 }
 
+/* Format Tab */
+#table-Format-Section.notebookbar {
+   margin-top: 25px;
+}
+
 /* Table Tab */
 
 #table-Table-Container,
diff --git a/loleaflet/images/lc_fontdialog.svg 
b/loleaflet/images/lc_fontdialog.svg
new file mode 100644
index 0..245d0ddc4
--- /dev/null
+++ b/loleaflet/images/lc_fontdialog.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/loleaflet/images/lc_outlinebullet.svg 
b/loleaflet/images/lc_outlinebullet.svg
new file mode 100644
index 0..cb72428fd
--- /dev/null
+++ b/loleaflet/images/lc_outlinebullet.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/loleaflet/images/lc_paragraphdialog.svg 
b/loleaflet/images/lc_paragraphdialog.svg
new file mode 100644
index 0..c6ceb2578
--- /dev/null
+++ b/loleaflet/images/lc_paragraphdialog.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/loleaflet/images/lc_transformdialog.svg 
b/loleaflet/images/lc_transformdialog.svg
new file mode 100644
index 0..87f5bd3e2
--- /dev/null
+++ b/loleaflet/images/lc_transformdialog.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index d3b1fe202..5c7313370 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1654,9 +1654,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
label.innerHTML = data.text;
 
controls['label'] = label;
+   $(div).addClass('has-label');
} else {
div.title = data.text;
$(div).tooltip();
+   $(div).addClass('no-label');
}
 
if (builder.options.useInLineLabelsForUnoButtons === 
true) {
diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js 
b/loleaflet/src/control/Control.NotebookbarBuilder.js
index 2420109cb..40e3320cc 100644
--- a/loleaflet/src/control/Control.NotebookbarBuilder.js
+++ b/loleaflet/src/control/Control.NotebookbarBuilder.js
@@ -17,6 +17,7 @@ L.Control.NotebookbarBuilder = 
L.Control.JSDialogBuilder.extend({
this._controlHandlers['listbox'] = this._comboboxControlHandler;
this._controlHandlers['tabcontrol'] = 
this._overridenTabsControlHandler;
this._controlHandlers['menubartoolitem'] = 
this._menubarToolItemHandler;
+   this._controlHandlers['bigtoolitem'] = this._bigtoolitemHandler;
 
this._controlHandlers['pushbutton'] = function() { return 
false; };
this._controlHandlers['spinfield'] = function() { return false; 
};
@@ -182,6 +183,17 @@ L.Control.NotebookbarBuilder = 
L.Control.JSDialogBuilder.extend({
this._toolitemHandlers['vnd.sun.star.findbar:FocusToFindbar'] = 
function() {};
},
 
+   _bigtoolitemHandler

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

2020-08-05 Thread Mike Kaganski (via logerrit)
 vcl/win/window/salframe.cxx |   19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit b094741e1d04f4e377c4a7d5c564e38d2f84c377
Author: Mike Kaganski 
AuthorDate: Sun Aug 2 00:19:42 2020 +0300
Commit: Mike Kaganski 
CommitDate: Wed Aug 5 12:04:40 2020 +0200

tdf#135330: avoid replacing all settings when enabling IA2

Call to ImplHandleGetObject may happen in the middle of any UI operation,
including those that make use of references to parts of global settings,
like this:

const LocaleDataWrapper& rLocaleData = 
Application::GetSettings().GetUILocaleDataWrapper();
setValue(*m_xCurrentWordFT, rCurrent.nWord, rLocaleData); // < here 
ImplHandleGetObject may be called
setValue(*m_xCurrentCharacterFT, rCurrent.nChar, rLocaleData);

If all settings get replaced, then LocaleDataWrapper gets destroyed, and
the reference becomes invalid, and crashes in the next line.

So first, the change makes the call only modify settings when it's needed;
and second, it makes use of the implementation detail that aMisc modifies
the shared data. The check after the change will catch if implementation
changes so that this is no more true.

Yet, the problem stays that using any references to global settings objects
is unsafe, since any call to Application::SetSettings will invalidate them.

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

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 287863129a9f..c433de48216d 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5291,15 +5291,18 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM 
wParam )
 static bool
 ImplHandleGetObject(HWND hWnd, LPARAM lParam, WPARAM wParam, LRESULT & nRet)
 {
-// IA2 should be enabled automatically
-AllSettings aSettings = Application::GetSettings();
-MiscSettings aMisc = aSettings.GetMiscSettings();
-aMisc.SetEnableATToolSupport( true );
-aSettings.SetMiscSettings( aMisc );
-Application::SetSettings( aSettings );
-
 if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
-return false; // locked down somehow ?
+{
+// IA2 should be enabled automatically
+AllSettings aSettings = Application::GetSettings();
+MiscSettings aMisc = aSettings.GetMiscSettings();
+aMisc.SetEnableATToolSupport(true);
+// The above is enough, since aMisc changes the same shared 
ImplMiscData as used in global
+// gettings, so no need to call aSettings.SetMiscSettings and 
Application::SetSettings
+
+if 
(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+return false; // locked down somehow ?
+}
 
 ImplSVData* pSVData = ImplGetSVData();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - xmloff/CppunitTest_xmloff_text.mk xmloff/Module_xmloff.mk xmloff/qa xmloff/source

2020-08-05 Thread Miklos Vajna (via logerrit)
 xmloff/CppunitTest_xmloff_text.mk  |   44 
 xmloff/Module_xmloff.mk|1 
 xmloff/qa/unit/data/mail-merge-editeng.odt |binary
 xmloff/qa/unit/text.cxx|   61 +
 xmloff/source/text/txtvfldi.cxx|   40 +++
 5 files changed, 130 insertions(+), 16 deletions(-)

New commits:
commit 790ab54d7232d232ba84f17f285d4639ddba80d5
Author: Miklos Vajna 
AuthorDate: Mon Aug 3 21:03:43 2020 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 5 12:09:46 2020 +0200

tdf#130707 xmloff: survive  in editeng text

Regression from commit 28d67b792724a23015dec32fb0278b729f676736
(tdf#107776 sw ODF shape import: make is-textbox check more strict,
2019-08-26), now that we correctly identify what shape text to import as
"textbox" (Writer TextFrame) and what to import as editeng text, there
are documents out there that try to import mailmerge fields into
editeng-based shape text. Fix missing error handling there.

Note that the error is not just silently ignored, we do insert the field
result into the shape text, existing code provides this already.

(cherry picked from commit fd18d12efdfbe0e26d41d733edc711d0f40a7804)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100038
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit fec8b842d701cca0b79af9ea9f6192a8cf7610b0)

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

diff --git a/xmloff/CppunitTest_xmloff_text.mk 
b/xmloff/CppunitTest_xmloff_text.mk
new file mode 100644
index ..e3259672605b
--- /dev/null
+++ b/xmloff/CppunitTest_xmloff_text.mk
@@ -0,0 +1,44 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# 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/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,xmloff_text))
+
+$(eval $(call gb_CppunitTest_use_externals,xmloff_text,\
+   boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,xmloff_text, \
+xmloff/qa/unit/text \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,xmloff_text, \
+comphelper \
+cppu \
+embobj \
+sal \
+test \
+unotest \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,xmloff_text))
+
+$(eval $(call gb_CppunitTest_use_ure,xmloff_text))
+$(eval $(call gb_CppunitTest_use_vcl,xmloff_text))
+
+$(eval $(call gb_CppunitTest_use_rdb,xmloff_text,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,xmloff_text,\
+   officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,xmloff_text))
+
+# vim: set noet sw=4 ts=4:
diff --git a/xmloff/Module_xmloff.mk b/xmloff/Module_xmloff.mk
index 16cf0f817889..fe69b86b09f6 100644
--- a/xmloff/Module_xmloff.mk
+++ b/xmloff/Module_xmloff.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_check_targets,xmloff,\
$(if $(MERGELIBS),, \
CppunitTest_xmloff_uxmloff) \
CppunitTest_xmloff_style \
+   CppunitTest_xmloff_text \
 ))
 
 $(eval $(call gb_Module_add_subsequentcheck_targets,xmloff,\
diff --git a/xmloff/qa/unit/data/mail-merge-editeng.odt 
b/xmloff/qa/unit/data/mail-merge-editeng.odt
new file mode 100644
index ..e6466e44e01e
Binary files /dev/null and b/xmloff/qa/unit/data/mail-merge-editeng.odt differ
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
new file mode 100644
index ..d7da798bafab
--- /dev/null
+++ b/xmloff/qa/unit/text.cxx
@@ -0,0 +1,61 @@
+/* -*- 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 
+
+using namespace ::com::sun::star;
+
+char const DATA_DIRECTORY[] = "/xmloff/qa/unit/data/";
+
+/// Covers xmloff/source/text/ fixes.
+class XmloffStyleTest : public test::BootstrapFixture, public 
unotest::MacrosTest
+{
+private:
+uno::Reference mxComponent;
+
+public:
+void setUp() override;
+void tearDown() override;
+uno::Reference& getComponent() { return mxComponent; }
+};
+
+void XmloffStyleTest::setUp()
+{
+test::BootstrapFixture::setUp();
+
+uno::Reference xComponentContext
+= comphelper::getProcessComponentContext();

[Libreoffice-commits] core.git: extensions/CustomTarget_so_activex_x64.mk

2020-08-05 Thread Stephan Bergmann (via logerrit)
 extensions/CustomTarget_so_activex_x64.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit da1207d721a70215c455164ca0acd536e4bb0f8c
Author: Stephan Bergmann 
AuthorDate: Tue Aug 4 17:04:47 2020 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 5 12:11:40 2020 +0200

Ensure cp target directory exists



> cp: cannot create regular file 
'C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/CustomTarget/extensions/source/activex/SOActionsApproval.cxx':
 No such file or directory
[...]
> make[1]: *** 
[C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/extensions/CustomTarget_so_activex_x64.mk:22:
 
C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/CustomTarget/extensions/source/activex/SOActionsApproval.cxx]
 Error 1

makes it look like this has been missing all along?

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

diff --git a/extensions/CustomTarget_so_activex_x64.mk 
b/extensions/CustomTarget_so_activex_x64.mk
index 28a5c7d49d1d..6b1b35d94bb7 100644
--- a/extensions/CustomTarget_so_activex_x64.mk
+++ b/extensions/CustomTarget_so_activex_x64.mk
@@ -18,7 +18,8 @@ $(call gb_CustomTarget_get_target,extensions/source/activex) 
: \
$(call 
gb_CustomTarget_get_workdir,extensions/source/activex)/so_activex.cxx \
 
 $(call gb_CustomTarget_get_workdir,extensions/source/activex)/% : \
-   $(SRCDIR)/extensions/source/activex/%
+   $(SRCDIR)/extensions/source/activex/% \
+   | $(call 
gb_CustomTarget_get_workdir,extensions/source/activex)/.dir
cp $< $@
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/sanitizers

2020-08-05 Thread Caolán McNamara (via logerrit)
 solenv/sanitizers/ui/cui.suppr |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 2bf59c0b9e1e73e0845d0179e1d513baf89276b8
Author: Caolán McNamara 
AuthorDate: Tue Aug 4 19:50:01 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 12:27:01 2020 +0200

remove some unused suppressions

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

diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index b63374cc2264..15b2eecea5b9 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -22,9 +22,6 @@ 
cui/uiconfig/ui/baselinksdialog.ui://GtkLabel[@id='FULL_TYPE_NAME'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label4'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label9'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkSpinButton[@id='tileoffmtr'] 
no-labelled-by
-cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='beforebreak'] 
no-labelled-by
-cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='afterbreak'] 
no-labelled-by
-cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='wordlength'] 
no-labelled-by
 cui/uiconfig/ui/cellalignment.ui://GtkLabel[@id='labelSTR_BOTTOMLOCK'] 
orphan-label
 cui/uiconfig/ui/cellalignment.ui://GtkLabel[@id='labelSTR_TOPLOCK'] 
orphan-label
 cui/uiconfig/ui/cellalignment.ui://GtkLabel[@id='labelSTR_CELLLOCK'] 
orphan-label
@@ -86,12 +83,6 @@ cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='sqlop'] 
orphan-label
 cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='sqlkeyword'] orphan-label
 cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='sqlparam'] orphan-label
 cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='sqlcomment'] orphan-label
-cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='redSpinbutton'] 
no-labelled-by
-cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='greenSpinbutton'] 
no-labelled-by
-cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='blueSpinbutton'] 
no-labelled-by
-cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='hueSpinbutton'] 
no-labelled-by
-cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='satSpinbutton'] 
no-labelled-by
-cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='brightSpinbutton'] 
no-labelled-by
 cui/uiconfig/ui/comment.ui://GtkButton[@id='previous'] button-no-label
 cui/uiconfig/ui/comment.ui://GtkButton[@id='next'] button-no-label
 cui/uiconfig/ui/comment.ui://GtkLabel[@id='label2'] orphan-label
@@ -209,7 +200,6 @@ 
cui/uiconfig/ui/optonlineupdatepage.ui://GtkLabel[@id='neverchecked'] orphan-lab
 cui/uiconfig/ui/optopenclpage.ui://GtkLabel[@id='openclused'] orphan-label
 cui/uiconfig/ui/optopenclpage.ui://GtkLabel[@id='openclnotused'] orphan-label
 cui/uiconfig/ui/optproxypage.ui://GtkLabel[@id='noproxydesc'] orphan-label
-cui/uiconfig/ui/optsavepage.ui://GtkSpinButton[@id='autosave_spin'] 
no-labelled-by
 cui/uiconfig/ui/optsavepage.ui://GtkLabel[@id='autosave_mins'] orphan-label
 cui/uiconfig/ui/optsavepage.ui://GtkLabel[@id='odfwarning_label'] orphan-label
 cui/uiconfig/ui/optsavepage.ui://GtkImage[@id='odfwarning_image'] 
no-labelled-by
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Caolán McNamara (via logerrit)
 cui/source/options/optjava.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d32dfe40f18904bbd30f497d0a2f546d58d6041b
Author: Caolán McNamara 
AuthorDate: Tue Aug 4 20:02:40 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 12:38:23 2020 +0200

tdf#135367 enable_toggle_buttons sets SvTreeFlags::CHKBTN

designating that the special auto-sized toggle column is in use

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

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 16d30cf5bdce..6454c238fabc 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -353,7 +353,7 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo const * _pInfo )
 #if HAVE_FEATURE_JAVA
 int nPos = m_xJavaList->n_children();
 m_xJavaList->append();
-m_xJavaList->set_toggle(nPos, TRISTATE_FALSE, 0);
+m_xJavaList->set_toggle(nPos, TRISTATE_FALSE);
 m_xJavaList->set_text(nPos, _pInfo->sVendor, 1);
 m_xJavaList->set_text(nPos, _pInfo->sVersion, 2);
 
@@ -372,7 +372,7 @@ void SvxJavaOptionsPage::HandleCheckEntry(int nCheckedRow)
 for (int i = 0, nCount = m_xJavaList->n_children(); i < nCount; ++i)
 {
 // we have radio button behavior -> so uncheck the other entries
-m_xJavaList->set_toggle(i, i == nCheckedRow ? TRISTATE_TRUE : 
TRISTATE_FALSE, 0);
+m_xJavaList->set_toggle(i, i == nCheckedRow ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 }
 }
 
@@ -500,7 +500,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 sal_uInt32 nCount = m_xJavaList->n_children();
 for (sal_uInt32 i = 0; i < nCount; ++i)
 {
-if (m_xJavaList->get_toggle(i, 0) == TRISTATE_TRUE)
+if (m_xJavaList->get_toggle(i) == TRISTATE_TRUE)
 {
 JavaInfo const * pInfo;
 if ( i < m_parJavaInfo.size() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Attila Szűcs (via logerrit)
 sc/qa/unit/data/ods/tdf121716_EvenHeaderFooter.ods |binary
 sc/qa/unit/subsequent_export-test.cxx  |   36 +++
 sc/source/filter/excel/xepage.cxx  |   49 ++---
 sc/source/filter/excel/xipage.cxx  |8 ++-
 sc/source/filter/excel/xlpage.cxx  |3 +
 sc/source/filter/inc/xlpage.hxx|9 +++
 6 files changed, 97 insertions(+), 8 deletions(-)

New commits:
commit a858284092e976fa284d5ed118e366d9860ec9bb
Author: Attila Szűcs 
AuthorDate: Thu Jul 23 14:51:01 2020 +0200
Commit: László Németh 
CommitDate: Wed Aug 5 12:40:15 2020 +0200

tdf#121716 XLSX export: fix loss of left header (footer)

when footer (header) is shared (even).

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/sc/qa/unit/data/ods/tdf121716_EvenHeaderFooter.ods 
b/sc/qa/unit/data/ods/tdf121716_EvenHeaderFooter.ods
new file mode 100644
index ..2666a9d4291e
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf121716_EvenHeaderFooter.ods 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index f0e4b5c44c55..4a9e85efecf0 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -252,6 +252,7 @@ public:
 void testTdf81470();
 void testTdf122331();
 void testTdf83779();
+void testTdf121716_ExportEvenHeaderFooterXLSX();
 void testTdf134459_HeaderFooterColorXLSX();
 void testTdf134817_HeaderFooterTextWith2SectionXLSX();
 void testHeaderFontStyleXLSX();
@@ -405,6 +406,7 @@ public:
 CPPUNIT_TEST(testTdf81470);
 CPPUNIT_TEST(testTdf122331);
 CPPUNIT_TEST(testTdf83779);
+CPPUNIT_TEST(testTdf121716_ExportEvenHeaderFooterXLSX);
 CPPUNIT_TEST(testTdf134459_HeaderFooterColorXLSX);
 CPPUNIT_TEST(testTdf134817_HeaderFooterTextWith2SectionXLSX);
 CPPUNIT_TEST(testHeaderFontStyleXLSX);
@@ -5148,6 +5150,40 @@ void ScExportTest::testTdf83779()
 xShell->DoClose();
 }
 
+void ScExportTest::testTdf121716_ExportEvenHeaderFooterXLSX()
+{
+// Header and footer on even pages should be exported properly
+// If there are separate odd/even header, but only 1 footer for all pages 
(this is possible only in LibreOffice)
+//  then the footer will be duplicated to have the same footer separately 
for even/odd pages
+
+ScDocShellRef xShell = loadDoc("tdf121716_EvenHeaderFooter.", FORMAT_ODS);
+CPPUNIT_ASSERT(xShell.is());
+
+ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+std::shared_ptr pXPathFile = 
ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+xmlDocUniquePtr pDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet1.xml");
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, "/x:worksheet/x:headerFooter", "differentOddEven", 
"true");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:oddHeader", 
"&Lodd/right&Cpage&Rheader");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:oddFooter", 
"&Lboth&C&12page&Rfooter");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:evenHeader", 
"&Lpage&Cheader&Reven/left");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:evenFooter", 
"&Lboth&C&12page&Rfooter");
+
+pDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet2.xml");
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, "/x:worksheet/x:headerFooter", "differentOddEven", 
"true");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:oddHeader", 
"&Coddh");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:oddFooter", 
"&Coddf");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:evenHeader", 
"&Cevenh");
+assertXPathContent(pDoc, "/x:worksheet/x:headerFooter/x:evenFooter", 
"&Levenf");
+
+xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf134459_HeaderFooterColorXLSX()
 {
 // Colors in header and footer should be exported, and imported properly
diff --git a/sc/source/filter/excel/xepage.cxx 
b/sc/source/filter/excel/xepage.cxx
index aea06c72157b..3941bd191f92 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -58,7 +58,14 @@ XclExpHeaderFooter::XclExpHeaderFooter( sal_uInt16 nRecId, 
const OUString& rHdrS
 void XclExpHeaderFooter::SaveXml( XclExpXmlStream& rStrm )
 {
 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
-sal_Int32 nElement = GetRecId() == EXC_ID_HEADER ?  XML_oddHeader : 
XML_oddFooter;
+sal_Int32 nElement;
+switch(GetRecId()) {
+case EXC_ID_HEADER_EVEN: nElement = XML_evenHeader; break;
+case EXC_ID_FOOTER_EVEN: nElement = XML_evenFooter; break;
+case EXC_ID_HEADER:  nEle

[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - 2 commits - configure.ac wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2020-08-05 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac   |2 +-
 wsd/ClientSession.cpp  |6 ++
 wsd/DocumentBroker.cpp |2 ++
 wsd/DocumentBroker.hpp |5 +
 4 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit a73fed6c66fee1361efe808ce81ad777daa15563
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 12:43:27 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 12:43:27 2020 +0200

Release 6.2.11.0

diff --git a/configure.ac b/configure.ac
index 4b83ca624..ea556501b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [6.2.10.0], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [6.2.11.0], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
commit dd87f6bf89e5e92918fb15265c5861d2e817286e
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 12:41:57 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 12:41:57 2020 +0200

Don't update modified status after saving to storage fails

Otherwise client gets a notification that document is unmodified.
This should not happen, as the document in the storage has not been updated
and so it should be considered as modified until saving to storage succeeds.

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 262abe6ab..3d69511f6 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -894,6 +894,12 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 StringTokenizer stateTokens(tokens[1], "=", 
StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
 if (stateTokens.count() == 2 && stateTokens[0] == 
".uno:ModifiedStatus")
 {
+// When the document is saved internally, but saving to storage 
failed,
+// don't update the client's modified status
+// (otherwise client thinks document is unmodified b/c saving was 
successful)
+if (!docBroker->isLastStorageSaveSuccessful())
+return false;
+
 docBroker->setModified(stateTokens[1] == "true");
 }
 else
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 72777c6c0..3c3ca28bc 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -153,6 +153,7 @@ DocumentBroker::DocumentBroker(const std::string& uri,
 _docId(Util::encodeId(DocBrokerId++, 3)),
 _cacheRoot(getCachePath(uriPublic.toString())),
 _documentChangedInStorage(false),
+_lastStorageSaveSuccessful(true),
 _lastSaveTime(std::chrono::steady_clock::now()),
 _lastSaveRequestTime(std::chrono::steady_clock::now() - 
std::chrono::milliseconds(COMMAND_TIMEOUT_MS)),
 _markToDestroy(false),
@@ -832,6 +833,7 @@ bool DocumentBroker::saveToStorageInternal(const 
std::string& sessionId,
 
 assert(_storage && _tileCache);
 StorageBase::SaveResult storageSaveResult = 
_storage->saveLocalFileToStorage(auth, saveAsPath, saveAsFilename);
+_lastStorageSaveSuccessful = storageSaveResult.getResult() == 
StorageBase::SaveResult::OK;
 if (storageSaveResult.getResult() == StorageBase::SaveResult::OK)
 {
 if (!isSaveAs)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index e0a3480e7..70a6bfb27 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -241,6 +241,8 @@ public:
 
 bool isDocumentChangedInStorage() { return _documentChangedInStorage; }
 
+bool isLastStorageSaveSuccessful() { return _lastStorageSaveSuccessful; }
+
 /// Save the document to Storage if it needs persisting.
 bool saveToStorage(const std::string& sesionId, bool success, const 
std::string& result = "", bool force = false);
 
@@ -430,6 +432,9 @@ private:
 /// for user's command to act.
 bool _documentChangedInStorage;
 
+/// Indicates whether the last saveToStorage operation was successful.
+bool _lastStorageSaveSuccessful;
+
 /// The last time we tried saving, regardless of whether the
 /// document was modified and saved or not.
 std::chrono::steady_clock::time_point _lastSaveTime;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Anchoring bug reports

2020-08-05 Thread Ilmari Lauhakangas

Telesto kirjoitti 4.8.2020 klo 22.29:
I have created quite an amount bug reports related to object/image 
anchoring. They current value of those is 0, as they basically 
demonstrate nothing new. It are simply different expressions/ examples/ 
consternations/ showcases of the same underlying problem (as far I’m 
able to tell).
However the might become handy if someone some day decides to work on 
this. It will give QA and they developer a number of test cases for 
analysis and testing. And easier to running into them, compared to 
creating them on demand; so more documentation of test cases.
They other view is of course that i’m repeating myself, bloating the 
bugtracker with useless reports/ samples wasting QA time (as the 
currently got to formal conformation process) and ruining they QA stats 
(UNCONFIRMED bugs).
As bugtracker is servicingthe needs of Developers, it more or less based 
on the desires of the developers.
A) Are repeated reports (variants) of any use from developer point of 
view (for specific this case)
B) If so, how can those they best be processed. I like them 
separateinstead of posting them in one bug report (unpracticalmess) or 
stacking them up to a bug as duplicate (risk of getting lost). They 
could be placed under separate meta within anchoring wrap meta. However 
the meta is still reasonable sized, so that urgent from my point of view.
C) Is there a new category needed for those examples, as numbers of they 
bugtracker don’t represent they actual number of problems. Bugs being 
set to NEW without being NEW in the sense of reporting anything new.
Sidenote: I’m don’t intend to add more; as I think I covered they 
terrain a pretty good (maybe even one or to duplicates)


As a minimum, if the issue is a regression, you could bibisect before 
creating a new report and do a search on all open or closed reports for 
the blamed commit hash in comments.


Ilmari
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: external/gpgmepp RepositoryExternal.mk

2020-08-05 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk   |5 +
 external/gpgmepp/ExternalPackage_gpgmepp.mk |3 ---
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 2a58902f0eecff8d68ad2669270524b99675c39c
Author: Michael Stahl 
AuthorDate: Wed Aug 5 11:59:03 2020 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 5 13:36:13 2020 +0200

gpgpmepp: fix creative abuse of gbuild

The problem was that (cd sw && make CppunitTest_sw_ooxmlexport4) fails
with an error that the gpgmepp package doesn't exist, but only on WNT.

Nonobviously, this is due to the override of the rule for the gpgmepp
package in ExternalPackage_gpgmepp.mk, which copies the same file that
the package already depends on for no obvious reason.

Furthermore, RepositoryExternal.mk uses
gb_Helper_register_executables_for_install with gpgme-w32spawn,
when it should just register the package instead, because that is not a
gbuild Executable.

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 096fbea6bebf..fd653e2e89c5 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3568,6 +3568,7 @@ $(call gb_LinkTarget_use_libraries,$(1),\
 endef
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
+   gpgmepp \
libassuan \
libgpg-error \
 ))
@@ -3576,10 +3577,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
gpgmepp \
 ))
 
-$(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
-   gpgme-w32spawn \
-))
-
 endif
 
 ifneq ($(filter MACOSX LINUX,$(OS)),)
diff --git a/external/gpgmepp/ExternalPackage_gpgmepp.mk 
b/external/gpgmepp/ExternalPackage_gpgmepp.mk
index f8d19f39a067..6bab3e5e293f 100644
--- a/external/gpgmepp/ExternalPackage_gpgmepp.mk
+++ b/external/gpgmepp/ExternalPackage_gpgmepp.mk
@@ -27,9 +27,6 @@ else ifeq ($(OS),WNT)
 
 $(eval $(call 
gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/gpgme-w32spawn.exe,src/gpgme-w32spawn.exe))
 
-$(call gb_Package_get_target_for_build,gpgmepp):
-   cp $(call gb_UnpackedTarball_get_dir,gpgmepp)/src/gpgme-w32spawn.exe 
$(call gb_Executable__get_dir_for_exe,cppunittester)/gpgme-w32spawn.exe
-
 endif
 
 # If a tool executed during the build (like svidl) requires these gpgmepp 
libraries, it will also
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - cypress_test/integration_tests

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9d51a1dc3f1d8d114b8e38fa8a00d6e33ea9f74b
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 04:14:36 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 13:40:24 2020 +0200

Fix typo.

Change-Id: I78aa76ece24c22f19f1687d350e0687b59fff95c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100164
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 303cbcc13..484b8cad0 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -159,8 +159,8 @@ function matchClipboardText(regexp) {
});
 }
 
-function beforeAll(fileName, subFolder, noFileCop) {
-   loadTestDoc(fileName, subFolder, noFileCop);
+function beforeAll(fileName, subFolder, noFileCopy) {
+   loadTestDoc(fileName, subFolder, noFileCopy);
 }
 
 function afterAll(fileName) {
commit 3f55e78f46e94f81a86bee9bb19cc11f4366bffb
Author: Tamás Zolnai 
AuthorDate: Tue Aug 4 17:42:32 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 13:40:14 2020 +0200

cypress: make this custom timeout also relative to the default value.

Change-Id: I9a8dcd68c31ecd57d8d8fec880dd74e99d922b96
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100163
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index d35637a16..303cbcc13 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -54,7 +54,7 @@ function loadTestDoc(fileName, subFolder, noFileCopy) {
}});
 
// Wait for the document to fully load
-   cy.get('.leaflet-tile-loaded', {timeout : 1});
+   cy.get('.leaflet-tile-loaded', {timeout : 
Cypress.config('defaultCommandTimeout') * 2.0});
 
cy.log('Loading test document - end.');
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit f2738885986ce0dcc3b15bd55e742e3b14a03a7b
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 04:37:07 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 13:48:16 2020 +0200

cypress: update run-cov command to run multi-user tests too.

Change-Id: If13dea05f5a506331f9f76177655ed65716d391e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100165
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index ef91b4134..64dbf40a2 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -163,7 +163,10 @@ run-mobile: @JAILS_PATH@ $(NODE_BINS)
|| true
@$(KILL_COMMAND) || true
 
-run-cov: @JAILS_PATH@ $(NODE_BINS)
+run-cov: do-run-cov
+   $(if $(wildcard $(ERROR_LOG)),@cat $(ERROR_LOG))
+
+do-run-cov: @JAILS_PATH@ $(NODE_BINS)
@echo
@echo "Setup coverage tools..."
@echo
@@ -176,9 +179,11 @@ run-cov: @JAILS_PATH@ $(NODE_BINS)
@echo
@echo "Run all tests..."
@echo
+   @rm -f $(ERROR_LOG)
$(call start_loolwsd)
$(call run_desktop_tests,,,COVERAGE_RUN="1")
$(call run_mobile_tests,,,COVERAGE_RUN="1")
+   $(call run_all_multiuser_tests,COVERAGE_RUN="1")
@$(KILL_COMMAND) || true
 
 @JAILS_PATH@:
@@ -306,7 +311,7 @@ define run_mobile_tests
 endef
 
 define run_all_multiuser_tests
-   $(foreach test,$(MULTIUSER_TESTS),$(call run_multiuser_test,$(test)))
+   $(foreach test,$(MULTIUSER_TESTS),$(call 
run_multiuser_test,$(test),$(1)))
 endef
 
 define run_multiuser_test
@@ -319,14 +324,14 @@ define run_multiuser_test
@$(PARALLEL_SCRIPT) \
--browser $(CHROME) \
--config $(MULTIUSER_CONFIG) \
-   --env $(MULTIUSER_ENV) \
+   --env $(MULTIUSER_ENV)$(if $(2),$(COMMA)$(2)) \
--spec $(USER1_SPEC) \
--type multi-user \
--log-file $(USER1_LOG) & \
$(PARALLEL_SCRIPT) \
--browser $(CHROME) \
--config $(MULTIUSER_CONFIG) \
-   --env $(MULTIUSER_ENV) \
+   --env $(MULTIUSER_ENV)$(if $(2),$(COMMA)$(2)) \
--spec $(USER2_SPEC) \
--type multi-user \
--log-file $(USER2_LOG) && \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js |   
 3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ef96bd89ab06782a922362f157116304b308a793
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 13:11:59 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 13:50:00 2020 +0200

cypress: stabilize simultaneous typing test.

Change-Id: I699e0b78583d41be273992fa4aa48b91da1a4e6c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100166
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js 
b/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js
index e36c79bd1..14d277a3a 100644
--- a/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js
@@ -38,6 +38,9 @@ describe('Simultaneous typing: user-1.', function() {
cy.get('textarea.clipboard')
.type('{uparrow}');
 
+   // TODO
+   cy.wait(1000);
+
cy.get('#tb_editbar_item_centerpara .w2ui-button')
.click();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/images

2020-08-05 Thread Pedro Pinto Silva (via logerrit)
 loleaflet/images/lc_calculate.svg|1 
 loleaflet/images/lc_datafilterhideautofilter.svg |   90 +
 loleaflet/images/lc_datafilterstandardfilter.svg |1 
 loleaflet/images/lc_menubar.svg  |   98 +++
 loleaflet/images/lc_validation.svg   |   18 
 5 files changed, 208 insertions(+)

New commits:
commit 33fcdbb6245c17bc14501ea681b23d786acbf7ea
Author: Pedro Pinto Silva 
AuthorDate: Wed Aug 5 11:09:03 2020 +0200
Commit: Pedro Silva 
CommitDate: Wed Aug 5 14:04:24 2020 +0200

Notebookbar: Calc: Data Tab: add icons

Change-Id: I9286dd25dc9dff45a3a588ba5576a49c47edae4d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100155
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pedro Silva 

diff --git a/loleaflet/images/lc_calculate.svg 
b/loleaflet/images/lc_calculate.svg
new file mode 100644
index 0..ea5290317
--- /dev/null
+++ b/loleaflet/images/lc_calculate.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/loleaflet/images/lc_datafilterhideautofilter.svg 
b/loleaflet/images/lc_datafilterhideautofilter.svg
new file mode 100644
index 0..318397998
--- /dev/null
+++ b/loleaflet/images/lc_datafilterhideautofilter.svg
@@ -0,0 +1,90 @@
+
+http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   viewBox="0 0 24 24"
+   version="1.1"
+   id="svg8"
+   sodipodi:docname="lc_datafilterhideautofilter.svg"
+   inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
+  
+
+  
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage"; />
+
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
diff --git a/loleaflet/images/lc_datafilterstandardfilter.svg 
b/loleaflet/images/lc_datafilterstandardfilter.svg
new file mode 100644
index 0..72cbdbaaa
--- /dev/null
+++ b/loleaflet/images/lc_datafilterstandardfilter.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/loleaflet/images/lc_menubar.svg b/loleaflet/images/lc_menubar.svg
new file mode 100644
index 0..b1533a621
--- /dev/null
+++ b/loleaflet/images/lc_menubar.svg
@@ -0,0 +1,98 @@
+
+http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   height="16"
+   width="16"
+   inkscape:version="1.0 (4035a4f, 2020-05-01)"
+   sodipodi:docname="lc_menubar.svg"
+   id="svg6"
+   version="1.1"
+   viewBox="0 0 16 16">
+  
+
+  
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage"; />
+
+  
+
+  
+  
+  
+
+
+
+
+
+  
+  
+  
+  
+
diff --git a/loleaflet/images/lc_validation.svg 
b/loleaflet/images/lc_validation.svg
new file mode 100644
index 0..42171674c
--- /dev/null
+++ b/loleaflet/images/lc_validation.svg
@@ -0,0 +1,18 @@
+http://www.w3.org/2000/svg";>
+  
+  
+  
+  
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Caolán McNamara (via logerrit)
 sw/uiconfig/swriter/ui/columnpage.ui   |   10 +-
 sw/uiconfig/swriter/ui/footnoteareapage.ui |   15 ++-
 2 files changed, 19 insertions(+), 6 deletions(-)

New commits:
commit e621d2e2dd30c9d1c38c17b4b71db93bd179abbd
Author: Caolán McNamara 
AuthorDate: Wed Aug 5 10:40:35 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 14:44:20 2020 +0200

add some missing activates_default

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

diff --git a/sw/uiconfig/swriter/ui/columnpage.ui 
b/sw/uiconfig/swriter/ui/columnpage.ui
index e3a93ae903e2..6c8981a8a5d8 100644
--- a/sw/uiconfig/swriter/ui/columnpage.ui
+++ b/sw/uiconfig/swriter/ui/columnpage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -194,6 +194,7 @@
 True
 center
 True
+True
 adjustment7
 2
 
@@ -211,6 +212,7 @@
 True
 center
 True
+True
 adjustment6
 2
 
@@ -228,6 +230,7 @@
 True
 center
 True
+True
 adjustment2
 2
 
@@ -266,6 +269,7 @@
 True
 True
 center
+True
 adjustment3
 2
 
@@ -282,6 +286,7 @@
 True
 True
 center
+True
 adjustment8
 2
 
@@ -482,6 +487,7 @@
   
 True
 True
+True
 adjustment5
   
   
@@ -493,6 +499,7 @@
   
 True
 True
+True
 adjustment4
 2
   
@@ -623,6 +630,7 @@
   
 True
 True
+True
 adjustment1
   
   
diff --git a/sw/uiconfig/swriter/ui/footnoteareapage.ui 
b/sw/uiconfig/swriter/ui/footnoteareapage.ui
index cf424b598b17..fa9639ffbbd3 100644
--- a/sw/uiconfig/swriter/ui/footnoteareapage.ui
+++ b/sw/uiconfig/swriter/ui/footnoteareapage.ui
@@ -1,17 +1,17 @@
 
-
+
 
   
   
 0.5
-999.990001
+999.99
 2
 1
 10
   
   
 999
-0.10001
+0.1
 1
 10
   
@@ -28,8 +28,8 @@
 10
   
   
-999.990001
-0.10001
+999.99
+0.1
 1
 10
   
@@ -120,6 +120,7 @@
 True
 start
 True
+True
 adjustment2
 2
   
@@ -134,6 +135,7 @@
 True
 start
 True
+True
 adjustment1
 2
 
@@ -338,6 +340,7 @@
 True
 start
 True
+True
 adjustment4
   
   
@@ -351,6 +354,7 @@
 True
 start
 True
+True
 adjustment5
 2
   
@@ -365,6 +369,7 @@
 True
 start
 True
+True
 adjustment3
 2
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Caolán McNamara (via logerrit)
 sw/source/ui/table/tabledlg.cxx|  131 +++--
 sw/source/uibase/table/tablepg.hxx |5 -
 2 files changed, 72 insertions(+), 64 deletions(-)

New commits:
commit 3326a3a07d7567852486d7f1a2355f1499a33dda
Author: Caolán McNamara 
AuthorDate: Tue Aug 4 21:08:08 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 14:44:38 2020 +0200

tdf#134925 keep a copy of the original SwTableRep to Reset back to

instead of operating on a copy of the original SwTableRep and over
writing the original at commit

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

diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index c8f466728e80..082b23ee4214 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -456,6 +456,11 @@ void  SwFormatTablePage::Reset( const SfxItemSet* )
 if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
 {
 pTableData = static_cast(static_cast( 
pItem)->GetValue());
+if (!m_xOrigTableData)
+m_xOrigTableData.reset(new SwTableRep(*pTableData));
+else // tdf#134925 and tdf#134913, reset back to the original data 
seen on dialog creation
+*pTableData = *m_xOrigTableData;
+
 nMinTableWidth = pTableData->GetColCount() * MINLAY;
 
 if(pTableData->GetWidthPercent())
@@ -707,7 +712,7 @@ DeactivateRC SwFormatTablePage::DeactivatePage( SfxItemSet* 
_pSet )
 //Description: Page column configuration
 SwTableColumnPage::SwTableColumnPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "modules/swriter/ui/tablecolumnpage.ui", 
"TableColumnPage", &rSet)
-, m_pOrigTableData(nullptr)
+, m_pTableData(nullptr)
 , m_pSizeHdlEvent(nullptr)
 , m_nTableWidth(0)
 , m_nMinWidth(MINLAY)
@@ -793,18 +798,22 @@ void  SwTableColumnPage::Reset( const SfxItemSet* )
 const SfxPoolItem* pItem;
 if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
 {
-m_pOrigTableData = static_cast(static_cast( pItem)->GetValue());
-m_xTableData.reset(new SwTableRep(*m_pOrigTableData));
-m_nNoOfVisibleCols = m_xTableData->GetColCount();
-m_nNoOfCols = m_xTableData->GetAllColCount();
-m_nTableWidth = m_xTableData->GetAlign() != 
text::HoriOrientation::FULL &&
-m_xTableData->GetAlign() != 
text::HoriOrientation::LEFT_AND_WIDTH?
-m_xTableData->GetWidth() : m_xTableData->GetSpace();
+m_pTableData = static_cast(static_cast( 
pItem)->GetValue());
+if (!m_xOrigTableData)
+m_xOrigTableData.reset(new SwTableRep(*m_pTableData));
+else // tdf#134925 and tdf#134913, reset back to the original data 
seen on dialog creation
+*m_pTableData = *m_xOrigTableData;
+
+m_nNoOfVisibleCols = m_pTableData->GetColCount();
+m_nNoOfCols = m_pTableData->GetAllColCount();
+m_nTableWidth = m_pTableData->GetAlign() != 
text::HoriOrientation::FULL &&
+m_pTableData->GetAlign() != 
text::HoriOrientation::LEFT_AND_WIDTH?
+m_pTableData->GetWidth() : m_pTableData->GetSpace();
 
 for( sal_uInt16 i = 0; i < m_nNoOfCols; i++ )
 {
-if( m_xTableData->GetColumns()[i].nWidth  < m_nMinWidth )
-m_nMinWidth = m_xTableData->GetColumns()[i].nWidth;
+if (m_pTableData->GetColumns()[i].nWidth  < m_nMinWidth)
+m_nMinWidth = m_pTableData->GetColumns()[i].nWidth;
 }
 sal_Int64 nMinTwips = m_aFieldArr[0].NormalizePercent( m_nMinWidth );
 sal_Int64 nMaxTwips = m_aFieldArr[0].NormalizePercent( m_nTableWidth );
@@ -830,7 +839,6 @@ void  SwTableColumnPage::Reset( const SfxItemSet* )
 }
 }
 ActivatePage(rSet);
-
 }
 
 void  SwTableColumnPage::Init(bool bWeb)
@@ -916,7 +924,7 @@ bool SwTableColumnPage::FillItemSet( SfxItemSet* )
 
 if (m_bModified)
 {
-m_xTableData->SetColsChanged();
+m_pTableData->SetColsChanged();
 }
 return m_bModified;
 }
@@ -952,7 +960,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nCurrentPos )
 
 for( sal_uInt16 i = 0; i < m_nNoOfCols; i++ )
 {
-nSum += (m_xTableData->GetColumns())[i].nWidth;
+nSum += (m_pTableData->GetColumns())[i].nWidth;
 }
 SwTwips nDiff = nSum - m_nTableWidth;
 
@@ -1003,11 +1011,11 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 
nCurrentPos )
 {
 //Difference is balanced by the width of the table,
 //other columns remain unchanged.
-OSL_ENSURE(nDiff <= m_xTableData->GetSpace() - m_nTableWidth, "wrong 
maximum" );
-SwTwips nActSpace = m_xTableData->GetSpace() - m_nTableWidt

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

2020-08-05 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/tabsh.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 76c40b82e6a44539cd43f326c00246e759449571
Author: Caolán McNamara 
AuthorDate: Wed Aug 5 12:01:01 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 14:45:02 2020 +0200

tdf#134913 set table width after setting columns

so "relative" mode sticks regardless of any rounding issues triggering
the table out of relative mode.

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

diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index cd38b92d1adf..3f1fca336f3a 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -422,9 +422,6 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
 if( SfxItemState::SET == rSet.GetItemState( *pIds, false, &pItem))
 aSet.Put( *pItem );
 
-if( aSet.Count() )
-rSh.SetTableAttr( aSet );
-
 if(bTabCols)
 {
 rSh.GetTabCols( aTabCols );
@@ -432,6 +429,9 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
 rSh.SetTabCols( aTabCols, bSingleLine );
 }
 
+if( aSet.Count() )
+rSh.SetTableAttr( aSet );
+
 rSh.EndUndo( SwUndoId::TABLE_ATTR );
 rSh.EndAllAction();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am |   32 
 1 file changed, 32 insertions(+)

New commits:
commit c34aca25889d24e9283596059befaf95ee9ae8c6
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 14:11:56 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 14:56:17 2020 +0200

cypress: add make run-multi command.

To run multi-user tests in interactive test runner.
It has two non-optional parameter. 'spec' defines the
test file and 'user' defines which user is run in the
interactive test runner. The other user is run in the
background.

Change-Id: I8612c201d7d3aeb2bdadd9d3786fb8eb0b60ab55
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100167
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 64dbf40a2..10527df83 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -163,6 +163,29 @@ run-mobile: @JAILS_PATH@ $(NODE_BINS)
|| true
@$(KILL_COMMAND) || true
 
+run-multi: @JAILS_PATH@ $(NODE_BINS)
+   $(call run_JS_error_check)
+   $(call start_loolwsd)
+   @echo
+   @echo "Running multi-user test in interactive test runner..."
+   @echo
+   $(if $(filter 1,$(user)), \
+   $(eval BACKGROUND_USER_SPEC=$(spec)_user2_spec.js), \
+   $(eval BACKGROUND_USER_SPEC=$(spec)_user1_spec.js))
+   $(if $(filter 1,$(user)), \
+   $(eval INTERACTIVE_USER_SPEC=$(spec)_user1_spec.js), \
+   $(eval INTERACTIVE_USER_SPEC=$(spec)_user2_spec.js))
+   $(eval 
BACKGROUND_USER_LOG=$(MULTIUSER_TRACK_FOLDER)/$(BACKGROUND_USER_SPEC).log)
+   @$(PARALLEL_SCRIPT) \
+   --browser $(CHROME) \
+   --config $(MULTIUSER_CONFIG) \
+   --env $(MULTIUSER_ENV) \
+   --spec $(BACKGROUND_USER_SPEC) \
+   --type multi-user \
+   --log-file $(BACKGROUND_USER_LOG) &
+   $(call run_interactive_multi,$(INTERACTIVE_USER_SPEC)) || true
+   @$(KILL_COMMAND) || true
+
 run-cov: do-run-cov
$(if $(wildcard $(ERROR_LOG)),@cat $(ERROR_LOG))
 
@@ -264,6 +287,15 @@ define run_interactive_test
--env $(MOBILE_ENV) \))
 endef
 
+define run_interactive_multi
+   $(CYPRESS_BINARY) run \
+   --browser $(CHROME) \
+   --headed --no-exit \
+   --config $(MULTIUSER_CONFIG) \
+   --env $(MULTIUSER_ENV) \
+   --spec=$(abs_dir)/integration_tests/multiuser/$(1)
+endef
+
 define run_desktop_tests
@echo $(if $(1),"Running cypress desktop test: $(1)","Running cypress 
desktop tests...")
@echo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am |   42 ++
 1 file changed, 22 insertions(+), 20 deletions(-)

New commits:
commit 8c6e24b565bf0a1e8e08cdf8ba2acaa1bae2d947
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 14:14:07 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 14:56:39 2020 +0200

cypress: simplify interactive runner rules.

Change-Id: I491eb0c78429981b05a888975380857f7bce8dcd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100168
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 10527df83..a6ca20c2c 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -149,8 +149,7 @@ run-desktop: @JAILS_PATH@ $(NODE_BINS)
@echo
@echo "Open cypress with desktop tests..."
@echo
-   $(call run_interactive_test,DESKTOP,$(spec)) \
-   || true
+   $(call run_interactive_desktop,$(spec)) || true
@$(KILL_COMMAND) || true
 
 run-mobile: @JAILS_PATH@ $(NODE_BINS)
@@ -159,8 +158,7 @@ run-mobile: @JAILS_PATH@ $(NODE_BINS)
@echo
@echo "Open cypress with mobile tests..."
@echo
-   $(call run_interactive_test,MOBILE,$(spec)) \
-   || true
+   $(call run_interactive_mobile,$(spec)) || true
@$(KILL_COMMAND) || true
 
 run-multi: @JAILS_PATH@ $(NODE_BINS)
@@ -265,26 +263,30 @@ MULTIUSER_CONFIG = \
 MULTIUSER_ENV = \

DATA_FOLDER=$(MULTIUSER_DATA_FOLDER),WORKDIR=$(MULTIUSER_WORKDIR),WSD_VERSION_HASH=$(WSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)"
 
-define run_interactive_test
-   $(if $(2),\
+define run_interactive_desktop
+   $(if $(1),\
$(CYPRESS_BINARY) run \
--browser $(CHROME) \
--headed --no-exit \
-   $(if $(findstring DESKTOP,$(1)),\
-   --config $(DESKTOP_CONFIG) \
-   --env $(DESKTOP_ENV) \
-   
--spec=$(abs_dir)/integration_tests/desktop/$(2)\
-   ,\
-   --config $(MOBILE_CONFIG) \
-   --env $(MOBILE_ENV) \
-   
--spec=$(abs_dir)/integration_tests/mobile/$(2)),\
+   --config $(DESKTOP_CONFIG) \
+   --env $(DESKTOP_ENV) \
+   --spec=$(abs_dir)/integration_tests/desktop/$(1),\
+   $(CYPRESS_BINARY) open \
+   --config $(DESKTOP_CONFIG) \
+   --env $(DESKTOP_ENV))
+endef
+
+define run_interactive_mobile
+   $(if $(1),\
+   $(CYPRESS_BINARY) run \
+   --browser $(CHROME) \
+   --headed --no-exit \
+   --config $(MOBILE_CONFIG) \
+   --env $(MOBILE_ENV) \
+   --spec=$(abs_dir)/integration_tests/mobile/$(1),\
$(CYPRESS_BINARY) open \
-   $(if $(findstring DESKTOP,$(1)),\
-   --config $(DESKTOP_CONFIG) \
-   --env $(DESKTOP_ENV) \
-   ,\
-   --config $(MOBILE_CONFIG) \
-   --env $(MOBILE_ENV) \))
+   --config $(MOBILE_CONFIG) \
+   --env $(MOBILE_ENV))
 endef
 
 define run_interactive_multi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Michael Stahl (via logerrit)
 sw/source/core/doc/docdesc.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ae3fb60f749066aa69dd1c32d2d963562a93eabb
Author: Michael Stahl 
AuthorDate: Tue Aug 4 12:26:23 2020 +0200
Commit: Xisco Fauli 
CommitDate: Wed Aug 5 15:10:50 2020 +0200

tdf#135144 sw: copy bookmarks in SwDoc::CopyMasterHeader()

... and SwDoc::CopyMasterFooter(); this is the same as commit
9f7ee38acec0cb614e37aecc5ea9c5f1c63b61b6 but for 2 other functions that
do the same thing.

Change-Id: Id7ed449a004ee3c9452d4603bf8632e2720651ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100077
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit af38654b4b8388f0a0236601742b7ab3d1590ae8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100058
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 036185e88d7d..51dc930f06d9 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -293,7 +293,9 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, 
const SwFormatHeader &rHe
 GetNodes().Copy_( aRange, aTmp, false );
 aTmp = *pSttNd;
 GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, 
nullptr, aTmp);
-
+SwPaM const source(aRange.aStart, aRange.aEnd);
+SwPosition dest(aTmp);
+sw::CopyBookmarks(source, dest);
 pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
 rDescFrameFormat.SetFormatAttr( SwFormatHeader( pFormat ) );
 }
@@ -365,7 +367,9 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, 
const SwFormatFooter &rFo
 GetNodes().Copy_( aRange, aTmp, false );
 aTmp = *pSttNd;
 GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, 
nullptr, aTmp);
-
+SwPaM const source(aRange.aStart, aRange.aEnd);
+SwPosition dest(aTmp);
+sw::CopyBookmarks(source, dest);
 pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
 rDescFrameFormat.SetFormatAttr( SwFormatFooter( pFormat ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Michael Stahl (via logerrit)
 sw/source/core/doc/docdesc.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ce10b3340c1b2e04a2ef9e0f454a64f898bff8cb
Author: Michael Stahl 
AuthorDate: Tue Aug 4 12:26:23 2020 +0200
Commit: Xisco Fauli 
CommitDate: Wed Aug 5 15:14:23 2020 +0200

tdf#135144 sw: copy bookmarks in SwDoc::CopyMasterHeader()

... and SwDoc::CopyMasterFooter(); this is the same as commit
9f7ee38acec0cb614e37aecc5ea9c5f1c63b61b6 but for 2 other functions that
do the same thing.

Change-Id: Id7ed449a004ee3c9452d4603bf8632e2720651ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100077
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit af38654b4b8388f0a0236601742b7ab3d1590ae8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100059
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index d1cc84f8d8e3..e6f9fed947a3 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -293,7 +293,9 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, 
const SwFormatHeader &rHe
 GetNodes().Copy_( aRange, aTmp, false );
 aTmp = *pSttNd;
 GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, 
nullptr, aTmp);
-
+SwPaM const source(aRange.aStart, aRange.aEnd);
+SwPosition dest(aTmp);
+sw::CopyBookmarks(source, dest);
 pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
 rDescFrameFormat.SetFormatAttr( SwFormatHeader( pFormat ) );
 }
@@ -365,7 +367,9 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, 
const SwFormatFooter &rFo
 GetNodes().Copy_( aRange, aTmp, false );
 aTmp = *pSttNd;
 GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, 
nullptr, aTmp);
-
+SwPaM const source(aRange.aStart, aRange.aEnd);
+SwPosition dest(aTmp);
+sw::CopyBookmarks(source, dest);
 pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
 rDescFrameFormat.SetFormatAttr( SwFormatFooter( pFormat ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[SOLVED] Re: Other build errors

2020-08-05 Thread julien2412
sberg wrote
>> ...
> 
> ;
>  
> "Silence loplugin:staticmethods when the definition involves 
> preprocessing" is the last of the fixes I pushed; should work now

Indeed! Thank you!

Julien



--
Sent from: 
http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-08-05 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/com_GCC_defs.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d0eebe0f1471db6f0b9a472a582f51c8c37753b
Author: Stephan Bergmann 
AuthorDate: Wed Aug 5 15:06:16 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 5 16:28:50 2020 +0200

Adapt --enable-lto to --without-parallelism

...which sets PARALLELISM to 0 and thus caused

  cc1: error: unrecognized argument to ‘-flto=’ option: ‘0’

at least with recent GCC 11 trunk

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

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 11d85608a22d..42d8eefff7fd 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -184,7 +184,7 @@ ifeq ($(COM_IS_CLANG),TRUE)
 gb_LTOFLAGS := -flto
 gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
 else
-gb_LTOFLAGS := -flto=$(PARALLELISM) -fuse-linker-plugin -O2
+gb_LTOFLAGS := -flto$(if $(filter-out 0,$(PARALLELISM)),=$(PARALLELISM)) 
-fuse-linker-plugin -O2
 endif
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Mike Kaganski (via logerrit)
 include/xmloff/txtparae.hxx|2 +
 sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx   |   18 
++
 sw/source/filter/xml/xmltble.cxx   |9 -
 sw/source/filter/xml/xmltexte.hxx  |6 +++
 xmloff/source/text/txtparae.cxx|4 ++
 6 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 35021cd56b3b4e38035804087f215c80085564be
Author: Mike Kaganski 
AuthorDate: Wed Aug 5 11:16:32 2020 +0300
Commit: Mike Kaganski 
CommitDate: Wed Aug 5 16:45:42 2020 +0200

tdf#124470: Split export of table autostyles out from collection phase

This allows to call collectAutoStyles where required (e.g. when enumerating
used fonts), without side effect of writing table styles XML inside the 
call,
out of place.

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

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 80131b11e9f7..44c15512cd70 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -365,6 +365,8 @@ protected:
 const css::uno::Reference< css::beans::XPropertySet> & i_xPortion,
 bool i_bAutoStyles, bool i_isProgress, bool & rPrevCharIsSpace);
 
+virtual void exportTableAutoStyles();
+
 public:
 
 XMLTextParagraphExport(
diff --git a/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt 
b/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt
new file mode 100644
index ..21969e9e5485
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 443492c4b42b..293252176a05 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2539,5 +2539,23 @@ DECLARE_ODFEXPORT_TEST(testPageContentBottom, 
"page-content-bottom.odt")
 CPPUNIT_ASSERT_EQUAL(nExpected, getProperty(xShape, 
"VertOrientRelation"));
 }
 
+DECLARE_ODFEXPORT_TEST(tdf124470, "tdf124470TableAndEmbeddedUsedFonts.odt")
+{
+// Table styles were exported out of place, inside font-face-decls.
+// Without the fix in place, this will fail already in ODF validation:
+// "content.xml[2,2150]:  Error: tag name "style:style" is not allowed. 
Possible tag names are: "
+
+CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+if (!pXmlDoc)
+return;
+
+assertXPath(pXmlDoc, 
"/office:document-content/office:font-face-decls/style:style", 0);
+assertXPath(pXmlDoc, 
"/office:document-content/office:automatic-styles/style:style[@style:family='table']",
 1);
+assertXPath(pXmlDoc, 
"/office:document-content/office:automatic-styles/style:style[@style:family='table-column']",
 2);
+assertXPath(pXmlDoc, 
"/office:document-content/office:automatic-styles/style:style[@style:family='paragraph']",
 1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 00b0b79bae5b..e0c3cc57fd54 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -1156,6 +1156,13 @@ void SwXMLExport::ExportTable( const SwTableNode& 
rTableNd )
 lcl_xmltble_ClearName_Line( pLine );
 }
 
+void SwXMLTextParagraphExport::exportTableAutoStyles() {
+for (const auto* pTableNode : maTableNodes)
+{
+
static_cast(GetExport()).ExportTableAutoStyles(*pTableNode);
+}
+}
+
 void SwXMLTextParagraphExport::exportTable(
 const Reference < XTextContent > & rTextContent,
 bool bAutoStyles, bool _bProgress )
@@ -1193,7 +1200,7 @@ void SwXMLTextParagraphExport::exportTable(
 // ALL flags are set at the same time.
 const bool bExportStyles = bool( GetExport().getExportFlags() 
& SvXMLExportFlags::STYLES );
 if ( bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter( 
aIdx ) )
-
static_cast(GetExport()).ExportTableAutoStyles( *pTableNd );
+maTableNodes.push_back(pTableNd);
 }
 else
 {
diff --git a/sw/source/filter/xml/xmltexte.hxx 
b/sw/source/filter/xml/xmltexte.hxx
index e7ec5a991d3e..3fc9530e6303 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -28,6 +28,7 @@
 class SwXMLExport;
 class SvXMLAutoStylePoolP;
 class SwNoTextNode;
+class SwTableNode;
 namespace com::sun::star::style { class XStyle; }
 
 class SwXMLTextParagraphExport : public XMLTextParagraphExport
@@ -36,6 +37,9 @@ class SwXMLTextP

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

2020-08-05 Thread Caolán McNamara (via logerrit)
 forms/source/component/FormComponent.cxx |2 +-
 sw/source/core/layout/frmtool.cxx|2 +-
 sw/source/filter/ww8/ww8par.hxx  |8 
 sw/source/ui/table/tabledlg.cxx  |2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit cfce4865e81db30635cf3a166d77731be41cd9a7
Author: Caolán McNamara 
AuthorDate: Wed Aug 5 14:43:08 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 16:52:26 2020 +0200

dito->ditto

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

diff --git a/forms/source/component/FormComponent.cxx 
b/forms/source/component/FormComponent.cxx
index 450ef822b632..34b5f51c538d 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1368,7 +1368,7 @@ void OBoundControlModel::disposing()
 // disconnect from our external value binding
 if ( hasExternalValueBinding() )
 disconnectExternalValueBinding();
-// dito for the validator
+// ditto for the validator
 if ( hasValidator() )
 disconnectValidator( );
 }
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index b9d4f37831d2..9dac5b885233 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -875,7 +875,7 @@ SwContentNotify::~SwContentNotify()
 pFESh->CalcAndSetScale( xObj ); // create client
 }
 }
-//dito animated graphics
+// ditto animated graphics
 if ( getFrameArea().HasArea() && 
static_cast(pCnt)->HasAnimation() )
 {
 static_cast(pCnt)->StopAnimation();
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 2ff459b161ca..8b0c6f51f339 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1269,10 +1269,10 @@ private:
 
 // Ini-Flags:
 sal_uInt32 m_nIniFlags;// flags from writer.ini
-sal_uInt32 m_nIniFlags1;   // dito ( additional flags )
-sal_uInt32 m_nFieldFlags;  // dito for fields
-sal_uInt32 m_nFieldTagAlways[3];   // dito for tagging of fields
-sal_uInt32 m_nFieldTagBad[3];  // dito for tagging of fields that 
can't be imported
+sal_uInt32 m_nIniFlags1;   // ditto ( additional flags )
+sal_uInt32 m_nFieldFlags;  // ditto for fields
+sal_uInt32 m_nFieldTagAlways[3];   // ditto for tagging of fields
+sal_uInt32 m_nFieldTagBad[3];  // ditto for tagging of fields that 
can't be imported
 bool m_bRegardHindiDigits;  // import digits in CTL scripts as Hindi 
numbers
 
 bool m_bDrawCpOValid;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 082b23ee4214..c56168448f6d 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -157,7 +157,7 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, 
weld::ToggleButton&, rBtn, void
 m_xLeftMF->SetRefValue(pTableData->GetSpace());
 m_xRightMF->SetRefValue(pTableData->GetSpace());
 m_xLeftMF->SetMetricFieldMin(0); //will be overwritten by the 
Percentfield
-m_xRightMF->SetMetricFieldMin(0); //dito
+m_xRightMF->SetMetricFieldMin(0); //ditto
 m_xLeftMF->SetMetricFieldMax(99);
 m_xRightMF->SetMetricFieldMax(99);
 m_xLeftMF->set_value(m_xLeftMF->NormalizePercent(nLeft ), 
FieldUnit::TWIP );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Shivam Kumar Singh (via logerrit)
 svx/source/sidebar/inspector/InspectorTextPanel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b6576ce2321f68e4e2c7399f3c2fdf934df43d1e
Author: Shivam Kumar Singh 
AuthorDate: Mon Aug 3 20:06:19 2020 +0530
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 17:06:49 2020 +0200

tdf#135344 Resolved Inspector scroll bar issues

Change-Id: Ifd1b494c2302e8d21cc87296fc8222ffa2c75faa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100010
Reviewed-by: Heiko Tietze 
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Tested-by: Caolán McNamara 

diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx 
b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index d9a389aefab9..2a212f33fe22 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -47,7 +47,7 @@ InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent,
 : PanelLayout(pParent, "InspectorTextPanel", 
"svx/ui/inspectortextpanel.ui", rxFrame)
 , mpListBoxStyles(m_xBuilder->weld_tree_view("listbox_fonts"))
 {
-mpListBoxStyles->set_size_request(-1, 
mpListBoxStyles->get_height_rows(25));
+mpListBoxStyles->set_size_request(-1, -1);
 float fWidth = mpListBoxStyles->get_approximate_digit_width();
 std::vector aWidths;
 aWidths.push_back(fWidth * 34);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - configure.ac debian/changelog loolwsd.spec.in

2020-08-05 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit f8af9c8aeee84572310c791946e9f8c6a1cc9290
Author: Andras Timar 
AuthorDate: Wed Aug 5 10:58:04 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Aug 5 17:27:08 2020 +0200

Bump package version to 4.2.7-1

Change-Id: I324478883290b675d9e0fa3274d8b729c48ec182

diff --git a/configure.ac b/configure.ac
index d02b515e1..fcfd432e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [4.2.6], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [4.2.7], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index 2d9a577cd..2364fab83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (4.2.7-1) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.7-1
+
+ -- Andras Timar   Wed, 04 Aug 2020 10:20:00 +0200
+
 loolwsd (4.2.6-2) unstable; urgency=medium
 
   * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.6-2
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 2da566289..b9667a7a8 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:2%{?dist}
+Release:1%{?dist}
 Vendor: %{vendor}
 Summary:LibreOffice Online WebSocket Daemon
 License:EULA
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/quwex/gsoc-box2d-experimental' - 3 commits - animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk officecfg/registry sd/inc sd/source sd/

2020-08-05 Thread Sarper Akdemir (via logerrit)
Rebased ref, commits from common ancestor:
commit b905d1943c899d2d37ccdadbfb54d6a74647ce97
Author: Sarper Akdemir 
AuthorDate: Mon Jul 27 23:02:48 2020 +0300
Commit: Sarper Akdemir 
CommitDate: Wed Aug 5 18:34:34 2020 +0300

work-in-progress complex shapes

Change-Id: I807bbde92c143b8c96792b3d8bf9603a31216486

diff --git a/slideshow/source/engine/box2dtools.cxx 
b/slideshow/source/engine/box2dtools.cxx
index 8729300184f6..90f1d1853dba 100644
--- a/slideshow/source/engine/box2dtools.cxx
+++ b/slideshow/source/engine/box2dtools.cxx
@@ -11,6 +11,13 @@
 #include 
 
 #include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
 
 #define BOX2D_SLIDE_SIZE_IN_METERS 100.00f
 
@@ -62,6 +69,124 @@ b2Vec2 convertB2DPointToBox2DVec2(const basegfx::B2DPoint& 
aPoint, const double
 return { static_cast(aPoint.getX() * fScaleFactor),
  static_cast(aPoint.getY() * -fScaleFactor) };
 }
+
+// expects rPolygon to have coordinates relative to it's center
+void addTriangleVectorToBody(const basegfx::triangulator::B2DTriangleVector& 
rTriangleVector,
+ b2Body* aBody, const float fDensity, const float 
fFriction,
+ const float fRestitution, const double 
fScaleFactor)
+{
+for (const basegfx::triangulator::B2DTriangle& aTriangle : rTriangleVector)
+{
+b2FixtureDef aFixture;
+b2PolygonShape aPolygonShape;
+b2Vec2 aTriangleVertices[3]
+= { convertB2DPointToBox2DVec2(aTriangle.getA(), fScaleFactor),
+convertB2DPointToBox2DVec2(aTriangle.getB(), fScaleFactor),
+convertB2DPointToBox2DVec2(aTriangle.getC(), fScaleFactor) };
+
+bool bValidPointDistance = true;
+for (int a = 0; a < 3; a++)
+{
+for (int b = 0; b < 3; b++)
+{
+if (a == b)
+continue;
+if (b2DistanceSquared(aTriangleVertices[a], 
aTriangleVertices[b]) < 0.003f)
+{
+bValidPointDistance = false;
+}
+}
+}
+if (bValidPointDistance)
+{
+aPolygonShape.Set(aTriangleVertices, 3);
+aFixture.shape = &aPolygonShape;
+aFixture.density = fDensity;
+aFixture.friction = fFriction;
+aFixture.restitution = fRestitution;
+aBody->CreateFixture(&aFixture);
+}
+}
+}
+
+// expects rPolygon to have coordinates relative to it's center
+void addEdgeShapeToBody(const basegfx::B2DPolygon& rPolygon, b2Body* aBody, 
const float fDensity,
+const float fFriction, const float fRestitution, const 
double fScaleFactor)
+{
+basegfx::B2DPolygon aPolygon = 
basegfx::utils::removeNeutralPoints(rPolygon);
+const float fHalfWidth = 0.1;
+bool bHaveEdgeA = false;
+b2Vec2 aEdgeBoxVertices[4];
+
+for (sal_uInt32 nIndex = 0; nIndex < aPolygon.count(); nIndex++)
+{
+b2FixtureDef aFixture;
+b2PolygonShape aPolygonShape;
+
+basegfx::B2DPoint aPointA;
+basegfx::B2DPoint aPointB;
+if (nIndex != 0)
+{
+aPointA = aPolygon.getB2DPoint(nIndex - 1);
+aPointB = aPolygon.getB2DPoint(nIndex);
+}
+else if (/* nIndex == 0 && */ aPolygon.isClosed())
+{
+// start by connecting the last point to the first one
+aPointA = aPolygon.getB2DPoint(aPolygon.count() - 1);
+aPointB = aPolygon.getB2DPoint(nIndex);
+}
+else // the polygon isn't closed, won't connect last and first points
+{
+continue;
+}
+
+b2Vec2 aEdgeUnitVec = (convertB2DPointToBox2DVec2(aPointB, 
fScaleFactor)
+   - convertB2DPointToBox2DVec2(aPointA, 
fScaleFactor));
+aEdgeUnitVec.Normalize();
+
+b2Vec2 aEdgeNormal(-aEdgeUnitVec.y, aEdgeUnitVec.x);
+
+if (!bHaveEdgeA)
+{
+aEdgeBoxVertices[0]
+= convertB2DPointToBox2DVec2(aPointA, fScaleFactor) + 
fHalfWidth * aEdgeNormal;
+aEdgeBoxVertices[1]
+= convertB2DPointToBox2DVec2(aPointA, fScaleFactor) + 
-fHalfWidth * aEdgeNormal;
+bHaveEdgeA = true;
+}
+aEdgeBoxVertices[2]
+= convertB2DPointToBox2DVec2(aPointB, fScaleFactor) + fHalfWidth * 
aEdgeNormal;
+aEdgeBoxVertices[3]
+= convertB2DPointToBox2DVec2(aPointB, fScaleFactor) + -fHalfWidth 
* aEdgeNormal;
+
+bool bValidPointDistance
+= (b2DistanceSquared(aEdgeBoxVertices[0], aEdgeBoxVertices[2]) > 
0.003f);
+
+if (bValidPointDistance)
+{
+aPolygonShape.Set(aEdgeBoxVertices, 4);
+aFixture.shape = &aPolygonShape;
+aFixture.density = fDensity;
+aFixture.friction = fFriction;
+aFixture.restitution = fRestitution;
+aBody->CreateFixt

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

2020-08-05 Thread Caolán McNamara (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |2 ++
 svx/source/styles/CommonStylePreviewRenderer.cxx |   12 
 2 files changed, 14 insertions(+)

New commits:
commit 2f6728f88cb895d7bfe185185ace30327b23e8ed
Author: Caolán McNamara 
AuthorDate: Wed Aug 5 15:50:31 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 17:58:10 2020 +0200

tdf#135438 Paragraph styles preview in sidebar are clipped

since...

commit fe9a13dc0e6d1384416c2a2343223b33925fc925
Author: Caolán McNamara 
Date:   Sun Apr 26 15:43:25 2020 +0100

weld SfxTemplatePanelControl

getRenderSize used to be called after recalculate and before
render to change maSizePixel

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

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index 55391327533e..5dfd41faa39a 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -31,6 +31,8 @@ class CommonStylePreviewRenderer final : public 
sfx2::StylePreviewRenderer
 Size maPixelSize;
 OUString maStyleName;
 
+Size getRenderSize() const;
+
 public:
 CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& 
rOutputDev,
SfxStyleSheetBase* pStyle, long nMaxHeight);
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index d677a135461e..9920903df469 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -168,9 +168,21 @@ bool CommonStylePreviewRenderer::recalculate()
 }
 
 m_pFont = std::move(pFont);
+maPixelSize = getRenderSize();
 return true;
 }
 
+Size CommonStylePreviewRenderer::getRenderSize() const
+{
+assert(m_pFont);
+Size aPixelSize = m_pFont->GetTextSize(&mrOutputDev, maStyleName);
+
+if (aPixelSize.Height() > mnMaxHeight)
+aPixelSize.setHeight( mnMaxHeight );
+
+return aPixelSize;
+}
+
 bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, 
RenderAlign eRenderAlign)
 {
 const OUString& rText = maStyleName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - external/gpgmepp RepositoryExternal.mk

2020-08-05 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk   |5 +
 external/gpgmepp/ExternalPackage_gpgmepp.mk |3 ---
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 917c3d0520b4e4108ae1b26fdecbf6ec089497a7
Author: Michael Stahl 
AuthorDate: Wed Aug 5 11:59:03 2020 +0200
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 17:59:21 2020 +0200

gpgpmepp: fix creative abuse of gbuild

The problem was that (cd sw && make CppunitTest_sw_ooxmlexport4) fails
with an error that the gpgmepp package doesn't exist, but only on WNT.

Nonobviously, this is due to the override of the rule for the gpgmepp
package in ExternalPackage_gpgmepp.mk, which copies the same file that
the package already depends on for no obvious reason.

Furthermore, RepositoryExternal.mk uses
gb_Helper_register_executables_for_install with gpgme-w32spawn,
when it should just register the package instead, because that is not a
gbuild Executable.

Change-Id: I8cb8b7a68c9681844a39de1390aa736a1ec53449
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100159
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 2a58902f0eecff8d68ad2669270524b99675c39c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100067
Reviewed-by: Caolán McNamara 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e534c9d0ee6c..7f623ac80404 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3579,6 +3579,7 @@ $(call gb_LinkTarget_use_libraries,$(1),\
 endef
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
+   gpgmepp \
libassuan \
libgpg-error \
 ))
@@ -3587,10 +3588,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
gpgmepp \
 ))
 
-$(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
-   gpgme-w32spawn \
-))
-
 endif
 
 ifneq ($(filter MACOSX LINUX,$(OS)),)
diff --git a/external/gpgmepp/ExternalPackage_gpgmepp.mk 
b/external/gpgmepp/ExternalPackage_gpgmepp.mk
index 8253f663e50c..67c3dc64ffd3 100644
--- a/external/gpgmepp/ExternalPackage_gpgmepp.mk
+++ b/external/gpgmepp/ExternalPackage_gpgmepp.mk
@@ -27,9 +27,6 @@ else ifeq ($(OS),WNT)
 
 $(eval $(call 
gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/gpgme-w32spawn.exe,src/gpgme-w32spawn.exe))
 
-$(call gb_Package_get_target_for_build,gpgmepp):
-   cp $(call gb_UnpackedTarball_get_dir,gpgmepp)/src/gpgme-w32spawn.exe 
$(call gb_Executable__get_dir_for_exe,cppunittester)/gpgme-w32spawn.exe
-
 endif
 
 # If a tool executed during the build (like svidl) requires these gpgmepp 
libraries, it will also
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/ChildSession.cpp loleaflet/src

2020-08-05 Thread Michael Meeks (via logerrit)
 kit/ChildSession.cpp|   32 
 loleaflet/src/layer/marker/TextInput.js |4 +---
 2 files changed, 25 insertions(+), 11 deletions(-)

New commits:
commit 9142828282c1147244a4df700ee52d28cf27a37d
Author: Michael Meeks 
AuthorDate: Wed Aug 5 17:16:08 2020 +0100
Commit: Michael Meeks 
CommitDate: Wed Aug 5 18:44:10 2020 +0200

textinput: use a single input message per key on the wire.

Change-Id: Ibd0f7afb98c8ed278751c4b5b46d7ce2467cd71f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100184
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index dc0e9ec3d..281360654 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1242,15 +1242,25 @@ bool ChildSession::insertFile(const char* /*buffer*/, 
int /*length*/, const Stri
 bool ChildSession::extTextInputEvent(const char* /*buffer*/, int /*length*/,
  const StringVector& tokens)
 {
-int id, type;
+int id, type = -1;
 std::string text;
-if (tokens.size() < 4 ||
-!getTokenInteger(tokens[1], "id", id) || id < 0 ||
-!getTokenKeyword(tokens[2], "type",
-{{"input", LOK_EXT_TEXTINPUT}, {"end", 
LOK_EXT_TEXTINPUT_END}},
- type) ||
-!getTokenString(tokens[3], "text", text))
+bool error = false;
+
+if (tokens.size() < 3)
+error = true;
+else if (!getTokenInteger(tokens[1], "id", id) || id < 0)
+error = true;
+else {
+// back-compat 'type'
+if (getTokenKeyword(tokens[2], "type",
+{{"input", LOK_EXT_TEXTINPUT}, {"end", 
LOK_EXT_TEXTINPUT_END}},
+type))
+error = !getTokenString(tokens[3], "text", text);
+else // normal path:
+error = !getTokenString(tokens[2], "text", text);
+}
 
+if (error)
 {
 sendTextFrameAndLogError("error: cmd=" + std::string(tokens[0]) + " 
kind=syntax");
 return false;
@@ -1260,7 +1270,13 @@ bool ChildSession::extTextInputEvent(const char* 
/*buffer*/, int /*length*/,
 URI::decode(text, decodedText);
 
 getLOKitDocument()->setView(_viewId);
-getLOKitDocument()->postWindowExtTextInputEvent(id, type, 
decodedText.c_str());
+if (type >= 0)
+getLOKitDocument()->postWindowExtTextInputEvent(id, type, 
decodedText.c_str());
+else
+{
+getLOKitDocument()->postWindowExtTextInputEvent(id, LOK_EXT_TEXTINPUT, 
decodedText.c_str());
+getLOKitDocument()->postWindowExtTextInputEvent(id, 
LOK_EXT_TEXTINPUT_END, decodedText.c_str());
+}
 
 return true;
 }
diff --git a/loleaflet/src/layer/marker/TextInput.js 
b/loleaflet/src/layer/marker/TextInput.js
index 8e7196e96..1910d93d0 100644
--- a/loleaflet/src/layer/marker/TextInput.js
+++ b/loleaflet/src/layer/marker/TextInput.js
@@ -706,9 +706,7 @@ L.TextInput = L.Layer.extend({
var encodedText = encodeURIComponent(text);
var winId = this._map.getWinId();
this._map._socket.sendMessage(
-   'textinput id=' + winId + ' type=input text=' + 
encodedText);
-   this._map._socket.sendMessage(
-   'textinput id=' + winId + ' type=end text=' + 
encodedText);
+   'textinput id=' + winId + ' text=' + 
encodedText);
}
},
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js|   
57 ++
 cypress_test/integration_tests/desktop/calc/focus_spec.js  |   
 4 
 cypress_test/integration_tests/mobile/calc/focus_spec.js   |   
 2 
 cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js |   
10 -
 4 files changed, 63 insertions(+), 10 deletions(-)

New commits:
commit eb179113e5a8696a0fd900064f12774e4b8964a7
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 17:17:43 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 19:00:28 2020 +0200

cypress: introduce moveCursor() helper method.

Change-Id: I67a1e74fe03e464e71100428969f9458b8a018a2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100179
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 484b8cad0..bd2598a7a 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -411,6 +411,62 @@ function doIfOnDesktop(callback) {
});
 }
 
+function moveCursor(direction) {
+   cy.log('Moving text cursor - start.');
+   cy.log('Param - direction: ' + direction);
+
+   initAliasToNegative('origCursorPos');
+
+   cy.get('.blinking-cursor')
+   .should('be.visible');
+
+   if (direction === 'up' || direction === 'down') {
+   cy.get('.blinking-cursor')
+   .invoke('offset')
+   .its('top')
+   .as('origCursorPos');
+   } else if (direction === 'left' || direction === 'right') {
+   cy.get('.blinking-cursor')
+   .invoke('offset')
+   .its('left')
+   .as('origCursorPos');
+   }
+
+   cy.get('@origCursorPos')
+   .should('be.greaterThan', 0);
+
+   var key = '';
+   if (direction === 'up') {
+   key = '{uparrow}';
+   } else if (direction === 'down') {
+   key = '{downarrow}';
+   } else if (direction === 'left') {
+   key = '{leftarrow}';
+   } else if (direction === 'right') {
+   key = '{rightarrow}';
+   }
+   cy.get('textarea.clipboard')
+   .type(key);
+
+   cy.get('@origCursorPos')
+   .then(function(origCursorPos) {
+   cy.get('.blinking-cursor')
+   .should(function(cursor) {
+   if (direction === 'up') {
+   
expect(cursor.offset().top).to.be.lessThan(origCursorPos);
+   } else if (direction === 'down') {
+   
expect(cursor.offset().top).to.be.greaterThan(origCursorPos);
+   } else if (direction === 'left') {
+   
expect(cursor.offset().left).to.be.lessThan(origCursorPos);
+   } else if (direction === 'right') {
+   
expect(cursor.offset().left).to.be.greaterThan(origCursorPos);
+   }
+   });
+   });
+
+   cy.log('Moving text cursor - end.');
+}
+
 
 module.exports.loadTestDoc = loadTestDoc;
 module.exports.assertCursorAndFocus = assertCursorAndFocus;
@@ -435,3 +491,4 @@ module.exports.inputOnIdle = inputOnIdle;
 module.exports.waitUntilIdle = waitUntilIdle;
 module.exports.doIfOnMobile = doIfOnMobile;
 module.exports.doIfOnDesktop = doIfOnDesktop;
+module.exports.moveCursor = moveCursor;
diff --git a/cypress_test/integration_tests/desktop/calc/focus_spec.js 
b/cypress_test/integration_tests/desktop/calc/focus_spec.js
index 568e1fd11..2d9cd623b 100644
--- a/cypress_test/integration_tests/desktop/calc/focus_spec.js
+++ b/cypress_test/integration_tests/desktop/calc/focus_spec.js
@@ -61,10 +61,10 @@ describe('Calc focus tests', function() {
calcHelper.clickFormulaBar();
helper.assertCursorAndFocus();
 
-   // Move cursor before text2
+   // Move cursor inside text2
cy.get('textarea.clipboard').type('{end}');
for (var i = 0; i < 6; i++)
-   cy.get('textarea.clipboard').type('{leftarrow}');
+   helper.moveCursor('left');
 
var text3 = ' BAZINGA';
helper.typeText('textarea.clipboard', text3);
diff --git a/cypress_test/integration_tests/mobile/calc/focus_spec.js 
b/cypress_test/integration_tests/mobile/calc/focus_spec.js
index d12385daf..b9d4dd341 100644
--- a/cypress_test/integration_tests/mobile/calc/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/ca

[Libreoffice-commits] core.git: Branch 'refs/tags/cp-6.2-22' - 0 commits -

2020-08-05 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 536cbf5e9fd8e65824dfbddb46fe28bad27f1485
Author: Andras Timar 
AuthorDate: Wed Aug 5 20:28:52 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Aug 5 20:28:52 2020 +0200

Bump version to 6.2-22

Change-Id: I658c792eeadf4dff4d7bc119edfa128b2eca6512

diff --git a/configure.ac b/configure.ac
index 10bf82f583f4..2823a962747e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[6.2.10.21],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.2.10.22],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/tags/co-6.2-22' - 0 commits -

2020-08-05 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.2-22'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'cp-6.2-22' created by Andras Timar  at 
2020-08-05 18:30 +

cp-6.2-22

Changes since cp-6.2-21-47:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/co-6.2-22'

2020-08-05 Thread Andras Timar (via logerrit)
Tag 'co-6.2-22' created by Andras Timar  at 
2020-08-05 18:30 +

co-6.2-22

Changes since cp-6.2-21-47:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Minutes from the UX/design meeting 2020-Aug-05

2020-08-05 Thread Heiko Tietze
Present: Fellow Jitsier, John, Heiko
Comments: Telesto, Dieter, Stuart, Adolfo, Krunoslav, Italo, Cloph

Tickets/Topic

 * Writer zoom at "page width", option to eliminate 3d page edge and gutter
   + https://bugs.documentfoundation.org/show_bug.cgi?id=87842
   + minimizing the gutter makes the view not like a page anymore,
 would result in issues with the rulers, and requires some effort
 to implement => WF (Heiko)
   + no further input sind 2017
   => WF

 * Add shortcut keys to each Sidebar Tab to open its content panel(s)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=84502
   + use ctrl+alt+ for sidebar decks and reorganize
 for max congruence across modules (Heiko)
   => patch is in work, late minute input still welcome

 * BORDERS "Line arrangement" display shows "Set no borders" when dialog is
reopened,
   irrespective of actual border setting
   + https://bugs.documentfoundation.org/show_bug.cgi?id=135359
   + check border preset button according the applied options?
   + after clicking a preset it is not highlighted yet at all
   + support the request (Telesto, Dieter)
   => do it with low importance

 * UI: Make the automatic caption functionality/settings more accessible
   + https://bugs.documentfoundation.org/show_bug.cgi?id=135411
   + autocaption is perfectly fine at tools > options
   => NAB

 * Sequential name for objects in Draw and other apps (and total count in
properties)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=135312
   + more statistics needed as requested in tdf#123083 for Writer?
   + provide insights with update to the Navigator; duplicate to tdf#90244 
(Stuart)
   + would be nice to have informative statistics at the statusbar across 
modules
   => ticket is resolved now

 * [MOCKUP] LibreOffice "Format" menu mockup
   + https://bugs.documentfoundation.org/show_bug.cgi?id=135417
   + good idea, nice to have shorter first level menus (Heiko)
   + important is consistency across modules; looks logical (John)
   + changing the menu requires a broad consensus (Heiko)
   + ideally we have the opportunity to switch the menu, see tdf#120132
   => complete it, wait for more input, investigate optional solution

 * Alternative for brand font
   +
http://document-foundation-mail-archive.969070.n3.nabble.com/libreoffice-l10n-LibreOffice-7-0-banner-for-translation-tc4284347.html#a4284568
   +
http://document-foundation-mail-archive.969070.n3.nabble.com/Little-problem-with-the-Vegur-font-td2857939.html
   + Sofia Sans (https://github.com/lettersoup/Sofia-Sans), Inria Sans, FiraGO
 (ex Fira Sans), Manrope (Adolfo)
   + IBM Plex Sans (Krunoslav)
   + as a text processor we may also consider serif fonts for the brand image
 (not necessarily needed on the tagline) (Heiko)
   + Vegur is pretty complete in the latest version; better seek for 
complementing
 fonts that covers for example Arab, Hebrew, etc. (Cloph, Italo)
   => input welcome

 * Next year GSoC project
   + seeking for topics that design/UX can prepare and advertise
   + for example: Table of Contents (tdf#135388), Bibliography,
 Functions deck (tdf#92416)...
   => AI: write a message to the mailing list



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-08-05 Thread Caolán McNamara (via logerrit)
 sw/source/ui/table/tabledlg.cxx|   14 ++
 sw/source/uibase/inc/prcntfld.hxx  |2 ++
 sw/source/uibase/table/tablepg.hxx |7 +++
 3 files changed, 23 insertions(+)

New commits:
commit e385eed90f797fc915a74f51d7f8c846b80e20fa
Author: Caolán McNamara 
AuthorDate: Wed Aug 5 14:59:23 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 21:43:54 2020 +0200

tdf#134914 reset table width/left/right range to initial conditions

so the reset buttons can restore back to the dialogs starting position

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

diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index c56168448f6d..9e2259e6ad65 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -91,6 +91,10 @@ SwFormatTablePage::SwFormatTablePage(weld::Container* pPage, 
weld::DialogControl
 , m_xTextDirectionLB(new 
svx::FrameDirectionListBox(m_xBuilder->weld_combo_box("textdirection")))
 , m_xProperties(m_xBuilder->weld_widget("properties"))
 {
+m_xWidthMF->GetMetricFieldRange(m_nOrigWidthMin, m_nOrigWidthMax);
+m_xLeftMF->GetMetricFieldRange(m_nOrigLeftMin, m_nOrigLeftMax);
+m_xRightMF->GetMetricFieldRange(m_nOrigRightMin, m_nOrigRightMax);
+
 //lock these to initial sizes so they don't change on percent to non 
percent change
 Size aPrefSize(m_xLeftMF->get()->get_preferred_size());
 m_xLeftMF->get()->set_size_request(aPrefSize.Width(), aPrefSize.Height());
@@ -439,6 +443,16 @@ void  SwFormatTablePage::Reset( const SfxItemSet* )
 m_xBottomMF->hide();
 m_xFreeBtn->set_sensitive(false);
 }
+
+// set back to original state
+m_xRelWidthCB->set_active(false);
+m_xWidthMF->ShowPercent(false);
+m_xLeftMF->ShowPercent(false);
+m_xRightMF->ShowPercent(false);
+m_xWidthMF->SetMetricFieldRange(m_nOrigWidthMin, m_nOrigWidthMax);
+m_xLeftMF->SetMetricFieldRange(m_nOrigLeftMin, m_nOrigLeftMax);
+m_xRightMF->SetMetricFieldRange(m_nOrigRightMin, m_nOrigRightMax);
+
 FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
 m_xWidthMF->SetMetric(aMetric);
 m_xRightMF->SetMetric(aMetric);
diff --git a/sw/source/uibase/inc/prcntfld.hxx 
b/sw/source/uibase/inc/prcntfld.hxx
index f9e682c5194c..bd39d2841b96 100644
--- a/sw/source/uibase/inc/prcntfld.hxx
+++ b/sw/source/uibase/inc/prcntfld.hxx
@@ -57,6 +57,8 @@ public:
 void set_accessible_name(const OUString& rStr) { 
m_pField->set_accessible_name(rStr); }
 void SetMetricFieldMin(int nNewMin) { m_pField->set_min(nNewMin, 
FieldUnit::NONE); }
 void SetMetricFieldMax(int nNewMax) { m_pField->set_max(nNewMax, 
FieldUnit::NONE); }
+void SetMetricFieldRange(int nNewMin, int nNewMax) { 
m_pField->set_range(nNewMin, nNewMax, FieldUnit::NONE); }
+void GetMetricFieldRange(int &rOldMin, int& rOldMax) const { 
m_pField->get_range(rOldMin, rOldMax, FieldUnit::NONE); }
 
 void set_value(int nNewValue, FieldUnit eInUnit = FieldUnit::NONE);
 int get_value(FieldUnit eOutUnit = FieldUnit::NONE);
diff --git a/sw/source/uibase/table/tablepg.hxx 
b/sw/source/uibase/table/tablepg.hxx
index 438926aa1152..60e8938e6b39 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -61,6 +61,13 @@ class SwFormatTablePage : public SfxTabPage
 std::unique_ptr m_xTextDirectionLB;
 std::unique_ptr m_xProperties;
 
+int m_nOrigWidthMin;
+int m_nOrigWidthMax;
+int m_nOrigLeftMin;
+int m_nOrigLeftMax;
+int m_nOrigRightMin;
+int m_nOrigRightMax;
+
 voidInit();
 voidModifyHdl(const weld::MetricSpinButton& rEdit);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-08-05 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5ef26933bd6a289d0f8f04a21cc14556b7aca6e2
Author: Olivier Hallot 
AuthorDate: Wed Aug 5 18:09:10 2020 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Aug 5 23:09:10 2020 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to f324a6477a634a9e4cb95b3dadf94f57c3020dc8
  - Housekeeping of Simpress Help pages

Change-Id: I3408ccc17242f41e9d6c82871a344f7c53ecab5b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/100138
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 92d4f32170e6..f324a6477a63 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 92d4f32170e6d3a1b65857bb83e22c4bf7f565bd
+Subproject commit f324a6477a634a9e4cb95b3dadf94f57c3020dc8
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Olivier Hallot (via logerrit)
 source/text/shared/01/05210600.xhp |   29 -
 source/text/shared/02/0123.xhp |6 +++---
 source/text/shared/02/0502.xhp |8 
 source/text/simpress/main0202.xhp  |   15 +--
 4 files changed, 24 insertions(+), 34 deletions(-)

New commits:
commit f324a6477a634a9e4cb95b3dadf94f57c3020dc8
Author: Olivier Hallot 
AuthorDate: Tue Aug 4 16:20:49 2020 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 5 23:09:10 2020 +0200

Housekeeping of Simpress Help pages

Change-Id: I3408ccc17242f41e9d6c82871a344f7c53ecab5b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/100138
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/05210600.xhp 
b/source/text/shared/01/05210600.xhp
index c82fedb75..0a0c4fb68 100644
--- a/source/text/shared/01/05210600.xhp
+++ b/source/text/shared/01/05210600.xhp
@@ -1,6 +1,4 @@
 
-
-
 
-
-
-
 
 
 
@@ -38,42 +33,42 @@
 
 
 
-Shadow
+Shadow
 Add a shadow to the selected drawing 
object, and define the properties of the shadow.
 
 
   
 
-Properties
+Properties
 Set the 
properties of the shadow that you want to apply.
 
-Use 
shadow
+Use shadow
 Adds a shadow to the selected 
drawing object.
 
-Position
+Position
 Click where you want to cast the 
shadow.
 
-Distance
+Distance
 Enter the distance that you want 
the shadow to be offset from the selected object.
 
-Color
+Color
 Select a color for the 
shadow.
 
-Transparency
+Transparency
 Enter a percentage from 0% 
(opaque) to 100% (transparent) to specify the transparency of the 
shadow.
 
 
+
 
-Shadow
+Shadow
 Adds a shadow to the selected object. If the object 
already has a shadow, the shadow is removed. If you click this icon when no 
object is selected, the shadow is added to the next object that you 
draw.
 
 
-
+
 
-Icon
-   
+Icon Add 
Shadow
 
-
+
 Shadow
 
 
diff --git a/source/text/shared/02/0123.xhp 
b/source/text/shared/02/0123.xhp
index 705e46533..a61d21a1b 100644
--- a/source/text/shared/02/0123.xhp
+++ b/source/text/shared/02/0123.xhp
@@ -41,10 +41,10 @@
 
 
   
-
-  Icon
+
+  Icon 
Styles
 
-
+
   Styles
 
   
diff --git a/source/text/shared/02/0502.xhp 
b/source/text/shared/02/0502.xhp
index 8761ecef1..8a2830a9c 100644
--- a/source/text/shared/02/0502.xhp
+++ b/source/text/shared/02/0502.xhp
@@ -30,17 +30,17 @@
 
 
 
-Arrow 
Style
+Arrow Style
 Opens the Arrowheads toolbar. Use the 
symbols shown to define the style for the end of the selected 
line.
 
 The 
Arrow Style icon is only displayed when you create a drawing with 
the drawing functions. For more information, see the Line 
Styles section of the Help.
 
 
   
-
-  Icon
+
+  Icon Line Ends
 
-
+
   Arrow 
Style
 
   
diff --git a/source/text/simpress/main0202.xhp 
b/source/text/simpress/main0202.xhp
index e756c0bf5..a472c04b4 100644
--- a/source/text/simpress/main0202.xhp
+++ b/source/text/simpress/main0202.xhp
@@ -1,6 +1,4 @@
 
-
-
 
-
-   
 
 
 
@@ -32,7 +28,7 @@
 
 
 
-Line and Filling 
Bar
+Line and Filling Bar
 The Line and Filling Bar contains commands and options that you can 
apply in the current view.
 
 
@@ -41,21 +37,20 @@
 
 
 
-Line 
Style
+Line Style
 
 
-Line 
Width
+Line Width
 
 
-Line 
Color
+Line Color
 
 
 
 
-Area Style / 
Filling
+Area Style / Filling
 
 
-Shadow
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Alain Romedenne (via logerrit)
 source/auxiliary/shared.tree |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c662efdb61d7f5b2cb0a000679761de16598c3d1
Author: Alain Romedenne 
AuthorDate: Wed Aug 5 16:42:37 2020 +0200
Commit: Olivier Hallot 
CommitDate: Wed Aug 5 23:09:49 2020 +0200

tdf134377 Missing topic in TOC

May be better placed in "Load, Save, Import, Export, PDF"

Change-Id: I3991187de5225b421d4354ca6b15d2c70d943da4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/100068
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/auxiliary/shared.tree b/source/auxiliary/shared.tree
index 831b1d9b2..3e0efb2e6 100644
--- a/source/auxiliary/shared.tree
+++ b/source/auxiliary/shared.tree
@@ -192,6 +192,7 @@
 Inserting Protected 
Spaces, Hyphens and Conditional Separators
 Inserting Special 
Characters
 Inserting and Editing Tab 
Stops
+Opening and Saving 
files on remote servers
 Protecting Content in 
%PRODUCTNAME
 Protecting 
Records
 Selecting the Maximum 
Printable Area on a Page
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 363cd49e09c4ad0077fcaa79ed4b405f917589f7
Author: Alain Romedenne 
AuthorDate: Wed Aug 5 23:09:49 2020 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 5 23:09:49 2020 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to c662efdb61d7f5b2cb0a000679761de16598c3d1
  - tdf134377 Missing topic in TOC

May be better placed in "Load, Save, Import, Export, PDF"

Change-Id: I3991187de5225b421d4354ca6b15d2c70d943da4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/100068
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index f324a6477a63..c662efdb61d7 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f324a6477a634a9e4cb95b3dadf94f57c3020dc8
+Subproject commit c662efdb61d7f5b2cb0a000679761de16598c3d1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Olivier Hallot (via logerrit)
 source/text/sdraw/01/insert_layer.xhp |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

New commits:
commit a1824ce0190204ae90939c6886e2056e3afb85aa
Author: Olivier Hallot 
AuthorDate: Fri Jul 31 19:45:39 2020 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 5 23:10:59 2020 +0200

tdf#135298 Update insert layer page

Change-Id: I92b7d429265f5fccc1b22908b43e2cd9b6c0a287
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/99948
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/sdraw/01/insert_layer.xhp 
b/source/text/sdraw/01/insert_layer.xhp
index 6b0f9a1e2..3733b7477 100644
--- a/source/text/sdraw/01/insert_layer.xhp
+++ b/source/text/sdraw/01/insert_layer.xhp
@@ -1,7 +1,4 @@
 
-
-
-
 
-
 
 
 
@@ -31,22 +27,29 @@
 
 
 
-Insert 
Layer
+Insert Layer
 Inserts a new layer in the 
document. Layers are only available in Draw, not in Impress. 
 
 
   
 
-To select a layer, 
click the corresponding tab at the bottom of the workspace.
-Name
+To select a layer, click the corresponding tab at the 
bottom of the workspace.
+
+Name
 Enter a name for the new 
layer.
-Properties
+
+Title
+Enter the title of the 
layer.
+
+Description
+Enter a description of the 
layer.
+Properties
 Set the 
properties for the new layer.
-Visible
+Visible
 Show or hide the 
layer.
-Printable
+Printable
 When printing, print or ignore 
this particular layer.
-Locked
+Locked
 Prevent elements on the layer from 
being edited.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-08-05 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 43ee0fc3ab9c049fd7ce95ee05b1348484343974
Author: Olivier Hallot 
AuthorDate: Wed Aug 5 18:10:59 2020 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Aug 5 23:10:59 2020 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to a1824ce0190204ae90939c6886e2056e3afb85aa
  - tdf#135298 Update insert layer page

Change-Id: I92b7d429265f5fccc1b22908b43e2cd9b6c0a287
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/99948
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index c662efdb61d7..a1824ce01902 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c662efdb61d7f5b2cb0a000679761de16598c3d1
+Subproject commit a1824ce0190204ae90939c6886e2056e3afb85aa
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Serge Krot (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx  |5 +++--
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx  |3 ++-
 writerfilter/source/dmapper/SdtHelper.cxx  |9 +
 4 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 89b6b2dbb728abea2186ff1ae158c0adb67d05be
Author: Serge Krot 
AuthorDate: Mon Jul 20 15:15:47 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 5 23:21:15 2020 +0200

tdf#134572 DOCX: Incorrect default value in dropdown text fields

Change-Id: I3169e817c2f033d1525adc3b02ac3680ad220d70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99074
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index b0cce67a1b9c..ac2ca0c7d1f3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -1058,7 +1058,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx")
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
 
 uno::Sequence aItems = getProperty< uno::Sequence 
>(aField, "Items");
-CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aItems.getLength());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aItems.getLength());
 }
 }
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 953a2434ba3f..80c9821cf0f6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -744,9 +744,10 @@ void Test::verifyComboBoxExport(bool aComboBoxAsDropDown)
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
 
 uno::Sequence aItems = getProperty< uno::Sequence 
>(aField, "Items");
-CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aItems.getLength());
 CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]);
 CPPUNIT_ASSERT_EQUAL(OUString("pepito"), aItems[1]);
+CPPUNIT_ASSERT_EQUAL(OUString("Manolo"), aItems[2]);
 }
 else
 {
@@ -770,7 +771,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testComboBoxControl, 
"combobox-control.docx"
 xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]", "value", 
"manolo");
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]", "value", 
"pepito");
-assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "manolo");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "Manolo");
 
 // check imported control
 verifyComboBoxExport(getShapes() == 0);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index c592eb7dec07..a5e11ec83484 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -958,9 +958,10 @@ DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx")
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
 
 uno::Sequence aItems = getProperty< uno::Sequence 
>(aField, "Items");
-CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aItems.getLength());
 CPPUNIT_ASSERT_EQUAL(OUString("Yes"), aItems[0]);
 CPPUNIT_ASSERT_EQUAL(OUString("No"), aItems[1]);
+CPPUNIT_ASSERT_EQUAL(OUString("dropdown default text"), aItems[2]);
 }
 }
 
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx 
b/writerfilter/source/dmapper/SdtHelper.cxx
index dff106acee13..dd3b7c755ac6 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -90,6 +90,15 @@ void SdtHelper::createDropDownControl()
 
m_rDM_Impl.GetTextFactory()->createInstance("com.sun.star.text.TextField.DropDown"),
 uno::UNO_QUERY);
 
+const auto it = std::find_if(
+m_aDropDownItems.begin(), m_aDropDownItems.end(),
+[aDefaultText](const OUString& item) -> bool { return 
!item.compareTo(aDefaultText); });
+
+if (m_aDropDownItems.end() == it)
+{
+m_aDropDownItems.push_back(aDefaultText);
+}
+
 // set properties
 uno::Reference xPropertySet(xControlModel, 
uno::UNO_QUERY);
 xPropertySet->setPropertyValue("SelectedItem", 
uno::makeAny(aDefaultText));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/pom.juh.xml jurt/pom.jurt.xml ridljar/pom.ridl.xml unoil/pom.unoil.xml

2020-08-05 Thread Rene Engelhard (via logerrit)
 javaunohelper/pom.juh.xml |   10 ++
 jurt/pom.jurt.xml |   10 ++
 ridljar/pom.ridl.xml  |   10 ++
 unoil/pom.unoil.xml   |   10 ++
 4 files changed, 40 insertions(+)

New commits:
commit c6cec621aa19ff09b82044f91228c4a08df6bbb7
Author: Rene Engelhard 
AuthorDate: Thu Jul 16 21:06:03 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 5 23:23:22 2020 +0200

add dependency to juh,jurt,ridl,unoil poms

They are dummies now and empty (except Class-Path:). Thus maven should pull
in libreoffice.jar, too

Change-Id: I63753deddceef6480fd4f5122b4892b707a9dd20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98929
Tested-by: Jenkins
Reviewed-by: David Ostrovsky 

diff --git a/javaunohelper/pom.juh.xml b/javaunohelper/pom.juh.xml
index 6bf4cd98bb86..8bfcbab80eb3 100644
--- a/javaunohelper/pom.juh.xml
+++ b/javaunohelper/pom.juh.xml
@@ -8,6 +8,16 @@
   Java UNO helper
   https://www.libreoffice.org
 
+  
+
+  
+org.libreoffice
+libreoffice
+@version@
+  
+
+  
+
   
 
   Mozilla Public License, Version 2.0
diff --git a/jurt/pom.jurt.xml b/jurt/pom.jurt.xml
index 881153959244..4db9ff575714 100644
--- a/jurt/pom.jurt.xml
+++ b/jurt/pom.jurt.xml
@@ -8,6 +8,16 @@
   Java Uno Runtime
   https://www.libreoffice.org
 
+  
+
+  
+org.libreoffice
+libreoffice
+@version@
+  
+
+  
+
   
 
   Mozilla Public License, Version 2.0
diff --git a/ridljar/pom.ridl.xml b/ridljar/pom.ridl.xml
index 9a90d30e6c9a..9990dd45e23c 100644
--- a/ridljar/pom.ridl.xml
+++ b/ridljar/pom.ridl.xml
@@ -8,6 +8,16 @@
   Types for the Java Uno typesystem
   https://www.libreoffice.org
 
+  
+
+  
+org.libreoffice
+libreoffice
+@version@
+  
+
+  
+
   
 
   Mozilla Public License, Version 2.0
diff --git a/unoil/pom.unoil.xml b/unoil/pom.unoil.xml
index 819b704980c0..9991ed572d85 100644
--- a/unoil/pom.unoil.xml
+++ b/unoil/pom.unoil.xml
@@ -8,6 +8,16 @@
   Maps IDL into java classes definitions
   https://www.libreoffice.org
 
+  
+
+  
+org.libreoffice
+libreoffice
+@version@
+  
+
+  
+
   
 
   Mozilla Public License, Version 2.0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/CppunitTest_sw_ooxmlexport4.mk sw/qa

2020-08-05 Thread Thorsten Behrens (via logerrit)
 sw/CppunitTest_sw_ooxmlexport4.mk |4 +
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |   86 ++
 2 files changed, 68 insertions(+), 22 deletions(-)

New commits:
commit 0c9a3fd2cf6e87e08d93f47f2d0987a57a8720c9
Author: Thorsten Behrens 
AuthorDate: Wed Jul 22 10:44:46 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 5 23:25:25 2020 +0200

tdf#134043 DOCX import: new unit tests: ComboBox to DropDown

Change-Id: I034b0cd9c6f66c531460d1bb69d9ede5ff46f7d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97531
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/4

diff --git a/sw/CppunitTest_sw_ooxmlexport4.mk 
b/sw/CppunitTest_sw_ooxmlexport4.mk
index e3285932e004..0f026bc8384e 100644
--- a/sw/CppunitTest_sw_ooxmlexport4.mk
+++ b/sw/CppunitTest_sw_ooxmlexport4.mk
@@ -11,4 +11,8 @@
 
 $(eval $(call sw_ooxmlexport_test,4))
 
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_ooxmlexport4,\
+officecfg/registry \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 9d3ce8cd9292..22d069a90864 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -23,6 +23,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+
 
 class Test : public SwModelTestBase
 {
@@ -43,6 +46,19 @@ protected:
 // If the testcase is stored in some other format, it's pointless to 
test.
 return (OString(filename).endsWith(".docx") && 
std::find(vBlacklist.begin(), vBlacklist.end(), filename) == vBlacklist.end());
 }
+
+virtual std::unique_ptr preTest(const char* filename) override
+{
+if (OString(filename) == "combobox-control.docx" )
+{
+std::shared_ptr< comphelper::ConfigurationChanges > 
batch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Writer::Filter::Import::DOCX::ImportComboBoxAsDropDown::set(true,
 batch);
+batch->commit();
+}
+return nullptr;
+}
+
+void verifyComboBoxExport(bool aComboBoxAsDropDown);
 };
 
 DECLARE_OOXMLEXPORT_TEST(testRelorientation, "relorientation.docx")
@@ -711,27 +727,9 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76312, 
"FDO76312.docx")
 assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]");
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testComboBoxControl, 
"combobox-control.docx")
+void Test::verifyComboBoxExport(bool aComboBoxAsDropDown)
 {
-// check XML
-xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
-assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]", "value", 
"manolo");
-assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]", "value", 
"pepito");
-assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "manolo");
-
-// check imported control
-if (getShapes() > 0)
-{
-uno::Reference xControl(getShape(1), 
uno::UNO_QUERY);
-
-CPPUNIT_ASSERT_EQUAL(OUString("Manolo"), 
getProperty(xControl->getControl(), "Text"));
-
-uno::Sequence aItems = getProperty< uno::Sequence 
>(xControl->getControl(), "StringItemList");
-CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength());
-CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]);
-CPPUNIT_ASSERT_EQUAL(OUString("pepito"), aItems[1]);
-}
-else
+if (aComboBoxAsDropDown)
 {
 // ComboBox was imported as DropDown text field
 uno::Reference 
xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
@@ -742,13 +740,57 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testComboBoxControl, 
"combobox-control.docx"
 uno::Reference xServiceInfo(aField, 
uno::UNO_QUERY);
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
 
-CPPUNIT_ASSERT_EQUAL(OUString("manolo"), getProperty(aField, 
"SelectedItem"));
-
 uno::Sequence aItems = getProperty< uno::Sequence 
>(aField, "Items");
 CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength());
 CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]);
 CPPUNIT_ASSERT_EQUAL(OUString("pepito"), aItems[1]);
 }
+else
+{
+uno::Reference 
xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xControl(xShape, 
uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(OUString("Manolo"), 
getProperty(xControl->getControl(), "Text"));
+
+uno::Sequence aItems = getProperty< uno::Sequence 
>(xControl->getControl(), "StringItemList");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength());
+CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]);
+   

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

2020-08-05 Thread Mike Kaganski (via logerrit)
 sc/source/ui/view/prevwsh.cxx |   19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 21184becd97392e142f61225cc7d45daa6cbe97b
Author: Mike Kaganski 
AuthorDate: Sat Jul 25 18:55:18 2020 +0300
Commit: Thorsten Behrens 
CommitDate: Wed Aug 5 23:26:12 2020 +0200

tdf#130559: don't fail creation of preview when BackingComp can't add...

an event listener. This crashes when loading a document with print preview
set as active view.

Regression after commit 128ecffe53394c1f045521c2efb42ea03a319f4b.

Change-Id: I5dc421f7c08dd70d51772fac5432f33cd9a1491a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99442
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit e3b695f6a1525ac6b32abd27a6368a7e8b7d09fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99740
Reviewed-by: Caolán McNamara 
(cherry picked from commit a9457b3c18f6030b19d8cb1aada3709649a05460)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99747
Reviewed-by: Michael Stahl 
(cherry picked from commit 810b9dabc0b91629b0aadadb999b396a7879b385)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99923
Reviewed-by: Xisco Fauli 
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index fe3688abdd43..54187748819f 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -153,10 +153,21 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
 {
 Construct( &pViewFrame->GetWindow() );
 
-SfxShell::SetContextBroadcasterEnabled(true);
-
SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Printpreview));
-SfxShell::BroadcastContextForActivation(true);
-
+try
+{
+SfxShell::SetContextBroadcasterEnabled(true);
+SfxShell::SetContextName(
+
vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Printpreview));
+SfxShell::BroadcastContextForActivation(true);
+}
+catch (const css::uno::RuntimeException& e)
+{
+// tdf#130559: allow BackingComp to fail adding listener when opening 
document
+css::uno::Reference xServiceInfo(e.Context, 
css::uno::UNO_QUERY);
+if (!xServiceInfo || 
!xServiceInfo->supportsService("com.sun.star.frame.StartModule"))
+throw;
+SAL_WARN("sc.ui", "Opening file from StartModule straight into print 
preview");
+}
 
 auto& pNotebookBar = 
pViewFrame->GetWindow().GetSystemWindow()->GetNotebookBar();
 if (pNotebookBar)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: slideshow/Library_slideshow.mk slideshow/source

2020-08-05 Thread Sarper Akdemir (via logerrit)
 slideshow/Library_slideshow.mk |2 
 slideshow/source/engine/box2dtools.cxx |  465 +
 slideshow/source/inc/box2dtools.hxx|  317 ++
 3 files changed, 784 insertions(+)

New commits:
commit 49cdda7c4fcf401f6f8435f7830786fcf3b2450e
Author: Sarper Akdemir 
AuthorDate: Fri Jun 5 20:23:21 2020 +0300
Commit: Thorsten Behrens 
CommitDate: Wed Aug 5 23:30:45 2020 +0200

box2d tools: initial work for physics based animation effects

Two new classes for managing box2d bodies(b2Body) and box2d worlds(b2World)

::box2d::utils::Box2DBody :
Manages box2d bodies (b2Body)

::box2d::utils::Box2DWorld :
Manages box2d world (b2World)

Change-Id: Id02fefe937347029daddde043da2b8e8dba3acaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95614
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index 55c531a86f43..53324ea25dcc 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -24,6 +24,7 @@ $(eval $(call 
gb_Library_set_precompiled_header,slideshow,slideshow/inc/pch/prec
 
 $(eval $(call gb_Library_use_externals,slideshow,\
boost_headers \
+   box2d \
 ))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Library_use_externals,slideshow,\
@@ -84,6 +85,7 @@ $(eval $(call gb_Library_add_exception_objects,slideshow,\
 slideshow/source/engine/animationnodes/propertyanimationnode \
 slideshow/source/engine/animationnodes/sequentialtimecontainer \
 slideshow/source/engine/attributemap \
+slideshow/source/engine/box2dtools \
 slideshow/source/engine/color \
 slideshow/source/engine/delayevent \
 slideshow/source/engine/effectrewinder \
diff --git a/slideshow/source/engine/box2dtools.cxx 
b/slideshow/source/engine/box2dtools.cxx
new file mode 100644
index ..8729300184f6
--- /dev/null
+++ b/slideshow/source/engine/box2dtools.cxx
@@ -0,0 +1,465 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+
+#define BOX2D_SLIDE_SIZE_IN_METERS 100.00f
+
+namespace box2d::utils
+{
+namespace
+{
+double calculateScaleFactor(const ::basegfx::B2DVector& rSlideSize)
+{
+double fWidth = rSlideSize.getX();
+double fHeight = rSlideSize.getY();
+
+if (fWidth > fHeight)
+return BOX2D_SLIDE_SIZE_IN_METERS / fWidth;
+else
+return BOX2D_SLIDE_SIZE_IN_METERS / fHeight;
+}
+
+b2BodyType getBox2DInternalBodyType(const box2DBodyType eType)
+{
+switch (eType)
+{
+default:
+case BOX2D_STATIC_BODY:
+return b2_staticBody;
+case BOX2D_KINEMATIC_BODY:
+return b2_kinematicBody;
+case BOX2D_DYNAMIC_BODY:
+return b2_dynamicBody;
+}
+}
+
+box2DBodyType getBox2DLOBodyType(const b2BodyType eType)
+{
+switch (eType)
+{
+default:
+case b2_staticBody:
+return BOX2D_STATIC_BODY;
+case b2_kinematicBody:
+return BOX2D_KINEMATIC_BODY;
+case b2_dynamicBody:
+return BOX2D_DYNAMIC_BODY;
+}
+}
+
+b2Vec2 convertB2DPointToBox2DVec2(const basegfx::B2DPoint& aPoint, const 
double fScaleFactor)
+{
+return { static_cast(aPoint.getX() * fScaleFactor),
+ static_cast(aPoint.getY() * -fScaleFactor) };
+}
+}
+
+box2DWorld::box2DWorld(const ::basegfx::B2DVector& rSlideSize)
+: mpBox2DWorld()
+, mfScaleFactor(calculateScaleFactor(rSlideSize))
+, mbShapesInitialized(false)
+, mbHasWorldStepper(false)
+, mpXShapeToBodyMap()
+, maShapeUpdateQueue()
+{
+}
+
+box2DWorld::~box2DWorld() = default;
+
+bool box2DWorld::initiateWorld(const ::basegfx::B2DVector& rSlideSize)
+{
+if (!mpBox2DWorld)
+{
+mpBox2DWorld = std::make_unique(b2Vec2(0.0f, -30.0f));
+createStaticFrameAroundSlide(rSlideSize);
+return false;
+}
+else
+{
+return true;
+}
+}
+
+void box2DWorld::createStaticFrameAroundSlide(const ::basegfx::B2DVector& 
rSlideSize)
+{
+assert(mpBox2DWorld);
+
+float fWidth = static_cast(rSlideSize.getX() * mfScaleFactor);
+float fHeight = static_cast(rSlideSize.getY() * mfScaleFactor);
+
+// static body for creating the frame around the slide
+b2BodyDef aBodyDef;
+aBodyDef.type = b2_staticBody;
+aBodyDef.position.Set(0, 0);
+
+// not going to be stored anywhere, Box2DWorld will handle this body
+b2Body* pStaticBody = mpBox2DWorld->CreateBody(&aBodyDef);
+
+// create an edge loop that represents slide frame
+b2Vec2 aEdgePoints[4];
+aEdgePoints[0].Set(0

[Libreoffice-commits] core.git: slideshow/CppunitTest_slideshow.mk

2020-08-05 Thread Sarper Akdemir (via logerrit)
 slideshow/CppunitTest_slideshow.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit 060a069966183998095ea4d0213793fe91d3dba0
Author: Sarper Akdemir 
AuthorDate: Fri Jul 3 03:09:49 2020 +0300
Commit: Thorsten Behrens 
CommitDate: Wed Aug 5 23:31:18 2020 +0200

add box2d to CppunitTest_slideshow

Change-Id: I37c439eefba6337d95232361bffe9718b71ce8cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99040
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/slideshow/CppunitTest_slideshow.mk 
b/slideshow/CppunitTest_slideshow.mk
index ae17f66d8452..611be86bdf21 100644
--- a/slideshow/CppunitTest_slideshow.mk
+++ b/slideshow/CppunitTest_slideshow.mk
@@ -14,6 +14,10 @@ $(eval $(call gb_CppunitTest_set_include,slideshow,\
 -I$(SRCDIR)/slideshow/source/inc \
 ))
 
+$(eval $(call gb_CppunitTest_use_externals,slideshow,\
+   box2d \
+))
+
 $(eval $(call gb_CppunitTest_use_sdk_api,slideshow))
 
 $(eval $(call gb_CppunitTest_use_library_objects,slideshow,slideshow))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Julien Nabet (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit f615a3366e502884a15bbbf07c2fb1e70eb9dbfa
Author: Julien Nabet 
AuthorDate: Wed Aug 5 23:41:29 2020 +0200
Commit: Julien Nabet 
CommitDate: Wed Aug 5 23:43:16 2020 +0200

Revert "tdf#130863: autoredact, disable useless checkboxes for regex"

This reverts commit b53fbe19dfd39d27868d616afb4f743b1237229b.

See details here:
https://bugs.documentfoundation.org/show_bug.cgi?id=130863#c26

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

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 868fc73cc538..19d1923b21ac 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -695,18 +695,10 @@ IMPL_LINK_NOARG(SfxAddTargetDialog, SelectTypeHdl, 
weld::ComboBox&, void)
 m_xLabelContent->set_visible(true);
 m_xContent->set_sensitive(true);
 m_xContent->set_visible(true);
+m_xWholeWords->set_sensitive(true);
 m_xWholeWords->set_visible(true);
+m_xCaseSensitive->set_sensitive(true);
 m_xCaseSensitive->set_visible(true);
-if (m_xType->get_active_id() == "regex")
-{
-m_xWholeWords->set_sensitive(false);
-m_xCaseSensitive->set_sensitive(false);
-}
-else
-{
-m_xWholeWords->set_sensitive(true);
-m_xCaseSensitive->set_sensitive(true);
-}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-08-05 Thread Julien Nabet (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit e2ce8ae7b9f84d1862b3dd95e4d4e7b27a70b752
Author: Julien Nabet 
AuthorDate: Wed Aug 5 23:41:29 2020 +0200
Commit: Eike Rathke 
CommitDate: Thu Aug 6 00:42:55 2020 +0200

Revert "tdf#130863: autoredact, disable useless checkboxes for regex"

This reverts commit b53fbe19dfd39d27868d616afb4f743b1237229b.

See details here:
https://bugs.documentfoundation.org/show_bug.cgi?id=130863#c26

Change-Id: I431094784106c9aad2a11b37b5ea849ba924b60f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100191
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 
(cherry picked from commit f615a3366e502884a15bbbf07c2fb1e70eb9dbfa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100210
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 868fc73cc538..19d1923b21ac 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -695,18 +695,10 @@ IMPL_LINK_NOARG(SfxAddTargetDialog, SelectTypeHdl, 
weld::ComboBox&, void)
 m_xLabelContent->set_visible(true);
 m_xContent->set_sensitive(true);
 m_xContent->set_visible(true);
+m_xWholeWords->set_sensitive(true);
 m_xWholeWords->set_visible(true);
+m_xCaseSensitive->set_sensitive(true);
 m_xCaseSensitive->set_visible(true);
-if (m_xType->get_active_id() == "regex")
-{
-m_xWholeWords->set_sensitive(false);
-m_xCaseSensitive->set_sensitive(false);
-}
-else
-{
-m_xWholeWords->set_sensitive(true);
-m_xCaseSensitive->set_sensitive(true);
-}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Ahmed ElShreif (via logerrit)
 include/vcl/menubtn.hxx |5 ++
 include/vcl/uitest/uiobject.hxx |   23 
 uitest/writer_tests8/customizeDialog.py |   28 ++
 vcl/source/control/menubtn.cxx  |   12 ++
 vcl/source/uitest/uiobject.cxx  |   60 
 5 files changed, 128 insertions(+)

New commits:
commit 66ec91730d8b7b416ed6c5e8cf88658baafee91e
Author: Ahmed ElShreif 
AuthorDate: Tue Jul 28 05:20:47 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Thu Aug 6 03:06:33 2020 +0200

uitest : Add demo for gear button menu in Tools->Customize

Change-Id: I3f0596ad044560a424ca6786197c250bff2429bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99568
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/writer_tests8/customizeDialog.py 
b/uitest/writer_tests8/customizeDialog.py
index dfc6ae771e1b..5b6ab664346a 100644
--- a/uitest/writer_tests8/customizeDialog.py
+++ b/uitest/writer_tests8/customizeDialog.py
@@ -104,4 +104,32 @@ class ConfigureDialog(UITestCase):
 
 self.ui_test.close_doc()
 
+def test_gear_button_menu(self):
+self.ui_test.create_doc_in_start_center("writer")
+
+self.ui_test.execute_dialog_through_command(".uno:ConfigureDialog")
+def close_dialog(dlg):
+CancelBtn = dlg.getChild("cancel")
+self.ui_test.close_dialog_through_button(CancelBtn)
+
+# Open the New Menu Dialog with id = 0
+xDialog = self.xUITest.getTopFocusWindow()
+xmenugearbtn=xDialog.getChild("menugearbtn")
+def show_dialog0():
+xmenugearbtn.executeAction("OPENFROMLIST", 
mkPropertyValues({"POS": "0" }))
+self.ui_test.execute_blocking_action( action=show_dialog0, 
dialog_handler=close_dialog)
+
+# Open the Rename Menu Dialog with id = 2
+xDialog = self.xUITest.getTopFocusWindow()
+xmenugearbtn=xDialog.getChild("menugearbtn")
+def show_dialog2():
+xmenugearbtn.executeAction("OPENFROMLIST", 
mkPropertyValues({"POS": "2"}))
+self.ui_test.execute_blocking_action( action=show_dialog2, 
dialog_handler=close_dialog)
+
+xDialog = self.xUITest.getTopFocusWindow()
+xcancBtn = xDialog.getChild("cancel")
+self.ui_test.close_dialog_through_button(xcancBtn)
+
+self.ui_test.close_doc()
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
commit 8517c19410dde16b951d66a13d0ffa385f877d7a
Author: Ahmed ElShreif 
AuthorDate: Sat Jul 18 17:56:27 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Thu Aug 6 03:06:19 2020 +0200

uitest : Add support for Menu Button objects

This will help us test MenuButton like "gear button menu in 
Tools->Customize"

You can test this type of button by excuting this actions:
>>var_name.executeAction("OPENLIST", mkPropertyValues({}))
>>var_name.executeAction("CLOSELIST", mkPropertyValues({}))
>>var_name.executeAction("OPENFROMLIST", mkPropertyValues({"POS": 
"0" }))

Then you can check on it using this lines:
>>get_state_as_dict(var_name)["Label"]

Change-Id: I189759d9c32237a9a34ee82cfde9611eedff4f3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98996
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index 609d3d031aab..ea6916a48629 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -84,6 +84,11 @@ public:
 
 voidSetActivateHdl( const Link& rLink ) { 
maActivateHdl = rLink; }
 voidSetSelectHdl( const Link& rLink ) { 
maSelectHdl = rLink; }
+
+virtual FactoryFunction GetUITestFactory() const override;
+
+void SetCurItemId();
+
 };
 
 
diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index 1797c9156aba..c5b3f07dbe75 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -35,6 +35,7 @@ class SpinButton;
 class SpinField;
 class VerticalTabControl;
 class VclMultiLineEdit;
+class MenuButton;
 class ToolBox;
 
 typedef std::map StringMap;
@@ -504,6 +505,28 @@ private:
 virtual OUString get_name() const override;
 };
 
+class MenuButtonUIObject final : public WindowUIObject
+{
+VclPtr mxMenuButton;
+
+public:
+
+MenuButtonUIObject(const VclPtr& xMenuButton);
+virtual ~MenuButtonUIObject() override;
+
+virtual StringMap get_state() override;
+
+virtual void execute(const OUString& rAction,
+const StringMap& rParameters) override;
+
+static std::unique_ptr create(vcl::Window* pWindow);
+
+private:
+
+virtual OUString get_name() const override;
+};
+
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 7402d361f4b8..4acf4ffddc82 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -

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

2020-08-05 Thread Eike Rathke (via logerrit)
 svl/source/numbers/zforfind.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 1616b53292cdc22c04d07bb21e71bf43dcd22299
Author: Eike Rathke 
AuthorDate: Thu Aug 6 01:40:04 2020 +0200
Commit: Eike Rathke 
CommitDate: Thu Aug 6 03:19:08 2020 +0200

Resolves: tdf#135249 Duration input 0:123 or 0:0:123 or 0:123:59 is valid

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

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 75716dd57521..57a3f0233d45 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -989,6 +989,9 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
 SAL_WARN( "svl.numbers", "ImpSvNumberInputScan::GetTimeRef: bad number 
index");
 }
 
+// 0:123 or 0:0:123 or 0:123:59 is valid
+bool bAllowDuration = (nHour == 0 && !nAmPm);
+
 if (nAmPm && nHour > 12) // not a valid AM/PM clock time
 {
 bRet = false;
@@ -1009,16 +1012,18 @@ bool ImpSvNumberInputScan::GetTimeRef( double& 
fOutNumber,
 else if (nIndex - nStartIndex < nCnt)
 {
 nMinute = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
-if (!(eInputOptions & SvNumInputOptions::LAX_TIME)
+if (!(eInputOptions & SvNumInputOptions::LAX_TIME) && !bAllowDuration
 && nIndex > 1 && nMinute > 59)
-bRet = false;   // 1:60 or 1:123 is invalid, 123:1 is valid
+bRet = false;   // 1:60 or 1:123 is invalid, 123:1 or 0:123 is 
valid
+if (bAllowDuration)
+bAllowDuration = (nMinute == 0);
 }
 if (nIndex - nStartIndex < nCnt)
 {
 nSecond = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
-if (!(eInputOptions & SvNumInputOptions::LAX_TIME)
+if (!(eInputOptions & SvNumInputOptions::LAX_TIME) && !bAllowDuration
 && nIndex > 1 && nSecond > 59 && !(nHour == 23 && nMinute == 
59 && nSecond == 60))
-bRet = false;   // 1:60 or 1:123 or 1:1:123 is invalid, 123:1 or 
123:1:1 is valid, or leap second
+bRet = false;   // 1:60 or 1:123 or 1:1:123 is invalid, 123:1 or 
123:1:1 or 0:0:123 is valid, or leap second
 }
 if (nIndex - nStartIndex < nCnt)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - svl/source

2020-08-05 Thread Eike Rathke (via logerrit)
 svl/source/numbers/zforfind.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit bd33e2673b3d97a6f1d7ab16eb8f83faae09d980
Author: Eike Rathke 
AuthorDate: Thu Aug 6 01:40:04 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Aug 6 05:33:06 2020 +0200

Resolves: tdf#135249 Duration input 0:123 or 0:0:123 or 0:123:59 is valid

Change-Id: Ie624b324822495192edc65d046945eb92356550b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100192
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 1616b53292cdc22c04d07bb21e71bf43dcd22299)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100211
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 42ffbd325bac..0803604e553a 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -989,6 +989,9 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
 SAL_WARN( "svl.numbers", "ImpSvNumberInputScan::GetTimeRef: bad number 
index");
 }
 
+// 0:123 or 0:0:123 or 0:123:59 is valid
+bool bAllowDuration = (nHour == 0 && !nAmPm);
+
 if (nAmPm && nHour > 12) // not a valid AM/PM clock time
 {
 bRet = false;
@@ -1009,16 +1012,18 @@ bool ImpSvNumberInputScan::GetTimeRef( double& 
fOutNumber,
 else if (nIndex - nStartIndex < nCnt)
 {
 nMinute = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
-if (!(eInputOptions & SvNumInputOptions::LAX_TIME)
+if (!(eInputOptions & SvNumInputOptions::LAX_TIME) && !bAllowDuration
 && nIndex > 1 && nMinute > 59)
-bRet = false;   // 1:60 or 1:123 is invalid, 123:1 is valid
+bRet = false;   // 1:60 or 1:123 is invalid, 123:1 or 0:123 is 
valid
+if (bAllowDuration)
+bAllowDuration = (nMinute == 0);
 }
 if (nIndex - nStartIndex < nCnt)
 {
 nSecond = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
-if (!(eInputOptions & SvNumInputOptions::LAX_TIME)
+if (!(eInputOptions & SvNumInputOptions::LAX_TIME) && !bAllowDuration
 && nIndex > 1 && nSecond > 59 && !(nHour == 23 && nMinute == 
59 && nSecond == 60))
-bRet = false;   // 1:60 or 1:123 or 1:1:123 is invalid, 123:1 or 
123:1:1 is valid, or leap second
+bRet = false;   // 1:60 or 1:123 or 1:1:123 is invalid, 123:1 or 
123:1:1 or 0:0:123 is valid, or leap second
 }
 if (nIndex - nStartIndex < nCnt)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC "Extending the UITest framework" Week (9) Report

2020-08-05 Thread ahmed El-Shreif
Hello all,

here is my Week (9) report:
https://ahmedelshreifgsoc20.blogspot.com/2020/08/week-9-report.html

Sorry for sending the report late.

waiting for all your feedback.

Thanks,
Ahmed ElShreif
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

2020-08-05 Thread Tomaž Vajngerl (via logerrit)
 loleaflet/src/control/Control.ColumnHeader.js   |4 ++--
 loleaflet/src/control/Control.ContextMenu.js|2 +-
 loleaflet/src/control/Control.Header.js |2 +-
 loleaflet/src/control/Control.LokDialog.js  |2 +-
 loleaflet/src/control/Control.Menubar.js|   14 +++---
 loleaflet/src/control/Control.MobileTopBar.js   |2 +-
 loleaflet/src/control/Control.MobileWizard.js   |2 +-
 loleaflet/src/control/Control.NotebookbarBuilder.js |2 +-
 loleaflet/src/control/Control.PresentationBar.js|2 +-
 loleaflet/src/control/Control.RowHeader.js  |4 ++--
 loleaflet/src/control/Control.SearchBar.js  |4 ++--
 loleaflet/src/control/Control.Tabs.js   |2 +-
 loleaflet/src/control/Control.Toolbar.js|   12 ++--
 loleaflet/src/control/Parts.js  |2 +-
 loleaflet/src/control/Permission.js |   14 +++---
 loleaflet/src/control/Ruler.js  |4 ++--
 loleaflet/src/control/Toolbar.js|   12 ++--
 loleaflet/src/layer/marker/Annotation.js|2 +-
 loleaflet/src/layer/marker/TextInput.js |2 +-
 loleaflet/src/layer/tile/GridLayer.js   |2 +-
 loleaflet/src/layer/tile/TileLayer.TableOverlay.js  |2 +-
 loleaflet/src/layer/tile/TileLayer.js   |   18 +-
 loleaflet/src/map/Map.js|4 ++--
 loleaflet/src/map/handler/Map.Keyboard.js   |4 ++--
 loleaflet/src/map/handler/Map.Mouse.js  |2 +-
 loleaflet/src/map/handler/Map.TouchGesture.js   |4 ++--
 loleaflet/src/map/handler/Map.WOPI.js   |4 ++--
 27 files changed, 69 insertions(+), 61 deletions(-)

New commits:
commit 2f9b1bdc54a3e47bc1944cc50d89e4865287c8ec
Author: Tomaž Vajngerl 
AuthorDate: Sun Jul 12 12:44:09 2020 +0200
Commit: Pranam Lashkari 
CommitDate: Thu Aug 6 08:15:35 2020 +0200

Add functions for getting edit or readonly permission, refactor

Instead of always checking the map._permission value, use the
isPermissionReadOnly and isPermissionEdit functions. Refactor
the code to use those.

Change-Id: I77ccd278b98a9318344c9b80c17be7cda09f00f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98592
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100193
Reviewed-by: Pranam Lashkari 

diff --git a/loleaflet/src/control/Control.ColumnHeader.js 
b/loleaflet/src/control/Control.ColumnHeader.js
index 8c049fd93..a18b707bd 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -101,7 +101,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
var menuData = 
L.Control.JSDialogBuilder.getMenuStructureForMobileWizard(this._menuItem, true, 
'');
(new Hammer(this._canvas, {recognizers: 
[[Hammer.Press]]}))
.on('press', L.bind(function () {
-   if (this._map._permission === 'edit') {
+   if (this._map.isPermissionEdit()) {
window.contextMenuWizard = true;
this._map.fire('mobilewizard', 
menuData);
}
@@ -440,7 +440,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
this.mouseInit(canvas);
 
if ($('.spreadsheet-header-columns').length > 0) {
-   
$('.spreadsheet-header-columns').contextMenu(this._map._permission === 'edit');
+   
$('.spreadsheet-header-columns').contextMenu(this._map.isPermissionEdit());
}
},
 
diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index 82bd501c5..c4449340e 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -113,7 +113,7 @@ L.Control.ContextMenu = L.Control.extend({
 
_onContextMenu: function(obj) {
var map = this._map;
-   if (map._permission !== 'edit') {
+   if (!map.isPermissionEdit()) {
return;
}
 
diff --git a/loleaflet/src/control/Control.Header.js 
b/loleaflet/src/control/Control.Header.js
index 5aeac06da..0980c1f2b 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -266,7 +266,7 @@ L.Control.Header = L.Control.extend({
},
 
_onPan: function (event) {
-   if (event.pointerType !== 'touch' || this._map._permission !== 
'edit')
+   if (event.pointerType !== 'touch' || 
!this._map.isPermissionEdit())
return;
 
if (event.type

[Libreoffice-commits] online.git: loleaflet/css loleaflet/src scripts/unocommands.py

2020-08-05 Thread Szymon Kłos (via logerrit)
 loleaflet/css/notebookbar.css  |   25 -
 loleaflet/src/control/Control.NotebookbarWriter.js |  461 -
 loleaflet/src/layer/tile/TileLayer.js  |1 
 loleaflet/src/unocommands.js   |   11 
 scripts/unocommands.py |   20 
 5 files changed, 505 insertions(+), 13 deletions(-)

New commits:
commit 9dd57f8fe1355059156310af8eb0ac26b800c61e
Author: Szymon Kłos 
AuthorDate: Wed Aug 5 15:54:28 2020 +0200
Commit: Szymon Kłos 
CommitDate: Thu Aug 6 08:16:19 2020 +0200

notebookbar: customize Insert tab in Writer

Change-Id: I531854b4c7361fe5802a64016886feab5cda8979
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100177
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/css/notebookbar.css b/loleaflet/css/notebookbar.css
index 70805ca81..ef1aa46e1 100644
--- a/loleaflet/css/notebookbar.css
+++ b/loleaflet/css/notebookbar.css
@@ -190,7 +190,9 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, 
#SendToBack.notebookb
 }
 
 /* avoid bug with arrow in new line when window is small */
-#LineSpacing.notebookbar, #InsertGraphic.notebookbar, 
#BasicShapes.notebookbar, #InsertTable.notebookbar {
+#LineSpacing.notebookbar,
+#table-Home-Section-Insert #table-LineB9 #InsertGraphic.notebookbar,
+#table-Home-Section-Insert #table-GroupB20 #InsertTable.notebookbar {
width: 50px;
 }
 
@@ -397,13 +399,20 @@ div[id*='Row'].notebookbar, 
div[id*='Column'].notebookbar, #SendToBack.notebookb
 /* Insert Tab */
 
 #InsertReferenceField.notebookbar,
-#InsertSection.notebookbar,
-#table-Insert {
+#InsertSection.notebookbar {
margin-top: 5px;
 }
 
-#table-shapes6 #BasicShapes.notebookbar {
-   margin-top: 10px;
+#table-Insert {
+   margin-top: 15px;
+}
+
+#table-Insert #InsertTable.notebookbar {
+   width: 130px;
+}
+
+#table-Insert #BasicShapes.notebookbar {
+   width: 170px;
 }
 
 #table-Insert-Section-Pagebreak #InsertPagebreak.notebookbar img,
@@ -412,8 +421,6 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, 
#SendToBack.notebookb
 #table-Insert-Section-Image #InsertGraphic.notebookbar img,
 #HyperlinkDialog.notebookbar img,
 #InsertFieldCtrl.notebookbar img,
-#DrawText.notebookbar img,
-#VerticalText.notebookbar img,
 #BasicShapes.notebookbar img,
 #table-Insert-Section-Symbol #CharmapControl.notebookbar img
 {
@@ -464,8 +471,8 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, 
#SendToBack.notebookb
 }
 
 #InsertMultiIndex.notebookbar img,
-#InsertFootnote.notebookbar img,
-#InsertReferenceField.notebookbar img,
+#table-Reference-Section-Reference #InsertFootnote.notebookbar img,
+#table-Reference-Section-Reference #InsertReferenceField.notebookbar img,
 #InsertAuthoritiesEntry.notebookbar img,
 #UpdateAll.notebookbar img
 {
diff --git a/loleaflet/src/control/Control.NotebookbarWriter.js 
b/loleaflet/src/control/Control.NotebookbarWriter.js
index 4bd748a97..eb3002beb 100644
--- a/loleaflet/src/control/Control.NotebookbarWriter.js
+++ b/loleaflet/src/control/Control.NotebookbarWriter.js
@@ -21,8 +21,8 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
},
{
'text': _('~Insert'),
-   'id': '3',
-   'name': 'InsertLabel'
+   'id': '-4',
+   'name': 'Insert'
},
{
'text': _('~Layout'),
@@ -77,6 +77,10 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
case 'Format':
this.loadTab(this.getFormatTab());
break;
+
+   case 'Insert':
+   this.loadTab(this.getInsertTab());
+   break;
}
},
 
@@ -2076,6 +2080,459 @@ L.Control.NotebookbarWriter = 
L.Control.Notebookbar.extend({
}
]
};
+   },
+
+   getInsertTab: function() {
+   return {
+   'id': '',
+   'type': 'control',
+   'text': '',
+   'enabled': 'true',
+   'children': [
+   {
+   'id': '',
+   'type': 'container',
+   'text': '',
+   'enabled': 'true',
+   'children': [
+   {
+   'id': 'NotebookBar',
+   'type': 'grid',
+

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

2020-08-05 Thread Noel Grandin (via logerrit)
 tools/source/generic/config.cxx |  140 +++---
 tools/source/generic/poly.cxx   |  182 
 tools/source/generic/poly2.cxx  |   74 
 tools/source/stream/vcompat.cxx |   28 +++---
 4 files changed, 212 insertions(+), 212 deletions(-)

New commits:
commit 987c96d8a976338dcb8b5b8c4d1258b8fddb0093
Author: Noel Grandin 
AuthorDate: Wed Aug 5 20:31:06 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 6 08:39:29 2020 +0200

loplugin:flatten in tools

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

diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 6808bc4a132a..0f2e13acea21 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -667,31 +667,31 @@ void Config::DeleteGroup(const OString& rGroup)
 pGroup = pGroup->mpNext;
 }
 
-if ( pGroup )
+if ( !pGroup )
+return;
+
+// Remove all keys
+ImplKeyData* pTempKey;
+ImplKeyData* pKey = pGroup->mpFirstKey;
+while ( pKey )
 {
-// Remove all keys
-ImplKeyData* pTempKey;
-ImplKeyData* pKey = pGroup->mpFirstKey;
-while ( pKey )
-{
-pTempKey = pKey->mpNext;
-delete pKey;
-pKey = pTempKey;
-}
+pTempKey = pKey->mpNext;
+delete pKey;
+pKey = pTempKey;
+}
 
-// Rewire pointers and remove group
-if ( pPrevGroup )
-pPrevGroup->mpNext = pGroup->mpNext;
-else
-mpData->mpFirstGroup = pGroup->mpNext;
-delete pGroup;
+// Rewire pointers and remove group
+if ( pPrevGroup )
+pPrevGroup->mpNext = pGroup->mpNext;
+else
+mpData->mpFirstGroup = pGroup->mpNext;
+delete pGroup;
 
-// Rewrite config data
-mpData->mbModified = true;
+// Rewrite config data
+mpData->mbModified = true;
 
-mnDataUpdateId = mpData->mnDataUpdateId;
-mpData->mnDataUpdateId++;
-}
+mnDataUpdateId = mpData->mnDataUpdateId;
+mpData->mnDataUpdateId++;
 }
 
 OString Config::GetGroupName(sal_uInt16 nGroup) const
@@ -787,41 +787,41 @@ void Config::WriteKey(const OString& rKey, const OString& 
rStr)
 
 // Search key and update value if found
 ImplGroupData* pGroup = ImplGetGroup();
-if ( pGroup )
+if ( !pGroup )
+return;
+
+ImplKeyData* pPrevKey = nullptr;
+ImplKeyData* pKey = pGroup->mpFirstKey;
+while ( pKey )
 {
-ImplKeyData* pPrevKey = nullptr;
-ImplKeyData* pKey = pGroup->mpFirstKey;
-while ( pKey )
-{
-if ( !pKey->mbIsComment && pKey->maKey.equalsIgnoreAsciiCase(rKey) 
)
-break;
+if ( !pKey->mbIsComment && pKey->maKey.equalsIgnoreAsciiCase(rKey) )
+break;
 
-pPrevKey = pKey;
-pKey = pKey->mpNext;
-}
+pPrevKey = pKey;
+pKey = pKey->mpNext;
+}
 
-bool bNewValue;
-if ( !pKey )
-{
-pKey  = new ImplKeyData;
-pKey->mpNext  = nullptr;
-pKey->maKey   = rKey;
-pKey->mbIsComment = false;
-if ( pPrevKey )
-pPrevKey->mpNext = pKey;
-else
-pGroup->mpFirstKey = pKey;
-bNewValue = true;
-}
+bool bNewValue;
+if ( !pKey )
+{
+pKey  = new ImplKeyData;
+pKey->mpNext  = nullptr;
+pKey->maKey   = rKey;
+pKey->mbIsComment = false;
+if ( pPrevKey )
+pPrevKey->mpNext = pKey;
 else
-bNewValue = pKey->maValue != rStr;
+pGroup->mpFirstKey = pKey;
+bNewValue = true;
+}
+else
+bNewValue = pKey->maValue != rStr;
 
-if ( bNewValue )
-{
-pKey->maValue = rStr;
+if ( bNewValue )
+{
+pKey->maValue = rStr;
 
-mpData->mbModified = true;
-}
+mpData->mbModified = true;
 }
 }
 
@@ -836,30 +836,30 @@ void Config::DeleteKey(const OString& rKey)
 
 // Search key and update value
 ImplGroupData* pGroup = ImplGetGroup();
-if ( pGroup )
+if ( !pGroup )
+return;
+
+ImplKeyData* pPrevKey = nullptr;
+ImplKeyData* pKey = pGroup->mpFirstKey;
+while ( pKey )
 {
-ImplKeyData* pPrevKey = nullptr;
-ImplKeyData* pKey = pGroup->mpFirstKey;
-while ( pKey )
-{
-if ( !pKey->mbIsComment && pKey->maKey.equalsIgnoreAsciiCase(rKey) 
)
-break;
+if ( !pKey->mbIsComment && pKey->maKey.equalsIgnoreAsciiCase(rKey) )
+break;
 
-pPrevKey = pKey;
-pKey = pKey->mpNext;
-}
+pPrevKey = pKey;
+pKey = pKey->mp

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

2020-08-05 Thread Noel Grandin (via logerrit)
 xmloff/source/chart/SchXMLAutoStylePoolP.cxx   |   40 -
 xmloff/source/chart/SchXMLAxisContext.cxx  |  392 -
 xmloff/source/chart/SchXMLExport.cxx   |  518 ++---
 xmloff/source/chart/SchXMLParagraphContext.cxx |   36 
 xmloff/source/chart/SchXMLPlotAreaContext.cxx  |  285 +++
 xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx |   48 -
 xmloff/source/chart/SchXMLSeries2Context.cxx   |   42 -
 xmloff/source/chart/SchXMLTableContext.cxx |  174 ++--
 xmloff/source/transform/EventOASISTContext.cxx |   26 
 xmloff/source/transform/FormPropOASISTContext.cxx  |   37 
 xmloff/source/transform/StyleOOoTContext.cxx   |   24 
 xmloff/source/transform/TransformerActions.cxx |   68 -
 xmloff/source/transform/TransformerBase.cxx|   38 
 13 files changed, 864 insertions(+), 864 deletions(-)

New commits:
commit c2864be448b52cdac0f8712708cb6c988155fdc8
Author: Noel Grandin 
AuthorDate: Wed Aug 5 20:34:12 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 6 08:40:03 2020 +0200

loplugin:flatten in xml/chart

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

diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx 
b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
index f4296bc484dd..010a8bfbf189 100644
--- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
+++ b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
@@ -44,30 +44,30 @@ void SchXMLAutoStylePoolP::exportStyleAttributes(
 SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, 
rProperties,
 rPropExp, rUnitConverter, 
rNamespaceMap );
 
-if( nFamily == XmlStyleFamily::SCH_CHART_ID )
+if( nFamily != XmlStyleFamily::SCH_CHART_ID )
+return;
+
+for( const auto& rProp : rProperties )
 {
-for( const auto& rProp : rProperties )
-{
-if( rProp.mnIndex == -1 )
-continue;
+if( rProp.mnIndex == -1 )
+continue;
 
-rtl::Reference< XMLPropertySetMapper > aPropMapper =
-mrSchXMLExport.GetPropertySetMapper();
-sal_Int16 nContextID = aPropMapper->GetEntryContextId( 
rProp.mnIndex );
-if( nContextID == XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT )
+rtl::Reference< XMLPropertySetMapper > aPropMapper =
+mrSchXMLExport.GetPropertySetMapper();
+sal_Int16 nContextID = aPropMapper->GetEntryContextId( rProp.mnIndex );
+if( nContextID == XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT )
+{
+sal_Int32 nNumberFormat = -1;
+if( ( rProp.maValue >>= nNumberFormat ) &&
+( nNumberFormat != -1 ))
 {
-sal_Int32 nNumberFormat = -1;
-if( ( rProp.maValue >>= nNumberFormat ) &&
-( nNumberFormat != -1 ))
+OUString sAttrValue = mrSchXMLExport.getDataStyleName( 
nNumberFormat );
+if( !sAttrValue.isEmpty() )
 {
-OUString sAttrValue = mrSchXMLExport.getDataStyleName( 
nNumberFormat );
-if( !sAttrValue.isEmpty() )
-{
-mrSchXMLExport.AddAttribute(
-aPropMapper->GetEntryNameSpace( rProp.mnIndex ),
-aPropMapper->GetEntryXMLName( rProp.mnIndex ),
-sAttrValue );
-}
+mrSchXMLExport.AddAttribute(
+aPropMapper->GetEntryNameSpace( rProp.mnIndex ),
+aPropMapper->GetEntryXMLName( rProp.mnIndex ),
+sAttrValue );
 }
 }
 }
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx 
b/xmloff/source/chart/SchXMLAxisContext.cxx
index ef7300e2354a..0e1163ad75bb 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -442,150 +442,150 @@ void SchXMLAxisContext::CreateAxis()
 }
 
 // set properties
-if( m_xAxisProps.is())
-{
-uno::Any aTrueBool( uno::makeAny( true ));
-uno::Any aFalseBool( uno::makeAny( false ));
+if( !m_xAxisProps.is())
+return;
 
-// #i109879# the line color is black as default, in the model it is a 
light gray
-m_xAxisProps->setPropertyValue("LineColor",
- uno::makeAny( COL_BLACK ));
+uno::Any aTrueBool( uno::makeAny( true ));
+uno::Any aFalseBool( uno::makeAny( false ));
 
-m_xAxisProps->setPropertyValue("DisplayLabels", aFalseBool );
+// #i109879# the line color is black as default, in the model it is a 
light gray
+m_xAxisProps->setPropertyValue