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

2022-07-27 Thread Skyler Grey (via logerrit)
 cui/uiconfig/ui/widgettestdialog.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e57f9d1651c5abdce1228f070b5c1f3bd0830d1d
Author: Skyler Grey 
AuthorDate: Wed Jul 27 16:46:24 2022 +
Commit: Pedro Silva 
CommitDate: Thu Jul 28 08:56:36 2022 +0200

Add a title to the widget test dialog

- Previously the widget test dialog didn't have a title, however most of
  the other dialogs do. This commit adds a title to the dialog

Signed-off-by: Skyler Grey 
Change-Id: I8b61e00e93cd71a6a7bf068537d9cbcdc735753d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137534
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Rashesh Padia 
Reviewed-by: Pedro Silva 

diff --git a/cui/uiconfig/ui/widgettestdialog.ui 
b/cui/uiconfig/ui/widgettestdialog.ui
index ce8e52879fec..787deda37171 100644
--- a/cui/uiconfig/ui/widgettestdialog.ui
+++ b/cui/uiconfig/ui/widgettestdialog.ui
@@ -4,6 +4,7 @@
   
   
 False
+Test Widgets
 dialog
 
   


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

2022-07-27 Thread Noel Grandin (via logerrit)
 include/sax/fastattribs.hxx |1 +
 sax/source/tools/fastattribs.cxx|7 +++
 writerfilter/source/ooxml/OOXMLFactory.cxx  |2 +-
 writerfilter/source/ooxml/OOXMLFactory.hxx  |2 +-
 writerfilter/source/ooxml/factory_ns.py |2 +-
 writerfilter/source/ooxml/factoryimpl_ns.py |   14 +++---
 6 files changed, 18 insertions(+), 10 deletions(-)

New commits:
commit 28dc1e713cfc5b5ea38e15f032aba72d05e40b33
Author: Noel Grandin 
AuthorDate: Wed Jul 27 17:56:28 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 28 08:47:41 2022 +0200

tdf#119840 remove some OUString allocation

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

diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 57619b922518..24133a4f82ca 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -106,6 +106,7 @@ public:
 bool getAsChar( sal_Int32 nToken, const char*& rPos ) const;
 sal_Int32 getAsIntegerByIndex( sal_Int32 nTokenIndex ) const;
 const char* getAsCharByIndex( sal_Int32 nTokenIndex ) const;
+std::string_view getAsViewByIndex( sal_Int32 nTokenIndex ) const;
 OUString getValueByIndex( sal_Int32 nTokenIndex ) const;
 
 // XFastAttributeList
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index 81dabf727ebd..3522f38f3ef5 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -263,6 +263,13 @@ const char* FastAttributeList::getAsCharByIndex( sal_Int32 
nTokenIndex ) const
 return mpChunk + nOffset;
 }
 
+std::string_view FastAttributeList::getAsViewByIndex( sal_Int32 nTokenIndex ) 
const
+{
+sal_Int32 nOffset = maAttributeValues[nTokenIndex];
+size_t nValueLen = maAttributeValues[nTokenIndex + 1] - 
maAttributeValues[nTokenIndex] - 1;
+return { mpChunk + nOffset, nValueLen };
+}
+
 OUString FastAttributeList::getValue( ::sal_Int32 Token )
 {
 for (size_t i = 0, n = maAttributeTokens.size(); i < n; ++i)
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx 
b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 9e52c2b4c9e6..efedbe56d285 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -90,7 +90,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * 
pHandler,
 break;
 case ResourceType::List:
 if (sal_uInt32 nValue;
-pFactory->getListValue(pAttr->m_nRef, 
rAttribs.getValueByIndex(nAttrIndex), nValue))
+pFactory->getListValue(pAttr->m_nRef, 
rAttribs.getAsViewByIndex(nAttrIndex), nValue))
 {
 xValue = OOXMLIntegerValue::Create(nValue);
 }
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx 
b/writerfilter/source/ooxml/OOXMLFactory.hxx
index 4f3c82f1b070..f687f3b6735c 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -72,7 +72,7 @@ protected:
 virtual ~OOXMLFactory_ns() override;
 
 public:
