summaryrefslogtreecommitdiff
path: root/vcl/headless
AgeCommit message (Collapse)AuthorFilesLines
2015-01-27these are const inputs, we fill widths from pGlyphIds via pEncodingCaolán McNamara1-2/+2
Change-Id: I32d8bbc5083223b540f76a928de505d611627957 Reviewed-on: https://gerrit.libreoffice.org/14196 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-27rhbz#1177022: vcl: fix PDF embedding of Type 1 fontsMichael Stahl1-2/+2
Problem is that for the "CM Typewriter" font the Width for "space" (32) is exported as 0 instead of 525, which is the correct value in the AFM. The reason is that PDFWriterImpl::emitEmbeddedFont() has various arrays to map from font code points to Unicode code points, and there are duplicate mappings, so the 160->32 mapping overrides 32->32. The PrintFontManager::PrintFont::readAfmMetrics() actually creates a Unicode to font code mapping (which may legitimately be n:1) that is then inverted; add an additional hack to store a set of "preferred" Unicodes so that PDFWriterImpl can pick the right Unicode. Presumably the code that is stored explicitly via "C" or "CH" in the AFM should take priority over more generic mappings. Change-Id: Id4205a1cd45ba6a0a5facee1e39f70c3535e7dd4
2015-01-27add a length arg to GetEmbedFontDataCaolán McNamara1-1/+2
for the cases where we don't want the full result and mark some ultra-dubious code with a TODO Change-Id: I7cf57b8d44bbad2a6db86a8b862a757ae5062c50 Reviewed-on: https://gerrit.libreoffice.org/14189 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-07fdo#84938: convert VCL_INPUT_ #defines to 'enum class'Noel Grandin1-2/+2
Change-Id: I155e45f58974a2b946c4a7703b350bcbfbad342e
2015-01-07fdo#84938: convert INDICATOR_ #defines to 'enum class'Noel Grandin1-4/+2
and replace SalIndicatorState, it serves the same purpose Change-Id: I618b8946b8e2527883eecb13060b2256abc505b6
2014-12-11vcl: Add BitmapInfoAccess for bitmaps' metadata accessLouis-Francis Ratté-Boulianne1-3/+3
Change-Id: Iec9f8c7d8f7cded0aef9e017373e44387dc0b05c
2014-12-03vcl: Add dummy Replace to SalBitmap implementationsLouis-Francis Ratté-Boulianne1-0/+5
Change-Id: I2f8b11a3f7cb8872a1d8f6eeeae8ce3f30223496
2014-12-03Add dummy Erase to SalBitmap implementationsMatúš Kukan1-0/+5
Change-Id: I5790deb9ab5af6f8678c964af5321264d3bce733
2014-12-02vcl: remove SalVirtualDevice::GetWidthMichael Meeks1-12/+0
It is presumed that #i59315# is fixed already, and that this is no longer necessary. Change-Id: Ifb2f6550fac2481c4fec269b38d6e806753cb53e
2014-11-30move the iOS SalGraphics code back into the OSX oneMarkus Mohrhard2-8/+4
Conflicts: vcl/inc/headless/svpgdi.hxx Change-Id: I4cd9163bcbb8cdee21e5bce3303894923c4238d6
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-19Add dummy Crop to SalBitmap implementationsMatúš Kukan1-0/+5
Change-Id: Ib402395f5523a980c9ca098dcd2d8e1ecbbfa7c0
2014-11-10vcl: Allow SalBitmap implementation to do scalingLouis-Francis Ratté-Boulianne1-0/+5
Change-Id: If4431fb276c9c2629acbc95aeff2ef7c4a683d86
2014-10-28Fix -fsanitize=signed-integer-overflow (when long int is 32-bit)Stephan Bergmann1-2/+2
Change-Id: Ia6f1b60108784660c4a2dfd311592207e6bf5d88
2014-10-27coverity#735348 silence Unchecked return value from libraryCaolán McNamara1-4/+4
Change-Id: I6da2fccb0c709f08dc4ed321d7b16683e939cac9
2014-10-27coverity#735342 silence Unchecked return value from libraryCaolán McNamara1-2/+2
Change-Id: Id440d30e44aaf986532d4c6debf3876578c53b29
2014-10-25coverity#735342 silence Unchecked return value from libraryCaolán McNamara1-2/+2
Change-Id: I95f0d81a741fc684468c720390b43dc9d7b585f9
2014-10-17coverity#735341 Unchecked return value from libraryCaolán McNamara1-1/+1
Change-Id: I8eb5158cb2aa39b5eac45c554d722b9de1c8abe8
2014-10-14basebmp: accelerated method to create a clipping device.Michael Meeks1-2/+1
This was some staggering proportion of tiled rendering documents with complex clipping; it seems 'clear' is not what memset is for 1bit clip masks. Change-Id: I9142ffb7d7016603feb7782d6f03b9992b9494e3
2014-10-13vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMapChris Sherlock1-3/+3
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-11vcl: whitespace cleanup.Michael Meeks1-9/+9
Change-Id: I0e61ecfc32f13bba0fa992689604c8b79e6139e9
2014-10-06vcl: FontCharMap to use intrusive_ptr ImplFontCharMapChris Sherlock1-2/+2
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-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-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-13vcl: SalFrame::Enable() is not used anywhere so removingChris Sherlock1-4/+0
Change-Id: I851c414aa9e95c4d2c3ddb44deb5835656d16f87
2014-08-27m_aDevice may be nullCaolán McNamara1-0/+3
Change-Id: I21f394c1a2f91a18af8eb46ed9be3c2f786fe1ef
2014-08-23fdo#82577: Handle KeyCodeTor Lillqvist1-1/+1
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-22Remove some useless tools/debug.hxx includesMarcos Paulo de Souza1-2/+0
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h header was necessary in some cases because of a macro or a typedef that was needed. Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9 Reviewed-on: https://gerrit.libreoffice.org/11075 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-13m_aDevice may be nullCaolán McNamara1-10/+11
Change-Id: Ibd4666bd185198e0702a498d5648f1e4d5580e11
2014-07-10svp clipping again: Rectangle dimensions don't map directly to B2IBox.Andrzej Hunt1-2/+2
This is the same as in 80f3211a7aeff221718703c445be4c753e0a1067. Change-Id: Ibb981da064b4fc97fd865be2decabd8798de7380 Reviewed-on: https://gerrit.libreoffice.org/10186 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2014-07-07svp clipping: Rectangle dimensions don't map directly to B2IBox.Andrzej Hunt1-1/+1
Previously the clip region would end up being 1 pixel smaller in both directions than the requested area -- B2IBox considers the bottom-right point to NOT be included in its area, whereas Rectangle considers the bottom-right point to be the last point WITHIN its area. (This is equivalent to the Rectangle's getWidth/GetWidth differentiation.) This is noticeable e.g. with tiled rendering, where images spanning a tile boundary are clipped to paint only the region within a given tile -- however previously they would be clipped by an additional pixel in each direciton, resulting in an empty border along the bottom-right edge. Change-Id: I0ef3098959defc5c82719155c130aa904c04b6b1
2014-06-25Fill the alpha channel by default for vcl 32-bit bitmaps too.Andrzej Hunt1-8/+8
Otherwise the alpha channel for bitmaps created directly is empty, indicating a transparent bitmap (although we don't actually handle transparency). This complements hardcoding of the alpha channel in basebmp. VCL bitmaps can be copied bit-for-bit directly into a basebmp bitmap, hence it's important to make sure we fill the alpha channel in vcl too. Conflicts: include/vcl/salbtype.hxx Change-Id: Icb2fa417db6625a6ffa6bd82eb5773ff75be5a3c
2014-06-25Allow passing in external buffers to svp's VirtualDevice.Andrzej Hunt1-5/+7
We also want to be able to set whether or not the buffers should be painted to top down, so add that parameter as necessary (default seems to be false, however e.g. gtk requires this to be true, i.e. needed for tiled rendering). Change-Id: Id98882e4c7f62508ae5a976c0d8df743460a4ab2
2014-06-25svp: deduplicate bitcount->colourspace mapping and allow overriding.Andrzej Hunt3-46/+67
Although svp defaults to BGR, we might want to use alternative formats (e.g. for tiled rendering to bitmap buffers which are to be used in e.g. gtk), it is probably safest to keep the current defaults but allow the user to change to whatever format they may require. (This currently only makes sense for the 32-bit RGBA/ARGB/etc. formats. However the 23 bit formats could potentially be expanded to allow a similar RGB/BGR choice.) Change-Id: I70bd3d6e7d297faef163b910f576655efee4cb3f
2014-04-22With tiled rendering for iOS there is no need for a "frame buffer"Tor Lillqvist1-3/+9
The resulting dropping of the basebmp code reduces app size by 0.7 MB. Change-Id: Id263873ed5c4bb2435d929a1319fedeedb6daa14
2014-04-10Avoid pointless ifdef for iOS inside code not compiled for iOS anywayTor Lillqvist2-2/+2
The whole of svpbmp.cxx and svpvd.cxx are nowadays ifdeffed out for iOS. Change-Id: Iac1f66457dc315ea86f86d12e1f6eb5bf4bcbb8c
2014-04-08Clean up function declarations and some unused functionsStephan Bergmann1-2/+0
Change-Id: I382289c7188dfdc9839ff9e6362b6e039ffc5f9e
2014-04-02Kill superfluous vertical whitespaceTor Lillqvist3-21/+0
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann3-5/+5
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26Seems we don't need any basebmp stuff in AquaSalGraphics on iOSTor Lillqvist2-30/+11
No repeatable visible differences in TiledLibreOffice for my test docs. Probably we should unify the iOS vcl code even harder with the OS X code, get rid of the last remains of the pre-tiled-rendering basebmp bitmap-based stuff. Change-Id: I2484585d3d0ef5ce758d0a654717d23464464c1a
2014-03-26Bin DestroyVirtualDevice(): Just use delete directly at call sitesTor Lillqvist1-5/+0
Change-Id: I47c67d3d89ab22b07b3ec6fe7ea6e035d21e85b6
2014-03-24Fix a few problems in the iOS vcl codeTor Lillqvist3-46/+28
We don't need the headless SvpSalBitmap code after all on iOS, so bypass all of svpbmp.cxx for iOS. I accidentally had left duplicates for some AquaSalGraphics methods in headless/svpgdi.cxx in addition to the ones in quartz/salgdicommon.cxx. This is obviously bogus, the linker just picks the ones that come first in the archive. (Remember the ugly "#define SvpSalGraphics AquaSalGraphics" trick, so for instance SvpSalGraphics::setClipRegion actuall is AquaSalGraphics::setClipRegion.) It's the Quartz ones we want, as since the switch to tiled rendering the iOS vcl code is supposed to work much more like the OS X one. (There is still some significant refactoring to do there. Possibly no "headless" code needs to be used at all for iOS.) A couple of functions moved from salgdiutils.cxx (which isn't compiled for iOS) to salgdicommon.cxx. The SetState() function now gets used also on iOS, and to properly undo its CG context stacking I pop it in SetVirDevGraphics() when the virtual device is being destroyed. This fixed the rendering of some simple shapes that use overlapping and transparency, but not that of the "monster" SmartArts. Change-Id: I2bfaa4129e3641dbdd1dd240c1d07f9bdcfea1b8
2014-03-20cosmetic: split PhysicalFontFamily/Collection out of outdev3.cxxNorbert Thiebaud1-0/+2
Change-Id: Iae8eb15413c0c069c14edd92c94ecb0113d9d371
2014-03-20cosmetic: split PhysicalFontFace class it its own source/headerNorbert Thiebaud1-14/+11
oudev,2,3,4,5,6 are a dumping ground for a lot of things chipping at it one class at the time... organize the #include of the impacted source while at it. Change-Id: I57bbb1f9e3c6b2ac6b3ca127e5976bf16f3e3cf8
2014-03-20rename ImplDevFontList to PhysicalFontCollectionNorbert Thiebaud1-4/+4
again, convergence of teh naming with what is normally used in the underlying native API, where FontFace ) FontFamily ) FontCollection Change-Id: Ieb098b782ea828a3365f00d07914b9566278caba
2014-03-20Remove unnecessary vcl::SolarMutexObjectStephan Bergmann1-1/+0
Change-Id: I6dfdd7d5d211b66019dfbe364101140e28a3584d
2014-03-10Hack on the iOS vcl codeTor Lillqvist3-1/+22
Attempt to make some more complex documents render OK. Stop using SvpSalVirtualDevice on iOS. Use AquaSalVirtualDevice in all cases. Do use a CGLayer (the AquaSalVirtualDevice::mxLayer field) after all, like on OS X. Change-Id: I7f7dc00c526453786cc871fd88dfb73517b15c39
2014-02-28Rename GetGraphics to AcquireGraphicsChris Sherlock2-2/+2
Currently there are a number of classes that have a function called GetGraphics(). It returns a SalGraphics instance if one is available for the sole use of the caller. Some variants keep a pool of available SalGraphics and return one not currently in use by anyone, creating extra ones on demand, sometimes up to a set limit and returning NULL on reaching that limit of simultaneously in use SalGraphics. This is confusing. What is really happening from the perspective of the calling is that is that we are attempting to *acquire* ownership of a SalGraphics instance. Therefore, rename GetGraphics to AcquireGraphics() which returns a handle to a SalGraphics if we can acquire a free graphics instance, and NULL if we cannot, which makes it cleared that ReleaseGraphics should be called on the result of AcquireGraphics. The classes that were changed to include the new acquire function are: * SalFrame * SalVirtualDevice * SalInfoPrinter * PspSalInfoPrinter * X11SalFrame * X11SalVirtualDevice * GtkSalFrame * KDESalFrame * TDESalFrame * WinSalFrame * WinSalInfoPrinter * WinSalVirtualDevice * SvpSalFrame * SvpSalVirtualDevice * AquaSalFrame * AquaSalInfoPrinter * AquaSalVirtualDevice Change-Id: Ic39c08a4bcaf665ae08ba2808cd03b0e80790c46 Reviewed-on: https://gerrit.libreoffice.org/8070 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28sal_Bool -> bool in mostly vcl moduleChris Sherlock3-7/+7
Conflicts: include/vcl/settings.hxx svtools/source/table/tablecontrol_impl.cxx sw/source/core/frmedt/fecopy.cxx vcl/inc/canvasbitmap.hxx vcl/inc/headless/svpframe.hxx vcl/inc/unx/salframe.h vcl/inc/win/salframe.h vcl/inc/win/salprn.h vcl/inc/win/salvd.h vcl/osx/DragSource.cxx vcl/osx/DragSource.hxx vcl/osx/DropTarget.cxx vcl/osx/DropTarget.hxx vcl/osx/OSXTransferable.cxx vcl/osx/OSXTransferable.hxx vcl/osx/clipboard.cxx vcl/osx/clipboard.hxx vcl/osx/salprn.cxx vcl/qa/cppunit/canvasbitmaptest.cxx vcl/source/components/fontident.cxx vcl/source/control/edit.cxx vcl/source/control/spinfld.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/virdev.cxx vcl/source/helper/canvasbitmap.cxx vcl/source/window/dockwin.cxx vcl/unx/generic/dtrans/X11_selection.hxx vcl/unx/kde/UnxFilePicker.cxx vcl/unx/kde/UnxFilePicker.hxx vcl/unx/kde4/KDE4FilePicker.cxx vcl/unx/kde4/KDE4FilePicker.hxx vcl/unx/kde4/KDESalFrame.hxx Change-Id: I9866d985da86dea2a56feff23f91c1467a1636b0 Reviewed-on: https://gerrit.libreoffice.org/8219 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26Removed unnecessary comment decorations from VCL sourcesChris Sherlock3-8/+1
Conflicts: vcl/headless/svpgdi.cxx vcl/source/app/dbggui.cxx vcl/source/app/help.cxx vcl/source/app/idlemgr.cxx vcl/source/app/settings.cxx vcl/source/app/stdtext.cxx vcl/source/app/svdata.cxx vcl/source/app/svmain.cxx vcl/source/control/fixed.cxx vcl/source/control/ilstbox.cxx vcl/source/control/spinbtn.cxx vcl/source/filter/sgfbram.cxx vcl/source/filter/sgvmain.cxx vcl/source/filter/sgvtext.cxx vcl/source/filter/wmf/emfwr.hxx vcl/source/filter/wmf/winmtf.hxx vcl/source/filter/wmf/wmfwr.hxx vcl/source/fontsubset/cff.cxx vcl/source/fontsubset/fontsubset.cxx vcl/source/fontsubset/xlat.cxx Change-Id: Ifc4fa21e552a8b031645eb883bdc23563eebb602 Reviewed-on: https://gerrit.libreoffice.org/8357 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>