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

2022-12-05 Thread Andras Timar (via logerrit)
 sw/source/ui/dialog/uiregionsw.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit 71e96374f0111360ed7da1df0f3323b09d920381
Author: Andras Timar 
AuthorDate: Thu Nov 24 13:37:36 2022 +0100
Commit: Andras Timar 
CommitDate: Tue Dec 6 07:41:41 2022 +

Disallow linking files as Writer sections in Online

Change-Id: I9e4971c72db44ca8216ac468240dd52d46e0b680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143225
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143672
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index 77b0fdd1f757..afe90adc6c21 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1491,6 +1492,21 @@ 
SwInsertSectionTabPage::SwInsertSectionTabPage(weld::Container* pPage, weld::Dia
 m_xDDECB->connect_toggled( LINK( this, SwInsertSectionTabPage, DDEHdl ));
 ChangeProtectHdl(*m_xProtectCB);
 m_xSubRegionED->set_entry_completion(true, true);
+
+// Hide Link section. In general it makes no sense to insert a file from 
the jail,
+// because it does not contain any usable files (documents).
+if(comphelper::LibreOfficeKit::isActive())
+{
+m_xBuilder->weld_label("label1")->hide(); // Link
+m_xFileCB->hide();
+m_xDDECB->hide();
+m_xDDECommandFT->hide();
+m_xFileNameFT->hide();
+m_xFileNameED->hide();
+m_xFilePB->hide();
+m_xSubRegionFT->hide();
+m_xSubRegionED->hide();
+}
 }
 
 SwInsertSectionTabPage::~SwInsertSectionTabPage()


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

2022-12-05 Thread Noel Grandin (via logerrit)
 framework/source/uiconfiguration/uiconfigurationmanager.cxx |   33 
 1 file changed, 12 insertions(+), 21 deletions(-)

New commits:
commit 80ef2a46f4ac2ac6f3b14561a195262156fe4b85
Author: Noel Grandin 
AuthorDate: Mon Dec 5 14:43:30 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 6 07:28:44 2022 +

tdf#152134 Customize: assign user macro to menu hangs

regression from
commit d4257daba1155ebccbfebea99bad0e4152ca9b08
Author: Noel Grandin 
Date:   Fri Dec 24 20:58:28 2021 +0200
use comphelper::WeakComponentImplHelper in MenuBarManager

We should not hold the mutex while firing events, since the mutex is now
non-recursive.

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

diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index eeb1418da1c3..4950cbfc4cf3 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -1347,29 +1347,20 @@ sal_Bool SAL_CALL UIConfigurationManager::isReadOnly()
 void UIConfigurationManager::implts_notifyContainerListener( const 
ConfigurationEvent& aEvent, NotifyOp eOp )
 {
 std::unique_lock aGuard(m_mutex);
-comphelper::OInterfaceIteratorHelper4 pIterator( aGuard, 
m_aConfigListeners );
-while ( pIterator.hasMoreElements() )
-{
-try
-{
-switch ( eOp )
-{
-case NotifyOp_Replace:
-pIterator.next()->elementReplaced( aEvent );
-break;
-case NotifyOp_Insert:
-pIterator.next()->elementInserted( aEvent );
-break;
-case NotifyOp_Remove:
-pIterator.next()->elementRemoved( aEvent );
-break;
-}
-}
-catch( const css::uno::RuntimeException& )
+m_aConfigListeners.forEach(aGuard, [&eOp, &aEvent](const 
css::uno::Reference& l) {
+switch ( eOp )
 {
-pIterator.remove(aGuard);
+case NotifyOp_Replace:
+l->elementReplaced( aEvent );
+break;
+case NotifyOp_Insert:
+l->elementInserted( aEvent );
+break;
+case NotifyOp_Remove:
+l->elementRemoved( aEvent );
+break;
 }
-}
+});
 }
 
 }


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

2022-12-05 Thread Mike Kaganski (via logerrit)
 sw/source/core/unocore/unoparagraph.cxx |   39 +---
 1 file changed, 17 insertions(+), 22 deletions(-)

New commits:
commit 76141ec7db4c26a112f0e9815d333cd70e1c4258
Author: Mike Kaganski 
AuthorDate: Tue Dec 6 08:34:41 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Dec 6 07:13:06 2022 +

Simplify a bit

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

diff --git a/sw/source/core/unocore/unoparagraph.cxx 
b/sw/source/core/unocore/unoparagraph.cxx
index 308ed9fa8dea..a41f11ef873c 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -51,6 +52,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -388,32 +390,25 @@ void SwXParagraph::Impl::SetPropertyValues_Impl(
 
 SwPosition aPos( rTextNode );
 SwCursor aCursor( aPos, nullptr );
-const OUString* pPropertyNames = rPropertyNames.getConstArray();
-const uno::Any* pValues = rValues.getConstArray();
-const SfxItemPropertyMap &rMap = m_rPropSet.getPropertyMap();
 SwParaSelection aParaSel( aCursor );
 
 uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() 
);
-auto aValuesRange = asNonConstRange(aValues);
-for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
-{
-SfxItemPropertyMapEntry const*const pEntry =
-rMap.getByName( pPropertyNames[nProp] );
-if (!pEntry)
+std::transform(
+rPropertyNames.begin(), rPropertyNames.end(), rValues.begin(), 
aValues.getArray(),
+[&rMap = m_rPropSet.getPropertyMap(), this](const OUString& name, 
const uno::Any& value)
 {
-throw beans::UnknownPropertyException(
-"Unknown property: " + pPropertyNames[nProp],
-static_cast< cppu::OWeakObject * >(&m_rThis));
-}
-if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
-{
-throw beans::PropertyVetoException(
-"Property is read-only: " + pPropertyNames[nProp],
-static_cast< cppu::OWeakObject * >(&m_rThis));
-}
-aValuesRange[nProp].Name = pPropertyNames[nProp];
-aValuesRange[nProp].Value = pValues[nProp];
-}
+if (SfxItemPropertyMapEntry const* const pEntry = 
rMap.getByName(name); !pEntry)
+{
+throw beans::UnknownPropertyException("Unknown property: " + 
name,
+  
static_cast(&m_rThis));
+}
+else if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
+{
+throw beans::PropertyVetoException("Property is read-only: " + 
name,
+   
static_cast(&m_rThis));
+}
+return comphelper::makePropertyValue(name, value);
+});
 SwUnoCursorHelper::SetPropertyValues(aCursor, m_rPropSet, aValues);
 }
 


[Libreoffice-commits] core.git: download.lst

