summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-05-13Related: tdf#148197 gtk_tree_view_scroll_to_cell needs either path or columnCaolán McNamara
so a null path is invalid here Change-Id: I1958e9695e3290e0c513bce89c9548908860754f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134280 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-13add SvStream::ReadLine(OStringBuffer... to reduce OString allocationNoel Grandin
and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13tdf#148706: map value prop in numericfield to textXisco Fauli
Change-Id: Ifc37b0aa8dc657d7a7f05199c8132896d03eb437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134240 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-12make the expand/collapse node drawing easier to readCaolán McNamara
Change-Id: I0b25affad41dfea7c0980c5eb6092fd0a149bae8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134238 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-12tdf#119686: fix tiff with 1 bit per pixelJulien Nabet
On the 30 pixels width images, the 3 first bytes were ok, that's why the 24 first pixels of each line was ok. The pb was in the fourth byte, you must read each bit of this last byte until reaching 30 pixels, so 6 bits (since width 30 corresponds to 3 * 8 + (8 - 2)). Here LO always shifted this byte with the same value, so used the value of the first bit for the last 6 bits of the last byte. => just decrement the shift value at the end of each loop With this patch initial, attachment of the bugtracker https://bugs.documentfoundation.org/attachment.cgi?id=144656 and the more complex one https://bugs.documentfoundation.org/attachment.cgi?id=144656 are ok Change-Id: I17339c54d6822c724184f167fb3a25b240e06543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134235 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-12tdf#148740 draw expanders instead of using iconsCaolán McNamara
and then the color of the expander can simply follow the text color to get contrast for the selected entry case. At some point someone thought it would be a good idea to expose via uno the possibility to set custom expand/collapse icons so retain that support. Change-Id: I44c40bf691cae228e184e58ed848001aaa4b4996 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134168 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-12tdf#143612: map SecondaryRefValue in form pdf exportXisco Fauli
Change-Id: I590784eb94fb6f4f3a20c4f6d8e3fb618f60d0fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134227 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-12related: tdf#148442: do not replace 'Yes' if onValue is emptyXisco Fauli
Change-Id: I748422dfbe7a385f4206c5d129eb3091289a180d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134220 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-12we already know the length of the string we pass to hb_language_from_stringCaolán McNamara
Change-Id: I860ed7c253ef872ed6609a01030294609cbbb78e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134209 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-12merge SetNodeBitmaps and SetNodeDefaultImagesCaolán McNamara
Change-Id: I31a9cc0fc9f97d564f9c8eac0c483892ae3c774f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134210 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-12pre-size the maLinkHash map to avoid allocationsNoel Grandin
Change-Id: I926747d852dc2de56b7125132e74a1c23c75bbd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11tdf#148442: map RefValue property to onValue in pdfXisco Fauli
Similar to what it's already done for radiobuttons Change-Id: I708d23dc5f9d4470a9850d7ecc60bd71fada594e Change-Id: I34107c757b0e0933f392a6d0845fa0d2e07aed62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134170 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-11elide temporary OString in GenericSalLayout::LayoutTextNoel Grandin
Change-Id: I2169087bf780fb7b42aad8db0ee7484bf48d9ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11GetDontKnowNodeBmp is always emptyCaolán McNamara
so this is dead code, remove most of it, but recover setting aControlValue.setTristateVal(ButtonValue::DontKnow) when the possibility of expansion resulting in children is unknown Change-Id: Idc2abd9af70402a92d02ed2273ab1df6684b16fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134194 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-11fix HB_GLYPH_FLAG_UNSAFE_TO_BREAK for RTL in cloneCharRange() (tdf#148954)Luboš Luňák
I got the meaning wrong, when the docs talk about beginning of a cluster, that refers to text, not glyphs, so this needs to be backwards too. Change-Id: I12ef775b033100405e3332d5611844cefb6b5a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134173 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-11Don't leave ImplFontMetricData::mnHangingBaseline uninitializedStephan Bergmann
...after 5f92e8cf3da6b5f66b6ef23219fcc91d2ad7c754 "tdf#104930 Implement TextMetric::GetHangingBaseline", to avoid UBSan failures like > [_RUN_____] (anonymous namespace)::Test::testLineSpacing > /vcl/source/outdev/map.cxx:291:9: runtime error: signed integer overflow: -4702111234474983746 * 1440 cannot be represented in type 'long' > #0 0x7f408a2ba5fe in ImplPixelToLogic(long, long, long, long) /vcl/source/outdev/map.cxx:291:9 > #1 0x7f408a2bac1e in OutputDevice::ImplDevicePixelToLogicHeight(long) const /vcl/source/outdev/map.cxx:361:12 > #2 0x7f408a136ddc in OutputDevice::GetFontMetric() const /vcl/source/outdev/font.cxx:217:33 during CppunitTest_editeng (<https://ci.libreoffice.org/job/lo_ubsan/2395/>) Change-Id: Ief2121c588d296a23606314143a0176c8ae9aa38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134142 Reviewed-by: Mark Hung <marklh9@gmail.com> Tested-by: Jenkins
2022-05-10tdf#148470 if macOS glyph fallback provided a partial result flag what failedCaolán McNamara
so another font can be attempted for the remainder Change-Id: Ie2c67c7c63510d02c99f2377c0c43ed6050ccd86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134131 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-10Fix typosAndrea Gelmini
Change-Id: I48781032778c403420b3258c53e4be5d2b7531d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134133 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-10tdf#104930 Implement TextMetric::GetHangingBaseline.Mark Hung
The text metric value is initialized in ImplFontMetricData::ImplInitBaselines() using harfbuzz API hb_ot_layout_get_baseline. It can't handle multiple hanging baselines of the same font for different scripts yet because the script is fixed to HB_SCRIPT_UNKOWN. Change-Id: I2574f0dba45501187064b9341c573159914a4a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133667 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2022-05-09crashtesting: use of negative return indication failure as lengthCaolán McNamara
a problem since... commit e9c50fbbc3b07ef927d133da9cf2395c55611e0f Date: Sat Apr 2 15:49:32 2022 +0300 tdf#103954: Z compressed graphic formats support for EMF/WMF Change-Id: Ia994587bf411a2cda3df38cb209313171b78ee9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134091 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-09Related: tdf#148433 experiment with SAL_DISABLE_CURSOR_INDICATORCaolán McNamara
to turn off the arrow indicators in BiDi cursor Change-Id: I5ed96bccf17432e63564bdfc1c7d2ad4fecdd2a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134090 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-09ofz#47323 suppress Direct-leakCaolán McNamara
Change-Id: I7189e4974a6bb8038a347442cf7ad925530e6f9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134074 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-09SvFileStream needs an absolute file URLStephan Bergmann
...and fail loudly if writing the file fails for any reason Change-Id: I1e6d2e3da4d2ef643f4d27067845184dbf2e40a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134076 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-09ofz#46070 Out-of-memoryCaolán McNamara
Change-Id: Ie7417f5f7e0ed49cfc3b38eda3117d53c8a2a59e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134053 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-09Fix --disable-pch build: explicitly delete move constructorMike Kaganski
Without this, the implicitly created constructor is exported by MSVC for the DLLPUBLIC class, and requires that VirtualDevice is defined, resulting in this error in PCH-disabled builds: [build CXX] vcl/source/animate/Animation.cxx C:\lo\src\core\include\rtl/ref.hxx(129): error C2027: use of undefined type 'VirtualDevice' C:\lo\src\core\vcl\inc\impanmvw.hxx(29): note: see declaration of 'VirtualDevice' C:\lo\src\core\include\rtl/ref.hxx(127): note: while compiling class template member function 'rtl::Reference<reference_type>::~Reference(void)' with [ reference_type=VirtualDevice ] C:\lo\src\core\include\vcl/vclptr.hxx(216): note: see reference to function template instantiation 'rtl::Reference<reference_type>::~Reference(void)' being comp iled with [ reference_type=VirtualDevice ] C:\lo\src\core\include\vcl/vclptr.hxx(64): note: see reference to class template instantiation 'rtl::Reference<reference_type>' being compiled with [ reference_type=VirtualDevice ] C:\lo\src\core\include\vcl/outdev.hxx(202): note: see reference to class template instantiation 'VclPtr<VirtualDevice>' being compiled make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:337: C:/lo/src/build/workdir/CxxObject/vcl/source/animate/Animation.o] Error 2 Change-Id: I78723ce7d00667595aff39bcab22169ff347098f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134036 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-09tdf#89331 EMF/WMF Fix holes in lines created with LINETOBartosz Kosiorek
If the lines are created with MOVETO, LINETO, LINETO... then Line Join NONE is applied. As a result the charts are looks ugly, with the holes inside it. For example: https://bugs.documentfoundation.org/attachment.cgi?id=179962 and https://bugs.documentfoundation.org/attachment.cgi?id=179837 Additinally commit changed default line join style to miter, as during experimenting with MS Paint and MS Word, it appear that default Join Style is PS_JOIN_MITER and Line Cap is Flat/Butter. The PDF export tests has been updated, as there is less number of PDF object after using joiners. The size of the exported tdf145873.pptx to PDF, was slighltly decreased from 22.8kB to 22.0KB Change-Id: I131cc3c5e90f827d67d2360eb18167eed6315abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133624 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-05-09osl::Mutex->std::mutex in SalUserEventListNoel Grandin
Change-Id: I463f1620e28bf71b8b7ad61a9da074ff6ee7f0f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133912 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-08ofz#46607 Integer-overflowCaolán McNamara
Change-Id: Id759423176b2e47fc00b8e7babd936b480956617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134025 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-08drop special fuzzing pathCaolán McNamara
Change-Id: Ifa47253b1122f6f84f2c082b2f71b04451ec5162 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134026 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-08Delete CJK-style mnemonics on macOSxuenhua
Delete CJK-style mnemonics for the dropdown menu of the 'New button' and lower menu of 'File > New' on macOS Change-Id: Idd0ab671cd75151095c92b37e5b6b5e81ddae7e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133973 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-07ofz#47289 attempt to allocate negative lenCaolán McNamara
a problem since... commit e9c50fbbc3b07ef927d133da9cf2395c55611e0f Date: Sat Apr 2 15:49:32 2022 +0300 tdf#103954: Z compressed graphic formats support for EMF/WMF which added an unconditional seek to 0 of the stream which isn't desirable when done on the original stream which is deliberately seeked to the start of the graphic data, seeking to 0 just skips back to the start of the enclosing file, e.g. a word document stream. Presumably this should just happen in the case of the replacement decompressed stream. Change-Id: Ifb67fb265c70d5728a74dc3499f275eb5d69ddbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-07vcl: add some basic Animation unit testsChris Sherlock
Change-Id: Ib8e33fe5f4360b298d2be02fcb5777c21e71fd0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76400 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-06vcl: test ImplAnimViewChris Sherlock
Change-Id: I1f17dce097810e4507a9feae1675ff486260657a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121698 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-06ofz#47268 Integer-overflowCaolán McNamara
Change-Id: I263f206ce677c9ee1b198ee08f4461272b4adc04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133931 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-06Related: tdf#148433 use a slightly different cursor directional indicatorCaolán McNamara
make the rtl/ltr direction arrow equilateral and typically a little larger Change-Id: I9b233b76380865052b2112fda47009ae08c306af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133925 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-06Remove duplicated includesAndrea Gelmini
Change-Id: I137707aaad44ffe42bb4b234a59ff69e4b2ecaa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133884 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-05-06tdf#103954: Z compressed graphic formats support for EMF/WMFofftkp
- Added .emz and .wmz file opening support - Added a function to check for Z compression that all z comp. formats can use - Added 3 unit tests for emf/emz/wmz files and the example files have been checked with a different tool (File Viewer 4) - emf/emz file detection changed from magic byte checking to extension checking, like wmf/wmz does Change-Id: I3e433fd23d18482648a51cd04b8f467368e97b62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132456 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-05ofz#47241 don't use hardcoded SalLayoutFlags::BiDiStrong mode for fuzzingCaolán McNamara
getting different results vs the real world wrt glyph caching, go back to normal and try a different approach when timeouts return Change-Id: Ifb335888615b82c9bea83bd19a1cabcf8660dc74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133909 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-05tdf#148771 in scrollable dropdowns show some lines before selected entryCaolán McNamara
and don't just position with the selected entry at the top so it's quick to pick preceeding adjacent entries Change-Id: I20103200c34037fb02b3c0dcc29d154c1197549d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133893 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-05loplugin:unusedvariableplusNoel Grandin
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05vertical text test fails with latest harfbuzzCaolán McNamara
with font "Droid Sans Japanese" which doesn't seem to be available in ci, but is by default in the Fedora 37 build roots I suspect since: https://github.com/harfbuzz/harfbuzz/issues/537 Change-Id: I23d9415444668ce379765f32a96ed67f057ebfd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05Just use Any ctor instead of makeAny (Linux, sequel)Stephan Bergmann
Change-Id: Idcf537a838bb0e47cfa31db8bc09e477b277ee37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-05use more string_viewNoel Grandin
found by examining the call sites of OString::getToken which means I needed to add a new o3tl::equalsAscii function Change-Id: I7dc0ea1cf5ce8090a708d44f2cf7c938fa200c5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04remove unused layout callLuboš Luňák
I should have removed this in bfb6a42e26de28d88ced43eb3a2c63ce323. Change-Id: Ieb4b5fabcc1eecf82dbacef66bef8288b6c51761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133815 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-04reduce string conversions in jsdialog::ExecuteActionNoel Grandin
Change-Id: Id1b908e06ebaa7f6ba5981abff51584623770215 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04ofz#47199 AbortCaolán McNamara
Change-Id: I5e18242b3a18f0c9ca1891ab4e29bd43aaab1f26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133811 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-04Related: tdf#131725 match the basegfx translation to the mirror logicCaolán McNamara
that is used in the traditional code path, this will fix vcl RTL scrollbars in otherwise LTR UI Change-Id: I1451f7e17b93b0339ded6d33147df6415274ebfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133780 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-04use more string_view in unotoolsNoel Grandin
Change-Id: Id10d68f2eb016671be6842dfaa82909207b0708d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Related: tdf#131725 if SvTreeListBox RTL set, set scrollbars to matchCaolán McNamara
so if we have a RTL SvTreeListBox in a LTR environ then we get RTL scrollbars Change-Id: Ia9aaab81f273e31c61cfe4fd4e138709414ad599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133778 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>