[Libreoffice-commits] core.git: sal/rtl

2023-03-20 Thread Stephan Bergmann (via logerrit)
 sal/rtl/strtmpl.hxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 926095df6b444866cd7e245b6a7befa6c2e29424
Author: Stephan Bergmann 
AuthorDate: Sun Mar 19 22:50:46 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 20 07:01:25 2023 +

Shrink rtl_[u]String allocation size to what's actually needed

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

diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index a814f4998a43..ca2800c6a012 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -832,12 +833,13 @@ template  using STRINGDATA = typename 
STRINGDATA_::T;
 
 template  IMPL_RTL_STRINGDATA* Alloc( sal_Int32 
nLen )
 {
+constexpr auto fix = offsetof(IMPL_RTL_STRINGDATA, buffer) + sizeof 
IMPL_RTL_STRINGDATA::buffer;
 IMPL_RTL_STRINGDATA * pData
 = (sal::static_int_cast< sal_uInt32 >(nLen)
-   <= ((SAL_MAX_UINT32 - sizeof (IMPL_RTL_STRINGDATA))
+   <= ((SAL_MAX_UINT32 - fix)
/ sizeof (STRCODE)))
 ? static_cast(rtl_allocateString(
-sizeof (IMPL_RTL_STRINGDATA) + nLen * sizeof 
(STRCODE)))
+fix + nLen * sizeof (STRCODE)))
 : nullptr;
 if (pData != nullptr) {
 pData->refCount = 1;


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

2023-03-20 Thread Pranam Lashkari (via logerrit)
 vcl/jsdialog/enabled.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit fcc6e504ff968923f0b17d9e59be56dc5f342711
Author: Pranam Lashkari 
AuthorDate: Fri Mar 17 21:46:00 2023 +0530
Commit: Szymon Kłos 
CommitDate: Mon Mar 20 07:31:24 2023 +

jsdialog: enabled page format dialog (writer)

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index a219ede196b1..116cc6a5b768 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -130,6 +130,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
 || rUIFile == u"modules/swriter/ui/dropcapspage.ui"
 || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
+|| rUIFile == u"modules/swriter/ui/footnoteareapage.ui"
 || rUIFile == u"modules/swriter/ui/footnotesendnotestabpage.ui"
 || rUIFile == u"modules/swriter/ui/indentpage.ui"
 || rUIFile == u"modules/swriter/ui/insertcaption.ui"
@@ -141,6 +142,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/sectionpage.ui"
 || rUIFile == u"modules/swriter/ui/splittable.ui"
 || rUIFile == u"modules/swriter/ui/templatedialog2.ui"
+|| rUIFile == u"modules/swriter/ui/templatedialog8.ui"
+|| rUIFile == u"modules/swriter/ui/textgridpage.ui"
 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
 // sfx
 || rUIFile == u"sfx/ui/cmisinfopage.ui"
@@ -158,6 +161,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"svx/ui/accessibilitycheckentry.ui"
 || rUIFile == u"svx/ui/findreplacedialog.ui"
 || rUIFile == u"svx/ui/fontworkgallerydialog.ui"
+|| rUIFile == u"svx/ui/headfootformatpage.ui"
 // uui
 || rUIFile == u"uui/ui/macrowarnmedium.ui"
 // vcl


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

2023-03-20 Thread Gökay ŞATIR (via logerrit)
 desktop/source/lib/init.cxx|   48 -
 include/sfx2/lokhelper.hxx |3 --
 sfx2/source/view/lokhelper.cxx |6 -
 3 files changed, 1 insertion(+), 56 deletions(-)

New commits:
commit 5c594e23dedfb995c8aa87934a6737f20703583f
Author: Gökay ŞATIR 
AuthorDate: Thu Mar 16 07:22:39 2023 +
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 07:37:58 2023 +

Revert "Preload the accelerator configurations when libreofficekit is 
active."

This reverts commit 8b1e20c164e11689894ca605735541fad9aea3b1.

Reason for revert: This is for 23.05 branch.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 276ed4142c58..d6a0904210a2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -212,10 +212,6 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 using namespace css;
 using namespace vcl;
 using namespace desktop;
@@ -7050,47 +7046,6 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 
 void setLanguageToolConfig();
 
-/// Used by preloadData (LibreOfficeKit) for providing different shortcuts for 
different languages.
-void preLoadShortCutAccelerators()
-{
-std::unordered_map>& 
acceleratorConfs = SfxLokHelper::getAcceleratorConfs();
-css::uno::Sequence 
installedLocales(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
-OUString actualLang = officecfg::Setup::L10N::ooLocale::get();
-
-for (sal_Int32 i = 0; i < installedLocales.getLength(); i++)
-{
-OUString language = 
LanguageTag(installedLocales[i]).getLocale().Language;
-
-if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(language))
-{
-// Language is listed by COOL and also installed in core. We can 
create the short cut accelerator.
-
-// Set the UI language to current one, before creating the 
accelerator.
-std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
-officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch);
-batch->commit();
-
-// Supported module names: Writer, Calc, Draw, Impress
-std::vector supportedModuleNames = { 
"com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", 
"com.sun.star.drawing.DrawingDocument", 
"com.sun.star.presentation.PresentationDocument" };
-// Create the accelerators.
-for (std::size_t j = 0; j < supportedModuleNames.size(); j++)
-{
-OUString key = supportedModuleNames[j] + installedLocales[i];
-acceleratorConfs[key] = 
svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(),
 supportedModuleNames[j]);
-}
-}
-else
-{
-std::cerr << "Language is installed in core but not in the list of 
COOL languages: " << language << "\n";
-}
-}
-
-// Set the UI language back to default one.
-std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
-officecfg::Setup::L10N::ooLocale::set(actualLang, batch);
-batch->commit();
-}
-
 /// Used only by LibreOfficeKit when used by Online to pre-initialize
 static void preloadData()
 {
@@ -7157,9 +7112,6 @@ static void preloadData()
 ImageTree &images = ImageTree::get();
 images.getImageUrl("forcefed.png", "style", "FO_oo");
 
-std::cerr << "Preload short cut accelerators\n";
-preLoadShortCutAccelerators();
-
 std::cerr << "Preload languages\n";
 
 // force load language singleton
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 5b3debd9f7e6..95eb0a9f9f6f 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 
 struct SFX2_DLLPUBLIC LokMouseEventData
 {
@@ -50,8 +49,6 @@ struct SFX2_DLLPUBLIC LokMouseEventData
 class SFX2_DLLPUBLIC SfxLokHelper
 {
 public:
-/// Gets the short cut accelerators.
-static std::unordered_map>& 
getAcceleratorConfs();
 /// Create a new view shell from the current view frame.
 /// This assumes a single document is ever loaded.
 static int createView();
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 7f0ba8abf930..8bf9d36d0beb 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -109,11 +110,6 @@ int SfxLokHelper::createView()
 return createView(pViewShell->GetViewFrame(), pViewShell->GetDocId());
 }
 
-std::unordered_map>& 
SfxLokHelper::getAcceleratorConfs()
-{
-return SfxApplication::GetOrCreat

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

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 28325983db2f7613b94bc70ef920ba13ebe6d817
Author: Miklos Vajna 
AuthorDate: Mon Mar 20 08:08:02 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 08:04:02 2023 +

sw floattable: fix CppunitTest_sw_ooxmlexport10's testTdf8255

This asserted that the table is not floating, rather assert that the
floating table is allowed to split.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index c6c9a3cb4c8b..b4e3de2d74e9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -928,10 +928,22 @@ DECLARE_OOXMLEXPORT_TEST(mathtype, "mathtype.docx")
 
CPPUNIT_ASSERT(xModel->supportsService("com.sun.star.formula.FormulaProperties"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf8255, "tdf8255.docx")
-{
-// This was 1: a full-page-wide multi-page floating table was imported as 
a TextFrame.
-CPPUNIT_ASSERT_EQUAL(0, getShapes());
+CPPUNIT_TEST_FIXTURE(Test, testTdf8255)
+{
+SwModelTestBase::FlySplitGuard aGuard;
+auto verify = [this]() {
+// A full-page-wide multi-page floating table should be allowed to 
split:
+uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+   uno::UNO_QUERY);
+bool bIsSplitAllowed{};
+xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+CPPUNIT_ASSERT(bIsSplitAllowed);
+};
+createSwDoc("tdf8255.docx");
+verify();
+reload(mpFilter, "tdf8255.docx");
+verify();
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf87460, "tdf87460.docx")


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

2023-03-20 Thread Stephan Bergmann (via logerrit)
 starmath/qa/extras/mmlexport-test.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0f6dfd5e6d3635ba56c320179a616405cd05d68a
Author: Stephan Bergmann 
AuthorDate: Sun Mar 19 22:47:37 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 20 08:33:39 2023 +

Fix C++20 build

...after 40d717c7bea493a24b9fd888bc71647d8793323b 
"CppunitTest_starmath_export:
inherit from UnoApiXmlTest",

> 
workdir/UnpackedTarball/cppunit/include/cppunit/tools/StringHelper.h:25:9: 
error: overload resolution selected deleted operator '<<'
> ost << x;
> ~~~ ^  ~
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:74:42: note: 
in instantiation of function template specialization 
'CppUnit::StringHelper::toString' requested here
> return CPPUNIT_NS::StringHelper::toString(x);
>  ^
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:168:50: 
note: in instantiation of member function 
'CppUnit::assertion_traits::toString' requested here
> Asserter::failNotEqual( assertion_traits::toString(expected),
>  ^
> starmath/qa/extras/mmlexport-test.cxx:76:5: note: in instantiation of 
function template specialization 'CppUnit::assertEquals' requested 
here
> CPPUNIT_ASSERT_EQUAL(u'\x222B', aContent[0]);
> ^
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:333:17: 
note: expanded from macro 'CPPUNIT_ASSERT_EQUAL'
>   ( CPPUNIT_NS::assertEquals( (expected),  \
> ^
> 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.1/../../../../include/c++/13.0.1/ostream:605:5:
 note: candidate function [with _Traits = std::char_traits] has been 
explicitly deleted
> operator<<(basic_ostream&, char16_t) = delete;
> ^

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

diff --git a/starmath/qa/extras/mmlexport-test.cxx 
b/starmath/qa/extras/mmlexport-test.cxx
index 9eb0cae9f4f2..f2cfa2d238b9 100644
--- a/starmath/qa/extras/mmlexport-test.cxx
+++ b/starmath/qa/extras/mmlexport-test.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #include 


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - configure.ac

2023-03-20 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6157015c625540ffde68f952d1e05be8c5be42f9
Author: Samuel Mehrbrodt 
AuthorDate: Mon Mar 20 09:33:51 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Mar 20 09:33:51 2023 +0100

Release 6.3.6.21

Change-Id: I7db24647498dad8948b7e05cb1e4fc487fc8b170

diff --git a/configure.ac b/configure.ac
index 3e972e6388af..a025e0ffce5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.3.6.20],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.21],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


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

2023-03-20 Thread Caolán McNamara (via logerrit)
 chart2/source/inc/Diagram.hxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ad59487053bcd267b53febde0cecbd64c7f94cc0
Author: Caolán McNamara 
AuthorDate: Sun Mar 19 20:40:35 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 09:02:41 2023 +

crashtesting: frequent XDiagram OPropertySetHelper::getFastPropertyValue 
crash

seen with

gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110

bt

 #1  0x7702fd36 in cppu::OPropertySetHelper::getFastPropertyValue 
(this=this@entry=0x5991baa0,
 nHandle=nHandle@entry=0) at 
/home/buildslave/source/libo-core/cppuhelper/source/propshlp.cxx:550
 #2  0x7fffd6e97b4d in chart::Diagram::getDiagramPositioningMode 
(this=0x5991ba30)
 at 
/home/buildslave/source/libo-core/chart2/source/model/main/Diagram.cxx:720
 #3  0x7fffd6dd9575 in 
chart::SeriesPlotterContainer::initializeCooSysAndSeriesPlotter 
(this=0x59aa44a0,
 rChartModel=...) at 
/home/buildslave/source/libo-core/chart2/source/view/main/SeriesPlotterContainer.cxx:231
 #4  0x7fffd6d96e02 in chart::ChartView::createShapes2D 
(this=this@entry=0x58fb1fa0, rPageSize=...)
 at /usr/include/c++/10/bits/shared_ptr_base.h:1324
 #5  0x7fffd6d98420 in chart::ChartView::createShapes 
(this=this@entry=0x58fb1fa0)
 at 
/home/buildslave/source/libo-core/chart2/source/view/main/ChartView.cxx:1398
 #6  0x7fffd6d98647 in chart::ChartView::impl_updateView 
(this=0x58fb1fa0,
 bCheckLockedCtrler=bCheckLockedCtrler@entry=false)
 at 
/home/buildslave/source/libo-core/chart2/source/view/main/ChartView.cxx:1451
 #7  0x7fffd6d9c5f0 in chart::ChartView::updateHard (this=)

info vtbl this

vtable for 'cppu::OPropertySetHelper' @ 0x7fffd71c7980 (subobject @ 
0x5991baa0):
[0]: 0x7fffd6ea0529 
[1]: 0x7fffd6e95434 
[2]: 0x7fffd6e953ba 
[3]: 0x7fffd6e9ff43 
[4]: 0x7702ff0b 
[5]: 0xff88
[6]: 0x7fffd71c7008 
[7]: 0x7fffd6ea0520 
[8]: 0x7fffd6e9542e 
[9]: 0x7fffd6e953b4 
[10]: 0x7fffd6e9ae67 
[11]: 0x7702de17 
[12]: 0x7702de89 
[13]: 0x7702f6ec  
const&)>
[14]: 0x7702f8be  
const&)>
[15]: 0x7702fb24  
const&)>
[16]: 0x7702fcf6  
const&)>
[17]: 0xff28
[18]: 0x7fffd71c7008 
[19]: 0x7fffd6ea0514 
[20]: 0x7fffd6e95425 

but without "final" used

info vtbl this (and this is what I also get with fedora's gcc 12.2.1
with "final" used)

vtable for 'cppu::OPropertySetHelper' @ 0x7fffd79c8850 (subobject @ 
0x5991cc98):
[0]: 0x7fffd76a1370 
[1]: 0x7fffd76962d2 
[2]: 0x7fffd7696258 
[3]: 0x7fffd769bcf7 
[4]: 0x7fffd77fcd5c 

 const&, com::sun::star::uno::Sequence const&)>
[5]: 0x7702e320 

 const&)>
[6]: 0x7702f1ac 

 const&, 
com::sun::star::uno::Reference
 const&)>
[7]: 0x7702f282 

 const&)>
[8]: 0x7703085a 

 const&, 
com::sun::star::uno::Reference
 const&)>
[9]: 0x7702dde2 

[10]: 0x7702de1e 

[11]: 0x7702f490 
 
const&)>
[12]: 0x7702f6f6 
 
const&)>
[13]: 0x7702f8c8 
 
const&)>
[14]: 0x7702fb2e 
 
const&)>
[15]: 0x7fffd76a0dae 
[16]: 0x7702fd00 
[17]: 0x7fffd769bc26 
[18]: 0x7fffd77f78c0 

[19]: 0x7fffd77fcb46 

[20]: 0x7fffd76a0f5f 

seen with exporting forum-de2-10559.odt to odt

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

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 403dfbb15385..2d40831c1892 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -67,9 +67,12 @@ typedef ::cppu::WeakImplHelper<
 Diagram_Base;
 }
 
-class OOO_DLLPUBLIC_CHARTTOOLS Diagram final :
-public impl::Diagram_Base,
-public ::property::OPropertySet
+class OOO_DLLPUBLIC_CHARTTOOLS Diagram
+#if !defined __GNUC__ || __GNUC__ >= 12
+final
+#endif
+: public impl::Diagram_Base
+, public ::property::OPropertySet
 {
 public:
 Diagram( css::uno::Reference< css::uno::XComponentContext > xContext );


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

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |   53 -
 1 file changed, 44 insertions(+), 9 deletions(-)

New commits:
commit 75249d502e83c10ec38ef8cc8ee58c6c877c6ee9
Author: Miklos Vajna 
AuthorDate: Mon Mar 20 09:05:39 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 10:01:41 2023 +

sw floattable: fix CppunitTest_sw_ooxmlexport10's testTdf99140

Assert this at a layout level, which still passes:

- the table is split on two different pages

- the width of the floating table is correct

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index b4e3de2d74e9..95d29b40dec6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -45,6 +45,12 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -1217,16 +1223,45 @@ DECLARE_OOXMLEXPORT_TEST(testTdf97371, "tdf97371.docx")
 CPPUNIT_ASSERT(nDiff < 10);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf99140, "tdf99140.docx")
