summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-29Bump version to 6.4-42cp-6.4-42Andras Timar
Change-Id: Id4682d6e2f170de70a51d1eab403a3de3acf0d80
2021-06-28LOK: introduced Freemium LOK APIPranam Lashkari
also block the uno commands from deny list Change-Id: Iee994411891b73b865e6496403682f996d5e9321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116384 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117799 Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-06-26Update git submodulesAndras Timar
* Update translations from branch 'distro/collabora/cp-6.4' to 4e10551a479b63802742d5fef9b1426cacf2eeef - Calc l10n update, especially new CSV Import dialog in fr, it, de, es, pt-BR Change-Id: I7312ccea4c93c5b86238b81c14d016e01071ce05
2021-06-26Dialog: Import CSV: Improve layoutPedro Pinto Silva
Remove extra padding from headers, they are already in bold no need to add extra padding to emphasis hierarchy. Do not use the first header to repeat what the dialog title already says "Import", use instead "Character encoding" as the first header of the first group (advantage: 1st dropdown does not need extra labeling) The 2 radio buttons for Use/not use separators appear to be grouping the elements underneath them. This is wrong, all those options are actually related only to the user chooses to use separators. - Convert those two radio buttons in one check button labeled "Use separators" - Fixes the confusion above mentioned - Reduced the amount of items - It does force the user to do trial and error in order to understand what is what Change-Id: Iee63a6dd336d7c5a4e6f5ce8c845b32902e49a73 Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com> Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116265 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-25pdf import: handle out of memory / failure to duplicate page.Michael Meeks
Avoid some reported segv's from null pages. Change-Id: Ic336b36fb57dc70fff183cd5aa5f3f3ef4562674 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117872 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
2021-06-24Add ProfileZone to 24- and 32-bit scaleDown/Up in BitmapScaleSuperFilterTor Lillqvist
Change-Id: Ibc98d1e5ba24f98c437468d3f9a469725892e7d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117773 Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-24Cache a static wavy line as bitmap and reuse itmerttumer
DrawWaveLine is cpu costly so render it as big as possible so we can only crop it Edit: 1) Moved the Cache class to textline.cxx file as it is local to that 2) Provided a custom hash method for the unordered_map to avoid double hashing the key. Used boost:hash_combine for hashing. 3) changed unordered_map to o3tl::lru_map Change-Id: I0ab191f7bb72ccd5074c78858de9831c1a462b7b Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117362 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-24The Chrome Trace Event viewer doesn't support nested async eventsTor Lillqvist
Instead of nestable b(egin) and e(nd) events, generate the allegedly deprecated S(tart)' and F(inish) events. Makes the code simpler. (And AsyncEvent is still unused. Unclear whether adding it was based on a misunderstanding.) Change-Id: Ic029b67e0951dda775c0d0af009f2e431ae55e53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117700 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117737 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-23avoid maybe-uninitialized in PowerPointShapeExportNoel Grandin
/home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx: In member function ‘oox::drawingml::ShapeExport& oox::core::PowerPointShapeExport::WritePlaceholderReferenceTextBody(oox::core::PlaceholderType, PageType, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>)’: /home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1715:31: error: ‘nDateTimeFormat’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1715 | SvxTimeFormat eTime = static_cast<SvxTimeFormat>(nDateTimeFormat >> 4); | ^~~~~ /home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1707:36: error: ‘bIsDateTimeFixed’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1707 | if(ePageType != LAYOUT && !bIsDateTimeFixed) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ Change-Id: I7f622321680705fb0b0fa42630949c8d6af8488e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 3c24e7ed972ae2fc431365e4884e27c0b243c905) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117716 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: pptx export: slide footers roundtrip unit testSarper Akdemir
Roundtrip test that checks the slide footers, and their placeholder indexes. Change-Id: I9c4b819092ac6699617d71538c35b066d6e6f974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117013 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117541 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: pptx export: add support for slide footersSarper Akdemir
Adds support for exporting slide footers to PPTX. Slide footers are exported as shapes that use placeholder indexes to refer to the shapes on master. To make the references work they are exported to layout slides too. Change-Id: I8bfde520b0aec66405523c719844e69c6fc15b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117012 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117540 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: pptx export: add initial support for lstStyles in textboxesSarper Akdemir
Adds initial support for writing lstStyles that are specific to a shape. Current implementation only writes first paragraph and first textruns properties in it. Made WriteParagraphProperties return a bool that determines whether or not it wrote a pPr tag. Needed this since lvl1pPr tag should be started even if there was no paragraph properties since run properties also written inside it. Change-Id: Ie0cfc9b9f221093db3a1111ca29140a6dfb5e8ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117011 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117539 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: pptx export: add placeholder index to master footer placeholdersSarper Akdemir
OOXML uses placeholder index to determine from which layout placeholder it should be inheriting styles, position etc. Added maPlaceholderShapeToIndexMap that stores corresponding Placeholder index for a Placeholder XShape on the master slide. Right now only used for placeholder types Footer, DateAndTime and SlideNumber. Change-Id: If788f235d00b6d1cde7194d9e4a0789e019432c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117010 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117538 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: pptx export: add datetime field type helpersSarper Akdemir
Creates helper functions to convert from LO time and date formats to datetime fields on OOXML Change-Id: Ibbfefa18d0422eddb6c37539294ed23e77fe5f22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117009 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117537 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: pptx import: import footer fields as propertiesSarper Akdemir
Makes footer, slidenum and datetime placeholders that are inserted to the slides themselves on pptx files imported as slide properties if it is possible to do so without losing information (style, position etc.) If that is not the case and the footers have some special style applied to them that isn't inherited from master slides, fallbacks to the current implementation importing them as shapes. Also since the default way of displaying slide footers in LO use the respective text fields on master slides, information in master/layout slide datetime and footer placeholders respectively get replaced with <date/time> text fields and <footer> text fields. Change-Id: Ib2f7d18103b62c0c9a8453e01cfd2fd1aa1d39af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117008 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117536 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23cid#1486005 Uninitialized scalar fieldSarper Akdemir
since... commit 2cfccfba09faa5c3bb973136ffe99d534d09c881 Date: Sun May 9 20:56:41 2021 +0300 tdf#59323: ooxml import: hasListStyleOnImport Change-Id: Ib5d557bc0037bb72e9635391d6991fc1d8e5f2a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117504 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117535 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: hasListStyleOnImportSarper Akdemir
Introduces hasListStyleOnImport to determine whether or not the textbody had a non-empty lstStyle tag in it on import. Change-Id: Iccb8cfb20e4402e7cadb8e2f2b9a1f6fa178ade4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117007 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117534 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: hasNoninheritedBodyPropertiesSarper Akdemir
Introduces hasNoninheritedBodyProperties. Change-Id: Id108f692005455376537e515f41528cc66a8c25c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117006 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117533 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: hasParagraphPropertiesSarper Akdemir
Introduces hasParagraphProperties to determine whether or not there was a pPr tag in the textbody on import. Change-Id: I3c6815e8405b0087f64520ee4e0e39297b3b4548 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117005 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117532 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: hasVisualRunPropertiesSarper Akdemir
Introduces helper functions to determine whether a shape has non inherited run properties that change it visually. mbHasVisualRunProperties is set on import if there was a run property that alters visual appearance. Change-Id: Ie1e8e22d2757dc8594e7c6c3b8fc1dd7973c92af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117004 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117531 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: hasNonInheritedShapePropertiesSarper Akdemir
Introduces hasNonInheritedShapeProperties helper to PPTShape. If the shape has something imported from it's spPr tag mbHasNoninheritedShapeProperties set to true. Change-Id: I0529f1def8d2c32d5bf06172ce44facdde92893c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117003 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117530 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: hasShapeStyleRefsSarper Akdemir
Helper function to determine whether the shape has style refs or not. Change-Id: I57b244b4af5b9e3abba90f0e4e25a35da27e3409 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117002 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit c5676a08eb57d30c11bd201f8d2c328165c8143f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117429 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23tdf#59323: ooxml import: add OOXML to LO datetime helperSarper Akdemir
Added static helper functions getLOTimeFormat and getLODateFormat to TextField class for mapping datetime field types to SvxDateFomat and SvxTimeFormat. Change-Id: I9c1553cc89d47855dc7af06a8ea995de01692ded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117001 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117529 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-23lok: allow .uno:JumpToMark.Michael Meeks
Change-Id: I0cd3173c94c6952bd5cf81474a7cc31b1585e50e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117645 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-23tdf#142716 Update selection after any text is inserted.Gülşah Köse
When we don't update the selection after insertion of new text SvxUnoTextBase::createEnumeration knows old selection and losts last part of the text. Change-Id: I20f6530f34097ff213ff00cff617139887fd287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117409 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit e837f50313a703b6b26abb78f224472c1e4734ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117556 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-22updated gitignore for andoird buildsPranam Lashkari
Change-Id: I7603b1de266745ba23a3d991d5e903c6fac9ab41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117674 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2021-06-22avoid windres preprocessor quoting-messups with current cygwinChristian Lohmaier
apparently fresh installs of cygwin behave differently with the windres command's quoting and treats --preprocessor='cpp foo bar' as a single file "cpp foo bar" to run instead of running "cpp" with the arguments "foo" and "bar". (-D and -I options are passed to the preprocessor automatically, so no need to prefix those with --preprocessor-arg) Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965 Tested-by: Jenkins Reviewed-by: Georgy Litvinov <git@litvinovg.pro> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117600 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-16Use FontList::GetFirstFontMetric instead of custom iteration codeMike Kaganski
Besides code deduplication, this takes care of case-insensitive search. Also fall back to a default font in case of no match in doc_renderFont*. Change-Id: Ica45ca10c374cf6581ba2f6b60563d6a1447232a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117121 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117184 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2021-06-16vcl: check mpWindowImpl for nullptrGabriel Masei
Change-Id: I492c7d5c1846df7507b1f043b80de4e61ff8ca86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117282 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit bf6dabe0ebad3cc5bc0edc04ae74fba0190b6203) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117292 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-06-16tdf#142326: Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"Stephan Bergmann
...for libstdc++ 11.2, similar to 1f3dddd6f21d91c429190ae314dadeec409f35f4 "Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams" for libstdc++ 12. The libstdc++ change referenced there has been backported to the releases/gcc-11 branch past the releases/gcc-11.1.0 tag (i.e., only towards libstdc++ 11.2) as <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ca7d2f2ec9142995179a5d832a946b50de05e659> "libstdc++: Implement LWG 1203 for rvalue iostreams". According to <https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html>, <https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html#abi.versioning.__GLIBCXX__>, and <https://gcc.gnu.org/develop.html#timeline>, the right __GLIBCXX__ value for libstdc++ 11.1 should be 20210427, but at least libstdc++-devel-11.1.1-1.fc34.x86_64 defines it as 20210428 while not including the above "libstdc++: Implement LWG 1203 for rvalue iostreams" commit, so use that value here. Change-Id: I4e2c6d6ad8156a83f5c4bc861e4a118271928a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115738 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins (cherry picked from commit 95e26d3dce4f5a3b2d010d5ca47b4e450905a100) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117231 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-16Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"Stephan Bergmann
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=aa475c4ac80733f85ba47b109fc1900f05e810e2> towards GCC 12, so that now "the return type is the original rvalue stream type not its base class." (And which would thus have caused issues like > sfx2/source/control/bindings.cxx:1323:19: error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char> &') > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/sal/log.hxx:198:6: note: expanded from macro 'SAL_STREAM' > (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) > ^ > include/sal/log.hxx:341:20: note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ now. While the issue with old libstdc++ that originally prompted the dynamic_cast was > sfx2/source/control/bindings.cxx:1323:19: error: no member named 'str' in 'std::basic_ostream<char>' > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/sal/log.hxx:194:40: note: expanded from macro 'SAL_STREAM' > (::std::ostringstream() << stream).str() > ^ > include/sal/log.hxx:336:20: note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ .) The libstdc++ macro _GLIBCXX_RELEASE is reportedly available since GCC 7.1. Change-Id: I1ee6eabb66355c1f28b9d305cbd85bac50d6b0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 1f3dddd6f21d91c429190ae314dadeec409f35f4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117230 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-16Bump version to 6.4-41Andras Timar
Change-Id: Ie9d050aed6fcae9d638d65a080171045a070e446
2021-06-15sd: ubsan - fix heap-use-after-free in SdOutlinerTomaž Vajngerl
OutlinerView can change (old one deleted and new one create) so we can't store it in a local vairable and need to always fetch it. UBSAN Error log: ==21484==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000af7d28 at pc 0x2ab7c5979405 bp 0x7ffcd1a3d1a0 sp 0x7ffcd1a3d198 READ of size 8 at 0x606000af7d28 thread T0 -0 0x2ab7c5979404 in std::__uniq_ptr_impl<EditView, std::default_delete<EditView> >::_M_ptr() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:147:42 -1 0x2ab7c59792ea in std::unique_ptr<EditView, std::default_delete<EditView> >::get() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:337:21 -2 0x2ab7c59791d9 in std::unique_ptr<EditView, std::default_delete<EditView> >::operator*() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322:2 -3 0x2ab7c59725da in OutlinerView::GetEditView() const /include/editeng/outliner.hxx:209:46 -4 0x2ab7c70e36bb in SdOutliner::SearchAndReplaceOnce(std::__debug::vector<sd::SearchSelection, std::allocator<sd::SearchSelection> >*) /sd/source/ui/view/Outliner.cxx:903:21 -5 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -6 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -7 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -8 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -9 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -10 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -11 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -12 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -13 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:738:46 -14 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:243:16 -15 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:159:30 -16 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:117:16 -17 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx -18 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:85:22 -19 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -20 0x2ab7b1b43f84 in void std::__invoke_impl<void, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -21 0x2ab7b1b43b5e in std::__invoke_result<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>::type std::__invoke<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -22 0x2ab7b1b439b2 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 -23 0x2ab7b1b43612 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 -24 0x2ab7b1b426a1 in std::_Function_handler<void (), std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 -25 0x2ab7b1aec1f1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 -26 0x2ab7b1b41984 in CppUnit::TestCaller<testSearchAllInDocumentAndNotes>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 -27 0x2ab765f655ba in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 -28 0x2ab780dd0937 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14 -29 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -30 0x2ab775453fd7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12 -31 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -32 0x2ab771f47962 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:62:16 -33 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -34 0x2ab765ecdf84 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 -35 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -36 0x2ab765f30697 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 -37 0x2ab765fcfa79 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 -38 0x2ab765f63c21 in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 -39 0x2ab765f67a52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 -40 0x2ab765f66c4a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 -41 0x2ab765f67a52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 -42 0x2ab765f66c4a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 -43 0x2ab765ffd60e in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 -44 0x2ab765fce4de in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 -45 0x2ab765ffe56b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 -46 0x4ff42e in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:324:20 -47 0x4fb90c in sal_main() /sal/cppunittester/cppunittester.cxx:474:20 -48 0x4fa40e in main /sal/cppunittester/cppunittester.cxx:381:1 -49 0x2ab767c44554 in __libc_start_main (/lib64/libc.so.6+0x22554) -50 0x425e04 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425e04) 0x606000af7d28 is located 8 bytes inside of 56-byte region [0x606000af7d20,0x606000af7d58) freed by thread T0 here: -0 0x4f75f0 in operator delete(void*) /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_new_delete.cc:160 -1 0x2ab7c70c42b1 in SdOutliner::Implementation::ProvideOutlinerView(Outliner&, std::shared_ptr<sd::ViewShell> const&, vcl::Window*) /sd/source/ui/view/Outliner.cxx:1988:17 -2 0x2ab7c70c1302 in SdOutliner::SetViewShell(std::shared_ptr<sd::ViewShell> const&) /sd/source/ui/view/Outliner.cxx:1743:17 -3 0x2ab7c70ed9f4 in SdOutliner::SetViewMode(PageKind) /sd/source/ui/view/Outliner.cxx:1571:5 -4 0x2ab7c70f309e in SdOutliner::SetObject(sd::outliner::IteratorPosition const&) /sd/source/ui/view/Outliner.cxx:1720:5 -5 0x2ab7c70f3db6 in SdOutliner::PrepareSearchAndReplace() /sd/source/ui/view/Outliner.cxx:1507:13 -6 0x2ab7c70d4b3f in SdOutliner::ProvideNextTextObject() /sd/source/ui/view/Outliner.cxx:1302:33 -7 0x2ab7c70e30f0 in SdOutliner::SearchAndReplaceOnce(std::__debug::vector<sd::SearchSelection, std::allocator<sd::SearchSelection> >*) /sd/source/ui/view/Outliner.cxx:892:17 -8 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -9 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -10 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -11 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -12 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -13 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -14 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -15 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -16 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:738:46 -17 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:243:16 -18 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:159:30 -19 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:117:16 -20 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx -21 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:85:22 -22 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -23 0x2ab7b1b43f84 in void std::__invoke_impl<void, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -24 0x2ab7b1b43b5e in std::__invoke_result<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>::type std::__invoke<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -25 0x2ab7b1b439b2 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 -26 0x2ab7b1b43612 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 -27 0x2ab7b1b426a1 in std::_Function_handler<void (), std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 -28 0x2ab7b1aec1f1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 -29 0x2ab7b1b41984 in CppUnit::TestCaller<testSearchAllInDocumentAndNotes>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 Change-Id: I0b4616cd3813565bc58b7a84320cbf52dd654a3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116879 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 36db408b9027da01464927e5853950435596ae05) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117147 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-15tdf#142478 add test that triggers find all and crashesTomaž Vajngerl
String "Crash" in document and notes, then trigger "find all", which produced a crash without the fix in-place. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116769 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7f059ce157da0de40a98f63f61d923cc67d93884) Change-Id: I8e6e4a9da1afc85643648aee36a03c1fb39ca16d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117146 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-15tdf#142478 fix crash when searching and a viewshell change occursTomaž Vajngerl
When searching a impress document for a word, and the word is in notes as welll as in the document, a crash happens (only when searching with "find all"). The regressing commit changed that the search is now bound to a view (and to a viewshell). When searching for words in notes and document, at the transition from "standard" to "notes" page kind mode, the view and viewshells are destroyed and the new one created again. The problem lies here as when we destroy the viewshell, we also destroy the search context and FuSearch objects, but we are still executing the search -> crash. The solution for this is that when we change the page kind, we take the FuSearch object from the old viewshell and put it into the newly created viewshell, so that we keep the FuSearch object alive and don't throw away the search context too. Change-Id: I50931cca2a20c5704f7450e3cc8b3466af4c5a3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116758 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 3b75f9add7ed80e803b0771d86892d6ca0f47e71) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117145 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-12vcl: check mpWindowImpl before referencing it.Gabriel Masei
Fixed some cases generating crashes because mpWindowImpl was not checked for nullptr. Change-Id: I5540f9f21a870b02655b5bf2afdbf3a8153c1519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116466 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-06-10scale VCL's scale cache according to the number of Online viewsLuboš Luňák
If a document is opened in several Online views, each of them using a different zoom, then the scale cache is used for the scaling, and each view is sent updated tiles, so if there are too many views, the cache is not large enough. (Collabora T28503) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116928 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 53dd6aa5f3817d42bf676980f980051c3b7cdb03) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116898 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit c8522043b239aa0e463e6793b7c9b019d79b2d9d) Change-Id: I3fa719b0515064773fe4584fedbc8aff98e6e213 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116901 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-10allow altering the max size of o3tl::lru_cacheLuboš Luňák
Change-Id: Id119b70275e1c88a8c57f89d915241427be9dbf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116927 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 62b58e88d897f51a7c4e12b41d14121ab8d3396f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116897 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit cb10c29a3255620bf69480aa7b653962fb04786e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116900
2021-06-08Fix click on the drawing area of CSV dialogmerttumer
Change-Id: I8c13698b5e9e2e9c8869aa9094ce93c38bf2276f Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116796 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-03Make SwRect::Union() inlineTor Lillqvist
Change-Id: I40e3e5f4d7ae7c2ab3d58d1dc9bf71ceb9f0b437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116663 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-03Make the two SwRect::IsInside() functions inlineTor Lillqvist
They show up in profiles so might give performance benefits when compiled with optimisation. Change-Id: I29a1442fac987819f06fa6dd9e92a3299b0637fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116662 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-02include cstddef for gcc11Jeff Law
Change-Id: I2f845ce9bb660ad6c1eea80ea81dd71add2c0db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116607 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-01unit test: lok: text selection message testDennis Francis
Change-Id: Ie551461e323a2705c5b0b159dd50e8a1eef7d364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116429 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-06-01unit test: lok: edit cursor invalidation messageDennis Francis
Change-Id: I255e3b637329fc1fb41d24e79a770051ee827162 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116428 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-01sc: lok: apply the previous fix for selections tooDennis Francis
Change-Id: Ic1f6c1642da71e0ef8c23831786ae405dda21133 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116427 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-01sc: lokit: fix wrong edit cursor coordinates for numeric cellsDennis Francis
The cursor coordinates returned by editengine implementation is computed with respect to document-visible-area in "display" hmm and not "print" hmm. For numeric cells, the visible top-left is always non-zero, hence triggering this incorrect "refpoint" subtraction to compute "relrect". The fix is to calculate the correct "relrect" by subtracting the display hmm version of "refpoint" from the edit cursor rectange and then convert to twips. Change-Id: I4b663edcb1f74e1bdcc300788769d580fcfe7e17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116426 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-06-01autocomplete: allow cycling through possible matchesDennis Francis
Change-Id: I4a4b11312f36885d1c6fbe43c4850d55293b2557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115859 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-06-01tdf#138302 partial revert tdf#108496: DOCX: redesign of override in listsJustin Luth
LO 6.4.5 commit cf13fe3e6f6a40f6db064d65d4514d13a23a31f0 was only concerned about DOCX, but just elinated shared code. So restore the shared code and just don't execute it for DOCX. It doesn't look like RTF was working before this, but this does fix DOC format. I looked for existing unit tests in rtf and doc, but none were found that hit this code. Change-Id: Id624f73181384f38e1ef9f27575e0fb82eea19c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116349 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116452 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-05-31Avoid empty std::map constructorTor Lillqvist
Change-Id: Ie1bc333409fb201d82dd2cff7597e281600f01db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116232 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-05-31tdf#139915 DOCX import: fix anchored obj position with to-char and TEXT_LINEMiklos Vajna
There were multiple problems here: - commit 8f1a1092d47947847e1d888b0284e8364c663d1f (tdf#97371 DOCX import: fix text covered by shape, 2016-01-28) disabled to-char anchoring for TEXT_LINE (e.g. "alignment top, relative to line") because changing the anchor type of a TextBox could not be changed, but this has been implemented in sw/ in the meantime, so it can be dropped - Now that the anchor type is to-char, we can set the vertical relation to TEXT_LINE, but Word's positive value is "below line", and ours mean "towards the top of the page, from the bottom of the line", so we need to drop the workaround of commit 3303a4c5f21874453e634d84408c50e7a0055a4d (tdf#135153 DOCX import: avoid line-of-text relation with to-para anchoring, 2021-01-18) Once these are in place, we can fix the remaining problem by inverting the vertical position of the shape, which instantly fixes the overlapping textboxes in the bugdoc. (cherry picked from commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02) Conflicts: writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx writerfilter/source/dmapper/GraphicImport.cxx Change-Id: I895abb76d3bd3bbe3a84e5c27a77df722b96226a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116231 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>