summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2020-11-10Don't use arbitrarily truncated pre-calculated constantMike Kaganski
Change-Id: I384151afacb83790f707f9b05e0142234e6e1adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105467 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-10Evaluate command: tdf#109338dante
Adds evaluate command. It's visible from UI as a bracket. Example: evaluate { {1} over {%sigma sqrt{2%pi} }func e^-{{(x-%mu)^2} over {2%sigma^2}} } from { -infinity } to { +infinity } = 0 In order to make the mathml part, several changes had to be mad: - Allow mathml to correctly identify the math token for opperators - Allow mathml to correctly identify the math token for fences - Since improvements where made on token recognision, visitors to string can now be lighter ( removing long long switch ) - Improving the import / export to mathm - LO says it mathml 2, but actually is something between 2 and 3 - Allowing mfenced ( mathml 2.0 ) to stayl 3 adding the missing data ( prefix and postfix ) - Be able to know if we are opening or closing brackets - lrline and lrdline commands hidden on UI. - They are they own open close - If prefix and postfix are missing meaning of the expression may change, however that's the user problem. - The problem resides in the fact that MS_VERTLINE is uses for lline and rline. - The problem resides in the fact that MS_DVERTLINE is uses for ldline and rdline. - Changing frac priority from 0 to 5, if not { frac 1 2 frac 1 2 } fails ( found while testing ) - The mathml testing was made with highter standars than qa tests, however there are no guarantees. - Added xml tokens needed for math - Added starmathdatabase. Will grow in the future. The point is avoiding long lists and swtches inside code. Added it command for hidden or implicit product ( like &it; in mathml ). Oppens path for tdf#66200. Note that about this issue there is only one line on the parser. The mathml implementation will be made later when LO will allow chars with &charname;. Change-Id: If24b40c2420d39498693944f13a02985f997dd23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-08only colors are in use so reduce down to just thoseCaolán McNamara
Change-Id: I757a0f2e7baa981ecb3cad7e0f975e3ae9c509b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105414 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06drop some unused sidebar theme properties and enumsCaolán McNamara
Change-Id: I6f5aa8e43f6f3fa5df530f9d73d64faf9152e85b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105406 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06loplugin:unusedfieldsNoel
Change-Id: Ib360179887572ec55245d7892651eaf7113ed3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06loplugin:unusedmethodsNoel
Change-Id: Ia6c0361cd793bb62905b0690f7e2ca554019e935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06pdfium: add FPDFBitmap_GetBuffer/Stride wrappersMiklos Vajna
Change-Id: I7013e0870868017f72a8053bfe53491504f811e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105379 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-05use XGraphic instead of ImageCaolán McNamara
we don't appear to use the Icon in our own code, though there may be a route to set it from an extension or via config Change-Id: I5e169db6335a8e64aeb3d2e6672f5a4b7c65c57f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105309 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-05loplugin:unusedenumconstantsNoel
Change-Id: I9a2eb83647d6620b3c5b5ed5642227be47a657f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105303 Tested-by: Jenkins Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05INPUTENABLE is unusedNoel
since commit be3b1a8393ca3e77f31bea5d9caa7271fd53e9e4 Author: Caolán McNamara <caolanm@redhat.com> Date: Mon Aug 17 17:28:58 2020 +0100 weld OAppDetailPageHelper Change-Id: I97afdbd536c587a360b8f72b9faca71e8fa32ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105306 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05N8BitTcMask is unusedNoel
since commit 77809fba7d4bf5e0b604ffa3937c18d5530c2d56 Author: Luboš Luňák <l.lunak@collabora.com> Date: Fri Oct 9 19:28:49 2020 +0200 implement ImplFastBitmapConversion() for 8bit gray source Change-Id: I730aef10c1705ae6d3141014228cf79b8bfa3c63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04Fix typosAndrea Gelmini
Change-Id: I8a7a313b54aafc5347e00c5afec4648e09dbc981 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105295 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-04remove pimpl from PropertySetHelperNoel Grandin
Change-Id: I20e72b5927d64a69aacd3d4de117a7736d53eea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04negative returnsCaolán McNamara
Change-Id: I6f710f1aecc2e242b6006a3360e31bf2a9438fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105286 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-04remove pimpl from NamedValueCollectionNoel Grandin
Change-Id: I134e5fd78a3861e0067b749d93643960205daf69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04loplugin:constantparamNoel
Change-Id: Ia2fea86f940d0d2d1dba5ed56660584f3d3fb028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04remove pimpl in PropertyBagNoel Grandin
Change-Id: Ibf34c0d9a3090c190a63f63ba9bd661263aebae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04external: update pdfium to 4306Miklos Vajna
Change-Id: Ic10cf99fa412f8f0b3475e82d0a1839a7f04bd08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105272 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-04loplugin:unusedmethodsNoel
Change-Id: I58fb6477222a26455f5db0a7d972c46f290c085c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03Resolves tdf#137059 - Use application colors for font previewHeiko Tietze
Background is set to document's application color now (options > application colors > document) to provide a true WYSIWYG experience (except for modifications to the page background color). Change-Id: Ifd78e667f3eeff3573ff09bcb4d2a9634dd49c99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105011 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03remove pimpl in SfxBroadcaster/SfxListenerNoel Grandin
and provide an optimised copy constructor, we can avoid a bunch of work. Change-Id: I3a373fbbfab02455e6a65e9036b3629366174379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105205 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03loplugin:unnecessaryvirtualNoel
Change-Id: I71c49cb66177547ce6f5bd4ab702c7d9d358a426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03ucbGet needs a non-null interaction handler after allStephan Bergmann
In db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of cURL to download https files", I had not further investigated why using the (GUI) interaction handler within utl::UcbStreamHelper::CreateStream would lead to deadlock during UITest_sw_options (UITEST_TEST_NAME=optionsDialog.optionsDialog.test_moreIconsDialog). Instead, I had passed a null XInteractionHandler into utl::UcbStreamHelper::CreateStream, assuming that would solve whatever the issue was (and it did make the UITest pass). However, that caused the AdditionsDialog to not be populated at all, with > warn:cui.dialogs:26878:26950:cui/source/dialogs/AdditionsDialog.cxx:95: Reading <https://yusufketen.com/api/Templates.json> failed with 0x20d(Error Area:Io Class:General Code:13) (see comment at <https://bugs.documentfoundation.org/show_bug.cgi?id=137922#c1> "Extensions button in Template choose does not show anything"), because interaction requests like com.sun.star.ucb.CertificateValidationRequest were not handled properly. As it turns out, the real reason for the deadlock was that the UITest quickly closes the dialog, causing the main thread to block at m_pSearchThread->join(); in ~AdditionsDialog waiting for the SearchAndParseThread to finish, while SearchAndParseThread::execute encountered a CertificateValidationRequest that needs to be handled and thus blocks in UUIInteractionHelper::handleRequest (uui/source/iahndl.cxx) waiting for the main thread to process the PostUserEvent. In an ideal world, the UCB would allow to cancel the download request issued from ucbGet while that download is waiting for the CertificateValidationRequest to be handled, and the AdditionsDialog CloseButtonHdl would initiate such cancellation. Lacking that, just keep the Close button disabled until the SearchAndParseThread has finished downloading. (Pressing the Close button earlier, ~AdditionsDialog would have blocked the main thread anyway until SearchAndParseThread had finished downloading, so this should not actually worsen the user experience. And the UITest now blocks waiting for the Close button to become enabled before pressing it; there would already be UITest.wait_until_property_is_updated available, but it has a hard-coded timeout which might or might not be relevant in existing uses of that function, so leave it alone and repeat the relevant code without an unhelpful timeout here.) This means that the additional utl::UcbStreamHelper::CreateStream overload introduced in db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of cURL to download https files" is not necessary after all, so remove it again. Two further items that should be looked into: * Should ucbGet pass the AdditionsDialog into utl::UcbStreamHelper::CreateStream as css::uno::Reference<css::awt::XWindow> xParentWin argument (which defaults to null)? * There might be similar deadlock issues involving ucbDownload, which can also be called (indirectly) from SearchAndParseThread::execute. Change-Id: I8d549066940fa4f259a814a31ec7c62960e0db8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105169 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-03tdf#105967 sw change tracking: fix line break symbol in empty lineLászló Németh
At line break symbol of inserted or deleted empty lines, paint strikeout/underline based on redline color. Keep also the underline and strikeout formattings of the line break symbol in neutral color (NON_PRINTING_CHARACTER_COLOR), if they are not affected by change tracking. Note: in non empty lines, remove also the colored (not NON_PRINTING_CHARACTER_COLOR) underline/strikeout, if it's not based on redlining, fixing the double colored lines on the neutral color line break symbol. Follow-up of db25f1e2e3ae7a078f8f3c080ff3c4802f83b853 (tdf#105967 sw change tracking: fix pilcrow in empty line). Change-Id: I565a10154f5ecbefeb00fe3e17a53f74f2f84e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105206 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-02create common macro and method for logging unknown attributesNoel
instead of repeating the code everywhere Change-Id: Idb94054b392ed256e64259cdb17d1522bf3c52b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02drop the SvXMLExport::EndElement method..Noel
in favour of just using the endFastElement() method Change-Id: Id95abb0b9e78bc44278c5e9e3cc8dee15185e2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02drop the SvXMLExport::Characters method..Noel
in favour of just using the characters() method Change-Id: Iecb2773d488fcf4fa3c2202d0e889015a288fe2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105174 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02Better types for SystemGraphicsData::hDrawable, cairo::X11SysData::hDrawableStephan Bergmann
Both apparently only hold X11 Drawable values. But include/vcl/sysdata.hxx does not include the X11 include files that would define Drawable, so use sal_uIntPtr there, which is also used for other similar SystemEnvData and SystemParentData aWindow members there. Change-Id: Ia136ad1937e2009eb409c3ef8cc41dc81bd338a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105156 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-02missing includeStephan Bergmann
Change-Id: I145d1719728504af1459c1fa1a010cdac9c09956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105158 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-02toolbox always has flat styleNoel Grandin
ever since commit c1cd6af623e86b5b1b45f9d09dc17d6fbb907f02 Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Mon May 10 14:51:02 2004 +0000 INTEGRATION: CWS nwf (1.64.66); FILE MERGED 2004/03/31 09:28:33 ssa 1.64.66.1: #i25130# force flat toolbox buttons except for a completely and utterly undocumented hack of a registry key, introduced in commit 736dc0956a50315ec72ad126406556657a750d37 Author: Rüdiger Timm <rt@openoffice.org> Date: Thu Apr 17 14:19:46 2003 +0000 INTEGRATION: CWS vcl08 (1.57.2.4.18); FILE MERGED 2003/04/14 17:46:27 ssa 1.57.2.4.18.1: #108699# disabled flat toolbox buttons not exported anymore which only seems to apply to Windows. So just remove this. Change-Id: Idf315b8c89c3119883a5e6880d003d379fe6faec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02Resolves tdf#137813 - Status bar info 'PDF selected'Heiko Tietze
Change-Id: I60cc75dfe8e63d7d545211a9bf58efc9d34d51ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104996 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-11-02make SvXMLImport capable of mixing fast- and slow- contexts adhocNoel
so I can convert even *ImportContext subclasses in the middle of a context stack, and thus break the cyclic dependency nature of the writer import. and adjust the xmlimport loplugin for the new rules. As a consequence of the loplugin:xmlimport's checking, we remove a bunch of now unnecessary overrides of startFastElement. Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02use officecfg or MacroRecorderModeNoel Grandin
Change-Id: I2a8d4f401ddfd4368a7b50b4c3c8a72724f9afa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for ShowLinkWarningDialogNoel Grandin
Change-Id: I92a42eb2ff48bff4e635f1a37a25c8ecb9ac1347 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01cid#1468697 Uncaught exceptionCaolán McNamara
Change-Id: Ibc589c87356781b143088d4231a8c0a2a2671961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105143 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-01use officecfg for IsPluginsEnabledNoel Grandin
Change-Id: Id80ba8a87af7f87b8232949b70804b1a021b23d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105147 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for UseSystemFileDialogNoel Grandin
Change-Id: I1419af229a67d6ebb1cf2c63757656beb3f512db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105142 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for UseSystemPrintDialogNoel Grandin
Change-Id: I0e0bdc925f106884cbcede6405cc6ef7152ad405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for Experimental flagNoel Grandin
move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-31rename to NotifyContainsEmbeddedFontCaolán McNamara
to indicate better what its users do with this notification. This reflects better the reality that while the embedded font has been read at this point, vcl hasn't been informed of its existence yet. Change-Id: I87f4d0a0361192dac972f6146d3721a69e11ac27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105086 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30SidebarToolBox.hxx can be a private headerCaolán McNamara
Change-Id: I2367ef3912f3b84cdd0324b8e76598fc44a22874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105078 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30TNumberedItemHash NumberedCollection::m_lComponents is indexed on pointers...Stephan Bergmann
...reinterpret_cast'ed to sal_IntPtr, so consistently use sal_IntPtr throughout here Change-Id: If0085c2ac7e0e2c755ec034766095baa11a1b08c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105071 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-30convert some tools::Long->sal_Int32Noel
in places where it is obvious we only need a sal_Int32, because we are dealing with rows and columns, and not even calc needs more than 32 bits for that. Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-29tdf#137627 sw top page border orientation: add ODFSzabolcs Toth
Map between RelOrientation::PAGE_PRINT_AREA_TOP and loext:vertical-rel="page-content-top". Follow-up of commit 1c593e1916c9164c7db71da2017cfc26972f8e9f (tdf#133045 sw: add shape alignment to the top page border). See also commit 65b7873aab5deec7157328047e869a6385e0a74a (sw from-bottom relative orientation: add ODF filter). Change-Id: I9bff7a9507152262dda7d126fa3e7e1bee6a8276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104554 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-29tdf#137643 alternative solution to activate embedded fonts in one batchCaolán McNamara
Change-Id: Ib5ffb2b8a31f237d5d2e465bf3f777590e0bfade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104947 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-29Use the underlying type of char16_tStephan Bergmann
Change-Id: I5f48f1f3dc379cc57cfeac473f80bec4c4bc38af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28tdf#137643 Revert "lock refreshing font data when loading a document"Caolán McNamara
from tdf#69060, to replace with an alternative solution This reverts commit 98d71c4e0847797a4ba9229a8e6d832a8a3d5e0f. and This reverts commit 64d8e5f8db70f4f913abb902b41f4cff8dd1cdad. Change-Id: I384e994b54aa1bfc735c6ab591b9b1410058451f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104716 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-28tdf#123476 filter: try to detect 0-byte files based on extensionMiklos Vajna
A 0-byte ("empty") pptx file is obviously junk input, so it's not surprising if the catch-all generic_Text filter is chosen to open it in Writer at the end. But we can do better: if we really get an empty file URL with an extension we can recognize, that we can fake the filter type / filter name, so the empty "presentation" opens in Impress, and also a re-save works as expected. This builds on top of commit 8a201be240b6d408d15166be7ffc576b9e123634 (fdo#68903 Import .tsv and .xls plain text files in Calc by default, 2013-10-27), just the new way works for all supported file extensions and also with filters which would not handle empty input (e.g. pptx refuses the import if the ZIP storage is broken). Change-Id: Ie01650a5eb6ca42c35e090133965467b621bb526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104939 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-28Use UCB instead of cURL to download https filesStephan Bergmann
Since 7dc6fc32eb618da6defb8a9f330978fa019677b8 "uitest: Check the more icons dialog opens" started to test the AdditionsDialog code, some ASan builds started to report use-after-poison from within SearchAndParseThread::execute -> curlGet -> curl_easy_perform -> ... -> https_connecting -> ... -> secmod_ModuleInit -> pemC_Initialize -> ..., see the comments starting at <https://gerrit.libreoffice.org/c/core/+/98226/ 10#message-2a55980ab2477e41dc7515e4aeabc7234afc2053> "tdf#133026: Tight integration of extensions - Adding thread structure". The exact cause for that ASan use-after-poison is not quite clear to me. First, I thought it was due to liberal use of curl_easy_init (without a central curl_global_init) in a multi-threaded process; see <https://curl.haxx.se/libcurl/c/curl_easy_init.html> for this being considered "lethal". But then, another issue could be that most of the nss libraries like instdir/program/libnss3.so (implementing the "... -> secmod_ModuleInit" part) come from LO's bundled --without-system-nss while /lib64/libnsspem.so (implementing the "pemC_Initialize -> ..." part) comes from the system, and there could be some mismatch when mixing these (esp. if the former are built with ASan). So whatever the actual cause, the right fix should be to use LO's UCB instead of directly calling into cURL anyway. That required a version of utl::UcbStreamHelper::CreateStream that uses a given XInteractionHandler (which may be null to indicate no interaction handling, instead reporting all interaction requests as exceptions) instead of internally creating an XInteractionHandler using the GUI, and which would cause deadlock in 7dc6fc32eb618da6defb8a9f330978fa019677b8's UITest_sw_options. (And introducing that additional utl::UcbStreamHelper::CreateStream overload required css::awt::XWindow to be a complete type now in vcl/source/graphic/GraphicLoader.cxx, for > include/com/sun/star/uno/Reference.h:277:18: note: in instantiation of variable template specialization 'std::is_base_of_v<com::sun::star::task::XInteractionHandler, com::sun::star::awt::XWindow>' requested here > std::is_base_of_v<interface_type, derived_type> > ^ ) (The removed code in cui/source/dialogs/AdditionsDialog.cxx should have been the last remaining use of curl in Library_cui. Apparently, e1e9e2aa16f08a8fd9e38db706d63e8eceeda8d1 "Kill Mozilla personas" had forgotten to remove it from cui/Library_cui.mk the last time Library_cui had become curl-free, before the introduction of the AdditionsDialog code.) (I did not remove the #undef ABSOLUTE FIXME from cui/source/dialogs/AdditionsDialog.cxx. c4bee547b02fbe3d07b1e9ee203c73e48f86e6bf "tdf#133026: Additions: Better Search Function" does not tell whether it had been added to mitigate a macro definition from the (now removed) #include <curl/curl.h>.) Change-Id: I1fec7488d36df81c3543d12d97da1291f77712fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>