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

2023-09-15 Thread Julien Nabet (via logerrit)
 svx/source/svdraw/svdpage.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c3c84c8230124fb6e31bd77eab22f46b5527813c
Author: Julien Nabet 
AuthorDate: Thu Sep 14 22:50:37 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 16 08:31:40 2023 +0200

tdf#157174: fix crash when clicking "Print Preview"

Don't call Reformat method when treating a virtual SdrObject

bt:
4  0x7fd7ff446eb4 in SdrObject::GetBroadcaster() const (this=0x4) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdobj.cxx:698
5  0x7fd7ff48eaee in SdrEdgeObj::Reformat() (this=0x564e82ef22d0) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdoedge.cxx:1666
6  0x7fd7ff551bd9 in SdrObjList::ImplReformatAllEdgeObjects(SdrObjList 
const&) (this=0x564e82a371e0, rObjList=...) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:760
7  0x7fd7ff551b38 in SdrObjList::ReformatAllEdgeObjects() 
(this=0x564e82a371e0) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:744
8  0x7fd7ff3d8d1c in SdrModel::ImpReformatAllEdgeObjects() 
(this=0x564e7f79dc50) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:752
9  0x7fd7ff3dda3b in SdrModel::setLock(bool) (this=0x564e7f79dc50, 
bLock=false) at /home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:1618
10 0x7fd7c58a9a76 in SwView::~SwView() (this=0x564e82e7bb00) at 
/home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1163
11 0x7fd7c58a9f99 in SwView::~SwView() (this=0x564e82e7bb00) at 
/home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1122
12 0x7fd801835308 in SfxViewFrame::SwitchToViewShell_Impl(unsigned 
short, bool) (this=0x564e82b17680, nViewIdOrNo=1, bIsIndex=true) at 
/home/julien/lo/libreoffice/sfx2/source/view/viewfrm.cxx:2528

See complete bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=189470

