summaryrefslogtreecommitdiff
path: root/sfx2/inc
AgeCommit message (Collapse)Author
2023-04-19loplugin::unusedmethodsNoel Grandin
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09tdf#154694 All icons: Sidebar's A11y CheckerRizal Muttaqin
Change-Id: Ifb91eb6d78ae1c6cb7050b89ab0ddc45fb029a09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150159 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-09tdf#149144 Icons for sm Formula Editor in Sidebar DeckRizal Muttaqin
Change-Id: I851e0e45df3331012eddcaa3240c6ffb27054e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148520 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-02no need to allocate TargetsTable separatelyNoel Grandin
Change-Id: Ifc16a5c7137776c8375d83afb031999023a7424a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-14tdf#153541 update icons in notebookbar when theme changesCaolán McNamara
not just when the config changes Change-Id: If935160e93d96d7ccb4b425346e0440fc4420dd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147009 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-17XUnoTunnel->dynamic_cast in SfxOfficeDispatchNoel Grandin
Change-Id: Ie1aa51a873d1e80a15cddf6220f23a6cf4d090c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-21cid#1517813 Uninitialized scalar fieldCaolán McNamara
Change-Id: I119e6af448d80cf47dfe3f5bd7983ebf57221790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144686 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-20Async PDFExport dialog and parent methodsNickWingate
Filter dialogs are all called generically from guisaveas.cxx in GUIStoreModel() Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: Idfbe85c09f84d4a7cf3f00b9704d5af94868a051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140403 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144511 Tested-by: Jenkins
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: I4a7276ffc36b4f954fe1fa39fb5666fa184e66e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-04Templates: tdf#86483: Add "Localization" category and add a template for zh_CNKevin Suo
This patch adds a new template category named "Localization", to be used for templates created by our l10n team for each locale, so that languages which requires special layout or formatting (such as CJK or CTL) can have their own templates bundled by default. This patch aslo adds a (general purpose) Writer template for the Simplified Chinese language. Chinese language, by convention, need to format the document to have the first line of the paragraph be indented by 2 characters. The font size, line spacing, paragraph margin etc also need special treatment. If the Chinese users start writing using the current default Writer template, they need to adjust the style formatting every time to meet their needs. Although this template can be provided as an "extension" on the extension website, in practice very few people will go to the extension website and look for such templates. Such bundled templates can also be added by other l10n teams. The extras/README.md will be updated in a separate patch to include documentation on how to add such templates and have their template names translatable on weblate. This does not completely resolve the issue in tdf#86483, which requests to "Implement different default templates per locale". However, with this patch, we are a step closer to set a choosen template when the user switch to a certain UI. Change-Id: Ic295482354f343e981eb20908907bd6a945b7120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140802 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2022-10-17loplugin:redundantcast look for redundant dynamic_cast<T&>Noel Grandin
Change-Id: If5a8e74b7ede80b782b584b4f62ec1b8713fd86d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-01tdf#132576 Remove unused template categoriesRafael Lima
This patch removes the names of template categories that are not used. None of these template category names are reachable via the Templates Manager nor via the Save as Template function. Change-Id: Ic2caf485106134de8554b93b5d6e14bdf7f382e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140610 Reviewed-by: Laurent Balland <laurent.balland@mailo.fr> Tested-by: Jenkins
2022-09-29tdf#151197: Remove EmojiControlKhaled Hosny
Change-Id: I7fb423727425ec42d1161f6ac5649f5cac82f12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140651 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-28Related tdf#132576 Fix "draw" string in Template Manager and make it ↵Rafael Lima
translatable The Templates Manager has a category name "draw" which cannot be translated. It also looks weird because all other categories have full names whereas this one is a lowercase string. The reason the word "draw" is used is because it is the name of the folder where the template is located. This patch maps a string "Drawings" to give a proper translatable name for this category. For this patch to take effect, the user needs to be on a fresh profile (or at least reset the user UI modifications). Change-Id: I2223dfe8761a5687b02e843957ebf7fb07f4a626 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140506 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2022-09-16Resolves tdf#80934 - GUI means to filter thumbnails in start centerHeiko Tietze
Resolves also tdf#92499 by removing the (badly placed) context menus from the left pane into the new "toolbar" Change-Id: I8e15d30380d4d915ed109877d716e1a4689885c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139730 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
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-08-31tdf#101302: Add option to clear unavailable files in menu/start centeroguzbalkaya
This patch adresses tdf#101302. It essentially adds a menu item to clear unavailable files from the menu and start center. Previously, they were visible as recent documents in the menu and start center, and caused error when selected. Change-Id: I55ee9f663b24c343a90817c438aff11d9230061c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120480 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-30tdf#149956 Rework toolbar image flippingMaxim Monastirsky
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-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...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-07-14clang-tidy modernize-pass-by-value in sfx2Noel Grandin
Change-Id: I7984f0b52809091511dc01005fdbfeafd521b4bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-10tdf#143148 Use pragma once instead of include guardsnazanin yadi
Change-Id: Ibbcfa123032cfbe141e6f33ff1f65054f129d3ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136682 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-06-09can pass by const& hereNoel Grandin
no need to copy Change-Id: I1fcc5d645a8f5278e2122a168b00c846d75bc091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-06Fix typosAndrea Gelmini
Change-Id: I36d81be6e591830ee3762a0d43357dbacd68ad93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135439 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-05restore %PRODUCTNAME to accessible descriptions that need themCaolán McNamara
The original problem was that %PRODUCTNAME wasn't replaced for accessibility descriptions (which are reused for extended tips) under gtk. Universally querying all a11y descs on load to potentially replace %PRODUCTNAME in a11y descs at runtime led to tdf146971 which was a huge startup slowdown. The half way 7.3 fix was to leave a11y descs alone, but do the replacement when querying for the extended tip case. So the extended tooltips were ok, but screen readers would still say a raw "%PRODUCTNAME" text, hence the rewording effort to remove %PRODUCTNAME from the a11y descs entirely for 7.4. But there is now a few cases where some options paths exists in the a11y descs which is not exactly correct wrt to the text shown in the options dialog. Reworking the options dialog to not have %PRODUCTNAME there at all and updating everything to fit that sort of change would not be popular. So move the cases where a11y descs really should have %PRODUCTNAME in them out of the .ui files and into .hrc files and use specific set_accessibility_description calls for them via ResID which will do the %PRODUCTNAME replacement automatically. Hopefully the a11y runtime cost for just this handful of cases is negligible in the overall scheme of things. Change-Id: Ieb17d26fd581cd5804a52b371b3bb5ea43023aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135432 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-08osl::Mutex->std::mutex in sfx2::PreventDuplicateInteractionNoel Grandin
Change-Id: I4abc1462b4d691dc699a9716573d23824897176b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26officecfg,unotools,framework,sfx2: store ReadOnly for recent docsMichael Stahl
Add Office::Histories::HistoryItem::ReadOnly flag to configuration so that a document that was opened read-only isn't opened as editable from recent documents. Change-Id: I6985da287d3337a53a7e41e8e500421038eedb91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133385 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-03loplugin:stringviewparam convert methods using matchNoel Grandin
which converts to a combination of substr and o3tl::starts_with Change-Id: I5b01a181b9e6bee3483e4f49f1a9426abcc682d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132458 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-15tdf#134065, tdf#147998: fix thumbnail generation codeMike Kaganski
This moves the code drawing thumbnails and overlay icons away from RecentDocsView to RecentDocsViewItem, where the final size of the thumbnail is defined, so that no scaling of pre-painted icon would happen. This also restores the SFX_FILE_THUMBNAIL_* to state before commit d43c6fa220524a09c0b24cbb5bc03c4456cd2515, and introduces a new set of SFX_FILE_OVERLAY_* to be used for the overlay icons. This fixes the display when RecentDocsThumbnail is disabled. Change-Id: I5eb4aed5325459ddec7e196300cf6c2f9ddf80b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131610 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01Recheck modules s[f-t]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I1f520aad1b1c942ad5616d96851016fc366ac58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130203 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-18sfx2: introduce SfxBindings::QuerySlotIdHenry Castro
In order to invoke QueryState with the slot id, which it is easier to invoke UNO command states in unit test. Change-Id: I36d72a4381ff8386b1f1af33284ce674cf26acd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123063 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129464 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-09tdf#146937 Remove "refresh" command from Template ManagerJeff Huang
Change-Id: I12b43c10cca455a6885101909327b81940dafb07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129584 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2022-01-26move ToolBoxItemId into its own headerCaolán McNamara
Change-Id: I34838bee7ad27bfd60d92c26af7eb2de508686b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-24tdf#131327 Add double clicked event on auto-redact tableVerne-Lai
Change-Id: Id927244fcd7e985edadb2b9f9cfdd61ba93066e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123570 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-01-24update pchCaolán McNamara
Change-Id: I35cda63e774c076ada7bbc8802e325c23c578600 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128873 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-24move titledockwin to the one place it's usedCaolán McNamara
Change-Id: Ia9a1e0f687de3f916d59f28112b7b00c0d4a6610 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128872 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-14make comphelper::OInterfaceContainerHelper4 more threadsafeNoel Grandin
(*) make all the methods that require an external mutex take a std::unique_lock as a parameter, so that call sites cannot forget (*) make the forEach method drop the lock when firing listener methods, to reduce the odds of deadlock Change-Id: I0a80e3b3d1c1c03b7de4a658d31fcc2847690903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-03osl::Mutex->std::mutex in SfxStatusDispatcherNoel Grandin
Change-Id: Icfd23cb898da6d2fc6de9f5e57c906044b9a28de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-27use comphelper::WeakComponentImplHelper in WarningDialogsParentNoel Grandin
Change-Id: I952924973f27387a64c8c7f48506081099592f67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-19use more cppu::BaseMutexNoel Grandin
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-15tdf#131850: avoid encryption check for recent docs overlayMike Kaganski
Change-Id: I673de978c39492bf9be78945ece95ade2a943ffc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126849 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-04use OMultiTypeInterfaceContainerHelperVar3 in SfxStatusDispatcherNoel Grandin
Change-Id: I79beb9ab22184176c67555d8742c01c11c9e6f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126339 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-29move PopupMenu::IsInExecute out of vcl/include/menu.hxxCaolán McNamara
Change-Id: I01af38dd57a645ea0afeaff033ce6d07dfe09535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126026 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26remove unused definesNoel Grandin
Change-Id: I96f224c9afae857c0b37ec91c523e41afdc9db05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26loplugin:stringliteraldefine in sfx2Noel Grandin
Change-Id: I45ccf6b1841024db7406b910a28dff054f67464d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-24Convert sal_IntPtr into int + use constexpr int in sfx2/dinfdlgJulien Nabet
Change-Id: I39ab8370f0d01441d59e12fa120bbef4d767c2fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125747 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-03loplugin:finalclassesNoel Grandin
Change-Id: I10ff73f89c965beb3cfb5fc3a40dd959d8f77aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124600 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski
- 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-09merge ThumbnailView and ThumbnailViewBaseCaolán McNamara
only ThumbnailView inherits directly from ThumbnailViewBase and it will simplify a11y if ThumbnailView instead of ThumbnailViewBase is available Change-Id: I715faa3f9b2cec68c1de07479b7d1dbbd9ddbcc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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>