535 Commits
Author SHA1 Message Date
Noel Grandin fcf0bcc0f9 Hold EditTextObject by value in OutlinerParaObjData, not by pointer
OutlinerParaObjData is already ref-counted data, no need
for further indirection.

Unfortunately, this sets off a larger chain of changes
than I would have preferred, but we end up storing
EditTextObject on the stack much more than before, so
that worked out well.

Change-Id: Ie7d0ccfbfeec4e6935f2ed6b8ad48aadfe1bac20
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10973
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit fbf7d1bc7142d3f0e4e5f959983dea065afc5ea3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210927
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-14 16:27:02 +02:00
Andrea Gelmini 89cc215cf4 Fix typos
Change-Id: If2a62199f12bdaae43bed80c1b66c2d1daa4d03d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209894
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:23:49 +02:00
Andrea Gelmini e8880e76a6 Fix typos
Change-Id: Ic3882680e3a0f0aba4afae064c0aac0838d4b920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209893
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 10:37:54 +02:00
Michael Weghorn 7b68bd0779 vcl: Pass Window::Draw outdev param by ref
This makes clear that it is always non-null.

Change-Id: Id29efa073dae8ce01657ec28493d5f63a564d0ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205350
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-20 00:38:47 +02:00
Noel Grandin 9e5cdca053 Start process of converting MapMode from Fraction to double
add constructor and setters

Change-Id: I1ea8d0b5ac2e2f49e658247d4a21ed80457c68ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-24 19:57:43 +01:00
Noel Grandin 6ead4fad33 Fraction->double in vcl::Window
Change-Id: I5628be6ae9f3c37c6b96dbfa8c029bffa51dc471
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202311
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-22 20:20:15 +01:00
Gabor Kelemen a9e9175ba6 tdf#146619 Use more forward declarations in include/sfx2
This shaves off some 300M of input
Change-Id: I2fae9ff6c6dab31010986e55365676d4a01f402d

Change-Id: I3b2551a1937929100f25c01c0c416a419e7fbb51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199388
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-23 12:19:48 +01:00
Gabor Kelemen 94d987edc2 tdf#146619 Use more forward declarations in include/toolkit
Change-Id: I46b4f8c398662b2826f7e4bf90f43750e3569667
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198240
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-07 00:41:15 +01:00
Gabor Kelemen 0bdcfc2900 tdf#146619 Use more forward declarations in include/unotools/
This shaves off some 40M of input

Change-Id: I12e10deb87ceea1f7a23f3de4ea624befe187c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198238
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-05 17:35:46 +01:00
Gabor Kelemen 49cb3077fb tdf#146619 Use more forward declarations in include/vcl/outdev.hxx
these were skipped in previous runs, since they contain some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

This also shaves off some 140M input

Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-23 21:27:08 +01:00
Mike Kaganski b280efcb9b Drop some uses Sequence::getConstArray
Replace by operator[], begin() and end(), which don't have overhead
since 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: I221470b3439bb0dc6e7705b0d99deb3cd2063484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195176
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-07 12:54:23 +01:00
Mike Kaganski e8d73d5307 Let TransformItems return comphelper::SequenceAsHashMap
Simplifies its usage in all places where the result needs to be
modified.

Change-Id: I37f8d99827e0f1cb2b6e4f4f7735e26fb87f6703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195162
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-06 16:45:05 +01:00
Jonathan Clark 1fe134353a tdf#165507 Add para align start and end toolbar and menu buttons
Added the following commands:

.uno:StartPara
.uno:EndPara
.uno:CommonAlignStart
.uno:CommandAlignEnd

Currently, the Start/End align commands use the same icons as the
Left/Right align commands, respectively, but they are mirrored
automatically in RTL context to reflect the appearance of the text.
Unique icons may be added in a future commit.

