accessibility/source/extended/accessiblelistboxentry.cxx | 5 basegfx/source/tools/bgradient.cxx | 167 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 58 chart2/Library_chartcontroller.mk | 3 chart2/import_setup.mk | 1 chart2/qa/extras/chart2import.cxx | 5 chart2/source/controller/main/ChartController_Tools.cxx | 4 comphelper/source/eventattachermgr/eventattachermgr.cxx | 3 comphelper/source/misc/docpasswordhelper.cxx | 2 comphelper/source/misc/hash.cxx | 6 configure.ac | 2 cui/qa/uitest/dialogs/chardlg.py | 4 cui/qa/uitest/tabpages/tpcolor.py | 4 cui/source/options/dbregister.cxx | 5 cui/source/options/optjava.cxx | 2 cui/source/options/optjava.hxx | 2 cui/source/tabpages/tparea.cxx | 7 cui/uiconfig/ui/areatabpage.ui | 3 docmodel/Library_docmodel.mk | 1 docmodel/source/uno/UnoGradientTools.cxx | 200 download.lst | 8 editeng/source/editeng/impedit5.cxx | 5 include/basegfx/utils/bgradient.hxx | 22 include/comphelper/hash.hxx | 2 include/docmodel/uno/UnoGradientTools.hxx | 33 include/oox/crypto/AgileEngine.hxx | 1 include/oox/crypto/CryptTools.hxx | 1 include/sfx2/namedcolor.hxx | 57 include/sfx2/objsh.hxx | 4 include/sfx2/sfxsids.hrc | 1 include/sfx2/thumbnailviewitem.hxx | 9 include/svx/Palette.hxx | 50 include/svx/PaletteManager.hxx | 1 include/svx/colorwindow.hxx | 3 include/svx/dialog/ThemeDialog.hxx | 2 include/svx/tbcontrl.hxx | 1 include/svx/unoshape.hxx | 6 oox/qa/unit/CryptoTest.cxx | 62 oox/qa/unit/drawingml.cxx | 4 oox/qa/unit/shape.cxx | 23 oox/source/crypto/AgileEngine.cxx | 31 oox/source/crypto/CryptTools.cxx | 6 oox/source/drawingml/customshapeproperties.cxx | 16 oox/source/drawingml/fillproperties.cxx | 9 oox/source/drawingml/fontworkhelpers.cxx | 5 oox/source/export/chartexport.cxx | 13 oox/source/export/drawingml.cxx | 12 oox/source/token/properties.txt | 1 readlicense_oo/license/CREDITS.fodt | 4208 +++++----- reportdesign/source/core/sdr/ReportDrawPage.cxx | 2 ridljar/com/sun/star/lib/util/NativeLibraryLoader.java | 9 sc/UITest_function_wizard.mk | 2 sc/UITest_goalSeek.mk | 2 sc/UITest_inputLine.mk | 2 sc/UITest_key_f4.mk | 2 sc/inc/kahan.hxx | 11 sc/qa/unit/data/ods/tdf150815.ods |binary sc/qa/unit/subsequent_filters_test3.cxx | 22 sc/source/filter/oox/sheetdatacontext.cxx | 2 sc/source/ui/app/transobj.cxx | 2 sc/source/ui/attrdlg/attrdlg.cxx | 7 sc/source/ui/dbgui/pvfundlg.cxx | 18 sc/source/ui/inc/pvfundlg.hxx | 1 sc/source/ui/inc/viewfunc.hxx | 4 sc/source/ui/view/gridwin.cxx | 3 sc/source/ui/view/viewfunc.cxx | 22 sd/CppunitTest_sd_misc_tests.mk | 1 sd/export_setup.mk | 1 sd/qa/unit/data/pptx/tdf152070.pptx |binary sd/qa/unit/data/pptx/tdf156649.pptx |binary sd/qa/unit/data/pptx/tdf156829.pptx |binary sd/qa/unit/data/xml/fdo64586_0.xml | 4 sd/qa/unit/data/xml/n758621_0.xml | 4 sd/qa/unit/data/xml/n758621_1.xml | 4 sd/qa/unit/data/xml/n762695_0.xml | 1 sd/qa/unit/data/xml/n762695_1.xml | 2 sd/qa/unit/data/xml/n819614_0.xml | 2 sd/qa/unit/data/xml/tdf109317_0.xml | 3 sd/qa/unit/export-tests-ooxml1.cxx | 7 sd/qa/unit/export-tests-ooxml2.cxx | 4 sd/qa/unit/export-tests-ooxml3.cxx | 7 sd/qa/unit/export-tests.cxx | 14 sd/qa/unit/import-tests.cxx | 29 sd/qa/unit/import-tests2.cxx | 1 sd/qa/unit/misc-tests.cxx | 6 sfx2/Library_sfx.mk | 1 sfx2/sdi/sfx.sdi | 18 sfx2/source/control/recentdocsviewitem.cxx | 52 sfx2/source/control/recentdocsviewitem.hxx | 9 sfx2/source/control/thumbnailview.cxx | 18 sfx2/source/control/thumbnailviewitem.cxx | 39 sfx2/source/doc/objcont.cxx | 15 sfx2/source/inc/objshimp.hxx | 4 slideshow/source/engine/shapes/drawshape.cxx | 2 svgio/qa/cppunit/SvgImportTest.cxx | 37 svgio/qa/cppunit/data/tdf156569.svg | 4 svgio/source/svgreader/svgcharacternode.cxx | 11 svgio/source/svgreader/svgtools.cxx | 17 svtools/source/control/tabbar.cxx | 6 svx/inc/tbxcolorupdate.hxx | 8 svx/qa/unit/table.cxx | 14 svx/source/customshapes/EnhancedCustomShape2d.cxx | 2 svx/source/dialog/ThemeDialog.cxx | 22 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 15 svx/source/tbxctrls/Palette.cxx | 3 svx/source/tbxctrls/PaletteManager.cxx | 15 svx/source/tbxctrls/tbcontrl.cxx | 15 svx/source/tbxctrls/tbxcolorupdate.cxx | 57 svx/source/unodraw/XPropertyTable.cxx | 24 svx/source/unodraw/shapeimpl.hxx | 7 svx/source/unodraw/unomod.cxx | 6 svx/source/unodraw/unopage.cxx | 14 svx/source/unodraw/unoshap4.cxx | 38 svx/source/xoutdev/xattr.cxx | 17 sw/CppunitTest_sw_core_objectpositioning.mk | 4 sw/CppunitTest_sw_odfexport.mk | 1 sw/qa/core/layout/data/floattable-nested.odt |binary sw/qa/core/layout/data/table-in-footnote.docx |binary sw/qa/core/layout/flycnt.cxx | 70 sw/qa/core/objectpositioning/data/floattable-follow-on-wrong-page.odt |binary sw/qa/core/objectpositioning/data/floattable-vert-orient-top.odt |binary sw/qa/core/objectpositioning/objectpositioning.cxx | 78 sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt | 2 sw/qa/core/text/text.cxx | 2 sw/qa/extras/odfexport/odfexport.cxx | 5 sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx |binary sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 15 sw/qa/extras/ooxmlexport/ooxmlexport19.cxx | 57 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 5 sw/qa/extras/rtfexport/rtfexport.cxx | 5 sw/qa/uitest/writer_tests7/tdf156784.py | 38 sw/rtfexport_setup.mk | 1 sw/sdi/_docsh.sdi | 6 sw/sdi/swriter.sdi | 6 sw/source/core/access/AccessibilityCheck.cxx | 15 sw/source/core/access/AccessibilityIssue.cxx | 32 sw/source/core/crsr/crsrsh.cxx | 9 sw/source/core/frmedt/fetab.cxx | 3 sw/source/core/inc/AccessibilityIssue.hxx | 1 sw/source/core/inc/frame.hxx | 2 sw/source/core/layout/findfrm.cxx | 10 sw/source/core/layout/fly.cxx | 6 sw/source/core/layout/flycnt.cxx | 21 sw/source/core/layout/objectformatter.cxx | 7 sw/source/core/layout/paintfrm.cxx | 3 sw/source/core/layout/tabfrm.cxx | 29 sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx | 16 sw/source/core/table/swtable.cxx | 10 sw/source/core/text/txtfly.cxx | 17 sw/source/uibase/app/apphdl.cxx | 14 sw/source/uibase/app/docst.cxx | 4 translations | 2 vcl/qa/cppunit/GraphicTest.cxx | 14 vcl/qa/cppunit/data/tdf149545.svg | 32 vcl/source/filter/GraphicFormatDetector.cxx | 136 vcl/source/gdi/impgraph.cxx | 79 vcl/source/treelist/svtabbx.cxx | 6 writerfilter/source/dmapper/SdtHelper.cxx | 5 xmloff/qa/unit/data/tdf157018_CustomTheme.fodg | 338 xmloff/qa/unit/draw.cxx | 90 xmloff/source/draw/sdxmlexp.cxx | 5 xmloff/source/draw/ximpshap.cxx | 4 xmloff/source/draw/ximpstyl.cxx | 7 xmloff/source/style/GradientStyle.cxx | 3 xmloff/source/style/TransGradientStyle.cxx | 3 166 files changed, 4169 insertions(+), 2820 deletions(-)
New commits: commit 118383279b6cb609dc1e2623bd6f42f833ac12bf Author: Caolán McNamara <[email protected]> AuthorDate: Thu Sep 14 08:23:53 2023 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Sep 14 10:24:52 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/+/156882 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/download.lst b/download.lst index d14cdac5f7a8..ad8d97ebdce4 100644 --- a/download.lst +++ b/download.lst @@ -334,8 +334,8 @@ LIBTOMMATH_TARBALL := ltm-1.2.0.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -LIBWEBP_SHA256SUM := b3779627c2dfd31e3d8c4485962c2efe17785ef975e2be5c8c0c9e6cd3c4ef66 -LIBWEBP_TARBALL := libwebp-1.3.1.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 commit 4f94245ef7ac0b49729c14454f02a28c70b6ac44 Author: Gabor Kelemen <[email protected]> AuthorDate: Sun Sep 10 20:46:31 2023 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Wed Sep 13 23:48:18 2023 +0200 tdf#157101 Make Area dialog narrower by turning off the homogeneous setting of the top button bar Change-Id: I1e2e4f4db04c4a061c4e699a32b51997495880a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156804 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <[email protected]> (cherry picked from commit 7a02d8fffcdcd4d17b52e5bc3e1fa2b5be56a94d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156743 Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/cui/uiconfig/ui/areatabpage.ui b/cui/uiconfig/ui/areatabpage.ui index 4555c0df0207..157a7d0ce968 100644 --- a/cui/uiconfig/ui/areatabpage.ui +++ b/cui/uiconfig/ui/areatabpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkBox" id="AreaTabPage"> @@ -25,7 +25,6 @@ <property name="margin-top">3</property> <property name="hexpand">True</property> <property name="spacing">12</property> - <property name="homogeneous">True</property> <child> <object class="GtkComboBoxText" id="tablelb"> <property name="can-focus">False</property> commit 3ceec84db099bc584d9243623402c418d92d2db8 Author: Christian Lohmaier <[email protected]> AuthorDate: Wed Sep 13 16:51:35 2023 +0200 Commit: Gerrit Code Review <[email protected]> CommitDate: Wed Sep 13 16:51:35 2023 +0200 Update git submodules * Update translations from branch 'libreoffice-7-6' to 0c739b8463c037284dad0daab54b1863ec69ba26 - update translations for 7-6 and force-fix errors using pocheck Change-Id: I03f49a0df8acf8dade7a779e254d93bfb7f1fc74 diff --git a/translations b/translations index 68112f1808c3..0c739b8463c0 160000 --- a/translations +++ b/translations @@ -1 +1 @@ -Subproject commit 68112f1808c366e657485e44f42f90cb051dfd12 +Subproject commit 0c739b8463c037284dad0daab54b1863ec69ba26 commit b0ba18cadd830d3c1b91e501eef937da251fac58 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Tue Sep 12 14:34:03 2023 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Sep 13 10:14:10 2023 +0200 sc: row import - default style index is 0 and not -1 When importing CT_Row structure, the style index is 0 by default and not -1. The effect of this is that the style is not applied for the rows, because the index is -1. With the change to 0, the style applied is the first style, which is the correct behaviour and this fixes the issue with the test document. Change-Id: If5ab571e8dd7ec1319e7cb4d26ba006ca827eca6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156845 Tested-by: Tomaž Vajngerl <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> (cherry picked from commit 0da88ee88255083ec9557ff25005a745dcdbef14) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156877 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx index bc5855e9f4b7..19ad0a2a3465 100644 --- a/sc/source/filter/oox/sheetdatacontext.cxx +++ b/sc/source/filter/oox/sheetdatacontext.cxx @@ -279,7 +279,7 @@ void SheetDataContext::importRow( const AttributeList& rAttribs ) mnCol = -1; aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 ); - aModel.mnXfId = rAttribs.getInteger( XML_s, -1 ); + aModel.mnXfId = rAttribs.getInteger(XML_s, 0); // default style index is 0 aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 ); aModel.mbCustomHeight = rAttribs.getBool( XML_customHeight, false ); aModel.mbCustomFormat = rAttribs.getBool( XML_customFormat, false ); commit 0b645cf5696be172104b546e4225cb90b27693ce Author: Dennis Francis <[email protected]> AuthorDate: Mon Sep 11 17:49:32 2023 +0530 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Sep 13 10:03:21 2023 +0200 tdf#157192: sc:pivot allow sort by selection in non-manual mode Otherwise it is currently impossible to sort a field by its data summarization values. The RadioClickHdl is now doing nothing hence is removed with this change. Change-Id: I76064ce05e5b996ad96f596524be351708ef35e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156747 Tested-by: Jenkins Reviewed-by: Dennis Francis <[email protected]> (cherry picked from commit b8f6f91f476f1c3f93bb44265381305f6f02b161) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156870 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index f74bb4b7391d..7f97e2576795 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -703,9 +703,11 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const { rLabelData.maSortInfo.Field = ScDPUtil::createDuplicateDimensionName(aFieldName.maName, aFieldName.mnDupCount); - rLabelData.maSortInfo.IsAscending = m_xRbSortAsc->get_active(); } + if (rLabelData.maSortInfo.Mode != DataPilotFieldSortMode::MANUAL) + rLabelData.maSortInfo.IsAscending = m_xRbSortAsc->get_active(); + // *** LAYOUT MODE *** rLabelData.maLayoutInfo.LayoutMode = ToDataPilotFieldLayoutMode(m_xLbLayout->get_active()); @@ -769,11 +771,6 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou } m_xLbSortBy->set_active(nSortPos); - // sorting mode - m_xRbSortAsc->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) ); - m_xRbSortDesc->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) ); - m_xRbSortMan->connect_toggled( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) ); - weld::RadioButton* pRBtn = nullptr; switch( nSortMode ) { @@ -785,7 +782,6 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou pRBtn = maLabelData.maSortInfo.IsAscending ? m_xRbSortAsc.get() : m_xRbSortDesc.get(); } pRBtn->set_active(true); - RadioClickHdl(*pRBtn); // *** LAYOUT MODE *** @@ -879,14 +875,6 @@ IMPL_LINK(ScDPSubtotalOptDlg, ButtonClicked, weld::Button&, rButton, void) response(RET_CANCEL); } -IMPL_LINK(ScDPSubtotalOptDlg, RadioClickHdl, weld::Toggleable&, rBtn, void) -{ - if (!rBtn.get_active()) - return; - - m_xLbSortBy->set_sensitive(m_xRbSortMan->get_active()); -} - IMPL_LINK(ScDPSubtotalOptDlg, CheckHdl, weld::Toggleable&, rCBox, void) { if (&rCBox == m_xCbShow.get()) diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index f5f140c54cdf..146048cfedbf 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -150,7 +150,6 @@ private: /** Searches for a listbox entry, starts search at specified position. */ sal_Int32 FindListBoxEntry( const weld::ComboBox& rLBox, std::u16string_view rEntry, sal_Int32 nStartPos ) const; - DECL_LINK( RadioClickHdl, weld::Toggleable&, void ); DECL_LINK( CheckHdl, weld::Toggleable&, void ); DECL_LINK( SelectHdl, weld::ComboBox&, void ); DECL_LINK( ButtonClicked, weld::Button&, void ); commit 5eec820938266ea862b7a23ae61f441f191669fc Author: Dan Horák <[email protected]> AuthorDate: Tue Sep 12 10:20:51 2023 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Wed Sep 13 08:24:28 2023 +0200 bridge/powerpc64: fix integer ABI The ABI document for PowerPC64 specifies that integer values shorter than a doubleword are sign or zero extended as necessary. Until now the smaller values were treated as unsigned values and only zero-extended. Handling of signed values was incorrect. Change-Id: Icbbe8fc8d4facfa6d1b3252c99ec2d8c2552d9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156847 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 6d24e32d0278e1e71cbd1bfdc16899659e47b2a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156874 diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx index 612495d83395..9b66f778dfd6 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx @@ -256,6 +256,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV ); // verbatim! #define INSERT_INT64( pSV, nr, pGPR, pDS, bOverflow ) \ + if ( nr < ppc64::MAX_GPR_REGS ) \ + pGPR[nr++] = *reinterpret_cast<sal_Int64 *>( pSV ); \ + else \ + bOverflow = true; \ + if (bOverflow) \ + *pDS++ = *reinterpret_cast<sal_Int64 *>( pSV ); + +#define INSERT_UINT64( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast<sal_uInt64 *>( pSV ); \ else \ @@ -264,6 +272,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV ); #define INSERT_INT32( pSV, nr, pGPR, pDS, bOverflow ) \ + if ( nr < ppc64::MAX_GPR_REGS ) \ + pGPR[nr++] = *reinterpret_cast<sal_Int32 *>( pSV ); \ + else \ + bOverflow = true; \ + if (bOverflow) \ + *pDS++ = *reinterpret_cast<sal_Int32 *>( pSV ); + +#define INSERT_UINT32( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast<sal_uInt32 *>( pSV ); \ else \ @@ -272,6 +288,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast<sal_uInt32 *>( pSV ); #define INSERT_INT16( pSV, nr, pGPR, pDS, bOverflow ) \ + if ( nr < ppc64::MAX_GPR_REGS ) \ + pGPR[nr++] = *reinterpret_cast<sal_Int16 *>( pSV ); \ + else \ + bOverflow = true; \ + if (bOverflow) \ + *pDS++ = *reinterpret_cast<sal_Int16 *>( pSV ); + +#define INSERT_UINT16( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast<sal_uInt16 *>( pSV ); \ else \ @@ -280,6 +304,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast<sal_uInt16 *>( pSV ); #define INSERT_INT8( pSV, nr, pGPR, pDS, bOverflow ) \ + if ( nr < ppc64::MAX_GPR_REGS ) \ + pGPR[nr++] = *reinterpret_cast<sal_Int8 *>( pSV ); \ + else \ + bOverflow = true; \ + if (bOverflow) \ + *pDS++ = *reinterpret_cast<sal_Int8 *>( pSV ); + +#define INSERT_UINT8( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast<sal_uInt8 *>( pSV ); \ else \ @@ -335,7 +367,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn); #endif - INSERT_INT64( &pCppReturn, nGPR, pGPR, pStack, bOverflow ); + INSERT_UINT64( &pCppReturn, nGPR, pGPR, pStack, bOverflow ); } } // push "this" pointer @@ -343,7 +375,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr); #endif - INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverflow ); + INSERT_UINT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverflow ); // Args void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams ); @@ -376,26 +408,40 @@ static void cpp_call( switch (pParamTypeDescr->eTypeClass) { case typelib_TypeClass_HYPER: - case typelib_TypeClass_UNSIGNED_HYPER: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]); #endif INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; + case typelib_TypeClass_UNSIGNED_HYPER: +#if OSL_DEBUG_LEVEL > 2 + fprintf(stderr, "uhyper is 0x%lx\n", *(sal_Int64 *)pCppArgs[nPos]); +#endif + INSERT_UINT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); + break; case typelib_TypeClass_LONG: - case typelib_TypeClass_UNSIGNED_LONG: case typelib_TypeClass_ENUM: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "long is %x\n", pCppArgs[nPos]); #endif INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; + case typelib_TypeClass_UNSIGNED_LONG: +#if OSL_DEBUG_LEVEL > 2 + fprintf(stderr, "ulong is 0x%x\n", *(sal_Int32 *)pCppArgs[nPos]); +#endif + INSERT_UINT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); + break; case typelib_TypeClass_SHORT: + INSERT_INT16( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); + break; case typelib_TypeClass_CHAR: case typelib_TypeClass_UNSIGNED_SHORT: - INSERT_INT16( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); + INSERT_UINT16( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; case typelib_TypeClass_BOOLEAN: + INSERT_UINT8( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); + break; case typelib_TypeClass_BYTE: INSERT_INT8( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; @@ -454,7 +500,7 @@ static void cpp_call( // no longer needed TYPELIB_DANGER_RELEASE( pParamTypeDescr ); } - INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack, bOverflow ); + INSERT_UINT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack, bOverflow ); } } commit 235ebd321bb89f0c1c103c4c7ae88f9ddf291a7f Author: Xisco Fauli <[email protected]> AuthorDate: Tue Sep 12 14:29:21 2023 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Tue Sep 12 23:00:38 2023 +0200 tdf#149545: increase svg check size otherwise it will fail to open documents like the one in tdf#149545 with long comments before "<svg" Change-Id: Ia46dad92052ae4ef7fee791098bf96df03257282 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156844 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156862 diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx index 2dff15f29d34..0acd4a2cf783 100644 --- a/vcl/qa/cppunit/GraphicTest.cxx +++ b/vcl/qa/cppunit/GraphicTest.cxx @@ -86,6 +86,7 @@ private: void testLoadWEBP(); void testLoadSVGZ(); + void testTdf149545(); void testAvailableThreaded(); void testColorChangeToTransparent(); @@ -126,6 +127,7 @@ private: CPPUNIT_TEST(testLoadWEBP); CPPUNIT_TEST(testLoadSVGZ); + CPPUNIT_TEST(testTdf149545); CPPUNIT_TEST(testAvailableThreaded); CPPUNIT_TEST(testColorChangeToTransparent); @@ -1309,6 +1311,18 @@ void GraphicTest::testLoadSVGZ() CPPUNIT_ASSERT_EQUAL(tools::Long(100 * scalingY), aGraphic.GetSizePixel().Height()); } +void GraphicTest::testTdf149545() +{ + // Without the fix in place, this test would have failed with + // - Expected: 0x0(Error Area:Io Class:NONE Code:0) + // - Actual : 0x8203(Error Area:Vcl Class:General Code:3) + Graphic aGraphic = loadGraphic(u"tdf149545.svg"); + CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType()); + const auto[scalingX, scalingY] = getDPIScaling(); + CPPUNIT_ASSERT_EQUAL(tools::Long(100 * scalingX), aGraphic.GetSizePixel().Width()); + CPPUNIT_ASSERT_EQUAL(tools::Long(100 * scalingY), aGraphic.GetSizePixel().Height()); +} + void GraphicTest::testAvailableThreaded() { Graphic jpgGraphic1 = importUnloadedGraphic(u"TypeDetectionExample.jpg"); diff --git a/vcl/qa/cppunit/data/tdf149545.svg b/vcl/qa/cppunit/data/tdf149545.svg new file mode 100644 index 000000000000..39fd956142bd --- /dev/null +++ b/vcl/qa/cppunit/data/tdf149545.svg @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<!--======================================================================--> +<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 99 99"> +<rect x="0" y="0" width="99" height="99" fill="#000000"/> +</svg> + + diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx index 1a216bb1db92..e718b883d8bc 100644 --- a/vcl/source/filter/GraphicFormatDetector.cxx +++ b/vcl/source/filter/GraphicFormatDetector.cxx @@ -31,7 +31,7 @@ #include <vcl/outdev.hxx> #include <utility> -constexpr sal_uInt32 SVG_CHECK_SIZE = 2048; +constexpr sal_uInt32 SVG_CHECK_SIZE = 8192; constexpr sal_uInt32 WMF_EMF_CHECK_SIZE = 44; namespace commit 9e453a7af284cf17cb0debd2ab027f626e6e4a62 Author: Michael Stahl <[email protected]> AuthorDate: Fri Aug 25 18:31:42 2023 +0200 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Sep 12 16:24:57 2023 +0200 (related? tdf#155177) sw: layout: fix another RemoveFollowFlowLine SNAFU This happens with the following commit, on testForcepoint76, for no obvious reason. A follow table frame is in SwTabFrame::MakeAll(), then its follow flow line becomes empty and it does SetRemoveFollowFlowLinePending() on the master, then it formats its follow flow line (but at that time there's again a text frame in it), then that content moves backward, formats its uppers until it gets to the master table frame, which wants to join the row frame that's being formatted on the stack. Obviously a SwFrameDeleteGuard in lcl_RecalcRow() can't hurt, but it needs an additional change later to prevent it from moving rows of the follow back. Change-Id: Idca90b7eb67994385ccd306562ea26ff39e884f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156117 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 8c24bc5baa1f501943bf955e07787d80cb7a5763) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156146 Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index f7e889094adc..3cfa29f92aab 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1712,6 +1712,8 @@ static void lcl_RecalcRow(SwRowFrame & rRow, tools::Long const nBottom) if( bCheck ) { + SwFrameDeleteGuard g(&rRow); + // #115759# - force another format of the // lowers, if at least one of it was invalid. bCheck = SwContentFrame::CalcLowers(rRow, *rRow.GetUpper(), nBottom, true); @@ -2303,7 +2305,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) if ( !bSplit && GetFollow() ) { bool bDummy; - if ( GetFollow()->ShouldBwdMoved( GetUpper(), bDummy ) ) + if (!(HasFollowFlowLine() + && GetFollow()->GetFirstNonHeadlineRow()->IsDeleteForbidden()) + && GetFollow()->ShouldBwdMoved(GetUpper(), bDummy)) { SwFrame *pTmp = GetUpper(); SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*pTmp); commit e890d941e4a2e18064721c14616825ad331f00f8 Author: Stephan Bergmann <[email protected]> AuthorDate: Mon Sep 11 15:28:11 2023 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Sep 12 09:27:14 2023 +0200 In test, use char from older Unicode version, supported by older ICU 3af30bafbedb8eb481024efb35cb7876c63d26dc "sw: Handle surrogate pairs when tweaking script info" had added a test involving U+10EFD ARABIC SMALL LOW WORD, which was only introduced in Unicode 15 (cf. <https://util.unicode.org/UnicodeJsps/character.jsp?a=10EFD>), which is only supported since ICU 72 (cf. <https://icu.unicode.org/download/72>). But at least the Flathub builds with org.freedesktop.Sdk//22.08 are done against ICU 71, and those builds failed with > Test name: testScriptinfosurrogatePairs::TestBody > equality assertion failed > - Expected: 11 > - Actual : 11◌ > - In <>, attribute 'portion' of '//txt[1]/SwParaPortion/SwLineLayout/SwLinePortion[1]' incorrect value. U+10A01 KHAROSHTHI VOWEL SIGN I appears to be a character with similar properties (it would make the test fail in the expected way when sw/source/core/text/porlay.cxx is rolled back to before 3af30bafbedb8eb481024efb35cb7876c63d26dc), but is already present since Unicode 4.1 (cf. <https://util.unicode.org/UnicodeJsps/character.jsp?a=10A01>), so should be less problematic. Change-Id: I61f6e32069b895720cbee5e3d2ce1295727cfd51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 8f011771acaae44c224f0306fcceaf6125955a79) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156742 Reviewed-by: خالد حسني <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt b/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt index 5b54fc9e8601..ceee84b55ff5 100644 --- a/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt +++ b/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt @@ -286,7 +286,7 @@ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/> <text:sequence-decl text:display-outline-level="0" text:name="Figure"/> </text:sequence-decls> - <text:p text:style-name="Standard">11◌𐻽</text:p> + <text:p text:style-name="Standard">11◌𐨁</text:p> <text:p text:style-name="Standard">11𝐀َ</text:p> </office:text> </office:body> diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index d398bddd4992..eec7292b6b68 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -1338,7 +1338,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testScriptinfosurrogatePairs) // - Actual : 11◌ assertXPath(pXmlDoc, "//txt[1]/SwParaPortion/SwLineLayout/SwLinePortion[1]", "portion", u"11"); assertXPath(pXmlDoc, "//txt[1]/SwParaPortion/SwLineLayout/SwLinePortion[2]", "portion", - u"\u25CC\U00010EFD"); + u"\u25CC\U00010A01"); // Without the fix this would crash because we got a lone surrogate that // can’t be converted to UTF-8, but if it were not for that it might fail commit aeaa6c301a055ce915cab31083f26e43a20086f1 Author: Andreas Heinisch <[email protected]> AuthorDate: Wed Sep 6 17:03:26 2023 +0200 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Tue Sep 12 06:00:56 2023 +0200 tdf#156959 - Remove pinned icons from thumbnail view item Remove pinned icons from thumbnail view item and pushed it down to the recent documents view item. This avoids that the pinned icon will be shown in a simple thumbnail view, e.g., in the thumbnail view of the side pane in base. In addition, fixed an error with the number of elements in the thumbnail view in the start center when items are pinned, i.e., removed a spurious new line. Change-Id: I76026bfa9239f709aa60ff12efabe28cb09f0d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156625 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156641 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx index e34985c799d3..5dcdde2b6cd2 100644 --- a/include/sfx2/thumbnailviewitem.hxx +++ b/include/sfx2/thumbnailviewitem.hxx @@ -72,16 +72,11 @@ public: bool mbBorder; bool mbSelected; bool mbHover; - bool mbPinned; BitmapEx maPreview1; OUString maTitle; OUString maHelpText; css::uno::Reference< css::accessibility::XAccessible > mxAcc; - bool mbPinnedDocumentHighlighted; - BitmapEx maPinnedDocumentBitmap; - BitmapEx maPinnedDocumentBitmapHiglighted; - ThumbnailViewItem(ThumbnailView& rView, sal_uInt16 nId); virtual ~ThumbnailViewItem (); @@ -98,10 +93,6 @@ public: void setHighlight (bool state); - bool isPinned () const { return mbPinned; } - - void setPinned (bool state); - /** Updates own highlight status based on the aPoint position. Returns rectangle that needs to be invalidated. diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index 57a670b37c53..2070a4efe46e 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -128,10 +128,13 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri mrParentView(rView), maURL(rURL), m_isReadOnly(isReadOnly), - m_isPinned(isPinned), m_bRemoveIconHighlighted(false), m_aRemoveRecentBitmap(BMP_RECENTDOC_REMOVE), - m_aRemoveRecentBitmapHighlighted(BMP_RECENTDOC_REMOVE_HIGHLIGHTED) + m_aRemoveRecentBitmapHighlighted(BMP_RECENTDOC_REMOVE_HIGHLIGHTED), + m_bPinned(isPinned), + m_bPinnedIconHighlighted(false), + m_aPinnedDocumentBitmap(BMP_PIN_DOC), + m_aPinnedDocumentBitmapHiglighted(BMP_PIN_DOC_HIGHLIGHTED) { OUString aTitle(rTitle); INetURLObject aURLObj(rURL); @@ -231,7 +234,6 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri maTitle = aTitle; maPreview1 = aThumbnail; - mbPinned = m_isPinned; } ::tools::Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint) @@ -253,6 +255,21 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri m_bRemoveIconHighlighted = false; } + if (bVisible && getPinnedIconArea().Contains(rPoint)) + { + if (!m_bPinnedIconHighlighted) + aRect.Union(getPinnedIconArea()); + + m_bPinnedIconHighlighted = true; + } + else + { + if (m_bPinnedIconHighlighted) + aRect.Union(getPinnedIconArea()); + + m_bPinnedIconHighlighted = false; + } + return aRect; } @@ -266,6 +283,11 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri aSize); } +::tools::Rectangle RecentDocsViewItem::getPinnedIconArea() const +{ + return ::tools::Rectangle(maPinPos, m_aPinnedDocumentBitmap.GetSizePixel()); +} + OUString RecentDocsViewItem::getHelpText() const { return m_sHelpText; @@ -275,10 +297,10 @@ void RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc { ThumbnailViewItem::Paint(pProcessor, pAttrs); - // paint the remove icon when hovered + // paint the remove/pinned icon when hovered if (isHighlighted()) { - drawinglayer::primitive2d::Primitive2DContainer aSeq(1); + drawinglayer::primitive2d::Primitive2DContainer aSeq(2); Point aIconPos(getRemoveIconArea().TopLeft()); @@ -286,6 +308,23 @@ void RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc m_bRemoveIconHighlighted ? m_aRemoveRecentBitmapHighlighted : m_aRemoveRecentBitmap, B2DPoint(aIconPos.X(), aIconPos.Y()))); + // tdf#38742 - draw pinned icon + const Point aPinnedIconPos(getPinnedIconArea().TopLeft()); + aSeq[1] = drawinglayer::primitive2d::Primitive2DReference(new DiscreteBitmapPrimitive2D( + m_aPinnedDocumentBitmap, B2DPoint(aPinnedIconPos.X(), aPinnedIconPos.Y()))); + + pProcessor->process(aSeq); + } + // tdf#38742 - draw pinned icon if item is pinned + else if (m_bPinned) + { + drawinglayer::primitive2d::Primitive2DContainer aSeq(1); + + const Point aPinnedIconPos(getPinnedIconArea().TopLeft()); + aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(new DiscreteBitmapPrimitive2D( + m_bPinnedIconHighlighted ? m_aPinnedDocumentBitmapHiglighted : m_aPinnedDocumentBitmap, + B2DPoint(aPinnedIconPos.X(), aPinnedIconPos.Y()))); + pProcessor->process(aSeq); } } @@ -301,8 +340,7 @@ void RecentDocsViewItem::MouseButtonUp(const MouseEvent& rMEvt) return; } - const ::tools::Rectangle aPinPosRectangle(maPinPos, maPinnedDocumentBitmap.GetSizePixel()); - if (aPinPosRectangle.Contains(rMEvt.GetPosPixel())) + if (getPinnedIconArea().Contains(rMEvt.GetPosPixel())) { SvtHistoryOptions::TogglePinItem(EHistoryType::PickList, maURL); mrParent.Reload(); diff --git a/sfx2/source/control/recentdocsviewitem.hxx b/sfx2/source/control/recentdocsviewitem.hxx index 0fe399a1fe3b..9fd1b760b08f 100644 --- a/sfx2/source/control/recentdocsviewitem.hxx +++ b/sfx2/source/control/recentdocsviewitem.hxx @@ -43,16 +43,18 @@ public: /// Called when the user clicks a document - it will open it. void OpenDocument(); + bool isPinned () const { return m_bPinned; } + private: sfx2::RecentDocsView& mrParentView; /// Return area where is the icon to remove document from the recent documents. tools::Rectangle getRemoveIconArea() const; + tools::Rectangle getPinnedIconArea() const; OUString maURL; bool m_isReadOnly = false; - bool m_isPinned = false; OUString m_sHelpText; @@ -62,6 +64,11 @@ private: BitmapEx m_aRemoveRecentBitmap; BitmapEx m_aRemoveRecentBitmapHighlighted; + + bool m_bPinned; + bool m_bPinnedIconHighlighted; + BitmapEx m_aPinnedDocumentBitmap; + BitmapEx m_aPinnedDocumentBitmapHiglighted; }; #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index ca839162f0a2..a5c823f729b1 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/embed/XStorage.hpp> #include <memory> +#include "recentdocsviewitem.hxx" using namespace basegfx; using namespace basegfx::utils; @@ -418,16 +419,19 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed) ThumbnailViewItem *const pItem = mFilteredItemList[i]; // tdf#38742 - show pinned items in a separate line - if (bPinnedItems && !pItem->isPinned()) + if (auto const pRecentDocsItem = dynamic_cast<RecentDocsViewItem*>(pItem)) { - bPinnedItems = false; - // Start a new line only if the entire line is not filled - if ((nCurCount + 1) % mnCols && nCurCount > nFirstItem) + if (bPinnedItems && !pRecentDocsItem->isPinned()) { - x = nStartX; - y += mnItemHeight + nVItemSpace; + bPinnedItems = false; + // Start a new line only if the entire line is not filled + if (nCurCount % mnCols && nCurCount > nFirstItem) + { + x = nStartX; + y += mnItemHeight + nVItemSpace; + } + nCurCount = 0; } - nCurCount = 0; } if ((nCurCount >= nFirstItem) && (nCurCount < nLastItem)) diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 077a9b3c6bcc..43d9bb6727b4 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -56,10 +56,6 @@ ThumbnailViewItem::ThumbnailViewItem(ThumbnailView& rView, sal_uInt16 nId) , mbBorder(true) , mbSelected(false) , mbHover(false) - , mbPinned(false) - , mbPinnedDocumentHighlighted(false) - , maPinnedDocumentBitmap(BMP_PIN_DOC) - , maPinnedDocumentBitmapHiglighted(BMP_PIN_DOC_HIGHLIGHTED) { } @@ -86,11 +82,6 @@ void ThumbnailViewItem::setHighlight (bool state) mbHover = state; } -void ThumbnailViewItem::setPinned (bool state) -{ - mbPinned = state; -} - ::tools::Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint) { bool bNeedsPaint = false; @@ -108,20 +99,6 @@ void ThumbnailViewItem::setPinned (bool state) setHighlight(false); } - const ::tools::Rectangle aPinPosRectangle(maPinPos, maPinnedDocumentBitmap.GetSizePixel()); - if (bVisible && aPinPosRectangle.Contains(rPoint)) - { - if (!mbPinnedDocumentHighlighted) - bNeedsPaint = true; - mbPinnedDocumentHighlighted = true; - } - else - { - if (mbPinnedDocumentHighlighted) - bNeedsPaint = true; - mbPinnedDocumentHighlighted = false; - } - if (bNeedsPaint) return getDrawArea(); @@ -173,7 +150,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc const ThumbnailItemAttributes *pAttrs) { BColor aFillColor = pAttrs->aFillColor; - drawinglayer::primitive2d::Primitive2DContainer aSeq(5); + drawinglayer::primitive2d::Primitive2DContainer aSeq(4); double fTransparence = 0.0; // Draw background @@ -207,20 +184,6 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc false) )); - // tdf#38742 - draw pinned icon - if (mbPinned) - { - const BitmapEx& aBitmapEx - = mbHover ? maPinnedDocumentBitmapHiglighted : maPinnedDocumentBitmap; - aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference( - new DiscreteBitmapPrimitive2D(aBitmapEx, B2DPoint(maPinPos.X(), maPinPos.Y()))); - } - else if (mbHover) - aSeq[nPrimitive++] - = drawinglayer::primitive2d::Primitive2DReference(new DiscreteBitmapPrimitive2D( - maPinnedDocumentBitmap, B2DPoint(maPinPos.X(), maPinPos.Y()))); - - if (mbBorder) { // draw thumbnail borders commit e318b509b38fa27d873a225752d6d68ffc51085e Author: Miklos Vajna <[email protected]> AuthorDate: Fri Sep 8 08:26:40 2023 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Sep 11 13:20:02 2023 +0200 sw floattable, nesting: fix PDF export The problem was that the bugdoc rendered fine when opened interactively, but not when converted to PDF via 'soffice --convert-to pdf'. The direct cause was that the interactive case also enabled the navigator that did one more calculation for each fly, and that fixes the layout. The headless export to PDF has no navigator, so that didn't happen. The root of the problem seems to be that: 1) There is a bad left position for the inner follow fly (it's outside the page rectangle). 2) SwTabFrame::Split() for the outer tab normally calls lcl_RecalcSplitLine() which moves flys away + back. 3) Moving away happens in lcl_InvalidateLowerObjs() in the _bMoveObjsOutOfRange case, here we move away both fly 10 and 20 (both inner flys). 4) Moving back happens in SwToContentAnchoredObjectPosition::CalcPosition(), but that's not invoked for the inner follow fly. Fix the problem by extending SwObjectFormatter::FormatObjsAtFrame_() to be more consistent here and move back both flys. This is related to tdf#55160. Change-Id: Ia264a828f36cf2bc1d67986ab3a97d57e9d167a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156691 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins (cherry picked from commit facdac2443d50339f81415d09c1869d19dded7bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156608 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx index 797d5d8c5691..1c69606c8a24 100644 --- a/sw/qa/core/layout/flycnt.cxx +++ b/sw/qa/core/layout/flycnt.cxx @@ -1068,6 +1068,13 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNested) // rendered and this way the inner anchor had no fly portion, either. CPPUNIT_ASSERT_GREATER(pPage2->getFrameArea().Top(), pPage2Fly1->getFrameArea().Top()); + // Without the accompanying fix in place, this test would have failed with: + // - Expected less than: 12523 + // - Actual : 15312 + // i.e. the inner follow fly was not "moved back" to its place to have the wanted 4400 position, + // which makes the "Inner A2" text visible. + CPPUNIT_ASSERT_LESS(pPage2->getFrameArea().Right(), pPage2Fly1->getFrameArea().Right()); + auto pPage2Fly2 = rPage2Objs[1]->DynCastFlyFrame()->DynCastFlyAtContentFrame(); CPPUNIT_ASSERT(pPage2Fly2); CPPUNIT_ASSERT(!pPage2Fly2->GetAnchorFrameContainingAnchPos()->IsInFly()); diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index 15ca544a2d9c..b99da6a0fe4b 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -390,7 +390,12 @@ bool SwObjectFormatter::FormatObjsAtFrame_( SwTextFrame* _pMasterTextFrame ) pAnchorCharFrame != pAnchoredObj->GetAnchorFrame() && pAnchorCharFrame->FindBodyFrame() == static_cast<SwTextFrame*>(pAnchoredObj->AnchorFrame())->FindBodyFrame(); - if ( bAnchoredAtFollowInSameBodyAsMaster ) + // Make sure that in case nested split flys are moved "out of range" in + // lcl_InvalidateLowerObjs(), then we moved them back here. + SwFlyFrame* pFly = pAnchoredObj->DynCastFlyFrame(); + bool bSplitFly = pFly && pFly->IsFlySplitAllowed(); + bool bNestedSplitFly = bSplitFly && pAnchorCharFrame && pAnchorCharFrame->IsInFly(); + if (bAnchoredAtFollowInSameBodyAsMaster && !bNestedSplitFly) { continue; } commit 1b69007a820ac5ca42e237b85744ff4143abfe57 Author: Mike Kaganski <[email protected]> AuthorDate: Thu Sep 7 19:32:54 2023 +0300 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Sep 11 13:19:56 2023 +0200 tdf#157136: apply top context properties to the text input field Change-Id: Ie3877811e482c1ec395a00ec6bf67155220b2b64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156675 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit b7a5c2502434d3da92d1fbcad528cabeb61a2719) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156606 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx b/sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx new file mode 100644 index 000000000000..f4e898cb057f Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx index d6573d98bb21..7a54119b5714 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx @@ -17,6 +17,8 @@ #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/text/SizeType.hpp> +#include <com/sun/star/text/XTextContent.hpp> +#include <com/sun/star/text/XTextField.hpp> #include <com/sun/star/text/XTextTable.hpp> #include <tools/UnitConversion.hxx> @@ -1070,6 +1072,61 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156548) } } +CPPUNIT_TEST_FIXTURE(Test, testTdf157136) +{ + // Given a document with two content controls - one block, one inline + createSwDoc("tdf157136_TwoContentControls.docx"); + + // Both of them must import with the correct character style + + { + // 1st paragraph - block content control + auto xRun = getRun(getParagraph(1), 1); + CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text.\r"), xRun->getString()); + // Without the fix in place, this would fail with + // - Expected: Placeholder Text + // - Actual : + CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"), + getProperty<OUString>(xRun, "CharStyleName")); + } + + { + // 2nd paragraph - inline content control + auto xRun = getRun(getParagraph(2), 1); + auto xContentControl + = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl"); + CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."), + xContentControl->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"), + getProperty<OUString>(xRun, "CharStyleName")); + } + + // Test the same after round-trip + saveAndReload("Office Open XML Text"); + + { + // 1st paragraph - becomes inline content control after roundtrip + auto xRun = getRun(getParagraph(1), 1); + auto xContentControl + = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl"); + CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."), + xContentControl->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"), + getProperty<OUString>(xRun, "CharStyleName")); + } + + { + // 2nd paragraph - inline content control + auto xRun = getRun(getParagraph(2), 1); + auto xContentControl + = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl"); + CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."), + xContentControl->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"), + getProperty<OUString>(xRun, "CharStyleName")); + } +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx index 4f94c46f2f55..041802147605 100644 --- a/writerfilter/source/dmapper/SdtHelper.cxx +++ b/writerfilter/source/dmapper/SdtHelper.cxx @@ -350,8 +350,11 @@ void SdtHelper::createPlainTextControl() xPropertySet->setPropertyValue("Content", uno::Any(aDefaultText)); + PropertyMap aMap; + aMap.InsertProps(m_rDM_Impl.GetTopContext()); + // add it into document - m_rDM_Impl.appendTextContent(xControlModel, uno::Sequence<beans::PropertyValue>()); + m_rDM_Impl.appendTextContent(xControlModel, aMap.GetPropertyValues()); // Store all unused sdt parameters from grabbag xPropertySet->setPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG, commit 574316ea568a09074cda20dd7953f578b081a754 Author: Julien Nabet <[email protected]> AuthorDate: Sat Sep 9 22:59:06 2023 +0200 Commit: Lionel Mamane <[email protected]> CommitDate: Sun Sep 10 13:18:24 2023 +0200 tdf#149195: Impossible to change link of a DB and keep the same registered name Just test nEntry to know if it's a new entry (and so the name must be different from an existing one) Change-Id: I3bda6b1d3d9bae3d79fdfc2cb1323f20add410c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156785 Reviewed-by: Julien Nabet <[email protected]> Tested-by: Jenkins (cherry picked from commit a410b8f1111c738604ad2f67c111f98d91761051) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156735 Reviewed-by: Lionel Mamane <[email protected]> diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 143112c58724..92cbbd0012e9 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -280,7 +280,10 @@ void DbRegistrationOptionsPage::openLinkDialog(const OUString& sOldName, const O ODocumentLinkDialog aDlg(GetFrameWeld(), nEntry == -1); aDlg.setLink(sOldName, sOldLocation); - aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); + + // tdf#149195: control the name (ie check duplicate) only if new entry case + if (nEntry == -1) + aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); if (aDlg.run() != RET_OK) return; commit 7ccaecd33a30905e3929d43c8164b16bbb101b73 Author: Julien Nabet <[email protected]> AuthorDate: Thu Sep 7 16:34:53 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Sep 9 11:53:06 2023 +0200 tdf#157138: Can't switch from Use Background to None area fill Revert partly tdf#151260 fix Change-Id: I4c052e2cd1cb41dc8bda4b388b46e4416e351434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156669 (cherry picked from commit b69e14038288387b5f288a06821fb5df66dcf94e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156733 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index d1ece1c0e4d4..4751c21c93c5 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -240,11 +240,8 @@ DeactivateRC SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) { XFillStyleItem aStyleItem( drawing::FillStyle_NONE ); _pSet->Put( aStyleItem ); - if (_pSet->HasItem(XATTR_FILLUSESLIDEBACKGROUND)) - { - XFillUseSlideBackgroundItem aFillBgItem( false ); - _pSet->Put( aFillBgItem ); - } + XFillUseSlideBackgroundItem aFillBgItem( false ); + _pSet->Put( aFillBgItem ); } break; } commit 8ac547a463c4061961f924e858a377525ea821b1 Author: Miklos Vajna <[email protected]> AuthorDate: Thu Sep 7 08:25:18 2023 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Sep 8 12:54:20 2023 +0200 sw floattable, nesting: fix position of the inner follow table The bugdoc was no longer crashing, but the inner table's follow part on page 2 was not visible. The problem was that lcl_ArrangeLowers() didn't try to update the fly's position when the cell's position changed, now we do this for split flys. The other problem was that as SwTextFly::GetTop() is called by SwTextFly::InitAnchoredObjList(), the inner flys were ignored while collecting the intersecting fly frames for a paragraph, leading to an overlap between the inner follow fly and the inner anchor text. This is now fixed by explicitly checking for the splitfly-in-splitfly case. With this, the ODT bugdoc now renders correctly when opened. (This is related to tdf#55160.) Change-Id: I60997e7913984872319250b0fb1cb91e02512800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156632 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins (cherry picked from commit 3aa3f0a1638a8d8006955b62bb647526768be3d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156607 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx index 0839e6a34b36..797d5d8c5691 100644 --- a/sw/qa/core/layout/flycnt.cxx +++ b/sw/qa/core/layout/flycnt.cxx @@ -1060,6 +1060,14 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNested) CPPUNIT_ASSERT(pPage2Fly1); CPPUNIT_ASSERT(pPage2Fly1->GetAnchorFrameContainingAnchPos()->IsInFly()); CPPUNIT_ASSERT(pPage2Fly1->GetPrecede()); + + // Without the accompanying fix in place, this test would have failed with: + // - Expected greater than: 6204 + // - Actual : 1725 + // i.e. the inner follow fly had a bad position, it was outside the page rectangle, it was not + // rendered and this way the inner anchor had no fly portion, either. + CPPUNIT_ASSERT_GREATER(pPage2->getFrameArea().Top(), pPage2Fly1->getFrameArea().Top()); + auto pPage2Fly2 = rPage2Objs[1]->DynCastFlyFrame()->DynCastFlyAtContentFrame(); CPPUNIT_ASSERT(pPage2Fly2); CPPUNIT_ASSERT(!pPage2Fly2->GetAnchorFrameContainingAnchPos()->IsInFly()); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index e592467751b7..f7e889094adc 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -5303,10 +5303,12 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, tools::Long lYStart, bool bI // on the object positioning. // #i52904# - no direct move of objects, // whose vertical position doesn't depend on anchor frame. + // Also move split flys directly, otherwise the follows would not be moved + // at all. const bool bDirectMove = FAR_AWAY != pFly->getFrameArea().Top() && bVertPosDepOnAnchor && - !pFly->ConsiderObjWrapInfluenceOnObjPos(); + (!pFly->ConsiderObjWrapInfluenceOnObjPos() || pFly->IsFlySplitAllowed()); if ( bDirectMove ) { { diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index e5bf03162db4..a290ac4d2010 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -679,6 +679,23 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, bool bEvade = !mpCurrAnchoredObj || Is_Lower_Of( mpCurrAnchoredObj->DynCastFlyFrame(), pNew); + auto pFly = _pAnchoredObj->DynCastFlyFrame(); + if (pFly && pFly->IsFlySplitAllowed()) + { + // Check if _pAnchoredObj is a split fly inside an other split fly. Always collect such + // flys, otherwise the inner anchor text will overlap with the inner fly. + SwFrame* pFlyAnchor = const_cast<SwAnchoredObject*>(_pAnchoredObj) + ->GetAnchorFrameContainingAnchPos(); + if (pFlyAnchor && pFlyAnchor->IsInFly()) + { + auto pOuterFly = pFlyAnchor->FindFlyFrame(); + if (pOuterFly && pOuterFly->IsFlySplitAllowed()) + { + return true; + } + } + } + if ( !bEvade ) { // We are currently inside a fly frame and pNew is not commit 7a0b8513d76e12154fe85744b9acc03c369b42c6 Author: Sarper Akdemir <[email protected]> AuthorDate: Thu Sep 7 13:53:25 2023 +0300 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Sep 8 12:54:07 2023 +0200 tdf#156649: oox: correct import alphaModFix for custom shapes alphaModFix should be imported into PROP_FillTransparency for custom shapes. Change-Id: I19621e424a64b097d5e6881877d60de253be636d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156660 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <[email protected]> (cherry picked from commit b0e8ce9967acf3a759e5b85c4a0d16d7dad275fe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156605 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index e1c73748f919..365f38f5ddb2 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -866,7 +866,9 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe if ( maBlipProps.moAlphaModFix.has_value() ) { - rPropMap.setProperty(PROP_Transparency, static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.value() / PER_PERCENT))); + rPropMap.setProperty( + mbIsCustomShape ? PROP_FillTransparence : PROP_Transparency, + static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.value() / PER_PERCENT))); } } rPropMap.setProperty(PROP_GraphicColorMode, eColorMode); diff --git a/sd/qa/unit/data/pptx/tdf156649.pptx b/sd/qa/unit/data/pptx/tdf156649.pptx new file mode 100644 index 000000000000..2b3b12a9a092 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf156649.pptx differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 61f6736fc33f..92971d4b4221 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1577,6 +1577,20 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf140714) CPPUNIT_ASSERT_EQUAL(OUString{ "com.sun.star.drawing.CustomShape" }, xShape->getShapeType()); } +CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf156649) +{ + createSdImpressDoc("pptx/tdf156649.pptx"); + saveAndReload("Impress Office Open XML"); + + auto xShapeProps(getShapeFromPage(0, 0)); + // Without the fix in place, this test would have failed with + //- Expected: 55 + //- Actual : 0 + // i.e. alphaModFix wasn't imported as fill transparency for the custom shape + CPPUNIT_ASSERT_EQUAL(sal_Int16(55), + xShapeProps->getPropertyValue("FillTransparence").get<sal_Int16>()); +} + CPPUNIT_TEST_FIXTURE(SdExportTest, testMasterPageBackgroundFullSize) { createSdImpressDoc("odp/background.odp"); commit 317305fb31447ff8400f81354c869d862715539a Author: Miklos Vajna <[email protected]> AuthorDate: Wed Sep 6 08:30:10 2023 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Sep 7 11:29:00 2023 +0200 sw floattable, nesting: fix layout crash The manually created ODT bugdoc has a nested floating table. The outer table is just 1 cell, the inner one has 2 rows: it's meant to span over 2 pages. This bugdoc currently crashes the layout. In practice what happens is that the inner fly would split + move the follow to the next page, so we hit a case where the inner fly is marked to be "in table", but it won't have a table parent anymore, so the layout crashes. As a first step, fix the crash: 1) SwFrame::GetNextFlyLeaf() should only split the inner fly and its anchor (not move it), the move will happen with the split of the outer fly. 2) Fix SwToContentAnchoredObjectPosition::CalcPosition() to move the inner, follow fly down (it should not overlap with its master). This was not visible previously, as we manually moved the follow fly to the next page, but now we need a vertical cut position that is between the inner master and follow flys. 3) lcl_ArrangeLowers(), called by SwCellFrame::Format() now updates the position of follow flys, so exactly two master flys are on page 1 and two follow flys are on page 2. This is related to tdf#55160, but it's not yet focusing on DOCX, where nested floating tables are currently disabled at a filter level. Also, this fixes the crash, but the position of the inner follow table still needs fixing. Change-Id: Ife42b64cda53946a8262ddabfd000803620c4ff1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156587 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156639 diff --git a/sw/qa/core/layout/data/floattable-nested.odt b/sw/qa/core/layout/data/floattable-nested.odt new file mode 100644 index 000000000000..3d21314f5871 Binary files /dev/null and b/sw/qa/core/layout/data/floattable-nested.odt differ diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx index 539d379d97c2..0839e6a34b36 100644 --- a/sw/qa/core/layout/flycnt.cxx +++ b/sw/qa/core/layout/flycnt.cxx @@ -1024,6 +1024,47 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFromAsCharAnchor) // frame+table inside a footnote. dispatchCommand(mxComponent, ".uno:SetAnchorToPara", {}); } + +CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNested) +{ + // Given a document with a nested, multi-page floating table: + // When calculating the layout: + createSwDoc("floattable-nested.odt"); + calcLayout(); + + // Then make sure we don't crash: + // Without the accompanying fix in place, this test would have crashed. + // Check that we have exactly 4 fly frames, all of them on the expected pages: master outer, + // follow outer, master inner and follow inner. + SwDoc* pDoc = getSwDoc(); + SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + auto pPage1 = pLayout->Lower()->DynCastPageFrame(); + CPPUNIT_ASSERT(pPage1); + CPPUNIT_ASSERT(pPage1->GetSortedObjs()); + SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs(); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage1Objs.size()); + auto pPage1Fly1 = rPage1Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame(); + CPPUNIT_ASSERT(pPage1Fly1); + CPPUNIT_ASSERT(pPage1Fly1->GetAnchorFrameContainingAnchPos()->IsInFly()); + CPPUNIT_ASSERT(pPage1Fly1->GetFollow()); + auto pPage1Fly2 = rPage1Objs[1]->DynCastFlyFrame()->DynCastFlyAtContentFrame(); + CPPUNIT_ASSERT(pPage1Fly2); + CPPUNIT_ASSERT(!pPage1Fly2->GetAnchorFrameContainingAnchPos()->IsInFly()); + CPPUNIT_ASSERT(pPage1Fly2->GetFollow()); + auto pPage2 = pPage1->GetNext()->DynCastPageFrame(); + CPPUNIT_ASSERT(pPage2); + CPPUNIT_ASSERT(pPage2->GetSortedObjs()); + SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs(); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage2Objs.size()); + auto pPage2Fly1 = rPage2Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame(); + CPPUNIT_ASSERT(pPage2Fly1); + CPPUNIT_ASSERT(pPage2Fly1->GetAnchorFrameContainingAnchPos()->IsInFly()); + CPPUNIT_ASSERT(pPage2Fly1->GetPrecede()); + auto pPage2Fly2 = rPage2Objs[1]->DynCastFlyFrame()->DynCastFlyAtContentFrame(); + CPPUNIT_ASSERT(pPage2Fly2); + CPPUNIT_ASSERT(!pPage2Fly2->GetAnchorFrameContainingAnchPos()->IsInFly()); + CPPUNIT_ASSERT(pPage2Fly2->GetPrecede()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 113eaafbce9d..efdc91365c26 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1591,6 +1591,7 @@ SwLayoutFrame *SwFrame::GetNextFlyLeaf( MakePageType eMakePage ) } SwLayoutFrame* pOldLayLeaf = nullptr; + bool bNesting = false; while (true) { if (pLayLeaf) @@ -1609,6 +1610,18 @@ SwLayoutFrame *SwFrame::GetNextFlyLeaf( MakePageType eMakePage ) bSameBody = true; } } + + if (bLeftFly && pFlyAnchor && pFlyAnchor->IsInFly() + && FindFlyFrame() == pLayLeaf->FindFlyFrame()) + { + // This is an inner fly, then the follow anchor will be just next to us. + SwLayoutFrame* pFlyAnchorUpper = pFlyAnchor->GetUpper(); + pOldLayLeaf = pLayLeaf; + pLayLeaf = pFlyAnchorUpper; + bLeftFly = false; + bNesting = true; + } + if (bLeftBody || bLeftFly || bSameBody) { // The above conditions are not held, reject. @@ -1650,8 +1663,12 @@ SwLayoutFrame *SwFrame::GetNextFlyLeaf( MakePageType eMakePage ) // Split the anchor at char 0: all the content goes to the follow of the anchor. pFlyAnchor->SplitFrame(TextFrameIndex(0)); auto pNext = static_cast<SwTextFrame*>(pFlyAnchor->GetNext()); - // Move the new anchor frame, before the first child of pLayLeaf. - pNext->MoveSubTree(pLayLeaf, pLayLeaf->Lower()); + // The nesting case just splits the inner fly; the outer fly will split and move. + if (!bNesting) + { + // Move the new anchor frame, before the first child of pLayLeaf. + pNext->MoveSubTree(pLayLeaf, pLayLeaf->Lower()); + } // Now create the follow of the fly and anchor it in the master of the anchor. pNew = new SwFlyAtContentFrame(*pFly); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 02e3dbdc187d..e592467751b7 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -5252,11 +5252,24 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, tools::Long lYStart, bool bI lcl_ArrangeLowers( static_cast<SwLayoutFrame*>(pFrame), aRectFnSet.GetTop(static_cast<SwLayoutFrame*>(pFrame)->Lower()->getFrameArea()) + lDiffX, bInva ); - if ( pFrame->GetDrawObjs() ) + SwSortedObjs* pDrawObjs = pFrame->GetDrawObjs(); + auto pTextFrame = pFrame->DynCastTextFrame(); + if (pTextFrame && pTextFrame->IsInFly()) { - for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i ) + // See if this is a follow anchor. If so, we want the flys anchored in the master + // which are also lowers of pFrame. + SwTextFrame* pMaster = pTextFrame; + while (pMaster->IsFollow()) { - SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; + pMaster = pMaster->FindMaster(); + } + pDrawObjs = pMaster->GetDrawObjs(); + } + if (pDrawObjs) + { + for (size_t i = 0; i < pDrawObjs->size(); ++i) + { + SwAnchoredObject* pAnchoredObj = (*pDrawObjs)[i]; // #i26945# - check, if anchored object // is lower of layout frame by checking, if the anchor // frame, which contains the anchor position, is a lower diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 73b8b088d1f7..9c1c491b24c9 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -492,11 +492,13 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // same page as <pOrientFrame> and the vertical position isn't aligned // automatic at the anchor character or the top of the line of the // anchor character, the anchor frame determines the vertical position. + // Split fly follows: always let the anchor char frame determine the vertical position. + // This gives us a vertical cut position between the master and the follow. if ( &rAnchorTextFrame == pOrientFrame || ( rAnchorTextFrame.FindPageFrame() == pOrientFrame->FindPageFrame() && aVert.GetVertOrient() == text::VertOrientation::NONE && aVert.GetRelationOrient() != text::RelOrientation::CHAR && - aVert.GetRelationOrient() != text::RelOrientation::TEXT_LINE ) ) + aVert.GetRelationOrient() != text::RelOrientation::TEXT_LINE && !bFollowSplitFly ) ) { pUpperOfOrientFrame = rAnchorTextFrame.GetUpper(); pAnchorFrameForVertPos = &rAnchorTextFrame; commit ec29ef8aec201b5e4187c08bf740042f0fe704a0 Author: Miklos Vajna <[email protected]> AuthorDate: Thu Aug 24 16:58:14 2023 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Sep 7 11:28:53 2023 +0200 sw floattable: don't split if anchored inside a footnote See <https://gerrit.libreoffice.org/c/core/+/156025/1#message-94d8cdd4d59a4b991186e5780d41f213105a533d>, if we import an (inline) table inside a footnote from DOCX, we currently put that into an as-char anchored fly. In case the user would later change the anchor type to to-para, then we would crash in SwFlowFrame::GetPrevFrameForUpperSpaceCalc_(). Avoid all this trouble by simply not allowing split floating tables in footnotes, seeing that the Word UI is also disabled for this case. Change-Id: I3cf9461beb291084e1cced5c66ca14e6b6d55126 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156058 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156644 diff --git a/sw/qa/core/layout/data/table-in-footnote.docx b/sw/qa/core/layout/data/table-in-footnote.docx new file mode 100644 index 000000000000..10e20ffbf44c Binary files /dev/null and b/sw/qa/core/layout/data/table-in-footnote.docx differ diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx index ba688728743b..539d379d97c2 100644 --- a/sw/qa/core/layout/flycnt.cxx +++ b/sw/qa/core/layout/flycnt.cxx @@ -1010,6 +1010,20 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyIntoTable) // second part of a floating table into a table on the next page, not before that table. calcLayout(); } + +CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFromAsCharAnchor) +{ + // Given a document with a footnote that has a table (imported in an as-char anchored frame in + // Writer): + createSwDoc("table-in-footnote.docx"); + + // When changing the anchor type of that frame to to-para: + // Then make sure we don't crash: + selectShape(1); + // Without the accompanying fix in place, this test would have crashed, we tried to split a + // frame+table inside a footnote. + dispatchCommand(mxComponent, ".uno:SetAnchorToPara", {}); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index a06c2a9e7f70..039aeb549f77 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -687,6 +687,12 @@ bool SwFlyFrame::IsFlySplitAllowed() const return false; } + if (pFlyAnchor && pFlyAnchor->IsInFootnote()) + { + // No split in footnotes. + return false; + } + const SwFlyFrameFormat* pFormat = GetFormat(); const SwFormatVertOrient& rVertOrient = pFormat->GetVertOrient(); if (rVertOrient.GetVertOrient() == text::VertOrientation::BOTTOM) commit e6fc440bdb02c6a815153275ef1c7ded6f8d4a7a Author: László Németh <[email protected]> AuthorDate: Wed Sep 6 18:01:28 2023 +0200 Commit: László Németh <[email protected]> CommitDate: Thu Sep 7 10:40:46 2023 +0200 tdf#157011 sw tracked table column: fix DOCX import of empty cell OOXML w:std elements are imported with 0x01 characters in text content of tracked table columns (as a regression in LO 7.3?), losing change tracking data. Fix this temporarily by completing SwTableBox::IsEmpty() handling the bad 0x01 characters of the imported tracked empty cells. See also commit a483a44ca00f43a64ae51d62b8fbb4129a413f6d "tdf#143215 DOCX import: fix tracked empty row insertion/deletion". Change-Id: I4895754e540cca6ba2cb3442f24a8affcedd51fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156626 Tested-by: Jenkins Reviewed-by: László Németh <[email protected]> (cherry picked from commit ec2de3e6f8e1dcca52e7e3cf36146d683afbf4f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156601 Tested-by: László Németh <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx b/sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx new file mode 100644 index 000000000000..5ebb98fda0d7 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index e406d546aea6..e5a585f01d68 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -1323,6 +1323,21 @@ DECLARE_OOXMLEXPORT_TEST(testTdf150824, "tdf150824.fodt") } } +DECLARE_OOXMLEXPORT_TEST(testTdf157011, "tdf157011_ins_del_empty_cols.docx") +{ + // check tracked table column insertions and deletions with empty cells + if (isExported()) + { + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + + // This was 1 (missing tracked table cell insertions) + assertXPath(pXmlDoc, "//w:ins", 3); + + // This was 4 (missing tracked table cell deletions) + assertXPath(pXmlDoc, "//w:del", 6); + } +} + DECLARE_OOXMLEXPORT_TEST(testTdf150824_regression, "ooo30436-1-minimized.sxw") { // There should be no crash during loading of the document diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 04d58363b97d..0fbede71641f 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2259,6 +2259,16 @@ bool SwTableBox::IsEmpty( bool bWithRemainingNestedTable ) const const SwContentNode *pCNd = pFirstNode->GetContentNode(); if ( pCNd && !pCNd->Len() ) return true; + + // tdf#157011 OOXML w:std cell content is imported with terminating 0x01 characters, + // i.e. an empty box can contain double 0x01: handle it to avoid losing change tracking + // FIXME regression since LibreOffice 7.3? + if ( pCNd && pCNd->Len() == 2 && pCNd->GetTextNode() ) + { + const OUString &rText = pCNd->GetTextNode()->GetText(); + if ( rText[0] == 0x01 && rText[1] == 0x01 ) + return true; + } } else if ( bWithRemainingNestedTable ) { commit 125cf1525361c6cd699574f60b4cf12868188568 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Sep 6 10:05:23 2023 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Sep 7 08:54:56 2023 +0200 add referer to ole objects so we can identify what document is requesting their contents extends: commit 5668e73beb30b95abc6520b7432c54972ca3ab2c Date: Wed Nov 20 14:43:45 2013 +0100 avmedia: Implement "block untrusted referer links" feature See f0a9ca24fd4bf79cac908bf0d6fdb8905dc504db "rhbz#887420 Implement 'block untrusted referer links' feature" for details. This adds some further /*TODO?*/ comments, and one known problem (marked /*TODO!*/) is that movies/sounds are not blocked during a slideshow presentation. to these objects too, namely OLE2Shape and derivatives AppletShape, FrameShape and PluginShape so in paranoid mode we won't load the contents of such objects from documents considered "untrusted". Change-Id: I6d988035d0cd09fd3fade5f6885fe336c95579ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156598 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 654c60bb3c5e..bbdb8bdd65de 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -590,6 +590,8 @@ public: // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API class SVXCORE_DLLPUBLIC SvxOle2Shape : public SvxShapeText { +private: + OUString referer_; protected: // override these for special property handling in subcasses. Return true if property is handled virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override; @@ -599,8 +601,8 @@ protected: SvGlobalName GetClassName_Impl(OUString& rHexCLSID); public: - SvxOle2Shape(SdrObject* pObj); - SvxOle2Shape(SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); + SvxOle2Shape(SdrObject* pObj, OUString referer); + SvxOle2Shape(SdrObject* pObject, OUString referer, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); virtual ~SvxOle2Shape() noexcept override; bool createObject( const SvGlobalName &aClassName ); diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index 9c88a39990c1..b58b9f0a3cc9 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -122,7 +122,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj awt::Size aSz( aTmp.Width(), aTmp.Height() ); xObj->setVisualAreaSize( nAspect, aSz ); } - rtl::Reference<SvxOle2Shape> pShape = new SvxOle2Shape( pObj ); + rtl::Reference<SvxOle2Shape> pShape = new SvxOle2Shape( pObj, "" /*TODO?*/ ); xShape = pShape; pShape->setShapeKind(pObj->GetObjIdentifier()); } diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx index 68189814fe6a..ce67e16bb572 100644 --- a/svx/source/unodraw/shapeimpl.hxx +++ b/svx/source/unodraw/shapeimpl.hxx @@ -36,7 +36,7 @@ protected: virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override; public: - explicit SvxPluginShape(SdrObject* pObj); + explicit SvxPluginShape(SdrObject* pObj, OUString referer); virtual ~SvxPluginShape() noexcept override; virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; @@ -46,6 +46,7 @@ public: virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; }; + class SvxAppletShape : public SvxOle2Shape { protected: @@ -54,7 +55,7 @@ protected: virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override; public: - explicit SvxAppletShape(SdrObject* pObj); + explicit SvxAppletShape(SdrObject* pObj, OUString referer); virtual ~SvxAppletShape() noexcept override; virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; @@ -76,7 +77,7 @@ protected: css::uno::Any& rValue) override; public: - explicit SvxFrameShape(SdrObject* pObj); + explicit SvxFrameShape(SdrObject* pObj, OUString referer); virtual ~SvxFrameShape() noexcept override; virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index b36eb09a5caa..4a562caeadad 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -210,7 +210,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWi { OUString arg; if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape" - || ServiceSpecifier == "com.sun.star.drawing.MediaShape") + || ServiceSpecifier == "com.sun.star.drawing.AppletShape" + || ServiceSpecifier == "com.sun.star.drawing.FrameShape" + || ServiceSpecifier == "com.sun.star.drawing.OLE2Shape" + || ServiceSpecifier == "com.sun.star.drawing.MediaShape" + || ServiceSpecifier == "com.sun.star.drawing.PluginShape") && Arguments.getLength() == 1 && (Arguments[0] >>= arg)) { return create(ServiceSpecifier, arg); diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 846e41ae590f..7c8ab3dde951 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -694,13 +694,13 @@ rtl::Reference<SvxShape> SvxDrawPage::CreateShapeByTypeAndInventor( SdrObjKind n pRet = new SvxGraphicObject( pObj ); break; case SdrObjKind::OLEPluginFrame: - pRet = new SvxFrameShape( pObj ); + pRet = new SvxFrameShape( pObj, referer ); break; case SdrObjKind::OLE2Applet: - pRet = new SvxAppletShape( pObj ); + pRet = new SvxAppletShape( pObj, referer ); break; case SdrObjKind::OLE2Plugin: - pRet = new SvxPluginShape( pObj ); + pRet = new SvxPluginShape( pObj, referer ); break; case SdrObjKind::OLE2: { @@ -728,17 +728,17 @@ rtl::Reference<SvxShape> SvxDrawPage::CreateShapeByTypeAndInventor( SdrObjKind n if( aPluginClassId == aClassId ) { - pRet = new SvxPluginShape( pObj ); + pRet = new SvxPluginShape( pObj, referer ); nType = SdrObjKind::OLE2Plugin; } else if( aAppletClassId == aClassId ) { - pRet = new SvxAppletShape( pObj ); + pRet = new SvxAppletShape( pObj, referer ); nType = SdrObjKind::OLE2Applet; } else if( aIFrameClassId == aClassId ) { - pRet = new SvxFrameShape( pObj ); + pRet = new SvxFrameShape( pObj, referer ); nType = SdrObjKind::OLEPluginFrame; } } @@ -748,7 +748,7 @@ rtl::Reference<SvxShape> SvxDrawPage::CreateShapeByTypeAndInventor( SdrObjKind n if( pRet == nullptr ) { SvxUnoPropertyMapProvider& rSvxMapProvider = getSvxMapProvider(); - pRet = new SvxOle2Shape( pObj, rSvxMapProvider.GetMap(SVXMAP_OLE2), rSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) ); + pRet = new SvxOle2Shape( pObj, referer, rSvxMapProvider.GetMap(SVXMAP_OLE2), rSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) ); } } break; diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 02790b767084..1fe494a07d6b 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -64,14 +64,16 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; -SvxOle2Shape::SvxOle2Shape(SdrObject* pObject) -: SvxShapeText( pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2), - getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool()) ) +SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, OUString referer) + : SvxShapeText(pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2), + getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool())) + , referer_(std::move(referer)) { } -SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet) -: SvxShapeText( pObject, pPropertyMap, pPropertySet ) +SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, OUString referer, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet) + : SvxShapeText(pObject, pPropertyMap, pPropertySet) + , referer_(std::move(referer)) { } @@ -448,16 +450,18 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL ) ::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist(); - uno::Sequence< beans::PropertyValue > aMediaDescr{ comphelper::makePropertyValue("URL", - aLinkURL) }; + uno::Sequence< beans::PropertyValue > aMediaDescr{ + comphelper::makePropertyValue("URL", aLinkURL), + comphelper::makePropertyValue("Referer", referer_) + }; uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler(); if ( xInteraction.is() ) { - aMediaDescr.realloc( 2 ); + aMediaDescr.realloc( 3 ); auto pMediaDescr = aMediaDescr.getArray(); - pMediaDescr[1].Name = "InteractionHandler"; - pMediaDescr[1].Value <<= xInteraction; + pMediaDescr[2].Name = "InteractionHandler"; + pMediaDescr[2].Value <<= xInteraction; } //TODO/LATER: how to cope with creation failure?! @@ -558,8 +562,8 @@ OUString SvxOle2Shape::GetAndClearInitialFrameURL() return OUString(); } -SvxAppletShape::SvxAppletShape(SdrObject* pObject) - : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) ) +SvxAppletShape::SvxAppletShape(SdrObject* pObject, OUString referer) + : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool())) { SetShapeType( "com.sun.star.drawing.AppletShape" ); } @@ -629,8 +633,8 @@ bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemP } } -SvxPluginShape::SvxPluginShape(SdrObject* pObject) - : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool()) ) +SvxPluginShape::SvxPluginShape(SdrObject* pObject, OUString referer) + : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool())) { SetShapeType( "com.sun.star.drawing.PluginShape" ); } @@ -700,9 +704,8 @@ bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemP } } - -SvxFrameShape::SvxFrameShape(SdrObject* pObject) -: SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool()) ) +SvxFrameShape::SvxFrameShape(SdrObject* pObject, OUString referer) + : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool())) { SetShapeType( "com.sun.star.drawing.FrameShape" ); } @@ -783,6 +786,7 @@ bool SvxFrameShape::getPropertyValueImpl(const OUString& rName, const SfxItemPro return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue ); } } + SvxMediaShape::SvxMediaShape(SdrObject* pObj, OUString referer) : SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_MEDIA), getSvxMapProvider().GetPropertySet(SVXMAP_MEDIA, SdrObject::GetGlobalDrawObjectItemPool()) ), referer_(std::move(referer)) diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 5e965eba5aaa..c32dd7cc847c 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -498,7 +498,11 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName) xShape.set(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY); } else if (serviceName == "com.sun.star.drawing.GraphicObjectShape" + || serviceName == "com.sun.star.drawing.AppletShape" + || serviceName == "com.sun.star.drawing.FrameShape" || serviceName == "com.sun.star.drawing.MediaShape" + || serviceName == "com.sun.star.drawing.OLE2Shape" + || serviceName == "com.sun.star.drawing.PluginShape" || serviceName == "com.sun.star.presentation.MediaShape") { xShape.set( xServiceFact->createInstanceWithArguments(serviceName, { css::uno::Any(GetImport().GetDocumentBase()) }), commit a4825162cb5a7f7504bb5a912deccdcfbc1084ce Author: Christian Lohmaier <[email protected]> AuthorDate: Wed Sep 6 17:30:52 2023 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Wed Sep 6 17:31:43 2023 +0200 update credits Change-Id: I49e7c7ebf91d07f1fb0758933b32ae1b53ac2240 (cherry picked from commit 268a2009bc8acd9412183b4cd9bb7023b31e4f0b) diff --git a/readlicense_oo/license/CREDITS.fodt b/readlicense_oo/license/CREDITS.fodt index 7697677981bc..5a52cb29a58f 100644 --- a/readlicense_oo/license/CREDITS.fodt +++ b/readlicense_oo/license/CREDITS.fodt @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> <office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> - <office:meta><dc:title>Credits » LibreOffice</dc:title><meta:keyword>Credits</meta:keyword><meta:keyword>contributors</meta:keyword><meta:keyword>coders</meta:keyword><meta:keyword>developers</meta:keyword><dc:description>Credits for the LibreOffice development/coding.</dc:description><meta:generator>LibreOffice/7.5.5.2$Linux_X86_64 LibreOffice_project/ca8fe7424262805f223b9a2334bc7181abbcbf5e</meta:generator><dc:date>2012-02-20T22:17:18.060000000</dc:date><meta:editing-duration>PT14M12S</meta:editing-duration><meta:editing-cycles>3</meta:editing-cycles><meta:document-statistic meta:table-count="5" meta:image-count="1" meta:object-count="0" meta:page-count="2" meta:paragraph-count="4787" meta:word-count="17840" meta:character-count="128979" meta:non-whitespace-character-count="113103"/><meta:user-defined meta:name="google-site-verification">JUebjoxEpqXoQcpltWRTwzBZEEHtch3wApdhgiQPFiA</meta:user-defined></office:meta> + <office:meta><dc:title>Credits » LibreOffice</dc:title><meta:keyword>Credits</meta:keyword><meta:keyword>contributors</meta:keyword><meta:keyword>coders</meta:keyword><meta:keyword>developers</meta:keyword><dc:description>Credits for the LibreOffice development/coding.</dc:description><meta:generator>LibreOffice/7.5.5.2$Linux_X86_64 LibreOffice_project/ca8fe7424262805f223b9a2334bc7181abbcbf5e</meta:generator><dc:date>2012-02-20T22:17:18.060000000</dc:date><meta:editing-duration>PT14M12S</meta:editing-duration><meta:editing-cycles>3</meta:editing-cycles><meta:document-statistic meta:table-count="5" meta:image-count="1" meta:object-count="0" meta:page-count="2" meta:paragraph-count="4791" meta:word-count="17861" meta:character-count="129123" meta:non-whitespace-character-count="113229"/><meta:user-defined meta:name="google-site-verification">JUebjoxEpqXoQcpltWRTwzBZEEHtch3wApdhgiQPFiA</meta:user-defined></office:meta> <office:settings> <config:config-item-set config:name="ooo:view-settings"> - <config:config-item config:name="ViewAreaTop" config:type="long">561</config:config-item> + <config:config-item config:name="ViewAreaTop" config:type="long">2958</config:config-item> <config:config-item config:name="ViewAreaLeft" config:type="long">501</config:config-item> - <config:config-item config:name="ViewAreaWidth" config:type="long">21592</config:config-item> - <config:config-item config:name="ViewAreaHeight" config:type="long">26698</config:config-item> + <config:config-item config:name="ViewAreaWidth" config:type="long">21618</config:config-item> + <config:config-item config:name="ViewAreaHeight" config:type="long">26328</config:config-item> <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item> <config:config-item config:name="InBrowseMode" config:type="boolean">true</config:config-item> <config:config-item-map-indexed config:name="Views"> <config:config-item-map-entry> <config:config-item config:name="ViewId" config:type="string">view2</config:config-item> - <config:config-item config:name="ViewLeft" config:type="long">3649</config:config-item> - <config:config-item config:name="ViewTop" config:type="long">3434</config:config-item> + <config:config-item config:name="ViewLeft" config:type="long">7751</config:config-item> + <config:config-item config:name="ViewTop" config:type="long">5336</config:config-item> <config:config-item config:name="VisibleLeft" config:type="long">501</config:config-item> - <config:config-item config:name="VisibleTop" config:type="long">561</config:config-item> - <config:config-item config:name="VisibleRight" config:type="long">22091</config:config-item> - <config:config-item config:name="VisibleBottom" config:type="long">27257</config:config-item> + <config:config-item config:name="VisibleTop" config:type="long">2958</config:config-item> + <config:config-item config:name="VisibleRight" config:type="long">22117</config:config-item> + <config:config-item config:name="VisibleBottom" config:type="long">29284</config:config-item> <config:config-item config:name="ZoomType" config:type="short">0</config:config-item> <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item> <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item> @@ -82,7 +82,7 @@ </config:config-item-map-entry> </config:config-item-map-indexed> <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item> - <config:config-item config:name="Rsid" config:type="int">12584784</config:config-item> + <config:config-item config:name="Rsid" config:type="int">12614934</config:config-item> <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item> <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item> <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item> @@ -173,7 +173,7 @@ <office:styles> <style:default-style style:family="graphic"> <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="true"/> - <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false"> + <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false"> <style:tab-stops/> </style:paragraph-properties> <style:text-properties style:use-window-font-color="true" loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="hu" fo:country="HU" style:letter-kerning="true" style:font-name-asian="SimSun" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Mangal1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/> @@ -351,23 +351,26 @@ </office:styles> <office:automatic-styles> <style:style style:name="Tabelle1" style:family="table"> - <style:table-properties style:width="21.168cm" table:align="left"/> + <style:table-properties style:width="21.195cm" table:align="left"/> </style:style> <style:style style:name="Tabelle1.A" style:family="table-column"> - <style:table-column-properties style:column-width="4.81cm"/> + <style:table-column-properties style:column-width="4.909cm"/> </style:style> <style:style style:name="Tabelle1.B" style:family="table-column"> - <style:table-column-properties style:column-width="5.392cm"/> + <style:table-column-properties style:column-width="5.703cm"/> </style:style> ... etc. - the rest is truncated
