aboutsummaryrefslogtreecommitdiff
path: root/source/as/xmlsecurity
ModeNameSize
-rw-r--r--messages.po20223logplain
ovider-for-android'>feature/owncloud-provider-for-android LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs/optsolver.cxx
AgeCommit message (Collapse)Author
2025-01-18cid#1640469 Dereference null return valueCaolán McNamara
Change-Id: Ib115c3ee73a0124d9d6a3c895722c89158da2d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180435 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-01-17tdf#157519 Make solver's Sensitivity Report prettierRafael Lima
Currently the sensitivity report has no formatting whatsoever. This patch formats the report using table headers and adds a line delimiter at the table's end. The new formatting capabilities were added into AddressWalkerWriter so that it can also be used to improve other statistics reports (such as the features in Data - Statistics). Change-Id: I80da3c673fec457e3d5de07c5f7a09904412d01f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180305 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-10-14cid#1633173 silence Unchecked return valueCaolán McNamara
Change-Id: Ic3779f6922f855ad57b2c261696c76a06dac84f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174880 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-09Fix typoAndrea Gelmini
Change-Id: Ia94d191204cee8b21702d03429493d09427d62d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174750 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-09tdf#157519 Implement Sensitivity Report in LpSolve solverRafael Lima
This patch implements sensitivity analysis when using the LpSolve solver engine. It also adds the infrastructure needed for future implementations in other solver engines via the css::sheet::SensitivityReport struct. Change-Id: I74c2ed9c6201a0b2ffc29ef612d2b778d11a3bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173642 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-18tdf#162760 Fix solver crashing with unset parametersRafael Lima
This patch fixes 2 related issues: 1) Solver engines may crash internally and we need to catch these exceptions and inform the user instead of letting Calc crash entirely. 2) When initializing solver settings, we only set the default values for the first engine; we need to set the defaults for all engines. Change-Id: Ia598f7c17c25b5d6277f2ce24d2f4d552f897fe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172955 Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com> Tested-by: Jenkins
2024-08-10cid#1556058 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1556064 COPY_INSTEAD_OF_MOVE cid#1556066 COPY_INSTEAD_OF_MOVE cid#1556072 COPY_INSTEAD_OF_MOVE cid#1556075 COPY_INSTEAD_OF_MOVE cid#1556077 COPY_INSTEAD_OF_MOVE Change-Id: Ie2992d321ecff15f104547e3a3cad6e8c1a786a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171708 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-06cid#1555415 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555430 COPY_INSTEAD_OF_MOVE cid#1555497 COPY_INSTEAD_OF_MOVE cid#1555542 COPY_INSTEAD_OF_MOVE cid#1555543 COPY_INSTEAD_OF_MOVE cid#1555564 COPY_INSTEAD_OF_MOVE cid#1555593 COPY_INSTEAD_OF_MOVE cid#1555602 COPY_INSTEAD_OF_MOVE cid#1555610 COPY_INSTEAD_OF_MOVE cid#1555667 COPY_INSTEAD_OF_MOVE cid#1555693 COPY_INSTEAD_OF_MOVE cid#1555719 COPY_INSTEAD_OF_MOVE cid#1555757 COPY_INSTEAD_OF_MOVE cid#1555795 COPY_INSTEAD_OF_MOVE cid#1555826 COPY_INSTEAD_OF_MOVE cid#1555847 COPY_INSTEAD_OF_MOVE cid#1555851 COPY_INSTEAD_OF_MOVE cid#1555863 COPY_INSTEAD_OF_MOVE cid#1555865 COPY_INSTEAD_OF_MOVE cid#1555867 COPY_INSTEAD_OF_MOVE cid#1555869 COPY_INSTEAD_OF_MOVE cid#1555879 COPY_INSTEAD_OF_MOVE cid#1555890 COPY_INSTEAD_OF_MOVE cid#1555893 COPY_INSTEAD_OF_MOVE cid#1555900 COPY_INSTEAD_OF_MOVE cid#1555922 COPY_INSTEAD_OF_MOVE cid#1555925 COPY_INSTEAD_OF_MOVE Change-Id: I5d362a09e80eecd282e63c745bfe26eac2631a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171492 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-05-31loplugin:ostr in sc/../miscdlgsNoel Grandin
Change-Id: I9cc24ed6692d9495e6ace3ccacbbe488ef82eea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168282 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-03-20tdf#160104 Do not mark file as modified if nothing changed in the Solver dialogRafael Lima
Change-Id: I1bef38a21179bb725c7fb7a08fe90309d26239ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164616 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-25tdf#38948 Save solver settings to fileRafael Lima
This patch implements the mechanism to save solver settings in LO Calc as well as export/import them from XLSX files. In MS Excel solver settings are saved as hidden named ranges, so in this patch I used the same strategy to save solver settings in Calc, i.e. by creating named ranges to store the solver settings using the same terminology used in Excel. With this we gain the ability to save solver settings by tab, as well as export/import since we already have "named ranges/expressions" import/export implemented in LO. Change-Id: Id41bca261dc3cd8e6888643f0ed6a97b26097876 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148112 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-12override GetModel in ScDocShellNoel Grandin
so we can avoid dynamic_cast and XUnoTunnel in various places Change-Id: I1f524270a8030106a2058691c3d89b90d46ed26f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-08-24tools: rename Rectangle::Justify() to Rectangle::Normalize()Chris Sherlock
Jusify() normalizes the rectangle so both the Width and Height are positive, without changing the location of the rectangle. It ensures that the x and y coordinates will be moved to the top left of the rectangle. The name is strange, so renaming Justify() to Normalize(). Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-07clang-tidy modernize-pass-by-value in scNoel Grandin
Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-14Recheck modules s[a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I867e1f7a2c44210de3281b36e22708a5d32ddb7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129476 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-10-30Prepare for removal of non-const operator[] from Sequence in scMike Kaganski
Change-Id: Ic49c0fda3e98aeda471e674b68d40464ddac1ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-11loplugin:moveparam in scNoel Grandin
Change-Id: I4b9d45a6b0231841a5fe00d0193a8530b9e05559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-08tdf#143534 Crash in Calc NLP SolverNoel Grandin
prevent dialog from being deleted out from underneath the code handling the dialog. Change-Id: Ib1ef05f897901089708188820a3330dbeabc24c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-30ScDocument::GetRangeAtBlock() name is always passed, so use referenceEike Rathke
Change-Id: I1dec40b6da2375b292ba4c9912c4736fcd7ca551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113348 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-01-14Rename m_xBtnCancel->m_xBtnClose (sc/optsolver)Julien Nabet
Since it corresponds to id="close" gtk-close, response close in sc/uiconfig/scalc/ui/solverdlg.ui Change-Id: I909f8f7a5d08784bda786eb86d92f88831749f23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109246 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24tdf#134528 Add "Reset All" button to Calc Solver dialogRafael Lima
Change-Id: I27a2fb4dddf3da31801bc2283ee58a24a921d7ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106030 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in scNoel
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06move set_user_managed_scrolling to an initial weld argumentCaolán McNamara
gtk is creating a11y objects on widgets changing parents so manage when that can happen to avoid premature creation of custom widget a11y objects Change-Id: I4879a93a897b2e4084cf6af0c9c0b0f0c1062254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104025 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-15ScRangeList::ParseAny ScDocument* argument dereferenced on all used pathsCaolán McNamara
Change-Id: Ie41a1b58f8bec0e8197aa49aa92522f11de40a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102667 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-13MakeRangeFromName never passed a null ScDocument*Caolán McNamara
Change-Id: Ie9de24e4be10efb071139f02576058cee512bc7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-09loplugin:flatten sc/miscdlgsNoel Grandin
Change-Id: I41bb4eb1ea06aef2f4e58e0f00d275dcf8879154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-10use more std::make_sharedNoel Grandin
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-13cancel solver subdialogs on forced removalCaolán McNamara
Change-Id: Idd99af070c1ed20ecc458fb17f194a56b9d37cc3 Reviewed-on: https://gerrit.libreoffice.org/85113 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-13use runAsync for dialog inside another runAsync dialogCaolán McNamara
Change-Id: Ia0196db2e74ca938ac54f45de5a6d5367ea19690 Reviewed-on: https://gerrit.libreoffice.org/85112 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-03remove some useless comment linesNoel Grandin
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-14cid#1455325 establish that pDoc cannot be null thereCaolán McNamara
Change-Id: Ia7bca1e74a8ede90e29ec6cbd63c7fdcaf25b072 Reviewed-on: https://gerrit.libreoffice.org/82696 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-14SetReference ScDocument arg is never nullCaolán McNamara
Change-Id: Ifdfe305e5319926d804e14962e786389b79fe476 Reviewed-on: https://gerrit.libreoffice.org/82682 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-14ParseWithNames pDoc arg assumed to be non-nullCaolán McNamara
Change-Id: I97451daf3a99ace4c936912a3978dfaee8fe9fb2 Reviewed-on: https://gerrit.libreoffice.org/82681 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-20ScRangeUtil is utility class; don't instantiate itMike Kaganski
Change-Id: Id5bf48b62c644fa3c37faf324b9f5b971ca18557 Reviewed-on: https://gerrit.libreoffice.org/81162 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-15loplugin:sequenceloop in scNoel Grandin
Change-Id: I84e0b4784ddc66864b29e3b1f20c926aa17fc77f Reviewed-on: https://gerrit.libreoffice.org/77523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-09Simplify Sequence iterations in scArkadiy Illarionov
Use range-based loops, STL and comphelper functions Change-Id: I047fb2e6ec9591166339b9748c5013a32185f14b Reviewed-on: https://gerrit.libreoffice.org/76912 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-05-12Use hasElements to check Sequence emptiness in sax..sdextArkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: If6a567708d3c59355d54933fad23c85195846624 Reviewed-on: https://gerrit.libreoffice.org/71763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-11remove unused RefEdit/RefButtonCaolán McNamara
and rename WeldRefEdit/WeldRefButton back Change-Id: I3aab8585d4ba1017cc755bf21e827522e7ee6980 Reviewed-on: https://gerrit.libreoffice.org/71957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-19drop some unneeded includesCaolán McNamara
Change-Id: Idde1f747f500d94b3191a97e7d502794cc2b8450 Reviewed-on: https://gerrit.libreoffice.org/70972 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-18weld ScOptSolverDlgCaolán McNamara
Change-Id: Ie2b43377f950cb16e143f6e9ef7081bf92277088 Reviewed-on: https://gerrit.libreoffice.org/70903 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-01weld ScSolverProgressDialogCaolán McNamara
Change-Id: I5ee081b1c9e542a2b717b4eb27ee0aba7331d57d Reviewed-on: https://gerrit.libreoffice.org/70071 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-11tdf#42949 Fix IWYU warnings in sc/source/ui/[f-o]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I56e32029f40a7c440143e395d851396fb2740fa8 Reviewed-on: https://gerrit.libreoffice.org/68837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-12weld ScSolverOptionsDialogCaolán McNamara
Change-Id: I940fe1c5b4edf41c66a729c56fa789488fd39ba6 Reviewed-on: https://gerrit.libreoffice.org/67713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-08Simplify containers iterations in sc/source/ui/[f-u]*Arkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: Ia117ee3bea76c1cee84c0d2bb43195c59764fe93 Reviewed-on: https://gerrit.libreoffice.org/65961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>