2022-12-05 Thread Miklos Vajna (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 136cff8909576bc7f50c4e91fb3916218fbb4f83
Author: Miklos Vajna 
AuthorDate: Mon Dec 5 20:12:57 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Dec 6 07:08:08 2022 +

Update libxmlsec to 1.2.37

Fixes two regressions, see 
.

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

diff --git a/download.lst b/download.lst
index 6cea1bbeaed2..01bd8d655d08 100644
--- a/download.lst
+++ b/download.lst
@@ -152,8 +152,8 @@ export LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
 export LIBWEBP_SHA256SUM := 
7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df
 export LIBWEBP_TARBALL := libwebp-1.2.4.tar.gz
-export XMLSEC_SHA256SUM := 
f0d97e008b211d85808f038326d42e7f5cf46648e176f07406a323e7e8d41c80
-export XMLSEC_TARBALL := xmlsec1-1.2.36.tar.gz
+export XMLSEC_SHA256SUM := 
5f8dfbcb6d1e56bddd0b5ec2e00a3d0ca5342a9f57c24dffde5c796b2be2871c
+export XMLSEC_TARBALL := xmlsec1-1.2.37.tar.gz
 export LIBXML_SHA256SUM := 
5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c
 export LIBXML_VERSION_MICRO := 3
 export LIBXML_TARBALL := libxml2-2.10.$(LIBXML_VERSION_MICRO).tar.xz


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

2022-12-05 Thread Noel Grandin (via logerrit)
 chart2/source/model/inc/StockBar.hxx|3 +++
 chart2/source/model/main/PageBackground.cxx |8 
 chart2/source/model/main/PageBackground.hxx |3 +++
 chart2/source/model/main/StockBar.cxx   |8 
 chart2/source/model/main/Wall.cxx   |8 
 chart2/source/model/main/Wall.hxx   |3 +++
 6 files changed, 33 insertions(+)

New commits:
commit 8035df9dae15cea92ea105135fe86e87467f8ed9
Author: Noel Grandin 
AuthorDate: Mon Dec 5 15:55:12 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 6 06:39:20 2022 +

tdf#151847 Some chart UNO objects were not advertising their types property

which means that accessin them from python and trying to use the
XPropertySet and related interfaces doesn't work nicely

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

diff --git a/chart2/source/model/inc/StockBar.hxx 
b/chart2/source/model/inc/StockBar.hxx
index dd8160574fd2..dbc357ea46fc 100644
--- a/chart2/source/model/inc/StockBar.hxx
+++ b/chart2/source/model/inc/StockBar.hxx
@@ -53,6 +53,9 @@ public:
 private:
 explicit StockBar( const StockBar & rOther );
 
+//  XTypeProvider 
+virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
 //  OPropertySet 
 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
diff --git a/chart2/source/model/main/PageBackground.cxx 
b/chart2/source/model/main/PageBackground.cxx
index 0849f9224f99..b617203186c9 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -124,6 +124,14 @@ PageBackground::PageBackground( const PageBackground & 
rOther ) :
 PageBackground::~PageBackground()
 {}
 
+//  XTypeProvider 
+uno::Sequence< css::uno::Type > SAL_CALL PageBackground::getTypes()
+{
+return ::comphelper::concatSequences(
+impl::PageBackground_Base::getTypes(),
+::property::OPropertySet::getTypes());
+}
+
 //  XCloneable 
 uno::Reference< util::XCloneable > SAL_CALL PageBackground::createClone()
 {
diff --git a/chart2/source/model/main/PageBackground.hxx 
b/chart2/source/model/main/PageBackground.hxx
index 3bc2dcfd0224..15c32234c839 100644
--- a/chart2/source/model/main/PageBackground.hxx
+++ b/chart2/source/model/main/PageBackground.hxx
@@ -58,6 +58,9 @@ public:
 
 explicit PageBackground( const PageBackground & rOther );
 
+//  XTypeProvider 
+virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
 //  OPropertySet 
 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
diff --git a/chart2/source/model/main/StockBar.cxx 
b/chart2/source/model/main/StockBar.cxx
index fcc60846bf67..f319478e07bf 100644
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -131,6 +131,14 @@ StockBar::StockBar( const StockBar & rOther ) :
 StockBar::~StockBar()
 {}
 
+//  XTypeProvider 
+uno::Sequence< css::uno::Type > SAL_CALL StockBar::getTypes()
+{
+return ::comphelper::concatSequences(
+impl::StockBar_Base::getTypes(),
+::property::OPropertySet::getTypes());
+}
+
 //  XCloneable 
 uno::Reference< util::XCloneable > SAL_CALL StockBar::createClone()
 {
diff --git a/chart2/source/model/main/Wall.cxx 
b/chart2/source/model/main/Wall.cxx
index 1727cbf317db..f139a3e9d11f 100644
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -119,6 +119,14 @@ Wall::Wall( const Wall & rOther ) :
 Wall::~Wall()
 {}
 
+//  XTypeProvider 
+uno::Sequence< css::uno::Type > SAL_CALL Wall::getTypes()
+{
+return ::comphelper::concatSequences(
+impl::Wall_Base::getTypes(),
+::property::OPropertySet::getTypes());
+}
+
 //  XCloneable 
 uno::Reference< util::XCloneable > SAL_CALL Wall::createClone()
 {
diff --git a/chart2/source/model/main/Wall.hxx 
b/chart2/source/model/main/Wall.hxx
index ddec92b6c876..696772438d75 100644
--- a/chart2/source/model/main/Wall.hxx
+++ b/chart2/source/model/main/Wall.hxx
@@ -52,6 +52,9 @@ public:
 
 explicit Wall( const Wall & rOther );
 
+//  XTypeProvider 
+virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
 //  OPropertySet 
 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 


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

2022-12-05 Thread Miklos Vajna (via logerrit)
 sw/inc/doc.hxx   |2 -
 sw/inc/strings.hrc   |2 +
 sw/qa/core/doc/data/copy-bookmarks.docx  |binary
 sw/qa/core/doc/doc.cxx   |   43 +++
 sw/source/core/doc/DocumentLayoutManager.cxx |9 +++--
 sw/source/core/doc/docbm.cxx |4 +-
 sw/source/core/doc/doclay.cxx|   26 ++--
 7 files changed, 77 insertions(+), 9 deletions(-)

New commits:
commit dde033a34bb89421caec92ffd47ade956ffbad2b
Author: Miklos Vajna 
AuthorDate: Fri Oct 14 14:28:41 2022 +0200
Commit: Mike Kaganski 
CommitDate: Tue Dec 6 06:21:10 2022 +

sw: improve duplicated images in copied header/footer text

DOCX import currently maps linked headers to 2 Writer headers, the
second header has a copy of the first header's content. The image in the
first header is named 'Picture 1', the copied header names the image as
'Image1'.

This is similar to what commit 41403fbff8140ad0ca7cf8f81d37cddcfbd19197
(sw: improve duplicated bookmarks in copied header/footer text,
2022-10-13) fixed for bookmarks, what happens is that
sw::DocumentLayoutManager::CopyLayoutFormat() clears the name of the
image, and then these are filled in at the end of the import in one
shot, to improve performance. The downside is that it's not possible for
an API user to know which was the original image and which is the copy.

Fix the problem by tweaking the in-header-footer && not-in-mail-merge
case to generate a name like 'Picture 1 Copy 1': this is meant to
preserve the lost connection between the original image and its copy,
while maintaining performance for the mail merge and body text cases
where we expect lots of images.

In the long run it would probably make sense to rather support linked
headers/footers in Writer core so we don't have to create such a copy in
the first place.

(cherry picked from commit 8d4f64427528f76afa4bf39a23edaa991850a50a)

Conflicts:
sw/qa/core/doc/doc.cxx
sw/source/core/doc/DocumentLayoutManager.cxx

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

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 6c92c94ae760..581d06bfcef9 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -679,7 +679,7 @@ public:
 SwDBData const & GetDBData();
 
 // Some helper functions
-OUString GetUniqueGrfName() const;
+OUString GetUniqueGrfName(std::u16string_view rPrefix = 
std::u16string_view()) const;
 OUString GetUniqueOLEName() const;
 OUString GetUniqueFrameName() const;
 OUString GetUniqueShapeName() const;
diff --git a/sw/qa/core/doc/data/copy-bookmarks.docx 
b/sw/qa/core/doc/data/copy-bookmarks.docx
index 3fb27b430a17..a9bedb487946 100644
Binary files a/sw/qa/core/doc/data/copy-bookmarks.docx and 
b/sw/qa/core/doc/data/copy-bookmarks.docx differ
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index f9d475216d2b..28fbe3feaaf8 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -394,6 +394,24 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testCopyBookmarks)
 // - Actual  : 2
 // i.e. the 2nd header had a duplicated bookmark without "Copy" in its 
name.
 CPPUNIT_ASSERT_EQUAL(static_cast(1), nActual);
+
+// Also, when checking the # of non-copy images in the resulting doc model:
+nActual = 0;
+SwFrameFormats& rFrameFormats = *pDoc->GetSpzFrameFormats();
+for (size_t i = 0; i < rFrameFormats.size(); ++i)
+{
+if (rFrameFormats[i]->GetName().indexOf("Copy") == -1)
+{
+++nActual;
+}
+}
+
+// Then make sure we have a single non-copy image, with no duplications:
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 2
+// i.e. the 2nd header had a duplicated image without "Copy" in its name.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), nActual);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index a03d5dc1d60d..87c75b3e246e 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -336,15 +336,16 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
 // 2) anchored in a header/footer
 // 3) anchored (to paragraph?)
 bool bMayNotCopy = false;
+const auto pCAnchor = rNewAnchor.GetContentAnchor();
+bool bInHeaderFooter = pCAnchor && 
m_rDoc.IsInHeaderFooter(pCAnchor->nNode);
 if(bDraw)
 {
-const auto pCAnchor = rNewAnchor.GetContentAnchor();
 bool bCheckControlLayer = false;
 
rSource.CallSwClientNotify(sw::CheckDrawFrame

[Libreoffice-commits] core.git: comphelper/source cppuhelper/source editeng/source forms/source svx/source sw/source toolkit/source xmloff/source

2022-12-05 Thread Mike Kaganski (via logerrit)
 comphelper/source/property/propagg.cxx   |6 ++
 cppuhelper/source/propshlp.cxx   |4 
 editeng/source/uno/unotext.cxx   |4 
 forms/source/component/ListBox.cxx   |4 
 svx/source/table/cell.cxx|3 +++
 svx/source/unodraw/unoshape.cxx  |5 -
 sw/source/core/unocore/unoparagraph.cxx  |4 
 sw/source/core/unocore/unoport.cxx   |4 
 toolkit/source/controls/unocontrolmodel.cxx  |3 +++
 xmloff/source/forms/gridcolumnproptranslator.cxx |3 +++
 10 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit b15eb164a8e44c02c196cef9f3de5e5478eb78de
Author: Mike Kaganski 
AuthorDate: Mon Dec 5 21:45:48 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Dec 6 05:32:37 2022 +

tdf#152380: add checks for names and values sequences length equality

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

diff --git a/comphelper/source/property/propagg.cxx 
b/comphelper/source/property/propagg.cxx
index 0d8ea6a10bb9..5a0574460cf4 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -589,6 +589,9 @@ void SAL_CALL 
OPropertySetAggregationHelper::setPropertyValues(
 OPropertySetHelper::setPropertyValues(_rPropertyNames, _rValues);
 else if (_rPropertyNames.getLength() == 1) // use the more efficient way
 {
+if (_rValues.getLength() != 1)
+throw IllegalArgumentException("lengths do not match", 
static_cast(this),
+   -1);
 try
 {
 setPropertyValue( _rPropertyNames[0], _rValues[0] );
@@ -631,6 +634,9 @@ void SAL_CALL 
OPropertySetAggregationHelper::setPropertyValues(
 // mixed
 else
 {
+if (_rValues.getLength() != nLen)
+throw IllegalArgumentException("lengths do not match",
+   
static_cast(this), -1);
 const  css::uno::Any* pValues = _rValues.getConstArray();
 
 // dividing the Names and _rValues
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 3af4cda49bb7..18ee9d1bb770 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -867,6 +868,9 @@ void OPropertySetHelper::setPropertyValues(
 const Sequence& rValues )
 {
 sal_Int32   nSeqLen = rPropertyNames.getLength();
+if (nSeqLen != rValues.getLength())
+throw IllegalArgumentException("lengths do not match", 
static_cast(this),
+   -1);
 std::unique_ptr pHandles(new sal_Int32[ nSeqLen ]);
 // get the map table
 IPropertyArrayHelper & rPH = getInfoHelper();
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 4f831a70a30f..8d6b2aa9ec53 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -746,6 +746,10 @@ void SAL_CALL SvxUnoTextRangeBase::setPropertyValues( 
const uno::Sequence< OUStr
 
 void SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUString >& 
aPropertyNames, const uno::Sequence< uno::Any >& aValues, sal_Int32 nPara )
 {
+if (aPropertyNames.getLength() != aValues.getLength())
+throw lang::IllegalArgumentException("lengths do not match",
+ 
static_cast(this), -1);
+
 SolarMutexGuard aGuard;
 
 SvxTextForwarder* pForwarder = mpEditSource ? 
mpEditSource->GetTextForwarder() : nullptr;
diff --git a/forms/source/component/ListBox.cxx 
b/forms/source/component/ListBox.cxx
index 700bf6989304..79d6be399d6b 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -473,6 +473,10 @@ namespace frm
 );
 if ( ( pSelectedItemsPos != _rPropertyNames.end() ) && 
aStringItemListExists )
 {
+if (_rPropertyNames.getLength() != _rValues.getLength())
+throw css::lang::IllegalArgumentException("lengths do not 
match",
+  
static_cast(this), -1);
+
 // both properties are present
 // -> remember the value for the select sequence
 pSelectSequenceValue = _rValues.getConstArray() + ( 
pSelectedItemsPos - _rPropertyNames.begin() );
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index a358865334d9..5dbc1ee1a8e5 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1282,6 +1282,9 @@ void SAL_CALL Cell::setPropertyValues( const Sequence< 
OUString >& aPropertyName
 throw DisposedException();
 
 const sal_Int3

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

2022-12-05 Thread Khaled Hosny (via logerrit)
 vcl/source/fontsubset/sft.cxx |  111 --
 1 file changed, 55 insertions(+), 56 deletions(-)

New commits:
commit d3f9b3029a1b5f6b389978509fdf8de7e128a4b3
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 22:11:09 2022 +0200
Commit: خالد حسني 
CommitDate: Tue Dec 6 04:25:17 2022 +

Shuffle code around

Change-Id: I3b3a88c91634fb19a39d21cdd0095d34badea1e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143687
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index ee2e0de65dbc..6250a1ee6f06 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1809,9 +1809,61 @@ SFErrCodes CreateTTFromTTGlyphs(AbstractTrueTypeFont  
*ttf,
 return res;
 }
 
-static void FillFontSubsetInfo(AbstractTrueTypeFont*, FontSubsetInfo&);
-static bool CreateCFFfontSubset(const unsigned char*, int, 
std::vector&,
-const sal_GlyphId*, const sal_uInt8*, int, 
FontSubsetInfo&);
+namespace
+{
+void FillFontSubsetInfo(AbstractTrueTypeFont* ttf, FontSubsetInfo& rInfo)
+{
+TTGlobalFontInfo aTTInfo;
+GetTTGlobalFontInfo(ttf, &aTTInfo);
+
+rInfo.m_aPSName = OUString::fromUtf8(aTTInfo.psname);
+rInfo.m_nFontType = FontType::SFNT_TTF;
+rInfo.m_aFontBBox
+= tools::Rectangle(Point(aTTInfo.xMin, aTTInfo.yMin), 
Point(aTTInfo.xMax, aTTInfo.yMax));
+rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
+rInfo.m_nAscent = aTTInfo.winAscent;
+rInfo.m_nDescent = aTTInfo.winDescent;
+
+// mac fonts usually do not have an OS2-table
+// => get valid ascent/descent values from other tables
+if (!rInfo.m_nAscent)
+rInfo.m_nAscent = +aTTInfo.typoAscender;
+if (!rInfo.m_nAscent)
+rInfo.m_nAscent = +aTTInfo.ascender;
+if (!rInfo.m_nDescent)
+rInfo.m_nDescent = +aTTInfo.typoDescender;
+if (!rInfo.m_nDescent)
+rInfo.m_nDescent = -aTTInfo.descender;
+
+rInfo.m_bFilled = true;
+}
+
+bool CreateCFFfontSubset(const unsigned char* pFontBytes, int nByteLength,
+ std::vector& rOutBuffer, const 
sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding, int nGlyphCount, 
FontSubsetInfo& rInfo)
+{
+utl::TempFileFast aTempFile;
+SvStream* pStream = aTempFile.GetStream(StreamMode::READWRITE);
+
+rInfo.LoadFont(FontType::CFF_FONT, pFontBytes, nByteLength);
+bool bRet = rInfo.CreateFontSubset(FontType::TYPE1_PFB, pStream, nullptr, 
pGlyphIds, pEncoding,
+   nGlyphCount);
+
+if (bRet)
+{
+rOutBuffer.resize(pStream->TellEnd());
+pStream->Seek(0);
+auto nRead = pStream->ReadBytes(rOutBuffer.data(), rOutBuffer.size());
+if (nRead != rOutBuffer.size())
+{
+rOutBuffer.clear();
+return false;
+}
+}
+
+return bRet;
+}
+}
 
 bool CreateTTFfontSubset(vcl::AbstractTrueTypeFont& rTTF, 
std::vector& rOutBuffer,
  const sal_GlyphId* pGlyphIds, const sal_uInt8* 
pEncoding,
@@ -1881,32 +1933,6 @@ bool CreateTTFfontSubset(vcl::AbstractTrueTypeFont& 
rTTF, std::vector
 == vcl::SFErrCodes::Ok);
 }
 
-static bool CreateCFFfontSubset(const unsigned char* pFontBytes, int 
nByteLength,
-std::vector& rOutBuffer, const 
sal_GlyphId* pGlyphIds,
-const sal_uInt8* pEncoding, int nGlyphCount, 
FontSubsetInfo& rInfo)
-{
-utl::TempFileFast aTempFile;
-SvStream* pStream = aTempFile.GetStream(StreamMode::READWRITE);
-
-rInfo.LoadFont(FontType::CFF_FONT, pFontBytes, nByteLength);
-bool bRet = rInfo.CreateFontSubset(FontType::TYPE1_PFB, pStream, nullptr, 
pGlyphIds, pEncoding,
-   nGlyphCount);
-
-if (bRet)
-{
-rOutBuffer.resize(pStream->TellEnd());
-pStream->Seek(0);
-auto nRead = pStream->ReadBytes(rOutBuffer.data(), rOutBuffer.size());
-if (nRead != rOutBuffer.size())
-{
-rOutBuffer.clear();
-return false;
-}
-}
-
-return bRet;
-}
-
 GlyphOffsets::GlyphOffsets(sal_uInt8 *sfntP, sal_uInt32 sfntLen)
 {
 sal_uInt8 *loca = nullptr;
@@ -2259,33 +2285,6 @@ void GetTTGlobalFontInfo(AbstractTrueTypeFont *ttf, 
TTGlobalFontInfo *info)
 }
 }
 
-static void FillFontSubsetInfo(AbstractTrueTypeFont *ttf, FontSubsetInfo& 
rInfo)
-{
-TTGlobalFontInfo aTTInfo;
-GetTTGlobalFontInfo(ttf, &aTTInfo);
-
-rInfo.m_aPSName = OUString::fromUtf8(aTTInfo.psname);
-rInfo.m_nFontType = FontType::SFNT_TTF;
-rInfo.m_aFontBBox
-= tools::Rectangle(Point(aTTInfo.xMin, aTTInfo.yMin), 
Point(aTTInfo.xMax, aTTInfo.yMax));
-rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
-rInfo.m_nAscent = aTTInfo.winAscent;
-rInfo.m_nDescent = aTTInfo.winDescent;
-
-// mac fonts usually do not have an

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

2022-12-05 Thread Khaled Hosny (via logerrit)
 vcl/inc/sft.hxx  |   10 --
 vcl/source/font/PhysicalFontFace.cxx |   11 +--
 vcl/source/fontsubset/sft.cxx|   24 +++-
 3 files changed, 20 insertions(+), 25 deletions(-)

New commits:
commit 1d5a02d12eacadb708c18e70db747e80ab8817a9
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 22:07:29 2022 +0200
Commit: خالد حسني 
CommitDate: Tue Dec 6 04:24:42 2022 +

Simplify PhysicalFontFace::CreateFontSubset() a bit

Hide the logic inside fontsubset and don’t leak it to the caller.

Change-Id: Ibc845e0051eaeb64e8de42f80d4d404fd6a3880e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143686
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 52d9c3db014d..b5fc71b44530 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -608,20 +608,10 @@ class TrueTypeFont;
   intnGlyphs);
 
 VCL_DLLPUBLIC bool CreateTTFfontSubset(AbstractTrueTypeFont& aTTF,
-  std::vector& rOutBuffer,
-  const sal_GlyphId* pGlyphIds,
-  const sal_uInt8* pEncoding,
-  int nGlyphCount);
-
-VCL_DLLPUBLIC bool CreateCFFfontSubset(const unsigned char* pFontBytes,
-  int nByteLength,
   std::vector& rOutBuffer,
   const sal_GlyphId* pGlyphIds,
   const sal_uInt8* pEncoding,
   int nGlyphCount, FontSubsetInfo& rInfo);
-
-VCL_DLLPUBLIC void FillFontSubsetInfo(AbstractTrueTypeFont *ttf,
-  FontSubsetInfo& rInfo);
 /**
  * Generates a new PostScript Type42 font and dumps it to outf file.
  * This function substitutes glyph 0 for all glyphIDs that are not found in 
the font.
diff --git a/vcl/source/font/PhysicalFontFace.cxx 
b/vcl/source/font/PhysicalFontFace.cxx
index 72c0a86802c8..aa9a9327f708 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -363,17 +363,8 @@ bool 
PhysicalFontFace::CreateFontSubset(std::vector& rOutBuffer,
 if (aSftFont.initialize() != SFErrCodes::Ok)
 return false;
 
-// Get details about the subset font.
-FillFontSubsetInfo(&aSftFont, rInfo);
-
-// Shortcut for CFF-subsetting.
-auto aData = GetRawFontData(T_CFF);
-if (!aData.empty())
-return CreateCFFfontSubset(aData.data(), aData.size(), rOutBuffer, 
pGlyphIds, pEncoding,
-   nGlyphCount, rInfo);
-
 // write subset into destination file
-return CreateTTFfontSubset(aSftFont, rOutBuffer, pGlyphIds, pEncoding, 
nGlyphCount);
+return CreateTTFfontSubset(aSftFont, rOutBuffer, pGlyphIds, pEncoding, 
nGlyphCount, rInfo);
 }
 
 bool PhysicalFontFace::HasColorLayers() const
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 205be4f8ce26..ee2e0de65dbc 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1809,10 +1809,24 @@ SFErrCodes CreateTTFromTTGlyphs(AbstractTrueTypeFont  
*ttf,
 return res;
 }
 
+static void FillFontSubsetInfo(AbstractTrueTypeFont*, FontSubsetInfo&);
+static bool CreateCFFfontSubset(const unsigned char*, int, 
std::vector&,
+const sal_GlyphId*, const sal_uInt8*, int, 
FontSubsetInfo&);
+
 bool CreateTTFfontSubset(vcl::AbstractTrueTypeFont& rTTF, 
std::vector& rOutBuffer,
  const sal_GlyphId* pGlyphIds, const sal_uInt8* 
pEncoding,
- const int nOrigGlyphCount)
+ const int nOrigGlyphCount, FontSubsetInfo& rInfo)
 {
+// Get details about the subset font.
+FillFontSubsetInfo(&rTTF, rInfo);
+
+// Shortcut for CFF-subsetting.
+sal_uInt32 nCFF;
+const sal_uInt8* pCFF = rTTF.table(O_CFF, nCFF);
+if (nCFF)
+return CreateCFFfontSubset(pCFF, nCFF, rOutBuffer, pGlyphIds, 
pEncoding,
+   nOrigGlyphCount, rInfo);
+
 // Multiple questions:
 // - Why is there a glyph limit?
 //   MacOS used to handle 257 glyphs...
@@ -1867,9 +1881,9 @@ bool CreateTTFfontSubset(vcl::AbstractTrueTypeFont& rTTF, 
std::vector
 == vcl::SFErrCodes::Ok);
 }
 
-bool CreateCFFfontSubset(const unsigned char* pFontBytes, int nByteLength,
- std::vector& rOutBuffer, const 
sal_GlyphId* pGlyphIds,
- const sal_uInt8* pEncoding, int nGlyphCount, 
FontSubsetInfo& rInfo)
+static bool CreateCFFfontSubset(const unsigned char* pFontBytes, int 
nByteLength,
+std::vector& rOutBuffer, const 
sal_GlyphId* pGlyphIds,
+const sal_uInt8* pEncoding, int nGlyphCount, 
FontSubsetInfo& rInfo)
 {
 utl::TempFileFast aTempFile;
 SvStream* pStream = aTempFile.GetStream

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

2022-12-05 Thread Khaled Hosny (via logerrit)
 vcl/inc/fontsubset.hxx   |1 +
 vcl/inc/sft.hxx  |1 -
 vcl/source/font/PhysicalFontFace.cxx |   13 ++---
 vcl/source/fontsubset/cff.cxx|   28 
 vcl/source/fontsubset/fontsubset.cxx |1 +
 vcl/source/fontsubset/sft.cxx|   11 ++-
 6 files changed, 34 insertions(+), 21 deletions(-)

New commits:
commit 7415ce2b9795a78f836bc5e5bffb4b56eee26b21
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 20:52:13 2022 +0200
Commit: خالد حسني 
CommitDate: Tue Dec 6 04:22:07 2022 +

tdf#113048: Fix PDF ascender and descender of some fonts

Use the same ascender and descender calculation for fonts with CFF
table as fonts without CFF table.

This also provides a better fix for tdf#138325 and tdf#151039.

Change-Id: I416a123199e94401fa557fce95013eb8b0590e33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143683
Tested-by: خالد حسني 
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx
index d7e5318eec26..a1ba31aa58d8 100644
--- a/vcl/inc/fontsubset.hxx
+++ b/vcl/inc/fontsubset.hxx
@@ -70,6 +70,7 @@ public: // TODO: make subsetter results private and provide 
accessor methods ins
 int m_nCapHeight;
 tools::Rectangle   m_aFontBBox;
 FontTypem_nFontType;///< font-type of subset result
+boolm_bFilled;
 
 private:
 // input-font-specific details
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 29f282a04ec4..52d9c3db014d 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -616,7 +616,6 @@ class TrueTypeFont;
 VCL_DLLPUBLIC bool CreateCFFfontSubset(const unsigned char* pFontBytes,
   int nByteLength,
   std::vector& rOutBuffer,
-  const OUString& rPSName,
   const sal_GlyphId* pGlyphIds,
   const sal_uInt8* pEncoding,
   int nGlyphCount, FontSubsetInfo& rInfo);
diff --git a/vcl/source/font/PhysicalFontFace.cxx 
b/vcl/source/font/PhysicalFontFace.cxx
index 682113cad102..72c0a86802c8 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -358,13 +358,6 @@ bool 
PhysicalFontFace::CreateFontSubset(std::vector& rOutBuffer,
 const sal_GlyphId* pGlyphIds, const 
sal_uInt8* pEncoding,
 const int nGlyphCount, FontSubsetInfo& 
rInfo) const
 {
-// Shortcut for CFF-subsetting.
-auto aData = GetRawFontData(T_CFF);
-if (!aData.empty())
-return CreateCFFfontSubset(aData.data(), aData.size(), rOutBuffer,
-   GetName(NAME_ID_POSTSCRIPT_NAME), 
pGlyphIds, pEncoding,
-   nGlyphCount, rInfo);
-
 // Prepare data for font subsetter.
 TrueTypeFace aSftFont(RawFace(GetHbFace()), GetFontCharMap());
 if (aSftFont.initialize() != SFErrCodes::Ok)
@@ -373,6 +366,12 @@ bool 
PhysicalFontFace::CreateFontSubset(std::vector& rOutBuffer,
 // Get details about the subset font.
 FillFontSubsetInfo(&aSftFont, rInfo);
 
+// Shortcut for CFF-subsetting.
+auto aData = GetRawFontData(T_CFF);
+if (!aData.empty())
+return CreateCFFfontSubset(aData.data(), aData.size(), rOutBuffer, 
pGlyphIds, pEncoding,
+   nGlyphCount, rInfo);
+
 // write subset into destination file
 return CreateTTFfontSubset(aSftFont, rOutBuffer, pGlyphIds, pEncoding, 
nGlyphCount);
 }
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 45a8b7890a31..76a77ec961cd 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -2361,9 +2361,22 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& 
rEmitter,
 rEmitter.emitValVector( "/FontMatrix [", "]readonly def\n", 
maFontMatrix);
 else // emit default FontMatrix if needed
 rEmitter.maBuffer.append( "/FontMatrix [0.001 0 0 0.001 0 0]readonly 
def\n");
+
 // emit FontBBox
+ValType fXFactor = 1.0;
+ValType fYFactor = 1.0;
+if( maFontMatrix.size() >= 4) {
+fXFactor = 1000.0F * maFontMatrix[0];
+fYFactor = 1000.0F * maFontMatrix[3];
+}
+
 auto aFontBBox = maFontBBox;
-if (aFontBBox.size() != 4)
+if (rFSInfo.m_bFilled)
+aFontBBox = {
+rFSInfo.m_aFontBBox.Left() / fXFactor, rFSInfo.m_aFontBBox.Top() / 
fYFactor,
+rFSInfo.m_aFontBBox.Right() / fXFactor, 
(rFSInfo.m_aFontBBox.Bottom() + 1) / fYFactor
+};
+else if (aFontBBox.size() != 4)
 aFontBBox = { 0, 0, 999, 999 }; // emit default FontBBox if needed
 rEmitter.emitValVector( "/FontBBox {", "}readonly def\n", aFontBBox);
 // emit FONTINFO into TOPDICT
@@ -2572,12 +2585,12 @@ void CffSubsetterContext::

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

2022-12-05 Thread Kevin Suo (via logerrit)
 sdext/source/pdfimport/inc/genericelements.hxx  |4 +---
 sdext/source/pdfimport/tree/genericelements.cxx |4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit c9e961e6803a70587bd4686d05abdd4ac11de434
Author: Kevin Suo 
AuthorDate: Mon Dec 5 17:37:39 2022 +0800
Commit: Kevin Suo 
CommitDate: Tue Dec 6 03:42:27 2022 +

"using namespace com::sun::star" -> css in header file

See Stephan Bergmann's comment the following change (thanks!):
https://gerrit.libreoffice.org/c/core/+/143598

Change-Id: I409b823439979c64cadcb582d8fb4dec4ff412b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143664
Tested-by: Jenkins
Reviewed-by: Kevin Suo 

diff --git a/sdext/source/pdfimport/inc/genericelements.hxx 
b/sdext/source/pdfimport/inc/genericelements.hxx
index 37b448d2b613..6d1459a1f032 100644
--- a/sdext/source/pdfimport/inc/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -32,8 +32,6 @@
 
 #include 
 
-using namespace com::sun::star;
-
 namespace pdfi
 {
 class XmlEmitter;
@@ -313,7 +311,7 @@ namespace pdfi
 { return std::make_shared(); }
 };
 
-bool isComplex(const uno::Reference& rBreakIterator, 
TextElement* const pTextElem);
+bool isComplex(const css::uno::Reference& 
rBreakIterator, TextElement* const pTextElem);
 }
 
 #endif
diff --git a/sdext/source/pdfimport/tree/genericelements.cxx 
b/sdext/source/pdfimport/tree/genericelements.cxx
index c3c816aecdf2..1d11cd0d914e 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -431,12 +431,12 @@ void DocumentElement::visitedBy( ElementTreeVisitor&  
rV
 rVisitor.visit(*this, rParentIt);
 }
 
-bool isComplex(const uno::Reference& rBreakIterator, 
TextElement* const pTextElem) {
+bool isComplex(const css::uno::Reference& 
rBreakIterator, TextElement* const pTextElem) {
 OUString str(pTextElem->Text.toString());
 for(int i=0; i< str.getLength(); i++)
 {
 sal_Int16 nType = rBreakIterator->getScriptType(str, i);
-if (nType == i18n::ScriptType::COMPLEX)
+if (nType == css::i18n::ScriptType::COMPLEX)
 {
 return true;
 }


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

2022-12-05 Thread Stephan Bergmann (via logerrit)
 codemaker/source/cppumaker/cpputype.cxx |2 +-
 sd/source/ui/inc/futext.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c08e5db055c9d34d3f0b0b9d2a192d7ebdcd9576
Author: Stephan Bergmann 
AuthorDate: Mon Dec 5 11:24:49 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Dec 5 21:59:45 2022 +

Make check for complete type more explicit

When 485c9d4f0e59e13e772da8f8a7975f0ddd77c33e "Clarify the use of
untools::WeakReference" introduced cppu::detail::isUnoInterfaceType and its 
use
in the requires-clause of unotools::WeakReference::get, its commit message
argued that while isUnoInterfaceType only works if the given type is 
complete,
that would already be taken care of via the use of std::is_convertible_v in 
the
implementation of unotools::WeakReference::get.  But while 
std::is_convertible_v
nominally requires its argument types to be complete (unless they are void, 
or
arrays of unknown bound), typical implementations like recent libc++ or
libstdc++ do not seem to enforce that (and just return false in such a 
case).

So better make isUnoInterfaceType explicitly require that the given type is
complete.  Which turned up one case where it isn't at the point where
unotools::WeakReference::get is called.  (And while the 
resulting
call to dynamic_cast(...) in the implementation of that 
function
would cause an error when SdrTextObj is not complete, compilers happened to
instantiate that template specialization only at the end of the TU, by which
time SdrTextObj happened to be a complete type in the TUs including that
sd/source/ui/inc/futext.hxx.  So all happened to work out OK.)

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

diff --git a/codemaker/source/cppumaker/cpputype.cxx 
b/codemaker/source/cppumaker/cpputype.cxx
index 2c8f938e6bb1..bb8e3ed7d33c 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -1198,7 +1198,7 @@ void InterfaceType::dumpHppFile(
 if (name_ == "com.sun.star.uno.XInterface") {
 out << "template struct IsUnoInterfaceType: 
::std::false_type {};\n"
"template inline constexpr auto isUnoInterfaceType 
="
-   " IsUnoInterfaceType::value;\n";
+   " sizeof (T) && IsUnoInterfaceType::value;\n";
 }
 out << "template<> struct IsUnoInterfaceType<";
 dumpType(out, name_, false, false, true);
diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx
index 310df1455af1..681597b4cd6d 100644
--- a/sd/source/ui/inc/futext.hxx
+++ b/sd/source/ui/inc/futext.hxx
@@ -20,9 +20,9 @@
 #pragma once
 
 #include "fuconstr.hxx"
+#include 
 #include 
 
-class SdrTextObj;
 class FontList;
 class OutlinerView;
 


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

2022-12-05 Thread Tibor Nagy (via logerrit)
 oox/source/ppt/slidepersist.cxx  |   34 ++
 sd/qa/unit/data/pptx/connectors.pptx |binary
 sd/qa/unit/import-tests.cxx  |4 ++--
 3 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit df6ff2392701b04bbafddb1119e1ac43cac71fae
Author: Tibor Nagy 
AuthorDate: Tue Nov 29 15:43:58 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Dec 5 21:18:26 2022 +

tdf#152211 PPTX import: fix connector position based on line width

Thick shape line changed the connector, e.g. direction of
its arrow head.

Follow-up to commit d8c89fb920af747ec51ce966b5d7b65e9340afbd
"tdf#151891 PPTX import: fix regression of connector position"

Regression from commit cbf66ec3e60d07efb7c3cceed9b4f0fb4f0510c8
"tdf#89449 PPTX import: fix line connectors".

Change-Id: I99d22409ec65e10609b1e371cc4d301fd73c7c82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143467
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 400e44cebd993f4b9b3d878fb9264f99e005c9fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143589
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index d4f56aba5a7e..4536e7c75be1 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -372,10 +372,24 @@ static void 
lcl_SetEdgeLineValue(uno::Reference& rXConnector,
 SdrObject* pStartObj = xStartSp.is() ? 
SdrObject::getSdrObjectFromXShape(xStartSp) : nullptr;
 SdrObject* pEndObj = xEndSp.is() ? 
SdrObject::getSdrObjectFromXShape(xEndSp) : nullptr;
 
+sal_Int32 nStartSpLineW = 0;
 if (pStartObj)
+{
 aStartRect = pStartObj->GetSnapRect();
+uno::Reference xPropxStartSp(xStartSp, 
uno::UNO_QUERY);
+xPropxStartSp->getPropertyValue("LineWidth") >>= nStartSpLineW;
+if (nStartSpLineW)
+nStartSpLineW = nStartSpLineW / 2;
+}
+sal_Int32 nEndSpLineW = 0;
 if (pEndObj)
+{
 aEndRect = pEndObj->GetSnapRect();
+uno::Reference xPropxEndSp(xEndSp, 
uno::UNO_QUERY);
+xPropxEndSp->getPropertyValue("LineWidth") >>= nEndSpLineW;
+if (nEndSpLineW)
+nEndSpLineW = nEndSpLineW / 2;
+}
 
 const OUString sConnectorName = rShapePtr->getConnectorName();
 if (sConnectorName == "bentConnector2")
@@ -386,20 +400,24 @@ static void 
lcl_SetEdgeLineValue(uno::Reference& rXConnector,
 if (aConnSize.Height < aConnSize.Width)
 {
 if (xStartSp.is())
-nEdge -= (aStartPt.Y > aEndPt.Y) ? (aStartRect.Top() - 
aEndPt.Y)
- : (aStartRect.Bottom() - 
aEndPt.Y);
+nEdge = (aStartPt.Y > aEndPt.Y)
+? (nStartSpLineW - (aStartRect.Top() - 
aEndPt.Y))
+: ((aEndPt.Y - aStartRect.Bottom()) - 
nStartSpLineW);
 else
-nEdge -= (aStartPt.Y > aEndPt.Y) ? (aEndRect.Bottom() - 
aStartPt.Y)
- : (aEndRect.Top() - 
aStartPt.Y);
+nEdge = (aStartPt.Y > aEndPt.Y)
+? ((aStartPt.Y - aEndRect.Bottom()) - 
nEndSpLineW)
+: (nEndSpLineW - (aEndRect.Top() - 
aStartPt.Y));
 }
 else
 {
 if (xStartSp.is())
-nEdge -= (aStartPt.X > aEndPt.X) ? (aStartRect.Left() - 
aEndPt.X)
- : (aStartRect.Right() - 
aEndPt.X);
+nEdge = (aStartPt.X > aEndPt.X)
+? (nStartSpLineW - (aStartRect.Left() - 
aEndPt.X))
+: ((aEndPt.X - aStartRect.Right()) - 
nStartSpLineW);
 else
-nEdge -= (aStartPt.X > aEndPt.X) ? (aEndRect.Right() - 
aStartPt.X)
- : (aEndRect.Left() - 
aStartPt.X);
+nEdge = (aStartPt.X > aEndPt.X)
+? ((aStartPt.X - aEndRect.Right()) - 
nEndSpLineW)
+: (nEndSpLineW - (aEndRect.Left() - 
aStartPt.X));
 }
 }
 else
diff --git a/sd/qa/unit/data/pptx/connectors.pptx 
b/sd/qa/unit/data/pptx/connectors.pptx
index ba959068663c..2f65acba13b8 100644
Binary files a/sd/qa/unit/data/pptx/connectors.pptx and 
b/sd/qa/unit/data/pptx/connectors.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 17b0f894c75f..66653f751867 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -311,8 +311,8 @@ void SdImportTest::testConnectors()
 ::sd::DrawDocShellRef xDocShRef
 = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/connecto

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

2022-12-05 Thread Rafael Lima (via logerrit)
 starmath/source/tmpdevice.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit fd8a7f0b6ca9454401d035c6b8d822f671e1849f
Author: Rafael Lima 
AuthorDate: Fri Dec 2 11:06:07 2022 +
Commit: Xisco Fauli 
CommitDate: Mon Dec 5 21:18:10 2022 +

tdf#148505 Fix COL_AUTO in embedded Math formulas

Change-Id: I8be0289100cbd0921bcb05ffec186155abba8743
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143575
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 
(cherry picked from commit 12732eb7c34baa3f846ec6d0c10f8987051ace34)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143588
Reviewed-by: Xisco Fauli 

diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index 5eee10d9670f..fccb20f728bd 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -49,7 +49,8 @@ Color SmTmpDevice::GetTextColor(const Color& rTextColor)
 if (rTextColor == COL_AUTO)
 {
 Color aConfigFontColor = 
SM_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
-return rOutDev.GetReadableFontColor(aConfigFontColor, 
rOutDev.GetBackgroundColor());
+Color aConfigDocColor = 
SM_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+return rOutDev.GetReadableFontColor(aConfigFontColor, aConfigDocColor);
 }
 
 return rTextColor;


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

2022-12-05 Thread Khaled Hosny (via logerrit)
 vcl/inc/fontsubset.hxx   |1 -
 vcl/source/fontsubset/fontsubset.cxx |   10 --
 2 files changed, 11 deletions(-)

New commits:
commit 05b7e6039da5fda18205798d00e335b2c8126872
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 17:58:58 2022 +0200
Commit: خالد حسني 
CommitDate: Mon Dec 5 21:12:48 2022 +

Drop dummy function

Type 1 support is long and this was always dead code anyway.

Change-Id: Ia00626e7d44419af333feb59d4dc52e624ffd263
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143682
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx
index cb4cb34dd979..d7e5318eec26 100644
--- a/vcl/inc/fontsubset.hxx
+++ b/vcl/inc/fontsubset.hxx
@@ -88,7 +88,6 @@ private:
 
 boolCreateFontSubsetFromCff();
 boolCreateFontSubsetFromSfnt();
-static bool CreateFontSubsetFromType1();
 };
 
 int VCL_DLLPUBLIC TestFontSubset(const void* data, sal_uInt32 size);
diff --git a/vcl/source/fontsubset/fontsubset.cxx 
b/vcl/source/fontsubset/fontsubset.cxx
index 72b634b786f0..1e3daa401bc6 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -96,8 +96,6 @@ bool FontSubsetInfo::CreateFontSubset(
 case FontType::TYPE1_PFA:
 case FontType::TYPE1_PFB:
 case FontType::ANY_TYPE1:
-bOK = CreateFontSubsetFromType1();
-break;
 case FontType::NO_FONT:
 default:
 OSL_FAIL( "unhandled type in CreateFontSubset()");
@@ -151,12 +149,4 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt()
 return (nSFTErr != vcl::SFErrCodes::Ok);
 }
 
-// TODO: replace dummy implementation
-bool FontSubsetInfo::CreateFontSubsetFromType1()
-{
-SAL_WARN("vcl.fonts",
-"CreateFontSubsetFromType1: replace dummy implementation.");
-return false;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-12-05 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/ViewShellImplementation.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit db7f8b960ef44726b8a468eeaa9edd2eba4e6544
Author: Caolán McNamara 
AuthorDate: Mon Dec 5 16:18:03 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 5 19:35:44 2022 +

cid#1517256 Dereference null return value

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

diff --git a/sd/source/ui/view/ViewShellImplementation.cxx 
b/sd/source/ui/view/ViewShellImplementation.cxx
index 5725feb2cc4f..2f81d5be9b3e 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -122,6 +122,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
 const SfxUInt32Item* pNewAutoLayout = 
rRequest.GetArg(ID_VAL_WHATLAYOUT);
 const SfxBoolItem* pBVisible = 
rRequest.GetArg(ID_VAL_ISPAGEBACK);
 const SfxBoolItem* pBObjsVisible = 
rRequest.GetArg(ID_VAL_ISPAGEOBJ);
+assert(pNewName && pNewAutoLayout && pBVisible && pBObjsVisible && 
"must be present");
 AutoLayout aLayout 
(static_cast(pNewAutoLayout->GetValue ()));
 if (aLayout >= AUTOLAYOUT_START
 && aLayout < AUTOLAYOUT_END)


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

2022-12-05 Thread Justin Luth (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit fd14dd0e4c6a7ea0866a686f653db90301d664b6
Author: Justin Luth 
AuthorDate: Fri Dec 2 14:59:08 2022 -0500
Commit: Justin Luth 
CommitDate: Mon Dec 5 18:36:29 2022 +

NFC cleanup docxattributeoutput: use existing function to clear

The function already clears these things,
so use it - which should also prevent bugs
where a clear is put in one place and not the other.

A dead giveaway was that m_bHasId = false
is also done in the function.

Change-Id: Ibb97b8da246404841afa5a03d11514dbcc7157b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143604
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6a01be448df8..5eb1c0ba306f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -679,11 +679,7 @@ void SdtBlockHelper::WriteSdtBlock(const 
::sax_fastparser::FSHelperPtr& pSeriali
 
 // clear sdt status
 m_nSdtPrToken = 0;
-m_pTokenChildren.clear();
-m_pDataBindingAttrs.clear();
-m_pTextAttrs.clear();
-m_aAlias.clear();
-m_bHasId = false;
+DeleteAndResetTheLists();
 }
 
 void SdtBlockHelper::WriteExtraParams(const ::sax_fastparser::FSHelperPtr& 
pSerializer)
@@ -1085,7 +1081,6 @@ void DocxAttributeOutput::EndParagraph( 
ww8::WW8TableNodeInfoInner::Pointer_t pT
 //These should be written out to the actual Node and not to the anchor.
 //Clear them as they will be repopulated when the node is processed.
 m_aParagraphSdt.m_nSdtPrToken = 0;
-m_aParagraphSdt.m_bHasId = false;
 m_aParagraphSdt.DeleteAndResetTheLists();
 }
 


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

2022-12-05 Thread Stephan Bergmann (via logerrit)
 sd/qa/unit/import-tests2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9d93e57613fc5e9f67400a166dcce5344c238348
Author: Stephan Bergmann 
AuthorDate: Mon Dec 5 15:52:26 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Dec 5 16:28:47 2022 +

Make sure bHasShadow has a value

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

diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index e704f0bcd783..b258c535e2c6 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -237,7 +237,7 @@ void SdImportTest2::testTdf152186()
 for (size_t i = 0; i < pPage->GetObjCount(); ++i)
 {
 uno::Reference xShape(getShapeFromPage(i, 0));
-xShape->getPropertyValue("Shadow") >>= bHasShadow;
+CPPUNIT_ASSERT(xShape->getPropertyValue("Shadow") >>= bHasShadow);
 CPPUNIT_ASSERT(!bHasShadow);
 }
 }


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

2022-12-05 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |8 
 1 file changed, 8 insertions(+)

New commits:
commit fe5cca63c2a15dfc49cd251a6be4ab3925ab1dab
Author: László Németh 
AuthorDate: Mon Dec 5 11:10:16 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 16:16:25 2022 +

LibreLogo: fix SVG export of font features and text portions

Text portions of rotated text was exported with bad positions.

Text using font features was exported with non-portable font
names with colon, working only in LibreOffice correctly.

Fix these by converting the text to curve during the SVG export.

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

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index 5f0c2261f614..1ba5b835244f 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -168,6 +168,7 @@ class __Doc__:
 self.time = 0
 self.zoomvalue = 0
 self.lockturtle = False
+self.fixSVG = False
 self.initialize()
 
 def initialize(self):
@@ -539,6 +540,7 @@ class LogoProgram(threading.Thread):
 parent = _.doc.CurrentController.Frame.ContainerWindow
 MessageBox(parent, "Document objects with%s script events" % 
[" possible", ""][secid-1], "LibreLogo program can't start", "errorbox")
 else:
+_.fixSVG = False
 _.start_time = __time__.process_time()
 exec(self.code)
 __unlock__(all_levels = True)
@@ -1440,6 +1442,7 @@ def text(shape, orig_st):
 
 # has HTML-like formatting
 if formatting != None:
+_.fixSVG = True
 prev_format = 0
 prev_extra_data = extra_data[0]
 c.collapseToStart()
@@ -1811,6 +1814,9 @@ def __groupend__(name = ""):
 __time__.sleep(0.1)
   __dispatcher__(".uno:Paste", (), draw)
   __dispatcher__(".uno:FormatGroup", (), draw)
+  # fix bad or non-portable SVG export by converting text to curve
+  if _.fixSVG:
+  __dispatcher__(".uno:ChangeBezier", (), draw)
   pic = drawpage.getByIndex(0)
   pic.setPosition(__Point__((g.BoundRect.Width - g.Size.Width)//2, 
(g.BoundRect.Height - g.Size.Height)//2))
   drawpage.Height, drawpage.Width = g.BoundRect.Height, g.BoundRect.Width
@@ -1856,6 +1862,8 @@ def fontweight(n = -1):
 def fontfamily(s = -1):
 if s != -1:
 _.fontfamily = s
+if ':' in s:
+_.fixSVG = True
 else:
 return _.fontfamily
 


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

2022-12-05 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |   10 --
 sw/qa/uitest/librelogo/compile.py   |3 +++
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 37d8678d7266fd517953d3db39e30ff8775ade7f
Author: László Németh 
AuthorDate: Sun Dec 4 20:33:36 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 16:16:09 2022 +

LibreLogo: fix parsing argument of default Logo commands

Functions didn't work in arguments of several default
Logo commands (mostly turtle moving and setting).
A simple example, which resulted an error message:

FORWARD RANDOM 100

Regression from commit 740b99783b5480fcd1e5fce7c1beb5967d015041
"tdf#120413 LibreLogo: handle complex Logo expressions".

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

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index 717df1a968a1..5f0c2261f614 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -2211,8 +2211,14 @@ def __compil__(s):
 # atom: other tokens (variable names, numbers and function names)
 atom = {key: value for (key, value) in [j.span() for j in 
list(atoms.finditer(i))]}
 par = {"pos": 0, "out": "", "sub": sub, "op": op, "atom": atom, 
"names": names}
-__l2p__(i, par, False, False)
-i = par["out"]
+if i.startswith(')') and '(' in i:
+# replace ")forward(" etc. with spaces temporarily
+len_name = i.index('(') + 1
+__l2p__(' ' * len_name + i[len_name:], par, False, False)
+i = i[:len_name] + par["out"].lstrip()
+else:
+__l2p__(i, par, False, False)
+i = par["out"]
 # starting program block
 if i[0:1] == '[':
 i = i[1:]
diff --git a/sw/qa/uitest/librelogo/compile.py 
b/sw/qa/uitest/librelogo/compile.py
index 3cc1198cc1d7..bf4668e8e332 100644
--- a/sw/qa/uitest/librelogo/compile.py
+++ b/sw/qa/uitest/librelogo/compile.py
@@ -111,6 +111,9 @@ class LibreLogoCompileTest(UITestCase):
 ("a=RANDOM 40 + 120", "a=Random(40 + 120)"),
 ("a=RANDOM(40) + 120", "a=Random(40) + 120"),
 ("a=RANDOM [1, 2, 3]", "a=Random([1, 2, 3])"),
+("PRINT RANDOM 40", "Print(Random(40))"),
+("FORWARD RANDOM 40", "forward(Random(40))"),
+("FORWARD 10 + RANDOM 40 + RANDOM 100", "forward(10 + 
Random(40 + Random(100)))"),
 ("a=[sin 90 + cos 15, cos 100 * x, sqrt 25 * 25]", "a=[sin(90 
+ cos(15)), cos(100 * x), sqrt(25 * 25)]"),
 ("a=[sin 90 + cos 15, cos 100 * x, sqrt 25 * 25]", "a=[sin(90 
+ cos(15)), cos(100 * x), sqrt(25 * 25)]"),
 ("a=[sin(90) + cos 15, cos(100) * x, sqrt(25) * 25]", 
"a=[sin(90) + cos(15), cos(100) * x, sqrt(25) * 25]"),


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

2022-12-05 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |   36 
 1 file changed, 27 insertions(+), 9 deletions(-)

New commits:
commit 81ce66ab5d77b0171245e05ed609f2305ce89600
Author: László Németh 
AuthorDate: Sun Dec 4 21:41:50 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 16:15:46 2022 +

tdf#105575 LibreLogo: hide turtle during locking

It seems painting of the selection around
the turtle is not locked completely, so
hide the turtle to lock that, too, for 20%
or more speed up.

Note: the turtle is still visible, because it is
hidden after locking (until unlocking), but there
is no nore jiggering selection around it.

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

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index ccd504eba021..717df1a968a1 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -167,6 +167,7 @@ class __Doc__:
 self.shapecount = itertools.count()
 self.time = 0
 self.zoomvalue = 0
+self.lockturtle = False
 self.initialize()
 
 def initialize(self):
@@ -540,8 +541,7 @@ class LogoProgram(threading.Thread):
 else:
 _.start_time = __time__.process_time()
 exec(self.code)
-while _.doc.hasControllersLocked():
-_.doc.unlockControllers()
+__unlock__(all_levels = True)
 if _.origcursor[0] and _.origcursor[1]:
 __dispatcher__(".uno:Escape")
 try:
@@ -550,8 +550,7 @@ class LogoProgram(threading.Thread):
 
_.doc.CurrentController.getViewCursor().gotoRange(_.origcursor[0].getStart(), 
False)
 except Exception as e:
 try:
-  while _.doc.hasControllersLocked():
-  _.doc.unlockControllers()
+  __unlock__(all_levels = True)
   TRACEPATTERN = '"", line '
   message = traceback.format_exc()
   l = re.findall(TRACEPATTERN + '[0-9]+', message)
@@ -706,6 +705,9 @@ def hideturtle():
 __visible__(turtle, False)
 turtle.LineTransparence, turtle.FillTransparence = 100, 100 # for 
saved files
 turtle.setPosition(z)
+else:
+# HIDETURTLE during locking, no need SHOWTURTLE at the end of locking
+_.lockturtle = False
 __dispatcher__(".uno:Escape")
 
 def showturtle():
@@ -838,12 +840,24 @@ def run(arg=None, arg2 = -1):
 __trace__()
 return None
 
+def __unlock__(all_levels):
+while _.doc.hasControllersLocked():
+# show turtle which was hidden by locking
+if _.lockturtle:
+showturtle()
+_.doc.unlockControllers()
+if not all_levels:
+break
+if not _.doc.hasControllersLocked() and _.lockturtle:
+_.lockturtle = False
+elif _.doc.hasControllersLocked() and _.lockturtle:
+hideturtle()
+
 def stop(arg=None):
 global __halt__
 with __lock__:
 __halt__ = True
-while _.doc.hasControllersLocked():
-_.doc.unlockControllers()
+__unlock__(all_levels = True)
 return None
 
 def home(arg=None):
@@ -1474,14 +1488,18 @@ def text(shape, orig_st):
 _.doc.unlockControllers()
 
 def sleep(t):
+# lock shape repaint, if SLEEP argument is negative
 if t < 0:
-# lock shape repaint, if SLEEP argument is negative
 _.doc.lockControllers()
+# hide turtle during locking
+turtle = __getshape__(__TURTLE__)
+if turtle and turtle.Visible:
+hideturtle()
+_.lockturtle = True
 return
 else:
 # otherwise unlock one level
-if _.doc.hasControllersLocked():
-_.doc.unlockControllers()
+__unlock__(all_levels = False)
 _.time = _.time + t
 __removeshape__(__ACTUAL__)
 for i in range(int(t/__SLEEP_SLICE_IN_MILLISECONDS__)):


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

2022-12-05 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |   20 
 sw/qa/uitest/librelogo/run.py   |   22 +++---
 2 files changed, 35 insertions(+), 7 deletions(-)

New commits:
commit e50f0f7342c5618196507771e5f4eb79147477b9
Author: László Németh 
AuthorDate: Fri Dec 2 18:06:17 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 16:15:20 2022 +

tdf#105575 LibreLogo: speed up by lock (re)paint

Speed up program execution by default partial
locking of repaint and custom locking of paint,
using UNO lockControllers().

– Default: speed up LABEL and TEXT by locking their repaint
  during the various text operations, i.e. setting size and
  text portion formatting changes were visible, and slow.
  Locking while manipulating a shape was suggested by Noel Grandin.

– Custom: SLEEP command with negative argument calls lockControllers(),
  SLEEP command with not negative argument (and program termination)
  call unlockControllers(), so it's possible to lock program parts to
  speed up program execution e.g. 3-4 times or more. For example:

  ; lock paint until program termination
  SLEEP -1
  program

  or

  ; lock until SLEEP 0
  SLEEP -1
  commands_without_paint
  SLEEP 0 ; unlock a single level and paint/repaint everything

– Add __get_time__() command to get the elapsed time from
  program start for profiling.

Add unit tests.

Note: custom locking with SLEEP has known problems: not connected
lines, bad position of arc/pie, non-working CLEARSCREEN.

Note: The reported code is more than 32 times faster (4 sec vs 2.2 min)
with custom locking, also using the commented line to show not only
the result with 400 circle shapes, but the partial result with 100,
200 and 300 shapes, too:

SLEEP -1
REPEAT 400 [ CIRCLE 10 + REPCOUNT/10 FORWARD 5 + REPCOUNT/10 LEFT 10 ]
; IF REPCOUNT % 100 == 0 [ SLEEP 0 SLEEP -1 ] ; to show partial result
SLEEP 0
PRINT __get_time__()

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

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index 562095a15383..ccd504eba021 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -479,6 +479,9 @@ def __translate__(arg = None):
 selection.getStart().BreakType = 4
 __dispatcher__(".uno:ZoomPage")
 
+def __get_time__():
+return __time__.process_time() - _.start_time
+
 class LogoProgram(threading.Thread):
 def __init__(self, code):
 self.code = code
@@ -535,7 +538,10 @@ class LogoProgram(threading.Thread):
 parent = _.doc.CurrentController.Frame.ContainerWindow
 MessageBox(parent, "Document objects with%s script events" % 
[" possible", ""][secid-1], "LibreLogo program can't start", "errorbox")
 else:
+_.start_time = __time__.process_time()
 exec(self.code)
+while _.doc.hasControllersLocked():
+_.doc.unlockControllers()
 if _.origcursor[0] and _.origcursor[1]:
 __dispatcher__(".uno:Escape")
 try:
@@ -544,6 +550,8 @@ class LogoProgram(threading.Thread):
 
_.doc.CurrentController.getViewCursor().gotoRange(_.origcursor[0].getStart(), 
False)
 except Exception as e:
 try:
+  while _.doc.hasControllersLocked():
+  _.doc.unlockControllers()
   TRACEPATTERN = '"", line '
   message = traceback.format_exc()
   l = re.findall(TRACEPATTERN + '[0-9]+', message)
@@ -834,6 +842,8 @@ def stop(arg=None):
 global __halt__
 with __lock__:
 __halt__ = True
+while _.doc.hasControllersLocked():
+_.doc.unlockControllers()
 return None
 
 def home(arg=None):
@@ -1401,6 +1411,7 @@ def __get_HTML_format__(orig_st):
 
 def text(shape, orig_st):
 if shape:
+_.doc.lockControllers()
 # analyse HTML
 st, formatting, extra_data = __get_HTML_format__(orig_st)
 shape.setString(__string__(st, _.decimal))
@@ -1460,8 +1471,17 @@ def text(shape, orig_st):
 prev_format = i
 if len(extra_data) > 0:
 prev_extra_data = extra_data.pop(0)
+_.doc.unlockControllers()
 
 def sleep(t):
+if t < 0:
+# lock shape repaint, if SLEEP argument is negative
+_.doc.lockControllers()
+return
+else:
+# otherwise unlock one level
+if _.doc.hasControllersLocked():
+_.doc.unlockControllers()
 _.time = _.time + t
 __removeshape__(__ACTUAL__)
 for i in range(int(t/__SLEEP_SLICE_IN_MILLISEC

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

2022-12-05 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |  138 ++--
 sw/qa/uitest/librelogo/run.py   |  216 
 2 files changed, 341 insertions(+), 13 deletions(-)

New commits:
commit 43570f5752b31e11a7f21d5e694737e9fcb3bf19
Author: László Németh 
AuthorDate: Fri Dec 2 10:19:49 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 16:14:26 2022 +

LibreLogo: LABEL/TEXT: add more character formatting

– strike out:  or 

– superscript and subscript:  and  (using character formatting)

– text color:

  – localized names, e.g.  (in English documents),  (in French 
documents)

  – hexa or decimal codes: ,  (localized 
"FONTCOLOR" is allowed)

  – verbose form of the localized names: 

– highlight color: , ,  
(localized "FILLCOLOR" is allowed)

– font name: e.g.  (localized "FONTFAMILY" is 
allowed)

– font size: e.g.  (localized "FONTSIZE" is allowed)

– OpenType and Linux Libertine G/Biolinum G font features: : small 
capitals,
  : proportional numbers, : true 
subscript (scientific inferior) etc.,

   – with arguments: 

   – verbose form: 

Alternative names for bold and italic character formatting

– bold text: HTML:  or ; localized LibreLogo: e.g. , 
 (in Finnish documents)

– italic: HTML:  or ; localized LibreLogo: e.g. ,  
(in Czech documents)

Add unit tests for the previous and new tags.

Follow-up to commit 89c34706331984d12af8ce99444d53f19b40b496
"LibreLogo: add basic HTML formatting support to LABEL".

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

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index bb776ca18c81..562095a15383 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -134,6 +134,26 @@ __TURTLE__ = "turtle"
 __ACTUAL__ = "actual"
 __BASEFONTFAMILY__ = "Linux Biolinum G"
 __LineStyle_DOTTED__ = 2
+# LABEL supports font features with the simplified syntax 
text, e.g.
+#   LABEL "Small caps: text"
+# prints "Small caps: TEXT", where TEXT is small capital, if that feature is 
supported by the font
+# See https://en.wikipedia.org/wiki/List_of_typographic_features
+__match_fontfeatures__ = re.compile( r"()",
 re.IGNORECASE )
+# LABEL localized color tags, e.g. text in red
+__match_localized_colors__ = {}
+# LABEL not localized tags (localized translated to these):
+__match_tags__ = [re.compile(i, re.IGNORECASE) for i in [r'<(b|strong)>', 
r'', r'<(i|em)>', r'', '', '', r'<(s|del)>', 
r'', '', '', '', '', r'<(fontcolor) ([^<>]*)>', 
r'', r'<(fillcolor) ([^<>]*)>', r'', 
r'<(fontfamily) ([^<>]*)>', r'', r'<(fontfeature) ([^<>]*)>', 
r']*)>', r'<(fontheight) ([^<>]*)>', r'']]
 
 class __Doc__:
 def __init__(self, doc):
@@ -204,6 +224,7 @@ from com.sun.star.drawing.CircleKind import ARC as __ARC__
 from com.sun.star.awt.FontSlant import NONE as __Slant_NONE__
 from com.sun.star.awt.FontSlant import ITALIC as __Slant_ITALIC__
 from com.sun.star.awt.FontUnderline import SINGLE as __Underline_SINGLE__
+from com.sun.star.awt.FontStrikeout import SINGLE as __Strikeout_SINGLE__
 from com.sun.star.awt import Size as __Size__
 from com.sun.star.awt import WindowDescriptor as __WinDesc__
 from com.sun.star.awt.WindowClass import MODALTOP as __MODALTOP__
@@ -1275,51 +1296,113 @@ def __get_HTML_format__(orig_st):
   "Process HTML-like tags, and return with text and formatting vector"
   st = orig_st.replace('<', '\uE000')
   if not ('<' in st and '>' in st):
-  return st.replace('\uE000', '<'), None
+  return st.replace('\uE000', '<'), None, None
+
+  # convert localized bold, and italic values to  and  tags
+  for i in ('BOLD', 'ITALIC'):
+  st = re.sub(r'(', r'\1%s>' % i[0], st, 
flags=re.I)
+
+  for i in ('FONTCOLOR', 'FILLCOLOR', 'FONTFAMILY', 'FONTHEIGHT'):
+  st = re.sub(r'<(' + __l12n__(_.lng)[i] + r')(  *[^<> ][^<>]*)>', 
r'<%s\2>' % i.lower(), st, flags=re.I)
+  st = re.sub(r'', r'' % i.lower(), 
st, flags=re.I)
+
+  # expand localized color names
+  if _.lng not in __match_localized_colors__:
+  __match_localized_colors__[_.lng] = re.compile(r'<(/?)(' + 
'|'.join(__colors__[_.lng].keys()) + ')>', re.IGNORECASE)
+  # replacement lambda function: if it's an opening tag, return with the 
argument, too
+  get_fontcolor_tag = lambda m: "" % m.group(2) if 
len(m.group(1)) == 0 else ""
+  st = re.sub(__match_localized_colors__[_.lng], get_fontcolor_tag, st)
+
+  # expand abbreviated forms of font features
+  # small caps -> small caps
+  st = re.sub(__match_fontfeatures__, r'\1fontfeature \2\3', st)
+
   tex = "" # characters without HTML tags
   pat = [] # bit vectors of the previous characters
-  # 1st bit: bold
-  # 2nd bit: italic
-  # 3rd

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

2022-12-05 Thread Szymon Kłos (via logerrit)
 solenv/clang-format/excludelist |1 
 vcl/jsdialog/enabled.cxx|  209 ++--
 2 files changed, 121 insertions(+), 89 deletions(-)

New commits:
commit eb5879f190a773a28148de8eaa6e4afa2f375eda
Author: Szymon Kłos 
AuthorDate: Fri Dec 2 08:44:13 2022 +0100
Commit: Szymon Kłos 
CommitDate: Mon Dec 5 15:13:48 2022 +

jsdialog: sort enabled .ui list

and exclude form clang format to not break that

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

diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 96a2e2b549a4..2a2788ce34c1 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14525,6 +14525,7 @@ vcl/inc/wizdlg.hxx
 vcl/ios/dummies.cxx
 vcl/ios/iosinst.cxx
 vcl/ios/salios.cxx
+vcl/jsdialog/enabled.cxx
 vcl/null/printerinfomanager.cxx
 vcl/osx/DataFlavorMapping.cxx
 vcl/osx/DataFlavorMapping.hxx
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 4990e2be7979..9a54ed001d39 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -18,76 +18,86 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 // mobile only dialogs
 if (bMobile)
 {
-if (rUIFile == u"modules/swriter/ui/wordcount-mobile.ui"
-|| rUIFile == u"svx/ui/findreplacedialog-mobile.ui"
-|| rUIFile == u"modules/swriter/ui/watermarkdialog.ui"
-|| rUIFile == u"modules/scalc/ui/validationdialog.ui"
+if (// scalc
+rUIFile == u"modules/scalc/ui/erroralerttabpage-mobile.ui"
 || rUIFile == u"modules/scalc/ui/validationcriteriapage.ui"
+|| rUIFile == u"modules/scalc/ui/validationdialog.ui"
 || rUIFile == u"modules/scalc/ui/validationhelptabpage-mobile.ui"
-|| rUIFile == u"modules/scalc/ui/erroralerttabpage-mobile.ui"
-|| rUIFile == u"modules/scalc/ui/validationdialog.ui")
+// swriter
+|| rUIFile == u"modules/swriter/ui/watermarkdialog.ui"
+|| rUIFile == u"modules/swriter/ui/wordcount-mobile.ui"
+// svx
+|| rUIFile == u"svx/ui/findreplacedialog-mobile.ui")
 {
 return true;
 }
 }
 
-if (rUIFile == u"modules/scalc/ui/pivottablelayoutdialog.ui"
-|| rUIFile == u"modules/scalc/ui/selectsource.ui"
-|| rUIFile == u"modules/scalc/ui/managenamesdialog.ui"
-|| rUIFile == u"modules/scalc/ui/definename.ui"
-|| rUIFile == u"modules/scalc/ui/correlationdialog.ui"
-|| rUIFile == u"modules/scalc/ui/samplingdialog.ui"
-|| rUIFile == u"modules/scalc/ui/descriptivestatisticsdialog.ui"
+if (// cui
+rUIFile == u"cui/ui/formatnumberdialog.ui"
+|| rUIFile == u"cui/ui/macroselectordialog.ui"
+|| rUIFile == u"cui/ui/numberingformatpage.ui"
+|| rUIFile == u"cui/ui/password.ui"
+|| rUIFile == u"cui/ui/splitcellsdialog.ui"
+|| rUIFile == u"cui/ui/widgettestdialog.ui"
+// scalc
 || rUIFile == u"modules/scalc/ui/analysisofvariancedialog.ui"
-|| rUIFile == u"modules/scalc/ui/covariancedialog.ui"
-|| rUIFile == u"modules/scalc/ui/exponentialsmoothingdialog.ui"
-|| rUIFile == u"modules/scalc/ui/movingaveragedialog.ui"
-|| rUIFile == u"modules/scalc/ui/regressiondialog.ui"
-|| rUIFile == u"modules/scalc/ui/ttestdialog.ui"
-|| rUIFile == u"modules/scalc/ui/ztestdialog.ui"
 || rUIFile == u"modules/scalc/ui/chisquaretestdialog.ui"
-|| rUIFile == u"modules/scalc/ui/fourieranalysisdialog.ui"
+|| rUIFile == u"modules/scalc/ui/colwidthdialog.ui"
+|| rUIFile == u"modules/scalc/ui/correlationdialog.ui"
+|| rUIFile == u"modules/scalc/ui/covariancedialog.ui"
 || rUIFile == u"modules/scalc/ui/datafielddialog.ui"
-|| rUIFile == u"modules/scalc/ui/pivotfielddialog.ui"
 || rUIFile == u"modules/scalc/ui/datafieldoptionsdialog.ui"
-|| rUIFile == u"modules/scalc/ui/insertcells.ui"
+|| rUIFile == u"modules/scalc/ui/definename.ui"
 || rUIFile == u"modules/scalc/ui/deletecells.ui"
 || rUIFile == u"modules/scalc/ui/deletecontents.ui"
-|| rUIFile == u"modules/scalc/ui/ungroupdialog.ui"
+|| rUIFile == u"modules/scalc/ui/descriptivestatisticsdialog.ui"
+|| rUIFile == u"modules/scalc/ui/exponentialsmoothingdialog.ui"
+|| rUIFile == u"modules/scalc/ui/fourieranalysisdialog.ui"
 || rUIFile == u"modules/scalc/ui/groupdialog.ui"
-|| rUIFile == u"modules/scalc/ui/rowheightdialog.ui"
-|| rUIFile == u"modules/scalc/ui/optimalrowheightdialog.ui"
-|| rUIFile == u"modules/scalc/ui/colwidthdialog.ui"
+|| rUIFile == u"modules/scalc/ui/insertcells.ui"
+|| rUIFile ==

[Libreoffice-commits] core.git: bin/gbuild-to-ide .vscode/vs-code-template.code-workspace.in

2022-12-05 Thread Christian Lohmaier (via logerrit)
 .vscode/vs-code-template.code-workspace.in |3 +--
 bin/gbuild-to-ide  |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit df092b591a7d107263f3fad817404f92b3cd7c03
Author: Christian Lohmaier 
AuthorDate: Wed Nov 30 11:30:23 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Dec 5 13:54:00 2022 +

create compile_commands.json in builddir

assuming that nothing breaks for existing users of the
compile_commands.json file, since they assume BUILDDIR=SRCDIR, so
nothing will change in those cases.

For building in a different directory than the source, the
compile_commands.json file is the only thing that regularly clobbers my
otherwise pristine SRCROOT

Change-Id: I344afa0bc7bb3eaa1eb888cd3558d3602090af5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143571
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/.vscode/vs-code-template.code-workspace.in 
b/.vscode/vs-code-template.code-workspace.in
index f6078155e8dc..87a6a27ac865 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -35,8 +35,7 @@
"files.associations": {
"*.patch.[0-9]": "diff"
},
-   // FIXME: arguably the generator should place it in the 
builddir, not srcdir
-   "C_Cpp.default.compileCommands": 
"${workspaceFolder:srcdir}/compile_commands.json",
+   "C_Cpp.default.compileCommands": 
"@BUILDDIR@/compile_commands.json",
// only used if the file doesn't match anything in the 
compile_commands.json - aka externals
// libxml includes just added as example/for reference
"C_Cpp.default.includePath": [
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 26f0c87f6855..b56cff8585ea 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -549,7 +549,7 @@ class VimIntegrationGenerator(IdeIntegrationGenerator):
 entry = {'directory': lib.location, 'file': filePath, 
'command': self.generateCommand(lib, filePath)}
 entries.append(entry)
 global_list.extend(entries)
-with open('compile_commands.json', 'w') as export_file:
+with open(os.path.join(self.gbuildparser.builddir, 
'compile_commands.json'), 'w') as export_file:
 json.dump(global_list, export_file)
 
 def generateCommand(self, lib, file):


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

2022-12-05 Thread Christian Lohmaier (via logerrit)
 solenv/gbuild/LinkTarget.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59d868b9eddebb19b0c40d7c1ca70265fc9df137
Author: Christian Lohmaier 
AuthorDate: Fri Dec 2 12:32:11 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Dec 5 13:53:31 2022 +

gb_LinkTarget_use_clang: only use flto=thin with clang, not with gcc

The code always used flto=thin, but gcc doesn't know that switch and
fails. The gb_Library_use_clang used by Skia is actually a prefer clang
option, and the corresponding gb_LinkTarget_use_clang macro accounts for
that by using "$(or clangvalue,gccvalue)" to define variables.

This is OK for stuff that defaults to empty value when no clang is found
on the system, but gb_CLANG_LTOFLAGS is defined unconditionally (in
com_GCC_defs.mk), so using the $(or..) function is completly bypassed,
always using the flto=thin switch.

Change-Id: I903e5e4818b8ecbe63ed85952b8741140972e8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143572
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 6a0e7580ef22..cc98d18bd4b7 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -2196,7 +2196,7 @@ $(call gb_LinkTarget_get_target,$(1)) : T_CC := 
$(LO_CLANG_CC)
 $(call gb_LinkTarget_get_target,$(1)) : T_CXX := $(LO_CLANG_CXX)
 $(call gb_LinkTarget_get_target,$(1)) : T_USE_CLANG := $(true)
 $(call gb_LinkTarget_get_target,$(1)) : T_USE_LD := $(or 
$(CLANG_USE_LD),$(USE_LD))
-$(call gb_LinkTarget_get_target,$(1)) : T_LTOFLAGS := $(or 
$(gb_CLANG_LTOFLAGS),$(gb_LTOFLAGS))
+$(call gb_LinkTarget_get_target,$(1)) : T_LTOFLAGS := $(if 
$(LO_CLANG_CXX),$(gb_CLANG_LTOFLAGS),$(gb_LTOFLAGS))
 endef
 
 # call gb_LinkTarget_use_vclmain,linktarget


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

2022-12-05 Thread Tibor Nagy (via logerrit)
 sd/qa/unit/data/pptx/tdf152186.pptx  |binary
 sd/qa/unit/import-tests2.cxx |   21 +
 sd/source/filter/eppt/pptx-epptooxml.cxx |   16 ++--
 3 files changed, 23 insertions(+), 14 deletions(-)

New commits:
commit 21044e1469e95d30422c498ad0119d0ce76a6acd
Author: Tibor Nagy 
AuthorDate: Thu Nov 24 14:51:55 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Dec 5 13:24:10 2022 +

tdf#152186 PPTX export: fix shadow of the shape in theme

Placeholder line styles defined extra effectStyle, resulting
bad export with shadows.

Follow-up to commit 25e9766e9b87342b6f1b29dc146d5f33e12157a7
(tdf#9 PPTX export: fix line width of the shape in theme)

Change-Id: I02f1edea84b50dbb9b0e0a59b6062a29894afde4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143233
Tested-by: László Németh 
Reviewed-by: László Németh 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143479
Tested-by: Jenkins

diff --git a/sd/qa/unit/data/pptx/tdf152186.pptx 
b/sd/qa/unit/data/pptx/tdf152186.pptx
new file mode 100644
index ..c4160f2091a4
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf152186.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 1f73fc022a41..969eb250fb80 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -66,6 +66,7 @@ class SdImportTest2 : public SdModelTestBase
 public:
 virtual void setUp() override;
 
+void testTdf152186();
 void testTdf93868();
 void testTdf95932();
 void testTdf99030();
@@ -143,6 +144,7 @@ public:
 
 CPPUNIT_TEST_SUITE(SdImportTest2);
 
+CPPUNIT_TEST(testTdf152186);
 CPPUNIT_TEST(testTdf93868);
 CPPUNIT_TEST(testTdf95932);
 CPPUNIT_TEST(testTdf99030);
@@ -224,6 +226,25 @@ void SdImportTest2::setUp()
 mxDesktop.set(frame::Desktop::create(getComponentContext()));
 }
 
+void SdImportTest2::testTdf152186()
+{
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf152186.pptx"), 
PPTX);
+
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+
+bool bHasShadow;
+const SdrPage* pPage = GetPage(1, xDocShRef);
+for (size_t i = 0; i < pPage->GetObjCount(); ++i)
+{
+uno::Reference xShape(getShapeFromPage(i, 0, 
xDocShRef));
+xShape->getPropertyValue("Shadow") >>= bHasShadow;
+CPPUNIT_ASSERT(!bHasShadow);
+}
+
+xDocShRef->DoClose();
+}
+
 void SdImportTest2::testTdf93868()
 {
 sd::DrawDocShellRef xDocShRef
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 81b00cafea10..6a338a6a6fab 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -2016,22 +2016,10 @@ ShapeExport& 
PowerPointShapeExport::WritePlaceholderReferenceTextBody(
   \
   \
 \
-  \
-\
-  \
-\
-  \
-\
-  \
+  \
 \
 \
-  \
-\
-  \
-\
-  \
-\
-  \
+  \
 \
 \
   \


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

2022-12-05 Thread Xisco Fauli (via logerrit)
 sw/CppunitTest_sw_filters_test2.mk |   66 
 sw/Module_sw.mk|1 
 sw/qa/core/filters-test.cxx|4 
 sw/qa/core/filters-test2.cxx   |  150 -
 4 files changed, 4 insertions(+), 217 deletions(-)

New commits:
commit 042bf6f00c5e01b44ec1d95371ad809db4c5269f
Author: Xisco Fauli 
AuthorDate: Mon Nov 28 21:02:17 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Dec 5 13:23:48 2022 +

Revert: "split sw_filters unit test"

This commit reverts 1c2ea35b983c1159fe4633e449f8302ac9a7a024

it shouldn't be needed anymore after
cdac145768488dc11b32b744bc753ab16aa08c6e "reduce cost of
SwpHints::Check"

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

diff --git a/sw/CppunitTest_sw_filters_test2.mk 
b/sw/CppunitTest_sw_filters_test2.mk
deleted file mode 100644
index 71f7796ff853..
--- a/sw/CppunitTest_sw_filters_test2.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- 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,sw_filters_test2))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_filters_test2,\
-   boost_headers \
-   libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_filters_test2))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_filters_test2, \
-sw/qa/core/filters-test2 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_filters_test2, \
-sw \
-sfx \
-subsequenttest \
-svl \
-svt \
-sot \
-   test \
-tl \
-ucbhelper \
-unotest \
-utl \
-vcl \
-i18nlangtag \
-comphelper \
-cppu \
-cppuhelper \
-sal \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sw_filters_test2,\
--I$(SRCDIR)/sw/inc \
-$$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_filters_test2,\
-   udkapi \
-   offapi \
-   oovbaapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,sw_filters_test2))
-$(eval $(call gb_CppunitTest_use_vcl,sw_filters_test2))
-
-$(eval $(call gb_CppunitTest_use_rdb,sw_filters_test2,services))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_filters_test2))
-
-$(call gb_CppunitTest_get_target,sw_filters_test2): \
-$(call gb_Package_get_target,extras_tplwizdesktop)
-
-# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 1f7a90605a11..8a217a85fbf6 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -167,7 +167,6 @@ endif
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
 $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_filters_test \
-CppunitTest_sw_filters_test2 \
 ))
 endif
 
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index e880e428fc34..f4723b0e94cd 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -148,6 +148,10 @@ void SwFiltersTest::testCVEs()
 m_directories.getURLFromSrc(u"/sw/qa/core/data/ww8/"),
 FILTER_WW8);
 
+testDir("MS WinWord 6.0",
+m_directories.getURLFromSrc(u"/sw/qa/core/data/ww6/"),
+sWW6);
+
 testDir("MS WinWord 5",
 m_directories.getURLFromSrc(u"/sw/qa/core/data/ww5/"),
 sWW5);
diff --git a/sw/qa/core/filters-test2.cxx b/sw/qa/core/filters-test2.cxx
deleted file mode 100644
index 08736b962a85..
--- a/sw/qa/core/filters-test2.cxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- 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 
-#include 
-
-typedef tools::SvRef SwDocShellRef;
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class SwFiltersTest2 : public test::FiltersTest, public test::BootstrapFixture
-{
-public:
-virtual bool load(const OUString& rFilter, const OUString& rURL, const 
OUString& rUserData,
-  SfxFilterFlags nFilterFlags, SotClipboardFormatId 
nClipboardID,
-  unsigned int nFilterVersion) override;
-virtual bool save(const OUString& rFilter, const OUString& rURL, const 
OUString& 

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

2022-12-05 Thread Tünde Tóth (via logerrit)
 sw/qa/extras/ooxmlexport/data/embedded_chart.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx   |   26 +++
 sw/source/core/layout/atrfrm.cxx |9 +++
 3 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 57db9a4fdbee6db24b381f3ea48b3df089c555fc
Author: Tünde Tóth 
AuthorDate: Wed Nov 30 14:56:25 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 13:14:19 2022 +

tdf#126477 DOCX export: fix lost charts in embedded documents

The charts of the embedded documents were not exported.

Follow-up to commit a41cf57c1eb4cabe5afc1a45d6fe535dbb935217
"tdf#134987 convert DOCX to ODT: fix lost charts".

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

diff --git a/sw/qa/extras/ooxmlexport/data/embedded_chart.odt 
b/sw/qa/extras/ooxmlexport/data/embedded_chart.odt
new file mode 100644
index ..820e9a3b2e76
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/embedded_chart.odt 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 79ea4323274d..5d6576a0d619 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -12,6 +12,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -212,6 +213,31 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152200)
 assertXPath(pXmlDoc, "//w:fldChar", 3); // no field characters elsewhere
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf126477)
+{
+loadAndReload("embedded_chart.odt");
+
+uno::Reference 
xTEOSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xAccess(xTEOSupplier->getEmbeddedObjects());
+uno::Sequence aSeq(xAccess->getElementNames());
+
+// Check number of embedded objects.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeq.getLength());
+
+uno::Reference 
xEOSupplier(xAccess->getByName(aSeq[0]),
+  
uno::UNO_QUERY);
+uno::Reference xObj(xEOSupplier->getEmbeddedObject());
+uno::Reference xTEOSupplier2(xObj, 
uno::UNO_QUERY);
+uno::Reference 
xAccess2(xTEOSupplier2->getEmbeddedObjects());
+uno::Sequence aSeq2(xAccess2->getElementNames());
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 0
+// i.e. the chart lost in the embedded document.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeq2.getLength());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index dac5a59e2ccb..ff0763aed532 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2800,7 +2800,14 @@ SdrObject* SwFrameFormat::FindRealSdrObject()
 std::pair const tmp(aNullPt, false);
 SwFlyFrame* pFly = static_cast(::GetFrameOfModify( 
nullptr, *this, SwFrameType::Fly,
 nullptr, &tmp));
-return pFly ? pFly->GetVirtDrawObj() : nullptr;
+if( pFly )
+return pFly->GetVirtDrawObj();
+
+if( !GetDoc() || !GetDoc()->GetDocShell() ||
+GetDoc()->GetDocShell()->GetCreateMode() != 
SfxObjectCreateMode::EMBEDDED )
+return nullptr;
+
+// tdf#126477 fix lost charts in embedded documents
 }
 return FindSdrObject();
 }


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

2022-12-05 Thread Andras Timar (via logerrit)
 sw/source/ui/dialog/uiregionsw.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit 6f56317244af98cae66260dd7e75920f68666782
Author: Andras Timar 
AuthorDate: Thu Nov 24 13:37:36 2022 +0100
Commit: Henry Castro 
CommitDate: Mon Dec 5 12:49:04 2022 +

Disallow linking files as Writer sections in Online

Change-Id: I9e4971c72db44ca8216ac468240dd52d46e0b680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143225
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index 9ff77c893263..94ed8bf40a8e 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1477,6 +1478,21 @@ 
SwInsertSectionTabPage::SwInsertSectionTabPage(weld::Container* pPage, weld::Dia
 m_xDDECB->connect_toggled( LINK( this, SwInsertSectionTabPage, DDEHdl ));
 ChangeProtectHdl(*m_xProtectCB);
 m_xSubRegionED->set_entry_completion(true, true);
+
+// Hide Link section. In general it makes no sense to insert a file from 
the jail,
+// because it does not contain any usable files (documents).
+if(comphelper::LibreOfficeKit::isActive())
+{
+m_xBuilder->weld_label("label1")->hide(); // Link
+m_xFileCB->hide();
+m_xDDECB->hide();
+m_xDDECommandFT->hide();
+m_xFileNameFT->hide();
+m_xFileNameED->hide();
+m_xFilePB->hide();
+m_xSubRegionFT->hide();
+m_xSubRegionED->hide();
+}
 }
 
 SwInsertSectionTabPage::~SwInsertSectionTabPage()


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

2022-12-05 Thread Szymon Kłos (via logerrit)
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx |2 +-
 svx/uiconfig/ui/sidebarshadow.ui  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8e931dad335d69683ae4255e92a2ad32056beaca
Author: Szymon Kłos 
AuthorDate: Tue Nov 29 19:59:57 2022 +0100
Commit: Pedro Silva 
CommitDate: Mon Dec 5 11:22:47 2022 +

jsdialogs: fix generic color label name

update event was triggering other widget change:
when opened calc and selected shape first time
we saw color text next to other color label

Change-Id: I71670ac1273ce96fafc8d20126d9f32151e96d89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143471
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pedro Silva 

diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx 
b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
index ff21110a2007..36b9ce6690ae 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
@@ -50,7 +50,7 @@ ShadowPropertyPanel::ShadowPropertyPanel(
 mxFTDistance(m_xBuilder->weld_label("distance")),
 mxFTTransparency(m_xBuilder->weld_label("transparency_label")),
 mxFTBlur(m_xBuilder->weld_label("blur_label")),
-mxFTColor(m_xBuilder->weld_label("color")),
+mxFTColor(m_xBuilder->weld_label("shadowcolorlabel")),
 mxShadowTransSlider(m_xBuilder->weld_scale("transparency_slider")),
 
mxShadowTransMetric(m_xBuilder->weld_metric_spin_button("FIELD_TRANSPARENCY", 
FieldUnit::PERCENT)),
 mxShadowBlurMetric(m_xBuilder->weld_metric_spin_button("LB_SHADOW_BLUR", 
FieldUnit::POINT))
diff --git a/svx/uiconfig/ui/sidebarshadow.ui b/svx/uiconfig/ui/sidebarshadow.ui
index a2b170ffa792..26e2263134cc 100644
--- a/svx/uiconfig/ui/sidebarshadow.ui
+++ b/svx/uiconfig/ui/sidebarshadow.ui
@@ -89,10 +89,10 @@
   
 
 
-  
+  
 True
 False
-Color:
+Color:
 True
 LB_SHADOW_COLOR
 0


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

2022-12-05 Thread Tibor Nagy (via logerrit)
 oox/source/ppt/slidepersist.cxx  |   34 ++
 sd/qa/unit/data/pptx/connectors.pptx |binary
 sd/qa/unit/import-tests.cxx  |4 ++--
 3 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 400e44cebd993f4b9b3d878fb9264f99e005c9fb
Author: Tibor Nagy 
AuthorDate: Tue Nov 29 15:43:58 2022 +0100
Commit: László Németh 
CommitDate: Mon Dec 5 11:20:11 2022 +

tdf#152211 PPTX import: fix connector position based on line width

Thick shape line changed the connector, e.g. direction of
its arrow head.

Follow-up to commit d8c89fb920af747ec51ce966b5d7b65e9340afbd
"tdf#151891 PPTX import: fix regression of connector position"

Regression from commit cbf66ec3e60d07efb7c3cceed9b4f0fb4f0510c8
"tdf#89449 PPTX import: fix line connectors".

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

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 3b9a93ded03c..9d2ad58b5be2 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -371,10 +371,24 @@ static void 
lcl_SetEdgeLineValue(uno::Reference& rXConnector,
 SdrObject* pStartObj = xStartSp.is() ? 
SdrObject::getSdrObjectFromXShape(xStartSp) : nullptr;
 SdrObject* pEndObj = xEndSp.is() ? 
SdrObject::getSdrObjectFromXShape(xEndSp) : nullptr;
 
+sal_Int32 nStartSpLineW = 0;
 if (pStartObj)
+{
 aStartRect = pStartObj->GetSnapRect();
+uno::Reference xPropxStartSp(xStartSp, 
uno::UNO_QUERY);
+xPropxStartSp->getPropertyValue("LineWidth") >>= nStartSpLineW;
+if (nStartSpLineW)
+nStartSpLineW = nStartSpLineW / 2;
+}
+sal_Int32 nEndSpLineW = 0;
 if (pEndObj)
+{
 aEndRect = pEndObj->GetSnapRect();
+uno::Reference xPropxEndSp(xEndSp, 
uno::UNO_QUERY);
+xPropxEndSp->getPropertyValue("LineWidth") >>= nEndSpLineW;
+if (nEndSpLineW)
+nEndSpLineW = nEndSpLineW / 2;
+}
 
 const OUString sConnectorName = rShapePtr->getConnectorName();
 if (sConnectorName == "bentConnector2")
@@ -385,20 +399,24 @@ static void 
lcl_SetEdgeLineValue(uno::Reference& rXConnector,
 if (aConnSize.Height < aConnSize.Width)
 {
 if (xStartSp.is())
-nEdge -= (aStartPt.Y > aEndPt.Y) ? (aStartRect.Top() - 
aEndPt.Y)
- : (aStartRect.Bottom() - 
aEndPt.Y);
+nEdge = (aStartPt.Y > aEndPt.Y)
+? (nStartSpLineW - (aStartRect.Top() - 
aEndPt.Y))
+: ((aEndPt.Y - aStartRect.Bottom()) - 
nStartSpLineW);
 else
-nEdge -= (aStartPt.Y > aEndPt.Y) ? (aEndRect.Bottom() - 
aStartPt.Y)
- : (aEndRect.Top() - 
aStartPt.Y);
+nEdge = (aStartPt.Y > aEndPt.Y)
+? ((aStartPt.Y - aEndRect.Bottom()) - 
nEndSpLineW)
+: (nEndSpLineW - (aEndRect.Top() - 
aStartPt.Y));
 }
 else
 {
 if (xStartSp.is())
-nEdge -= (aStartPt.X > aEndPt.X) ? (aStartRect.Left() - 
aEndPt.X)
- : (aStartRect.Right() - 
aEndPt.X);
+nEdge = (aStartPt.X > aEndPt.X)
+? (nStartSpLineW - (aStartRect.Left() - 
aEndPt.X))
+: ((aEndPt.X - aStartRect.Right()) - 
nStartSpLineW);
 else
-nEdge -= (aStartPt.X > aEndPt.X) ? (aEndRect.Right() - 
aStartPt.X)
- : (aEndRect.Left() - 
aStartPt.X);
+nEdge = (aStartPt.X > aEndPt.X)
+? ((aStartPt.X - aEndRect.Right()) - 
nEndSpLineW)
+: (nEndSpLineW - (aEndRect.Left() - 
aStartPt.X));
 }
 }
 else
diff --git a/sd/qa/unit/data/pptx/connectors.pptx 
b/sd/qa/unit/data/pptx/connectors.pptx
index ba959068663c..2f65acba13b8 100644
Binary files a/sd/qa/unit/data/pptx/connectors.pptx and 
b/sd/qa/unit/data/pptx/connectors.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 3f3aafcbe0e8..eb125a46834f 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -342,8 +342,8 @@ void SdImportTest::testConnectors()
 {
 createSdImpressDoc("pptx/connectors.pptx");
 
-sal_Int32 aEdgeValue[] = { -1167, -1167, -1591, 1476,  1356, -1357, 1604,  
-1540,
-   607,   1296,  -1638, -1060, -522, 1578,  -1291, 
333 };
+sal_Int32 aEdgeValue[] = { -1123, -1123, -1547, 1432,  1356, -1357, 16

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

2022-12-05 Thread Dennis Francis (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   41 +
 sw/source/core/fields/docufld.cxx  |   11 ++
 2 files changed, 51 insertions(+), 1 deletion(-)

New commits:
commit 8be4a713e9f44bf05aebc0a3054654a18b4de065
Author: Dennis Francis 
AuthorDate: Thu May 19 15:27:48 2022 +0530
Commit: Miklos Vajna 
CommitDate: Mon Dec 5 11:08:52 2022 +

sw: prefer view's redline author name...

to expand SwAuthorFieldType. Redline author name is set in
SwXTextDocument::initializeForTiledRendering each time a new view is
created.

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

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 28f67f9a8500..88b4dcc95d7f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -19,6 +19,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -3750,6 +3752,45 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testDateContentControl)
 CPPUNIT_ASSERT_EQUAL(OUString("2022-05-30"), 
pTextNode->GetExpandText(pWrtShell->GetLayout()));
 }
 
+CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAuthorField)
+{
+SwXTextDocument* pXTextDocument = createDoc();
+const OUString sAuthor("Abcd Xyz");
+
+uno::Sequence 
aPropertyValues1(comphelper::InitPropertySequence(
+{
+{".uno:Author", uno::makeAny(sAuthor)},
+}));
+pXTextDocument->initializeForTiledRendering(aPropertyValues1);
+
+auto insertAuthorField = [this]()
+{
+uno::Reference const xMSF(mxComponent, 
uno::UNO_QUERY_THROW);
+uno::Reference const xTD(mxComponent, 
uno::UNO_QUERY_THROW);
+
+auto const xText = xTD->getText();
+auto const xTextCursor = xText->createTextCursor();
+CPPUNIT_ASSERT(xTextCursor.is());
+
+xTextCursor->gotoEnd(false);
+
+uno::Reference const xTextField(
+xMSF->createInstance("com.sun.star.text.textfield.Author"), 
uno::UNO_QUERY_THROW);
+
+uno::Reference xTextFieldProps(xTextField, 
uno::UNO_QUERY_THROW);
+xTextFieldProps->setPropertyValue("FullName", uno::Any(true));
+
+xText->insertTextContent(xTextCursor, xTextField, false);
+};
+
+insertAuthorField();
+Scheduler::ProcessEventsToIdle();
+
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "rText", 
sAuthor);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/docufld.cxx 
b/sw/source/core/fields/docufld.cxx
index a3b5d5a5e12d..0e5777e7bf9e 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -314,7 +314,16 @@ OUString SwAuthorFieldType::Expand(sal_uLong nFormat)
 {
 SvtUserOptions&  rOpt = SW_MOD()->GetUserOptions();
 if((nFormat & 0xff) == AF_NAME)
-return rOpt.GetFullName();
+{
+// Prefer the view's redline author name.
+// (set in SwXTextDocument::initializeForTiledRendering)
+std::size_t nAuthor = SW_MOD()->GetRedlineAuthor();
+OUString sAuthor = SW_MOD()->GetRedlineAuthor(nAuthor);
+if (sAuthor.isEmpty())
+return rOpt.GetFullName();
+
+return sAuthor;
+}
 
 return rOpt.GetID();
 }


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

2022-12-05 Thread Rafael Lima (via logerrit)
 starmath/source/tmpdevice.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 12732eb7c34baa3f846ec6d0c10f8987051ace34
Author: Rafael Lima 
AuthorDate: Fri Dec 2 11:06:07 2022 +
Commit: Rafael Lima 
CommitDate: Mon Dec 5 10:52:55 2022 +

tdf#148505 Fix COL_AUTO in embedded Math formulas

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

diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index 1e30fbc7cd11..077977b39def 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -51,7 +51,8 @@ Color SmTmpDevice::GetTextColor(const Color& rTextColor)
 if (rTextColor == COL_AUTO)
 {
 Color aConfigFontColor = 
SM_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
-return rOutDev.GetReadableFontColor(aConfigFontColor, 
rOutDev.GetBackgroundColor());
+Color aConfigDocColor = 
SM_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+return rOutDev.GetReadableFontColor(aConfigFontColor, aConfigDocColor);
 }
 
 return rTextColor;


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

2022-12-05 Thread Caolán McNamara (via logerrit)
 include/vcl/vcllayout.hxx |2 -
 vcl/source/gdi/pdfwriter_impl.cxx |2 -
 vcl/source/gdi/sallayout.cxx  |   59 ++--
 vcl/source/outdev/text.cxx|   70 --
 vcl/source/outdev/textline.cxx|4 +-
 5 files changed, 16 insertions(+), 121 deletions(-)

New commits:
commit 5416a8e3d5373517aa90c3cf4c25d105a3768a59
Author: Caolán McNamara 
AuthorDate: Tue Nov 29 10:18:38 2022 +
Commit: Xisco Fauli 
CommitDate: Mon Dec 5 09:58:09 2022 +

SalLayout::mnUnitsPerPixel is always 1

since

commit 368de904974b18dc5a8d237e046c0ed005f7c85d
Date:   Thu Nov 24 09:21:56 2016 +0200

Kill PspFontLayout

removed the last SetUnitsPerPixel

Change-Id: I60db3d9eb4c42f3f0372b5f063a912b7addfde90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143456
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit e231cf313d8b3be672d32b9201b37fb20e646758)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143625
Reviewed-by: Xisco Fauli 

diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index 87d9345f4b9b..0fa25116ec85 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -79,7 +79,6 @@ public:
 virtual voidInitFont() const {}
 virtual voidDrawText( SalGraphics& ) const = 0;
 
-int GetUnitsPerPixel() const{ return 
mnUnitsPerPixel; }
 Degree10GetOrientation() const  { return 
mnOrientation; }
 
 voidSetTextRenderModeForResolutionIndependentLayout(bool 
bTextRenderModeForResolutionIndependentLayout)
@@ -115,7 +114,6 @@ protected:
 int mnMinCharPos;
 int mnEndCharPos;
 
-int mnUnitsPerPixel;
 Degree10mnOrientation;
 
 mutable Point   maDrawOffset;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 501fee55f933..3455c3a0d353 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6495,7 +6495,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const 
OUString& rText, bool
 else
 {
 DevicePoint aStartPt = rLayout.GetDrawPosition();
-int nWidth = rLayout.GetTextWidth() / rLayout.GetUnitsPerPixel();
+int nWidth = rLayout.GetTextWidth();
 drawTextLine( PixelToLogic(Point(aStartPt.getX(), aStartPt.getY()) 
),
   ImplDevicePixelToLogicWidth( nWidth ),
   eStrikeout, eUnderline, eOverline, bUnderlineAbove );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 0e582015adc8..51e1d9ad5e20 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -133,7 +133,6 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType 
eLang )
 SalLayout::SalLayout()
 :   mnMinCharPos( -1 ),
 mnEndCharPos( -1 ),
-mnUnitsPerPixel( 1 ),
 mnOrientation( 0 ),
 maDrawOffset( 0, 0 ),
 mbTextRenderModeForResolutionIndependentLayout(false)
@@ -298,7 +297,6 @@ DeviceCoordinate GenericSalLayout::GetTextWidth() const
 
 void GenericSalLayout::Justify( DeviceCoordinate nNewWidth )
 {
-nNewWidth *= mnUnitsPerPixel;
 DeviceCoordinate nOldWidth = GetTextWidth();
 if( !nOldWidth || nNewWidth==nOldWidth )
 return;
@@ -547,8 +545,6 @@ bool GenericSalLayout::GetNextGlyph(const GlyphItem** 
pGlyph,
 // calculate absolute position in pixel units
 DevicePoint aRelativePos = pGlyphIter->linearPos();
 
-aRelativePos.setX( aRelativePos.getX() / mnUnitsPerPixel );
-aRelativePos.setY( aRelativePos.getY() / mnUnitsPerPixel );
 rPos = GetDrawPosition( aRelativePos );
 
 return true;
@@ -616,7 +612,6 @@ MultiSalLayout::MultiSalLayout( std::unique_ptr 
pBaseLayout )
 assert(dynamic_cast(pBaseLayout.get()));
 
 mpLayouts[ 0 
].reset(static_cast(pBaseLayout.release()));
-mnUnitsPerPixel = mpLayouts[ 0 ]->GetUnitsPerPixel();
 }
 
 std::unique_ptr MultiSalLayout::ReleaseBaseLayout()
@@ -666,7 +661,6 @@ void MultiSalLayout::AdjustLayout( 
vcl::text::ImplLayoutArgs& rArgs )
 // for stretched text in a MultiSalLayout the target width needs to be
 // distributed by individually adjusting its virtual character widths
 DeviceCoordinate nTargetWidth = aMultiArgs.mnLayoutWidth;
-nTargetWidth *= mnUnitsPerPixel; // convert target width to base font 
units
 aMultiArgs.mnLayoutWidth = 0;
 
 // we need to get the original unmodified layouts ready
@@ -709,18 +703,6 @@ void MultiSalLayout::AdjustLayout( 
vcl::text::ImplLayoutArgs& rArgs )
 if( nWidthSum != nTargetWidth )
 aJustificationArray[ nCharCount-1 ] = nTargetWidth;
 
-// the justification array is still in base level units
-// => convert it to pixel units
-

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

2022-12-05 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2.cxx  |3 -
 basctl/source/basicide/baside2.hxx  |3 +
 basctl/source/basicide/baside2b.cxx |   76 ++--
 basctl/source/basicide/baside3.cxx  |2 
 basctl/source/basicide/basides1.cxx |   17 ++--
 basctl/source/basicide/basidesh.cxx |   10 
 basctl/source/basicide/bastypes.cxx |   30 ++
 basctl/source/inc/basidesh.hxx  |1 
 basctl/source/inc/bastypes.hxx  |5 +-
 9 files changed, 90 insertions(+), 57 deletions(-)

New commits:
commit affd2a9511fc0af7cad7e9679c17607540065d7e
Author: Rafael Lima 
AuthorDate: Sat Dec 3 18:13:54 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 5 09:28:06 2022 +

tdf#86568 Move the scrollbar to the EditWindow in Basic IDE

Currently, the Basic IDE has a shared horizontal scrollbar used both for 
the code editor window and the dialog editor window.

However, the problem is that this causes the horizontal scrollbar to be 
placed at an unintuitive place when the code editor is being used. To avoid 
this problem the code editor already has its own vertical scrollbar.

This patch creates a separate horizontal scrollbar for the code editor 
window and places it underneath the editor window to make it clearer what this 
scrollbar is meant to scroll.

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 1eb4b9027b7b..9452ef2162e5 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -255,9 +255,6 @@ void ModulWindow::GetFocus()
 
 void ModulWindow::DoInit()
 {
-if (GetVScrollBar())
-GetVScrollBar()->Hide();
-GetHScrollBar()->Show();
 GetEditorWindow().InitScrollBars();
 }
 
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 969f823b91a1..9a8700aecf3a 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -259,6 +259,7 @@ private:
 VclPtr aLineNumberWindow;
 VclPtr aEdtWindow;
 VclPtraEWVScrollBar;
+VclPtraEWHScrollBar;
 
 virtual void DataChanged(DataChangedEvent const & rDCEvt) override;
 
@@ -273,6 +274,7 @@ public:
 LineNumberWindow&   GetLineNumberWindow() { return *aLineNumberWindow; }
 EditorWindow&   GetEdtWindow()  { return *aEdtWindow; }
 ScrollAdaptor&  GetEWVScrollBar()   { return *aEWVScrollBar; }
+ScrollAdaptor&  GetEWHScrollBar()   { return *aEWHScrollBar; }
 
 void SetLineNumberDisplay(bool b);
 };
@@ -366,6 +368,7 @@ public:
 BreakPointWindow&   GetBreakPointWindow()   { return 
m_aXEditorWindow->GetBrkWindow(); }
 LineNumberWindow&   GetLineNumberWindow()   { return 
m_aXEditorWindow->GetLineNumberWindow(); }
 ScrollAdaptor&  GetEditVScrollBar() { return 
m_aXEditorWindow->GetEWVScrollBar(); }
+ScrollAdaptor&  GetEditHScrollBar() { return 
m_aXEditorWindow->GetEWHScrollBar(); }
 ExtTextEngine*  GetEditEngine() { return 
GetEditorWindow().GetEditEngine(); }
 TextView*   GetEditView()   { return 
GetEditorWindow().GetEditView(); }
 BreakPointList& GetBreakPoints(){ return 
GetBreakPointWindow().GetBreakPoints(); }
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 89edcec40f32..e0dfe9f38ee5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -499,7 +499,7 @@ void EditorWindow::Command( const CommandEvent& rCEvt )
  ( rCEvt.GetCommand() == CommandEventId::StartAutoScroll ) ||
  ( rCEvt.GetCommand() == CommandEventId::AutoScroll ) )
 {
-HandleScrollCommand( rCEvt, rModulWindow.GetHScrollBar(), 
&rModulWindow.GetEditVScrollBar() );
+HandleScrollCommand( rCEvt, &rModulWindow.GetEditHScrollBar(), 
&rModulWindow.GetEditVScrollBar() );
 } else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) {
 SfxDispatcher* pDispatcher = GetDispatcher();
 if ( pDispatcher )
@@ -1082,9 +1082,8 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
 TextHint const& rTextHint = *pTextHint;
 if( rTextHint.GetId() == SfxHintId::TextViewScrolled )
 {
-if ( rModulWindow.GetHScrollBar() )
-rModulWindow.GetHScrollBar()->SetThumbPos( 
pEditView->GetStartDocPos().X() );
 rModulWindow.GetEditVScrollBar().SetThumbPos( 
pEditView->GetStartDocPos().Y() );
+rModulWindow.GetEditHScrollBar().SetThumbPos( 
pEditView->GetStartDocPos().X() );
 rModulWindow.GetBreakPointWindow().DoScroll
 ( rModulWindow.GetBreakPointWindow().GetCurYOffset() - 
pEditView->GetStartDocPos().Y() );
 rModulWin

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

2022-12-05 Thread Michael Stahl (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx   |2 
 svx/source/table/viewcontactoftableobj.cxx |   30 ++-
 vcl/qa/cppunit/pdfexport/data/tdf135192-1.fodp |  239 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   95 +
 4 files changed, 364 insertions(+), 2 deletions(-)

New commits:
commit b9a86028d516e862c744de8ed693a43b1296780c
Author: Michael Stahl 
AuthorDate: Wed Nov 30 13:59:53 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Dec 5 08:49:57 2022 +

tdf#135192 svx: PDF/UA export: implement tags for SdrTableObj

There seems to be no way to check for isExportTaggedPDF() in
ViewContactOfTableObj::createViewIndependentPrimitive2DSequence()
so simply always add the tags.

Change-Id: I816ed1f3811c4efad6ca28366591d135bf823c5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143499
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 56ff8262d8ace8fd99326e290597cb901654ea11)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143537
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 95c1c01ca34b..ec1256140b4d 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -400,6 +400,8 @@ drawinglayer::primitive2d::Primitive2DContainer const & 
ViewObjectContact::getPr
 {
 if ( nIdentifier == SdrObjKind::Group )
 eElement = vcl::PDFWriter::Section;
+else if (nIdentifier == SdrObjKind::Table)
+eElement = vcl::PDFWriter::Table;
 else if ( nIdentifier == SdrObjKind::TitleText )
 eElement = vcl::PDFWriter::Heading;
 else if ( nIdentifier == SdrObjKind::OutlineText )
diff --git a/svx/source/table/viewcontactoftableobj.cxx 
b/svx/source/table/viewcontactoftableobj.cxx
index 6419c5057dab..9205ec147bc5 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -33,8 +33,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -216,6 +218,7 @@ namespace sdr::contact
 const sal_Int32 nRowCount(xTable->getRowCount());
 const sal_Int32 nColCount(xTable->getColumnCount());
 const sal_Int32 nAllCount(nRowCount * nColCount);
+SdrPage const*const pPage(rTableObj.getSdrPageFromSdrObject());
 
 if(nAllCount)
 {
@@ -229,7 +232,7 @@ namespace sdr::contact
 // GetGeoRect() to not trigger any calculations. It's the 
unrotated geometry.
 const basegfx::B2DRange aObjectRange = 
vcl::unotools::b2DRectangleFromRectangle(rTableObj.GetGeoRect());
 
-// To create the CellBorderPrimitives, use the tolling 
from svx::frame::Array
+// To create the CellBorderPrimitives, use the tooling 
from svx::frame::Array
 // which is capable of creating the needed visualization. 
Fill it during the
 // anyways needed run over the table.
 svx::frame::Array aArray;
@@ -240,11 +243,13 @@ namespace sdr::contact
 // create single primitives per cell
 for(aCellPos.mnRow = 0; aCellPos.mnRow < nRowCount; 
aCellPos.mnRow++)
 {
+drawinglayer::primitive2d::Primitive2DContainer row;
 // add RowHeight to CellBorderArray for primitive 
creation
 aArray.SetRowHeight(aCellPos.mnRow, 
rTableLayouter.getRowHeight(aCellPos.mnRow));
 
 for(aCellPos.mnCol = 0; aCellPos.mnCol < nColCount; 
aCellPos.mnCol++)
 {
+drawinglayer::primitive2d::Primitive2DContainer 
cell;
 // add ColWidth to CellBorderArray for primitive 
creation, only
 // needs to be done in the 1st run
 if(0 == aCellPos.mnRow)
@@ -323,7 +328,7 @@ namespace sdr::contact
 const 
drawinglayer::primitive2d::Primitive2DReference xCellReference(
 new 
drawinglayer::primitive2d::SdrCellPrimitive2D(
 aCellMatrix, aAttribute));
-aRetval.append(xCellReference);
+cell.append(xCellReference);
 }
 
 // Create cell primitive without text.
@@ -346,7 +351,28 @@ namespace sdr::contact
 aRetvalForShadow.append(xCellReference);
 }
 }
+   

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

2022-12-05 Thread Caolán McNamara (via logerrit)
 sw/qa/core/data/html/pass/ofz5007-1.html  |1 
 sw/qa/core/data/html/pass/ofz53680-1.html |binary
 sw/source/filter/html/htmltab.cxx |   73 --
 sw/source/filter/html/swhtml.hxx  |2 
 4 files changed, 1 insertion(+), 75 deletions(-)

New commits:
commit 83596187cdf75f29472bd800dc4e16df3f185299
Author: Caolán McNamara 
AuthorDate: Sun Dec 4 20:19:42 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 5 08:47:22 2022 +

ofz#53680 drop workarounds

and add original test-cases which nowadays function without workaround.

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

diff --git a/sw/qa/core/data/html/pass/ofz5007-1.html 
b/sw/qa/core/data/html/pass/ofz5007-1.html
new file mode 100644
index ..f427c4c6069f
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz5007-1.html
@@ -0,0 +1 @@
+  
\ No newline at end of file
diff --git a/sw/qa/core/data/html/pass/ofz53680-1.html 
b/sw/qa/core/data/html/pass/ofz53680-1.html
new file mode 100644
index ..d7fbcb2ebbce
Binary files /dev/null and b/sw/qa/core/data/html/pass/ofz53680-1.html differ
diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 3f7f03f19d3c..c8fee89794cc 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -4869,75 +4869,6 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& 
rOptions,
 }
 }
 
-namespace
-{
-class IndexInRange
-{
-private:
-SwNodeIndex maStart;
-SwNodeIndex maEnd;
-public:
-explicit IndexInRange(const SwNodeIndex& rStart, const SwNodeIndex& 
rEnd)
-: maStart(rStart)
-, maEnd(rEnd)
-{
-}
-bool operator()(const SwHTMLTextFootnote& rTextFootnote) const
-{
-const SwNodeIndex 
aTextIdx(rTextFootnote.pTextFootnote->GetTextNode());
-return aTextIdx >= maStart && aTextIdx <= maEnd;
-}
-};
-}
-
-void SwHTMLParser::ClearFootnotesMarksInRange(const SwNodeIndex& rMkNdIdx, 
const SwNodeIndex& rPtNdIdx)
-{
-//similarly for footnotes
-if (m_pFootEndNoteImpl)
-{
-
m_pFootEndNoteImpl->aTextFootnotes.erase(std::remove_if(m_pFootEndNoteImpl->aTextFootnotes.begin(),
-m_pFootEndNoteImpl->aTextFootnotes.end(), IndexInRange(rMkNdIdx, 
rPtNdIdx)), m_pFootEndNoteImpl->aTextFootnotes.end());
-if (m_pFootEndNoteImpl->aTextFootnotes.empty())
-{
-m_pFootEndNoteImpl.reset();
-}
-}
-
-//follow DelFlyInRange pattern here
-assert(rMkNdIdx.GetIndex() <= rPtNdIdx.GetIndex());
-
-SwDoc& rDoc = rMkNdIdx.GetNode().GetDoc();
-
-//ofz#9733 drop bookmarks in this range
-IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess();
-pMarkAccess->deleteMarks(rMkNdIdx.GetNode(), SwNodeIndex(rPtNdIdx, 
1).GetNode(), nullptr, std::nullopt, std::nullopt);
-
-SwFrameFormats& rTable = *rDoc.GetSpzFrameFormats();
-for ( auto i = rTable.size(); i; )
-{
-SwFrameFormat *pFormat = rTable[--i];
-const SwFormatAnchor &rAnch = pFormat->GetAnchor();
-SwNode const*const pAnchorNode = rAnch.GetAnchorNode();
-if (pAnchorNode &&
-((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA) ||
- (rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR)) &&
-( rMkNdIdx < *pAnchorNode && *pAnchorNode <= rPtNdIdx.GetNode() ))
-{
-if( rPtNdIdx != *pAnchorNode )
-{
-// If the Fly is deleted, all Flys in its content have to be 
deleted too.
-const SwFormatContent &rContent = pFormat->GetContent();
-// But only fly formats own their content, not draw formats.
-if (rContent.GetContentIdx() && pFormat->Which() == 
RES_FLYFRMFMT)
-{
-ClearFootnotesMarksInRange(*rContent.GetContentIdx(),
-  
SwNodeIndex(*rContent.GetContentIdx()->GetNode().EndOfSectionNode()));
-}
-}
-}
-}
-}
-
 void SwHTMLParser::DeleteSection(SwStartNode* pSttNd)
 {
 //if section to be deleted contains a pending m_pMarquee, it will be 
deleted
@@ -4945,10 +4876,6 @@ void SwHTMLParser::DeleteSection(SwStartNode* pSttNd)
 SwFrameFormat* pObjectFormat = m_pMarquee ? 
::FindFrameFormat(m_pMarquee.get()) : nullptr;
 FrameDeleteWatch aWatch(pObjectFormat);
 
-//similarly for footnotes
-SwNodeIndex aSttIdx(*pSttNd), aEndIdx(*pSttNd->EndOfSectionNode());
-ClearFootnotesMarksInRange(aSttIdx, aEndIdx);
-
 m_xDoc->getIDocumentContentOperations().DeleteSection(pSttNd);
 
 if (pObjectFormat)
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index fa4811c6d416..8fa4d5bdfba7 100644
--- a

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

2022-12-05 Thread Khaled Hosny (via logerrit)
 cui/uiconfig/ui/fontfeaturesdialog.ui |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 50329087b9a46e5dade8f924abf68cbd982be494
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 09:13:03 2022 +0200
Commit: خالد حسني 
CommitDate: Mon Dec 5 08:32:02 2022 +

Improve the layout of font features dialog

Make sure all sections have the same column alignments.

Change-Id: I25bdc0ecf8f971f23d188999167df33476bea1f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143662
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/cui/uiconfig/ui/fontfeaturesdialog.ui 
b/cui/uiconfig/ui/fontfeaturesdialog.ui
index c0eca92c3b73..b868ab2f2805 100644
--- a/cui/uiconfig/ui/fontfeaturesdialog.ui
+++ b/cui/uiconfig/ui/fontfeaturesdialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -98,7 +98,7 @@
 False
 vertical
 
-  
+  
   
 True
 False
@@ -106,6 +106,10 @@
 6
 12
 True
+True
+
+  
+
 
   
 
@@ -146,7 +150,7 @@
   
 
 
-  
+  
   
 True
 False
@@ -154,6 +158,10 @@
 6
 12
 True
+True
+
+  
+
 
   
 
@@ -194,7 +202,7 @@
   
 
 
-  
+  
   
 True
 False
@@ -202,6 +210,10 @@
 6
 12
 True
+True
+
+  
+
 
   
 


[Libreoffice-commits] core.git: download.lst external/more_fonts Makefile.fetch readlicense_oo/license Repository.mk solenv/flatpak-manifest.in vcl/qa

2022-12-05 Thread Khaled Hosny (via logerrit)
 Makefile.fetch   |1 -
 Repository.mk|1 -
 download.lst |2 --
 external/more_fonts/ExternalPackage_kacst.mk |   17 -
 external/more_fonts/Module_more_fonts.mk |2 --
 external/more_fonts/UnpackedTarball_kacst.mk |   14 --
 readlicense_oo/license/license.xml   |6 --
 solenv/flatpak-manifest.in   |7 ---
 vcl/qa/cppunit/complextext.cxx   |2 +-
 vcl/qa/cppunit/text.cxx  |2 +-
 10 files changed, 2 insertions(+), 52 deletions(-)

New commits:
commit 6d6a2343b1d45695f3ea02818d317a022a7b259f
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 01:01:10 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Dec 5 08:26:29 2022 +

tdf#152376: Remove Kacst Book and Kacst Office fonts

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

diff --git a/Makefile.fetch b/Makefile.fetch
index 07454893d700..053cb3190a49 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -183,7 +183,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk 
$(SRCDIR)/download.lst $(S
$(call fetch_Optional,MORE_FONTS,FONT_LIBRE_HEBREW_TARBALL) \
$(call fetch_Optional,MORE_FONTS,FONT_ALEF_TARBALL) \
$(call fetch_Optional,MORE_FONTS,FONT_AMIRI_TARBALL) \
-   $(call fetch_Optional,MORE_FONTS,FONT_KACST_TARBALL) \
$(call fetch_Optional,MORE_FONTS,FONT_REEM_TARBALL) \
$(call fetch_Optional,MORE_FONTS,FONT_SCHEHERAZADE_TARBALL) \
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
diff --git a/Repository.mk b/Repository.mk
index bc51c5c1be5d..56d8b2d28b84 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1040,7 +1040,6 @@ $(eval $(call 
gb_Helper_register_packages_for_install,ooo_fonts,\
$(if $(MPL_SUBSET),,fonts_culmus) \
fonts_dejavu \
fonts_gentium \
-   $(if $(MPL_SUBSET),,fonts_kacst) \
fonts_liberation \
fonts_liberation_narrow \
fonts_libertineg \
diff --git a/download.lst b/download.lst
index c0f41e15ee4d..6cea1bbeaed2 100644
--- a/download.lst
+++ b/download.lst
@@ -78,8 +78,6 @@ export FONT_ALEF_SHA256SUM := 
b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f
 export FONT_ALEF_TARBALL := alef-1.001.tar.gz
 export FONT_AMIRI_SHA256SUM := 
926fe1bd7dfde8e55178281f645258bfced6420c951c6f2fd532fd21691bca30
 export FONT_AMIRI_TARBALL := Amiri-1.000.zip
-export FONT_KACST_SHA256SUM := 
dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56
-export FONT_KACST_TARBALL := ttf-kacst_2.01+mry.tar.gz
 export FONT_REEM_SHA256SUM := 
c4fd68a23c0ea471cc084ae7efe888da372b925cb208eeb0322c26792d2ef413
 export FONT_REEM_TARBALL := ReemKufi-1.2.zip
 export FONT_SCHEHERAZADE_SHA256SUM := 
251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5
diff --git a/external/more_fonts/ExternalPackage_kacst.mk 
b/external/more_fonts/ExternalPackage_kacst.mk
deleted file mode 100644
index 909ed0b3..
--- a/external/more_fonts/ExternalPackage_kacst.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- 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_ExternalPackage_ExternalPackage,fonts_kacst,font_kacst))
-
-$(eval $(call 
gb_ExternalPackage_add_unpacked_files,fonts_kacst,$(LIBO_SHARE_FOLDER)/fonts/truetype,\
-   KacstBook.ttf \
-   KacstOffice.ttf \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/more_fonts/Module_more_fonts.mk 
b/external/more_fonts/Module_more_fonts.mk
index 233d890c6097..b97f71ac5c64 100644
--- a/external/more_fonts/Module_more_fonts.mk
+++ b/external/more_fonts/Module_more_fonts.mk
@@ -17,7 +17,6 @@ $(eval $(call gb_Module_add_targets,more_fonts,\
$(if $(MPL_SUBSET),,ExternalPackage_culmus) \
ExternalPackage_dejavu \
ExternalPackage_gentium \
-   $(if $(MPL_SUBSET),,ExternalPackage_kacst) \
ExternalPackage_liberation \
ExternalPackage_liberation_narrow \
ExternalPackage_libertineg \
@@ -33,7 +32,6 @@ $(eval $(call gb_Module_add_targets,more_fonts,\
$(if $(MPL_SUBSET),,UnpackedTarball_culmus) \
UnpackedTarball_dejavu \
UnpackedTarball_gentium \
-   $(if $(MPL_SUBSET),,UnpackedTarball_kacst) \
UnpackedTarball_liberation \
UnpackedTarball_liberation_narrow \
UnpackedTarball_libertineg \
diff --git a/external/more_fonts/UnpackedTarball_kacst.mk 
b/external/more

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

2022-12-05 Thread Bogdan B (via logerrit)
 include/svtools/strings.hrc |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 476ad3e5a8d4a8545043ffd7c8e16ead6ba1966b
Author: Bogdan B 
AuthorDate: Sun Dec 4 21:33:11 2022 +0200
Commit: Heiko Tietze 
CommitDate: Mon Dec 5 08:19:49 2022 +

tdf#136077 Change OS context menu for new file

Right click on Windows for a new file is 'OpenDocument Text'.
With this change would be 'LibreOffice Writer Document', and similar 
changes for each module.
Change-Id: I34634d1f1d26c6a8c2146d03a2ecba357b58e4d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143637
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc
index d8bcaae7df6c..3216a2e24c2d 100644
--- a/include/svtools/strings.hrc
+++ b/include/svtools/strings.hrc
@@ -322,17 +322,17 @@
 #define STR_DESCRIPTION_SXWRITER_DOC
NC_("STR_DESCRIPTION_SXWRITER_DOC", "OpenOffice.org 1.0 Text Document")
 #define STR_DESCRIPTION_SXGLOBAL_DOC
NC_("STR_DESCRIPTION_SXGLOBAL_DOC", "OpenOffice.org 1.0 Master Document")
 #define STR_DESCRIPTION_MATHML_DOC  
NC_("STR_DESCRIPTION_MATHML_DOC", "MathML Document")
-#define STR_DESCRIPTION_OO_DATABASE_DOC 
NC_("STR_DESCRIPTION_OO_DATABASE_DOC", "OpenDocument Database")
-#define STR_DESCRIPTION_OO_DRAW_DOC 
NC_("STR_DESCRIPTION_OO_DRAW_DOC", "OpenDocument Drawing")
-#define STR_DESCRIPTION_OO_MATH_DOC 
NC_("STR_DESCRIPTION_OO_MATH_DOC", "OpenDocument Formula")
-#define STR_DESCRIPTION_OO_GLOBAL_DOC   
NC_("STR_DESCRIPTION_OO_GLOBAL_DOC", "OpenDocument Master Document")
-#define STR_DESCRIPTION_OO_IMPRESS_DOC  
NC_("STR_DESCRIPTION_OO_IMPRESS_DOC", "OpenDocument Presentation")
-#define STR_DESCRIPTION_OO_CALC_DOC 
NC_("STR_DESCRIPTION_OO_CALC_DOC", "OpenDocument Spreadsheet")
-#define STR_DESCRIPTION_OO_WRITER_DOC   
NC_("STR_DESCRIPTION_OO_WRITER_DOC", "OpenDocument Text")
-#define STR_DESCRIPTION_OO_CALC_TEMPLATE
NC_("STR_DESCRIPTION_OO_CALC_TEMPLATE", "OpenDocument Spreadsheet Template")
-#define STR_DESCRIPTION_OO_DRAW_TEMPLATE
NC_("STR_DESCRIPTION_OO_DRAW_TEMPLATE", "OpenDocument Drawing Template")
-#define STR_DESCRIPTION_OO_IMPRESS_TEMPLATE 
NC_("STR_DESCRIPTION_OO_IMPRESS_TEMPLATE", "OpenDocument Presentation Template")
-#define STR_DESCRIPTION_OO_WRITER_TEMPLATE  
NC_("STR_DESCRIPTION_OO_WRITER_TEMPLATE", "OpenDocument Text Template")
+#define STR_DESCRIPTION_OO_DATABASE_DOC 
NC_("STR_DESCRIPTION_OO_DATABASE_DOC", "%PRODUCTNAME Database")
+#define STR_DESCRIPTION_OO_DRAW_DOC 
NC_("STR_DESCRIPTION_OO_DRAW_DOC", "%PRODUCTNAME Drawing")
+#define STR_DESCRIPTION_OO_MATH_DOC 
NC_("STR_DESCRIPTION_OO_MATH_DOC", "%PRODUCTNAME Math Formula")
+#define STR_DESCRIPTION_OO_GLOBAL_DOC   
NC_("STR_DESCRIPTION_OO_GLOBAL_DOC", "%PRODUCTNAME Master Document")
+#define STR_DESCRIPTION_OO_IMPRESS_DOC  
NC_("STR_DESCRIPTION_OO_IMPRESS_DOC", "%PRODUCTNAME Impress Presentation")
+#define STR_DESCRIPTION_OO_CALC_DOC 
NC_("STR_DESCRIPTION_OO_CALC_DOC", "%PRODUCTNAME Calc Spreadsheet")
+#define STR_DESCRIPTION_OO_WRITER_DOC   
NC_("STR_DESCRIPTION_OO_WRITER_DOC", "%PRODUCTNAME Writer Document")
+#define STR_DESCRIPTION_OO_CALC_TEMPLATE
NC_("STR_DESCRIPTION_OO_CALC_TEMPLATE", "%PRODUCTNAME Spreadsheet Template")
+#define STR_DESCRIPTION_OO_DRAW_TEMPLATE
NC_("STR_DESCRIPTION_OO_DRAW_TEMPLATE", "%PRODUCTNAME Drawing Template")
+#define STR_DESCRIPTION_OO_IMPRESS_TEMPLATE 
NC_("STR_DESCRIPTION_OO_IMPRESS_TEMPLATE", "%PRODUCTNAME Presentation Template")
+#define STR_DESCRIPTION_OO_WRITER_TEMPLATE  
NC_("STR_DESCRIPTION_OO_WRITER_TEMPLATE", "%PRODUCTNAME Text Template")
 #define STR_DESCRIPTION_EXTENSION   
NC_("STR_DESCRIPTION_EXTENSION", "%PRODUCTNAME Extension")
 
 #define STR_DESCRIPTION_HUNSPELL
NC_("STR_DESCRIPTION_HUNSPELL", "Hunspell SpellChecker")


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 2 commits - desktop/source libreofficekit/qa sw/qa sw/source

2022-12-05 Thread Miklos Vajna (via logerrit)
 desktop/source/lib/init.cxx  |9 +
 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx|1 
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx |   35 +
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.hxx |2 
 libreofficekit/qa/gtktiledviewer/gtv.ui  |   20 ++-
 sw/qa/uibase/uno/uno.cxx |   36 +
 sw/source/uibase/uno/unotxdoc.cxx|   94 +++
 7 files changed, 168 insertions(+), 29 deletions(-)

New commits:
commit 95921862bdecef95faa73501aadf17fd1aa14218
Author: Miklos Vajna 
AuthorDate: Wed Nov 30 08:57:50 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Dec 5 08:09:16 2022 +

libreofficekit: add a way to invoke getCommandValues()

- add a new button to the toolbar to invoke the getCommandValues() LOK
  API with user-provided command name (and parameters)

- log the result using g_info(), which is visible on the console if
  gtktiledviewer is started with G_MESSAGES_DEBUG=all

- change some labels to tooltip texts that actually show up on mouse
  hover so you can understand what button does what

- tweak the icons, so the question mark icon is the getter and the info
  icon is the setter

(cherry picked from commit 2c149dc9983317bce9116649270c3513adc35514)

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

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx
index 84c5335b32c2..a89b8fc7fc72 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx
@@ -129,6 +129,7 @@ gtv_main_toolbar_init(GtvMainToolbar* toolbar)
 gtk_builder_add_callback_symbol(builder.get(), "getRulerState", 
G_CALLBACK(getRulerState));
 gtk_builder_add_callback_symbol(builder.get(), "recentUnoChanged", 
G_CALLBACK(recentUnoChanged));
 gtk_builder_add_callback_symbol(builder.get(), "unoCommandDebugger", 
G_CALLBACK(unoCommandDebugger));
+gtk_builder_add_callback_symbol(builder.get(), "commandValuesDebugger", 
G_CALLBACK(commandValuesDebugger));
 gtk_builder_add_callback_symbol(builder.get(), "toggleEditing", 
G_CALLBACK(toggleEditing));
 gtk_builder_add_callback_symbol(builder.get(), "changePartMode", 
G_CALLBACK(changePartMode));
 gtk_builder_add_callback_symbol(builder.get(), "changePart", 
G_CALLBACK(changePart));
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
index bb0e7edd390d..e1dd0347041a 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
@@ -284,6 +284,41 @@ void unoCommandDebugger(GtkWidget* pButton, gpointer /* 
pItem */)
 gtk_widget_destroy(pUnoCmdDialog);
 }
 
+void commandValuesDebugger(GtkWidget* pButton, gpointer /* pItem */)
+{
+GtvApplicationWindow* window = 
GTV_APPLICATION_WINDOW(gtk_widget_get_toplevel(pButton));
+GtkWidget* pUnoCmdDialog = gtk_dialog_new_with_buttons ("Get command 
values",
+GTK_WINDOW 
(window),
+GTK_DIALOG_MODAL,
+"Execute",
+GTK_RESPONSE_OK,
+nullptr);
+g_object_set(G_OBJECT(pUnoCmdDialog), "resizable", FALSE, nullptr);
+GtkWidget* pDialogMessageArea = gtk_dialog_get_content_area (GTK_DIALOG 
(pUnoCmdDialog));
+GtkWidget* pUnoCmdAreaBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+gtk_box_pack_start(GTK_BOX(pDialogMessageArea), pUnoCmdAreaBox, true, 
true, 2);
+
+GtkWidget* pUnoCmdLabel = gtk_label_new("Enter UNO command");
+gtk_box_pack_start(GTK_BOX(pUnoCmdAreaBox), pUnoCmdLabel, true, true, 2);
+
+GtkWidget* pUnoCmdEntry = gtk_entry_new ();
+gtk_box_pack_start(GTK_BOX(pUnoCmdAreaBox), pUnoCmdEntry, true, true, 2);
+gtk_entry_set_placeholder_text(GTK_ENTRY(pUnoCmdEntry), "e.g. .uno:Undo");
+
+gtk_widget_show_all(pUnoCmdDialog);
+
+gint res = gtk_dialog_run (GTK_DIALOG(pUnoCmdDialog));
+if (res == GTK_RESPONSE_OK)
+{
+const gchar* pUnoCmd = gtk_entry_get_text(GTK_ENTRY(pUnoCmdEntry));
+gchar* pValues = 
lok_doc_view_get_command_values(LOK_DOC_VIEW(window->lokdocview), pUnoCmd);
+g_info("lok::Document::getCommandValues(%s) : %s", pUnoCmd, pValues);
+g_free(pValues);
+}
+
+gtk_widget_destroy(pUnoCmdDialog);
+}
+
 void toggleEditing(GtkWidget* pButton, gpointer /*pItem*/)
 {
 GtvApplicationWindow* window = 
GTV

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

2022-12-05 Thread Khaled Hosny (via logerrit)
 cui/source/dialogs/FontFeaturesDialog.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 3f9a8a3b7656470cfcf04c18a46a7b7bbeca8950
Author: Khaled Hosny 
AuthorDate: Mon Dec 5 08:25:50 2022 +0200
Commit: خالد حسني 
CommitDate: Mon Dec 5 08:01:10 2022 +

Mark ssXX and cvXX off by default in font features dialog

We know they are off by default.

Change-Id: I77c8ecb0d65d46ec77ccc2570ecf5c05e6e577e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143660
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index ab6063c9b6c3..f4f53f8c8655 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -158,7 +158,15 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 else
 {
 if (nValue < 0)
-aCurrentItem.m_xCheck->set_state(TRISTATE_INDET);
+{
+// If feature is not set, we don’t know if it is enabled by
+// default or not. But we know that stylistic sets and
+// character variants are not enabled by default.
+if (rFontFeature.isStylisticSet() || 
rFontFeature.isCharacterVariant())
+aCurrentItem.m_xCheck->set_state(TRISTATE_FALSE);
+else
+aCurrentItem.m_xCheck->set_state(TRISTATE_INDET);
+}
 else
 aCurrentItem.m_xCheck->set_state(nValue > 0 ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 aCurrentItem.m_xCheck->set_label(aDefinition.getDescription());