Change-Id: I4de5127686c01a40c1666f6089efa4fe7a114cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156934
(cherry picked from commit 17cd1dacf6a4b587b524edc7384ff26990208132)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156951
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index a4c804f53e12..1f878a9f3f9d 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -792,7 +792,9 @@ void SdrObjList::ImplReformatAllEdgeObjects(const 
SdrObjList& rObjList)
 const bool bIsGroup(nullptr != pChildren);
 if(!bIsGroup)
 {
-if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge)
+// Check IsVirtualObj because sometimes we get SwDrawVirtObj here
+if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge
+   && !pSdrObject->IsVirtualObj())
 {
 SdrEdgeObj* pSdrEdgeObj = static_cast< SdrEdgeObj* 
>(pSdrObject);
 pSdrEdgeObj->Reformat();


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

2023-09-15 Thread Julien Nabet (via logerrit)
 svx/source/svdraw/svdpage.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c0723e29ed634a05223f22afc4846a3131fbe8d3
Author: Julien Nabet 
AuthorDate: Thu Sep 14 22:50:37 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 16 08:31:31 2023 +0200

tdf#157174: fix crash when clicking "Print Preview"

Don't call Reformat method when treating a virtual SdrObject

bt:
4  0x7fd7ff446eb4 in SdrObject::GetBroadcaster() const (this=0x4) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdobj.cxx:698
5  0x7fd7ff48eaee in SdrEdgeObj::Reformat() (this=0x564e82ef22d0) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdoedge.cxx:1666
6  0x7fd7ff551bd9 in SdrObjList::ImplReformatAllEdgeObjects(SdrObjList 
const&) (this=0x564e82a371e0, rObjList=...) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:760
7  0x7fd7ff551b38 in SdrObjList::ReformatAllEdgeObjects() 
(this=0x564e82a371e0) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:744
8  0x7fd7ff3d8d1c in SdrModel::ImpReformatAllEdgeObjects() 
(this=0x564e7f79dc50) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:752
9  0x7fd7ff3dda3b in SdrModel::setLock(bool) (this=0x564e7f79dc50, 
bLock=false) at /home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:1618
10 0x7fd7c58a9a76 in SwView::~SwView() (this=0x564e82e7bb00) at 
/home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1163
11 0x7fd7c58a9f99 in SwView::~SwView() (this=0x564e82e7bb00) at 
/home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1122
12 0x7fd801835308 in SfxViewFrame::SwitchToViewShell_Impl(unsigned 
short, bool) (this=0x564e82b17680, nViewIdOrNo=1, bIsIndex=true) at 
/home/julien/lo/libreoffice/sfx2/source/view/viewfrm.cxx:2528

See complete bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=189470

Change-Id: I4de5127686c01a40c1666f6089efa4fe7a114cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156934
(cherry picked from commit 17cd1dacf6a4b587b524edc7384ff26990208132)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156950
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 2a316a25080f..1b0f43d2080c 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -755,7 +755,9 @@ void SdrObjList::ImplReformatAllEdgeObjects(const 
SdrObjList& rObjList)
 const bool bIsGroup(nullptr != pChildren);
 if(!bIsGroup)
 {
-if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge)
+// Check IsVirtualObj because sometimes we get SwDrawVirtObj here
+if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge
+   && !pSdrObject->IsVirtualObj())
 {
 SdrEdgeObj* pSdrEdgeObj = static_cast< SdrEdgeObj* 
>(pSdrObject);
 pSdrEdgeObj->Reformat();


ASWATH.T license statement

2023-09-15 Thread Aswath T CIT
   All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.

-- 
 




[Libreoffice-commits] core.git: Repository.mk vcl/Module_vcl.mk

2023-09-15 Thread Hossein (via logerrit)
 Repository.mk |2 +-
 vcl/Module_vcl.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 36163d269bd8f77a86605e4c5ff5adce17b4c66c
Author: Hossein 
AuthorDate: Fri Sep 15 22:38:02 2023 +0200
Commit: Hossein 
CommitDate: Fri Sep 15 23:48:49 2023 +0200

Make svptest VCL example build on all platforms

Previously, svptest VCL example was not built on all paltforms. Now,
svptest is built on Windows and elsewhere. To run, one can invoke:

 ./bin/run svptest

Change-Id: I915a4ef9748e2248d2d209969d1fef079ee06cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156972
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/Repository.mk b/Repository.mk
index 22e1da82d263..e26116336b2a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -70,13 +70,13 @@ $(eval $(call gb_Helper_register_executables,NONE, \
xrmex \
$(if $(filter-out ANDROID iOS WNT,$(OS)), \
 fftester \
-svptest \
 svpclient ) \
$(if $(filter LINUX %BSD SOLARIS,$(OS)), tilebench) \
$(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)),icontest) \
vcldemo \
svdemo \
minvcl \
+   svptest \
tiledrendering \
mtfdemo \
visualbackendtest \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 704b324622fe..dd66a86dbf73 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
 Executable_vcldemo \
 Executable_svdemo \
 Executable_minvcl \
+Executable_svptest \
 Executable_icontest \
 Executable_visualbackendtest \
 Executable_mtfdemo \
@@ -57,7 +58,6 @@ ifeq ($(CROSS_COMPILING)$(DISABLE_DYNLOADING),)
 $(eval $(call gb_Module_add_targets,vcl,\
 $(if $(filter-out ANDROID iOS WNT,$(OS)), \
 Executable_fftester \
-Executable_svptest \
 Executable_listfonts \
 Executable_listglyphs \
 Executable_svpclient) \


CppunitTest_vcl_pdfexport failure

2023-09-15 Thread Adlair Cerecedo Mendez
Hi everyone.

I'm working on easyhack (
https://bugs.documentfoundation.org/show_bug.cgi?id=156717), I made changes
to fix it, compiled it without problems and it works well, after that, I
submitted it to gerrit. However, I'm receiving mail from Jenkings with the
next info:
https://ci.libreoffice.org/job/gerrit_linux_gcc_release/150560/consoleFull#-1775050411d893063f-7f3d-4b7e-b56f-4e0f225817cd.
I'm still trying to resolve the issue I received from Jenkins. I realized
I'll probably have to make some changes to testPdfImageEncryption, but I'm
not sure that's the best way. Before drawing my conclusion, I solved the
same easyhack in different ways, all tested and working fine, but [make
CppunitTest_vcl_pdfexport CPPUNIT_TEST_NAME="testPdfImageEncryption"] and
Jenkins sent me the same response.

Can somebody help me to understand what is happening and how to solve it?

I also ran: [make CppunitTest_vcl_pdfexport CPPUNITTRACE="gdb --args"] and
[make CppunitTest_vcl_pdfexport VALGRIND=memcheck], but the results are not
clear to me. When I run [make CppunitTest_vcl_pdfexport DEBUGCPPUNIT=TRUE],
The console freezes for hours and I need to kill the test.

The complete info here: https://gerrit.libreoffice.org/c/core/+/156971




Thanks in advance. :)
Adlair


[Libreoffice-commits] core.git: bin/run

2023-09-15 Thread Hossein (via logerrit)
 bin/run |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 140fe3080da8dd6468a223cb7bb56d3734377b9c
Author: Hossein 
AuthorDate: Wed Sep 13 23:31:21 2023 +0200
Commit: Hossein 
CommitDate: Fri Sep 15 21:24:09 2023 +0200

Make sure bin/run script finds the correct dlls

On Windows/Cygwin, if you put "C:\Program Files\LibreOffice\program"
in PATH, bin/run will have trouble finding correct vcllo.dll and other
LibreOffice .dll files inside instdir/program. Because the script uses
the absolute path of the executable, it is enough to use instdir/program
as the current working directory.

The symptom was that in the above case it was not possible to run the
workbenches like vcldemo, minvcl, etc. The error was:

$ ./bin/run minvcl

minvcl.exe - Entry Point Not Found | The procedure entry point
?RasterFromBitmap@SKImages@@... could not be located in the dynamic
link library vcllo.dll

$ ldd ./lode/dev/core/workdir/LinkTarget/Executable/minvcl.exe
...
comphelper.dll => not found
fwklo.dll => not found
i18nlangtag.dll => /cygdrive/c/Program 
Files/LibreOffice/program/i18nlangtag.dll (?)
sal3.dll => /cygdrive/c/Program Files/LibreOffice/program/sal3.dll 
(?)
vcllo.dll => not found
MSVCP140D.dll => /cygdrive/c/WINDOWS/SYSTEM32/MSVCP140D.dll (?)
VCRUNTIME140D.dll => /cygdrive/c/WINDOWS/SYSTEM32/VCRUNTIME140D.dll 
(?)
VCRUNTIME140_1D.dll => 
/cygdrive/c/WINDOWS/SYSTEM32/VCRUNTIME140_1D.dll (?)
ucrtbased.dll => /cygdrive/c/WINDOWS/SYSTEM32/ucrtbased.dll (?)

Change-Id: I02b6d9aca1062b22a91d5a1f9bce0cf7238a896a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156902
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/bin/run b/bin/run
index 695905e09e6b..b154834c1db5 100755
--- a/bin/run
+++ b/bin/run
@@ -73,6 +73,7 @@ if uname | grep -i CYGWIN >/dev/null; then
 export URE_BOOTSTRAP=file:///$(cygpath -m 
"${dir}")/instdir/program/fundamental.ini
 export PATH=${PATH:+$PATH:}"${dir}"/instdir/program
 SEARCH_PATH="${PATH}"
+cd instdir/program
 
 elif [ $(uname) = Darwin ]; then
 


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

2023-09-15 Thread Mike Kaganski (via logerrit)
 helpcompiler/source/HelpIndexer.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0e6f5ac45e46fa9b17a656d2873453373d7d
Author: Mike Kaganski 
AuthorDate: Fri Sep 15 17:17:07 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Sep 15 20:02:09 2023 +0200

Related: tdf#157254 Shorten paths by removing relative parts

E.g., a path like

C:\lo\src\build\instdir\program\..\program\..\user\extensions\bundled\registry\com.sun.star.comp.deployment.help.PackageRegistryBackend\lu149121qyy8a.tmp\da\help.idxl
would become 22 characters shorter:

C:\lo\src\build\instdir\user\extensions\bundled\registry\com.sun.star.comp.deployment.help.PackageRegistryBackend\lu149121qyy8a.tmp\da\help.idxl

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

diff --git a/helpcompiler/source/HelpIndexer.cxx 
b/helpcompiler/source/HelpIndexer.cxx
index e55f0760400b..44506bddfc31 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -35,8 +35,11 @@ HelpIndexer::HelpIndexer(OUString lang, OUString module,
 : d_lang(std::move(lang)), d_module(std::move(module))
 {
 d_indexDir = outDir + OUStringChar('/') + d_module + ".idxl";
+osl_getAbsoluteFileURL(nullptr, d_indexDir.pData, &d_indexDir.pData);
 d_captionDir = OUString::Concat(srcDir) + "/caption";
+osl_getAbsoluteFileURL(nullptr, d_captionDir.pData, &d_captionDir.pData);
 d_contentDir = OUString::Concat(srcDir) + "/content";
+osl_getAbsoluteFileURL(nullptr, d_contentDir.pData, &d_contentDir.pData);
 }
 
 #if defined _WIN32


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

2023-09-15 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/tabledesign/TEditControl.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 4bab6b0b870ae56b8d40eac22dbb0a433006789e
Author: Julien Nabet 
AuthorDate: Fri Sep 15 16:53:17 2023 +0200
Commit: Julien Nabet 
CommitDate: Fri Sep 15 18:48:42 2023 +0200

tdf#71224: Remove "Insert fields" option for an existing table (workaround)

For the moment, we don't implement insert field at specific position
It's not SQL standard and each database has made its choice (some use 
"BEFORE", other "FIRST" and "AFTER")
and some, like Postgresql, don't allow this.
So for the moment, test if the table already exists (and so it's an 
edition), in this case only
we remove "Insert fields" entry. Indeed, in case of new table, there's no 
pb.

The real fix is to implement the insert for each database + error message 
for those which don't support this

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

diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx 
b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index b3f5dbbe33c8..55696fe36463 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1412,8 +1412,17 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
 xContextMenu->remove("paste");
 if (!IsDeleteAllowed())
 xContextMenu->remove("delete");
-if (!IsInsertNewAllowed(nRow))
+// tdf#71224: WORKAROUND for the moment, we don't 
implement insert field at specific position
+// It's not SQL standard and each database has made its 
choice (some use "BEFORE", other "FIRST" and "AFTER")
+// and some, like Postgresql, don't allow this.
+// So for the moment, test if the table already exists 
(and so it's an edition), in this case only
+// we remove "Insert Fields" entry. Indeed, in case of new 
table, there's no pb.
+//
+// The real fix is to implement the insert for each 
database + error message for those which don't support this
+//if (!IsInsertNewAllowed(nRow))
+if ( GetView()->getController().getTable().is() )
 xContextMenu->remove("insert");
+
 if (IsPrimaryKeyAllowed())
 {
 xContextMenu->set_active("primarykey", 
IsRowSelected(GetCurRow()) && IsPrimaryKey());


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

2023-09-15 Thread Noel Grandin (via logerrit)
 sc/inc/arealink.hxx  |2 
 sc/inc/document.hxx  |8 +-
 sc/inc/tablink.hxx   |2 
 sc/source/core/data/SolverSettings.cxx   |2 
 sc/source/core/data/attarray.cxx |1 
 sc/source/core/data/bcaslot.cxx  |3 
 sc/source/core/data/dociter.cxx  |1 
 sc/source/core/data/documen2.cxx |4 -
 sc/source/core/data/documen3.cxx |1 
 sc/source/core/data/documen4.cxx |1 
 sc/source/core/data/documen5.cxx |3 
 sc/source/core/data/documen8.cxx |5 -
 sc/source/core/data/documen9.cxx |3 
 sc/source/core/data/document.cxx |   10 +-
 sc/source/core/data/document10.cxx   |2 
 sc/source/core/data/drwlayer.cxx |5 -
 sc/source/core/data/simpleformulacalc.cxx|1 
 sc/source/core/data/table1.cxx   |1 
 sc/source/core/data/table2.cxx   |4 -
 sc/source/core/data/validat.cxx  |5 -
 sc/source/core/tool/addinlis.cxx |1 
 sc/source/core/tool/address.cxx  |1 
 sc/source/core/tool/adiasync.cxx |1 
 sc/source/core/tool/chgtrack.cxx |3 
 sc/source/core/tool/compiler.cxx |3 
 sc/source/core/tool/detfunc.cxx  |2 
 sc/source/core/tool/editutil.cxx |3 
 sc/source/core/tool/formulalogger.cxx|3 
 sc/source/core/tool/formulaparserpool.cxx|5 -
 sc/source/core/tool/interpr1.cxx |3 
 sc/source/core/tool/interpr2.cxx |3 
 sc/source/core/tool/interpr4.cxx |5 -
 sc/source/core/tool/progress.cxx |1 
 sc/source/filter/dif/difexp.cxx  |1 
 sc/source/filter/dif/difimp.cxx  |1 
 sc/source/filter/excel/excdoc.cxx|7 +
 sc/source/filter/excel/excform8.cxx  |1 
 sc/source/filter/excel/excimp8.cxx   |7 +
 sc/source/filter/excel/expop2.cxx|6 -
 sc/source/filter/excel/impop.cxx |5 -
 sc/source/filter/excel/namebuff.cxx  |1 
 sc/source/filter/excel/read.cxx  |1 
 sc/source/filter/excel/xecontent.cxx |3 
 sc/source/filter/excel/xehelper.cxx  |1 
 sc/source/filter/excel/xeroot.cxx|3 
 sc/source/filter/excel/xichart.cxx   |5 -
 sc/source/filter/excel/xicontent.cxx |1 
 sc/source/filter/excel/xiescher.cxx  |   15 ++-
 sc/source/filter/excel/xilink.cxx|1 
 sc/source/filter/excel/xistyle.cxx   |   11 +-
 sc/source/filter/excel/xlroot.cxx|7 +
 sc/source/filter/html/htmlexp.cxx|3 
 sc/source/filter/html/htmlpars.cxx   |   13 +--
 sc/source/filter/inc/xlroot.hxx  |3 
 sc/source/filter/lotus/filter.cxx|1 
 sc/source/filter/lotus/lotread.cxx   |1 
 sc/source/filter/oox/excelfilter.cxx |2 
 sc/source/filter/oox/workbookhelper.cxx  |2 
 sc/source/filter/rtf/eeimpars.cxx|1 
 sc/source/filter/xcl97/xcl97esc.cxx  |1 
 sc/source/filter/xml/XMLTableSourceContext.cxx   |1 
 sc/source/filter/xml/xmlcelli.cxx|1 
 sc/source/filter/xml/xmlimprt.cxx|4 -
 sc/source/filter/xml/xmlwrap.cxx |4 -
 sc/source/ui/Accessibility/AccessibleCellBase.cxx|   42 +--
 sc/source/ui/Accessibility/AccessibleDocument.cxx|2 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |2 
 sc/source/ui/Accessibility/AccessibleEditObject.cxx  |8 +-
 sc/source/ui/Accessibility/AccessibleText.cxx|8 +-
 sc/source/ui/app/inputhdl.cxx|2 
 sc/source/ui/dataprovider/csvdataprovider.cxx   

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

2023-09-15 Thread Michael Stahl (via logerrit)
 sw/source/core/layout/layact.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5a33420923c76d3e282f6d4ce0f3a63616ca3cff
Author: Michael Stahl 
AuthorDate: Fri Sep 15 16:57:58 2023 +0200
Commit: Michael Stahl 
CommitDate: Fri Sep 15 18:02:12 2023 +0200

tdf#157096 sw: layout: fix UAF crash from stale mpFlyDestory entry

It doesn't make sense that mpFlyDestory entries survive exit from
SwLayAction.

Call DeleteEmptyFlys() whenever DeleteEmptySct() is called.

(reportedly crashes since commit c303981cfd95ce1c3881366023d5495ae2edce97
 although i'd rather blame commit f6fbd9d5ff5b049112e6ca7a8943c156b3e4f411)

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

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 88d2a1ebdb54..316549f17d57 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -371,6 +371,7 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
 m_pRoot->ResetTurboFlag();
 m_bActionInProgress = false;
 m_pRoot->DeleteEmptySct();
+m_pRoot->DeleteEmptyFlys();
 return;
 }
 else if ( m_pRoot->GetTurbo() )
@@ -397,6 +398,7 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
 SetAgain(true);
 }
 m_pRoot->DeleteEmptySct();
+m_pRoot->DeleteEmptyFlys();
 
 m_pWait.reset();
 


[Libreoffice-commits] core.git: external/clucene

2023-09-15 Thread Mike Kaganski (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |1 +
 external/clucene/patches/clucene-pure-virtual.patch |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit c36fd4286c93da4b7b56da95b9693a97e0be71fc
Author: Mike Kaganski 
AuthorDate: Fri Sep 15 15:21:37 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Sep 15 16:57:46 2023 +0200

tdf#157254: CLucene: fix pure virtual call in destructor

When HelpIndexer::indexDocuments creates lucene::index::IndexWriter
with a long path like

C:\lo\src\build\workdir\longPathTest_123456789012345678901234567890123456789012345678901234567890\instdir\program\..\program\..\user\extensions\bundled\registry\com.sun.star.comp.deployment.help.PackageRegistryBackend\lu149121qyy8a.tmp\da\help.idxl
then CLucene's FSDirectory::FSIndexOutput::FSIndexOutput may fail
and throw, which would unwind, and call FSIndexOutput destructor,
then procede to inherited BufferedIndexOutput destructor, which
calls close(), which calls flush(), which finally calls flushBuffer;
and that one was pure virtual in BufferedIndexOutput, which meant,
that in BufferedIndexOutput destructor, that was a pure virtual
function call, crashing the process.

Patch CLucene to have a default implementation of the function,
usable in its destructor.

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

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 76ceeb08f523..7a1eed67d2f7 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -53,6 +53,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/write-strings.patch \
external/clucene/patches/nullstring.patch \
external/clucene/patches/binary_function.patch \
+   external/clucene/patches/clucene-pure-virtual.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/clucene-pure-virtual.patch 
b/external/clucene/patches/clucene-pure-virtual.patch
new file mode 100644
index ..0d4f95fe538f
--- /dev/null
+++ b/external/clucene/patches/clucene-pure-virtual.patch
@@ -0,0 +1,11 @@
+--- src/core/CLucene/store/IndexOutput.h
 src/core/CLucene/store/IndexOutput.h
+@@ -159,7 +159,7 @@
+   * @param b the bytes to write
+   * @param len the number of bytes to write
+   */
+-  virtual void flushBuffer(const uint8_t* b, const int32_t len) = 0;
++  virtual void flushBuffer(const uint8_t* /*b*/, const int32_t /*len*/) {}
+ };
+ 
+ CL_NS_END


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

2023-09-15 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/tabledesign/TEditControl.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 5b49cf64482ca8246dbcf5b5f12a11d7f9ed081b
Author: Julien Nabet 
AuthorDate: Fri Sep 15 14:48:52 2023 +0200
Commit: Julien Nabet 
CommitDate: Fri Sep 15 16:40:47 2023 +0200

Fix assertion 'GTK_IS_CHECK_MENU_ITEM (check_menu_item)' in dbaccess

Retrieve odb file 
https://bugs.documentfoundation.org/attachment.cgi?id=102977
Open the file and edit the only table
Right click at left on a field (except first one)

(soffice:271527): Gtk-CRITICAL **: 14:35:42.787: 
gtk_check_menu_item_set_active: assertion 'GTK_IS_CHECK_MENU_ITEM 
(check_menu_item)' failed

(soffice:271527): GLib-GObject-CRITICAL **: 14:35:42.787: invalid (NULL) 
pointer instance

(soffice:271527): GLib-GObject-CRITICAL **: 14:35:42.787: 
g_signal_handlers_unblock_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' 
failed

If primary key entry is removed, don't try to call xContextMenu->set_active 
on it

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

diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx 
b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 241efe597ef4..b3f5dbbe33c8 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1412,11 +1412,16 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
 xContextMenu->remove("paste");
 if (!IsDeleteAllowed())
 xContextMenu->remove("delete");
-if (!IsPrimaryKeyAllowed())
-xContextMenu->remove("primarykey");
 if (!IsInsertNewAllowed(nRow))
 xContextMenu->remove("insert");
-xContextMenu->set_active("primarykey", 
IsRowSelected(GetCurRow()) && IsPrimaryKey());
+if (IsPrimaryKeyAllowed())
+{
+xContextMenu->set_active("primarykey", 
IsRowSelected(GetCurRow()) && IsPrimaryKey());
+}
+else
+{
+xContextMenu->remove("primarykey");
+}
 
 if( SetDataPtr(m_nDataPos) )
 pDescrWin->SaveData( pActRow->GetActFieldDescr() );


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - bin/lo-all-static-libs download.lst external/libwebp RepositoryExternal.mk

2023-09-15 Thread Caolán McNamara (via logerrit)
 RepositoryExternal.mk  |1 +
 bin/lo-all-static-libs |1 +
 download.lst   |4 ++--
 external/libwebp/Makefile.vc.patch |   33 ++---
 4 files changed, 22 insertions(+), 17 deletions(-)

New commits:
commit b522be747ff554b0fa8b1666014792d961e12343
Author: Caolán McNamara 
AuthorDate: Wed Jun 14 10:08:13 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 16:17:53 2023 +0200

tdf#157231 CVE-2023-4863 upgrade to libwebp-1.3.2.tar.gz

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 40e45964078b..b4eb2be23c23 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2777,6 +2777,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
+   -L$(call gb_UnpackedTarball_get_dir,libwebp)/sharpyuv/.libs -lsharpyuv \
 )
 endif
 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs
index fbe6d7010624..83c7b281a63c 100755
--- a/bin/lo-all-static-libs
+++ b/bin/lo-all-static-libs
@@ -124,6 +124,7 @@ echo $INSTDIR/$LIBO_LIB_FOLDER/lib*.a \
  $WORKDIR/UnpackedTarball/librevenge/src/*/.libs/*.a \
  $WORKDIR/UnpackedTarball/libvisio/src/lib/.libs/*.a \
  $WORKDIR/UnpackedTarball/libwebp/src/.libs/*.a \
+ $WORKDIR/UnpackedTarball/libwebp/sharpyuv/.libs/*.a \
  $WORKDIR/UnpackedTarball/libwp?/src/lib/.libs/*.a \
  $WORKDIR/UnpackedTarball/raptor/src/.libs/*.a \
  $WORKDIR/UnpackedTarball/rasqal/src/.libs/*.a \
diff --git a/download.lst b/download.lst
index 781d9537663d..e1256fc40ef1 100644
--- a/download.lst
+++ b/download.lst
@@ -188,8 +188,8 @@ export LIBNUMBERTEXT_SHA256SUM := 
17b8249cb89ae11ae15a85612d2665626c0e0e3e56b356
 export LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.7.tar.xz
 export LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
-export LIBWEBP_SHA256SUM := 
808b98d2f5b84e9b27fdef6c5372dac769c3bda4502febbfa5031bd3c4d7d018
-export LIBWEBP_TARBALL := libwebp-1.2.1.tar.gz
+export LIBWEBP_SHA256SUM := 
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4
+export LIBWEBP_TARBALL := libwebp-1.3.2.tar.gz
 export XMLSEC_SHA256SUM := 
2d84360b03042178def1d9ff538acacaed2b3a27411db7b2874f1612ed71abc8
 export XMLSEC_TARBALL := xmlsec1-1.2.30.tar.gz
 export LIBXML_SHA256SUM := 
5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c
diff --git a/external/libwebp/Makefile.vc.patch 
b/external/libwebp/Makefile.vc.patch
index 653998319b82..41c899921a1c 100644
--- a/external/libwebp/Makefile.vc.patch
+++ b/external/libwebp/Makefile.vc.patch
@@ -1,7 +1,7 @@
 --- Makefile.vc.sav2021-07-30 00:55:37.0 +0200
 +++ Makefile.vc2022-01-25 17:35:30.206117700 +0100
-@@ -7,11 +7,11 @@
- LIBWEBPDEMUX_BASENAME = libwebpdemux
+@@ -8,11 +8,11 @@
+ LIBSHARPYUV_BASENAME = libsharpyuv
  
  !IFNDEF ARCH
 -!IF ! [ cl 2>&1 | find "x86" > NUL ]
@@ -15,7 +15,7 @@
  ARCH = ARM
  !ELSE
  !ERROR Unable to auto-detect toolchain architecture! \
-@@ -27,8 +27,8 @@
+@@ -28,8 +28,8 @@
  ## Nothing more to do below this line!
  
  NOLOGO = /nologo
@@ -25,7 +25,7 @@
 +CCDEBUG= $(CC) $(NOLOGO) /Od /Zi /D_DEBUG /RTC1
  CFLAGS = /I. /Isrc $(NOLOGO) /W3 /EHsc /c
  CFLAGS = $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN
- LDFLAGS= /LARGEADDRESSAWARE /MANIFEST /NXCOMPAT /DYNAMICBASE
+ LDFLAGS= /LARGEADDRESSAWARE /MANIFEST:EMBED /NXCOMPAT /DYNAMICBASE
 @@ -67,7 +67,7 @@
  RTLIB   = /MD
  RTLIBD  = /MDd
@@ -35,7 +35,7 @@
  DIROBJ = $(DIRBASE)\obj
  DIRLIB = $(DIRBASE)\lib
  DIRINC = $(DIRBASE)\include
-@@ -86,10 +86,10 @@
+@@ -87,10 +87,10 @@
  
  # Target configuration
  !IF "$(CFG)" == "release-static"
@@ -48,9 +48,9 @@
  RTLIB  = $(RTLIBD)
  STATICLIBBUILD = TRUE
  LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
-@@ -97,11 +97,11 @@
- LIBWEBPMUX_BASENAME = $(LIBWEBPMUX_BASENAME)_debug
+@@ -99,11 +99,11 @@
  LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
+ LIBSHARPYUV_BASENAME = $(LIBSHARPYUV_BASENAME)_debug
  !ELSE IF "$(CFG)" == "release-dynamic"
 -CC= $(CCNODBG)
 +CC_= $(CCNODBG)
@@ -62,7 +62,7 @@
  RC= $(RCDEBUG)
  RTLIB = $(RTLIBD)
  DLLBUILD  = TRUE
-@@ -112,7 +112,7 @@
+@@ -115,7 +115,7 @@
  !ENDIF
  
  !IF "$(STATICLIBBUILD)" == "TRUE"
@@ -71,25 +71,25 @@
  CFGSET = TRUE
  LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME).lib
  LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME).lib
-@@ -120,7 +120,7 @@
+@@ -123,7 +123,7 @@
  LIBWEBPDEMUX = $(DIRLIB)\$(LIBWEBPDEMUX_BASENAME).lib
+ LIBSHARPYUV = $(DIRLIB)\$(LIBSHARPYUV_BASENAME).lib
  !ELSE IF "$

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

2023-09-15 Thread Henry Castro (via logerrit)
 desktop/source/lib/init.cxx |   45 +++-
 1 file changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 34a952418da0411f24d98dd5f422dc58d602bd7e
Author: Henry Castro 
AuthorDate: Fri Sep 8 14:23:33 2023 -0400
Commit: Henry Castro 
CommitDate: Fri Sep 15 16:12:11 2023 +0200

lok: add getter function to read "ReadOnly" flag

Signed-off-by: Henry Castro 
Change-Id: Id9d2bc638d0f48cb33764b07fb8976b97117a621
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156621
Reviewed-by: Ashod Nakashian 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e4d212b067b1..817062ad55fa 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5940,6 +5940,45 @@ static void addLocale(boost::property_tree::ptree& 
rValues, css::lang::Locale co
 rValues.push_back(std::make_pair("", aChild));
 }
 
+static char* getDocReadOnly(LibreOfficeKitDocument* pThis)
+{
+LibLODocument_Impl* pDocument = static_cast(pThis);
+if (!pDocument)
+return nullptr;
+
+SfxBaseModel* pBaseModel = 
dynamic_cast(pDocument->mxComponent.get());
+if (!pBaseModel)
+return nullptr;
+
+SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+if (!pObjectShell)
+return nullptr;
+
+SfxMedium* pMedium = pObjectShell->GetMedium();
+if (!pMedium)
+return nullptr;
+
+bool bDocReadOnly = false;
+if (const SfxBoolItem* pReadOnlyItem =
+SfxItemSet::GetItem(pMedium->GetItemSet(),
+ SID_DOC_READONLY, false))
+bDocReadOnly = pReadOnlyItem->GetValue();
+
+boost::property_tree::ptree aTree;
+aTree.put("commandName", ".uno:ReadOnly");
+aTree.put("success", bDocReadOnly);
+
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aTree);
+char* pJson = static_cast(malloc(aStream.str().size() + 1));
+if (!pJson)
+return nullptr;
+
+strcpy(pJson, aStream.str().c_str());
+pJson[aStream.str().size()] = '\0';
+return pJson;
+}
+
 static char* getLanguages(const char* pCommand)
 {
 css::uno::Sequence< css::lang::Locale > aLocales;
@@ -6311,7 +6350,11 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 return nullptr;
 }
 
-if (!strcmp(pCommand, ".uno:LanguageStatus"))
+if (!strcmp(pCommand, ".uno:ReadOnly"))
+{
+return getDocReadOnly(pThis);
+}
+else if (!strcmp(pCommand, ".uno:LanguageStatus"))
 {
 return getLanguages(pCommand);
 }


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

2023-09-15 Thread Henry Castro (via logerrit)
 sfx2/source/doc/objmisc.cxx |   46 
 1 file changed, 46 insertions(+)

New commits:
commit 61458a1b2221efc217778dcf3fb5764ed75f1474
Author: Henry Castro 
AuthorDate: Wed Sep 6 10:30:27 2023 -0400
Commit: Henry Castro 
CommitDate: Fri Sep 15 16:07:07 2023 +0200

sfx2: invoke handler "LoadReadOnlyRequest"

It will ask the user if open the Excel documents "read only"

Signed-off-by: Henry Castro 
Change-Id: I909fb39709198e02496f8c522f477c077fb875e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156624
Reviewed-by: Ashod Nakashian 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 6b86e2163ccb..57698b41f82e 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -77,6 +77,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1093,6 +1094,51 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags 
nFlags )
 bHasName = true; // the document is loaded, so the name should already 
available
 GetTitle( SFX_TITLE_DETECT );
 InitOwnModel_Impl();
+
+if (IsLoadReadonly())
+{
+OUString aFilterName;
+if (const SfxStringItem* pFilterNameItem =
+SfxItemSet::GetItem(pMedium->GetItemSet(),
+   SID_FILTER_NAME, false))
+aFilterName = pFilterNameItem->GetValue();
+
+OUString aFileName;
+if (const SfxStringItem* pFileNameItem =
+SfxItemSet::GetItem(pMedium->GetItemSet(),
+   SID_FILE_NAME, false))
+{
+const INetURLObject aURL( pFileNameItem->GetValue() );
+aFileName = aURL.getBase(INetURLObject::LAST_SEGMENT, true,
+ 
INetURLObject::DecodeMechanism::WithCharset);
+}
+
+if (aFilterName.indexOf("Excel") != -1)
+{
+Reference 
xHandler(pMedium->GetInteractionHandler());
+if (xHandler.is())
+{
+beans::NamedValue aLoadReadOnlyRequest;
+aLoadReadOnlyRequest.Name = "LoadReadOnlyRequest";
+aLoadReadOnlyRequest.Value <<= aFileName;
+
+Any aRequest(aLoadReadOnlyRequest);
+rtl::Reference 
xRequest
+= new ucbhelper::SimpleInteractionRequest(aRequest,
+  
ContinuationFlags::Approve |
+  
ContinuationFlags::Disapprove);
+
+xHandler->handle(xRequest);
+
+if (xRequest->getResponse() == 
ContinuationFlags::Disapprove)
+{
+SetSecurityOptOpenReadOnly(false);
+
pMedium->GetItemSet()->Put(SfxBoolItem(SID_DOC_READONLY, false));
+}
+}
+}
+}
+
 pImpl->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT;
 }
 


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

2023-09-15 Thread Henry Castro (via logerrit)
 desktop/source/lib/lokinteractionhandler.cxx |   24 
 desktop/source/lib/lokinteractionhandler.hxx |2 ++
 uui/source/iahndl-errorhandler.cxx   |1 -
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 7cbe8dda1c45ed770194e820c542b237c5b8aae0
Author: Henry Castro 
AuthorDate: Wed Sep 6 10:28:59 2023 -0400
Commit: Henry Castro 
CommitDate: Fri Sep 15 16:06:30 2023 +0200

lok: implement "handleLoadReadOnlyRequest"

Is used for interaction handle to query user decision
regarding to open the document read only.

Signed-off-by: Henry Castro 
Change-Id: Ia945eae7b1627d57d6211ae92a784d50313c2627
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156623
Reviewed-by: Ashod Nakashian 

diff --git a/desktop/source/lib/lokinteractionhandler.cxx 
b/desktop/source/lib/lokinteractionhandler.cxx
index 09ee2aaa9f90..8495ac2c8179 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -350,6 +351,26 @@ bool 
LOKInteractionHandler::handleMacroConfirmationRequest(const uno::Reference<
 return false;
 }
 
+bool LOKInteractionHandler::handleLoadReadOnlyRequest(const 
uno::Reference& xRequest)
+{
+uno::Any const request(xRequest->getRequest());
+
+OUString aFileName;
+beans::NamedValue aLoadReadOnlyRequest;
+if ((request >>= aLoadReadOnlyRequest) &&
+aLoadReadOnlyRequest.Name == "LoadReadOnlyRequest" &&
+(aLoadReadOnlyRequest.Value >>= aFileName))
+{
+auto 
xInteraction(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
 nullptr));
+
+if (xInteraction.is())
+xInteraction->handleInteractionRequest(xRequest);
+
+return true;
+}
+return false;
+}
+
 bool LOKInteractionHandler::handleFilterOptionsRequest(const 
uno::Reference& xRequest)
 {
 document::FilterOptionsRequest aFilterOptionsRequest;
@@ -389,6 +410,9 @@ sal_Bool SAL_CALL 
LOKInteractionHandler::handleInteractionRequest(
 if (handleMacroConfirmationRequest(xRequest))
 return true;
 
+if (handleLoadReadOnlyRequest(xRequest))
+return true;
+
 // TODO: perform more interactions 'for real' like the above
 selectApproved(rContinuations);
 
diff --git a/desktop/source/lib/lokinteractionhandler.hxx 
b/desktop/source/lib/lokinteractionhandler.hxx
index 5c6c6f87de6d..f92b88cf11f9 100644
--- a/desktop/source/lib/lokinteractionhandler.hxx
+++ b/desktop/source/lib/lokinteractionhandler.hxx
@@ -78,6 +78,8 @@ private:
 
 static bool handleFilterOptionsRequest(const 
::com::sun::star::uno::Reference<::com::sun::star::task::XInteractionRequest>& 
Request);
 
+static bool handleLoadReadOnlyRequest(const 
css::uno::Reference& xRequest);
+
 public:
 void SetPassword(char const* pPassword);
 
diff --git a/uui/source/iahndl-errorhandler.cxx 
b/uui/source/iahndl-errorhandler.cxx
index 5e758da9515c..765e7d077182 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -94,7 +94,6 @@ executeErrorDialog(
 break;
 }
 
-
 switch (nButtonMask)
 {
 case MessageBoxStyle::NONE:


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

2023-09-15 Thread Henry Castro (via logerrit)
 uui/inc/strings.hrc|1 
 uui/source/iahndl-errorhandler.cxx |   39 +
 uui/source/iahndl.cxx  |   11 ++
 uui/source/iahndl.hxx  |5 
 4 files changed, 56 insertions(+)

New commits:
commit 81fa0ab10b9acabe9b7f8ce9a8d7b1c0765bfdfc
Author: Henry Castro 
AuthorDate: Wed Sep 6 10:27:12 2023 -0400
Commit: Henry Castro 
CommitDate: Fri Sep 15 16:06:03 2023 +0200

uui: implement "handleLoadReadOnlyRequest"

Is used for interaction handle to query user decision
regarding to open the document read only.

Signed-off-by: Henry Castro 
Change-Id: Ia6792ca540b5c62f4c9de8a5793ef45de3740484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156622
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/uui/inc/strings.hrc b/uui/inc/strings.hrc
index 98bd94ef8484..b6daff517f51 100644
--- a/uui/inc/strings.hrc
+++ b/uui/inc/strings.hrc
@@ -78,5 +78,6 @@
 #define STR_RELOADEDITABLE_TITLE
NC_("STR_RELOADEDITABLE_TITLE", "Document is now editable")
 #define STR_RELOADEDITABLE_MSG  NC_("STR_RELOADEDITABLE_MSG", 
"Document file '$(ARG1)' is now editable \n\nReload this document for editing?")
 #define STR_RELOADEDITABLE_BTN  NC_("STR_RELOADEDITABLE_BTN", 
"~Reload")
+#define STR_LOADREADONLY_MSGNC_("STR_LOADREADONLY_MSG", 
"The author would like you to open '$(ARG1)' as read-only unless you need to 
make changes. Open as read-only?.")
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/iahndl-errorhandler.cxx 
b/uui/source/iahndl-errorhandler.cxx
index c03d518108f3..5e758da9515c 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -33,6 +33,7 @@
 #include 
 
 #include 
+#include 
 #include "getcontinuations.hxx"
 
 #include "iahndl.hxx"
@@ -290,4 +291,42 @@ UUIInteractionHelper::handleErrorHandlerRequest(
 }
 }
 
+void
+UUIInteractionHelper::handleLoadReadOnlyRequest(
+const OUString& sDocumentURL,
+uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
+rContinuations)
+{
+std::locale aLocale(Translate::Create("uui"));
+std::vector aArguments = { sDocumentURL };
+uno::Reference xRetry;
+uno::Reference xAbort;
+uno::Reference xApprove;
+uno::Reference xDisapprove;
+uno::Reference xParent = getParentXWindow();
+OUString aMessage(Translate::get(STR_LOADREADONLY_MSG, aLocale));
+
+aMessage = replaceMessageWithArguments(aMessage, aArguments);
+getContinuations(rContinuations, &xApprove, &xDisapprove, &xRetry, 
&xAbort);
+
+std::unique_ptr xBox(
+Application::CreateMessageDialog(Application::GetFrameWeld(xParent),
+ VclMessageType::Question,
+ VclButtonsType::YesNo,
+ aMessage,
+ GetpApp()));
+
+if (xBox->run() == RET_YES)
+{
+if (xApprove.is())
+xApprove->select();
+}
+else
+{
+if (xDisapprove.is())
+xDisapprove->select();
+}
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index ce5dfffa88db..7bd3fb7104d4 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -813,6 +813,17 @@ UUIInteractionHelper::handleRequest_impl(
 return true;
 }
 
+OUString aFileName;
+beans::NamedValue aLoadReadOnlyRequest;
+if ((aAnyRequest >>= aLoadReadOnlyRequest) &&
+aLoadReadOnlyRequest.Name == "LoadReadOnlyRequest" &&
+(aLoadReadOnlyRequest.Value >>= aFileName))
+{
+handleLoadReadOnlyRequest(aFileName,
+  rRequest->getContinuations());
+return true;
+}
+
 // Last chance: interaction handlers registered in the 
configuration
 
 
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 78d283d6bf0e..cf468f57dbcf 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -238,6 +238,11 @@ private:
 const OUString & instructions,
 const OUString & url,
 css::uno::Sequence< css::uno::Reference< 
css::task::XInteractionContinuation > > const & rContinuations );
+
+void
+handleLoadReadOnlyRequest(
+const OUString& sDocumentURL,
+css::uno::Sequence< css::uno::Reference< 
css::task::XInteractionContinuation > > const & rContinuations);
 };
 
 class ErrorResource


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

2023-09-15 Thread Miklos Vajna (via logerrit)
 writerfilter/CppunitTest_writerfilter_dmapper.mk   |   
 1 
 writerfilter/qa/cppunittests/dmapper/TableManager.cxx  |   
46 +++
 writerfilter/qa/cppunittests/dmapper/data/floattable-nested-cellstart.docx 
|binary
 writerfilter/source/dmapper/DomainMapper.cxx   |   
 5 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx   |   
 7 
 writerfilter/source/dmapper/DomainMapperTableHandler.hxx   |   
 2 
 writerfilter/source/dmapper/TableData.hxx  |   
29 ++
 writerfilter/source/dmapper/TableManager.cxx   |  
132 +++---
 writerfilter/source/dmapper/TableManager.hxx   |   
 5 
 9 files changed, 179 insertions(+), 48 deletions(-)

New commits:
commit 2d43c34333076fad092f0cdc0f60f81580acdbee
Author: Miklos Vajna 
AuthorDate: Fri Sep 15 13:37:41 2023 +0200
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 15:30:20 2023 +0200

Related: tdf#55160 sw floattable, nested DOCX imp: fix inner tbl at cell 
start

The bugdoc has an outer table and also two inner tables: the problematic
one is the floating table anchored at the start of B1, which should
float but does not.

This special-casing was added in commit
c1eebcdac9f2b289fd363399130c485ca5ff444c (tdf#79329 DOCX import: fix
missing outer table with floattable at cell start, 2016-11-08), because
there was no easy way to make sure that an inner floating table at cell
start keeps the outer table import working, and having 2 inline tables
is better than having an inner floating table and no outer table at all.
The root of the problem is that in case an SwXParagraph tracks the outer
cell start and we have an inner floating table, then the inner
conversion to text frame will invalidate that SwXParagraph, so the outer
table conversion will fail.

Fix the problem by creating a cursor at cell start, moving it away,
performing the inner table resolution. And in case the cell start
SwXParagraph is now invalid, then move the cursor back and work with
that position.

The original bugdoc has 2 floating tables at cell start, which is still
broken, but this approach allows fixing that in a later commit; while
the old approach simply didn't notice that the 2nd floating table is
also at cell start.

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

diff --git a/writerfilter/CppunitTest_writerfilter_dmapper.mk 
b/writerfilter/CppunitTest_writerfilter_dmapper.mk
index 21808b1d1ffd..6b7611b41996 100644
--- a/writerfilter/CppunitTest_writerfilter_dmapper.mk
+++ b/writerfilter/CppunitTest_writerfilter_dmapper.mk
@@ -22,6 +22,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,writerfilter_dmapper, \
 writerfilter/qa/cppunittests/dmapper/DomainMapper \
 writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl \
 writerfilter/qa/cppunittests/dmapper/GraphicImport \
+writerfilter/qa/cppunittests/dmapper/TableManager \
 writerfilter/qa/cppunittests/dmapper/TextEffectsHandler \
 writerfilter/qa/cppunittests/dmapper/PropertyMap \
 writerfilter/qa/cppunittests/dmapper/SdtHelper \
diff --git a/writerfilter/qa/cppunittests/dmapper/TableManager.cxx 
b/writerfilter/qa/cppunittests/dmapper/TableManager.cxx
new file mode 100644
index ..1f20ee1f8432
--- /dev/null
+++ b/writerfilter/qa/cppunittests/dmapper/TableManager.cxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+using namespace com::sun::star;
+
+namespace
+{
+/// Tests for writerfilter/source/dmapper/TableManager.cxx.
+class Test : public UnoApiTest
+{
+public:
+Test()
+: UnoApiTest("/writerfilter/qa/cppunittests/dmapper/data/")
+{
+}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedCellStartDOCXImport)
+{
+// Given a document with a nested floating table at cell start and an 
other inner floating table:
+// When importing that document:
+loadFromURL(u"floattable-nested-cellstart.docx");
+
+// Then make sure that both inner tables are floating:
+uno::Reference xFramesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFrames(xFramesSupplier->getTextFrames(),
+uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 2
+// - Actual  : 1
+// i.e. the first inner t

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

2023-09-15 Thread Julien Nabet (via logerrit)
 svx/source/svdraw/svdpage.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 17cd1dacf6a4b587b524edc7384ff26990208132
Author: Julien Nabet 
AuthorDate: Thu Sep 14 22:50:37 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 15 13:45:17 2023 +0200

tdf#157174: fix crash when clicking "Print Preview"

Don't call Reformat method when treating a virtual SdrObject

bt:
4  0x7fd7ff446eb4 in SdrObject::GetBroadcaster() const (this=0x4) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdobj.cxx:698
5  0x7fd7ff48eaee in SdrEdgeObj::Reformat() (this=0x564e82ef22d0) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdoedge.cxx:1666
6  0x7fd7ff551bd9 in SdrObjList::ImplReformatAllEdgeObjects(SdrObjList 
const&) (this=0x564e82a371e0, rObjList=...) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:760
7  0x7fd7ff551b38 in SdrObjList::ReformatAllEdgeObjects() 
(this=0x564e82a371e0) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:744
8  0x7fd7ff3d8d1c in SdrModel::ImpReformatAllEdgeObjects() 
(this=0x564e7f79dc50) at 
/home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:752
9  0x7fd7ff3dda3b in SdrModel::setLock(bool) (this=0x564e7f79dc50, 
bLock=false) at /home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:1618
10 0x7fd7c58a9a76 in SwView::~SwView() (this=0x564e82e7bb00) at 
/home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1163
11 0x7fd7c58a9f99 in SwView::~SwView() (this=0x564e82e7bb00) at 
/home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1122
12 0x7fd801835308 in SfxViewFrame::SwitchToViewShell_Impl(unsigned 
short, bool) (this=0x564e82b17680, nViewIdOrNo=1, bIsIndex=true) at 
/home/julien/lo/libreoffice/sfx2/source/view/viewfrm.cxx:2528

See complete bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=189470

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

diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 840d9d6cc0e7..8570a2157295 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -754,7 +754,9 @@ void SdrObjList::ImplReformatAllEdgeObjects(const 
SdrObjList& rObjList)
 const bool bIsGroup(nullptr != pChildren);
 if(!bIsGroup)
 {
-if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge)
+// Check IsVirtualObj because sometimes we get SwDrawVirtObj here
+if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge
+   && !pSdrObject->IsVirtualObj())
 {
 SdrEdgeObj* pSdrEdgeObj = static_cast< SdrEdgeObj* 
>(pSdrObject);
 pSdrEdgeObj->Reformat();


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

2023-09-15 Thread Rafael Lima (via logerrit)
 sc/source/ui/formdlg/dwfunctr.cxx |  137 +++---
 sc/source/ui/inc/dwfunctr.hxx |8 +
 sc/source/ui/view/tabvwsh3.cxx|3 
 sc/uiconfig/scalc/ui/functionpanel.ui |   36 
 4 files changed, 166 insertions(+), 18 deletions(-)

New commits:
commit b5a8cdbd71a61c76f2b1a6ad33b0757911603184
Author: Rafael Lima 
AuthorDate: Tue Jul 25 22:42:49 2023 +0200
Commit: Rafael Lima 
CommitDate: Fri Sep 15 13:25:49 2023 +0200

tdf#122718 Add search functionality to the Functions sidebar

With this patch it is possible to search the list of functions in the 
Functions sidebar.

To use this feature:
1) In Calc, go to View - Function List
2) The Functions sidebar will open with the "Search" entry focused
3) You can now type your search
4) With the "Search" entry focused, it is possible to use the arrow keys 
(up/down) to select the function to insert
5) Press "Enter" to insert the function

The Escape key will clear the search box and F1 will open the help page of 
the selected function.

Change-Id: I1af6c1c2489ff736c44e1b3750bea21c05786602
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154917
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/sc/source/ui/formdlg/dwfunctr.cxx 
b/sc/source/ui/formdlg/dwfunctr.cxx
index 8fde50549be1..d158a4aada69 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -29,6 +30,8 @@
 #include 
 
 #include 
+#include 
+#include 
 
 /*
 #*  Member: ScFunctionWin
@@ -50,6 +53,7 @@ ScFunctionWin::ScFunctionWin(weld::Widget* pParent)
 , xFuncList(m_xBuilder->weld_tree_view("funclist"))
 , xInsertButton(m_xBuilder->weld_button("insert"))
 , xFiFuncDesc(m_xBuilder->weld_text_view("funcdesc"))
+, m_xSearchString(m_xBuilder->weld_entry("search"))
 , xConfigListener(new 
comphelper::ConfigurationListener("/org.openoffice.Office.Calc/Formula/Syntax"))
 , 
xConfigChange(std::make_unique(xConfigListener, 
this))
 , pFuncDesc(nullptr)
@@ -57,11 +61,15 @@ ScFunctionWin::ScFunctionWin(weld::Widget* pParent)
 InitLRUList();
 
 nArgs=0;
-m_aHelpId = xFuncList->get_help_id();
+m_aListHelpId = xFuncList->get_help_id();
+m_aSearchHelpId = m_xSearchString->get_help_id();
 
 // Description box has a height of 8 lines of text
 xFiFuncDesc->set_size_request(-1, 8 * xFiFuncDesc->get_text_height());
 
+m_xSearchString->connect_changed(LINK(this, ScFunctionWin, ModifyHdl));
+m_xSearchString->connect_key_press(LINK(this, ScFunctionWin, KeyInputHdl));
+
 xCatBox->connect_changed(LINK( this, ScFunctionWin, SelComboHdl));
 xFuncList->connect_changed(LINK( this, ScFunctionWin, SelTreeHdl));
 
@@ -100,7 +108,7 @@ ScFunctionWin::~ScFunctionWin()
 }
 
 /*
-#*  Member: UpdateFunctionList
+#*  Member: InitLRUList
 #*
 #*
 #*  Class:  ScFunctionWin
@@ -121,11 +129,11 @@ void ScFunctionWin::InitLRUList()
 sal_Int32 nSelPos  = xCatBox->get_active();
 
 if (nSelPos == 0)
-UpdateFunctionList();
+UpdateFunctionList("");
 }
 
 /*
-#*  Member: UpdateFunctionList
+#*  Member: UpdateLRUList
 #*
 #*
 #*  Class:  ScFunctionWin
@@ -183,7 +191,7 @@ void ScFunctionWin::SetDescription()
 if (!sHelpId.isEmpty())
 xFuncList->set_help_id(pDesc->getHelpId());
 else
-xFuncList->set_help_id(m_aHelpId);
+xFuncList->set_help_id(m_aListHelpId);
 }
 }
 
@@ -195,13 +203,13 @@ void ScFunctionWin::SetDescription()
 #*
 #*  Function:   Updates the list of functions depending on the set category
 #*
-#*  Input:  ---
+#*  Input:  Search string used to filter the list of functions
 #*
 #*  Output: ---
 #*
 #/
 
-void ScFunctionWin::UpdateFunctionList()
+void ScFunctionWin::UpdateFunctionList(const OUString& rSearchString)
 {
 sal_Int32  nSelPos   = xCatBox->get_active();
 sal_Int32  nCategory = ( -1 != nSelPos )
@@ -214,12 +222,32 @@ void ScFunctionWin::UpdateFunctionList()
 {
 ScFunctionMgr* pFuncMgr = ScGlobal::GetStarCalcFunctionMgr();
 
+SvtSysLocale aSysLocale;
+const CharClass& rCharClass = aSysLocale.GetCharClass();
+const OUString aSearchStr(rCharClass.uppercase(rSearchString));
+
+// First add the functions that start with the search string
 const ScFuncDesc* pDesc = pFuncMgr->First( 

Re: MAKEFLAGS ignored?

2023-09-15 Thread Dan Horák
On Fri, 15 Sep 2023 11:11:29 +0200
Michael Stahl  wrote:

> hi Dan,
> 
> On 07/09/2023 13:36, Dan Horák wrote:
> > Hello,
> > 
> > I was trying to pass the "--keep-going" option to the Makefile via the
> > MAKEFLAGS [1] to get as much test failures as possible in a single run,
> > but it seems to be ignored. After reading the make manual for the value
> > function [2], I think GMAKE_OPTIONS definition should rather look like
> > 
> > -export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
> > +export GMAKE_OPTIONS?=-r$(if $(verbose),,s) $(value MAKEFLAGS)
> > 
> > What do you think?
> 
> this looks rather odd indeed, and i guess you're the first person to try 
> setting MAKEFLAGS manually.
> 
> probably it's best to change it as you suggest.

ok, https://gerrit.libreoffice.org/c/core/+/156942 then :-)


Dan


Re: testListLabelPDFExport segfaulting

2023-09-15 Thread Dan Horák
On Thu, 14 Sep 2023 10:50:35 +0200
Stephan Bergmann  wrote:

> On 9/14/23 09:44, Dan Horák wrote:
> > On Thu, 14 Sep 2023 09:16:38 +0200
> > Stephan Bergmann  wrote:
> >> I'd suggest to rather make execution of the test dependent on
> >> $(ENABLE_PDFIUM), or on PDFIUM in $(BUILD_TYPE) (cf. configure.ac).
> >> (Otherwise, you would silently hide errors when parsePDFExport()
> >> erroneously returns null.)
> > 
> > if I read
> > https://opengrok.libreoffice.org/xref/core/test/source/unoapi_test.cxx?r=58ab2f00#213
> > right, then parsePDFExport() can return NULL only when built without
> > pdfium. There is an assert checking NULL value returned from
> > pPDFium->openDocument(). Thus we shouldn't be hiding anything, I
> > believe.
> 
> Yeah, it can only return null when vcl::pdf::PDFiumLibrary::get() 
> returns null.  Which in turn can only happen when that uses 
> vcl/source/pdf/DummyPDFiumLibrary.cxx rather than 
> vcl/source/pdf/PDFiumLibrary.cxx.  A bit of an indirection, so I guess I 
> would still use the explicit $(ENABLE_PDFIUM) way, but of course leave 
> it up to you.

I went with the runtime check [1], using the $(ENABLE_PDFIUM) on the
Makefile level we would lose the whole CppunitTest_sw_globalfilter and
there is not HAVE_PDFIUM define to exclude the testListLabelPDFExport.

[1] https://gerrit.libreoffice.org/c/core/+/156940


Dan


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

2023-09-15 Thread Tomaž Vajngerl (via logerrit)
 sc/qa/unit/data/xlsx/RowImportCellStyleIssue.xlsx |binary
 sc/qa/unit/subsequent_filters_test2.cxx   |   32 ++
 sc/subsequent_setup.mk|1 
 3 files changed, 33 insertions(+)

New commits:
commit 2586213c1790bd419442f3376af661168bbe8508
Author: Tomaž Vajngerl 
AuthorDate: Wed Sep 13 22:18:43 2023 +0200
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 12:49:39 2023 +0200

sc: add test for the row import default index issue

Change-Id: I09f94977602122ac751cc64dc7c3cec1a954aea8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156901
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit bbd1cae866630e1545b603b2b31417713d63d226)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156914
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sc/qa/unit/data/xlsx/RowImportCellStyleIssue.xlsx 
b/sc/qa/unit/data/xlsx/RowImportCellStyleIssue.xlsx
new file mode 100644
index ..980cdd35a0d6
Binary files /dev/null and b/sc/qa/unit/data/xlsx/RowImportCellStyleIssue.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index f2fd4196dfa1..75a7ae4059bd 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -29,6 +29,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -193,6 +195,7 @@ public:
 void testTdf82984_zip64XLSXImport();
 void testSingleLine();
 void testNamedTableRef();
+void testRowImportCellStyleIssue();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest2);
 
@@ -316,6 +319,7 @@ public:
 CPPUNIT_TEST(testTdf82984_zip64XLSXImport);
 CPPUNIT_TEST(testSingleLine);
 CPPUNIT_TEST(testNamedTableRef);
+CPPUNIT_TEST(testRowImportCellStyleIssue);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -3095,6 +3099,34 @@ void ScFiltersTest2::testNamedTableRef()
 }
 }
 
+void ScFiltersTest2::testRowImportCellStyleIssue()
+{
+// Test checks that the correct cell style is imported for the first 6 
rows and then the rest of the rows.
+// Row 1 to 6 have no background color, after that light2 (background2) 
theme color.
+
+createScDoc("xlsx/RowImportCellStyleIssue.xlsx");
+ScDocument* pDoc = getScDoc();
+
+// Check cell A6 - should have no background color set
+{
+const ScPatternAttr* pAttr = pDoc->GetPattern(0, 5, 0); // A6
+const SfxPoolItem& rItem = pAttr->GetItem(ATTR_BACKGROUND);
+const SvxBrushItem& rBackground = static_cast(rItem);
+CPPUNIT_ASSERT_EQUAL(false, rBackground.isUsed());
+}
+
+// Check cell A7 - should have light2 (background2) theme color set
+{
+const ScPatternAttr* pAttr = pDoc->GetPattern(0, 6, 0); // A7
+const SfxPoolItem& rItem = pAttr->GetItem(ATTR_BACKGROUND);
+const SvxBrushItem& rBackground = static_cast(rItem);
+CPPUNIT_ASSERT_EQUAL(true, rBackground.isUsed());
+CPPUNIT_ASSERT_EQUAL(Color(0xe7e6e6), rBackground.GetColor());
+auto const& rComplexColor = rBackground.getComplexColor();
+CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Light2, 
rComplexColor.getThemeColorType());
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScFiltersTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/subsequent_setup.mk b/sc/subsequent_setup.mk
index 6847aca1a775..4cf9b34f984e 100644
--- a/sc/subsequent_setup.mk
+++ b/sc/subsequent_setup.mk
@@ -30,6 +30,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sc_subsequent_$(1), \
 cppu \
 cppuhelper \
 drawinglayer \
+docmodel \
 editeng \
 for \
 forui \


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

2023-09-15 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/test/weakbase.cxx  |   51 +++-
 compilerplugins/clang/test/weakobject.cxx|   31 -
 compilerplugins/clang/weakbase.cxx   |   74 ---
 compilerplugins/clang/weakobject.cxx |   85 ---
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 solenv/clang-format/excludelist  |1 
 6 files changed, 113 insertions(+), 130 deletions(-)

New commits:
commit 2876b31eee9b2946dfaa74b17645c6812c7a20db
Author: Noel Grandin 
AuthorDate: Fri Sep 15 11:03:18 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 15 12:48:29 2023 +0200

loplugin, merge weakobject into weakbase

and make them support virtual bases, even though the bridge code does
not support that (yet)

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

diff --git a/compilerplugins/clang/test/weakbase.cxx 
b/compilerplugins/clang/test/weakbase.cxx
index a59a5372891e..3d5284ef543c 100644
--- a/compilerplugins/clang/test/weakbase.cxx
+++ b/compilerplugins/clang/test/weakbase.cxx
@@ -25,10 +25,59 @@ struct Foo2 : public tools::WeakBase
 virtual ~Foo2();
 };
 
-// expected-error@+1 {{multiple copies of WeakBase, through inheritance paths 
Bar->Foo1->WeakBase, Bar->Foo2->WeakBase [loplugin:weakbase]}}
+// expected-error@+1 {{found multiple copies of tools::WeakBase, through 
inheritance paths Bar->Foo1->WeakBase, Bar->Foo2->WeakBase [loplugin:weakbase]}}
 struct Bar : public Foo1, public Foo2
 {
 virtual ~Bar();
 };
 
+namespace cppu
+{
+class OWeakObject
+{
+};
+}
+
+namespace test2
+{
+class Foo1 : public cppu::OWeakObject
+{
+};
+class Foo2 : public cppu::OWeakObject
+{
+};
+// expected-error@+1 {{found multiple copies of cppu::OWeakObject, through 
inheritance paths Foo3->Foo1->OWeakObject, Foo3->Foo2->OWeakObject 
[loplugin:weakbase]}}
+class Foo3 : public Foo1, public Foo2
+{
+};
+}
+
+namespace test3
+{
+class Foo1 : public virtual cppu::OWeakObject
+{
+};
+class Foo2 : public virtual cppu::OWeakObject
+{
+};
+// no warning expected
+class Foo3 : public Foo1, public Foo2
+{
+};
+}
+
+namespace test4
+{
+class Foo1 : public cppu::OWeakObject
+{
+};
+class Foo2 : public virtual cppu::OWeakObject
+{
+};
+// expected-error@+1 {{found one virtual base and one or more normal bases of 
cppu::OWeakObject, through inheritance paths Foo3->Foo1->OWeakObject, 
Foo3->Foo2->OWeakObject [loplugin:weakbase]}}
+class Foo3 : public Foo1, public Foo2
+{
+};
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/weakobject.cxx 
b/compilerplugins/clang/test/weakobject.cxx
deleted file mode 100644
index 7c7da55664d2..
--- a/compilerplugins/clang/test/weakobject.cxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- 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 "config_clang.h"
-
-namespace cppu
-{
-class OWeakObject
-{
-};
-}
-
-class Foo1 : public cppu::OWeakObject
-{
-};
-class Foo2 : public cppu::OWeakObject
-{
-};
-
-// expected-error@+1 {{more than one copy of cppu::OWeakObject inherited 
[loplugin:weakobject]}}
-class Foo3 : public Foo1, public Foo2
-{
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/compilerplugins/clang/weakbase.cxx 
b/compilerplugins/clang/weakbase.cxx
index 666444ff7ffb..f6f7c8db01be 100644
--- a/compilerplugins/clang/weakbase.cxx
+++ b/compilerplugins/clang/weakbase.cxx
@@ -15,6 +15,7 @@
 #include 
 
 #include "plugin.hxx"
+#include "check.hxx"
 #include "clang/AST/CXXInheritance.h"
 
 /**
@@ -69,7 +70,11 @@ bool WeakBase::VisitCXXRecordDecl(CXXRecordDecl const* 
recordDecl)
 return true;
 
 int noWeakBases = 0;
-std::string basePaths;
+int noWeakObjects = 0;
+bool foundVirtualWeakBase = false;
+bool foundVirtualOWeakObject = false;
+std::string basePaths1;
+std::string basePaths2;
 auto BaseMatchesCallback = [&](const CXXBaseSpecifier* cxxBaseSpecifier, 
CXXBasePath& Paths) {
 if (!cxxBaseSpecifier->getType().getTypePtr())
 return false;
@@ -78,9 +83,30 @@ bool WeakBase::VisitCXXRecordDecl(CXXRecordDecl const* 
recordDecl)
 return false;
 if (baseCXXRecordDecl->isInvalidDecl())
 return false;
-if (baseCXXRecordDecl->getName() != "WeakBase")
+bool isWeakBase(loplugin::DeclCheck(baseCXXRecordDecl)
+.Struct("WeakBase")
+.Namespace("tools")
+

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

2023-09-15 Thread Khaled Hosny (via logerrit)
 starmath/source/node.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit a15762233047a75588f8c5da1cee1134f1259417
Author: Khaled Hosny 
AuthorDate: Thu Sep 14 20:03:36 2023 +0300
Commit: خالد حسني 
CommitDate: Fri Sep 15 12:44:05 2023 +0200

starmath: Improve root rendering for fonts other than OpenSymbol

The radical glyph in OpenSymbol is aligned to the font ascender, which
is not essentially true for other fonts, so we now use the bounding
rectangle of the glyph to get accurate positioning.

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

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 1572d5f8e67e..92eafe8dbccb 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -769,6 +769,12 @@ void SmRootNode::Arrange(OutputDevice &rDev, const 
SmFormat &rFormat)
 
 pRootSym->Arrange(rDev, rFormat);
 
+// Set the top and bottom of the root symbol to the top and bottom of its 
glyph bounding rect,
+// to get accurate position of the root symbol.
+SmRect rRootSymRect = pRootSym->AsGlyphRect();
+pRootSym->SetTop(rRootSymRect.GetTop());
+pRootSym->SetBottom(rRootSymRect.GetBottom());
+
 Point  aPos = pRootSym->AlignTo(*pBody, RectPos::Left, 
RectHorAlign::Center, RectVerAlign::Baseline);
 //! override calculated vertical position
 aPos.setY( pRootSym->GetTop() + pBody->GetBottom() - pRootSym->GetBottom() 
);


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

2023-09-15 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |   17 
++
 sw/source/filter/ww8/docxattributeoutput.cxx   |   16 +
 3 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 08e9d6544314cbcde068a4ab9e25ebb277f8cfe1
Author: Miklos Vajna 
AuthorDate: Thu Sep 14 08:29:30 2023 +0200
Commit: Caolán McNamara 
CommitDate: Fri Sep 15 12:05:10 2023 +0200

Related: tdf#55160 sw floattable, nested DOCX exp: fix inner tbl at cell 
start

A cut-down bugdoc had an inline table, and an inner floating table,
anchored in the start of the C1 cell.

Exporting to DOCX resulted in a layout that looks like the floating
table is not anchored inside the outer table anymore. Checking the
markup, the floating table was written between row 1 & row 2, which is
not a valid position for a floating table. Probably the intention was to
write the floating table before the first paragraph in C1.

Fix the problem by still writing the floating table in
DocxAttributeOutput::StartParagraph(), before opening , but do this
after opening table/row/cell, which is late enough to have a correct
anchor but is early enough to be still outside the paragraph.

The import side of this still needs fixing.

(cherry picked from commit d50e5d6d53c94124f825758a74e186b934fc2a4e)

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

diff --git a/sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt 
b/sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt
new file mode 100644
index ..3e2ed72eca8c
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 0f9e8c08d8a7..f83742a7c114 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -175,6 +175,23 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedDOCXExport)
 assertXPath(pXmlDoc, "//w:tblpPr", 2);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedCellStartDOCXExport)
+{
+// Given a document with a nested floating table at cell start:
+createSwDoc("floattable-nested-cell-start.odt");
+
+// When exporting to DOCX:
+save("Office Open XML Text");
+
+// Then make sure both floating table is exported at the right position:
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+// Without the accompanying fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+// i.e. the inner  was between the two , not inside the C1 
cell.
+assertXPath(pXmlDoc, "//w:tc/w:tbl/w:tblPr/w:tblpPr", 1);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testWpgOnly, "wpg-only.docx")
 {
 uno::Reference xShape = getShape(1);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index da6824648b28..f557065eb739 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -516,13 +516,6 @@ sal_Int32 
DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p
 if ( !m_aFramesOfParagraph.size() || !m_nTextFrameLevel )
 m_aFramesOfParagraph.push(std::vector());
 
-// look ahead for floating tables that were put into a frame during import
-// floating tables in shapes are not supported: exclude this case
-if (!m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen())
-{
-checkAndWriteFloatingTables(*this);
-}
-
 if ( m_nColBreakStatus == COLBRK_POSTPONE )
 m_nColBreakStatus = COLBRK_WRITE;
 
@@ -570,6 +563,15 @@ sal_Int32 
DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p
 }
 }
 
+// look ahead for floating tables that were put into a frame during import
+// floating tables in shapes are not supported: exclude this case
+if (!m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen())
+{
+// Do this after opening table/row/cell, so floating tables anchored 
at cell start go inside
+// the cell, not outside.
+checkAndWriteFloatingTables(*this);
+}
+
 // Look up the "sdt end before this paragraph" property early, when it
 // would normally arrive, it would be too late (would be after the
 // paragraph start has been written).


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

2023-09-15 Thread Caolán McNamara (via logerrit)
 sw/source/core/frmedt/feshview.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit c1e922b3718358d65a329b7a74738fc6523348af
Author: Caolán McNamara 
AuthorDate: Thu Sep 14 20:18:55 2023 +0100
Commit: Michael Stahl 
CommitDate: Fri Sep 15 11:51:35 2023 +0200

crashreporting: apparent null deref at 
SwFEShell::IsShapeDefaultHoriTextDirR2L

https: 
//crashreport.libreoffice.org/stats/crash_details/73028951-19a0-409b-89d2-a080495df925
Change-Id: I440465a3c7d5b98ecdd1c5f1973a2b8f64d6772e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156888
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 7a33e2f4c6a1a3c489b6deaeaae1489acb0aa389)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156889
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index aec1e9693d7f..8e91c2af68cd 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -3320,8 +3320,11 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
 if ( dynamic_cast( pSdrObj) ==  nullptr )
 {
 // determine page frame of the frame the shape is anchored.
-const SwFrame* pAnchorFrame =
-
static_cast(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj );
+const SwContact* pContact = GetUserCall(pSdrObj);
+OSL_ENSURE( pContact, 
" - missing contact!" );
+if (!pContact)
+return false;
+const SwFrame* pAnchorFrame = static_cast(pContact)->GetAnchorFrame( pSdrObj );
 OSL_ENSURE( pAnchorFrame, "inconsistent model - no anchor at 
shape!");
 if ( pAnchorFrame )
 {


Re: Adding an implemented UNO interface

2023-09-15 Thread Michael Stahl

On 05/09/2023 14:29, Lionel Élie Mamane wrote:

On Tue, Sep 05, 2023 at 08:34:56AM +0200, Noel Grandin wrote:

On Mon, 4 Sept 2023 at 21:54, Noel Grandin  wrote:

On Mon, 4 Sept 2023 at 20:43, Lionel Élie Mamane  wrote:



becomes an ambiguous base of class bar, as it is derived from twice
:-|



Likely you will have to implement disambiguation overrides like:



virtual SAL_CALL void setFoo() override { Baseclass::setFoo(); }


Pierre is more courageous than I anticipated, and it looks like he
will just change grault (in reality OMetaConnection) to declare
implementation of qux2 (which is css::sdbc::XConnection2) and change
all derived classes that derive from grault to actually implement
qux2.

An alternative idea I have is to make grault a templated class,
templated on which interface(s) it declares. Will try to do that.

Also, since I'm starting to think that we should maybe split qux2 into
several different interfaces that can optionally be implemented or
not, I would like to understand the UNO interface mechanism details
better: is there a difference between


it depends ... i think in terms of what is being produced from the IDL 
files, these 2 examples are the same.


but the intent is a bit different:


interface qux2: qux
{
   void method();
}


this is a single-inheritance interface; with this syntax only one 
super-interface can be specified.


usually a UNO service would be composed from multiple orthogonal 
single-inheritance interfaces (every interface inherits implicitly from 
XInterface), i.e. the service IDL file would list them all.



and

interface qux2
{
   interface qux;
   void method();
}

and if yes, what is the difference?


this is a multiple-inheritance interface.

it exists mainly for one purpose: the "new" style UNO services are not 
composed directly from multiple orthogonal interfaces - instead there is 
an additional "layer" of one multiple-interitance interface that is then 
the interface mentioned in the service.


this has the advantage for the user that the factory can return the 
multiple-inheritance interface for the service and many different 
methods can be called without queryInterface.


but in this case, i suspect it may be considered unidiomatic if the 
multiple-inheritance interface specifies additional methods in addition 
to the ones inherited, so for this example i'd prefer the first one.




Re: MAKEFLAGS ignored?

2023-09-15 Thread Michael Stahl

hi Dan,

On 07/09/2023 13:36, Dan Horák wrote:

Hello,

I was trying to pass the "--keep-going" option to the Makefile via the
MAKEFLAGS [1] to get as much test failures as possible in a single run,
but it seems to be ignored. After reading the make manual for the value
function [2], I think GMAKE_OPTIONS definition should rather look like

-export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
+export GMAKE_OPTIONS?=-r$(if $(verbose),,s) $(value MAKEFLAGS)

What do you think?


this looks rather odd indeed, and i guess you're the first person to try 
setting MAKEFLAGS manually.


probably it's best to change it as you suggest.


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

2023-09-15 Thread Stephan Bergmann (via logerrit)
 include/rtl/string.hxx  |   12 ++--
 include/rtl/ustring.hxx |   24 ++--
 2 files changed, 4 insertions(+), 32 deletions(-)

New commits:
commit b9ffee3074d8eb0e95b3d8f78cb7aac10b41c279
Author: Stephan Bergmann 
AuthorDate: Wed Sep 13 13:18:51 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 15 11:09:13 2023 +0200

StringHolder detour is only really needed for ""_tstr

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

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index eae18bc30d0d..eb7f137a203c 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -146,7 +146,7 @@ private:
 
 public:
 // (Data members must be public so that OStringLiteral is a structural 
type that can be used as
-// a non-type template parameter type for rtl::detail::OStringHolder:)
+// a non-type template parameter type for operator ""_ostr and 
rtl::detail::OStringHolder:)
 union {
 rtl_String str;
 Data more = {};
@@ -2405,15 +2405,7 @@ constexpr
 rtlunittest::
 #endif
 OString
-operator ""_ostr() {
-return
-#if defined RTL_STRING_UNITTEST
-rtlunittest
-#else
-rtl
-#endif
-::detail::OStringHolder::literal;
-}
+operator ""_ostr() { return L; }
 
 template<
 #if defined RTL_STRING_UNITTEST
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index c273c76ace6a..34d4fd8f5be5 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -128,7 +128,7 @@ private:
 
 public:
 // (Data members must be public so that OUStringLiteral is a structural 
type that can be used as
-// a non-type template parameter type for rtl::detail::OUStringHolder:)
+// a non-type template parameter type for operator ""_ustr:)
 union {
 rtl_uString str;
 Data more = {};
@@ -175,18 +175,6 @@ private:
 rtl_uString* pData;
 };
 
-#if __cplusplus >= 202002L
-
-namespace detail {
-
-template struct OUStringHolder {
-static constexpr auto & literal = L;
-};
-
-}
-
-#endif
-
 /// @endcond
 #endif
 
@@ -3614,15 +3602,7 @@ constexpr
 rtlunittest::
 #endif
 OUString
-operator ""_ustr() {
-return
-#if defined RTL_STRING_UNITTEST
-rtlunittest
-#else
-rtl
-#endif
-::detail::OUStringHolder::literal;
-}
+operator ""_ustr() { return L; }
 
 #endif
 


Re: Import of wordprocessing canvas

2023-09-15 Thread Miklos Vajna
Hi Regina,

On Thu, Sep 14, 2023 at 03:55:48PM +0200, Regina Henschel 
 wrote:
> Rotated shapes with rotated text:
> The VML import uses the draw object label text and thus the text is rotated.
> My DML import uses the same import as in Writer. That means that text is in
> an associated frame and therefore cannot rotate.
> 
> So what to do? Go that way nevertheless? Give the user an option what kind
> of import he wants? Or?

For the shape-with-rotated text part, I would suggest to go that way
neverhtheless. Sooner or later we'll have to solve the lack of rotation
for the same "drawingML in wps/wpg" case anyway, and the various other
improvements you get by moving to drawingML for wpc seems to outweight
the trouble of rotated text.

Regards,

Miklos


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

2023-09-15 Thread Caolán McNamara (via logerrit)
 sw/source/core/frmedt/feshview.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 0d9c73734dcd5c1bdff41281afcb415db0f95377
Author: Caolán McNamara 
AuthorDate: Thu Sep 14 20:18:55 2023 +0100
Commit: Xisco Fauli 
CommitDate: Fri Sep 15 09:32:54 2023 +0200

crashreporting: apparent null deref at 
SwFEShell::IsShapeDefaultHoriTextDirR2L

https: 
//crashreport.libreoffice.org/stats/crash_details/73028951-19a0-409b-89d2-a080495df925
Change-Id: I440465a3c7d5b98ecdd1c5f1973a2b8f64d6772e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156888
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 1c19ffb4eca4..eefb9d6d0643 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -3359,8 +3359,11 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
 if ( dynamic_cast( pSdrObj) ==  nullptr )
 {
 // determine page frame of the frame the shape is anchored.
-const SwFrame* pAnchorFrame =
-
static_cast(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj );
+const SwContact* pContact = GetUserCall(pSdrObj);
+OSL_ENSURE( pContact, 
" - missing contact!" );
+if (!pContact)
+return false;
+const SwFrame* pAnchorFrame = static_cast(pContact)->GetAnchorFrame( pSdrObj );
 OSL_ENSURE( pAnchorFrame, "inconsistent model - no anchor at 
shape!");
 if ( pAnchorFrame )
 {


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

2023-09-15 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a0e97ccc7bdd5ba7ca79f490f92c6cefc3595fa9
Author: Caolán McNamara 
AuthorDate: Tue Sep 12 10:23:19 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 09:13:44 2023 +0200

tdf#157148 ensure we auto-scroll to current location to make it visible

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 3a735afa38ae..cf7d03972bee 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1705,6 +1705,8 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 
nStart, sal_Int32 nEnd,
 if (!bCurrentSelectionInRange)
 {
 m_xEditView->SetSelection(ESelection(0, nStart));
+// tdf#157148 ensure current location is auto-scrolled to be visible
+m_xEditView->ShowCursor();
 }
 
 Invalidate();


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-4' - bin/lo-all-static-libs download.lst external/libwebp RepositoryExternal.mk

2023-09-15 Thread Caolán McNamara (via logerrit)
 RepositoryExternal.mk  |1 +
 bin/lo-all-static-libs |1 +
 download.lst   |4 ++--
 external/libwebp/Makefile.vc.patch |   28 ++--
 4 files changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 8f48fce90e8f1334fbf0e653a159cebeca7f1dc0
Author: Caolán McNamara 
AuthorDate: Wed Jun 14 10:08:13 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 09:06:53 2023 +0200

tdf#157231 CVE-2023-4863 upgrade to libwebp-1.3.2.tar.gz

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index ccc92790341e..cfdc3ca8219d 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2690,6 +2690,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
+   -L$(call gb_UnpackedTarball_get_dir,libwebp)/sharpyuv/.libs -lsharpyuv \
 )
 endif
 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs
index af4ff25f348b..3db8d803d07a 100755
--- a/bin/lo-all-static-libs
+++ b/bin/lo-all-static-libs
@@ -125,6 +125,7 @@ echo $INSTDIR/$LIBO_LIB_FOLDER/lib*.a \
  $WORKDIR/UnpackedTarball/libvisio/src/lib/.libs/*.a \
  $WORKDIR/UnpackedTarball/libtiff/libtiff/.libs/*.a \
  $WORKDIR/UnpackedTarball/libwebp/src/.libs/*.a \
+ $WORKDIR/UnpackedTarball/libwebp/sharpyuv/.libs/*.a \
  $WORKDIR/UnpackedTarball/libwp?/src/lib/.libs/*.a \
  $WORKDIR/UnpackedTarball/raptor/src/.libs/*.a \
  $WORKDIR/UnpackedTarball/rasqal/src/.libs/*.a \
diff --git a/download.lst b/download.lst
index d8280e24e2be..d835f016e729 100644
--- a/download.lst
+++ b/download.lst
@@ -350,8 +350,8 @@ LIBTOMMATH_TARBALL := ltm-1.0.zip
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBWEBP_SHA256SUM := 
7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df
-LIBWEBP_TARBALL := libwebp-1.2.4.tar.gz
+LIBWEBP_SHA256SUM := 
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4
+LIBWEBP_TARBALL := libwebp-1.3.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/libwebp/Makefile.vc.patch 
b/external/libwebp/Makefile.vc.patch
index f13c12410e46..41c899921a1c 100644
--- a/external/libwebp/Makefile.vc.patch
+++ b/external/libwebp/Makefile.vc.patch
@@ -1,7 +1,7 @@
 --- Makefile.vc.sav2021-07-30 00:55:37.0 +0200
 +++ Makefile.vc2022-01-25 17:35:30.206117700 +0100
-@@ -7,11 +7,11 @@
- LIBWEBPDEMUX_BASENAME = libwebpdemux
+@@ -8,11 +8,11 @@
+ LIBSHARPYUV_BASENAME = libsharpyuv
  
  !IFNDEF ARCH
 -!IF ! [ cl 2>&1 | find "x86" > NUL ]
@@ -15,7 +15,7 @@
  ARCH = ARM
  !ELSE
  !ERROR Unable to auto-detect toolchain architecture! \
-@@ -27,8 +27,8 @@
+@@ -28,8 +28,8 @@
  ## Nothing more to do below this line!
  
  NOLOGO = /nologo
@@ -35,7 +35,7 @@
  DIROBJ = $(DIRBASE)\obj
  DIRLIB = $(DIRBASE)\lib
  DIRINC = $(DIRBASE)\include
-@@ -86,10 +86,10 @@
+@@ -87,10 +87,10 @@
  
  # Target configuration
  !IF "$(CFG)" == "release-static"
@@ -48,9 +48,9 @@
  RTLIB  = $(RTLIBD)
  STATICLIBBUILD = TRUE
  LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
-@@ -97,11 +97,11 @@
- LIBWEBPMUX_BASENAME = $(LIBWEBPMUX_BASENAME)_debug
+@@ -99,11 +99,11 @@
  LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
+ LIBSHARPYUV_BASENAME = $(LIBSHARPYUV_BASENAME)_debug
  !ELSE IF "$(CFG)" == "release-dynamic"
 -CC= $(CCNODBG)
 +CC_= $(CCNODBG)
@@ -62,7 +62,7 @@
  RC= $(RCDEBUG)
  RTLIB = $(RTLIBD)
  DLLBUILD  = TRUE
-@@ -112,7 +112,7 @@
+@@ -115,7 +115,7 @@
  !ENDIF
  
  !IF "$(STATICLIBBUILD)" == "TRUE"
@@ -71,25 +71,25 @@
  CFGSET = TRUE
  LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME).lib
  LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME).lib
-@@ -120,7 +120,7 @@
+@@ -123,7 +123,7 @@
  LIBWEBPDEMUX = $(DIRLIB)\$(LIBWEBPDEMUX_BASENAME).lib
+ LIBSHARPYUV = $(DIRLIB)\$(LIBSHARPYUV_BASENAME).lib
  !ELSE IF "$(DLLBUILD)" == "TRUE"
- DLLINC = webp_dll.h
--CC = $(CC) /I$(DIROBJ) /FI$(DLLINC) $(RTLIB) /DWEBP_DLL
-+CC_ = $(CC_) /I$(DIROBJ) /FI$(DLLINC) $(RTLIB) /DWEBP_DLL
+-CC = $(CC) /I$(DIROBJ) $(RTLIB) /DWEBP_DLL
++CC_ = $(CC_) /I$(DIROBJ) $(RTLIB) /DWEBP_DLL
  LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME)_dll.lib
  LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME)_dll.lib
  LIBWEBPMUX = $(DIRLIB)\$(LIBWEBPMUX_BASENAME)_dll.lib
-@@ -421,7 +421,7 @@
- $(DIROBJ)\$(DLLINC)
+@@ -434,7 +434,7 @@
  
+ !IF "$(DLLBUILD)" == "TRUE"
  {$(DIROBJ)}.c{$(DIROBJ)}.obj:
 -  $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@  $<
 +  $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@  $<
  
  {src}.rc{$(DIROBJ)}.res:
$(RC) /fo$@ $<
-@@ -469,41 +469,41 @@

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

2023-09-15 Thread Miklos Vajna (via logerrit)
 sw/source/core/doc/docredln.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f1e4401dfbe7631de5de04960bebb72537618033
Author: Miklos Vajna 
AuthorDate: Thu Sep 14 20:07:47 2023 +0200
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 09:07:05 2023 +0200

sw doc model xml dump: show when a redline is moved

E.g. the DOCX import sets this bit on inserts and deletes.

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

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 752de518accb..205e532712eb 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1168,6 +1168,7 @@ void SwRedlineData::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 break;
 }
 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"), 
BAD_CAST(sRedlineType.getStr()));
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("moved"), 
BAD_CAST(OString::boolean(m_bMoved).getStr()));
 
 (void)xmlTextWriterEndElement(pWriter);
 }