summaryrefslogtreecommitdiff
path: root/vcl/win
AgeCommit message (Collapse)AuthorFilesLines
2015-12-17tdf#95648: Erase the OpenGLCompatibleDC to white before drawing text into itTor Lillqvist2-7/+13
For some reason this is needed in the case of GraphiteWinLayout and OpenGL. Otherwise when a space glyph is "drawn" into a space that is wider than the nominal width of the space glyph, we get two black rectangles surrounding the white space "glyph". Change-Id: Ifb4ea00d9e5f078518ac97d7dd18694088aa1cdf
2015-12-17remove newly unused WB_NEEDSFOCUS and fragile FLOAT_FOCUSABLECaolán McNamara1-2/+2
Change-Id: Idce03318fbc01039a6c0638879785607970993c0 Reviewed-on: https://gerrit.libreoffice.org/20746 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-12-15Get rid of :: prefix for basegfx in include/vcl and vclTor Lillqvist4-6/+6
We already used it without the :: prefix, in many cases in the same files even. It is nice to have some consistency. I was not bored enough to do it everywhere. Change-Id: Ic8ac5bd9b4b2c02c41e5ea937a3d9477824f21cf
2015-12-15tdf#96119 Cannot select item with mouse in any combobox / drop down menuJuergen Funk1-0/+29
this commit has make the problem, the removing of the SALEVENT_MOUSEACTIVATE commit dd351dd728687cffe432ce0ec9367ceb80e097fb Author: Noel Grandin <noel@peralex.com> Date: Tue Nov 24 08:50:39 2015 +0200 loplugin:unusedfields in vcl/ and remove the unused SALEVENT_MOUSEACTIVATE stuff Without of there, when click in the opened list-box it send first the "PreNotify" with "MouseNotifyEvent::LOSEFOCUS" and that close the listbox. After that, it send the mouse-event to a closed window, that is the reason why the Listbox not get the mouse-click. With this patch, first send the mouse-click and then the "PreNotify" Change-Id: I5a09b1524335434f043d22bc71f7e38559fb1c0b Reviewed-on: https://gerrit.libreoffice.org/20708 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-14Fix drawTransformedBitmap for NULL pAlphaBitmap.Michael Meeks1-1/+1
Change-Id: Iff1a0eb8e4b112b874813023551a797320ac0ad5
2015-12-13Blind fix for TB Win64DbgJulien Nabet1-1/+1
Regression from http://cgit.freedesktop.org/libreoffice/core/commit/?id=1321ae8ceba1801cd75322d6cf51ab53bac86b2a Change-Id: Iba9e9560e34d9107787d117a7cfff82349b7f933 Reviewed-on: https://gerrit.libreoffice.org/20680 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2015-12-12check in dbg if we use correct SalBitmap instance that we expectTomaž Vajngerl1-0/+15
Change-Id: If1f176291304d2ef401bfb65c73ebf6635f0e756 Reviewed-on: https://gerrit.libreoffice.org/20668 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2015-12-12tdf#94851 quick fix for drawBitmapTomaž Vajngerl1-4/+4
Change-Id: Iffc0c9b2215c85760856ab876fa6e04613cb4200 Reviewed-on: https://gerrit.libreoffice.org/20662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2015-12-12tdf#94851 check SalBitmap & convert in all drawBitmap methodsTomaž Vajngerl1-12/+38
Change-Id: I040dd62737237ad7e016201a798ee42e27853556 Reviewed-on: https://gerrit.libreoffice.org/20656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2015-12-11tdf#94851 can't use OpenGLSalBitmap with WinSalGraphicsTomaž Vajngerl1-1/+31
Printing is done with the WinSalGraphics and not with WinOpenGLSalGraphics on Windows even when OpenGL is enabled, but the SalBitmap is still using the OpenGLSalBitmap which can't be used with WinSalGraphics. So detect when the implementation of SalGraphic is "wrong" and convert. Change-Id: I99cd6b6403e9bd42d6f5b7d7cb07f48588c17ab8
2015-12-07Do turn on GL_BLEND for the GLyphy crackTor Lillqvist1-1/+32
That is what GLyphy's demo_glstate_setup() does, and it does seems to help a bit. Change-Id: I03703def86558a8689c427bcbb62cd218b9a111f
2015-12-07tdf#96070: Just give up on glyph caching for non-horizontal textTor Lillqvist1-1/+2
Change-Id: I60f54523f927e97d739a4c735e54b2cc3400aff3
2015-12-06unused vcl::IsWindowSystemAvailable Juergen Funk1-9/+0
Change-Id: Ie903a6fe3237319661662c0533c23528766ffd08 Reviewed-on: https://gerrit.libreoffice.org/20404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2015-12-04Wingdi RGB macro handling improvedAshod Nakashian1-2/+0
Improved the isolation of windows headers. Specifically, RGB macro is better handled now. Change-Id: I0eeea16d0de9da3455810c80b0715f7b54ae8c3f Reviewed-on: https://gerrit.libreoffice.org/20039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-12-02Get rid of a superfluous directory levelTor Lillqvist92-0/+0
Change-Id: I79e065f0c68b149d2ef69f428d31e36e97a6098b
2015-12-01tdf#95194: We need to set the GF flags in UniscribeLayout::GetNextGlyphs()Tor Lillqvist2-0/+6
The old SimpleWinLayout::GetNextGlyphs() did it. PDFWriterImpl::drawVerticalGlyphs() expects GF_ROTL etc to be set when necessary for vertical text when exporting to PDF. Change-Id: I325d6e9f75a3bc51f24add33dd3bffe7b3c7bee0
2015-11-28-Werror,-Wunused-functionStephan Bergmann1-73/+0
Change-Id: Id149af78312b205fbf14f0c2438dd4ad741f49ab
2015-11-28Don't wrap glyphy source files in namespace GLyphyDemoStephan Bergmann1-23/+23
...as the source files themselves include standard headers, which must not be included from within a namespace (which confuses clang-cl). According to Tor, the original intent was to try not to pollute the global namespace, but that seems to cause no problems in practice (esp. as nothing from these files gets exported). Change-Id: I204c1db932996a09d16e84dd5c6033caa5362caa
2015-11-28Adapt to true wchar_t in clang-clStephan Bergmann1-1/+1
Change-Id: I1ad03056497f39ca294a8abaffd7e069227a704e
2015-11-28-Werror,-WreorderStephan Bergmann1-2/+2
Change-Id: Ie05ae7b82c59c7ab27f549210ac305e2cd38b68c
2015-11-28-Werror,-Wunused-variableStephan Bergmann1-24/+0
Change-Id: Id43e2269b3e81fd7505daab7a5dc0cfe83427ff3
2015-11-28-Werror,-WswitchStephan Bergmann1-0/+3
...5 enumeration values not handled in switch: 'Fax', 'PDF', 'ExternalDialog'... Change-Id: I9310d728ad076135bcc9dc96ff83ce606d5320a2
2015-11-28-Werror,-WreorderStephan Bergmann1-1/+1
Change-Id: Ic84f8b35661f52949f29ea491dd5e7b3faebe37c
2015-11-25vcl: SalEnumFontsProcExA is unused since 2010Michael Stahl1-70/+0
Change-Id: Id1b1de27752a6b8a74ea3521b53c38f032bfa24b
2015-11-25Remove code that has been commented out since 2003Tor Lillqvist1-2/+0
Change-Id: I5975af2801560c61ca72ab25f5d1222cf847c4e3
2015-11-24Bin outdated #if and unnecessary <config_mingw.h>Tor Lillqvist1-4/+1
We don't support cross-compiling with MinGW currently, and in any case if we ever attempt such again, in the meantime the free replacement Win32 headers most likely have been updated to include the SCRIPT_CONTROL::fMergeNeutralItems field, so no conditional compilation is needed. Change-Id: I38701d6c41c44952466c1ece7c8433abe67642be
2015-11-24Replace return boolean from DoYield with pleasant enumeration.Michael Meeks1-6/+8
Change-Id: I1b1f885b4d7916a18dfb2457a8e9af9a5b4ae6e4 Reviewed-on: https://gerrit.libreoffice.org/20138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-11-24loplugin:unusedfields in vcl/Noel Grandin1-29/+0
and remove the unused SALEVENT_MOUSEACTIVATE stuff Change-Id: Ieb85872eca68621c6a7be47ff5dbea12f7690507 Reviewed-on: https://gerrit.libreoffice.org/20140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-23VirtualDevices either match another device depth, or are 1 bitCaolán McNamara1-3/+0
cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara1-1/+15
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-23Update-check, expand to allow reporting of H/W and OS versions.Michael Meeks1-2/+38
Off by default. Expand config options to show the user agent used. Re-use this to show more useful info in Help->About too. Change-Id: I1044116ef9beeb341a537c0f4451dca54e198f67 Reviewed-on: https://gerrit.libreoffice.org/20098 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-11-20loplugin:sallogareasStephan Bergmann1-1/+1
Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
2015-11-19Make using GLyphy optional at run-timeTor Lillqvist2-22/+409
Change-Id: I7053f16c25f5506d15ebc88f1b0465493dd35077
2015-11-19Use GLyphy for text on Windows (broken)Tor Lillqvist1-308/+191
Work in progress. Produces visible text in some cases, but not nearly all. The text that is visible is roughly in the right place and of the right size, but horribly ugly. Compare to glyphy-demo, which does produce beautiful text, so the problem is not in the GLyphy code but in the way we use it. Include sources from GLyphy's "demo" directory (with only slight modifications to avoid unconditional debug output) and use that "demo" API from vcl. The changes to existing vcl code are all in one place, in the winlayout.cxx file. Change-Id: I69cce5d66db534c6f4c1ab85d520b6090baf8fe0
2015-11-19Add ImplFontMetricData::mbTrueTypeFontTor Lillqvist1-0/+1
Indicates that the font truly is a TrueType one (FT_IS_SFNT in FreeType, TMPF_TRUETYPE in Win32). Change-Id: Ic9dbf5e5239ae2ca597c454091fc36073a3b19cc
2015-11-19vcl: reorder loop to avoid DrMemory warningMichael Stahl1-1/+1
DrMemory 1.9.0-4 32-bit complains about UNINITIALIZED READ on the instruction "test %ecx %ecx" corresponding to the *pW test in the while loop, on the last iteration. GetKeyNameTextW() is documented to null-terminate the buffer, so either it has a bug and doesn't do that, or DrMemory has a bug and falsely reports an error. Either way it can be avoided by checking the end position first. https://github.com/DynamoRIO/drmemory/issues/1819 Change-Id: I546d2057d39865d527c1d7c436f690669b214d75
2015-11-18com::sun::star->css in vcl/Noel Grandin4-10/+10
Change-Id: Ifad76177673cf93746ba221838be80ff76fed228 Reviewed-on: https://gerrit.libreoffice.org/20032 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-17vcl: These can be static assertionsTakeshi Abe2-16/+9
Change-Id: I220ae4732f221c7798f162653cad01717afb659f Reviewed-on: https://gerrit.libreoffice.org/20011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-17vcl: add parameter to detect if OS events are processed during Yield.Michael Meeks1-3/+6
Intended as a non-functional change. Change-Id: I1915aad03786540da1a4bfe9031d33f2c2a9b4e3 Reviewed-on: https://gerrit.libreoffice.org/20006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-11-16tdf#94008 Crash opening password protected file - CJK UITakeshi Abe1-1/+1
This fixes a buffer overflow writing over the end of pCaretXArray, which can happen e.g. when drawing mnemonics in the password dialog. Based on a similar calculation of nCurrIdx found in GenericSalLayout::GetCaretPositions(). Change-Id: I7d723cf8cfaeb66f340c7d9ea5b3bc728c6d6209 Reviewed-on: https://gerrit.libreoffice.org/19385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-12tdf#95761 All Hotkeys with CTRL+ALT+ not workedJuergen Funk1-8/+3
The problem was always masked out the combination ALT+CTRL, this only needed when press the ALTGR key, but the other ALT-Key (left side) is valid. Change-Id: I8a6f953f519627418fb48ee8d1d68b3cbf797250 Reviewed-on: https://gerrit.libreoffice.org/19923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-12Windows header sanitizationAshod Nakashian3-14/+7
Isolation of windows headers using prewin.h and postwin.h headers and making headers dependent on them more self contained. Conversion of TCHAR to WCHAR and LPCTSTR to LPCWSTR etc. and cleanup of unnecessary casts. Change-Id: I7eff5c477d9223a064bfb4d962ff6d61960ee69c Reviewed-on: https://gerrit.libreoffice.org/19901 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-10tdf#95650: Replace wrong assertion with conditionMike Kaganski1-2/+2
When UniscribeLayout::LayoutText(ImplLayoutArgs & rArgs) is run with BiDiRtl flag, and some skipped VisualItems was reversed in lines 908-927, it's possible that they will arrive in reverse order to the code adjusting mnSubStringMin, so this assertion may fire. This situation is not erroneous, so simply replacing the assert with "if". Change-Id: Icb244502dd00b4c08a2c5192369ee66d743b0dcc Reviewed-on: https://gerrit.libreoffice.org/19835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-10-30tdf#93684 - Remove SalFrame::SyncRyan McCoskrie1-5/+0
Change-Id: Icae9cf0a17f9cdf9a671c7e7278019d6980602b1 Reviewed-on: https://gerrit.libreoffice.org/18453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-30vcl: This is a constantTakeshi Abe1-1/+1
Change-Id: Id87952a5eafa6c4ddf2d58b694cadf1fbf5c45a1
2015-10-28vcl: This is constantTakeshi Abe1-1/+1
Change-Id: I27a83996031b9494ad736ad82a7fff5740fbaf30
2015-10-27loplugin:unusedmethodsNoel Grandin1-1/+52
Change-Id: I73180266c0af98dbd8d29bd3b11850996b94def9 Reviewed-on: https://gerrit.libreoffice.org/19195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-22vcl: Free memory by appropriate dtorTakeshi Abe1-1/+1
Change-Id: I863251d742374d0a60820d41fec9d467c9ff4bd4 Reviewed-on: https://gerrit.libreoffice.org/19446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-21tdf#94897: Don't mess up spacing of combining diacritic glyphsTor Lillqvist1-0/+97
At least for the Cambria font, instead of a precombined glyph, Uniscribe ends up using a separate diacritic glyph for some (all?) accented Latin characters. That caused weird layout errors in justified lines when an accented character was followed by space: The diacritic got separated from the base character. Fix that specific case. Be careful not to mess with any other cases. While debugging this I added lots of temporary debugging printouts. Leave some helper functions for that behind, inside #if 0. Maybe we should start collecting such functions, including ones for most common Win32 structs, in some include file in some common location? Change-Id: Ib0198411f820cb8ba8456786869185a43628628c
2015-10-19vcl: Mark it as constTakeshi Abe1-1/+1
Change-Id: Ifc1e9e64f50aa916ef0667796a54a11dec9a0ea8