+CPPUNIT_TEST_FIXTURE(Test, testTdf99140)
 {
-// This was 1: a multi-page floating table was imported as a TextFrame.
-CPPUNIT_ASSERT_EQUAL(0, getShapes());
-
-uno::Reference xTablesSupplier(mxComponent, 
uno::UNO_QUERY);
-uno::Reference 
xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
-uno::Reference 
xTableProperties(xTables->getByIndex(1), uno::UNO_QUERY);
-// This was text::HoriOrientation::NONE, the second table was too wide due 
to this.
-CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::LEFT_AND_WIDTH, 
getProperty(xTableProperties, "HoriOrient"));
+SwModelTestBase::FlySplitGuard aGuard;
+auto verify = [this]() {
+// A multi-page floating table appeared only on the first page.
+SwDoc* pDoc = getSwDoc();
+SwRootFrame* pLayout = 
pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+auto pPage1 = dynamic_cast(pLayout->Lower());
+CPPUNIT_ASSERT(pPage1);
+const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rPage1Objs.size());
+auto pPage1Fly = dynamic_cast(rPage1Objs[0]);
+CPPUNIT_ASSERT(pPage1Fly);
+SwFrame* pTab1 = pPage1Fly->GetLower();
+// This was text::HoriOrientation::NONE, the second table was too wide 
due to this.
+CPPUNIT_ASSERT_EQUAL(static_cast(9622), 
pTab1->getFrameArea().Width());
+SwFrame* pRow1 = pTab1->GetLower();
+SwFrame* pCell1 = pRow1->GetLower();
+auto pText1 = dynamic_cast(pCell1->GetLower());
+CPPUNIT_ASSERT(pText1);
+CPPUNIT_ASSERT_EQUAL(OUString("Table2:A1"), pText1->GetText());
+
+auto pPage2 = dynamic_cast(pPage1->GetNext());
+CPPUNIT_ASSERT(pPage2);
+const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rPage2Objs.size());
+auto pPage2Fly = dynamic_cast(rPage2Objs[0]);
+CPPUNIT_ASSERT(pPage2Fly);
+SwFrame* pTab2 = pPage2Fly->GetLower();
+SwFrame* pRow2 = pTab2->GetLower();
+SwFrame* pCell2 = pRow2->GetLower();
+auto pText2 = dynamic_cast(pCell2->GetLower());
+CPPUNIT_ASSERT(pText2);
+CPPUNIT_ASSERT_EQUAL(OUString("Table2:A2"), pText2->GetText());
+};
+createSwDoc("tdf99140.docx");
+verify();
+reload(mpFilter, "tdf99140.docx");
+verify();
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTableMarginAdjustment)


[Libreoffice-commits] core.git: sal/rtl

2023-03-20 Thread Stephan Bergmann (via logerrit)
 sal/rtl/strtmpl.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a44c9d023041c881f7858ddd9d93809dc1861313
Author: Stephan Bergmann 
AuthorDate: Mon Mar 20 09:35:12 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 20 10:44:40 2023 +

rtl_allocateString takes a size_t parameter

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

diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index ca2800c6a012..ef425a9b33ab 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -835,8 +835,8 @@ template  
IMPL_RTL_STRINGDATA* Alloc( sal_Int32 nL
 {
 constexpr auto fix = offsetof(IMPL_RTL_STRINGDATA, buffer) + sizeof 
IMPL_RTL_STRINGDATA::buffer;
 IMPL_RTL_STRINGDATA * pData
-= (sal::static_int_cast< sal_uInt32 >(nLen)
-   <= ((SAL_MAX_UINT32 - fix)
+= (o3tl::make_unsigned(nLen)
+   <= ((std::numeric_limits::max() - fix)
/ sizeof (STRCODE)))
 ? static_cast(rtl_allocateString(
 fix + nLen * sizeof (STRCODE)))


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

2023-03-20 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx|2 
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |4 
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx  |2 
 chart2/source/inc/Diagram.hxx  |5 +
 chart2/source/inc/DiagramHelper.hxx|6 -
 chart2/source/model/main/Diagram.cxx   |   42 
+
 chart2/source/tools/DiagramHelper.cxx  |   43 
--
 7 files changed, 51 insertions(+), 53 deletions(-)

New commits:
commit 514d2c7d20b3d63fc753918e4013eec71d2b342e
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:04:28 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 20 10:50:47 2023 +

move attachSeriesToAxis inside chart2::Diagram

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

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 4466b78cee82..6edc2732f2b3 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -331,7 +331,7 @@ void WrappedAttachedAxisProperty::setPropertyValue( const 
Any& rOuterValue, cons
 {
 rtl::Reference< ::chart::Diagram > xDiagram( 
m_spChart2ModelContact->getDiagram() );
 if( xDiagram.is() )
-::chart::DiagramHelper::attachSeriesToAxis( 
bNewAttachedToMainAxis, xDataSeries, xDiagram, 
m_spChart2ModelContact->m_xContext, false );
+xDiagram->attachSeriesToAxis( bNewAttachedToMainAxis, xDataSeries, 
m_spChart2ModelContact->m_xContext, false );
 }
 }
 
diff --git 
a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 90adfba537cc..3823d1577ed9 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -184,8 +184,8 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( 
sal_uInt16 nWhichId, const Sf
 if( bAttachToMainAxis != m_bAttachToMainAxis )
 {
 //change model:
-bChanged = DiagramHelper::attachSeriesToAxis( 
bAttachToMainAxis, uno::Reference< XDataSeries >::query( GetPropertySet() )
-, ChartModelHelper::findDiagram(m_xChartModel), m_xCC );
+bChanged = 
ChartModelHelper::findDiagram(m_xChartModel)->attachSeriesToAxis( 
bAttachToMainAxis, uno::Reference< XDataSeries >::query( GetPropertySet() )
+, m_xCC );
 
 if( bChanged )
 m_bAttachToMainAxis = bAttachToMainAxis;
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx 
b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index ad77a6aa5e5d..2b8417eaa48c 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -219,7 +219,7 @@ void setAttachedAxisType(const 
rtl::Reference<::chart::ChartModel>&
 return;
 
 rtl::Reference xDiagram = xModel->getFirstChartDiagram();
-DiagramHelper::attachSeriesToAxis(bPrimary, xDataSeries, xDiagram, 
comphelper::getProcessComponentContext());
+xDiagram->attachSeriesToAxis(bPrimary, xDataSeries, 
comphelper::getProcessComponentContext());
 }
 
 rtl::Reference getChartType(
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 2d40831c1892..234868c3ec27 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -261,6 +261,11 @@ public:
 rtl::Reference< ::chart::Axis > getAttachedAxis(
 const rtl::Reference< ::chart::DataSeries >& xSeries );
 
+bool attachSeriesToAxis( bool bMainAxis,
+const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+const css::uno::Reference< css::uno::XComponentContext > & xContext,
+bool bAdaptAxes=true );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index a6679c6e5ec4..e041e49bca52 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -147,12 +147,6 @@ public:
 static bool isSeriesAttachedToMainAxis(
 const css::uno::Reference< css::chart2::XDataSeries >& xDataSeries );
 
-static bool attachSeriesToAxis( bool bMainAxis,
-const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
-const rtl::Reference< ::chart::Diagram >& xDiagram,
-const css::uno::Reference< css::uno::XComponentContext > & xContext

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

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/qa/core/layout/data/floattable-compat14-body.docx |binary
 sw/qa/core/layout/flycnt.cxx |   46 +++
 sw/source/core/layout/fly.cxx|   33 +
 3 files changed, 70 insertions(+), 9 deletions(-)

New commits:
commit fd8ae820cb604f8698e5a5f4fe3a5ab15f5b283d
Author: Miklos Vajna 
AuthorDate: Fri Mar 17 08:22:26 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 11:17:48 2023 +

sw floattable, legacy: also consier fly position when deciding the bottom

The bugdoc has 2 rows: the 2nd row was split and the master row went to
page 1 and the follow row went to page 2. Word positioned the entire row
to page 2.

The problem seems to be that the layout code wants a "deadline" (so it
can grow the frame to that bottom position), but the deadline depends on
the height: split flys need to fit the body frame, then they can have a
vertical offset (resulting in an overlap between the bottom margin area
& the fly frame), in case the fly frame is still inside the page area.
This means that this deadline depends on the body height, the fly top
and the fly height at the same time. (Or in other words: the overlap is
only allowed if the fly would fit the body frame, but an additional
vertical offset pushes it to the bottom margin area, with an unchanged
height.)

Solve this fly height <-> deadline circular dependency by first checking
against the page size, using the current fly height; and then against
the body height, using the assumed / future fly height (assuming that
the fly will grow so its new height will match the deadline). This
results in a construct where usually you can't grow outside the body
area, but in some limited cases you can (till you only use the bottom
margin area), but only in case you grow your top position as well, which
is Word-compatible, but quite unusual at other places in Writer.

With this, the original tdf#61594 bugdoc gets rendered correctly, once
you opt in with SW_FORCE_FLY_SPLIT=1.

(cherry picked from commit 90523e10ec053347719309403a4d8566da1dfc4a)

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

diff --git a/sw/qa/core/layout/data/floattable-compat14-body.docx 
b/sw/qa/core/layout/data/floattable-compat14-body.docx
new file mode 100644
index ..134128348ce2
Binary files /dev/null and 
b/sw/qa/core/layout/data/floattable-compat14-body.docx differ
diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx
index 07aaf5deba3b..a9da83353ecd 100644
--- a/sw/qa/core/layout/flycnt.cxx
+++ b/sw/qa/core/layout/flycnt.cxx
@@ -566,6 +566,52 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyCompat14Nosplit)
 SwFrame* pRow2 = pTab2->GetLower();
 CPPUNIT_ASSERT(!pRow2->GetNext());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyCompat14Body)
+{
+// Given a Word 2010 document with 2 pages, 1 row on page 1, 1 row on page 
2:
+std::shared_ptr pChanges(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(true,
+   
 pChanges);
+pChanges->commit();
+comphelper::ScopeGuard g([pChanges] {
+
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(
+false, pChanges);
+pChanges->commit();
+});
+createSwDoc("floattable-compat14-body.docx");
+
+// When laying out that document:
+// (This is legacy mode, but still Word doesn't split row 2 because 1) row 
2 has a minimal
+// height, so even the first part of row 2 would not fit the body frame 
and 2) Word allows using
+// the bottom margin area in legacy mode, but only in case the fly height 
<= body height.)
+calcLayout();
+
+// Then make sure that the second row is on a page 2:
+SwDoc* pDoc = getSwDoc();
+SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+auto pPage1 = dynamic_cast(pLayout->Lower());
+CPPUNIT_ASSERT(pPage1);
+const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rPage1Objs.size());
+auto pPage1Fly = dynamic_cast(rPage1Objs[0]);
+CPPUNIT_ASSERT(pPage1Fly);
+SwFrame* pTab1 = pPage1Fly->GetLower();
+SwFrame* pRow1 = pTab1->GetLower();
+// Without the accompanying fix in place, this test would have failed, 
part of row 2 was on page
+// 1.
+CPPUNIT_ASSERT(!pRow1->GetNext());
+auto pPage2 = dynamic_cast(pPage1->GetNext());
+CPPUNIT_ASSERT(pPage2);
+const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rPage2Objs.size());
+auto pPage2Fly

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

2023-03-20 Thread Mike Kaganski (via logerrit)
 sc/source/core/data/column2.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0283512c49160aada159576c2fbb9b57c484b007
Author: Mike Kaganski 
AuthorDate: Mon Mar 20 07:50:56 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 11:36:46 2023 +

cid#1523442 Silence this Coverity diagnostic: the copy is intentional

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

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index edc11bd54244..5a4ca1bb2340 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -808,6 +808,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
 
 // Go though all non-empty cells within selection.
 sc::CellStoreType::const_iterator itPos = maCells.begin();
+// coverity[auto_causes_copy] This trivial copy is intentional
 for (auto [ nRow, nRow2 ] : aMarkedSpans)
 {
 while (nRow <= nRow2)


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

2023-03-20 Thread Juergen Funk (via logerrit)
 cui/source/options/optgdlg.cxx |   36 -
 cui/source/options/optgdlg.hxx |5 
 cui/uiconfig/ui/optviewpage.ui |  129 -
 framework/source/accelerators/acceleratorcache.cxx |   19 ++-
 4 files changed, 18 insertions(+), 171 deletions(-)

New commits:
commit c6dffdf014127af23b0b20b1015a4b6fdf0e1ac9
Author: Juergen Funk 
AuthorDate: Wed Feb 15 12:02:31 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Mar 20 11:37:04 2023 +

tdf#153587 If one of the multiple shortcuts is deleted,

  the next one is not displayed

This patch solve the part 2 of the bug, the problem was
that it did not take into account whether a command was assigned
multiple keys, it simply deleted the whole command

Change-Id: I4e09096d3bc112ed49a4210dd294d1acf7a48159
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147093
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/framework/source/accelerators/acceleratorcache.cxx 
b/framework/source/accelerators/acceleratorcache.cxx
index 342b9701f99d..0163654d4bf7 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -90,8 +90,23 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& 
aKey)
 // remove key from primary list
 m_lKey2Commands.erase(aKey);
 
-// remove key from optimized command list
-m_lCommand2Keys.erase(sCommand);
+// get keylist for that command
+TCommand2Keys::iterator pCommand = m_lCommand2Keys.find(sCommand);
+if (pCommand == m_lCommand2Keys.end())
+return;
+TKeyList& lKeys = pCommand->second;
+
+// one or more keys assign
+if (lKeys.size() == 1)
+// remove key from optimized command list
+m_lCommand2Keys.erase(sCommand);
+else // only remove this key from the keylist
+{
+auto pKeys = ::std::find(lKeys.begin(), lKeys.end(), aKey);
+
+if (pKeys != lKeys.end())
+lKeys.erase(pKeys);
+}
 }
 
 void AcceleratorCache::removeCommand(const OUString& sCommand)
commit 770eea32b68a95e493a86a97eba5003c46ed736b
Author: Caolán McNamara 
AuthorDate: Mon Mar 20 09:44:16 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 11:37:01 2023 +

tdf#152898 remove "show context menu shortcuts" from options page

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 71ac0594cd15..8a30f35535a9 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -530,9 +530,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont"))
 , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom"))
 , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", 
FieldUnit::PIXEL))
-, m_xMenuIconBox(m_xBuilder->weld_widget("menuiconsbox"))
-, m_xMenuIconsLB(m_xBuilder->weld_combo_box("menuicons"))
-, 
m_xContextMenuShortcutsLB(m_xBuilder->weld_combo_box("contextmenushortcuts"))
 , m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview"))
 , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
 , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
@@ -547,9 +544,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_sAutoStr(m_xIconStyleLB->get_text(0))
 {
 OUString sToolKitName(Application::GetToolkitName());
-if (sToolKitName.startsWith("gtk"))
-m_xMenuIconBox->hide();
-
 const bool bHasDarkMode = sToolKitName.startsWith("gtk") || sToolKitName 
== "osx" || sToolKitName == "win";
 if (!bHasDarkMode)
 m_xDarkModeFrame->hide();
@@ -781,33 +775,12 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 bModified = true;
 }
 
-if (m_xMenuIconsLB->get_value_changed_from_saved())
-{
-
officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(m_xMenuIconsLB->get_active()
 == 0, xChanges);
-
officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(m_xMenuIconsLB->get_active()
 == 2, xChanges);
-bModified = true;
-bMenuOptModified = true;
-bAppearanceChanged = true;
-}
-
 if (m_xAppearanceStyleLB->get_value_changed_from_saved())
 {
 bDarkModeOptModified = true;
 bModified = true;
 }
 
-if (m_xContextMenuShortcutsLB->get_value_changed_from_saved())
-{
-officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::set(
-m_xContextMenuShortcutsLB->get_active() == 0 ?
-TRISTATE_INDET :
-static_cast(m_xContextMenuShortcutsLB->get_active() - 1),
-xChanges);
-

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

2023-03-20 Thread Juergen Funk (via logerrit)
 framework/source/accelerators/acceleratorcache.cxx |1 -
 framework/source/accelerators/acceleratorconfiguration.cxx |5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 038f0b06a2d7d90e7ea19f2233f2892d9c78a08c
Author: Juergen Funk 
AuthorDate: Wed Feb 15 12:25:10 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Mar 20 11:37:40 2023 +

little optimization in accelerators

remove double calls

Change-Id: I4242067bdc0fdcc5184d555bb293f17d66965fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147094
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/framework/source/accelerators/acceleratorcache.cxx 
b/framework/source/accelerators/acceleratorcache.cxx
index 0163654d4bf7..c0b819a2a9e8 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -116,7 +116,6 @@ void AcceleratorCache::removeCommand(const OUString& 
sCommand)
 {
 removeKey(lKey);
 }
-m_lCommand2Keys.erase(sCommand);
 }
 
 } // namespace framework
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx 
b/framework/source/accelerators/acceleratorconfiguration.cxx
index 3507314a9a6e..48e0d362026e 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -614,10 +614,9 @@ void SAL_CALL 
XCUBasedAcceleratorConfiguration::removeKeyEvent(const css::awt::K
 
 if (rPrimaryCache.hasKey(aKeyEvent))
 {
-OUString sDelCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
-if (!sDelCommand.isEmpty())
+OUString sOriginalCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
+if (!sOriginalCommand.isEmpty())
 {
-OUString sOriginalCommand = 
rPrimaryCache.getCommandByKey(aKeyEvent);
 if (rSecondaryCache.hasCommand(sOriginalCommand))
 {
 AcceleratorCache::TKeyList lSecondaryKeys = 
rSecondaryCache.getKeysByCommand(sOriginalCommand);


[Libreoffice-commits] core.git: translations

2023-03-20 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 564d0fa5b38bdd90d15b8e4b630e3d6ac6d10769
Author: Christian Lohmaier 
AuthorDate: Mon Mar 20 13:12:55 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Mar 20 12:12:55 2023 +

Update git submodules

* Update translations from branch 'master'
  to 68c647361a152687bdc6f08222d479a7ad802513
  - update translations for master

and force-fix errors using pocheck

Change-Id: I7be920e9559128d8f94b8ccb787bb70719175c86

diff --git a/translations b/translations
index 133ec76d6453..68c647361a15 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 133ec76d6453eb8ce7b0a4007ddb01eb75aada8a
+Subproject commit 68c647361a152687bdc6f08222d479a7ad802513


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

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx|   61 ---
 sw/source/filter/ww8/docxtableexport.cxx |2 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |4 
 3 files changed, 39 insertions(+), 28 deletions(-)

New commits:
commit 48818dd359fbf0f37e1b318de89ab2ea7d735f58
Author: Miklos Vajna 
AuthorDate: Mon Mar 20 12:14:53 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 12:30:47 2023 +

sw floattable: fix handling of nested non-floating tables at cell start

CppunitTest_sw_ooxmlexport8's testN779642 failed in the
SW_FORCE_FLY_SPLIT=1 case.

The bugdoc has a floating table, then an inner, non-floating table. The
conversion to floating tables was disabled by the
c1eebcdac9f2b289fd363399130c485ca5ff444c (tdf#79329 DOCX import: fix
missing outer table with floattable at cell start, 2016-11-08).

Given that SwFormatFlySplit doesn't need the delayed text frame
conversion, we can get rid of this workaround.

Fix a similar problem on the export side as well, where the positioning
properties of the outer table leaked into the inner table. Once both the
import and export are fixed, the test passes.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 8cd6d4961f38..dbcd48aca0b6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -720,34 +720,41 @@ DECLARE_OOXMLEXPORT_TEST(testN793998, "n793998.docx")
 CPPUNIT_ASSERT(nTextPortion + nTabPortion > nParagraph - nRightMargin);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testN779642, "n779642.docx")
+CPPUNIT_TEST_FIXTURE(Test, testN779642)
 {
-uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
-
-// First problem: check that we have 2 tables, nesting caused the
-// creation of outer one to fail
-uno::Reference 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong number of imported tables", 
sal_Int32(2), xTables->getCount());
-
-// Second problem: check that the outer table is in a frame, at the bottom 
of the page
-uno::Reference 
xTextTable(xTextTablesSupplier->getTextTables()->getByName("Table2"), 
uno::UNO_QUERY);
-uno::Reference xAnchor(xTextTable->getAnchor(), 
uno::UNO_QUERY);
-uno::Any aFrame = xAnchor->getPropertyValue("TextFrame");
-uno::Reference xFrame;
-aFrame >>= xFrame;
-sal_Int16 nValue;
-xFrame->getPropertyValue("VertOrient") >>= nValue;
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", 
text::VertOrientation::BOTTOM, nValue);
-xFrame->getPropertyValue("VertOrientRelation") >>= nValue;
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation relation", 
text::RelOrientation::PAGE_PRINT_AREA, nValue);
-
-// tdf#106572 - perhaps not the best test to hijack since this file
-// produces an error in Word, but it nicely matches danger points,
-// and has a different first footer, so nice visual confirmation.
-discardDumpedLayout();
-xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-// There is no footer text on the first page.
-assertXPath(pXmlDoc, "/root/page[1]/footer/txt", 0);
+SwModelTestBase::FlySplitGuard aGuard;
+auto verify = [this]() {
+uno::Reference 
xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+
+// First problem: check that we have 2 tables, nesting caused the
+// creation of outer one to fail
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong number of imported tables", 
sal_Int32(2), xTables->getCount());
+
+// Second problem: check that the outer table is in a frame, at the 
bottom of the page
+uno::Reference 
xTextTable(xTextTablesSupplier->getTextTables()->getByName("Table2"), 
uno::UNO_QUERY);
+uno::Reference xAnchor(xTextTable->getAnchor(), 
uno::UNO_QUERY);
+uno::Any aFrame = xAnchor->getPropertyValue("TextFrame");
+uno::Reference xFrame;
+aFrame >>= xFrame;
+sal_Int16 nValue;
+xFrame->getPropertyValue("VertOrient") >>= nValue;
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", 
text::VertOrientation::BOTTOM, nValue);
+xFrame->getPropertyValue("VertOrientRelation") >>= nValue;
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation relation", 
text::RelOrientation::PAGE_PRINT_AREA, nValue);
+
+// tdf#106572 - perhaps not the best test to hijack since this file
+// produces an error in Word, but it nicely matches danger points,
+// and has a different first footer, so nice visual confirmation.
+discardDumpedLayout();
+x

