summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-08-22tdf#158556 make SvxGrfCrop hashableNoel Grandin
Change-Id: I30c8f44156a05519dc2f6db59734013e217c91b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-22tdf#153966 vcl: Fix precision loss laying out right-aligned textJonathan Clark
Previously, characters would appear to 'fidget' while typing right-aligned right-to-left text. This fix contains the following changes: - Removed a floating point truncate during right-align positioning. - Removed unnecessary repeated multiply-add from the main layout loop. Change-Id: I2f070efb6a1387db1595b41023bd0f076064afda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172230 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-08-21tdf#162283 PPT export: fix regression...Tibor Nagy
...was made by: Iefb9d97e0eb10a04c39b515b11e549aeb7be8f25 This regression occurred because there is a feature in MSO that allows the shape of a placeholder to be changed. In this case, the placeholder is converted into a custom shape after the import and saving custom shape from .pptx to .ppt didn't work. Change-Id: I85305b65742da8b4966d4956b9141c59b4563973 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172091 Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de> Tested-by: Jenkins
2024-08-21tdf#158556 make SvxTabStopItem hashableNoel Grandin
speeds up searching for it in the item pool Change-Id: I37e8889e41d63a41e1a4bf2a35b4aa303745e15c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-21Simplify BSTR construction from OUString a bitMike Kaganski
Use the known string length into account (and I definitely like to not rely on the undocumented implementation detail that OUString is null-terminated). Change-Id: I0e7478d25e802f8f8e31f02cf8d77613c1325bc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172170 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-21Emscripten: Enable the WebDAV UCPStephan Bergmann
* Which also requires external/curl. But implicitly use --without-gssapi, checking for it in configure.ac would fail with > configure: error: could not find function 'gss_init_sec_context' required for GSSAPI And building ExternalProject_curl needs to see the -pthread from gb_EMSCRIPTEN_CPPFLAGS, otherwise linking Executable_soffice_bin would fail with > wasm-ld: error: --shared-memory is disallowed by libcurl_la-easy.o because it was not compiled with 'atomics' or 'bulk-memory' features. * By default, GetCABundleFile in include/systools/opensslinit.hxx will fail now. (But to make https work, applications could bring along their own such file in the Emscripten FS, in one of the places where GetCABundleFile checks for it.) So, for Emscripten only, make failure of GetCABundleFile non-fatal in InitCurl_easy. * Some code in sw was erroneously hidden behind !ENABLE_WASM_STRIP_EXTRA (off by default for Emscripten), but is needed with HAVE_FEATURE_CURL. * See <https://emscripten.org/docs/porting/networking.html> for how to actually use networking in an Emscripten application. Change-Id: I2bbe9f3fd0e20143e18eb1e8104568b1c7a304de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172167 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-08-21cid#1555812 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1556056 COPY_INSTEAD_OF_MOVE cid#1556907 COPY_INSTEAD_OF_MOVE cid#1556957 COPY_INSTEAD_OF_MOVE cid#1556970 COPY_INSTEAD_OF_MOVE cid#1607095 COPY_INSTEAD_OF_MOVE Change-Id: I51112b3a63b8e9333e3eaaeb55b764e6c449a5ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172117 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-20tdf#158556 avoid dynamic_castNoel Grandin
reduces load time by 2% Change-Id: I8b31257baacd49657cccf7cc6bd04408581803c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172102 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-19tdf#105131 Remove Restore Defaut from sidebar custom menuOlivier Hallot
Refer to tdf#105131 comment #13 Change-Id: Ia3b33ed4ab971b6f6dd3c751c5f6e3dc6f30f5da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171906 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-08-19SalLayout::InitFont doesn't do anythingCaolán McNamara
there is a MultiSalLayout::InitFont that overrides it, but only forwards InitFont to the first child sub SalLayout, which itself then doesn't do anything. This is possibly the case since: commit 6c436ba09cb35235ce6f4065cf74c9a6ff14a4bd Date: Thu Dec 1 03:33:30 2016 +0200 Kill old Windows layout engines Change-Id: Ic0d347843257d13ee6d6f695488bd053f5a931fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172040 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-18tdf#154018: Change corners to points for polyline and polygon context stringsTH Huang
Change-Id: Ic6b0835238e463e5c155b01a292a5eed72e446d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171743 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-08-16tdf#158857: [Power Query] export xl/drawings/drawing*.xmlBayram Çiçek
xl/drawings/drawing*.xml: - import&export "macro", "textlink", "fLocksText" and "fPublished" attribute of <sp> element (using GrabBag). - import&export "descr" and "title" attributes of <cNvPr> - import "r:id", "invalidUrl", "action", "tgtFrame", "tooltip", "history", "highlightClick", "endSnd" attributes of <hlinkClick> Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com> Change-Id: Idd865fc86c3538107e4c9808b0886733c798b01f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16TempFileFastService should implement ByteReader/ByteWriterNoel Grandin
avoids some Sequence overhead in some hot paths Change-Id: I9d248cc088d423c8dc05895db934d6402c8baa44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171946 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-16CairoSDPR: Add support for Relief for Text RenderingArmin Le Grand (Collabora)
Change-Id: Idcb33e0f799b2219a4e737d0421bc21d85b5c7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171915 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins
2024-08-16cid#1616498 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1616499 COPY_INSTEAD_OF_MOVE Change-Id: I21b089cab036902a7ba5b725a6eae0f1212f2b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16tdf#161741 tdf#161705 undo: delay ClearRedo until Undo finishesJustin Luth
I know NOTHING about the intricacies of Undo/Redo. However, this is my feeble attempt to add some sanity to it. It should not be the responsibility of the caller to know when they are allowed to call ClearRedo. This patch reverts commit 0cd000bb83719982c1fd2265ea040c82af5bf98e author Daniel Arato (NISZ) on Mon May 10 15:41:28 2021 +0200 tdf#141613 sw: avoid possible crash when undoing header creation which was not a sufficient hack. I hope this patch lays a better framework to handle future similar issues. vvv NAIVE OPTIMIST ALERT vvv mbDoing was added with commit 9cb53122e9e098bc8a6bf53c14b18415e369dd6d Author: Frank Schoenheit on Fri Oct 22 15:00:39 2010 +0200 undoapi: more I/SfxUndoManager changes in preparation of new Undo API features and has been untouched since then AFAICS, and there was never any mechanism to change mbDoing. In other words, it has been sitting there doing NOTHING. So, I am taking it over and using it how I imagine it was intended, and how it is documented. Change-Id: I7aa355cc6458ac8ba34ddb9ee73fc850dcbca702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170793 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-16Resolves tdf#161766 - WCAG 2.1 compliant luminance for isDark()Heiko Tietze
Alternative solution to I63b85694584cdc6213e7b904ed6402b6c2f2b422 Change-Id: Ifca47de30616295a9965b9313886456313921401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171862 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-08-15SfxScriptOrganizerItem should not subclass SfxStringItemNoel Grandin
it never actually uses the superclass value. It has been this way since initial import. Change-Id: I99708c3ad8f1f2727ef87af56c62165d55f348d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171904 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-15make SfxStringItem hashableNoel Grandin
which shaves some time off loading complex files. Note that this class is often used as a superclass, so I checked all of the subclasses and marked some of them as "does not support hashing" until they can be independently verified to be safe Change-Id: Id4187eda8d6145e89e17dc10c2e3113b7a93da85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-15merge CntUnencodedStringItem into SfxStringItemNoel Grandin
which simplifies the hierarhcy. We never allocate such a thing, we always allocate subclasses, and it has no real meaning by itself. Change-Id: Ie6b716c9ea6ca0efe0ae4f39ac345608c45534f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-15CairoSDPR: Add outline to direct text renderingArmin Le Grand (Collabora)
Change-Id: I8c8820066a402653bf0f49bd78a98be692530e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171892 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-15vcl: add "fillWithData" function to BitmapTools - used in lokTomaž Vajngerl
Change-Id: Ia143a39d2285bbdebf7fcfe709b0c6418d35585c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171589 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-08-14cid#1557731 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557724 COPY_INSTEAD_OF_MOVE cid#1557721 COPY_INSTEAD_OF_MOVE cid#1557720 COPY_INSTEAD_OF_MOVE Change-Id: Ib8ae103008fa3cc800e085666e536f6333b9aa72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171838 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-14Disallow closing document during idle layoutMike Kaganski
Similar to commit 99c1bd1a4ef5365d8c26a41c8e858c67e673beb4 (Disallow closing document during generation of preview, 2024-03-11), it may happen that an external process is closes a document that is being in the process of the background layout, leading to use-after-free. The request thread at the crash time, executing XComponent::dispose: swlo.dll!SwNoTextFrame::~SwNoTextFrame() Line 170 swlo.dll!SwNoTextFrame::`scalar deleting destructor'(unsigned int) swlo.dll!SwFrame::DestroyFrame(SwFrame * const pFrame) Line 397 swlo.dll!SwFlyFrame::DeleteCnt() Line 424 swlo.dll!SwFlyFrame::DestroyImpl() Line 358 swlo.dll!SwFlyFreeFrame::DestroyImpl() Line 89 swlo.dll!SwFrame::DestroyFrame(SwFrame * const pFrame) Line 396 swlo.dll!SwLayoutFrame::DestroyImpl() Line 516 swlo.dll!SwFrame::DestroyFrame(SwFrame * const pFrame) Line 396 swlo.dll!SwLayoutFrame::DestroyImpl() Line 540 swlo.dll!SwPageFrame::DestroyImpl() Line 317 swlo.dll!SwFrame::DestroyFrame(SwFrame * const pFrame) Line 396 swlo.dll!SwLayoutFrame::DestroyImpl() Line 540 swlo.dll!SwRootFrame::DestroyImpl() Line 570 swlo.dll!SwFrame::DestroyFrame(SwFrame * const pFrame) Line 396 swlo.dll!std::_Ref_count_resource<SwRootFrame *,void (__cdecl*)(SwFrame *)>::_Destroy() Line 1222 swlo.dll!std::_Ref_count_base::_Decref() Line 1164 swlo.dll!std::_Ptr_base<SwRootFrame>::_Decref() Line 1380 swlo.dll!std::shared_ptr<SwRootFrame>::~shared_ptr<SwRootFrame>() Line 1685 swlo.dll!SwViewShell::~SwViewShell() Line 354 swlo.dll!SwCursorShell::~SwCursorShell() Line 3440 swlo.dll!SwEditShell::~SwEditShell() Line 63 swlo.dll!SwFEShell::~SwFEShell() Line 699 swlo.dll!SwWrtShell::~SwWrtShell() Line 2065 swlo.dll!SwWrtShell::`scalar deleting destructor'(unsigned int) swlo.dll!std::default_delete<SwWrtShell>::operator()(SwWrtShell * _Ptr) Line 3302 swlo.dll!std::unique_ptr<SwWrtShell,std::default_delete<SwWrtShell>>::reset(SwWrtShell * _Ptr) Line 3447 swlo.dll!SwView::~SwView() Line 1196 swlo.dll!SwView::`vector deleting destructor'(unsigned int) sfxlo.dll!SfxViewFrame::ReleaseObjectShell_Impl() Line 1140 sfxlo.dll!SfxViewFrame::~SfxViewFrame() Line 2059 sfxlo.dll!SfxViewFrame::`scalar deleting destructor'(unsigned int) sfxlo.dll!SfxViewFrame::Close() Line 1192 sfxlo.dll!SfxFrame::DoClose_Impl() Line 138 sfxlo.dll!SfxBaseController::dispose() Line 928 fwklo.dll!`anonymous namespace'::XFrameImpl::setComponent(const com::sun::star::uno::Reference<com::sun::star::awt::XWindow> & xComponentWindow, const com::sun::star::uno::Reference<com::sun::star::frame::XController> & xController) Line 1496 fwklo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Line 1707 sfxlo.dll!SfxFrame::DoClose() Line 104 sfxlo.dll!SfxViewFrame::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 1820 svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 40 sfxlo.dll!`anonymous namespace'::SfxModelListener_Impl::notifyClosing(const com::sun::star::lang::EventObject & __formal) Line 154 sfxlo.dll!SfxBaseModel::close(unsigned char bDeliverOwnership) Line 1511 swlo.dll!SwXTextDocument::close(unsigned char bDeliverOwnership) Line 574 sfxlo.dll!SfxBaseModel::dispose() Line 745 swlo.dll!SwXTextDocument::dispose() Line 561 mscx_uno.dll!`anonymous namespace'::cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy * pThis, bridges::cpp_uno::shared::VtableSlot aVtableSlot, _typelib_TypeDescriptionReference * pReturnTypeRef, long nParams, _typelib_MethodParameter * pParams, void * pUnoReturn, void * * pUnoArgs, _uno_Any * * ppUnoExc) Line 214 mscx_uno.dll!unoInterfaceProxyDispatch(_uno_Interface * pUnoI, const _typelib_TypeDescription * pMemberTD, void * pReturn, void * * pArgs, _uno_Any * * ppException) Line 430 binaryurplo.dll!binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny * returnValue, std::vector<binaryurp::BinaryAny,std::allocator<binaryurp::BinaryAny>> * outArguments) Line 239 binaryurplo.dll!binaryurp::IncomingRequest::execute() Line 79 binaryurplo.dll!request(void * pThreadSpecificData) Line 84 cppu3.dll!cppu_threadpool::JobQueue::enter(const void * nDisposeId, bool bReturnWhenNoJob) Line 101 cppu3.dll!cppu_threadpool::ORequestThread::run() Line 165 cppu3.dll!threadFunc(void * param) Line 190 sal3.dll!oslWorkerWrapperFunction(void * pData) Line 67 Main thread, doing an idle layout of the same document: emboleobj.dll!OleComponent::SetExtent(const com::sun::star::awt::Size & aVisAreaSize, __int64 nAspect) Line 1099 emboleobj.dll!OleEmbeddedObject::setVisualAreaSize(__int64 nAspect, const com::sun::star::awt::Size & aSize) Line 138 swlo.dll!SwWrtShell::CalcAndSetScale(svt::EmbeddedObjectRef & xObj, const SwRect * pFlyPrtRect, const SwRect * pFlyFrameRect, const bool bNoTextFramePrtAreaChanged) Line 777 swlo.dll!SwContentNotify::ImplDestroy() Line 926 swlo.dll!SwContentNotify::~SwContentNotify() Line 1037 swlo.dll!SwNoTextFrame::MakeAll(OutputDevice * pRenderContext) Line 584 swlo.dll!SwFrame::OptPrepareMake() Line 412 swlo.dll!SwFrame::OptCalc() Line 1110 swlo.dll!SwLayAction::FormatContent_(const SwContentFrame * pContent, const SwPageFrame * pPage) Line 1969 swlo.dll!SwLayAction::FormatFlyContent(const SwFlyFrame * pFly) Line 1994 swlo.dll!SwObjectFormatter::FormatObj_(SwAnchoredObject & _rAnchoredObj) Line 312 swlo.dll!SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject & _rAnchoredObj, const bool _bCheckForMovedFwd) Line 133 swlo.dll!SwObjectFormatter::FormatObjsAtFrame_(SwTextFrame * _pMasterTextFrame) Line 414 swlo.dll!SwObjectFormatterTextFrame::DoFormatObjs() Line 348 swlo.dll!SwObjectFormatter::FormatObjsAtFrame(SwFrame & _rAnchorFrame, const SwPageFrame & _rPageFrame, SwLayAction * _pLayAction) Line 160 swlo.dll!SwLayAction::FormatContent(SwPageFrame * pPage) Line 1802 swlo.dll!SwLayAction::InternalAction(OutputDevice * pRenderContext) Line 607 swlo.dll!SwLayAction::Action(OutputDevice * pRenderContext) Line 390 swlo.dll!SwLayIdle::SwLayIdle(SwRootFrame * pRt, SwViewShellImp * pI) Line 2372 swlo.dll!SwViewShell::LayoutIdle() Line 827 swlo.dll!sw::DocumentTimerManager::DoIdleJobs(Timer * __formal) Line 176 swlo.dll!sw::DocumentTimerManager::LinkStubDoIdleJobs(void * instance, Timer * data) Line 156 vcllo.dll!Link<Timer *,void>::Call(Timer * data) Line 111 vcllo.dll!Timer::Invoke() Line 75 vcllo.dll!Scheduler::CallbackTaskScheduling() Line 509 vcllo.dll!SalTimer::CallCallback() Line 53 vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 169 vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 525 vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 581 vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 385 vcllo.dll!Application::Yield() Line 473 vcllo.dll!Application::Execute() Line 361 sofficeapp.dll!desktop::Desktop::Main() Line 1652 vcllo.dll!ImplSVMain() Line 229 vcllo.dll!SVMain() Line 262 sofficeapp.dll!soffice_main() Line 121 soffice.bin!sal_main() Line 51 soffice.bin!main(int argc, char * * argv) Line 49 soffice.bin!invoke_main() Line 79 soffice.bin!__scrt_common_main_seh() Line 288 soffice.bin!__scrt_common_main() Line 331 soffice.bin!mainCRTStartup(void * __formal) Line 17 Change-Id: I92102a9cd11ccde307b070ebc1984eb3d17d65bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171856 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-14Related: cool#9735 vcl lok: add an AnyInput() callbackMiklos Vajna
Open the 300 pages bugdoc, paste a oneliner plain text content in a paragraph which is part of a numbered list, observe a 274 ms hang till layout is done for all pages, then we get an updated tile. This could be better, there is no such hang in the desktop case. What happens is that 1) vcl doesn't try to invoke the poll callback of the LOK client when there was a processed timer and 2) Writer layout doesn't try to split its work into pieces because the LOK client has no way to inform vcl that it has pending input events. Fix the first problem in this commit: add a new API that allows a LOK client to inform vcl that it has pending input events and use that SvpSalInstance::ImplYield(): if a LOK client has pending input events, then invoke the poll callback after each processed timer. For example, this allows the LOK client to process emitted callbacks between two idle layout jobs, word counting, etc. The second problem around Writer to use comphelper::LibreOfficeKit::anyInput() is not yet fixed. Change-Id: I2e39253bfc4d1b5546bc60eef9ff05ccdc0868b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171846 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-14dubious to enable/disable help button based on IsContextHelpEnabledCaolán McNamara
in just the SingleTabController, which is a specific subset of all dialogs, the case of a dialog that hosts a page typically seen in a multi-table dialog. Why should such a dialog have no help, while its sibling containing the same page alongside others would have help, or vice-versa. Change-Id: I3f54c0088e30a396e83e990510ebe7f1f3bc7bda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171848 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-14cool#9699 - Don't show Help button when there is no helpHubert Figuière
The SfxSingleTabDialogController was explictely showing the Help button even if it was previously hidden by the VclBuilder due to lack of Help URL in Collabora Online This was the case in the spelling option dialog. See https://github.com/CollaboraOnline/online/issues/9699 Signed-off-by: Hubert Figuière <hub@collabora.com> Change-Id: I4454f3d1f0c097faeebf912c3282335fed67ec84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171697 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171847 Tested-by: Jenkins
2024-08-14CairoSDPR: Handle EmphasisMarksArmin Le Grand (Collabora)
Handling EmphasisMarks for direct text rendering was a hard task - the EmphasisMark stuff is deeply buried in vcl (would have needed to move quite some includes from vcl to public) and thus hard to use. It is also quite old (tools Polygon, Rectangle). It was missing in the decomposition of the TextDecoratedPortionPrimitive2D (for good reason), but is needed now. I found a way using a callback lambda function to create the needed geometry in vcl and hand back the needed data to the caller, in this case to the decomposition. Adding it to the decomposition of TextDecoratedPortionPrimitive2D also guarantees that other renderers/usages will do the correct thing and all will look identical. Interestingly EmphasisMarks were never added to Metafiles (see OutputDevice::ImplDrawEmphasisMarks) so they were not 'missing' in Metafile-based exports. But for SDPRs they have to work. I added another encapsulating TextHierarchyPrimitive to encapsulate primitives that do represent EmphasisMarks and added to ignore these in the VclMetafileProcessor2D (as needed). Change-Id: I5b5c1528d86a123df2beb57d8366f05aa71e77cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171826 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-14svx: prefix members of SdrUndoSetPageNumMiklos Vajna
See tdf#94879 for motivation. Change-Id: I4231a19a562ede125f0f1819cbb224935a20c801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171844 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-08-14Resolves tdf#80054 - Customization for non-printable character colorHeiko Tietze
Change-Id: I82783a49d3a1c2096dcfa7c97a3fce14c555c988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171814 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-08-14tdf#158510 Added fallback for media files in MediaWindowImplVladislav Tarakanov
When launching media from Properties -> Media Playback, no sound is currently playing. This is due to the fact that there is no fallback URL defined for MediaWindowImpl. To fix this problem, new methods have been added for setting and getting the fallback URL, passing the path to the presentation folder from "unoshap4.cxx" to "mediawindow_imp.cxx". Because the setURL method starts the media immediately, calls to "setFallbackURL" method must be made BEFORE calling "setURL". Change-Id: I3054c90c648c5839a2eb3fc463eaefbf97500c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170644 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-13tdf#130857 VclBuilder: Move handleAtkObject to base classMichael Weghorn
Change-Id: I0f29b53b58f2d65d3409f6416406ba21c2411b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171821 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move handleItems to base classMichael Weghorn
Let the base class do the parsing for items and return a `ComboBoxTextItem`. It has nothing `vcl::Window` specific. (`vcl::Window` specific part is only when this gets applied in `insertItems`, which could probably be reimplemented differently for other subclasses). Change-Id: Ica2f435b48c69fbdfff450b713d91a6fbe985de6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171820 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move size group parsing to base classMichael Weghorn
Move the parsing of size groups from `VclBuilder` to the base class, `BuilderBase` and add a getter, `BuilderBase::getSizeGroups` that currently gets used from `VclBuilder`. Since the parsing is not specific to vcl::Window, make it possible to reuse it from other subclasses. It could e.g. be useful for the WIP QtInstanceBuilder from Omkar's WIP change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I0c44bfda1d5c850679695ab6bd436e4e487df9c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171819 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13tdf#130857 VclBuilder: Move list store handling to base classMichael Weghorn
This has has nothing vcl::Window specific, so make it reusable by other subclasses, like the WIP QtInstanceBuilder from Omkar's WIP change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I8ef00b9534c8f9d6bf756371133401ac06c05168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171818 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move collectProperty to base classMichael Weghorn
With the translation/localization moved to the base class in Change-Id: I2cefddae0a7e2e2dd4487cc9b9796afb215e2616 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Aug 12 12:52:16 2024 +0200 tdf#130857 VclBuilder: Move locale handling to base class , `VclBuilder::collectProperty` can now be moved there for reuse as well. Change-Id: I159aac8b59dd429b3c7d991c0d2546ae6739bcca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171790 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Extract helper to finalize valueMichael Weghorn
Extract helper method `BuilderBase::finalizeValue` to "finalize" a value, i.e. translate (if applicable) and apply the string hook (if set) from `VclBuilder::handleItems`. It will be reused in `VclBuilder::collectProperty` in an upcoming commit to reduce duplication. Change-Id: I76a41dbe9c830de02cb38b17d3587d49f64d0ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171788 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move locale handling to base classMichael Weghorn
* Introduce `ParserState` in the `BuilderBase` base class and move the `std::locale m_aResLocale` there from `VclParserState`. * Add a virtual `resetParserState()` method to reset both parser states. * Move `VclBuilder::handleInterfaceDomain` to the base class to let it take care of the handling of the translation domain/locale. * Instead of directly accessing the `m_aResLocale` member of the parser state, introduce a new getter, `getResLocale()`. Moving more of the members from `VclBuilder::m_pVclParserState` to `BuilderBase::m_pParserState` might make sense in future commits in order to reuse code for other implementations (like the WIP QtInstanceBuilder from [1]), so start with a corresponding struct right away instead of a member for just the locale. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I2cefddae0a7e2e2dd4487cc9b9796afb215e2616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171786 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Rename ParserState -> VclParserStateMichael Weghorn
This is in preparation of reintroducing `ParserState` in the base class, `BuilderBase`, with the plan to move things not specific to `vcl::Window`s there in the longer run, for reuse for subclasses not using `vcl::Window`, like the WIP `QtInstanceBuilder` from Omkar's pending WIP Gerrit change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I54758554b0093d3eefcd6f1f13f3479bdd07a0ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171785 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Extract helper for interface domainMichael Weghorn
Extract a helper method `VclBuilder::handleInterfaceDomain` that handles the "domain" attribute for the "interface" node that specifies the translation domain. This is more or less extracted from Omkar's WIP Gerrit change <https://gerrit.libreoffice.org/c/core/+/163103/9>. Co-authored-by: OmkarAcharekar <omkaracharekar12@gmail.com> Change-Id: I30ae1362b4d25ca478d2872cd695006a133d73f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171764 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13tdf#130857 Drop VclBuilder::m_pStringReplaceMichael Weghorn
Just use a local variable and call the `Translate::GetReadStringHook` getter directly in the currently 2 places using it. (Those will be further consolidated to use a helper method in upcoming commits.) Change-Id: I787a4794e6fd727e19bad12d5f61df66f41964c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171763 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move m_bLegacy to base classMichael Weghorn
... and introduce a protected getter instead of accessing the member directly. Change-Id: I105cb10b015887ee14bba0c519f03e9ba8b4c3c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171750 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13tdf#130857 VclBuilder: Move 2 static methods to base classMichael Weghorn
They're not `vcl::Window`-specific and might be helpful for other implementations as well. Change-Id: I8c04706ac36f80bc225a9ad89352b3d4a7c6464f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171749 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13VclBuilder: Drop UStringPair in favor of StringPairMichael Weghorn
They're the same since commit 116b9d6ddf2b61186b29f0370234eec9c1bbe306 Date: Sun Apr 2 01:18:42 2023 +0300 Avoid conversions between OUString and OString in VCL , so consistently use `StringPair` and drop `UStringPair`. Change-Id: I7120760b006957a81dfac50c85a00c9583242cd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171745 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-12tdf#156857: sd ooxml import: fix shape size if spAutofit is setBalazs Varga
and the size of the shape from ooxml file is different then the inew calculated by TextAutoGrowHeight. Furthermore, no need to check and resize the shape size during the spell checking. Change-Id: Iffd15e02579942d4f5f20db73f2194f8298c0838 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171621 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-08-11Related: tdf#154959 suitable label printer paper size not auto-selectedCaolán McNamara
a) If the printer is the default, then it doesn't get a paper size auto selected in the paper combobox, even though the preview shows it rendered on a paper size that the printer supports. b) With that fixed, then if the printer is the default one then right paper gets selected automatically, but starting with another and then switching to it gets different results, so throw away the "page cache" on switching pages and get it again. Change-Id: Idd5254eac2668164b02b41a63943f65a222656d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11Resolves tdf#61242 - Customization of comment background colorHeiko Tietze
* COL_AUTHOR<1..>_DARK/LIGHT/NORMAL removed Author1..9 added * dark variants calculated from light with 50% brightness * light does In/DecreaseLuminance(30) and dark (sd) resp. anchor (sw) In/DecreaseLuminance(80) depending on GetUseDarkMode() * sw: font color depends on outline background, which now picks up DOCCOLOR; this does not work for dark colors in light mode, for example * sd does not update on changes and requires a restart Change-Id: I773793de8cfbdc0d23124db790604b93030375c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171523 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-08-09CairoSDPR: Support TextDecorationArmin Le Grand (Collabora)
Change-Id: I923069582bb7c5022cfbff7e869c1d577a9123ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171691 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins
2024-08-08CairoSDPR: Support ColorPolygon with AlphaGradientArmin Le Grand (Collabora)
Cairo can render RGBA gradients directly and the CairoSDPR supports that. If we have a PolyPolygon filled with single color combined with a gradient alpha the renderer could map RGB to that color and combine with the real alpha gradient steps. To support that I added another Primitive called PolyPolygonAlphaGradientPrimitive2D. It decomposes as needed (TransparencePrimitive2D if needed), so no other renderers have to be touched. The Cairo renderer supports it directly, though, what makes it much faster. Change-Id: Ie90c8bd84d6458d12443db815ced55bdea93c15c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171628 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-08ONLINE: Add Invert document background color command.Gülşah Köse
Change-Id: Ia8868a80e4eba9a9a1c0b31077d9eca0c5b00466 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171633 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>