summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2021-09-01tdf#118938 XLSX import/export: fix permission for editingTünde Tóth
The password for editing wasn't asked, also wasn't exported in XLSX documents. Now it's exported in Calc using the following steps, also verified before editing: - In File->Save As, choose Excel 2007–365 (.xlsx) format; - enable checkbox "Save with password" and click Save; - in the dialog "Set password", click on "Options" and enable checkbox "Open file read-only", and enter a password for editing (i.e. skip the password for opening). Note: Excel 2016 doesn't ask password for editing, but Office 365 does. Passwords created in Excel haven't been supported, yet. Also passwords with diacritics aren't interoperable. Note: saving the file under a different path is still allowed both in Calc and Excel without asking the password for editing. Change-Id: Ic00d7c5a785e04d270a182a4087ea922d7d92979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121371 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-09-01tdf#142458 minimal width not including extra width needed by scrolledwindowCaolán McNamara
its only including the width of the panels and not the extra space possibly required by the container window. Which is 2x the m_nBorderWidth of 1pixel of VclScrolledWindow in this case. Change-Id: I56775c7183d7a8b87af263ddc8bb17373779e9ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121390 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-01sfx2: allow storeAsURL() on the main threadMiklos Vajna
This is similar to commit b030e83fccbff8d82a4c84462075baa8442cde54 (sfx2: allow storeToURL() on the main thread, 2019-02-05), just this handles the 'export' case, not the 'save as' one. Note that this already worked in some cases when impl_store() decided to call storeSelf(), but vcl::solarthread::syncExecute() already avoids dispatch when called on a non-main thread, so that is not a problem. Change-Id: Ief09ba6c60923c7f16d86f61625c0faa9a5f829b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121385 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-08-31flatten SfxAppData_ImplNoel Grandin
no need to allocate things separately that are always allocated with this object Change-Id: I6acc215fa1f86625f300cd7717ee5d40a6bc986b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31no need to allocate SfxFilterMatcher separatelyNoel Grandin
it only contains a single pointer Change-Id: If988f03d693d4912ce3b7a6fa5fab7cd52ab05cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31no need to allocate SfxPickList separatelyNoel Grandin
it only contains a pointer Change-Id: I593665314eae2c0ad02b4555c2fda0d8719f2edf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121339 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31no need to allocate SfxDocumentTemplates separatelyNoel Grandin
it only contains a single pointer Change-Id: If6fc4924b7980317500a5c02e62c671f8f97aafd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31flatten SfxObjectShellArr_ImplNoel Grandin
Change-Id: I97e3ea18ce17c63ae95d7755a32c602b88373370 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31flatten SfxViewShellArr_ImplNoel Grandin
Change-Id: I781f877b0c94fdd667b4fd00342e68b35b127867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31flatten SfxViewFrameArr_ImplNoel Grandin
Change-Id: I1d9b0e117a08ddafe56546a58e536b76529966fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31flatten SfxTbxCtrlFactArr_ImplNoel Grandin
Change-Id: I422aeeb446a49fa4449eabe0c3643f125856db12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31flatten SfxStbCtrlFactArr_ImplNoel Grandin
Change-Id: I1d92a41f0f1a2610930e48b5eeaa689ac47ab7fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121329 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31flatten SfxChildWinFactArr_ImpNoel Grandin
it's just a vector with no additional intelligence Change-Id: I91d014783e79130689b4f6eadb3ef6d8486227e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121324 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-30tdf#139734 Drop redundant asserts after MacrosTest::loadFromDesktop4k5h1t
Change-Id: I7347d2c9429647e9cd87ad8147848d24f717d181 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121222 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-24remove one of the pimpls in SvBaseLinkNoel Grandin
two pimpl's and some internal fields seems a little messy Change-Id: I24f5a8e264dd98f8f74ab904ace85be1e9ff7acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120939 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-24osl::Mutex->std::mutex in SfxGlobalEvents_ImplNoel Grandin
Change-Id: I4dae3225b961b663493ca4ea40b6bbec2439270f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-24osl::Mutex->std::mutex in SfxViewShell_ImplNoel Grandin
Change-Id: Ic053a56f51714d7bb63009747cd93e98fcb9c438 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-24Refactoring PatchAnshu
Change-Id: Ia1fbc8cbdb1e055273e0a9058e11b43b4e0ac62f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120849 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-23loplugin:referencecasting look through more clang TypesNoel Grandin
Note that because of where the fix resides, loplugin:redundantcast also notices a few more things. Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20loplugin:unusedmethodsNoel Grandin
Change-Id: I9ce1ae787b735200cd57b0f470a6e5e3146657fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20loplugin:unusedfieldsNoel Grandin
Change-Id: Ie27afe4c2438c44baece4b926572584c6695dc39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19loplugin:constmethodsNoel Grandin
Change-Id: I786096b989daa6004a6527aafbe825b6f0a22d90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18tdf#143353 defer tip of the day until impress template dialog is goneCaolán McNamara
wait until that dialog is dismissed before showing the tip dialog Change-Id: Id0e7e28f09c5a9727e10eda55e468adb56bfda70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120675 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18loplugin:constparamsNoel Grandin
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18online: keep sidebar openedSzymon Kłos
when we switch mode in online keep sidebar in opened state. For example when switching from notebookbar to classic mode - sidebar is set to "Tabs" what makes sidebar hidden in online. The same happened when crash occured. Change-Id: I5d0d1dba4c89b5e380a0bf717fabf4337016894c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119496 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120660 Tested-by: Jenkins
2021-08-18jsdialog: dump more options command for panelsSzymon Kłos
Change-Id: I04d71d318d97916f040de7a617a802dd895faed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119104 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120659 Tested-by: Jenkins
2021-08-18Don't crash on SidebarController dispose when app is closingSzymon Kłos
When app is closing it is possible SfxGetpApp() will return null. So GetCurrentTheme() cannot return reference to correct theme. Remember which theme has registered SidebarController to unregister when disposing. Change-Id: If223233f621601f445472b0413a56e9c51e59673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118970 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120630 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-18undo changes to TextAlignCaolán McNamara
revert commit 8689bd5490b473a7ffb149bbe5f7f0683f679c72 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 29 20:49:29 2021 +0100 convert TextAlign to scoped enum lets leave this as it always was Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18remove dead codeNoel Grandin
ever since commit fd069bee7e57ad529c3c0974559fd2d84ec3151a Date: Mon Sep 18 16:07:07 2000 +0000 initial import Change-Id: I1fd724f2e4f31353da60d2615e6c840bbb88dfcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17jsdialog: sidebar: send message on sidebar closeSzymon Kłos
Revert needed code removed in 64bd4dd Change-Id: If45facbd68ea8f3af433b78e127fbb0745e62c25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118483 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120565 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-17Use new json_writer class for json objects.Gökay ŞATIR
Change-Id: I68b43829250201a716e2ec10968b90eadcba7fca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120567 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> Tested-by: Jenkins
2021-08-17RefactoringAnshu
Change-Id: I0863c4afb5dfce549dbcbdae4b8a63068e5d7331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119878 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-17Replace GDIMetaFile::Write and WriteGDIMetaFile with SvmWriter::Writepanoskorovesis
Use the new write functionality. This change also sets SvmWriter::Write second argument as const, as it's value does not change Change-Id: I1620756542a0bc54b5f8fc7ce3f57d0243a2ee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-16Drop tools::Rectangle::getX/getY, which are just duplicates of Left/TopMike Kaganski
The change allowed to simplify many places where previously this API was used, to avoid inefficient calculations (e.g., moving rectangle keeping its size, and then immediately changing the size). Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16sfx2: fix uninitialized SfxViewShell::mbLOKIsFreemiumViewMiklos Vajna
Introduced in commit 1b9fe58acb7b5bbbc83ecca30e17663fff7f0db4 (LOK: introduced Freemium LOK API, 2021-06-02). Change-Id: Ifdd6c13a64a167fa00b0305441c52340167f3809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118632 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120483 Tested-by: Jenkins
2021-08-16LOK: introduced Freemium LOK APIPranam Lashkari
also block the uno commands from deny list Change-Id: Iee994411891b73b865e6496403682f996d5e9321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116384 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120482 Tested-by: Jenkins
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12Resolves: tdf#143843 disable the recently-used widget during loadCaolán McNamara
We show a busy-cursor but the widget can still be interacted with so another document can be launched by clicking on another recently-used item while the first one is still loading, and the recently-used widget isn't prepared for this scenario so the second to complete load will crash. Disable the recently-used widget when its cursor is set to busy, and in the (unlikely) case that the load doesn't complete normally (missing document or load filter error) and the recently-used widget still exists and its cursor is unset from busy then reenable it for user input at that point. Change-Id: I8f4487f3dbede14c9778e49442366bd9445f1d63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120399 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-12SfxModule optional fields might be empty, cannot unconditionally derefNoel Grandin
fallout from commit 9ce7ada4530074d95d05efdc89a7eba1032d99e0 Author: Noel Grandin <noelgrandin@gmail.com> Date: Wed Aug 11 20:47:36 2021 +0200 flatten SfxInterface_Impl Change-Id: Ib57dd89903ec7f3c73a8466e33e47c4184962620 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120397 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-12flatten SfxInterface_ImplNoel Grandin
Change-Id: Ic66ed6d9738ee6fbbc2dc0b5a572e1ea57092b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120345 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12flatten SfxFoundCacheArr_ImplNoel Grandin
Change-Id: Ie2b29b041bb0f678494126b21df651371a40dbda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120344 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12flatten SfxModule a littleNoel Grandin
Change-Id: I6620e9d6d6d4b0a1b39f6d98acb0e72621f853a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120343 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-11convert some LogicToLogic calls to use o3tl::convert insteadTomaž Vajngerl
If a LogicToLogic uses fixed units, we can use o3tl::convert instead. We can also do the same for all other cases where LogicToLogic is used, but that needs additional investigation to determine if it is safe to do so. Note: MapUnit::Pixel is converted to o3tl::Length::pt because it assumed 72 PPI for a logical pixel, which corresponds with the conversion rate of a point (72 PPI). Today, 96 PPI is standard, which is also used for o3tl::Length:px. Change-Id: I29126df38bfcfda74b5d83d4cb880a378aecd18b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120230 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-10add some --disable-scripting fixesCaolán McNamara
Change-Id: I45f08bce8e067ead82f4c73c8150b7027c083172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120288 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-10Simplify init-/deInitSysTray even furtherStephan Bergmann
7e8d46b8988527967825fbb7210747e625ba1975 "INTEGRATION: CWS gtkquickstart" had originally introduced the [m_]p_[De]InitSystray function pointers, for dynamic loading of libqstart_gtklo.so on UNX. But 3e9c908b73f0fe0978c9980750a06bbc9e02295e "remove Linux ('UNX') systray 'Quickstarter'" removed that again, leaving behind the no longer necessary function pointer machinery. And 0a666480276f704d5127f578333659893517abe7 "Replace a use of boost::logic::tribool with std::call_once" tried to clean up that unnecessary machinery a bit, but failed to grasp the bigger picture. Change-Id: I370a6b212b1f25ea1e3ef5a250be72bfe509dd5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120282 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-10Replace a use of boost::logic::tribool with std::call_onceStephan Bergmann
Change-Id: Ifff3fc422719c55d8cb560e679f2585036350aa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120268 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-10lok: Avoid redundant call to UpdateConfigurationsMert Tumer
We call doc_setView each time we send an event to LOK such as keystroke and SidebarController::notifyContextChange event is triggered after that UpdateConfigurations() call causes layout reallocating for whole sidebar and we end up keep doing it. It takes significant amount of cpu time for lok case for no reason. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit b606764ce2a042f2a38c98820d7236661149d20c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120138 Tested-by: Jenkins
2021-08-09gtk4: g_menu_item_set_detailed_action aborts with ids with spaces in themCaolán McNamara
Change-Id: I6f421811f95add6ac0226a9043586f01cf45e8b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120180 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>