[Libreoffice-commits] core.git: solenv/gbuild sw/UITest_sw_styleInspector.mk uitest/test_main.py uitest/uitest

2023-03-20 Thread Miklos Vajna (via logerrit)
 solenv/gbuild/UITest.mk|6 ++
 sw/UITest_sw_styleInspector.mk |2 ++
 uitest/test_main.py|   12 ++--
 uitest/uitest/framework.py |   28 
 uitest/uitest/test.py  |   13 -
 5 files changed, 50 insertions(+), 11 deletions(-)

New commits:
commit f5d97d14a2169c23b801d5d09ea19c001d36bba1
Author: Miklos Vajna 
AuthorDate: Mon Mar 20 08:14:13 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 12:40:22 2023 +

uitest: add a way to optionally use the same soffice process for a testsuite

A uitest suite may have several testcases and we spend a lot of time
spinning up a new soffice process for each testcase, while we typically
do such initialization only once for per testsuites in the cppunit case,
slowing down uitests.

The problem is that this way today's uitest cases don't really have to
clean up after themselves, since they know that the next testcase will
gets its own clean state (back to the start center).

Fix the problem by adding an opt-in way, so that a uitest suite can
declare that it's safe to run the entire suite with the same soffice
process. To be more specific:
- add a new --oneprocess for test_main.py, which will create a shared
  connection to a soffice process
- UITest then closes the document (returning to the start center)
  instead of disposing the component in the oneprocess case
- UITestCase won't create its own soffice connection in the oneprocess
  case
- add a new gb_UITest_use_oneprocess method to gbuild, to request this
  new, faster behavior
E.g. on my machine this means UITest_sw_styleInspector takes 26,345s
instead of 40,652s, probably such a speedup is worth the added
complexity.

This works nicely when the testsuite is a list of simple/boring test
cases, always loading one component/document at a time and always using
close_doc() to close it. It may not be safe for testsuites that do
something special (they may fail or hang), we'll see.

