239 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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
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
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 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
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
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
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
Noel Grandin 3a0c5b7820 loplugin:stringadd in editeng..framework
after my patch to merge the bufferadd loplugin into stringadd

Change-Id: Ieac16a01fde6467a2f6fe47864069304a3c44e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-25 07:27:34 +00:00
Noel Grandin 37a4d67d68 flatten DocumentUndoGuard
which is a small object, and doesn't need a pimpl pattern

Change-Id: Ib76f6e5ad0347be61fe29b22f57e1211ce3337cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148172
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-03 13:44:15 +00:00
Noel Grandin 130602ad8c osl::Mutex->std::mutex in UndoManagerHelper_Impl
Change-Id: I57973db459633a4672c0d59c23bd3a682834ace8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-17 07:58:15 +00:00
Stephan Bergmann 061d3bc359 Fix locking order
JunitTest_sfx2_complex occasionally deadlocked when the main thread at

> framework::UndoManagerHelper::isUndoPossible
> chart::UndoCommandDispatch::fireStatusEvent
> chart::CommandDispatch::addStatusListener
> svt::ToolboxController::bindListener
> framework::ToolBarManager::UpdateControllers
> framework::ToolBarManager::AsyncUpdateControllersHdl
> Scheduler::CallbackTaskScheduling
> SalTimer::CallCallback
> SvpSalInstance::CheckTimeout
> SvpSalInstance::ImplYield
> SvpSalInstance::DoYield
> ImplYield
> Application::Execute
> desktop::Desktop::Main

has acquired the SolarMutex in
framework::ToolBarManager::AsyncUpdateControllersHdl and is now trying to
acquire framework::UndoManagerHelper_Impl::m_aMutex, while a cppu_threadpool at

> framework::UndoManagerHelper_Impl::impl_clear
> std::function<void ()>::operator()
> framework::(anonymous namespace)::UndoManagerRequest::execute
> framework::UndoManagerHelper_Impl::impl_processRequest
> framework::UndoManagerHelper_Impl::clear
> framework::UndoManagerHelper::clear
> gcc3::callVirtualMethod

first acquired framework::UndoManagerHelper_Impl::m_aMutex and then tries to
acquire the SolarMutex.  That additional acquiring of the SolarMutex had been
added to framework::UndoManagerHelper_Impl::impl_clear in
8611f6e259 "ref-count SdrObject".

Change-Id: Ifcb8765b29b65f773be6bbe54092346c5ae3a33b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146371
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-31 07:54:47 +00:00
Noel Grandin 6a26d47a79 use std:mutex in PropertySetContainer
instead of SolarMutex, we don't need to lock SolarMutex here,
we are not touching any UI stuff

Change-Id: I09f2dfd2c5e6e082066a726f8c6d64b4b136a78d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146307
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-29 18:03:38 +00:00
Andrea Gelmini c4341c95a2 Fix typo
Change-Id: I4f2cf13ce7b9dd7cd4d579bee1ad411459687c57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145668
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-17 18:59:38 +00:00
Radhey Parekh f7d4efc021 tdf#146638 In a titlebar, separator is changed from a hyphen to an emdash
Change-Id: Ibf79dfd4c3e2f44ba4564567cd5e3f3650095719
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145542
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-17 09:35:31 +00:00
Noel Grandin 92d9888e79 fix deadlock observed on jenkins
where we are locking SolarMutex and UndoManagerHelper_Impl::m_aMutex in
different orders in different code-paths, which is deadly when we call
into the same class recursively.

Thread 2 (Thread 0x7f5cf303b700 (LWP 22637)):
(this=0x7f5cf3037cd8) at include/vcl/svapp.hxx:1373
framework::UndoManagerHelper_Impl::impl_clear() (this=0x5f90d50) at
framework/source/fwe/helper/undomanagerhelper.cxx:691
  holds UndoManagerHelper_Impl::m_aMutex
  tries to acquire SolarMutex
