summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)AuthorFilesLines
2017-03-01tdf#104222: Put expensive debug code behind #if againMatúš Kukan1-0/+7
dump_pset calls very expensive SdGenericDrawPage::getPropertyValue doing something with GDIMetaFiles. (regression from 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38) (cherry picked from commit 9cbe69f1950115e47af693bd78fc78f96f9b508e) Change-Id: If39e9a451c87754343d77c8a1f840153c6b9de80 Reviewed-on: https://gerrit.libreoffice.org/34643 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit bc3b23f9c07aa2916c648abf1ca8c2af297250d4)
2017-02-28lok: these are not always plain asciiPranav Kant1-1/+1
Change-Id: I9783b6b2839805189015dbad8a97128c89e0a4a9 (cherry picked from commit 46b5dff4db336df2ff6496d91b0a2c559c6a9592)
2017-02-28sd lok: Support editing annotations by id + unit testPranav Kant4-1/+68
Change-Id: Id4faf59eab8c72a2d78157bca15a5e07f9622dde Reviewed-on: https://gerrit.libreoffice.org/34512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk> (cherry picked from commit 1b4ce7cd8e4c1e1732ee6434cadd29cb23583a54)
2017-02-28sd lok: Include parthash in annotation list and callbacksPranav Kant5-1/+18
... and update the tests accordingly. Change-Id: Id11f2d19274e743b0e2a0bbeb0c21936f12b7777 (cherry picked from commit ede35e5c693a287f31e3c02d8afd33580e827380)
2017-02-28sd lok: use per view author in annotations reply tooPranav Kant1-3/+10
Change-Id: Ibc727b54ebfcbdd1c95b679a35ddc8878ceecbfd (cherry picked from commit 7cc5aca1901ca7d67dffdcfc29537f32c31e0235)
2017-02-28sd lok: Don't rely on model notify eventsPranav Kant1-10/+37
Place comment notification triggers at the end of the annotation insertion/modification function to accomplish the desired behavior. See inline comment for details. Change-Id: I0cbd51feb455d497826d6a4534a8bbd817be7b31 (cherry picked from commit b02416ea4742873153227b6eaca00a15e7335987)
2017-02-28sd lok: Unit tests for comments apiPranav Kant1-3/+108
Change-Id: I88a5cbc952a1ddc2f8ccd5f34b86bf797916171c (cherry picked from commit 1654980341cff652de65d3b2aed52230e781e63a)
2017-02-28tdf#84323: Make osl::Condition::wait more readableFakabbir Amin1-5/+6
Improved readability of calls to osl::Condition::wait. Change-Id: I69fb9815561013f1eb9fd4a649e32902e09473c6 Reviewed-on: https://gerrit.libreoffice.org/34399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 12fc1d5399a688a80eec2565a4b552377e428ab7)
2017-02-28tdf#105502 sd increase font size: handle table selectionMiklos Vajna2-0/+53
In part of a table shape is selected, then only operate on the selected cells, not on all of them. Change-Id: I3a9ba2b99bcaa2e355b6fcdafdd142d4a809bce6 Reviewed-on: https://gerrit.libreoffice.org/33524 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit cbc84a6599c08e5c79e544212c69c6946d0cdbf0)
2017-02-28sw, sd: fix indentationMiklos Vajna1-1/+1
The indentation in these files is consistent otherwise, let's keep it that way. Change-Id: I1d73caa03425cd4d1c98ff07935512b002fb2c72 (cherry picked from commit d74e3b5bc43635c8c86988884b97929c3b086732)
2017-02-28New loplugin:conststringvar: sdStephan Bergmann4-11/+11
Change-Id: I7aa74260f1456a22bae368738e3947ead1ecc7be (cherry picked from commit 5637e56cc68b36c9a9484580e9053cca5c04a771)
2017-02-28tdf#81754: Unit test for the loss of text on save of pptx.Jan Holesovsky3-1/+41
The problem itself was fixed by commit 2ad50c9a8c8411a57bbbd7a52734e72ffc4cc0ee. Change-Id: Ie7f0781e1f5a4d6c5297882a5f64a68b85558515 (cherry picked from commit 6106fea591f685bc1fd5b65ade86e2e45dbc58e1)
2017-02-28Indentation fixesMiklos Vajna1-5/+5
Change-Id: I35de0c30a3f4f82bc923e467d5f0acf0ed90684f (cherry picked from commit a215174eba5962abcef10a5a1a852fdc9364105b)
2017-02-28sd lok: Implement comment callback notificationsPranav Kant1-0/+44
Change-Id: Ibd3d2467a4bbac520987fa71a6d14994f58dd055 Reviewed-on: https://gerrit.libreoffice.org/34460 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk> (cherry picked from commit 3d10c608b05f648c5ff09f68a76b88090572b831)
2017-02-28sd lok: Support for replying to annotations by idPranav Kant1-1/+14
Change-Id: I9e6416b87300c20969669ee9592f0b560959e160 Reviewed-on: https://gerrit.libreoffice.org/34459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk> (cherry picked from commit 357fae01a15b88a53873278cccb1040b4d46bdba)
2017-02-28sd lok: Allow specifying text in the insert uno commandPranav Kant2-5/+24
Change-Id: Ia352f0ec073449422e7d0b1327bb85d9b04356c0 (cherry picked from commit 2c58754fac268fe41c892e049a6a7a28e717cd72)
2017-02-28sd lok: Support deleting annotations by idPranav Kant2-2/+36
Change-Id: Id415fcbe8ad478c022bce23158699a17f031c1f9 (cherry picked from commit 2613e93bd2e4f467214ae519e5472035c351eec5)
2017-02-28sd: Superfluous conditionPranav Kant1-8/+4
Change-Id: Ice8c5937e208880083b45d11aedcc3cb4a9f3c10 (cherry picked from commit 2acb622631453a3e4b74991986618ba161d9e4b8)
2017-02-28sd lok: Use IDs in ViewAnnotations outputPranav Kant3-1/+13
Change-Id: Ifb1f55ad5a1d21d63f9b37a83e3218c40dfa0b59 (cherry picked from commit 80d1ada96010a943ff1793139d176086f4598d98)
2017-02-28sd: Give ids to each annotationPranav Kant1-0/+7
We want to refer to these annotations using these IDs from LOK clients, for example, to delete or modify them via the LOK API. Change-Id: I8f516977ece098713bdbf63f15575ae2ded1d2d2 (cherry picked from commit 46be94e3dc721d936de9699c1e24e5853b00c0fd)
2017-02-28sd lok: Implement ViewAnnotations commandPranav Kant2-0/+39
Change-Id: I87dde393adc82dc59c08ec96d1fd79145de6f3c6 (cherry picked from commit c3b26856cc4d69bc206dc56e0b6a47d9cf4afb6c)
2017-02-28sd lok: Disable comments if requiredPranav Kant1-0/+9
Change-Id: Ic321bb9d35f5db3d2fbeb9f183aaa48da23002f3 (cherry picked from commit fbb171357048dc5ef52faec118327e68d423fa91)
2017-02-28sd lok: use stored per view author namePranav Kant1-4/+12
Change-Id: I8b56a7d6aeb9d98d42cb1c07cd347d1171762b08 (cherry picked from commit 5556b6e9ad791fc31ef4428ec7dd342c5e0e5482)
2017-02-28sd: Per view author namesPranav Kant2-0/+5
Change-Id: Ie7146ec289263eb3240a4b9270c4a88837ebd2ad (cherry picked from commit b46f3cd56fc5bcd419d79d1f615c3e1921ec5bb0)
2017-02-24tdf#99908: Ensure non-empty unique gradient namesKatarina Behrens2-4/+17
for user-defined (!preset) gradients. ODF doesn't cope with nameless gradients so well ... Change-Id: I7a4ca32ccf58b22fc55ceeac8778029cd6d5cea3 Reviewed-on: https://gerrit.libreoffice.org/34001 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 529162307e9d6191fe43d50597504474b2c1a5ba) Reviewed-on: https://gerrit.libreoffice.org/34335 Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit e28fd26d69553733778a86c84cd74e284a079e15)
2017-02-24fix crash in the sidebar codeMarkus Mohrhard1-1/+1
The check should be for xPanel and not xPanels. See http://crashreport.libreoffice.org/stats/signature/sfx2::sidebar::Panel::GetTitleBar() Change-Id: I745d6d8abbfc68e86ed812460faa551867ddec43 Reviewed-on: https://gerrit.libreoffice.org/34560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 0407200401358d3d565438800f55b61fc1a61794) Reviewed-on: https://gerrit.libreoffice.org/34563 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit ed8b8f59e1a85b455a2f8daebd2c1f6fb59faeaa)
2017-02-24don't lock sidebar size due to long master slide namesCaolán McNamara2-3/+17
Change-Id: I90cbae1cbdea10d5c9bb6678535f73e8419bf8cb (cherry picked from commit ea1b27b3b579fd2896c5e054422e909c6739ad86) and... let content widgets of sidebar slide bg fill available space so if its expanded more of the master slide name can be shown Change-Id: I7dcb28e1958edf8ab7fcc03fb77c4b6a9f461ad1 (cherry picked from commit 8fcb253f706d0543e1c2eeb816f74d96cafdc6e2) Reviewed-on: https://gerrit.libreoffice.org/34548 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 26b8ac1fddd43af3e864c7bcc3414074e54a7bf2)
2017-02-18loplugin:vclwidgets check for assigning from VclPt<T> to T*Noel Grandin17-46/+45
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit e6ffb539ee232ea0c679928ff456c1cf97429f63)
2017-02-17Test that patterns are correctly imported for MS binary formatTomaž Vajngerl2-0/+339
Reviewed-on: https://gerrit.libreoffice.org/32854 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 0b87e17a4e122d53a765a9db2ae54908e0803b65) Change-Id: I8335ee35bae11c8014d6591744199e55bc3ec41b
2017-02-10i#124243 sd: add unit test for ODF import of glue points on SVG shapeMichael Stahl3-1/+52
Change-Id: Ib6434063f4dfebb5f3e180c7136b411dbf0d94d0 (cherry picked from commit dbc31190532be3d3f0d8fb313b9d7247c2eb6135) Reviewed-on: https://gerrit.libreoffice.org/34086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-10tdf#103567 xmloff: ODF import: fix loss of events on SVG multi-imageMichael Stahl2-0/+47
For SVG there are 2 draw:image children in the draw:frame, and the SdXMLEventContext::EndElement() applies the content of office:event-listeners to the shape created from the last draw:image and then MultiImageImportHelper::solveMultipleImages() throws it away because it's the bitmap fallback of the SVG. Avoid that problem by calling solveMultipleImages earlier: The ODF schema ensures that all the draw:image elements occur before the optional property-bearing child elements of draw:frame, so we just call solveMultipleImages on the first such optional element, so that all subsequent properties get applied to the one surviving shape. (likely regression from 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70) Change-Id: I2be5f6f424dbfd90ca2179ce6f9057929540e762 (cherry picked from commit 791431d7e2485652c96fac7c15f47aa125271ee0) Reviewed-on: https://gerrit.libreoffice.org/34084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-09animation duration/scale etc don't fill horizontal spaceCaolán McNamara1-0/+4
Change-Id: Ie211827c2f8231384b98fb08e0371a839e3dc41c (cherry picked from commit d18089ec0a2a8758eda889a7b9b23b66128484d5) Reviewed-on: https://gerrit.libreoffice.org/33996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-07tdf#31488: Background fill changes its color when saving a PPTX file to ODPTamás Zolnai2-0/+34
For a gradient fill we need to generate a name because ODP export works with this name. In case of shapes it works because when fill attribute changes some internal name generation is triggered. The same thing doesn't work for slide background so generate this name explicitely in oox code. Reviewed-on: https://gerrit.libreoffice.org/33937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit aeece6f198685b96579bdbd1409b3535fb5f09d1) Change-Id: Ic6ebf37ef3d66a9c274747ca04653363b1fe6d02 Reviewed-on: https://gerrit.libreoffice.org/33941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-30tdf#105502 sd increase font size: handle table selectionMiklos Vajna1-0/+43
In part of a table shape is selected, then only operate on the selected cells, not on all of them. (cherry picked from commit cbc84a6599c08e5c79e544212c69c6946d0cdbf0) Conflicts: sd/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: I3a9ba2b99bcaa2e355b6fcdafdd142d4a809bce6 Reviewed-on: https://gerrit.libreoffice.org/33553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-26tdf#101828 handle rtf/richtext correctlyOliver Specht5-7/+16
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 048e30c1f8231e6cd144a9251061f6fa127b353e) Reviewed-on: https://gerrit.libreoffice.org/33567 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-16tdf#105188 sd: fix shutdown crash after accessing master pagesMichael Stahl4-23/+29
The problem here is that the destructor of SdModule does a lot of things, including destroying an SdXImpressDocument that is referenced from some SdGlobalResourceContainer. This calls SD_MOD() to get the SdModule to get some resource, but at that point SfxApplication::GetModule() returns null, because the sequence was changed from first deleting the SfxModules, then clearing the pointer in ~SfxModule to null, to unique_ptr::reset(), which, at least in libstdc++, is implemented via std::swap, so it clears the pointer before deleting the SfxModule. It appears rather brittle to rely on such a subtle detail, so refactor things so that SdGlobalResourceContainer is no longer owned by SdModule but has its own pet XTerminationListener, which means it will be destroyed earlier, while the SdModule is still fully alive. (regression from f7b1cd66167050afecf487e3d89ea12de74200b5) Change-Id: I7f03f3adf431be8728ef3d65a078b536cb96f959 (cherry picked from commit 983ac87793a891855c7d25c42fe795908543716c) Reviewed-on: https://gerrit.libreoffice.org/33033 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-11tdf#105182 sd: avoid iterating too far in SdOutliner::Initialize()Michael Stahl1-1/+4
Considering the valid indexes are extended by "-1" for backwards iterators and "size()" for forward iterators, it's obvious that a not-yet-at-the-end-in-the-other-direction iterator can be incremented once, but not necessarily twice. Why this code even wants to increment it twice isn't obvious to me. Change-Id: I578c8c6202049ebe6dbed41b8276a6bfa0566bbc (cherry picked from commit aa1ee198b5b55d0a92418eb3294c93553e8513dd) Reviewed-on: https://gerrit.libreoffice.org/32973 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-01-11tdf#105199: Keep URL intactStephan Bergmann1-1/+1
Change-Id: I85681fcc81246414332f88dc46ce4a4b60896c97 (cherry picked from commit 6a68e364faa0d384f1e3bf397f5decaadecf9b3b) Conflicts: sd/source/ui/dlg/PhotoAlbumDialog.cxx Reviewed-on: https://gerrit.libreoffice.org/32930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-11Related tdf#100151: use disposeAndClear for mpShowWindow (sd)Julien Nabet1-1/+1
See https://bugs.documentfoundation.org/show_bug.cgi?id=100151#c33 Change-Id: I81e483189eacee086b680367148f8dd3ca2d3493 Reviewed-on: https://gerrit.libreoffice.org/32904 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit bce35b8e13b0d82ba54bf3d380f448dad0ee13bb) Reviewed-on: https://gerrit.libreoffice.org/32947
2016-12-22should be sd icon, not scCaolán McNamara1-1/+1
Change-Id: Ib12d6b821e27cedf324e16c548254099b100fd3e (cherry picked from commit a0c1e7bc8e8836d4f47d9cdeabc8b2cdfdf2345b)
2016-12-21tdf#104046 - Slides in the slide pane don't update in realtimeNoel Grandin14-182/+55
This appears to be a consequence of my change commit 942716fee138b68c2af9411384f402b5692a88b2 convert EID constants to typed_flags in that change I made a "fix": @@ -689,20 +687,20 @@ void EventMultiplexer::Implementation::CallListeners (EventMultiplexerEvent& rEv ListenerList::const_iterator iListenerEnd (aCopyListeners.end()); for (; iListener!=iListenerEnd; ++iListener) { - if ((iListener->second && rEvent.meEventId)) + if (iListener->second & rEvent.meEventId) iListener->first.Call(rEvent); } } which causes this bug. I should have noticed that my "fix" indicates that the event filtering part of this multiplexing code was never working, and since no-one has ever complained about, lets just remove all of this unnecessary complexity. Change-Id: Id71613d4fd5817ee1358705059e4ce63d57573ad Reviewed-on: https://gerrit.libreoffice.org/31894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 69f6fbb5d0ad87c85e0236a7fece107b69eb8b8b) Reviewed-on: https://gerrit.libreoffice.org/32114 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-09tdf#104445: PPTX import: Extra bullets are added to placeholder textTamás Zolnai2-0/+53
Reviewed-on: https://gerrit.libreoffice.org/31771 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit cb598029835477326b190bc99abd31a487cc5a91) Change-Id: I25ce98ed391f70292bed6238645b121b9cf50d5e Reviewed-on: https://gerrit.libreoffice.org/31788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-12-08tdf#104405 Clone Formatting ignores vertical text alignmentNoel Grandin2-0/+1162
Reviewed-on: https://gerrit.libreoffice.org/31623 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit d36aa2ba3132ce62a370b7260ca620642cbf7dbf) Change-Id: I56cce69ddb21f7f9336b8f59e181e91306e92019 Reviewed-on: https://gerrit.libreoffice.org/31746 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-11-30ScTabViewShell::InnerResizePixel must not mark document as modified...Stephan Bergmann2-2/+2
...when merely toggling the edit mode of a Calc document embedded in another document (via "Insert - Object - OLE Object... - LibreOffice 5.4 Spreadsheet"). Interestingly, none of the other document kinds seem to have this problem. (Maybe it's even unhelpful that ScTabViewShell::InnerResizePixel calls SetDocumentModified() at all?) Anyway, pass this inplaceEditModeChange information down there. Change-Id: Iffb24b068419e3608c9f4b5e9645e44e1716aafe (cherry picked from commit 424d17e62e0d670aa79a890f85bb98c19169f9f5) Reviewed-on: https://gerrit.libreoffice.org/31428 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-27tdf#104201: PPTX: Group solid fill is not importedTamás Zolnai2-0/+36
Reviewed-on: https://gerrit.libreoffice.org/31263 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 7c5aaa254f444d54b9ebf6574f0ccd37af548ee5) Change-Id: Iec273714108598d7017e73a9e7d384f8410d6ee1 Reviewed-on: https://gerrit.libreoffice.org/31266 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-27tdf#96052 - export the forbidden shape as path instead of preset shape.Mark Hung1-2/+0
OOXML noSmoking shape has different definition so that convert LO's forbidden shape to OOXML noSmoking do not produce good result. I put it on whitelist and now the geometry looks correct although handle is lost. This partially revert unit test for the shape in 2b4f9d0b2b0006fc7bebb9e696a32eabd1aeb993, where forbidden is exported as a preset shape. Change-Id: I2e134940fa4a36e6b7b814b008d859691fbcdd6a Reviewed-on: https://gerrit.libreoffice.org/31110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit b6f52c5c6bc57d831e09126f802739589e5eea37) Reviewed-on: https://gerrit.libreoffice.org/31226
2016-11-22Probably a more robust way to fix the testKhaled Hosny1-2/+1
Change-Id: Ib62df74ee8a53dac13c0ca8a839096932cf84c20
2016-11-22tdf#55469 Consistent line spacing across platformsKhaled Hosny1-0/+1
We current use platform APIs to calculate line spacing, however different platforms behave differently: * FreeType and Core Text will prefer hhea table over OS/2, and OS/2 Typo metrics over Win ones. * GDI’s TEXTMETRIC only uses OS/2 Win metrics, while NEWTEXTMETRIC seems to use Typo one, but we use only the old TEXTMETRIC. So we get inconsistent line spacing and we have no control which of three competing sets of line spacing metrics we end up using. The current conventional wisdom is that: * hhea metrics should be used, since hhea is a mandatory font table and should always be present. * But if OS/2 is present, it should be used since it is mandatory in Windows. OS/2 has Typo and Win metrics, but the later was meant to control text clipping not line spacing and can be ridiculously large. Unfortunately many Windows application incorrectly use the Win metrics (thanks to GDI’s TEXTMETRIC) and old fonts might be designed with this in mind, so OpenType introduced a flag for fonts to indicate that they really want to use Typo metrics. So for best backward compatibility: * Use Win metrics if available. * Unless USE_TYPO_METRICS flag is set, in which case use Typo metrics. This patch does this by reading the hhea and OS/2 tables directly and implementing the algorithm above. Quick comparison with Microsoft Office 2016 shows similar line spacing as the new line spacing here, so I guess we are improving compatibility as well. Change-Id: I4541e67e3e14508e3529e73083056a09de02e637 Reviewed-on: https://gerrit.libreoffice.org/31053 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-11-22Destroy item sets in SdDialogsTest::tearDownStephan Bergmann1-0/+3
...as they apparently hold raw pointers to objects destroyed early, so only destroying the item sets in the SdDialogsTest dtor caused use-after-free crashes during shutdown. Change-Id: Ibe3848c81a56fb0db4bf1fca0eab35836aab6a66
2016-11-22remove some more global OUStringsNoel Grandin5-16/+4
Change-Id: Ic02754f98bfda3b7cd8c06857123d363a96e8d0e Reviewed-on: https://gerrit.libreoffice.org/31071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>