Change-Id: Ib14439d48aa547c92652245ee1c0cf37d2d7b6e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149134
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index 0a08939239b8..3b78b1356d90 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -80,6 +80,7 @@ else
$(gb_TEST_ENV_VARS) \
$(gb_UITest_COMMAND) \
--soffice="$(gb_UITest_SOFFICEARG)" \
+   $(if $(ONEPROCESS),--oneprocess) \
--userdir=$(call gb_Helper_make_url,$(dir $(call 
gb_UITest_get_target,$*))user) \
--dir=$(strip $(MODULES)) \
$(gb_UITest_GDBTRACE) \
@@ -104,6 +105,7 @@ $(call gb_UITest_get_target,$(1)) : MODULES :=
 $(eval $(call gb_TestHelpers_use_more_fonts,$(call gb_UITest_get_target,$(1
 $(eval $(call gb_Module_register_target,$(call 
gb_UITest_get_target,$(1)),$(call gb_UITest_get_clean_target,$(1
 $(call gb_Helper_make_userfriendly_targets,$(1),UITest)
+$(call gb_UITest_get_target,$(1)) : ONEPROCESS := $(false)
 
 endef
 
@@ -133,6 +135,10 @@ define gb_UITest_use_configuration
 $(call gb_UITest_get_target,$(1)) : gb_UITest_use_config := $(2)
 endef
 
+define gb_UITest_use_oneprocess
+$(call gb_UITest_get_target,$(1)) : ONEPROCESS := $(true)
+endef
+
 
 else # DISABLE_PYTHON
 
diff --git a/sw/UITest_sw_styleInspector.mk b/sw/UITest_sw_styleInspector.mk
index d255dfbd756f..667482649619 100644
--- a/sw/UITest_sw_styleInspector.mk
+++ b/sw/UITest_sw_styleInspector.mk
@@ -14,3 +14,5 @@ $(eval $(call 
gb_UITest_add_modules,sw_styleInspector,$(SRCDIR)/sw/qa/uitest,\
 $(eval $(call gb_UITest_set_defs,sw_styleInspector, \
 TDOC="$(SRCDIR)/sw/qa/uitest/data" \
 ))
+
+$(eval $(call gb_UITest_use_oneprocess,sw_styleInspector))
diff --git a/uitest/test_main.py b/uitest/test_main.py
index 511f2a5c8bd4..1957f54dc373 100644
--- a/uitest/test_main.py
+++ b/uitest/test_main.py
@@ -16,12 +16,13 @@ import types
 from uitest.framework import UITestCase
 
 from libreoffice.connection import OfficeConnection
+from libreoffice.connection import PersistentConnection
 
 test_name_limit_found = False
 
 def parseArgs(argv):
 (optlist,args) = getopt.getopt(argv[1:], "hr",
-["help", "soffice=", "userdir=", "dir=", "file=", "gdb"])
+["help", "soffice=", "oneprocess", "userdir=", "dir=", "file=", 
"gdb"])
 return (dict(optlist), args)
 
 def usage():
@@ -94,7 +95,7 @@ def add_tests_for_file(test_file, test_suite):
 continue
 test_name_limit_found = True
 
-obj = c(test_name, opts)
+obj = c(test_name, opts, connection)
 test_suite.addTest(obj)
 
 def get_test_suite_for_dir(opts):
@@ -108,6 +109,10 @@ def get_test_suite_for_dir(opts):
 

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

2023-03-20 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 11450879d5729515578b0107476b3a5fb05e3218
Author: Christian Lohmaier 
AuthorDate: Mon Mar 20 13:42:12 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Mar 20 12:42:12 2023 +

Update git submodules

* Update translations from branch 'libreoffice-7-4'
  to c95ce4d9b66b58b9cf329b7bc71f036ed703c303
  - update translations for 7-4

and force-fix errors using pocheck

Change-Id: I909a60defa5948ee9530cc82f982e265e90641a4

diff --git a/translations b/translations
index d3fef19e637f..c95ce4d9b66b 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit d3fef19e637f36da1a7b7b431d5e38324675621b
+Subproject commit c95ce4d9b66b58b9cf329b7bc71f036ed703c303


[Libreoffice-commits] translations.git: Branch 'libreoffice-7-4' - source/af source/an source/ast source/bg source/ca source/de source/dsb source/es source/fi source/fur source/gl source/gug source/he

2023-03-20 Thread Christian Lohmaier (via logerrit)
 source/af/extensions/messages.po   |   
 8 
 source/an/cui/messages.po  |   
 4 
 source/an/officecfg/registry/data/org/openoffice/Office/UI.po  |   
11 
 source/an/sd/messages.po   |   
 8 
 source/an/sfx2/messages.po |   
 6 
 source/an/svtools/messages.po  |   
 6 
 source/an/sw/messages.po   |   
36 
 source/ast/basctl/messages.po  |   
 4 
 source/ast/cui/messages.po |   
14 
 source/ast/dbaccess/messages.po|   
 9 
 source/ast/filter/source/config/fragments/filters.po   |   
 8 
 source/ast/framework/messages.po   |   
 8 
 source/ast/helpcontent2/source/text/sbasic/shared.po   |   
 8 
 source/ast/helpcontent2/source/text/sbasic/shared/03.po|   
 4 
 source/ast/helpcontent2/source/text/scalc.po   |   
 4 
 source/ast/helpcontent2/source/text/scalc/01.po|   
 9 
 source/ast/helpcontent2/source/text/scalc/guide.po |   
18 
 source/ast/helpcontent2/source/text/sdraw.po   |   
 8 
 source/ast/helpcontent2/source/text/shared.po  |   
 6 
 source/ast/helpcontent2/source/text/shared/01.po   |   
12 
 source/ast/helpcontent2/source/text/shared/02.po   |   
 6 
 source/ast/helpcontent2/source/text/shared/guide.po|   
 6 
 source/ast/helpcontent2/source/text/shared/optionen.po |   
 4 
 source/ast/helpcontent2/source/text/simpress/00.po |   
 4 
 source/ast/helpcontent2/source/text/simpress/01.po |   
 6 
 source/ast/helpcontent2/source/text/simpress/02.po |   
 8 
 source/ast/helpcontent2/source/text/smath/guide.po |   
 6 
 source/ast/helpcontent2/source/text/swriter.po |   
 6 
 source/ast/helpcontent2/source/text/swriter/01.po  |   
10 
 source/ast/helpcontent2/source/text/swriter/guide.po   |   
10 
 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po |   
15 
 source/ast/sc/messages.po  |   
24 
 source/ast/scaddins/messages.po|   
 6 
 source/ast/sd/messages.po  |   
12 
 source/ast/svtools/messages.po |   
 6 
 source/ast/svx/messages.po |   
24 
 source/ast/sw/messages.po  |   
42 
 source/ast/wizards/source/resources.po |   
10 
 source/bg/helpcontent2/source/text/sbasic/shared/03.po |   
 8 
 source/ca/chart2/messages.po   |   
12 
 source/ca/cui/messages.po  |   
10 
 source/ca/helpcontent2/source/text/sbasic/guide.po |   
26 
 source/ca/helpcontent2/source/text/sbasic/shared.po|   
25 
 source/ca/helpcontent2/source/text/scalc.po|   
10 
 source/ca/helpcontent2/source/text/scalc/01.po |   
55 
 source/ca/helpcontent2/source/text/scalc/04.po |   
14 
 source/ca/helpcontent2/source/text/scalc/guide.po  |   
 6 
 source/ca/helpcontent2/source/text/schart/01.po|   
 6 
 source/ca/helpcontent2/source/text/shared.po   |   
 6 
 source/ca/helpcontent2/source/text/shared/00.po|   
 5 
 source/ca/helpcontent2/source/text/shared/01.po|   
 4 
 source/ca/helpcontent2/source/text/shared/guide.po |   
 6 
 source/ca/helpcontent2/source/text/shared/optionen.po  |   
 5 
 source/ca/helpcontent2/source/text/smath/01.po |   
 4 
 source/ca/helpcontent2/source/text/swriter.po  |   
10 
 source/ca/helpcontent2/source/text/swriter/02.po   |   
 6 
 source/ca/helpcontent2/source/text/swriter/04.po   |   
14 
 source/ca/helpcontent2/source/text/swriter/guide.po|   
 7 
 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po   

Ziyue ZHOU license statemen

2023-03-20 Thread 周 子樾
All of my past & future contributions to LibreOffice may be

   licensed under the MPLv2/LGPLv3+ dual license.


从 Windows 版邮件发送



[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/Library_swqahelper.mk sw/qa writerfilter/source

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/Library_swqahelper.mk |4 
 sw/qa/core/layout/flycnt.cxx |  125 +--
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx|1 
 sw/qa/inc/swmodeltestbase.hxx|7 
 sw/qa/unit/swmodeltestbase.cxx   |   20 ++
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |3 
 6 files changed, 45 insertions(+), 115 deletions(-)

New commits:
commit 1d676ade7c6ef3d0caf88c638e29f9625cb2fdc1
Author: Miklos Vajna 
AuthorDate: Fri Mar 17 14:00:17 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 13:03:00 2023 +

sw floattable: unconditionally map  to SwFormatFlySplit

CppunitTest_sw_ooxmlexport8's testN816593 failed in the
SW_FORCE_FLY_SPLIT=1 case because the re-import of the document merged
two tables into one.

The problem starts earlier, we didn't import the table with a 
as a floating table, but we should.

Fix the problem by never going via m_aPendingFloatingTables in the
SW_FORCE_FLY_SPLIT=1 case, since that was only a workaround for layout
limitations. This conditionally reverts commit
78d1f1c2835b9fae0f91ed771fc1d594c7817502 (fdo#68607 bnc#816593
DomainMapperTableHandler: don't always start a frame, 2013-09-03).

Also add a SwModelTestBase::FlySplitGuard, so it's just a one-liner
change to test the SW_FORCE_FLY_SPLIT=1 case from cppunit. The goal is
to have this on by default once it's mature enough.

(cherry picked from commit d477fa8ac1b0d3ee81427217bbb5950278ab16db)

Conflicts:
sw/qa/unit/swmodeltestbase.cxx

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

diff --git a/sw/Library_swqahelper.mk b/sw/Library_swqahelper.mk
index d1d696ce4e98..ec379d979658 100644
--- a/sw/Library_swqahelper.mk
+++ b/sw/Library_swqahelper.mk
@@ -26,6 +26,10 @@ $(eval $(call gb_Library_use_externals,swqahelper, \
libxml2 \
 ))
 
+$(eval $(call gb_Library_use_custom_headers,swqahelper,\
+   officecfg/registry \
+))
+
 $(eval $(call gb_Library_add_defs,swqahelper,\
-DSWQAHELPER_DLLIMPLEMENTATION \
 ))
diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx
index a9da83353ecd..528b3bc4cbc8 100644
--- a/sw/qa/core/layout/flycnt.cxx
+++ b/sw/qa/core/layout/flycnt.cxx
@@ -9,10 +9,6 @@
 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 
@@ -45,16 +41,7 @@ public:
 CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWithTable)
 {
 // Given a document with a multi-page floating table:
-std::shared_ptr pChanges(
-comphelper::ConfigurationChanges::create());
-
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(true,
-   
 pChanges);
-pChanges->commit();
-comphelper::ScopeGuard g([pChanges] {
-
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(
-false, pChanges);
-pChanges->commit();
-});
+SwModelTestBase::FlySplitGuard aGuard;
 createSwDoc("floattable.docx");
 
 // When laying out that document:
@@ -103,16 +90,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWithTable)
 CPPUNIT_TEST_FIXTURE(Test, testSplitFlyVertOffset)
 {
 // Given a document with a floattable, split on 2 pages and a positive 
vertical offset:
-std::shared_ptr pChanges(
-comphelper::ConfigurationChanges::create());
-
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(true,
-   
 pChanges);
-pChanges->commit();
-comphelper::ScopeGuard g([pChanges] {
-
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(
-false, pChanges);
-pChanges->commit();
-});
+SwModelTestBase::FlySplitGuard aGuard;
 createSwDoc("floattable-vertoffset.docx");
 
 // When laying out that document:
@@ -156,16 +134,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyVertOffset)
 CPPUNIT_TEST_FIXTURE(Test, testSplitFly3Pages)
 {
 // Given a document with a floattable, split on 3 pages:
-std::shared_ptr pChanges(
-comphelper::ConfigurationChanges::create());
-
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(true,
-   
 pChanges);
-pChanges->commit();
-comphelper::ScopeGuard g([pChanges] {
-
officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(
-false, pChanges);
-pChanges->commit();
-});
+SwModelTestBase::FlySplitGuard aGuard;
  

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

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx   |1 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   10 
 writerfilter/source/dmapper/PropertyMap.cxx  |  175 +++
 writerfilter/source/dmapper/PropertyMap.hxx  |5 
 4 files changed, 108 insertions(+), 83 deletions(-)

New commits:
commit a5d555ddd76fc7a25658fb2977e2fe335ea080c1
Author: Miklos Vajna 
AuthorDate: Fri Mar 17 15:14:37 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 13:03:24 2023 +

sw floattable: fix redline import from DOCX

The problem was that sw/qa/extras/ooxmlexport/data/tdf149388.docx
contained redlines but those were not imported for split flys.

This happened because split flys get imported directly in
DomainMapperTableHandler::endTable(), and the redling handling for
floating tables was only implemented in
SectionPropertyMap::CloseSectionGroup() (where delayed floating tables
are imported).

Fix this by extracting the redline import code for floating tables into
2 functions and then calling those also from
DomainMapperTableHandler::endTable().

Note that the !isExported() branch of the testcase looks like dead code,
since we always run this code after an export.

(cherry picked from commit 9a9ee21ec237eda5df6ea70bfa3bec07b44b4d21)

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index b3c2bceef5bb..d5ca8435b82b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -1509,6 +1509,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149388)
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf132271)
 {
+SwModelTestBase::FlySplitGuard aGuard;
 // see also testTdf149388
 loadAndSave("tdf149388.docx");
 xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index fd2dd0ba8a94..500775c9f988 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1620,7 +1620,17 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel, bool bTab
 // the start of an outer table cell, that's not yet
 // implemented.
 if (xTextAppendAndConvert.is() && !bTableStartsAtCellStart)
+{
+std::deque aFramedRedlines = 
m_rDMapper_Impl.m_aStoredRedlines[StoredRedlines::FRAME];
+std::vector redPos, redLen;
+std::vector redCell;
+std::vector redTable;
+BeforeConvertToTextFrame(aFramedRedlines, redPos, redLen, 
redCell, redTable);
+
 xTextAppendAndConvert->convertToTextFrame(xStart, xEnd, 
comphelper::containerToSequence(aFrameProperties));
+
+AfterConvertToTextFrame(m_rDMapper_Impl, aFramedRedlines, 
redPos, redLen, redCell, redTable);
+}
 }
 }
 
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index b0e3b2146795..b8ceaf0eafb8 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1354,6 +1354,96 @@ void 
SectionPropertyMap::HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl&
 rAnchoredObjectAnchors.clear();
 }
 
+void BeforeConvertToTextFrame(std::deque& rFramedRedlines, 
std::vector& redPos, std::vector& redLen, 
std::vector& redCell, std::vector& redTable)
+{
+// convert redline ranges to cursor movement and character length
+for( size_t i = 0; i < rFramedRedlines.size(); i+=3)
+{
+uno::Reference xCell;
+uno::Reference< text::XTextRange > xRange;
+rFramedRedlines[i] >>= xRange;
+uno::Reference< beans::XPropertySet > xRangeProperties;
+if ( xRange.is() )
+{
+OUString sTableName;
+OUString sCellName;
+xRangeProperties.set( xRange, uno::UNO_QUERY_THROW );
+if 
(xRangeProperties->getPropertySetInfo()->hasPropertyByName("TextTable"))
+{
+uno::Any aTable = 
xRangeProperties->getPropertyValue("TextTable");
+if ( aTable != uno::Any() )
+{
+uno::Reference xTable;
+aTable >>= xTable;
+uno::Reference 
xTableProperties(xTable, uno::UNO_QUERY);
+xTableProperties->getPropertyValue("TableName") >>= 
sTableName;
+}
+if 
(xRangeProperties->getPropertySetInfo()->hasPropertyByName("Cell"))
+   

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

2023-03-20 Thread Pranam Lashkari (via logerrit)
 vcl/jsdialog/enabled.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 87210002a3ea9c785262166efbed59cdf44bb4a6
Author: Pranam Lashkari 
AuthorDate: Fri Mar 17 21:46:00 2023 +0530
Commit: Pranam Lashkari 
CommitDate: Mon Mar 20 13:03:26 2023 +

jsdialog: enabled page format dialog (writer)

Change-Id: I352214af08e7f5f8470aeccc49932d0ea5b191a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149061
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
(cherry picked from commit fcc6e504ff968923f0b17d9e59be56dc5f342711)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149103
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index efb8362c414c..9a3699301de1 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -107,6 +107,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
 || rUIFile == u"modules/swriter/ui/dropcapspage.ui"
 || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
+|| rUIFile == u"modules/swriter/ui/footnoteareapage.ui"
 || rUIFile == u"modules/swriter/ui/footnotesendnotestabpage.ui"
 || rUIFile == u"modules/swriter/ui/indentpage.ui"
 || rUIFile == u"modules/swriter/ui/insertcaption.ui"
@@ -118,6 +119,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/sectionpage.ui"
 || rUIFile == u"modules/swriter/ui/splittable.ui"
 || rUIFile == u"modules/swriter/ui/templatedialog2.ui"
+|| rUIFile == u"modules/swriter/ui/templatedialog8.ui"
+|| rUIFile == u"modules/swriter/ui/textgridpage.ui"
 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
 // sfx
 || rUIFile == u"sfx/ui/cmisinfopage.ui"
@@ -134,6 +137,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"svx/ui/accessibilitycheckentry.ui"
 || rUIFile == u"svx/ui/findreplacedialog.ui"
 || rUIFile == u"svx/ui/fontworkgallerydialog.ui"
+|| rUIFile == u"svx/ui/headfootformatpage.ui"
 // uui
 || rUIFile == u"uui/ui/macrowarnmedium.ui"
 // vcl


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

2023-03-20 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit d28148903b29daecd5e7f1353ceeb78bdf492290
Author: Miklos Vajna 
AuthorDate: Mon Mar 20 08:08:02 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 20 13:03:49 2023 +

sw floattable: fix CppunitTest_sw_ooxmlexport10's testTdf8255

This asserted that the table is not floating, rather assert that the
floating table is allowed to split.

(cherry picked from commit 28325983db2f7613b94bc70ef920ba13ebe6d817)

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index c6c9a3cb4c8b..b4e3de2d74e9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -928,10 +928,22 @@ DECLARE_OOXMLEXPORT_TEST(mathtype, "mathtype.docx")
 
CPPUNIT_ASSERT(xModel->supportsService("com.sun.star.formula.FormulaProperties"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf8255, "tdf8255.docx")
-{
-// This was 1: a full-page-wide multi-page floating table was imported as 
a TextFrame.
-CPPUNIT_ASSERT_EQUAL(0, getShapes());
+CPPUNIT_TEST_FIXTURE(Test, testTdf8255)
+{
+SwModelTestBase::FlySplitGuard aGuard;
+auto verify = [this]() {
+// A full-page-wide multi-page floating table should be allowed to 
split:
+uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+   uno::UNO_QUERY);
+bool bIsSplitAllowed{};
+xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+CPPUNIT_ASSERT(bIsSplitAllowed);
+};
+createSwDoc("tdf8255.docx");
+verify();
+reload(mpFilter, "tdf8255.docx");
+verify();
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf87460, "tdf87460.docx")


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

2023-03-20 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx |7 +++
 chart2/source/inc/DiagramHelper.hxx   |8 
 chart2/source/model/main/Diagram.cxx  |   24 
 chart2/source/tools/DiagramHelper.cxx |   32 +---
 4 files changed, 32 insertions(+), 39 deletions(-)

New commits:
commit 369b241a7dd30e5102306273263cc92f613e12b4
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:13:23 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 20 13:07:47 2023 +

move replaceCoordinateSystem inside chart2::Diagram

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

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 234868c3ec27..ee003e1af778 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -266,6 +266,13 @@ public:
 const css::uno::Reference< css::uno::XComponentContext > & xContext,
 bool bAdaptAxes=true );
 
+/** Replaces all occurrences of xCooSysToReplace in the tree with
+xReplacement in the diagram's tree
+ */
+SAL_DLLPRIVATE void replaceCoordinateSystem(
+const rtl::Reference< ::chart::BaseCoordinateSystem > & 
xCooSysToReplace,
+const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index e041e49bca52..5ec3998f1f3e 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -136,14 +136,6 @@ public:
 const rtl::Reference< ::chart::Diagram > & xDiagram,
 sal_Int32 nNewDimensionCount );
 
-/** Replaces all occurrences of xCooSysToReplace in the tree with
-xReplacement in the diagram's tree
- */
-SAL_DLLPRIVATE static void replaceCoordinateSystem(
-const rtl::Reference< ::chart::Diagram > & xDiagram,
-const rtl::Reference< ::chart::BaseCoordinateSystem > & 
xCooSysToReplace,
-const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
-
 static bool isSeriesAttachedToMainAxis(
 const css::uno::Reference< css::chart2::XDataSeries >& xDataSeries );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 73fb2b381e29..b3670bc37ee6 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1342,6 +1342,30 @@ bool Diagram::attachSeriesToAxis( bool bAttachToMainAxis
 return bChanged;
 }
 
+void Diagram::replaceCoordinateSystem(
+const rtl::Reference< BaseCoordinateSystem > & xCooSysToReplace,
+const rtl::Reference< BaseCoordinateSystem > & xReplacement )
+{
+// update the coordinate-system container
+try
+{
+uno::Reference< chart2::data::XLabeledDataSequence > xCategories = 
getCategories();
+
+// move chart types of xCooSysToReplace to xReplacement
+xReplacement->setChartTypes( xCooSysToReplace->getChartTypes());
+
+removeCoordinateSystem( xCooSysToReplace );
+addCoordinateSystem( xReplacement );
+
+if( xCategories.is() )
+setCategories( xCategories );
+}
+catch( const uno::Exception & )
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+}
+
 } //  namespace chart
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index b43afae2aac5..f90da4a02428 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -454,7 +454,7 @@ void DiagramHelper::setDimension(
 }
 
 // replace the old coordinate system at all places where it was 
used
-DiagramHelper::replaceCoordinateSystem( xDiagram, xOldCooSys, 
xNewCooSys );
+xDiagram->replaceCoordinateSystem( xOldCooSys, xNewCooSys );
 }
 
 //correct stack mode if necessary
@@ -469,36 +469,6 @@ void DiagramHelper::setDimension(
 }
 }
 
-void DiagramHelper::replaceCoordinateSystem(
-const rtl::Reference< Diagram > & xDiagram,
-const rtl::Reference< BaseCoordinateSystem > & xCooSysToReplace,
-const rtl::Reference< BaseCoordinateSystem > & xReplacement )
-{
-OSL_ASSERT( xDiagram.is());
-if( ! xDiagram.is())
-return;
-
-// update the coordinate-system container
-
-try
-{
-uno::Reference< chart2::data::XLabeledDataSequence > xCategories = 
xDiagram->getCategories();
-
-// move chart types of xCooSysToReplace to xReplacement
-xReplacement->setChartTypes( xCooSysToReplace->getChartTypes());
-
-xDiagram->removeCoordinateSystem( xCooSysToReplace );
-xDiagram->addCoordinateSystem( xReplacement );
-
-if( xCategories.is() )
-  

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

2023-03-20 Thread MoazAlaa (via logerrit)
 hwpfilter/source/grammar.h |   62 +++-
 hwpfilter/source/lexer.cxx |   76 ++---
 2 files changed, 71 insertions(+), 67 deletions(-)

New commits:
commit 9b631efd012c94d099b0181c5d85aed321d031f5
Author: MoazAlaa 
AuthorDate: Sun Mar 5 01:10:28 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Mon Mar 20 13:23:00 2023 +

tdf#145614 convert all #define into enum in hwpfilter/source/grammar.h

Change-Id: I8496b95cc55732d72d36cfc4d2fadc5cbea53e6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148261
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/hwpfilter/source/grammar.h b/hwpfilter/source/grammar.h
index 4d69482cd04e..e18a8445590c 100644
--- a/hwpfilter/source/grammar.h
+++ b/hwpfilter/source/grammar.h
@@ -22,35 +22,39 @@ typedef union {
 const char *str;
 Node *ptr;
 } YYSTYPE;
-#define ACCENT  257
-#define SMALL_GREEK 258
-#define CAPITAL_GREEK   259
-#define BINARY_OPERATOR 260
-#define RELATION_OPERATOR   261
-#define ARROW   262
-#define GENERAL_IDEN263
-#define GENERAL_OPER264
-#define BIG_SYMBOL  265
-#define FUNCTION266
-#define ROOT267
-#define FRACTION268
-#define SUBSUP  269
-#define EQOVER  270
-#define DELIMETER   271
-#define LARGE_DELIM 272
-#define DECORATION  273
-#define SPACE_SYMBOL274
-#define CHARACTER   275
-#define STRING  276
-#define OPERATOR277
-#define EQBEGIN 278
-#define EQEND   279
-#define EQLEFT  280
-#define EQRIGHT 281
-#define NEWLINE 282
-#define LEFT_DELIM  283
-#define RIGHT_DELIM 284
-#define DIGIT   285
+
+enum Grammar
+{
+ACCENT  = 257,
+SMALL_GREEK = 258,
+CAPITAL_GREEK   = 259,
+BINARY_OPERATOR = 260,
+RELATION_OPERATOR   = 261,
+ARROW   = 262,
+GENERAL_IDEN= 263,
+GENERAL_OPER= 264,
+BIG_SYMBOL  = 265,
+FUNCTION= 266,
+ROOT= 267,
+FRACTION= 268,
+SUBSUP  = 269,
+EQOVER  = 270,
+DELIMETER   = 271,
+LARGE_DELIM = 272,
+DECORATION  = 273,
+SPACE_SYMBOL= 274,
+CHARACTER   = 275,
+STRING  = 276,
+OPERATOR= 277,
+EQBEGIN = 278,
+EQEND   = 279,
+EQLEFT  = 280,
+EQRIGHT = 281,
+NEWLINE = 282,
+LEFT_DELIM  = 283,
+RIGHT_DELIM = 284,
+DIGIT   = 285,
+};
 
 extern YYSTYPE yylval;
 
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 5f28ff2eeaa5..cb6ae3fc4b49 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -1166,91 +1166,91 @@ do_action:  /* This label is used only to access EOF 
actions. */
 
 case 1:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>Begin[%s]\n",yytext+1); return 
EQBEGIN; }
+{ yylval.str = yytext+1; token_debug("  ==>Begin[%s]\n",yytext+1); return 
Grammar::EQBEGIN; }
 //YY_BREAK
 case 2:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>End[%s]\n",yytext+1); return EQEND; 
}
+{ yylval.str = yytext+1; token_debug("  ==>End[%s]\n",yytext+1); return 
Grammar::EQEND; }
 //YY_BREAK
 case 3:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>Left[%s]\n",yytext+1); return 
EQLEFT; }
+{ yylval.str = yytext+1; token_debug("  ==>Left[%s]\n",yytext+1); return 
Grammar::EQLEFT; }
 //YY_BREAK
 case 4:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>LeftDelim[%s]\n",yytext+1); return 
LEFT_DELIM; }
+{ yylval.str = yytext+1; token_debug("  ==>LeftDelim[%s]\n",yytext+1); return 
Grammar::LEFT_DELIM; }
 //YY_BREAK
 case 5:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>RightDelim[%s]\n",yytext+1); return 
RIGHT_DELIM; }
+{ yylval.str = yytext+1; token_debug("  ==>RightDelim[%s]\n",yytext+1); return 
Grammar::RIGHT_DELIM; }
 //YY_BREAK
 case 6:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>Right[%s]\n",yytext+1); return 
EQRIGHT; }
+{ yylval.str = yytext+1; token_debug("  ==>Right[%s]\n",yytext+1); return 
Grammar::EQRIGHT; }
 //YY_BREAK
 case 7:
 YY_RULE_SETUP
-{ yylval.str = yytext;   token_debug("  ==>NewLine[%s]\n",yytext); return 
NEWLINE; }
+{ yylval.str = yytext;   token_debug("  ==>NewLine[%s]\n",yytext); return 
Grammar::NEWLINE; }
 //YY_BREAK
 case 8:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>Accent[%s]\n",yytext+1); return 
ACCENT; }
+{ yylval.str = yytext+1; token_debug("  ==>Accent[%s]\n",yytext+1); return 
Grammar::ACCENT; }
 //YY_BREAK
 case 9:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>Small_Greek[%s]\n",yytext+1); 
return SMALL_GREEK; }
+{ yylval.str = yytext+1; token_debug("  ==>Small_Greek[%s]\n",yytext+1); 
return Grammar::SMALL_GREEK; }
 //YY_BREAK
 case 10:
 YY_RULE_SETUP
-{ yylval.str = yytext+1; token_debug("  ==>Capita

[Libreoffice-commits] core.git: scripting/java

2023-03-20 Thread Damjan Jovanovic (via logerrit)
 scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java |   12 
+++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit d0159892793860e53ddc068b4bdb707a521def19
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 16 18:31:15 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Mar 20 14:43:13 2023 +

Fix some errors in the scripting module's XInputStreamImpl:

- Check the loop termination in readBytes() properly: currently it 
increments
totalBytesRead while also decrementing nBytesToRead, so when compared to
each other, the loop terminates when the buffer is half full. Only check
for nBytesToRead instead.
- Deal with the possibility of available() returning 0 in readSomeBytes().

Patch by: me

Cherry-picked from

https://github.com/apache/openoffice/commit/7e29bacc90c4b1b9788c3b71dfacd17daecde7a7
"Fix some errors in the scripting module's XInputStreamImpl:"

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

diff --git 
a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java 
b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
index 8320b6227cdb..3270d40d5bfb 100644
--- a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
+++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
@@ -41,11 +41,16 @@ public class XInputStreamImpl implements XInputStream {
 try {
 int bytesRead;
 
-while ((bytesRead = is.read(aData[ 0 ], totalBytesRead, 
nBytesToRead)) > 0
-   && (totalBytesRead < nBytesToRead)) {
+while (( nBytesToRead > 0 ) && (bytesRead = is.read(aData[ 0 ], 
totalBytesRead, nBytesToRead)) > 0) {
 totalBytesRead += bytesRead;
 nBytesToRead -= bytesRead;
 }
+if ( totalBytesRead < aData[ 0 ].length )
+{
+byte[] out = new byte[ totalBytesRead ];
+System.arraycopy( aData[ 0 ], 0, out, 0, totalBytesRead );
+aData[ 0 ] = out;
+}
 } catch (IOException e) {
 throw new com.sun.star.io.IOException(e);
 } catch (IndexOutOfBoundsException aie) {
@@ -62,7 +67,8 @@ public class XInputStreamImpl implements XInputStream {
 int bytesToRead = nMaxBytesToRead;
 int availableBytes = available();
 
-if (availableBytes < nMaxBytesToRead) {
+if (0 < availableBytes && availableBytes < nMaxBytesToRead)
+{
 bytesToRead = availableBytes;
 }
 


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

2023-03-20 Thread Damjan Jovanovic (via logerrit)
 include/svtools/htmlkywd.hxx   |1 +
 svtools/source/svhtml/htmlkywd.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 28341f0b107b7bcd1377cec68c90eee9c4f27e1c
Author: Damjan Jovanovic 
AuthorDate: Tue Jan 3 08:41:13 2023 +0200
Commit: Xisco Fauli 
CommitDate: Mon Mar 20 14:45:17 2023 +

tdf#154273: Add the "'" entity definition to our HTML parser...

... so that we can correctly read it and convert it a "'",
but when writing to HTML write out the "'" directly for now.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=80657

Patch by: me

Cherry-picked from

https://github.com/apache/openoffice/commit/3304210c5c53f441cdb2c462fbbf6d8351380b01
"Add the "'" entity definition to our HTML parser, so that we can…"

Change-Id: I10d07af5f49d2432d99a79318d9d95b0bc976637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149150
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx
index 9a84cddd37bf..cdcee168acba 100644
--- a/include/svtools/htmlkywd.hxx
+++ b/include/svtools/htmlkywd.hxx
@@ -150,6 +150,7 @@
 #define OOO_STRING_SVTOOLS_HTML_C_lt "lt"
 #define OOO_STRING_SVTOOLS_HTML_C_gt "gt"
 #define OOO_STRING_SVTOOLS_HTML_C_amp "amp"
+#define OOO_STRING_SVTOOLS_HTML_C_apos "apos"
 #define OOO_STRING_SVTOOLS_HTML_C_quot "quot"
 #define OOO_STRING_SVTOOLS_HTML_C_Aacute "Aacute"
 #define OOO_STRING_SVTOOLS_HTML_C_Agrave "Agrave"
diff --git a/svtools/source/svhtml/htmlkywd.cxx 
b/svtools/source/svhtml/htmlkywd.cxx
index 584322fac8bc..5f81b3e3ca30 100644
--- a/svtools/source/svhtml/htmlkywd.cxx
+++ b/svtools/source/svhtml/htmlkywd.cxx
@@ -203,6 +203,7 @@ static HTML_CharEntry aHTMLCharNameTab[] = {
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_lt), 60},
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_gt), 62},
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_amp),38},
+{std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_apos),39},
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_quot),   34},
 
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_Agrave),192},


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

