609 Commits
Author SHA1 Message Date
Andrea Gelmini d9f09e6433 Fix typos
Change-Id: Ia95cc8146f669d7f1ac8834d871427bb57485ef3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209895
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 11:59:56 +02:00
Michael Weghorn c8c367b31a Use vcl::WindowData instead of string for window state in more places
vcl::WindowData is used to manage/store various state
information for windows. It can be (de)serialized to/from string.

So far, both the weld::Window API to get/set window state
as well as the SvtViewOptions API were based on the string
representation.

Switch those and various related places to using vcl::WindowData
instead to use a stronger/more specific type than just OUString
in various places across the code base.

Do the string (de)serialization where necessary, but otherwise
prefer to use vcl::WindowData directly.

Calling weld::Window::set_window_state with a WindowData
param that doesn't indicate that anything should be set
(i.e. whose mask is vcl::WindowDataMask::NONE) should
have no effect, so drop extra checks that were previously
checking whether the string representation was empty
and skipping the call to weld::Window::set_window_state in
that case.

No change in user-observable behavior intended or
seen in a quick test.

Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208125
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:49 +02:00
Stephan Bergmann 6dfc360158 Missing include (USHRT_MAX)
Change-Id: I088c23f4011919ef3a572872622230c3dc2f870a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-23 15:07:04 +01:00
Gabor Kelemen 1d9b441da8 tdf#146619 Use more forward declarations in include/framework
Change-Id: I7a41c72fbd16fcde45c59ec19814be7962ded194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199384
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-02-21 14:59:51 +01:00
Mike Kaganski 7f198b27f4 Drop class utl::MediaDescriptor, and use comphelper::SequenceAsHashMap
utl::MediaDescriptor was just a SequenceAsHashMap with a few added
methods. It made it more difficult to assign a SequenceAsHashMap to
MediaDescriptor, without real upsides. In many places, the class was
used not as media descriptor, but just as helper to create sequences.

This change puts the string constants and the former methods into a
namespace utl::MediaDescriptor.

It would be also good to drop comphelper::NamedValueCollection, which
is basically a twin of comphelper::SequenceAsHashMap (TODO).

Change-Id: Ia9b69c5a2ad153ecc654944c419c1880252ed86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195163
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-06 18:18:32 +01:00
siddhisalunkhe1998 ec0fcce54a tdf#145614 convert string literals into o3tl::enumarray
groups all FRAME_PROPNAMEs related to Enum class FramePropHandle
into o3tl::enumarray

this patch is continuation of -
https://gerrit.libreoffice.org/c/core/+/192468

Change-Id: I96b1e0f90c2d2735ae73bafc729e4c0183c6795b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193657
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-12 17:02:23 +01:00
Mike Kaganski d46175b4ff Move variables where they are used
Change-Id: I4db201fad61e690000b78049c47b5457cf795658
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193165
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-30 05:16:55 +01:00
Mike Kaganski a8216f500c tdf#168314: check if xGraphic is empty, not Any
Regression after commit 9d6e1594a2
(Deduplicate and unify using vcl::GetBitmap, 2024-11-08).

An Any with an empty graphic is not itself empty; such an any caused
the outer check to succeed, and therefore its 'else' branch never
executed, when it ought to.

Change-Id: I97115c7f7dbab4ec54b5e999e4b47ecdc8874e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193161
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-29 19:46:08 +01:00
Aung 8ce2cf3973 tdf#41777 Add window size and position for each document
-Extend ViewDataSupplier to work with window state for supported
 applications like sw, sc, sd
-Extend sm DocumentPropertySupplier to work with window state
-Add OldWindowState string member to SfxViewShell inherited
 classes for sw, sc and sd
-Add OldWindowState string member to SmDocShell class for sm

 Imported window state is stored in the model shells
 or the ViewShells if available. This data is accessed by services
 like ViewDataSupplier and DocumentPropertySupplier used by
 persistentwindowstate.cxx. It is needed to store the window state
 data since frame is not available to get to resize
 and reposition by the time importing document has finished.