Change-Id: I0fbf7039d2bc20e025af3d30c775f270354e5aca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194125
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-11-18 01:55:54 +01:00
Henry Castro 9e86101902 cppuhelper: add 'm_' prefix to OComponentHelper class members
Change-Id: I02a3ce12eb1d02dd28a2eec9beeb9633292975ce
Signed-off-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189882
Tested-by: Jenkins
2025-08-19 13:25:54 +02:00
Mike Kaganski b68633e21c Use OutputDevice::ScopedPush in various
Change-Id: I1eb4340c603bae6a62fa676534ffb21fe2316649
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189806
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-17 09:44:41 +02:00
Armin Le Grand (allotropia) 1457699096 StripPortions: Sort out & reduce ::Paint methods
At EditEngine, ImpEditEngine, Outliner, OutlinerView
and EditView. Changed to more explaining names. Checked
parameters.

Change-Id: Iccf8ce82d2772cbd769269014e920739a11bece2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187483
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2025-07-08 01:15:30 +02:00
Jonathan Clark 0b979c50b6 tdf#166011 Implemented style:script-type
Implemented the ODF 1.0 style:script-type text property. This property
can be used by documents to influence which script type-dependent
attributes are used when rendering certain characters.

This implementation uses the following semantics:

- If unset, the behavior is as it was in previous versions.
- If set to latin, asian, or complex, those characters not mapped by the
  ODF standard to a script type are treated as latin, asian, or complex,
  respectively.
- If set to ignore, all characters will be treated as latin. This value
  is intended to be used for interoperability with file formats that
  don't implement script types (e.g. HTML).

Change-Id: If81a1390ee455fd971dea655d161d9c3f44fd08a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186309
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-06-10 07:09:17 +02:00
Caolán McNamara 7d0a028bc2 an EditEngine always exists
Change-Id: I08aea62e3355f202b723cd0a30870334321af3d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185517
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-05-19 14:08:15 +02:00
Gabor Kelemen 9176b4c53c Remove obsolete fw declarations from forms/
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ia59ebd1f5edddb278d77a234b222ae90c5945aba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183888
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-19 20:57:12 +02:00
Mike Kaganski 599ab8dc3a Rename con-const vcl::Font property getters for clarity
There are two sets of getters there; and the non-const ones may copy
the COW mpImplFont, and may call its AskConfig.

The name overload is unfortunate. It is not obvious at the call site,
which of the two will be called; and what is different. IMO, the way
to fix it would be to keep only one set of getters (the const one),
and make the call to AskConfig explicit (in the places that set font
name, and know that resolution of other properties will be needed).

But in this change, I only rename the non-const getters, making sure
to keep the behavior unchanged (at least the intention is to have a
non-functional change, meaning that the places that called non-const
overload, now use the renamed functions), to make it clear where we
actually may copy and initialize it.

Change-Id: I9a5cd91d5c1c0de7ff8577b9b982d165e4cdd2c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183116
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-03-19 17:24:38 +01:00
Mike Kaganski 04c62acc63 Use std::initializer_list, C-style array instead of more expensive Sequence
Change-Id: Ibb268268926cc91f595f19026f6cee4b5a74a8bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178038
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-07 19:10:08 +01:00
Mike Kaganski f9cac88fc2 Let ESelection use EPaM for simplification
And drop EPosition, which duplicates EPaM, except for its default
ctor (used in a single place).

Change-Id: I48bb6dafcba84465d61579df0ec71b815945532a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177075
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-24 08:12:55 +01:00
Mike Kaganski 493b8ab997 Simplify comphelper::query_aggregation
Change-Id: Id673c27e21c6706367f2effc92bbea61c83a5482
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170133
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-09 05:46:19 +02:00
Armin Le Grand (allotropia) 24d78fcb53 tdf#160906 use SfxPoolItemHolder
to avoid handling already deleted SfxPoolItems.

