summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-12revert part of 'loplugin:flatten' in Skia codeLuboš Luňák
The automated code flattening may make sense in old spaghetti code, but this is new code, and it's structured the way it makes sense. Both those if's are logically just a part of a larger function and bailing out sooner is at least conceptually wrong (and the moment I add more code there, I'd need to revert anyway). Change-Id: Iddbd22166159429636196eb1545b008ef576036b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125054 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12introduce OUStringConstExprNoel Grandin
so we can declare compile-time constant arrays and structs containing OUStringLiteral Change-Id: I51fd743f2e461a36bb4a0a17c6ff107f86096895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12Update git submodulesOlivier Hallot
* Update helpcontent2 from branch 'master' to 79548b2894c85265f0e4cb9ec74c761c1f5955ed - Improvement in English Change-Id: I9b7da83ad12b20e01499f46667f42e63548f3d58 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124984 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-11-12Replace REGISTER_PROP in connectivity/evoab2Julien Nabet
Change-Id: Icdadadcaa4c6ee9bdaeb6105a33cf1891279781f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125107 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12Replace some macros in dbaccess part 9Julien Nabet
Remove IMPLEMENT_LISTENER_MULTIPLEXER_CORE + BEGIN_DECLARE_LISTENER_MULTIPLEXER + END_DECLARE_LISTENER_MULTIPLEXER + DECLARE_MULTIPLEXER_BOOL_METHOD + DECLARE_MULTIPLEXER_VOID_METHOD + STOP_MULTIPLEXER_LISTENING + START_PROPERTY_MULTIPLEXER_LISTENING + STOP_PROPERTY_MULTIPLEXER_LISTENING + START_MULTIPLEXER_LISTENING Change-Id: I23dfa9d71b8ae84b9c4ff5e55145e8b350a1eeba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125105 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12Update git submodulesflywire
* Update helpcontent2 from branch 'master' to 6d3d8f1f5279595d78267ed830cc0abb6babccb3 - Simplify location description Change-Id: I943bdd1ab68d0f73f3e7735b62c8ef228eecd72a Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124700 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-11-12insert special character in sql view in dbaccess using an arbitrary fontCaolán McNamara
The font to use in the editengine is set with the fallback list notation "Font1;Font2;Font3" and while SvxCharacterMap::SetCharFont explicitly has... { // first get the underlying info in order to get font names // like "Times New Roman;Times" resolved vcl::Font aTmp(m_xVirDev->GetFontMetric(rFont)); } which is supposed to resolve to what the physical font is, it appears that since the ancient merge of: commit 2f382d6c2579a25c68dbd121af7f1f5dc7ec9852 Date: Thu Mar 27 16:59:30 2003 +0000 MWS_SRX644: migrate branch mws_srx644 -> HEAD a change was included of: - // Fontdaten ermitteln und setzen - aMetric.SetName( pMetric->maName ); + // set aMetric with info from font + aMetric.SetName( maFont.GetName() ); which means that font names like "Times:Times New Roman" appear in the FontMetric for the font and not the font name of the physical font that the metric describes. That doesn't look right to me, but rather than get bogged down in changing that and the undoubtedly infinite chain of knock on problems that will trigger just start with a simple font name here not the fallback list. The font is "Liberation Mono;etc;etc" so the first one is certain to be available. Change-Id: I58809be8edb515d9823867c7a0bce5931dccbd27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12Add a comment clarifying intended replacement for non-const operator[]Mike Kaganski
Change-Id: Ib6cd01e1da3e23521e2ae385b8f50046000da410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125103 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12tdf#143021 unit test enable 'matte' extrusion surfaceRegina Henschel
This adds the missing unit test for commmit 70a4cb766ed356bc17433ac1673e977bb0bf3d2f. Thanks to Tomaž for extending the test framework to 3D. Change-Id: Iffaa163c3d453318bc0ed7f8703af15bd20c8966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125013 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-11-12tdf#145611 sw: fix regression: undoing page breaksAttila Szűcs
at pages with endnotes. Added a nullptr check for section to avoid crash on Linux. It seems, SwSectionFrame::m_pSection can be nullptr at that point. Regression from commit 4c31b4ef2083087a822c3ae648fd09acc67d2f88 "tdf#139336 sw: fix extra pages of multicolumn sections with footnotes". Co-authored-by: Tibor Nagy (NISZ) Change-Id: Iec4ff93df6720d0e62af59117cd03bd3902c0f64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125095 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-12Fix typoAndrea Gelmini
Change-Id: I45cff1f3182fd17776281d1daf49477077779ebe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125099 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-12tdf#126605: sd: move UItest to CppUnittestXisco Fauli
Change-Id: I6c7da3f903199027cd7cb446bdc559fcc27b3828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125096 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-12Resolves tdf#70519 - Make wavy lines depend on zoom factorHeiko Tietze
Solves accessibility issue of too faint spellchecking indicators Change-Id: Ic5bc9e205981e90c8f4ee12aa52dde723da1e7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125038 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-11-12Update git submodulesOlivier Hallot
* Update dictionaries from branch 'master' to 5cf23af85b47be6e398add826da1a02175be4238 - Add "exrtudir" to spell check for pt-BR Refactor by PTG tool Change-Id: I78d0caffbbe04d1d0b75ae1dab95470452692550 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/125106 Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-11-12Add error handling while creating absolute urlHossein
* Added error handling while creating absolute url from file name * It was reported as ofz#1493240 Unchecked return value * It has been silenced in 30f1617bd873d9ccf343a280ba27f476d4c7726e and b7c8e4f8ae5402eb665f758f75123e9fe1514d01 Change-Id: Idb8116a5805be38cc37ec1ba28ef226ba160e25b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124214 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12rebuild a PCH when the flags it was built with changeLuboš Luňák
We already store the flags in a .flags file for another use, so just handle the file as another make rule before the PCH rule and if the file changes then the PCH rule will depend on something that has changed. Change-Id: Ic43068273a40c0337b77221660f370780a21340c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125094 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12adapt to Sequence::operator[] non-const removalLuboš Luňák
5054202e71605cb4f10c798be76679 passed Gerrit before the changes and I submitted it only later after the changes. Change-Id: I251f50f417964f23e5e91aae6696df609fee9e14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125098 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12Resolves: tdf#145582 modify called too oftenCaolán McNamara
a problem since: commit 5b98dd53c7dc101d3a5ff693d3f0520ec1abd3d1 Date: Tue Aug 3 12:28:23 2021 +0100 tdf#143657 'execute' button doesn't get enabled when contents changed which was a fix for the problem since: commit 73c9ef661d9ef6237d3fd3c259fd040a545b44cf Date: Tue Jul 6 18:51:38 2021 +0200 tdf#132740 don't broadcast if modified status has not changed Change-Id: Ibae42251ce04229283283407bc2ab986272e945d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12Fix HAVE_CPP_CONSTEVAL check for MSVCStephan Bergmann
For one, it always trivially failed with > LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib' because of a missing LIB env var expected by cl. (Rather using LDFLAGS with something like > LDFLAGS="$LDFLAGS -LIBPATH:$COMPATH/lib/$WIN_HOST_ARCH" instead of prepending LIB to $CXX via env wouldn't work, as AC_RUN_IFELSE puts LDFLAGS too early on the compiler command line, causing "cl : Command line warning D9002 : ignoring unknown option '-LIBPATH:...'". And just using something like > CXX="env LIB=$COMPATH/lib/$WIN_HOST_ARCH $CXX" instead of the full $ILIB would cause "LINK : fatal error LNK1104: cannot open file 'kernel32.lib'".) This means that the HAVE_CPP_CONSEVAL check had to be moved past setting up ILIB. But for another, detection of HAVE_CPP_CONSTEVAL under --with-latest-c++ would trigger MSVC bug <https://developercommunity.visualstudio.com/t/1581879> "Bogus error C7595 with consteval constructor in ternary expression (/std:c++latest)" at > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression (and see also f8a30a87a9d0c68dc16d5fa2ca63f687b1d90da1 "Fix (mis-)uses of temporary O[U]StringLiteral") so add a test for that bug to the checking code. Change-Id: Iedf793f388fc190555a71ed3ab63e87a77ad4828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125093 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-12make it explicit whether to ignore the result of getLOKPayload()Luboš Luňák
Returning an empty string to signify 'ignore' was a poor design, as some messages types actually may have valid empty messages. Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124979 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12sw, out of order undo: allow multiple actions from other viewsMiklos Vajna
Previously we assumed that the action to be executed is always exactly the top of the undo stack minus 1 element. Extend this, so that in case an other view appends two or more elements to the undo stack, we still find our undo action. Obviously only do this if all those undo actions are independent from us. This requires replacing the swap in svl/ with a move-out + move a range down + move in construct. Change-Id: Ic12d32d6eb5e77618d99eddb4fa096802f32d655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125076 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-12uitest: sd: Add UItest for .uno:ExportToPDFXisco Fauli
Change-Id: I9ec7fd16c51c0240d041784d03aba687e07656ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125092 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-12uitest: sc: Add UItest for .uno:ExportToPDFXisco Fauli
Change-Id: I73b1ed04edb883c78316e10650da30e81eac78df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125088 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-12make it possible to find out what fonts are actually really usedLuboš Luňák
A document specifies which font each text is supposed to use, but we still need to map that to a real available font, which includes also font fallback in case the font selected doesn't cover all glyphs. This commit adds API to track this font mapping, first StartTrackingFontMappingUse() will make VCL record this information, and then FinishTrackingFontMappingUse() will stop and return all the information, as a listing saying that a requested font got mapped to a list of fonts and the number of times this took place. This can be useful to find out what actually gets used for a specific document, or compare how changing fonts available affects a specific document. Change-Id: I6426ecef354166bef337b1dc9b9007fda148d5c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123051 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12improve mergeToSinglePolyPolygonNoel Grandin
spotted by llunak. No need to take param by &&, since mergeToSinglePol does not actually need to modify it. Also flatten it a little. Change-Id: I2f5ade347db756e21ecb0a88c3935805268f5072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125086 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-11-12uitest: sw: Add UItest for .uno:ExportToPDFXisco Fauli
Change-Id: Icb28ec46e2db5c67f105a61a79e65edfde1df6a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125081 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-12tdf#145584: sw_uiwriter3: Add unittestXisco Fauli
Change-Id: I2713a6563542307e8103a88301bb623bd8da11d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125079 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-12rhino: unbreak build on Fedora 34Michael Stahl
Sometime during the Fedora 34 lifecycle, ant started to put /usr/share/java/rhino.jar on the classpath used to invoke javac, which results in: [javac] workdir/UnpackedTarball/rhino/src/org/mozilla/javascript/optimizer/Codegen.java:202: error: reference to Hashtable is ambiguous [javac] Hashtable possibleDirectCalls = null; [javac] ^ [javac] both class java.util.Hashtable in java.util and class org.mozilla.javascript.Hashtable in org.mozilla.javascript match Indeed /usr/share/java/rhino.jar contains a class org.mozilla.javascript.Hashtable, while it doesn't exist yet in the older rhino1_5R5.zip that is bundled. The problem is that the package ant-apache-bsf contains the file /etc/ant.d/apache-bsf which references the system rhino jar. It turns out that reading the /etc/ant.d/* files in the shell script /usr/bin/ant can be suppressed by setting the variable OPT_JAR_LIST to a non-empty value, which is documented as "A user should request optional jars and their dependencies via the OPT_JAR_LIST variable", but which is sadly ignored if set to an empty value. Another way to fix the problem is to patch the property build.sysclasspath to "ignore" in build.xml. http://ant.apache.org/manual/sysclasspath.html Change-Id: I6d82eb226e5d01d094ebe044dbdada85b8687814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124934 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-12Fix (mis-)uses of temporary O[U]StringLiteralStephan Bergmann
...as sub-expressions of ternary operators, which happened to keep compiling after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" and e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString" because both branches are of the same type O[U]StringLiteral<N>, and which didn't cause any issues because no dangling pointers to those temporary objects escaped the surrounding full expressions. This was found with an experimental build with VS 2022 with --enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some linking fix in the configure.ac detection code (which is forthcoming in a later commit) and flagged all these uses in ternary operators as error C7595 "call to immediate function is not a constant expression". That error looks bogus (and it also caused a false > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that compiler bug is fixed), but it nicely found all these cases that should arguably be cleaned up. Change-Id: I81de94e8af5a6c50e5fe7dfa1a4b253e0c2a68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-12Include <cstdint> in fxcodec/fx_codec.hTor Lillqvist
Fixes the build of Pdfium on Fedora 34 for me. No idea why it wasn't needed on other platforms. Change-Id: Id0d6172383970b289b6b3b7f6b5c0da998167796 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125084 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-11-12fix assertion with scaled alpha image in SkiaSalBitmapLuboš Luňák
The size of the alpha image does not really depend in mPixelsSize, it's created on demand and it's just necessary to check if it has the right size. Change-Id: Ic16c7c2b202be31c22b21b0c5ee720bda955bbbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125059 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12log also whether SkiaSalBitmap has a pixel bufferLuboš Luňák
Change-Id: Ib78c661ec82456386d79680f106b6d14b66f450f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125058 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12clean up SkCanvas before using the bitmap it's painted toLuboš Luňák
I think this is not strictly needed with raster bitmaps, but still, this is the proper way. Change-Id: If6ccf82cf633afefa5c043096ec01b5f3891dc0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125057 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12drop usage of SkSurface::draw()Luboš Luňák
It causes so many problems that it almost doesn't get used in practice anyway. Change-Id: Ie11042749d0cca998af45be1daee6f14bf9531f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12simplify construction of XMLPropertyMapEntryNoel Grandin
so we don't have to pass in the size of the string literal. This is mostly a preparatory change, to make an another patch of mine less noisy. Change-Id: Idafcd68586b8b465e63dc89e4a4180d2e70ac3a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12Replace some macros in dbaccess part 8Julien Nabet
Remove DECLARE_PROPERTY_MULTIPLEXER + IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD + IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD + IMPLEMENT_LISTENER_ADMINISTRATION + IMPLEMENT_PROPERTY_MULTIPLEXER + IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION Change-Id: Ib0522fc895166489c70c163b9d6c0f65cd9a3d59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125078 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12rtl::Static to thread-safe staticNoel Grandin
Change-Id: I6390d1811bad59c09a074039c635710d25a660d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124886 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12Use more o3tl::convert in scMike Kaganski
Change-Id: I624b6c570eff8b6cdc83ffcb2d0dbadf848715b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120330 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12coverity: annotate with markup so they will stay silencedCaolán McNamara
Change-Id: I8ac0ae4cd64d8171eebd98d89d1fe954280987b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12reduce copy&pasteLuboš Luňák
Change-Id: Ie37f96755f348316bb8d5129df925134943e7ace Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125055 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12external: update pdfium to 4699Miklos Vajna
Change-Id: I545adce0491e48fad2bfc4003695bd96cc911f22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125068 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-12Fix typoAndrea Gelmini
Change-Id: I52608622b775c12c08497f05fffd7639f2543a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125074 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12Add a bit of info to the test failure outputMike Kaganski
Change-Id: I94950217aa979805e3080b4ab9230a799dcab7ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124977 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-11external/poppler: Avoid missing typeinfo in UBSan buildsStephan Bergmann
After 03bc0f97205593547ddf1fc8d4fb396479bcab6d "poppler: upgrade to release 21.11.0", my Linux Clang UBSan build started to fail to link Executable_xpdfimport with > ld.lld: error: undefined symbol: SplashOutputDev::SplashOutputDev(SplashColorMode, int, bool, unsigned char*, bool, SplashThinLineMode, bool) > >>> referenced by PSOutputDev.cc:3197 (workdir/UnpackedTarball/poppler/poppler/PSOutputDev.cc:3197) > >>> PSOutputDev.o:(PSOutputDev::checkPageSlice(Page*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*)) in archive workdir/LinkTarget/StaticLibrary/libpoppler.a > > ld.lld: error: undefined symbol: SplashOutputDev::startDoc(PDFDoc*) > >>> referenced by PSOutputDev.cc:3206 (workdir/UnpackedTarball/poppler/poppler/PSOutputDev.cc:3206) > >>> PSOutputDev.o:(PSOutputDev::checkPageSlice(Page*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*)) in archive workdir/LinkTarget/StaticLibrary/libpoppler.a > > ld.lld: error: undefined symbol: typeinfo for SplashOutputDev > >>> referenced by PSOutputDev.cc > >>> PSOutputDev.o:(.data+0x16208) in archive workdir/LinkTarget/StaticLibrary/libpoppler.a > >>> referenced by PSOutputDev.cc > >>> PSOutputDev.o:(.data+0x162A8) in archive workdir/LinkTarget/StaticLibrary/libpoppler.a > >>> referenced by PSOutputDev.cc > >>> PSOutputDev.o:(.data+0x16348) in archive workdir/LinkTarget/StaticLibrary/libpoppler.a > >>> referenced 6 more times because external/poppler/StaticLibrary_poppler.mk apparently only builds a curated subset of poppler source files, but in a UBSan build the implementation of GfxFontLoc *GfxFont::locateFont(XRef *xref, PSOutputDev *ps) in workdir/UnpackedTarball/poppler/poppler/GfxFont.cc (being the only place in Executable_xpdfimport that mentions PSOutputDev, i.e., which is apparently never instantiated in Executable_xpdfimport, and that ps argument is apparently always null) needs the PSOutputDev typeinfo, thus pulling in PSOutputDev.o from StaticLibrary_poppler (which contains the virtual PSOutputDev dtor and thus its typeinfo), which in turn needs the SplashOutputDev ctor and SplashOutputDev::startDoc from within PSOutputDev::checkPageSlice. The obvious fix would be to extend the curated list of source files to include the missing SplashOutputDev symbols, and any symbols recursively needed by those, but that would quickly lead to inclusion of workdir/UnpackedTarball/poppler/splash/SplashFontEngine.cc which would fail to compile due to a missing #include <ft2build.h> from FreeType. So instead of going down that road of adding in ever more stuff, lets try to leave out the problematic definition of PSOutputDev::checkPageSlice (which is apparently never called anyway, see above). But leaving that virtual function out completely would cause missing symbols in the PSOutputDev vtable emitted alongside the PSOputput dtor, but also leaving out that dtor (which is apparently never called anyway, either) would then suppress emission of the PSOutputDev typeinfo, which started this whole exercise. So, just for the UBSan builds, define PSOutputDev::checkPageSlice (never called anyway, see above) with an empty body, as the least invasive approach to avoid the missing typeinfo symbol. Change-Id: Ifcb80501b71f22d8f14ee29fd8e4480871ee36d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125071 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-11remove an ugly coverity warning suppressionCaolán McNamara
if the warning reappears o3tl::suppress_fun_call_w_exception is my intended weapon of choice given the now commonplace use of std::optional which doesn't have a deleter arg when the same problem arises there Change-Id: If843173a45f50a266fe7a79126bd2892f7686a48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125043 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-11Drop ScGlobal::GetEmptyOUString() and EMPTY_OUSTRINGMike Kaganski
OUString default ctor already uses a static instance (through rtl_uString_new), no need to have another module-specific static. Commit d8037ae18a297229d1b79f8f76331abfd548350d had removed its sw counterpart some time ago. Change-Id: I140fe13bc1f6b0cbe188e83e602fdebe995e467a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125061 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-11Replace some macros in dbaccess part 7Julien Nabet
Remove FIRST_USER_DEFINED_FEATURE and LAST_USER_DEFINED_FEATURE + GRANT_REVOKE_RIGHT + ALL_STRING + ALL_INT + NSQLAllocHandle + NSQLFreeHandle + NSQLSetEnvAttr + NSQLDataSources + LbText + LbPos + CHECK_INVARIANTS + OUT_LF + TAG_OFF_LF + TAG_ON_LF + TAG_OFF + TAG_ON Change-Id: I07261ea0eafcc9f0630f92e47bf5c2f694661933 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125065 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-11CppunitTest_sc_macros_test: simplify testXisco Fauli
Change-Id: Icefb1de06f26b2e0d0b20920fdfef7947cfed964 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125067 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-11sw: the RedlineComment property is settable on SwXRedlineMichael Stahl
... but not SwXRedlinePortion. Change-Id: Ic186e2af76942a796b440c6346dc9443e71438a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125035 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-11tdf#145584: fix crash on exporting as PDF with Selection rRangeJulien Nabet
Regression from 20ddabc88b6b45ea3efcc44ede5244ea526b09c4 tdf#144989 sw: disable idle jobs during printing or PDF export The problem is that (with the kde5 and WNT vclplugs) the idle jobs update fields and un-hides every section, which destroys the layout that SwXTextDocument::getRendererCount() finalised with great effort bt: 0 0x00007f773af65dfa in SwXTextDocument::render(int, com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x66e4980, nRenderer=0, rSelection= uno::Any("com.sun.star.uno.XInterface": {_vptr$XInterface = 0x9579020}), rxOptions=uno::Sequence of length 8 = {...}) at sw/source/uibase/uno/unotxdoc.cxx:3012 1 0x00007f76ff5f2832 in PDFExport::ExportSelection(vcl::PDFWriter&, com::sun::star::uno::Reference<com::sun::star::view::XRenderable> const&, com::sun::star::uno::Any const&, StringRangeEnumerator const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, int) (this=0x7ffc7ee0e990, rPDFWriter=..., rRenderable=uno::Reference to (SwXTextDocument *) 0x66e4c38, rSelection= uno::Any("com.sun.star.uno.XInterface": {_vptr$XInterface = 0x9579020}), rRangeEnum=..., rRenderOptions=uno::Sequence of length 8 = {...}, nPageCount=1) at filter/source/pdf/pdfexport.cxx:218 2 0x00007f76ff5f787e in PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x7ffc7ee0e990, rFile="file:///tmp/lu4uimg.tmp/lu4uimk.tmp", rFilterData=uno::Sequence of length 54 = {...}) at filter/source/pdf/pdfexport.cxx:949 3 0x00007f76ff60a4a8 in PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x71798a0, rDescriptor=uno::Sequence of length 14 = {...}) at filter/source/pdf/pdffilter.cxx:161 4 0x00007f76ff60a7fe in PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x71798a0, rDescriptor=uno::Sequence of length 14 = {...}) at filter/source/pdf/pdffilter.cxx:224 5 0x00007f7755e60218 in SfxObjectShell::ExportTo(SfxMedium&) (this=0x66d2a30, rMedium=...) at sfx2/source/doc/objstor.cxx:2468 (full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=176170) Valgrind: ==619070== Invalid read of size 8 ==619070== at 0x19227A60: SwXTextDocument::render(int, com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (unotxdoc.cxx:3012) ==619070== by 0x7403: ??? ==619070== by 0x1C4A8B57: ??? ==619070== by 0x1C4A8BFF: ??? ==619070== Address 0x1ed27e08 is 328 bytes inside a block of size 880 free'd ==619070== at 0x483C71B: operator delete(void*) (vg_replace_malloc.c:923) ==619070== by 0x188EC5CC: SwDoc::release() (doc.cxx:118) ==619070== by 0x1902B92C: clear (ref.hxx:196) ==619070== by 0x1902B92C: SwDocShell::RemoveLink() (docshini.cxx:444) ==619070== by 0x1902B622: SwDocShell::~SwDocShell() (docshini.cxx:372) ==619070== by 0x1902BC07: ~SwDocShell (docshini.cxx:362) ==619070== by 0x1902BC07: ~SwDocShell (docshini.cxx:362) ==619070== by 0x1902BC07: virtual thunk to SwDocShell::~SwDocShell() (docshini.cxx:0) ==619070== by 0x18EFA411: ~SfxObjectShellLock (objsh.hxx:863) ==619070== by 0x18EFA411: SwRenderData::~SwRenderData() (printdata.cxx:48) ==619070== by 0x19227A2B: operator() (unique_ptr.h:85) ==619070== by 0x19227A2B: reset (unique_ptr.h:182) ==619070== by 0x19227A2B: reset (unique_ptr.h:456) ==619070== by 0x19227A2B: SwXTextDocument::render(int, com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (unotxdoc.cxx:3009) ==619070== by 0x21566DB5: PDFExport::ExportSelection(vcl::PDFWriter&, com::sun::star::uno::Reference<com::sun::star::view::XRenderable> const&, com::sun::star::uno::Any const&, StringRangeEnumerator const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, int) (pdfexport.cxx:218) ==619070== by 0x2156BB83: PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (pdfexport.cxx:949) ==619070== by 0x21572A05: PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (pdffilter.cxx:161) ==619070== by 0x21572F65: PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (pdffilter.cxx:224) (full Valgrind trace here: https://bugs.documentfoundation.org/attachment.cgi?id=176173) Change-Id: I03a7ec45a62be2729273111a37c1daaaa3bdf664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125014 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>