summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)Author
2024-12-17a11y: Merge accessibility module into vclMichael Weghorn
Now that the accessibility module no longer depends on toolkit and svtools and there's therefore no more cyclic dependency, merge it into the vcl library, where the vcl widgets are located, for which the classes in the accessibility module (primarily) provide the a11y classes. Initially, take over the existing UNO service "com.sun.star.accessibility.comp.GetStandardAccessibleFactoryService" to vcl as is. It used to be necessary to break the cyclic dependency between the vcl, svtools, toolkit and accessibility module. (vcl is the lowest and accessibility used to be furthest up in the dependency chain; yet vcl needed it to create the objects providing the XAccessible/XAccessibleContext for its widgets.) Further simplification can happen in upcoming commits. Change-Id: Ib46c87446dc9121d3b8e735e0e5a40594da73cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178647 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-17weld: Drop now unused weld::Widget::{g,s}et_grid_*Michael Weghorn
These methods were superseded by corresponding methods in the weld::Grid class in Change-Id: I67f5ea16b5108e8359820850f0815e34db439ef1 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Dec 16 11:02:00 2024 +0100 weld: Add weld::Grid to handle grid child positions Now that all existing code has been ported to the new API, drop the unused old methods. Change-Id: I94ffa6a9de5e052e8248276b60f6fe4f10dff697 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178638 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-17weld: Add weld::Grid to handle grid child positionsMichael Weghorn
Currently, weld::Widget provides methods that can be used to retrieve and change the position (and column span) of widgets that are located inside of a grid (parent), e.g. weld::Widget::set_grid_left_attach to set the column. These methods however only make sense for widgets that are actually direct children of a grid, not for any "random" weld::Widget. Generally, it's the grid's responsibility to manage child positions, and the gtk3/gtk4 implementations actually assume that the parent is a GtkGrid, retrieve that parent and then call the corresponding GTK API functions for that grid. Align the weld API more with the concept of the grid being responsible for positioning its children by introducing a new weld::Grid class with methods equivalent to the current weld::Widget ones, but that take the child widget as an additional parameter. Take over the existing logic from the corresponding weld::Widget methods for both, the gtk and vcl implementations (e.g. GtkInstanceWidget::set_grid_left_attach -> GtkInstanceGrid::set_child_left_attach). Add an assert that the passed widget is actually a grid child. Deprecate the existing weld::Widget methods for grid position handling. They will be removed once existing code has been ported to the new weld::Grid API. The fact that the vcl implementation, VclGrid (used by vcl's new SalInstanceGrid implementation of weld::Grid), still relies on its vcl::Window children having the corresponding members set correctly remains unaffected. Change-Id: I67f5ea16b5108e8359820850f0815e34db439ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178570 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-16Set that a non-modal Popover don't auto-grab focus on popupCaolán McNamara
currently sc/uiconfig/scalc/ui/filtersubdropdown.ui is the only one of these, and this doesn't change its behaviour Change-Id: Ia975f40fd75c88ddbb28490e60c4274b9e6e056b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178524 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-14tdf#130857 VclBuilder: Move more radio group logic to base classMichael Weghorn
Add a purely virtual WidgetBuilder::setRadioButtonGroup method and call it for each of the entries in the map from WidgetBuilder::processUIFile, in line with what is already done for mnemonic widgets. Move the existing logic for handling such a pair to the new VclBuilder override, VclBuilder::setRadioButtonGroup. An "actual" implementation for QtBuilder will be added in a separate commit, just emit a warning there for now when the method gets called. Change-Id: I027278014bb18d9d5f3de8189cd2f515959bf3e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178443 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-14tdf#130857 VclBuilder: Store radio button groups in BuilderBaseMichael Weghorn
Move the std::vector<RadioButtonGroupMap> and the method to extract and add to that map from VclBuilder to its base class, BuilderBase. Add a getter, BuilderBase::getRadioButtonGroupMaps instead of accessing the base class member directly in the VclBuilder subclass. Change-Id: Ic0d2abbd9faa41760d542ab22a80f2ba23136ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178442 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-13a11y: Move VCLXAccessibleComponent from toolkit to vclMichael Weghorn
After commit 168512dce7f1f1453c045584d47bd78a0a6c73f7 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Dec 12 18:06:13 2024 +0100 a11y: Stop using VCLXWindow in vcl a11y classes and further related commits, VCLXAccessibleComponent no longer depends on anything in the toolkit module, so move it from there to vcl. This way, subclassing VCLXAccessibleComponent (as the a11y classes for vcl widgets do, currently located in accessibility/ ) no longer introduces a toolkit dependency. Change-Id: I4fd33fb1dc2265d75e8ca9ad87bcc70db61639d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178434 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-13a11y: Drop always null AccessibleBrowseBoxHeaderCell focus win paramMichael Weghorn
Both callers of AccessibleFactory::createAccessibleCheckBoxCell (in SvHeaderTabListBox::CreateAccessibleColumnHeader) unconditionally pass nullptr for the `_xFocusWindow` param. Therefore, drop the parameter from that method and the AccessibleBrowseBoxHeaderCell ctor, and unconditionally pass nullptr to the base class ctor. This is basically the same as for AccessibleBrowseBoxTableCell in previous commit Change-Id: I22d5cb98332aa5d89fc4c479d0ec29588fe83e4d Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Dec 13 12:37:03 2024 +0100 a11y: Drop always null AccessibleBrowseBoxTableCell focus win param Change-Id: Ife57d0163f1c99407e08875ba98725ea114597cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178418 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-13a11y: Drop always null AccessibleCheckBoxCell focus win paramMichael Weghorn
Both callers of AccessibleFactory::createAccessibleCheckBoxCell unconditionally pass nullptr for the `_xFocusWindow` param. Therefore, drop the parameter from that method and the AccessibleCheckBoxCell ctor, and unconditionally pass nullptr to the base class ctor. This is the same as for AccessibleBrowseBoxTableCell in previous commit Change-Id: I22d5cb98332aa5d89fc4c479d0ec29588fe83e4d Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Dec 13 12:37:03 2024 +0100 a11y: Drop always null AccessibleBrowseBoxTableCell focus win param Change-Id: I76660aed909fc73ab19bc99a3e3bfb54176e7e10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178417 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-13a11y: Drop always null AccessibleBrowseBoxTableCell focus win paramMichael Weghorn
Both callers of AccessibleFactory::createAccessibleBrowseBoxTableCell unconditionally pass nullptr for the `_xFocusWindow` param. Therefore, drop the parameter from that method and the AccessibleBrowseBoxTableCell ctor, and unconditionally pass nullptr to the base class ctor. Change-Id: I22d5cb98332aa5d89fc4c479d0ec29588fe83e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178416 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-12tdf#147067 Jump to clicked spot if left mouse click with Option keyPatrick Luby
Most macOS applications such as TextEdit and Safari jump to the clicked spot if the Option key is pressed during a left mouse click. Change-Id: I56149e42daf1825cfebde8be8cfbb53645b31928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178369 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-12-11jsdialog: send message for weld::MenuSzymon Kłos
- we need to setup correct notifier - enable context menu in the style sidebar in Writer - handle menu actions - base of vcl::Window and PopupMenu is VclReferenceBase - prepare template function sendMessage to handle both Change-Id: I54c8dc468856c0f98495bdaf4ddd504c2f56562f Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178319 Tested-by: Jenkins
2024-12-11tdf#161541 sd: fix the orientation of handouts on the printed pageTibor Nagy
Change-Id: I1896674ab317fcbcfe2ebbe9ea21dcc36c203328 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178274 Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de> Tested-by: Jenkins
2024-12-10vcl: flatten vcl_component_getFactory()Christopher Sherlock
Change-Id: I411c75ad491e5d755710bc6a4d38446e170abc47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178159 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-10tdf#164072 vcl: Let MenuButton dispose its PopupMenuMichael Weghorn
The MenuButton usually owns the PopupMenu that gets set via MenuButton::SetPopupMenu, but so far didn't dispose it, i.e. the PopupMenu was never disposed. As far as I understand, that is a preexisting issue, but since commit 6708246e20ce522e673f539369cd38687d2dd16d Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Dec 5 11:06:48 2024 +0000 tdf#164093 tdf#157001 a11y: Improve menu window disposal , not disposing the menu also means not disposing the menu's MenuFloatingWindow (which gets created when the popup menu shows), resulting in warn:legacy.osl:563630:563630:vcl/source/window/window.cxx:307: Window ( 10MenuButton()) with live SystemWindows destroyed: 18MenuFloatingWindow() Window ( 10MenuButton()) with live SystemWindows destroyed: 18MenuFloatingWindow() and an assert getting triggered as mentioned in tdf#164072 comment 16. Fix this by letting the MenuButton take care of disposing the menu if it is the owner. The only case where the MenuButton is assigned a menu without taking ownership is in SalInstanceComboBox::set_item_menu (which currently only gets called from SvxStyleBox_Base::SetupEntry). In that case, the weld::Menu passed to SalInstanceComboBox::set_item_menu has the ownership: SalInstanceBuilder::weld_menu calls the SalInstanceMenu ctor with a bTakeOwnership=true, and the SalInstanceMenu dtor disposes the menu. Add a `bTakeOwnership` bool param to MenuButton::SetPopupMenu to distinguish between the cases where the PopupMenu is responsible for disposing the menu and where it's not. Change-Id: I32766d5084e4826056ef394a587b8c2e3124c4da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178197 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-09tdf#145538: Use range based for loopsManish
Change-Id: I8b41b96775fdd26464122e47ec853b48bdd921d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178150 Reviewed-by: Skyler Grey <skyler.grey@collabora.com> Tested-by: Jenkins
2024-12-09rename IsOnSystemEventLoop -> IsUseSystemEventLoopNoel Grandin
to match the underlying field and avoid confusion. The "IsOn" prefix normally means "is the current thread running on", which is not what this method means Change-Id: I3399a707582c9b0c681cd4aa03bc9f94860fc7fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-09remove some range checksNoel Grandin
which are more likely to hide an underlying bug than they are to help Change-Id: I5087827665bd6213142ee90450bf58d8d819c93f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178005 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-09remove some range checksNoel Grandin
which are more likely to hide an underlying bug than they are to help Change-Id: Ifba3c38e9dc6c3d47c9c62bebf5b5e68f11d9ee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178004 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-09improve SalInstanceNotebook m_aPages handlingNoel Grandin
I added some asserts here, and discovered that sometimes m_aPages and the pages in the underlying TabControl get out of sync. So rather than relying on indexing into a vector, just store a map indexed on the page identifier, which means everything uses the same scheme now. Change-Id: I1b8228e9b124521bda0e79c98e4961bedc71d641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178003 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-12-09pdf: forward declare IPDFEncryptorTomaž Vajngerl
To compile less when changing PDFEncryptor. Change-Id: I56e19e12494488fedb929998f8e6d0ff3bf8008c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176456 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177875 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-12-09pdf: cleanup and improve PDFEncryptionPropertiesTomaž Vajngerl
Add clear method to clear the variables that we usually want to be cleared. Also rename Encrypt to canEncrypt - which is more clear what it means. Cleanup initializers. Change-Id: I96735eb6f73a699fb0759496fc8781bcff3854de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176455 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177874 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-12-09pdf: refactor and move encryption init. to a common functionTomaž Vajngerl
This is needed because we have to separate the init. for both encryption methods and we have to init both when the password is entered. Currently we only prepared this, to make this possible when we introduce the other encryption method. Change-Id: Id6556ddc6a6218164a93bb689f03d6ec6dbad8b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176454 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177873 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-12-08Remove Windows 7, 8 and 8.1 from driver blocklist codeIlmari Lauhakangas
Change-Id: If3138b9b603c21a9cc6fedc08a7db144fb9f00ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178077 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-08tdf#130857 qt weld: Set tree view column header titleMichael Weghorn
Make the `extractTitle` helper function used by VclBuilder a static method in the BuilderBase base class for reuse by QtBuilder. In QtBuilder::makeObject, when encountering a "GtkTreeViewColumn" object, add a new column to the QTreeView and set the column title in the underlying model using QStandardItemModel::setHeaderData. Return the parent (tree view). (Returning no object would cause WidgetBuilder::handleObject to call WidgetBuilder::insertObject again, and thus result in every column being processed twice, i.e. the double amount of columns would be inserted). Adjust QtInstanceTreeView::clear to no longer call QStandardItemModel::clear [1], as that would not only remove the "actual" items, but also the header items, i.e. the column titles would get lost as well. Remove all rows instead. With this in place, the tree view in Writer's "Tool" -> "XML Filter Settings" dialog has the correct data + title set on open in a WIP branch where support for that dialog is declared in QtInstanceBuilder. (Other aspects in the dialog still need to be addressed however.) [1] https://doc.qt.io/qt-6/qstandarditemmodel.html#clear Change-Id: I59956c007ed73cddb299ad2374afd88199ddc94d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178063 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-07weld: Rename weld::Treeview selection signal/connectMichael Weghorn
Rename weld::TreeView member + methods to clarify that these are about selection changes: * m_aChangeHdl to m_aSelectionChangedHdl, * signal_changed to signal_selection_changed * connect_changed to connect_selection_changed In GtkInstanceTreeview, also rename the related methods calling signal_selection_changed accordingly for consistency. Change-Id: I299d7930484677395a0bdd0ff105df18688f2e04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178023 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-06vcl: make Color parameters const in BitmapEx::createAlphaBlendFrame()Christopher Sherlock
Change-Id: I6d71552f4d5004477b5980fe6c8de710dd4aea9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177565 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-06tdf#164106 Fix reordered glyph positioning with split grapheme clustersJonathan Clark
Due to formatting, grapheme clusters can possibly be split across multiple layouts. Layouts containing split grapheme clusters are created by laying out the complete string, and extracting only the necessary glyphs based on source codepoint index. This approach is good enough for most diacritic cases, but it cannot handle certain substitution cases where glyphs with advances would be interleaved with other layouts. Sub-layouts must be contiguous. This change introduces code to disable grapheme cluster splitting in these cases that cannot be handled correctly. Change-Id: I122abbf9c3f8a5efa4c72ad47991d0ad9ff8a8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177927 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-12-05vcl: Return reference in SalFrame::GetSystemDataMichael Weghorn
... instead of a pointer, to make clear that this is always non-null. Change-Id: I4c8676913b2507f077d8a66973ab5f95e73cb497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177886 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-05vcl: Return reference in SalObject::GetSystemDataMichael Weghorn
... instead of a pointer, to make clear that this is always non-null. Change-Id: Ic0f92e672b08494cf3bfaa9a956cb78170bc1ad5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177885 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-05tdf#164093 tdf#157001 a11y: Improve menu window disposalMichael Weghorn
In MenuFloatingWindow::dispose, unset the accessible before calling the base class implementation, to prevent the accessible from getting disposed there as well. This is necessary because the MenuFloatingWindow doesn't create (and therefore own) its accessible object, but returns that from its menu in MenuFloatingWindow::CreateAccessible. Therefore, the PopupMenu as the owner is responsible for disposing the accessible as well, not the MenuFloatingWindow. This logic was already implemented in Menu::dispose, but that doesn't help in cases where the MenuFloatingWindow gets disposed independently. In Menu::dispose, drop the extra logic and just call `m_pWindow.disposeAndClear` so that MenuFloatingWindow::dispose can take care of everything that's needed. (For the MenuBar case, MenuBar::dispose calls MenuBar::ImplDestroy, which unsets Menu::m_pWindow, so other than for PopupMenu, this change to MenuBar::ImplDestroy method doesn't make a difference for that class.) Don't dispose the current Menu::m_pWindow in PopupMenu::FinishRun, but instead in PopupMenu::ImplExecute (if set) before assigning a new one, to ensure that the old one gets disposed. Drop the SAL_WARN_IF(GetWindow(), "vcl", "Win?!"); because that case is handled fine now. Without this change in place, I saw that warning getting triggered while debugging (potentially because PopupMenu::FinishRun never got reached as the menu didn't show, maybe due to switching focus to the IDE when reaching a breakpoint or different timing,...). This commit by itself doesn't yet fix the crash from tdf#164093 seen on Windows with NVDA running because the menu's accessible still incorrectly gets disposed by the MenuFloatingWindow's VCLXWindow (toolkit window peer). That will be addressed in a separate commit. Change-Id: Ia2931bee23204395e8b3396927acf4fa1d0f077c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177883 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-05vcl a11y: Use comphelper::disposeComponentMichael Weghorn
Change-Id: Ifc63db272484e9a7986e6113989f2f6274f40349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177846 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-05weld: Add weld::Widget::signal_* methods to call handlersMichael Weghorn
Similar to what already exists in most subclasses, add signal_<event_name> methods to call the handlers and use these in the subclasses instead of calling the handlers directly. Change-Id: I6b79ddd859b360e947d97ada57f1573a276d6177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177834 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-05vcl: move variables closer to first usageChristopher Sherlock
Change-Id: Ib09f054eca56d55ba6b91c8e2377f373fc615430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177808 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-04a11y: Move menu a11y classes to vcl, no more use factoryMichael Weghorn
Other than most of the a11y implementations for vcl classes, VCLXAccessiblePopupMenu etc. do not make use of any VCLXWindow (i.e. UNO/toolkit wrapper of a vcl::Window) and thus do not depend on the toolkit module, which the accessibility module depends on. Therefore, there's also no need to use the accessible factory to create them (which is needed when toolkit classes are involved to avoid a dependency cycle). Move those classes from the accessibility module to vcl and add a new method Menu::CreateAccessible and move the logic from AccessibleFactory::createAccessible there. Drop the now unnecessary factory methods previously used for those classes. No change in behavior intended (yet), but this also simplifies the code involved for the tdf#164093 scenario. Change-Id: Ie3f6f1a02bf6662206d31383473cdc868e1f9164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177812 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04Move helpers for css::awt/VCL point/rect/size to vcl::unohelperMichael Weghorn
Move helpers to convert between the Rectangle, Point and Size classes in vcl and in css::awt from VCLUnoHelper (in the toolkit module) to vcl::unohelper (in the vcl module), for reuse in vcl in upcoming commits. Change-Id: I7b11c8a6b8c843a01ce25b1e4c0fb1869ad1e6ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177816 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04a11y: Move CharacterAttributeshelper from accessibility to vclMichael Weghorn
This is in preparation of moving more from the accessibility module to vcl. Currently, the a11y implementations for vcl widgets are implemented in the accessibility module (in directory of the same name), which in turn depends on the toolkit module. To break the dependency cycle (vcl needs accessibility to create a11y objects for its widgets), there's a UNO service. At least some a11y classes don't really need toolkit, however, so the plan is to decouple this and move those from the accessibility module into vcl in upcoming commits. Change-Id: I6aeee104f271c804c85727002822b89a9263628f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177810 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-04vcl: fix call sites for createBlendFrame(), rename to createAlphaBlendFrame()Christopher Sherlock
The call sites are actually passing in transparency, in fact to be consistent with current conventions we are actually dealing with alpha values. So we need to take the transparent values at the call sites and convert to alpha values by just subtracting 255. Hence fixing the FIXME comment. Change-Id: Ibc55ea77f469ec8afcab0cc26d2b8cdf25ea8a72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173858 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04Disable subpixel AA in GraphicExporter::filter unconditionallyMike Kaganski
... in D2DWriteTextOutRenderer. Commit 785a56b6be7f3128c2e7a131381e02525a50eb6b (D2DWriteTextOutRenderer: use grayscale AA for file output, 2024-11-27) has disabled it only when the export settings explicitly specified a concrete AA setting. In case when the settings didn't specify explicitly, if AA should be used or not, then system settings were used, which in case of D2DWriteTextOutRenderer would still enable ClearType (subpixel AA). This stores additional flag in StyleSettings, similar to what was done in commit e6538f5bdd876911ea30f84a6512c03908e620fd (tdf#118966 vcl: add a flag to determine if AA of fonts is used from the system, 2018-07-28), that tells the renderer to prevent subpixel AA, even if use of AA itself is defined by system settings. This flag is currently only considered by D2DWriteTextOutRenderer. Change-Id: Ibd1879d3c222276eee00c37a442881d6d47c831f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177780 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-04loplugin:unusedfieldsNoel Grandin
Change-Id: Iac4a64af74c92cbd76335faa62e51fa80ef21789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-04tdf#88226 sd: fix cutting off the overflow text on the notes print pageTibor Nagy
This fix offers two options to preserve the overflowed text: 1: if the "Original size" option is selected for printing, the overflowed text will be displayed on a new page. 2: if the "Fit to Printable Area" option is selected for printing, notes will be scaled to fit within the available printable space. The "Multiple sheets of paper" and "Tile sheet of paper" options are disabled for notes because these options are intended for slide printing and do not make much sense for printing notes. The orientation for the notes print page has also been fixed. Change-Id: I99e56cf9aed5c32764797469a8ea7f3b25053882 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177511 Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de> Tested-by: Jenkins
2024-12-04Use o3tl::cow_wrapper instead of std::shared_ptrMike Kaganski
Change-Id: I05ff47fe51cccce6a78745027ae8c2679783bd8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177766 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-04vcl: Drop MenuFloatingWindow::KillActivePopup paramMichael Weghorn
Move logic to the only caller that passed something else than the default nullptr. Change-Id: I293f2ca7ccd22f8f0f57a7fd91a6b4dfaa6a8846 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177747 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-04vcl: Slightly simplify check in MenuBarWindow::KillActivePopupMichael Weghorn
Use existing PopupMenu::ImplGetFloatingWindow instead of casting manually. Change-Id: I9449130e077fc997d724d5fadc854a278ba16cce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177746 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04vcl: Change Menu::ClosePopup param to PopupMenu*Michael Weghorn
Change Menu::ClosePopup param from Menu* to the child class PopupMenu*, as this is always a PopupMenu. This also removes the need to cast to PopupMenu in the PopupMenu::ClosePopup override. Change-Id: I129e6ebc7c801c1ca93514f26f79b76f970957a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177745 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04sd: convert sidebar masterpage panels from drawingview to iconviewRashesh
- also removes unused PreviewValueSet Change-Id: I5e7dacb4f472de526a61366295bc91edca12e9ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177642 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-12-04pdf: fix saving external PDF with form fieldsTomaž Vajngerl
Change-Id: I3d7fdcfe2c4ec0f716425c349b0bf621809fd249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177741 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-12-04pdf: simplify EncryptionHashTransporterTomaž Vajngerl
No need for a map to remember the implementation - we can just dynamic_cast to the actual implementation. Change-Id: If590316023be7f749d270c04b7ad3dc5fa1993b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177644 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-12-04pdf: introduce IPDFEncryptor interfaceTomaž Vajngerl
Change-Id: I9cc0413f6c0af3be6ef83f4dbcf8dcf73b992f92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177643 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-12-03Simplify ImplStyleDataMike Kaganski
Change-Id: I4b6bb9e3250a0f88f4fb99f3c9c8195c3c7a8f15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177714 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins