summaryrefslogtreecommitdiff
path: root/vcl/win
AgeCommit message (Collapse)AuthorFilesLines
2017-04-13tdf#106933 vcl: delete D2DWriteTextOutRenderer before exit()Michael Stahl2-10/+17
As it happens this DirectWrite stuff is using some thread pool internally, and that must be shutdown before exit(), as Win32 will terminate all other threads at that point, and then the thread pool wants to talk to threads that don't exist any more. https://blogs.msdn.microsoft.com/oldnewthing/20120427-00/?p=7763/ So convert this from a global variable that is deleted from DllMain() to a member of SalData, so it is deleted from DeInitVCL(). Change-Id: I51408a07c78758cf0c193ab66b9214d0c9dbd9e3
2017-04-12no need to use OUStringToOString in SAL_INFONoel Grandin1-1/+1
Change-Id: I707e0d72aba89b7e644def6f4c251e14f6599ad2 Reviewed-on: https://gerrit.libreoffice.org/36451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-07tdf#39468 Translate German commentsJens Carl2-2/+2
Translate German comments and terms in dbaccess/, extensions/, formula/, include/, reportdesign/, rsc/, sd/, svtools/, and vcl/ Change-Id: Ie20dadda0eeb0786eb328c6c652287d5481c5e3b Reviewed-on: https://gerrit.libreoffice.org/36249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-07vcl: remove no longer needed WIN_Rectangle()Miklos Vajna3-40/+3
Not needed anymore after commit a5a571307fb3306b74ab46b085cde6388270a770 (tdf#82580 tools: rename Rectangle to tools::Rectangle, 2017-03-30). Change-Id: I25a11ca0b6c2e9e96847bd01b5e82835d1dd4a95
2017-04-06tdf#106960: Fix math scaling on WindowsKhaled Hosny1-23/+0
Remove this leftoever code from 1b7e788eb3bf9cbe56ed5cc4a3fa7fa5e70ac40a which does nothing useful now. Change-Id: Ia7fa888d5687c9da110b44139a8217558a7f641b Reviewed-on: https://gerrit.libreoffice.org/36222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann5-15/+15
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:redundantcast (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Ie096d75c1bc774e77c589845f61276d1478234ef Reviewed-on: https://gerrit.libreoffice.org/36065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:loopvartoosmall (clang-cl)Stephan Bergmann1-2/+1
Change-Id: Ibdfdc5c66cf1e81d9e43c94df31120c476a78572 Reviewed-on: https://gerrit.libreoffice.org/36064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:redundantinline (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430 Reviewed-on: https://gerrit.libreoffice.org/36063 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna5-50/+50
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-28ofz#954 out of memoryCaolán McNamara1-0/+5
Change-Id: Ib27f2dfe0d0837544910208f38a1bc11a35e3cb4 Reviewed-on: https://gerrit.libreoffice.org/35794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-25Fix typosAndrea Gelmini2-3/+3
Change-Id: I623135cd4c76dd6569f4ee521f97dee41de4cb1e Reviewed-on: https://gerrit.libreoffice.org/35660 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-14loplugin:subtlezeroinit (clang-cl)Stephan Bergmann2-8/+4
Change-Id: I34367cad2d07b9fc6c8f4607ee5e74625f12e78f
2017-03-13WaE: Operator precedence is difficult to get rightTor Lillqvist1-1/+1
Fix C4806: '&': unsafe operation: no value of type 'bool' promoted to type 'int' can equal the given constant Change-Id: Iedd54379a67373fb3499a0a780f2cbfc83f08e84
2017-03-13Bin leftover debugging fprintf with reference to some mysterious 'grLog()'Tor Lillqvist1-3/+0
Change-Id: I6b9423db247583ff1dcbd469db5dfab7f89e7457
2017-03-08CIA: unnecessary dllCaolán McNamara2-5/+5
Change-Id: Icbc3eaff000d90885cf85d8195868e1248493896 Reviewed-on: https://gerrit.libreoffice.org/34972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-06Restore "pPos and pGetNextGlypInfo always have the same value"Caolán McNamara1-22/+16
and... "pEraseRect is always null" This reverts commit b398dacbb471913e573e9b0b4cd31d94a9109223. Change-Id: I5e7c07eefff0b6bd39d9ed7492134ea062e90fdf Reviewed-on: https://gerrit.libreoffice.org/34907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-03-05Revert "pPos and pGetNextGlypInfo always have the same value"Caolán McNamara1-17/+22
This reverts commit 7453cb58df4ce434a1252567f961cfe497064aca. and... Revert "pEraseRect is always null" I suspect the problem is the change to D2DWriteTextOutRenderer::operator in 7453cb58df4ce434a1252567f961cfe497064aca aborts during windows tinderboxes CppunitTest_dbaccess_empty_stdlib_save etc This reverts commit 073d920ef5914b5dfe491dbaf7fb18ba56293b85. Change-Id: I372e104bd09e49bcf08306169db9777f2f26fff5
2017-03-04pPos and pGetNextGlypInfo always have the same valueKhaled Hosny1-13/+14
Change-Id: Iec46e0aefff71cbeb2face4f55e5c3a4d6698995
2017-03-04pEraseRect is always nullKhaled Hosny1-11/+5
Simplify the code accordingly and make it return true for success. Change-Id: I661eea739e23b59ebff2573f52036b25ecb5a1ed
2017-03-04SalLayout::GetBoundRect() works just fine hereKhaled Hosny1-43/+9
Change-Id: Idce9a8f374f62bd92756d7391ccca3122c89683e
2017-03-04Drop dead codeKhaled Hosny1-50/+2
We don’t try to render vertical text with DirectWrite any more, so all of this is dead code now. Change-Id: If9f513f6b96fd65d275b9ec46c6e349f1c335bcf
2017-03-04Avoid needless dynamic_cast’sKhaled Hosny1-13/+6
It is all CommonSalLayout() for sometime now. Change-Id: I3d4ad56df195f51242c3d007bc5257c071a03a50
2017-03-03tdf#103831, tdf#100986: Force using GDI when neededKhaled Hosny1-23/+8
Our DirectWrite renderer is incomplete and can’t handle rotated text or text with horizontal scaling, so route these two through GDI for now. Change-Id: I87b85796a29e3acce782e01b4c629fec6f1a9e25 Reviewed-on: https://gerrit.libreoffice.org/34848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-03-02Fix typosAndrea Gelmini1-1/+1
Change-Id: I72db7ff99cde394bc161dfd835bfb0d9a47a53d1 Reviewed-on: https://gerrit.libreoffice.org/34780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20remove unused enumerators from PrinterCapTypeNoel Grandin1-6/+0
Change-Id: Id4f788dfae64e7a9bcde16af2db2ddeafaf6900e Reviewed-on: https://gerrit.libreoffice.org/34468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14Convert WindowType to scoped enumNoel Grandin1-1/+1
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9 Reviewed-on: https://gerrit.libreoffice.org/34219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-13-Werror,-Wunused-macros (clang-cl)Stephan Bergmann1-3/+0
...since 65b7b6322b662785bf032e66c76abc36c9a2bb0e "loplugin:unusedenumconstants read-only constants in vcl" Change-Id: I50b904dfbfecf3400591fadd392e229505c1a97f
2017-02-12VCL: Simplify WinSalInstance::CreateVirtualDeviceArnaud Versini1-8/+2
Change-Id: I26e9823faa53fdbb0ae468f03e40b0a4e5313b49 Reviewed-on: https://gerrit.libreoffice.org/34170 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10Remove MinGW supportStephan Bergmann5-102/+0
In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-09remove ConnectionIdentifierType enumNoel Grandin1-4/+2
since we only use the AsciiCString enumerator. Consequently simplify the GetConnectionIdentifier method Change-Id: I9e1a1318d2f12bfd18edeb8479e0e7171b22d0f1 Reviewed-on: https://gerrit.libreoffice.org/34026 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09convert FontType to scoped enumNoel Grandin1-3/+3
Change-Id: Ieb8f90be8effde5f25bc872784c3ea2177b14bf9 Reviewed-on: https://gerrit.libreoffice.org/34056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09Don’t look for bundled fonts relative to executable path on WindowsKhaled Hosny1-6/+3
Just do like other platforms, so that the fonts are avialble to unit tests since cppunittester is not run from instdir. Change-Id: Ib209473f5b6b07a154fecb430dca45b32e8fa556 Reviewed-on: https://gerrit.libreoffice.org/34048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-02-08loplugin:unusedenumconstants read-only constants in vclNoel Grandin1-17/+0
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2 Reviewed-on: https://gerrit.libreoffice.org/34018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08drop unused enum TTCreationFlagsNoel Grandin1-1/+1
there is only one method using it, and all of the call sites pass 0 Change-Id: I5d71b36cf890fbcf0be9d795756da0cfd61ae309 Reviewed-on: https://gerrit.libreoffice.org/34024 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07tdf#105286 use alternative font when glyph is not vertical.Mark Hung1-2/+26
In vertical layout, a vertical font is selected. For windows, that means prepending a '@' to the font name. Switch back to the one without '@' in order to display characters that needs to be rotated 90 degrees in vertical layout correctly. Change-Id: I4e0361929f898eddc671b739b36a12dd26d68018 Reviewed-on: https://gerrit.libreoffice.org/33064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-02-05sal_uIntPtr to sal_uInt16Matteo Casalin1-2/+2
Change-Id: If463ae457f53a0a8b12cc0748afbc654f54ae3c3
2017-02-02loplugin:useuniqueptrStephan Bergmann2-8/+10
Change-Id: I3a246a22baaac8195dc1b94c42994de7d80e8336
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin1-8/+7
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24loplugin:useuniqueptrStephan Bergmann1-10/+8
Change-Id: I502ebf4024cd9b0ee61d58d6b6a8e342c7ceac08
2017-01-15tdf#105015: Don’t ignore all printer fontsKhaled Hosny1-3/+14
For whatever reason we query printer output device for fonts and for whatever reason GDI will only report fonts from the printer which often in formats we want to ignore. This results in aborting the application when we reject all fonts on the printer! Just special case printer output devices and hope for the best. I think this commit is partially blamed as it is evidenced now that there was a good reason to only abort for window output devices, but I’m leaving this as it is for now: commit ea7102c93c33884a68d4dba0de7d52f8ed4f4579 Author: Chris Sherlock <chris.sherlock79@gmail.com> Date: Tue Mar 25 21:54:20 2014 +1100 fdo#74702 OutputDevice::ImplInitFontList() fails if no fonts on device It makes no sense that ImplInitFontList() only fails for Window instances. I have carefully checked all the functions that use this function, and there are no good cases when no fonts won't cause problems. In fact, we have a number of functions that specifically rely on the fact that ImplInitFontList will populate OutputDevice::mpFontCollection with at least one font. Therefore, I'm making this abort if it can't populate the collection, regardless of whether it is a Window, Printer or VirtualDevice. I have also refactored GetDefaultDevice - I now check the default pOutDev parameter to see if it is NULL (the default), in which case it is referring to the default window, so I call on Application::GetDefaultDevice() instead of going straight to the pimpl data structure used by the Application class. Reviewed-on: https://gerrit.libreoffice.org/33014 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 88d6675a40034fa786efd75cf14175f3c0c83e2e) Change-Id: I3f34ba0cea9f88966ace3a5ef7fac868972ea5ac Reviewed-on: https://gerrit.libreoffice.org/33087 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-01-12Drop unused struct membersKhaled Hosny1-20/+8
Change-Id: I37aea9a2a40ab0e9642709de3b9e935bee9a6a53 Reviewed-on: https://gerrit.libreoffice.org/32986 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2017-01-08Simplify setting Kashida width on WindowsKhaled Hosny2-36/+10
This should also make sure we are getting it from the current font, which the old, convoluted way does not seem to guarantee. Change-Id: If0a4cf18e472b1489115eeb7b1b2bdbb5f13abb0 Reviewed-on: https://gerrit.libreoffice.org/32595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-01-04tdf#97228 Moved class ControlCacheKey in a seperate include file.Huzaifa Iftikhar3-1/+3
class ControlCacheKey defined in include/vcl/salnativewidgets.hxx is used only by vcl therefore it is moved to a seperate include file named ControlCacheKey.hxx which is inside vcl/inc/ControlCacheKey.hxx. This header file contains the definition of the the class ControlCacheKey. Since this class uses an object of another class named Size which is defined in gen.hxx therefore this is included in ControlCacheKey.hxx. All the files that references the class ControlCacheKey includes ControlCacheKey.hxx with the syntax: #include "ControlCacheKey.hxx" Change-Id: I7d7b3e1cf6950a953e6bbed670c1914826b2bacd Reviewed-on: https://gerrit.libreoffice.org/32422 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-02The mfFontScale[n] is always 1.0Khaled Hosny3-23/+15
Change-Id: Ica2e67632f5bfe1f70ba7b2d7502257b47d053ce Reviewed-on: https://gerrit.libreoffice.org/32592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-21tdf#104733: Don't ignore OpenType-CFF fons on WindowsKhaled Hosny1-1/+6
This is a folloup for ef4b9032de55e6b1b182e4ead1bbe6e590df296e, turns out TRUTYPE_FONTTYPE does not cover CFF fonts like I thought (the fonts that I was checking were actually TTF fonts). Change-Id: I2d7b34b625aa03134421dc44a24e3c66be25df98 Reviewed-on: https://gerrit.libreoffice.org/32258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-20Update duplicated / outdated NWS documentationJan-Marek Glogowski1-35/+0
Removes the old, copied NWS documentation blocks from all native implementations and update the parent SalGraphics documentation. Change-Id: I0eff8ea0987c5c841e1b023340b1c3787c09e2ca
2016-12-20try to avoid the annoying focus stealing on windowsMarkus Mohrhard1-4/+15
Change-Id: Ic6d3492a4707f24b616a7dee34a111ba0af4f281 Reviewed-on: https://gerrit.libreoffice.org/32207 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-16tdf#104159: Fix caching glyphs of non-UI fontsKhaled Hosny1-11/+5
Partially reverts "tdf#103725: Fix horizontal scaling on Windows", which didn't work on newer Windows versions anyway. This reverts commit a5750d92b2136d60d698b41ef5760f2efac0ffce. Change-Id: Ia4bb426a21804517d3ec313ab7494ba121c5751b Reviewed-on: https://gerrit.libreoffice.org/32068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-16-Werror,-Wunused-function (clang-cl)Stephan Bergmann1-1/+0
Change-Id: I19292f03c1a28eed8712dc83dc9cc0334c8f45e3