summaryrefslogtreecommitdiff
path: root/writerperfect/source
AgeCommit message (Collapse)AuthorFilesLines
8 daysUse weak reference to SfxObjectShell in SfxEventHint to avoid use-after-freeMike Kaganski1-14/+14
The events may be processed after the shell has been destroyed. This is happening reliably after commit e2bfc34d146806a8f96be0cd2323d716f12cba4e (Reimplement OleComponentNative_Impl to use IGlobalInterfaceTable, 2024-03-11) when controlling LibreOffice from external Java scripts; but obviously, it could happen before as well. Now SotObject inherits from cppu::OWeakObject, instead of SvRefBase. Change-Id: I73a3531499a3068c801c98f40de39bdf8ad90b2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164458 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski1-1/+1
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545179 COPY_INSTEAD_OF_MOVE cid#1545187 COPY_INSTEAD_OF_MOVE cid#1545188 COPY_INSTEAD_OF_MOVE cid#1545189 COPY_INSTEAD_OF_MOVE cid#1545196 COPY_INSTEAD_OF_MOVE cid#1545197 COPY_INSTEAD_OF_MOVE cid#1545204 COPY_INSTEAD_OF_MOVE cid#1545223 COPY_INSTEAD_OF_MOVE cid#1545236 COPY_INSTEAD_OF_MOVE cid#1545239 COPY_INSTEAD_OF_MOVE cid#1545253 COPY_INSTEAD_OF_MOVE cid#1545274 COPY_INSTEAD_OF_MOVE cid#1545286 COPY_INSTEAD_OF_MOVE cid#1545309 COPY_INSTEAD_OF_MOVE cid#1545311 COPY_INSTEAD_OF_MOVE cid#1545345 COPY_INSTEAD_OF_MOVE cid#1545358 COPY_INSTEAD_OF_MOVE cid#1545361 COPY_INSTEAD_OF_MOVE cid#1545365 COPY_INSTEAD_OF_MOVE cid#1545367 COPY_INSTEAD_OF_MOVE cid#1545372 COPY_INSTEAD_OF_MOVE cid#1545373 COPY_INSTEAD_OF_MOVE cid#1545377 COPY_INSTEAD_OF_MOVE cid#1545392 COPY_INSTEAD_OF_MOVE cid#1545399 COPY_INSTEAD_OF_MOVE cid#1545404 COPY_INSTEAD_OF_MOVE cid#1545408 COPY_INSTEAD_OF_MOVE cid#1545430 COPY_INSTEAD_OF_MOVE cid#1545439 COPY_INSTEAD_OF_MOVE cid#1545449 COPY_INSTEAD_OF_MOVE Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara1-4/+2
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-14loplugin:unusedfieldsNoel Grandin1-9/+4
Change-Id: I5869e9974c37b1b525d316367f1dc5051d8aa197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: writerperfectStephan Bergmann2-3/+3
Change-Id: Ibaf69c1d922be6fade028ce6602f215cd9cd35cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158293 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-19loplugin:unusedfieldsNoel Grandin1-27/+0
Change-Id: Ic102ae992fc2fbfd187149b9d20bf1d2202ba5c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157042 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-13loplugin:unusedmethodsNoel Grandin1-61/+0
Change-Id: I00f228451574ca9f9e352d233c7f326c88e90a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-24cid#1541185 Operands don't affect resultCaolán McNamara1-1/+5
when sal_Int64 == long Change-Id: I36fab92613a2e7dd8f3817b151e9a836b29803f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156014 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-23cid#1541186 Operands don't affect resultCaolán McNamara1-2/+3
We probably manually silenced this in the past, so now it has returned after the code has changed enough to trigger it. I don't think we need to check for LONG_MAX in this case, we only return 0 or -1 here anyway. Change-Id: Ic2ba171a8c7c3f74d98088434a85e947fcadf7b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-21remove pimpl in WPXSvInputStreamNoel Grandin1-175/+87
no need for pimpl in class only included by a small number of other files Change-Id: Ib1df25388d90da2aa8158d070a45a769bd608bfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155871 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-27loplugin:stringstatic look for more stringsNoel Grandin2-3/+3
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-25Add script to find unused using declarationsGabor Kelemen1-1/+0
As a complementer to clang-tidy-12 --checks="-*,misc-unused-using-decls" Pros: - simple, fast! - finds some more unused declarations, somehow - works on non-linux specific parts of the code - clang-tidy (for me) trips on files with external headers, this does not Change-Id: If2db989114ac5c2841ed2e89ff7bd7a9e419f567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150612 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-31Simplify a bitMike Kaganski1-11/+6
Change-Id: I56de67a7860263d40b4352e93927dfdb107eb4bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149875 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-15Merge SvXMLAttributeList to comphelper::AttributeListMike Kaganski2-5/+4
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann1-2/+1
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-20lok: hide customization in EPUB export dialogSzymon Kłos2-0/+6
Change-Id: I531aba2eb52e74904b6cba82add769d35a8a28c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144150 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144534 Tested-by: Jenkins
2022-12-20Make EPUB Export dialog asyncSzymon Kłos2-0/+39
(cherry picked from commit 9461b0e1385b87d2490bf9402729fb9e912395e9) Change-Id: Iead5b4ff6064395fd5abbcdea73db38415dbb37c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144514 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-12-16loplugin:unocast (SvXMLImport)Stephan Bergmann1-1/+2
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I773095e51958a0a050bcece6f44fe3847f962eaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144333 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-22loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: Idaf9742358bcd485d6ac96593844b05bf0972fa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-14WASM add Calc as optional build result, make it build & runBalazs Varga2-0/+8
Adding new config option: --with-main-module=<writer/calc> With this switcher we can build only WASM writer module or calc module. The default value is 'writer'. This commit also reverts: 26603bc9ef0116ed31c510dab82b69d3666447b5 (WASM fix orcus native exception handling (NEH)) Because Calc import is using liborcus for loading styles.xml. Change-Id: I4c330ef8eea7d08214bf357531ee0bf7383ab788 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137946 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: Jenkins
2022-10-05tdf#143148 Use pragma once instead of include guardsNalini Prasad Dash1-5/+1
Change-Id: Ib3b4a98560c278965a1e671171e1a84f600f09bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140948 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann2-2/+2
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-31clang-tidy modernize-pass-by-value in writer*Noel Grandin4-15/+18
Change-Id: Ib08c971eb3e859e7b04cdd408af7966d83c2955b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137585 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24modernize and improve PropertySetInfoNoel Grandin1-3/+2
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-02Just use Any ctor instead of makeAny in writerperfectStephan Bergmann3-5/+6
(which needs one more false loplugin:redundantfcast suppression case) Change-Id: Ib8a72a510384f497bddaef5b812a46ea473481d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133703 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)3-0/+28
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin4-6/+6
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-01Prepare for removal of non-const operator[] from Sequence in writerperfectMike Kaganski2-10/+11
Change-Id: Ifaa868e8e68be474c1e8b961b325ce2a7382650e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124414 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-06clang-tidy:readability-redundant-member-initNoel Grandin2-14/+4
Change-Id: Ib41556edafb03c770938c91cff89bfaefa23d7cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121691 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04dynamic_cast -> static_cast (tdf#130795)Noel Grandin2-2/+2
the dynamic_cast is hot here, and none of these dynamic_casts are necessary, we already assert that they must succeed, so just use static_cast Change-Id: I88ade90431c4da4792c778b5cdab22332ed1c428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121637 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-03Remove some unused includesMiklos Vajna1-1/+1
See tdf#42949 for motivation. Change-Id: I62354cf2ae750a91b72e91ad838a40e205e7cd61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121526 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-08-17Replace GDIMetaFile::Write and WriteGDIMetaFile with SvmWriter::Writepanoskorovesis1-1/+3
Use the new write functionality. This change also sets SvmWriter::Write second argument as const, as it's value does not change Change-Id: I1620756542a0bc54b5f8fc7ce3f57d0243a2ee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-21bundle the FolderPicker instantiations behind a single callCaolán McNamara1-2/+3
in prep to add parent support Change-Id: I2aa4b9343f895ae866f600dd3260b7fdc4e1efec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-11Simplify Sequences initializations (writerfilter/writerperfect/x*)Julien Nabet1-4/+1
Change-Id: I1bd31fe6cf0f8aaf4f2cfe1d3d49e61a0633f361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117057 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-17EPUB export: make sure txtparai.hxx is self-containedMiklos Vajna1-2/+2
txtparai.hxx was the first include in txtparai.cxx to make sure the header is self-contained, restore that. (Ignoring sal/config.h.) Change-Id: I430e1bef12191e15f416381cd8d83c503b284851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115692 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-05-14Improve loplugin:stringviewStephan Bergmann1-1/+5
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for operator call arguments. (The "rather than copy, pass subView()" diagnostic is already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly for operator call arguments.) (And many call sites don't even require an explicit [u16]string_view, esp. with the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator += overloads". Just some test code in sal/qa/ that explicitly tests the O[U]String functionality had to be excluded.) Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-28use string_view in INetURLObject::encodeNoel Grandin1-1/+1
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in w*Vincent LE GARREC38-152/+38
Change-Id: I693f6dafb743d39afd8e41e66a8066f04043f8a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112052 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-23loplugin:refcounting check for managing OWeakObject with raw pointerNoel1-3/+2
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18loplugin:referencecasting in writerperfectNoel4-6/+4
Change-Id: I2b8dfca7344caa4b9dd503fc3fca383a6cee8f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-6/+6
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26tdf#124176 Use pragma once in writerperfecthalfhiddencode4-16/+4
Change-Id: I2484df85c3f3d6011f04844ff30de53c287ab36d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108317 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-19make *String(string_view) constructors explicitNoel Grandin2-2/+2
to make it more obvious when we are constructing heap OUStrings code and potentially inadvertently throwing away performance. And fix a handful of places so revealed. Change-Id: I0cf390f78026f8a670aaab53424cd31510633051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann1-2/+3
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel4-11/+11
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-1/+1
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin3-6/+6
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel3-16/+17
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-16writerfilter: use the fastparser API when possibleNoel2-12/+22
part of the process of making SvXMLImport fastparser-only Change-Id: I9bb2d337954354be63984892e1fc4a7950ca3628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>