framework::UndoManagerHelper_Impl::clear(framework::IMutexGuard&)::$_3::operator()()
const (this=0x5519040) at
framework/source/fwe/helper/undomanagerhelper.cxx:403
framework::UndoManagerHelper_Impl::clear(framework::IMutexGuard&)::$_3>::_M_invoke(std::_Any_data
const&) (__functor=...) at
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_function.h:316
(this=0x5519040) at
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_function.h:706
namespace)::UndoManagerRequest::execute() (this=0x5519030) at
framework/source/fwe/helper/undomanagerhelper.cxx:160
framework::UndoManagerHelper_Impl::impl_processRequest(std::function<void
()> const&, framework::IMutexGuard&) (this=0x5f90d50, i_request=...,
i_instanceLock=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:490
framework::UndoManagerHelper_Impl::clear(framework::IMutexGuard&)
(this=0x5f90d50, i_instanceLock=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:402
framework::UndoManagerHelper::clear(framework::IMutexGuard&)
(this=0x5f90c38, i_instanceLock=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:999
at chart2/source/model/main/UndoManager.cxx:278
void*, _typelib_TypeDescriptionReference*, bool, unsigned long*,
unsigned int, unsigned long*, double*) (pThis=0x5f90bc8,
nVtableIndex=18, pRegisterReturn=0x0, pReturnTypeRef=0xa2dac0,
bSimpleReturn=true, pStack=0x7f5cf30380e0, nStack=0,
pGPR=0x7f5cf30383e0, pFPR=0x7f5cf30383a0) at
bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77
cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*,
bridges::cpp_uno::shared::VtableSlot,
_typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*,
void*, void**, _uno_Any**) (pThis=0x5e40ac0, aVtableSlot=...,
pReturnTypeRef=0xa2dac0, nParams=0, pParams=0x0, pUnoReturn=0x0,
pUnoArgs=0x0, ppUnoExc=0x7f5cf30388e0) at
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233
pMemberDescr=0x551dd30, pReturn=0x0, pArgs=0x0,
ppException=0x7f5cf30388e0) at
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413
binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*,
std::__debug::vector<binaryurp::BinaryAny,
std::allocator<binaryurp::BinaryAny> >*) const (this=0x28a3cc0,
returnValue=0x7f5cf3039040, outArguments=0x7f5cf3039008) at
binaryurp/source/incomingrequest.cxx:236
(this=0x28a3cc0) at binaryurp/source/incomingrequest.cxx:79

Thread 1 (Thread 0x7f5cfd03eec0 (LWP 22302)):
(this=0x7ffcdf1b1720, t=...) at include/osl/mutex.hxx:144
comphelper::OInterfaceContainerHelper3<com::sun::star::util::XModifyListener>::addInterface(com::sun::star::uno::Reference<com::sun::star::util::XModifyListener>
const&) (this=0x5f90da0, rListener=...) at
include/comphelper/interfacecontainer3.hxx:313
    trying to acquire UndoManagerHelper_Impl::m_aMutex
