summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2015-08-14limit access to dx array to min of input len and len of arrayCaolán McNamara
i.e. the sal_Int32 nDXLen = std::min<sal_Int32>(nLen, aOldDX.size()); line and its usage Change-Id: Ib0100d2de210a45b340c3a7de6c6dcf2a07443d0
2015-08-13tdf#44388: handle the NULL clip correctly for pdf outputThorsten Behrens
With the rework to use basegfx polygon clipping (a334752), the case 'fully clipped away', aka NULL clip, aka nothing visible, stopped working. Manifests itself as an empty clip polygon, but with m_bClipRegion being true. Explicitely write out as zero-surface clip polygon. i#65128 is related. Change-Id: I57389fcd057d75dfa4e0de9ebb86794437c70b55
2015-08-13rhbz#1247588: Hold UNO objects by css::uno::ReferenceStephan Bergmann
...instead of raw pointer and manual acquire/relase. It is unclear to me why the original code thought it was necessary (or merely "better") to hold by raw pointer; but at least from the backtrace in rhbz#1247588, it seems plausible that UNO method calls through such raw pointers could recursively call into atk_object_wrapper_dispose and make the raw pointer stale. Change-Id: Idc0a4f9e2f7ffe610261c1b7b98ce9c5e040db43
2015-08-13Remove #ifdef ENABLE_TRACING codeStephan Bergmann
...assumming nobody actively uses it for debugging anymore, anyway Change-Id: I097c0cca791a48844550be4c326fa2483a3df231
2015-08-13Add a globally usable WindowsErrorString functionTor Lillqvist
Is comphelper the right place for this? Is having it as "inline" the right way? Change-Id: I973dbde108f89b6cab17e5d88db2390d6f18a672
2015-08-13kill YIELD_GUARD macroNorbert Thiebaud
Change-Id: I81990df584255f4a286cd078bcf15917c00ad504 Reviewed-on: https://gerrit.libreoffice.org/17687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-12another avoid endless loop with busted wmfCaolán McNamara
Change-Id: Ie4068fdc1e54e0ad3e55354938a4c5e1459e7fe0
2015-08-12cosmetic: clean-up vcl/quartzNorbert Thiebaud
Change-Id: I6f15e7ce90598eb4f8e7bb59c7c65d1aa333b972 Reviewed-on: https://gerrit.libreoffice.org/17661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-12WaE: 'rArgs' : unreferenced formal parameterTor Lillqvist
Change-Id: Ia41882a4d33e7b148044801902517b2b034d3ee4
2015-08-12Drop SimpleWinLayoutTor Lillqvist
Use Uniscribe also for non-complex text. It is complicated enough to have separate Graphite and Uniscribe layout engines. Will make further changes to the code easier to manage, especially as with the UniscribeLayout code we have access to the actual glyphs. (Cf. 3e47219e06b9a279ba22a9bbef668731f2d3e07d) Change-Id: I9c67c172fe3e3d26d1c6cb1c0b7f1516b0b87f12
2015-08-11tdf#93364 vcl rendercontext: fix area that is painted in PaintBuffer()Miklos Vajna
Usually the topmost window of a paint hierarchy has a paint rectangle that covers the paint rectangle of all its children, but this is not necessarly true in every case. One example is the cursor travelling described in the bug report, where the topmost DockingAreaWindow only paints a few buttons on the toolbar, and then even if children are painted correctly to the frame-level persistent buffer, only the DockingAreaWindow part of the buffer is copied to the screen. Fix this by building an union rectangle that covers all areas in a buffered paint run, and then paint that rectangle from the buffer, not just the paint rectangle of the topmost parent. Change-Id: Ib0b30413d83c4b3fdec27fa7ddad16c21fd094b6
2015-08-11loplugin: defaultparamsNoel Grandin
Change-Id: I79a889c68e91712d2abdacc559c78813f730e623
2015-08-11vcl: add SalFrame / SalVirtualDevice doxygen commentsMiklos Vajna
Change-Id: I0c2a9a5b4266ee0f0d15b7cbfa49f898930d002a
2015-08-10tdf#92982 vcl rendercontext: simplify Edit::ImplClearBackground() logicMiklos Vajna
This fixes the vertical rendering artifacts visible on the bug screenshot with the oxygen-gtk Gtk theme, and also is a lot simpler than what we did here before. Change-Id: I21a167452f14ae52bd0d899b3ed467ce40540dec Reviewed-on: https://gerrit.libreoffice.org/17631 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-08-10SimpleWinLayout::mbDisableGlyphs was always trueTor Lillqvist
Remove dead code. Should have no effect on behaviour. Possibly originally the intent was that mbDisableGlyphs would have been false in most cases on NT-based Windows (all versions that we support now). However, since dadfc60873d4dce4e0c46e1d3405f8d45535cdcf, in 2005, mbDisableGlyphs was set to always true in the SimpleWinLayout ctor. Change-Id: Id929224d5656706762c2f44ee26c76f8b20ee8b8
2015-08-10tdf#93325 ImplAnimView rendercontext: stop painting animgifs directlyMiklos Vajna
Change-Id: I34fb235a2e44eb510a630fb8dbcc2ec68cf96b79 Reviewed-on: https://gerrit.libreoffice.org/17624 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-08-10tdf#93325 ImplAnimView: handle rendercontextMiklos Vajna
Stop accessing mpOut directly, always go via an explicit vcl::RenderContext. Change-Id: I742b63e0db529d1829d2339c213a0b900f727728
2015-08-10Add missing SAL_OVERRIDEsTor Lillqvist
It is really ugly to use SAL_OVERRIDE inconsistently. Change-Id: I8b556a9cc65e6f71198d126d07ce1559216543e9
2015-08-10Avoid some ugly and pointless initial double colonsTor Lillqvist
Change-Id: I0d0cb1ef1e7b7f4747204b84c7c910f174e9c7b5
2015-08-08gtk3: name CLIPBOARD and PRIMARY with different namesCaolán McNamara
Change-Id: I4b8f36931f7ee19fe774a735a6d36ecd91de47ef
2015-08-07gtk3: it was pointed out to me we have up and down reversedCaolán McNamara
by jrb, oops Change-Id: Id722533edae72d4849129e339bd6cca265d3c35c Reviewed-on: https://gerrit.libreoffice.org/17577 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-07Resolves: tdf#92982 vcl rendercontext: handle buffered paint of vcl::CursorMiklos Vajna
Instead of painting on the vcl::Window directly, take a PaintBufferGuard, and use the vcl::RenderContext of it, that may be either the vcl::Window or the toplevel frame's buffer. Trigger the paint of the buffer by informing the guard what area was painted. In case of direct painting, both the ctor and the dtor of the guard is a NOP. This means that finally we can also assert Invert() calls on the output device, so that direct paint can't happen when double-buffering. Change-Id: I0322563369dc63b3c49061cbe7c4a911cb13a2e2
2015-08-07tdf#92982 vcl rendercontext: move buffer paint logic to PaintBufferGuardMiklos Vajna
The motivation is that this way vcl::Cursor will be able to reuse it. Change-Id: I7e89d5acb5d63d3297d7c3c8050ccd2172c8608d
2015-08-07tdf#92982 vcl rendercontext: make PaintBufferGuard visible outside paint.cxxMiklos Vajna
Change-Id: I4bafba3d99fc45d6d5fa875a91d498518d3a0c29
2015-08-07Resolves: tdf#93198 gtk3: support PRIMARY as well as CLIPBOARDCaolán McNamara
Change-Id: Ia8c7da1e321f363efee2d60b29078b35fcbe1dcd Reviewed-on: https://gerrit.libreoffice.org/17570 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-07opengl: cache native widget textures also for WindowsTomaž Vajngerl
Change-Id: I476f0ffaef383f3227c0c12b50fcdebf393190f6 Reviewed-on: https://gerrit.libreoffice.org/17487 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2015-08-06tdf#92982 vcl rendercontext: fix missing background repaint of EditMiklos Vajna
Change-Id: Ic45f65d10835eb39b6709e7adeed1392905ea631
2015-08-05attach gestures to event widget instead of toplevelCaolán McNamara
Change-Id: Id0658cf561570a2ae15fb7fd603e6437da9cfaf2
2015-08-05don't map GDK_KEY_RELEASE to keyboard events, tdf#92996Markus Mohrhard
This was only done in the new gtk3 backend, all other backends seem to ignore the GDK_KEY_RELEASE event (especially the gtk2 one). So make the gtk3 backend code consistent with the other backends. Change-Id: I3bdecb7ce05190ee2496bc552ca79375fb6fd713 Reviewed-on: https://gerrit.libreoffice.org/17431 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-05tdf#92982 vcl rendercontext: fix buffer size with empty user profileMiklos Vajna
I did not notice this before, as my user profile had a custom window size; but with an empty user profile the buffer had a 0,0 size, so the buffered result was empty, as no ImplHandleResize() was invoked. Change-Id: Ie299ad1323944941afc407dc90f2459d72885d42
2015-08-05loplugin:unusedmethodsNoel Grandin
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba Reviewed-on: https://gerrit.libreoffice.org/17506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-04tdf#76845: vcl: main thread does not necessarily have SolarMutexMichael Stahl
... at least not if VCLXWindowImpl::OnProcessCallbacks drops it and calls arbitrary event handlers. So try to make nested SolarMutexReleaser work in that case (although poorly). Change-Id: I1e2a1f4d6f42f826692696f7d92d1c3d71291f39
2015-08-04tdf#92982 vcl rendercontext: no need to tweak map mode in PaintBuffer()Miklos Vajna
This used to be necessary, but now that the "copy settings from the window to the buffer" is always guarded with PaintBufferGuard, it's actually one of the places that do modify the buffer settings without undoing that later. Change-Id: I7fde878635ffc7de7027d6d8f8de47935fc4870e
2015-08-04tdf#92982 vcl rendercontext: let PaintBufferGuard also manage pixel offsetMiklos Vajna
Change-Id: Ifd6a75c4312f93c815f5d137f515724f3629fa0d
2015-08-04tdf#92982 vcl rendercontext: PaintHelper: restore set buffer propertiesMiklos Vajna
If the buffer is persistent, then any member we change on it, so it suit our needs have to be undone once we're done with the painting. Change-Id: I7c5491b3b27601fb367af0856ac95cc3f845647a
2015-08-04tdf#92982 vcl rendercontext: set correct offset for the frame-level bufferMiklos Vajna
In case we had a toplevel window W1, the paint was triggered for window W2 and we had a sub-widget W3, then previously the buffer was created for W2, so the pixel offsets had to be set relative to W2 when rendering W3. As a consequence, if a single window was painted, then it was always painted in the top left corner. Now that the buffer is persistent and is always created for W1, make sure that we paint to the correct offset, and W3 is always painted at the same offset, regardless if it was painted directly, or just because it's a child of W2. With this, the buffer conents is closer to what is on the screen, even if it's not perfect yet. Change-Id: Ibf0e89ad18e5763bd2a01e69d91da163c24a309d
2015-08-04loplugin:refcountingStephan Bergmann
Change-Id: I8471af77361364ce677f7a31dda78168909dea90
2015-08-03tdf#92982 vcl rendercontext: no need to call SetupBuffer() twiceMiklos Vajna
No need to call it in PaintHelper::StartBufferedPaint(), which would happen only for the root of the paint hierarchy. It's enough to do it in PaintHelper::DoPaint(), which happens for each widget. Change-Id: Iaf3306ef746bedbe64be36c4efeae73afd75db2a
2015-08-03tdf#92982 vcl rendercontext: no buffer is created hereMiklos Vajna
Change-Id: Iebcf9ec9f54102ca13dd36a3d3c2d2b6137dc0f0
2015-08-03vcl:: replace boost::function with std::functionMichael Stahl
Change-Id: Ibcc536558f26ed15c59263c25bfeb690950dd3d0
2015-08-03inline some use-once typedefsNoel Grandin
Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d Reviewed-on: https://gerrit.libreoffice.org/17495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03inline some use-once typedefsNoel Grandin
Change-Id: I55cc82c8e180cce371c996690608090b1bfdfda4 Reviewed-on: https://gerrit.libreoffice.org/17494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03tdf#92788 - Middle Button on Mouse Paste Option Broken for X11Noel Grandin
caused by commit 5333782d090a9e147c0c431f0f741863d1d8cf8e "convert SETTINGS_ #defines to 'enum class'" Change-Id: Id0c2738a61f73223f6c8716f04a619c8cb84c0a9
2015-08-03remove some unused typedefsNoel Grandin
Change-Id: I98c1e7eaa66b7afb05255a017a3de54714637501 Reviewed-on: https://gerrit.libreoffice.org/17491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03Apply MVP matrix when drawing texture using OpenGLProgramTomaž Vajngerl
Change-Id: I1dc34eee645b77537517e147b86599cfe74f09a9
2015-08-03opengl: support reading 8bit texture (fixes icon corruption)Tomaž Vajngerl
Change-Id: Iba3fd58374a550f3411b02f029f12f4509fb6048
2015-08-03opengl: when scaling, create a new texture with equal settingsTomaž Vajngerl
Change-Id: Id0258fe0db89aa06b91233ae2052f018d606cc74
2015-08-03ImplImageBmp::Draw - nPos parameter is always 0Tomaž Vajngerl
Change-Id: Icbf228809e17e4114049e563468dececba04edde
2015-08-01Move fix for tdf#89231 to a better placeKhaled Hosny
The Unicode to glyph id callback function is the natural and simpler place for that kind of check. Change-Id: I0e9fa131dcffa5063277f029e391eede7417c72b
2015-08-01valgrind: memleakCaolán McNamara
Change-Id: Ie2a42162d3092a8213b8532d9325f4ed199ec2a4