summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2019-04-01Get rid of XclXmlUtils::ToOString(const OUString& s)Mike Kaganski
The helper function is used in export code to convert UTF-16 internal string representation to UTF-8 used in XML encoding. I suppose that all strings here should be already valid UTF-16 (an invalid input should have been validated at import/input stage). An invalid string at this stage means a programming error in another part of code that breaks this precondition, and should not be handled at export stage. This effectively changes flags used in conversion from UTF-16 to UTF-8, so that now RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR is used instead of RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT, so that the result would be truncated on invalid bytes instead of inserting U+FFFD, and would fail assertion in debug builds. Other changed flags don't affect UTF-16-to-UTF-8 conversion. Change-Id: I8b154249e66ee32b531b8ab503e0222b9108d829 Reviewed-on: https://gerrit.libreoffice.org/69830 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-01tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4a3baffa8944b522b16b50975185759081662020 Reviewed-on: https://gerrit.libreoffice.org/69945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-01tdf#45904 Move XElementAccess Java tests to C++Jens Carl
Move XElementAccess Java tests to C++ for ScSubTotalDescriptorBase. Change-Id: I49a599b3670e709ee3170fd62c4c06295645b278 Reviewed-on: https://gerrit.libreoffice.org/70040 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-04-01tdf#45904 Move XIndexAccess Java tests to C++Jens Carl
Move XIndexAccess Java tests to C++ for ScSubTotalDescriptorBase. Change-Id: I86f39c2ef5559f8b5ac4d45daeb6bcad1ab01c8c Reviewed-on: https://gerrit.libreoffice.org/70039 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-04-01Rename ScSubTotalDescriptorBaseObj to ScSubTotalDescriptorBaseJens Carl
Correct class name to mirror the name of the object we are testing against. Change-Id: If26dc045f67df7725043f1b0ccd0d3c8ba73f4ed Reviewed-on: https://gerrit.libreoffice.org/70030 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-04-01Add XServiceInfo tests to ScViewPaneObjJens Carl
Change-Id: I3764dd54f0ddb86166028a6c9c824e58ff0a88a6 Reviewed-on: https://gerrit.libreoffice.org/70029 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-04-01tdf#120703 PVS: Silence V522 warningsMike Kaganski
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48 Reviewed-on: https://gerrit.libreoffice.org/70017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-30tdf#45904 Move XFormLayerAccess Java tests to C++Jens Carl
Move XFormLayerAccess Java tests to C++ for ScViewPaneObj. Change-Id: I7ed6ff51d435b6f3de85daec99a13583e50a450a Reviewed-on: https://gerrit.libreoffice.org/69942 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-30Fix typoAndrea Gelmini
Change-Id: If908885fe642e0222f53d57e25ce9dab81bf27d5 Reviewed-on: https://gerrit.libreoffice.org/69973 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-30uitest for bug tdf#122509Zdeněk Crhonek
Change-Id: Ie8b53cc693421fd18901b73b911ac2e9e0533281 Reviewed-on: https://gerrit.libreoffice.org/69937 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-03-30uitest for bug tdf#123479Zdeněk Crhonek
Change-Id: I836ab17dbb6cbeaf62462cfac90d3c9ac1c890a9 Reviewed-on: https://gerrit.libreoffice.org/69940 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-03-29Remove now moot commentEike Rathke
That compiler workaround isn't necessary anymore since at least commit 9894f158a287bdfe9933df96ab117a9527e9195b CommitDate: Sat Apr 21 12:51:13 2012 +0200 simplify lifetime management of some variables that changed the array form to a simple instance. Change-Id: Ic11fa8422c0be62f24e2135298104123d23c8d2f
2019-03-29tdf#42949 Fix IWYU warnings in include/sfx2/[n-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia2bea9bd4775f4ed5ef0133971106a6c0bfdd1c0 Reviewed-on: https://gerrit.libreoffice.org/69896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-29tdf#45904 Move XNamed Java tests to C++Jens Carl
Move XNamed Java tests to C++ for ScSheetLinkObj. Change-Id: I64904ed6bae1b96767f8b0a65b0850a8694b10c2 Reviewed-on: https://gerrit.libreoffice.org/69907 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-29tdf#45904 Move XRefreshable Java tests to C++Jens Carl
Move XRefreshable Java tests to C++ for ScSheetLinkObj. Change-Id: I8225a3eb8be903ebcf51950431a5f6810a5aaa4f Reviewed-on: https://gerrit.libreoffice.org/69906 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-29tdf#45904 Move XShapes Java tests to C++Jens Carl
Move XShapes Java tests to C++ for ScDrawPageObj. Change-Id: I1b65e8ad685c3d387a5023e8e8e9b9e06627af11 Reviewed-on: https://gerrit.libreoffice.org/69904 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-28tdf#124286 fix annoying rounding error.Winfried Donkers
In case of ROUNDDOWN and ROUNDUP, it is possible that seemingly clear decimal values are rounded unexpectedly (from the user's POV). This is caused by the i decimal to binary to decimal conversions. By rounding to 12 significanr digits before calling the round-down of -up function, most of these unexpected roundings are eliminated. Change-Id: Ia19181383b77e1ff40a067c4a1cea1ece0955871 Reviewed-on: https://gerrit.libreoffice.org/69762 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-03-28tdf#120660: Populate rNewSharedRows even if no FC...Dennis Francis
at specified position. At least in case of ScUndoPaste, during undo operation, the content from changed area in main-document is removed before actual undo-paste, so when cloned formula-cell from undo-doc is inserted to main-doc, there is no "old" cell to detach, so "rNewSharedRows" is not populated which is needed for proper re-establishment of listeners if there are formula/ formula-groups adjacent to insertion position. Change-Id: Id2bfb65a2a7a5abb03effbdcc4405015fddc401c Next: fix the vector version of this case and write unit tests. Reviewed-on: https://gerrit.libreoffice.org/69737 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-03-28loplugin:useuniqueptr in sc dialog constructorsNoel Grandin
Change-Id: I9fef0d3d567d9a0143c7a796725a44348b96bb23 Reviewed-on: https://gerrit.libreoffice.org/69880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28simplify reset(nullptr) -> reset()Noel Grandin
Change-Id: Iec5e93d9c59dde44571376e46fb98ea854e16b6c Reviewed-on: https://gerrit.libreoffice.org/69784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49 Reviewed-on: https://gerrit.libreoffice.org/69715 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-28return unique_ptr from CreateTokenMatrixMapNoel Grandin
Change-Id: I7a779bf1b2e5438e7e5d9f75c765049d4e2b9dac Reviewed-on: https://gerrit.libreoffice.org/69856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28tdf#45904 Move XShapeGrouper Java tests to C++Jens Carl
Move XShapeGrouper Java tests to C++ for ScDrawPageObj. Change-Id: I4a1ed4f14f759fa4214141f0d552e35ccae28035 Reviewed-on: https://gerrit.libreoffice.org/69873 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-28tdf#45904 Move XServiceInfo Java tests to C++Jens Carl
Move XServiceInfo Java tests to C++ for ScDrawPageObj. Change-Id: Icc2c97296f549763068475be18c00a23b7cd73dc Reviewed-on: https://gerrit.libreoffice.org/69872 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-28tdf#45904 Move XElementAccess Java tests to C++Jens Carl
Move XElementAccess Java tests to C++ for ScDrawPageObj. Change-Id: I3a51c77f524311416ac054005c0632e5127efb79 Reviewed-on: https://gerrit.libreoffice.org/69871 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-27tdf#45904 Move XIndexAccess Java tests to C++Jens Carl
Move XIndexAccess Java tests to C++ for ScDrawPageObj. Change-Id: I8b0c80b9213130870ce5445bcf52705df367cb0e Reviewed-on: https://gerrit.libreoffice.org/69864 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-27return unique_ptr from CreateOutputEditEngineNoel Grandin
Change-Id: I403f0da5ea1ccdf508d156a9fa828e9f91813385 Reviewed-on: https://gerrit.libreoffice.org/69804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27tdf#123505 svx: fix invalidation loop caused by special form control geometryMiklos Vajna
Regression from commit d464d505fbf6e53a38afdd3661d320fac8c760d6 (Refactor calc non-linear ViewToDevice transform, 2018-10-12), the problem was that the opengl menu was never painted from the starved idle handler as a paint-invalidation loop starved the main loop. ScGridWindow::Paint() called vcl::Window::ImplPosSizeWindow() for the form control of the bugdoc, which triggered an invalidation -> paint -> start again. Checking what adjustControlGeometry_throw() did, the result of the transformed points are quite close to each other, but not equivalent: debug:18521:18521: adjustControlGeometry_throw: aTopLeft before transformation is (1773,426) debug:18521:18521: adjustControlGeometry_throw: aTopLeft after transformation is (64.935,16.0382) debug:18521:18521: adjustControlGeometry_throw: aPaintRectPixel is 952x586@(64,16) If we round, rather than truncate, then the size of the control is always the same, so no actual resize and invalidation happens during paint. Change-Id: Id55fd227e3ae7fc57d5253bc28f42b9b4315450e Reviewed-on: https://gerrit.libreoffice.org/69821 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-03-27tdf#124293 add RedactDoc to writer, calc menubar in toolsandreas kainz
Change-Id: I8276506aaeaaee2bef5dad832d488450688081ee Reviewed-on: https://gerrit.libreoffice.org/69810 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2019-03-27Fix CppunitTest_sc_screenshotsStephan Bergmann
...after cc162981b82548349b4927cf3196ddcf54911850 "return unique_ptr from MakeNumberInfoItem" Change-Id: I44682440c5b1c45ff50f891eda9efeb94d57608d
2019-03-27return unique_ptr in CreateFlatCopiedTokenArrayNoel Grandin
Change-Id: I0d44ad1eca45b0b77d5a898a553aab61b1f479a9 Reviewed-on: https://gerrit.libreoffice.org/69805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27return unique_ptr from MakeNumberInfoItemNoel Grandin
Change-Id: I76a90ec9799e580c50b240bc906f83d62d3099b5 Reviewed-on: https://gerrit.libreoffice.org/69803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27return unique_ptr from CreateAttrIteratorNoel Grandin
Change-Id: Ib990282abcd3a75bfb6bdd42b5e16d6e673f71b1 Reviewed-on: https://gerrit.libreoffice.org/69783 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27no need to allocate aEmptyOUString separatelyNoel Grandin
Change-Id: I938f5c022ef07e9ac4cc6eaf60cc7a88deabbda7 Reviewed-on: https://gerrit.libreoffice.org/69747 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-26scale down the load in ScParallelismTest::testVLOOKUPSUM...Dennis Francis
since this method alone takes around 8 minutes in a dbgutil build. Change-Id: I573545446bd42b7a614d8f5b2d6061c3ec157271 Reviewed-on: https://gerrit.libreoffice.org/69742 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-26weld SearchResultsDlgCaolán McNamara
Change-Id: Ib2a031843a92626941ebe9c94a77a44c4c970585 Reviewed-on: https://gerrit.libreoffice.org/69757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-26ScUnoHelpFunctions::AnyToInterface is redundantMike Kaganski
Change-Id: Ia61806f7781b49f29122ad9be75a5eb739918c37 Reviewed-on: https://gerrit.libreoffice.org/69734 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-26tdf#74664 : add Fourier analysis toolDennis Francis
Add Fourier analysis tool to Statistics submenu. Use FOURIER() formula to do all the work here. Change-Id: Ifdaa79d8ee367f1c1f5054248e01853ffe4c6823 Reviewed-on: https://gerrit.libreoffice.org/69472 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-26tdf#74664: FOURIER: add 5th optional parameter MinimumMagnitudeDennis Francis
This parameter is used only if Polar=TRUE. All frequency components with magnitude less than MinimumMagnitude will be suppressed with a zero magnitude-phase entry. This is very useful when looking at the magnitude-phase spectrum of a signal because there is always some very tiny amount of rounding error when doing FFT algorithms and results in incorrect non-zero phase for non-existent frequencies. By providing a suitable value to this parameter, these non-existent frequency components can be filtered out. By default the value of this 5th parameter is 0.0, so *no* suppression is done by default. Change-Id: I422ad1bf91f42b320e98e58a19c99bf8528e4708 Reviewed-on: https://gerrit.libreoffice.org/69471 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-26tdf#122989 remove update check from notebookbar for the momentThorsten Behrens
Temp fix, since update check is an extension, and extensions can't currently modify notebookbars. This needs implementation of something like https://wiki.openoffice.org/wiki/Framework/Article/Addon_Menu_Toolbar_Merging for notebookbar popup menus. Such that Addons.xcs provide some merge points with notebookbar menu IDs, we can then plug into existing popup menus. Change-Id: If30525fec1e7be0429e351588614618c5f56cdd4 Reviewed-on: https://gerrit.libreoffice.org/69735 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-26weld ScPivotFilterDlgCaolán McNamara
Change-Id: I0a2ffa6fd02dcf82d55f961ba229112b456eda8e Reviewed-on: https://gerrit.libreoffice.org/69733 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-26<https://ci.libreoffice.org/job/lo_ubsan/1225/> still timed outStephan Bergmann
...so lets see whether increasing maxWait even more helps (or whether the problem is not a too-short timeout after all) Change-Id: I847904aec1b0ddc9bbf9783f5698f3a239883900 Reviewed-on: https://gerrit.libreoffice.org/69729 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-26No need in function object; just use range-based loopMike Kaganski
Change-Id: I08289c35eb1e8babc53406deb25df39f68a0dd88 Reviewed-on: https://gerrit.libreoffice.org/69726 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-26flatten TabRangesNoel Grandin
no need to declare this separately, saves one pointer hop Change-Id: I14fd82a9448c43ddfa0b6179a3b79cf6d364130d Reviewed-on: https://gerrit.libreoffice.org/69687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25tdf#124318 FILEOPEN: XLS Hyperlink URL incorrectNoel Grandin
regression from commit 52f69445c55c9af8ad97bee6da335b4592d56d4d Date: Wed Aug 1 17:03:18 2018 +0200 loplugin:stringloop in sc Change-Id: I7d481ea27866fc146c5de9d027aa7bb308f14e52 Reviewed-on: https://gerrit.libreoffice.org/69652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25avoid a crash with an editor-forced matrix formula (tdf#123479)Luboš Luňák
Normally when ScInterpreter has bMatrixFormula set, pMyFormulaCell is set as well (done in the ctor). But in some rare cases, this may not be so, and some functions such as ScRandom() already check for this. But not all do, tdf#123479 specifically crashes because ec97496525f82f added AssertFormulaMatrix() to force bMatrixFormula be set without pMyFormulaCell being set, and ScColumn() doesn't handle this case. Fix this by trying to pass ScFormulaCell* to ScInterpreter when AssertFormulaMatrix() is used, this should ensure the result in the formula editor fits better the edited formula. Since there still may be cases when the cell is not set (e.g. editing a new formula), also handle that case gracefully. Ideally ScSimpleFormulaCalculator should pass ScMarkData to ScInterpreter in such cases so that those functions use that when they can't use GetMatColsRows(), but currently the handling of selections is rather poor in the formula edit dialog: Non-array formulas are simply entered in one cell and the selection is ignored, in case of a multi-selection there's an error dialog only after the dialog is closed, and the result field of the dialog is rather small and doesn't scroll, so e.g. matrix result of ScRandom() wouldn't show more than one item anyway. Given that tdf#123479 is a priority bug, better just fix it and possibly handle selections better somewhen later. Change-Id: I5fcbe1e358fac3623d4917eb0ead8eae00a1e153 Reviewed-on: https://gerrit.libreoffice.org/69161 Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Luboš Luňák <l.lunak@collabora.com>
2019-03-25Removed executable permission on data filesAndrea Gelmini
Change-Id: Ic21b28fd094f706dd7b1de32907d75e28f27494a Reviewed-on: https://gerrit.libreoffice.org/69558 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-25new loplugin:unoqueryNoel Grandin
look for places we are doing code like: Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-24Extend timeout for .uno:AutoCorrectDlg UITestsStephan Bergmann
...which often timed out for the ASan+UBSan Jenkins build, so lets hope that it was just an issue with a too short timeout there Change-Id: Ie50eb1cc16e9444d1392c95ef5c6d810b9e4bd17 Reviewed-on: https://gerrit.libreoffice.org/69599 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>