summaryrefslogtreecommitdiff
path: root/vcl/generic
AgeCommit message (Collapse)AuthorFilesLines
2015-01-19fdo#39440 vcl: reduce scope of local variablesMichael Weghorn3-15/+9
This addresses some cppcheck warnings. Change-Id: Ib6b9651b828287665f7248052855f0da2779806e Reviewed-on: https://gerrit.libreoffice.org/13968 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-17no need to do that for all contextsMarkus Mohrhard1-1/+1
This fixes a crash as we would need to make each context current before calling ReleaseFramebuffers. However this is totally unnecessary as only the current context can have bound framebuffers. Change-Id: I8b1496bb890982742b3d2ebf60fdce47db642d70
2015-01-11vcl: ServerFontLayout::setNeedFallback() -> SetNeedFallback()Chris Sherlock1-2/+2
Change-Id: I28f2b4df57b8bc521e36e72b1f788fc89cfa7caf
2015-01-11vcl: LayoutEngine::layout() to LayoutEngine::Layout()Chris Sherlock1-3/+3
Convention is that public functions used by other non-implementation classes use uppercase function names. Change-Id: I9a57b231b6a92dc8ac37dc417fdb8177a8c2fa11
2015-01-07fdo#84938: convert STREAM_ #defines to 'enum class'Noel Grandin2-3/+3
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-06vcl: reset OpenGLContext(s) when yielding the last SolarMutex.Michael Meeks1-2/+6
This should make OpenGL thread-safe to allow multiple threads to render using VCL's OpenGL backend, and fix misc. associated driver horrors, will give some performance cost for tight Yield loops. Change-Id: Ib23702262fd9f0925a5ed8c642d0a26e92136b37
2015-01-02Fix simple typos.Andrea Gelmini1-2/+2
Change-Id: I1fdbe47ed7a6e05d2cf20f4c296bffad4bbc6599 Reviewed-on: https://gerrit.libreoffice.org/13719 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara5-45/+45
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02Remove unnecessary comphelper::string::getTokenStephan Bergmann1-2/+0
Change-Id: I49192637121441b9a1980350b9bb32cd995d4386
2014-12-18vcl: Use appropriate OUString functions on string constantsStephan Bergmann3-8/+8
Change-Id: I169624820cd7d25eab18a6b90482e075ebfebcc6
2014-12-12osl_getCommandArg always returns osl_Process_E_NoneStephan Bergmann1-3/+3
Change-Id: I0ff1e44f17976fd3a3060d8ee7fe15d77c918b79
2014-12-11vcl: Add BitmapInfoAccess for bitmaps' metadata accessLouis-Francis Ratté-Boulianne1-2/+2
Change-Id: Iec9f8c7d8f7cded0aef9e017373e44387dc0b05c
2014-12-09changed timer to idleTobias Madl1-14/+14
Change-Id: Iac4b100e3eca456fdd19d67ff311a02c40dc060a
2014-11-30give us a parenStack which can grow to fit any inputCaolán McNamara2-2/+8
Change-Id: Ic464184fe367da33bf8c4790b82656b140e3cbd0
2014-11-28Revert "Related: deb#766788 alloc on heap instead of stack"Caolán McNamara1-7/+7
This reverts commit acdf54c4142b7a51b99eacacee470ac31d6ff0ae. Change-Id: I1c49a5baac3a3421d23926f4479e674ef46fbf34
2014-11-28vcl: fix crash in HbLayoutEngine::layout() in sc_subsequent_filters_testMichael Stahl1-1/+0
(regression from acdf54c4142b7a51b99eacacee470ac31d6ff0ae) Change-Id: Ieff44a1b953c9bd95acc4440d2e9f02b5ca1d288
2014-11-28Related: deb#766788 alloc on heap instead of stackCaolán McNamara1-7/+8
Change-Id: I0f103f535b99f185cfdd019a76709d5deaef1d13
2014-11-22vcl: Add support for backend-dependent blending of bitmaps (mask and alpha)Louis-Francis Ratté-Boulianne1-0/+10
Change-Id: Iba64eb42965c86ca5655b9a105ef3f397e033ecf
2014-11-18More iwyu suggested headers removalRiccardo Magliocchetti2-4/+0
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, undid one remove that was detrimental to loplugin:unreffun Change-Id: I18d8252084d828f94ef7a954e1dbfb45743d7970
2014-11-14coverity#706217 Time of check time of useCaolán McNamara1-12/+9
Change-Id: I762658a01e97f56b2f9362a38a0fefc941698d1b
2014-11-14coverity#705989 silence Insecure temporary fileCaolán McNamara1-4/+6
and coverity#705983 Insecure temporary file Change-Id: I2a501f8114ddf8968381e1880263abaf9d1bdc6f
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava5-6/+9
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini5-13/+13
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-10cid#736944 Time of check time of useNoel Grandin1-3/+6
Change-Id: Ie9160e8d5ee7f8416a4526a280db23316488a2a1
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann2-5/+5
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin2-5/+5
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05markup with event type not checker typeCaolán McNamara2-6/+6
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-03coverity#1250699 Dereference null return valueCaolán McNamara1-0/+5
Change-Id: Iaddc47087d796d96fa0ed054c254b3cf83c90b5e
2014-11-01coverity#1250439 Structurally dead codeCaolán McNamara1-6/+3
Change-Id: Ib0e8fefb154417dde95bc70765ad675a1824db44
2014-11-01coverity#735338 Unchecked return valueCaolán McNamara1-1/+1
Change-Id: If19a61c82f1cf723c8e78e8d27461a543ddbfd40
2014-10-30document array_vs_singleton dismissalsCaolán McNamara2-0/+3
Change-Id: I8d7eb4c01197e885abca717c7814c61a7641ac9d
2014-10-27cid#735557 Logically dead codeNoel Grandin1-8/+0
Change-Id: I0f6851a4ce5c02ea48110bdb8ed47cdb15853917
2014-10-17coverity#704104 Unchecked return valueCaolán McNamara1-5/+7
Change-Id: I4a2c49befe4baea10e36e0d612371fe8c91db401
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann2-8/+3
...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-13vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMapChris Sherlock4-12/+15
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-10coverity738920 Uninitialized scalar fieldCaolán McNamara1-2/+3
Change-Id: Ic1571d24a8a696dc24b899d262b9e560d005ee88
2014-10-10coverity#736943 try another experimental warning workaroundCaolán McNamara1-2/+2
Change-Id: I4fc951e21915f7cbb03ee10fd2c9c4977a2f510a
2014-10-09move copy of icu's ScriptRun into vcl namespaceCaolán McNamara3-1/+8
Change-Id: Idbd3f3e903d6e411d565d29884e52862c3e1cc58
2014-10-06vcl: FontCharMap to use intrusive_ptr ImplFontCharMapChris Sherlock4-12/+17
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-05coverity#1240252 Unchecked return valueNorbert Thiebaud1-3/+5
Change-Id: I472f9fc9cb7b5d2e7030cc4272e29b955931ee88
2014-10-03coverity#736943 try swapping arguments around as an experimentCaolán McNamara1-2/+2
Change-Id: I89f0cfc9049503318955d58dde3f9a3e1197c45d
2014-10-03coverity#1242530 silence Arguments in wrong orderCaolán McNamara1-1/+3
Change-Id: I809e771e4f052ad64300b09174a1bdbc769e15d3
2014-09-30fdo#82577: Handle PolyPolygonNoel Grandin1-4/+4
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows PolyPolygon typedef. Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-30fdo#82577: Handle RegionNoel Grandin1-1/+1
Put the VCL Region class in the vcl namespace. Avoids clash with the X11 Region typedef. Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-09-29loplugin: cstylecastNoel Grandin2-4/+4
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
2014-09-23fdo#82577: Handle WindowNoel Grandin4-5/+5
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-15vcl: Rename GetImplFontCapabilities()Chris Sherlock1-1/+1
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-12use Apple Language Id conversion for matching font namesCaolán McNamara1-7/+8
Change-Id: Ic953c4ff0de6a90b0580bb22554750be08727349
2014-09-12Related: fdo#82259 implement mac ttf fontname encoding supportCaolán McNamara1-0/+72
which is why these font's are not appearing under Linux Change-Id: Ib72ddb465b2df729953ece416cfa0477cd565bcd
2014-09-11server font dtor always calls ReleaseFaceFTCaolán McNamara1-6/+5
therefore we must always call GetFaceFT in the ctor and not return early *before* calling GetFaceFT which could happen in case of inane font size requests, i.e. if( (mnWidth < 0) || (mfStretch > +64.0) || (mfStretch < -64.0) ) valgrind+bff Change-Id: If22f8f7ff6aaed3ffa9eec68630da8601dfd5cae