summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: Ief45ea5a1457e0beb2159f0471a33e1da708cb01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-21CppunitTest_sc_ucalc_copypaste: use GetFormula directlyXisco Fauli
Change-Id: Id23a07d3d7442119676f8628d1e394914461b678 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143034 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-21sc: remove duplicated codeXisco Fauli
Change-Id: Ice7d74263954c49a341f427c470f992225a40762 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143033 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-21Drop comphelper::OWeakTypeObject, use cppu::WeakImplHelper<> insteadStephan Bergmann
Change-Id: Ie4152d7736ae3f2ffdd3489cd7a444e5035d2422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143030 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-21qa: remove duplicated operatorsXisco Fauli
it's already defined in include/tools/color.hxx Change-Id: I26eaba4a1279fadd8669e9702b695e02871052d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142512 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-21tdf#152053: sc_subsequent_filters_test2: Add unittestXisco Fauli
Change-Id: If0de645a0ca0901862ef4e084e14ff60cbc3800b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143028 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-21calc: cache GetCellArea resultsSzymon Kłos
This will avoid repeated lookup in the ScTable::GetCellArea. Which is used for vcl::ITiledRenderable::getDataArea(). Tested in CppunitTest_sc_ucalc Change-Id: Ied58cfe447e1b924af9b401e95e127c784b80355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142279 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142995 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-21lok: Notify about last used row and column in CalcSzymon Kłos
We use HelperNotifyChanges::NotifyIfChangesListeners notifier so we know which cell was modified and we can correctly target only affected users. Change-Id: Iaeb68e350e85e4ed1492a7d350a790e68f2d63af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139473 Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142994 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-21jsdialog: enable Delete content dialogSzymon Kłos
Dialog had unused m_xBtnOk which has defined standard response in .ui file - no need to bind anything in the code. Change-Id: Ie743485bb30a03b82a87dc69015a704e14c39384 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142903 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142993 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-20tdf#126457 - Add URL and workbook name to window titlesAndreas Heinisch
The Windows object allows to activate a window using its caption. The window caption is the text shown in the title bar at the top of the window. It can be changed which does not affect the name of the workbook. In MS these captions are unique, i.e., a file with the same file name stored in a different directory can't be open. However, LibreOffice allows to open files with the same name. So in order to make it as closely to the functionality of MS, the windows activate method now works with URLs and changed window captions. It has still to be clarified what happens if two workbooks have the same caption. Change-Id: I77a8680bc64b5992191df2fa1a7d475f9a48f518 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140627 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-11-19Dont use equal name for label and widgetSzymon Kłos
Change-Id: I71b052aff4317b416f0c02bde549461b64f1a6f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142181 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142968 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-19loplugin:unusedmethodsNoel Grandin
Change-Id: I5dcba14a9b0dfcc5267760410f6d135fcd3b1bd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-19tdf#147906 Use std::hypot for Pythagorean additionOmkarAcharekar
Change-Id: I19ecfe80e9a927c14db2680188baa54cb4911d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142535 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-18sc: move isFormulaWithoutError where is usedXisco Fauli
Change-Id: I846e1621b0ab82a921a12a0f1440ccb0e6c75215 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142951 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-18sc: these methods are only used in ScSimpleBootstrapFixtureXisco Fauli
reduce the scope Change-Id: Ie9e36a6d1b48ca87ce0fd8e29cafd76adf9caaaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142834 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-18CppunitTest_sc_ucalc_sparkline: inherit from ScSimpleBootstrapFixtureXisco Fauli
tests in here don't deal with import/export of documents Change-Id: I93cacb79bd75577d44fb42a1f87dc60e6bfcc13b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142912 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-18sc: split CppunitTest_sc_sparkline_test into twoXisco Fauli
rename SparklineTest.cxx to ucalc_sparkline.cxx for a follow-up refactoring Change-Id: I2a8aeec5ffbd994c27102461a71cf0c0ec13dfed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142911 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-18sc: rename these tests to ucalc_*Xisco Fauli
All inherit from the same class, just to be consistent. this is part of a follow-up refactoring Change-Id: I9f69ae16c9363996a95a684183d6c0e981594405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142907 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-18AddWindowToPaintView -> AddDeviceToPaintViewMike Kaganski
... and likewise DeleteWindowFromPaintView -> DeleteDeviceFromPaintView because they add/delete output devices, not windows, ever since commit 53fd4bb47c53cbb62a542c847ed38238e7b3e148 (INTEGRATION: CWS sdwarningsbegone (1.42.34); FILE MERGED, Dec 12 18:19:15 2006) And use references instead of pointers, because they are dereferenced unconditionally. Change-Id: I67d5841babaec040aa5308e95f333948eb0dde2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142945 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-18ScBootstrapFixture: simplify code a bitXisco Fauli
Change-Id: I856b0f332a91b570d583d6a4146c6ac353c5e672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142937 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17sc: move CppunitTest_sc_parallelism to checkXisco Fauli
like the other classes inheriting from ScSimpleBootstrapFixture Change-Id: Ia067bd506274f8526e6567c3f6dc395dd87c480c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142899 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17sc: move CppunitTest_sc_sparkline_test to slowcheckXisco Fauli
so it's executed in all platforms Change-Id: I53c04cd9623e0d50b8216a135ede67f72d5d6b58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142842 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17sc: these methods are only used in ScModelTestBaseXisco Fauli
reduce the scope Change-Id: I2c02579e981de218d1f8ec6034b541ee2fdd8870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142841 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17CppunitTest_sc_parallelism: remove duplicated codeXisco Fauli
those methods are already in ScSimpleBootstrapFixture Change-Id: I06f3c9f8a45d8d801759cba2812e96b34065065b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142895 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17ScBootstrapFixture: drop newly unused codeXisco Fauli
Change-Id: I0a0c825d552fe20b16102fb2382e9bee598e879d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142792 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17sc: xpath is unused nowXisco Fauli
Change-Id: I7ae93b5d64991f0fcbd656ddb6f2413bf425cfd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142782 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17sc: remove blank document, just create it on the flyXisco Fauli
Change-Id: I6b4dc26da120f95cfae4582d23f68554801334aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142825 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-17CppunitTest_sc_subsequent_export_test2: inherit from UnoApiXmlTestXisco Fauli
Note: testTdf143979 and testWholeRowBold crash sometimes. It seems the problem is when using GetPool and save. Reducing the scope seems to fix it Change-Id: Icc0f75bdb2ea493b7989a4521add63657528475a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142791 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16lok: handle mouse/keyboard events in Math embedded in CalcMike Kaganski
And extract the identical code used in all components into static SfxLokHelper methods. Change-Id: I6556b1b996936835ecfc0d59e2c1dd1ef6380db2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142793 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-16CppunitTest_sc_uicalc: inherit from ScModelTestBaseXisco Fauli
so createScDoc handles the dispose of new documents saveAndClose can go now Change-Id: I7f88ef6ff9aaece72461489a31b0ef456ce5e170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142781 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16sc: move filter tests where they belong. (part 2)Xisco Fauli
Change-Id: I548d81dd7a7aa276d6936ab8d7bcc53a6cc91483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142772 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16sc: move filter tests where they belong. (part 1)Xisco Fauli
it reduces duplicated code Change-Id: Iba4898e414b87c962b3e923c8c0cf8ca12434167 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142765 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16tdf#151820 Fix arrow in AutoFilter menu when using dark modeRafael Lima
If you're using a dark theme and create an AutoFilter, the arrows in the AutoFilter menu such as "Filter by Color" and "Filter by Condition" will appear in black over a dark background. This patch ensures the arrows use LabelTextColor instead. Change-Id: Ia41757b801354bbc14f66c293a17f3935734788d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141921 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-11-16sc: move export tests where they belongXisco Fauli
Change-Id: I76d56a3e565ad448ca8690bbcb2966ec4e3fbd7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142764 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16CppunitTest_sc_dataprovider: inherit from UnoApiXmlTestXisco Fauli
Change-Id: I713af988ad97652492178ae73703c24bc078b86b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142763 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16CppunitTest_sc_chart2dataprovider: inherit from UnoApiXmlTestXisco Fauli
Change-Id: I65e833ca307dec186c4a455fdb068b4242873cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142762 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16CppunitTest_sc_shapetest: inherit from ScModelTestBaseXisco Fauli
which inherits from UnoApiXmlTest. In order to get rid of duplicated code Change-Id: I36b1edf21fd58eecce482331f5cca577ac7f7b01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142758 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16CppunitTest_sc_bugfix_test: inherit from UnoApiXmlTestXisco Fauli
Note: testTdf31231 and testTdf141914 had to be adapted a bit. the documents are modified after a hard recalc. Reported in tdf#152065 Change-Id: Ib9093d766b17de78f8a547c285a0e0082eb01171 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142757 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15bugfix-test.cxx: use clang-formatXisco Fauli
Do it before changing the inheritance Change-Id: I55971610f075c635e992cd308fac14eec2a558aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142750 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15CppunitTest_sc_subsequent_filters_test: inherit from UnoApiXmlTestXisco Fauli
Change-Id: I8968035d5113ab3f259be43a4a73105d22755f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142745 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15subsequent_filters_test.cxx: use clang-formatXisco Fauli
Do it before changing the inheritance Change-Id: I03b1749b8c50aaf073cec9e8b25891bd9414b546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142749 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15CppunitTest_sc_pivottable_filters_test: inherit from UnoApiXmlTestXisco Fauli
This fixes the TODO in testPivotCacheExportXLSX Change-Id: I904fd97754a7facd9c8896154965ff7d16cada9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142743 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15android: Fix tab name on CSV still becomes tempfile nameMert Tumer
Unfortunately, in order for isLOKMObilePhone to work we need to send deviceFormFactor on document load but at this stage the document is still not loaded and the control does not work here Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142607 Tested-by: Jenkins
2022-11-15Resolves: tdf#152053 GetOptimalColWidth() obtain number format from next rowEike Rathke
... if 1st or 2nd row doesn't have one applied, i.e. is header. Change-Id: I4b33fa4abcbe74b02d416cfa494c0813a8f0086e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142744 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-11-15CppunitTest_sc_subsequent_filters_test2: inherit from UnoApiXmlTestXisco Fauli
I couldn't find a way to test testTooManyColsRows, move it to sc/qa/unit/filters-test.cxx for the time being Change-Id: Ie841dea8aeebcbeff8c9a75ddb91d134c2b52c53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142741 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15CppunitTest_sc_subsequent_export_test: remove unneeded saveAndReloadXisco Fauli
follow-up by a save Change-Id: Ic6297213b25f8726038687ec690a3bfabaf09a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142736 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15CppunitTest_sc_subsequent_export_test: inherit from UnoApiXmlTestXisco Fauli
Some notes: * testLinkedGraphicRT needed to be adapted. Saving to Calc Office Open XML doesn't keep IsLinkedGraphic. Reported in tdf#152036. No idea why it didn't fail before * Some tests used "generic_HTML" as export filter format, which is wrong. Instead, "HTML (StarCalc)" should have been used. But then, the test would have failed with - unsatisfied query for interface of type com.sun.star.sheet.XSpreadsheetDocument! So trying to export to html in those tests is not expected. No idea why it didn't fail before * testTdf90299 fails now with - Expected: 'file:///tmp/lu23738863wthph.tmp/dummy.xls'#$Sheet1.A1 - Actual : 'file:///tmp/lu23738863wthph.tmp/lu23738863wthpg.tmp/dummy.xls'#$Sheet1.A1 I added a TODO to check it later * testNamedRangeBugfdo62729 fails on mac with an infinite loop Change-Id: I63168583a47f510d1ac22971a274e28d085de61b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142576 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15sc: convert optimal width/height and normal width/height dialog to asyncrash419
Signed-off-by: rash419 <rashesh.padia@collabora.com> Change-Id: I96f6d90692d7767bdc276f753897bdc392c90411 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132919 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133127 Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142633 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-11-14sc: factor out common code in makefilesXisco Fauli
Change-Id: I46cce6cb332fb060a9e8f691d8f70808398b85ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142707 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-14Add some missing member operator== const qualifiersStephan Bergmann
...that were only detected now by GCC 13 trunk after <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=431be04b8b6e31d950ddab340ed866d197d23d4d> "c++: implement P2468R2, the equality operator you are looking for", > sc/source/core/tool/interpr4.cxx: In member function ‘void ScInterpreter::ScTableOp()’: > sc/source/core/tool/interpr4.cxx:3608:58: error: C++20 says that these are ambiguous, even though the second is reversed: [-Werror] > 3608 | bool bReuseLastParams = (mrDoc.aLastTableOpParams == aTableOp); > | ^~~~~~~~ > In file included from sc/inc/document.hxx:32, > from sc/inc/externalrefmgr.hxx:23, > from sc/source/core/inc/interpre.hxx:28, > from sc/source/core/tool/interpr4.cxx:22: > sc/inc/tabopparams.hxx:76:10: note: candidate 1: ‘bool ScInterpreterTableOpParams::operator==(const ScInterpreterTableOpParams&)’ > 76 | bool operator ==( const ScInterpreterTableOpParams& r ) > | ^~~~~~~~ > sc/inc/tabopparams.hxx:76:10: note: candidate 2: ‘bool ScInterpreterTableOpParams::operator==(const ScInterpreterTableOpParams&)’ (reversed) > sc/inc/tabopparams.hxx:76:10: note: try making the operator a ‘const’ member function etc. Change-Id: I0c55daabbce61aefd762862f3b0e2e5d235c34b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>