Change-Id: I1f1f8f93cae8db7f7c8df66c2c7f3c02b59a39c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167274
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2024-05-08 20:49:51 +02:00
Noel Grandin 1eaae3966d loplugin:ostr in forms
Change-Id: Ifee5d86b54aa746dbd3b17ff966794f32fbc23bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167303
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-08 11:15:40 +02:00
Caolán McNamara 41590e7d1f WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I8edb1fefe1b2b8a3db3ee8f3a0eed59c7f08a36e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166863
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-05-02 09:24:11 +02:00
Gabor Kelemen ad640dedd2 tdf#146619 Drop unused 'using namespace' in: forms
Change-Id: I5d81e8c359100da2a7dd98e75a1f79bbb73d9521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165570
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-05 13:45:10 +02:00
Armin Le Grand (allotropia) cebbd5795d ITEM: Rename for more control over SlotID usages
Change-Id: I51585f1c15984a066262023184f668662853d20f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-18 21:37:52 +01:00
Armin Le Grand (allotropia) ca3c6d468f ITEM: ItemPool Rework (I)
Driving forward the Item reworks I now take the
ItemPool in focus: It now does not hold any items
anymore and should be renamed to something like
ItemInfoProvider/ItemHelper, since it's main purpose
is to provide the Defaults for the Item functionality.

There is that SfxItemInfo, only a struct and bundling
SlotID and ItemFlags. There are also the DefaultItems,
just handled as ptrs in an array. It is/was always
error-prone to keep these in sync. Remember that it's
also necessary for the order to not only being sorted
but being increments of one with no gaps allowed in
the WhichIDs to which the Items are bound.

I now bundled that to a new class ItemInfo that joins
WhichID, SlotID, ItemFlags and the default Item. This
is a pure virtual base class, it comes in three
derivations:

(1) ItemInfoStatic:
This is supposed to be global static and hosts the
Item in a std::unique_ptr to ensure cleanup. It is
designed to be constructed once during runtime and
being shared globally. It allows the ItemPtr to be
nullptr to mark as non-static (if initial static is
not possible for some reason) but still offers the
needed data. Most cases (95%+) are of that case.
The contained Item is owned by that instance. The
flag isStaticDefault() is set at the Item.

(2) ItemInfoDynamic:
This is supposed to be used for cases where the Item
cannot be static: Mainly for SfxSetItem (that needs
a Pool itself in the contained SfxItemSet, so lifetime
is bound to that Pool), but other cases showed up in
the transition. These instances live while the Pool
lives and get destructed when the Pool goes down.
Also uses std::unique_ptr for the Item instance for
as much automated cleanup as possible, the contained
Item is owned by that instance, the instance by the
Pool. The flag isDynamicDefault() is set at the Item.

(3) ItemInfoUser:
This is used for UserDefaults that can be set for
every ItemInfo entry to 'overshadow' the default
from the 'outside'. It uses a regular Item and
the central access methods implCreateItemEntry/
implCleanupItemEntry to manage the Item instance,
thus works like a SfxPoolItemHolder. The Item
instance can be globally shared and re-used even
when the Pool goes down. Instances belong to the
Pool and are cleaned up when the Pool goes down.
This Item does not need any further flag to be
set.

The ItemInfos are organized using a class
called ItemInfoPackage:

This bundles groups of ItemInfoStatic to
functional instances. There are derivations/
implementations of this e.g. for Writer ItemPool
bundling all the needed defaults for Writer,
similar for draw/impress, Calc and other usages.

These ItemInfoPackage can be 'registered' at an
ItemPool using it's method registerItemInfoPackage.
This does all the needed stuff to setup that
group of ItemInfos at the Pool (It even sets
internal vars First/LastWhich, that info can just
be derived from the buildup ItemInfo Ptrs).

The ItemInfoPackage has methods 'size()' and
'getItemInfo(index) to allow looping over it
and deliver the infos the Pool needs. The
(forced, pure virtual) overloads of getItemInfo
in the specific implementations check for the
ItemPtr being nullptr and create a exclusive
incarnation of ItemInfoDynamic for the Pool if
needed, returning that. The Pool owns the
ItemInfoDynamic incarnations and uses the
ItemInfoStatic directly. On shutdown it cleans
up the ItemInfoDynamic as needed.