-Add windowstatehelper header and source files in the framework
 module for getting/exporting the size and position of
 windows. Also add associated file and library to make files for
 exporting/using these helper methods across different modules.

-Modify impl_searchRecycleTarget method in loadenv.cxx

 New frames are created for saved documents when launched from
 the start center. This is to apply their own window state
 separately from the backing window.
 New docs and templates still recycle the backing window frame.

-Make the backing window close afterwards after the new frame has
 been created and the document gets loaded successfully
 (modified in loadenv.cxx)



Change-Id: Ia5ad606e744621f267dae6cd468b0c430b2ebf1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185189
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-24 06:44:43 +02:00
Caolán McNamara d929702e83 cid#1665188 Variable copied when it could be moved
and

cid#1665187 Variable copied when it could be moved
cid#1665186 Variable copied when it could be moved
cid#1665184 Variable copied when it could be moved

Change-Id: If36872293c53263ad2a42b06463c9b50c243068d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190441
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-31 22:23:21 +02:00
Noel Grandin d5df923644 BitmapEx->Bitmap in framework
now that Bitmap supports transparency

Change-Id: I70cac13970f657770c5b739010bae8b17f4faed0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190421
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-31 07:38:07 +02:00
Noel Grandin c0afb3514f add new Bitmap constructors
to move the logic of constructing a new Bitmap from an existing Bitmap and an AlphaMask,
into vcl, where it can later be optimised

Change-Id: I2af1c6d1a35d968abdd07546448f7e211772e70b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190366
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-29 17:53:22 +02:00
Noel Grandin 36a4d7daa6 BitmapEx->Bitmap in various
places where we are constructing a Graphic by first
converting to BitmapEx, which is unnecessary, rather pass a
Bitmap to Graphic.

Change-Id: I386f68e7f5bc6ef9509352187dbe9a0774defaac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190307
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-28 08:00:13 +02:00
Noel Grandin e6211a4b3b BitmapEx->Bitmap in various
now that Bitmap supports transparency

Change-Id: If946687832cf30db70db9749e5aeed38ab1490c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190149
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-25 12:59:18 +02:00
Caolán McNamara d02fde021c cid#1659748 Variable copied when it could be moved
and

cid#1659754 Variable copied when it could be moved
cid#1659755 Variable copied when it could be moved
cid#1659756 Variable copied when it could be moved
cid#1659766 Variable copied when it could be moved
cid#1659767 Variable copied when it could be moved
cid#1659769 Variable copied when it could be moved
cid#1659770 Variable copied when it could be moved
cid#1659777 Variable copied when it could be moved
cid#1659787 Variable copied when it could be moved
cid#1659790 Variable copied when it could be moved
cid#1659793 Variable copied when it could be moved
cid#1659802 Variable copied when it could be moved
cid#1659818 Variable copied when it could be moved
cid#1659822 Variable copied when it could be moved
cid#1659824 Variable copied when it could be moved
cid#1659825 Variable copied when it could be moved
cid#1659826 Variable copied when it could be moved
cid#1659842 Variable copied when it could be moved
cid#1659849 Variable copied when it could be moved
cid#1659850 Variable copied when it could be moved

Change-Id: I70729aaf6e229518a9a50ac18311286ab5b05b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189348
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-11 13:16:28 +02:00
Caolán McNamara 8f73de67cf cid#1660488 Variable copied when it could be moved
and

cid#1660483 Variable copied when it could be moved
cid#1660480 Variable copied when it could be moved
cid#1660473 Variable copied when it could be moved
cid#1660472 Variable copied when it could be moved
cid#1660471 Variable copied when it could be moved
cid#1660468 Variable copied when it could be moved
cid#1660464 Variable copied when it could be moved
cid#1660463 Variable copied when it could be moved
cid#1660462 Variable copied when it could be moved

