Commit Graph
7932 Commits
Author SHA1 Message Date
Andrea Gelmini 031f7527f4 Fix typo
Change-Id: Ifc9748fc33c72ad6e0cb334ca22ebb8b488164c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145710
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-01-18 11:28:31 +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 5ed9bb8bdc XUnoTunnel->dynamic_cast in RootItemContainer
Change-Id: I79a44f69dd7233a7e885698d29b929d9831025c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145630
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17 09:03:04 +00:00
Noel Grandin 81fd038c81 XUnoTunnel->dynamic_cast in ConstItemContainer
Change-Id: I0b3bf3e2c30a150aa3986e05951e0978fc16f1bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145629
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17 07:48:50 +00:00
Noel Grandin 9e1ebb43ab XUnoTunnel->dynamic_cast in RootActionTriggerContainer
Change-Id: Ie07b02b2011e4edb23793f6209cc35ccd7607c41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145628
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17 06:43:10 +00:00
Mike Kaganski f2f008c52a Merge SvXMLAttributeList to comphelper::AttributeList
And simplify the latter, to always use "CDATA" type (as the former did).
"CDATA" was used in all cases but one, where an empty string was used.

Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-15 12:32:29 +00:00
Noel Grandin 8d97a90564 XUnoTunnel->dynamic_cast in VCLXMenu
Change-Id: Iee992e2e09647a7678fd05321e601a4c5bf0c430
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14 10:51:22 +00:00
Noel Grandin 793904ff3a use more VCLXPopupMenu instead of XPopupMenu
which avoids a bunch of casting and makes the dependency explicit
instead of implicit

Change-Id: I754da72916fbbc51e7edc3c806155da34d347bd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14 06:36:24 +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
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 4cfcc9ac37 loplugin:unocast (framework::Desktop)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: Ifcf713b0543e78a124f613bcbda496069a280dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-23 22:57:07 +00:00
Stephan Bergmann feba0ddb15 loplugin:unocast (weld::TransportAsXWindow)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

On macOS, where we implicitly use -fvisibility-inlines-hidden-static-local-var
since
<https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f>
"Make -fvisibility-inlines-hidden apply to static local variables in inline
functions on Darwin", the static id local var in
weld::TransportAsXWindow::getUnoTunnelId cannot be in an inline function
implicitly hidden via -fvisibility-inlines-hidden.  Explicitly marking the
function as VCL_DLLPUBLIC would help, but would in turn cause MSVC error 2487
("member of a dll interface class may not be declared with dll interface").  So
just make the function non-inline in a new vcl/source/window/weldutils.cxx
(which would arguably be the best approach for the whole class, anyway).

Change-Id: Ib5615f6aae19346ea05b8b85ff77c0e5ea860994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144331
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-20 08:34:38 +00:00
Stephan Bergmann 557615d974 Use rtl::Reference to avoid a dynamic_cast
Change-Id: I3b9781cf00df7b740c8b29c6834e54035b255269
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144327
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16 15:40:24 +00:00
Stephan Bergmann 60a96f41f0 Use rtl::Reference to avoid a dynamic_cast
Change-Id: I1a439df62a33c7edccbbe62e373690b17b2f6161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144315
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16 12:14:09 +00:00
Noel Grandin 6fd64a87ad loplugin:implinheritancehelper in framework
use more ImplInheritanceHelper to reduce boilerplate

Change-Id: I47eefb8edc2041fa89e64f930b1997566562d51a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144162
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-14 16:25:04 +00:00
Stephan Bergmann 840154daf9 loplugin:unocast (framework::AddonsToolBarWrapper)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: I8014f683b939da9d638545c77dbddb3e478a385e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144143
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-14 11:59:44 +00:00
Miklos Vajna 4bcf6d9c90 tdf#151376 framework: fix calling in-document macros with reused frames
The bugdoc has a macro in it, and after closing the document -> start
center -> opening it again, you could no longer trigger the macro by
clicking on the URL field in the Calc cell.

The problem is that we cache protocol handler instances since
3f768cddd2 (framework: avoid re-creating
protocol handler instances all the time, 2022-05-02) in frames, but we
failed to invalidate this cache when the component of the frame changes.

Fix the problem by clearing the cache in XFrameImpl::setComponent(),
which gets called in this somewhat rare case when a frame gets reused to
host a different component.

[ No testcase, I'm not sure how to close a document without disposing
its XFrame from code. ]

Change-Id: I73ee83ec017f476803010cbf9e514315fc797371
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143998
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-12-12 22:45:11 +00:00
Noel Grandin 80ef2a46f4 tdf#152134 Customize: assign user macro to menu hangs
regression from
    commit d4257daba1
    Author: Noel Grandin <noelgrandin@gmail.com>
    Date:   Fri Dec 24 20:58:28 2021 +0200
    use comphelper::WeakComponentImplHelper in MenuBarManager