-virtual bool getListValue(Id nId, const OUString& rValue, sal_uInt32& 
rOutValue) = 0;
+virtual bool getListValue(Id nId, std::string_view aValue, sal_uInt32& 
rOutValue) = 0;
 virtual Id getResourceId(Id nDefine, sal_Int32 nToken) = 0;
 virtual const AttributeInfo* getAttributeInfoArray(Id nId) = 0;
 virtual bool getElementId(Id nDefine, Id nId, ResourceType& rOutResource, 
Id& rOutElement) = 0;
diff --git a/writerfilter/source/ooxml/factory_ns.py 
b/writerfilter/source/ooxml/factory_ns.py
index 1d9924e239c2..18b07aba1c62 100644
--- a/writerfilter/source/ooxml/factory_ns.py
+++ b/writerfilter/source/ooxml/factory_ns.py
@@ -37,7 +37,7 @@ public:
 
 virtual const AttributeInfo* getAttributeInfoArray(Id nId);
 virtual bool getElementId(Id nDefine, Id nId, ResourceType& rOutResource, 
Id& rOutElement);
-virtual bool getListValue(Id nId, const OUString& rValue, sal_uInt32& 
rOutValue);
+virtual bool getListValue(Id nId, std::string_view aValue, sal_uInt32& 
rOutValue);
 virtual Id getResourceId(Id nDefine, sal_Int32 nToken);
 """ % nsToken)
 
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py 
b/writerfilter/source/ooxml/factoryimpl_ns.py
index b17e0c8ffa97..263da3ebe9dc 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.py
+++ b/writerfilter/source/ooxml/factoryimpl_ns.py
@@ -223,13 +223,13 @@ def printValueData(values):
 if "" in values:
 output_else = ""
 for i in values[""]:
-print("%sif (rValue == \"%s\") { rOutValue = %s; return 
true; }" % (output_else, i[0], i[1]))
+print("%sif (aValue == \"%s\") { rOutValue = %s; return 
true; }" % (output_else, i[0], i[1]))
 output_else = "else "
-print("else switch (rValue[0])")
+print("e

[Libreoffice-commits] core.git: 2 commits - chart2/source desktop/source include/sfx2 sc/source sd/source sfx2/source starmath/source sw/source

2022-07-27 Thread Mike Kaganski (via logerrit)
 chart2/source/controller/main/ChartController.cxx   |4 -
 desktop/source/lib/init.cxx |8 +++
 include/sfx2/lokcomponenthelpers.hxx|4 +
 include/sfx2/sidebar/SidebarController.hxx  |7 +--
 sc/source/ui/drawfunc/chartsh.cxx   |   12 ++---
 sc/source/ui/view/tabvwsh4.cxx  |6 +-
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |8 +--
 sfx2/source/sidebar/SidebarController.cxx   |   36 ++--
 sfx2/source/view/lokstarmathhelper.cxx  |9 
 starmath/source/view.cxx|7 ++-
 sw/source/uibase/shells/olesh.cxx   |   12 ++---
 11 files changed, 74 insertions(+), 39 deletions(-)

New commits:
commit 7ba40c7d62c7c15f9c0e9cbc21b48f105454b885
Author: Mike Kaganski 
AuthorDate: Tue Jul 19 17:20:17 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jul 28 07:37:43 2022 +0200

lok: Properly update sidebar context in Math

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

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index a4bd7a3972cc..54c91a6147dd 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -379,7 +379,7 @@ void SAL_CALL ChartController::attachFrame(
 {
 auto pSidebar = 
dynamic_cast(xSidebar.get());
 assert(pSidebar);
-sfx2::sidebar::SidebarController::registerSidebarForFrame(pSidebar, 
this);
+pSidebar->registerSidebarForFrame(this);
 pSidebar->updateModel(getChartModel());
 css::lang::EventObject aEvent;
 mpSelectionChangeHandler->selectionChanged(aEvent);
@@ -745,7 +745,7 @@ void SAL_CALL ChartController::dispose()
 uno::Reference xSidebar = 
getSidebarFromModel(getChartModel());
 if (sfx2::sidebar::SidebarController* pSidebar = 
dynamic_cast(xSidebar.get()))
 {
-
sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
+pSidebar->unregisterSidebarForFrame(this);
 }
 }
 
diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index e996c853c5b0..208af98b2fc2 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -78,9 +78,9 @@ public:
 static SidebarController* GetSidebarControllerForFrame (
 const css::uno::Reference& rxFrame);
 
-static void registerSidebarForFrame(SidebarController* pController, const 
css::uno::Reference& xFrame);
+void registerSidebarForFrame(const 
css::uno::Reference& xFrame);
 
-static void unregisterSidebarForFrame(SidebarController* pController, 
const css::uno::Reference& xFrame);
+void unregisterSidebarForFrame(const 
css::uno::Reference& xFrame);
 
 // ui::XContextChangeEventListener
 virtual void SAL_CALL notifyContextChangeEvent (const 
css::ui::ContextChangeEventObject& rEvent) override;
@@ -170,6 +170,7 @@ public:
 
 void SyncUpdate();
 
+// Used to avoid wrong context update when an embedded object activation 
is in progress
 bool hasChartOrMathContextCurrently() const;
 
 static SidebarController* GetSidebarControllerForView(const SfxViewShell* 
pViewShell);
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 6909f5c19d62..4384482e6740 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -120,6 +120,7 @@ SidebarController::SidebarController (
  const ::std::vector& rMenuData) { 
return this->ShowPopupMenu(rMainMenu, rSubMenu, rMenuData); },
   this)),
   maCurrentContext(OUString(), OUString()),
+  maRequestedContext(OUString(), OUString()),
   mnRequestedForceFlags(SwitchFlag_NoForce),
   
mbMinimumSidebarWidth(officecfg::Office::UI::Sidebar::General::MinimumWidth::get()),
   msCurrentDeckId(gsDefaultDeckId),
@@ -143,7 +144,7 @@ rtl::Reference 
SidebarController::create(SidebarDockingWindow
 rtl::Reference instance(new 
SidebarController(pParentWindow, pViewFrame));
 
 const css::uno::Reference& rxFrame = 
pViewFrame->GetFrame().GetFrameInterface();
-registerSidebarForFrame(instance.get(), rxFrame->getController());
+instance->registerSidebarForFrame(rxFrame->getController());
 rxFrame->addFrameActionListener(instance);
 // Listen for window events.
 instance->mpParentWindow->AddEventListener(LINK(instance.get(), 
SidebarController, WindowEventHandler));
@@ -190,27 +191,27 @@ SidebarController* 
SidebarController::GetSidebarControllerForFrame (
 return dynamic_cast(xListener.get());
 }
 
-v

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

2022-07-27 Thread Mike Kaganski (via logerrit)
 vcl/jsdialog/enabled.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 2fc16dc84d0b1b1bd7978a30e1b79ff3100fefdf
Author: Mike Kaganski 
AuthorDate: Mon Jun 6 12:16:06 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jul 28 07:37:14 2022 +0200

Enable Math sidebar panels for JSInstanceBuilder

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 380fb2d3e9d2..6dbc32cdaf2f 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -139,7 +139,9 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile)
 || rUIFile == u"modules/swriter/ui/sidebarstylepresets.ui"
 || rUIFile == u"modules/swriter/ui/sidebartheme.ui"
 || rUIFile == u"modules/swriter/ui/sidebartableedit.ui"
-|| rUIFile == u"modules/simpress/ui/customanimationfragment.ui")
+|| rUIFile == u"modules/simpress/ui/customanimationfragment.ui"
+|| rUIFile == u"modules/smath/ui/sidebarelements_math.ui"
+|| rUIFile == u"modules/smath/ui/sidebarproperties_math.ui")
 return true;
 
 return false;


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-7.0.7.0.M10'

2022-07-27 Thread Stephan Bergmann (via logerrit)
Tag 'mimo-7.0.7.0.M10' created by Andras Timar  at 
2022-07-27 22:18 +

mimo-7.0.7.0.M10

Changes since mimo-7.0.7.0.M9-8:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-7.0.7.0.M10' - 0 commits -

2022-07-27 Thread (via logerrit)
Rebased ref, commits from common ancestor:


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-6.4.7.2.M6'

2022-07-27 Thread Stephan Bergmann (via logerrit)
Tag 'mimo-6.4.7.2.M6' created by Andras Timar  at 
2022-07-27 22:17 +

mimo-6.4.7.2.M6

Changes since mimo-6.4.7.2.M5-7:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-6.4.7.2.M6' - 0 commits -

2022-07-27 Thread (via logerrit)
Rebased ref, commits from common ancestor:


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-6.2.8.2.M9'

2022-07-27 Thread Stephan Bergmann (via logerrit)
Tag 'mimo-6.2.8.2.M9' created by Andras Timar  at 
2022-07-27 22:16 +

mimo-6.2.8.2.M9

Changes since mimo-6.2.8.2.M8-7:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-6.2.8.2.M9' - 0 commits -

2022-07-27 Thread (via logerrit)
Rebased ref, commits from common ancestor:


[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-7.4.0.2'

2022-07-27 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.4.0.2' created by Christian Lohmaier 
 at 2022-07-27 21:17 +

Tag libreoffice-7.4.0.2
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmLhq2AACgkQ9DSh76/u
rqNqExAAkQJf05x3fSlU9Kf2xHPXgV3uc6UDbR9EBAS/bKq1iNaiMRo2LJng5kmg
Pr75aTMqZ3u4jkcX3N883cXGRaPV0qhw7sKpsLWwTXGhHApSHaYnJvdYi0qJeqkY
pvolck8GgjgQ8tumld+4h+iGvdlGrksXgBIKcUo+q53NwqLZkqiTrP73Y4FepBB/
VmNW//h6XIaNcq846ckv691UWZdItnek/oJ1i2Qc/ETely7LcPeSThgRF6pqpwlf
/J7F5HycHShOyAakF3RdIGTpRcYxz1qoi8mDJEYMIFIWzAqNAvvB3+sVwMGSk9bS
1CjgDqT00Q/vb5FPaRhYqvSvtEIHaUO6TZl0WNFV85prTuvSzWODBbk5CwmMjZ/C
H5GcAgEpkje3q0VqknGMFaBUkFowivePEWbPBbgpHUTCDdS60McSFN21DLLe4Knt
KLKgSSEVBFlrAl0X1G/qXYhHc3I0wRn9ejsx84A/jbIuO/PxA6uNX0n1AfOhiycE
qKb08lKPTZjTs6OXTQ5aQZ32Q5Kv2dwc5IpaR4ofAZG0nJCymIga/dBGt4GXOiZv
9KlfTQLFdohmiHsTrrWBurWsN8pOZ3pwyIguVWK59AQbyIxZqfi+BVr7/rayJUrr
/wXRmrcm/sZh/EwdglQpyORLbVaGNgu2TQqTyHZrHY/tAlYUefA=
=viBW
-END PGP SIGNATURE-

Changes since libreoffice-7-4-branch-point-377:
---
 0 files changed
---


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-7.4.0.2'

2022-07-27 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.4.0.2' created by Christian Lohmaier 
 at 2022-07-27 21:17 +

Tag libreoffice-7.4.0.2
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmLhq2AACgkQ9DSh76/u
rqOaQRAAhPlRCN2p0QBCETBfU6hNScVxMy4n4TdxDarBI7tyAjDApYG7+f3apUBI
N2uHYzHKs3QlTfXZLu/z/X22Vh4qIbiggzVH0UA2luV51A0vycrM6QgIEZ0Ym/3k
TokgXNG8efIk8sPxtKwljf0SKIgdBIYTq5bVxvwqDsD9KzoUlOHhXVF+NHYXlhTR
qnROknMe7ui9YKXE7M/MFlNU20fVHhU+DDm5dhQwwDPXAAXEI0EaA331bkG1KwMO
0NbsMbQHEnVlzdc7fqgt+xozSHNy2YU8+x66rDcCqdE1IpagZ78NOz9rgrHmNQfr
3FlMbquS1dfgvm9Zz8PBMtwBnbc/FvQQKDWkS9MMwcwpELFqQ4wg1U9lhS3fHeC2
7mcQCFfvYT06DlecP7bcVBwYZKOZS4yGTsqN6qKRRZ+CJix9h7HanjMWpRjaL5u2
/p/+KecqnXBcTZN6BglPmjJpdWWQMU3Bp3t/5pK+RRsQzkV6aoiPiWPAUz7BrH2U
eJire1EYUerilouZAkzSQH6MNxS5oz6pCl+yveOrj+uZ6RFYG2nEjYCAu1eL42h2
MiT2u5adJdzAAIrHxB3cAyF22NjrnV/srrcuFFR2LdRuIfLKhS9QpQuaQLqAL/7r
VAJc8Y2gGA67kwUBCv4W8eaZFyGnFrbql2jg+zUx6NzsIf3qkpk=
=cecv
-END PGP SIGNATURE-

Changes since libreoffice-7-4-branch-point-13:
---
 0 files changed
---


[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-7.4.0.2'

2022-07-27 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.4.0.2' created by Christian Lohmaier 
 at 2022-07-27 21:17 +

Tag libreoffice-7.4.0.2
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmLhq2AACgkQ9DSh76/u
rqMvHA/9E4ppDIvB3ZtQ5/CjNabyLunug+yiCuyQ/QoazsdCSTg78KBthlRwlj3U
e2LY+Yy3xFKkMoA/7gB4UGYtSvwedHke6IvSOqSU0sSOhD//SZaqys7qQVKj25jP
lWq0bTVjTfDmCGWkb2ss2tIOtu+EnsMOz/Z8JkBUTqehYFxaN/l68jpgfo66pA6g
5ZUONFPC7tHEagMHOEQYm/EBkaae5rM73TPP6c/hM90Q0KsXeG0APke8XkgWNC3i
OkUZjy6AuhwZpK+jMpkGzMUfjR3jhdviK7KJxP7SAqt1TDiK6AF6MoJscb1td1s0
MBZWRzNKDng2ZKMfPZUINp5OqlgoWRID2rY1IWVqa5BksLlSGNwbM6numXEhvWxR
/5D1HovNBBEUoTtW4yuUpSEAv1zLSvjBtgs0E410kWfK9ZuGmUr6970ZnTcYZgkR
die+nsxRh2DMWOr6BOFFCpLE7fXkJzR3xdVEHqGIbQFV+iRi4nrIK90jp4KEhKQ/
GkASvs4FjU0WrPNqR5Dq7G2idAOj62i2GuCgqt+VmPv/yPNIK/WpDDlYS5nADg6p
Xl6HvUfMJFr8s2osDZqyBv8knCfbFenRmao1dgJM1ljd6y6D+jIpjt8qTCrFj4KS
HWgjVn8KNAeCoVwwiRbj3IvVx0PLc2unSACRomrjJjRnKlZi0eI=
=zX6X
-END PGP SIGNATURE-

Changes since libreoffice-7-4-branch-point-51:
---
 0 files changed
---


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-7.4.0.2'

2022-07-27 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.4.0.2' created by Christian Lohmaier 
 at 2022-07-27 21:17 +

Tag libreoffice-7.4.0.2
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmLhq1wACgkQ9DSh76/u
rqM00g/9E/qvSn2QkrV/GJX/NT2Sy99IsXLh0Wt5Ll+gdg2oGpBZcweMdM7QSXlW
7KvoagUqRAOsKif4Ozf9rogMeB+brlx7K3yzowP1VkUaIoG/m7bs4VIh8LQ0uvti
YP8vnLzM2qLuKU3dKbFZEJFvEU7IT47iGUVTPOqWWcBqk2xvLIBWhckX2EH7tAdq
ON3AGKQxwXzVmDKKxbqTzbguNh3+3yMIE1iDdYJRTk6A1IvQYQhXwyzW14UKRoni
o1fs4DQI2wE3aPyNlMOuZcXsVTkCDw27CSC4dHFET0m8ryYm+woX8+a+6TloJ9+Q
XAU6YxAoABkfq5UztXy7FZiPc4j763eJidwejdWcLU/wp2yVL0abBOKjN4kWXGP8
h+TyJ15X1miifPVCT39lkX76Ao4sHh8ioTKEmAvhw/+bVMyVldIb1iBaf2O7jd/D
jIHXdUXBhPD4LlYrhUV+i0zQq0IrPXu4PnKRnFR1AYy1wqKIbHI69/cylO+qJUop
YXm3FU1UUfEnBgLjMn8SQl0Hn3weamU+9tBX/EuHv1gK3P4ovYAA5kWlWS9CWVPx
sFxmCyWZD1sq2l6xPjqH/Yda8XsmBhadCKUh55F4MKcGB5T2jCgl45QcUFAHdbAu
juYReUcFzQPLkV6QmeeGMzC1TX0xtnNfPHxijR/w5LOta4JbZzE=
=4cPD
-END PGP SIGNATURE-

Changes since libreoffice-7-4-branch-point-2:
---
 0 files changed
---


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

2022-07-27 Thread Christian Lohmaier (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0a3f3efd55e427ec622e875990b1591fd3df2bf9
Author: Christian Lohmaier 
AuthorDate: Wed Jul 27 23:17:44 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jul 27 23:17:44 2022 +0200

bump product version to 7.4.0.2.0+

Change-Id: I897c7c2f0f9762ec7ce3e12fe22bfd9bf32ae7de

diff --git a/configure.ac b/configure.ac
index c0c26c9c17cd..45fb6f2e34f6 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],[7.4.0.1.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.4.0.2.0+],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


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

2022-07-27 Thread Christian Lohmaier (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2ba8eba8fbda0bec0e4971014e4471d0bc5168c9
Author: Christian Lohmaier 
AuthorDate: Wed Jul 27 23:15:15 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jul 27 23:15:15 2022 +0200

bump product version to 7.4.1.0.0+

Change-Id: I558e5cb0ceed03e366d70acb87b89dba00043637

diff --git a/configure.ac b/configure.ac
index c0c26c9c17cd..a1bbc7b1c9cc 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],[7.4.0.1.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.4.1.0.0+],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


[Libreoffice-commits] core.git: Changes to 'libreoffice-7-4-0'

2022-07-27 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-4-0' available with the following commits:
commit d52f1a62cd85ad4c95c447054e32f97dc180c08a
Author: Christian Lohmaier 
Date:   Wed Jul 27 23:13:46 2022 +0200

Branch libreoffice-7-4-0

This is 'libreoffice-7-4-0' - the stable branch for the 7.4.0 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.4.x release,
please use the 'libreoffice-7-4' branch.

If you want to build something cool, unstable, and risky, use master.



[Libreoffice-commits] translations.git: Changes to 'libreoffice-7-4-0'

2022-07-27 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-4-0' available with the following commits:
commit 2fffceacfb667d384c5093d59e18a1962dccf1b3
Author: Christian Lohmaier 
Date:   Wed Jul 27 23:13:24 2022 +0200

Branch libreoffice-7-4-0

This is 'libreoffice-7-4-0' - the stable branch for the 7.4.0 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.4.x release,
please use the 'libreoffice-7-4' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: I744b5c10c6b500beb7cfe253ea31c32a586c77e6



[Libreoffice-commits] help.git: Changes to 'libreoffice-7-4-0'

2022-07-27 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-4-0' available with the following commits:
commit 3d4d100f5f652e40adfb3ad4df7ce3f68faffeb7
Author: Christian Lohmaier 
Date:   Wed Jul 27 23:13:24 2022 +0200

Branch libreoffice-7-4-0

This is 'libreoffice-7-4-0' - the stable branch for the 7.4.0 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.4.x release,
please use the 'libreoffice-7-4' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: Ie3b38f68be70aa7a7b1a21a4985614796ce92e08



[Libreoffice-commits] dictionaries.git: Changes to 'libreoffice-7-4-0'

2022-07-27 Thread Christian Lohmaier (via logerrit)
New branch 'libreoffice-7-4-0' available with the following commits:
commit 7bdbdae14c3d290bc84986bdbe4d61902a7db8ba
Author: Christian Lohmaier 
Date:   Wed Jul 27 23:13:24 2022 +0200

Branch libreoffice-7-4-0

This is 'libreoffice-7-4-0' - the stable branch for the 7.4.0 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 7.4.x release,
please use the 'libreoffice-7-4' branch.

If you want to build something cool, unstable, and risky, use master.

Change-Id: I2aab97ed008bee08fb8f2efebe602595a3b815d5



[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - officecfg/registry

2022-07-27 Thread Luboš Luňák (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7db2df3d8f19cf4734ef359f238eb70e62b4be1d
Author: Luboš Luňák 
AuthorDate: Tue Feb 1 14:55:39 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Wed Jul 27 23:06:55 2022 +0200

disable Skia as default on Mac for 7.4

There are some problems like tdf#145843 and tdf#145988 that I cannot
reproduce, yet a number of users apparently can. I can't fix those
for 7.3, so default to the previous VCL backend again.

Change-Id: I8c3e9713913a453c2b55a0ad9b1c8f82af8f7917
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129290
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 290957ad1383565c97201360defdeae9ae5ef502)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135708
Reviewed-by: Xisco Fauli 
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 4694135efce7..98e4d87f410c 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -51,7 +51,7 @@
   
   
 
-  true
+  false
   false
   true
 


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

2022-07-27 Thread Michael Stahl (via logerrit)
 sw/source/core/unocore/unobkm.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 38333796522ab53aff69a2e2228ec1fad6abb866
Author: Michael Stahl 
AuthorDate: Wed Jul 27 16:06:05 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 22:56:18 2022 +0200

sw: SolarMutexGuard missing in SwXBookmark::setPropertyValue()

Change-Id: I41187b02e6b0545529e2a2c5b07da671eae89079
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137506
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit c7a76952b6fa0e6688028047726ac794fdd5cca3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137517
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/unocore/unobkm.cxx 
b/sw/source/core/unocore/unobkm.cxx
index 456325d5f575..567cf8a20872 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -406,6 +406,8 @@ void SAL_CALL
 SwXBookmark::setPropertyValue(const OUString& PropertyName,
 const uno::Any& rValue)
 {
+SolarMutexGuard g;
+
 if (PropertyName == UNO_NAME_BOOKMARK_HIDDEN)
 {
 bool bNewValue = false;


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

2022-07-27 Thread Andreas Heinisch (via logerrit)
 sw/source/core/text/itrform2.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit fb63d0a090b049c16993054f1804e440adeba5d7
Author: Andreas Heinisch 
AuthorDate: Wed Jul 27 08:53:11 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jul 27 22:37:42 2022 +0200

tdf#67669 - Make narrow no-break space visible by drawing a gray background

Make narrow no-break space visible by drawing a gray background like for 
non-breaking spaces.

Change-Id: I3f2b4374a08ea8305c8c84eb497bc362866ad352
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137490
Tested-by: Andreas Heinisch 
Reviewed-by: Andreas Heinisch 
(cherry picked from commit bbb57e8198863ee7bdadd3f2aac4420c08da94a3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137432
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Jenkins

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 563ddd5c4c02..e86c8079c8d2 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1503,6 +1503,8 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
 case CHAR_SOFTHYPHEN:   // soft hyphen
 pPor = new SwSoftHyphPortion; break;
 
+// tdf#67669 - make narrow no-break space visible by drawing a 
gray background
+case CHAR_NNBSP:// narrow no-break space
 case CHAR_HARDBLANK:// no-break space
 // Please check tdf#115067 if you want to edit the char
 pPor = new SwBlankPortion( cChar ); break;


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

2022-07-27 Thread Stephan Bergmann (via logerrit)
 connectivity/source/parse/sqlbison.y |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 61843b2b95e53c4089f9fad1fe289c45bbacdfc5
Author: Stephan Bergmann 
AuthorDate: Tue Sep 14 12:20:48 2021 +0200
Commit: Aron Budea 
CommitDate: Wed Jul 27 21:41:50 2022 +0200

Adapt to Bison 3.8 internal yyn -> yyrule rename

see


"glr2.cc: log the execution of deferred actions" including "Rename argument 
yyn
as yyrule for clarity."

YYBISON was defined as 1 rather than as a representation of the Bison 
version
prior to


"yacc.c: provide the Bison version as an integral macro", which shouldn't 
be a
problem here.  And YYBISON is apparently completely undefined with
/usr/bin/bison on macOS.

(The preceding comment always mentioned "yyi" and "yyrmap" in apparent 
mismatch
with the actually used "yyn" and "yyr1" ever since
c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just leave it
untouched.)

Change-Id: I4f901407aa21ed4abec84e661d813ee7599f02f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122082
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 45227d9b79dc4f2a2aa6874cd4e3c02b7934b197)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123408
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index a93f3401cabc..0d2853e73105 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -74,9 +74,15 @@ inline connectivity::OSQLInternalNode* newNode(const 
OUString& _newValue,
 
 // yyi is the internal number of the rule that is currently being reduced
 // This can be mapped to external rule number via the yyrmap.
+#if defined YYBISON && YYBISON >= 30800
+#define SQL_NEW_RULE   newNode("", SQLNodeType::Rule, 
yyr1[yyrule])
+#define SQL_NEW_LISTRULE   newNode("", SQLNodeType::ListRule, 
yyr1[yyrule])
+#define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyrule])
+#else
 #define SQL_NEW_RULE   newNode("", SQLNodeType::Rule, 
yyr1[yyn])
 #define SQL_NEW_LISTRULE   newNode("", SQLNodeType::ListRule, 
yyr1[yyn])
 #define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyn])
+#endif
 
 
 extern connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER;


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-4' - connectivity/source

2022-07-27 Thread Stephan Bergmann (via logerrit)
 connectivity/source/parse/sqlbison.y |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit d21e8a30a32017fa2c92ae1e6cff41f9ad5041d7
Author: Stephan Bergmann 
AuthorDate: Tue Sep 14 12:20:48 2021 +0200
Commit: Aron Budea 
CommitDate: Wed Jul 27 21:39:57 2022 +0200

Adapt to Bison 3.8 internal yyn -> yyrule rename

see


"glr2.cc: log the execution of deferred actions" including "Rename argument 
yyn
as yyrule for clarity."

YYBISON was defined as 1 rather than as a representation of the Bison 
version
prior to


"yacc.c: provide the Bison version as an integral macro", which shouldn't 
be a
problem here.  And YYBISON is apparently completely undefined with
/usr/bin/bison on macOS.

(The preceding comment always mentioned "yyi" and "yyrmap" in apparent 
mismatch
with the actually used "yyn" and "yyr1" ever since
c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just leave it
untouched.)

Change-Id: I4f901407aa21ed4abec84e661d813ee7599f02f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122082
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 45227d9b79dc4f2a2aa6874cd4e3c02b7934b197)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123408
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index c9d423e3219c..6fa996b5e474 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -74,9 +74,15 @@ inline connectivity::OSQLInternalNode* newNode(const 
OUString& _newValue,
 
 // yyi is the internal number of the rule that is currently being reduced
 // This can be mapped to external rule number via the yyrmap.
+#if defined YYBISON && YYBISON >= 30800
+#define SQL_NEW_RULE   newNode("", SQLNodeType::Rule, 
yyr1[yyrule])
+#define SQL_NEW_LISTRULE   newNode("", SQLNodeType::ListRule, 
yyr1[yyrule])
+#define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyrule])
+#else
 #define SQL_NEW_RULE   newNode("", SQLNodeType::Rule, 
yyr1[yyn])
 #define SQL_NEW_LISTRULE   newNode("", SQLNodeType::ListRule, 
yyr1[yyn])
 #define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyn])
+#endif
 
 
 extern connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER;


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

2022-07-27 Thread Stephan Bergmann (via logerrit)
 connectivity/source/parse/sqlbison.y |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit c95dd71aac562016ae871deef44233459012cba4
Author: Stephan Bergmann 
AuthorDate: Tue Sep 14 12:20:48 2021 +0200
Commit: Aron Budea 
CommitDate: Wed Jul 27 21:22:00 2022 +0200

Adapt to Bison 3.8 internal yyn -> yyrule rename

see


"glr2.cc: log the execution of deferred actions" including "Rename argument 
yyn
as yyrule for clarity."

YYBISON was defined as 1 rather than as a representation of the Bison 
version
prior to


"yacc.c: provide the Bison version as an integral macro", which shouldn't 
be a
problem here.  And YYBISON is apparently completely undefined with
/usr/bin/bison on macOS.

(The preceding comment always mentioned "yyi" and "yyrmap" in apparent 
mismatch
with the actually used "yyn" and "yyr1" ever since
c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just leave it
untouched.)

Change-Id: I4f901407aa21ed4abec84e661d813ee7599f02f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122082
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 45227d9b79dc4f2a2aa6874cd4e3c02b7934b197)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123408
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index d14f36e7794f..c4be0bc00bd0 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -74,9 +74,15 @@ inline connectivity::OSQLInternalNode* newNode(const 
OUString& _newValue,
 
 // yyi is the internal number of the rule that is currently being reduced
 // This can be mapped to external rule number via the yyrmap.
+#if defined YYBISON && YYBISON >= 30800
+#define SQL_NEW_RULE   newNode("", SQLNodeType::Rule, 
yyr1[yyrule])
+#define SQL_NEW_LISTRULE   newNode("", SQLNodeType::ListRule, 
yyr1[yyrule])
+#define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyrule])
+#else
 #define SQL_NEW_RULE   newNode("", SQLNodeType::Rule, 
yyr1[yyn])
 #define SQL_NEW_LISTRULE   newNode("", SQLNodeType::ListRule, 
yyr1[yyn])
 #define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyn])
+#endif
 
 
 extern connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER;


Re: How to get text area rectangle from shape type, position, size and adjustment values?

2022-07-27 Thread Regina Henschel

Hi Miklos,

Miklos Vajna schrieb am 27.07.2022 um 11:18:

Hi Regina,

On Sun, Jul 24, 2022 at 11:59:28PM +0200, Regina Henschel 
 wrote:

I know that the calculation of moTextOffFoo values in transform2dcontext is
correct in principle. But I am very unhappy with calculating the position
and size of the required text area rectangle by hand using the preset
geometry. I have now done this for the shape types that I know are in the
preset SmartArts. But the user can also exchange these shapes with others in
the UI of MS Office. So the calculation of the text area rectangle would
have to be done for all preset shapes. That's why I'm looking for another
way.


Briefly reading presetShapeDefinitions.xml from the OOXML spec, the
calculation of the text rectangle seems to be part of the preset, so
it's not something you can calculate in general.


The text rectangle often uses guide values, indeed.



At that point I have the type of the shape and know position, size and
adjustment values. If I had a ready CustomShape, I could get the needed text
area rectangle with the method getTextBounds(). But in
transform2dcontext.cxx there is no CustomShape. Or do I miss something?


In the meantime I have tried to get a CustomShape from an XShape. But 
that gives a nullptr.




Is there any way to make such a shape temporarily so that you can use
getTextBounds()? Or maybe someone has another idea how to get the text area
rectangle from type, position, size and adjustment values?


Other preset data is generated from the spec, the generated result is at
oox/source/drawingml/customshapes/oox-drawingml-cs-presets. Would it be
possible to include the text rectangle information in that file as well?


The text rectangle information is already there. It is in "Path". "Path" 
contains "Coordinates", "Segments" and "TextFrames".




Failing that, if we have this information in svx/ for custom shape
instances, then seprating this functionality into a function that you
can call from oox/ sounds reasonable. I just fear that OOXML has much
more preset types compared to the old binary formats, and perhaps svx/
preset data represents what was the feature set of binary formats.


The calculations in svx are made by EnhancedCustomShape2d. But that 
needs in its ctor a SdrObjCustomShape. The calculations in 
EnhancedCustomShape2d works for OOXML-shapes too. It takes care of 
svg:viewBox="0 0 0 0" and subview, which is used by OOXML-shapes.


The calculations need "Segments" and "Equations", but the 
oox::drawingml::Shape has at that time only mnShapePresetType in its 
mpCustomShapePropertiesPtr.


I think, that separating the functionality is not possible, because the 
ctor of EnhancedCustomShape2d makes heavy use of the SdrObjCustomShape.
So if I get "Segments", "Equations" and "TextFrames" from 
oox-drawingml-cs-presets somehow, I would need to rewrite the functions 
using EnhancedCustomShape2d as kind of template.


Considering the effort involved, it probably makes more sense to wait 
and see if users complain. The predefined diagrams work in Impress. And 
the time is surely better spent to find out why the shapes of a diagram 
are missing in Calc and why size and position are wrong in Writer.


I was only hoping that someone knows something that is unknown to me as 
an amateur developer.


Kind regards,
Regina





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

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

New commits:
commit 20cc897dddb8ae7cee3c6d66e9cebba9da543c3a
Author: Caolán McNamara 
AuthorDate: Wed Jul 27 15:57:17 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 27 20:41:58 2022 +0200

gtk4: for gtk4 set the size of both layers of the overlay

the size request for the overlay comes from its main child, the drawing
area in this case

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 1341c759a029..b1a00fe23129 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -786,6 +786,9 @@ void GtkSalFrame::moveWindow( tools::Long nX, tools::Long 
nY )
 void GtkSalFrame::widget_set_size_request(tools::Long nWidth, tools::Long 
nHeight)
 {
 gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight 
);
+#if GTK_CHECK_VERSION(4,0,0)
+gtk_widget_set_size_request(GTK_WIDGET(m_pDrawingArea), nWidth, nHeight );
+#endif
 }
 
 void GtkSalFrame::window_resize(tools::Long nWidth, tools::Long nHeight)


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

2022-07-27 Thread Eike Rathke (via logerrit)
 sc/inc/column.hxx   |2 --
 sc/source/core/data/column.cxx  |1 -
 sc/source/core/data/column3.cxx |   10 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 3172472aa749defc68f51e3436a089f49a496e8b
Author: Eike Rathke 
AuthorDate: Wed Jul 27 18:21:20 2022 +0200
Commit: Eike Rathke 
CommitDate: Wed Jul 27 20:38:19 2022 +0200

Unnecessary to remember mbFiltering at column, tdf#140968 tdf#140978 
follow-up

It's inviting confusion and only needed for FilterEntriesHandler,
so pass it there.

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

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index ba964cdfee89..4cc57f418e91 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -203,7 +203,6 @@ class ScColumn : protected ScColumnData
 SCCOL   nCol;
 SCTAB   nTab;
 
-bool mbFiltering : 1; // it is true if there is a filtering in the column
 bool mbEmptyBroadcastersPending : 1; // a broadcaster not removed during 
EnableDelayDeletingBroadcasters()
 
 friend class ScDocument;// for FillInfo
@@ -254,7 +253,6 @@ public:
 using ScColumnData::GetDoc;
 SCTAB GetTab() const { return nTab; }
 SCCOL GetCol() const { return nCol; }
-bool HasFiltering() const { return mbFiltering; }
 sc::CellStoreType& GetCellStore() { return maCells; }
 const sc::CellStoreType& GetCellStore() const { return maCells; }
 sc::CellTextAttrStoreType& GetCellAttrStore() { return maCellTextAttrs; }
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 7ebba48b5792..fea2f84e5be0 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -88,7 +88,6 @@ ScColumn::ScColumn(ScSheetLimits const & rSheetLimits) :
 mnBlkCountFormula(0),
 nCol( 0 ),
 nTab( 0 ),
-mbFiltering( false ),
 mbEmptyBroadcastersPending( false )
 {
 maCells.resize(rSheetLimits.GetMaxRowCount());
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index ceb06b11b481..6956951cf765 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2488,13 +2488,14 @@ class FilterEntriesHandler
 {
 ScColumn& mrColumn;
 ScFilterEntries& mrFilterEntries;
+bool mbFiltering;
 bool mbFilteredRow;
 
 void processCell(const ScColumn& rColumn, SCROW nRow, ScRefCellValue& 
rCell)
 {
 SvNumberFormatter* pFormatter = mrColumn.GetDoc().GetFormatTable();
 sal_uLong nFormat = 
mrColumn.GetNumberFormat(mrColumn.GetDoc().GetNonThreadedContext(), nRow);
-OUString aStr = ScCellFormat::GetInputString(rCell, nFormat, 
*pFormatter, mrColumn.GetDoc(), mrColumn.HasFiltering());
+OUString aStr = ScCellFormat::GetInputString(rCell, nFormat, 
*pFormatter, mrColumn.GetDoc(), mbFiltering);
 
 // Colors
 ScAddress aPos(rColumn.GetCol(), nRow, rColumn.GetTab());
@@ -2624,8 +2625,8 @@ class FilterEntriesHandler
 }
 
 public:
-FilterEntriesHandler(ScColumn& rColumn, ScFilterEntries& rFilterEntries, 
bool bFilteredRow) :
-mrColumn(rColumn), mrFilterEntries(rFilterEntries), 
mbFilteredRow(bFilteredRow) {}
+FilterEntriesHandler(ScColumn& rColumn, ScFilterEntries& rFilterEntries, 
bool bFiltering, bool bFilteredRow) :
+mrColumn(rColumn), mrFilterEntries(rFilterEntries), 
mbFiltering(bFiltering), mbFilteredRow(bFilteredRow) {}
 
 void operator() (size_t nRow, double fVal)
 {
@@ -2673,8 +2674,7 @@ void ScColumn::GetFilterEntries(
 sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
 ScFilterEntries& rFilterEntries, bool bFiltering, bool bFilteredRow )
 {
-mbFiltering = bFiltering;
-FilterEntriesHandler aFunc(*this, rFilterEntries, bFilteredRow);
+FilterEntriesHandler aFunc(*this, rFilterEntries, bFiltering, 
bFilteredRow);
 rBlockPos.miCellPos =
 sc::ParseAll(rBlockPos.miCellPos, maCells, nStartRow, nEndRow, aFunc, 
aFunc);
 }


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

2022-07-27 Thread Miklos Vajna (via logerrit)
 sw/qa/core/text/text.cxx   |   42 +
 sw/source/core/text/porrst.cxx |8 ++-
 2 files changed, 49 insertions(+), 1 deletion(-)

New commits:
commit 4e329f50e42c91704b84b1fc583d6815ab22adab
Author: Miklos Vajna 
AuthorDate: Wed Jul 27 16:35:13 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 20:25:20 2022 +0200

tdf#148291 sw clearing breaks: fix RTL layout

The bugreport has two documents that show clear=left and clear=right is
basically ignored in Word in the RTL paragraph case, while clear=none
and clear=all work as expected.

There was no special-casing for RTL in SwBreakPortion::Format()
previously, as the OOXML spec does talk about left/right even in case of
RTL, i.e. no expected mirroring is documented as the behavior. Looking
at [MS-OI29500], "2.1.528 Part 1 Section 17.18.3, ST_BrClear" does say
that the Word "behaves unpredictably" in the normal (non-web) layout.

Fix the problem by handling clear=left and clear=right as clear=none in
the RTL case, this fixes the rendering differences for both
bugdocuments.

If later we do want the mirrored layout, then such mirroring could be
done in SwTextFly::GetMaxBottom().

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

diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index f11c6da8ff5d..ddd39bff7b9f 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -12,6 +12,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -370,6 +371,47 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testClearingLineBreakLeft)
 assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]", "height", "2837");
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeftRTL)
+{
+// Given a document with an anchored object in an RTL para and a clearing 
break (type=left):
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
+uno::Reference xText = xDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+uno::Reference xCursorProps(xCursor, uno::UNO_QUERY);
+xCursorProps->setPropertyValue("WritingMode", 
uno::Any(text::WritingMode2::RL_TB));
+{
+uno::Reference xShape(
+xFactory->createInstance("com.sun.star.drawing.RectangleShape"), 
uno::UNO_QUERY);
+xShape->setSize(awt::Size(5000, 5000));
+uno::Reference xShapeProps(xShape, 
uno::UNO_QUERY);
+xShapeProps->setPropertyValue("AnchorType",
+  
uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+uno::Reference xShapeContent(xShape, 
uno::UNO_QUERY);
+xText->insertTextContent(xCursor, xShapeContent, /*bAbsorb=*/false);
+}
+uno::Reference xLineBreak(
+xFactory->createInstance("com.sun.star.text.LineBreak"), 
uno::UNO_QUERY);
+uno::Reference xLineBreakProps(xLineBreak, 
uno::UNO_QUERY);
+auto eClear = static_cast(SwLineBreakClear::RIGHT);
+xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+
+// When laying out that document:
+calcLayout();
+
+// Then make sure the "bar" does not jump down (due to type=left && RTL):
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 276
+// - Actual  : 2837
+// i.e. left/right was not ignored in the RTL case.
+assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]", "height", "276");
+}
+
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakHeader)
 {
 // Given a document with a shape in the header and a clearing break in the 
body text:
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 256a43367070..0afa5ef37fcd 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -178,7 +178,13 @@ bool SwBreakPortion::Format( SwTextFormatInfo &rInf )
 
 // See if this is a clearing break. If so, calculate how much we need to 
"jump down" so the next
 // line can again use the full text width.
-if (m_eClear != SwLineBreakClear::NONE)
+SwLineBreakClear eClear = m_eClear;
+if (rInf.GetTextFrame()->IsRightToLeft() && eClear != 
SwLineBreakClear::ALL)
+{
+// RTL ignores left/right breaks.
+eClear = SwLineBreakClear::NONE;
+}
+if (eClear != SwLineBreakClear::NONE)
 {
 SwTextFly& rTextFly = rInf.GetTextFly();
 if (rTextFly.IsOn())


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

2022-07-27 Thread Eike Rathke (via logerrit)
 sc/inc/column.hxx   |2 --
 sc/source/core/data/column3.cxx |   14 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 2085e90fe8ac129bc4dbac4612d1ea7544335dae
Author: Eike Rathke 
AuthorDate: Wed Jul 27 18:01:11 2022 +0200
Commit: Eike Rathke 
CommitDate: Wed Jul 27 20:19:45 2022 +0200

FilteredRow is not a property of the column, tdf#117276 follow-up

It's only needed in the FilterEntriesHandler, so pass it there.

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

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index a67a166646e2..ba964cdfee89 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -204,7 +204,6 @@ class ScColumn : protected ScColumnData
 SCTAB   nTab;
 
 bool mbFiltering : 1; // it is true if there is a filtering in the column
-bool mbFilteredRow : 1; // it is true if the actual row of the filtered 
column is hidden
 bool mbEmptyBroadcastersPending : 1; // a broadcaster not removed during 
EnableDelayDeletingBroadcasters()
 
 friend class ScDocument;// for FillInfo
@@ -256,7 +255,6 @@ public:
 SCTAB GetTab() const { return nTab; }
 SCCOL GetCol() const { return nCol; }
 bool HasFiltering() const { return mbFiltering; }
-bool IsFilteredRow() const { return mbFilteredRow; }
 sc::CellStoreType& GetCellStore() { return maCells; }
 const sc::CellStoreType& GetCellStore() const { return maCells; }
 sc::CellTextAttrStoreType& GetCellAttrStore() { return maCellTextAttrs; }
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 1d255233bf58..ceb06b11b481 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2488,6 +2488,7 @@ class FilterEntriesHandler
 {
 ScColumn& mrColumn;
 ScFilterEntries& mrFilterEntries;
+bool mbFilteredRow;
 
 void processCell(const ScColumn& rColumn, SCROW nRow, ScRefCellValue& 
rCell)
 {
@@ -2559,7 +2560,7 @@ class FilterEntriesHandler
 
 if (rCell.hasString())
 {
-mrFilterEntries.push_back(ScTypedStrData(std::move(aStr), 0.0, 
0.0, ScTypedStrData::Standard, false, mrColumn.IsFilteredRow()));
+mrFilterEntries.push_back(ScTypedStrData(std::move(aStr), 0.0, 
0.0, ScTypedStrData::Standard, false, mbFilteredRow));
 return;
 }
 
@@ -2617,14 +2618,14 @@ class FilterEntriesHandler
 }
 // store the formatted/rounded value for filtering
 if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0 && !bDate)
-mrFilterEntries.push_back(ScTypedStrData(std::move(aStr), fVal, 
rColumn.GetDoc().RoundValueAsShown(fVal, nFormat), ScTypedStrData::Value, 
bDate, mrColumn.IsFilteredRow()));
+mrFilterEntries.push_back(ScTypedStrData(std::move(aStr), fVal, 
rColumn.GetDoc().RoundValueAsShown(fVal, nFormat), ScTypedStrData::Value, 
bDate, mbFilteredRow));
 else
-mrFilterEntries.push_back(ScTypedStrData(std::move(aStr), fVal, 
fVal, ScTypedStrData::Value, bDate, mrColumn.IsFilteredRow()));
+mrFilterEntries.push_back(ScTypedStrData(std::move(aStr), fVal, 
fVal, ScTypedStrData::Value, bDate, mbFilteredRow));
 }
 
 public:
-FilterEntriesHandler(ScColumn& rColumn, ScFilterEntries& rFilterEntries) :
-mrColumn(rColumn), mrFilterEntries(rFilterEntries) {}
+FilterEntriesHandler(ScColumn& rColumn, ScFilterEntries& rFilterEntries, 
bool bFilteredRow) :
+mrColumn(rColumn), mrFilterEntries(rFilterEntries), 
mbFilteredRow(bFilteredRow) {}
 
 void operator() (size_t nRow, double fVal)
 {
@@ -2673,8 +2674,7 @@ void ScColumn::GetFilterEntries(
 ScFilterEntries& rFilterEntries, bool bFiltering, bool bFilteredRow )
 {
 mbFiltering = bFiltering;
-mbFilteredRow = bFilteredRow;
-FilterEntriesHandler aFunc(*this, rFilterEntries);
+FilterEntriesHandler aFunc(*this, rFilterEntries, bFilteredRow);
 rBlockPos.miCellPos =
 sc::ParseAll(rBlockPos.miCellPos, maCells, nStartRow, nEndRow, aFunc, 
aFunc);
 }


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

2022-07-27 Thread Eike Rathke (via logerrit)
 sc/inc/column.hxx   |2 +-
 sc/source/core/data/column3.cxx |4 ++--
 sc/source/core/data/table3.cxx  |6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 19533948370dc1ccd7334dbe1a8b7fc8330b10c0
Author: Eike Rathke 
AuthorDate: Wed Jul 27 17:40:31 2022 +0200
Commit: Eike Rathke 
CommitDate: Wed Jul 27 19:44:34 2022 +0200

Name FilteredRow what it is, not hidden; tdf#117276 follow-up

Also avoid defaulted parameter, it's only one more place to
change.

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

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 56aa1f9fc65e..a67a166646e2 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -600,7 +600,7 @@ public:
 
 void GetFilterEntries(
 sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW 
nEndRow,
-ScFilterEntries& rFilterEntries, bool bFiltering, bool bHiddenRow = 
false );
+ScFilterEntries& rFilterEntries, bool bFiltering, bool bFilteredRow );
 
 bool GetDataEntries( SCROW nRow, std::set& rStrings) const;
 
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index ebbefb03b714..1d255233bf58 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2670,10 +2670,10 @@ public:
 
 void ScColumn::GetFilterEntries(
 sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
-ScFilterEntries& rFilterEntries, bool bFiltering, bool bHiddenRow )
+ScFilterEntries& rFilterEntries, bool bFiltering, bool bFilteredRow )
 {
 mbFiltering = bFiltering;
-mbFilteredRow = bHiddenRow;
+mbFilteredRow = bFilteredRow;
 FilterEntriesHandler aFunc(*this, rFilterEntries);
 rBlockPos.miCellPos =
 sc::ParseAll(rBlockPos.miCellPos, maCells, nStartRow, nEndRow, aFunc, 
aFunc);
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 52b4a0500a46..5a128152ad46 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2978,7 +2978,7 @@ void ScTable::GetFilterEntries( SCCOL nCol, SCROW nRow1, 
SCROW nRow2, ScFilterEn
 
 sc::ColumnBlockConstPosition aBlockPos;
 aCol[nCol].InitBlockPosition(aBlockPos);
-aCol[nCol].GetFilterEntries(aBlockPos, nRow1, nRow2, rFilterEntries, 
bFiltering);
+aCol[nCol].GetFilterEntries(aBlockPos, nRow1, nRow2, rFilterEntries, 
bFiltering, false /*bFilteredRow*/);
 }
 
 void ScTable::GetFilteredFilterEntries(
@@ -3000,11 +3000,11 @@ void ScTable::GetFilteredFilterEntries(
 {
 if (queryEvaluator.ValidQuery(j))
 {
-aCol[nCol].GetFilterEntries(aBlockPos, j, j, rFilterEntries, 
bFiltering, false/*bHiddenRow*/);
+aCol[nCol].GetFilterEntries(aBlockPos, j, j, rFilterEntries, 
bFiltering, false/*bFilteredRow*/);
 }
 else
 {
-aCol[nCol].GetFilterEntries(aBlockPos, j, j, rFilterEntries, 
bFiltering, true/*bHiddenRow*/);
+aCol[nCol].GetFilterEntries(aBlockPos, j, j, rFilterEntries, 
bFiltering, true/*bFilteredRow*/);
 }
 }
 }


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

2022-07-27 Thread Noel Grandin (via logerrit)
 sw/inc/contentindex.hxx  |7 +++
 sw/inc/redline.hxx   |5 -
 sw/source/core/doc/docredln.cxx  |   12 
 sw/source/core/txtnode/ndtxt.cxx |   17 +
 4 files changed, 36 insertions(+), 5 deletions(-)

New commits:
commit d5e922f0864b88ff44c49e75f984e96659171771
Author: Noel Grandin 
AuthorDate: Mon Jul 25 16:02:57 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 27 19:01:42 2022 +0200

tdf#119840 Store pointer to redline

in SwContentIndex, so we can walk the sw::Ring of SwContentIndex attached
to a SwContentNode, which is considerably faster than scanning
the redline array.

Shaves 10% off load time

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

diff --git a/sw/inc/contentindex.hxx b/sw/inc/contentindex.hxx
index c05845b378c7..0e2abc582116 100644
--- a/sw/inc/contentindex.hxx
+++ b/sw/inc/contentindex.hxx
@@ -28,6 +28,7 @@
 class SwContentNode;
 class SwContentIndexReg;
 struct SwPosition;
+class SwRangeRedline;
 
 namespace sw::mark { class IMark; }
 
@@ -43,6 +44,9 @@ private:
 SwContentIndex * m_pNext;
 SwContentIndex * m_pPrev;
 
+/// points to the SwRangeRedline (if any) that contains this SwIndex, via 
SwPosition and SwPaM
+SwRangeRedline * m_pRangeRedline = nullptr;
+
 /// Pointer to a mark that owns this position to allow fast lookup of 
marks of an SwContentIndexReg.
 const sw::mark::IMark* m_pMark;
 
@@ -101,6 +105,9 @@ public:
 
 const sw::mark::IMark* GetMark() const { return m_pMark; }
 void SetMark(const sw::mark::IMark* pMark);
+
+SwRangeRedline* GetRedline() const { return m_pRangeRedline; }
+void SetRedline(SwRangeRedline* pRangeRedline) { m_pRangeRedline = 
pRangeRedline; }
 };
 
 SW_DLLPUBLIC std::ostream& operator <<(std::ostream& s, const SwContentIndex& 
index);
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index dfbfa177a855..181001fed6b1 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -178,7 +178,10 @@ public:
bool bDelLP) :
 SwPaM( rPos ), m_pRedlineData( pData ), m_pContentSect( nullptr ),
 m_nId( s_nLastId++ ), m_bDelLastPara( bDelLP ), m_bIsVisible( true )
-{}
+{
+GetBound().nContent.SetRedline(this);
+GetBound(false).nContent.SetRedline(this);
+}
 SwRangeRedline( const SwRangeRedline& );
 virtual ~SwRangeRedline() override;
 
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 4a1134f0d78e..916d81c48d9b 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1110,6 +1110,9 @@ SwRangeRedline::SwRangeRedline(RedlineType eTyp, const 
SwPaM& rPam )
 m_pContentSect( nullptr ),
 m_nId( s_nLastId++ )
 {
+GetBound().nContent.SetRedline(this);
+GetBound(false).nContent.SetRedline(this);
+
 m_bDelLastPara = false;
 m_bIsVisible = true;
 if( !rPam.HasMark() )
@@ -1130,6 +1133,9 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& 
rData, const SwPaM& rPam )
 m_pContentSect( nullptr ),
 m_nId( s_nLastId++ )
 {
+GetBound().nContent.SetRedline(this);
+GetBound(false).nContent.SetRedline(this);
+
 m_bDelLastPara = false;
 m_bIsVisible = true;
 if( !rPam.HasMark() )
@@ -1142,6 +1148,9 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& 
rData, const SwPosition& rP
 m_pContentSect( nullptr ),
 m_nId( s_nLastId++ )
 {
+GetBound().nContent.SetRedline(this);
+GetBound(false).nContent.SetRedline(this);
+
 m_bDelLastPara = false;
 m_bIsVisible = true;
 }
@@ -1152,6 +1161,9 @@ SwRangeRedline::SwRangeRedline( const SwRangeRedline& 
rCpy )
 m_pContentSect( nullptr ),
 m_nId( s_nLastId++ )
 {
+GetBound().nContent.SetRedline(this);
+GetBound(false).nContent.SetRedline(this);
+
 m_bDelLastPara = false;
 m_bIsVisible = true;
 if( !rCpy.HasMark() )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 88465dbded6f..6ae44f14b040 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1410,11 +1410,20 @@ void SwTextNode::Update(
 SwContentNodeTmp aTmpIdxReg;
 if (!(eMode & UpdateMode::Negative) && !(eMode & UpdateMode::Delete))
 {
-const SwRedlineTable& rTable = 
GetDoc().getIDocumentRedlineAccess().GetRedlineTable();
-SwRedlineTable::size_type n = 
GetDoc().getIDocumentRedlineAccess().GetRedlinePos(*this, RedlineType::Any);
-for( ; n < rTable.size(); ++n )
+std::vector vMyRedlines;
+// walk the list of SwIndex attached to me and see if any of them are 
redlines
+const SwContentIndex* pContentNodeIndex = GetFirstIndex();
+while (pContentNodeIndex)
+{
+SwRangeRedline* pRedl = pContentNodeIndex->GetRedline();
+if (pRe

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

2022-07-27 Thread Michael Stahl (via logerrit)
 sw/inc/unobaseclass.hxx|   19 +++
 sw/inc/unotextcursor.hxx   |4 +---
 sw/inc/unotextrange.hxx|2 +-
 sw/source/core/undo/undel.cxx  |1 +
 sw/source/core/undo/undobj.cxx |7 ++-
 sw/source/core/unocore/unoobj.cxx  |   11 +++
 sw/source/core/unocore/unoobj2.cxx |9 +
 sw/source/core/unocore/unotext.cxx |   22 +++---
 8 files changed, 59 insertions(+), 16 deletions(-)

New commits:
commit baf8d2c1c16cb3bdc4edad2560f95fea807a034f
Author: Michael Stahl 
AuthorDate: Fri Jul 22 19:34:12 2022 +0200
Commit: Michael Stahl 
CommitDate: Wed Jul 27 18:39:27 2022 +0200

sw: delete bookmark if paragraph is fully selected

testTdf96479 requires inserting with absorb=true to be treated as
Replace, and there is of course no string in insertTextContent().
testDeleteFlyAtCharAtStart requires setString("") to be treated as
Delete.

Annoyingly this requires API setString() call to be replaced with
internal call, do this for SwXTextRange and SwXTextCursor which are
the 2 classes typically used in practice.

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

diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
index 049d28b9a748..8635d47c5f8f 100644
--- a/sw/inc/unobaseclass.hxx
+++ b/sw/inc/unobaseclass.hxx
@@ -24,6 +24,9 @@
 #include 
 
 #include 
+
+#include 
+
 #include 
 
 class SfxPoolItem;
@@ -53,6 +56,22 @@ enum class CursorType
 ContentControl,
 };
 
+namespace sw {
+
+enum class DeleteAndInsertMode
+{
+Default = 0,
+ForceExpandHints = (1<<0),
+ForceReplace = (1<<1),
+};
+
+} // namespace sw
+
+namespace o3tl
+{
+template<> struct typed_flags<::sw::DeleteAndInsertMode> : 
is_typed_flags<::sw::DeleteAndInsertMode, 0x03> {};
+}
+
 /*
 Start/EndAction or Start/EndAllAction
 */
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index b055f2d64504..f3bf0a24dcfe 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -102,9 +102,7 @@ public:
 bool IsAtEndOfMeta() const;
 bool IsAtEndOfContentControl() const;
 
-void DeleteAndInsert(OUString const& rText,
-const bool bForceExpandHints);
-
+void DeleteAndInsert(OUString const& rText, ::sw::DeleteAndInsertMode 
eMode);
 // OTextCursorHelper
 virtual const SwPaM*GetPaM() const override;
 virtual SwPaM*  GetPaM() override;
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index 4d8ed2df2c06..b4862b7f6523 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -109,7 +109,7 @@ private:
 //TODO: new exception type for protected content
 /// @throws css::uno::RuntimeException
 voidDeleteAndInsert(
-const OUString& rText, const bool bForceExpandHints);
+const OUString& rText, ::sw::DeleteAndInsertMode eMode);
 voidInvalidate();
 
 virtual ~SwXTextRange() override;
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index d85ea6e83389..0ccb11526bb6 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -1306,6 +1306,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & 
rContext)
 rDoc.getIDocumentContentOperations().DelFullPara( rPam );
 }
 else
+// FIXME: this ends up calling DeleteBookmarks() on the entire rPam 
which deletes too many!
 rDoc.getIDocumentContentOperations().DeleteAndJoin(rPam, 
m_DeleteFlags);
 }
 
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 88600fada374..401dab1ec648 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1136,7 +1136,12 @@ void SwUndoSaveContent::DelContentIndex( const 
SwPosition& rMark,
 && (   type == 
IDocumentMarkAccess::MarkType::TEXT_FIELDMARK
 || type == 
IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK
 || type == 
IDocumentMarkAccess::MarkType::DROPDOWN_FIELDMARK
-|| type == 
IDocumentMarkAccess::MarkType::DATE_FIELDMARK)))
+|| type == 
IDocumentMarkAccess::MarkType::DATE_FIELDMARK))
+|| (bMaybe
+&& !(nDelContentType & DelContentType::Replace)
+&& type == IDocumentMarkAccess::MarkType::BOOKMARK
+&& pStt->nContent == 0 // entire paragraph deleted?
+&& pEnd->nContent == 
pEnd->nNode.GetNode().GetTextNode()->Len()))
 {
 if( bMaybe )
 bSavePos = true;
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index 394534b6c8f6..87ab9acc6141 100644
--- a/sw/source/cor

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

2022-07-27 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx  |1 +
 svx/source/accessibility/AccessibleTextHelper.cxx |5 +++--
 svx/source/svdraw/svdpntv.cxx |2 +-
 svx/source/unodraw/unoshtxt.cxx   |3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 316e4c01f4056242b82047808169c78692a3d9e3
Author: Noel Grandin 
AuthorDate: Wed Jul 27 12:44:29 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 27 18:27:17 2022 +0200

tdf#119840 elide some dynamic_cast

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index f46df6a34342..f7be42e8160d 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -39,6 +39,7 @@ enum class SfxHintId {
 LanguageChanged,
 RedlineChanged,
 DocumentRepair,
+SvxViewChanged,
 
 // VCL text hints
 TextParaInserted,
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx 
b/svx/source/accessibility/AccessibleTextHelper.cxx
index b18c33510211..7a55ac50f343 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -1261,7 +1261,7 @@ namespace accessibility
 bUpdatedBoundRectAndVisibleChildren = true;
 }
 }
-else if ( dynamic_cast( &rHint 
) )
+else if (rHint.GetId() == SfxHintId::SvxViewChanged)
 {
 // just check visibility
 if (!bUpdatedBoundRectAndVisibleChildren)
@@ -1318,8 +1318,9 @@ namespace accessibility
 // notification sequence.
 maEventQueue.Append( *pSdrHint );
 }
-else if( const SvxViewChangedHint* pViewHint = dynamic_cast( &rHint ) )
+else if (rHint.GetId() == SfxHintId::SvxViewChanged)
 {
+const SvxViewChangedHint* pViewHint = static_cast(&rHint);
 // process visibility right away, if not within an
 // open EE notification frame. Otherwise, event
 // processing would be delayed until next EE
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f403ddd578ac..76077516e896 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -99,7 +99,7 @@ OutputDevice* SdrPaintView::GetFirstOutputDevice() const
 }
 
 
-SvxViewChangedHint::SvxViewChangedHint()
+SvxViewChangedHint::SvxViewChangedHint() : SfxHint(SfxHintId::SvxViewChanged)
 {
 }
 
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 71e63997e4f1..9dc311f9c438 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -373,8 +373,9 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, 
const SfxHint& rHint)
 break;
 }
 }
-else if (const SvxViewChangedHint* pViewHint = dynamic_cast(&rHint))
+else if (rHint.GetId() == SfxHintId::SvxViewChanged)
 {
+const SvxViewChangedHint* pViewHint = static_cast(&rHint);
 Broadcast( *pViewHint );
 }
 }


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

2022-07-27 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |   35 ++-
 1 file changed, 26 insertions(+), 9 deletions(-)

New commits:
commit e503ff11a79a2fc229c5fd679573c0227f3f9a73
Author: Jim Raykowski 
AuthorDate: Mon Jul 25 19:12:13 2022 -0800
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 17:49:40 2022 +0200

tdf#149916 revert to showing text of referenced text node

reverts cross-ref field listings in the Navigator to pre commit
21b5d6e0dce7c2034aded96d1499da27094e2781

A static_cast is used in place of a dynamic_cast which should provide
for reduced time to fill the fields members list for documents with
cross reference fields which was the main purpose for commit
21b5d6e0dce7c2034aded96d1499da27094e2781

Change-Id: If2734386de463a1280d835cab54f95e8bd7fab5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137444
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit b8ac21a3981b9d6fd94aa74c4da9026e580f44eb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137433
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index d23fbe63b849..f0fe95f508f3 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -683,16 +683,33 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 }
 else if (pField->GetTypeId() == SwFieldTypesEnum::GetRef)
 {
-OUString sFieldSubTypeOrName;
-auto nSubType = pField->GetSubType();
-if (nSubType == REF_FOOTNOTE)
-sFieldSubTypeOrName = SwResId(STR_FLDREF_FOOTNOTE);
-else if (nSubType == REF_ENDNOTE)
-sFieldSubTypeOrName = SwResId(STR_FLDREF_ENDNOTE);
+const SwGetRefField* pRefField(static_cast(pField));
+if (pRefField->IsRefToHeadingCrossRefBookmark() ||
+pRefField->IsRefToNumItemCrossRefBookmark())
+{
+OUString sExpandedTextOfReferencedTextNode =
+pRefField->GetExpandedTextOfReferencedTextNode(
+*m_pWrtShell->GetLayout());
+if (sExpandedTextOfReferencedTextNode.getLength() > 80)
+{
+sExpandedTextOfReferencedTextNode = 
OUString::Concat(
+
sExpandedTextOfReferencedTextNode.subView(0, 80)) + u"...";
+}
+sText = pField->GetDescription() + u" - " + 
sExpandedTextOfReferencedTextNode;
+}
 else
-sFieldSubTypeOrName = pField->GetFieldName();
-sText = pField->GetDescription() + u" - " + 
sFieldSubTypeOrName
-+ sExpandField;
+{
+OUString sFieldSubTypeOrName;
+auto nSubType = pField->GetSubType();
+if (nSubType == REF_FOOTNOTE)
+sFieldSubTypeOrName = SwResId(STR_FLDREF_FOOTNOTE);
+else if (nSubType == REF_ENDNOTE)
+sFieldSubTypeOrName = SwResId(STR_FLDREF_ENDNOTE);
+else
+sFieldSubTypeOrName = pField->GetFieldName();
+sText = pField->GetDescription() + u" - " + 
sFieldSubTypeOrName
++ sExpandField;
+}
 }
 else
 sText = pField->GetDescription() + u" - " + 
pField->GetFieldName()


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

2022-07-27 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/uno/copytablewizard.cxx |   58 +++--
 1 file changed, 31 insertions(+), 27 deletions(-)

New commits:
commit 8c54c132cac96bb13ff70d3920c81d126fd7c17d
Author: Julien Nabet 
AuthorDate: Wed Jul 27 13:34:22 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 17:48:43 2022 +0200

tdf#150089: not all databases know "RESTART WITH"

Regression from:
https://cgit.freedesktop.org/libreoffice/core/commit
tdf#119962 Fix autoincrement for copied table
in 2021

so use the block added in the patch only when detecting "hsql" or "firebird"
in the string returned by getDatabaseProductName put in lowercase

Change-Id: Ic35a03039e6d06846892d93d5b30186c53f24052
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137499
Reviewed-by: Julien Nabet 
(cherry picked from commit e9d046442c500c82b353d1e2e27b9adc22bf396b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137515
Reviewed-by: Lionel Mamane 
Tested-by: Jenkins

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 6196cba6678c..f7cf836be721 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1346,42 +1346,46 @@ void CopyTableWizard::impl_doCopy_nothrow()
 
 // tdf#119962
 const Reference< XDatabaseMetaData > xDestMetaData( 
m_xDestConnection->getMetaData(), UNO_SET_THROW );
-const OUString sComposedTableName = 
::dbtools::composeTableName( xDestMetaData, xTable, 
::dbtools::EComposeRule::InDataManipulation, true );
+OUString sDatabaseDest = 
xDestMetaData->getDatabaseProductName().toAsciiLowerCase();
+if ( (sDatabaseDest.indexOf("hsql") != -1) || 
(sDatabaseDest.indexOf("firebird") != -1) )
+{
+const OUString sComposedTableName = 
::dbtools::composeTableName( xDestMetaData, xTable, 
::dbtools::EComposeRule::InDataManipulation, true );
 
-OUString aSchema,aTable;
-xTable->getPropertyValue("SchemaName") >>= aSchema;
-xTable->getPropertyValue("Name")   >>= aTable;
-Any aCatalog = xTable->getPropertyValue("CatalogName");
+OUString aSchema,aTable;
+xTable->getPropertyValue("SchemaName") >>= aSchema;
+xTable->getPropertyValue("Name")   >>= aTable;
+Any aCatalog = xTable->getPropertyValue("CatalogName");
 
-const Reference< XResultSet > 
xResultPKCL(xDestMetaData->getPrimaryKeys(aCatalog,aSchema,aTable));
-Reference< XRow > xRowPKCL(xResultPKCL, UNO_QUERY_THROW);
-OUString sPKCL;
-if ( xRowPKCL.is() )
-{
-if (xResultPKCL->next())
+const Reference< XResultSet > 
xResultPKCL(xDestMetaData->getPrimaryKeys(aCatalog,aSchema,aTable));
+Reference< XRow > xRowPKCL(xResultPKCL, UNO_QUERY_THROW);
+OUString sPKCL;
+if ( xRowPKCL.is() )
 {
-sPKCL = xRowPKCL->getString(4);
+if (xResultPKCL->next())
+{
+sPKCL = xRowPKCL->getString(4);
+}
 }
-}
 
-if (!sPKCL.isEmpty())
-{
-OUString strSql = "SELECT MAX(\"" + sPKCL + "\") FROM " + 
sComposedTableName;
+if (!sPKCL.isEmpty())
+{
+OUString strSql = "SELECT MAX(\"" + sPKCL + "\") FROM 
" + sComposedTableName;
 
-Reference< XResultSet > 
xResultMAXNUM(m_xDestConnection->createStatement()->executeQuery(strSql));
-Reference< XRow > xRow(xResultMAXNUM, UNO_QUERY_THROW);
+Reference< XResultSet > 
xResultMAXNUM(m_xDestConnection->createStatement()->executeQuery(strSql));
+Reference< XRow > xRow(xResultMAXNUM, UNO_QUERY_THROW);
 
-sal_Int64 maxVal = -1L;
-if (xResultMAXNUM->next())
-{
-maxVal = xRow->getLong(1);
-}
+sal_Int64 maxVal = -1L;
+if (xResultMAXNUM->next())
+{
+maxVal = xRow->getLong(1);
+}
 
-if (maxVal > 0L)
-{
-strSql = "ALTER TABLE " + sComposedTableName + " ALTER 
\"" + sPKCL + "\" RESTART WITH " + OUString::number(maxVal + 1);
+if (maxVal > 0L)
+{
+strSql = "ALTER TABLE " + sComposedTableName + " 
ALTER \"" + sPKCL + "\" RESTART

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

2022-07-27 Thread Vasily Melenchuk (via logerrit)
 shell/source/win32/simplemail/smplmailclient.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6837355d51430f66950f8b5b6f0b714ca15de1c5
Author: Vasily Melenchuk 
AuthorDate: Tue Jul 26 20:41:34 2022 +0300
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 17:48:18 2022 +0200

tdf#150161: senddoc: use corrected name url: original can be a file path

...and in this case file name will be not parsed and --attach-name
parameter will be empty. This leads to missing file name of
attachment. In case of Thunderbird it is not a big problem,
but Outlook does not want to attach .tmp files: it is "potentially
unsafe attachment".

Change-Id: I7c2f696391e1183211a169b08004c6668771f288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137480
Tested-by: Gabor Kelemen 
Reviewed-by: Mike Kaganski 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 772f7a2dc3508bdebb53b6de4a43685d517cf1ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137516
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index 075eaa34579d..8e85ca0868ee 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -201,7 +201,7 @@ OUString CSmplMailClient::CopyAttachment(const OUString& 
sOrigAttachURL, OUStrin
 osl::FileBase::getFileURLFromSystemPath(sCorrectedOrigAttachURL, 
sCorrectedOrigAttachURL);
 if (osl::File::copy(sCorrectedOrigAttachURL, sNewAttachmentURL) == 
osl::FileBase::RC::E_None)
 {
-INetURLObject url(sOrigAttachURL, 
INetURLObject::EncodeMechanism::WasEncoded);
+INetURLObject url(sCorrectedOrigAttachURL, 
INetURLObject::EncodeMechanism::WasEncoded);
 sUserVisibleName = url.getName(INetURLObject::LAST_SEGMENT, true,
 INetURLObject::DecodeMechanism::WithCharset);
 nodelete = false;


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

2022-07-27 Thread Michael Stahl (via logerrit)
 sw/source/core/unocore/unobkm.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c7a76952b6fa0e6688028047726ac794fdd5cca3
Author: Michael Stahl 
AuthorDate: Wed Jul 27 16:06:05 2022 +0200
Commit: Michael Stahl 
CommitDate: Wed Jul 27 17:40:41 2022 +0200

sw: SolarMutexGuard missing in SwXBookmark::setPropertyValue()

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

diff --git a/sw/source/core/unocore/unobkm.cxx 
b/sw/source/core/unocore/unobkm.cxx
index ca4c465ca551..41170b0be66c 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -406,6 +406,8 @@ void SAL_CALL
 SwXBookmark::setPropertyValue(const OUString& PropertyName,
 const uno::Any& rValue)
 {
+SolarMutexGuard g;
+
 if (PropertyName == UNO_NAME_BOOKMARK_HIDDEN)
 {
 bool bNewValue = false;


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

2022-07-27 Thread Colomban Wendling (via logerrit)
 test/source/a11y/AccessibilityTools.cxx |   14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit d6ce547a1a24379bf1783387e22cbf8d39866757
Author: Colomban Wendling 
AuthorDate: Thu Jul 21 17:43:34 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 27 17:35:03 2022 +0200

Better report unknown constant names by including their values

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

diff --git a/test/source/a11y/AccessibilityTools.cxx 
b/test/source/a11y/AccessibilityTools.cxx
index 266e536dd3ba..44b168b54a94 100644
--- a/test/source/a11y/AccessibilityTools.cxx
+++ b/test/source/a11y/AccessibilityTools.cxx
@@ -112,6 +112,11 @@ bool AccessibilityTools::equals(const 
uno::ReferencegetAccessibleParent(), xctx2->getAccessibleParent());
 }
 
+static OUString unknownName(const sal_Int64 value)
+{
+return "unknown (" + OUString::number(value) + ")";
+}
+
 OUString AccessibilityTools::getRoleName(const sal_Int16 role)
 {
 switch (role)
@@ -291,7 +296,7 @@ OUString AccessibilityTools::getRoleName(const sal_Int16 
role)
 case accessibility::AccessibleRole::WINDOW:
 return "WINDOW";
 };
-return "unknown";
+return unknownName(role);
 }
 
 OUString AccessibilityTools::debugAccessibleStateSet(const sal_Int64 
nCombinedState)
@@ -411,6 +416,9 @@ OUString AccessibilityTools::debugAccessibleStateSet(const 
sal_Int64 nCombinedSt
 case accessibility::AccessibleStateType::VISIBLE:
 name = "VISIBLE";
 break;
+default:
+name = unknownName(state);
+break;
 }
 if (combinedName.getLength())
 combinedName += " | ";
@@ -509,7 +517,7 @@ OUString AccessibilityTools::getEventIdName(const sal_Int16 
event_id)
 case accessibility::AccessibleEventId::VISIBLE_DATA_CHANGED:
 return "VISIBLE_DATA_CHANGED";
 }
-return "unknown";
+return unknownName(event_id);
 }
 
 OUString AccessibilityTools::getRelationTypeName(const sal_Int16 rel_type)
@@ -539,7 +547,7 @@ OUString AccessibilityTools::getRelationTypeName(const 
sal_Int16 rel_type)
 case accessibility::AccessibleRelationType::SUB_WINDOW_OF:
 return "SUB_WINDOW_OF";
 }
-return "unknown";
+return unknownName(rel_type);
 }
 
 OUString AccessibilityTools::debugName(accessibility::XAccessibleContext* ctx)


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

2022-07-27 Thread Colomban Wendling (via logerrit)
 sw/qa/extras/accessibility/accessible_relation_set.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 98180644fe2125027dc3a5df637618d717a54e86
Author: Colomban Wendling 
AuthorDate: Wed Jul 27 15:29:36 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 27 17:19:24 2022 +0200

Don't use magic numbers or off-range enum values

Stop using magic numbers standing for enumeration items.  It makes the
code clearer, and this test is not here to verify the API stays stable
but that the semantics are correct so there's no need for magic values.

Also don't use placeholder values outside the enumeration range and
replace them with the legitimate and pretty appropriate INVALID value,
which has the same effect in the context of this test, and avoids
abusing the APIs.

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

diff --git a/sw/qa/extras/accessibility/accessible_relation_set.cxx 
b/sw/qa/extras/accessibility/accessible_relation_set.cxx
index 3839a61d0504..9220606be3d0 100644
--- a/sw/qa/extras/accessibility/accessible_relation_set.cxx
+++ b/sw/qa/extras/accessibility/accessible_relation_set.cxx
@@ -133,7 +133,8 @@ void AccessibleRelationSet::contents_flows_to_and_from()
 css::uno::Reference set2
 = oObj2->getAccessibleRelationSet();
 
-sal_Int16 relationtypes[2] = { -1, -1 };
+sal_Int16 relationtypes[2] = { 
accessibility::AccessibleRelationType::INVALID,
+   
accessibility::AccessibleRelationType::INVALID };
 css::uno::Reference atargets[2];
 
 if (set2.is())
@@ -141,14 +142,14 @@ void AccessibleRelationSet::contents_flows_to_and_from()
 CPPUNIT_ASSERT_EQUAL_MESSAGE("didn't gain correct count of relations", 
sal_Int32(2),
  set2->getRelationCount());
 sal_Int16 tmprelation = set2->getRelation(0).RelationType;
-if (tmprelation == 1)
+if (tmprelation == 
accessibility::AccessibleRelationType::CONTENT_FLOWS_FROM)
 {
 css::uno::Reference adummy(
 set2->getRelation(0).TargetSet[0], uno::UNO_QUERY_THROW);
 atargets[0] = adummy;
 relationtypes[0] = tmprelation;
 }
-else if (tmprelation == 2)
+else if (tmprelation == 
accessibility::AccessibleRelationType::CONTENT_FLOWS_TO)
 {
 css::uno::Reference adummy(
 set2->getRelation(0).TargetSet[0], uno::UNO_QUERY_THROW);
@@ -160,14 +161,14 @@ void AccessibleRelationSet::contents_flows_to_and_from()
 CPPUNIT_FAIL("didn't gain correct relation type");
 }
 tmprelation = set2->getRelation(1).RelationType;
-if (tmprelation == 1)
+if (tmprelation == 
accessibility::AccessibleRelationType::CONTENT_FLOWS_FROM)
 {
 css::uno::Reference adummy(
 set2->getRelation(1).TargetSet[0], uno::UNO_QUERY_THROW);
 atargets[0] = adummy;
 relationtypes[0] = tmprelation;
 }
-else if (tmprelation == 2)
+else if (tmprelation == 
accessibility::AccessibleRelationType::CONTENT_FLOWS_TO)
 {
 css::uno::Reference adummy(
 set2->getRelation(1).TargetSet[0], uno::UNO_QUERY_THROW);


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

2022-07-27 Thread Caolán McNamara (via logerrit)
 svx/source/accessibility/AccessibleTextHelper.cxx |   18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 8e5c1982c41c234027245fe2da6bf9bc3f5fe238
Author: Caolán McNamara 
AuthorDate: Wed Jul 27 11:04:34 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 27 17:07:54 2022 +0200

tdf#108560 horribly slow to paste many lines into editeng with a11y active

looks to me that once the bound rect (and visible children) are synced
that they won't change again so continued recalculation of bounds
doesn't achieve anything except super expensive calc for no effect.

Change-Id: I1684e3724bca28d03f7c255c2d7a40eee1b70eae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137497
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx 
b/svx/source/accessibility/AccessibleTextHelper.cxx
index 5c8ce773b028..b18c33510211 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -1118,6 +1118,8 @@ namespace accessibility
 bEverythingUpdated = true;
 }
 
+bool bUpdatedBoundRectAndVisibleChildren(false);
+
 while( !maEventQueue.IsEmpty() )
 {
 ::std::unique_ptr< SfxHint > pHint( maEventQueue.PopFront() );
@@ -1252,14 +1254,22 @@ namespace accessibility
 }
 
 // in all cases, check visibility afterwards.
-UpdateVisibleChildren();
-UpdateBoundRect();
+if (!bUpdatedBoundRectAndVisibleChildren)
+{
+UpdateVisibleChildren();
+UpdateBoundRect();
+bUpdatedBoundRectAndVisibleChildren = true;
+}
 }
 else if ( dynamic_cast( &rHint 
) )
 {
 // just check visibility
-UpdateVisibleChildren();
-UpdateBoundRect();
+if (!bUpdatedBoundRectAndVisibleChildren)
+{
+UpdateVisibleChildren();
+UpdateBoundRect();
+bUpdatedBoundRectAndVisibleChildren = true;
+}
 }
 // it's VITAL to keep the SfxSimpleHint last! It's the 
base of some classes above!
 else if( rHint.GetId() == SfxHintId::Dying)


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

2022-07-27 Thread Colomban Wendling (via logerrit)
 test/source/a11y/AccessibilityTools.cxx |   21 +
 1 file changed, 21 insertions(+)

New commits:
commit 150f89d3b39fd062af56e21aa6d185758af67c0e
Author: Colomban Wendling 
AuthorDate: Thu Jul 21 16:36:32 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 27 17:04:17 2022 +0200

Fix comparing some Writer objects

Offscreen objects in Writer are not exposed as children of their
parent, but might be reachable through relations. In this case, similar
objects can easily be mistakenly deemed equal (e.g. empty paragraphs
will have the same role, empty name and description, etc.).

Try to avoid this by taking into account the object's relations, which
should at least have different targets if they are not the same.

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

diff --git a/test/source/a11y/AccessibilityTools.cxx 
b/test/source/a11y/AccessibilityTools.cxx
index f727bd41087f..266e536dd3ba 100644
--- a/test/source/a11y/AccessibilityTools.cxx
+++ b/test/source/a11y/AccessibilityTools.cxx
@@ -88,6 +88,27 @@ bool AccessibilityTools::equals(const 
uno::ReferencegetAccessibleIndexInParent() != 
xctx2->getAccessibleIndexInParent())
 return false;
 
+/* because in Writer at least some children only are referenced by their 
relations to others
+ * objects, we need to account for that as their index in parent is 
incorrect (so not
+ * necessarily unique) */
+auto relset1 = xctx1->getAccessibleRelationSet();
+auto relset2 = xctx2->getAccessibleRelationSet();
+if (relset1.is() != relset2.is())
+return false;
+else if (relset1.is())
+{
+auto relCount1 = relset1->getRelationCount();
+auto relCount2 = relset2->getRelationCount();
+if (relCount1 != relCount2)
+return false;
+
+for (sal_Int32 i = 0; i < relCount1; ++i)
+{
+if (relset1->getRelation(i) != relset2->getRelation(i))
+return false;
+}
+}
+
 return equals(xctx1->getAccessibleParent(), xctx2->getAccessibleParent());
 }
 


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

2022-07-27 Thread Tomaž Vajngerl (via logerrit)
 svx/CppunitTest_svx_core.mk|   49 
 svx/Module_svx.mk  |1 
 svx/qa/unit/core.cxx   |   97 +
 svx/qa/unit/data/GraphicObjectResolverTest.zip |binary
 svx/source/xml/xmlgrhlp.cxx|7 +
 5 files changed, 152 insertions(+), 2 deletions(-)

New commits:
commit 2bfad80805c248b47d099c1707ce4f1926867b82
Author: Tomaž Vajngerl 
AuthorDate: Wed Jul 20 22:01:31 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 16:48:14 2022 +0200

tdf#123983 fix loading graphic that is in root folder + test

We need to detect that the storage name is empty, so in that case
the root storage needs to be set as the current storage.

Change-Id: Ibe3287ccf1f1513a3531dcf4d540a456cca8dfb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137276
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit d449da36086409e3cc440036193c4fc8a10a37a1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137424
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137469

diff --git a/svx/CppunitTest_svx_core.mk b/svx/CppunitTest_svx_core.mk
new file mode 100644
index ..67445767cc1d
--- /dev/null
+++ b/svx/CppunitTest_svx_core.mk
@@ -0,0 +1,49 @@
+# -*- 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,svx_core))
+
+$(eval $(call gb_CppunitTest_use_externals,svx_core,\
+   boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,svx_core, \
+svx/qa/unit/core \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,svx_core, \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+svx \
+svxcore \
+test \
+tl \
+unotest \
+utl \
+vcl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,svx_core))
+
+$(eval $(call gb_CppunitTest_use_ure,svx_core))
+$(eval $(call gb_CppunitTest_use_vcl,svx_core))
+
+$(eval $(call gb_CppunitTest_use_rdb,svx_core,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,svx_core,\
+   officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,svx_core))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 3891829c8108..27a709b23d1b 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Module_add_check_targets,svx,\
CppunitTest_svx_unit \
CppunitTest_svx_gallery_test \
CppunitTest_svx_removewhichrange \
+   CppunitTest_svx_core \
 ))
 
 # screenshots
diff --git a/svx/qa/unit/core.cxx b/svx/qa/unit/core.cxx
new file mode 100644
index ..26cb13ee1faf
--- /dev/null
+++ b/svx/qa/unit/core.cxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+using namespace ::com::sun::star;
+
+namespace
+{
+/// Tests for svx/source/core/ code.
+class Test : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+uno::Reference mxComponent;
+
+public:
+void setUp() override;
+void tearDown() override;
+};
+
+void Test::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void Test::tearDown()
+{
+if (mxComponent.is())
+mxComponent->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/svx/qa/unit/data/";
+
+CPPUNIT_TEST_FIXTURE(Test, testGraphicObjectResolver)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"GraphicObjectResolverTest.zip";
+uno::Reference xStorage
+= 
comphelper::OStorageHelper::GetStorageOfFormatFromURL(ZIP_STORAGE_FORMAT_STRING,
 aURL,
+
embed::ElementModes::READWRITE);
+CPPUNIT_ASSERT(xStorage.is());
+
+rtl::Reference xGraphicHelper
+= SvXMLGraphicHelper::Create(xStorage, SvXMLGraphicHelperMode::Read);
+CPPUNIT_ASSERT(xGraphicHelper.is());
+
+// Test name in root folder
+{
+uno::Reference

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

2022-07-27 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/model/main/DataTable.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 50c480bc1f68bc681fe369e0cb002a8f5b51843a
Author: Tomaž Vajngerl 
AuthorDate: Sat May 21 10:51:55 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 27 16:39:34 2022 +0200

chart2: add char properties to the DataTable model

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

diff --git a/chart2/source/model/main/DataTable.cxx 
b/chart2/source/model/main/DataTable.cxx
index cc07cc1b55f5..5f3a5eb18403 100644
--- a/chart2/source/model/main/DataTable.cxx
+++ b/chart2/source/model/main/DataTable.cxx
@@ -93,6 +93,7 @@ private:
 lcl_AddPropertiesToVector(aProperties);
 ::chart::LinePropertiesHelper::AddPropertiesToVector(aProperties);
 ::chart::FillProperties::AddPropertiesToVector(aProperties);
+::chart::CharacterProperties::AddPropertiesToVector(aProperties);
 std::sort(aProperties.begin(), aProperties.end(), 
::chart::PropertyNameLess());
 
 return comphelper::containerToSequence(aProperties);
@@ -211,7 +212,8 @@ sal_Bool SAL_CALL DataTable::supportsService(const 
OUString& rServiceName)
 uno::Sequence SAL_CALL DataTable::getSupportedServiceNames()
 {
 return { "com.sun.star.chart2.DataTable", "com.sun.star.beans.PropertySet",
- "com.sun.star.drawing.FillProperties", 
"com.sun.star.drawing.LineProperties" };
+ "com.sun.star.drawing.FillProperties", 
"com.sun.star.drawing.LineProperties",
+ "com.sun.star.style.CharacterProperties" };
 }
 
 IMPLEMENT_FORWARD_XINTERFACE2(DataTable, DataTable_Base, 
::property::OPropertySet)


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

2022-07-27 Thread Miklos Vajna (via logerrit)
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit db4ac0542a33ba2ff4e64717ca1eb6de563f1a8c
Author: Miklos Vajna 
AuthorDate: Wed Jul 27 14:32:59 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 16:27:15 2022 +0200

sw content controls, plain text: send state changes to LOK

This is similar to commit 373f655acbdad88ff5d76324f32650fe3a005e2e (Send
state changes of content control UNO commands to LOK, 2022-07-22), but
plain text was not a type at that point.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b2e38b699e2e..029e8b72c667 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3176,6 +3176,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:InsertContentControl"),
 OUString(".uno:InsertDateContentControl"),
 OUString(".uno:InsertDropdownContentControl"),
+OUString(".uno:InsertPlainTextContentControl"),
 OUString(".uno:InsertPictureContentControl")
 };
 
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 516c10d6e2ed..f2046acaecfe 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1122,6 +1122,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "InsertContentControl" ||
  aEvent.FeatureURL.Path == "InsertDateContentControl" ||
  aEvent.FeatureURL.Path == "InsertDropdownContentControl" ||
+ aEvent.FeatureURL.Path == "InsertPlainTextContentControl" ||
  aEvent.FeatureURL.Path == "InsertPictureContentControl")
 {
 aBuffer.append(aEvent.IsEnabled ? std::u16string_view(u"enabled") : 
std::u16string_view(u"disabled"));


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-6.2.8.2.M9'

2022-07-27 Thread Thorsten Behrens (via logerrit)
Tag 'mimo-6.2.8.2.M9' created by Andras Timar  at 
2022-07-27 13:57 +

mimo-6.2.8.2.M9

Changes since mimo-6.2.8.2.M8-6:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-6.2.8.2.M9' - 0 commits -

2022-07-27 Thread (via logerrit)
Rebased ref, commits from common ancestor:


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-6.4.7.2.M6'

2022-07-27 Thread Thorsten Behrens (via logerrit)
Tag 'mimo-6.4.7.2.M6' created by Andras Timar  at 
2022-07-27 13:56 +

mimo-6.4.7.2.M6

Changes since mimo-6.4.7.2.M5-6:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-6.4.7.2.M6' - 0 commits -

2022-07-27 Thread (via logerrit)
Rebased ref, commits from common ancestor:


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-7.0.7.0.M10'

2022-07-27 Thread Thorsten Behrens (via logerrit)
Tag 'mimo-7.0.7.0.M10' created by Andras Timar  at 
2022-07-27 13:55 +

mimo-7.0.7.0.M10

Changes since mimo-7.0.7.0.M9-7:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-7.0.7.0.M10' - 0 commits -

2022-07-27 Thread (via logerrit)
Rebased ref, commits from common ancestor:


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-0' - external/gpgmepp external/libassuan external/libgpg-error

2022-07-27 Thread Thorsten Behrens (via logerrit)
 external/gpgmepp/ExternalProject_gpgmepp.mk   |2 +-
 external/libassuan/ExternalProject_libassuan.mk   |2 +-
 external/libgpg-error/ExternalProject_libgpg-error.mk |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 81791d2ef3552db26c458a1eb0de33fce061502c
Author: Thorsten Behrens 
AuthorDate: Tue Jun 15 18:03:27 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Jul 27 15:54:07 2022 +0200

avoid windres preprocessor quoting-messups with current cygwin

apparently fresh installs of cygwin behave differently with the windres
command's quoting and treats --preprocessor='cpp foo bar' as a single file
"cpp foo bar" to run instead of running "cpp" with the arguments "foo"
and "bar".
(-D and -I options are passed to the preprocessor automatically, so no
need to prefix those with --preprocessor-arg)

Conflicts:
 - solenv/gbuild/platform/com_MSC_defs.mk

Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965
Tested-by: Jenkins
Reviewed-by: Georgy Litvinov 
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 9b120ad2773676c5445d4664e9c7007c575249a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127097
Tested-by: Vasily Melenchuk 
Reviewed-by: Vasily Melenchuk 
Reviewed-by: Thorsten Behrens 

diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk 
b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 989844465f1f..4cf9c217700e 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -40,7 +40,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): 
$(call gb_Executable_

$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call 
gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
-  RC='windres -O COFF 
--target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+  RC='windres -O COFF 
--target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
   MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index 565d38ff9a1c..137f1a229539 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -35,7 +35,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): 
$(call gb_Executabl
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
 --host=$(gb_ExternalProject_libassuan_host) \
-   RC='windres -O COFF 
--target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+   RC='windres -O COFF 
--target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
  && $(MAKE) \
)
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk 
b/external/libgpg-error/ExternalProject_libgpg-error.mk
index cf0b594dca24..814876cc0810 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -29,7 +29,7 @@ $(call 
gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut
--disable-doc \
--disable-tests \
--host=$(gb_ExternalProject_libgpg-error_host) \
-   RC='windres -O COFF 
--target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+   RC='windres -O COFF 
--target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
&& $(MAKE) \
)
$(call gb_Trace_EndRange,libgpg-error,EXTERNAL)


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-4' - external/gpgmepp external/libassuan external/libgpg-error

2022-07-27 Thread Thorsten Behrens (via logerrit)
 external/gpgmepp/ExternalProject_gpgmepp.mk   |2 +-
 external/libassuan/ExternalProject_libassuan.mk   |2 +-
 external/libgpg-error/ExternalProject_libgpg-error.mk |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fc90416b283b85fb2d2448a4f701c8c3e5e497e3
Author: Thorsten Behrens 
AuthorDate: Tue Jun 15 18:03:27 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Jul 27 15:53:38 2022 +0200

avoid windres preprocessor quoting-messups with current cygwin

apparently fresh installs of cygwin behave differently with the windres
command's quoting and treats --preprocessor='cpp foo bar' as a single file
"cpp foo bar" to run instead of running "cpp" with the arguments "foo"
and "bar".
(-D and -I options are passed to the preprocessor automatically, so no
need to prefix those with --preprocessor-arg)

Conflicts:
 - solenv/gbuild/platform/com_MSC_defs.mk

Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965
Tested-by: Jenkins
Reviewed-by: Georgy Litvinov 
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 9b120ad2773676c5445d4664e9c7007c575249a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127097
Tested-by: Vasily Melenchuk 
Reviewed-by: Vasily Melenchuk 
Reviewed-by: Thorsten Behrens 

diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk 
b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 8ecdf60e6f87..d7835622ca21 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -39,7 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): 
$(call gb_Executable_

$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call 
gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
-  RC='windres -O COFF 
--target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+  RC='windres -O COFF 
--target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
   MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index 83d79a520988..899c21e4cec9 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -34,7 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): 
$(call gb_Executabl
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
 --host=$(gb_ExternalProject_libassuan_host) \
-   RC='windres -O COFF 
--target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+   RC='windres -O COFF 
--target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
  && $(MAKE) \
)
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk 
b/external/libgpg-error/ExternalProject_libgpg-error.mk
index 1fcd63180e20..e5155aad94c1 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -28,7 +28,7 @@ $(call 
gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut
--disable-doc \
--disable-tests \
--host=$(gb_ExternalProject_libgpg-error_host) \
-   RC='windres -O COFF 
--target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+   RC='windres -O COFF 
--target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
&& $(MAKE) \
)
 else


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-2' - external/gpgmepp external/libassuan external/libgpg-error

2022-07-27 Thread Thorsten Behrens (via logerrit)
 external/gpgmepp/ExternalProject_gpgmepp.mk   |2 +-
 external/libassuan/ExternalProject_libassuan.mk   |2 +-
 external/libgpg-error/ExternalProject_libgpg-error.mk |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a8f1dd36db1188d18ab0d56674a89a6f8f8c40ea
Author: Thorsten Behrens 
AuthorDate: Tue Jun 15 18:03:27 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Jul 27 15:52:43 2022 +0200

avoid windres preprocessor quoting-messups with current cygwin

apparently fresh installs of cygwin behave differently with the windres
command's quoting and treats --preprocessor='cpp foo bar' as a single file
"cpp foo bar" to run instead of running "cpp" with the arguments "foo"
and "bar".
(-D and -I options are passed to the preprocessor automatically, so no
need to prefix those with --preprocessor-arg)

Conflicts:
 - solenv/gbuild/platform/com_MSC_defs.mk

Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965
Tested-by: Jenkins
Reviewed-by: Georgy Litvinov 
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 9b120ad2773676c5445d4664e9c7007c575249a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127097
Tested-by: Vasily Melenchuk 
Reviewed-by: Vasily Melenchuk 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 9fafa67c9bc85d9e5a13d18b7b7ecbc8de700c04)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129750
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 

diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk 
b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 452f922750d6..dac2fad1361b 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -40,7 +40,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): 
$(call gb_Executable_
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
$(if $(filter 
$(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
-  RC='windres -O COFF 
--target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+  RC='windres -O COFF 
--target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
   MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index 83d79a520988..899c21e4cec9 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -34,7 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): 
$(call gb_Executabl
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
 --host=$(gb_ExternalProject_libassuan_host) \
-   RC='windres -O COFF 
--target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+   RC='windres -O COFF 
--target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
  && $(MAKE) \
)
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk 
b/external/libgpg-error/ExternalProject_libgpg-error.mk
index 1fcd63180e20..e5155aad94c1 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -28,7 +28,7 @@ $(call 
gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut
--disable-doc \
--disable-tests \
--host=$(gb_ExternalProject_libgpg-error_host) \
-   RC='windres -O COFF 
--target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+   RC='windres -O COFF 
--target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call 
gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED 
-DWINAPI_FAMILY=0 $(SOLARINC)' \
&& $(MAKE) \
)
 else


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

2022-07-27 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   24 
 vcl/unx/gtk4/convert3to4.cxx |1 +
 2 files changed, 21 insertions(+), 4 deletions(-)

New commits:
commit 9d777ef254330bb3d6af06e62ba602fe17824db9
Author: Caolán McNamara 
AuthorDate: Wed Jul 27 13:07:54 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 27 15:25:27 2022 +0200

gtk4: don't use an arrow for the gtk3->gtk4 menus

this was the clipboard dropdown matches the save one

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

diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index e9cd1cf7..9032ac4692a7 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -973,6 +973,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 
 // 
 xChild->appendChild(CreateProperty(xDoc, "menu-model", sId));
+xChild->appendChild(CreateProperty(xDoc, "has-arrow", 
"False"));
 xChild->appendChild(CreateProperty(xDoc, "visible", "False"));
 }
 }
commit 1b517e049001b856e8043c6892a4819709b8efcf
Author: Caolán McNamara 
AuthorDate: Wed Jul 27 12:56:12 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 27 15:25:11 2022 +0200

gtk4: fill in more of this menu related stub

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 05a0622577c2..0236f1aa9529 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -11285,13 +11285,29 @@ public:
 gtk_menu_reorder_child(m_pMenu, pItem, pos);
 #else
 SAL_WARN("vcl.gtk", "needs to be implemented for gtk4");
-(void)pos;
-(void)rId;
-(void)rStr;
 (void)pIconName;
 (void)pImageSurface;
 (void)rGraphic;
-(void)eCheckRadioFalse;
+
+if (GMenuModel* pMenuModel = m_pMenu ? 
gtk_popover_menu_get_menu_model(m_pMenu) : nullptr)
+{
+auto aSectionAndPos = get_section_and_pos_for(pMenuModel, pos);
+GMenu* pMenu = G_MENU(aSectionAndPos.first);
+// action with a target value ... the action name and target value 
are separated by a double
+// colon ... For example: "app.action::target"
+OUString sActionAndTarget;
+if (eCheckRadioFalse == TRISTATE_INDET)
+sActionAndTarget = "menu.normal." + rId + "::" + rId;
+else
+sActionAndTarget = "menu.radio." + rId + "::" + rId;
+g_menu_insert(pMenu, aSectionAndPos.second, 
MapToGtkAccelerator(rStr).getStr(), sActionAndTarget.toUtf8().getStr());
+
+assert(eCheckRadioFalse == TRISTATE_INDET); // come back to this 
later
+
+// TODO not redo entire group
+update_action_group_from_popover_model();
+}
+
 #endif
 }
 


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

2022-07-27 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/uno/copytablewizard.cxx |   58 +++--
 1 file changed, 31 insertions(+), 27 deletions(-)

New commits:
commit 4d855bb916bd41221e2b23d6d782e19b4b2740f9
Author: Julien Nabet 
AuthorDate: Wed Jul 27 13:34:22 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Jul 27 14:42:15 2022 +0200

tdf#150089: not all databases know "RESTART WITH"

Regression from:
https://cgit.freedesktop.org/libreoffice/core/commit
tdf#119962 Fix autoincrement for copied table
in 2021

so use the block added in the patch only when detecting "hsql" or "firebird"
in the string returned by getDatabaseProductName put in lowercase

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

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 6196cba6678c..f7cf836be721 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1346,42 +1346,46 @@ void CopyTableWizard::impl_doCopy_nothrow()
 
 // tdf#119962
 const Reference< XDatabaseMetaData > xDestMetaData( 
m_xDestConnection->getMetaData(), UNO_SET_THROW );
-const OUString sComposedTableName = 
::dbtools::composeTableName( xDestMetaData, xTable, 
::dbtools::EComposeRule::InDataManipulation, true );
+OUString sDatabaseDest = 
xDestMetaData->getDatabaseProductName().toAsciiLowerCase();
+if ( (sDatabaseDest.indexOf("hsql") != -1) || 
(sDatabaseDest.indexOf("firebird") != -1) )
+{
+const OUString sComposedTableName = 
::dbtools::composeTableName( xDestMetaData, xTable, 
::dbtools::EComposeRule::InDataManipulation, true );
 
-OUString aSchema,aTable;
-xTable->getPropertyValue("SchemaName") >>= aSchema;
-xTable->getPropertyValue("Name")   >>= aTable;
-Any aCatalog = xTable->getPropertyValue("CatalogName");
+OUString aSchema,aTable;
+xTable->getPropertyValue("SchemaName") >>= aSchema;
+xTable->getPropertyValue("Name")   >>= aTable;
+Any aCatalog = xTable->getPropertyValue("CatalogName");
 
-const Reference< XResultSet > 
xResultPKCL(xDestMetaData->getPrimaryKeys(aCatalog,aSchema,aTable));
-Reference< XRow > xRowPKCL(xResultPKCL, UNO_QUERY_THROW);
-OUString sPKCL;
-if ( xRowPKCL.is() )
-{
-if (xResultPKCL->next())
+const Reference< XResultSet > 
xResultPKCL(xDestMetaData->getPrimaryKeys(aCatalog,aSchema,aTable));
+Reference< XRow > xRowPKCL(xResultPKCL, UNO_QUERY_THROW);
+OUString sPKCL;
+if ( xRowPKCL.is() )
 {
-sPKCL = xRowPKCL->getString(4);
+if (xResultPKCL->next())
+{
+sPKCL = xRowPKCL->getString(4);
+}
 }
-}
 
-if (!sPKCL.isEmpty())
-{
-OUString strSql = "SELECT MAX(\"" + sPKCL + "\") FROM " + 
sComposedTableName;
+if (!sPKCL.isEmpty())
+{
+OUString strSql = "SELECT MAX(\"" + sPKCL + "\") FROM 
" + sComposedTableName;
 
-Reference< XResultSet > 
xResultMAXNUM(m_xDestConnection->createStatement()->executeQuery(strSql));
-Reference< XRow > xRow(xResultMAXNUM, UNO_QUERY_THROW);
+Reference< XResultSet > 
xResultMAXNUM(m_xDestConnection->createStatement()->executeQuery(strSql));
+Reference< XRow > xRow(xResultMAXNUM, UNO_QUERY_THROW);
 
-sal_Int64 maxVal = -1L;
-if (xResultMAXNUM->next())
-{
-maxVal = xRow->getLong(1);
-}
+sal_Int64 maxVal = -1L;
+if (xResultMAXNUM->next())
+{
+maxVal = xRow->getLong(1);
+}
 
-if (maxVal > 0L)
-{
-strSql = "ALTER TABLE " + sComposedTableName + " ALTER 
\"" + sPKCL + "\" RESTART WITH " + OUString::number(maxVal + 1);
+if (maxVal > 0L)
+{
+strSql = "ALTER TABLE " + sComposedTableName + " 
ALTER \"" + sPKCL + "\" RESTART WITH " + OUString::number(maxVal + 1);
 
-m_xDestConnection->createStatement()->execute(strSql);
+
m_xDestConnectio

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

2022-07-27 Thread Vasily Melenchuk (via logerrit)
 shell/source/win32/simplemail/smplmailclient.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 772f7a2dc3508bdebb53b6de4a43685d517cf1ef
Author: Vasily Melenchuk 
AuthorDate: Tue Jul 26 20:41:34 2022 +0300
Commit: Thorsten Behrens 
CommitDate: Wed Jul 27 14:27:03 2022 +0200

tdf#150161: senddoc: use corrected name url: original can be a file path

...and in this case file name will be not parsed and --attach-name
parameter will be empty. This leads to missing file name of
attachment. In case of Thunderbird it is not a big problem,
but Outlook does not want to attach .tmp files: it is "potentially
unsafe attachment".

Change-Id: I7c2f696391e1183211a169b08004c6668771f288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137480
Tested-by: Gabor Kelemen 
Reviewed-by: Mike Kaganski 
Reviewed-by: Thorsten Behrens 

diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index 075eaa34579d..8e85ca0868ee 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -201,7 +201,7 @@ OUString CSmplMailClient::CopyAttachment(const OUString& 
sOrigAttachURL, OUStrin
 osl::FileBase::getFileURLFromSystemPath(sCorrectedOrigAttachURL, 
sCorrectedOrigAttachURL);
 if (osl::File::copy(sCorrectedOrigAttachURL, sNewAttachmentURL) == 
osl::FileBase::RC::E_None)
 {
-INetURLObject url(sOrigAttachURL, 
INetURLObject::EncodeMechanism::WasEncoded);
+INetURLObject url(sCorrectedOrigAttachURL, 
INetURLObject::EncodeMechanism::WasEncoded);
 sUserVisibleName = url.getName(INetURLObject::LAST_SEGMENT, true,
 INetURLObject::DecodeMechanism::WithCharset);
 nodelete = false;


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

2022-07-27 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx |5 ++---
 sw/source/filter/html/wrthtml.cxx  |8 
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit b9d4e9c3c10f0d76ecf83dbd259ba6e5544836e9
Author: Miklos Vajna 
AuthorDate: Tue Jul 26 13:47:54 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 13:41:24 2022 +0200

sw reqif-xhtml export: fix duplicated bookmark names in fragments

The problem was that exporting multiple documents to reqif fragments and
then combining them to a single document resulted in non-unique bookmark
identifiers, even if they were unique in the original source documents.

Writer already tries to ensure unique bookmark names, but if the export
result is not a full document on its own, this is not enough. On the
other hand, bookmarks in these fragments are almost always used
unintentionally.

Fix the problem by keeping the bookmark output in the HTML/XHTML case,
but disable it for ReqIF.

Note that we disable unique anchors in general, so this fixes the same
problem with section anchors as well.

(cherry picked from commit 4e6327c673075ab4a44f497a06a8dbf759c1a72a)

Change-Id: Ib47d1589fa08d205b7904e21656c937bfbca0a2f

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 851d8409b549..9d2aed175a66 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -620,9 +620,8 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
 // This was "" instead of CSS + namespace prefix was missing.
 CPPUNIT_ASSERT(aStream.indexOf("") != -1);
+// This was '': non-unique bookmark name in reqif 
fragment.
+CPPUNIT_ASSERT_EQUAL(static_cast(-1), 
aStream.indexOf(" has to be unique inside the whole document, but
+// we only write a fragment, so we can't ensure the ID is indeed
+// unique. Just don't write anchors in the ReqIF case.
+return;
+}
+
 OStringBuffer sOut;
 sOut.append("<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor " ");
 if (!mbXHTML)


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

2022-07-27 Thread Miklos Vajna (via logerrit)
 xmloff/qa/unit/data/content-control-dropdown.docx |binary
 xmloff/qa/unit/text.cxx   |   19 +++
 xmloff/source/text/txtparae.cxx   |   37 +++---
 3 files changed, 39 insertions(+), 17 deletions(-)

New commits:
commit c5df13ad4c22e8878eec0c2d5e431515537799ad
Author: Miklos Vajna 
AuthorDate: Tue Jul 26 08:50:03 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 13:40:59 2022 +0200

crashtest: fix crash on ODT export of forum-mso-de-84211.docx

XMLTextParagraphExport::ExportContentControl() disables the export of
the  XML element in autostyle mode, then it should also
disable the export of the matching attributes.

(cherry picked from commit 6cf1f3c09c43bd3bbcda611a9476ff5e64c5164f)

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

diff --git a/xmloff/qa/unit/data/content-control-dropdown.docx 
b/xmloff/qa/unit/data/content-control-dropdown.docx
new file mode 100644
index ..1391c90f1a63
Binary files /dev/null and b/xmloff/qa/unit/data/content-control-dropdown.docx 
differ
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index 99bb0ce3ba91..94d7da5e30a9 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -795,6 +795,25 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, 
testPlainTextContentControlImport)
 CPPUNIT_ASSERT(bPlainText);
 }
 
+CPPUNIT_TEST_FIXTURE(XmloffStyleTest, 
testDropdownContentControlAutostyleExport)
+{
+// Given a document with a dropdown content control, and formatting that 
forms an autostyle in
+// ODT:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"content-control-dropdown.docx";
+getComponent() = loadFromDesktop(aURL);
+
+// When saving that document to ODT, then make sure no assertion failure 
happens:
+uno::Reference xStorable(getComponent(), uno::UNO_QUERY);
+uno::Sequence aStoreProps = 
comphelper::InitPropertySequence({
+{ "FilterName", uno::Any(OUString("writer8")) },
+});
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+// Without the accompanying fix in place, this test would have failed, we 
had duplicated XML
+// attributes.
+xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 09dde3a8127a..9f73f02a2790 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3960,27 +3960,30 @@ void XMLTextParagraphExport::ExportContentControl(
 SvXMLElementExport aElem(GetExport(), bExport, XML_NAMESPACE_LO_EXT, 
XML_CONTENT_CONTROL, false,
  false);
 
-// Export list items of dropdowns.
-uno::Sequence aListItems;
-xPropertySet->getPropertyValue("ListItems") >>= aListItems;
-for (const auto& rListItem : aListItems)
+if (bExport)
 {
-comphelper::SequenceAsHashMap aMap(rListItem);
-auto it = aMap.find("DisplayText");
-OUString aValue;
-if (it != aMap.end() && (it->second >>= aValue) && !aValue.isEmpty())
+// Export list items of dropdowns.
+uno::Sequence aListItems;
+xPropertySet->getPropertyValue("ListItems") >>= aListItems;
+for (const auto& rListItem : aListItems)
 {
-GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_DISPLAY_TEXT, 
aValue);
-}
+comphelper::SequenceAsHashMap aMap(rListItem);
+auto it = aMap.find("DisplayText");
+OUString aValue;
+if (it != aMap.end() && (it->second >>= aValue) && 
!aValue.isEmpty())
+{
+GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, 
XML_DISPLAY_TEXT, aValue);
+}
 
-it = aMap.find("Value");
-if (it != aMap.end() && (it->second >>= aValue))
-{
-GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_VALUE, aValue);
-}
+it = aMap.find("Value");
+if (it != aMap.end() && (it->second >>= aValue))
+{
+GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_VALUE, 
aValue);
+}
 
-SvXMLElementExport aItem(GetExport(), bExport, XML_NAMESPACE_LO_EXT, 
XML_LIST_ITEM, false,
- false);
+SvXMLElementExport aItem(GetExport(), bExport, 
XML_NAMESPACE_LO_EXT, XML_LIST_ITEM, false,
+false);
+}
 }
 
 // Recurse to export content.


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - officecfg/registry sw/inc sw/qa sw/sdi sw/source sw/uiconfig

2022-07-27 Thread Miklos Vajna (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 +++
 sw/inc/cmdid.h  |1 
 sw/qa/uibase/wrtsh/wrtsh.cxx|   21 
++
 sw/sdi/_textsh.sdi  |6 ++
 sw/sdi/swriter.sdi  |   17 

 sw/source/uibase/shells/textsh.cxx  |5 ++
 sw/source/uibase/uiview/view.cxx|2 
 sw/source/uibase/wrtsh/wrtsh1.cxx   |4 +
 sw/uiconfig/swriter/menubar/menubar.xml |1 
 sw/uiconfig/swriter/menubar/mscompatibleformsmenu.xml   |1 
 10 files changed, 65 insertions(+), 1 deletion(-)

New commits:
commit bdc4f593b3dbc5e9e21fa0a732f8986b029c5c06
Author: Miklos Vajna 
AuthorDate: Tue Jul 26 08:21:48 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 13:39:36 2022 +0200

sw content controls, plain text: add insert UI

- handle the plain text case in SwWrtShell::InsertContentControl()

- expose this as a new .uno:InsertPlainTextContentControl command

- add the new uno command to the default & MS-compatible menus

(cherry picked from commit 7748a0c437855133fb0a0ebadb60f5f083112f20)

Change-Id: Ie6eb7271f2c1603fb92036e0067b1e6be70d93ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137495
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 37996759a90d..f6e4a8f4f466 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -667,6 +667,14 @@
   1
 
   
+  
+
+  Insert Plain Text Content Control
+
+
+  1
+
+  
   
 
   Insert Other Objects
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index e9f961c605b1..690a1b2a6688 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -218,6 +218,7 @@
 #define FN_CONTENT_CONTROL_PROPERTIES (FN_INSERT + 25)  /* Content control 
properties */
 #define FN_INSERT_PICTURE_CONTENT_CONTROL (FN_INSERT + 26) /* Picture content 
control */
 #define FN_INSERT_DATE_CONTENT_CONTROL (FN_INSERT + 27) /* Date content 
control */
+#define FN_INSERT_PLAIN_TEXT_CONTENT_CONTROL (FN_INSERT + 28) /* Plain text 
content control */
 #define FN_POSTIT   (FN_INSERT + 29)/* Insert/edit PostIt */
 #define FN_INSERT_TABLE (FN_INSERT + 30)/* Insert Table */
 #define FN_INSERT_STRING(FN_INSERT+31)
diff --git a/sw/qa/uibase/wrtsh/wrtsh.cxx b/sw/qa/uibase/wrtsh/wrtsh.cxx
index 7a659c2f0f49..510b96083ddb 100644
--- a/sw/qa/uibase/wrtsh/wrtsh.cxx
+++ b/sw/qa/uibase/wrtsh/wrtsh.cxx
@@ -367,6 +367,27 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertDateContentControl)
 // handling for date content control.
 CPPUNIT_ASSERT(pContentControl->GetDate());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testInsertPlainTextContentControl)
+{
+// Given an empty document:
+SwDoc* pDoc = createSwDoc();
+
+// When inserting a plain text content control:
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->InsertContentControl(SwContentControlType::PLAIN_TEXT);
+
+// Then make sure that the matching text attribute is added to the 
document model:
+SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode();
+SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, 
RES_TXTATR_CONTENTCONTROL);
+auto pTextContentControl = 
static_txtattr_cast(pAttr);
+auto& rFormatContentControl
+= static_cast(pTextContentControl->GetAttr());
+std::shared_ptr pContentControl = 
rFormatContentControl.GetContentControl();
+// Without the accompanying fix in place, this test would have failed, 
there was no special
+// handling for plain text content controls.
+CPPUNIT_ASSERT(pContentControl->GetPlainText());
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index 84750b937715..6230db6c6c47 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -302,6 +302,12 @@ interface BaseText
 StateMethod = NoState ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+FN_INSERT_PLAIN_TEXT_CONTENT_CONTROL  // status(final|play)
+[
+ExecMethod = ExecInsert ;
+StateMethod = NoState ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
 FN_CONTENT_CONTROL_PROPERTIES  // status(final|play)
 [
 ExecMethod = ExecInsert ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 4ef90b62f7d3..4864da660acc 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swrite

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 2 commits - sw/CppunitTest_sw_filter_ww8.mk sw/Module_sw.mk sw/qa sw/source writerfilter/qa writerfilter/source

2022-07-27 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_filter_ww8.mk   |   75 
++
 sw/Module_sw.mk   |1 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|   25 ++-
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |2 
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |6 
 sw/qa/filter/ww8/ww8.cxx  |   63 

 sw/source/filter/ww8/attributeoutputbase.hxx  |2 
 sw/source/filter/ww8/docxattributeoutput.cxx  |   21 ++
 sw/source/filter/ww8/docxattributeoutput.hxx  |2 
 sw/source/filter/ww8/wrtw8nds.cxx |2 
 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx|   30 
 writerfilter/qa/cppunittests/dmapper/data/sdt-run-plain-text.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx  |   20 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |5 
 writerfilter/source/dmapper/SdtHelper.cxx |1 
 writerfilter/source/dmapper/SdtHelper.hxx |4 
 16 files changed, 243 insertions(+), 16 deletions(-)

New commits:
commit 8c0abc373a2aeb44b71d04ae80c67e704ec8
Author: Miklos Vajna 
AuthorDate: Mon Jul 25 09:13:03 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 13:38:30 2022 +0200

sw content controls, plain text: add DOCX import

- the core of this is the writerfilter/ change to call PopSdt() for
  SdtControlType::plainText, which maps inline plain text SDTs to Writer 
content
  controls, not to input fields

- disable the grab-bag in this case, otherwise we would run duplicated 

  elements on export

- fix CppunitTest_sw_ooxmlexport7's testSdtAndShapeOverlapping by postponing
  the SDT start in DocxAttributeOutput::WriteContentControlStart() in case a
  shape is anchored at the same position as the SDT start: if the shape 
should
  start inside the content control, then it should be anchored after the 
dummy
  character

- reduce the debug output in VMLExport::Commit(), which could write control
  characters to the terminal on test failure, potentially breaking it 
(requiring
  a 'reset' to recover)

- fix CppunitTest_sw_ooxmlexport5's testSdt2Run: now we merge two runs 
inside a
  plain text content control into a single one, and there is no problem with
  that, so adapt the test instead

- fix CppunitTest_sw_ooxmlexport17's testTdf148361: plain text inline SDT is
  now a content control, not a field

- fix CppunitTest_sw_ooxmlfieldexport's testfdo82492: explicitly assert that
  there is 1 text run inside the SDT and there is a shape after it 
(outside).
  Also extend DocxAttributeOutput::EndContentControl(), so it ends the 
content
  control at the correct, earlier position in case it's followed by an 
as-char
  shape

- fix CppunitTest_sw_ooxmlfieldexport's testfdo82123: again assert that the 
SDT
  has 1 run with text, and there is a drawing after the SDT

- fix CppunitTest_sw_ooxmlfieldexport's testTdf104823: this revealed that 
some
  more complex logic is needed to support data bindings, so exclude
  text-with-databinding from the scope of this commit and continue to map 
those
  to input fields for now

- fix CppunitTest_sw_ooxmlfieldexport's testFdo81945: this had a similar
  problem as as-char shapes, but this time a new SDT is starting right 
after a
  previous SDT. Adapt DocxAttributeOutput::EndContentControl() accordingly,
  though perhaps this should be generalized later, so we always close SDTs 
in the
  previous run, unless this is the last run, or something similar

(cherry picked from commit 9700c1b2170ad04453a361ed5647937833ac3c18)

Conflicts:
oox/source/export/vmlexport.cxx

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index 9f8c4c0b5c5d..2414c1b2ad38 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -397,15 +397,26 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123642_BookmarkAtDocEnd, 
"tdf123642.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf148361, "tdf148361.docx")
 {
-// Refresh fields and ensure cross-reference to numbered para is okay
-uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
-uno::Reference 
xFieldsAccess(xTextFieldsSupplier->getTextFields());
+if (mbExported)
+{
+// Block SDT is turned into run SDT on export, so the next import will 
have this as co

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

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

New commits:
commit c4f7043c593823b8c5605e779371ff430659eb20
Author: Rene Engelhard 
AuthorDate: Wed Jul 27 12:43:50 2022 +0200
Commit: René Engelhard 
CommitDate: Wed Jul 27 12:44:52 2022 +0200

HPPA is 32bit

as already handled as such in postprocess/CustomTarget_registry.mk

Change-Id: Idc7ead94db8f14e656c36db0438c916b0f2565e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137498
Tested-by: René Engelhard 
Reviewed-by: René Engelhard 

diff --git a/configure.ac b/configure.ac
index 52d21a3f88e3..15eaca30b2d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8608,7 +8608,7 @@ if test "$ENABLE_JAVA" != ""; then
 JAVAINTERPRETER=`win_short_path_for_make "$JAVAINTERPRETER"`
 elif test "$cross_compiling" != "yes"; then
 case $CPUNAME in
-AARCH64|AXP|X86_64|HPPA|IA64|POWERPC64|S390X|SPARC64|MIPS64)
+AARCH64|AXP|X86_64|IA64|POWERPC64|S390X|SPARC64|MIPS64)
 if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 
2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
 AC_MSG_WARN([You are building 64-bit binaries but the JDK 
$JAVAINTERPRETER is 32-bit])
 AC_MSG_ERROR([You should pass the --with-jdk-home option 
pointing to a 64-bit JDK])


[Libreoffice-commits] dev-tools.git: scripts/git-cherry-gerrit.py

2022-07-27 Thread Miklos Vajna (via logerrit)
 scripts/git-cherry-gerrit.py |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit e973e155589a9dfef898ba59d9bd73d9df2e8daf
Author: Miklos Vajna 
AuthorDate: Wed Jul 27 12:09:29 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 12:10:43 2022 +0200

git-cherry-gerrit: allow forcing the length of the abbreviated hash

As you grow more objects, the hash length may change from e.g. 9 to 10,
which breaks the existing whitelist lines. Add one more option to force
the length to a known-good value.

The alternative would be to not work with abbreviated hashes, but that
then breaks all current whitelist entries, so that's not so simple.

Change-Id: Id7bdc0967826579e911023a3d14e49d2b1bbf749

diff --git a/scripts/git-cherry-gerrit.py b/scripts/git-cherry-gerrit.py
index df7e0c0..bb8235f 100755
--- a/scripts/git-cherry-gerrit.py
+++ b/scripts/git-cherry-gerrit.py
@@ -52,8 +52,12 @@ def main() -> None:
 if len(sys.argv) >= 5:
 whitelist_file = sys.argv[4]
 
+hash_length = 0
+if len(sys.argv) >= 6:
+hash_length = int(sys.argv[5])
+
 if not cherry_from:
-print("Usage: git-cherry-gerrit.py cherry_from cherry_to 
[branch_point_from] [whitelist_file]")
+print("Usage: git-cherry-gerrit.py cherry_from cherry_to 
[branch_point_from] [whitelist_file] [hash_length]")
 sys.exit(1)
 
 merge_base = from_pipe(["git", "merge-base", cherry_from, cherry_to])
@@ -77,7 +81,11 @@ def main() -> None:
 whitelist = stream.read().strip().split("\n")
 for from_hash in from_hashes:
 changeid = get_change_id(git_cat_file, from_hash)
-pretty = from_pipe(["git", "--no-pager", "log", "-1", 
"--format=format:%h%x09%an%x09%s%x0a", from_hash])
+if hash_length:
+# Avoid '%h' that may not be exactly hash_length characters, but 
out stored whitelist has that length.
+pretty = from_hash[:hash_length] + "\t" + from_pipe(["git", 
"--no-pager", "log", "-1", "--format=format:%an%x09%s%x0a", from_hash])
+else:
+pretty = from_pipe(["git", "--no-pager", "log", "-1", 
"--format=format:%h%x09%an%x09%s%x0a", from_hash])
 if not changeid:
 if not whitelist_file or not [entry for entry in whitelist if 
pretty in entry]:
 print("WARNING: commit '" + pretty + "' has no Change-Id, 
assuming it has to be cherry-picked.")


[Libreoffice-commits] core.git: bridges/Library_cpp_uno.mk configure.ac postprocess/CustomTarget_registry.mk solenv/gbuild

2022-07-27 Thread Rene Engelhard (via logerrit)
 bridges/Library_cpp_uno.mk   |4 ++--
 configure.ac |   10 +-
 postprocess/CustomTarget_registry.mk |2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit c559dbd86474e4b0e5c2d0711508ab7f5efed6b5
Author: Rene Engelhard 
AuthorDate: Wed Jul 27 08:26:12 2022 +0200
Commit: René Engelhard 
CommitDate: Wed Jul 27 11:52:23 2022 +0200

rename GODSON/GODSON64 to MIPS/MIPS64

as that what it actually is and the compiler defines are already
-DMIPS/-DMIPS64 anyway (as are the PLATFORMID and the bridges'
name mips/mips64)

Change-Id: I274e7a3b0e140375a8e697c1790cbdb972251d29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137489
Tested-by: René Engelhard 
Reviewed-by: Caolán McNamara 
Reviewed-by: René Engelhard 

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index e2de3c1678b4..a5d2a72c202b 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -97,7 +97,7 @@ bridges_SELECTED_BRIDGE := gcc3_linux_m68k
 bridge_noopt_objects := cpp2uno except uno2cpp
 endif
 
-else ifeq ($(CPUNAME),GODSON)
+else ifeq ($(CPUNAME),MIPS)
 
 ifneq ($(filter LINUX,$(OS)),)
 bridges_SELECTED_BRIDGE := gcc3_linux_mips
@@ -105,7 +105,7 @@ bridge_noopt_objects := cpp2uno uno2cpp
 bridge_exception_objects := except
 endif
 
-else ifeq ($(CPUNAME),GODSON64)
+else ifeq ($(CPUNAME),MIPS64)
 
 ifneq ($(filter LINUX,$(OS)),)
 bridges_SELECTED_BRIDGE := gcc3_linux_mips64
diff --git a/configure.ac b/configure.ac
index 33dc0fb96316..52d21a3f88e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5190,25 +5190,25 @@ linux-gnu*|linux-musl*)
 PLATFORMID=linux_ia64
 ;;
 mips)
-CPUNAME=GODSON
+CPUNAME=MIPS
 RTL_ARCH=MIPS_EB
 EPM_FLAGS="-a mips"
 PLATFORMID=linux_mips_eb
 ;;
 mips64)
-CPUNAME=GODSON64
+CPUNAME=MIPS64
 RTL_ARCH=MIPS64_EB
 EPM_FLAGS="-a mips64"
 PLATFORMID=linux_mips64_eb
 ;;
 mips64el)
-CPUNAME=GODSON64
+CPUNAME=MIPS64
 RTL_ARCH=MIPS64_EL
 EPM_FLAGS="-a mips64el"
 PLATFORMID=linux_mips64_el
 ;;
 mipsel)
-CPUNAME=GODSON
+CPUNAME=MIPS
 RTL_ARCH=MIPS_EL
 EPM_FLAGS="-a mipsel"
 PLATFORMID=linux_mips_el
@@ -8608,7 +8608,7 @@ if test "$ENABLE_JAVA" != ""; then
 JAVAINTERPRETER=`win_short_path_for_make "$JAVAINTERPRETER"`
 elif test "$cross_compiling" != "yes"; then
 case $CPUNAME in
-AARCH64|AXP|X86_64|HPPA|IA64|POWERPC64|S390X|SPARC64|GODSON64)
+AARCH64|AXP|X86_64|HPPA|IA64|POWERPC64|S390X|SPARC64|MIPS64)
 if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 
2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
 AC_MSG_WARN([You are building 64-bit binaries but the JDK 
$JAVAINTERPRETER is 32-bit])
 AC_MSG_ERROR([You should pass the --with-jdk-home option 
pointing to a 64-bit JDK])
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index 9e7fbb1398ae..cf9a3432f1ce 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -322,7 +322,7 @@ else
 postprocess_FILES_main += 
$(postprocess_MOD)/org/openoffice/Office/Paths-internallibnumbertextdata.xcu
 endif
 
-ifneq ($(filter POWERPC INTEL ARM HPPA GODSON M68K SPARC S390,$(CPUNAME)),)
+ifneq ($(filter POWERPC INTEL ARM HPPA MIPS M68K SPARC S390,$(CPUNAME)),)
 postprocess_FILES_main += \
$(postprocess_MOD)/org/openoffice/Office/Common-32bit.xcu
 endif
diff --git a/solenv/gbuild/platform/LINUX_GODSON64_GCC.mk 
b/solenv/gbuild/platform/LINUX_MIPS64_GCC.mk
similarity index 100%
rename from solenv/gbuild/platform/LINUX_GODSON64_GCC.mk
rename to solenv/gbuild/platform/LINUX_MIPS64_GCC.mk
diff --git a/solenv/gbuild/platform/LINUX_GODSON_GCC.mk 
b/solenv/gbuild/platform/LINUX_MIPS_GCC.mk
similarity index 100%
rename from solenv/gbuild/platform/LINUX_GODSON_GCC.mk
rename to solenv/gbuild/platform/LINUX_MIPS_GCC.mk


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

2022-07-27 Thread Xisco Fauli (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx  |   16 
 svgio/qa/cppunit/data/ClipPathUsingClipPath.svg |   24 
 svgio/source/svgreader/svgstyleattributes.cxx   |3 ++-
 3 files changed, 42 insertions(+), 1 deletion(-)

New commits:
commit d4f5877a6a9bb5cbe70c5d60634aabe1282b96af
Author: Xisco Fauli 
AuthorDate: Mon Jul 18 13:21:35 2022 +0200
Commit: Michael Stahl 
CommitDate: Wed Jul 27 11:21:28 2022 +0200

related: tdf#97539: SVGIO: iterate over parent's clippaths

This commit reintroduces fb33451a27d8668bc14f5bcfd6ea742fc4c5b84c
"tdf#97539: SVGIO: iterate over parent's clippaths" which I
reverted it in 82c0a363abbceac6464b62c3571aa3225415c7db
"tdf#97539; if parent is css style, look one level up" because
I thought it was no longer necessary, but I was wrong.
Also add a unittest

Change-Id: Ib66ca0afd63e8e52be6677b6965179e092a61aa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137195
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137208
Reviewed-by: Adolfo Jayme Barrientos 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137218
Reviewed-by: Michael Stahl 

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 9a78f6a18bae..f9fc88f812de 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -61,6 +61,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools
 void testShapeWithClipPathAndCssStyle();
 void testClipPathAndParentStyle();
 void testClipPathAndStyle();
+void testClipPathUsingClipPath();
 void testi125329();
 void testMaskingPath07b();
 void test123926();
@@ -101,6 +102,7 @@ public:
 CPPUNIT_TEST(testShapeWithClipPathAndCssStyle);
 CPPUNIT_TEST(testClipPathAndParentStyle);
 CPPUNIT_TEST(testClipPathAndStyle);
+CPPUNIT_TEST(testClipPathUsingClipPath);
 CPPUNIT_TEST(testi125329);
 CPPUNIT_TEST(testMaskingPath07b);
 CPPUNIT_TEST(test123926);
@@ -608,6 +610,20 @@ void Test::testClipPathAndStyle()
 
 }
 
+void Test::testClipPathUsingClipPath()
+{
+Primitive2DSequence aSequenceClipPathAndStyle = 
parseSvg(u"/svgio/qa/cppunit/data/ClipPathUsingClipPath.svg");
+CPPUNIT_ASSERT_EQUAL(1, 
static_cast(aSequenceClipPathAndStyle.getLength()));
+
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequenceClipPathAndStyle));
+
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, 
"/primitive2D/transform/mask/polypolygon/polygon/point", 20);
+assertXPath(pDocument, 
"/primitive2D/transform/mask/mask/polypolygon/polygon/point", 13);
+}
+
 void Test::testi125329()
 {
 //Check style inherit from * css element
diff --git a/svgio/qa/cppunit/data/ClipPathUsingClipPath.svg 
b/svgio/qa/cppunit/data/ClipPathUsingClipPath.svg
new file mode 100644
index ..5eaa7928cb85
--- /dev/null
+++ b/svgio/qa/cppunit/data/ClipPathUsingClipPath.svg
@@ -0,0 +1,24 @@
+
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index 891c5ff76c7e..8084ed5f0239 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1188,10 +1188,11 @@ namespace svgio::svgreader
 }
 
 const SvgClipPathNode* pClip = accessClipPathXLink();
-if(pClip)
+while(pClip)
 {
 // #i124852# transform may be needed when 
SvgUnits::userSpaceOnUse
 pClip->apply(aSource, pTransform);
+pClip = pClip->getSvgStyleAttributes()->accessClipPathXLink();
 }
 
 if(!aSource.empty()) // test again, applied clipPath may have lead 
to empty geometry


Re: How to get text area rectangle from shape type, position, size and adjustment values?

2022-07-27 Thread Miklos Vajna
Hi Regina,

On Sun, Jul 24, 2022 at 11:59:28PM +0200, Regina Henschel 
 wrote:
> I know that the calculation of moTextOffFoo values in transform2dcontext is
> correct in principle. But I am very unhappy with calculating the position
> and size of the required text area rectangle by hand using the preset
> geometry. I have now done this for the shape types that I know are in the
> preset SmartArts. But the user can also exchange these shapes with others in
> the UI of MS Office. So the calculation of the text area rectangle would
> have to be done for all preset shapes. That's why I'm looking for another
> way.

Briefly reading presetShapeDefinitions.xml from the OOXML spec, the
calculation of the text rectangle seems to be part of the preset, so
it's not something you can calculate in general.

> At that point I have the type of the shape and know position, size and
> adjustment values. If I had a ready CustomShape, I could get the needed text
> area rectangle with the method getTextBounds(). But in
> transform2dcontext.cxx there is no CustomShape. Or do I miss something?
> 
> Is there any way to make such a shape temporarily so that you can use
> getTextBounds()? Or maybe someone has another idea how to get the text area
> rectangle from type, position, size and adjustment values?

Other preset data is generated from the spec, the generated result is at
oox/source/drawingml/customshapes/oox-drawingml-cs-presets. Would it be
possible to include the text rectangle information in that file as well?

Failing that, if we have this information in svx/ for custom shape
instances, then seprating this functionality into a function that you
can call from oox/ sounds reasonable. I just fear that OOXML has much
more preset types compared to the old binary formats, and perhaps svx/
preset data represents what was the feature set of binary formats.

Regards,

Miklos


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

2022-07-27 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/gdi/cairotextrender.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cc6a55a855c20343e87d85c833781a7d32af8b8d
Author: Caolán McNamara 
AuthorDate: Tue Jul 26 13:20:19 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 10:53:22 2022 +0200

tdf#150145 text appears to have a row of pixels cropped out

which is very similar sounding to
https://gitlab.freedesktop.org/cairo/cairo/-/issues/390

seems to be a bad interaction of slight hinting and sub pixel positioning
with hints_metrics disabled with CAIRO_HINT_METRICS_OFF.

lets continue to assume we desire CAIRO_HINT_METRICS_OFF most and
disable hinting rather than use slight

(cherry picked from commit 59cfcd863b483a99491e6f8cd30016386bbff870)

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

diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx 
b/vcl/unx/generic/gdi/cairotextrender.cxx
index c403c2f3246b..2d8dfbb8c1c0 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -177,7 +177,7 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 const bool bResolutionIndependentLayoutEnabled = 
rGraphics.getTextRenderModeForResolutionIndependentLayoutEnabled();
 cairo_hint_style_t eHintStyle = 
cairo_font_options_get_hint_style(pFontOptions);
 cairo_hint_metrics_t eHintMetricsStyle = 
cairo_font_options_get_hint_metrics(pFontOptions);
-bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || 
(eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT);
+bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || 
(eHintStyle == CAIRO_HINT_STYLE_NONE);
 bool bAllowedHintMetricStyle = !bResolutionIndependentLayoutEnabled || 
(eHintMetricsStyle == CAIRO_HINT_METRICS_OFF);
 
 if (bDisableAA || !bAllowedHintStyle || !bAllowedHintMetricStyle)
@@ -187,10 +187,10 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 cairo_font_options_t* pOptions = 
cairo_font_options_copy(pFontOptions);
 if (bDisableAA)
 cairo_font_options_set_antialias(pOptions, 
CAIRO_ANTIALIAS_NONE);
-if (!bAllowedHintStyle)
-cairo_font_options_set_hint_style(pOptions, 
CAIRO_HINT_STYLE_SLIGHT);
 if (!bAllowedHintMetricStyle)
 cairo_font_options_set_hint_metrics(pOptions, 
CAIRO_HINT_METRICS_OFF);
+if (!bAllowedHintStyle)
+cairo_font_options_set_hint_style(pOptions, 
CAIRO_HINT_STYLE_NONE);
 cairo_set_font_options(cr, pOptions);
 cairo_font_options_destroy(pOptions);
 }


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

2022-07-27 Thread Caolán McNamara (via logerrit)
 vcl/inc/ppdparser.hxx |1 
 vcl/unx/generic/print/prtsetup.cxx|1 
 vcl/unx/generic/printer/cupsmgr.cxx   |   85 --
 vcl/unx/generic/printer/ppdparser.cxx |1 
 4 files changed, 55 insertions(+), 33 deletions(-)

New commits:
commit 93f28ca499c6d15415f359a9e868a72bbcdc9b4b
Author: Caolán McNamara 
AuthorDate: Tue Jul 26 20:07:43 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 27 10:45:05 2022 +0200

tdf#149439 Update Custom values that may have changed since last printer 
check

keep any value the user explicitly set, but update one that was taken
from lpoptions if that changed

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

diff --git a/vcl/inc/ppdparser.hxx b/vcl/inc/ppdparser.hxx
index 1222bc1704a7..be5c64feab01 100644
--- a/vcl/inc/ppdparser.hxx
+++ b/vcl/inc/ppdparser.hxx
@@ -48,6 +48,7 @@ struct VCL_DLLPUBLIC PPDValue
 //see http://www.cups.org/documentation.php/spec-ppd.html#OPTIONS
 //for full specs, only the basics are implemented here
 bool m_bCustomOption;
+mutable bool m_bCustomOptionSetViaApp;
 mutable OUString m_aCustomOption;
 OUString m_aOption;
 OUString m_aValue;
diff --git a/vcl/unx/generic/print/prtsetup.cxx 
b/vcl/unx/generic/print/prtsetup.cxx
index 56ee475e701e..a13133d6017b 100644
--- a/vcl/unx/generic/print/prtsetup.cxx
+++ b/vcl/unx/generic/print/prtsetup.cxx
@@ -418,6 +418,7 @@ IMPL_LINK(RTSDevicePage, ModifyHdl, weld::Entry&, rEdit, 
void)
 // tdf#123734 Custom PPD option values are a CUPS extension to PPDs 
and the user-set value
 // needs to be prefixed with "Custom." in order to be processed 
properly
 m_pCustomValue->m_aCustomOption = "Custom." + rEdit.get_text();
+m_pCustomValue->m_bCustomOptionSetViaApp = true;
 }
 }
 
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx 
b/vcl/unx/generic/printer/cupsmgr.cxx
index 5cb91e05df66..f03780b2886f 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -254,6 +254,45 @@ void CUPSManager::runDests()
 #endif
 }
 
+static void SetIfCustomOption(PPDContext& rContext, const cups_option_t& 
rOption, rtl_TextEncoding aEncoding)
+{
+if (strncmp(rOption.value, RTL_CONSTASCII_STRINGPARAM("Custom.")) == 0)
+{
+const PPDParser* pParser = rContext.getParser();
+if (!pParser)
+{
+// normal for first sight of this printer
+return;
+}
+
+const PPDKey* pKey = pParser->getKey(OStringToOUString(rOption.name, 
aEncoding));
+if (!pKey)
+{
+SAL_WARN("vcl.unx.print", "Custom key " << rOption.name << " not 
found");
+return;
+}
+
+const PPDValue* pCustomValue = rContext.getValue(pKey);
+if (!pCustomValue)
+{
+SAL_WARN("vcl.unx.print", "Value for " << rOption.name << " not 
found");
+return;
+}
+
+if (!pCustomValue->m_bCustomOption)
+{
+SAL_WARN("vcl.unx.print", "Value for " << rOption.name << " not 
set to custom option");
+return;
+}
+
+// seems sensible to keep a value the user explicitly set even if 
lpoptions was used to set
+// another default
+if (pCustomValue->m_bCustomOptionSetViaApp)
+return;
+pCustomValue->m_aCustomOption = OStringToOUString(rOption.value, 
aEncoding);
+}
+}
+
 void CUPSManager::initialize()
 {
 // get normal printers, clear printer list
@@ -332,16 +371,6 @@ void CUPSManager::initialize()
 if( pDest->is_default )
 m_aDefaultPrinter = aPrinterName;
 
-for( int k = 0; k < pDest->num_options; k++ )
-{
-if(!strcmp(pDest->options[k].name, "printer-info"))
-
aPrinter.m_aInfo.m_aComment=OStringToOUString(pDest->options[k].value, 
aEncoding);
-if(!strcmp(pDest->options[k].name, "printer-location"))
-
aPrinter.m_aInfo.m_aLocation=OStringToOUString(pDest->options[k].value, 
aEncoding);
-if(!strcmp(pDest->options[k].name, "auth-info-required"))
-
aPrinter.m_aInfo.m_aAuthInfoRequired=OStringToOUString(pDest->options[k].value, 
aEncoding);
-}
-
 // note: the parser that goes with the PrinterInfo
 // is created implicitly by the JobData::operator=()
 // when it detects the NULL ptr m_pParser.
@@ -360,6 +389,18 @@ void CUPSManager::initialize()
 aPrinter.m_aInfo.setDefaultBackend(bUsePDF);
 aPrinter.m_aInfo.m_aDriverName = "CUPS:" + aPrinterName;
 
+for( int k = 0; k < pDest->num_options; k++ )
+{
+if(!strcmp(pDest->options[k].name, "printer-info"))
+
aPrinter.m_aInfo.m_aComment=OStringToOUString(pDest->optio

[Libreoffice-commits] core.git: include/test sw/qa test/Library_subsequenttest.mk test/source toolkit/CppunitTest_toolkit_a11y.mk toolkit/qa

2022-07-27 Thread Colomban Wendling (via logerrit)
 include/test/a11y/AccessibilityTools.hxx  |5 
 sw/qa/extras/accessibility/accessible_relation_set.cxx|   67 ++
 test/Library_subsequenttest.mk|1 
 test/source/a11y/AccessibilityTools.cxx   |   35 -
 toolkit/CppunitTest_toolkit_a11y.mk   |2 
 toolkit/qa/cppunit/a11y/AccessibleStatusBarTest.cxx   |2 
 toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx|2 
 toolkit/qa/cppunit/a11y/XAccessibleComponentTester.hxx|2 
 toolkit/qa/cppunit/a11y/XAccessibleContextTester.cxx  |2 
 toolkit/qa/cppunit/a11y/XAccessibleEventBroadcasterTester.cxx |2 
 10 files changed, 58 insertions(+), 62 deletions(-)

New commits:
commit 8fe5a832b02ea6c5113c573f5b9c23e58049a4d2
Author: Colomban Wendling 
AuthorDate: Thu Jul 21 15:58:16 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 27 10:41:03 2022 +0200

Make AccessibilityTools available more widely and use it

Move AccessibilityTools helper to test/ and use it in 
accessible_relation_set
test replacing the copied over feature and consolidating the test as well.

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

diff --git a/toolkit/qa/cppunit/a11y/AccessibilityTools.hxx 
b/include/test/a11y/AccessibilityTools.hxx
similarity index 97%
rename from toolkit/qa/cppunit/a11y/AccessibilityTools.hxx
rename to include/test/a11y/AccessibilityTools.hxx
index 96afe4377f94..e56c68c9bebb 100644
--- a/toolkit/qa/cppunit/a11y/AccessibilityTools.hxx
+++ b/include/test/a11y/AccessibilityTools.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 #include 
 
@@ -28,7 +30,7 @@
 #include 
 #include 
 
-class AccessibilityTools
+class OOO_DLLPUBLIC_TEST AccessibilityTools
 {
 public:
 /** Maximum number of children to work on. This is especially useful for
@@ -47,6 +49,7 @@ public:
 static OUString getRoleName(const sal_Int16 role);
 static OUString getStateName(const sal_Int16 state);
 static OUString getEventIdName(const sal_Int16 event_id);
+static OUString getRelationTypeName(const sal_Int16 rel_type);
 
 template  static std::string debugString(const 
css::uno::Reference& x)
 {
diff --git a/sw/qa/extras/accessibility/accessible_relation_set.cxx 
b/sw/qa/extras/accessibility/accessible_relation_set.cxx
index ce053c95b07b..3839a61d0504 100644
--- a/sw/qa/extras/accessibility/accessible_relation_set.cxx
+++ b/sw/qa/extras/accessibility/accessible_relation_set.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -33,54 +34,13 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::accessibility;
 using namespace css::lang;
 
-namespace
-{
-class AccessibilityTools
-{
-public:
-static css::uno::Reference
-getAccessibleObjectForRole(const 
css::uno::Reference& xacc,
-   sal_Int16 role);
-};
-}
-
-css::uno::Reference
-AccessibilityTools::getAccessibleObjectForRole(
-const css::uno::Reference& xacc, 
sal_Int16 role)
-{
-css::uno::Reference ac = 
xacc->getAccessibleContext();
-bool isShowing = ac->getAccessibleStateSet() & 
AccessibleStateType::SHOWING;
-
-if ((ac->getAccessibleRole() == role) && isShowing)
-{
-return ac;
-}
-else
-{
-int k = ac->getAccessibleChildCount();
-if (ac->getAccessibleChildCount() > 100)
-{
-k = 50;
-}
-
-for (int i = 0; i < k; i++)
-{
-css::uno::Reference ac2
-= 
AccessibilityTools::getAccessibleObjectForRole(ac->getAccessibleChild(i), role);
-if (ac2.is())
-{
-return ac2;
-}
-}
-}
-return nullptr;
-}
-
 class AccessibleRelationSet : public UnoApiTest
 {
 public:
@@ -137,9 +97,6 @@ 
AccessibleRelationSet::init(uno::Reference& par
 void AccessibleRelationSet::contents_flows_to_and_from()
 {
 //contents_flows_to
-std::vector types{ "INVALID",   "CONTENT_FLOWS_FROM", 
"CONTENT_FLOWS_TO",
- "CONTROLLED_BY", "CONTROLLER_FOR", 
"LABEL_FOR",
- "LABELED_BY","MEMBER_OF",  
"SUB_WINDOW_OF" };
 
 css::uno::Reference para1;
 css::uno::Reference para2;
@@ -160,8 +117,10 @@ void AccessibleRelationSet::contents_flows_to_and_from()
 css::uno::Reference adummy(
 set->getRelation(0).TargetSet[0], uno::UNO_QUERY_THROW);
 atarget = adummy;
-CPPUNIT_ASSERT_EQUAL_MESSAGE("didn't gain correct relation type for 
paragraph 0", types[2],
- types[firstrelation]);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("

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

2022-07-27 Thread Mike Kaganski (via logerrit)
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx |   11 +--
 drawinglayer/source/processor2d/vclhelperbufferdevice.hxx |2 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx   |   42 +-
 3 files changed, 34 insertions(+), 21 deletions(-)

New commits:
commit 74a68224007efb0780c3c17a9099d1a48a577c08
Author: Mike Kaganski 
AuthorDate: Thu Jul 21 14:40:54 2022 +0300
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 10:18:02 2022 +0200

tdf#144916: expand range to avoid unwanted effects on viewport edges

This also allows to avoid clipping of impBufferDevice to the passed
OutputDevice, because the expanded range couldn't otherwise be processed
on the buffer device.

Change-Id: I0d778365b09937c1a2ecee06477b0b17efcce44b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137296
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 8c15835762f2b16e7c8f5acd2d52f562c7dec9a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137419
Reviewed-by: Xisco Fauli 
(cherry picked from commit de38ac80958ffbdef47f7714bfdb4abebf1b5774)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137430

diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx 
b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index 7f20d094b446..362293438dd8 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -285,18 +285,17 @@ VDevBuffer& getVDevBuffer()
 return *aVDevBuffer.get();
 }
 
-impBufferDevice::impBufferDevice(OutputDevice& rOutDev, const 
basegfx::B2DRange& rRange)
+impBufferDevice::impBufferDevice(OutputDevice& rOutDev, const 
basegfx::B2DRange& rRange, bool bCrop)
 : mrOutDev(rOutDev)
 , mpContent(nullptr)
 , mpAlpha(nullptr)
 {
 basegfx::B2DRange aRangePixel(rRange);
 aRangePixel.transform(mrOutDev.GetViewTransformation());
-const ::tools::Rectangle aRectPixel(floor(aRangePixel.getMinX()), 
floor(aRangePixel.getMinY()),
-ceil(aRangePixel.getMaxX()), 
ceil(aRangePixel.getMaxY()));
-const Point aEmptyPoint;
-maDestPixel = ::tools::Rectangle(aEmptyPoint, 
mrOutDev.GetOutputSizePixel());
-maDestPixel.Intersection(aRectPixel);
+maDestPixel = tools::Rectangle(floor(aRangePixel.getMinX()), 
floor(aRangePixel.getMinY()),
+   ceil(aRangePixel.getMaxX()), 
ceil(aRangePixel.getMaxY()));
+if (bCrop)
+maDestPixel.Intersection({ {}, mrOutDev.GetOutputSizePixel() });
 
 if (!isVisible())
 return;
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx 
b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx
index 3b5d30415cc2..99585b05b141 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx
@@ -38,7 +38,7 @@ class impBufferDevice
 tools::Rectangle maDestPixel;
 
 public:
-impBufferDevice(OutputDevice& rOutDev, const basegfx::B2DRange& rRange);
+impBufferDevice(OutputDevice& rOutDev, const basegfx::B2DRange& rRange, 
bool bCrop = true);
 ~impBufferDevice();
 
 void paint(double fTrans = 0.0);
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 722cd6362807..087f6bcedb37 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -1026,13 +1026,29 @@ AlphaMask ProcessAndBlurAlphaMask(const Bitmap& rMask, 
double fErodeDilateRadius
 
 return AlphaMask(mask.GetBitmap());
 }
+
+drawinglayer::geometry::ViewInformation2D
+expandRange(const drawinglayer::geometry::ViewInformation2D& rViewInfo, double 
nAmount)
+{
+basegfx::B2DRange viewport(rViewInfo.getViewport());
+viewport.grow(nAmount);
+return { rViewInfo.getObjectTransformation(),
+ rViewInfo.getViewTransformation(),
+ viewport,
+ rViewInfo.getVisualizedPage(),
+ rViewInfo.getViewTime(),
+ rViewInfo.getReducedDisplayQuality() };
+}
 }
 
 void VclPixelProcessor2D::processGlowPrimitive2D(const 
primitive2d::GlowPrimitive2D& rCandidate)
 {
-basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+const double nGlowRadius(rCandidate.getGlowRadius());
+// Avoid wrong effect on the cut-off side; so expand by radius
+const auto aExpandedViewInfo(expandRange(getViewInformation2D(), 
nGlowRadius));
+basegfx::B2DRange aRange(rCandidate.getB2DRange(aExpandedViewInfo));
 aRange.transform(maCurrentTransformation);
-basegfx::B2DVector aGlowRadiusVector(rCandidate.getGlowRadius(), 0);
+basegfx::B2DVector aGlowRadiusVector(nGlowRadius, 0);
 // Calculate the pixel size of glow radius in current transformation
 aGlowRadiusVector *= maCurrentTransformation;

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

2022-07-27 Thread Andreas Heinisch (via logerrit)
 editeng/source/editeng/impedit2.cxx   |5 -
 sc/qa/uitest/calc_tests9/tdf135761.py |   34 ++
 2 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit ad4e3f2b5ff5ab946a9de32fa8cf65ab664afa85
Author: Andreas Heinisch 
AuthorDate: Fri Jul 15 16:25:06 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 10:08:54 2022 +0200

tdf#135761 - Calc cell editing: change search preference for the word 
boundary

Since ImpEditEngine::StartOfWord is only used when a selection is deleted 
at the left, change the search preference of the word boundary from forward to 
backward. For further details of a deletion of a selection check 
ImpEditEngine::DeleteLeftOrRight.

Change-Id: Ic68901cc04e5057e058ff03304f68eef1dca7a1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137108
Tested-by: Andreas Heinisch 
Reviewed-by: Andreas Heinisch 
(cherry picked from commit 9a612ce3d1d025d5f553cc348feaedeea37fc822)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137426
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index c731932c51ec..8dbbc42f7ce7 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1533,8 +1533,11 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM )
 lang::Locale aLocale( GetLocale( aTmpPaM ) );
 
 uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
+// tdf#135761 - since this function is only used when a selection is 
deleted at the left,
+// change the search preference of the word boundary from forward to 
backward.
+// For further details of a deletion of a selection check 
ImpEditEngine::DeleteLeftOrRight.
 i18n::Boundary aBoundary = _xBI->getWordBoundary(
-rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, 
css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true);
+rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, 
css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, false);
 
 aNewPaM.SetIndex( aBoundary.startPos );
 return aNewPaM;
diff --git a/sc/qa/uitest/calc_tests9/tdf135761.py 
b/sc/qa/uitest/calc_tests9/tdf135761.py
new file mode 100755
index ..fd9e5ebda341
--- /dev/null
+++ b/sc/qa/uitest/calc_tests9/tdf135761.py
@@ -0,0 +1,34 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import get_cell_by_position
+
+class tdf135761(UITestCase):
+def test_tdf135761_ctrl_backspace(self):
+with self.ui_test.create_doc_in_start_center("calc") as document:
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xGridWindow = xCalcDoc.getChild("grid_window")
+
+# Enter text including two whitespaces in the text, and delete the 
left part of the text
+xGridWindow.executeAction("SELECT", mkPropertyValues({"CELL": 
"A1"}))
+xGridWindow.executeAction("TYPE", mkPropertyValues({"TEXT": "a  
b"}))
+xGridWindow.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"F2"}))
+xGridWindow.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"LEFT"}))
+xGridWindow.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"LEFT"}))
+xGridWindow.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+BACKSPACE"}))
+xGridWindow.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RETURN"}))
+
+# Without the fix in place, this test would have failed with
+# AssertionError: ' b' != 'a b'
+
+self.assertEqual(get_cell_by_position(document, 0, 0, 
0).getString(), " b")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


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

2022-07-27 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |   26 --
 1 file changed, 26 deletions(-)

New commits:
commit b1d54e724ae360a22e08ef20e83a81804ebfae21
Author: Michael Stahl 
AuthorDate: Tue Jul 19 16:34:14 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 10:08:16 2022 +0200

tdf#149170 sfx2: fix regression about spurious dialog

Open a document that is locked, choose Read-Only, then click "Edit" on
infobar: it is still locked, so a dialog pops up. Click "Cancel".

Now a *second* dialog pops up that *again* asks if you want to open a
copy of the document - this appears pointless so let's remove it.

Change-Id: Id96a1211caea63e7559c67b08a6581d1a0ce9add
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137234
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a1ca68e91868df51a269682f7c3dac62a88a85ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137421
Reviewed-by: Xisco Fauli 

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3e09372dd781..da5477928f51 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -765,9 +765,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 // Do not cache the old Document! Is invalid when loading
 // another document.
 
-const SfxStringItem* pSavedOptions = 
SfxItemSet::GetItem(pMedium->GetItemSet(), 
SID_FILE_FILTEROPTIONS, false);
-const SfxStringItem* pSavedReferer = 
SfxItemSet::GetItem(pMedium->GetItemSet(), SID_REFERER, false);
-
 bool bHasStorage = pMedium->HasStorage_Impl();
 if( bHandsOff )
 {
@@ -812,29 +809,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 
 xOldObj->DoSaveCompleted( pMedium );
 }
-
-// r/o-Doc couldn't be switched to writing mode
-if ( bForEdit && ( SID_EDITDOC == rReq.GetSlot() || 
SID_READONLYDOC == rReq.GetSlot() ) )
-{
-// ask user for opening as template
-std::unique_ptr 
xBox(Application::CreateMessageDialog(GetWindow().GetFrameWeld(),
-   
  VclMessageType::Question, VclButtonsType::YesNo,
-   
  SfxResId(STR_QUERY_OPENASTEMPLATE)));
-if (RET_YES == xBox->run())
-{
-SfxAllItemSet aSet( pApp->GetPool() );
-aSet.Put( SfxStringItem( SID_FILE_NAME, 
pMedium->GetName() ) );
-aSet.Put( SfxStringItem( SID_TARGETNAME, "_blank" 
) );
-if ( pSavedOptions )
-aSet.Put( *pSavedOptions );
-if ( pSavedReferer )
-aSet.Put( *pSavedReferer );
-aSet.Put( SfxBoolItem( SID_TEMPLATE, true ) );
-if( pFilter )
-aSet.Put( SfxStringItem( SID_FILTER_NAME, 
pFilter->GetFilterName() ) );
-GetDispatcher()->Execute( SID_OPENDOC, 
SfxCallMode::ASYNCHRON, aSet );
-}
-}
 }
 else
 {


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

2022-07-27 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx |   23 +++
 sw/source/filter/html/css1atr.cxx  |   11 +++
 sw/source/filter/html/css1kywd.cxx |1 +
 sw/source/filter/html/css1kywd.hxx |1 +
 sw/source/filter/html/wrthtml.cxx  |7 +--
 5 files changed, 41 insertions(+), 2 deletions(-)

New commits:
commit 5a55010be559c0942b9f5847a7c9f763597fdeb1
Author: Miklos Vajna 
AuthorDate: Thu Jul 21 15:40:58 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jul 27 10:05:25 2022 +0200

sw XHTML export: fix writing of section direction

The XHTML export behavior was the same as the HTML one for section text
direction, the  markup was used.

This shares code with the HTML filter, but it's not valid in
reqif-xhtml, while the CSS markup would be fine: .

Fix the problem by keeping the behavior unchanged for HTML, but switch
to inline CSS for XHTML.

The other similar attribute was "id", but that's fine even in XHTML.

Change-Id: I5797c90f9cf957dec7fc4074dd6e79dce11fada7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137305
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 3b7c18a579f3165c9d425d172d697f8978d6cd84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137425
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 44654bdbcf5a..5e5af5e70a17 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -2369,6 +2369,29 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testImageKeepRatio)
 assertXPath(pDoc, "/html/body/p/img", "height", "auto");
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testSectionDir)
+{
+// Given a document with a section:
+SwDoc* pDoc = createSwDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Insert("test");
+pWrtShell->SelAll();
+SwSectionData aSectionData(SectionType::Content, "mysect");
+pWrtShell->InsertSection(aSectionData);
+
+// When exporting to (reqif-)xhtml:
+ExportToReqif();
+
+// Then make sure CSS is used to export the text direction of the section:
+SvMemoryStream aStream;
+HtmlExportTest::wrapFragment(maTempFile, aStream);
+xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+// Without the accompanying fix in place, this test would have failed with:
+// - XPath '//reqif-xhtml:div[@id='mysect']' no attribute 'style' exist
+// i.e. the dir="ltr" HTML attribute was used instead.
+assertXPath(pXmlDoc, "//reqif-xhtml:div[@id='mysect']", "style", "dir: 
ltr");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index bc2449b865cc..1520a4e0596a 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -2088,6 +2088,17 @@ void SwHTMLWriter::OutCSS1_SectionFormatOptions( const 
SwFrameFormat& rFrameForm
 if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, 
&pItem ) )
 OutCSS1_SvxBrush( *this, *pItem, sw::Css1Background::Section, nullptr 
);
 
+if (mbXHTML)
+{
+SvxFrameDirection nDir = GetHTMLDirection(rFrameFormat.GetAttrSet());
+OString sConvertedDirection = convertDirection(nDir);
+if (!sConvertedDirection.isEmpty())
+{
+OutCSS1_Property(sCSS1_P_dir, sConvertedDirection, nullptr,
+ sw::Css1Background::Section);
+}
+}
+
 if (pCol)
 {
 OString 
sColumnCount(OString::number(static_cast(pCol->GetNumCols(;
diff --git a/sw/source/filter/html/css1kywd.cxx 
b/sw/source/filter/html/css1kywd.cxx
index af8c5392a765..12d70903ad39 100644
--- a/sw/source/filter/html/css1kywd.cxx
+++ b/sw/source/filter/html/css1kywd.cxx
@@ -171,6 +171,7 @@ const char* const sCSS1_P_height = "height";
 const char* const sCSS1_P_float = "float";
 
 const char* const sCSS1_P_column_count = "column-count";
+const char* const sCSS1_P_dir = "dir";
 
 // Strings for positioning
 
diff --git a/sw/source/filter/html/css1kywd.hxx 
b/sw/source/filter/html/css1kywd.hxx
index 443af7e1ae91..67d2c9e2802c 100644
--- a/sw/source/filter/html/css1kywd.hxx
+++ b/sw/source/filter/html/css1kywd.hxx
@@ -172,6 +172,7 @@ extern const char* const sCSS1_P_height;
 extern const char* const sCSS1_P_float;
 
 extern const char* const sCSS1_P_column_count;
+extern const char* const sCSS1_P_dir;
 
 // Strings for positioning
 
diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index d216e0d51cb7..0cede88912d3 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -711,9 +711,12 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& 
rHTMLWrt,
 sOut.append('\"');
 }
 
-SvxFrameDirection nDir = rHTMLWrt.GetHT

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

2022-07-27 Thread Andreas Heinisch (via logerrit)
 sw/source/core/text/itrform2.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit bbb57e8198863ee7bdadd3f2aac4420c08da94a3
Author: Andreas Heinisch 
AuthorDate: Wed Jul 27 08:53:11 2022 +0200
Commit: Andreas Heinisch 
CommitDate: Wed Jul 27 09:53:56 2022 +0200

tdf#67669 - Make narrow no-break space visible by drawing a gray background

Make narrow no-break space visible by drawing a gray background like for 
non-breaking spaces.

Change-Id: I3f2b4374a08ea8305c8c84eb497bc362866ad352
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137490
Tested-by: Andreas Heinisch 
Reviewed-by: Andreas Heinisch 

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 563ddd5c4c02..e86c8079c8d2 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1503,6 +1503,8 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
 case CHAR_SOFTHYPHEN:   // soft hyphen
 pPor = new SwSoftHyphPortion; break;
 
+// tdf#67669 - make narrow no-break space visible by drawing a 
gray background
+case CHAR_NNBSP:// narrow no-break space
 case CHAR_HARDBLANK:// no-break space
 // Please check tdf#115067 if you want to edit the char
 pPor = new SwBlankPortion( cChar ); break;


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

2022-07-27 Thread Tomaž Vajngerl (via logerrit)
 include/o3tl/enumarray.hxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b9d360405a26ec976e443d501757ad806ffdcd6b
Author: Tomaž Vajngerl 
AuthorDate: Mon Jul 25 15:32:52 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 27 09:34:07 2022 +0200

o3tl: use std::array as the container for enumarray

Change-Id: I482140a14a4f18014d89ed5b8ce7c3ca9447b8d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137465
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx
index 558ab158bffe..4fd5cab3155f 100644
--- a/include/o3tl/enumarray.hxx
+++ b/include/o3tl/enumarray.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 namespace o3tl {
@@ -92,10 +93,10 @@ public:
 const_iterator   begin() const { return const_iterator(*this, 0); }
 const_iterator   end() const   { return const_iterator(*this, size()); }
 
-V*   data()   { return detail_values; }
+V*   data()   { return detail_values.data(); }
 
 private:
-V detail_values[max_index + 1];
+std::array detail_values;
 };
 
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - vcl/unx

2022-07-27 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/gdi/cairotextrender.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d51b00f635e665c19cec078979210df9f79a3aa3
Author: Caolán McNamara 
AuthorDate: Tue Jul 26 13:20:19 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jul 27 09:15:39 2022 +0200

tdf#150145 text appears to have a row of pixels cropped out

which is very similar sounding to
https://gitlab.freedesktop.org/cairo/cairo/-/issues/390

seems to be a bad interaction of slight hinting and sub pixel positioning
with hints_metrics disabled with CAIRO_HINT_METRICS_OFF.

lets continue to assume we desire CAIRO_HINT_METRICS_OFF most and
disable hinting rather than use slight

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

diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx 
b/vcl/unx/generic/gdi/cairotextrender.cxx
index 0be33e9436c9..7300562d5d68 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -199,7 +199,7 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 const bool bResolutionIndependentLayoutEnabled = 
rGraphics.getTextRenderModeForResolutionIndependentLayoutEnabled();
 cairo_hint_style_t eHintStyle = 
cairo_font_options_get_hint_style(pFontOptions);
 cairo_hint_metrics_t eHintMetricsStyle = 
cairo_font_options_get_hint_metrics(pFontOptions);
-bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || 
(eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT);
+bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || 
(eHintStyle == CAIRO_HINT_STYLE_NONE);
 bool bAllowedHintMetricStyle = !bResolutionIndependentLayoutEnabled || 
(eHintMetricsStyle == CAIRO_HINT_METRICS_OFF);
 
 if (bDisableAA || !bAllowedHintStyle || !bAllowedHintMetricStyle)
@@ -209,10 +209,10 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 cairo_font_options_t* pOptions = 
cairo_font_options_copy(pFontOptions);
 if (bDisableAA)
 cairo_font_options_set_antialias(pOptions, 
CAIRO_ANTIALIAS_NONE);
-if (!bAllowedHintStyle)
-cairo_font_options_set_hint_style(pOptions, 
CAIRO_HINT_STYLE_SLIGHT);
 if (!bAllowedHintMetricStyle)
 cairo_font_options_set_hint_metrics(pOptions, 
CAIRO_HINT_METRICS_OFF);
+if (!bAllowedHintStyle)
+cairo_font_options_set_hint_style(pOptions, 
CAIRO_HINT_STYLE_NONE);
 cairo_set_font_options(cr, pOptions);
 cairo_font_options_destroy(pOptions);
 }


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - vcl/source

2022-07-27 Thread Michael Weghorn (via logerrit)
 vcl/source/gdi/jobset.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit fbc0c229845fafcd8293d056f28d9a416cea5688
Author: Michael Weghorn 
AuthorDate: Tue Jul 26 13:53:17 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 27 09:07:31 2022 +0200

tdf#150104 Store full printer/driver name in doc's JobSetup

Printer and driver name have a limited length (64 chars for
the printer name, 32 for the driver name) in the
`ImplOldJobSetupData` struct that is part of what gets
serialized into the "PrinterSetup" config item in
settings.xml when saving printer settings to the document
(s. `WriteJobSetup`). Longer printer and driver names
get truncated, and only the truncated name got restored.

At least for Windows, this scenario would result in the
doc printer settings not getting restored properly,
because `ImplTestSalJobSetup` (in vcl/win/gdi/salprn.cxx)
among others checks that both printer and driver name
match, which isn't the case when one version is truncated.

ODF spec, version 1.3, section 3.1.3.5 says this on settings.xml:

> 3.1.3.5 
> The  root element contains
> implementation-dependent settings. The file within a
> package for the  element is
> settings.xml.

Since the settings are implementation-dependent,
changing the exact format and content of
the data in "PrinterSetup" is unproblematic,
as long as compatibility with older application versions
is maintained.

Luckily, there is already a way to save variable-length
key-value pairs with `JOBSET_FILE605_SYSTEM`,
added in

commit 4bd178f6ee60f641b2a6c7fcc9f6e4b6dd01df27
Date:   Fri Sep 22 11:55:00 2000 +

new feature in JobSetup: additional parameters

Make use of this to save the full printer and
driver name using the "PRINTER_NAME" and "DRIVER_NAME"
keys and restore the values from those if present.

For compatibility with older versions, the (potentially
truncated) values are still written and also used as
fallback on document open.

Change-Id: I55bed58023fa7a078525add79b13f2310aa9a9dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137454
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 11cd74ade59c6b47b25a737775a541fdd6faed44)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137487
Tested-by: Michael Weghorn 

diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 29659fd35fa5..1f095c61f9b9 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -29,6 +29,9 @@
 #define JOBSET_FILE364_SYSTEM   (sal_uInt16(0x))
 #define JOBSET_FILE605_SYSTEM   (sal_uInt16(0xFFFE))
 
+// used only for compatibility with older versions,
+// printer/driver name are truncated if too long,
+// device name and port name are completely unused
 struct ImplOldJobSetupData
 {
 charcPrinterName[64];
@@ -253,6 +256,8 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& 
rJobSetup )
 
 ImplJobSetup& rJobData = rJobSetup.ImplGetData();
 
+// use (potentially truncated) printer/driver name from 
ImplOldJobSetupData as fallback,
+// gets overwritten below if PRINTER_NAME/DRIVER_NAME keys are set
 pData->cPrinterName[std::size(pData->cPrinterName) - 1] = 0;
 rJobData.SetPrinterName( OStringToOUString(pData->cPrinterName, 
aStreamEncoding) );
 pData->cDriverName[std::size(pData->cDriverName) - 1] = 0;
@@ -314,6 +319,10 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& 
rJobSetup )
 else if( aValue == "DuplexMode::LongEdge" )
 rJobData.SetDuplexMode( DuplexMode::LongEdge );
 }
+else if (aKey == u"PRINTER_NAME")
+rJobData.SetPrinterName(aValue);
+else if (aKey == u"DRIVER_NAME")
+rJobData.SetDriver(aValue);
 else
 rJobData.SetValueMap(aKey, aValue);
 }
@@ -384,6 +393,12 @@ SvStream& WriteJobSetup( SvStream& rOStream, const 
JobSetup& rJobSetup )
 write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, 
"DuplexMode::LongEdge");
 break;
 }
+// write printer, driver name in full, the ones in aOldData may be 
truncated
+write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, 
u"PRINTER_NAME", RTL_TEXTENCODING_UTF8);
+write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, 
rJobData.GetPrinterName(), RTL_TEXTENCODING_UTF8);
+write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, 
u"DRIVER_NAME", RTL_TEXTENCODING_UTF8);
+write_uInt16_lenPrefixed_uInt8s_FromOUStr

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

2022-07-27 Thread Andrea Gelmini (via logerrit)
 sc/source/ui/app/inputhdl.cxx  |2 +-
 sw/source/ui/misc/bookmark.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ecef3edbcd61a80c1c65982a1ac71b23e06d3d54
Author: Andrea Gelmini 
AuthorDate: Wed Jul 27 07:52:33 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Jul 27 08:59:46 2022 +0200

Fix typos

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

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 99b8be0284a8..3e9fe8e917de 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4242,7 +4242,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* 
pState,
 EditView* pActiveView = pTopView ? pTopView : 
pTableView;
 ESelection aSel = pActiveView ? 
pActiveView->GetSelection() : ESelection();
 
-// if we switched content completly - don't send huge 
numbers
+// if we switched content completely - don't send huge 
numbers
 if (aSel.nStartPara == EE_PARA_NOT_FOUND)
 aSel.nStartPara = 0;
 
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index fe63d4c133ca..6f45170d5d0b 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -390,7 +390,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* 
pParent, SwWrtShell& rS)
 m_xEditTextBtn->set_sensitive(false);
 m_xRenameBtn->set_sensitive(false);
 
-// select 3rd colum, otherwise it'll pick 1st one FIXME doesn't work with 
gtk?
+// select 3rd column, otherwise it'll pick 1st one FIXME doesn't work with 
gtk?
 m_xBookmarksBox->set_column_editables({ false, false, true, false, false 
});
 
 PopulateTable();