Change-Id: I6380e6a6c2a63a5d6f2052264c54f250703e77fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188825
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-02 17:39:55 +02:00
Noel Grandin e2b2eec732 BitmapEx->Bitmap in AddonsOptions
now that Bitmap can handle transparency

Change-Id: Iaa82c9596c27409b1361bd430f2d6b7eaf4eefd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188817
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-02 13:33:13 +02:00
Caolán McNamara c959f426ce cid#1659610 Variable copied when it could be moved
Change-Id: I7d8369d837065fd442c31dba80707d29024aae8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188497
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-29 00:22:06 +02:00
Caolán McNamara b80cd12449 const up some more pieces
Change-Id: Ib85b8b4b3a2d00e7ef0ecb354fba0b862d60abdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187749
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-12 01:16:21 +02:00
Noel Grandin 68ba1c02ac no need to subclass std::unordered_map here
Change-Id: Ib7be7dac8f394a35eed7212c6fbad3cefa39eaa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185399
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-05-16 13:38:01 +02:00
Caolán McNamara 88431fff42 cid#1607688 Check of thread-shared field evades lock acquisition
Change-Id: I89042693b8844b4769be79fa854722fe3d7babf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177426
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-27 21:45:21 +01:00
Noel Grandin ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
Mike Kaganski 00b15057a3 Simplify using WeakImplHelper / ImplInheritanceHelper
Change-Id: Ieb3b8e07e0361da89da5b4a6db9e3c45389b636f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176200
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-08 05:35:40 +01:00
Mike Kaganski 9d6e1594a2 Deduplicate and unify using vcl::GetBitmap
Change-Id: Ie940990b604cf23c961aa5b6fad124f1ebaf338c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176186
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-08 05:35:34 +01:00
Mike Kaganski d251b5b65a Simplify a bit
And drop unneeded solar mutex locks, that were used when the menu
implementation was accessed directly.

Change-Id: I06d3d872343fdd6204b4e8bbd8bcec67c17fdbe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176199
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-08 05:34:48 +01:00
Noel Grandin 1e496ce2cf loplugin:passstuffbyref in forms..framework
Change-Id: Ib5a013df49d532b139acd881127cfc82c7c5a6b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176190
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07 11:56:21 +01:00
Caolán McNamara 6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara 2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
Mike Kaganski 7a7b1f9cbd Simplify a bit
Change-Id: I224602738ce41529cc5eca681f09db31241a5cac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175385
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-22 06:43:53 +02:00
Noel Grandin 44bb2c8287 loplugin:unusedfields
Change-Id: If05b87f1e6c19b15b03b2695921a582e078d0f1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175011
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-10-16 15:51:52 +02:00
Caolán McNamara f3e308fd3d cid#1606875 Data race condition
Change-Id: Ic4932568bb3f0348595358fa19032aba56bfa6c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173899
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-09-25 15:38:05 +02:00
Noel Grandin ca8c59c7e6 use more concrete UNO type in framework
Change-Id: I3ee54f3967339ab52c04f48a047bc29fc5161680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173159
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-11 16:14:54 +02:00
Mike Kaganski 9b911aaa3d tdf#124213: handle private URLs as non-remote
Since commit 26c106a5ae "append '(Remote)'
in the titlebar when remote file is opened", 2015-08-14, the titlebar
shows "(remote)" for documents with non-empty URLs that are not file
scheme.

When recovering a non-existing document, the URL is a factory one like
"private:factory/swriter"; and INetURLObject::GetProtocol() call returns
PrivSoffice.

Indeed, recovery of a non-existing document doesn't make sense itself,
and is fixed by Justin elsewhere; but let's fix the general logic here.