We should not hold the mutex while firing events, since the mutex is now
non-recursive.

Change-Id: I6ee45df0bf27df3ca1fd31857285ceb820161d61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143671
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-06 07:28:44 +00:00
Xisco Fauli 70a84bc0ee CppunitTest_framework_services: inherit from UnoApiTest
Change-Id: I8963f0dbf5e70347ee98e639dc6eeecc0f43b821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143099
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 14:52:43 +01:00
Xisco Fauli 8654586816 CppunitTest_framework_loadenv: inherit from UnoApiTest
Change-Id: I9c997691d6b7f0c46089eec86b614bcd1a0d71a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143102
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 14:32:40 +01:00
Xisco Fauli 49cd099df4 CppunitTest_framework_dispatch: inherit from UnoApiTest
Change-Id: I9a839ffe01e1d5da49268bd8ad78dbedd8dadc25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143100
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 13:24:58 +01:00
Mike Kaganski 35be7c8198 Simplify the method and fix its description
The description had the copy-paste error since commit
648106f879 (Fri Apr 04 16:12:43 2003 +0000)
when impl_searchMatchingInterceptor was replaced with findByPattern.

Change-Id: I84d8c867b6606ef8adb74df823046b58cf6d9b51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142541
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-10 14:45:57 +01:00
Henry Castro f43a5ec28d lok: fix convert-to batch mode, quiet interaction
If it is a batch mode to convert *.csv to *.ods,
use the quiet interaction to avoid unwanted filter dialogs.

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I4ef82c1079888ae099084072c146b5db4cc0f2a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141950
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ash@collabora.com>
2022-10-31 13:29:39 +01:00
Mike Kaganski 1e1f739f64 It's Frame-Controller-Model, not Model-View-Controller
Change-Id: I23a867623f77502baed6639ad3e255c06673d67f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141957
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-28 11:20:37 +02:00
Mike Kaganski 16e98d669f Introduce utl::ConnectModelViewController
And use it to avoid code duplication

Change-Id: I18447bc1a0388d57a273b310977a0f0fb54152b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141946
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-28 06:31:41 +02:00
Mike Kaganski 3d236177be Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.

Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11 12:46:01 +02:00
Henry Castro 161e8c63a5 tdf#127856: sc: Status bar "languages" when you click...
the popup "More.." button it will show the format cells dialog.

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: Idb60decf1c582c906d24d10fc248cfd20f8f4cbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138499
Tested-by: Jenkins
2022-10-03 15:43:09 +02:00
Maxim Monastirsky 79e450749d tdf#151172 crash in notebookbar with extension enabled
Change-Id: I60d777b27ffee095807490f4b181b1b08ed88462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140683
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-09-30 13:01:32 +02:00
Noel Grandin 4b95451f85 split utl::TempFile into fast and named variants
which makes it easier to know what each variant requires
to stay on it's happy path

Change-Id: I3275a2543573367714bc78092e882f6535507285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-29 09:11:18 +02:00
Noel Grandin 949f0fca3c use more string_view in framework
Change-Id: I9a79eef6d41696f1de7569f40d6eaf1d85ff77bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140638
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-28 08:42:54 +02:00
Noel Grandin 898ba5beb4 use more string_view in utl::TempFile
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-18 12:00:51 +02:00
Andrea Gelmini fcbd3882ae Fix typo signes->signs
Change-Id: I3e673aba3190f3183c357681c2a379b2be8e2c84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139925
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-14 19:42:11 +02:00
Noel Grandin fd3888c69a move ErrCode to comphelper and improve debug output string
need to move it, because modules "below" vcl want
to use the debug output method

Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-14 08:34:38 +02:00
Noel Grandin d156e891db tdf#150682 - bad shortcut in french langage
the = key is } on a french keyboard,
so remap the
  ctrl-alt-=
shortcuts to
  ctrl-alt-}
which means the user gets to keep pressing keys in roughly the same
physical location for this action, regardless of keyboard

Change-Id: I03e251dacc1c19e543182a44ae23fde2a57cfa45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-06 18:10:04 +02:00
Mike Kaganski 42d197ef30 tdf#150773: Avoid bringing loading files to front several times
The change attempts to establish this logic:
1. Honor the ForceFocusAndToFront setting uniformly: previously, it
   was ignored when reusing existing windows (opening in Start Center,
   in place of an empty document, or trying to open an already opened
   document);
2. When ForceFocusAndToFront is set, try to activate the window as
   early as possible (before loading begind), as a feedback to user,
   and also to avoid situations when activation would be impossible
   later (e.g., there is a timespan on Windows, during which entitled
   applications can bring themselves to foreground; a lengthy loading
   process can exceed that time);
3. If activated once, do not activate second time after loading ends,
   to avoid nagging users who deliberately switched to other tasks.

