777 Commits
Author SHA1 Message Date
Noel Grandin ce16bc37fd use more concrete UNO class in the form of ScModelObj
Change-Id: I9ad26f05635583e203ff338a88add65838c9188e
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/555
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0a6ee7a99d6a5d624c4303256cc385ca6e23d456)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211619
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-01 09:01:29 +02:00
Andrea Gelmini b9056bb760 Fix typos
Change-Id: Id9a94c1576a425a8f984a2384272a4918338806a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210210
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 16:28:39 +02:00
Andrea Gelmini 6b0147ee90 Fix typos
Change-Id: I9d569b60aede100357559196eff4e59cbe016aa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209925
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 10:39:47 +02:00
Noel Grandin 25c08179be lsan:fix leak of VbaEventsHelperBase instances
triggers when running
   make CppunitTest_sc_macros_test CPPUNIT_TEST_NAME=testMacroButtonFormControlXlsxExport
under an ASAN build with detect_leaks=1

VbaEventsHelperBase registers listeners, which creates a ref-count cycle,
so it needs to implement the XComponent dispose() mechanism.

While we are at it, fix the same issue in SwDoc

Change-Id: Id1e24addf9788615d77a0976f6fe050d27421bb2

(cherry-pick manually from commit I9bfb72bc1c3df42229240f828add138aace3fa4c)
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1930
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>

Change-Id: I764316c5718d3b9b78bc2f54d1024249964f5724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205021
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-10 13:54:35 +02:00
Jan Luethi d66e045a39 tdf#143148: Use pragma once instead of include guards in files
vbalineformat.hxx,
vbapictureformat.hxx,
vbafillformat.hxx,
vbacommandbarhelper.hxx,
vbacommandbarcontrols.hxx,
vbacommandbarcontrol.hxx,
vbacolorformat.hxx

Change-Id: I30d492cee661cda8e607c8f1d566a8e441a51767
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202206
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2026-04-26 16:27:40 +02:00
Chiggy Wiggy b318822165 tdf#143148 Replace include guards with pragma once
Change-Id: I7c073b413edf608dca7ec28834114ce5ef0e8fbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195083
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-12-06 20:16:33 +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
Mike Kaganski 11314c7387 tdf#169278: handle css::bridge::oleautomation::Date in OnTime
Similar to commit e90e4b81b0 (tdf#167378:
handle css::bridge::oleautomation::Date in CellValueSetter, 2025-07-04).

Change-Id: Icce5ca2248895a1a386b005b9ce232e45aecd633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193625
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-08 22:49:33 +01:00
Xisco Fauli 7375ed1c0c tdf#143148 Use pragma once instead of include guards
Change-Id: Ifbc367610ee74c2372612c44d27c1a8167175044
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192074
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2025-10-16 17:13:57 +02:00
Gabor Kelemen a20e7520c3 Sanity check all IwyuFilter files
This should not complain anymore:

