core.git: Branch 'libreoffice-24-8' - include/sfx2 sc/inc sc/qa sc/source sfx2/source
include/sfx2/objsh.hxx |6 sc/inc/scabstdlg.hxx|3 sc/qa/unit/data/csv/tdf48731.csv|4 sc/source/ui/attrdlg/scdlgfact.cxx |5 sc/source/ui/attrdlg/scdlgfact.hxx |3 sc/source/ui/dbgui/scuiasciiopt.cxx | 33 --- sc/source/ui/inc/scuiasciiopt.hxx |3 sc/source/ui/unoobj/filtuno.cxx | 12 - sfx2/source/doc/objstor.cxx | 314 9 files changed, 13 insertions(+), 370 deletions(-) New commits: commit 68da28d3c68a6c5800bb2163b4514e7fce83c71b Author: Xisco Fauli AuthorDate: Sat Sep 7 14:13:03 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 18:27:54 2024 +0200 tdf#162822: Revert "tdf#152336 Detect charset... (24.8 only) ... and separators for csv files" This reverts commit 2feda8ba21acdcf33a9b4ba94742f574c17839bd. See discussion in tdf#162822 Change-Id: I585edfd3318961fb4d6a45a8cab8d00da4ae3fd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172993 Reviewed-by: Gabriel Masei Tested-by: Jenkins diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index ab8540bf86fa..e32ad525a5d4 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -45,8 +45,6 @@ #include #include -#include - namespace weld {class Button; } namespace model {class ColorSet; } struct NamedColor; @@ -445,10 +443,6 @@ public: const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const; boolSetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo ); -static void DetectCharSet(SvStream& stream, rtl_TextEncoding& eCharSet, SvStreamEndian& endian); -static void DetectCsvSeparators(SvStream& stream, rtl_TextEncoding& eCharSet, OUString& separators, sal_Unicode cStringDelimiter); -static void DetectCsvFilterOptions(SvStream& stream, OUString& aFilterOptions); -static void DetectFilterOptions(SfxMedium* pMedium); static ErrCode HandleFilter( SfxMedium* pMedium, SfxObjectShell const * pDoc ); virtual boolPrepareClose(bool bUI = true); diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 40cf91404518..067821325d90 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -418,8 +418,7 @@ public: virtual VclPtr CreateScImportAsciiDlg(weld::Window* pParent, const OUString& aDatName, SvStream* pInStream, - ScImportAsciiCall eCall, - ScAsciiOptions* aOptions = nullptr) = 0; + ScImportAsciiCall eCall) = 0; virtual VclPtr CreateScTextImportOptionsDlg(weld::Window* pParent) = 0; diff --git a/sc/qa/unit/data/csv/tdf48731.csv b/sc/qa/unit/data/csv/tdf48731.csv index fdbead52112e..c0353427ced3 100644 --- a/sc/qa/unit/data/csv/tdf48731.csv +++ b/sc/qa/unit/data/csv/tdf48731.csv @@ -1,4 +1,4 @@ -WITHOUT QUOTES, +WITHOUT QUOTES 1 apostrophe,' 2 apostrophes,'' 3 apostrophes,''' @@ -6,7 +6,7 @@ A number,'3 A word,'word A misspelled word,'mword -WITH QUOTES, +WITH QUOTES 1 apostrophe,"'" 2 apostrophes,"''" 3 apostrophes,"'''" diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 1dba14884dbc..27596ce68c37 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -1063,10 +1063,9 @@ const SfxItemSet* ScAsyncTabController_Impl::GetOutputItemSet() const // =Factories for createdialog === VclPtr ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg(weld::Window* pParent, const OUString& aDatName, -SvStream* pInStream, ScImportAsciiCall eCall, -ScAsciiOptions* aOptions) +SvStream* pInStream, ScImportAsciiCall eCall) { -return VclPtr::Create(std::make_shared(pParent, aDatName,pInStream, eCall, aOptions)); +return VclPtr::Create(std::make_shared(pParent, aDatName,pInStream, eCall)); } VclPtr ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(weld::Window* pParent) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index e1c2d0f52df3..1831ee69eedb 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -664,8 +664,7 @@ public: virtual VclPtr CreateScImportAsciiDlg(weld::Window* pParent,
help.git: AllLangHelp_shared.mk source/text
AllLangHelp_shared.mk |1 source/text/scalc/01/statistics_fourier.xhp |3 + source/text/shared/00/0001.xhp |2 - source/text/shared/01/06130500.xhp | 49 4 files changed, 2 insertions(+), 53 deletions(-) New commits: commit 970df2d1be6b52393668f2554c2f6cdf1f2f05dc Author: Olivier Hallot AuthorDate: Fri Sep 6 18:56:46 2024 -0300 Commit: Olivier Hallot CommitDate: Sat Sep 7 18:56:58 2024 +0200 tdf#162607 Remove dup's in hid2file.js + fixed Fourier bad bookmark + needless bookmark in shared/00/0001.xhp "delete". + deleted page shared/01/06130500.xhp because of full duplicate of sbasic/ homonym Change-Id: Ib9506e93f868dbc6c35b7dfbd73cad72c807d6f6 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172990 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk index c4c1b3ffea..8778ce8a60 100644 --- a/AllLangHelp_shared.mk +++ b/AllLangHelp_shared.mk @@ -311,7 +311,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ helpcontent2/source/text/shared/01/06130100 \ helpcontent2/source/text/shared/01/06130200 \ helpcontent2/source/text/shared/01/06130300 \ -helpcontent2/source/text/shared/01/06130500 \ helpcontent2/source/text/shared/01/0614 \ helpcontent2/source/text/shared/01/06140100 \ helpcontent2/source/text/shared/01/06140101 \ diff --git a/source/text/scalc/01/statistics_fourier.xhp b/source/text/scalc/01/statistics_fourier.xhp index 7a8046d48f..6480a096f5 100644 --- a/source/text/scalc/01/statistics_fourier.xhp +++ b/source/text/scalc/01/statistics_fourier.xhp @@ -20,7 +20,8 @@ - + + Analysis toolpack;Fourier analysis Fourier analysis;Analysis toolpack diff --git a/source/text/shared/00/0001.xhp b/source/text/shared/00/0001.xhp index 8dedcf27d8..13ba553abb 100644 --- a/source/text/shared/00/0001.xhp +++ b/source/text/shared/00/0001.xhp @@ -87,7 +87,6 @@ - @@ -98,7 +97,6 @@ - Delete diff --git a/source/text/shared/01/06130500.xhp b/source/text/shared/01/06130500.xhp deleted file mode 100644 index a84e69de31..00 --- a/source/text/shared/01/06130500.xhp +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - -Append libraries -/text/shared/01/06130500.xhp - - -Sun Microsystems, Inc. - - - -Append libraries -Locate the %PRODUCTNAME Basic library that you want to add to the current list, and then click Open. - - -File name: -Enter a name or the path to the library that you want to append. You can also select a library from the list. -Options - -Insert as reference (read-only) -Adds the selected library as a read-only file. The library is reloaded each time you start %PRODUCTNAME. - -Replace existing libraries -Replaces a library that has the same name with the current library. - -
core.git: 2 commits - helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e05dc87dbca32fa591b8ff5f7fa8e12763660d53 Author: Olivier Hallot AuthorDate: Sat Sep 7 13:57:48 2024 -0300 Commit: Gerrit Code Review CommitDate: Sat Sep 7 18:57:48 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to b9174d7844e4e6df7820b63fd62c9c1eb70752d3 - tdf#162607 Remove dup's in hid2file.js, pdf export + fixed bad bookmark + refactor Change-Id: I48f2395c9b1b667333f81f2d6ced11d0cb6efae8 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172991 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 970df2d1be6b..b9174d7844e4 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 970df2d1be6b52393668f2554c2f6cdf1f2f05dc +Subproject commit b9174d7844e4e6df7820b63fd62c9c1eb70752d3 commit 044c40afcd2576ad954aaff14b4053e683e730c1 Author: Olivier Hallot AuthorDate: Sat Sep 7 13:56:58 2024 -0300 Commit: Gerrit Code Review CommitDate: Sat Sep 7 18:56:58 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 970df2d1be6b52393668f2554c2f6cdf1f2f05dc - tdf#162607 Remove dup's in hid2file.js + fixed Fourier bad bookmark + needless bookmark in shared/00/0001.xhp "delete". + deleted page shared/01/06130500.xhp because of full duplicate of sbasic/ homonym Change-Id: Ib9506e93f868dbc6c35b7dfbd73cad72c807d6f6 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172990 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 8c0678cb66b3..970df2d1be6b 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 8c0678cb66b35d04a3aa791383ff6b9007700e5e +Subproject commit 970df2d1be6b52393668f2554c2f6cdf1f2f05dc
help.git: source/text
source/text/shared/01/ref_pdf_export.xhp | 12 ++-- source/text/shared/01/ref_pdf_export_general.xhp |2 +- 2 files changed, 7 insertions(+), 7 deletions(-) New commits: commit b9174d7844e4e6df7820b63fd62c9c1eb70752d3 Author: Olivier Hallot AuthorDate: Sat Sep 7 08:07:36 2024 -0300 Commit: Olivier Hallot CommitDate: Sat Sep 7 18:57:48 2024 +0200 tdf#162607 Remove dup's in hid2file.js, pdf export + fixed bad bookmark + refactor Change-Id: I48f2395c9b1b667333f81f2d6ced11d0cb6efae8 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172991 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/01/ref_pdf_export.xhp b/source/text/shared/01/ref_pdf_export.xhp index 7e92e06b49..5c195f321f 100644 --- a/source/text/shared/01/ref_pdf_export.xhp +++ b/source/text/shared/01/ref_pdf_export.xhp @@ -20,7 +20,7 @@ -Export as PDF +Export as PDF /text/shared/01/ref_pdf_export.xhp @@ -28,16 +28,16 @@ - + PDF;export portable document format exporting;to PDF MW made "PDF export a two level entry"UFI: write guide and move bookmarks there - + Export as PDF -Saves the current file to Portable Document Format (PDF) version 1.4. A PDF file can be viewed and printed on any platform with the original formatting intact, provided that supporting software is installed. +Saves the current file to Portable Document Format (PDF) version 1.4. A PDF file can be viewed and printed on any platform with the original formatting intact, provided that supporting software is installed. @@ -51,8 +51,8 @@ - + Export button -Exports the current file in PDF format. +Exports the current file in PDF format. diff --git a/source/text/shared/01/ref_pdf_export_general.xhp b/source/text/shared/01/ref_pdf_export_general.xhp index db0a463cdc..9421f0d020 100644 --- a/source/text/shared/01/ref_pdf_export_general.xhp +++ b/source/text/shared/01/ref_pdf_export_general.xhp @@ -48,7 +48,7 @@ Selection Exports the current selection. - + View PDF after export Open the exported document in the system default PDF viewer.
help.git: source/text
source/text/scalc/01/04060106.xhp |3 - source/text/scalc/01/func_ceiling.xhp | 58 - source/text/scalc/01/func_networkdays.intl.xhp | 28 ++-- source/text/scalc/01/func_networkdays.xhp | 27 +-- 4 files changed, 57 insertions(+), 59 deletions(-) New commits: commit ce3c29b0ba0db095049bb4792db3b0df10ad0a94 Author: Olivier Hallot AuthorDate: Sat Sep 7 08:44:21 2024 -0300 Commit: Olivier Hallot CommitDate: Sat Sep 7 18:59:38 2024 +0200 tdf#162607 Remove dup's in hid2file.js, SC_HID* + fixed bad bookmarks + refactor Change-Id: Ie466ecff62f4bdcbecfe737a80c5ff2a93e02d9d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172992 Reviewed-by: Olivier Hallot Tested-by: Jenkins diff --git a/source/text/scalc/01/04060106.xhp b/source/text/scalc/01/04060106.xhp index 013826ae9b..78751f8bac 100644 --- a/source/text/scalc/01/04060106.xhp +++ b/source/text/scalc/01/04060106.xhp @@ -1297,11 +1297,10 @@ EUROCONVERT function - EUROCONVERTinsert link in financial -Converts between old European national currency and to and from Euros. +Converts between old European national currency and to and from Euros. EUROCONVERT(Value; "From_currency"; "To_currency" [; full_precision [; triangulation_precision]]) diff --git a/source/text/scalc/01/func_ceiling.xhp b/source/text/scalc/01/func_ceiling.xhp index b52b1a453e..548c6d745f 100644 --- a/source/text/scalc/01/func_ceiling.xhp +++ b/source/text/scalc/01/func_ceiling.xhp @@ -10,30 +10,30 @@ --> -Ceiling functions +Ceiling functions /text/scalc/01/func_ceiling.xhp Ceiling functions - + CEILING function rounding;up to multiples of significance mw added one entry - + CEILING -Rounds a number to the nearest multiple of a significance value. +Rounds a number to the nearest multiple of a significance value. For a positive number and a positive significance value, the function rounds up (away from zero). For a negative number and a negative significance value, the direction of rounding is determined by the value of a mode parameter. The function returns an error if the number and significance values have opposite signs. If the spreadsheet is exported to Microsoft Excel, the CEILING function is exported as the equivalent CEILING.MATH function that has existed since Excel 2013. If you plan to use the spreadsheet with earlier Excel versions, use either CEILING.PRECISE that has existed since Excel 2010, or CEILING.XCL that is exported as the CEILING function compatible with all Excel versions. -CEILING(Number [; Significance [; Mode]]) +CEILING(Number [; Significance [; Mode]]) -Number is the number that is to be rounded, or a reference to a cell containing the number. +Number is the number that is to be rounded, or a reference to a cell containing the number. -Significance (optional) is the value, or a reference to a cell containing the value, to whose multiple Number is to be rounded. It defaults to +1 or -1 depending on the sign of Number. -Mode (optional) is a number, or a reference to a cell containing a number. The function only uses Mode if both Number and Significance are negative. Then if Mode is given and not equal to zero, numbers are rounded down (away from zero); if Mode is equal to zero or not given, negative numbers are rounded up (towards zero). +Significance (optional) is the value, or a reference to a cell containing the value, to whose multiple Number is to be rounded. It defaults to +1 or -1 depending on the sign of Number. +Mode (optional) is a number, or a reference to a cell containing a number. The function only uses Mode if both Number and Significance are negative. Then if Mode is given and not equal to zero, numbers are rounded down (away from zero); if Mode is equal to zero or not given, negative numbers are rounded up (towards zero). =CEILING(3.45) returns 4. =CEILING(3.45; 3) returns 6. @@ -44,20 +44,20 @@ - + CEILING.PRECISE function rounding;up to multiples of significance mw added one entry - + CEILING.PRECISE -Rounds a number up to the nearest multiple of a significance value. +Rounds a number up to the nearest multiple of a significance value. For a positive number the function rounds up (away from zero). For a negative number, the function rounds up (towards zero). The sign of the significance value is ignored. This function calculates identical results to the ISO.CEILING function. -CEILING.PRECISE(Number [; Significance]) +CEILING.PRECISE(Number [; Significance])
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 911c3a840f5ce34e1fb7e34a144e4e44204eb7d9 Author: Olivier Hallot AuthorDate: Sat Sep 7 13:59:38 2024 -0300 Commit: Gerrit Code Review CommitDate: Sat Sep 7 18:59:38 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to ce3c29b0ba0db095049bb4792db3b0df10ad0a94 - tdf#162607 Remove dup's in hid2file.js, SC_HID* + fixed bad bookmarks + refactor Change-Id: Ie466ecff62f4bdcbecfe737a80c5ff2a93e02d9d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172992 Reviewed-by: Olivier Hallot Tested-by: Jenkins diff --git a/helpcontent2 b/helpcontent2 index b9174d7844e4..ce3c29b0ba0d 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit b9174d7844e4e6df7820b63fd62c9c1eb70752d3 +Subproject commit ce3c29b0ba0db095049bb4792db3b0df10ad0a94
core.git: sw/inc sw/source
sw/inc/doc.hxx |2 sw/source/core/bastyp/init.cxx |2 sw/source/core/doc/doc.cxx | 89 + sw/source/core/undo/unattr.cxx | 23 - sw/source/uibase/utlui/content.cxx | 65 --- 5 files changed, 94 insertions(+), 87 deletions(-) New commits: commit ad74339c052667b4d10fc655e1753db92420e2bb Author: Noel Grandin AuthorDate: Sat Sep 7 15:52:03 2024 +0200 Commit: Noel Grandin CommitDate: Sat Sep 7 19:18:15 2024 +0200 dont use GetItemSurrogates for gathering SwFormatRefMark which is very expensive these days Change-Id: I8698d3bb9a7d49a5444ed901859f636647e4d116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172996 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 2652b56882f9..a8fdadfd4b06 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1333,6 +1333,8 @@ public: If array pointer is 0 return only whether a RefMark is set in document. */ SW_DLLPUBLIC sal_uInt16 GetRefMarks( std::vector* = nullptr ) const; SW_DLLPUBLIC void GetRefMarks( std::vector& ) const; +/// Iterate over all SwFormatRefMark, if the function returns false, iteration is stopped +SW_DLLPUBLIC void ForEachRefMark( const std::function& ) const; void DeleteFormatRefMark(const SwFormatRefMark* pFormatRefMark); diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index c673a1a2729b..bfe8f4d8833f 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -330,7 +330,7 @@ ItemInfoPackage& getItemInfoPackageSwAttributes() { RES_CHRATR_BIDIRTL, new SfxInt16Item( RES_CHRATR_BIDIRTL, sal_Int16(-1) ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_CHRATR_IDCTHINT, new SfxInt16Item( RES_CHRATR_IDCTHINT, sal_Int16(-1) ), 0, SFX_ITEMINFOFLAG_NONE }, -{ RES_TXTATR_REFMARK, new SwFormatRefMark( OUString() ), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, +{ RES_TXTATR_REFMARK, new SwFormatRefMark( OUString() ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_TOXMARK, createSwTOXMarkForItemInfoPackage(), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, { RES_TXTATR_META, SwFormatMeta::CreatePoolDefault(RES_TXTATR_META), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_METAFIELD, SwFormatMeta::CreatePoolDefault(RES_TXTATR_METAFIELD), 0, SFX_ITEMINFOFLAG_NONE }, diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index ae631735138f..3eea7da62079 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1071,17 +1071,19 @@ void SwDoc::CalculatePagePairsForProspectPrinting( /// @return the reference in the doc for the name const SwFormatRefMark* SwDoc::GetRefMark( std::u16string_view rName ) const { -ItemSurrogates aSurrogates; -GetAttrPool().GetItemSurrogates(aSurrogates, RES_TXTATR_REFMARK); -for (const SfxPoolItem* pItem : aSurrogates) -{ -const auto & rFormatRef = static_cast(*pItem); -const SwTextRefMark* pTextRef = rFormatRef.GetTextRefMark(); -if( pTextRef && &pTextRef->GetTextNode().GetNodes() == &GetNodes() && -rName == rFormatRef.GetRefName() ) -return &rFormatRef; -} -return nullptr; +const SwFormatRefMark* pRet = nullptr; +ForEachRefMark( +[&pRet, &rName] (const SwFormatRefMark& rRefMark) -> bool +{ +const SwTextRefMark* pTextRef = rRefMark.GetTextRefMark(); +if( pTextRef && rName == rRefMark.GetRefName() ) +{ +pRet = &rRefMark; +return false; +} +return true; +}); +return pRet; } /// @return the RefMark per index - for Uno @@ -1090,22 +1092,17 @@ const SwFormatRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const const SwFormatRefMark* pRet = nullptr; sal_uInt32 nCount = 0; -ItemSurrogates aSurrogates; -GetAttrPool().GetItemSurrogates(aSurrogates, RES_TXTATR_REFMARK); -for (const SfxPoolItem* pItem : aSurrogates) -{ -const auto & rRefMark = static_cast(*pItem); -const SwTextRefMark* pTextRef = rRefMark.GetTextRefMark(); -if( pTextRef && &pTextRef->GetTextNode().GetNodes() == &GetNodes() ) +ForEachRefMark( +[&nCount, &pRet, &nIndex] (const SwFormatRefMark& rRefMark) -> bool { if(nCount == nIndex) { pRet = &rRefMark; -break; +return false; } nCount++; -} -} +return true; +}); return pRet; } @@ -1115,13 +1112,8 @@ const SwFormatRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const sal_uInt16 SwDoc::GetRefMarks( std::vector* pNames ) const { sal_uInt16 nCount = 0; -ItemSurrogates aSurrogates; -GetAttrPool().GetItemSurrogates(aSurroga
core.git: sc/source
sc/source/ui/view/tabview.cxx | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) New commits: commit 50d373a275626d894dc885d4c2cc28a9f9b8b912 Author: Patrick Luby AuthorDate: Thu Aug 29 21:07:20 2024 -0400 Commit: Patrick Luby CommitDate: Sat Sep 7 19:42:22 2024 +0200 tdf#161945 increase sensitivity for negative horizontal deltas A side effect of the anti-jitter code is that it tends to reduce the sensitivity of horizontal scroll events towards the first column. It is particularly noticeable with horizontal scroll events from a scrollwheel when the view position is in column B or C. This results in a very small delta from the anti-jitter code. So, to balance things out, apply a constant adjustment factor to increase the sensitivity more for small deltas than for large deltas. Also, while the fix for tdf#135478 reduces the horizontal scroll delta applied to the tab view, the horizontal scrollbar is set before that with the original delta. As a result, the horizontal scrollbar is now mispositioned so update the horizontal scrollbar position to match the position of the tab view's visible columns. Change-Id: I4be66c40692d4b92557f31235339ac6c40755ae7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172619 Tested-by: Jenkins Reviewed-by: Patrick Luby diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 1e999d876cfe..36802c39168b 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -1112,6 +1112,8 @@ IMPL_LINK_NOARG(ScTabView, EndScrollHdl, const MouseEvent&, bool) void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) { +bool bUpdateHorizontalScrollbars = false; + bool bHoriz = ( pScroll == aHScrollLeft.get() || pScroll == aHScrollRight.get() ); tools::Long nViewPos; if ( bHoriz ) @@ -1289,7 +1291,22 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) // slower than they are used to. If that becomes an // issue for enough users, the reduction factor may // need to be lowered to find a good balance point. -static const sal_uInt16 nHScrollReductionFactor = 8; +static const tools::Long nHScrollReductionFactor = 8; + +// tdf#161945 increase sensitivity for negative horizontal deltas +// A side effect of the anti-jitter code is that it tends +// to reduce the sensitivity of horizontal scroll events +// towards the first column. It is particularly noticeable +// with horizontal scroll events from a scrollwheel when +// the view position is in column B or C. This results in +// a very small delta from the anti-jitter code. +// So, to balance things out, apply a constant adjustment +// factor to increase the sensitivity more for small deltas +// than for large deltas. +static const tools::Long nHScrollNegativeDeltaAdjustmentFactor = -1; +if ( nDelta < 0 ) +nDelta += nHScrollNegativeDeltaAdjustmentFactor; + if ( pScroll == aHScrollLeft.get() ) { mnPendingaHScrollLeftDelta += nDelta; @@ -1300,7 +1317,7 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) mnPendingaHScrollLeftDelta = mnPendingaHScrollLeftDelta % nHScrollReductionFactor; } } -else if ( pScroll == aHScrollRight.get() ) +else { mnPendingaHScrollRightDelta += nDelta; nDelta = 0; @@ -1310,6 +1327,8 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) mnPendingaHScrollRightDelta = mnPendingaHScrollRightDelta % nHScrollReductionFactor; } } + +bUpdateHorizontalScrollbars = true; } nPrevDragPos = nScrollPos; @@ -1325,6 +1344,15 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) else ScrollY( nDelta, (pScroll == aVScrollTop.get()) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM, bUpdate ); } + +// tdf#161945 update horizontal scrollbar position to match tab view +// While the fix for tdf#135478 reduces the horizontal scroll delta +// applied to the tab view, the horizontal scrollbar is set before +// that with the original delta. As a result, the horizontal scrollbar +// is now mispositioned so update the horizontal scrollbar position +// to match the position of the tab view's visible columns. +if ( bUpdateHorizontalScrollbars ) +UpdateScroll
core.git: sw/inc sw/source
sw/inc/doc.hxx |2 + sw/source/core/bastyp/init.cxx |2 - sw/source/core/crsr/crstrvl.cxx | 17 ++ sw/source/core/doc/doctxm.cxx | 64 +++- 4 files changed, 58 insertions(+), 27 deletions(-) New commits: commit 774b578c65c2443f2ea2b95bc6402a49f0020ea0 Author: Noel Grandin AuthorDate: Sat Sep 7 19:17:24 2024 +0200 Commit: Noel Grandin CommitDate: Sat Sep 7 20:45:22 2024 +0200 dont use GetItemSurrogates for gathering SwTOXMark which is very expensive these days Change-Id: I412c30310f001a7b7c9350a7e0da62bdcddc498c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173001 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index a8fdadfd4b06..e09e51aeb0ca 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -937,6 +937,8 @@ public: void DeleteTOXMark( const SwTOXMark* pTOXMark ); SW_DLLPUBLIC const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark, SwTOXSearch eDir, bool bInReadOnly ); +/// Iterate over all SwTOXMark, if the function returns false, iteration is stopped +SW_DLLPUBLIC void ForEachTOXMark( const std::function& ) const; // Insert/Renew table/index SW_DLLPUBLIC SwTOXBaseSection* InsertTableOf( const SwPosition& rPos, diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index bfe8f4d8833f..c4ba7f2a4394 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -331,7 +331,7 @@ ItemInfoPackage& getItemInfoPackageSwAttributes() { RES_CHRATR_IDCTHINT, new SfxInt16Item( RES_CHRATR_IDCTHINT, sal_Int16(-1) ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_REFMARK, new SwFormatRefMark( OUString() ), 0, SFX_ITEMINFOFLAG_NONE }, -{ RES_TXTATR_TOXMARK, createSwTOXMarkForItemInfoPackage(), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, +{ RES_TXTATR_TOXMARK, createSwTOXMarkForItemInfoPackage(), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_META, SwFormatMeta::CreatePoolDefault(RES_TXTATR_META), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_METAFIELD, SwFormatMeta::CreatePoolDefault(RES_TXTATR_METAFIELD), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_AUTOFMT, new SwFormatAutoFormat, 0, SFX_ITEMINFOFLAG_NONE }, diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index dd30f73f88dc..96899a9db013 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -519,10 +519,13 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext ) GetContentNode()->getLayoutFrame(GetLayout(), &rPos, &tmp)); } -const SwTextNode* pTextNd; -const SwTextTOXMark* pTextTOX; -ItemSurrogates aSurrogates; -GetDoc()->GetAttrPool().GetItemSurrogates(aSurrogates, RES_TXTATR_TOXMARK); +std::vector aSurrogates; +GetDoc()->ForEachTOXMark( +[&aSurrogates] (const SwTOXMark& rItem) -> bool +{ +aSurrogates.push_back(&rItem); +return true; +}); const sal_uInt32 nMaxItems(aSurrogates.size()); if( nMaxItems == 0 ) { @@ -530,10 +533,12 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext ) return false; } +const SwTextNode* pTextNd; +const SwTextTOXMark* pTextTOX; do { -for (const SfxPoolItem* pItem : aSurrogates) +for (const SwTOXMark* pItem : aSurrogates) { -auto & rToxMarkItem = static_cast(*pItem); +auto & rToxMarkItem = *pItem; pTextTOX = rToxMarkItem.GetTextTOXMark(); if( !pTextTOX ) continue; diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 7985233d1f9c..9f9f245a758c 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -83,34 +83,58 @@ MakeSwTOXSortTabBase(SwRootFrame const*const pLayout, Args&& ... args) return pRet; } +/// Iterate over all SwTOXMark, if the function returns false, iteration is stopped +void SwDoc::ForEachTOXMark( const std::function& rFunc ) const +{ +SwNodeOffset nCount = GetNodes().Count(); +for (SwNodeOffset i(0); i < nCount; ++i) +{ +SwNode* pNode = GetNodes()[i]; +if (!pNode->IsTextNode()) +continue; +SwTextNode* pTextNode = pNode->GetTextNode(); +if (!pTextNode->HasHints()) +continue; +SwpHints& rHints = pTextNode->GetSwpHints(); +for (size_t j = 0; j < rHints.Count(); ++j) +{ +const SwTextAttr* pTextAttr = rHints.Get(j); +if (pTextAttr->Which() != RES_TXTATR_TOXMARK) +continue; +const SwTOXMark& rToxMark = pTextAttr->GetTOXMark(); +if (!rFunc(rToxMark)) +return; +} +} +} + void SwDoc::GetTOIKeys(SwTOIKeyType eTyp, std::vector& rArr,
core.git: svx/source
svx/source/gallery2/galbrws1.cxx | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) New commits: commit 3a0c79aace5b93b597d827485da87b10d0d6cecc Author: Xisco Fauli AuthorDate: Sat Sep 7 17:59:26 2024 +0200 Commit: Caolán McNamara CommitDate: Sat Sep 7 21:14:59 2024 +0200 svx: fix Dereference before null check Seen in https://crashreport.libreoffice.org/stats/signature/GalleryBrowser1::FillThemeEntries() Regression from commit 09c6204b6309321aa25c542f918fde9f5f3f7fe2 Author: Oliver Specht Date: Thu Feb 29 17:15:23 2024 +0100 tdf#81880 Search the Gallery Change-Id: I4c19920b5f7a56fff37587cd1acf579f3a96ae4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172997 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 4aeb69fbb2df..14d2e841e4e0 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -1497,17 +1497,19 @@ void GalleryBrowser1::FillThemeEntries() const GalleryThemeEntry* pThemeInfo = mpGallery->GetThemeInfo( i ); OUString aThemeName = pThemeInfo->GetThemeName(); //sal_uInt32 nId = pThemeInfo->GetId(); -GalleryTheme* pTheme = mpGallery->AcquireTheme(aThemeName, maLocalListner); -sal_uInt32 nObjectCount = pTheme->GetObjectCount(); -for (size_t nObject = 0; nObject < nObjectCount; ++nObject) +if (GalleryTheme* pTheme = mpGallery->AcquireTheme(aThemeName, maLocalListner)) { -if (std::unique_ptr xSgaObject = pTheme->AcquireObject(nObject)) +sal_uInt32 nObjectCount = pTheme->GetObjectCount(); +for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { -OUString aTitle = GetItemText(*xSgaObject, GalleryItemFlags::Title); -maAllThemeEntries.push_back(ThemeEntry(aThemeName, aTitle, nObject)); +if (std::unique_ptr xSgaObject = pTheme->AcquireObject(nObject)) +{ +OUString aTitle = GetItemText(*xSgaObject, GalleryItemFlags::Title); +maAllThemeEntries.push_back(ThemeEntry(aThemeName, aTitle, nObject)); +} } +mpGallery->ReleaseTheme(pTheme, maLocalListner); } -mpGallery->ReleaseTheme(pTheme, maLocalListner); } maFoundThemeEntries.assign(maAllThemeEntries.begin(), maAllThemeEntries.end()); }
core.git: Branch 'libreoffice-24-8' - sc/source
sc/source/ui/view/tabview.cxx | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) New commits: commit 063b64d0ad31a68a13da0ee0803a7016890b7b28 Author: Patrick Luby AuthorDate: Thu Aug 29 21:07:20 2024 -0400 Commit: Ilmari Lauhakangas CommitDate: Sat Sep 7 21:21:06 2024 +0200 tdf#161945 increase sensitivity for negative horizontal deltas A side effect of the anti-jitter code is that it tends to reduce the sensitivity of horizontal scroll events towards the first column. It is particularly noticeable with horizontal scroll events from a scrollwheel when the view position is in column B or C. This results in a very small delta from the anti-jitter code. So, to balance things out, apply a constant adjustment factor to increase the sensitivity more for small deltas than for large deltas. Also, while the fix for tdf#135478 reduces the horizontal scroll delta applied to the tab view, the horizontal scrollbar is set before that with the original delta. As a result, the horizontal scrollbar is now mispositioned so update the horizontal scrollbar position to match the position of the tab view's visible columns. Change-Id: I4be66c40692d4b92557f31235339ac6c40755ae7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172619 Tested-by: Jenkins Reviewed-by: Patrick Luby (cherry picked from commit 50d373a275626d894dc885d4c2cc28a9f9b8b912) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173005 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 8eba950c48ce..163d220af5e1 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -1089,6 +1089,8 @@ IMPL_LINK_NOARG(ScTabView, EndScrollHdl, const MouseEvent&, bool) void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) { +bool bUpdateHorizontalScrollbars = false; + bool bHoriz = ( pScroll == aHScrollLeft.get() || pScroll == aHScrollRight.get() ); tools::Long nViewPos; if ( bHoriz ) @@ -1266,7 +1268,22 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) // slower than they are used to. If that becomes an // issue for enough users, the reduction factor may // need to be lowered to find a good balance point. -static const sal_uInt16 nHScrollReductionFactor = 8; +static const tools::Long nHScrollReductionFactor = 8; + +// tdf#161945 increase sensitivity for negative horizontal deltas +// A side effect of the anti-jitter code is that it tends +// to reduce the sensitivity of horizontal scroll events +// towards the first column. It is particularly noticeable +// with horizontal scroll events from a scrollwheel when +// the view position is in column B or C. This results in +// a very small delta from the anti-jitter code. +// So, to balance things out, apply a constant adjustment +// factor to increase the sensitivity more for small deltas +// than for large deltas. +static const tools::Long nHScrollNegativeDeltaAdjustmentFactor = -1; +if ( nDelta < 0 ) +nDelta += nHScrollNegativeDeltaAdjustmentFactor; + if ( pScroll == aHScrollLeft.get() ) { mnPendingaHScrollLeftDelta += nDelta; @@ -1277,7 +1294,7 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) mnPendingaHScrollLeftDelta = mnPendingaHScrollLeftDelta % nHScrollReductionFactor; } } -else if ( pScroll == aHScrollRight.get() ) +else { mnPendingaHScrollRightDelta += nDelta; nDelta = 0; @@ -1287,6 +1304,8 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) mnPendingaHScrollRightDelta = mnPendingaHScrollRightDelta % nHScrollReductionFactor; } } + +bUpdateHorizontalScrollbars = true; } nPrevDragPos = nScrollPos; @@ -1302,6 +1321,15 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) else ScrollY( nDelta, (pScroll == aVScrollTop.get()) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM, bUpdate ); } + +// tdf#161945 update horizontal scrollbar position to match tab view +// While the fix for tdf#135478 reduces the horizontal scroll delta +// applied to the tab view, the horizontal scrollbar is set before +// that with the original delta. As a result, the horiz
core.git: svx/source
svx/source/gallery2/galbrws1.cxx | 24 svx/source/inc/galbrws1.hxx |2 +- 2 files changed, 13 insertions(+), 13 deletions(-) New commits: commit eef52a368001c4b99381eecde0945601004e55ef Author: Xisco Fauli AuthorDate: Sat Sep 7 18:03:51 2024 +0200 Commit: Caolán McNamara CommitDate: Sat Sep 7 21:22:49 2024 +0200 svx: maLocalListner -> maLocalListener Change-Id: Ie9ba310fcc57f27bcdbeb8dcb9ca1e0ecb35df0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172998 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 14d2e841e4e0..e7e3cece147c 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -248,7 +248,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa void GalleryBrowser1::ImplGetExecuteVector(std::vector& o_aExec) { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListener ); if( !pTheme ) return; @@ -280,14 +280,14 @@ void GalleryBrowser1::ImplGetExecuteVector(std::vector& o_aExec) o_aExec.emplace_back("properties"); -mpGallery->ReleaseTheme( pTheme, maLocalListner ); +mpGallery->ReleaseTheme( pTheme, maLocalListener ); } void GalleryBrowser1::ImplGalleryThemeProperties( std::u16string_view rThemeName, bool bCreateNew ) { DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already set!"); mpThemePropsDlgItemSet.reset(new SfxItemSet( SfxGetpApp()->GetPool() )); -GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListner ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListener ); ImplFillExchangeData( pTheme, *mpExchangeData ); @@ -337,7 +337,7 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties(bool bCreateNew, sal_Int32 n } OUString aThemeName( mpExchangeData->pTheme->GetName() ); -mpGallery->ReleaseTheme( mpExchangeData->pTheme, maLocalListner ); +mpGallery->ReleaseTheme( mpExchangeData->pTheme, maLocalListener ); if ( bCreateNew && ( nRet != RET_OK ) ) { @@ -359,13 +359,13 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) { if (rIdent == u"update") { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListener ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr aActualizeProgress(pFact->CreateActualizeProgressDialog(mxThemes.get(), pTheme)); aActualizeProgress->Execute(); -mpGallery->ReleaseTheme( pTheme, maLocalListner ); +mpGallery->ReleaseTheme( pTheme, maLocalListener ); } else if (rIdent == u"delete") { @@ -376,7 +376,7 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) } else if (rIdent == u"rename") { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListener ); const OUString aOldName( pTheme->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -399,11 +399,11 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) mpGallery->RenameTheme( aOldName, aName ); } } -mpGallery->ReleaseTheme( pTheme, maLocalListner ); +mpGallery->ReleaseTheme( pTheme, maLocalListener ); } else if (rIdent == u"assign") { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListener ); if (pTheme && !pTheme->IsReadOnly()) { @@ -414,7 +414,7 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) pTheme->SetId( aDlg->GetId(), true ); } -mpGallery->ReleaseTheme( pTheme, maLocalListner ); +mpGallery->ReleaseTheme( pTheme, maLocalListener ); } else if (rIdent == u"properties") { @@ -1497,7 +1497,7 @@ void GalleryBrowser1::FillThemeEntries() const GalleryThemeEntry* pThemeInfo = mpGallery->GetThemeInfo( i ); OUString aThemeName = pThemeInfo->GetThemeName(); //sal_uInt32 nId = pThemeInfo->GetId(); -if (GalleryTheme* pTheme = mpGallery->AcquireTheme(aThemeName, maLocalListner)) +if (GalleryTheme* pTheme = mpGallery->AcquireTheme(aThemeName, maLocalListener)) { sal_uInt32 nObjectCount = pTheme->GetObjectCount(); for (size_t
core.git: dbaccess/source
dbaccess/source/ui/querydesign/QueryDesignView.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c0fd5f82ff96ab8d5df166aae654243dce0beea2 Author: Julien Nabet AuthorDate: Sat Sep 7 12:02:33 2024 +0200 Commit: Caolán McNamara CommitDate: Sat Sep 7 21:48:38 2024 +0200 tdf#162833: don't use an OUStringBuffer directly in a concat to assign itself SUM( CASE WHEN \"dtPayTyp\" = 1 THEN \"dtPayBetrag\" * - 1 ELSE \"dtPayBetrag\" END ) is transformed into: Sum(Sum( WHEN \"dtPayTyp\" = 1 THEN \"dtPayBetrag\" * - 1 ELSE \"dtPayBetrag\" END) See https://bugs.documentfoundation.org/show_bug.cgi?id=162833#c3 Change-Id: Ie73dd6871bcda1c22cf6f469bd05ecc4d9dacb4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172989 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 47c7a996be94..cd00da8dcf60 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -651,7 +651,7 @@ namespace if ( field->isAggregateFunction() ) { OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-("); -aTmpStr = field->GetFunction() + "(" + aTmpStr + ")"; +aTmpStr = field->GetFunction() + "(" + aTmpStr.makeStringAndClear() + ")"; } if (!rFieldAlias.isEmpty() &&
core.git: xmloff/source
xmloff/source/core/xmlexp.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit c9f2ec93939417a120f26d64c2b2dff380e81286 Author: Xisco Fauli AuthorDate: Sat Sep 7 18:26:09 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 21:50:12 2024 +0200 xmloff: fix deref before null check Seen in https://crashreport.libreoffice.org/stats/signature/SvXMLExport::ExportThemeElement(std::shared_ptr%3Cmodel::Theme%3E%20const%20&) Change-Id: I12b9c3cf064100fb6cfeaaf2828dbf08e7dd8a81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173000 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index d1ff0d0f7650..895386726c2a 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1688,6 +1688,8 @@ void SvXMLExport::ExportThemeElement(std::shared_ptr const& pTheme SvXMLElementExport aTheme(*this, XML_NAMESPACE_LO_EXT, XML_THEME, true, true); auto pColorSet = pTheme->getColorSet(); +if (!pColorSet) +return; if (!pColorSet->getName().isEmpty()) AddAttribute(XML_NAMESPACE_LO_EXT, XML_NAME, pColorSet->getName()); SvXMLElementExport aColorTable(*this, XML_NAMESPACE_LO_EXT, XML_THEME_COLORS, true, true);
core.git: sd/source
sd/source/ui/view/viewshel.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit ec1a56b2e13f3a70a53adc6308f34ecc950600fa Author: Xisco Fauli AuthorDate: Sat Sep 7 18:08:41 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 21:51:28 2024 +0200 sd: fix deref before null check Seen in https://crashreport.libreoffice.org/stats/signature/static%20const%20class%20com::sun::star::uno::Reference%3Ccom::sun::star::drawing::framework::XResourceId%3E%20%60sd::ViewShell::BroadcastContextForActivation'::%602'::%3Clambda_1%3E::operator()() Regression from commit 5e143492320dac8cdf8b2956799ca366f3d8e72c Author: Sarper Akdemir Date: Fri Jun 7 21:14:44 2024 +0200 tdf#33603: fix notespane (side/tool)bar interactions Change-Id: Ic6b821a660d5b5aa444224fcb6b0b4eccba5a85a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172999 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 23f6d811c0cd..442ce20a553b 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -448,11 +448,12 @@ void ViewShell::BroadcastContextForActivation(const bool bIsActivated) if (xView.is()) { -auto pViewShellWrapper -= dynamic_cast(xView.get()); -if (pViewShellWrapper->GetViewShell().get() == this) +if (auto pViewShellWrapper = dynamic_cast(xView.get())) { -return rResId; +if (pViewShellWrapper->GetViewShell().get() == this) +{ +return rResId; +} } } }
core.git: cui/source
cui/source/dialogs/hldoctp.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit c8eb95e8407ef24436e0e8e218dce535df6bb2e5 Author: Caolán McNamara AuthorDate: Fri Sep 6 19:52:11 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 7 22:43:32 2024 +0200 cid#1619147 Dereference before null check maybe it possible in --headless that ShowMarkWnd launches weld::DialogController::runAsync(mxMarkWnd, [this](sal_Int32 /*nResult*/) { mxMarkWnd.reset(); } ); and the auto-cancel calls mxMarkWnd.reset() immediately? Otherwise, not sure how this could come about. Change-Id: I761ee7450a8ba54b2a7f75d4ee116c30319ddaa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172976 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 52bda50b47ef..8a3974c7c2a0 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -207,6 +207,9 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void) { ShowMarkWnd(); +if (!mxMarkWnd) +return; + if ( GetPathType ( maStrURL ) == EPathType::ExistsFile || maStrURL.isEmpty() || maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) || @@ -216,13 +219,10 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void) weld::WaitObject aWait(mpDialog->getDialog()); -if (mxMarkWnd) -{ -if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) -mxMarkWnd->RefreshTree ( u""_ustr ); -else -mxMarkWnd->RefreshTree ( maStrURL ); -} +if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) +mxMarkWnd->RefreshTree ( u""_ustr ); +else +mxMarkWnd->RefreshTree ( maStrURL ); } else mxMarkWnd->SetError( LERR_DOCNOTOPEN );
core.git: Branch 'libreoffice-24-8' - dbaccess/source
dbaccess/source/ui/querydesign/QueryDesignView.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 05de49bad2c8d097dc6bf18f1d16093b90fb5768 Author: Julien Nabet AuthorDate: Sat Sep 7 12:02:33 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 23:12:37 2024 +0200 tdf#162833: don't use an OUStringBuffer directly in a concat to assign itself SUM( CASE WHEN \"dtPayTyp\" = 1 THEN \"dtPayBetrag\" * - 1 ELSE \"dtPayBetrag\" END ) is transformed into: Sum(Sum( WHEN \"dtPayTyp\" = 1 THEN \"dtPayBetrag\" * - 1 ELSE \"dtPayBetrag\" END) See https://bugs.documentfoundation.org/show_bug.cgi?id=162833#c3 Change-Id: Ie73dd6871bcda1c22cf6f469bd05ecc4d9dacb4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172989 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit c0fd5f82ff96ab8d5df166aae654243dce0beea2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173007 Reviewed-by: Xisco Fauli diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 47c7a996be94..cd00da8dcf60 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -651,7 +651,7 @@ namespace if ( field->isAggregateFunction() ) { OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-("); -aTmpStr = field->GetFunction() + "(" + aTmpStr + ")"; +aTmpStr = field->GetFunction() + "(" + aTmpStr.makeStringAndClear() + ")"; } if (!rFieldAlias.isEmpty() &&
core.git: Branch 'libreoffice-24-8' - svx/source
svx/source/gallery2/galbrws1.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 091f927d74cff4813c477e842b6658f93623bbb2 Author: Mike Kaganski AuthorDate: Sun Aug 25 22:26:45 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 23:18:35 2024 +0200 tdf#162593: blind crash fix The stack trace was: Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. 0x732175ee in rtl::OUString::OUString (this=0x7fffaac0, str=...) at /home/cono/git/lo/libreoffice/include/rtl/ustring.hxx:197 197 pData = str.pData; #0 0x732175ee in rtl::OUString::OUString(rtl::OUString const&) (this=0x7fffaac0, str=...) at /home/cono/git/lo/libreoffice/include/rtl/ustring.hxx:197 #1 0x73521e4f in GalleryBrowser1::GetItemText(SgaObject const&, GalleryItemFlags) (rObj=..., nItemTextFlags=GalleryItemFlags::Title) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:1412 #2 0x7352265d in GalleryBrowser1::FillThemeEntries() (this=0x5c0c9240) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:1505 #3 0x7351a602 in GalleryBrowser1::GalleryBrowser1(weld::Builder&, Gallery*) (this=0x5c0c9240, rBuilder=..., pGallery=0x5c0a4aa0) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:196 #4 0x7354c291 in svx::sidebar::GalleryControl::GalleryControl(weld::Widget*) (this=0x5c04e470, pParent=0x5be85558) at /home/cono/git/lo/libreoffice/svx/source/gallery2/GalleryControl.cxx:32 #5 0x745c72ea in std::make_unique(weld::Widget*&) () at /usr/include/c++/12/bits/unique_ptr.h:1065 #6 0x745c5f7a in (anonymous namespace)::PanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence const&) (this=0x5c0494e0, rsResourceURL=..., rArguments=...) at /home/cono/git/lo/libreoffice/svx/source/sidebar/PanelFactory.cxx:180 #7 0x76412417 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence const&) (this=0x564db3e0, ResourceURL=..., Args=...) at /home/cono/git/lo/libreoffice/framework/source/uifactory/uielementfactorymanager.cxx:440 #8 0x75593a35 in sfx2::sidebar::SidebarController::CreateUIElement(com::sun::star::uno::Reference const&, rtl::OUString const&, bool, sfx2::sidebar::Context const&) (this=0x5b0a8100, rxWindow=..., rsImplementationURL=..., bWantsCanvas=false, rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:1044 #9 0x75593341 in sfx2::sidebar::SidebarController::CreatePanel(std::basic_string_view >, weld::Widget*, bool, sfx2::sidebar::Context const&, VclPtr const&) (this=0x5b0a8100, rsPanelId=u"GalleryPanel", pParentWindow=0x5c040718, bIsInitiallyExpanded=true, rContext=..., pDeck=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:989 #10 0x75592150 in sfx2::sidebar::SidebarController::CreatePanels(std::basic_string_view >, sfx2::sidebar::Context const&) (this=0x5b0a8100, rDeckId=u"GalleryDeck", rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:789 #11 0x75591dbe in sfx2::sidebar::SidebarController::CreateDeck(std::basic_string_view >, sfx2::sidebar::Context const&, bool) (this=0x5b0a8100, rDeckId=u"GalleryDeck", rContext=..., bForceCreate=false) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:737 #12 0x75592b96 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) (this=0x5b0a8100, rDeckDescriptor=..., rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:899 #13 0x75591b89 in sfx2::sidebar::SidebarController::SwitchToDeck(std::basic_string_view >) (this=0x5b0a8100, rsDeckId=u"GalleryDeck") at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:708 #14 0x75591936 in sfx2::sidebar::SidebarController::OpenThenToggleDeck(rtl::OUString const&) (this=0x5b0a8100, rsDeckId=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:664 #15 0x7558d884 in operator()(rtl::OUString const&) const (__closure=0x7fffb7c0, rsDeckId=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:123 #16 0x75598e13 in std::__invoke_impl&, const rtl::OUString&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/12/bits/invoke.h:61 #17 0x7559851c in std::__invoke_r&, const rtl::OUString&>(struct {...} &) (__fn=...) at /usr/include/c++/12/bits/invoke.h:111 #18 0x75597b76 in std::_Function_handler >::_M_invoke(const std::_Any_data &, const rtl::OUString &) (__functor=..., __args#0=...) at /usr/i
core.git: Branch 'libreoffice-24-8' - svx/source
svx/source/gallery2/galbrws1.cxx | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) New commits: commit 7ff18f3c98bbe8766021151376589be5be27ec9c Author: Xisco Fauli AuthorDate: Sat Sep 7 17:59:26 2024 +0200 Commit: Xisco Fauli CommitDate: Sun Sep 8 01:47:32 2024 +0200 svx: fix Dereference before null check Seen in https://crashreport.libreoffice.org/stats/signature/GalleryBrowser1::FillThemeEntries() Regression from commit 09c6204b6309321aa25c542f918fde9f5f3f7fe2 Author: Oliver Specht Date: Thu Feb 29 17:15:23 2024 +0100 tdf#81880 Search the Gallery Change-Id: I4c19920b5f7a56fff37587cd1acf579f3a96ae4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172997 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173028 diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 553055daa706..4b961203e887 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -1497,17 +1497,19 @@ void GalleryBrowser1::FillThemeEntries() const GalleryThemeEntry* pThemeInfo = mpGallery->GetThemeInfo( i ); OUString aThemeName = pThemeInfo->GetThemeName(); //sal_uInt32 nId = pThemeInfo->GetId(); -GalleryTheme* pTheme = mpGallery->AcquireTheme(aThemeName, maLocalListner); -sal_uInt32 nObjectCount = pTheme->GetObjectCount(); -for (size_t nObject = 0; nObject < nObjectCount; ++nObject) +if (GalleryTheme* pTheme = mpGallery->AcquireTheme(aThemeName, maLocalListner)) { -if (std::unique_ptr xSgaObject = pTheme->AcquireObject(nObject)) +sal_uInt32 nObjectCount = pTheme->GetObjectCount(); +for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { -OUString aTitle = GetItemText(*xSgaObject, GalleryItemFlags::Title); -maAllThemeEntries.push_back(ThemeEntry(aThemeName, aTitle, nObject)); +if (std::unique_ptr xSgaObject = pTheme->AcquireObject(nObject)) +{ +OUString aTitle = GetItemText(*xSgaObject, GalleryItemFlags::Title); +maAllThemeEntries.push_back(ThemeEntry(aThemeName, aTitle, nObject)); +} } +mpGallery->ReleaseTheme(pTheme, maLocalListner); } -mpGallery->ReleaseTheme(pTheme, maLocalListner); } maFoundThemeEntries.assign(maAllThemeEntries.begin(), maAllThemeEntries.end()); }
core.git: 2 commits - sw/inc sw/source
sw/inc/doc.hxx |2 + sw/source/core/bastyp/init.cxx |4 +- sw/source/core/doc/doc.cxx | 42 + sw/source/core/doc/docbasic.cxx | 19 ++--- sw/source/core/doc/visiturl.cxx | 46 +--- sw/source/core/unocore/unostyle.cxx | 39 --- sw/source/filter/html/htmlflywriter.cxx | 19 +++-- sw/source/filter/ww8/wrtww8.cxx | 26 -- 8 files changed, 99 insertions(+), 98 deletions(-) New commits: commit 7f50471615fb1b083e6c4735892359d269573e81 Author: Noel Grandin AuthorDate: Sat Sep 7 20:44:40 2024 +0200 Commit: Noel Grandin CommitDate: Sun Sep 8 08:38:48 2024 +0200 dont use GetItemSurrogates for gathering SwFormatINetFormat which is very expensive these days Change-Id: I7b552d9fec5e2971bb3c171b7dd132ee31b1a46e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173004 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index e09e51aeb0ca..e15ba644a546 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1428,6 +1428,8 @@ public: void DeleteAutoCorrExceptWord(); const SwFormatINetFormat* FindINetAttr( std::u16string_view rName ) const; +/// Iterate over all SwFormatINetFormat, if the function returns false, iteration is stopped +SW_DLLPUBLIC void ForEachINetFormat( const std::function& ) const; // Call into intransparent Basic; expect possible Return String. void ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ); diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 0902b3fa3dad..123a893df3e4 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -340,7 +340,7 @@ ItemInfoPackage& getItemInfoPackageSwAttributes() // is not initialized and the translated resource strings would not be available. // Luckily this mechanism allows to also flag this ItemInfo as 'incomplete' using // a nullptr as ItemPtr and implementing on-demand creation, see ::getItemInfo -{ RES_TXTATR_INETFMT, nullptr, FN_TXTATR_INET, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, +{ RES_TXTATR_INETFMT, nullptr, FN_TXTATR_INET, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_CHARFMT, new SwFormatCharFormat( nullptr ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_TXTATR_CJK_RUBY, new SwFormatRuby( OUString() ), SID_ATTR_CHAR_CJK_RUBY, SFX_ITEMINFOFLAG_NONE }, diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 3eea7da62079..a52d1efd8f49 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1273,23 +1273,43 @@ void SwDoc::InvalidateAutoCompleteFlag() const SwFormatINetFormat* SwDoc::FindINetAttr( std::u16string_view rName ) const { -ItemSurrogates aSurrogates; -GetAttrPool().GetItemSurrogates(aSurrogates, RES_TXTATR_INETFMT); -for (const SfxPoolItem* pItem : aSurrogates) +const SwFormatINetFormat* pRet = nullptr; +ForEachINetFormat( +[&pRet, &rName] (const SwFormatINetFormat& rFormatItem) -> bool +{ +if( rFormatItem.GetName() == rName ) +{ +pRet = &rFormatItem; +return false; +}; +return true; +}); +return pRet; +} + +/// Iterate over all SwFormatINetFormat, if the function returns false, iteration is stopped +void SwDoc::ForEachINetFormat( const std::function& rFunc ) const +{ +SwNodeOffset nCount = GetNodes().Count(); +for (SwNodeOffset i(0); i < nCount; ++i) { -const auto & rFormatItem = static_cast(*pItem); -if( rFormatItem.GetName() != rName ) +SwNode* pNode = GetNodes()[i]; +if (!pNode->IsTextNode()) continue; -const SwTextINetFormat* pTextAttr = rFormatItem.GetTextINetFormat(); -if( !pTextAttr ) +SwTextNode* pTextNode = pNode->GetTextNode(); +if (!pTextNode->HasHints()) continue; -const SwTextNode* pTextNd = pTextAttr->GetpTextNode(); -if( pTextNd && &pTextNd->GetNodes() == &GetNodes() ) +SwpHints& rHints = pTextNode->GetSwpHints(); +for (size_t j = 0; j < rHints.Count(); ++j) { -return &rFormatItem; +const SwTextAttr* pTextAttr = rHints.Get(j); +if (pTextAttr->Which() != RES_TXTATR_INETFMT) +continue; +const SwFormatINetFormat& rFormat = pTextAttr->GetINetFormat(); +if (!rFunc(rFormat)) +return; } } -return nullptr; } void SwDoc::Summary(SwDoc& rExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bImpress) diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 39cd7fe8f000..59d055e45ea8 100644 --- a/sw/source/core/doc/docbasic.
core.git: 2 commits - sw/inc sw/source
sw/inc/dcontact.hxx |6 ++-- sw/inc/swtable.hxx |2 + sw/source/core/bastyp/init.cxx |2 - sw/source/core/crsr/crstrvl.cxx | 10 +++ sw/source/core/doc/DocumentFieldsManager.cxx | 19 ++ sw/source/core/doc/docdraw.cxx |7 ++--- sw/source/core/doc/doclay.cxx|2 - sw/source/core/table/swnewtable.cxx |6 ++-- sw/source/core/table/swtable.cxx | 35 --- sw/source/core/undo/undraw.cxx |4 +-- 10 files changed, 54 insertions(+), 39 deletions(-) New commits: commit c659d65ce1c980bbf836ce95fbdb3729bf3234f1 Author: Noel Grandin AuthorDate: Fri Sep 6 13:41:22 2024 +0200 Commit: Noel Grandin CommitDate: Sat Sep 7 09:33:33 2024 +0200 dont use GetItemSurrogates for gathering SwTableBoxFormula which is very expensive these days Change-Id: If7ab76173e2b17fe767042a9461969babc16cb6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172965 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 7bc3ed0439ac..dc156ded1b30 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -368,6 +368,8 @@ public: void Merge(SwTable& rTable, SwHistory* pHistory); void Split(OUString sNewTableName, sal_uInt16 nSplitLine, SwHistory* pHistory); +static void GatherFormulas(SwDoc& rDoc, std::vector& rvFormulas); + void dumpAsXml(xmlTextWriterPtr pWriter) const; }; diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 2ec1f2266aa2..c673a1a2729b 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -455,7 +455,7 @@ ItemInfoPackage& getItemInfoPackageSwAttributes() { RES_GRFATR_DUMMY4, new SfxBoolItem( RES_GRFATR_DUMMY4 ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_GRFATR_DUMMY5, new SfxBoolItem( RES_GRFATR_DUMMY5 ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_BOXATR_FORMAT, new SwTableBoxNumFormat, 0, SFX_ITEMINFOFLAG_NONE }, -{ RES_BOXATR_FORMULA, new SwTableBoxFormula( OUString() ), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, +{ RES_BOXATR_FORMULA, new SwTableBoxFormula( OUString() ), 0, SFX_ITEMINFOFLAG_NONE }, { RES_BOXATR_VALUE, new SwTableBoxValue, 0, SFX_ITEMINFOFLAG_NONE }, { RES_UNKNOWNATR_CONTAINER, new SvXMLAttrContainerItem( RES_UNKNOWNATR_CONTAINER ), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE } }}; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index b2d640b8d695..dd30f73f88dc 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -416,17 +416,17 @@ bool SwCursorShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) &rPos, &tmp) ); } -ItemSurrogates aSurrogates; -GetDoc()->GetAttrPool().GetItemSurrogates(aSurrogates, RES_BOXATR_FORMULA); -const sal_uInt32 nMaxItems(aSurrogates.size()); +std::vector aTableBoxFormulas; +SwTable::GatherFormulas(*GetDoc(), aTableBoxFormulas); +const sal_uInt32 nMaxItems(aTableBoxFormulas.size()); if( nMaxItems > 0 ) { sal_uInt8 nMaxDo = 2; do { -for (const SfxPoolItem* pItem : aSurrogates) +for (SwTableBoxFormula* pItem : aTableBoxFormulas) { const SwTableBox* pTBox; -auto & rFormulaItem = static_cast(*pItem); +auto & rFormulaItem = *pItem; pTBox = rFormulaItem.GetTableBox(); if( pTBox && pTBox->GetSttNd() && diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index d270ef6618d0..6b684dae4b73 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -614,14 +614,12 @@ void DocumentFieldsManager::UpdateTableFields(const SwTable* pTable) } } // process all table box formulas -ItemSurrogates aSurrogates; -m_rDoc.GetAttrPool().GetItemSurrogates(aSurrogates, RES_BOXATR_FORMULA); -for (const SfxPoolItem* pItem : aSurrogates) +std::vector aTableBoxFormulas; +SwTable::GatherFormulas(m_rDoc, aTableBoxFormulas); +for (SwTableBoxFormula* pBoxFormula : aTableBoxFormulas) { -// SwTableBoxFormula is non-shareable, so const_cast is somewhat OK -auto & rBoxFormula = const_cast(static_cast(*pItem)); -if(rBoxFormula.GetDefinedIn()) -rBoxFormula.ChangeState(); +if(pBoxFormula->GetDefinedIn()) +pBoxFormula->ChangeState(); } SwRootFrame const* pLayout(nullptr); @@ -716,11 +714,10 @@ void DocumentFieldsManager::UpdateTableFields(const SwTable* pTable) } // calculate the formula at the boxes -m_rDoc.GetAttrPool().G
core.git: sw/inc sw/source
sw/inc/swtable.hxx |2 +- sw/source/core/doc/tblrwcl.cxx | 10 +- sw/source/core/docnode/ndtbl.cxx |7 +++ sw/source/core/table/swtable.cxx |2 +- sw/source/filter/xml/xmltbli.cxx |4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) New commits: commit 713592e2503c7fb2acfc713b9db2c15cd2ec806d Author: Noel Grandin AuthorDate: Fri Sep 6 15:57:41 2024 +0200 Commit: Noel Grandin CommitDate: Sat Sep 7 09:34:11 2024 +0200 return SwTableBoxFormat from SwTableBox::ClaimFrameFormat since that is always the SwFrameFormat subclass we are attached to Change-Id: If4bcff17d3983f1fc55b4a25c7c4e40e9087a1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172972 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index dc156ded1b30..c28ce241a8f1 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -492,7 +492,7 @@ public: bool HasDirectFormatting() const { return mbDirectFormatting; } // Creates its own FrameFormat if more boxes depend on it. -SwFrameFormat* ClaimFrameFormat(); +SwTableBoxFormat* ClaimFrameFormat(); void ChgFrameFormat( SwTableBoxFormat *pNewFormat, bool bNeedToReregister = true ); void RemoveFromTable(); diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 13dc1a20250b..bc1333591853 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -227,7 +227,7 @@ static void lcl_CopyCol( FndBox_ & rFndBox, CpyPara *const pCpyPara) if( itFind == pCpyPara->rTabFrameArr.end() || !(*itFind == aFindFrame) ) { // For nested copying, also save the new Format as an old one. -SwTableBoxFormat* pNewFormat = static_cast(pBox->ClaimFrameFormat()); +SwTableBoxFormat* pNewFormat = pBox->ClaimFrameFormat(); // Find the selected Boxes in the Line: FndLine_ const* pCmpLine = nullptr; @@ -1090,7 +1090,7 @@ bool SwTable::OldSplitRow( SwDoc& rDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn SwTableBoxFormat* pCpyBoxFrameFormat = pSelBox->GetFrameFormat(); bool bChkBorder = nullptr != pCpyBoxFrameFormat->GetBox().GetTop(); if( bChkBorder ) -pCpyBoxFrameFormat = static_cast(pSelBox->ClaimFrameFormat()); +pCpyBoxFrameFormat = pSelBox->ClaimFrameFormat(); for( sal_uInt16 i = 0; i <= nCnt; ++i ) { @@ -1116,7 +1116,7 @@ bool SwTable::OldSplitRow( SwDoc& rDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn if( bChkBorder ) { -pCpyBoxFrameFormat = static_cast(pNewLine->GetTabBoxes()[ 0 ]->ClaimFrameFormat()); +pCpyBoxFrameFormat = pNewLine->GetTabBoxes()[ 0 ]->ClaimFrameFormat(); SvxBoxItem aTmp( pCpyBoxFrameFormat->GetBox() ); aTmp.SetLine( nullptr, SvxBoxItemLine::TOP ); pCpyBoxFrameFormat->SetFormatAttr( aTmp ); @@ -1139,7 +1139,7 @@ bool SwTable::OldSplitRow( SwDoc& rDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn } } // In Boxes with Lines, we can only have Size/Fillorder -pFrameFormat = static_cast(pNewBox->ClaimFrameFormat()); +pFrameFormat = pNewBox->ClaimFrameFormat(); pFrameFormat->ResetFormatAttr( RES_LR_SPACE, RES_FRMATR_END - 1 ); pFrameFormat->ResetFormatAttr( RES_BOXATR_BEGIN, RES_BOXATR_END - 1 ); } @@ -1201,7 +1201,7 @@ bool SwTable::SplitCol(SwDoc& rDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt) if( itFind == aFrameArr.end() || !(*itFind == aFindFrame) ) { // Change the FrameFormat -aFindFrame.pNewFrameFormat = static_cast(pSelBox->ClaimFrameFormat()); +aFindFrame.pNewFrameFormat = pSelBox->ClaimFrameFormat(); SwTwips nBoxSz = aFindFrame.pNewFrameFormat->GetFrameSize().GetWidth(); SwTwips nNewBoxSz = nBoxSz / ( nCnt + 1 ); aFindFrame.pNewFrameFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index f5f3483ec914..b36fd35dba4b 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -4147,7 +4147,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate ) if( bSetNumberFormat || bForceNumberFormat ) { -pBoxFormat = static_cast(rBox.ClaimFrameFormat()); +pBoxFormat = rBox.ClaimFrameFormat(); aBoxSet.Put( SwTableBoxValue( fNumber )); aBoxSet.Put( SwTableBoxNumFormat( nFormatIdx )); @@ -4183,7 +4183,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate ) pUndo.reset(new SwUndoTableNumFormat( rBox )); } -pBoxFormat = static_cast(rBox.ClaimFr
help.git: source/text
source/text/shared/00/0401.xhp |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 8c0678cb66b35d04a3aa791383ff6b9007700e5e Author: Kira Tubo AuthorDate: Tue Sep 3 23:22:56 2024 -0700 Commit: Adolfo Jayme Barrientos CommitDate: Sat Sep 7 09:44:32 2024 +0200 tdf#157230: Help: Adjust path for Open/Save buttons in Tabbed UI Update navigation path for following buttons in Tabbed UI: - Recent Documents* - Open Remote* - Save As** - Save Remote** *Buttons now located in File > Open popup menu **Buttons now located in File > Save popup menu Related to changes in commit 406f879af36c8cc524d87292ddffca7426811fa0 Change-Id: I09f2ab65a14953f9e80bd8a45ae016bd3831b672 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172986 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/source/text/shared/00/0401.xhp b/source/text/shared/00/0401.xhp index f6d0c5abf6..896bf39264 100644 --- a/source/text/shared/00/0401.xhp +++ b/source/text/shared/00/0401.xhp @@ -107,7 +107,7 @@ Choose File - Open Remote. -Choose File - Open Remote. +Choose File, then long-click on the Open icon, and select Open Remote File. @@ -129,7 +129,7 @@ Choose File - Recent Documents. -Choose File - Recent Documents. +Choose File, then long-click on the Open icon. A list of recent documents will display. @@ -263,7 +263,7 @@ Choose File - Save As. -Choose File - Save As. +Choose File, then long-click on the Save icon, and select Save As. @@ -306,7 +306,7 @@ Choose File - Save Remote. -Choose File - Save Remote +Choose File, then long-click on the Save icon, and select Save Remote File. Long-click on the Save icon and select Save Remote File.
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6836e6f7900907ab6ba72a34e7ef62705a5aee69 Author: Kira Tubo AuthorDate: Sat Sep 7 00:44:33 2024 -0700 Commit: Gerrit Code Review CommitDate: Sat Sep 7 09:44:33 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 8c0678cb66b35d04a3aa791383ff6b9007700e5e - tdf#157230: Help: Adjust path for Open/Save buttons in Tabbed UI Update navigation path for following buttons in Tabbed UI: - Recent Documents* - Open Remote* - Save As** - Save Remote** *Buttons now located in File > Open popup menu **Buttons now located in File > Save popup menu Related to changes in commit 406f879af36c8cc524d87292ddffca7426811fa0 Change-Id: I09f2ab65a14953f9e80bd8a45ae016bd3831b672 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172986 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/helpcontent2 b/helpcontent2 index a88ae62e116a..8c0678cb66b3 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit a88ae62e116a47c32a0fa679544eee79160616a9 +Subproject commit 8c0678cb66b35d04a3aa791383ff6b9007700e5e
core.git: sw/source
sw/source/filter/xml/xmltbli.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit e4344d13de05b83859a2800bc0b2e7ea0db9fdfc Author: Mike Kaganski AuthorDate: Fri Sep 6 14:30:15 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 09:53:27 2024 +0200 Avoid wrong "unknown attribute" warnings for nested tables warn:sw:29504:31312:sw/source/filter/xml/xmltbli.cxx:550: unknown attribute urn:oasis:names:tc:opendocument:xmlns:table:1.0 table:name value=Table2 warn:sw:29504:31312:sw/source/filter/xml/xmltbli.cxx:550: unknown attribute urn:oasis:names:tc:opendocument:xmlns:table:1.0 table:style-name value=Table2 This makes no sense: these are just normal table attributes, handled in a different place; and here the code is only interested in one specific attribute, not handling everything else. Change-Id: I36ca1a0e7b04cf9c8ddb7cb61b290e92832fe4d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172949 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 2655317127cd..76b62fe426f5 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -546,8 +546,6 @@ css::uno::Reference SwXMLTableCellContext_Im if ( IsXMLToken( aIter, XML_TRUE ) ) bSubTable = true; } -else -XMLOFF_WARN_UNKNOWN("sw", aIter); //FIXME: RDFa } }
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/layout/frmtool.cxx | 12 1 file changed, 8 insertions(+), 4 deletions(-) New commits: commit 825195269b73192fb4003db78ce0cf034a5e857c Author: Michael Stahl AuthorDate: Fri Sep 6 14:09:15 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 10:05:26 2024 +0200 sw: fix hiding of flys in hidden sections, part 3 Sigh... the new section frame can be deleted! Missed that... (regression from commit e2f3ba12c238c895dfd61ad09fcd76789ebbfd53) Change-Id: I48f2b09ececf8fb8469c53a5ec0a3c75be5f7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172966 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0c6ec63c81676ed675931d9aa8a78d91ed0d9b6e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172954 Reviewed-by: Mike Kaganski diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 0a7f5ae16456..d7d97c64c189 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1908,10 +1908,6 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, //section again. pActualSection.reset(pActualSection->GetUpper()); pLay = pLay->FindSctFrame(); -if (pLay->IsHiddenNow()) -{ - newHiddenSections.push_back(static_cast(pLay)); -} if ( pActualSection ) { //Could be, that the last SectionFrame remains empty. @@ -1926,6 +1922,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } else { +if (pLay->IsHiddenNow()) +{ + newHiddenSections.push_back(static_cast(pLay)); +} pPrv = pLay; pLay = pLay->GetUpper(); } @@ -1969,6 +1969,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } else { +if (pLay->IsHiddenNow()) +{ + newHiddenSections.push_back(static_cast(pLay)); +} //Nothing more with sections, it goes on right behind //the SectionFrame. pPrv = pLay;
core.git: Branch 'libreoffice-24-8' - sw/source
sw/source/core/layout/frmtool.cxx | 12 1 file changed, 8 insertions(+), 4 deletions(-) New commits: commit 9910c123e8177aa942f9aa4a6efe49b2afdc2658 Author: Michael Stahl AuthorDate: Fri Sep 6 14:09:15 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 10:05:31 2024 +0200 sw: fix hiding of flys in hidden sections, part 3 Sigh... the new section frame can be deleted! Missed that... (regression from commit e2f3ba12c238c895dfd61ad09fcd76789ebbfd53) Change-Id: I48f2b09ececf8fb8469c53a5ec0a3c75be5f7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172966 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0c6ec63c81676ed675931d9aa8a78d91ed0d9b6e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172953 Reviewed-by: Mike Kaganski diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 6ea91ee1c727..05b968737cc3 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1909,10 +1909,6 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, //section again. pActualSection.reset(pActualSection->GetUpper()); pLay = pLay->FindSctFrame(); -if (pLay->IsHiddenNow()) -{ - newHiddenSections.push_back(static_cast(pLay)); -} if ( pActualSection ) { //Could be, that the last SectionFrame remains empty. @@ -1927,6 +1923,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } else { +if (pLay->IsHiddenNow()) +{ + newHiddenSections.push_back(static_cast(pLay)); +} pPrv = pLay; pLay = pLay->GetUpper(); } @@ -1970,6 +1970,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } else { +if (pLay->IsHiddenNow()) +{ + newHiddenSections.push_back(static_cast(pLay)); +} //Nothing more with sections, it goes on right behind //the SectionFrame. pPrv = pLay;
core.git: external/nss sal/osl
external/nss/UnpackedTarball_nss.mk |1 + external/nss/nss.disablefsync.patch | 18 ++ sal/osl/unx/file.cxx|6 +- 3 files changed, 24 insertions(+), 1 deletion(-) New commits: commit c95b1189822bc860ec084e93f5de942d718f6be9 Author: Michael Meeks AuthorDate: Fri May 10 17:47:19 2024 +0100 Commit: Michael Meeks CommitDate: Sat Sep 7 11:15:47 2024 +0200 lok: add SAL_DISABLE_FSYNC environment to disable fsync. For state-less containers there is no benefit in fsync'ing, file data is safe when it is up-loaded back to storage - but profiling shows latency from stray fsyncs. Change-Id: I9f03d5866dec05e5507deb56b0dca93b6876225e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167490 Tested-by: Michael Meeks Reviewed-by: Caolán McNamara (cherry picked from commit 90bd45d7a96c8c7084db13e4b6f86753db67655a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172947 Reviewed-by: Michael Meeks Tested-by: Jenkins diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 6b69dd9b1631..7a9010bdf743 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/nss-restore-manual-pre-dependencies.patch.1 \ external/nss/Wincompatible-function-pointer-types.patch.0 \ $(if $(filter LINUX,$(OS)), \ +external/nss/nss.disablefsync.patch \ external/nss/nss.getrandom.patch) \ $(if $(filter iOS,$(OS)), \ external/nss/nss-ios.patch) \ diff --git a/external/nss/nss.disablefsync.patch b/external/nss/nss.disablefsync.patch new file mode 100644 index ..8c5d84b553ce --- /dev/null +++ b/external/nss/nss.disablefsync.patch @@ -0,0 +1,18 @@ +--- a/nss/nss/lib/sqlite/sqlite3.c b/nss/nss/lib/sqlite/sqlite3.c +@@ -36136,6 +36136,15 @@ + static int full_fsync(int fd, int fullSync, int dataOnly){ + int rc; + ++ static int disabledKnown = 0, disabled = 0; ++ if (!disabledKnown) ++ { ++disabled = getenv("SAL_DISABLE_FSYNC") != NULL; ++disabledKnown = 1; ++ } ++ if (disabled) ++return 0; ++ + /* The following "ifdef/elif/else/" block has the same structure as + ** the one below. It is replicated here solely to avoid cluttering + ** up the real code with the UNUSED_PARAMETER() macros. diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index b15fe963605f..e618a06d373e 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -1236,7 +1236,11 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle) if (result != osl_File_E_None) return result; -if (fsync(pImpl->m_fd) == -1) +static bool disabled = getenv("SAL_DISABLE_FSYNC") != nullptr; + +if (disabled) +SAL_INFO("sal.file", "fsync(" << pImpl->m_fd << "): Disabled"); +else if (fsync(pImpl->m_fd) == -1) { int e = errno; SAL_INFO("sal.file", "fsync(" << pImpl->m_fd << "): " << UnixErrnoString(e));
core.git: sc/source
sc/source/ui/app/inputhdl.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit f42932f23c20122cb7b4537efaf943a8b481752e Author: Xisco Fauli AuthorDate: Fri Sep 6 22:41:22 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 12:25:33 2024 +0200 tdf#162829: Dereference before null check Regression from: commit 1de1c47471278db2344c986e9d597d6a05e559e9 Author: Gökay Şatır Date: Thu Feb 22 13:54:06 2024 +0300 Moving parts of readonly checks from model to view. Change-Id: I8d0ba914df909bc1a13ce7181b6d05cd0216e468 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172978 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index d9210251cc44..95a971a4dd49 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3940,7 +3940,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false UpdateActiveView(); bool bNewView = DataChanging( nChar ); -if (bProtected || (pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView())) // Protected cell? +if (bProtected || (pActiveViewSh && pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView())) // Protected cell? bUsed = true; // Don't forward KeyEvent else// Changes allowed { @@ -4174,12 +4174,11 @@ void ScInputHandler::InputCommand( const CommandEvent& rCEvt ) UpdateActiveView(); bool bNewView = DataChanging( 0, true ); -if (!bProtected && !(pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView())) // changes allowed +if (!bProtected && pActiveViewSh && !(pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView())) // changes allowed { if (bNewView) // create new edit view { -if (pActiveViewSh) -pActiveViewSh->GetViewData().GetDocShell()->PostEditView( mpEditEngine.get(), aCursorPos ); +pActiveViewSh->GetViewData().GetDocShell()->PostEditView( mpEditEngine.get(), aCursorPos ); UpdateActiveView(); if (eMode==SC_INPUT_NONE) if (pTableView || pTopView)
core.git: sw/inc
sw/inc/swtblfmt.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ca5113d4f862700a3b97f7fe98a720e084ecec0e Author: Noel Grandin AuthorDate: Sat Sep 7 09:37:22 2024 +0200 Commit: Noel Grandin CommitDate: Sat Sep 7 12:31:07 2024 +0200 fix asan build Change-Id: Ie7970629bcf09b8b9c0f4c052d0a9187d56d9d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172988 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx index d951196728ac..28e15e26e060 100644 --- a/sw/inc/swtblfmt.hxx +++ b/sw/inc/swtblfmt.hxx @@ -37,7 +37,7 @@ public: virtual bool supportsFullDrawingLayerFillAttributeSet() const override; }; -class SwTableLineFormat final : public SwFrameFormat +class SAL_DLLPUBLIC_RTTI SwTableLineFormat final : public SwFrameFormat { friend class SwDoc;
core.git: package/source
package/source/zippackage/ZipPackageFolder.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit fade348ab2e8caddaa0248f686aa952fde1b5bdb Author: Mike Kaganski AuthorDate: Sat Sep 7 11:11:14 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 12:58:44 2024 +0200 Drop a redundant line Change-Id: Ic6584178ad83fb2b6aeaadde2c46770c355d3084 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172960 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index b819874a3f3f..4f4da97f5704 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -159,7 +159,6 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno:: throw ElementExistException(THROW_WHERE ); uno::Reference < XInterface > xRef; -aElement >>= xRef; if ( !(aElement >>= xRef) ) throw IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
core.git: 2 commits - package/source
package/source/zippackage/ZipPackageStream.cxx |9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) New commits: commit c16cbc8aac87bc7d7a98d6b667f5b8d4c440c8dd Author: Mike Kaganski AuthorDate: Sat Sep 7 11:13:49 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 13:16:10 2024 +0200 Simplify a bit Change-Id: Iec00d4a2499c92f853a7942ed0659973663819eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172961 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 04c853e6ae32..0779827f13b0 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -308,8 +308,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( Any aRoot = pPackage->getByHierarchicalName(u"/"_ustr); auto xRootNameContainer = aRoot.queryThrow(); -uno::Reference< XInterface > xNPSDummy( xNewPackStream, UNO_QUERY ); -xRootNameContainer->insertByName(u"dummy"_ustr, Any( xNPSDummy ) ); +xRootNameContainer->insertByName(u"dummy"_ustr, Any( xNewPackStream ) ); // commit the temporary package pPackage->commitChanges(); @@ -333,7 +332,6 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( // close raw stream, package stream and folder xInRaw.clear(); xNewPSProps.clear(); -xNPSDummy.clear(); xNewPackStream.clear(); xRootNameContainer.clear(); commit edd0e3ac9f9728ff88d63113d64911cee1e29a06 Author: Mike Kaganski AuthorDate: Sat Sep 7 11:02:26 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 13:16:04 2024 +0200 Simplify a bit Change-Id: I8756f02ca9cb641528d621704cbed09d964c6ef9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172959 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index d8d71b1ffe8f..04c853e6ae32 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -305,10 +305,8 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( } // insert a new stream in the package -uno::Reference< XInterface > xTmp; Any aRoot = pPackage->getByHierarchicalName(u"/"_ustr); -aRoot >>= xTmp; -uno::Reference< container::XNameContainer > xRootNameContainer( xTmp, UNO_QUERY_THROW ); +auto xRootNameContainer = aRoot.queryThrow(); uno::Reference< XInterface > xNPSDummy( xNewPackStream, UNO_QUERY ); xRootNameContainer->insertByName(u"dummy"_ustr, Any( xNPSDummy ) ); @@ -337,7 +335,6 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( xNewPSProps.clear(); xNPSDummy.clear(); xNewPackStream.clear(); -xTmp.clear(); xRootNameContainer.clear(); // return the stream representing the first temporary file
core.git: package/source
package/source/zippackage/ZipPackageStream.cxx | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) New commits: commit 62cce75a8d68cf7689c741dfbf91f639ddfab16b Author: Mike Kaganski AuthorDate: Sat Sep 7 11:57:38 2024 +0200 Commit: Mike Kaganski CommitDate: Sat Sep 7 13:45:54 2024 +0200 Simplify a bit Change-Id: I88f36b1590febda09dd088c5dd48f76078a63c7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172962 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 0779827f13b0..2cdfc72a7376 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -449,8 +449,6 @@ bool ZipPackageStream::saveChild( ::std::optional const oPBKDF2IterationCount, ::std::optional<::std::tuple> const oArgon2Args) { -bool bSuccess = true; - static constexpr OUString sDigestProperty (u"Digest"_ustr); static constexpr OUString sEncryptionAlgProperty (u"EncryptionAlgorithm"_ustr); static constexpr OUString sStartKeyAlgProperty (u"StartKeyAlgorithm"_ustr); @@ -516,8 +514,7 @@ bool ZipPackageStream::saveChild( if ( !xStream.is() ) { OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" ); -bSuccess = false; -return bSuccess; +return false; } uno::Reference < io::XSeekable > xSeek ( xStream, uno::UNO_QUERY ); @@ -568,15 +565,13 @@ bool ZipPackageStream::saveChild( } else { -bSuccess = false; -return bSuccess; +return false; } } } catch ( uno::Exception& ) { -bSuccess = false; -return bSuccess; +return false; } if ( bToBeEncrypted || m_bRawStream || bTransportOwnEncrStreamAsRaw ) @@ -667,6 +662,7 @@ bool ZipPackageStream::saveChild( } } +bool bSuccess = true; // If the entry is already stored in the zip file in the format we // want for this write...copy it raw if ( !bUseNonSeekableAccess @@ -683,8 +679,7 @@ bool ZipPackageStream::saveChild( if ( !xStream.is() ) { // Make sure that we actually _got_ a new one ! -bSuccess = false; -return bSuccess; +return false; } } @@ -740,8 +735,7 @@ bool ZipPackageStream::saveChild( if ( !xStream.is() ) { // Make sure that we actually _got_ a new one ! -bSuccess = false; -return bSuccess; +return false; } }
core.git: configure.ac download.lst
configure.ac | 18 +- download.lst |4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 7220412c789e755b51747a1dfed6e72846e7cf8c Author: Xisco Fauli AuthorDate: Sat Sep 7 14:17:53 2024 +0200 Commit: Xisco Fauli CommitDate: Sat Sep 7 16:33:18 2024 +0200 python: upgrade to 3.10.15 Downloaded from https://www.python.org/ftp/python/3.10.15/Python-3.10.15.tar.xz Change-Id: I269ff9fa4565b5fdda6ba29bf6ac93bcf8daaa03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172995 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/configure.ac b/configure.ac index 89787b5327b0..1ab001abbbca 100644 --- a/configure.ac +++ b/configure.ac @@ -7239,9 +7239,9 @@ if test "$build_os" = "cygwin" -o "$build_os" = "wsl" -o -n "$WSL_ONLY_AS_HELPER else AC_MSG_RESULT([$CSC_PATH/csc.exe]) fi - + CSC_PATH=`win_short_path_for_make "$CSC_PATH"` - + dnl Check al.exe AC_MSG_CHECKING([for al.exe]) if test -n "$winsdkbinsubdir" \ @@ -7253,7 +7253,7 @@ if test "$build_os" = "cygwin" -o "$build_os" = "wsl" -o -n "$WSL_ONLY_AS_HELPER elif test -f "$winsdktest_unix/Bin/al.exe"; then AL_PATH="$winsdktest/Bin" fi - + if test -z "$AL_PATH"; then find_al PathFormat "$altest" @@ -7270,9 +7270,9 @@ if test "$build_os" = "cygwin" -o "$build_os" = "wsl" -o -n "$WSL_ONLY_AS_HELPER else AC_MSG_RESULT([$AL_PATH/al.exe]) fi - + AL_PATH=`win_short_path_for_make "$AL_PATH"` - + dnl Check mscoree.lib / .NET Framework dir AC_MSG_CHECKING(.NET Framework) find_dotnetsdk @@ -7290,13 +7290,13 @@ if test "$build_os" = "cygwin" -o "$build_os" = "wsl" -o -n "$WSL_ONLY_AS_HELPER AC_MSG_ERROR([mscoree.lib not found]) fi AC_MSG_RESULT([found: $DOTNET_FRAMEWORK_HOME]) - + PathFormat "$AL_PATH" AL_PATH="$formatted_path" - + PathFormat "$DOTNET_FRAMEWORK_HOME" DOTNET_FRAMEWORK_HOME="$formatted_path" - + PathFormat "$CSC_PATH" CSC_PATH="$formatted_path" @@ -10377,7 +10377,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=10 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.14 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.15 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 471cbf02b32d..ccbdc9eb5b2d 100644 --- a/download.lst +++ b/download.lst @@ -590,8 +590,8 @@ POSTGRESQL_TARBALL := postgresql-14.13.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 9c50481faa8c2832329ba0fc8868d0a606a680fc4f60ec48d26ce8e076751fda -PYTHON_TARBALL := Python-3.10.14.tar.xz +PYTHON_SHA256SUM := aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +PYTHON_TARBALL := Python-3.10.15.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: package/inc package/source
package/inc/ZipOutputEntry.hxx | 13 ++--- package/inc/ZipOutputStream.hxx|6 ++-- package/source/zipapi/ZipOutputEntry.cxx | 22 +--- package/source/zipapi/ZipOutputStream.cxx | 33 - package/source/zippackage/ZipPackage.cxx | 24 +- package/source/zippackage/ZipPackageFolder.cxx |6 ++-- package/source/zippackage/ZipPackageStream.cxx | 21 ++- 7 files changed, 64 insertions(+), 61 deletions(-) New commits: commit 84f6d117808702498dd76f3de175652b04a9b36c Author: Mike Kaganski AuthorDate: Sat Sep 7 18:28:22 2024 +0500 Commit: Mike Kaganski CommitDate: Sat Sep 7 17:11:48 2024 +0200 Use unique_ptr to pass ownership of ZipEntry Change-Id: I09ffa752d2cd0367579e9384b992215b2d79b251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172963 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx index 94eb988d8b23..f5649f194d9f 100644 --- a/package/inc/ZipOutputEntry.hxx +++ b/package/inc/ZipOutputEntry.hxx @@ -67,7 +67,7 @@ protected: ZipOutputEntryBase( css::uno::Reference< css::io::XOutputStream > xOutStream, css::uno::Reference< css::uno::XComponentContext > xContext, -ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt, bool checkStream); +ZipEntry* pEntry, ZipPackageStream* pStream, bool bEncrypt, bool checkStream); // Inherited classes call this with deflated data buffer. void processDeflated( const css::uno::Sequence< sal_Int8 >& deflateBuffer, sal_Int32 nLength ); @@ -91,7 +91,7 @@ public: ZipOutputEntry( const css::uno::Reference< css::io::XOutputStream >& rxOutStream, const css::uno::Reference< css::uno::XComponentContext >& rxContext, -ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt); +ZipEntry* pEntry, ZipPackageStream* pStream, bool bEncrypt); void writeStream(const css::uno::Reference< css::io::XInputStream >& xInStream) override; void write(const css::uno::Sequence< sal_Int8 >& rBuffer); @@ -99,7 +99,7 @@ protected: ZipOutputEntry( const css::uno::Reference< css::io::XOutputStream >& rxOutStream, const css::uno::Reference< css::uno::XComponentContext >& rxContext, -ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt, bool checkStream); +ZipEntry* pEntry, ZipPackageStream* pStream, bool bEncrypt, bool checkStream); virtual void finishDeflater() override; virtual sal_Int64 getDeflaterTotalIn() const override; virtual sal_Int64 getDeflaterTotalOut() const override; @@ -112,6 +112,7 @@ protected: class ZipOutputEntryInThread final : public ZipOutputEntry { class Task; +std::unique_ptr m_pOwnedZipEntry; rtl::Reference m_xTempFile; std::exception_ptr m_aParallelDeflateException; std::atomic m_bFinished; @@ -119,7 +120,7 @@ class ZipOutputEntryInThread final : public ZipOutputEntry public: ZipOutputEntryInThread( const css::uno::Reference< css::uno::XComponentContext >& rxContext, -ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt); +std::unique_ptr&& pEntry, ZipPackageStream* pStream, bool bEncrypt); std::unique_ptr createTask( const std::shared_ptr& pTag, const css::uno::Reference< css::io::XInputStream >& xInStream ); @@ -132,6 +133,8 @@ public: void closeBufferFile(); void deleteBufferFile(); bool isFinished() const { return m_bFinished; } +std::unique_ptr&& moveZipEntry() { return std::move(m_pOwnedZipEntry); } + private: void setFinished() { m_bFinished = true; } }; @@ -146,7 +149,7 @@ public: ZipOutputEntryParallel( const css::uno::Reference< css::io::XOutputStream >& rxOutStream, const css::uno::Reference< css::uno::XComponentContext >& rxContext, -ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt); +ZipEntry* pEntry, ZipPackageStream* pStream, bool bEncrypt); void writeStream(const css::uno::Reference< css::io::XInputStream >& xInStream) override; private: virtual void finishDeflater() override; diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index d92f140f70f2..5b04a0e41dc8 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -37,7 +37,7 @@ class ZipPackageStream; class ZipOutputStream { css::uno::Reference< css::io::XOutputStream > m_xStream; -::std::vector < ZipEntry * > m_aZipList; +std::vector> m_aZipList; std::shared_ptr mpThreadTaskTag; ByteChucker m_aChucker; @@ -54,7 +54,7 @@ public: /// @throws css::io::IOException /// @throws css::uno::RuntimeException -void writeLOC( ZipEntry *pEntry, bool bEncrypt = false ); +void writeLOC(std::unique_ptr&& pEntry, bool bEncrypt = fal