summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2017-09-09tdf#112278: Pivot table: filtering of non-string fields is not exported to XLSTamás Zolnai
It is needed to use the right string representation of field value. During export this representation is available directly, next to the actual value. During import we can use the number format attached to the corresponding pivot field. Change-Id: Ie8f731f6c72d7f55f43c318e52d63dc4e993d9c0 Reviewed-on: https://gerrit.libreoffice.org/42069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-09Avoid underflow of unsigned integer which leads a false error messageTamás Zolnai
Change-Id: Ica65a96efe44fb46e25c224298aaff4cd7a40fa6 Reviewed-on: https://gerrit.libreoffice.org/42120 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-08sc-perf: do not add a million empty filter entries just to sort and discardEike Rathke
Which can happen if an (anonymous) database range as filter range was selected to span an entire column of which most (the tail) is empty cells. The entries are processed to be unique anyway. This significantly shortens the time to display the filter dialog. Happened with attachment http://bugs.documentfoundation.org/attachment.cgi?id=136074 of bug https://bugs.documentfoundation.org/show_bug.cgi?id=112258 Change-Id: Ia169911d6f23611a3b3ecbf291757465f1998210 Reviewed-on: https://gerrit.libreoffice.org/42118 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-08Inspecting children is only necessary if parent is selectedEike Rathke
Change-Id: I9980bef27442504f59f5a85e655a761c5d35a012
2017-09-08If children then insert only if a child is selected, tdf#112258 follow-upEike Rathke
Otherwise the chain down to the parent would be pickable, though in practice it doesn't have a consequence as only leaves are picked. However, inserting to the set can be avoided. Change-Id: I6a6b63b2d7c031a2dd13d8cc7d98f15e1f946298
2017-09-08convert pEntryLists to std::array<std::unique_ptr<...Noel Grandin
Change-Id: Ibe5d97c7a5138f1fd47cb2419c33b8f78ff1559c Reviewed-on: https://gerrit.libreoffice.org/42094 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08set parent for file dialog helperCaolán McNamara
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08oovbaapi: create XOval and XLine shape typesTamas Bunth
This is needed in order to make "TypeOf myLine Is Line" or similar expressions return the expected "true" value. The implementation of the basic interpreter of TypeOf uses XTypeProvider to determine the type of an object by getting the last part of the type name. E.g. "ooo:vba::msforms::XLine" is determined as a "Line". That's why I created the XLine and XOval blank classes. TypeOf doc: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/typeof-operator Change-Id: Ia49cc92d672e30d0126f02d61a55a956ac1425f0 Reviewed-on: https://gerrit.libreoffice.org/42083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-09-07Resolves: tdf#112258 correctly pick items from AutoFilter selectionEike Rathke
Combining only one child with one parent to lookup is not sufficient if we have year,month,day chains. The entire chain is needed. Regression from commit 2a39dc74724d3648ff76aa900edfebe0dd19b296 Date: Thu Jun 1 18:27:13 2017 +0200 tdf#108259 Fix nested checkbox handling in autofilter popup and commit 511fb8e80d298d42f5c45e7410bf64f2a25b441e Date: Wed May 31 10:59:42 2017 +0200 tdf#108259 Enable autofilter with many different values which combined landed in 5.4 as commit 0163957ef808cffa332c2ddd3267409c5ae1494a Date: Wed May 31 10:59:42 2017 +0200 tdf#108259 Enable autofilter with many different values This on the other hand makes the change of these doubtful, as for each leaf item the concatenation and the lookup has to be done. Something to be investigated. Change-Id: I07fd6367bb8da2adab94a43c45fe88391179f496
2017-09-07tdf#107135 Add missing ODFF function SEARCHB.Winfried Donkers
Change-Id: Ic72693ad8f33fb94c171751f82680eabad1d3d6d Reviewed-on: https://gerrit.libreoffice.org/41900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-07tdf#112177 remove incorrect constraint for Calc function NPER.Winfried Donkers
Change-Id: I123ea8ee2e333665ac448c6b3814c3bac0b687ab Reviewed-on: https://gerrit.libreoffice.org/42011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-07tdf#107952: Move cursor to changed cell after undo/redo in ScUndoSetCellDennis Francis
Change-Id: Id9f2ba2ed2d77f03c9bd56c41b958aa23921da0d Reviewed-on: https://gerrit.libreoffice.org/42014 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Dennis Francis <dennis.francis@collabora.co.uk>
2017-09-06Replace some lists by vectors in unoobj (sc)Julien Nabet
Change-Id: I611f1a217ff1d5468c77f04a0c2eddd61ee33b8b Reviewed-on: https://gerrit.libreoffice.org/42025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-06tdf#111305: Fix group name refresh in pivot tableDimitri Bouron
Change-Id: Ibc22bfba5765aba3014651df50afb23b893d2b5a Reviewed-on: https://gerrit.libreoffice.org/40712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-06tdf#107135 fix too tight constraint for FINDB.Winfried Donkers
Change-Id: I72e7214f14840146305fcb7daec7db89fcf112c9 Reviewed-on: https://gerrit.libreoffice.org/41959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-06tdf#111907 Allow box in Manage Names dialog to expand on resizingAndreas Brandner
Change-Id: I821e12d771d574dd191d9be86a19c23288902d5b Reviewed-on: https://gerrit.libreoffice.org/41946 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-09-05Remove add-in demo/test-files in sc/workbenAndreas Brandner
Change-Id: Ie8a887e0a478bfe0fd3d31f895229e3aca553bee Reviewed-on: https://gerrit.libreoffice.org/41948 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-05sc: adjust block height only if neededDimitri Bouron
Change-Id: Ibc8c101bfaedbcaa5d3ba1554b3301c1f44a8987 Reviewed-on: https://gerrit.libreoffice.org/41928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-05Remove sc/workben-filesAndreas Brandner
Change-Id: I0c3f3f212ea6f0e7f99e3b5edffef24bb279b456 Reviewed-on: https://gerrit.libreoffice.org/41937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-05Revert "Make two slightly mysterious static local variables thread_local"Tor Lillqvist
Temporarily revert until somebody can figure out what to do with the obsolete Mac toolchain on some tinderbox. This reverts commit 5f847b3d197a96e5c2bab3d9129d3dd9d5b75873.
2017-09-05tdf#107158 Groupedbar variant of the Notebookbar for Calcandreas kainz
Change-Id: I8f6a086a0895d54cce6243f65c3f47f7cc4cf50e Reviewed-on: https://gerrit.libreoffice.org/41742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2017-09-05Prefix one more member of ScDocument: pShellTor Lillqvist
Change-Id: I72f2556f54e1ea4b397f9b21b1d767ae597e6e43
2017-09-05Prefix one more member of ScDocument: pNoteEngineTor Lillqvist
Change-Id: I93b95b8aca22df81985e4479fa6a7126eab45f0f
2017-09-05Prefix one more member of ScDocument: pEditEngineTor Lillqvist
Change-Id: Ib46b9b2b2b797f1d2de294819bf641f199e55dfa
2017-09-05Prefix one more member of ScDocument: xPoolHelperTor Lillqvist
Change-Id: Id1a216e909d5c0a6bafa80d1e40613fb38ceb1ef
2017-09-04Make two slightly mysterious static local variables thread_localTor Lillqvist
IRC discussion about them: tml_: erAck: any idea why in ScFormulaCell::GetMatrixEdge those nC and nR are static? tml_: seems to have been since initial import in 2000 (then in a different file, and of type USHORT) tml_: let's assume it is just random insanity tml_: hmm, no, making them non-static actually breaks a unit test. wow erAck: tml_: they are reused when the call is for the same matrix origin as the last one to not have to recalculate the same thing tml_: erAck: ah ok Change-Id: Ib0fe322492917b5224937ec6ef527707ca2e07f7 Reviewed-on: https://gerrit.libreoffice.org/41658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-04Apostrophe ' is invalid as first or last character in sheet name, tdf#103027Eike Rathke
So hint in dialog. Change-Id: I04c85c9fc8d89ecc1be4d8d7fddc58672314d2dc
2017-09-04Resolves: tdf#103734 propagate error from matrix to MIN()/MAX()Eike Rathke
Change-Id: I1ebc5baf4957ef9e3d1477b803cf7fee02754360
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-03set parent for insert media file dialogCaolán McNamara
Change-Id: I71eace1995b229caa75e61df363fd8bad981bed1 Reviewed-on: https://gerrit.libreoffice.org/41851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-02tdf#111974: Ensure sufficient space for all sheets in FormulaBuffer...Dennis Francis
and not just for the number of sheet fragments. This is important because we changed the internal storage of FormulaBuffer from based on std::map to std::vector in d17a83fa549f828f29e6939b16ba8b568a75f95e With help from Markus Mohrhard, was able make a simple unit test working in subsequent_filters-test.cxx after adding the missing the component emfio to CppunitTest_sc_subsequent_filters_test.mk Change-Id: I7320dd537266e540d585d3fccfbb8665bba457c7 Reviewed-on: https://gerrit.libreoffice.org/41792 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Dennis Francis <dennis.francis@collabora.co.uk>
2017-09-02convert SHAPEFLAG defines to scoped enum ShapeFlagJochen Nitschke
they were defined in escherex.hxx as SHAPEFLAG_* and in msdffimp.hxx as SP_*. Added include for escherex.hxx to msdffimp.hxx. Filled the missing flag bits. ShapeFlag::Deleted is not used at the moment. Convert ADD_SHAPE macro to lambda. Fix horizontal/vertical mixup in RtfSdrExport::AddLineDimensions. Comments for flag Connector were wrong. The flag applies to shapes which ARE connectors. MSO definition: "connector: A line that is used to connect two or more shapes and that remains connected to those shapes." So Rectangles and such with Connector flag don't make sense. Change-Id: I735de00110411b280a302840dc0fcdfac5156399 Reviewed-on: https://gerrit.libreoffice.org/41754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02dynamic column container: fix some more for loopsNoel Grandin
and add reverse-iterator functionality Change-Id: Ide7ee9d2152871d414246303d76c91da36557524 Reviewed-on: https://gerrit.libreoffice.org/41727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02make sure parent element is staying aroundMarkus Mohrhard
If we use a reference to the object we need to ensure that it not suddenly disappears on us. Change-Id: I7917fc696b0cc48dd26fa332c892f09727e40054 Reviewed-on: https://gerrit.libreoffice.org/41820 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-01Fix typosAndrea Gelmini
Change-Id: I4496faa9ce7cad393bf06ca789099b045aea2741 Reviewed-on: https://gerrit.libreoffice.org/41785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01Harmonize capitalization of spreadsheet function UI parameter namesEike Rathke
Also remove _ underscores in names and few better suiting renaming. Change-Id: Ic0b48f98c0b07404f3e0981d95fa5f3e5aa828f5
2017-09-01Replace list with a vector in PutData (sc)Julien Nabet
+ revamp a little bit by using unique_ptr Change-Id: I07fa08d1981db65dbb22e887fcab0e8a6ca64b58 Reviewed-on: https://gerrit.libreoffice.org/41774 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01tdf#89139 Fix exporting of DateTime to CacheDefinition according to ISO 8601Bartosz Kosiorek
With this commit, the date is saved in Excel format, like: "2009-07-06T10:53:02" We are now exporting attributes: "minDate" "maxDate" "containsDate" This is necessary to export properly .xlsx file. Without that MS Office 365 is displaying error, and it is not even trying displaying .xslx file content Change-Id: I1239f5582173afe99bf9178fd4edd1dc5ca28e8e Reviewed-on: https://gerrit.libreoffice.org/41162 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-08-31make the ScColumnsRange iterator return SCCOLNoel Grandin
since we don't want to expose internal details like the ScColumn to most of the code, make the ScColumnsRange iterators return SCCOL instead of ScColumn* Change-Id: I67a58df90959170105255d18e7dd38ef0d6e3c11 Reviewed-on: https://gerrit.libreoffice.org/41719 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-08-31Classify ocPercentSign as Array capableEike Rathke
Actually it's implemented in RPN as Array 100 ocDiv, and ocDiv is Array capable. Not being classified as Array capable resulted in ArraySize times matrix-Div being executed, effectively ArraySize*ArraySize div operations. Change-Id: I23366b5aa9c146cc59dc880f2a561348f7977329
2017-08-31SYLK import: init nRefCol,nRefRow with start col,row instead of 1,1Eike Rathke
So in a malformed document that does not specify ;X;Y;C;R before ;M a 1x1 matrix formula is created at nStartCol,nStartRow instead of 2x2 Change-Id: Idcc0f9d8c65bb142587fa6419af6f4dcb6209a0e
2017-08-31Fix silent merge conflictStephan Bergmann
Change-Id: I8879560850b4cf94984e3b3657800273b276fcdb
2017-08-31tdf#111939: Fallback to getting view data from best view shell...Dennis Francis
...when ScDocShell::GetViewData() returns nullptr. This is needed when a macro is run from the macro editor window instead of running the macro from Tools menu in the Calc window. Change-Id: I89c23c2ec08e8e9907f02eb1389236111530058b Reviewed-on: https://gerrit.libreoffice.org/41733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Dennis Francis <dennis.francis@collabora.co.uk>
2017-08-31No need to call SetDebugName() when we already pass the same name to the ctorTor Lillqvist
(Well, actually there wwre a minor difference, "sc ScModule IdleTimer" vs. "sc::ScModule aIdleTimer", and ditto for "SpellIdle", but that is hardly essential if even intentional?) Change-Id: I18a2af0d25c40404a41b1461664feda73183881e
2017-08-31ofz#2896 turn off auto look up col/row names for import testingCaolán McNamara
Change-Id: I346a9760c0692449ce5301f5075b3de0271fdadf
2017-08-30Restrict GetDoubleFromDateTime() and GetDateTimeFromDouble() correctionEike Rathke
... to specific 1899-12-30 vs. 1899-12-31 nulldate. Further check is needed to do that only for OOXML transitional or dateCompatibility==true. Change-Id: Ieecd3a5d061f900fbdec5bd9d1bf5ac61b966004
2017-08-30tdf#112106: Corrupted pivot table after XLSX -> XLS conversion in CalcTamás Zolnai
Always write out a data layout name. Change-Id: Ic0b43d9c0365eca5e417fe9f2fe4b77b538f3278 Reviewed-on: https://gerrit.libreoffice.org/41739 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-30fix ScJumpMatrixToken memory handlingNoel Grandin
ScJumpMatrixToken unconditionally deletes the ScJumpMatrix pointer it receives. But it's copy constructor also just copies that pointer, meaning that we could end up freeing that pointer twice. ScJumpMatrix has no copy constructor, so I just managed it via shared_ptr. Change-Id: I9cf13312afb4f2869fdc878e5f34060614e31842 Reviewed-on: https://gerrit.libreoffice.org/41728 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-30loplugin:constparamNoel Grandin
Change-Id: I81055d60c3c5d35e46e7d0c3a451e93e42d86783
2017-08-30loplugin:constparam in variousNoel Grandin
Change-Id: I6821a3946f2e8fabf26558a84370c16ac8827fed Reviewed-on: https://gerrit.libreoffice.org/41721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>