summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2014-04-22coverity#1202749 Bad bit shift operationCaolán McNamara
these longs are really intended as x86 longs, i.e. 32bit Change-Id: I19b68556b0ed57cbcb59338f1d0b4174878fd993
2014-04-22Include tools/helpers.hxx to allow the use of FRound in outdev/rect.cxxChris Sherlock
Change-Id: I1691c4fa5dee3d9cbabc939682a39c4c7befdd4c
2014-04-22Merge tworect.cxx with rect.cxx and rename functionsChris Sherlock
Change-Id: Iad6109a353181759fa64e48a82a003f785d0e58c
2014-04-22Fix wrong function names in bitmap.cxxChris Sherlock
Change-Id: I542282cd4757c3d841f8e2b48847ab5d5ba1574e
2014-04-22DrawTransformedBitmapEx - fix accidental renameChris Sherlock
Change-Id: Ic13a4ac4ca3b4ed23c0db9bc6894024f7b2d959a
2014-04-21WaE: implicit conversion of literal of type 'int' to 'bool'Tor Lillqvist
Change-Id: I1c3721a4d44c882c749903c15f05666a74c725a5
2014-04-22Added missing clipping.cxxChris Sherlock
Change-Id: I2dcde25b98004be4f0f45ad3d7e258daee3ca42b
2014-04-22Move OutputDevice clipping functions into own fileChris Sherlock
Change-Id: Id1bfa4c6db202597107de3047326fe1bd17f2387
2014-04-22Reorganize outdev.hxx - mainly map functionsChris Sherlock
Mainly moved map functions into their own block, however I have also done a bit more reorganization. Quite a bit to go, it seems... Change-Id: I041d91c9b96066f5f1e11bd82968c2712988e5f4
2014-04-22Move DownsizeBitmap from gdi/print2.cxx to outdev/bitmap.cxxChris Sherlock
Change-Id: Ib10024fe92ae364d31082177724be718d426fe26
2014-04-22Reorganize native control functions in OutputDeviceChris Sherlock
Rename lcl_* functions in nativecontrols.cxx, also renamed outdevnative.cxx to nativecontrols.cxx Change-Id: Ie9a362f09cb5044e486086e7d890ae433f7dddc6
2014-04-22Rearrange OutputDevice line functionsChris Sherlock
Reorganized OutputDevice line functions - several of these functions should be private. I have renamed the following functions: * ImplInitLineColor -> InitLineColor (made this private) * ImplPaintLineGeometryWithEvtlExpand -> PaintLineGeometryWithEvtlExpand (made this private) * ImplTryDrawPolyLineDirect -> TryDrawPolyLineDirectNoAA (made this private) I also made a small code change to make bTryAA more clear, and also change (bTryAA && TryDrawPolyLineDirect(rPoly.getB2DPolygon()) to a nestied if statement. Change-Id: I90e8083d69b715912bf0ad1d400bc355f3501981
2014-04-22Renamed function ImplHatchCmpFnc to HatchCmpFncChris Sherlock
Change-Id: Idcb2b3c1ad1830bb781b5a9a0527dd2a08ef2b18
2014-04-22Reorganize OutputDevice hatch functionsChris Sherlock
Grouped hatch functions in outdev.hxx. Renamed ImplDrawHatch to DrawHatch (allow C++ overloading to work out which to use), and renamed ImplCalcHatchValues to CalcHatchValues and ImplDrawHatchLine to DrawHatchLIne. Change-Id: I7be62ec1754864424f6c158ab70178606ccbf1b1
2014-04-22Move DrawImage function location in outdev.hxxChris Sherlock
... also slightly changed the overload documentation for DrawBitmapEx and DrawBitmap functions. Furthermore, DrawImage() should never be called from a Printer instance, so warn and abort. Change-Id: I0de65a5d7bd8249fcd14d844faf74477d490cef5
2014-04-22Rearrange OutputDevice's gradient functionsChris Sherlock
Rearranged gradient functions in outdev.hxx to group them together, also renamed ImplGetGradientSteps to GetGradientSteps and ImplGetGradientStepCount to GetGradientStepCount. Change-Id: I98ea0d177531e50b9bdc097df15cfb93d26474e7
2014-04-22Reorganize OutputDevice bitmap functionsChris Sherlock
I have moved the blending functions from blend.cxx to bitmap.cxx, I also renamed the function ImplBlendWithAlpha to BlendBitmapWithAlpha and ImplBlend to BlendBitmap. I also grouped the functions in outdev.hxx - BlendBitmap and BlendBitmapWithAlpha are both private functions, not public. Change-Id: Idfaf8826341172bb0288473c643afa51a03b0580
2014-04-22Remove extraneous line from DrawBitmapChris Sherlock
Change-Id: I21c9d27edad8fe3ea223149b276d46dfb989ec89
2014-04-21remove comments why a file gets includedThomas Arnhold
also remove some commented out code Change-Id: Ia80c5c57d8d2a74418032de50eee95642cc0969d
2014-04-20cppcheck: Prefer prefix ++/-- operators for non-primitive typesJulien Nabet
Change-Id: Ic24715d86b3f822babd236ac73c041f3a5c1d92b
2014-04-20WaE: macro is not usedTor Lillqvist
Change-Id: I32a4874bb4be9741b509c5781cd90c17a3e97ab5
2014-04-20Move VCL function SetAntialiasing outdev.cxxChris Sherlock
Change-Id: I10f2fd5715d4781b68cb70c3a8df9ce37dc1e821
2014-04-20Move VCL text line functions from text.cxx to textline.cxxChris Sherlock
Change-Id: I3adea9cd08c86f676e6af525e5a7caf430c96d8d
2014-04-20fdo#74702 Only VirtualDevice should handle the Word ext lead bugChris Sherlock
In #i60945# it was discovered that Unix's leading external font spacing causes problems with the display of documents. Therefore, the reference device implemented a workaround, which was to set the spacing to zero. However, the reference device is a VirtualDevice, so it should really be handled there, not in OutputDevice. I have added a new protected function to OutputDevice, GetFontExtLead() that handles this. Change-Id: I1b84ee7d9f7ae96841b441b52705e67c8115ae5c
2014-04-19coverity#738940 Uninitialized pointer fieldDavid Tardon
Change-Id: I467c9ad530b376fd2a23110e4ff157ad03d23d57
2014-04-19coverity#440822 dereference before null checkDavid Tardon
Change-Id: I3531f200c00f27fd2109041b58969ccccb7465ff
2014-04-19vcl/source/outdev/blend.cxx - indent function in anonymous namespaceChris Sherlock
Change-Id: I0a82c500b06531ecce35984d7dc588bb9f7dbd04
2014-04-19Change ImplDrawAlpha to DrawAlphaBitmapChris Sherlock
OutputDevice has a public function ImplDrawAlpha, but that just draws a bitmap with an alpha layer. It's really a public function, though not yet used outside of OutputDevice. However, the name should really be the same as SalGraphic's function which is DrawAlphaBitmap. Change-Id: If2716c1a1a194079d6514a1d30d8b05f9fda664c
2014-04-19fdo#77667 Remove gcc3 workaroundChris Sherlock
It appears from previous commit log entries that GCC 3.3 and below had problems handling instantiated objects as parameters. Therefore, we don't need this aNullPt, so removing it. Change-Id: I8f88067628078e5b57ed76b8b7dfdb76baa3b2ea
2014-04-19Refactor OutputDevice::DrawImage()Chris Sherlock
There is a fair amount of code duplication going on here. If no valid Size is passed to the function then we should pass on Size(), then in the function we call we should check to see if there is a valid size. In fact, this is something we should probably check for anyway, so if anything this makes the code slightly more robust. Change-Id: If7b55e5505ada6739375c69b123cf1e34a0fa66d
2014-04-19Unify IOS/OS X code in OutputDevice::DrawTransformedBitmapEx()Chris Sherlock
The way that we apply the alpha mask in DrawTransformedBitmapEx should be handled in the same way, regardless of the platform. As it turns out, the OS X/iOS way is quite correct and, as a bonus, the code is far more clear. There is no need to do things differently, so let's use the OS X approach. Change-Id: Ib0ac72ddc549367462e84639b74e4bb148128cd5
2014-04-19fdo#74702 Allow Window & OutputDevice to handle erasureChris Sherlock
Window handles erasure of backgrounds for controls. Probably this needs to be moved to a more specific class in the future, but for now it should go into Windows. I also removed an unnecessary temporary variable, and removed the need to case the pointer to this from OutputDevice to Window. In other words, this code has been vastly simplified :-) Change-Id: I44b91cf68f29424ffbc1679b66fbeaeb024880e9
2014-04-19Remove gcc3 workaround for bug long since fixed in gccChris Sherlock
Change-Id: Ieb1c41481a79ab8713663caee3d5373640ff0ec8 Reviewed-on: https://gerrit.libreoffice.org/9102 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-04-19fdo#74702 Allow Printer & OutputDevice to handle font orientationChris Sherlock
Printer handles setting font orientation differently to how a Window or VirtualDevice handles it. Change-Id: I2903b971651fe56f8d262d3467e76baef617455c
2014-04-18fdo#77088 WMF - replace 32-bit min/max assumption with constTomaž Vajngerl
Added RECT_MIN and RECT_MAX which represent the minimum and maximum value a Rectangle object can hold. In WMF we used a 32-bit assumption what the min and max value could be (0x7fffffff, 0x80000000) which causes problems on 64-bit systems. Change-Id: Ic62daebbc2708cdeb7b0cf7b694bd9940eb98313
2014-04-18handle strange brightness+contrast adjustment from msoffice (fdo#38410)Luboš Luňák
LO uses basically the formula "newpixel=(oldpixel-128)*contrast+128+brightness", i.e. contrast is applied first. It looks like there's no "oficial" formula for this, so a formula that applies brightness first would be ok too. MSO for some weird reason apparently uses a formula that applies half of brightness before contrast and half afterwards (insert funny political correctness or compromise joke here). While the result is the same like with the LO formula if only either brightness or contrast is adjusted, the result is different if both are involved. Just modify the image using the MSO algorithm if this is the case. Change-Id: I55fe8f395832685b90f024cf2f58b0797c1ba588
2014-04-18Extract code of BitmapEx -> RGBA buffer conversion to OpenGLHelperZolnai Tamás
Needed by gltf rendering. Change-Id: I1aa974f3c515c5fb19a07b54ff655331138553cb
2014-04-18add some jpeg format testsCaolán McNamara
Change-Id: I17347c638b5c6c72e740aaa995339a8ff33609bc
2014-04-18fdo#74702 Allow Printer to handle ImplInitFont and renameChris Sherlock
Renamed ImplInitFont() to InitFont, made it protected. Moved printer handling to Printer class. Change-Id: I42ebf6188d075993b5d2e14f55a7e530201acdd6
2014-04-18add a testcase for CVE-2008-1097 bmpCaolán McNamara
Change-Id: I3b1b315654fbb2a35785a87540f7da03d2d7301c
2014-04-18Typo: s/cant/can't/Tor Lillqvist
Change-Id: Id76b4ea569246c4b96da48dbc8d5a557367e0cca
2014-04-17coverity#708613 Uninitialized scalar fieldCaolán McNamara
Change-Id: I368396dc257503eac17f3519bfee72ef1366171a
2014-04-17coverity#708615 Uninitialized scalar fieldCaolán McNamara
Change-Id: I93cc49b13b2b13c6ac8d1b7b4bf826c39cdb1759
2014-04-17coverity#708616 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ic63f010b0e5d4f0d74c79e16673e3a3fde435e10
2014-04-17coverity#708617 Uninitialized scalar fieldCaolán McNamara
Change-Id: If4d6963b4f9ccf8683c95eff2ba1bb0f0d10e282
2014-04-17coverity#708618 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ie48d5a4628a934036632d780c40e9c93a07ab726
2014-04-17coverity#708619 Uninitialized scalar fieldCaolán McNamara
Change-Id: I5cb0259ed12c96ca5f6484999f276fbedcf9dba6
2014-04-17coverity#708621 Uninitialized scalar fieldCaolán McNamara
Change-Id: If84c36f3bd285b8615d23271ca7dcc380307e04f
2014-04-17coverity#708622 Uninitialized scalar fieldCaolán McNamara
Change-Id: Id8311854d77f61ea161c6d586847b91971657231
2014-04-17coverity#738936 Uninitialized scalar fieldCaolán McNamara
Change-Id: I9b13adfd30a2cdbebf29508aad296259c692be86