summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
11 hourscool#11942 svx lok: handle Writer idle status when starting the paint view idleMiklos Vajna
The bugdoc is similar to cool#11785, i.e. a document of 3-400 pages, but the content is reasonably simple, mostly plain text and bullet points. The document has a shape, though. Loading this document in COOL does a full sync layout on load, which is reported to take ~9s on a slower machine and it takes >1s for me locally (after doc load, before the render of the first page). It seems what happens is that idle layout is started, but it's not interrupted, because moving content between pages in SwLayAction::Action(), called from the SwLayIdle ctor calls into SdrPaintView::Notify(), which starts a high priority "idle", so the LOK client thinks it should not interrupt core jobs, so the idle layout first completes, and only then we paint the first tile. Fix the problem by adjusting the priority of SdrPaintView::maComeBackIdle dynamically. Add a flag in the draw model to know when we're inside the Writer idle layout and once the svx/ idle is started, lower the priority in case that's invoked from inside the Writer idle layout. This gives the LOK client a way to interrupt the Writer idle layout (via the anyInput callback), now that it seems core has no high priority jobs in the scheduler. Size of the time window between the end of doc load and the start of the first tile render, before: 1617 ms. After: 182 ms An alternative approach I considered is to interact with the SdrPaintView that belongs to the current Writer view, but that won't work. There are typically 2 draw views active right after document load, one created in SwViewShellImp::MakeDrawView(), but there is also an additional hidden view created in the SvxDrawPage ctor for UNO purposes, so if we don't go via SdrModel, we would have to notify both views that we're entering / leaving the Writer idle layout, which looks more complicated than what this patch does. Change-Id: I115ba2c152fe7283804cde564afd511f9fbff707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185360 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
14 hoursediteng: Initial ruby character implementationJonathan Clark
Implements a minimal functional version of ruby character layout and rendering in Edit Engine. Many features are missing from this implementation, and will be added in future commits. Currently, ruby characters cannot be created via the user interface. Ruby character styles are also currently hard-coded. Change-Id: Ia7c18ccae6c37cd320acc214574ba3123c18ddb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185210 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
15 hoursjsdialog: sidebar: use vcl ids for panelsSzymon Kłos
JSDialog API cannot communicate without vcl id of a widget Change-Id: Ic6bd0d430207f32cf631564102511eae7130b7bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184721 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185348 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins
18 hoursLOCRDT fix conditional compilationMichael Stahl
Add a config header for this, and split yrs.hxx in two because the actual libyrs.h is only needed in 2 files. Change-Id: I30453fda3082f977e328ed56a4a101743ecdd586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185329 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
20 hourstoolkit: Drop unnecessary XWindow2 param specializationMichael Weghorn
XWindow2 subclasses XWindow, so there's no need for a VCLUnoHelper::GetWindow variant taking an XWindow2 reference that does the same as the variant taking an XWindow reference. Change-Id: I6f931252d2ae2e046dc31c076094e71b8aa71346 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185273 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
42 hourstdf#164970 Merge appearance options with themes dropdownSahil Gautam
TL;DR Now there is only one entity "THEME" the user has to care about when using the appearance tab page. We ship three default themes which just change the document colors. Custom themes can customize the UI too. We used to have two sections in the appearance tab, the themes dropdown and the appearance radio buttons group (automatic, light and dark), and this was really confusing. Let's say I am a new user, and I go to the appearance tag page I select the dark radio button, why isn't my application changing to dark mode? same for light... and then the distinction between application colors and document colors, the radio buttons were mainly for the docuemnt appearance, and the themes dropdown was for changing the current theme which might change the document colors as well. Now the radio buttons have been merged with the themes dropdown. Now there are three default themes there, "Automatic", "Light" and "Dark". These three themes don't define any UI colors and just change the document colors. If the user installs a new theme, and if that theme defines UI colors, the UI will also be customized. Change-Id: If8da6d2f729f117ada07e13b607ed8525395cb6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184429 Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de> Tested-by: Jenkins
42 hoursInitial Markdown export filter stubMike Kaganski
Based on the Writer's HTML export code. For now, it doesn't export anything yet, just creates an empty file. Change-Id: I0d484d2b5bc549f34e674c8f858acb352e275c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184201 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 8e83a343a49b2053bc08326a109956f224a47ae1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185283 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
42 hourstdf#130857 weld: Simplify/Clarify grab APIMichael Weghorn
The weld::Widget API for grabbing is inspired by `gtk_grab_add` from GTK 3 [1] which grabs both, mouse and keyboard, blocking interaction with other widgets in the application. For LibreOffice, only grabbing the mouse is of interest. CustomWidgetController::CaptureMouse is the only caller of weld::Widget::add_grab, and the VCL implementation in SalInstanceWidget::add_grab also only calls `Window::CaptureMouse` on its vcl::Window. In addition, there is a concept of a "grab count", i.e. calling `weld::Widget::grab_add` multiple times without `weld::Widget::grab_remove` means that `weld::Widget::grab_remove` needs to be called the same amount of times later on. However, the concept of having "multiple grabs" at the same time is also not used anywhere in LO in practice, and the VCL implementation also doesn't implement that concept. Therefore: 1) Drop the logical concept of multiple grabs from the weld::API. Adjust the gtk3 implementation to make sure to have at most one grab at a time that is owned by LO application code. (Internal GTK toolkit code may use additional grabs.) 2) Rename the methods to make clear that only the mouse grab is of relevance. (The gtk3 implementation still uses `gtk_grab_add`, i.e. grabs the keyboard as well.) In GTK 4, there is no more API for grabbing the mouse and only a counter was used to keep track of how often weld::Widget::add_grab had been called. Switch that to a bool instead. Qt provides separate methods for grabbing the mouse (QWidget::grabMouse [2]) and the keyboard (QWidget::grabKeyboard [3]). This commit is also to clarify that only the former will be needed when implementing this weld API for the Qt-based VCL plugins in an upcoming commit and grabbing the keyboard isn't needed. [1] https://docs.gtk.org/gtk3/method.Widget.grab_add.html [2] https://doc.qt.io/qt-6/qwidget.html#grabMouse [3] https://doc.qt.io/qt-6/qwidget.html#grabKeyboard Change-Id: If6f34a5eed8efe3dfb8d453c1ee97796cd4418c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185254 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 dayschart color palette for data series: sidebar panelMarco Cecchetti
Change-Id: I6f661515e2de11ea1ead0b79435413d6a0e81c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184264 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185142 Tested-by: Jenkins
3 dayssw doc model xml dump: show bullet types of an SwNumRuleMiklos Vajna
This helped to write the tdf#166229 testcase, because it shows where the actual bullet character is. Also declare the encoding in SwDoc::dumpAsXml() explicitly, since these bullet characters are typically not ASCII, so they didn't show up correctly in the output. Change-Id: I5a6f58d0971c2542e4cd79209589259fa5e9e5b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185243 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
3 daysLOCRCT editeng,sfx2,sw: replace temporary SAL_DEBUGMichael Stahl
Change-Id: Ib6f3b732a7eb6f2dbf423ffd2206b0474ff6c681 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185200 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
3 daysLOCRDT editeng,sw: yrs weak link peer cursors for editengineMichael Stahl
Replace unreliable integer cursors with WeakRef cursors which maintain their position automatically. This requires yrs v0.23.1 with the yweak_read() function. Unfortunately this crashes currently, so hide it behind #if YRS_WEAK. https://github.com/y-crdt/y-crdt/issues/536 Change-Id: I74ec1eaa25c7cb554efd38ee632df041ac92d5c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183311 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
3 daysDon't convert from Sequence to vector in FileDialogHelper::ExecuteMike Kaganski
The conversion serves no goal, and no place benefits from that. Change-Id: Id2f1865fb8ef0cdb51f959b35e482f35fad8b75f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185240 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
3 daysDon't use XFilePicker::getFiles in FileDialogHelperMike Kaganski
Since commit ef8341f05ec79fcdac3b05b45659f5c98ff05edf, XFilePicker3 is used there; XFilePicker2::getSelectedFiles is guaranteed to be available. Fallback to deprecated API is not needed, and this allows to drop some ugly code. Change-Id: Id11a5238f3db5930c30f80df6ee6a77a377f6475 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
3 daysNew Clang 21 trunk -Werror,-Wunnecessary-virtual-specifierStephan Bergmann
...warning about non-overriding virtual dtors in final classes. Every single one of these might or might not be suspicious (e.g., in some cases it might be better to have a virtual dtor in a derived-from class). Also, for some of the virtual dtors, making them non-virtual then caused > error: unnecessary user-declared destructor [loplugin:unnecessaryoverride] so those were removed completely. Change-Id: If0ee71645a347d6096b65988c56f627c42fe54b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185223 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
3 daystdf#130857 weld: Reject inconsistent state for radio buttonMichael Weghorn
Being a weld::Toggleable subclass, weld::RadioButton implementations need to implement weldd::Toggleable::{g,s}et_inconsistent. However, neither the VCL implementation (SalInstanceRadioButton) nor the Qt implementation (QtInstanceRadioButton) have a concept of an inconsistent state for radio buttons (while checkboxes/check buttons do). The SalInstanceRadioButton implementation was already doing nothing when trying to set the state, and always returning false when querying the state. Move the logic to the base class, weld::RadioButton and add an assert in weld::RadioButton::set_inconsistent to prevent any users from trying to set that state (to true). (If there any existing ones, they need to be adjusted.) Setting the state to `false` (as e.g. implicitly happens when calling weld::Toggleable::set_state with a value of TRISTATE_TRUE or TRISTATE_FALSE) is fine, only trying to set to `true` is problematic. For GtkInstanceRadioButton, explicitly call the new weld::RadioButton versions. (Previously, the ones derived from its GtkInstanceCheckButton base class were used.) Change-Id: I292ff838b62205d906fb2faf0d391c503a4786e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185214 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daysSimplify namespace handling in SwHTMLWriterMike Kaganski
Previously, it stored the namespace alone; and added ":" each time the value was used, when it was non-empty (either in GetNamespace, or when passed to svt's HtmlWriter). This change only adds the colon once, when maNamespace is set. Change-Id: Ib16586ebbf99bea7d301d3ac7a870ff4e68ee50b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
3 daysResolves tdf#166541 - Welcome dialog must not use standard buttonsHeiko Tietze
Replaced hijacked Okay and Reset buttons by special buttons Change-Id: If8315be3f8f71ca1fc5fae0136eef4a76232b3e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185219 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
3 daystdf#150865: Add support for TEXTAFTER functionXisco Fauli
Change-Id: Iedd79b069c145de4c3b70d50552df8bf7da66a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185218 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
3 daystdf#150864: Add support for TEXTBEFORE functionXisco Fauli
Change-Id: I57a19add67b4ffff12fa8af575d997bcda378a4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185206 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
4 daysLOCRDT editeng,sw: yrs peer cursors for editengineMichael Stahl
The cursors are represented as integers in yrs as a first step, which isn't ideal. Surprisingly EditView doesn't really have functions to correct the cursor, only ImpEditEngine::UpdateSelections() for the case when nodes are deleted, apparently there's only one active EditView at a time typically so it wasn't needed? Typically the active EditView's cursor is assigned from a return value of ImpEditEngine. Add some new functions to correct peer cursors and call them all over ImpEditEngine; unfortunately UpdateSelectionsDelete() isn't easy to get working on EditView's actual EditSelection cursor so leave that for the future... To fix EE paint of non-active comment, add SwAnnotationWin::Paint() To get things to paint with "gen", it's enough to invalidate the SwAnnotationWin, but for gtk3 a queue_draw() must be called, else it's only painted when clicking on the window. Cursors are painted in color in SidebarTextControl::Paint() Change-Id: Id8696238290405554ece1b9961676972a559b58e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181679 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
4 dayssvx: prefix members of SvxIMapInfoMiklos Vajna
See tdf#94879 for motivation. Change-Id: I626e35f8dd44ef4fd8311eb2312db92a0ebff41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185192 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
4 daysOptimize SfxItemSet::EqualsMike Kaganski
No need to lookup the element in this - we already have the iterator. Introduces SfxItemSet::GetItemState_ForIter for the task. Change-Id: Ib85706201c452b5345df411c317e79bcf6c17238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185167 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 daysResolves tdf#137931 - Show a Welcome dialog on first start-upHeiko Tietze
With tabs for introduction (and later perhaps also as what's new info), appearance, and UI picker. Run ./soffice --safe-mode to test but make sure to start the app next in normal mode Change-Id: Ia12ba44c8796fb53f2ec1dbaf46dd25a6ec113cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184195 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
5 daysvcl: Drop no more needed SystemEnvData::aShellWindowMichael Weghorn
Previous changes up to Change-Id: I7d44e8a8907fa3946d9b9a249e12c542fa656f1c Author: Michael Weghorn <m.weghorn@posteo.de> Date: Sat May 10 00:47:02 2025 +0200 gen: Port SystemEnvData::{aShellWindow -> pSalFrame} for DnD replaced all uses of SystemEnvData::aShellWindow, so drop it (and adjust code that was previously setting it). Change-Id: I60d69c6e5cb8b7bb9343d419ea6a6ea2a4fc1d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185123 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
7 daystdf#165742 Step 4.3: Establish a narrow export path for chartexknordback
This is a subtask of tdf#165742: Chartex charts are lost on input from OOXML and re-export. Fix various aspects of input and output for chartex (and specifically for funnel charts). This now allows for loading and re-exporting a very basic funnel chart, with the result that MS Office successfully loads the exported chart, and it looks similar (though not quite identical) to the original. Change-Id: I6eeb277e31250031604f7cdd21b80848a9c642ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184758 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
7 daystdf#150866: Add support for TEXTSPLIT functionXisco Fauli
Change-Id: I918b46c29791f865e841eb967b2799f7986538bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185027 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
7 daysRemove "StandardDir"Samuel Mehrbrodt
This was supposed to set some kind of "default directory" for file pickers. It was never implemented for anything except the "gen" vcl plugin - and is also not really needed. Change-Id: I94c6ff04984fc7b1d600530dc26bd8a7672646cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184064 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
8 daysChart Font sidebar panelAttila Szűcs
Added font panel for chart text based elements: Title, Label , Legends, Axis. Font sidebar updated based on the selected chart element properties. Clicking on the font sidebar will change the properties of the selected chart element. (Bold, italic ...) 1 title can have multiple Font settings, the sidebar will display a values only if the whole title havbe the same value. Setting a value will set it for the whole title at once. If a Title is edited, then the font panel is disabled now, because it need an other implementation, to set textEdit attributes, and to update the font panel based on the attributes. Added 2 //Todo: where it could (started to) be implemented. Added 3 new Context to EnumContext: - ChartLabel - ChartLegend - ChartTitle This is a bit risky because what was previously only a Chart, now may be not a Chart value, but instead 1 of the 3. refactored those parts where i seen it could be a problem, i hope i not left out something. (Axis was already made by someone) Change-Id: I19eaeb93332a08faae6ed21e7e81a9ea56a4495b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185023 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
8 daystdf#97228 change scrollbarvalue code from include/vcl to vcl/Deepanshu Sharma
Change-Id: I76268d39a8792c87a8fcad23dc3f393c4c596486 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183192 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
9 daysLOCRDT editeng,sfx2,sw: experimental yrs collabMichael Stahl
This can be enabled in configure via --with-yrs=...; see also README.yrs Currently this is hardcoded to run over a local named pipe. Everything related to editengine is implemented in EditDoc and made accessible via its wrapper classes; everything related to communication and accessing sw's comment is implemented in sw::DocumentStateManager. The acceptor starts in SwView::SwView(), once SwPostItMgr exists. There is a hack in SfxFrameLoader_Impl::load() to fetch the document that the accepting soffice has loaded, and load it in the connecting soffice as well. Change-Id: I89476b5864b70f479bcf15989374c1c65b5da9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175652 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
9 daysCEOO: CellEditOnOverlayArmin Le Grand (Collabora)
Instead of using EditView's Paint directly to Window I changed this now to using the Overlay that is available in all applications. This allows to have less repaints of the Calc View since the Overlay has a copy of the area it is working overlayed. It also allows to get away from one of the last areas where XOR selection was used since EditView/EditEngine have no better way to do this. Selection is now visualized using the OS'es choosen SelectionColor, as in all other apps. I could also get rid of the flush() of the OverlayManager that was needed before and caused some problems (see tdf#165621 and associated tasks). A failing UnitTest showed that OverlayManagerBuffered needs to be aware when no CompleteRedraw was done yet and thus no background data exists and refresh makes no sense. This may happen when there is no redraw/UI e.g. UnitTests, but still an OverlayManager is used and together with a Reschedule (many possible reasons) that refresh might be triggered. Made access to EditView in OverlayObject no longer dependent on ActiveView, that is not always the one with the EditView. Now using a combination of ScTabView and ScSplitPos for accesses. Asserting now if no EditView -> is mandatory. Continuing going through CppunitTest_sc_tiledrendering UTs, one more identified. Have to re-activate EditViewInvalidate rect forwarding since the Invalidate is needed for sc tiled rendering tests, but not for sd tiled rendering tests. Added that to the impl of EditViewCallbacks using LibreOfficeKit::isActive(). Change-Id: I41f5448bfbabfaae4858c7617478771053c2cd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184830 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
11 dayssvx: prefix members of SdrMeasureObjMiklos Vajna
See tdf#94879 for motivation. Change-Id: Ie9087a753e871eb684b8dbec2e74a89b7f0f3998 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184950 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
11 daysimprove the bitmap->alpha conversionNoel Grandin
we do not need to go via this complex luminance calculation, we just want the red channel of the RGB data. This is also what the skia backends do, ever since commit 2fcfbd73768b69ba58607a054e7f851be2942992 Author: Luboš Luňák <l.lunak@collabora.com> Date: Fri Apr 3 22:50:12 2020 +0200 no gray conversion needed for VCL alpha hacks Change-Id: Ie4a7adcc7c488d241ec58e64a130da544c3d39d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184944 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-05-01tdf#164970 use proper enums for ApplicationAppearance instead of raw intsSahil Gautam
ApplicationAppearance registry entry holds the appearance mode the application is in at any point. it is represented by three integers 0 for "Automatic", 1 for "Light" and 2 for "Dark". this patch introduces an enum `AppearanceMode` which replaces the integer switch cases and comparisons in conditionals with more readible enums. Change-Id: Ibe90875cc8d2370476442f726ebbb4eb02cccc91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184393 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-05-01tdf#137308 - Add zstd build support and decompression classesAkshay Kumar Dubey
Integrate build system support for the Zstandard (zstd) library and implement the corresponding C++ decompression stream classes, enabling future use of zstd-compressed streams in ZIP packages. Build System (Part 2a): - Add `--with-system-zstd=[yes|no|auto]` configure option. - Implement system library checks (`zstd.h`, `libzstd`) in configure.ac. - Define rules (`external/zstd/*`) for downloading and building the internal zstd static library (decompression components only). - Set up necessary CFLAGS/LIBS via configure.ac and config_host.mk.in. - Configure linking via RepositoryExternal.mk (`gb_LinkTarget__use_zstd`). - Update auxiliary files (download.lst, distro-configs, etc.). C++ Implementation (Part 2b): - Implement `InflateZstd` (in `include/package`) and `InflaterBytesZstd` (in `package/inc`) inheriting from `Inflater`/`InflaterBytes`. - Use the zstd streaming API (`ZSTD_decompressStream`) following the existing single-call pattern established by the zlib implementation. - Manage context (`ZSTD_DCtx`) and input buffer (`ZSTD_inBuffer`) state. - Handle errors, stream completion (`ret == 0`), and input truncation. - Add new classes to `package/Library_package2.mk` build. This completes the infrastructure for zstd decompression support. The next step (Part 2c) involves adding logic to select the appropriate Inflater based on the ZIP entry's compression method ID. Change-Id: Ia673f3f19b6a751ba5225394fcf8c3f145c4ae63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184243 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-05-01basicide a11y: Move TextWindow a11y classes to basctl, create directlyMichael Weghorn
Move the a11y classes used for implementing Basic IDE a11y from vcl to basctl. Move them into a namespace "accessibility" to avoid a name clash with the Paragraph class declared in include/editeng/outliner.hxx. In TextWindowPeer::CreateAccessibleContext, call the Document ctor directly and drop the now unused AccessibleFactory::createAccessibleTextWindowContext. Change-Id: I396507e5fca17b4e7a1b65b28797569bc31d6a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184838 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-04-30Avoid misaligned-pointer-useStephan Bergmann
...after d0ee08cfbf12145027eee7ad46448a8734693c06 "oox: export embedded font used in a presentation document" caused CppunitTest_vcl_font_ttf_structure_test to fail with > vcl/qa/cppunit/font/TTFStructureTest.cxx:47:5: runtime error: member call on misaligned address 0x7de9211e0262 for type 'o3tl::sal_uInt32_BE', which requires 4 byte alignment > 0x7de9211e0262: note: pointer points here > 00 00 00 00 80 00 00 af 10 00 20 48 00 00 00 00 00 00 00 00 57 33 43 00 00 40 00 20 f0 02 03 20 > ^ > #0 in (anonymous namespace)::testReadTTFStructure::TestBody() at vcl/qa/cppunit/font/TTFStructureTest.cxx:47:5 Change-Id: I4d46decd497fccf7eecdb38764ac82ed2a68b5d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184829 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-30sfx2: warn user before saving doc with scripting signature encryptedMichael Stahl
The pre-ODF 1.5 encryption necessarily destroys macro signatures, but the user would learn this only when re-loading the encrypted document. Change-Id: Ic8a0190205412f484f47a4b8d864b280eea0d23c (cherry picked from commit 558c6a83c210a4d9d7a699616c6f254fb23d7cf4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184822 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-04-30tdf#166379 - Add export config option to remove "Total editing time"Balazs Varga
separately from all private info files during save. The new expert config option name is: RemoveEditingTimeOnSaving (There wasn't any UI element added for this expert config option.) Change-Id: Iab69d062d161ef6aee1c3eb87ada1c16f8b4fd41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184789 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2025-04-30oox: Don't substitute fonts if embedding fonts is enabledTomaž Vajngerl
This is needed to prevent that we embed a font but then export a different (substituted) font name into the document, which would defeat the purpose of embedding in the first place. This is not ideal either as a we probably need better control of what we can just substitue and what we need to embed. Change-Id: Icd29789ceb739b6950576379358a96cc0449b3b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184696 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-04-30oox: export embedded font used in a presentation documentTomaž Vajngerl
This adds support to export the fonts that are used in an presentation document. The fonts are converted to EOT fonts. Adds an EOT converter, which converts a TTF font to EOT font by writing a EOT header and adding the TTF font data. Adds BigEndianTypes so we can read a structure that is defined in big endian and the types get converted (if needed) to system endian when accessed. + test Adds TTF reader which reads the true type font structure in an easy way that is used by the EOTConverter. + test Change-Id: I8b0bcb69e47943c2a8679edf881d7c2bab45c450 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184288 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-04-29vcl a11y: Drop AccessibleBrowseBoxBase::getAccessibleIndexInParentMichael Weghorn
The base class implementation in OAccessibleComponentHelper::getAccessibleIndexInParent already implements the same logic. Change-Id: I3b9e4b2aa04bb24bb0355897ea18eb41cad9ef61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184794 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-29ofz#396777453 avoid svmfuzzer TimeoutCaolán McNamara
Change-Id: Ia03404a18a12aeae829d9358700dc8c10ed4b0b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184782 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2025-04-29tdf#137308 - Part 1: Refactor Inflater classes for extensibilityAkshay Kumar Dubey
Refactor ZIP decompression classes (Inflater, InflaterBytes) to support multiple decompression algorithms, enabling future Zstandard support. Make Inflater and InflaterBytes abstract base classes defining a common interface. Move the original zlib/Deflate logic into new derived classes InflateZlib and InflaterBytesZlib. Update usage sites to instantiate the *Zlib variants via unique_ptr to the base class, preserving existing functionality. Move header files to standard locations (include/package, package/inc) and update includes and build files. This pure refactoring prepares the codebase for adding Zstandard (zstd) decompression. Correct a minor logical bug in the ZipFile::getSizeAndCRC loop condition. Change-Id: I9be3c02946e29eb2dae09f500eb47d8a4261af22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183504 Reviewed-by: Devansh Varshney <varshney.devansh614@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2025-04-29ofz#409354664 Heap-use-after-freeCaolán McNamara
there is no DeInitVCL in fuzzing, so if the BufferedDecompositionFlusher thread is started nothing causes it to exit before _exit. Change-Id: I62463ce8126a0cf0c67f4218bdf66a140f3a021d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-04-29tdf#165742 Step 4.2: Establish a narrow export path for chartexknordback
This is a subtask of tdf#165742: Chartex charts are lost on input from OOXML and re-export. Fix some incorrect URLs and ordering of elements in a <xsd:sequence>. Change-Id: I4092e91851e80114d3cb8e22f602c33faf146969 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183736 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-04-28oox: read embedTrueTypeFonts and set doc. setting "EmbedFonts"Tomaž Vajngerl
Embed fonts depending if the attribute "embedTrueTypeFonts "on "presentation" element is set to true. If true, set the doc. setting "EmbedFonts" and start proceed with font embedding code path. Change-Id: Iba2552ab58c07cfa41afca4e1883ae706eb8c678 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184403 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-04-28tdf#165742 Step 4.1: Establish a narrow export path for chartexknordback
This is a subtask of tdf#165742: Chartex charts are lost on input from OOXML and re-export. Build out the some of the export structure for chartex charts. This now produces an output chartEx*.xml file with no c-namespace content, for funnel charts only, and what appears to be fully well-formed OOXML per the office/drawing/2014/chartex schema. However, MSO doesn't load the result successfully, so I'm calling it step 4.1. For the bulk of the output code in chartexport.cxx, there was a design decision whether to (1) have a single 'if (chartex) ... else ...' branch point high up, or to (2) branch much more granularly within the code. (1) has the benefit of cleaner reading, without so many ifs, at the expense of a lot of duplicated code. (2) allows for much less code overall but with lots of ifs. For the time being I've taken approach (2), not necessarily because it's the right one, but mostly because it is much easier to move from (2) to (1) (largely by just duplicating the code and in each large branch deleting the local branches that don't apply), than from (1) to (2) (which would require examining the differences between the two large branches in detail, in order to re- integrate the code). Change-Id: I78de1484359c358b99320b417ab68cd90dab3e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183561 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-04-28svx: prefix members of SdrCaptionObjMiklos Vajna
See tdf#94879 for motivation. Change-Id: Ic4cd593ee3605e2c6194ec52e25d27e0e8455b93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184693 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>