2023-03-20 Thread Stephan Bergmann (via logerrit)
 chart2/source/inc/Diagram.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28fba1a4002cefb6d77f0b682f1d632e18c0967d
Author: Stephan Bergmann 
AuthorDate: Mon Mar 20 11:50:37 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 20 14:53:38 2023 +

Don't let workaround for old GCC affect Clang

(which defines __GNUC__ as 4)

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

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index ee003e1af778..5e4bc2ed1c62 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -68,7 +68,7 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS Diagram
-#if !defined __GNUC__ || __GNUC__ >= 12
+#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
 final
 #endif
 : public impl::Diagram_Base


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

2023-03-20 Thread Stephan Bergmann (via logerrit)
 include/vcl/threadex.hxx  |1 +
 package/inc/ZipOutputEntry.hxx|1 +
 package/inc/ZipOutputStream.hxx   |1 +
 package/source/zipapi/XBufferedThreadedStream.hxx |1 +
 vcl/inc/unx/gtk/gtkdata.hxx   |1 +
 5 files changed, 5 insertions(+)

New commits:
commit 7cce1141c6d0fd3023a827021f818f1e96cf26f0
Author: Stephan Bergmann 
AuthorDate: Mon Mar 20 14:49:30 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 20 15:21:08 2023 +

Missing includes (for std::exception_ptr)

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

diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx
index 06d3bffa0a51..918b072ae2be 100644
--- a/include/vcl/threadex.hxx
+++ b/include/vcl/threadex.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index fcf25dcadf81..94eb988d8b23 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -31,6 +31,7 @@
 #include 
 #include "CRC32.hxx"
 #include 
+#include 
 
 struct ZipEntry;
 class ZipPackageBuffer;
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index b31af9d3d5c4..d92f140f70f2 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 struct ZipEntry;
diff --git a/package/source/zipapi/XBufferedThreadedStream.hxx 
b/package/source/zipapi/XBufferedThreadedStream.hxx
index ad5d3b0ce116..beb1cd33c700 100644
--- a/package/source/zipapi/XBufferedThreadedStream.hxx
+++ b/package/source/zipapi/XBufferedThreadedStream.hxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 typedef css::uno::Sequence< sal_Int8 > Buffer;
 
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 3a1a9094d3ec..8aaf5baea5e5 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 


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

