summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-13bccu#4204: Writer: Saving this damaged file as DOCX crashescoas-0.3.0Tamás Zolnai
Change-Id: I526864d6a425220d342bcf0b5a195f420cbf1563 Reviewed-on: https://gerrit.libreoffice.org/77381 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-08-08tdf#126748: temporary hack to avoid crash when several pivot tables ...Mike Kaganski
... reference a single cache, and have different sets of group fields. The problem is getting group field names from the tables referencing the cache; so when a table referencing not all group fields happens to be first in the reference list, the returned name is empty. The hack just stops writing group fields as soon as it finds an empty name; this naturally leaves bad cache data behind, but at least doen't crash. The retrieval of the names should be reimplemented using a different source, to not depend on tables referencing the cache. Regression after commit b082998401e37e6c7534906601bc481423a6ded0. Change-Id: Ib2e92f8acf93a801861c6ba5c68fab3bebe3672c Reviewed-on: https://gerrit.libreoffice.org/77110 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/77129 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-08-07Auto-redact - First stabMuhammet Kara
Add a SfxRedactionHelper::autoRedactPage method which searches for the given term through the gdimetafile which has the whole content of an xPage (a Draw page), and draws redaction rectangles at proper positions with proper sizes. The search is case sensitive, and finds only the first occurences on a line. Will switch to a proper search provider via a follow-up patch. Change-Id: If3db62e50994670143785b6727fdcf1ccd4c6f8e Reviewed-on: https://gerrit.libreoffice.org/68597 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/77015 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-08-07Add some set methods to tools::RectangleMuhammet Kara
Used in the redaction search method Change-Id: I16913c5e935f5611a23290afa45232f1d44ae8e9 Reviewed-on: https://gerrit.libreoffice.org/77072 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-08-06vcl: separate SalLayout from the rest of sallayout.hxxMiklos Vajna
This way SalLayout can be created separately (and potentially reused) outside vcl as well. Don't reformat the moved code, so git blame keeps working. This is a first step towards the goal of <https://wiki.documentfoundation.org/Development/Budget2017#Text_layout_performance>, in the context of code outside vcl. Change-Id: I8b40313b5fa531d3b56c153cbc4b5ca3cec8f8df Reviewed-on: https://gerrit.libreoffice.org/58851 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/77064 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-08-05tdf126701: MSForms: Fix import of date field at the end of the paragraph.Tamás Zolnai
We need to create date field before the paragraph is finished (line break is inserted). A date field can not span between paragraphs. Extend other related unit tests too. In other use cases, the field content changes to an invalid data. Reviewed-on: https://gerrit.libreoffice.org/76971 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit b36ef83ea59eeaca239e58b95aa0b1acdcb99efc) Change-Id: Id274649e0aaaf6e3c31e042afd126cefc368c858 Reviewed-on: https://gerrit.libreoffice.org/76980 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-08-05decode url escape codes and check each path segmentCaolán McNamara
Change-Id: Ie8f7cef912e8dacbc2a0bca73534a7a242a53ca1 Reviewed-on: https://gerrit.libreoffice.org/76396 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins (cherry picked from commit 8c51b91f13b391982084e5d4081b219d9e19308f) Reviewed-on: https://gerrit.libreoffice.org/76945 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/76985
2019-08-05expand LibreLogo check to global eventsCaolán McNamara
Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f Reviewed-on: https://gerrit.libreoffice.org/76195 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 8f227049a79668b93c5433e6bce7f55cc2c34d43) Reviewed-on: https://gerrit.libreoffice.org/76955 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-08-02sw comments on frames: no overlay in the LOK API, either: insert caseMiklos Vajna
This is similar to commit 28fcb7d86765194b4015e7023449333f43aba0c5 (sw comments on frames: no overlay in the LOK API, either, 2019-07-16), but that one handled the initial fetch of comment states, while this one does the incremental updates. With this, there is no overlay on commented images right after inserting them. (cherry picked from commit 225930119543975697d3f5f042e271f0ec6c6b15) [ cp-6.2 backport note: added explicit IsEmpty() check, otherwise we would expose negative width/height for empty rectangles via LOK, which doesn't happen on master. ] [ cp-6.2 backport note: use the comphelper::dispatchCommand() variant that takes no explicit frames, the default frame seems to working here and we can't be explicit on this branch. ] Change-Id: I060303806a6611b113b4813300ed1cafd0b654fa Reviewed-on: https://gerrit.libreoffice.org/76880 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-02sw comments on frames: improve doc coordinates -> doc model pos conversionMiklos Vajna
In case an as-char image at the end of a paragraph was commented and the user clicked past the end of the paragraph, we defaulted to extending that comment, rather appending content. (The cursor was placed between the as-char image and the comment anchor, not past the comment anchor.) This doesn't seem to be useful, probably the expectation is that if the user clicks before the comment anchor then we extend the comment range, and if the click is after the comment anchor, then we don't. In both cases we used to *select* the comment anchor, so typing a character deleted the comment instead. This commit is a step in the direction of never selecting the comment anchor: now if you click past the comment anchor, then we place the cursor after the comment anchor. (But clicking before the comment anchor results in unchanged behavior for now.) (cherry picked from commit 27c46ecf34b32bae1806d3fc0e1684179301feb8) Conflicts: sw/qa/extras/layout/layout.cxx sw/source/core/text/itrcrsr.cxx Change-Id: I6c36ec4344591fdf330a73bcd3cdd6fd0610e339 Reviewed-on: https://gerrit.libreoffice.org/76839 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-01mysqlc: Add test for textual blob typesTamas Bunth
Test setting and querying the following data types: TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT Test them using prepared statements. Change-Id: I43387034ad8c32c3731cde70a22cc8b3dd652b78 Reviewed-on: https://gerrit.libreoffice.org/76749 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-08-01MSForms: DOCX filter: fix crash when the date field is inside a shapeTamás Zolnai
Change-Id: Ida6ff48e6e743e41dd793e31c11065f870e8959b Reviewed-on: https://gerrit.libreoffice.org/76117 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit d163b651dc3dd017cdb3327d87a7cf88003238e9) Reviewed-on: https://gerrit.libreoffice.org/76206 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2019-08-01Disable testDateFormFieldCurrentDateInvalidation test only for WindowsTamás Zolnai
Change-Id: Id267d118b509177f93f3c440a03d05feb532cd34 Reviewed-on: https://gerrit.libreoffice.org/75613 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/75620 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2019-08-01tdf#126414: MSForms: fix flickering of date field button on WindowsTamás Zolnai
Need to ignore empty paint area parameters. Change-Id: I195d7bf9b3914199984f4a732d7616520d51dbba Reviewed-on: https://gerrit.libreoffice.org/75708 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 13a2db4941447001b81b077ee587903ae84cfc91) Reviewed-on: https://gerrit.libreoffice.org/75762 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2019-07-31mysqlc: Support reading blob as stringTamas Bunth
Change-Id: I1ef0c3817bc255e7f0c38aca73c475b19d5d7d9b Reviewed-on: https://gerrit.libreoffice.org/76600 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/76734 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-07-31mysqlc: Fix query of cursor position in result setTamas Bunth
Fix queries like "IsAfterLast" in result sets of prepared statements in the mysql driver. Cursor position is stored in the driver, since the mysql C driver does not support the query of the cursor position. The cursor position works the following way: - 0 means the cursor is on "BeforeFirst". In that state calling of getXXX() methods is user error. - 1 means the first row is already fetched. - n means the last fow is fetched, where n is the total number of rows in the result set. - Everything bigger than n is "AfterLast" Change-Id: I131f2042606897019cc0f868dbc4151faf4850ac Reviewed-on: https://gerrit.libreoffice.org/76549 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/76583 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-07-31tdf#125800: accessing cond format props in UNO throws errorAron Budea
These conditions were always evaluated to true: OR should become AND when negated. Regression from 8c637b47d9de4b3a64c33a9c2ffe7ed220be2467 Change-Id: I87038319ed27eff2bed2412da49e01f73ec0a79c Reviewed-on: https://gerrit.libreoffice.org/76493 Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 9ad8f83912e6cf14d7b3b3e1cb2a79d819247c82) Reviewed-on: https://gerrit.libreoffice.org/76705 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-07-30lok: send cell selection rectangle and cell area fill rectangleTomaž Vajngerl
Instead of text selection start/end for cell selection we send a cell selection rectangle event. This is needed so we're able to differentiate when to draw cell selection and text selection markers. In addition send cell fill area rectangle, which is the area where we need to hit to trigger area fill functionality in Calc. Reviewed-on: https://gerrit.libreoffice.org/76491 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 23ed3a19cb0d53639d817af9b802a44977e89c65) Change-Id: I54af958932815818a1a4d48364192ba43f1df7de Reviewed-on: https://gerrit.libreoffice.org/76571 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-30tdf#125568: We need the selection string also when not "in selection mode"Tor Lillqvist
Apparently being "in selection mode" has nothing to do with whether we have a selection that we are enlarging by dragging the end marker? Change-Id: I546a1685bd3a0102e16c1f8bc6e721819ed986e2 Reviewed-on: https://gerrit.libreoffice.org/76588 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-30calc: simplify getDocumentSize calculation.Michael Meeks
Change-Id: Iee2ebf2c6ed74651556647264f519caa9c59dad7 Reviewed-on: https://gerrit.libreoffice.org/76558 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-24Accept also iOS SDK 12.4Tor Lillqvist
Change-Id: Ia5ff5cc48d744ec4ac0f1a27a0d850ce23a46f26
2019-07-24LOK: Emit the doc. modified state even when changing the cell inline.Jan Holesovsky
The "LOK: emit modified status on entering cell data" patch did this only for the formula input line, and did not change the state when the user just clicked on the cell and started modifying it; so this patch extends it. Also change the actual DocumentModified state of the document directly instead of just sending a flag, so that the state in LOOLWSD and in the core don't get out of sync. Change-Id: Ie516ce5a74d94247d79cf993517d7f4a6657cc94 Reviewed-on: https://gerrit.libreoffice.org/75701 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-24Silence upcoming GCC 8 -Werror=parentheses in external/boostStephan Bergmann
...reporting such delights as > [CXX] sal/cppunittester/cppunittester.cxx > In file included from workdir/UnpackedTarball/boost/boost/mpl/aux_/na_assert.hpp:23, [...] > from external/boost/include/boost/algorithm/string.hpp:25, > from sal/cppunittester/cppunittester.cxx:60: > workdir/UnpackedTarball/boost/boost/mpl/assert.hpp:188:21: error: unnecessary parentheses in declaration of ‘assert_arg’ [-Werror=parentheses] > failed ************ (Pred::************ > ^ where boost/mpl/assert.hpp contains > template< typename Pred > > failed ************ (Pred::************ > assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ) > ); Reviewed-on: https://gerrit.libreoffice.org/48386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit b3b22ee3de5ddfc73e44a2d425450b1deeb3ed0d) Change-Id: I6976b2cc23f1d309d27d3fde9098b10c9d877599
2019-07-24More uses of referer URL with SvxBrushItemStephan Bergmann
Reviewed-on: https://gerrit.libreoffice.org/73643 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit b518882de8213ef71a8003f95fbdf7689069c06d) Conflicts: sw/source/core/text/porfld.cxx sw/source/core/unocore/unosett.cxx Reviewed-on: https://gerrit.libreoffice.org/73860 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 87c418a98650ab6e4a62a0b4b72e02fee358dced) Change-Id: I04b524784df4ef453d8b1feec13b62f183a17e23
2019-07-22vcl: Numeric/MetricBox formatting of decimals is controlled via a flagAshod Nakashian
Currently only the Animation Pane duration control uses the always-visible decimals. By making it controlled via a flag it is now flexible and avoids regressions in other controls. Change-Id: I324fa6944daaab311725ae6593e763b140315ae7 Reviewed-on: https://gerrit.libreoffice.org/76082 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-07-20band-aid: deprecated-declarations related to cupscoas-0.2.0Julien Nabet
Change-Id: I07438840fc1c3cc8e70559d44954be0c49531525 Reviewed-on: https://gerrit.libreoffice.org/64191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit e9e49fceac43476d1233ee8106cba5f4831771b9)
2019-07-20band-aid: deprecated-declarations related to gtkJulien Nabet
Don't hesitate to revert this one but only if there's a patch to fix it. Change-Id: Ib15352e1a94d0542120f6710acfe19887494ed51 Reviewed-on: https://gerrit.libreoffice.org/61142 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 618d474f059a75c2ac04df16c830d71a88690118)
2019-07-20Band-aid fix for deprecate gtk_css_provider_get_defaultJulien Nabet
by gtk_css_provider_new Don't hesitate to revert this one but only if there's a patch to fix it. Change-Id: Id91fefb689326a31e029a788bd3729e670fe3100 Reviewed-on: https://gerrit.libreoffice.org/60915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 003bc12a3c11d67e54c14d1bc48fb8bba56ec49c)
2019-07-20fix pyuno compile on Fedora29Noel Grandin
'PyUnicode_GetSize' is deprecated [-Werror,-Wdeprecated-declarations] Change-Id: Id298d6a2b0af9ce418f9124c9addda55fcdc0318 Reviewed-on: https://gerrit.libreoffice.org/62687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 485ec8e14306352f44056bcb644bb4cacdb6490a)
2019-07-17sw comments on frames: no overlay in the LOK API, eitherMiklos Vajna
So that the Online and the desktop rendering result match. (cherry picked from commit 28fcb7d86765194b4015e7023449333f43aba0c5) Conflicts: sw/qa/extras/uiwriter/uiwriter2.cxx [ cp-6.0 backport note: added explicit IsEmpty() check, otherwise we would expose negative width/height for empty rectangles via LOK, which doesn't happen on master. ] Change-Id: Iabc62e74f5ce5880b663b4d7217c81729592a356 Reviewed-on: https://gerrit.libreoffice.org/75766 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-17sw comments on frames: avoid overlay that covers only an as-char imageMiklos Vajna
As-char images had their comment arrow on the bottom left corner, as-char ones had it at the bottom right one. Standardize on bottom left and avoid the content overlay in case only the frame itself is selected. See commit cf5a3cb687a502e7f71cefb5f7001a73925bee56 (Adapt new test to actual values observed on macOS, 2019-06-24) on why the test is not for macOS, till somebody can check if this is working there properly. (cherry picked from commit 3fb7ffeb85d87551ffcddd63b7c90c6b0e573e5f) Conflicts: sw/qa/extras/uiwriter/uiwriter2.cxx Change-Id: I83516ea558182ecc7362f8383894ed07a16d3ad2 Reviewed-on: https://gerrit.libreoffice.org/75765 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-16Fix build for iOS simulatorTor Lillqvist
Change-Id: Ia5a71b41848d4863836dcddb33a26f3bd0a5a576
2019-07-16sw comments on frames: avoid overlay that covers only an at-char imageMiklos Vajna
The comment is already attached to the image via the anchor, and the overlay would change the image, which is confusing. (cherry picked from commit 5914fae974875366026bb3b1245ef8bffeadd7d2) Change-Id: I7a1c2a25182f628effa224fb82b5bcd71fdf35d4 Reviewed-on: https://gerrit.libreoffice.org/75685 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-16fix warning: "TRACE_LINKS" is not defined [-Wundef] in non-debug buildAndras Timar
Change-Id: I236a9cb312c02ed1f08a77a37e334afce10fa0ce Reviewed-on: https://gerrit.libreoffice.org/75672 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-15sw: fix TransformDialog with args when the shape moves to a different pageMiklos Vajna
When a macro or Online invokes .uno:TransformDialog with arguments, then instead of showing the dialog, we apply the position/size/etc settings to the currently selected shape. This was not working correctly when setting an absolute twips position where the old and the new containing page frame was different. The desktop case drag&drop invokes SwFEShell::EndDrag(), which uses SwFEShell::ChgAnchor() to maintain the invariant that a draw shape position and its anchor is contained within the same page frame. The same was not true when SwDrawBaseShell::Execute() calls SdrEditView::SetGeoAttrToMarked(), so extend that a bit to also update the anchor position. With this, moving down a shape from the 1st page to the 2nd one via the API works and updates the anchor correctly, while in the past the move was only possible within the bounds of the current page frame. (See the "determine and set position" code in SwAnchoredDrawObject that enforces this invariant when the anchor is not updated.) (cherry picked from commit c54597a8905b07807952aebc24237549302fb941) Conflicts: sw/qa/extras/uiwriter/uiwriter2.cxx Change-Id: Ia54470f6f3679ddc78a2f0a842f2fca10d20084d Reviewed-on: https://gerrit.libreoffice.org/75365 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-15Link: support tracing link source and targetAshod Nakashian
By adding a couple of members to Link, we are now able to trace the target function name and the file:line where the Link instance in question was created (provided the LINK macro is used). This gives the invaluable ability to track down the source of a Link instance in the debugger, provided we have enabled this feature, which is enabled in DBG_UTIL automatically, unless explicitly enabled. Of course it is also possible to judiciously add LOG/fprintf statements to chase this info, if not outright track all links, if so we wish, by dumping from Link::Call, or at construction time of Link. Change-Id: Iab1dce31a179d28aaa1f20228e9e0405973b5e9b Reviewed-on: https://gerrit.libreoffice.org/72208 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-15vcl: better decimal handling in NumericFormatterAshod Nakashian
When the user deletes the decimal point from MetricBox, it ends up with the number with the fractional portion (to the right of the decimal point) appended to it, which is (with two decimal points) a 100x larger value. This makes such editing smarter. In the case that we detect that the user deleted the decimal point (which we know should've been there, because we have a configured fixed number of decimal points,) we restore it. This makes it more intuitive, since when the user enters digits, they get the correct and expected result, but when they delete the decimal point, they almost always didn't mean to grow the number 100x. If that was the goal, they could enter two extra digits before the decimal point. In addition, we set the default maximum to a more user-friendly value of a million, instead of int-max, which seems like a random number to the uninitiated. Change-Id: Ib535f06e4f111d20f35c4209ad65969dca5928e8 Reviewed-on: https://gerrit.libreoffice.org/75511 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-15sw: fail loading when the fallback text detection failsAshod Nakashian
When we document in question fails to match any known type, we try to open as plain text (and convert to a Writer doc). However we should not display non-text when we have failed to detect ascii or unicode contents in the file. This happens with corrupted documents, for example, where we end up displaying non-printable binary data. Change-Id: Iccc158a4cb6051a8b17ba01987a30a9882a27fa9 Reviewed-on: https://gerrit.libreoffice.org/75512 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-15LOK: emit modified status on entering cell dataAshod Nakashian
Entering data into a cell without committing will normally not set the modified flag. However clients might want to know whether there is in-flight changes when they need to save the document. A possible scenario is that the user enters some cell data and then closes the window. Both WSD and the client app would here rely on the modified notification to decide whether to save the document or not. We do not change the document modified state, since that may be incorrect (in case the user actually cancel the cell entry), so we preserve that so future updates to the modified status would reflect the correct state of the file. Instead, we emit a client notification that the document has been modified, to signal them that saving is sensible. Note that ideally we would undo this when the user cancels the cell edit, but that would be complicated due to multi-editor scenarios. For example, another user might actually edit the document while we cancel our cell edit, and in this case we should not reset the modify flag. Since this is unreliable, we leave the flag set, unless the Core emits an update, which will surely be accurate. Change-Id: Id26aa6f8ce2c0a08f8bee6812fcf99275dc24551 Reviewed-on: https://gerrit.libreoffice.org/75513 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-15tdf#126241: make sure to fill input stream before LockOrigFileOnDemandMike Kaganski
Otherwise, the function returns early, without providing lock file information to the caller. Change-Id: I1740ff0f5a982f7b22f9e3dcdf97631ab6ea6fe0 Reviewed-on: https://gerrit.libreoffice.org/75465 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/75496 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-15Restore original value of SID_DOC_READONLY item on cancel or SID_EDITDOCMike Kaganski
Otherwise, SfxObjectShell::DoSaveCompleted later calls SfxMedium::LockOrigFileOnDemand, which sets error state for the medium reopened in read-only mode, as if it were opened in read-write mode. Change-Id: Ib2df62470878ea609552ccc76df84a3fdde30646 Reviewed-on: https://gerrit.libreoffice.org/75413 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit df9adfc95429bdaf085e9927ec5b326cee6b7a2a) Reviewed-on: https://gerrit.libreoffice.org/75493 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-14MSForms: Test date fieldmark's content and current date related methodsTamás Zolnai
These methods are used by the field's properties dialog, it's drop-down button and DOCX export. Reviewed-on: https://gerrit.libreoffice.org/75463 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit d0ff1090762ac61ce08f54bc76685232699d98a0) Change-Id: I2b75e69b452a736cc72785d251516f3b3bf1d1f1 Reviewed-on: https://gerrit.libreoffice.org/75555 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: date field: handle replacing empty contentTamás Zolnai
It occurs when the date field is empty and the user trying to set a date with the date picker. Change-Id: I182930258b05071d861c2b326c139c73e2339af9 Reviewed-on: https://gerrit.libreoffice.org/75461 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit fcb36a995dde68456b862db8a931b98176f9eca7) Reviewed-on: https://gerrit.libreoffice.org/75554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: Test import / export of character formatting for date fieldTamás Zolnai
* With the rework, now the character formatting is fully supported. * Remove the other related test, which tested only a interop grabbag implementation. Reviewed-on: https://gerrit.libreoffice.org/75460 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 01f6c6ad6ba1adce817daa782bf3520fafc512a0) Change-Id: I598a21691c08a161933a5fef659e7ca21092dd0c Reviewed-on: https://gerrit.libreoffice.org/75553 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: Rework text-based date form field's representationTamás Zolnai
* Better to represent it similar to text form field with two marking characters selecting a text range * So the text between the two marks can be anything (not only a well formatted date) and also have any character formatting. * With this we handle the case when the user needs a placeholder text in the date field or when the user needs time values (hour, minute, sec) next to the date. Reviewed-on: https://gerrit.libreoffice.org/75459 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 68e1be4ccbb90ee9a788962219a88312c4ffbea2) Change-Id: Id60a50a2028058f8a6a080e265c0730d88b98543 Reviewed-on: https://gerrit.libreoffice.org/75552 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: DOCX filter: handle export of empty date from controlTamás Zolnai
* It's converted to date content control which is imported as text-based date control. * By now, we don't need to set a dummy text for empty date. Reviewed-on: https://gerrit.libreoffice.org/75458 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 6fd9987ae650bb2f0dd40aec95662a75c9a85598) Change-Id: I29b2a72e3ae2722c1d765c4fcb9bd13052619372 Reviewed-on: https://gerrit.libreoffice.org/75551 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: DOCX filter: The new text-based date field is allowed in the header.Tamás Zolnai
Reviewed-on: https://gerrit.libreoffice.org/75457 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit a50d82eca96d04b4cea1ea2c7b3610bf9ed951f0) Change-Id: I71d61c702ccd0470c4c3df09531704783c1b3e01 Reviewed-on: https://gerrit.libreoffice.org/75550 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: DOCX filter: update testN820509() testTamás Zolnai
* Now we import date field as date form field and not as date form control. * Design mode has no interaction with this kind of field, so we don't need check the design mode status. Reviewed-on: https://gerrit.libreoffice.org/75456 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 695da4b0e6c7bf1c9f99f2886b2c261ff9b557f0) Change-Id: I5dc2abc33f307d934771e4f6608d1c3a9ed71b0b Reviewed-on: https://gerrit.libreoffice.org/75549 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: DOCX filter: reenable passing testTamás Zolnai
Change-Id: I566a65fa4ece6500128ceeb497c01f1c6e38470c Reviewed-on: https://gerrit.libreoffice.org/75455 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 6c256a1235f1a2ac3536d152edc8c3bee9b15022) Reviewed-on: https://gerrit.libreoffice.org/75548 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-14MSForms: DOCX filter: handle date formats with quotation marks.Tamás Zolnai
Reviewed-on: https://gerrit.libreoffice.org/75454 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 9c2feb75a6104d4376cccb157244dd7f6e88968a) Change-Id: I61cc6d47200acdd55f147b4f1829330dec8562a0 Reviewed-on: https://gerrit.libreoffice.org/75547 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>