The ItemInfoUser is used by the Pool when a
UserDefault is set/used: for SetUserDefaultItem,
GetUserDefaultItem, ResetUserDefaultItem. It
is not held in a 2nd list, but directly in the
list of ItemInfo'ptrs: To keep track of this
an unordered_map is used that helds the original
ItemInfo associated with the WhichID. That way
no two lookups (as before) are needed to get the
current Pool's default for any WhichID.

The derivations of ItemInfoPackage are
encapsulated and just allow access to an
ItemInfoPackage& with a single method as
return value. All use a static local instance
of a std::array<ItemInfoStatic, FIXED_SIZE>
which constructs all ItemInfoStatic and the
static Item instances - if already possible.
Sometimes it is necessary to overload the
constructor to set some static instances
for Items later than the lib init. These are
also just marked with nullptr as Item instance.
Some need to overload getItemInfo to complete
instances of ItemInfoStatic, if needed, or
create and deliver instances of ItemInfoDynamic.

The registerItemInfoPackage also offers a
optional lambda callback: there were two cases
where local data from the Pool was needed to
incarnate the item - just add that to the
call to registerItemInfoPackage if needed,
see examples in the adapted code.

For the re-use of Items this means that now
in SfxItemSet/SfxPoolItemHolder *true* static
Items can and will be used without RefCount
directly and globally. This is also the case
for dynamic Items, with the exception of
differing Pools for SfxSetItems which cannot
be done.

Future:
That design is already prepared to allow
solving that Pool-chaining problem: currently
there are master/sub-pools and all accesses
have to traverse that structure before even
doing anything.
For the future the idea is more to 'compose'
a Pool by registering ItemInfoPackages, e.g.
for Writer pool you may start with SfxItemPool,
register the writer-specific ItemInfoPackage,
then the one for DrawingLayer (if needed) and
the one for EditEngine.
It should also be possible to get to smaller
granularities of that packages. Ideas for
new ones will emerge. We might also think
about composing Pools which can e.g. run Writer
and Chart, so allowing to use Chart *without*
OLE stuff in Writer - just ideas...

More changes:
- Adapted all stuff, cleaned up old stuff/
  definitions
- Removed FreezeIdRanges, that can be done
  once per Pool on-demand (and cannot be
  forgotten to be called)
- Merged XOutdevItemPool with SdrItemPool
  and offered a ItemInfoPackage which joins
  both needed sets of Items
- All the cleanup hassle with Pools and
  defaults cleaned up
- Adapted all access methods of the pool
  to use that new stuff. Pool chaining
  currently stays, but I use a central
  method 'getTargetPool' instead of
  recursive calling to get the correct
  Pool for the action

Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-12 10:35:33 +01:00
Armin Le Grand (allotropia) 4790ef5cb5 ITEM: Cleanup some Pool stuff with Defaults
Sorted out some methods at ItemPool which process
Defaults to make more clear what is going on and
what which method is doing.

Change-Id: I2568d3e03d0a56a14b6fe4e04521e1a8e22c000b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162643
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-01-27 19:02:54 +01:00
Tomaž Vajngerl 049bbd95c1 editeng: change EditEngine getter to ref in {Imp}EditView
{Imp}EditView always needs to have EditEngine set (or it would
crash otherwise), so we can change the getter to return a referece
instead of a pointer. This simplifies things a bit because we get
rid of all the nullptr checks and makes the interface more clear.

Also change direct access to mpEditEngine in {Imp}EditView to use
getEditEngine() and getImpEditEngine() (returning a reference)
instead.

Change-Id: Ib8f9c565b8364144bb9c35c3093c4975af1970c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162333
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-21 00:54:54 +01:00
Stephan Bergmann bd6fb0cd3e Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String
...in include files.  This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.

Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-23 11:04:42 +02:00
Stephan Bergmann e0c33ec15f loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2023-10-07 00:47:20 +02:00
Noel Grandin 839c501024 use more TypedWhichId in editeng
Change-Id: I2eb2b50ef7002e23221c985ab3218617b3832aa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25 07:52:21 +02:00
Caolán McNamara 63b8e8bda2 tdf#152974 revert change to ORichTextModel::getPropertyDefaultByHandle
properties that match the default are not exported, so we're basically
stuck with what is in there for compatibility with older versions, so
revert