2023-03-20 Thread Michael Stahl (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bbe0d0534abe6480c4502ce8fb543a736d3399d8
Author: Michael Stahl 
AuthorDate: Mon Mar 20 11:52:22 2023 +0100
Commit: Michael Stahl 
CommitDate: Mon Mar 20 15:28:19 2023 +

curl: upgrade to release 8.0.0

Fixes CVE-2023-27535.

Also hopefully fixes excessive storage consumption during build:
o build: drop the use of XC_AMEND_DISTCLEAN [62]

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

diff --git a/download.lst b/download.lst
index a73e7be7dc30..08dfd4c0078c 100644
--- a/download.lst
+++ b/download.lst
@@ -75,8 +75,8 @@ CPPUNIT_TARBALL := cppunit-1.15.1.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-CURL_SHA256SUM := 
1dae31b2a7c1fe269de99c0c31bb488346aab3459b5ffca909d6938249ae415f
-CURL_TARBALL := curl-7.88.1.tar.xz
+CURL_SHA256SUM := 
759690f9a375a720f8bcce9f953897b0d93f31eed9649b74f846d54bbf63bbcc
+CURL_TARBALL := curl-8.0.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-03-20 Thread Andras Timar (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59520471e94f964933bd931e2d1a71e50f7852e8
Author: Andras Timar 
AuthorDate: Mon Mar 20 16:39:29 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Mar 20 16:39:50 2023 +0100

[cp] Collabora Office 23.05 release notes URL

Change-Id: I388641b66a8f2826ba21d4e2ec3adecf3cb3948b

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index a208de007aa7..0feada2809b9 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -358,7 +358,7 @@
   https://hub.libreoffice.org/donation/
 
 
-  
https://www.collaboraoffice.com/collabora-office-22.05-release-notes/
+  
https://www.collaboraoffice.com/collabora-office-23.05-release-notes/
 
 
   https://hub.libreoffice.org/credits/


[Libreoffice-commits] core.git: officecfg/registry svx/uiconfig sw/Library_sw.mk sw/source sw/uiconfig sw/UIConfig_swriter.mk

2023-03-20 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   52 
 svx/uiconfig/ui/accessibilitycheckentry.ui   |2 
 sw/Library_sw.mk |1 
 sw/UIConfig_swriter.mk   |1 
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx|  129 +++
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx|   74 ++
 sw/source/uibase/sidebar/SwPanelFactory.cxx  |7 
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui   |   49 
 8 files changed, 314 insertions(+), 1 deletion(-)

New commits:
commit 403ea882af35337431e0f67aa973c5f046deb630
Author: Samuel Mehrbrodt 
AuthorDate: Mon Mar 13 21:42:47 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Mar 20 15:41:17 2023 +

tdf#142978 Add a11y check sidebar

Change-Id: I6d9d6dca0118567f68db11b7c0cce60643211ab2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149000
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 0747b7eee792..83f4aa33091b 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -81,6 +81,26 @@
 
   
 
+  
+
+  Accessibility Check
+
+
+  A11yCheckDeck
+
+
+  private:graphicrepository/cmd/lc_adddirect.png
+
+
+  
+WriterVariants, any, visible ;
+  
+
+
+  900
+
+  
+
   
 
   Shapes
@@ -577,6 +597,38 @@
 
   
 
+  
+
+  Accessibility Issues
+
+
+  true
+
+
+  A11yCheckIssuesPanel
+
+
+  A11yCheckDeck
+
+
+  
+
+
+  
+WriterVariants, any, visible ;
+  
+
+
+  
private:resource/toolpanel/SwPanelFactory/A11yCheckIssuesPanel
+
+
+  100
+
+
+  false
+
+  
+
   
 
   Area
diff --git a/svx/uiconfig/ui/accessibilitycheckentry.ui 
b/svx/uiconfig/ui/accessibilitycheckentry.ui
index 3d60179f16b5..e084bb367473 100644
--- a/svx/uiconfig/ui/accessibilitycheckentry.ui
+++ b/svx/uiconfig/ui/accessibilitycheckentry.ui
@@ -29,7 +29,7 @@
 
 
   
-Go to 
Issue
+Go 
to
 True
 True
 True
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 05dd36258649..8a79be4f9e41 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -734,6 +734,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/uibase/sidebar/ThemePanel \
 sw/source/uibase/sidebar/SwPanelFactory \
 sw/source/uibase/sidebar/WriterInspectorTextPanel \
+sw/source/uibase/sidebar/A11yCheckIssuesPanel \
 sw/source/uibase/table/chartins \
 sw/source/uibase/table/swtablerep \
 sw/source/uibase/table/tablemgr \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 867baf40ba88..7011ed16bdc2 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -285,6 +285,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/pagestylespanel \
sw/uiconfig/swriter/ui/pageheaderpanel \
sw/uiconfig/swriter/ui/pagefooterpanel \
+   sw/uiconfig/swriter/ui/a11ycheckissuespanel \
sw/uiconfig/swriter/ui/poseditbox \
sw/uiconfig/swriter/ui/sidebarwrap \
sw/uiconfig/swriter/ui/sidebarstylepresets \
diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
new file mode 100644
index ..f9d625f8427b
--- /dev/null
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include "A11yCheckIssuesPanel.hxx"
+
+#include 
+
+namespace sw::sidebar
+{
+AccessibilityCheckEntry::AccessibilityCheckEntry(
+weld::Container* pParent, std::shared_ptr const& 
rAccessibilityIssue)
+: m_xBuilder(Application::CreateBuilder(pParent, 
"svx/ui/accessibilitycheckentry.ui"))
+, m_xContainer(m_xBuilder->weld_container("accessibilityCheckEntryBox"))
+, m_xLabel(m_xBuilder->weld_label("accessibilityCheckEntryLabel"))
+, 
m_xGotoButton

[Libreoffice-commits] core.git: cui/uiconfig oox/qa svx/uiconfig sw/source

2023-03-20 Thread Regina Henschel (via logerrit)
 cui/uiconfig/ui/gradientpage.ui|4 ++--
 cui/uiconfig/ui/transparencytabpage.ui |4 ++--
 oox/qa/unit/export.cxx |8 
 svx/uiconfig/ui/sidebararea.ui |4 ++--
 sw/source/uibase/shells/drawdlg.cxx|2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 790dc4d759c3a2f7f7fc513d358cc0e116e6f17a
Author: Regina Henschel 
AuthorDate: Thu Mar 16 18:50:41 2023 +0100
Commit: Regina Henschel 
CommitDate: Mon Mar 20 17:14:33 2023 +

tdf#154071 UI rename gradient back to 'Rectangular'...

Commit e97e62a4707e09739f9c00f8fc4a943f0123a9cf had wrongly changed
'Rectangular' to 'Square' (API RECT, ODF rectangle) and 'Square' to
'Quadratic' (API SQUARE, ODF square).
This patch reverts 'Square' to 'Rectangular' and 'Quadratic' to
'Square (Quadratic)'. It uses 'Square (Quadratic)' instead of simple
'Square' to help users to find the correct type.
In addition, use of the wrong type names in comments is fixed.

Change-Id: Ibbd90be2cceb65c9857e473cb74c39df1b9530f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149004
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index 6cb56fcc54a6..76bfa8d7c161 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -220,8 +220,8 @@
   Axial
   Radial
   Ellipsoid
-  Quadratic
-  Square
+  Square (Quadratic)
+  Rectangular
 
 
   
diff --git a/cui/uiconfig/ui/transparencytabpage.ui 
b/cui/uiconfig/ui/transparencytabpage.ui
index 222acc29a2ba..0ae0707395ea 100644
--- a/cui/uiconfig/ui/transparencytabpage.ui
+++ b/cui/uiconfig/ui/transparencytabpage.ui
@@ -289,8 +289,8 @@
   Axial
   Radial
   Ellipsoid
-  Quadratic
-  Square
+  Square (Quadratic)
+  Rectangular
 
 
   
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 36859548f5f6..56df90eceee1 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -1201,8 +1201,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient)
 
 CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
 {
-// The document has a Fontwork shape with UI settings: gradient fill Type 
"Quadratic" (which is
-// "square" in ODF and API), From Color #4963ef 40%, To Color #6e 90%, 
Center x|y 100%|50%,
+// The document has a Fontwork shape with UI settings: gradient fill Type 
"Square (Quadratic)",
+// From Color #4963ef 40%, To Color #6e 90%, Center x|y 100%|50%,
 // no transparency
 // Without fix the gradient was not exported at all.
 loadFromURL(u"tdf51195_Fontwork_squareGradient.odt");
@@ -1245,8 +1245,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
 CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient)
 {
 // The document has a Fontwork shape with UI settings: solid color theme 
Accent 4 60% lighter,
-// transparency gradient Type "Square" (which is "rectangle" in ODF and 
API, tdf#154071),
-// Center x|y 50%|50%, Transition start 10%, Start value 70%, End value 5%.
+// transparency gradient Type "Rectangular", Center x|y 50%|50%, 
Transition start 10%,
+// Start value 70%, End value 5%.
 // Without fix the gradient was not exported at all.
 loadFromURL(u"tdf51195_Fontwork_rectGradient.odt");
 
diff --git a/svx/uiconfig/ui/sidebararea.ui b/svx/uiconfig/ui/sidebararea.ui
index 0fd22958cb78..888d092c7714 100644
--- a/svx/uiconfig/ui/sidebararea.ui
+++ b/svx/uiconfig/ui/sidebararea.ui
@@ -136,8 +136,8 @@
   Axial
   Radial
   Ellipsoid
-  Quadratic
-  Square
+  Square (Quadratic)
+  Rectangular
 
 
   
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index 8f7dfd9c73ea..6117cf0dc32a 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -297,7 +297,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq)
 
 static void lcl_unifyFillTransparencyItems(const SfxItemSet& rSet)
 {
-// Transparent fill options are None, Solid, Linear, Axial, Radial, 
Elliptical, Quadratic, Square.
+// Transparent fill options are None, Solid, Linear, Axial, Radial, 
Elliptical, Square, Rectangular.
 // But this is represented across two items namely XFillTransparenceItem 
(for None and Solid)
 // and XFillFloatTransparenceItem (for the rest). To simplify the 
representation in LO

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

2023-03-20 Thread Michael Stahl (via logerrit)
 include/vcl/pdfextoutdevdata.hxx|2 +-
 include/vcl/pdfwriter.hxx   |2 +-
 sd/source/ui/unoidl/unomodel.cxx|   12 +++-
 sw/source/core/text/EnhancedPDFExportHelper.cxx |   12 +++-
 vcl/inc/pdf/pdfwriter_impl.hxx  |7 +--
 vcl/source/gdi/pdfextoutdevdata.cxx |6 --
 vcl/source/gdi/pdfwriter.cxx|4 ++--
 vcl/source/gdi/pdfwriter_impl.cxx   |   10 --
 8 files changed, 43 insertions(+), 12 deletions(-)

New commits:
commit e7d5e346677efeb7d7d14537a9151ea7a1a32809
Author: Michael Stahl 
AuthorDate: Wed Mar 15 12:39:55 2023 +0100
Commit: Michael Stahl 
CommitDate: Mon Mar 20 17:14:49 2023 +

vcl,sd,sw: PDF/UA export: add Alt text to SdrMediaObj media shapes

  7.18.6.2 Media clip data
  In the media clip data dictionary, the optional CT and Alt keys
  (ISO 32000-1:2008, 13.2.4.2, Table 274) are required.

Change-Id: I147f1677f1bd0788c2269735688d329db15c0ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149007
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 89696ef757b6..81ea37b86d9b 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -266,7 +266,7 @@ public:
 sal_Int32 CreateLink(const tools::Rectangle& rRect, OUString const& 
rAltText, sal_Int32 nPageNr = -1);
 
 /// Create a Screen annotation.
-sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr);
+sal_Int32 CreateScreen(const tools::Rectangle& rRect, OUString const& 
rAltText, sal_Int32 nPageNr);
 
 /** Set the destination for a link
 will change a URL type link to a dest link if necessary
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index f415fa59699f..1319909961a9 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -928,7 +928,7 @@ The following structure describes the permissions used in 
PDF security
 sal_Int32 CreateLink(const tools::Rectangle& rRect, sal_Int32 nPageNr, 
OUString const& rAltText);
 
 /// Creates a screen annotation.
-sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr);
+sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr, 
OUString const& rAltText);
 
 /** creates a destination which is not intended to be referred to by a 
link, but by a public destination Id.
 
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index a955e02e3da6..61189ca9deaa 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1644,11 +1644,21 @@ static void ImplPDFExportShapeInteraction( const 
uno::Reference< drawing::XShape
 // Handle linked videos.
 if (xShape->getShapeType() == "com.sun.star.drawing.MediaShape" || 
xShape->getShapeType() == "com.sun.star.presentation.MediaShape")
 {
+OUString title;
+xShapePropSet->getPropertyValue("Title") >>= title;
+OUString description;
+xShapePropSet->getPropertyValue("Description") >>= description;
+OUString const altText(title.isEmpty()
+? description
+: description.isEmpty()
+? title
+: OUString::Concat(title) + OUString::Concat("\n") + 
OUString::Concat(description));
+
 OUString aMediaURL;
 xShapePropSet->getPropertyValue("MediaURL") >>= aMediaURL;
 if (!aMediaURL.isEmpty())
 {
-sal_Int32 nScreenId = 
rPDFExtOutDevData.CreateScreen(aLinkRect, 
rPDFExtOutDevData.GetCurrentPageNumber());
+sal_Int32 nScreenId = 
rPDFExtOutDevData.CreateScreen(aLinkRect, altText, 
rPDFExtOutDevData.GetCurrentPageNumber());
 if (aMediaURL.startsWith("vnd.sun.star.Package:"))
 {
 OUString aTempFileURL;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 4db59dcd1be5..7c518f8b4594 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -2022,6 +2022,16 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
 if (xShape->getShapeType() == 
"com.sun.star.drawing.MediaShape")
 {
 uno::Reference 
xShapePropSet(xShape, uno::UNO_QUERY);
+OUString title;
+xShapePropSet->getPropertyValue("Title") >>= title;
+OUString description;
+xShapePropSet->getPropertyValue("Description") >>= 
description;
+OUString const altText(title

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

2023-03-20 Thread Damjan Jovanovic (via logerrit)
 include/svtools/htmlkywd.hxx   |1 +
 svtools/source/svhtml/htmlkywd.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 1b9042f763a439c5aa0f1088ac86cfc203ccc3b2
Author: Damjan Jovanovic 
AuthorDate: Tue Jan 3 08:41:13 2023 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Mar 20 17:39:41 2023 +

tdf#154273: Add the "'" entity definition to our HTML parser...

... so that we can correctly read it and convert it a "'",
but when writing to HTML write out the "'" directly for now.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=80657

Patch by: me

Cherry-picked from

https://github.com/apache/openoffice/commit/3304210c5c53f441cdb2c462fbbf6d8351380b01
"Add the "'" entity definition to our HTML parser, so that we can…"

Change-Id: I10d07af5f49d2432d99a79318d9d95b0bc976637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149150
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 
(cherry picked from commit 28341f0b107b7bcd1377cec68c90eee9c4f27e1c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149104
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx
index 9a84cddd37bf..cdcee168acba 100644
--- a/include/svtools/htmlkywd.hxx
+++ b/include/svtools/htmlkywd.hxx
@@ -150,6 +150,7 @@
 #define OOO_STRING_SVTOOLS_HTML_C_lt "lt"
 #define OOO_STRING_SVTOOLS_HTML_C_gt "gt"
 #define OOO_STRING_SVTOOLS_HTML_C_amp "amp"
+#define OOO_STRING_SVTOOLS_HTML_C_apos "apos"
 #define OOO_STRING_SVTOOLS_HTML_C_quot "quot"
 #define OOO_STRING_SVTOOLS_HTML_C_Aacute "Aacute"
 #define OOO_STRING_SVTOOLS_HTML_C_Agrave "Agrave"
diff --git a/svtools/source/svhtml/htmlkywd.cxx 
b/svtools/source/svhtml/htmlkywd.cxx
index 584322fac8bc..5f81b3e3ca30 100644
--- a/svtools/source/svhtml/htmlkywd.cxx
+++ b/svtools/source/svhtml/htmlkywd.cxx
@@ -203,6 +203,7 @@ static HTML_CharEntry aHTMLCharNameTab[] = {
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_lt), 60},
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_gt), 62},
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_amp),38},
+{std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_apos),39},
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_quot),   34},
 
 {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_Agrave),192},


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

2023-03-20 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx  |2 
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx|2 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx|   18 
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx|6 
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx  |4 
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |2 
 chart2/source/controller/main/ChartController_Properties.cxx   |2 
 chart2/source/controller/main/ControllerCommandDispatch.cxx|6 
 chart2/source/controller/main/ObjectHierarchy.cxx  |6 
 chart2/source/controller/main/SelectionHelper.cxx  |2 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx|4 
 chart2/source/inc/Diagram.hxx  |   27 +
 chart2/source/inc/DiagramHelper.hxx|   33 -
 chart2/source/model/main/Diagram.cxx   |  171 
+
 chart2/source/tools/AxisHelper.cxx |2 
 chart2/source/tools/DiagramHelper.cxx  |  182 
--
 chart2/source/view/main/ChartView.cxx  |7 
 chart2/source/view/main/SeriesPlotterContainer.cxx |2 
 18 files changed, 237 insertions(+), 241 deletions(-)

New commits:
commit 770dd89094a8e60e4d8d9f927fde742e9349fa5d
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:27:44 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 20 17:54:47 2023 +

move getStackMode/setStackmode inside chart2::Diagram

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

diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index c624f9074687..b54e029d54db 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -672,7 +672,7 @@ void ChartDataWrapper::applyData( lcl_Operator& 
rDataOperator )
 eStackMode = StackMode::ZStacked;
 else if( bPercent )
 eStackMode = StackMode::YStackedPercent;
-DiagramHelper::setStackMode( xDia, eStackMode );
+xDia->setStackMode( eStackMode );
 }
 
 // notify listeners
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 29127127da6f..657751ed3c23 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1229,8 +1229,8 @@ bool WrappedStackingProperty::detectInnerValue( 
StackMode& eStackMode ) const
 {
 bool bHasDetectableInnerValue = false;
 bool bIsAmbiguous = false;
-eStackMode = DiagramHelper::getStackMode( 
m_spChart2ModelContact->getDiagram()
-, bHasDetectableInnerValue, bIsAmbiguous );
+rtl::Reference xDiagram = m_spChart2ModelContact->getDiagram();
+eStackMode = xDiagram ? xDiagram->getStackMode( bHasDetectableInnerValue, 
bIsAmbiguous ) : StackMode::NONE;
 return bHasDetectableInnerValue;
 }
 
@@ -1258,7 +1258,7 @@ void WrappedStackingProperty::setPropertyValue( const 
Any& rOuterValue, const Re
 if( xDiagram.is() )
 {
 StackMode eNewStackMode = bNewValue ? m_eStackMode : StackMode::NONE;
-DiagramHelper::setStackMode( xDiagram, eNewStackMode );
+xDiagram->setStackMode( eNewStackMode );
 }
 }
 
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index e6f31bf5db46..9ff0f94bb020 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -45,6 +45,7 @@ class ChartType;
 class DataSeries;
 class Legend;
 class DataTable;
+enum class StackMode;
 class Wall;
 
 enum class DiagramPositioningMode
@@ -288,6 +289,17 @@ public:
  */
 void setDimension( sal_Int32 nNewDimensionCount );
 
+
+StackMode getStackMode(bool& rbFound, bool& rbAmbiguous);
+
+/** The stacking mode is only set at the series found inside
+the first chart type.  This is the standard for all current
+templates (the only template that has more than one chart-type and
+allows stacking is bar/line combi, and for this the stacking only
+applies to the first chart type/the bars)
+ */
+void setStackMode(StackMode eStackMode);
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index efb696ffaf01..35f1de7e9eaf 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/Di

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

2023-03-20 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx |   20 +---
 cui/source/options/optgdlg.hxx |1 -
 cui/uiconfig/ui/optviewpage.ui |   41 ++---
 3 files changed, 3 insertions(+), 59 deletions(-)

New commits:
commit cc18f6cfed5281e1a47636d9d9df02613a51ff60
Author: Caolán McNamara 
AuthorDate: Mon Mar 20 09:58:56 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 19:43:32 2023 +

tdf#147469 remove mouse "Positioning" from options page

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 8a30f35535a9..b0bca101bdaa 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -537,7 +537,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
 , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
 , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
-, m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos"))
 , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
 , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
 , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest"))
@@ -731,18 +730,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 bool bAppearanceChanged = false;
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
-// Mouse Snap Mode
-SnapType eOldSnap = 
static_cast(officecfg::Office::Common::View::Dialog::MousePositioning::get());
-SnapType eNewSnap = static_cast(m_xMousePosLB->get_active());
-if(eNewSnap > SnapType::NONE)
-eNewSnap = SnapType::NONE;
-
-if ( eNewSnap != eOldSnap )
-{
-
officecfg::Office::Common::View::Dialog::MousePositioning::set(static_cast(eNewSnap),
 batch);
-bAppearanceChanged = true;
-}
-
 // Middle Mouse Button
 MouseMiddleButtonAction eOldMiddleMouse = 
static_cast(officecfg::Office::Common::View::Dialog::MiddleMouseButton::get());
 short eNewMiddleMouse = m_xMouseMiddleLB->get_active();
@@ -914,12 +901,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 
m_xAppearanceStyleLB->set_active(officecfg::Office::Common::Misc::Appearance::get());
 m_xAppearanceStyleLB->save_value();
 
-// Mouse Snap
-sal_Int16 nMouseSnap = 
officecfg::Office::Common::View::Dialog::MousePositioning::get();
-m_xMousePosLB->set_active(static_cast(nMouseSnap));
-m_xMousePosLB->save_value();
-
-// Mouse Snap
+// Middle Mouse Button
 sal_Int16 nMiddleMouseButton = 
officecfg::Office::Common::View::Dialog::MiddleMouseButton::get();
 m_xMouseMiddleLB->set_active(static_cast(nMiddleMouseButton));
 m_xMouseMiddleLB->save_value();
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 620c6ed8659c..9b22c0b9bb9d 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -105,7 +105,6 @@ private:
 std::unique_ptr m_xSkiaStatusEnabled;
 std::unique_ptr m_xSkiaStatusDisabled;
 
-std::unique_ptr m_xMousePosLB;
 std::unique_ptr m_xMouseMiddleLB;
 std::unique_ptr m_xMoreIcons;
 std::unique_ptr m_xRunGPTests;
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index 93160caa6ad5..3865fe17b0c1 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -37,7 +37,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -46,20 +46,6 @@
 True
 3
 6
-
-  
-True
-False
-_Positioning:
-True
-mousepos
-0
-  
-  
-0
-0
-  
-
 
   
 True
@@ -71,27 +57,6 @@
   
   
 0
-1
-  
-
-
-  
-True
-False
-True
-
-  Default button
-  Dialog center
-  No automatic positioning
-
-
-  
-Specifies if and how the 
mouse pointer will be positioned in newly opened dialogs.
-  
-
-  
-  
-1
 0
   
 
@@ -1

FYI: Compatibility of Gradients

2023-03-20 Thread Regina Henschel

Hi all,

I've been working on importing and exporting gradients for Fontwork 
shapes lately. In the process, I realized how incompatible gradients are 
in Microsoft Office and LibreOffice.


To get an overview, I wrote down a comparison. Since this might be of 
interest to you as well, I put it in the wiki. 
https://wiki.documentfoundation.org/User:Regina/Compatibility_of_Gradients


Kind regards,
Regina


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

2023-03-20 Thread Ilmari Lauhakangas (via logerrit)
 source/text/shared/optionen/01010800.xhp |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 7222dc792d578f9640d5d8760041569b29e7f0c1
Author: Ilmari Lauhakangas 
AuthorDate: Mon Mar 20 21:50:23 2023 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Mon Mar 20 19:53:34 2023 +

tdf#147469 remove mouse "Positioning" from View options help

Change-Id: I5593ae03960d11aba09d35887fa33692bd278846
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/149182
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/source/text/shared/optionen/01010800.xhp 
b/source/text/shared/optionen/01010800.xhp
index 339657ee90..bd0349c261 100644
--- a/source/text/shared/optionen/01010800.xhp
+++ b/source/text/shared/optionen/01010800.xhp
@@ -37,7 +37,6 @@
   previews; fonts lists
   font lists
   font name box
-  mouse; positioning
   mouse; middle button
   clipboard; selection clipboard
   selection clipboard
@@ -87,10 +86,6 @@
 
 Mouse
 
-Positioning
-Specifies if and how the mouse pointer will 
be positioned in newly opened dialogs.
-
-
 Middle button
 Defines the function of the middle mouse 
button.
 


[Libreoffice-commits] core.git: helpcontent2

2023-03-20 Thread Ilmari Lauhakangas (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 468fbbc0f5676ec5a630041f835940f673888d83
Author: Ilmari Lauhakangas 
AuthorDate: Mon Mar 20 21:53:35 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Mar 20 19:53:35 2023 +

Update git submodules

* Update helpcontent2 from branch 'master'
  to 7222dc792d578f9640d5d8760041569b29e7f0c1
  - tdf#147469 remove mouse "Positioning" from View options help

Change-Id: I5593ae03960d11aba09d35887fa33692bd278846
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/149182
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/helpcontent2 b/helpcontent2
index 5ba7b847709a..7222dc792d57 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5ba7b847709a22714cb276d0bc9d12b7ea204d50
+Subproject commit 7222dc792d578f9640d5d8760041569b29e7f0c1


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

2023-03-20 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/htmlimport/data/tdf154273.html |9 +
 sw/qa/extras/htmlimport/htmlimport.cxx  |   10 ++
 2 files changed, 19 insertions(+)

New commits:
commit 92b732ce29f734d91fb6c9350b9a8b6df7f9293e
Author: Xisco Fauli 
AuthorDate: Mon Mar 20 16:20:54 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Mar 20 20:16:51 2023 +

tdf#154273: sw_htmlimport: Add unittest

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

diff --git a/sw/qa/extras/htmlimport/data/tdf154273.html 
b/sw/qa/extras/htmlimport/data/tdf154273.html
new file mode 100644
index ..6a8b8dc6380b
--- /dev/null
+++ b/sw/qa/extras/htmlimport/data/tdf154273.html
@@ -0,0 +1,9 @@
+http://www.w3.org/TR/html4/strict.dtd";>
+
+   
+   
+   
+   
+   'test'
+   
+
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index fe062f5c83fd..41efcee327f3 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -520,6 +520,16 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testUTF16_nonBMP)
  getParagraph(1)->getString());
 }
 
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf154273)
+{
+createSwWebDoc("tdf154273.html");
+
+// Without the fix in place, this test would have failed with
+// - Expected: 'test'
+// - Actual  : 'test'
+CPPUNIT_ASSERT_EQUAL(OUString("'test' "), getParagraph(1)->getString());
+}
+
 CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testOleData)
 {
 // Given an XHTML with an  (containing non-image, non-OLE2 data) 
and an inner 


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

2023-03-20 Thread Michael Weghorn (via logerrit)
 sw/inc/crsrsh.hxx|2 ++
 sw/source/core/access/accdoc.cxx |5 +
 sw/source/core/crsr/crsrsh.cxx   |   14 ++
 3 files changed, 21 insertions(+)

New commits:
commit 4a93739e619fd4f4ec369932e923554d71297900
Author: Michael Weghorn 
AuthorDate: Fri Mar 17 12:37:15 2023 +0100
Commit: Michael Weghorn 
CommitDate: Mon Mar 20 21:21:30 2023 +

tdf#136760 sw a11y: Provide page-relative cursor pos via doc attr

This introduce 2 new extended accessible attributes
"cursor-position-in-page-horizontal" and
"cursor-position-in-page-vertical" to expose
the page-relative position of the cursor in Writer
to assistive technology.

This is similar to how the current page
number is already exposed (attribute "page-number").

Together with a corresponding pull request for the NVDA
screen reader [1], this allows NVDA to announce the position
similar to how it is done for Microsoft Word (where the information
is not retrieved via the accessibility APIs but the
MS Office COM API, s. discussion
in the corresponding NVDA issue [2] for more details).

(Side note: Currently there is no a11y object for a Writer
page in the a11y tree, but "normal" paragraphs are direct
children of the document object.)

For performance reasons, introduce a new method
`SwCursorShell::GetCursorPagePos` to get the position
instead of passing the result from
`SwCursorShell::GetCursorDocPos` to
`SwFEShell::GetRelativePagePosition` to avoid
iterating over the doc pages.

[1] https://github.com/nvaccess/nvda/pull/14727
[2] https://github.com/nvaccess/nvda/issues/11696

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

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 8eac979b5617..ddb7b301beef 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -598,6 +598,8 @@ public:
 bool IsCursorInFootnote() const;
 
 inline Point& GetCursorDocPos() const;
+// get cursor position relative to the page it is in
+Point GetCursorPagePos() const;
 inline bool IsCursorPtAtEnd() const;
 
 inline const  SwPaM* GetTableCrs() const;
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 618425a68f9d..298b4270e5d8 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -533,6 +533,11 @@ uno::Any SAL_CALL 
SwAccessibleDocument::getExtendedAttributes()
 ";total-pages:" +
 OUString::number( pCursorShell->GetPageCnt() ) + ";";
 
+// cursor position relative to the page
+Point aCursorPagePos = pFEShell->GetCursorPagePos();
+sValue += "cursor-position-in-page-horizontal:" + 
OUString::number(aCursorPagePos.getX())
++ ";cursor-position-in-page-vertical:" + 
OUString::number(aCursorPagePos.getY()) + ";";
+
 SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
 SwPageFrame* 
pCurrPage=static_cast(pCurrFrame)->FindPageFrame();
 sal_uLong nLineNum = 0;
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 298801ace223..9d94c133f028 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1168,6 +1168,20 @@ bool SwCursorShell::IsCursorInFootnote() const
 return aStartNodeType == SwStartNodeType::SwFootnoteStartNode;
 }
 