framework::UndoManagerHelper_Impl::addModifyListener(com::sun::star::uno::Reference<com::sun::star::util::XModifyListener>
const&) (this=0x5f90d50, i_listener=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:286
framework::UndoManagerHelper::addModifyListener(com::sun::star::uno::Reference<com::sun::star::util::XModifyListener>
const&) (this=0x5f90c38, i_listener=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:1047
chart::UndoManager::addModifyListener(com::sun::star::uno::Reference<com::sun::star::util::XModifyListener>
const&) (this=0x5f90bc0, i_listener=...) at
chart2/source/model/main/UndoManager.cxx:338
(this=0x1d470d0) at
chart2/source/controller/main/UndoCommandDispatch.cxx:57
chart::CommandDispatchContainer::getDispatchForURL(com::sun::star::util::URL
const&) (this=0x5f66e58, rURL=...) at
chart2/source/controller/main/CommandDispatchContainer.cxx:93
chart::ChartController::queryDispatch(com::sun::star::util::URL const&,
rtl::OUString const&, int) (this=0x5f66c50, rURL=...,
rTargetFrameName=...) at
chart2/source/controller/main/ChartController.cxx:1055
    locks SolarMutex
chart::ChartController::queryDispatch(com::sun::star::util::URL const&,
rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/../program/libchartcontrollerlo.so
framework::DispatchProvider::implts_queryFrameDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&, com::sun::star::util::URL const&, rtl::OUString const&, int)
(this=0x5f5e6c0, xFrame=..., aURL=..., sTargetFrameName=...,
nSearchFlags=0) at framework/source/dispatch/dispatchprovider.cxx:352
framework::DispatchProvider::queryDispatch(com::sun::star::util::URL
const&, rtl::OUString const&, int) (this=0x5f5e6c0, aURL=...,
sTargetFrameName=..., nSearchFlags=0) at
framework/source/dispatch/dispatchprovider.cxx:106
framework::DispatchProvider::queryDispatch(com::sun::star::util::URL
const&, rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libfwklo.so
framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL
const&, rtl::OUString const&, int) (this=0x5f59ce0, aURL=...,
sTargetFrameName=..., nSearchFlags=0) at
framework/source/dispatch/interceptionhelper.cxx:87
framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL
const&, rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libfwklo.so
namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&,
rtl::OUString const&, int) (this=0x5f599c0, aURL=...,
sTargetFrameName=..., nSearchFlags=0) at
framework/source/services/frame.cxx:2329
namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&,
rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libfwklo.so
(this=0x5fe8b00) at svtools/source/uno/toolboxcontroller.cxx:520
(this=0x5fe8b00) at svtools/source/uno/toolboxcontroller.cxx:242
(this=0x5fdd060) at framework/source/uielement/toolbarmanager.cxx:731
framework::ToolBarManager::AsyncUpdateControllersHdl(Timer*)
(this=0x5fdd060) at framework/source/uielement/toolbarmanager.cxx:2298
framework::ToolBarManager::LinkStubAsyncUpdateControllersHdl(void*,
Timer*) (instance=0x5fdd060, data=0x5fdd258) at
framework/source/uielement/toolbarmanager.cxx:2285
(this=0x5fdd278, data=0x5fdd258) at include/tools/link.hxx:111
vcl/source/app/timer.cxx:75
vcl/source/app/scheduler.cxx:474
vcl/inc/saltimer.hxx:54
(this=0xa1ab10, bExecuteTimers=true) at vcl/headless/svpinst.cxx:161

Change-Id: I1971d094513cc747eff44db8e2a131ad0aae1506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145316
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11 12:25:23 +00:00
Noel Grandin 8611f6e259 ref-count SdrObject
Which means we can get rid of the majestic hack of ScCaptionPtr
Previously, SdrObject was manually managed, and the ownership
passed around in very complicated fashion.

Notes:

(*) SvxShape has a strong reference to SdrObject, where
previously it had a weak reference. It is now strong
since otherwise the SdrObject will go away very eagerly.

(*) SdrObject still has a weak reference to SvxShape

(*) In the existing places that an SdrObject is being
deleted, we now just clear the reference

(*) instead of SwVirtFlyDrawObj removing itself from the
page that contains inside it's destructor, make the call site
do the removing from the page.

(*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear
because this can be called from UNO (e.g. sfx2_complex JUnit test)
and the SdrObjects need the SolarMutex when destructing.

(*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel
destructor because the existing code wants mpDrawObj in
SwAnchoredObject to be sometimes owning, sometimes not, which
results in a cycle with the new code.

Change-Id: I4d79df1660e386388e5d51030653755bca02a163
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29 13:44:02 +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
Noel Grandin c60ad041e8 clang-tidy modernize-pass-by-value in framework
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02 12:12:15 +02:00
Noel Grandin 301b5c0aea tdf#121740 avoid some temporary OUString construction
Change-Id: Id70349e0e8f7d79bad693663ec3dc2963e0834b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134205
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12 11:38:42 +02:00
Noel Grandin d3849255b7 use more string_view in INetURLObject
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29 08:53:22 +02:00
Noel Grandin 3e76797384 move comphelper::string::toInt32 to o3tl
so we can use it in places where we cannot include comphelper

Change-Id: Iba0ba3e4c0dcf0f9d1f09092a77c3b2010ec4f6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08 20:44:43 +02:00
Noel Grandin 36e0e88b28 use more subView when converting to Int32
Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08 13:18:41 +02:00
Noel Grandin 27352b8163 Add XWeak constructor and operator= to uno::WeakReference
which is faster since we can skip the UNO_QUERY.

Change-Id: Id95ad9f3568213e974bd13659d92d4ea94dbfbd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130282
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-22 12:27:55 +01:00
Gabor Kelemen e3206e6740 Recheck modules [e-f]* with IWYU
See tdf#42949 for motivation

Change-Id: I49a3ce10dee4b03f99156f5b641f69448e1d5617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128479
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-17 01:33:35 +01:00
Noel Grandin d53b9c69e2 osl::Mutex->std::mutex in UndoManagerHelper_Impl
Change-Id: I4d279e2175f22422bec242ef8a15166cf67ef59f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127105
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20 13:11:28 +01:00
Caolán McNamara afa35742a4 prefer more css::awt::XPopupMenu api
Change-Id: Ib008281d63071ea79935af83cbe434be66155455
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126692
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-12 13:35:00 +01:00
Caolán McNamara 569de88e9c prefer css::awt::XPopupMenu api
and using GetXGraphic will return a vcl unographic::XGraphic which
also supports XBitmap as well as XGraphic so we can check if
the XBitmap we're passing around supports XGraphic and use that
if it does and drop the imagewrapper in favor of doing that

Change-Id: I3bd7963b53c3f715fca4b5cfb2ddad650ca92e1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126691
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-12 13:33:27 +01:00
Noel Grandin 87a399a74c use more OInterfaceContainerHelper3 in UndoManagerHelper_Impl
Change-Id: I9076f35366de690cca84361695d45ad3ffc31089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125917
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27 06:49:04 +01:00
Noel Grandin 2ab40e9ecc use more OUStringLiteral in MediaDescriptor
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-08 11:31:36 +01:00
Noel Grandin 23255d395f elide unnecessary UNO_QUERY_THROW calls
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04 07:44:26 +01:00
Mike Kaganski f662ba9536 Prepare for removal of non-const operator[] from Sequence in framework
Change-Id: Ied2683a0b8a1bab1a7594da1e9bdbd3cb753552c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124370
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 10:31:26 +02:00
Noel Grandin 8ce81efa73 simplify framework::TitleHelper
Every callsite (bar one) calls setOwner and connectWithUntitledNumbers after construction,
so just pass them in the constructor.
And for that lone callsite we can just nullptr as an argument.

Change-Id: If838e068bb59a407225d853a0f67983be400f2f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124426
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29 14:28:54 +02:00
Mike Kaganski 96bd77de5a Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5
- Revise uses of getSomething to use getFromUnoTunnel

Where that is impossible, use getSomething_cast to unify casting,
and minimize number of places doing low-level transformations.

The change keeps the existing tunnel references that last for the
duration of the pointers' life, because sometimes destroying such
reference may destroy the pointed object, and result in use after
free.

Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:08:27 +02:00
Mike Kaganski 3f65724ec5 Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4
- Change implementations of getSomething to use getSomethingImpl

Or where that's impossible, use getSomething_cast to unify this and
reduce number of places where we reinterpret_cast.

All static methods getting tunnel ids were renamed to getUnoTunnelId,
to comply with the convention used in <comphelper/servicehelper.hxx>.

TODO (in separate commits):
- Revise uses of getSomething to use getFromUnoTunnel

Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:08:14 +02:00