summaryrefslogtreecommitdiff
path: root/vcl/quartz/salgdi.cxx
AgeCommit message (Collapse)Author
2016-05-25vcl: replace boost::dynamic_bitset with boost::optional<std::bitset>Michael Stahl
The getTTCoverage either leaves the bitset empty or inits it with 128 bits, so it's not particularly dynamic. Change-Id: Iac0aa6a023acc54da86d681e75ca550faf91ef26 Reviewed-on: https://gerrit.libreoffice.org/25456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-11remove unused return type from SalGraphics::SetFontNoel Grandin
Change-Id: I0ca41130f5e1028a70f1242f7af3366b7c57c572 Reviewed-on: https://gerrit.libreoffice.org/24833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-19vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()Chris Sherlock
This brings FontAttributes into line with ImplFont and Font, which is important to the refactoring work I am doing. Change-Id: I08160992834f3732738b40aae9264df00443795a Reviewed-on: https://gerrit.libreoffice.org/21576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-18basebmp now only used from vcl/headless codeCaolán McNamara
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
2016-01-14vcl: change ImplFontMetricData to be reference counted via intrusive_ptrChris Sherlock
Change-Id: Ie9f5fbd21a6223520cbea3af6436beb407d7a88c Reviewed-on: https://gerrit.libreoffice.org/21477 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-12vcl: resplit FontAttributes from ImplFontMetricDataChris Sherlock
The change I made in commit 7b974e056df3 ("vcl: merge ImplFontMetricData with ImplFontAttributes") was... ill-advised. For starters, there really needs to be this split as FontSelectPattern needs it, and PhysicalFontFace only requires the font attributes, not the metric data. So the merge was unfortunately, in my mind, a failure and I'm manually backing it out now. Change-Id: Iac38f0815f984541e2f55099c965376dd88eeb43 Reviewed-on: https://gerrit.libreoffice.org/21380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-12vcl: put FontConfigFontOptions into Unix headerChris Sherlock
Change-Id: I7b326d8fc8d2b6ecd9642ba958015285d0929a44 Reviewed-on: https://gerrit.libreoffice.org/21341 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-12vcl: split off ImplFontCharMap into it's own header fileChris Sherlock
Change-Id: I6173cd191cd771b1f030fa737617b1067278ee10 Reviewed-on: https://gerrit.libreoffice.org/21338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10Cleanup FontCharMapPtr variable prefixesChris Sherlock
Change-Id: Ib106b91ab71ee45d5ad469d0beaf4ebaef8b57e1 Reviewed-on: https://gerrit.libreoffice.org/21306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-10vcl: promote ImplFontAttributes to FontAttributesChris Sherlock
ImplFontAttributes is no longer merely a pImpl (or "compilation firewall", take your pick) but is a fully fledged class in its own right that is used by a number of classes, including FontSelectPattern, LogicalFontInstance and PhysicalFontFace. Thus I'm "promoting" the use of this class in the codebase. Change-Id: I26866080a64796978d1c25efbcd16e3e6f94aaa5 Reviewed-on: https://gerrit.libreoffice.org/21305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-10vcl: (OS X only) Change CoreTextFontData to CoreTextFontFaceChris Sherlock
The base class is called PhysicalFontFace (I believe it was called something like ImplFontData or somesuch before it was changed), and it is really primarily used to provide a factory function to create the logical font instance that LibreOffice can use (i.e. we distinguish between "physical" and "logical" fonts - as physical font is the actual font installed on the system, and the logical font is the one we ask for and have mapped to the physical font face). I also want to provide naming consistency in the class heirachy to enhance code readability, so that's another reason I've changed this class name. Change-Id: Ib7f23da1e3a1db59f4d04f5bb096f490e2958a4b Reviewed-on: https://gerrit.libreoffice.org/21299 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-04vcl: split classes out of metric.hxxChris Sherlock
Change-Id: Id3b155abec7b7a2ff43d0a35e98709f5ee51c6b9 Reviewed-on: https://gerrit.libreoffice.org/21069 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-03vcl: rename variables from metric names to font attribute namesChris Sherlock
Change-Id: Ib0a3d82af858304bf63a20bcb30b8de741491935 Reviewed-on: https://gerrit.libreoffice.org/21054 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-03vcl: merge ImplFontMetricData with ImplFontAttributesChris Sherlock
Change-Id: Ia2fe20559745e705667f23cdd73cbe50c6371aaa Reviewed-on: https://gerrit.libreoffice.org/21053 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-03vcl: convert ImplFontMetricData to accessor functionsChris Sherlock
Changed private variables to use accessor functions in ImplFontMetric. It turns out there are some variables that are redundant as they are already in ImplFontAttributes. These are: - meFamilyType - mbDevice I also needed to change ImplFontMetric::GetSlant() to GetSlantType() as the names conflicted. Change-Id: Ic06a374fb929e3b2ffb18a6c66577c526c3b31a7 Reviewed-on: https://gerrit.libreoffice.org/21050 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-01vcl: remove poor-man's RTTI in PhysicalFontFaceChris Sherlock
The *only* things relying on the in-built magic number are PDFFontCache and PDFWriterImpl. PDFWriterImpl::emitBuiltinFont has as its first parameter a const PhysicalFontFace*, but this is only called upon by PDFWriterImpl::emitFonts, which instantiates an ImplPdfBuiltinFontData object from a built-in font map... so basically it is always guaranteed to get a ImplPdfBuiltinFontData object. ImplPdfBuiltinFontData derives from PhysicalFontFace, so to prevent the need to check the class being used is a ImplPdfBuiltinFontData, just make emitBuiltinFont require as it's first parameter ImplPdfBuiltinFontData! Unfortunately, we can't get around RTTI completely, because PDFFontCache::FontIdentifier requires a way of distinguishing between two different PhysicalFontFaces... Change-Id: I74c8cd294580bbecd12dd2427ac405f97a7e7f7e Reviewed-on: https://gerrit.libreoffice.org/21030 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-31vcl: merge ImplDevFontAttributes with ImplFontAttributesChris Sherlock
ImplFontAttributes handles device independent data, whilst ImplDevFontAttributes handles device dependent data. However, there is no real reason for the divide in classes, and in fact I'm not at all a fan of using a pImpl directly - sort of defeats the purpose of having one! Change-Id: I2db22727e3479b14e3bc37dfad9136703bbdeb13 Reviewed-on: https://gerrit.libreoffice.org/21018 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-31vcl: create accessor functions for ImplDevFontAttributesChris Sherlock
Change-Id: I0494a1db1a1e5c164bd5da2d0a221a8db6c494d6 Reviewed-on: https://gerrit.libreoffice.org/21016 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann
Change-Id: I90a955eb3e485723bb81e7164edcf60f7b0e94c7
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-06-15cppcheck:redundantAssignmentNoel Grandin
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-11Cleanup crossplatform cairoMox Soini
Mac / Win cairo is not built / used, this cairo code can be removed to reduce code bloat. 4th Revised version with Android fixes Change-Id: I6e56850f535ca13b77839b7d67e227c5f39d388e Reviewed-on: https://gerrit.libreoffice.org/16218 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann
Change-Id: I07bf1403e6b992807541a499b786d47f835b2f81
2015-06-05Revert "Cleanup crossplatform cairo"Jan Holesovsky
Unfortunately this breaks Android and iOS. This reverts commit e4d55e8045c99af65a2cae57b26ec076825c9673.
2015-06-04Cleanup crossplatform cairoMox Soini
Mac / Win cairo is not built / used, this cairo code can be removed to reduce code bloat. Change-Id: I758d674291e25e0722f5c66a0096295e903786b1 Reviewed-on: https://gerrit.libreoffice.org/16049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-05-08Remove dead CoreTextStyle::SetTextColorStephan Bergmann
...unclear to me why 507efabe8b40e34c2bebfdaa00d4264c5345d3dd "Resolves: #i124922# allow late setting of the font color..." left it in Change-Id: I741ca3d7eca6fa5dff81af50d91bd6c5d1cba989
2015-05-08Remove trivial CoreTextFontData::CreateTextStyle wrapperStephan Bergmann
Change-Id: Ic57551d9a3590769f97742d41f089dbb3ce248a9
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-01-27rhbz#1177022: vcl: fix PDF embedding of Type 1 fontsMichael Stahl
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 McNamara
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>
2014-11-30move the iOS SalGraphics code back into the OSX oneMarkus Mohrhard
Conflicts: vcl/inc/headless/svpgdi.hxx Change-Id: I4cd9163bcbb8cdee21e5bce3303894923c4238d6
2014-11-16Avoid error: redefinition of 'GetImpl' for iOSTor Lillqvist
Whether this stuff actually works at all for iOS any more I have no idea, and can't be bothered to check in my own time. Why do I bother fixing compilation errors then? Good question. Change-Id: If0ec4fbde42536d3d90e8c5337948815b5f47cef
2014-11-15blind fix for OSXMarkus Mohrhard
Change-Id: I7050057e5fa6da5bb5517713f6cbbfa60e47984b
2014-10-16MAC_OS_X_VERSION_MAX_ALLOWED is always >= 1080 nowTor Lillqvist
Change-Id: Ieae67cbf917cdf4bca2b0d6c1697eddc6137dbe2
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-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-09-15Missing GetImplFontCapabilities -> GetFontCapabilitiesStephan Bergmann
Change-Id: I5fa85ebe407d72654e95075626d8102f037374c7
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-07-01loplugin:stringconcatStephan Bergmann
Change-Id: Ibf410eb1b8be81505b8e778aadf916a26ba39468
2014-05-23Add SAL_INFO tracing for CoreText callsTor Lillqvist
Change-Id: Ie60e0b64a2d9d8a045cb3c59fc781d6f9b2808a0
2014-04-02Kill superfluous vertical whitespaceTor Lillqvist
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-03-31Add SAL_INFOs for very detailed CoreGraphics tracingTor Lillqvist
One would think there would exist some kind of shim library that would automatically provide such traces, hmm. Change-Id: I568d02a2ac70078dee0280d1feb3eab7bbd43030
2014-03-26Seems we don't need any basebmp stuff in AquaSalGraphics on iOSTor Lillqvist
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-20rename ImplDevFontList to PhysicalFontCollectionNorbert Thiebaud
again, convergence of teh naming with what is normally used in the underlying native API, where FontFace ) FontFamily ) FontCollection Change-Id: Ieb098b782ea828a3365f00d07914b9566278caba
2014-03-10Hack on the iOS vcl codeTor Lillqvist
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-26Remove visual noise from vclAlexander Wilms
Conflicts: vcl/source/app/settings.cxx vcl/source/window/dockmgr.cxx vcl/source/window/dockwin.cxx vcl/source/window/floatwin.cxx vcl/source/window/toolbox2.cxx Change-Id: Ie67681549a76e77064b09d4b5bf80fe4c6010341 Reviewed-on: https://gerrit.libreoffice.org/8339 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23CoreText SDK 10.5 compatibilityDouglas Mencken
Change-Id: Ic876ec473b1c03a70c160af4251c68b299b27eca Reviewed-on: https://gerrit.libreoffice.org/7143 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-23Remove unneccessary commentsAlexander Wilms
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-21Adapt vcl to various loplugin warnings on Mac OS XStephan Bergmann
Change-Id: I4553ce218fbcf2ac681b284c71e7d558a451511c