summaryrefslogtreecommitdiff
path: root/vcl/inc
AgeCommit message (Collapse)Author
2014-11-05Basic Idle handler implementationTobias Madl
An idle handler will ultimately be a zero time timeout with prioritisation layered on top of that. Change-Id: I3f0802d5001172fc7b8409274bc5a3632e5dad34
2014-11-03vcl: Allow SalGraphics to draw gradients nativelyChris Sherlock
The aim of this patch is to allow for native gradient rendering in SalGraphics (i.e. let OpenGL do this natively). It is a two step process: 1. I need to allow gradient draw into SalGraphics, however the current completely intertwined with the metafile code in OutputDevice. I am seperating the gradient metafile code from the gradient drawing code. 2. After splitting the metafile stuff from the actual gradient drawing, I am now able to call on SalGraphics::DrawGradient(). This just calls on SalGraphics::drawGradient() which returns false if there is no way of drawing native gradients, and true if there is. If false, then we use OutputDevice's DrawGradient() functionality. Change-Id: Ibaaabe13b76a8e7a037d9f751b5f662653a50566 Reviewed-on: https://gerrit.libreoffice.org/12119 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-03coverity#1242806 untrusted pointer readDavid Tardon
Change-Id: Ib92e1a22d7d25f4498272731af12c485937f38ef
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-21fdo#84938: replace WINDOW_BORDER constants with enumNoel Grandin
Change-Id: I91ca8e09971aee26f16257a4fd01125cfb2ebcdb
2014-10-17coverity#704104 Unchecked return valueCaolán McNamara
Change-Id: I4a2c49befe4baea10e36e0d612371fe8c91db401
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16MAC_OS_X_VERSION_MAX_ALLOWED is always >= 1080 nowTor Lillqvist
Change-Id: Ieae67cbf917cdf4bca2b0d6c1697eddc6137dbe2
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15vcl: cleanup salgdi.hxxChris Sherlock
Change-Id: Iced928a97afdc30e8cb1e24dd148c8b838e8eb72
2014-10-14vcl: cleanup salframe.hxxChris Sherlock
Change-Id: I0f331a2589d0fab5cf3843bf7531333e07067997
2014-10-14vcl: change to css alias namespaceChris Sherlock
Change-Id: I4af1bd5cd1d614ca92cf843ad7fa5bb518829f89
2014-10-13vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMapChris Sherlock
To do this, I've made FontCharMap a friend class for ImplFontCharMap, and have moved the functions directly into FontCharMap. In this patch, I am attempting to stop the direct use of ImplFontCharMap by anything other than FontCharMap. However, FontCharMap itself requires a refcounter, so we will use FontCharMapPtr to access the font character map. Change-Id: I509b990a8cbd911c5cc1572c7d24fc5348ca06d9 Reviewed-on: https://gerrit.libreoffice.org/11823 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-10-10typo: follwing -> followingAndras Timar
Change-Id: Ia201473c84dc0923e8f4bee6329ad926cd6addd6
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca
* Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-10-06Remove pointless commented-out 'virtual' keywordsTor Lillqvist
Nobody knows any more what such a metacomment was supposed to mean, if it had any deeper meaning at all. Change-Id: Iefb4fedc7b833c09ee0e39b3eb28202229323ef2
2014-10-06vcl: FontCharMap to use intrusive_ptr ImplFontCharMapChris Sherlock
ImplFontCharMap was using it's own reference counting mechanism, however we can use intrusive_ptr more effectively. Added a unit test around FontCharMap. Change-Id: Ifab6ce002fd1df8feb7e017dea3012ff9ea7f18a Reviewed-on: https://gerrit.libreoffice.org/11804 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-10-04vcl: remove FontRefCount typedefChris Sherlock
There is honestly no real need for FontRefCount. I really cannot see why this typedef was ever introduced into the codebase Change-Id: Ifa24a95cf6c788b4b11a4425520a2f6bc0e61169
2014-10-04vcl: tab cleanup of vcl/inc/impfont.hxxChris Sherlock
Change-Id: I54f669cd4ba472744f013f157baa035519d052bf
2014-10-01fdo#82577: Handle TimeNoel Grandin
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-30fix OSX buildNoel Grandin
after commit 19a35bcd5beff8d1fede856c6c4078dd6716c1cf "vcl: cleanup vcl/inc/quartz/salgdi.h" Change-Id: I1f6334cb2751662b81d3ac027982ece4ccac4d34
2014-09-30fdo#82577: Handle RegionNoel Grandin
Put the VCL Region class in the vcl namespace. Avoids clash with the X11 Region typedef. Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-09-30vcl: fixup last cleanupChris Sherlock
Change-Id: I628b50b3dd7914edcacb571ead226146455f62f1
2014-09-30vcl: cleanup vcl/inc/quartz/salgdi.hChris Sherlock
Change-Id: Ib34aa29bfa191efda8d31486a60ae0e607787387
2014-09-29vcl: std::auto_ptr -> std::unique_ptrStephan Bergmann
Change-Id: I5a08186b465b15311c63784506a0ca0e119286e2
2014-09-29loplugin: cstylecastNoel Grandin
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
2014-09-25fdo#84000: Sort out problems with short timeouts & long callbacks.Jan Holesovsky
Previously, the timer events could have accumulated in that scenario leading to unresponsiveness to user events. Change-Id: I455d726ae7475f7dbf98d871c54d8c156cb64e52
2014-09-25use SAL_OVERRIDE for WinSalTimerMichael Stahl
... and no, we do not "overload" virtual methods. Change-Id: Iff7c46326974995994e966873ff804092bc53540
2014-09-25mhPrevInst was pointlessTor Lillqvist
Change-Id: Iacd1c0856f991e11ef26d7ff6bf1e75264b89ac9
2014-09-25Bin pointless single-line wrappers of Win32 APITor Lillqvist
Change-Id: I9c56dbee65c93dd98344577d9e696dc61c1edbd8
2014-09-25fdo#75757: remove inheritance to std::vectorTakeshi Abe
Glyphs::iterator_pair_t was gone at df3c7e76cca60d246277731d0c525d5f7e6f6597. Change-Id: I471a2ef659dd98527d2dca5fd8c3741851341ec5 Reviewed-on: https://gerrit.libreoffice.org/11533 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-23fdo#84000: Reimplement the Windows WinSalTimer using Timer Queues.Jan Holesovsky
Timer Queues http://msdn.microsoft.com/en-us/library/windows/desktop/ms686796%28v=vs.85%29.aspx allow creating & maintaing high-precision timers. This commit switches the WinSalTimer implementation from using the Timers: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644900%28v=vs.85%29.aspx to Timer Queue Timers. The 'classic' Timers do not have better precision than some 15.6ms (the documentation mentions 10ms, but some measuring seems to confirm that it is more than that). With the Timer Queue Timers, we now have 1ms precision. Incorporates some cleanup from Michael Meeks <michael.meeks@collabora.com>. Change-Id: I0312a0c9fdc2779258698b24389b24c39e643473
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-18fdo#82577: Handle FontNoel Grandin
Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-15vcl: Rename GetImplFontCapabilities()Chris Sherlock
The data structure is not ImplFontCapabilities but FontCapabilities, therefore the function name is very misleading. Change-Id: I90f074902af4b4bee79cd445036dc24797836ac1 Reviewed-on: https://gerrit.libreoffice.org/11454 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-09-14convert UserDrawHdl to boost signals2Luboš Luňák
Note that ImplListBox::userDrawSignal is connected to ImplListBoxWindow::userDrawSignal to forward the signal, just like the Link was previously forwarded. Change-Id: Ic8fc6f51e309bc34fb4e39c13745302649991d0a
2014-09-14convert ListBox's ImplBtn to use boost signal2Luboš Luňák
Change-Id: I18680e47688da02c9e211bf7f8d861622735e749
2014-09-13vcl: SalFrame::Enable() is not used anywhere so removingChris Sherlock
Change-Id: I851c414aa9e95c4d2c3ddb44deb5835656d16f87
2014-09-13vcl: tabify salvd.hxxChris Sherlock
Change-Id: Ifb52f18f34f510b60292fc80e3e47b2ff45b841c
2014-09-13vcl: tabify salobj.hxx and fix initial commentChris Sherlock
Change-Id: I89e60f743c5af8b5fa0f3df779f240945af40c07
2014-09-13vcl: tabify salframe.hxxChris Sherlock
Change-Id: I53ad4992c6901e3dceae453699c2da785feb21a5
2014-09-12Revert "vcl: use DeviceCoordinate for GetCaretPositions in sallayout"Norbert Thiebaud
This reverts commit 1b42acdaeae134f94580d6e1eba89da16741d596.
2014-09-12vcl: It's a close button, there is no such a thing as a 'closer'.Jan Holesovsky
Clean up at least vcl + what depends on that, but unfortunately there are still some "Closer"'s left elsewhere... Change-Id: I019c863d07ee62d701ff01c8d871334012c105f1
2014-09-12vcl: use DeviceCoordinate for GetCaretPositions in sallayoutNorbert Thiebaud
Change-Id: I5a959e1c3806da713e106c1b0fc8690a6578987b
2014-09-10vcl: GtkSalFrame::AcquireGraphics() calls GtkSalGraphics::Init() twiceChris Sherlock
We really don't want to call on GtkSalGraphics::Init() twice, the only reason we do this is because we pass in a new screen. To get around this, I've created a new GtkSalGraphics constructor that takes and additional screen parameter. Change-Id: Ie53d609c2b8f64d77a3bfb2efe0e97027c75c5d0
2014-09-03extra witdh for GetTextBreak is of DeviceCoordinateNorbert Thiebaud
Change-Id: Ic25eae1e9b8ae14022ee8d0373be0978ebc21267
2014-09-03SalLayout GetTextWidth return DeviceCoordinateNorbert Thiebaud
Change-Id: I5b995e54992213e95845e60169238270863e9a7e
2014-09-03fix signatureThomas Arnhold
Change-Id: I3e8f7691135120cc880cccdbea3491c2fdb49c75
2014-09-02remove unused methodMarkus Mohrhard
Change-Id: I17d3e3fa4671d0004e2d7918ea3bcad1a7bcd2b5