summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2022-06-09svx: work around GCC12 spurious -Werror=stringop-overflowMichael Stahl
/usr/include/c++/12/bits/stl_algobase.h:431:30: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ writing 1 or more bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] Change-Id: Ib581b5788ff5d363b688000e700a42074c3b78eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134740 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit d37486537e7d404b19acdfaec358cb0ad706940c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134633 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-06-09tdf#149304 Stylist does not show upper/lower case font effectsNoel Grandin
SvxFont has code to handle these extra features, we just need to call that Change-Id: I45691efeeead3ea60ab838eeb081fa5f19a76b90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135428 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 6aaa3e617523783b98bc68e260a3a7b4912d11b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135377 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-06-05Fix failing assert on shutdown with NVDA activeMike Kaganski
The stack trace at the moment of calling implLookupClient with nClient == -1 was: > ucrtbased.dll!abort() Line 61 C++ > ucrtbased.dll!common_assert_to_stderr<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number) Line 187 C++ > ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 420 C++ > ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444 C++ > comphelper.dll!`anonymous namespace'::implLookupClient(const unsigned long nClient, std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned long const ,comphelper::OInterfaceContainerHelper4<com::sun::star::accessibility::XAccessibleEventListener> *>>>> & rPos) Line 139 C++ > comphelper.dll!comphelper::AccessibleEventNotifier::addEvent(const unsigned long _nClient, const com::sun::star::accessibility::AccessibleEventObject & _rEvent) Line 249 C++ > svxlo.dll!accessibility::AccessibleTextHelper_Impl::FireEvent(const com::sun::star::accessibility::AccessibleEventObject & rEvent) Line 1416 C++ > svxlo.dll!accessibility::AccessibleTextHelper_Impl::FireEvent(const short nEventId, const com::sun::star::uno::Any & rNewValue, const com::sun::star::uno::Any & rOldValue) Line 1408 C++ > svxlo.dll!accessibility::AccessibleTextHelper_Impl::ShutdownEditSource() Line 700 C++ > svxlo.dll!accessibility::AccessibleTextHelper_Impl::SetEditSource(std::unique_ptr<SvxEditSource,std::default_delete<SvxEditSource>> && pEditSource) Line 717 C++ > svxlo.dll!accessibility::AccessibleTextHelper::SetEditSource(std::unique_ptr<SvxEditSource,std::default_delete<SvxEditSource>> && pEditSource) Line 1548 C++ > svxlo.dll!WeldEditAccessible::ClearWin() Line 552 C++ > svxlo.dll!WeldEditView::~WeldEditView() Line 864 C++ > smlo.dll!SmEditTextWindow::~SmEditTextWindow() Line 85 C++ > smlo.dll!SmEditTextWindow::`scalar deleting destructor'(unsigned int) C++ > smlo.dll!std::default_delete<SmEditTextWindow>::operator()(SmEditTextWindow * _Ptr) Line 3129 C++ > smlo.dll!std::unique_ptr<SmEditTextWindow,std::default_delete<SmEditTextWindow>>::reset(SmEditTextWindow * _Ptr) Line 3276 C++ > smlo.dll!SmEditWindow::DeleteEditView() Line 853 C++ > smlo.dll!SmEditWindow::~SmEditWindow() Line 139 C++ > smlo.dll!SmEditWindow::`scalar deleting destructor'(unsigned int) C++ > smlo.dll!o3tl::default_delete<SmEditWindow>::operator()(SmEditWindow * p) Line 46 C++ > smlo.dll!std::unique_ptr<SmEditWindow,o3tl::default_delete<SmEditWindow>>::reset(SmEditWindow * _Ptr) Line 3276 C++ > smlo.dll!SmCmdBoxWindow::dispose() Line 931 C++ > vcllo.dll!VclReferenceBase::disposeOnce() Line 39 C++ > sfxlo.dll!VclPtr<vcl::Window>::disposeAndClear() Line 206 C++ > sfxlo.dll!SfxChildWindow::~SfxChildWindow() Line 198 C++ > smlo.dll!SmCmdBoxWrapper::~SmCmdBoxWrapper() C++ > smlo.dll!SmCmdBoxWrapper::`scalar deleting destructor'(unsigned int) C++ > sfxlo.dll!SfxChildWindow::Destroy() Line 176 C++ > sfxlo.dll!SfxWorkWindow::DeleteControllers_Impl() Line 599 C++ > sfxlo.dll!SfxFrame::DoClose_Impl() Line 133 C++ > sfxlo.dll!SfxBaseController::dispose() Line 981 C++ > 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 1485 C++ > fwklo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Line 1696 C++ > fwklo.dll!framework::Desktop::impl_closeFrames(bool bAllowUI) Line 1702 C++ > fwklo.dll!framework::Desktop::terminate() Line 214 C++ > fwklo.dll!framework::CloseDispatcher::implts_terminateApplication() Line 543 C++ > fwklo.dll!framework::CloseDispatcher::impl_asyncCallback(LinkParamNone * __formal) Line 397 C++ > fwklo.dll!framework::CloseDispatcher::LinkStubimpl_asyncCallback(void * instance, LinkParamNone * data) Line 245 C++ > vcllo.dll!Link<LinkParamNone *,void>::Call(LinkParamNone * data) Line 111 C++ > vcllo.dll!vcl::EventPoster::DoEvent_Impl(void * __formal) Line 53 C++ > vcllo.dll!vcl::EventPoster::LinkStubDoEvent_Impl(void * instance, void * data) Line 48 C++ > vcllo.dll!Link<void *,void>::Call(void * data) Line 111 C++ > vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 2232 C++ > vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2800 C++ > vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 308 C++ > vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4214 C++ > vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5865 C++ > vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5972 C++ > user32.dll!UserCallWinProcCheckWow() Unknown > user32.dll!DispatchMessageWorker() Unknown > vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 475 C++ > vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 506 C++ > vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 581 C++ > vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 474 C++ > vcllo.dll!Application::Yield() Line 559 C++ > vcllo.dll!Application::Execute() Line 452 C++ > sofficeapp.dll!desktop::Desktop::Main() Line 1600 C++ > vcllo.dll!ImplSVMain() Line 202 C++ > vcllo.dll!SVMain() Line 235 C++ > sofficeapp.dll!soffice_main() Line 94 C++ > soffice.bin!sal_main() Line 51 C > soffice.bin!main(int argc, char * * argv) Line 49 C Firing the event when we already set the id to mean "revoked" seems wrong. Also use the correct type for the id. Change-Id: Ie2e180c0c8c112023f789968ffa785f046de9d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135058 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135413 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-06-05Don't add empty labels to fontwork's icon viewMike Kaganski
This allows to center the icon in the respective entry, not having whitespace in the bottom Change-Id: Ib148df6911f020f8d4efca4f6a80a65b7f95945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133720 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135406 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-06-05[ Edit Chart ] -> [ Edit Object ]Mike Kaganski
This button was introduced in commit 376cd2ceaeedd12a8050c5acd142cd9b9d5e731a Author Muhammet Kara <muhammet.kara@collabora.com> Date Wed Nov 20 15:30:01 2019 +0300 Add Edit Chart button for online's mobile view It is shown for any kind of OLE object, including Math. So make its text more neutral. Possibly it could make sense to construct the name from the OLE object's proper name in a follow-up. Change-Id: Ied2e9b10db3bcbfab4328a1f65f812cd52f85004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133426 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135400 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-06-01tdf#148168 set built-in gtk search box to search "document name" columnCaolán McNamara
rather than column 0 which is used for icons Change-Id: Idef015e575fe6a4f76ad0cc67481ca8454a07206 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134782 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-30svx: calculate object range before using itPranam Lashkari
Change-Id: I01f0176542e9d6f36a2f7bbc870a9e337705a5a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133454 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit b604f17732b0b31d69781f812357d34f3da7175d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133486 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com> (cherry picked from commit db6c5c7f9dddd81a8f18a74d6051555680837adc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135068
2022-05-28svx: fix one more EXCEPTION_INT_DIVIDE_BY_ZEROXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/SvxShowCharSet::PixelToMapIndex(Point%20const%20&) Change-Id: Ied5698fd47220fae54d72be263c3eeed5fb77911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-2850 null derefs seen in crashreporting reportCaolán McNamara
Change-Id: I42f1179ad1d60ac70ccda5362590853a69fd3712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134901 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-25svx: fix double-free if SvxShape of SwDrawVirtObj is disposedMichael Stahl
First SvxShape::dispose() deletes it, then ~SwDrawFrameFormat() via ~SwDrawContact() calls SwDrawContact::RemoveAllVirtObjs() and deletes it again. Back in 2009, CWS dba32 (60698c8a619f219129dbeac7da1f962f3fa63f6a) added this OSL_ENSURE, let's actually try to fix this now. Change-Id: I5c391aa425aa75fb87cecccbf9e41c9f90196f9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134609 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit 5eb25f6a7ecb215f7bc81116cd930c1dec645e8d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134621 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25tdf#148923 PPTX import: fix incorrect image in media fileTünde Tóth
Linked media file was imported with incorrect image, if the Impress couldn't play the media file. Regression from commit 9564747d2fd5d2c859a359dd7fa6242c6859c0d7 (tdf#53970 PPTX: fix import of linked media files). Change-Id: Ib277a61e83c3794376d2c090b7f742707e779832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134394 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134635
2022-05-13tdf#149023 set property immediately on changeCaolán McNamara
and not in an idle which may be triggered on losing focus and arrive when a new shape is selected Change-Id: I7cec8f1c9bf864cdb30516dece1ef9d6b689a94e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134175 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-13tdf#148714 connect first and second arc with arcToRegina Henschel
The curved*Arrows start with two arcs, which should be connected by a line. The used commands are double V and double B respectively. Both have an implicit moveTo, so that there should be no line between. Other applications show the shapes correctly without line. But because of bug 148714 LO shows a connecting line so that the error was not earlier detected. The patch changes the segment definition so that for the second command the variant with implicit lineTo is used. This does not change rendering in LO but makes other applications rendering the shapes like LO. Change-Id: I4f799f89497e52b1a7e00d8e5345a66ce21c00a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133586 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133640
2022-05-02fix regression in linked bitmap importNoel Grandin
from commit 0527778df5f1ace8731043d070cf54b7b8648545 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri Aug 21 13:19:36 2020 +0200 use fastparser for fill styles spotted dodgy code while doing other work Change-Id: I339e8fbdb9df4d5f17ded76de199a3282f7c2d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133621 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit d606b6bb3e03467fb66a19f0acb85e46b0d4ff41) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133598
2022-04-27tdf#148501 color shades only for filled PolyPolygonsRegina Henschel
For shading parts of a shape not of Type 'ooxml-*', ColorData is used, introduced about 2005. For 'mso_spt*' shapes they are set directly, for others they are encoded as 'col-********' into the Type value. During OOo time two changes were made, resulting in the bugs, that colors are assigned to wrong segments and that shadings are too dark. More details are in the bug report. With this patch the colors are assigned to the correct segments again. The too dark colors are visible in our preset shapes 'Octagon Bevel'. The shape 'Diamond Bevel' with corrected color assignment is also affected. Both need new ColorData. Since it is important for Libreoffice to have good compatibility with OOXML, I have decided to use only the four shading values available in OOXML. In the long run, these shapes should be replaced by ones that contain the shading information inside the <enhanced-path> element. Change-Id: I4b8323c45bf702fc371d6e6c82dd9102d0fd9929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133132 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133153
2022-04-25tdf#55058 tdf#143875 EMF+ Fix display of dashed lines and line jointsBartosz Kosiorek
With previous implementation, empty spaces between dashes were too long. Additionally line joints were not working correctly, after EMF+ reworking: tdf#111486 This commit fixes all these issues and additionally it is covering it with tests. Change-Id: I9404e566d2d7d3405ab817268ad9b1f538c200eb Change-Id: I523f92a928ab592ff175d0d01c1ad1a3bc22e324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133207 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit 80c856336668e35837667323957fa3ad4172f3c0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133152
2022-04-25tdf#148313 Basic IDE crashing while resizing dialogNoel Grandin
Change-Id: Ic68b78f26626f346f3ef8b54a584de64165d9eb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit d40c6601330b70c3cb9c1be0fa9e9775ad51113c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133140 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-19sc: introduce SparklineShell and Sparkline contextTomaž Vajngerl
Having a separate sparkline context is very useful, so we can add a custom UI when the user has the cursor over a sparkline. This will allow a "Sparkline" tab for NotebookBar and its own deck in Sidebar, activated only when the sparkline is present. Also the pop-up menu can be customized specifically for the sparkline, but this may be less useful. For the sparkline context we need a custom shell - SparklineShell where now all the UNO commands can be implemented (not done in this commit). Change-Id: Idca2ad946af3afdd1b494744b80c9c093eec602c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133022 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit e1f3f2e00c37173e5f6f1cbb5235ab95b100bde7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133062 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-14make svx::frame::Style ctor inlineLuboš Luňák
ScDocument: :FillInfo() may result in calling it often. Change-Id: I05d0582befc57c4959c33fae6dec3d340b8a49ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131338 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-30Make accessibility check dialog asyncNickWingate
Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: I88913b3d7e580a1d8c69a39454f2598e11ba43ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130438 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 61fed0c4fe53738254d116543417f1c7028a0f39) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132185 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-03-30Sidebarparagraph: Replace generic idsPedro Pinto Silva
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com> Change-Id: Ic6f0195c272f0442dc96cfff0321e15461f8bbc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131616 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2022-03-28Notebookbar style previews: use CJK or CTL fonts if neededSzymon Kłos
Change-Id: I4757cf7af16a11895ec0c6e71257f2b4f02cda68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132159 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> (cherry picked from commit f7c069e1008949a07481dc56e40bcd82343884dc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132051 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-23use 64bit for window sizes (tdf#147458)Luboš Luňák
Change-Id: Iaa240aeae8bacbff6bccd9bf0721a02414b6f47d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130288 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-16Update styles previews in IdleSzymon Kłos
This helps with performance when we do series of actions updating styles. In that case we will only request update. When we will reach idle state we will do it only one time. What removes unnecessary updates in the meantime. Change-Id: I9fc59992833a6cf98c42571c1189b3c5d49ba5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126840 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130232 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131643 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-16svx: don't remove object right after insertionSzymon Kłos
This is regression from: commit 2d95b3846eac367d2baadc194ab258dc31e7bd33 Author: Tomaz Vajngerl <tomaz.vajngerl@collabora.co.uk> Date: Thu Oct 7 16:48:46 2021 +0200 svx: Don't end text edit mode for all views It was visible with "direct insertion" where user doesn't need to draw anything but textbox is inserted in the center of a screen (eg. used in LOK case) Object was inserted into a view and right after that was removed when EndTextEditCurrentView was called Change-Id: I9943d46746aabadf96d76d6e74770b56d648b79d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131263 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131642 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-16lok: insert textbox directly in CalcSzymon Kłos
Change-Id: I3ae00b255dfbaa34ab8d973356d12dfd0f71d345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131267 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131641 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-14tdf#72776 Allow text removal in the shapesSzymon Kłos
Previous fix had crafted condition for fixing one specific case but it was braking other cases. (svx/source/unodraw/unoshtxt.cxx) For example it was not possible to remove text inside textbox and save that -> it was not saved in LOK case. Problem is that we had not saved text inside shape and due to calling GetBackgroundTextForwarder() we did reset to empty content. In this patch we force UpdateData() call by releasing lock just before we try to do some final text cursor operations what applies changes in the content and prevents us from losing it. Call which was invoking GetBackgroundTextForwarder() was: file: xmloff/source/draw/ximpshap.cxx method: SdXMLShapeContext::endFastElement line: mxCursor->gotoEnd( false ); After that I found that we had bug which breaks test: sd/qa/unit/import-tests.cxx odp/shapes-test.odp It occurs when using this patch or when not using my code but removing locking functionality for SvxTextEditSourceImpl. NbcSetOutlinerParaObjectForText triggers shape resizing even when no text is present inside. Summary: 1. revert hack from https://git.libreoffice.org/core/+/71b66b0039819f38c935b4eb5d5951ceaf6e8468%5E%21 2. trigger text update by releasing lock for a moment to keep correct state 3. fix bug with resizing empty shape Change-Id: Idf1fc6caf19dfb932ce7caa21034f76fa04ce5f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130415 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131119 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-03svx: the SdrObject of SvxGraphicObject can be nullptrMiklos Vajna
Crashreport: Graphic::GetType() const vcl/inc/impgraph.hxx:122 SvxGraphicObject::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertySimpleEntry const*, com::sun::star::uno::Any&) svx/source/unodraw/unoshap2.cxx:1466 (discriminator 1) SvxShape::_getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1747 non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1732 During SVG export of a selected shape. Change-Id: I29b56d49b0c5418dfe8fec8491ac8667e5ade2ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130819 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit c1ce7d9f2c4036ae71f8cfa71e4bee4067f4d8d2)
2022-02-21lok: fix regression "WeldEditView::DoPaint" for dialog tunnelingHenry Castro
Change-Id: I1cb345b3911d03dc90acef2a17705d654a06deb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128622 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2022-02-21lok: Set pasted text rect pos to 0, 0Mert Tumer
Rect size change according to the length of the text however, this can make the text inserted in the negative coordinates and half of it becomes invisible. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-21set active element to -1 when no selection for fontnameboxMert Tumer
FontNameBox sets the currentVal to emptystring when there's a mixed font-name selection on the text but does not update the active_element which is incorrect whereas other comboboxes such as FontSize does it correctly. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-02-14support for the WebP image format (tdf#114532)Luboš Luňák
This commit implements a WebP reader and writer for both lossless and lossy WebP, export dialog options for selecting lossless/lossy and quality for lossy, and various internal support for the format. Since writing WebP to e.g. ODT documents would make those images unreadable by previous versions with no WebP support, support for that is explicitly disabled in GraphicFilter, to be enabled somewhen later. Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-14svx-lok: incomplete invalidation when resizing/deleting...Dennis Francis
shapes in writer. The problematic commit is 5e37acbaaa0b0891829907331ecacd2d3b67526d lokCalcRTL: shapes: do not send negative(X) invalidations The above change forced the lok mode to use the second branch hence avoid the view-transformation based invalidation. This patch restores the old branching condition, but do the negation of invalidation rectangle in case of lok-calc-rtl mode(IsNegativeX). Change-Id: I679473f0610d2edabeb6071edbb32a63a436d053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128491 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 242d2752aa6af2c52affc90e84b58c59c5fa779d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129440 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14lokCalcRTL: fix editing of shape textDennis Francis
Inform editeng that negated document x coordinates are used in this case and ensure that editeng generated invalidation rectangles always have positive X coordinates. Conflicts: sc/source/ui/view/gridwin4.cxx Change-Id: I2e450707ce02f7bcd8e4d299f857c37ebbd5e2c6 (cherry picked from commit 0fe02bb99e5dfa8379a49de75683fc350e4c4dbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129360 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14lokCalcRTL: shapes: negate mouse-event x coordinateDennis Francis
Conflicts: svx/source/svdraw/svdview.cxx Change-Id: I153334940b41859e6fd9dee64217925627f0f292 (cherry picked from commit bb37b46182bcff2f10edcc590cedbc4bb5820c4b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129359 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14lokCalcRTL: shapes: do not send negative(X) invalidationsDennis Francis
LOK client expects tile invalidations in positive document coordinates irrespective of RTL flags. For this introduce a flag mbNegativeX in svx class SdrMarkView to indicate the case when all x coordinates are negated (this happens only for the LOK + Calc + RTL mode). Use this flag to counter negate the x coordinates before sending invalidation rectangles. Conflicts: sc/source/ui/view/drawvie3.cxx Change-Id: I35d8142718b538e55b668a8ee18f3dd1fe433951 (cherry picked from commit 5e37acbaaa0b0891829907331ecacd2d3b67526d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129195 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14lokCalcRTL: ensure +ve X coords in shape handles/selections msgsDennis Francis
LOK client expects all coordinates to be in +ve document coordinates, so negate the negative X coordinates of LOK RTL shapes before sending the selection/handles messages. Conflicts: svx/source/svdraw/svdmrkv.cxx Change-Id: I683581370c5b115efbe315224d6218ec2e74c7f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129190 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14Set the original size in crop dialog to preferred DPI calc. sizeTomaž Vajngerl
If we have the document setting preferred image size set, then use that as the default DPI and recalcualte the logical image size using the DPI and the size in pixels. This is useful so we have the preferred DPI size as 100% in the crop dialog, so we can adjust the size in relation to that value. Change-Id: I50806f194032e228ee2cf56a39e5735a57358d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127096 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-14Add graphic size checker for the preferred document DPITomaž Vajngerl
This change adds a graphic size checker, which checks all the images in the document, if they largely differ (outside of 50% and 110% of the image size) from the set preferred image DPI document setting. For all images that don't fall under this bounds, list them in the dialog and offer the posibility to select/goto the image and pop-up the properties dialog for the image to change its size. Change-Id: I06efce77c291fdb6ec3864d72c2f4d15dba9c42b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127094 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-14use more cppu::BaseMutexNoel Grandin
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-14svx: fix dynamic cast SdrViewHenry Castro
Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/collabora/online-buildscripts/staging/builddir/libreoffice/svx/source/sdr/contact/objectcontactofpageview.cxx:353:57 in Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: /home/collabora/online-buildscripts/staging/builddir/libreoffice/include/svx/svdview.hxx:235:65: runtime error: member access within address 0x61c000489880 which does not point to an object of type 'SdrView' Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: 0x61c000489880: note: object is of type 'SdrPaintView' Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: 7c 04 80 3b 90 58 b9 3d 60 7f 00 00 30 51 96 0a 20 60 00 00 38 51 96 0a 20 60 00 00 38 51 96 0a Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: ^~~~~~~~~~~~~~~~~~~~~~~ Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: vptr for 'SdrPaintView' Change-Id: Ifc9177902ac834d400d6bf9f72b94e82f544b348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-14tdf#126319 Corrected bitmap creation from metafileArmin Le Grand (Allotropia)
The conversion from Metafile to Bitmap in GraphicExporter is based on metafiles which does just not deliver enough precision when getting the bounds to do the correct size calculation for the target Bitmap. So I changed that to use Primitive functionality what produces better data. That old fix/correction itself was based on hairlines only which is anyways no longer sufficient since LO uses less hairlines nowadays, what is good in general (They are a relic of non-AA times when it was not possible to paint/work with lines taller than one pixel). Thus, cases need to be solved more generic based on better data. It would also be good to change this to primitives completely, but that is too much for now. Change-Id: I71bd136b106ef8ff3ba51458c46df08269773c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129235 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129810
2022-02-14tdf#126319 Correct area(s) on selection exportArmin Le Grand (Allotropia)
For shapes like TextFrames the export of the selected object(s) to Bitmap needed to be adapted. It should not reduce to minimal geometric necessary size. While reduction seems good initially as an idea this may change aspect ratio and expected size of the result by cutting off visually empty areas, e.g. the text distance areas to the shape's logical bounds. This also needed to be adapted to multi-selections accordingly. Change-Id: I85bffe60fcfc2e8da87f69936af30f64c26deead Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129002 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129809
2022-02-14tdf#137571 use XActionGuard to lock blocks that don't need updatingCaolán McNamara
so we can avoid constantly generating new TextForwarders which are the same as the one they replace. The underlying problem is that of tdf#123470 but this solution should be safe to backport Change-Id: I742f2a9ce0024adf9bd0acc5bb8edb9372fc0af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129762 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-13[cp] don't show inaccessible crashreport linksAndras Timar
(cherry picked from commit 0d045c85fb8dbdb7fa2e116ef9983e0a60bd2b99) Change-Id: I3c4ed28cb1a02049fb009f576943f80b8ba8e627 Reviewed-on: https://gerrit.libreoffice.org/78403 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94479 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-13[cp] Collabora Crashreport DialogAndras Timar
(cherry picked from commit c51dc04cc3cd48e7d5ab51a1f88e36bda8707c73) fix previous commit (cherry picked from commit 4553bc1bfa72dce55566971e27b94f3a5bfcdc79) Reviewed-on: https://gerrit.libreoffice.org/78402 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> 204f83aede085bbe4f5bd6937238b2117e51c86a Change-Id: Id44e446684993984cf5778c82eb0a990bdd2f465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94478 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-13[cp] enable crashreport on WindowsAndras Timar
(cherry picked from commit ce263269dff121af85634ada7870f33632e02bdd) Change-Id: I55df3da63919f76afcd4905b1898287e26c8c4f1 Reviewed-on: https://gerrit.libreoffice.org/78401 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94477 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-07WaE: angle[1|2] may be used uninitialized [-Wmaybe-uninitialized]Caolán McNamara
Change-Id: If8771e4c73656d6f6d236d2d530d0ec92c1f5a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129534 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-04tdf#125849 cannot modify the ruler unit of measure in translated UICaolán McNamara
Change-Id: Ica74dd5e55d30605ee03affa4b724ffa4ec65b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129333 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-04tdf#147119:Revert "tdf#123973 fix missing MasterPage content in export"Xisco Fauli
This reverts commit 87866def6bfe2ee91be34a5ce37b79d6da881617. Change-Id: Ic3c8c70ef789b83cec0614e766a3c067cbf078fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129351 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129407