summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-01-12xmloff: "form:datasource" vs. "db:data-source"Michael Stahl
Recently xmloff started to use XML_DATASOURCE for "form:datasource" but it actually means "data-source". Add XML_DATA_SOURCE and use it for "db:data-source". (regression from 3de38e95561ab7ca114d9f3307702ba89c4e3e9a) Change-Id: I893efd3fb0fb7c19ae998442459bf36cb1da0b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit db283d2e3f5cd8be412c5204f358cd06af761b13) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109000 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Michael Stahl <michael.stahl@allotropia.de>
2020-12-18Check intermediate for not to be rounded value, tdf#138360 follow-upEike Rathke
This is a combination of 3 commits. Add sal_uInt64 fields to sal_math_Double We may need them later, and at least don't have a confusing inf_parts or nan_parts struct name but just parts as well. Ife0cf279c47d2815aa2a1483223397b147e9d776 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107924 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins Replace log2() call with parts.exponent-1023, tdf#138360 follow-up ... to save some cycles as we anyway need only the integer value of the exponent and even exactly this value for the number of possible decimals. I8d462f53cadde6a95d57d1342d8487fbfa001ae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107928 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> Check intermediate for not to be rounded value, tdf#138360 follow-up I98cc25267e7a10c34179bab50d19f49436e1c48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107929 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> Change-Id: I98cc25267e7a10c34179bab50d19f49436e1c48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107931 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-12-17tdf#129961 svx: finish UI for table shadow as direct formatMiklos Vajna
Normally properties on an SdrObject is set using SetAttributes(), but that would take the selection controller into account, so we would call SvxTableController::SetAttributes(), which sets the item set on the selected cells instead. So use SetAttrToMarked() instead, which works on the shape's item set, even in the table case. Don't replace all existing items because we only have shadow properties here and also a disabled shadow is still a (set) SdrOnOffItem (with value=false), so no old SdrOnOffItem will be forgotten in the shape's item set. Also add an outer undo grouping, so once the user presses OK in the table properties dialog, we only create a single user-visible undo action, not two. (cherry picked from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab) Change-Id: I77b55ba1f07b8d0eeac5070e0ec07d39573d1f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107864 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-11tdf#129961 svx: add doc model xml dump for shadow-related pool itemsMiklos Vajna
It seems that sdr::table::SdrTableObj is already capable of storing shadow properties, but this is not easy to inspect, extend the xml dumper to improve the situation. Change-Id: Ideef43dfd6b844e0227632ec2cb6ab5d16171d8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106902 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit a7505356872f981c951b2ec64383a95538890876) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107563
2020-12-10Resolves: tdf#138789 disable widgets on 'none' when status changesCaolán McNamara
instead of when chage is dispatched, the chart case has its own dispatcher that disables the base class one. This fixes the reported problem, and the related problem of updating when moving focus from one line that has style 'none' to one that doesn't, and vice-versa, where no change is dispached on received on context change Change-Id: I6afb396e75ba93c13fcae71c52618cfce7f9cecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107525 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-10tdf#41466 DOCX import: fix VML v:shape/v:textboxRegényi Balázs
VML v:shape/v:textbox element was imported only as a text frame, losing (otherwise recognized) preset shape geometry, i.e. replacing a callout bubble (wedgeRectCallout) and other special shapes with a plain rectangle. Thanks to Attila Bakos for the initial help. Change-Id: I03a608822ed54a20ed07406a08c3539e72958f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105299 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit bda05ba17362222b74727872579b65b3fa14e3d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107486
2020-12-09tdf#138778 add has_child_focus which considers a related popup a 'child'Caolán McNamara
Change-Id: Iab23e399f2650ece702fb1f62d1387acca472b42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107480 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04include cstddef for gcc11Jeff Law
Change-Id: I2f845ce9bb660ad6c1eea80ea81dd71add2c0db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107203 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-03tdf#107870 sw: don't jump to cursor setting Record ChangesLászló Németh
Using Edit->Track Changes->Record or Record Tracked Changes on Track Changes toolbar scrolled the pages back to the text cursor, breaking the review process of the document. Change-Id: I890e845ff94b636dd6edae19969d913e8d7a7b65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107005 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 1fd0919d92e792fa4af209a0fc7fde55c9958d1a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107103 Tested-by: Jenkins
2020-12-03Add 'SinglePrintJobs' to PrintOptionsSamuel Mehrbrodt
So that this option can be set via UNO API Change-Id: I0b69162661a4327d59aaed82d5eff98cb50d852c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106593 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 2e2c162b7a816d990415fca434e6d3d5600b2858) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106677 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-12-02tdf#138427 focus set to wrong input boxCaolán McNamara
Change-Id: I4c1d3aa720f280f0ec1a3764d55f1d95ebd3180d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106950 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-01cid#1470362 Uninitialized scalar fieldCaolán McNamara
Change-Id: I8828b7e098c1af9411b15b449f425242f5e64635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106972 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-01add ThreadPool::isIdle() to avoid incorrect detection of "no tasks"Luboš Luňák
Tasks that are being worked on but are not yet finished are removed from maTasks, so maTasks.empty() does not mean "idle". I fixed one case already in 2ad4e77a0f266ae6e6fccaebb1d080d2880bdac3, this one fixes joinAll() which has a similar problem and triggers https://gerrit.libreoffice.org/c/core/+/69473/3/sc/source/core/data/documen2.cxx#312 Also rename joinAll() to joinThreadsIfIdle(), as that's what it really is. Change-Id: I8129cfadb81be968575ea8718de9ae997b877a4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106701 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 583b0612696f42571ac97b66c159570ea452fe17) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106824
2020-11-24Remove unused ScrollBarBox from tabpageSamuel Mehrbrodt
This displays an empty rectangle at the upper left of the tabpage. Change-Id: I8424a3f8ec4896814b135aa2c86012f0b33ee1be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106480 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 6df0e538ff05b98e1123c5ad1d77f554007bff12) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106440 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-11-24tdf#138430 schedule a reformat if we turned off the scrollbarCaolán McNamara
Change-Id: Ida7d7419f0513624071b31820660add93ac78615 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106445 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-23Copyedit: “Fontwork” is uncountable, “be sure” ≠ “make sure”, ↵Adolfo Jayme Barrientos
“in order to” redundant (cherry picked from commit ab97fe1b9b988936bf96b198387eaf3ff00fed61) Similarly, the proper noun “SmartArt” shouldn’t be pluralized This completes commit ab97fe1b9b988936bf96b198387eaf3ff00fed61. (cherry picked from commit 750e3b2118cd5bdfe2ee6fdfb092255b9c6db728) Change-Id: I0f361823d7f9af5de4e8c62011f66d59670346d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106394 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-11-21sfx2: lok: reliably support multi-documentsAshod Nakashian
Instead of using the current view to set the DocId, we instead make sure that the ShellView object has the DocId set at construction time. This turned out to be necessary in at least one case (which has a unit-test that failed), which is when events fired during the creation of a new view. The cursor position is notified before we have a chance to set the DocId and because of that we miss the notifications (or worse, we end up sending them to all other documents' views in an effort to fix this bug). This approach is clean and always guarantees that all views have the correct DocId set as soon as possible and that all notifications are sent as expected. A unit-test is added to exercise mult-document usage, which exposed a number of bugs and issues that have been addressed in this patch. Change-Id: Icf5145fb1dabd0d029368310c2b9bf73ae927ccc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99975 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106252 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-11-21remove some prefix and local params from constructorsNoel Grandin
Change-Id: Iaffbefe98ced97610b99a00b1b3011c6a79a7859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106300 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-21Relax non-null requirement for some rtl_uString_* functionsStephan Bergmann
...that take a pointer and a length, and where it should be OK that the pointer is null if the length is zero. Those rtl_uString_* functions are targets of OUString member functions that take std::[u16]string_view arguments, and 19926ed35ebb623fc896942b1f232b83edf1fc1e "loplugin:stringview: Flag empty string converted to string view" (which changed some call sites to pass in default- constructed std::[u16]string_view, for which data() returns null) revealed that those rtl_uString_* functions were not prepared for such input. (The guardings of memcpy are necessary because memcpy still requires its pointer arguments to be non-null, even if the corresponding length is zero.) The new sal/qa/rtl/strings/test_strings_defaultstringview.cxx systematically tests all O[U]String[Buffer] member functions taking std::[u16]string_view arguments. It revealed one further issue in IMPL_RTL_STRNAME(compare_WithLength), where UBSan reported a nullptr-with-nonzero-offset > sal/rtl/strtmpl.cxx:149:9: runtime error: applying non-zero offset 18446744073709551614 to null pointer Also, rtl_uString_newReplaceFirstUtf16LUtf16L was found to lack a check for its `from` argument to be non-null. Change-Id: I6a7a712570f7d1e8d52097208c8a43a5a24797af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106295 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-21Changes to the color classdante
Before colors could be only converted to string rrggbb. Now also supports RRGGBB. It can also be converted back into a color. Change-Id: Ifb89d554b434c243c4f0956ee680ec23de823339 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-21fastparser in XMLEventsImportContextNoel Grandin
Change-Id: Ifeeb2220ec6dfe6ec91f238137796d7d9e517465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-20move RadioButton to be toolkit onlyCaolán McNamara
Change-Id: Ie548ad3c471745297242a390fd2e500fa699de19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105836 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-20weld TabBarCaolán McNamara
Change-Id: I698f4dfc64bfa9bc4896111757616b4051b10293 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-20SvStream::{Tell,TellEnd,remainingSize} all return sal_uInt64Stephan Bergmann
...so use that type where appropriate here Change-Id: I3e419457bc04b5908128bad04eb16c72052d2ebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106267 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-20sfx2: lok: refactor notifications and const correctnessAshod Nakashian
This reduces the stringification and reuses the notificaiton helpers to reduce code duplication. Change-Id: Icf9f9c50f3eeee61a0ded741d39fed37cfcc8da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99972 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106221 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-11-20Lengths passed into the SvxMSDffManager::Get*Data functions are all sal_uInt32Stephan Bergmann
(i.e., rLength obtained from SvxMSDffManager::ReadCommonRecordHeader) Change-Id: I04b51cb7e6cb771d89d07a86c00ee9fdaa72aaa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106176 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-20tools::Polygon::Clip() is broken with bezier curves (tdf#137068)Luboš Luňák
It preserves the points, but not the flags. Work this around by temporarily converting to B2DPolygon, where it works. Change-Id: I120264fbc4c7c508386f23a06435891199565aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106188 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-11-20tdf#138108 terminate on uncaught exception in a11y callbackCaolán McNamara
#1 0x00007ffff5d3fafe in accessibility::AccessibleContextBase::ThrowIfDisposed() (this=0x85de440) at editeng/source/accessibility/AccessibleContextBase.cxx:513 #2 0x00007ffff5d3fbee in accessibility::AccessibleContextBase::getAccessibleParent() (this=0x85de440) at editeng/source/accessibility/AccessibleContextBase.cxx:203 #3 0x00007fff999cad24 in SwAccessibleMap::DoInvalidateShapeSelection(bool) (this=0x687e610, bInvalidateFocusMode=false) at sw/source/core/access/accmap.cxx:1647 #4 0x00007fff999cc5a5 in SwAccessibleMap::InvalidateShapeSelection() (this=0x687e610) at sw/source/core/access/accmap.cxx:1152 #5 0x00007fff999d78b0 in SwAccessibleMap::InvalidateCursorPosition(SwFrame const*) (this=0x687e610, pFrame=0x5a3faa0) at sw/source/core/access/accmap.cxx:2744 #6 0x00007fff9aae5c32 in SwViewShellImp::InvalidateAccessibleCursorPosition(SwFrame const*) (this=0x6594330, pFrame=0x5a3faa0) at sw/source/core/view/viewimp.cxx:345 #7 0x00007fff99b01fcd in SwCursorShell::UpdateCursor(unsigned short, bool) (this=0x6594840, eFlags=7, bIdleEnd=false) at sw/source/core/crsr/crsrsh.cxx:2020 #8 0x00007fff99b02db4 in SwCursorShell::EndAction(bool, bool) (this=0x6594840, bIdleEnd=false, DoSetPosX=false) at sw/source/core/crsr/crsrsh.cxx:279 #9 0x00007fff9a2249b2 in SwFEShell::SelectObj(Point const&, unsigned char, SdrObject*) (this=0x6594840, rPt=Point = {...}, nFlag=0 '\000', pObj=0x0) at sw/source/core/frmedt/feshview.cxx:323 #10 0x00007fff9b30eacb in SwWrtShell::UnSelectFrame() (this=0x6594840) at sw/source/uibase/wrtsh/select.cxx:326 Change-Id: I122d087b67c3615afb0c34aa714bc1066946c8c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106190 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-20pdfium: add a signature wrapper classMiklos Vajna
It just hides the underlying FPDF_SIGNATURE, no real member functions yet. Change-Id: I37d27c26d6f05b1f8c697a5afe682c795e5d4d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106184 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-20simplify CreateTableContextNoel
Change-Id: I1700d17d6f3aa29fcc4a1ea33d8d797e67c301d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106168 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19tdf#124176 use pragma once instead of include guardsRoman Kuznetsov
in /core/include/sfx2/sidebar Change-Id: I3ce7ccbd1e0e8e905c1f0eeefe1b17f4a2cd238f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106138 Tested-by: Jenkins Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2020-11-19Clean up GetHTMLColor "not found" valueStephan Bergmann
...after fe3dd6d831998dd5619ea223af04bc51f9294d2f "Changed return type of GetHTMLColor". (Clients had already been updated with 530df0b322f64fdcb08e9ef0b6ba944dd172ef60 "Changed return type of GetHTMLColor" and 463563853a81499de2259372755b00aa5ec246a7 "Changed return type of GetHTMLColor".) Change-Id: I1db842775a69bb3c0ff08dca152094d7b67ca221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-19fastparser in TokenContextNoel
Change-Id: I12c2af505d4bf19d94fb127cda2403f0b6618b07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19Clarify DdeData::GetExternalFormat return typeStephan Bergmann
The implementation (in svl/source/svdde/ddedata.cxx) returns any of: * {CF_TEXT=1, CF_BITMAP=2, CF_METFILEPICT=3} from the Windows API; * the return value of Windows API's RegisterClipboardFormatW, which is UINT from the Windows API (i.e., 32-bit unsigned int); * a enum SotClipboardFormatId value, whose underlying type is sal_uInt32. So the natural choice is sal_uInt32 here. (Windows API's UINT would also do, but cannot be used in include/svl/svdde.hxx, which is used on all platforms.) That in turn shows that DdeService's aFormats and HasCbFormat should also use sal_uInt32. (And then, simplify some of the std algorithms use in svl/source/svdde/ddesvr.cxx.) Change-Id: I593d0a7df78bfdd08ce2de04c3da2078d973e262 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106151 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-19tdf#138010 (IV) VclScrolledWindow: Use actual border widthMichael Weghorn
The frame drawn by 'DecorationView::DrawFrame' may use native drawing, in which case the frame may be wider than 1 pixel. Take that into account and calculate the frame width and resulting position/size of the scrollbars and child widget using the content rectangle returned when drawing the frame using 'DecorationView::DrawFrame'. This avoids that the child widget is drawn on top of the frame, which e.g. resulted in no visible border when using the Qt/KDE Breeze style, which has a frame width of 2, with the actual 1 pixel border being surrounded by a 1 pixel padding/margin, and the content being drawn on top of the 1 pixel border. With the child widget being drawn on top of the actual border, only the invisible padding was left where a visible border was expected. (The current implementation assumes that the same frame width is used on all sides, which matches the way Qt styles handle it, but could be further extended if necessary.) Change-Id: I44268728838406fc578774c0f4fcc167fb2798b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106157 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-11-19tdf#138010 (III) Extract VclScrolledWindow border width to varMichael Weghorn
commit 1fe4a1a76da8fd3c196ccd9529b01ee093516b25 Date: Fri Mar 30 13:30:38 2018 +0100 draw a border around scrolled window had added a 1 pixel border for scrolled windows. Extract the value for the border width (currently hard-coded to 1) to a variable. This will be extended to take into account the actual width of natively drawn frames in a follow-up commit. Change-Id: I2503105c42fae9eae66ec931d54c9d6883f83bf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106156 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-11-19Drop threshold for BigInt arithmetics from ImplLogicToPixel/ImplPixelToLogicMike Kaganski
Initially (since commit 8ab086b6cc054501bfbf7ef6fa509c393691e860) the code in vcl/source/outdev/map.cxx used BigInt arithmetics for overflowing cases. Then in commit 99a299383f2f16e5e8eefbb28e88a6a8f90ab95b, the code started to use sal_Int64, and ignored the threshold. Immideately in next day's commit 7bbb9d113a732851831dfadf8dee6b980dc0ab3b, the fallback to BigInt was restored - "when 64bit arithmetic does not suffice for mapping". Commit d563ac66ae12353c2c25d154fc9f493df67b3b8b made two modes - one using sal_Int64, and one using BigInt - separate (dependent on USE_64BIT_INTS), and introduced shortcut depending on threshold also into USE_64BIT_INTS code, dependent on SAL_TYPES_SIZEOFLONG ("#i55136# prefer native int math over int64"). BigInt code was dropped in commit b5100f8a1c76a921406ed3d3a54ba2479b011977. So now, after the functions take tools::Long, and it is 64-bit on _WIN64, it's incorrect to depend on SAL_TYPES_SIZEOFLONG for the shortcut. And making it dependent on sizeof(tools::Long) seems unnecessary, because now it's only active to 32-bit platforms with decreasing relevance, and the profit there is unclear, having to calculate threshold for each operation on all platforms. So this drops the threshold unconditionally, unifying the code on all platforms. If BigInt mode would be necessary, this should be reintroduced on all platforms, but for now we rely on 64-bit arithmetics, as we did before this patch. And while at it, replaced outdated uses of LONG_MAX/LONG_MIN with correct numeric limits for tools::Long, to avoid more BigInt operations. Change-Id: I8d6039c851d76712b391e754d3f78a97a8463f05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106121 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-19fastparser in SchXMLPlotAreaContextNoel Grandin
Change-Id: I77eab3ebacaca4c3327f60fac0970330fc9fe10b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106072 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19pdfium: add signature and trailer end getter wrappersMiklos Vajna
So PDFiumDocument::getPointer() can be retired. Change-Id: I77c34c3e263bd6f39e06e50f621f2eaff804c716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106079 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-19tdf#124176 use pragma once instead of include guardsRoman Kuznetsov
in /core/include/svtools/ Change-Id: Ic8614f77dfde02f4c1fc4cceccd1de4ff5a05f72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106006 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-19lok: remove unused APIAshod Nakashian
Change-Id: Ibf3039f0f5d8b580e8d93c77d7adb9c4b90ba67a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105365 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-11-18Remove unused GraphicObject::SetGraphic pCopyObj and rLink parametersStephan Bergmann
The defaulted pCopyObj parameter of the first SetGraphic overload became unused with ea3d755ac949c1b6dada5c341e018f8c23f5d395 "vcl: detach usage and remove GraphicManager and GraphicCache", and then the rLink parameter of the second overload became unused with e4eb416c3ef81d098ed61caabd2077cbbb2418bc "remove swapping and link from GraphicObject and Graphic" (removing the need to have two different overloads). Change-Id: I15a648845ed474ee302e2a9836776ba74b9c44a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106045 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18loplugin:stringviewparam: No good reason to exclude operator functionsStephan Bergmann
(at least not in general) Change-Id: I71337b53dc9735e90a37ee532d0a8a08797b518c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18Remove unused SdrGrafObj::SetGraphicLink rReferer, rFilterName parametersStephan Bergmann
unused since 9fb7aaf570c03c8a26d763f1205fb8c890e8211a "Make linked graphic register into LinkedManager again", and remove further function parameters and class members that turn out to be unused now, too Change-Id: I3dd2b138fd8787d12b89547526da751ea5954845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106041 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18Clarify signature of some opertor() that must match ColorSelectFunctionStephan Bergmann
Change-Id: Ibb71d1e993bbb0fa453c59f48ab5f7c79e1d8025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106036 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18vcl: clean up unused PDFDocument functionsMiklos Vajna
These are unused since the pdfium-based signature verification. Change-Id: Ie15369cbd0548febd03be3ac3475036e1f46cd16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106027 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-18fix XMLOFF_WARN_UNKNOWNNoel
since (doh!) having it as a function does not correctly log the actual caller source line information. Change-Id: Iae1007414259dea372f761765e090e1ed2ddbea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17Reuse ColorSelectFunction from colorwindow.hxx in PaletteManager.hxxStephan Bergmann
Change-Id: I86b9bf57cbb5ee7e2b0d189d6ff78a3fbc9145fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106021 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17Remove unused SfxFrameDescriptor::SetActualURL parameterStephan Bergmann
It got technically unused when e79e8117dcc7475d8d90afeaaac9eb7050ff244e "loplugin:unusedfields in sfx2" removed SfxFrameDescriptor::aActualURL, which in turn had apparently become unused over a series of commits cleaning up unused code. The function looks like a misnomer now, and it is not clear to me whether what it does is still useful (and whether or not all the clean-up that brought us here was actually good), but lets leave the remains as they are for now. Change-Id: I0479068176cc72193b2b44fc49d8fd3d71eadcb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106013 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>