+Point SwCursorShell::GetCursorPagePos() const
+{
+Point aRet(-1, -1);
+if (SwFrame *pFrame = GetCurrFrame())
+{
+if (SwPageFrame* pCurrentPage = pFrame->FindPageFrame())
+{
+const Point& rDocPos = GetCursorDocPos();
+aRet = rDocPos - pCurrentPage->getFrameArea().TopLeft();
+}
+}
+return aRet;
+}
+
 bool SwCursorShell::IsInFrontOfLabel() const
 {
 return m_pCurrentCursor->IsInFrontOfLabel();


Martin Estrin Google Summer of Code

2023-03-20 Thread Marty Estrin
Hello,

My name is Martin Estrin, and I am a sophomore at the University of
Southern California studying Computer Science. I am a candidate contributor
for Google Summer of Code. I wanted to briefly introduce myself.

Best regards,
Martin


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

2023-03-20 Thread Bjoern Michaelsen (via logerrit)
 sw/source/core/doc/DocumentFieldsManager.cxx |  308 ---
 1 file changed, 139 insertions(+), 169 deletions(-)

New commits:
commit 64d1a735b2b371495bfd56faf7070fb3274533ad
Author: Bjoern Michaelsen 
AuthorDate: Sat Mar 4 18:44:28 2023 +0100
Commit: Bjoern Michaelsen 
CommitDate: Mon Mar 20 21:35:46 2023 +

DocumentFieldsManager::UpdateFields refactoring

- flatten preconditions
- flatten conditionals

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

diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index 6c983e891544..3503ba053e68 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -600,51 +600,28 @@ void DocumentFieldsManager::UpdateTableFields( 
SfxPoolItem* pHt )
 {
 OSL_ENSURE( !pHt || RES_TABLEFML_UPDATE  == pHt->Which(),
 "What MessageItem is this?" );
-
 SwTableFormulaUpdate* pUpdateField = nullptr;
-if( pHt && RES_TABLEFML_UPDATE == pHt->Which() )
+if(pHt && RES_TABLEFML_UPDATE == pHt->Which())
 pUpdateField = static_cast(pHt);
 assert(!pUpdateField || pUpdateField->m_eFlags != TBL_BOXPTR); // use 
SwTable::SwitchFormulasToInternalRepresentation
 auto pFieldType = GetFieldType( SwFieldIds::Table, OUString(), false );
-if(pFieldType)
+if(pFieldType && (!pUpdateField || pUpdateField->m_eFlags == TBL_CALC))
 {
 std::vector vFields;
 pFieldType->GatherFields(vFields);
 for(auto pFormatField : vFields)
 {
+if(!pFormatField->GetTextField()->GetTextNode().FindTableNode())
+continue;
 SwTableField* pField = 
static_cast(pFormatField->GetField());
-if( pUpdateField )
-{
-// table where this field is located
-const SwTableNode* pTableNd;
-const SwTextNode& rTextNd = 
pFormatField->GetTextField()->GetTextNode();
-pTableNd = rTextNd.FindTableNode();
-if (pTableNd == nullptr)
-continue;
-
-switch( pUpdateField->m_eFlags )
-{
-case TBL_CALC:
-// re-set the value flag
-// JP 17.06.96: internal representation of all formulas
-//  (reference to other table!!!)
-if( nsSwExtendedSubType::SUB_CMD & pField->GetSubType() )
-pField->PtrToBoxNm( pUpdateField->m_pTable );
-else
-pField->ChgValid( false );
-break;
-case TBL_BOXPTR:
-case TBL_BOXNAME:
-case TBL_RELBOXNAME:
-assert(false); // use SwTable::SwitchTo...
-break;
-default:
-break;
-}
-}
+// re-set the value flag
+// JP 17.06.96: internal representation of all formulas
+//  (reference to other table!!!)
+if(pUpdateField && nsSwExtendedSubType::SUB_CMD & 
pField->GetSubType())
+pField->PtrToBoxNm(pUpdateField->m_pTable);
 else
 // reset the value flag for all
-pField->ChgValid( false );
+pField->ChgValid(false);
 }
 }
 // process all table box formulas
@@ -663,9 +640,8 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* 
pHt )
 }
 
 // all fields/boxes are now invalid, so we can start to calculate
-if( pHt && ( RES_TABLEFML_UPDATE != pHt->Which() ||
-TBL_CALC != static_cast(pHt)->m_eFlags 
))
-return ;
+if(pHt && ( RES_TABLEFML_UPDATE != pHt->Which() || TBL_CALC != 
static_cast(pHt)->m_eFlags))
+return;
 
 std::optional oCalc;
 