commit ca46afebb7
Date:   Tue Oct 4 16:22:51 2022 +0100

    default to 'flat' instead of '3D Look' for form controls

and set m_nBorder to the desired new default in the ctor but
leave getPropertyDefaultByHandle as it always was

Change-Id: Ia862fc6851248fc9b16b3b4c505fdaf6fdb4b2ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151497
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-05-08 13:21:20 +02:00
Andrea Gelmini 32911b8fe9 Fix typo
Change-Id: I4d6b70095259b179f8ac3fc210899ffa84b87fa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145492
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-13 20:26:24 +00:00
Noel Grandin 172aedbc51 XUnoTunnel->dynamic_cast in VCLXDevice
Change-Id: I9fa06600d3b9a2172a1818f89a3b9c06d65c8c54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145467
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13 12:53:27 +00:00
Nalini Prasad Dash 855bf4d688 tdf#114441 - Convert use of sal_uLong to better integer types
The variable type of nHeight was changed as the return type of
pFontHeightItem->GetHeight() is sal_uInt32.Also nBit was assigned
the underlying datatype of LB(int) as it was checked against
LB::LAST(Value converted to underlying datatype of LB) in the for loop .

Change-Id: I657d545ac7af1786edd61569ba43b42e55d1f47b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143145
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-08 22:44:38 +00:00
Caolán McNamara ca46afebb7 default to 'flat' instead of '3D Look' for form controls
better matches what the pdf/print output will be.

Change-Id: I86869024768877f8345c4a0c320eb24d48b35f13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140947
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-04 21:18:15 +02:00
Samuel Mehrbrodt 467085bfb0 Rename MouseNotifyEvent to NotifyEventType
Also contains keyboard and focus events, not only mouse events

Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-19 11:42:59 +02:00
Caolán McNamara 310a524907 cid#1500688 silence Dereference after null check
Change-Id: I53ffb3537b2ac5618a9776c946eebf866f725cb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138929
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-27 15:30:03 +02:00
Stephan Bergmann 91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...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-08-18 17:10:19 +02:00
Caolán McNamara 479cf04cee drop unwanted scroll corner
Change-Id: I82143de336df91c5ca69693f6255b0d729e8381b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137978
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-08 20:26:28 +02:00
Caolán McNamara cdf5b6a2a6 tdf#117388 use native scrollbar under gtk in richedit control
you get one of these by starting with a normal text box form control
and changing its "text type" property to multi-line with formatting

Change-Id: If922b6b9fdc49b78fa379dbb3e5974a73f6095ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137933
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-08 09:54:31 +02:00
Noel Grandin 0351bec874 use more o3tl::span
which means we can reserve precisely the right number of entries when
building maps

Change-Id: I580414699289369de4730caae09829bbd8759e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25 10:00:23 +02:00
Chris Sherlock 845393b9aa move wintypes.hxx from tools to vcl
Change-Id: Ief9949fd4252de9e33df172af07aa7ed097b5520
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136560
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-20 12:20:59 +02:00
Noel Grandin 7778a1a573 clang-tidy modernize-pass-by-value in forms
Change-Id: I9b4b8db9872ccc8aeb461e34ceed203af7ea35b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21 12:59:54 +02:00
Noel Grandin 5200a73627 use more string_view in various
found by examining uses of OUString::copy() for likely places

Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01 08:30:18 +02:00
Noel Grandin 9f958c076a loplugin:passstuffbyref
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20 15:24:34 +02:00
Noel Grandin e13a8c7df2 use SfxItemSet::GetItemIfSet in desktop..reportdesign
Change-Id: Iaa0ddf4e97866d537a478e668e3c651a9eabc465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 07:46:32 +01:00