summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-07Wrap "open" into "with"Mike Kaganski
Change-Id: I1ecc16ddf565ac1f7306289fd51b673ed928cc20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107329 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-12-07elementary: Update save icons & icons with multiple linesRizal Muttaqin
- Save: Save, Save A Copy, Save All, Save As, Save Document, Save Merged Documents, Save Record, Save Remote, Save (Modified State) - Multi line icons: Align Left, Align Center, Align Right, Justified, Toggle Bulleted List, Toggle Numbered List, Increased Indent, Decrease Indent, Hanging Indent, Line Spacing 1, Line Spacing 1.5, Line Spacing 2, Increase Paragraph Spacing, Decrease Paragraph Spacing, Alphabet Uppercase List Style, Alphabet Lowercase List Style, Roman Uppercase List Style, Roman Lowercase List Style, Numbering Off, Insert Unnumbered Entry, Restart Numbering, Bullets and Numbering, Above Paragraph Spacing, Below Paragraph Spacing, Before Text Indent, After Text Indent, First Line Indent, Insert Field/Data to Text, Data to Fields, Protect Fields, Wrap Text - Other icons: Insert Formula Object, Open Remote Files This patch is an attempt to keep sync with upstream Change-Id: Ibe0d4631aaa7379a933ed89f8499e146bd2b7f1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107273 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-12-07More NSS fixes for macOS on arm64Tor Lillqvist
I think the attempt to set CPU_ARCH in external/nss/ExternalProject_nss.mk does not actually work. And anyway, it should be arm64 for macOS on arm64, not aarch64. Now NSS configury correctly finds the APIs present in the system when building for macOS on arm64. Previously, it attempted to compile the test snippets for PowerPC... which caused for instance dladdr() not to be found, which caused the softokn3 loading to fail. (It's somewhat surprising that the NSS configury still has "support" for MacOS on PowerPC... Do people really build latest and greatest NSS on such machines? Or is it just a leftover and the NSS people never, ever, remove anything?) Change-Id: I0dc35df0460db7997efcfdf92594fd8ae352aa49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107316 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-12-06graphic: clean-up and simplify GetChecksum in ImpGraphicTomaž Vajngerl
- rearrange the switch statement for GraphicTypes - remove the unneeded aRet variable Change-Id: I1be95db377548cf1a6db430fe66ce06bc7f93d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107286 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-06graphic: clean-up switches GDIMetafile shouldn't be defaultTomaž Vajngerl
There are many switches ime ImpGraphic depending on the graphic type. The default many times assumes to be GDIMetafile, which is kind-of dangerous. Add all GraphicType cases to the switch (so to handle "NONE" type if they weren't present) and add GdiMetaFile type switch instead of default. No default is needed because all the types are handled and if a new type is added, we will get an warning - which is what we want. Change-Id: I2ed5e7bce604c7215ce7101db9a04125c7a9244e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107285 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-06vcl: duplicate {Read,Write}ImpGraphic for swappingTomaž Vajngerl
For swapping we can change the algroithm of saving and rading graphics to/from the swap file as the file format doesn't need to be stable. This duplicates the algorithm, but doesn't change it yet. Change-Id: I0b0854b19f4e3f9a34d278f44bd61cd94e133def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107284 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-06vcl: remove the old (<5.0) graphic swap file versionTomaž Vajngerl
Always use the 5.0 Graphic swap file version. Actually for swap the version doesn't really matter as we don't have to have a stable file structure for the swap files (all the files are removed when LibreOffice shuts down). Change-Id: Ib1a94d7a9681ba51b4061e86d0d42080fb0f7f17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107283 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-06vcl: extract SwapFile impl. into its own class and use in GraphicTomaž Vajngerl
Change-Id: Ib4c06b81b4ed87cf6b461a67a28bae90b2b26535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107282 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-06tdf#131815 Reduce Validity dialog heightRoman Kuznetsov
Change-Id: I90ec0a85bd8cf0761459e61bc26e619153597088 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107209 Tested-by: Jenkins Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2020-12-06Related tdf#134754: Detect failed mmap on macOSStephan Bergmann
Change-Id: I21202d25e4851725198c58c29d9820bda00f2b30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107315 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-06move bluez_bluetooth_headers use_externals into ENABLE_SDREMOTE_BLUETOOTH caseRene Engelhard
... since it's where it is used, and otherwise one gets a -I$S/external/bluez_bluetooth when we don't want or even need that Change-Id: If3757adb7960ad5adfc857052bb8322f8754ecdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107178 Tested-by: Jenkins Reviewed-by: David Tardon <dtardon@redhat.com>
2020-12-06Add source files from dbaccess/source/ui/miscTor Lillqvist
(Xcode also insists on moving a couple of other lines around, oh well.) Change-Id: I7b295f51ca5b38bfcace464f9d06bfe2d93de066
2020-12-06ScriptForge - (SF_DialogControl) FindNode() for tree controlsJean-Pierre Ledure
FindNode() traverses a tree recursively and stops at the 1st node meeting either: - DisplayValue is like a given string pattern - DataValue is equal to a given scalar value The returned node can easily be made current The commit includes a check on the control type of all methods reserved for tree controls This has a minor impact on po files The version number of the po files is incremented Change-Id: I9f418df35bd4e58e0bfccc0606f5e0a5e7ac955e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107288 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-06fastparser in XMLImpSpanContext_ImplNoel Grandin
Change-Id: Iba1b61c607f5f748f5acf4ce16d2c0cce8dee72e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107281 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-06Avoid relying on OString(char const *) ctor's undocumented behaviorStephan Bergmann
...of treating nullptr like an empty string Change-Id: I41b8b88f27ed3d3c404781f897952b7d1e0e01e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107279 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-06Fix some bogus pathsTor Lillqvist
Note that what osx/README says still holds. This Xcode project is for making debugging easier only. Change-Id: I8ebbad2a2de5366616ad7304125bdd05ae001489
2020-12-06Clean up CrashReporter::IsDumpEnableStephan Bergmann
...avoiding construction of an OString from a potentially null pointer, which relied on undocumented behavior of the OString ctor Change-Id: I8f65375ba29cf345b35409019a39de1bac397625 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107278 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-06Directly check for nullptrStephan Bergmann
...instead of relying on the OString(pText) ctor's undocumented behavior of treating a null pText as an empty string Change-Id: I884c789b9b4c63bc1f013ed6bbf6c3ab9880f0e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107277 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-06Update git submodulesSeth Chaiklin
* Update helpcontent2 from branch 'master' to a2bd1ce7cf53abd37db55422c9b99a4e50d9d463 - tdf#105719 tdf#122720 tdf#107229 help for making default template ( shared/guide/standard_template.xhp ) * Modify title to Creating and Changing Default and Custom Templates * Move isolated listitem into procedure for creating default * Update procedure for making default template + Make separate procedure for updating existing default template + Add procedure for setting a template to default + Rework/elaborate section on Custom templates + Elaborate section about saving templates (tdf#122720) + add bookmark for creating templates * update to: <h1>,<h2>,<h3> ( shared/01/01110300.xhp ) [ File - Template menu ] + add related topics section and link to standard_template * update to: <h1>,<h2> ( swriter/guide/templates_styles.xhp ) * update to: <h1> ( swriter/guide/main.xhp ) * update to: <h1>,some <h2> ( shared/guide/main.xhp ) * update to: <h1>,<h2> Change-Id: I9507c70862dfdd9d844d2c53e4833bbc9bfe71a1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/105855 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2020-12-06Update git submodulesSeth Chaiklin
* Update helpcontent2 from branch 'master' to 609d466f02d63c43d42636627ee3b35e26df4661 - tdf#65991 improve help for keyboard navigation with footnotes and endnotes + add instructions for keyboard shortcut from text to footnote + add icon table for "Insert Endnote" with instructions for inserting endnotes directly + tip that shortcut keys can be made + add link to "Marking Shortcut Keys * update icon size to "1cm" * update to <h1>,<h2>, <relatedtopics> Change-Id: I9e65002236d7cf006df36b7e7ed4881658ab89cc Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107212 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2020-12-06tdf#125957: FIREBIRD Datatype Binary(fix)[CHAR] couldn't be filled with contentJulien Nabet
Really use sCharsetName which is xRow->getString(13) trimmed See commit bf662904c4b60e93c6b86e06288d41996eed12a2 Author: Tamas Bunth <tamas.bunth@collabora.co.uk> Date: Sat Dec 16 12:57:43 2017 +0100 tdf#104734 Firebird: Add Binary (fix) type There is no explicit binary type in Firebird. It can be accomplished using the CHAR type with a special character set, which tells the database that it is binary data and there is no collation. (called OCTETS). Because of that, we also need the character set to decide the exact column type. And also refactor some parts of the driver: - Create class to determine internal type from firebird type, subtype, scale and character set. - Use internal type (DataType::XXX) in XDatabaseMetaData::getTypeInfo() indirectly. (We want to return a Firebird type for each internal type, not in the opposite direction. Change-Id: I3c9c764d353eeead5e8c00f1142846725eecce15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107280 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2020-12-06SwFormatFootname: Modify no moreBjoern Michaelsen
Change-Id: I0617605a078aa10fc57bade9f6943138183bb591 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107274 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06SwFormatRefMark: Modify no moreBjoern Michaelsen
Change-Id: Ic27ae029740909d229a9a6ce03b0a9b8b88b55c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107275 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06fastparser in XMLTextFrameContext_ImplNoel Grandin
Change-Id: I69ca9141ccbedeb92909c782dcacd791d3517c2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-06SwSectionFormat: Call SwFrameFormat::SwClientNotify instead of ::ModifyBjoern Michaelsen
Change-Id: Ic24002ed519b120e83df117fccd76f49753bd3a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107272 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06SwTextRuby: Modify no more (also make it final along the way)Bjoern Michaelsen
Change-Id: I3c5eee9f9205347456f1a51338243276c1cb2b8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107271 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06SwCallMouseEvent: Modify no moreBjoern Michaelsen
Change-Id: Ib15db54d8b3be64fbe37a4eb723bd97172a5b2a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107269 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06SwDDETable: Modify no moreBjoern Michaelsen
Change-Id: I6b9bd54835ba6abc4ab9184c49c684d9c387bda4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107268 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06SwFormatPageDesc: Modify no moreBjoern Michaelsen
Change-Id: Id0f428ba8426f3ce32ceca3e14687e3b83999509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107267 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06Meta: Modify no moreBjoern Michaelsen
Change-Id: I14f53ca852042f8032fa18ac6b23fbe3ceea3e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107266 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-05Remove remaining bogus use of objc_msgSend()Tor Lillqvist
Follow-up to 5bf61e98b0746a4afeb68a80e54b4eb4bf4ea89f. Should avoid crashes when running as arm64 code on macOS on arm64. Change-Id: Id05d182684df82c8a7bf09f6bb7e8ccb01997b62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107259 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-12-05Fix crash or hang on macOS on arm64 when opening a file pickerTor Lillqvist
There is no reason to not mention the NSOpenSavePanelDelegate protocol that AquaFilePickerDelegate implements. The way we used objc_msgSend() caused a crash or hang. (I saw both, depending on whether the code was built for debugging or not). For some reason we used to cast it to a function with variadic parameters like: reinterpret_cast<id (*)(id, SEL, ...)>(objc_msgSend)( m_pDialog, @selector(setDelegate:), m_pDelegate); This does not work in arm64 code on macOS. (See https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code?language=objc , the "Don't Redeclare a Function to Have Variable Parameters" section.) We could have replaced the ellipsis with the actual type of the first real parameter in this call, or just "id" would have worked fine. But it is much simpler to just do what we mean directly: [m_pDialog setDelegate:m_pDelegate]; I need to look through the code for other places where we have used objc_msgSend() in a similar fashion. Change-Id: Ia93b2007ed8f263eaf99d604a3c88e857efbb421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107257 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-12-05fastparser in XMLTextFrameContextNoel Grandin
Change-Id: I1d0038546d47b850aecee9e3a675a44ce6c7c5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-05Silence cid#1470402 FB.DM_DEFAULT_ENCODINGStephan Bergmann
...where the default encoding should be the appropriate one for reading the Runtime.exec output Change-Id: Ib64bfcbcca985f2de506f8628b506e6dc7bfc035 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107255 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-05SwFrameFormat::Modify refactoringBjoern Michaelsen
- also refactor the function: * use switch-case instead of if-cascades * use typed GetItem and reduce casting - not move to SwClientNotify yet, because trivially doing that causes regressions Change-Id: I9cc8adc9a5cdacc8ee9d7e0c410398950bbeba84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107180 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-05fastparser in SdXMLTableShapeContextNoel Grandin
Change-Id: Ia27408ff3f640de942f42718e2ee497350f48785 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04no need to use GetLocalName hereNoel
Change-Id: Iafd55f0a7d12c6833cae82d49350a5642b637764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04fastparser in SdXMLChartShapeContextNoel Grandin
Change-Id: I06ad1abb3795dae9ddcc0d68e6ffb627c85fc039 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04call createFastChildContextFallback in more placesNoel Grandin
to make my fastparser work easier to manage Change-Id: If98592f016cd35ca13b48d9df363e32fb1095b55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107233 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04Fix ResourceWarning in pythonloader.pyJulien Nabet
trace: /home/julien/lo/libreoffice/instdir/program/pythonloader.py:146: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/julien/lo/libreoffice/instdir/share/extensions/numbertext/reg.uno.py' mode='r' encoding='utf_8'> mod = self.getModuleFromUrl( locationUrl ) ResourceWarning: Enable tracemalloc to get the object allocation traceback Change-Id: I106ab6c3c9024a8c1a4624a3b64958dc205e30e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107232 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04move some logic inside createFastChildContextFallbackNoel
Change-Id: I5e73b4b24e4782bb0740c0abd817b38b47c3e9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04Improve loplugin:stringview detection of unnecessary O[U]String constructionStephan Bergmann
Change-Id: Ia45119e11377e916a1e1deb5648ed9033c417d77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107228 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-04move ManagedMenuButton to vclCaolán McNamara
Change-Id: Ie2dd1635a5f5f677d286011a14b734af7435612a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107231 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04add a way to get an awt::XPopupMenu from a PopupMenuCaolán McNamara
Change-Id: Ia1cde3b60b71ed9e4d0b7dc8d9ad0b2899d60b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107229 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04ScriptForge: RootNode/CurrentNode for tree controlsJean-Pierre Ledure
RootNode returns the root node CurrentNode is for getting or setting a unique selected node Change-Id: Ie92761f57fe18b188769870ed7d2e0340a9e146c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107227 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-04fastparser in a couple of random placesNoel
Change-Id: I9c88c826cfffa71f389f78f9d18d46e097e540ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04create an awt::XPopupMenu the standard wayCaolán McNamara
Change-Id: If3349380d29ba56b5f61dc948a770ab2fe1fb671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107226 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04cid#1468696 Logically dead codeCaolán McNamara
bool bTryXlA1 = (eConv == FormulaGrammar::CONV_A1_XL_A1); if (...) eConv = FormulaGrammar::CONV_XL_R1C1; if (bTryXlA1 || eConv == FormulaGrammar::CONV_OOO) { if (...) { bExternalName = true; eConv = FormulaGrammar::CONV_OOO; } } if (!bExternalName && (bTryXlA1 || eConv != FormulaGrammar::CONV_OOO)) { if (...) { if (eConv == FormulaGrammar::CONV_OOO) { // this condition can only be reached if bTryXlA1 is true // but bTryXlA1 is only true if eConv was originally // CONV_A1_XL_A1. The only things eConv can be changed to // in this function are CONV_XL_R1C1 or CONV_OOO. If it // was changed to CONV_OOO then bExternalName was also // set to true and the block isn't entered if that is true } } } maybe an unconditional assignment of eConv = FormulaGrammar::CONV_XL_A1 is a better solution Change-Id: I45f9947c21662369474048acf2d648733a9b9a6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107076 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-12-04Unlock scheduler when calling ProcessEventsToIdleMike Kaganski
When processing the events, solar mutex will be temporarily released, and then it's possible that another thread will acquire solar mutex and try to lock scheduler. This will result in deadlock. Seen in CppunitTest_sw_core_undo that deadlocked locally on Windows frequently. Main thread call stack: win32u.dll!NtUserMsgWaitForMultipleObjectsEx() user32.dll!RealMsgWaitForMultipleObjectsEx() sal3.dll!osl_waitCondition(void * Condition, const TimeValue * pTimeout) Line 82 vclplug_winlo.dll!osl::Condition::wait(const TimeValue * pTimeout) Line 120 vclplug_winlo.dll!SalYieldMutex::doAcquire(unsigned long nLockCount) Line 159 comphelper.dll!comphelper::SolarMutex::acquire(unsigned long nLockCount) Line 87 vclplug_winlo.dll!ImplSalYieldMutexAcquireWithWait(unsigned long nCount) Line 204 vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 163 vclplug_winlo.dll!WinSalTimer::ImplHandle_WM_TIMER(unsigned __int64 aWPARAM) Line 197 vclplug_winlo.dll!SalComWndProc(HWND__ * __formal, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 638 vclplug_winlo.dll!SalComWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 665 user32.dll!UserCallWinProcCheckWow() user32.dll!DispatchMessageWorker() vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 426 vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 457 vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 528 vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 447 vcllo.dll!Application::Reschedule(bool i_bAllEvents) Line 461 vcllo.dll!Scheduler::ProcessEventsToIdle() Line 466 vcllo.dll!Scheduler::ImplDeInitScheduler() Line 129 vcllo.dll!DeInitVCL() Line 483 vclbootstrapprotector.dll!`anonymous namespace'::Protector::~Protector() Line 34 vclbootstrapprotector.dll!`anonymous namespace'::Protector::`scalar deleting destructor'(unsigned int) cppunitd_dll.dll!CppUnit::ProtectorChain::pop() Line 56 cppunitd_dll.dll!CppUnit::TestResult::popProtector() Line 197 cppunittester.exe!`anonymous namespace'::ProtectedFixtureFunctor::run() Line 332 cppunittester.exe!sal_main() Line 473 cppunittester.exe!main(int argc, char * * argv) Line 380 cppunittester.exe!invoke_main() Line 79 cppunittester.exe!__scrt_common_main_seh() Line 288 cppunittester.exe!__scrt_common_main() Line 331 cppunittester.exe!mainCRTStartup() Line 17 kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Clipboard thread call stack: ntdll.dll!NtWaitForAlertByThreadId() ntdll.dll!RtlpWaitOnAddressWithTimeout() ntdll.dll!RtlpWaitOnAddress() ntdll.dll!RtlpWaitOnCriticalSection() ntdll.dll!RtlpEnterCriticalSectionContended() ntdll.dll!RtlEnterCriticalSection() sal3.dll!osl_acquireMutex(_oslMutexImpl * Mutex) Line 66 vcllo.dll!osl::Mutex::acquire() Line 57 vcllo.dll!SchedulerMutex::acquire(unsigned long nLockCount) Line 213 vcllo.dll!Scheduler::Lock(unsigned long nLockCount) Line 237 vcllo.dll!SchedulerGuard::SchedulerGuard() Line 60 vcllo.dll!Task::~Task() Line 660 vcllo.dll!Timer::~Timer() Line 61 vcllo.dll!Idle::~Idle() svxcorelo.dll!SdrPaintView::~SdrPaintView() Line 189 svxcorelo.dll!SdrSnapView::~SdrSnapView() Line 200 svxcorelo.dll!SdrMarkView::~SdrMarkView() Line 193 svxcorelo.dll!SdrEditView::~SdrEditView() Line 125 svxcorelo.dll!SdrPolyEditView::~SdrPolyEditView() Line 58 svxcorelo.dll!SdrGlueEditView::~SdrGlueEditView() Line 40 svxcorelo.dll!SdrObjEditView::~SdrObjEditView() Line 95 svxcorelo.dll!SdrExchangeView::~SdrExchangeView() svxcorelo.dll!SdrDragView::~SdrDragView() Line 65 svxcorelo.dll!SdrCreateView::~SdrCreateView() Line 200 svxcorelo.dll!SdrView::~SdrView() Line 159 swlo.dll!SdrView::`scalar deleting destructor'(unsigned int) swlo.dll!std::default_delete<SdrView>::operator()(SdrView * _Ptr) Line 2537 swlo.dll!std::unique_ptr<SdrView,std::default_delete<SdrView>>::~unique_ptr<SdrView,std::default_delete<SdrView>>() Line 2649 swlo.dll!SwDrawFrameFormat::MakeGraphic(ImageMap * __formal) Line 7491 swlo.dll!OutHTML_FrameFormatAsImage(Writer & rWrt, const SwFrameFormat & rFrameFormat) Line 1746 swlo.dll!SwHTMLWriter::OutFrameFormat(AllHtmlFlags nMode, const SwFrameFormat & rFrameFormat, const SdrObject * pSdrObject) Line 507 swlo.dll!SwHTMLWriter::OutFlyFrame(unsigned __int64 nNdIdx, long nContentIdx, HtmlPosition nPos, HTMLOutContext * pContext) Line 401 swlo.dll!OutHTML_SwTextNode(Writer & rWrt, const SwContentNode & rNode) Line 2509 swlo.dll!SwHTMLWriter::Out_SwDoc(SwPaM * pPam) Line 834 swlo.dll!SwHTMLWriter::WriteStream() Line 471 swlo.dll!Writer::Write(SwPaM & rPaM, SvStream & rStrm, const rtl::OUString * pFName) Line 272 swlo.dll!SwWriter::Write(const tools::SvRef<Writer> & rxWriter, const rtl::OUString * pRealFileName) Line 861 swlo.dll!SwTransferable::WriteObject(tools::SvRef<SotStorageStream> & xStream, void * pObject, unsigned long nObjectType, const com::sun::star::datatransfer::DataFlavor & __formal) Line 823 vcllo.dll!TransferableHelper::SetObject(void * pUserObject, unsigned long nUserObjectId, const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 879 swlo.dll!SwTransferable::GetData(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 619 vcllo.dll!TransferableHelper::getTransferData2(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 389 vcllo.dll!TransferableHelper::getTransferData(const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 287 vclplug_winlo.dll!CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 516 vclplug_winlo.dll!CXTDataObject::renderSynthesizedFormatAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 419 vclplug_winlo.dll!`CXTDataObject::GetData'::`1'::catch$1() Line 269 vcruntime140_1d.dll!_CallSettingFrame_LookupContinuationIndex() Line 98 vcruntime140_1d.dll!__FrameHandler4::CxxCallCatchBlock(_EXCEPTION_RECORD * pExcept) Line 1367 ntdll.dll!RcConsolidateFrames() vclplug_winlo.dll!CXTDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 261 vclplug_winlo.dll!CXNotifyingDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 86 ole32.dll!HandleFromHandle(IDataObject * pDataObj, tagFORMATETC * pformatetc, tagSTGMEDIUM * pmedium) Line 2048 ole32.dll!RenderCurrentFormat(HWND__ * hClipWnd, unsigned int cf, tagSTGMEDIUM * pmedium, IDataObject * pDataObj) Line 4057 ole32.dll!RenderFormat(HWND__ * hClipWnd, unsigned int cf, IDataObject * pDataObj, void * pvMTADataObject) Line 4191 ole32.dll!ClipboardWndProc(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 683 user32.dll!UserCallWinProcCheckWow() user32.dll!DispatchClientMessage() user32.dll!__fnDWORD() ntdll.dll!KiUserCallbackDispatcherContinue() win32u.dll!NtUserGetMessage() user32.dll!GetMessageW() vclplug_winlo.dll!CMtaOleClipboard::run() Line 654 vclplug_winlo.dll!CMtaOleClipboard::oleThreadProc(void * pParam) Line 676 ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97 kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Main thread hold solar mutex when it locked scheduler in ImplDeInitScheduler; then it released solar mutex in WinSalInstance::DoYield, and finally tried to acquire it again in WinSalTimer::ImplHandleElapsedTimer. At the same time, clipboard thread acquired solar mutex in TransferableHelper::getTransferData2. Then it attempted to lock scheduler in Task::~Task. Change-Id: I2ac87c8ac298104043f5b9b5d6760bea0f408f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107218 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-12-04weld writer's FrameControl MenuButtonsCaolán McNamara
Change-Id: I507b043672ffd102f85110bed221a05b756500db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>