@@ -675,80 +651,79 @@ void DocumentFieldsManager::UpdateTableFields( 
SfxPoolItem* pHt )
 pFieldType->GatherFields(vFields);
 for(SwFormatField* pFormatField: vFields)
 {
-// start calculation at the end
-// new fields are inserted at the beginning of the modify chain
-// that gives faster calculation on import
-// mba: do we really need this "optimization"? Is it still 
valid?
-SwTableField *const 
pField(static_cast(pFormatField->GetField()));
-if (nsSwExtendedSubType::SUB_CMD & pField->GetSubType())
+// start calculation at the end
+// new fields are inserted at the beginning of the modify chain
+// that gives faster calculation on import
+// mba: do we really need this "optimization"? Is it still valid?
+SwTableField *const 
pField(

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - translations

2023-03-20 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24b53c1ec7cb2ef255ca8527957993bc7a34d462
Author: Christian Lohmaier 
AuthorDate: Mon Mar 20 23:09:17 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Mar 20 22:09:17 2023 +

Update git submodules

* Update translations from branch 'distro/collabora/co-23.05'
  to 03fbb6a606dff8622b1f97537ed0b556ca3def59
  - update translations for 7.5.2 rc1

and force-fix errors using pocheck

Change-Id: Ic55b1e33decad739171dd3b154553bbfdc325599

  - update translations for 7.5.1 rc2

and force-fix errors using pocheck

Change-Id: I275b498852041a5f928c0df95c2ad50fc2256013
(cherry picked from commit 70a23c0afa2982325334d4c9975a501e4b9a13ce)

diff --git a/translations b/translations
index d118d383063e..03fbb6a606df 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit d118d383063e1116d8c82fe222047e5237a1160c
+Subproject commit 03fbb6a606dff8622b1f97537ed0b556ca3def59


New Defects reported by Coverity Scan for LibreOffice

2023-03-20 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1524485:  Possible Control flow issues  (DEADCODE)
/cui/source/options/optgdlg.cxx: 822 in OfaViewTabPage::FillItemSet(SfxItemSet 
*)()



*** CID 1524485:  Possible Control flow issues  (DEADCODE)
/cui/source/options/optgdlg.cxx: 822 in OfaViewTabPage::FillItemSet(SfxItemSet 
*)()
816 {
817 // Set changed settings to the application instance
818 AllSettings aAllSettings = Application::GetSettings();
819 
820 if (bMenuOptModified)
821 {
>>> CID 1524485:  Possible Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "aStyleSettings.StyleSetting...".
822 StyleSettings aStyleSettings = 
aAllSettings.GetStyleSettings();
823 aAllSettings.SetStyleSettings(aStyleSettings);
824 }
825 
826 if (bDarkModeOptModified)
827 
MiscSettings::SetDarkMode(m_xAppearanceStyleLB->get_active());



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D5lSA_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiUeV3QvrQo6pySkdYmtB7NUEF-2B-2BA97xV2WJY-2BOemzjwF23xpUfvUcGsTEZ1Koe2jzWEegw10mX-2BeqbZWRr5odOldELgOcxig5seIbReEKsWXcsGsUCK2A3w9WDBeSjzWvZbc2oA6zVfyxUPtGx0F0zJUuTcbyzBY95rZZGghASBY-3D



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

2023-03-20 Thread Rizal Muttaqin (via logerrit)
 extras/source/tipoftheday/toolbarmode.png |binary
 extras/source/tipoftheday/toolbarmode.svg |1 +
 extras/source/toolbarmode/notebookbar_groupedbar_full.png |binary
 extras/source/toolbarmode/notebookbar_groupedbar_full.svg |2 +-
 4 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a542956c8c2f80f4dd660aa0eef3f1dbab340ba3
Author: Rizal Muttaqin 
AuthorDate: Tue Mar 21 06:51:44 2023 +0700
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 21 03:38:29 2023 +

tdf#154242 and tdf#154143 Asset images for UI Chooser and ToTD

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

diff --git a/extras/source/tipoftheday/toolbarmode.png 
b/extras/source/tipoftheday/toolbarmode.png
index 6306e54eb2cc..f092d2cce6d6 100644
Binary files a/extras/source/tipoftheday/toolbarmode.png and 
b/extras/source/tipoftheday/toolbarmode.png differ
diff --git a/extras/source/tipoftheday/toolbarmode.svg 
b/extras/source/tipoftheday/toolbarmode.svg
new file mode 100644
index ..579a9a3348d9
--- /dev/null
+++ b/extras/source/tipoftheday/toolbarmode.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>FileEditViewStylesFileHomeInserNoto SerifCutCopyPaste
\ No newline at end of file
diff --git a/extras/source/toolbarmode/notebookbar_groupedbar_full.png 
b/extras/source/toolbarmode/notebookbar_groupedbar_full.png
index 7846599d1768..549290300339 100644
Binary files a/extras/source/toolbarmode/notebookbar_groupedbar_full.png and 
b/extras/source/toolbarmode/notebookbar_groupedbar_full.png differ
diff --git a/extras/source/toolbarmode/notebookbar_groupedbar_full.svg 
b/extras/source/toolbarmode/notebookbar_groupedbar_full.svg
index 4fababf71074..5fa569538c30 100644
--- a/extras/source/toolbarmode/notebookbar_groupedbar_full.svg
+++ b/extras/source/toolbarmode/notebookbar_groupedbar_full.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>d="m55.69479 17.727083h1.87"/>d="m57.546873 18.785416h.62"/>stroke-width=".264583"/>stroke-width=".01" x="-17.600279" y="-14.011894">font-family="'Liberation Sans', sans-serif" font-size="4.2" 
 >font-weight="400" stroke-width=".0001">font-family="Inter" font-size="4.2" font-weight="normal" stroke-wi
 dth=".0001" x="10.809723" y="27.718109">StylesFileEditStylesUndo
 PasteOpenSaveClone
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>d="m55.69479 17.727083h1.87"/>d="m57.546873 18.785416h.62"/>stroke-width=".264583"/>stroke-width=".01" x="-17.600279" y="-14.011894">font-family="'Liberation Sans', sans-serif" font-size="4.2" 
 >font-weight="400" stroke-width=".0001">font-family="Inter" font-size="4.2" font-weight="normal" stroke-wi
 dth=".0001" x="10.809723" y="27.718109">StylesFileEditStylesUndo
 PasteOpenSaveClone
\ No newline at end of file



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

2023-03-20 Thread Baole Fang (via logerrit)
 sc/qa/unit/data/xml/tdf153514.xml   |   15 
 sc/qa/unit/subsequent_filters_test4.cxx |   38 
 2 files changed, 53 insertions(+)

New commits:
commit 8cf73a9a8227f90217c595be04519f0c3692754c
Author: Baole Fang 
AuthorDate: Sat Mar 18 00:52:25 2023 -0400
Commit: Mike Kaganski 
CommitDate: Tue Mar 21 04:34:23 2023 +

tdf#153514: sc_subsequent_filters_test4: Add unittest

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

diff --git a/sc/qa/unit/data/xml/tdf153514.xml 
b/sc/qa/unit/data/xml/tdf153514.xml
new file mode 100644
index ..8715925a1d58
--- /dev/null
+++ b/sc/qa/unit/data/xml/tdf153514.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sc/qa/unit/subsequent_filters_test4.cxx 
b/sc/qa/unit/subsequent_filters_test4.cxx
index ec22e998d611..21a918086304 100644
--- a/sc/qa/unit/subsequent_filters_test4.cxx
+++ b/sc/qa/unit/subsequent_filters_test4.cxx
@@ -981,6 +981,44 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest4, 
testColorScaleNumWithRefXLSX)
  
pColorScaleEntry->GetFormula(formula::FormulaGrammar::GRAM_NATIVE));
 }
 
+CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf153514)
+{
+ScDocument aDoc;
+OUString aFullUrl = 
m_directories.getURLFromSrc(u"sc/qa/unit/data/xml/tdf153514.xml");
+
+OUString aValidPath;
+osl::FileBase::getSystemPathFromFileURL(aFullUrl, aValidPath);
+
+ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
+CPPUNIT_ASSERT(pOrcus);
+
+pOrcus->importODS_Styles(aDoc, aValidPath);
+ScStyleSheetPool* pStyleSheetPool = aDoc.GetStyleSheetPool();
+
+ScStyleSheet* pStyleSheet;
+// Case sensitive tests
+pStyleSheet = pStyleSheetPool->FindCaseIns("aBcD", SfxStyleFamily::Para);
+CPPUNIT_ASSERT_EQUAL(OUString("aBcD"), pStyleSheet->GetName());
+pStyleSheet = pStyleSheetPool->FindCaseIns("abCd", SfxStyleFamily::Para);
+CPPUNIT_ASSERT_EQUAL(OUString("abCd"), pStyleSheet->GetName());
+pStyleSheet = pStyleSheetPool->FindCaseIns("Abcd", SfxStyleFamily::Para);
+CPPUNIT_ASSERT_EQUAL(OUString("Abcd"), pStyleSheet->GetName());
+pStyleSheet = pStyleSheetPool->FindCaseIns("ABCD", SfxStyleFamily::Para);
+CPPUNIT_ASSERT_EQUAL(OUString("ABCD"), pStyleSheet->GetName());
+// Case insensitive tests
+pStyleSheet = pStyleSheetPool->FindCaseIns("abcd", SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyleSheet);
+CPPUNIT_ASSERT(pStyleSheet->GetName().equalsIgnoreAsciiCase("abcd"));
+CPPUNIT_ASSERT(pStyleSheet->GetName() != "abcd");
+pStyleSheet = pStyleSheetPool->FindCaseIns("ABCd", SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyleSheet);
+CPPUNIT_ASSERT(pStyleSheet->GetName().equalsIgnoreAsciiCase("ABCd"));
+CPPUNIT_ASSERT(pStyleSheet->GetName() != "ABCd");
+// Not match tests
+pStyleSheet = pStyleSheetPool->FindCaseIns("NotFound", 
SfxStyleFamily::Para);
+CPPUNIT_ASSERT(!pStyleSheet);
+}
+
 CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testOrcusODSStyleInterface)
 {
 ScDocument aDoc;


Short Introduction

2023-03-20 Thread Adoche Onaji


My name is Adoche Onaji. My libera chat nickname is AdocheOnaji

I am currently pursuing my bachelor’s degree in mechatronics engineering. I can 
be reached through dochieon...@gmail.com

My gerrit patches can be found in the link below
 gerrit.libreoffice.org/q/adoche+onaji

[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - extras/source

2023-03-20 Thread Rizal Muttaqin (via logerrit)
 extras/source/tipoftheday/toolbarmode.png |binary
 extras/source/tipoftheday/toolbarmode.svg |1 +
 extras/source/toolbarmode/notebookbar_groupedbar_full.png |binary
 extras/source/toolbarmode/notebookbar_groupedbar_full.svg |2 +-
 4 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 882a7c9144cd99eb2ae9c5c8e7d87ef16f239b37
Author: Rizal Muttaqin 
AuthorDate: Tue Mar 21 06:51:44 2023 +0700
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 21 05:58:58 2023 +

tdf#154242 and tdf#154143 Asset images for UI Chooser and ToTD

Change-Id: I9397133c3a1fd939f2ef136dc4b914e9248234f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149186
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit a542956c8c2f80f4dd660aa0eef3f1dbab340ba3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149107

diff --git a/extras/source/tipoftheday/toolbarmode.png 
b/extras/source/tipoftheday/toolbarmode.png
index 6306e54eb2cc..f092d2cce6d6 100644
Binary files a/extras/source/tipoftheday/toolbarmode.png and 
b/extras/source/tipoftheday/toolbarmode.png differ
diff --git a/extras/source/tipoftheday/toolbarmode.svg 
b/extras/source/tipoftheday/toolbarmode.svg
new file mode 100644
index ..579a9a3348d9
--- /dev/null
+++ b/extras/source/tipoftheday/toolbarmode.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>FileEditViewStylesFileHomeInserNoto SerifCutCopyPaste
\ No newline at end of file
diff --git a/extras/source/toolbarmode/notebookbar_groupedbar_full.png 
b/extras/source/toolbarmode/notebookbar_groupedbar_full.png
index 7846599d1768..549290300339 100644
Binary files a/extras/source/toolbarmode/notebookbar_groupedbar_full.png and 
b/extras/source/toolbarmode/notebookbar_groupedbar_full.png differ
diff --git a/extras/source/toolbarmode/notebookbar_groupedbar_full.svg 
b/extras/source/toolbarmode/notebookbar_groupedbar_full.svg
index 4fababf71074..5fa569538c30 100644
--- a/extras/source/toolbarmode/notebookbar_groupedbar_full.svg
+++ b/extras/source/toolbarmode/notebookbar_groupedbar_full.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>d="m55.69479 17.727083h1.87"/>d="m57.546873 18.785416h.62"/>stroke-width=".264583"/>stroke-width=".01" x="-17.600279" y="-14.011894">font-family="'Liberation Sans', sans-serif" font-size="4.2" 
 >font-weight="400" stroke-width=".0001">font-family="Inter" font-size="4.2" font-weight="normal" stroke-wi
 dth=".0001" x="10.809723" y="27.718109">StylesFileEditStylesUndo
 PasteOpenSaveClone
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>d="m55.69479 17.727083h1.87"/>d="m57.546873 18.785416h.62"/>stroke-width=".264583"/>stroke-width=".01" x="-17.600279" y="-14.011894">font-family="'Liberation Sans', sans-serif" font-size="4.2" 
 >font-weight="400" stroke-width=".0001">font-family="Inter" font-size="4.2" font-weight="normal" stroke-wi
 dth=".0001" x="10.809723" y="27.718109">StylesFileEditStylesUndo
 PasteOpenSaveClone
\ No newline at end of file



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

2023-03-20 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/python/scriptforge.py |7 
 wizards/source/sfdialogs/SF_Dialog.xba   |   22 +--
 wizards/source/sfdialogs/SF_DialogControl.xba|  165 +++
 wizards/source/sfdialogs/SF_DialogListener.xba   |4 
 4 files changed, 183 insertions(+), 15 deletions(-)

New commits:
commit 3d94a43d28813b42c11a66fa88724aae53d5780e
Author: Jean-Pierre Ledure 
AuthorDate: Mon Mar 20 16:48:55 2023 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Tue Mar 21 06:35:19 2023 +

ScriptForge - (SF_DialogControl) new Resize() method

Addition of method
   control.Resize(X, Y, Width, Height)
to selectively (arguments are applicable only when present)
update the position and/or the size of any
dialog control.

Addition of updatable properties:
   Height
   Width
   X
   Y
for the same purpose.

All measures are expressed in PIXELS.

The measures for dialogs are also as from now expressed
in pixels.

Changes are applicable to Basic and Python user scripts.

Documentation should be updated.

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

diff --git a/wizards/source/scriptforge/python/scriptforge.py 
b/wizards/source/scriptforge/python/scriptforge.py
index 531b0da1e6be..f61da2e3885b 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -1904,7 +1904,7 @@ class SFDialogs:
 servicename = 'SFDialogs.DialogControl'
 servicesynonyms = ()
 serviceproperties = dict(Cancel = True, Caption = True, ControlType = 
False, CurrentNode = True,
- Default = True, Enabled = True, Format = 
True, ListCount = False,
+ Default = True, Enabled = True, Format = 
True, Height = True, ListCount = False,
  ListIndex = True, Locked = True, MultiSelect 
= True, Name = False,
  OnActionPerformed = True, 
OnAdjustmentValueChanged = True, OnFocusGained = True,
  OnFocusLost = True, OnItemStateChanged = 
True, OnKeyPressed = True,
@@ -1913,7 +1913,7 @@ class SFDialogs:
  OnMouseReleased = True, OnNodeExpanded = 
True, OnNodeSelected = True,
  OnTextChanged = True, Page = True, Parent = 
False, Picture = True,
  RootNode = False, RowSource = True, Text = 
False, TipText = True,
- TripleState = True, Value = True, Visible = 
True,
+ TripleState = True, Value = True, Visible = 
True, Width = True, X = True, Y = True,
  XControlModel = False, XControlView = False, 
XGridColumnModel = False,
  XGridDataModel = False, XTreeDataModel = 
False)
 
@@ -1938,6 +1938,9 @@ class SFDialogs:
 def FindNode(self, displayvalue, datavalue = ScriptForge.cstSymEmpty, 
casesensitive = False):
 return self.ExecMethod(self.vbMethod + self.flgUno, 'FindNode', 
displayvalue, datavalue, casesensitive)
 
+def Resize(self, left = -1, top = -1, width = -1, height = -1):
+return self.ExecMethod(self.vbMethod, 'Resize', left, top, width, 
height)
+
 def SetFocus(self):
 return self.ExecMethod(self.vbMethod, 'SetFocus')
 
diff --git a/wizards/source/sfdialogs/SF_Dialog.xba 
b/wizards/source/sfdialogs/SF_Dialog.xba
index 430b29d20b57..01c6d83cf982 100644
--- a/wizards/source/sfdialogs/SF_Dialog.xba
+++ b/wizards/source/sfdialogs/SF_Dialog.xba
@@ -74,7 +74,7 @@ Private _DialogModel  As Object   ' 
com.sun.star.awt.XControlModel - stardiv
 Private _Displayed As Boolean  ' True 
after Execute()
 Private _Modal As Boolean  ' Set by 
Execute()
 
-' Dialog position and dimensions
+' Dialog position and dimensions in pixels
 Private _Left  As Long
 Private _Top   As Long
 Private _Width As Long
@@ -885,7 +885,7 @@ Public Function Resize(Optional ByVal Left As Variant _
, Optional 
ByVal Height As Variant _
) As Boolean
 ''' Move the top-left corner of a dialog to new coordinates 
and/or modify its dimensions
-''' All distances are expressed in 1/100 mm.
+''' All distances are expressed in pixels.
 ''' Without arguments, the method resets the initial 
dimensions
 ''' Args:
 ''' Left : the horizontal distance from the 
top-left corner
@@ -932,10 +9