summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-05-11Plausible fix for timezone offset issue in Repair Document.Michael Meeks1-0/+1
Change-Id: Ic1dabb2c2330e0a74a75d75140b0c598555a0d53 Reviewed-on: https://gerrit.libreoffice.org/37300 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-12tdf#106052 Treat SubFormat for "Precision as shown"Laurent Balland-Poirier1-0/+12
Get precision from the correct subformat Change-Id: I458e5b3d1fb515864f19499ac9ac529e1d68a267 Reviewed-on: https://gerrit.libreoffice.org/34505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit e7f769bc67d3f132b477b3c253f8065243b9b8ac) Reviewed-on: https://gerrit.libreoffice.org/36367 (cherry picked from commit 09478b2211bbc9ec34d8de8452e30cf1254a250c)
2017-04-12tdf#105657 Treat "Precision as shown" for fractionsLaurent Balland-Poirier2-63/+93
For Option "Precision as shown", fraction must specificly be treated ImpGetFractionElements retrieves values of each part of fraction (integer, numerator, denominator) independently from its exact representation Update: avoid include of zformat.hxx in document4.cxx Change-Id: Ia3ea2322f3d311c04ef71f3260730c7154c3dc15 Reviewed-on: https://gerrit.libreoffice.org/34331 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 5706b29974c1c3ab0ba5a23685accf2fbebc3e06) Reviewed-on: https://gerrit.libreoffice.org/36365 Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 9f70f8761a8cc180171022ffcffc0094c4957057)
2017-04-08tdf#106190 Fix (again) left alignment of denominatorLaurent Balland-Poirier1-18/+11
Instead of moving spaces from left to right, like it was done previously, this patch insert spaces directly on right when in denominator This avoid complex calculation when user enter such (stupid) format: # ?/ ??? or # ?/" hello world "??? In SvNumberformat::ImpNumberFill, for NF_SYMBOLTYPE_FRAC_FDIV you need at least to move in sBuf, to insert text at the expected place for (stupid) format like # ?/ 100 or # ?/" hello world "100 All these formats works, but are stored in ODF with text after fraction Change-Id: I296e60643e93242b8006848a643135219ad4ad0c Reviewed-on: https://gerrit.libreoffice.org/35320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 2fd110a78d03510d031c4c6cf6ad380d82899df8) Reviewed-on: https://gerrit.libreoffice.org/36232 (cherry picked from commit 693c929c1a475e6b4bd737e50d09d6f390700812)
2017-03-16Following tdf#106190 Treat blank after fraction barLaurent Balland-Poirier2-6/+7
To consider that denominator is found (bDenom=true) there must be some digits found after fraction bar Dummy format # ?/ ? can now work again (even with blank as thousands delimiter). However such format can not be saved (except in XLS) Change-Id: I657e97e09a6ae4c08a29ad6d0b586c85a9968e3d Reviewed-on: https://gerrit.libreoffice.org/35111 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 4e1448d43e08d3f0a6ff67e75346e9559ad2af09) Reviewed-on: https://gerrit.libreoffice.org/35196 (cherry picked from commit f1a108f4dfd3d82dd39a9606f54a25a076ac516d)
2017-03-16string access out of boundsEike Rathke2-12/+21
This is a combination of 3 commits. string access out of bounds Change-Id: I4f6e6e8e77cdabe593bca5719b6ef38aeecc5da7 (cherry picked from commit 77a8cf7eaf638276030d1c5be8705f5603f071a9) prevent string access out of bounds Though only the closing 0-character and the following check excludes that, dbgutil asserts. Change-Id: Ife1299042a60f6f058c4cf58b406d1cc022786a7 (cherry picked from commit c407fff205a270e02fe07885805b7250e71c28f8) guard against a (theoretical?) endless loop of blanks only Change-Id: I68d6cca1b359aa8fba42663bddb1107c31102415 (cherry picked from commit fe73eff36718b6d99d0cf92d750c457872cc4dcc) Reviewed-on: https://gerrit.libreoffice.org/35043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 0f7a1bce18b08045fd98d5de99bb9ed69a7d474d)
2017-03-10tdf#106190 Move meber variable to localLaurent Balland-Poirier2-2/+1
Update b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c Change-Id: I8417dcf948e72376c7e67bee78df56c3021b55de Reviewed-on: https://gerrit.libreoffice.org/34913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 90cf564324ed9421f52742a0955bacab9407a872) Reviewed-on: https://gerrit.libreoffice.org/34921 (cherry picked from commit 439c820e873b6f6c1c9ce189d05ea7426c102b46)
2017-03-06tdf#106190 fix left alignment of denominatorLaurent Balland-Poirier3-13/+35
The bug was introduced with left aligment of denominator. Non feasable denominators were not tested and create infinite loop while inserting and removing the same space. This patch detects - if denominator starts just after fraction bar. Otherwise, format is faulty. - if a non digit is detected in the denominator, next part of format is treated as text This patch is changing behavior of some formats: "# ?/foo??" is treated as faulty format while it was considered as valid "# ?/??E?" is treated with 2 digits in denominator and "E?" at the end, while it was considered as faulty Change-Id: I0379a398dff79b6e21a44776c0d4356d066cdeab Reviewed-on: https://gerrit.libreoffice.org/34659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c) Reviewed-on: https://gerrit.libreoffice.org/34825 (cherry picked from commit 5be9863007d28ce543b0030ffef4c7d955a8e283)
2017-02-16Resolves: tdf#105968 handle engineering notation rounded into next magnitudeEike Rathke1-0/+11
Change-Id: Ie31ab88543994f0e8aeef8152c230c05e071ef8e (cherry picked from commit 63bc2b13cb344cce99348496838d7d2c2f690211) Reviewed-on: https://gerrit.libreoffice.org/34321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-11-22trivial makefile cleanupsMichael Stahl1-1/+2
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-18svl: assert SfxPoolItem::operator==Michael Stahl12-12/+12
Change-Id: Ia293c498682dd2ac86b15a74f06fd1ab389f9ba6
2016-11-17loplugin:unusedfieldsNoel Grandin1-2/+0
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin7-10/+10
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-13drop useless semicolonsDavid Tardon2-4/+4
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-13revert unintentionally committed linesDavid Tardon1-5/+0
Change-Id: I5cb355af20f18e63fdfe45e5946a9281fd1fa084
2016-11-13add missing dependencyDavid Tardon1-2/+7
Change-Id: I72696c82d9a96709746060ae18bd497da8715d35
2016-11-10make comphelper::sequenceToContainer a little smarterNoel Grandin1-1/+1
so we don't have to specify the source type Change-Id: I4106705a39874a8043f0f294a11374404d6cfc3a Reviewed-on: https://gerrit.libreoffice.org/30713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09tdf#102507 Add qa test of left aligned denominatorLaurent Balland-Poirier1-0/+5
New behavior of format # ?/??? gives for 3.5 3 1/2 instead of 3 1/ 2 Change-Id: I87f4a71fb13d8424017d557213bb4d279de28af5 Reviewed-on: https://gerrit.libreoffice.org/30167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin1-1/+1
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04use aggregate initialisation instead of memset for arraysJochen Nitschke3-18/+8
Change-Id: I084dee370e5c1096e51b8ff4073443c719688469 Reviewed-on: https://gerrit.libreoffice.org/30517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03Revert "remove unnecessary casts"Noel Grandin1-6/+10
This reverts commit fa80dae9a79a7414af8adcb91bc04dfff13bbb63. because current Clang master complains with /home/noel/libo3/svl/source/items/itemset.cxx:189:26: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] va_start( pArgs, nNull ); ^ /home/noel/libo3/svl/source/items/itemset.cxx:176:89: note: parameter of type 'sal_uInt16' (aka 'unsigned short') is declared here SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull, ...)
2016-11-03remove unnecessary castsJochen Nitschke1-10/+6
Which IDs are always sal_uInt16 and likely passed from defines Change-Id: I134358289ccd338ef1ff6ba963e25a524e790f4e Reviewed-on: https://gerrit.libreoffice.org/30498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03bin nranges.*, move remaining functions into itemset.cxxJochen Nitschke3-107/+84
Change-Id: I1b88d98e00415e9c32a48486912d577a00fbfbda Reviewed-on: https://gerrit.libreoffice.org/30486 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01add an assert to check for ref-counts > 16 bitsNoel Grandin1-1/+5
after commit 87c518593de59dbf4c0f5f45c720b14a05aeca9e sc: remove antique reference counting hacks from ScDocumentPool In theory, nothing should be trying to save items like this anymore, but lets make the error more obvious in case something is. Change-Id: I89b3637168c072d20e214a8f6338f6336d44d891 Reviewed-on: https://gerrit.libreoffice.org/30467 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-11-01simplify loop to O(n)Jochen Nitschke1-19/+10
Change-Id: Ib14da0201730e213f15f4f46b539fc843bfbe750 Reviewed-on: https://gerrit.libreoffice.org/30454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31loplugin:oncevar in svl..svxNoel Grandin1-9/+5
Change-Id: I80b11a7b698de4b84d7a2f4c7dc62b2e4fd8bb01 Reviewed-on: https://gerrit.libreoffice.org/30438 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31fix use of is_sorted_untilNoel Grandin1-6/+21
fix for "comparison doesn't meet irreflexive requirements, assert(!(a < a))" as a consequence of author Jochen Nitschke <j.nitschke+logerrit@ok.de> commit e75561bd19faa332c077ec249a397d056fae63f2 bin SfxUShortRanges, inline and rewrite only usage seems that std::is_sorted_until has stronger requirements than we actually want here, so open-code a similar algorithm Change-Id: I126584d9146137b9ac699dad85fd9691490dc30d Reviewed-on: https://gerrit.libreoffice.org/30435 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-10-30bin SfxUShortRanges, inline and rewrite only usageJochen Nitschke2-254/+52
only use was to merge 2 range tables in SfxItemSet::MergeRange of which one table always contained a single range. rewrite the merge algorithm (SfxUShortRanges += operator). sort new range into the table of ranges and merge overlapping ranges afterwards. Not as optimal as the original code but it's short, maintainable and works without 'goto' inline the DBG_CHECK_RANGES macro Change-Id: I991c050f069d44fe72b3ea374863f5f26e7099e9 Reviewed-on: https://gerrit.libreoffice.org/30299 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-29silence false positive warnings in non DBG_UTIL buildsJochen Nitschke1-6/+2
Change-Id: I80428ebe570584fc7a31581207da0b27a16949af Reviewed-on: https://gerrit.libreoffice.org/29244 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-28svl: more SfxPoolItem assertsMichael Stahl1-2/+3
Change-Id: Ic73fe09fc401359f043269fc8e5a1910fc8ddb02
2016-10-28svl: SfxPoolItem reference counting assertionsMichael Stahl1-2/+2
Change-Id: Ice2ec9a4592a1fad36913ae7d089aa8c63dfc669
2016-10-27loplugin:expandablemethods in stoc..svlNoel Grandin4-49/+18
Change-Id: I7dd701ef07a14f70589b87154bfeeda7530b628f Reviewed-on: https://gerrit.libreoffice.org/30316 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27remove unused variableJochen Nitschke1-6/+3
aSet unused since 2ebd79b3d214c62c0997606115ebc50700d6a760 loplugin:constantfunction: svl Change-Id: I48faf8775465ec1d5e3df94343a4373a87d03e6d Reviewed-on: https://gerrit.libreoffice.org/30310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26svl: the compiler can generate the same SfxGrabBagItem copy ctor itselfMiklos Vajna1-13/+2
Change-Id: I54f94e8ec710ca117ecdf33ebe97a0e5f07c59ec Reviewed-on: https://gerrit.libreoffice.org/30283 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-26untangle .cxx include in itemset.cxxJochen Nitschke3-4/+6
Change-Id: I0102ad82d82c8f0e9f8939512bae83424613c54e Reviewed-on: https://gerrit.libreoffice.org/30281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-24tdf#103060 Format "GGG" as the era name of a locale-dependent calendarTakeshi Abe2-0/+24
by default, as Excel does. This change applies to "GG" and "G" as well. Note that nothing changes for Italian locale, in which "GGG" stays as a placeholder for day of week. Change-Id: Iad68f6a9548b7229930c0e0c518fdb29bfaa026f Reviewed-on: https://gerrit.libreoffice.org/29724 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-10-20loplugin:expandablemethodds in svxNoel Grandin1-3/+2
Change-Id: I45447b6f5cf7e17d6e81e8c931b07b26d41b9a8c Reviewed-on: https://gerrit.libreoffice.org/30057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19replace <<= with assign for <<= with rhs AnyJochen Nitschke2-7/+7
queryAggregation and queryInterface return Any Change-Id: Ib8e3e742bd66f7419cad583988b247bb628f7b4a Reviewed-on: https://gerrit.libreoffice.org/29912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-17let LanguageTag::convertToLocale() decide when to create a temporaryEike Rathke1-1/+1
Change-Id: Id4e718eb23d4acf2ee7bddc4da1cd4e8e811be78
2016-10-15clang-cl loplugin: svlStephan Bergmann6-89/+92
The DdeInternal::Cli/SrvCallback functions apparently had broken signatures for 64-bit Windows (32-bit DWORD vs. 64-bit ULONG_PTR parameters), but I assume that was actually harmless, as I think that, for Windows x86-64, those arguments are pushed on the stack right-to-left (regardless of CALLBACK), and they are the last arguments, and SrvCallback doesn't look at them at all, and CliCallback only looks at the lower 32-bit DWORD of the first one (nInfo1). Change-Id: Id77749dd2d29180e2d11b0ae2ad248ac1a7f1bdf Reviewed-on: https://gerrit.libreoffice.org/29848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-14DdeInternal::InfCallback is unusedStephan Bergmann3-36/+0
...since b5863b83d212ae344cefe0aefdfd4caddaded02b "Remove classes DdeServiceList & DdeTopicList" Change-Id: I9cd90cb6b50f72966210c0035034cdc6b6d2230c Reviewed-on: https://gerrit.libreoffice.org/29819 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-14loplugin:countusersofdefaultparams in sot..svtoolsNoel Grandin1-1/+1
Change-Id: Ifce19de3518f3eaf5a1b6439f9053feee4a33c14
2016-10-12improve commentNoel Grandin1-4/+4
Change-Id: Ia45916169c10b1c8bb712c9c21ce2df6cda37245
2016-10-10tdf#36038 Import extended LCID from ExcelLaurent Balland-Poirier1-30/+277
Extended LCID were only supported for Thai. This commit import also for some other numerals and calendars. Change-Id: Id92a0ee2a32c5722e9674fe0ac5ff7028c84bca6 Reviewed-on: https://gerrit.libreoffice.org/28809 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-10-10tdf#36038 Export to Excel extended LCIDLaurent Balland-Poirier1-35/+158
Number format: extend export to Excel of long LCID for other languages and calendars than only Thai and Buddhist Change-Id: I826347302d14caa5b4463d28cd25f2c36ebfef5d Reviewed-on: https://gerrit.libreoffice.org/28666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek1-2/+2
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-08svl: convert DBG_ASSERTs to assertMichael Stahl2-16/+14
Change-Id: Ied13d6588e1c6677898a8151fa881804c3c58ff1
2016-10-08svl: convert some DBG_ASSERT to assertMichael Stahl2-16/+8
Change-Id: Id859f5584b52849d5a40e0f9946e0bf58761fbcb
2016-10-07tdf#102370 Correctly export to Excel exponent without signLaurent Balland-Poirier1-2/+5
Exponent without sign in scientific notation is coded in Excel with a minus sign replacing plus sign: 0.00E-00 for instance This format is already correctly treated in Calc but was not correctly exported to Excel or ODF Change-Id: Ide117b04e0eb887c6cdd6699ae8ec723d1d29d50 Reviewed-on: https://gerrit.libreoffice.org/29198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-10-07svl: remove #include windows.h from svdde.hxxMichael Stahl2-24/+35
Move Win32 stuff over to DdeInternal class where it can be better encapsulated. Change-Id: Ia3d4c72cf7ad1b7d54bef5d175c579cd426407e7