Explicit calls to impl_makeFrameWindowVisible were removed from
impl_searchAlreadyLoaded and impl_isFrameAlreadyUsedForLoading,
because those functions are called from impl_loadContent, which makes
sure that they are followed by a call to impl_makeFrameWindowVisible
(either in impl_setResult -> impl_reactForLoadingState, or directly).

A fix to tdf#83773 was adjusted; I checked that the bug doesn't
reappear after that.

Change-Id: I4bdcf978d43016d1e8979adf2fdf108a37f6ba2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139362
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-04 19:44:49 +02:00
Mike Kaganski f0fbf30a9c Some refactor
Change-Id: I5b87f9298bfeec70848654eacf5086803c19080a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139354
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-04 10:41:33 +02:00
Maxim Monastirsky dbeb697d62 tdf#149956 Rework toolbar image flipping
An unified code, covering both vcl and weld cases. For
SidebarToolBox, the controller is created before items
are inserted, so we listen for item insert event to set
initially correct state.

Change-Id: I3841f21883104b4d3f8541c97ec7fa5fc0bec575
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139022
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30 13:08:39 +02:00
Maxim Monastirsky 4fb8c0d14c tdf#149741 tdf#149956 Make flipping work also in the sidebar
- Reset the icon each time, as there seems to be no easy
way to retrieve the existing icon from a gtk widget in
order to mirror it, like we used to do for vcl. Similar
approach is currently taken in
ToolboxButtonColorUpdaterBase::Update.

- Store the flipping state also in GtkInstanceToolbar,
similar to vcl's ToolBox. This seems to be the easiest
way to make flipping not break on icon theme change,
covering all 4 cases (ToolBarManager, SidebarToolBox,
ToolbarUnoDispatcher, GenericToolbarController), w/o
too involved changes in each. This might benefit from
some refactoring later on, but should be good enough
for now.

- One unsolved problem is the appearance of flipped
icons with svg themes, as the regular variant is handed
to gtk directly, whereas the flipped one is loaded by us,
resulting with a different (blurry) look.

Change-Id: I48c16827b46fb75fd798a041851af6e2648ae8fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139021
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30 13:08:03 +02:00
Maxim Monastirsky 2958e4c92f tdf#149956 Remove previous vcl only solution
Change-Id: Id67b75856a230e175ccc6328ec0838c78589191b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139020
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30 13:07:36 +02: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
Mike Kaganski 0aa2b700aa No need to use throwing Reference ctor from 'this'
Change-Id: I1a9d69d101d3adede0455e94d4026e38131e6c77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138350
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-16 14:41:29 +02:00
Mike Kaganski 84fbb174d6 Drop redundant warning after throwing check
Change-Id: I1cc9ce6c415eb8aef9a250b3b5f342a425071b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138349
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-16 14:41:18 +02:00
Maxim Monastirsky f4c922f91e Missing colon in toolbar help ids
Regression of 5200a73627
("use more string_view in various").

Change-Id: I402eb6c03dcfa661c79c5469cfca3c86ac528f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138066
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-10 08:29:33 +02:00
Maxim Monastirsky c76857fe4e Make ToolBox::InsertItem take the command name
For the next patch for tdf#149956 I need the command to be
already set when the VclEventId::ToolboxItemAdded event is emitted.

Change-Id: I3d8ce44b426a3ed5704d4520d6e62bc4efbf8e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138038
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-10 08:28:18 +02:00
Maxim Monastirsky 085abe2b71 Unnecessary ToolBox::SetItemText call
Change-Id: I8d15e9657b3a6d01de9d07130ae3aa8284fbd178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138037
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-10 08:24:27 +02:00
Caolán McNamara d84f7217b2 tdf#150249 close of popover not detected
the popover listened to here isn't the one that ends up getting actually
used, its contents are transferred to another one, so the
OnPopoverClosed wasn't called, its sufficient to just use the
SubToolbarControl dtor to detect what is wanted here

Change-Id: I3f4a038acfc183b863457919bf89d600517ddc01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137792
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-04 16:28:40 +02:00
Noel Grandin 84c4ccfec1 tdf#149966 Crash on Windows and freeze on Linux when customizing Menu
use the notifyEach helper, which unlocks the mutex while we are
calling listeners, which means we can tolerate a re-entrant call to
removeConfigurationListener.

regression from
    commit dab35c152a
    Author: Noel Grandin <noelgrandin@gmail.com>
    Date:   Sat Dec 18 20:24:15 2021 +0200
    osl::Mutex->std::mutex in ModuleUIConfigurationManager

Change-Id: I7a2fbffb1c734b8bd0e952614592ce12c1611328
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137705
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-03 09:12:16 +02:00
Noel Grandin faa40c022c elide some makeStringAndClear() calls
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21 11:01:22 +02:00