summaryrefslogtreecommitdiff
path: root/offapi/UnoApi_offapi.mk
AgeCommit message (Collapse)AuthorFilesLines
2023-02-15Remove css.xml.xslt.XSLT2Transformer not implemented by LOStephan Bergmann1-1/+0
(see f4238ed900cdfa65d447fbef81b2e8ae95095a4e "Revert 'XSLT2Transformer::create should always succeed'": "LO does not ship this service, it's only provided by Saxon extension") Change-Id: I8ff8c9e4bd0eae7055dcb4fc83a04ea41310b9a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147038 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-06Make LOKClipboard available to other modulesSzymon Kłos1-0/+1
LOKClipboard has higher level dependencies (sfx2) so it cannot be moved to the vcl where SystemClibpoard instance is created. - introduce new interface LokClipboard to differentiate from SystemClipboard so we can have vcl's and lok's implementations at the same time - publish LOKClipboard using new interface for other modules by adding component file in desktop module Thanks to that when code calls GetClipboard and we cannot get clipboard assigned to the vcl::Window* (for welded widgets) in GetSystemClipboard correct instance is returned (shared clipboard for current view) so we can access content which was copied before. Previously always a new instance was created (with empty content). test ScTiledRenderingTest::testPasteIntoWrapTextCell was broken add some content to clipboard to simulate more real case and test the content copied Change-Id: I23c0298960a710c498646493f33122b908864cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126310 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131644 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135198 Tested-by: Jenkins
2023-01-28introduce XTheme and UnoTheme implementationTomaž Vajngerl1-0/+1
Needed to transprt model::Theme around using throught UNO API as xmloff can't access SdrPage directly. Change-Id: I5931e42352186d62e7f09b112d8e8c9e4fb79440 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146224 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-24[API CHANGE] remove service sd::framework::ModuleControllerNoel Grandin1-1/+0
It makes no sense to be constructed externally. Change-Id: I7e756e225e7b6e1785194b2f73edd5a7d65ec0e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-24[API CHANGE] remove service sd::framework::ConfigurationControllerNoel Grandin1-1/+0
It makes no sense to be constructed externally. Change-Id: I6fb8f58ff8594c58d190f78e6f26b2703046a95b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-23[API CHANGE] sd::frame::Configuration does not need to be an UNO serviceNoel Grandin1-1/+0
It does not ever appear to have been used as such, and it makes no sense to be constructed externally. Change-Id: Ia1a0cccdaeb19ded1197ad8aae701ac86dd3bb48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145989 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12introduce docmodel comp., model::ThemeColor, use it in SvxColorItemTomaž Vajngerl1-0/+1
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-19tdf#151846 Restore XChartTypeTemplateNoel Grandin1-0/+2
Which I removed in commit 58766f997d59e4684f2887fd8cdeb12d2f8a9366. Turns out it does have some usefulness for extensions. So restore most of it. The exception is the getDataInterpreter method, for which I have added a placeholder, so that the restored class has the same vtable layout as the original. Change-Id: Ief9b48ef2c408580bc24b5a8a0e11131edb3b943 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142908 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-10sw content controls: drop not needed XServiceInfo implMiklos Vajna1-1/+0
As noted in <https://gerrit.libreoffice.org/c/core/+/142454/3#message-18fe8bb36fc24d317ad16dd25e236ed51c88a910>, introducing a dedicated css.text.ContentControls service is actually not needed and client code should be fine with just an "anonymous" object returned by getContentControls() + implementing XIndexAccess. Remove it before somebody starts to depend on it. Let's rather have a bit of inconsistency (e.g. SwXFootnotes implements XServiceInfo, while SwXContentControls not) than an XServiceInfo implementation that we'll have to support from now on, without a user. Change-Id: Ifde4fb6bcafdffabb189447415b89b01c9675296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142511 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-08sw: introduce an UNO manager for content controlsMiklos Vajna1-0/+2
This builds on top of commit ad950f10dc382ea169f94a0c301ca8c424e7103e (sw: introduce a manager for content controls, 2022-11-08) and exposes it on the UNO API: - add a new css.text.ContentControls service, backed by SwContentControlManager - add a new css.text.XContentControlsSupplier interface, implemented by SwXTextDocument - implement XIndexAccess in ContentControls This allows UNO (and later VBA) clients to have random access to the content controls in a document, which is much easier than the relatively complex traversal of the whole doc model. Change-Id: I26240c9ddbd06f4f57f5f65460ef75a2ace94825 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142454 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-05offapi: document com.sun.star.text.ContentControlMiklos Vajna1-0/+1
It has a lot of properties and what's inside ListItems was also rather unclear. Change-Id: Iaef719d72b95374da6d0dfa8247870fa5f76d18d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139406 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-05offapi: document com.sun.star.text.LineBreakMiklos Vajna1-0/+1
It's an XTextContent and also document the possible values of the Clear property. Change-Id: Ic1c338e4461ceea75cf16ce896e98e732d9af859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139397 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-17[API-CHANGE] chart data table implementationTomaž Vajngerl1-0/+2
Adds new service DataTable, which is reposible for the properties of a data table for a chart. Also removes the existing properties related to the data table from Diagram service, which were added prematurely in the past, without a data table actually being supported by the chart module. Also adds an implementation of the DataTable service in chart2 module. Change-Id: I0c6b32163745704c623d04baaf0ce0e208c107f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136789 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-08[API CHANGE] Drop css::accessibility::XAccessibleStateSetNoel Grandin1-1/+0
which is internal API, unused (as far as I can tell) by external users. This state is purely a bitset (as implemented by utl::AccessibleStateSetHelper) so we can just return it as a 64-bit value. This shaves significant time off the performance profiles of code that loads very complex shapes, because this state is frequently used, and we no longer need to allocate a return value on the heap for every call. Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10[API CHANGE] Remove deprecated idlc and regmerge from the SDKStephan Bergmann1-1/+0
* Client code must replace uses of idlc and regmerge with uses of unoidl-write, see the changes to odk/examples/ and ure/source/uretext/ in 40f2aee6584eafcf4cd1d95fcf1f775e5435440d "Provide unoidl-write also for the SDK" for examples. * The new types.rdb format is not compatible with LibreOffice < 4.1. Clients generating extensions containing such files are advised to use appropriate LibreOffice-minimal-version elements. * For compatibility with old extensions, reading the legacy types.rdb format is still supported. * The SDK no longer ships an idl/ sub-directory containing the udkap and offapi .idl files (as, unlike idlc, unoidl-write does not need them). odk/config/cfgWin.js had to be adapted to look (somewhat arbitrarily) for an examples/ sub-directory instead of idl/ when checking for "an sdk folder". gb_UnoApi_package_idlfiles became unused and has been removed. * The idlc and regmerge executables have been removed. Module idlc has been removed except for idlc/test/parser/, which is also used by CustomTarget_unoidl/unoidl-write_test, and which may eventually be moved into module unoidl. Module external/ucpp and the corresponding configure options have also been removed. Change-Id: I42a0231699b863b5ebe2bee63bc32c8f79278cc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122363 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-30framework: fix crash on Writer startup when using --enable-ext-wiki-publisherMiklos Vajna1-0/+1
As reported by Julien, once the mediawiki extension is installed, the xHandler in framework::DispatchProvider::implts_searchProtocolHandler() points to an UNO component implemented in Java, and we crash in dynamic_cast<>(), at least on Linux with gcc 7.5 and libstdc++. This dynamic_cast<>() call was added in commit c0fa456436947a5c167c652d19a884064b43c03d (tdf#149261 sdext: fix crash on starting the presenter console for the 2nd time, 2022-05-26), to allow the presenter console to opt out from protocol handler caching. It was expected that the proxy object created for a Java UNO component would simply return nullptr when we try to dynamic_cast<>() it down to a C++ interface. Fix the problem by moving the interface to an UNO one: this side-steps the dynamic_cast<>() crash at the price of introducing an UNO interface, which is not meant to be part of the public UNO API (but at least it's not published). It may still make sense to improve the bridges/ code at some stage to not crash in dynamic_cast<>() on generated Java proxy objects. Change-Id: Iaac44515339e0dc15dddc3be45ef7dee7331e47a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135114 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-03-30Add UNO API for custom Jump ListsSamuel Mehrbrodt1-0/+7
Allows adding custom jump list categories to Windows Task Bar Change-Id: I13b6c3ad5de386cf74e2b346f10889bc46a8ad4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131540 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-03-01add a way to get informed when the XPlayer can return useful informationCaolán McNamara1-0/+2
Change-Id: Ia9adf81ba85653b5735f604461340df7bfc1f41f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130395 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-17tdf#145700 Improve lighting in extruded custom shapesRegina Henschel1-0/+1
The fix tries to make rendering similar to MS Office. The ODF standard follows closely the extrusion in RTF and MS binary format. Rendering uses the 3D scene engine. The main problem was, that the z-component of the direction was interpreted with opposite sign. As result the maximum of a light was at false position. Especially a direction from the observer to the object has produced a light behind the shape and so looks as if light was off. The wrong z-direction has produced lighting, which was less intensive than in MS Office. To compensate that, a third light source was added as workaround. That part is removed. Second problem was wrong use of 3D-scene D3DMaterialSpecularIntensity and D3DMaterialSpecular (= UI Specular color). That was not only wrong in OOo but in my previous patch too. D3DMaterialSpecularIntensity corresponds to MS property 'c3DShininess'. Relationship is Intensity = 2^c3DShininess. D3DMaterialSpecular is calculated from MS property c3DSpecularAmt and and c3DKeyIntensity. The light source was missing, but needs to be included, because c3DSpecularAmt is 'the ratio of incident to specular light that is reflected on a shape'. The old unit tests are adapted to this change. MS gives no information how it softens a light in case of harsh=false. ODF specifies it as 'implementation-defined'. The patch uses four additional lights, which have directions in 60° angle to the original light. The light intensity is distributed. That comes near to rendering in MS Office. Changing our 3D engine to provide 'soft' lights was not doable for me. The way MS Office renders a 'metal' surface is different from ODF specification. To distinguish the kinds, I have introduced a new property MetalType. I have discussed it with the ODF TC (see minutes from 2022-02-07) and got the advise to use namespaced values. Therefore the datatype is not boolean. The 'Surface' drop-down in the extrusion bar is changed to make the two kinds of rendering 'Metal' available to the user. If a user sets surface 'Metal' in the UI of MS Office, it sets not only fc3DMetallic but reduces the value of c3DDiffuseAmt in addition. Our 3D-scene engine has the corresponding ODF attribute dr3d:diffuse-color not implemented. To get a similar rendering I change the material color of the 3D-objects as workaround. Change-Id: Ia986b9c318b4c79688e0c0e2d858215b9d612fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128449 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-02-03make css::chart2::InterpretedData a normal structNoel Grandin1-1/+0
this is internal-only, no need for it to use UNO IDL Change-Id: I5f9844f48640618ac5bd348721bdee43e5f0a57f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129303 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23remove css::chart::XDataInterpreterNoel Grandin1-1/+0
these are purely internal interfaces, they cannot be used from outside chart2. Change-Id: I43c6d8aa96eb94e47767a4b16b89b4889f571579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128792 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-22remove css::chart::XChartTypeTemplateNoel Grandin1-2/+0
these are purely internal interfaces, they cannot be used from outside chart2. Change-Id: Ib89e98e8099c34a530951bd85236fced216aff18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-15remove XTransformation UNO APINoel Grandin1-1/+0
unused after commit 18bc9ea75daf4eb3520a4d0ef6649d92261012a6 Date: Tue Jan 11 15:02:14 2022 +0200 replace XTransformation with more efficient class Change-Id: I9e6bf80d8a8cdba8514ad0e94ce090bdbceab853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-17tdf#143971 Removes pop-up dialog for read-only documentsMatt K1-1/+0
No longer does the user get a pop-up dialog when opening documents that are read-only, asking whether they want to be notified when the document becomes editable. The change removes some of the functionality introduced in commit 95eb088802562b75f8b299908160145c7e88d763 "tdf#47065 Add new file open UI options and implement a new thread". Change-Id: Ic25e8e293e7224fb5086249a9d4814914fa961d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125340 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12make it possible to find out what fonts are actually really usedLuboš Luňák1-0/+3
A document specifies which font each text is supposed to use, but we still need to map that to a real available font, which includes also font fallback in case the font selected doesn't cover all glyphs. This commit adds API to track this font mapping, first StartTrackingFontMappingUse() will make VCL record this information, and then FinishTrackingFontMappingUse() will stop and return all the information, as a listing saying that a requested font got mapped to a list of fonts and the number of times this took place. This can be useful to find out what actually gets used for a specific document, or compare how changing fonts available affects a specific document. Change-Id: I6426ecef354166bef337b1dc9b9007fda148d5c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123051 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-29tdf#141193 Added support for bar codes in qrcode dialog box[API Change].homeboy4451-2/+2
Change-Id: I6b79ece1d5419ef92b76755d3bd921a64d6e38fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113989 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-10-14[API CHANGE] Remove unused css.resource.XLocaleStephan Bergmann1-1/+0
It had been present ever since at least 88c437c597b604524d50f450506285a594bd03a5 "moved from api" from 2000, but was apparently never implemented nor used at least in OOo/LO itself. It is problematic as it uses reserved identifiers ("getDisplayLanguage_Default" etc.) that contain underscores and start with a lowercase letter, and a planned change to unoidl-write will no longer tolerate usage of such reserved identifiers (see the TODO in unoidl/source/sourceprovider-scanner.l). Change-Id: I76a3a3da7b7c1f4c109ca7a12c9f07857ca1be1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123544 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-27Rename AsyncColorPicker -> AsynchronousColorPickerSzymon Kłos1-1/+1
Change-Id: If26865ea063df3052e6ba61642fe36f5a1a47929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120735 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-19Make Custom Color Picker dialog asyncSzymon Kłos1-0/+1
- now supports also XAsynchronousExecutableDialog - inherits from SfxDialogController to attach correct LOKNotifier Change-Id: Ic21db4057b8087d74a437b1c8ec95408ade5264d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119012 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120670 Tested-by: Jenkins
2021-06-28[API CHANGE] drop ShapeContextHandler service and interfaceNoel Grandin1-2/+0
There is zero chance an extension is using this, because it is so intimately tired together with the oox and writerfilter interactions. I'm removing this so I can expose the ShapeContextHandler and then override it's implementation in a more fashion without jumping through UNO hoops. Change-Id: I79ef30247f4642303dfdb92bbf8f6e6226234829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117996 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-27tdf#47065 Add new file open UI options and implement a new threadMatt K1-0/+2
Add new UI options when opening a locked or non-writeable document to allow the user to be notified when such a document becomes editable . If the user selects "Notify", then that document is added to a list of open documents to be checked by a thread every 60 seconds for read/write access and whether lock file is available/obtainable. If access is allowed for a document, then show UI dialog to the user asking to Reload that document. If Reload is selected by the user then that document is reloaded with read/write access. The checking thread is spawned only once no matter how many "Notify" documents there are. The thread is spawned if not already running when a new "Notify" document is opened, and it terminates when all "Notify" documents have been closed or the application terminates. Also update badstatics clang plugin to ignore new global variables introduced. Change-Id: I7555ce6f5df79c2c87216e0129ef3b2883c7d921 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111654 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-17Fix types and orderSamuel Mehrbrodt1-1/+1
Change-Id: Icd98c02a3bdc361423f668173bf6feb5f5b11e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115703 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-05-11tdf#76258 Add OOXML import for color filterSamuel Mehrbrodt1-0/+1
Change-Id: I74cf4f56e0adf1cb8af8e6e932c14b30cce67c71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115168 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-04-30tdf#79049 speed up OOXML workbook loadNoel Grandin1-0/+1
we spend a lot of time in ScAttrArray::GetLastVisibleAttr which appears to be very expensive for this worksheet. This is re-computed every time we enter SfxBaseModel::getArgs Reduce the recomputation by introducing a new method which only retrieves specific SfxBaseModel arguments. This takes the load time from 5m9 to 1m9 for me. Change-Id: I605fae0faa94760c7d6993877c9559ea5dc813cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-09sw: add UNO API to find the closest doc model position based on pixel positionMiklos Vajna1-0/+1
The use-case is drag&drop: if an UNO API client registers its drag&drop listener, then it gets a DropTargetDropEvent and has to decide if it wants to handle that event or allow Writer to handle it. In case it decides to handle the event, it would be good to able to e.g. insert a string at the point where the Writer UI indicates it to the user. But DropTargetDropEvent only exposes a pixel position and Writer requires you to have an XTextRange when inserting content. Fix the problem by introducing a new createTextRangeByPixelPosition() which first does a pixel -> logic coordinate conversion (this is window-specific, in case you have multiple windows), then picks the doc model position which is the closest to a logic coordinate. Change-Id: I6a8e69e3c39b9d99209342469653c0e0bd99bf53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112201 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-22[API CHANGE] tdf#133423 Implement chart:regression-moving-typeSamuel Mehrbrodt1-0/+1
Change-Id: Icb967367fbf12e5a1566b7f18ebe5e3d8a3534f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110748 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-01-20vcl: add an UNO interface and impl. for BinaryDataContainerTomaž Vajngerl1-0/+1
Change-Id: Icbc384892bee8c31eb7f3a39ff9a64f1199b23b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109596 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-11-24sw: fix copying and deleting of section content via APIMichael Stahl1-0/+1
The problem happens if a section starts or ends with a table: SwXTextSection::getAnchor() may return a SwXTextRange with one position in a table cell and another position in a different table cell, or outside the table, neither of which is valid to set the cursor via SwXTextViewCurosor::gotoRange(). Introduce a new special mode for SwXTextRange, RANGE_IS_SECTION, analogous to RANGE_IS_TABLE but actually working. Only SwXTextView can be used to create XTransferables, and it requires selecting first via either the SwXTextViewCursor or select(). It's currently not possible to select the content of a section in the ViewShell in these problematic cases, and would be some effort to add. So add a new interface XTransferableTextSupplier that can be used to create XTransferable from the SwXTextRange with RANGE_IS_SECTION. The core CopyRange() and DeleteRange() functions can deal with SwPaMs that start or end in non-text-nodes, so pass the whole section content to these in SwXTextRange::setString() and in SwXTextView::getTransferableFromTextRange(). Change-Id: If7e3210e8a26f5618317c294f2b2f3ed5c217f1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106293 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-10-22XmlFilterAdaptor: use the fastparser API when possibleNoel1-0/+1
part of the process of making SvXMLImport fastparser-only Which uncovered several bugs because I end up stacking fast and slow parsers, not once, but twice. Specifically, we have a problem here with default namespaces e.g. <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <semantics><mrow><mstyle mathsize="12pt"> where going from slow- to fast- parser loses this information, because there is no way to represent this in the fastparser world, so we end up with nastiness when we transition back to slow-parser, and then back-again to fast-parser. So I fixed a couple of places XMLEmbeddedObjectImportContext and in SvXMLLegacyToFastDocHandler, and then worked around some of it by introducing an new XImporter2 interface so I could strip out out one of the slowparser -> fastparser transitions. Change-Id: I491487b99271898da50dc999d3b9b9c39cbd97fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-25fix Graphic duplication in import and add GraphicMapperTomaž Vajngerl1-0/+2
When importing writerfilter, we change to oox when importing images. This transition doesn't store any previous contexts and all instances are reset. The problem occurs when we have identical images because the transition erases all caches we have to determine if an image has already been imported or not, which causes that we import the same image multiple times which create unnecessary copies. This introduces the XGraphicMapper, which can be used to store the XGraphic for a key and can be transferred between writerfilter to oox. With this we can remember which images were already imported and don't create unnecessary internal copies which decreases memory. This also includes a test which checks that the import and export doesn't produce unnecessary copies of identical images. The test checks that for OOXML, ODF and MS Binary formats. Change-Id: I33dc19218c565937fab77e132b3a996c51358b6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103283 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-22add bounciness velocity and density options to physics animationsSarper Akdemir1-0/+1
Adding new xml options to specify the starting velocity, bounciness, and density of the rigid body that physics animation control. Change-Id: Ifaba785e82c8ee17be00711a3e7a75257e7704ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101141 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-20make physics based animation effects importable-exportableSarper Akdemir1-0/+1
Makes physics based animation effects importable and exportable on content.xml. Uses one new xml token animatePhysics. Also adds a new animation preset called Physics Basic that is available under Emphasis animation effect category. Change-Id: I38b0511f973668655cff78becebe3f1e628d9083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100247 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-03[API CHANGE] Move NSS profile handling into NSS serviceJan-Marek Glogowski1-0/+1
While developing the patchset for tdf#127909, I broke the certificate path dialog, because I wasn't aware, that the NSSInitializer service has to use the same logic to auto- select the users profile, then the dialog. So currently you have to keep the complex service and dialog auto-select logic in sync. To prevent this error, this moves all the profile auto-selection and enumeration into the NSSInitializer service. What I also stumbled over is the particular lifecycle of the NSS library initialization in the NSS service. This is just done, when the first user calls some crypto function. As a result it's actually possible to change the path setting without restarting LibreOffice. But since the NSS deninitialization is run as an atexit handler, this setting can't be changed after the init. What is currently missing is any indication inside the dialog of the currently active NSS setting in comparison to any later user selection, if the user doesn't restart LibreOffice as requested. Change-Id: I886962777958c363abeb0ec91fc8a35cbd39eb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97668 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-26tdf#134106: Get rid of XDesktopInternal againStephan Bergmann1-1/+0
For internal functionality that is not meant to be called by client code, I think it is appropriate to hide it either via XUnoTunnel (but which would have been a tad incovenient, as it would have meant to make framework::Desktop in framework/inc/services/desktop.hxx available to the code in desktop/source/app/app.cxx), or via reuse of some existing, sufficently fitting interface (as is done here with css.task.XJob). This nicely avoids the backwards compatibilty issue with remote Python scripts, as discussed in tdf#134106 "Binary URP bridge disposed during call to ServiceManager.createInstanceWithContext". Change-Id: Ic9db9401ddf0f6b696344dd1d5c6ad279ea5a832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97241 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-05-28[API CHANGE] drop unpublished XAccessibleGetAccFlowToCaolán McNamara1-1/+0
Change-Id: I7e67677396bd50d59b519e6acf2b3c75d3c12ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-25[MS-OFFCRYPTO] convert oox implementation into UNO serviceVasily Melenchuk1-0/+2
To permit pluggable crypto services, abstract existing implementation behind an XPackageEncryption API. Previous code already had two halfway-polymorphic classes (agile and standard 2007 engine), so we're not adding much additional layers. As MS crypto always uses OLE storage to wrap content into one single file, current implementation passes all substorage names down into XPackageEncryption APi, so different downstream implementations (e.g. for MS RMS, or Azure AIP) are possible. Because OleStorage classes are internal to LibO core, access is provided via XInput/XOutput stream API function. Change-Id: Icc32a4e0ce215090c3b739f1dcaa0654b36b7f08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84436 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-07tdf#118418 implement scrollSubstringTo() for gtkColomban Wendling1-0/+1
Define & use new accessibility scroll type compatible with IAccessible2 and extend the XAccessibleText interface to require scrollSubstringTo(). Co-authored-by: Martin Pieuchot <mpi@grenadille.net> Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-17pdfium: Make Insert -> Image... use VectorGraphicData for PDF.Jan Holesovsky1-0/+2
In principle, the current Svg/Emf/Wmf and PDF handling is trying to achieve the same thing: Keep the original stream untouched, provide a replacement graphics, and a kind of rendering. To hold the data, the Svg/Emf/Wmf and PDF were using different structures though. This commit consolidatates that, and makes the Insert -> Image... (for PDF) actually using the VectorGraphicData to hold the original stream. This breaks loading the PDF as a document via PDFium - I'll fix it in the next commit(s). Change-Id: Iac102f32b757390a03438c165e430283851cc10b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90561 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-02-25[API CHANGE] remove BasicImport UNO interfacesNoel Grandin1-3/+0
which are unused since commit 4e97fa0f4e73acdf522643aeec486b1395e63727 Date: Thu Feb 20 13:09:32 2020 +0200 use fast-parser APIs for embedded script parsing and highly unlikely to be externally used since they parse document internal script code. Change-Id: I2e0e237fb31bba85f1ef63c88f3a6959eedf2ca7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-22tdf#127205 split Desktop::terminate processJan-Marek Glogowski1-0/+1
Trying to somehow keep stuff correctly alive, truned out to be rather futile. Originally I tried the same way Caolan did in the attached patch to tdf#88985, when he finally settled on adding a special terminate listener. But this is not enough to handle in-process scripted extensions, like Java, Python or even Basic macros themself. So this separates the module shutdown and SfxApplication cleanup from the rest of the terminate call. Change-Id: Ice59816080c922a17511b68afe59348a662600c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88835 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>