summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xecontent.cxx
AgeCommit message (Collapse)Author
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04tdf#145079 XLSX export: fix regression of internal hyperlinksTünde Tóth
Hyperlinks with internal named range targets didn't work. Regression from commit 3c3b9ad8886da916027f0fb940a2df822d63d4d7 (tdf#143220 XLSX export: fix hyperlink to sheet target) Note: original test case of the unit test document of tdf#143220 wasn't changed. It's only extended with two new test cases for verifying the fix for the regression. Change-Id: I8128ebb977dba7304bc9c69e45f6c55c71f800cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123816 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I8553b1e2b1c3461fa55eb19593b1a97ed9e7ab1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121433 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26tdf#143220 XLSX export: fix hyperlink to sheet targetTünde Tóth
Hyperlink to another sheet didn't work in Excel. Change-Id: Ic63e581d5de8f7ff1eac50a5e56a51d7ba2e72ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118935 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-30tdf#140431 XLSX export: fix double file:// prefixTünde Tóth
Regression from commit: fc58d7d65b9683db7b7632137126680b8483f6c5 (tdf#129969 XLSX export: file URLs need IURI encoding) Change-Id: I5bfb0ef9ba7fe82cd3f4d0e0b3fdcf8f705cba64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118090 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-04-27use string_view in INetURLObject::decodeNoel Grandin
Change-Id: I10e04970ceac33c9c3fbfd0182dd2140e06cb80b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-30tdf#84874 XLSX export: truncate validation textTibor Nagy
Maximum length allowed in Excel is 255 characters for title and message of validation input and error, so truncate them, otherwise Excel throws away the whole message. Co-authored-by: Attila Szűcs (NISZ) Change-Id: Id4576f167ab8a39e0cd943bc07c2e465a77ba665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104547 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-26tdf#129969 XLSX export: file URLs need IURI encodingTünde Tóth
External hyperlinks with # in directory name didn't work after XLSX export. Change-Id: Ibdf4fcbb65d0c580841d24c1721454164e341424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104272 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-19tdf#90104 XLSX export: fix commas in data validation listTibor Nagy
Comma was exported as list separator instead of decimal separator, messing up the data validation list by breaking integer and fractional parts of a number to two integer numbers, for example the 2-item list 1,5, 2,5 to the bad 4-item list 1, 5, 2, 5. Note: for testing with numbers, it needs to set decimal separator to comma in locale settings. Co-authored-by: Attila Szűcs (NISZ) Change-Id: I6133c402b47aab8ed9f02b412762404fc520badc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104240 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-11tdf#126305 XLSX export: fix data validation Error AlertTibor Nagy
Excel supports three kinds of error messages: stop, warning and information, but LO only one of error message(stop) was exported. Co-authored-by: Attila Szűcs (NISZ) Change-Id: Iecf790c104bee39ee29629a13fe4af4d8b29d311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104021 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-10-05Related tdf#137167: reference Excel pb on limitation for data validity formulaJulien Nabet
Change-Id: I6910b761dc99c7a58c7fc1f84c4606ad8dbd729c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103913 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-09-04Make many OUString functions take std::u16string_view parametersStephan Bergmann
...instead of having individual overloads for OUString, OUStringLiteral, and literal char16_t const[N]. (The variants taking OUString are still needed for !LIBO_INTERNAL_ONLY, though. The variants taking ASCII-only literal char const[N] are also left in place.) This nicely reduces the number of needed overloads. std::u16string_view allows to pass as arguments: * OUString * OUStringLiteral * OUStringChar (with the necessary conversion added now) * OUStringNumber * u"..." char16_t string literals * u"..."sv std::u16string_view literals * std::u16string, plain char16_t*, and more A notable exceptions is OUStringConcat, which now needs to be wrapped in OUString(...), see the handful of places that needed to be adapted. One caveat is the treatment of embedded NUL characters, as std::u16string_view(u"x\0y") constructs a view of size 1, while only u"x\0y"sv constructs a view of size 3 (which matches the old behavior of overloads for literal char16_t const[N] via the ConstCharArrayDetector<>::TypeUtf16 machinery). See the new checkEmbeddedNul in sal/qa/rtl/strings/test_oustring_stringliterals.cxx. The functions that have been changed are generally those that: * already take a string of determined length, so that using std::u16string_view, which is always constructed with a determined length, is no pessimization (e.g., there are operator == overloads taking plain pointers, which do not need to determine the string length upfront); * could not benefit from the fact that the passed-in argument is an OUString (e.g., the corresponding operator = overload can reuse the passed-in OUString's rtl_uString pData member); * do not run into overload resolution ambiguity issues, like the comparison operators would do. One inconsistency that showed up is that while the original replaceAll(OUString const &, OUString const &, sal_Int32 fromIndex = 0) overload takes an optional third fromIndex argument, the existing replaceAll overloads taking OUStringLiteral and literal char16_t const[N] arguments did not. Fixing that required a new (LIBO_INTERNAL_ONLY) rtl_uString_newReplaceAllFromIndexUtf16LUtf16L (with test code in sal/qa/rtl/strings/test_strings_replace.cxx). Another issue was posed by test code in sal/qa/rtl/strings/test_oustring_stringliterals.cxx that used the RTL_STRING_UNITTEST-only OUString(Except*CharArrayDetector) ctors to verify that certain function calls should not compile (and would compile under RTL_STRING_UNITTEST by taking those Except*CharArrayDetector converted to OUString as arguments). Those problematic "should fail to compile" tests have been converted into a new CompilerTest_sal_rtl_oustring. Change-Id: Id72e8c4cc338258cadad00ddc6ea5b9da2e1f780 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-08loplugin:flatten in sc/filter/excelNoel Grandin
Change-Id: I48ab5b20a3345cd40d4715c3ff025d2df3b491fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-07Use std::optional to allow optional inclusion of attributesMike Kaganski
... instead of converting the O(U)String objects to char*. Eventually this could allow to drop variants of *Element that take XFastAttributeListRef. Change-Id: Ib2748fcd93e655c55a176c00410fdcc7f052930d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-06Don't explicitly convert OUString to OStringMike Kaganski
See commit 57afeb8d9e35933630568a02fc48a00f5582b261 Change-Id: Idb41fb2e3b90bd0eb1d7ebd588c13fd50b9536fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98173 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann
...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-26Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptrStephan Bergmann
...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-05-24inline some use-once typedefsNoel Grandin
Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-25convert excel filter in calc from shared_ptr to rtl::ReferenceNoel Grandin
ref-counting traffic here accounts for 10% of the profile on some of my calc imports. Change-Id: I1b32e0e61d7bf5eb65780ec0e7fcb99f6576050a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-10-29sc: rowcol: tdf#50916 convert core/toolNoel Grandin
Change-Id: I0fe5a7ef4a79d0832802945ce1b9da4752f1d5fc Reviewed-on: https://gerrit.libreoffice.org/81598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:buffereadd find stuff involving adding *StringBufferNoel Grandin
and create conversion methods on *StringBuffer to make this work Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e Reviewed-on: https://gerrit.libreoffice.org/80949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-04Deduplicate some serializer writing code, and simplify writing OStringMike Kaganski
Change-Id: I391f8cb499a83f1f774fdcaa794169a218bdc7e5 Reviewed-on: https://gerrit.libreoffice.org/80189 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): scStephan Bergmann
Change-Id: I1bfd2bb623aac5ac457a0b719da64ab393ccd0ba Reviewed-on: https://gerrit.libreoffice.org/76654 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-17crashtesting: assert on export of fdo63407-3.ods to xlsCaolán McNamara
since... commit 3cdc1b35b9d86bcfa1277e3e94925ae7b18b8fde Date: Tue Jul 2 10:07:24 2019 +0200 tdf#126177 XLSX export: fix hyperlinks to documents Change-Id: Id5aaaab760a53b1e996d5d47c7477d77ce1d4efc Reviewed-on: https://gerrit.libreoffice.org/75757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-03tdf#126177 XLSX export: fix hyperlinks to documentsTünde Tóth
After export hyperlinks to documents didn't work, because the the hyperlink relationship targets contained also the anchor. Change-Id: I0bfc5bd1ef2b37f769d6a6b97e31c1b4bbfcb9aa Reviewed-on: https://gerrit.libreoffice.org/74988 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-05-04tdf#124953: Use rangelist's combined range top-left address...Dennis Francis
as origin address in the conditional format formula on xlsx export. Excel seems to get confused if anything else is supplied as the origin in the formula. For example, before this patch, for a condfmt range over the range-list [A3:C5 E1:F2], the origin address used in the formula (for text search type entries) is A3. <conditionalFormatting sqref="A3:C5 E1:F2"> <cfRule type="containsText" dxfId="0" priority="1" operator="containsText" text="ABC"> <formula>NOT(ISERROR(SEARCH("ABC",A3)))</formula> </cfRule> </conditionalFormatting> In this patch we use the top-left cell address(A1) of the combined range "A1:F5" as the origin address. <formula>NOT(ISERROR(SEARCH("ABC",A1)))</formula> Change-Id: If08a859bc361f925148ff463758d03ebbc41c0ac Reviewed-on: https://gerrit.libreoffice.org/71312 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-05-04tdf#122590 Import and export xlsx x14:cfRule element for type = cellis.Gülşah Köse
Change-Id: I3d940269ec25657b64c714400a2828781dd9dd3e Reviewed-on: https://gerrit.libreoffice.org/69713 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-04-19Further cleanup of FastSerializerHelper's startElement/singleElement[NS]Mike Kaganski
Drop FSEND_t: C-style varargs code was replaced since version 6.0 in commit d43fc40718217d89cc95cc3c0bc0b8e7926abcc0, so it's time to remove the last bits. Drop int-to-string macros that are simple wrappers over OString::number. Avoid unnecessary string type conversions. Change-Id: I86478577b8e469f99b5a90619e5f78a61f4f23fb Reviewed-on: https://gerrit.libreoffice.org/70964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-17loplugin:sequentialassign in scNoel Grandin
Change-Id: I9287d266cd5267e194f2539f95a7efff3824e9b1 Reviewed-on: https://gerrit.libreoffice.org/70715 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-01Get rid of XclXmlUtils::ToOString(const OUString& s)Mike Kaganski
The helper function is used in export code to convert UTF-16 internal string representation to UTF-8 used in XML encoding. I suppose that all strings here should be already valid UTF-16 (an invalid input should have been validated at import/input stage). An invalid string at this stage means a programming error in another part of code that breaks this precondition, and should not be handled at export stage. This effectively changes flags used in conversion from UTF-16 to UTF-8, so that now RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR is used instead of RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT, so that the result would be truncated on invalid bytes instead of inserting U+FFFD, and would fail assertion in debug builds. Other changed flags don't affect UTF-16-to-UTF-8 conversion. Change-Id: I8b154249e66ee32b531b8ab503e0222b9108d829 Reviewed-on: https://gerrit.libreoffice.org/69830 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-29tdf#42949 Fix IWYU warnings in include/sfx2/[n-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia2bea9bd4775f4ed5ef0133971106a6c0bfdd1c0 Reviewed-on: https://gerrit.libreoffice.org/69896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-27return unique_ptr in CreateFlatCopiedTokenArrayNoel Grandin
Change-Id: I0d44ad1eca45b0b77d5a898a553aab61b1f479a9 Reviewed-on: https://gerrit.libreoffice.org/69805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25Removed executable permission on data filesAndrea Gelmini
Change-Id: Ic21b28fd094f706dd7b1de32907d75e28f27494a Reviewed-on: https://gerrit.libreoffice.org/69558 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-22tdf#114969 XLSX export: fix 'sheet.name.with.dot'!A1-like linksTünde Tóth
When the sheet name/cell address separator was an exclamation mark, bad conversion of the optional dot separator replaced the last dot of the exported sheet name, resulting broken links: 'sheet.name.with!dot'!A1 Change-Id: I84fb6c8da345c144b04657ea350f1f96614071b7 Reviewed-on: https://gerrit.libreoffice.org/69272 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-01-29Simplify containers iterations in sc/source/filter/[d-e]*Arkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: I7be6568641e154e74ff7bde812da9a8e67790a7f Reviewed-on: https://gerrit.libreoffice.org/66972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-17tdf#42949 Fix IWYU warnings in sc/source/filter/excel/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia155032426e02eb9ee64db3fb10946f5c9d445b7 Reviewed-on: https://gerrit.libreoffice.org/64832 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-16loplugin:buriedassign in scNoel Grandin
Change-Id: I1408fd35a50a95e12895979b797548c89f7f4c74 Reviewed-on: https://gerrit.libreoffice.org/63469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>