summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2016-12-06loplugin:unnecessaryoverrideStephan Bergmann
Change-Id: Iac074bd6f59d2fc890459b45801d0a6143c3eb9e
2016-12-06convert PolyStyle to scoped enumNoel Grandin
Change-Id: Ia35fdbb5e40888db9558988ac069741b31721f0e Reviewed-on: https://gerrit.libreoffice.org/31633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05unwind sd RID_STYLEFAMILY_IMAGELIST imagelistCaolán McNamara
Change-Id: I1096374eeada6a4ca2ba1acf9f094d6f6d80c3ad
2016-12-05convert FSysStyle to o3tl::typed_flagsNoel Grandin
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05loplugin:unnecessaryoverride (dtors) in sdStephan Bergmann
Change-Id: Ibe339042a523f7c55fbcea68756524fc168e8558
2016-12-05convert E_GRAPH_PROV constants to typed_flagsNoel Grandin
and drop the never checked E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES constant Change-Id: Idd2598c209b34bfa4a58a84ce5ee14a7340d59d4 Reviewed-on: https://gerrit.libreoffice.org/31553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-01tdf#103477 Add unit testMuthu Subramanian
Change-Id: Ic960da6a479523a9255357d5f4cede212ff9c6a2 Reviewed-on: https://gerrit.libreoffice.org/30404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-11-30ScTabViewShell::InnerResizePixel must not mark document as modified...Stephan Bergmann
...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
2016-11-30rename getViewIndependentPrimitive2DSequence..Noel Grandin
to getViewIndependentPrimitive2DContainer to match it's new return type Change-Id: I767bdef45316e355d49f6509ca1b50138a45b3fa
2016-11-29Rewrite some (trivial) assignments inside if/while conditions: sdStephan Bergmann
Change-Id: I55472a12ad235e6a560d60671559a158eefb7c8f
2016-11-29Drop a bunch of font metrics flagsKhaled Hosny
These flags mean nothing these days, there are either always true or always false, since we no longer support bitmap or Type 1 fonts. Change-Id: Ie14ca480225a6346d868a44e58e7666c3a06931d Reviewed-on: https://gerrit.libreoffice.org/31346 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-11-29extensions,sc,sd,vcl: de-obfuscate assignments in conditions to help GCCMichael Stahl
GCC 6.2.1 with -Og produces spurious -Werror=maybe-uninitialized on variables that are assigned in conditions; perhaps it's better to de-obfuscate the code if even GCC is confused about it. Change-Id: Ia2f8209df893a8e5659ca72f4cde3d7d847574e1 Reviewed-on: https://gerrit.libreoffice.org/31332 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-29Use Size::Width/Height instead of inherited Pair::A/BStephan Bergmann
Change-Id: Ie0346d5ec054fbe7eff1d4b73814a5e2b9f654c2
2016-11-29loplugin:vclwidgets check for assigning from VclPt<T> to T*Noel Grandin
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>
2016-11-27typo: Scond -> SecondAndras Timar
Change-Id: Icea85b778375f591583732919a999cb066c40868
2016-11-27tdf#104201: PPTX: Group solid fill is not importedTamás Zolnai
Change-Id: Iec273714108598d7017e73a9e7d384f8410d6ee1 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>
2016-11-25give us a chance to see *which* property failedEike Rathke
Change-Id: I378bce4d8e1f57a51d88a59691d6917f58eedf20
2016-11-25convert FOUND constants to o3tl::typed_flagsNoel Grandin
Change-Id: Ia167ed1abc10188d89e1bd43d7a2b884cb0bf52d
2016-11-25tdf#96052 - export the forbidden shape as path instead of preset shape.Mark Hung
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>
2016-11-24vcl: rename Window::Notify to EventNotifyMichael Stahl
There is annoying overloading between Window::Notify and SfxListener::Notify, and the Window one has apparently fewer implementations, so rename that and remove lots of disambiguating "using Notify" in multiply inheriting classes. Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-11-24use o3tl::typed_flags in ConfigurationListener::ConfigurationChangedNoel Grandin
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-11-24convert SFX_VISIBILITY constants to scoped enumNoel Grandin
* split the position and the flags information * remove unused DESKTOP constant Change-Id: Ibfccb44c7567e89d4527bfd36b3915a73682e6e2
2016-11-24convert SFXWB_ constants to scoped enumNoel Grandin
Change-Id: I63d442e51b7e22093da1c232e1b575bc961c0e69
2016-11-24don't use memset on std::vectorJochen Nitschke
cppcheck warns: > memset( mLayoutInfo, 0, sizeof(mLayoutInfo) );<--- Using 'memset' > on struct that contains a 'std::vector'. [-] mLayoutInfo is an array of LayoutInfo, the struct LayoutInfo holds only a std::vector. remove the memset, as non-POD type LayoutInfo is default initialized. Change-Id: I3924660e39c488abbbc94404016718242c2c0c7f Reviewed-on: https://gerrit.libreoffice.org/31134 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23tdf#42949 Remove unused uno headers from /sd/source/coreBartosz Kosiorek
Change-Id: Idab4a8c35474a973ee98e060b99a5ed679dc14ea Reviewed-on: https://gerrit.libreoffice.org/31098 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-22Probably a more robust way to fix the testKhaled Hosny
Change-Id: Ib62df74ee8a53dac13c0ca8a839096932cf84c20
2016-11-22tdf#55469 Consistent line spacing across platformsKhaled Hosny
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 Bergmann
...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 Grandin
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>
2016-11-21convert inventorId to scoped enumNoel Grandin
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21Kill the AutoPilotPresentations UNO commandGabor Kelemen
The presentation wizard was removed in bb8040595c9b6f0ccde39e6833f27a50abb891d8 but the corresponding UNO command is still available. Change-Id: I54e676672bb53d0283394a0ebffbe9f94f29d9c0 Reviewed-on: https://gerrit.libreoffice.org/30983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-21add missing resource depDavid Tardon
Change-Id: I018d04217dd25661562dde7e4f84ef32c5a3eb6a
2016-11-21add missing deps on ui filesDavid Tardon
Change-Id: I28bb2a33c02d8eadced584d3d3f2b62b2e847324
2016-11-21new loplugin datamembershadowNoel Grandin
Change-Id: Ib14319848bafd1fe7e0e663c434bbdeef5e98ecf Reviewed-on: https://gerrit.libreoffice.org/30963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-20gbuild allow unitest to run once per lang in WITH_LANG_LISTNorbert Thiebaud
this is motivated by the new screenshot feature the initial proposed solution involved running make screenshot once per lang which took ~6 hours for --with-lang=ALL on tb68 a reasonnably big windows slavebot. with this patch, one can run make screenshot just once and get all the screenshot the elapsed time is 36 inutes on the same box/same config a 10x improvement. Change-Id: I4339caebf915c118aa455de2a7e56e1a4e413939 Reviewed-on: https://gerrit.libreoffice.org/30970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-11-20tdf59046 oox: fix incorrectly combined shapesMark Hung
1. Store the path of all polygons of a PolyPolygon in the same path element so it subtract overlapped area. 2. Set the size of the path as the bounding box of PolyPolygon so the points of the polygon scale and offset properly. Change-Id: If6e21d1ac0544b45ef68073cf14bcc08c1d7dbef Reviewed-on: https://gerrit.libreoffice.org/30982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-19tdf#92076 oox - export PolyPolygonShape and PolyLineShape.Mark Hung
1. Export PolyPolygonShape and PolyLineShape. 2. Rename WriteBezierShape to WritePolyPolygonShape because ClosedBezierShape, OpenBezierShape, PolyPolygonShape,and PolyLineShape share the function and all use EscherPropertyContainer::GetPolyPolygon to get PolyPolygon structure and use WritePolyPolygon to write xml tags. Change-Id: I9ffdc26cf1f6fe8ea3b91b7b218d67f9e5585617 Reviewed-on: https://gerrit.libreoffice.org/30972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-18tdf#104015: PPTX import: Title shape does not inherit fill propertiesTamás Zolnai
...from slide master. The problem caused by that PPTX files contains not a one-level master slide set, but has two levels: one called slide master, other called slide layout. Slide layout inherit properties from slide master and normal slide inherit propetries from slide layout. Bug appeared because, slide layout inherited properties were not forwarded to the normal slide. Change-Id: I587582498cf4315087f9a576c1b7fc41ee23e2fd Reviewed-on: https://gerrit.libreoffice.org/30969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-18sd: assert SfxPoolItem::operator==Michael Stahl
Remove the defensive programming here. Change-Id: I27e89fe6e28ee3c0c2821083d825859d10f79bb0
2016-11-18Avoid division by zeroStephan Bergmann
...as happens during CppunitTest_sd_dialogs_test when displaying modules/simpress/ui/headerfootertab.ui: > sd/source/ui/dlg/headerfooterdlg.cxx:782:63: runtime error: division by zero > #0 0x7f270dc78b7f in sd::PresLayoutPreview::Paint(OutputDevice&, Rectangle const&) sd/source/ui/dlg/headerfooterdlg.cxx:782:63 > #1 0x7f274a56bb53 in PaintHelper::DoPaint(vcl::Region const*) vcl/source/window/paint.cxx:307:24 > #2 0x7f274a57be32 in vcl::Window::ImplCallPaint(vcl::Region const*, unsigned short) vcl/source/window/paint.cxx:613:17 > #3 0x7f274a577eee in PaintHelper::~PaintHelper() vcl/source/window/paint.cxx:547:30 > #4 0x7f274a57c305 in vcl::Window::ImplCallPaint(vcl::Region const*, unsigned short) vcl/source/window/paint.cxx:619:1 > #5 0x7f274a577eee in PaintHelper::~PaintHelper() vcl/source/window/paint.cxx:547:30 > #6 0x7f274a57c305 in vcl::Window::ImplCallPaint(vcl::Region const*, unsigned short) vcl/source/window/paint.cxx:619:1 > #7 0x7f274a589f0d in vcl::Window::Update() vcl/source/window/paint.cxx:1310:24 > #8 0x7f274b908d23 in ImplHandlePaint(vcl::Window*, Rectangle const&, bool) vcl/source/window/winproc.cxx:1593:18 > #9 0x7f274b8f9092 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) vcl/source/window/winproc.cxx:2437:13 > #10 0x7f272e3c8662 in SalFrame::CallCallback(SalEvent, void const*) const vcl/inc/salframe.hxx:276:33 Change-Id: I2868a8b0a726544c9edbaab62a8929badf6d3845
2016-11-18Missing XComponent.dispose calls in screenshot testsStephan Bergmann
Change-Id: I5df25a16303719593d40f08d1e7c15e4636a2d02
2016-11-18includes should be at the top of the fileNoel Grandin
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17tdf#103876: PPTX import: Title shape's character properties are wrongTamás Zolnai
Text properties are applied on a shape during text insertion, but if a placeholder shape has no text, then it has a placehodler text which should have the right text properties. Change-Id: I54175d52dd25915ee4d7153298e01ec07c6be1f6 Reviewed-on: https://gerrit.libreoffice.org/30881 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-17tdf#103950 Undo does not revert bundled font size changes for table cellsNoel Grandin
Change-Id: Id41b7777739bfa93610f955e6c31f8bb979b8e2c Reviewed-on: https://gerrit.libreoffice.org/30902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-17loplugin:unusedfieldsNoel Grandin
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17chmod -xTor Lillqvist
Change-Id: Ie07ef2f9e9f6d0b31b513afa913b79d9c641e4f1
2016-11-17loplugin:datamembershadow in StyleSheetUndoActionNoel Grandin
Change-Id: Ic4de30f7e9582078562b661545ac23fe9927f83d Reviewed-on: https://gerrit.libreoffice.org/30903 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>