summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2018-08-20FindBestFontFace can take FontSelectPatternAttributes insteadCaolán McNamara
Change-Id: I96d4a69c8530b9a80f6110666f4cc841f1812e23 Reviewed-on: https://gerrit.libreoffice.org/59319 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20tdf#118994 JAWS has no access to accessibility objectsIlhan Yesil
According to the MSDN, lParam must be cast to DWORD when examining WM_GETOBJECT messages on 64-bit Windows. The MSDN example also casts wParam, so in this solution, lParam and wParam are cast to the appropriate types sal_Int32 and sal_uInt32. Change-Id: I1edc00778c7da91d2baf5784e4c3f8c441e42eab Reviewed-on: https://gerrit.libreoffice.org/58312 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-08-20can use FontSelectPatternAttributes hereCaolán McNamara
Change-Id: I7702c8a763ff9c624ef9c64f80c3e8457a027d40 Reviewed-on: https://gerrit.libreoffice.org/59324 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20uselessmatch can take FontSelectPatternAttributesCaolán McNamara
Change-Id: Ic441d8795133b0332011ce8d19fcc9f644046dda Reviewed-on: https://gerrit.libreoffice.org/59321 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20make PhysicalFontCollection::Close return std::shared_ptrCaolán McNamara
Change-Id: Iefa9df1d40c11cc56831467a03e0274475c50ed1 Reviewed-on: https://gerrit.libreoffice.org/59327 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20IsBetterMatch just uses FontSelectPatternAttributesCaolán McNamara
Change-Id: I5d0ca9059bc5717b345332e18ef983db982a2966 Reviewed-on: https://gerrit.libreoffice.org/59316 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20TODO: refcount ImplFontListCaolán McNamara
Change-Id: Ie125f1ac9c14a41e25c3e54beafca2f9e34e4c6f Reviewed-on: https://gerrit.libreoffice.org/59310 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20FindMetricCompatibleFont can take FontSelectPatternAttributesCaolán McNamara
Change-Id: I2a42c469d2ab009c5823fc654912fd20c649d2df Reviewed-on: https://gerrit.libreoffice.org/59323 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20these just use the base FontSelectPatternAttributesCaolán McNamara
Change-Id: I0c5ffe571c2cf37ec7d20d4d3ae965227cd72b7e Reviewed-on: https://gerrit.libreoffice.org/59314 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20TODO: refcount ImplFontCacheCaolán McNamara
Change-Id: Ia4499c2a1515aebaff9edf0e843fc66c7fb1414e Reviewed-on: https://gerrit.libreoffice.org/59309 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20tdf#118786 WIN allow nested SendMessage callsJan-Marek Glogowski
This bug trips "assert( !pInst->mbNoYieldLock )". There is already a special case, introduced in commit 4baec725e0dc ("WIN run main thread redirects ignoring SolarMutex"), to prevent tripping the assert for a nested SendMessage call. So this implements a general solution for nested SendMessage calls. We just have to prevent yielding in a call from an other thread, as the sending thread still owns the SolarMutex. This way we can also drop the special handling in WinSalFrame::ReleaseFrameGraphicsDC. Change-Id: I7024b081b26f3545af12a3a3a038fe5e5671af3c Reviewed-on: https://gerrit.libreoffice.org/59275 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-20return weld widgets by std::unique_ptr from builderNoel Grandin
Change-Id: I20c007b13dae2d1155034711ad1ad48bfdfd0ba8 Reviewed-on: https://gerrit.libreoffice.org/59288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-19tdf#112166 need to check if glXCreateContextAttribsARB really existsCaolán McNamara
checking the glXCreateContextAttribsARB function pointer will just return the epoxy_glXCreateContextAttribsARB stub which always exists. Change-Id: I740cc680082102c1f9712cf5cc083e92b26f8865 Reviewed-on: https://gerrit.libreoffice.org/59300 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-19tdf#119321: fix appendCopy in searchAndReplace (printing)Julien Nabet
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=cd66852f6dd08631a25d15a1527a647e69ab8ce3 Change-Id: Iea4b21647dd01406271f9b3e13fea3cc73e1c801 Reviewed-on: https://gerrit.libreoffice.org/59303 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17a11y: Use ATK "footnote" roleSamuel Thibault
instead of "comment" which is less precise. Change-Id: Icca55a3c440748f311d896aac648a7a6d89f3bc4 Reviewed-on: https://gerrit.libreoffice.org/58763 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-17fix crash on Windows on assert enabled buildsNoel Grandin
regression from commit 9cceba9a928cf3b3447f293020be2fe76c035ed5 make DBG_TESTSOLARMUTEX available in assert builds Change-Id: Ifbedc3c16f341a12ba026fc598fb5386da91c50c Reviewed-on: https://gerrit.libreoffice.org/59245 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17loplugin:overrideStephan Bergmann
Change-Id: Id884bdd1f1b5314df05b4d8839b13922f19f01cb Reviewed-on: https://gerrit.libreoffice.org/59236 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-17loplugin:useuniqueptr in ImplSalBitmapCacheNoel Grandin
and dramatically simplify Change-Id: If0947125cd599ca5e2d5a9dc5974a646d4bca605 Reviewed-on: https://gerrit.libreoffice.org/59222 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17loplugin:redundantfcastStephan Bergmann
Change-Id: Ife2d609403c753b917f29fa00bc5f5f1a520503d Reviewed-on: https://gerrit.libreoffice.org/59238 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-17loplugin:cstylecastStephan Bergmann
Change-Id: I36ffe5952e4ca930ed51fa547611ce4c7a51e1d7 Reviewed-on: https://gerrit.libreoffice.org/59237 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-16vcl: use SalLayoutGlyphs, not SalLayout for pre-computed layoutMiklos Vajna
This means that the pre-computed glyph ids and positions are usable with multiple dx array or draw base. So the amount of cached data is smaller, but it can be used in more situations, most importantly Writer's SwFntObj::DrawText() use-case (which does GetTextArray() followed by a DrawTextArray(), with different dx array arguments). Change-Id: I3bcd1b7a015c2cf9921efa0f3f355f2c627fb652 Reviewed-on: https://gerrit.libreoffice.org/59207 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-16tdf#117797 guard access to mpSwapFile as it may not be setTomaž Vajngerl
Change-Id: If45257293e997bc4540b97fbbe5f1f4b77a48b69 Reviewed-on: https://gerrit.libreoffice.org/59202 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-08-16PDF export: allow API users to opt in for version 1.6Miklos Vajna
Don't make it the default yet, though. Change-Id: Ida56eb25a84bf5425d4879c062c084bb68984d9a Reviewed-on: https://gerrit.libreoffice.org/59180 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-16vcl: support pre-computed glyph items in OutputDevice::ImplLayout()Miklos Vajna
This allows using the SalLayoutGlyphs obtained from GenericSalLayout::GetGlyphs() to return early in GenericSalLayout::LayoutText(). Change-Id: If3a004f983f3578915786668bfcada00227d2eeb Reviewed-on: https://gerrit.libreoffice.org/59169 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-16skip text layout when fuzzingCaolán McNamara
Change-Id: I4d1c0ce31c4bfde0c1c681235868f6e5484fb561 Reviewed-on: https://gerrit.libreoffice.org/59174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-16vcl: introduce a SalLayoutFlags::GlyphItemsOnlyMiklos Vajna
OutputDevice::ImplLayout() does a number of things: first it calls the expensive SalLayout::LayoutText(), then it does a number of remaing tweaks to the resulting SalLayout based on the rLogicalPos and pDXArray parameters. This means that the resulting layout is not easy to reuse for Writer purposes, as it typically operates with the same text multiple times, but with different LogicalPos/DXArray. Add a new flag that returns the glyph items early, with the hope that this way the result only depends on the output device state and the string only, nothing else. Change-Id: I7c4a23d0f230495c8ba0ebbd1cfc3421e4a6e43c Reviewed-on: https://gerrit.libreoffice.org/59159 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-15tdf#119276 Fix loading of images with internal LO URLsTomaž Vajngerl
Change-Id: I30556aba4490bef7f4a6e6b3899cc05f4b6a06d4 Reviewed-on: https://gerrit.libreoffice.org/59104 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-08-15vcl: allow using pre-calculated layout in OutputDevice::DrawTextArray()Miklos Vajna
I plan to use this in SwFntObj::DrawText(). Change-Id: Ic5e167d90a7e72452d8efa9fad06b8067675a225 Reviewed-on: https://gerrit.libreoffice.org/59108 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-15a11y: Fix EDITBAR atk nameSamuel Thibault
ATK_ROLE_EDITBAR's nick name is actually "edit bar" (special-cased in atkobject.h) Change-Id: Icd4767d3513c7a5ad1774357d026922d74a42f90 Reviewed-on: https://gerrit.libreoffice.org/58762 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-08-15loplugin:useuniqueptr in GlyphCacheNoel Grandin
although I rather suspect these FreetypeFont objects would be better held by rtl::Reference Change-Id: I1a7d6ca47d1f78686637368a4bec57b1fcfaa6e9 Reviewed-on: https://gerrit.libreoffice.org/59020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in FreetypeManagerNoel Grandin
Change-Id: Idf8f843f2740bc20e6b0877b62dbfc778e31acd8 Reviewed-on: https://gerrit.libreoffice.org/59018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in PhysicalFontCollectionNoel Grandin
Change-Id: Id0a6a44848541968e9084a198366accda9c1149a Reviewed-on: https://gerrit.libreoffice.org/59017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in TilingEmitNoel Grandin
Change-Id: Idf591f6d8557f1477eec4f8d69358ff41d9acff3 Reviewed-on: https://gerrit.libreoffice.org/59016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14Resolves: tdf#119251 parse non-default units in user inputted valuesCaolán McNamara
Change-Id: I28f8338f5c318f2228b742e2e171d53820cb0cc8 Reviewed-on: https://gerrit.libreoffice.org/58984 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14tdf#116542 a11y: introduce STATIC roleSamuel Thibault
This should be used for brief non-editable text which is not meant to have a relation with another object (as opposed to text or label). Change-Id: I46bfa56042a51295e9fa0d332babdbb40668ff0b Reviewed-on: https://gerrit.libreoffice.org/58734 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-14mml needs pdffilter tooCaolán McNamara
Change-Id: If5faadee3504d88df8584850905d3b3de46c0328
2018-08-14create appendCopy method in OUStringBufferNoel Grandin
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13Fix typosAndrea Gelmini
Change-Id: I0bcdff1d355f374e9922cf3f318a88f01af86f4f Reviewed-on: https://gerrit.libreoffice.org/58929 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-13loplugin:includeformStephan Bergmann
Change-Id: I7c927bb46ce411138069f7c64a5036ce07077ced
2018-08-13vcl opengl windows: fix error handling in tryShaders()Miklos Vajna
Both of my GPUs failed to start with GL enabled in an enable-symbols build, but they were fine in a dbgutil build. It seems the problem was that in case CHECK_GL_ERROR() expands to an error reporting code, then we already correctly checked the error of the last GL call at the end of tryShaders() -- but in case it expanded to nothing, then previous (unrelated) errors signaled that shader compilation went wrong, even if it did not. Given that we have error handling right before glDeleteProgram(), clear the GL error queue before calling glDeleteProgram(). Change-Id: If58188d06a0b7009a71af82c476b5aa77823d9b0 Reviewed-on: https://gerrit.libreoffice.org/58852 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-12tdf#119133: Fix initial file and folder selectionKatarina Behrens
what d7fc00e1f7ab7a44e6102a and 1af4ab72e2488515fcaede already does for kde5 Change-Id: I924bdc5cfd6a12ff7bdbeef36d606c03307cb99b Reviewed-on: https://gerrit.libreoffice.org/58832 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-12Finally remove non-native menu barKatarina Behrens
Change-Id: I4758bc5afa9f9eaced7763b9923250f27df14259 Reviewed-on: https://gerrit.libreoffice.org/58834 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-12Revert templatization of Qt5Widget classKatarina Behrens
it was not a step in the right direction in 1st place. We distinguish between main window frame (QMainWindow) and everything else (QWidget) differently now Change-Id: I331c9760f7616b2f199e63e5e521df74b08acc62 Reviewed-on: https://gerrit.libreoffice.org/58853 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-12Set Qt5Widget to be a central widget of QMainWindowKatarina Behrens
this is meant to solve the problem of native menu bar overlapping w/ non-native, as well as the inability to place an object or select text dragging the mouse cursor w/ LMB pressed Change-Id: I29f590ebf79d1ecc7e17b402125384cf13774bf3 Reviewed-on: https://gerrit.libreoffice.org/58171 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-11set copy_paste_error to false rather than intentionalCaolán McNamara
Change-Id: I152482ef594c286d3c2a94cab62feff49bbf79fa Reviewed-on: https://gerrit.libreoffice.org/58884 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-10vcl: separate SalLayout from the rest of sallayout.hxxMiklos Vajna
This way SalLayout can be created separately (and potentially reused) outside vcl as well. Don't reformat the moved code, so git blame keeps working. This is a first step towards the goal of <https://wiki.documentfoundation.org/Development/Budget2017#Text_layout_performance>, in the context of code outside vcl. Change-Id: I8b40313b5fa531d3b56c153cbc4b5ca3cec8f8df Reviewed-on: https://gerrit.libreoffice.org/58851 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-10vcl text layout: return early for empty stringsMiklos Vajna
It seems the only side effect of GenericSalLayout::LayoutText() is push_back() calls on m_GlyphItems, which doesn't happen for an empty string input, so it's safe short-circuit this case. Change-Id: Ia6e2865117bca60573e2874f11d3742413e9df4b Reviewed-on: https://gerrit.libreoffice.org/58850 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-10vcl statusbar: fix last non-use of pre-calculated layoutMiklos Vajna
Use it in the offscreen rendering case as well. Layout calls are visible by logging the invocations of GenericSalLayout::LayoutText(). Change-Id: I9157aa56d22b6c0cee71cdaeca4d61d1c673c79e Reviewed-on: https://gerrit.libreoffice.org/58831 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-10shrink scrtf fuzzerCaolán McNamara
Change-Id: I977636eff8a2962ca248287f8733422d635f8559 Reviewed-on: https://gerrit.libreoffice.org/58833 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>