aboutsummaryrefslogtreecommitdiff
path: root/source/gl/extras
ModeNameSize
d---------source69logplain
us-continuous-integration'>feature/orcus-continuous-integration LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sfx2/inc
AgeCommit message (Collapse)Author
2024-05-10loplugin:ostr in sfx2Noel Grandin
Change-Id: I6306260d03c1208ec250c2f9a3860fa569f6d9c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167448 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-21Moving parts of readonly checks from model to view.Gökay Şatır
Summary for what's done with this commit: init.cxx * Add guards for modify commands. viewsh: * Add "IsCurrentLokViewReadOnly" for ease of use. unocitm: * Add guard for modify comamnds dispatch.cxx * Implement readonlyview. objmisc: * Modify IsReadOnlyUI check for LokReadOnly view. svx.sdi: * Disable TableChangeCurrentBorderPosition command for readOnly views. sw-editwin: * Treat mouse moves as readonly when the view is LokReadOnly. gridwin: * For autofilter. impedit2, inputhdl: * For text input. svdedtc: * For sdr object dragging. Change-Id: I71fc353976256bce22042bbb6042ee464b65cc13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165093 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-24move this header inside the moduleNoel Grandin
it is not used anywhere else Change-Id: I46cc42397cf56237818e6e58268a856e826a9985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-21Remove DeleteItemOnIdlexArmin Le Grand (allotropia)
There are some CrashReports in 7.6 which have DeleteItemOnIdle on the stack, but there is nothing reproducable. So I took a look... I first thought it's a MCGR regression, due to classes on the stack. But the Item involved is just random, can happen with any Item. Then I thought it may have to do with ITEM refactorings, but it happens with DeleteItemOnIdle involved, so also not the case. I already saw DeleteItemOnIdle when doing these and qualified as 'hack' in the way. already It is only on Windows and DeleteItemOnIdle is involved. This again (took a deeper look now) is an old hack to keep an SfxPoolItem 'alive' for some 'time'. For that, it triggers an async reschedule which then deletes the Item when being called. If the Item will be used after that is pure coincidence - seems to work in most cases. It seems as if for Windows the timing slightly changed for some scenarios, so a reschedule is too early. This can happen with this hack anytime. DeleteItemOnIdle is used in scenarios where SfxPoolItem* is e.g. returned, but is *not* anchored, so e.g. not member of an SfxItemSet. Or in short: Lifetime is not safe. DeleteItemOnIdle exists since 1st import, but was changed to AsyncEvent ca. 4 months ago (see 57145acf9ec47c23e307b7a5c0029d21d937cc35), so that may have caused it. It is possible that these errors happen on Windows since then. Before something more complicated was used to delete it late, but surely also not really safe. Due to ITEM refactor I have the knowledge/tooling to solve this. It will not be a 1-5 lines fix, but it is a hack and in the way for further ITEM refactor anyways. What we have nowadays is a SfxPoolItemHolder -> it's like an SfxItemSet for a single Item. It safely holds/ controls the lifetime of an SfxPoolItem. It is already used in quite some places. It helps to solve many hacks, also the ones putting Items directly to the Pool - due to there never was an alternative for that. In principle the ItemPool/ItemSet/Item paradigm was never complete without SfxPoolItemHolder. Thus I started to fix that (and remove that hack for good, sooo many changes over the years, sigh), but as said is not straightforward. Will have to change retvals of involved stuff to SfxPoolItemHolder - it's just two pointers and designed to be copied (one is a Pool, needed to cleanup when destructing). CopyConstruct/destroy just counts the RefCnt up/down, so cheap. 1st version compiling, let's check on gerrit... Corrected one error in QueryState for securitypage, also added some security features/asserts. Change-Id: Ida49fd35ca88ead84b11d93e18b978cb9e395090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161083 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-24Template: tdf#86483: Add Japanese template to the Localization categoryJun Nogata
As Kevin Suo noted in tdf#86483, CJK and CTL use different formatting than the US and Europe. Japanese is no exception, and must be formatted according to Japanese typesetting rules[1][2] before the document is created. However, many Japanese language users use LibreOffice without knowing this, resulting in strange Japanese documents. This template sets up the necessary Japanese formatting to reduce this. Originally, the template was supposed to be provided by the language pack. However, since a localization category was created, we thought it would be a good idea to provide the template first, as we did with Chinese, so we added it. This template has the following settings And the template is inspired by the OpenOffice.org Japanese Environment Improvement Extension Template[3] and Kevin Suo's Chinese template, which we have previously attempted to do the same. * Western and Asian languages are in the same font. * Paragraphs have been set to be justified. * Japanese paragraphs are originally indented by one character. However, since some documents do not use it, it is not set. Instead, the original Japanese paragraphs are set to First line indent style. * Italics has been removed from the style. Japanese does not use italics. [1] Requirements for Japanese Text Layout: <https://www.w3.org/TR/jlreq/> [2] Japanese Industrial Standards - JIS X 4051:2004(Japanese): <https://kikakurui.com/x4/X4051-2004-02.html> [3] OpenOffice.org Japanese Environment Improvement Extension: <https://ja.osdn.net/projects/openoffice-docj/releases/40804#note> Change-Id: Ieaf57c8e018d479e7922fbd9d616b9a6c271b1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155764 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-08-16tdf#156538 Enhancement to show character information in the insertJim Raykowski
special characters control This patch makes a tooltip show when the mouse pointer is over a character window in the special characters control. It also adds a label that is used to display character information of the highlighted character. Code for creating the character information text shown in the tooltip and label was referenced from SvxCharacterMap. Change-Id: I4b62e63b27310cbe9e9661ff51c2db206e9e3507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155547 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-08-13Revert "clang-tidy bugprone-parent-virtual-call in sfx2"Noel Grandin
This reverts commit 0f3b36bd2749f360df84d1594c01e619ba0f4930. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: Ifa383ee7ed2db4f81e2b0ac593e652288a07514f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155596 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-12clang-tidy bugprone-parent-virtual-call in sfx2Noel Grandin
Change-Id: Id1e32a696dd97d1bded467834e5fbd14345d02c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-05tdf#156156 Add Help button to sidebar decksRafael Lima
This patch adds a Help button to the sidebar deck, so that each deck has its own Help ID, which can later be used as reference to write help pages. The Help IDs of each sidebar deck is a combination of the string "SIDEBAR_" + the deck ID (as defined in Sidebar.xcu). Change-Id: Ib7f106ff917e41130bde136e1e6f04bb2af40daf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154918 Tested-by: Jenkins Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2023-06-28Resolves: tdf#156067 merge special char dialog/popup logicCaolán McNamara
there was some cut and paste done to create the popup at some point, so put it back together and reuse the "delete recent" etc which is missing from the popup case Change-Id: Idc33d83ea04b46b0255e77bcecf565dc8174e426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153647 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-06tdf#38742 - Start Center: introduce push pins to favorite documentsAndreas Heinisch
Change-Id: I879e4d93e1da222d9acabb776552ca1cf819574b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152136 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
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>