summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
AgeCommit message (Collapse)Author
2020-02-04rename Set/GetTextFirstLineOfst->Set/GetTextFirstLineOffsetNoel Grandin
Change-Id: Iaeb3c17fe157dec82cd70991122c08ee1e215752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87955 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26rename some local variablesNoel Grandin
mostly to make the job of my very aggressive unused local vars plugin easier Change-Id: Ifc21a920841f8589f8b7e10de39dba6622a5d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-24loplugin:makeshared in swNoel Grandin
Change-Id: I6b297b84edda441c4ec6ea9f89ed553a50783bf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87356 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-20sw: prefix members of SwEndNoteInfo and SwFootnoteInfoMiklos Vajna
Change-Id: Ie952701e6cb65cb0d5789b4f98005872286a41ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87052 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-17sw reqif-xhtml export: fix not needed font name/sizeMiklos Vajna
The only reason commit 4cd3c436923bfba281b1bf16d9785208a2119cea (sw reqif-xhtml export: limit values of the style attribute, 2018-04-11) missed these is because they write their css properties directly, not going via SwHTMLWriter::OutCSS1_Property(). Also adapt testReqIfWellFormed: its intention was to make sure that in case these properties are written, then inline CSS is used: that is true for XHTML, but not for ReqIF-XHTML. Change-Id: I4ceb2bb09187101baa6f4a74d65aaa4dc955511f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86962 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-17sw reqif-xhtml export: fix not needed namespace for commentsMiklos Vajna
In general, all "foo" elements should be started as "<reqif-xhtml:foo" in the reqif case, but not for comments, which stay as "<!--". Change-Id: I841c0d8e448f670b9b42cb915154e6264f7f150a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86952 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-16tdf#42949 Fix IWYU warnings in sw/source/uibase/[u-w]*/*cxxGabor Kelemen
Also backtrack a bit and introduce several fw declarations in sw/inc/hintids.hxx to get rid of TypedWhichId -based blacklist entries Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8487737f5c3327c24b105328e84661d409f381c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86873 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-15WaE: unused parameterTor Lillqvist
Change-Id: Iba0c5c6c67d54e89bd3252315d83d6b9f947acdf
2020-01-14sw html filter: rework Yoda-style commentsMiklos Vajna
Change-Id: Ia71769f19298331c674120a3d413b85201a03e6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86747 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-13sw reqif-xhtml export: fix non-well-formed output on Chinese textMiklos Vajna
And also search for the '"<" OOO_something' pattern, and fix up all cases where we forgot to call GetNamespace() when opening an element. Change-Id: I015e807c1ad0f96c7c4aaa97f7f61ae134cf3754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86701 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-10use more std::make_sharedNoel Grandin
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-23sal_Char->char in swNoel Grandin
Change-Id: I63fb87a8e8eaf9c9da7bf7b8b6f5706222ffcc07 Reviewed-on: https://gerrit.libreoffice.org/85730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-20loplugin:duplicate-definesNoel Grandin
already defined in wrthtml.hxx, randomly chose a place to keep it Change-Id: I8aa1d20bee04a5c1e5919b593e6befddb593f18a Reviewed-on: https://gerrit.libreoffice.org/85566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-20tdf#42949 Fix IWYU warnings in sw/source/filter/*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I87263017cb0802c9f5ca21d630bf3701b9c5e73a Reviewed-on: https://gerrit.libreoffice.org/85167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-17sw reqif-xhtml export: add a new RTFOLEMimeType parameterMiklos Vajna
This is similar to commit e0f20211a8048a87b078aa4cf0f28c0c847487ad (sw reqif-xhtml import: add a new AllowedRTFOLEMimeTypes parameter, 2019-12-16), except that was for the import and this is for the import. The situation was similar, SfxBaseModel::impl_store() still had the custom store parameters, but later functions lost it, so at the end OutHTML_FrameFormatOLENodeGrf() in the sw HTML export could not respect it. Fix the problem in a similar way, so the SfxMedium instance created for the duration of the export provides the custom options via SfxMedium::GetArgs(). Change-Id: I71d2c7920f42d98133f345703cfdfd50f0e8550c Reviewed-on: https://gerrit.libreoffice.org/85321 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-16sw reqif-xhtml import: add a new AllowedRTFOLEMimeTypes parameterMiklos Vajna
The HTML import is an old-style filter, so it has no XFilter implementation where filter() would get custom parameters out of the box. One way would be to fix by adding one more entry to the aFormalArgs table under sfx2/, but doing that with a random parameter of a random import filter feels dirty. So instead make SfxMedium store all arguments as-is, this way accessing other keys is as easy to accessing the already available FilterOptions (string) key. Regarding the actual filter change, don't require "text/rtf" as a mime type for embedded objects in the reqif XHTML import, so that in case the file has e.g. application/rtf, then that works as well. In case an (UNO) client wants to still limit the accepted set of MIME types, that's possible via the new parameter. Change-Id: Ia60da44d692f550d8ad5bbf374171cac67d9e04f Reviewed-on: https://gerrit.libreoffice.org/85229 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-13loplugin:expandablemethodsNoel Grandin
Change-Id: I333d91ea5ce78c82e9bb107f934614efc7bfb8f7 Reviewed-on: https://gerrit.libreoffice.org/85078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12use covariant return type for SfxPoolItem::CloneCaolán McNamara
and can then remove some casting Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc Reviewed-on: https://gerrit.libreoffice.org/85022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-11num->number and bul->bullet in sw/Noel Grandin
make some symbols easier to read Change-Id: Icb5ea48dce1bcf4ae17e57e8f4c7bec3acd33f82 Reviewed-on: https://gerrit.libreoffice.org/84924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-11rename Prc->Percent in swNoel Grandin
Change-Id: I011eb59cf40abc6ff62dd541beb1ebbc50725a05 Reviewed-on: https://gerrit.libreoffice.org/84855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-11convert SectionType to scoped enumNoel Grandin
Change-Id: Ib05b88b05c90b835107128f42c70170660788d00 Reviewed-on: https://gerrit.libreoffice.org/84851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-11convert SwFrameSize to scoped enumNoel Grandin
Change-Id: I7e1e641ff180035c7dcefdcfdd185eadbae32142 Reviewed-on: https://gerrit.libreoffice.org/84850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-09GetSource32 and GetSource are identicalMike Kaganski
Change-Id: Ia7c6687586b5a37b7556f1bae9ffd5b5b954db47 Reviewed-on: https://gerrit.libreoffice.org/84747 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-26cppcheck: performing init in init list (sw/vcl/xmloff)Julien Nabet
Change-Id: I8e6c77847e1c2ec386c27c34b75160f4a44da2fe Reviewed-on: https://gerrit.libreoffice.org/83717 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-19tdf#115576 sw: fix borders for single row/col autotable stylesJustin Luth
The 4*4 autostyle table matrix has no box format that can handle a table with a single column or single row. So the first and last row/column boxes need to be combined to get all of the necessary borders. This could easily be seen by setting one column and X rows using the default table style - missing right border. It could also be seen by setting one row and X columns using Box List yellow - missing bottom border. Change-Id: Ib2cf873b6d4e10ba5145e680ea7b3e2e3aea3970 Reviewed-on: https://gerrit.libreoffice.org/82998 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-17Extend loplugin:external to warn about enumsStephan Bergmann
To mitigate the dangers of silently breaking ADL when moving enums into unnamed namespaces (see the commit message of 206b5b2661be37efdff3c6aedb6f248c4636be79 "New loplugin:external"), note all functions that are affected. (The plan is to extend loplugin:external further to also warn about classes and class templates, and the code to identify affected functions already takes that into account, so some parts of that code are not actually relevant for enums.) But it appears that none of the functions that are actually affected by the changes in this commit relied on being found through ADL, so no adaptions were necessary for them. (clang::DeclContext::collectAllContexts is non-const, which recursively means that External's Visit... functions must take non-const Decl*. Which required compilerplugins/clang/sharedvisitor/analyzer.cxx to be generalized to support such Visit... functions with non-const Decl* parameters.) Change-Id: Ia215291402bf850d43defdab3cff4db5b270d1bd Reviewed-on: https://gerrit.libreoffice.org/83001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-07sw XHTML export: <blockquote> can't have character childrenMiklos Vajna
Fixes the following reqif-xhtml validation error: ERROR at 214: [XSD] cvc-complex-type.2.3: Element 'reqif-xhtml:blockquote' cannot have character [children], because the type's content type is element-only. But this is probably useful in the general xhtml case as well. [ Also add a way to not load a document when we want to cover "store" behavior in a test. ] Change-Id: I88795271475863b9560ac1cb99636c507746f1e9 Reviewed-on: https://gerrit.libreoffice.org/82239 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-02New loplugin:conditionalstringStephan Bergmann
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3 Reviewed-on: https://gerrit.libreoffice.org/81946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31Fix StringAdd::isCompileTimeConstantStephan Bergmann
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-29remove unnecessary includesCaolán McNamara
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f Reviewed-on: https://gerrit.libreoffice.org/81676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-28loplugin:stringadd improve detectionNoel Grandin
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-24Introduce OStringCharStephan Bergmann
...similar to OUStringChar, to be used in string concatenation expressions. And enable the corresponding loplugin:stringadd check, and fix its findings. Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9 Reviewed-on: https://gerrit.libreoffice.org/81456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16loplugin:stringadd look through a couple more known-good methodsNoel Grandin
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-12All occurrences of WriteOStringBuffer(b) can easily be replaced...Stephan Bergmann
...with WriteOString(b.makeStringAndClear()) Change-Id: I46be4f80d6633b5c51a2c3d99f9faf0db5764d3f Reviewed-on: https://gerrit.libreoffice.org/80704 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-10convert WriteCharPtr..getStr to WriteOStringNoel Grandin
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10fix zero at end of string in ExtractOLEClassNameNoel Grandin
this only worked by accident, because the only use of the string was to pass it to SvStream::WriteOString, which stops at the null byte Change-Id: Ief06db7b9c79943826da7bf377144e5244d328ee Reviewed-on: https://gerrit.libreoffice.org/80617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-04sw: add IDocumentMarkAccess::getFieldmarkAt()Michael Stahl
... and use it where the mark for a given CH_TXT_ATR_FIELD* is retrieved. Change-Id: Id58ac2967ab66be8a07586ef31cfe9e18a5f073d Reviewed-on: https://gerrit.libreoffice.org/80050 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-02loplugin:stringadd in swNoel Grandin
Change-Id: I72e1cbc229a47660b2313f46898753e273b69d35 Reviewed-on: https://gerrit.libreoffice.org/79985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01Drop SfxItemIter::FirstItemMike Kaganski
It is always used right after the iterator is created, where simple GetCurItem gives the same value without reseting the position. Change-Id: I871dc7989b79e13f06436ef7928692645b5209f6 Reviewed-on: https://gerrit.libreoffice.org/79903 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-23tdf#39593 use getUnoTunnelImplementationArkadiy Illarionov
Change-Id: I78eb67913a568c610e38e5002f914773c4906dfd Reviewed-on: https://gerrit.libreoffice.org/79350 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-09-20no more SwClient: sw/source/filter/htmlBjoern Michaelsen
Change-Id: I45915fa65157aa6a16ecee238d9072d359d3b464 Reviewed-on: https://gerrit.libreoffice.org/79264 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-09-19sw/filter/hmtl: SwClient/SwModify no moreBjoern Michaelsen
Change-Id: Ib469f83f61cea81fc551f04f6f059b3a0a2b5f18 Reviewed-on: https://gerrit.libreoffice.org/79182 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>