Change-Id: Ibaf095981c37a2fd64f745ad0966465d98a4ed4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171027
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-07-25 23:09:11 +02:00
Noel Grandin 4f5f24a4a3 loplugin:ostr in framework
Change-Id: I2fdc32aa5de6a1315fe69997f9b531259aa78605
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167339
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-08 17:18:51 +02:00
Noel Grandin 091c671832 replace createFromAscii with OUString literals in framework
Change-Id: I5209ab1b869492234946f8471a30c70121824198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167010
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-02 17:51:30 +02:00
Gabor Kelemen 7c18a0bb37 tdf#146619 Drop unused 'using namespace' in: framework/
Change-Id: I03d2d3d07d0d71800df624510b5e20bd5e0588e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165531
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-01 11:46:16 +02:00
Noel Grandin 6e4ba9b13d convert TitleHelper to comphelper::WeakImplHelper
Change-Id: I81571a0786a4d13e049dba82ba6e4f3509887fa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-30 18:01:46 +01:00
Noel Grandin 8ef4dc07cd improve loplugin:staticmethods
Some of the exclusions were too aggressive. Restrict them to only the
important classes, which exposes some more places this plugin applies.

Change-Id: I1b2d1fb24391adc71ed0984f94168f61a149479f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165154
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-22 11:47:36 +01:00
Mike Kaganski 0fa827dbb2 Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd19 (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>
2024-01-27 12:43:48 +01:00
Caolán McNamara f0a8b5b81d move IsFuzzing to comphelper
and try something a bit more generic

Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-30 12:45:45 +01:00
Mike Kaganski 6ea42a1166 tdf#158396: show DocumentTitle when set in MediaDescriptor
Change-Id: Ic89de9e7d83c7c96eb1b2cc51798d354b38f86d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159904
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-27 12:54:34 +01:00
Mike Kaganski 9ada569e6e Simplify a bit
Change-Id: I1609b9dfc047ad55bbaeee369b643d654903866e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159903
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-27 11:36:17 +01:00
Stephan Bergmann 64c47c92d0 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: framework
Change-Id: I0f17c569eddcdc30bfca4cdcd25cb05cf783ec23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158200
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20 07:06:17 +02:00
Stephan Bergmann b946842a74 Clean up the remaining uses of OUStringConstExpr, and drop it
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18 11:26:44 +02:00
Adam Seskunas b1b002c293 tdf#147021 use std::size instead of SAL_N_ELEMENTS
Change-Id: Ibc6c83f950890ac9b7a754cc49973736fa81dcb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156364
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-04 15:50:51 +02:00
Noel Grandin 0193b284e8 new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.

This seems to make a different at least on Visual Studio

Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26 13:12:31 +02:00
Noel Grandin e810bd2b99 merge some stringadds
found with a lightly tweaked version of the loplugin:stringadd
and some hand-holding.

Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25 18:43:52 +02:00
Caolán McNamara 2b7773ebb8 survive exporting to pdf without config for fuzzing
Change-Id: I229f25a8a15b21257756ecfa008b9e99681003c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151172
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-28 21:23:25 +02:00
Noel Grandin 601db233f5 remove dodgy code in OReadToolBoxDocumentHandler
comparing hashcodes without doing an actual comparison
is not safe.
Code was like this since
    commit 6845330a22
    Author: Carsten Driesner <cd@openoffice.org>
    Date:   Wed Oct 17 09:57:37 2001 +0000
    #87255# support toolbar item style and help id

Change-Id: Ie49647da257e6199d9502c916da2dd3d39d52377
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151136
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-28 08:24:45 +02:00
Gabor Kelemen 890bf59e0a Run clang-tidy with misc-unused-using-decls on modules [d-o]*
To remove unneeded using declarations.

Via the simple script:

for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do
    clang-tidy-12  --checks="-*,misc-unused-using-decls" "$i";
done

Change-Id: Idd8aa3d3cfec456c4babb65e89af712051b4deb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150609
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-04-20 13:14:37 +02:00