for i in $(ls -1 */*yaml) ; do mod=$(echo "$i" | cut -d '/' -f1 ) ; bin/find-unneeded-includes --sanitycheck "$mod"; done

Change-Id: I5c4b99f5cb58c6f696b127c81edd6d323104cd7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191829
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-10-14 19:44:19 +02:00
ihtgoot eeefe4bcdc tdf#143148: Replace include guard #ifndef with #pragma once
Change-Id: I166c263ec46ae0c10dd6edd0a4e1ccac4df7fb1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191111
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2025-09-18 14:42:48 +02:00
Noel Grandin 6d0e5ddede remove BitmapEx
all use-sites have been converted to Bitmap

Change-Id: I1a8842217a266eef100bd387ab013b004e532256
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190618
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-05 19:45:45 +02:00
Noel Grandin 7e4b7be35c use more concrete UNO in sw
Change-Id: Ie83d957349f123bca0fd46ce3144ce778c3ec101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178704
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-12-18 14:49:14 +01:00
Caolán McNamara 3e6ad944ac don't bother passing const std::[u16]string_view by reference
Change-Id: I49477c20849dd99118d5935c0f1576429648bfca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177734
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-03 15:18:31 +01:00
Mike Kaganski 5166efaa64 Turn SC_MOD macro to a function
Change-Id: I5fc11037902bc6200fdaf4749260efe8e658bdce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177070
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 07:43:02 +01:00
Noel Grandin 8393267c65 clang-tidy: performance-unnecessary-copy-initialization in various
Change-Id: I1033c33a6b4bf06e365ce183b1a73c98bea777ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176442
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-12 09:03: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 56f3dbffdf Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08 05:34:20 +01:00
Bogdan Buzea dea5d561ba tdf#163486: PVS: Identical branches
V1037 Two or more case-branches perform the same actions. Check lines: 632, 642. But it seems FRAME case was omitted, based on the above switch (line 591).

Change-Id: I781aa8b47bdc969fa8e3e20297c94da71919a33f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175351
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-01 01:15:17 +01:00
Noel Grandin ade52eb721 use less exception throwing for flow control
Change-Id: I7ad023479229f89918e588eb8dc7431b5830b45d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171813
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-13 19:36:37 +02:00
Noel Grandin fcaf6cee08 loplugin:ostr in vbahelper
Change-Id: I7763dd628ba3d4288e52b51e08a5af301f916c1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167621
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-14 15:14:51 +02:00
Stephan Bergmann d98e014cf6 Extended loplugin:ostr manual changes
I had done these a while ago, when I looked into extending loplugin:ostr to do
more automatic rewriting, and these were places where I needed to do something
manually, for one reason or another, because the automatic rewriting would not
pick it up correctly.

However, I got distracted, and a wholesale automatic rewrite would still run
into cases where an _ostr/_ustr instance from a library's .rodata would still be
referenced after the library has already been dlcose'd.  So I never came around
to finishing all that.

But there appears to be renewed interest in (automatic) rewritings here now, so
it probably makes sense if I share this part of my work anyway.

Change-Id: I3da9d38398e4bca373cb0000a9d34b49a36ad58a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166792
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-04-28 11:29:52 +02:00
tbalaj 5c99838c1a tdf#143148 Update Include Guard usage
Updates vbabutton.hxx to use pragma once

Change-Id: I55874083ad0cdbc08bedaa71fa7553acfefa3195
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164324
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-11 05:42:43 +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
Armin Le Grand (allotropia) b8e393686c ITEM: Remove suspicious extra-Which in ::Put
The ::Put methods at SfxItemSet had an extra WhichID
parameter that was not really documented, but I would
guess often asked why it exists: An extra WhichID, just
called 'nWhich' (which makes things NOT clearer). That
is 'strange' since the Item given to be put already
internally has a WhichID, so why a 2nd one?

If you were really interested and read all that code
(no, no comments on that anywhere) you might know
that this a kind of 'Target-WhichID' under which
the Item shall be put to the ItemSet. Since this
is unclear for most people it is even dangerous and
explains why so many code places just hand over the
WhichID requsted from the Item that already gets
handed over.

To make it short: I removed that. For the 19 places
where this was really needed I added a new method
besides ::Put called ::PutAsTargetWhich that takes that
extra WhichID (now called TargetWhich) and takes the
needed actions. These are quite some because that may
be combined with the bPassingOwnership flag, see new
SfxItemSet::PutImplAsTargetWhich method.

This makes usage of ItemSets/Items less dangerous. It
also simplifies and thus makes safer the central helpers
implCreateItemEntry/implCleanupItemEntry which have some
less cases to handle.

Debugged the failing UnitTests showed that there is
an incarnate Item != SfxVoidItem that causes problems.
I checked for errors in the change, but no luck.
Afterr some time I found out that a ::Clone
implementation caused the problem: These need to
also copy the WichID of the original, but the
SfxFrameItem failed to do so. This did not cause
problems in the former version because
implCreateItemEntry was designed to set a missing/
different WhichID.
I corrected that in SfxFrameItem, also removed not
needed costructor that caused that. Also added a
SAL_WARN and a correction in implCreateItemEntry.
I could have added an assert (did so for running
local UnitTests), but should be enough.

NOTE: When hunting for Items except SfxVoidItem
that get crerated using a WhichID '0' i learned
that this indeed happens: There are some (5) calls
to SfxRequest::SetReturnValue that incarnate an
SfxBoolItem with WhichID '0' (ZERO). This is not
good and I think about how to change that...

Change-Id: I9854a14cdc42d1cc19c7b9df65ce74147d680825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162124
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-01-17 01:56:01 +01:00
Gabor Kelemen 2c6f28f431 tdf#146619 Recheck include/[v-x]* with IWYU
Change-Id: I3cecd622aa04d842a449b4bfd6c55d0b8b96aabf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156992
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-12 18:51:27 +01:00
Noel Grandin a214ac6774 simplify and modernise ScopedBitmapAccess
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.

Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-07 09:32:14 +01:00
Noel Grandin cc772833a1 loplugin:fieldcast in VbShapeRangeEnumHelper
Change-Id: I18e24a4c0b86a6f9a456c0e962f87d74a4edf709
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159093
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08 08:17:55 +01:00
Noel Grandin d31bb122bc loplugin:fieldcast in VbShapeEnumHelper
Change-Id: Iece221df3b650078a1796d407459bbd96ad058e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08 08:17:48 +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 335e73a7f3 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: vbahelper
Change-Id: Idb944974318a94763532639c9e74040adadf06f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158290
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20 22:46:23 +02:00
Stephan Bergmann 6d1b241ab7 Drop o3tl::span, can use C++20 std::span directly now
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11 21:53:13 +02:00
Noel Grandin 87db52ab1e Revert "use more Reference::query instead of UNO_QUERY_THROW"
This reverts commit 7fc6063914.

sberg noticed that there is a difference now:

there's a subtle difference now, in that if  y  was null originally, it would have thrown a (caught) exception, whereas now it will crash in the  y.query<X>()  call.

Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-25 14:15:56 +02:00
Noel Grandin 7fc6063914 use more Reference::query instead of UNO_QUERY_THROW
since querying with exceptions is consideably more expensive

Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-18 11:03:02 +02:00
Noel Grandin b6b26421a1 split Point/Size/Rectangle into AbsoluteScreenPixel* types
to attempt to make it obvious in code what kind of coordinate
system we are dealing with.

The idea is that by doing this, the compile-time type checking
will flush out inconsistencies between different code.

I started with vcl::Window::OutputToAbsoluteScreenPixel
and worked outwards from there.

Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-02 08:13:15 +02:00
Khaled Hosny 11b513da7f vcl: Drop now unneeded DevicePoint typedef
It has been always typedef'd to basegfx::B2DPoint since:

commit 5e218b5c51
Date:   Wed Jan 12 21:19:32 2022 +0000

    always use B2DPoint for DevicePoint

Change-Id: I9f5202d5a71c77dd79f1759923917c26bf68a9af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154632
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-23 06:04:31 +02:00
Noel Grandin 0e8b7dd7a0 split GetWindowExtentsRelative asunder
sometimes it returns a relative position, sometimes an absolute
position.

Rather have two different methods with names that match what
they return.

Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-20 08:15:29 +02:00
Noel Grandin bfdf5d290b use more XVclWindowPeer
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere.

Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-01 14:42:17 +02:00
Baole Fang a6edfaaeb0 tdf#150281: Fix CentimetersToPoints in Calc
Originally, CentimetersToPoints was implemented as a base method for
Writer and Calc. They are both using the same implementation,
which is correct for Writer, but wrong for Calc.
Since their behavior should be different,
I remove the base method and implement a correct one for Calc.

Change-Id: If957accdd9be86a96ca6fb711502e49a79bf3223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148745
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-13 15:16:24 +00:00
Noel Grandin d0b71f167c flatten some vba classes
no need to allocate ShapeHelper separately, it is only one pointer big

Change-Id: Ie4981ca81ac1dd430f22ba32357fcabbbd47bd09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147944
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28 10:53:39 +00:00
Hannah Meeks 0548269ca0 VBA: Remove conversions in writer from OORGBTOXLRGB (XLRGB is actually BGR!)
Enum to store if document is Writer or Calc because font colors are treated
differently depending on this:

In writer the colors come in as RGB but in calc they are in BGR and both palettes
are in RBG so we only need this conversion for calc.

Includes testdoc for calc - to show this still works

Change-Id: I79d9d585dbfc527c0781543ce1f1095c4db190b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144788
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-20 16:55:31 +00:00
Caolán McNamara 0908c7c118 SfxViewShell::GetViewFrame never returns null, change to a reference
various null checks can be seen to be redundant and removed

Change-Id: Icf49c1de4b0302795d2769a370af3abceaad0221
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147147
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-16 15:13:21 +00:00
Stephan Bergmann 19691c3b68 Revert all the recent loplugin:unocast changes
...as obsoleted by ef53355355 "Rudimentary support
for dynamic_cast on UNO proxy objects".

This reverts all of:
4cfcc9ac37 "loplugin:unocast (framework::Desktop)"
03efbf72f4 "loplugin:unocast
 (vclcanvas::TextLayout)"
80099fdd51 "loplugin:unocast (SalGtkXWindow)"
cc147f576d "loplugin:unocast
 (sdext::presenter::CachablePresenterView)"
40db42be1d "loplugin:unocast
 (vclcanvas::CanvasFont)"
2d1e7995ea "loplugin:unocast (CairoColorSpace)"
4c0bbe4bd9 "loplugin:unocast
 (canvas::ParametricPolyPolygon)"
8980366662 "loplugin:unocast
 (vclcanas::CanvasBitmap)"
d5e0c2c8db "loplugin:unocast
 (sfx2::DigitalSignatures)"
c0c4519e0d "loplugin:unocast
 (VCLXAccessibleComponent)"
feb8b833a6 "loplugin:unocast (VCLXDialog)"
1fa58cc6cc "loplugin:unocast (VCLXMultiPage)"
f481f036de "loplugin:unocast
 (DocumentSettingsSerializer)"
73df933f5f "loplugin:unocast
 (css::embed::EmbeddedUpdate)"
420165ab0e "loplugin:unocast
 (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)"
9abe8ee067 "loplugin:unocast (MutableTreeNode)"
9f3022ceb0 "loplugin:unocast (VCLXTabPage)"
1be70dda02 "loplugin:unocast
 (vcl::unotools::VclCanvasBitmap)"
d6a70bb641 "loplugin:unocast
 (basegfx::unotools::UnoPolyPolygon)"
5a14f009e6 "loplugin:unocast
 (xmlsecurity::Certificate)"
99009c9535 "loplugin:unocast (sd::Annotation)"
0c7585c5fa "loplugin:unocast (sd::TextApiObject)"
24e14afd1b "loplugin:unocast
 (SignatureVerifierImpl)"
1a7ad0c10d "loplugin:unocast
 (pcr::PropertyEventTranslation)"
a97e2d2702 "loplugin:unocast (RangePageBreaks)"
19dfdf86ad "iloplugin:unocast
 (pcr::OFormattedNumericControl)"
f9785ea595 "loplugin:unocast
 (frm::OInterfaceContainer)"
5e5f40a4a9 "loplugin:unocast (ScVbaShapes)"
27b35b2c21 "loplugin:unocast (ScVbaShapeRange)"
cb3108f860 "cid#1517812 Dereference null return
 value"
feba0ddb15 "loplugin:unocast
 (weld::TransportAsXWindow)"
4d6c232165 "loplugin:unocast
 (oox::ForumlaImExportBase)"
4844c096a8 "loplugin:unocast
 (cairocanvas::SurfaceProvider)"
9a0b523e0a "loplugin:unocast
 (cairocanvas::CanvasBitmap)"
8a5648d8e5 "loplugin:unocast
 (cairocanvas::TextLayout)"
28c27a0623 "loplugin:unocast
 (cairocanvas::CanvasFont)"
53bc223cb3 "loplugin:unocast
 (cairocanvas::RepaintTarget)"
5f70b0b9f6 "loplugin:unocast (SvXMLImport)"
068187a898 "loplugin:unocast (VCLXWindow)"
88b4f96620 "loplugin:unocast
 (sfx2::sidebar::SidebarController)"
f1b7a69b28 "loplugin:unocast
 (SvxLineStyleToolBoxControl)"
ba76f0ba7e "loplugin:unocast
 (i18npool::Calendar_gregorian)"
840154daf9 "loplugin:unocast
 (framework::AddonsToolBarWrapper)"
b0e9c4c5f0 "loplugin:unocast
 (GrammarCheckingIterator)"
8ee6cfc965 "loplugin:unocast
 (ucb::ucp::ext::Content)"
5b8cd77c11 "loplugin:unocast
 (basic::SfxScriptLibraryContainer)"
9e73ff9fce "loplugin:unocast
 (sdext::presenter::PresenterNotesView)"
a98acca8fb "loplugin:unocast
 (SelectionChangeHandler)"
c0b59ad6e3 "Consistently use
 comphelper::getSomethingImpl<I>(aIdentifier, this)"
276e3ccbdd "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>
2023-01-05 11:45:51 +00:00
Stephan Bergmann 5e5f40a4a9 loplugin:unocast (ScVbaShapes)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: I913565ccd93472f2a8893c4251e80d0309827c34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144633
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-21 06:42:34 +00:00
Stephan Bergmann 27b35b2c21 loplugin:unocast (ScVbaShapeRange)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: I4a66df07f2e768ee3203b730b50be4b9ec6a01a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144634
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-21 06:42:22 +00:00
Justin Luth 55628d6b25 sw vba: add WordBasic.MsgBox
The unit test just consists of adding a
"WordBasic.MsgBox()" to the vba code in testVBA.docm.

make CppunitTest_sw_macros_test

or just open the file manually for an easy-to-run experience.

Change-Id: I38edfee42649fcc85f0f535a2c9861c45038fa0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141347
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-17 14:14:53 +02:00
Justin Luth 73911ed8d3 tdf#148806 doc vba: highest priority is ThisDocument AutoOpen V2
A review by Stephan Bergmann made me re-think adding a separate
event for this. It really is only one event and not two
(or three as I initially imagined). In the end, I like this better
because it highlights the difference between Excel and Word
by keeping all the differentiating logic in one place.

The inability to properly document the purpose of these new events
was the impetus to redesign this. Thanks Stephan for the prompt.

Change-Id: Ic2d461c13c4a52e279224cb485d2b6c4a3c57b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141233
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
2022-10-12 01:12:17 +02:00
Justin Luth ffc15725b5 tdf#148806 tdf#151393 xls vba: no Auto_Open from ThisWorksheet
Unlike Word, ThisWorksheet cannot hold auto-running
subroutines for Open/Close/New.

This fixes a LO 7.4 regression caused by
commit beb6c62e99.

Change-Id: Idb8f72775d9392b306cb924ee776821272b12f3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141127
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-10-11 20:39:04 +02:00
Justin Luth eaa38b0f9d tdf#148806 doc vba: only autoOpen PUBLIC macros
Note: this should NOT apply to Document_Open which normally
is a private subroutine and runs fine as private.

I tested and it DOES apply to all three version of AutoOpen:
-ThisDocument.AutoOpen,
-<AnyModule>.AutoOpen,
-AutoOpen.Main

Note: this is different from Excel.
Private Auto_Open runs just fine there.

Change-Id: If10c8c90c35275c2b14dc2e15fb357674fc580b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141114
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
2022-10-11 03:08:13 +02:00
Justin Luth e2abb5bbc0 tdf#148806 doc vba: accept module AutoOpen.Main
This is the lowest priority way of running AutoOpen,
and it only applies to Word, not Excel.

There is some code in basic/source/classes/sb.cxx
that was somewhat finding this before it got lost in LO 7.4
with commit beb6c62e99.

TODO: these AutoOpens should only run with a public sub,
not a private one.

Change-Id: I8a733cde13f96636942d84a0b05520692aac3e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141094
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-10-09 01:07:23 +02:00