summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-01-25Resolves: tdf#94457 our EmfPlusSetPageTransform is malformedCaolán McNamara
we write a single short, resulting in a record of 0x000C in length MS-EMFPLUS spec has EmfPlusSetPageTransform as 0x0010 in length because we're not writing the 4 byte PageScale value. the previous pageunit unit we are writing is of value 1, which is UnitTypeDisplay, the same spec says... "The unit of measure for page space coordinates, from the UnitType enumeration. This value SHOULD NOT be UnitTypeDisplay or UnitTypeWorld" and footnotes that with... "Windows never writes those values to the PageUnit field, but they are accepted with undefined results." Change-Id: Ic8b5ec463b59aab28ae9897947dfcdbd35b22048 Reviewed-on: https://gerrit.libreoffice.org/33548 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25ofz: xpm parser is too slowCaolán McNamara
and keeps timing out on documents, this takes my example pathological case from a callgrind cost of 40875 to 1292 million, and as a side effect rhbz#1051121-xpm now look right Change-Id: I840705007acf329579f270c390328f80190c19e7 Reviewed-on: https://gerrit.libreoffice.org/33532 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25move Image ctor variant with mask color to callersCaolán McNamara
Change-Id: I81a52aeb855edca823881360831b26e252780053
2017-01-25return earlyCaolán McNamara
Change-Id: Ia8504fdbc952b1e116bdca135a063d4d98be92be Reviewed-on: https://gerrit.libreoffice.org/33531 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25appears to be a missing break hereCaolán McNamara
Change-Id: Ifb04133b1946303879bf860003749996512bec91 Reviewed-on: https://gerrit.libreoffice.org/33530 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25Resolves: tdf#104598 make bright theme shadow the same as it always wasCaolán McNamara
The shadow color was originally set via StyleSettings::Set3DColors taking the background color as the input, and doing DecreaseLuminance(64) on it to make the shadow color So, continue to follow that mode if the "dark shadow" is darker than the foreground, and IncreaseLuminance the equal amount the other direction for dark themes. This way under a dark theme the problem of impossible to see rulers of tdf#90214 is still fixed, while the bright theme colors are the same as they always were, which avoid the wearing-on-the-nerves "regression" problem. Change-Id: I33133ff180ecadce3a14ee45bd33db73c56c0225
2017-01-25ofz#463 unable to mmapCaolán McNamara
Change-Id: I509faeda019f42bbe7cdc5fc249f2ea2076bb702 Reviewed-on: https://gerrit.libreoffice.org/33519 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25Fix typo in comments: relativ -> relativeTakeshi Abe
Change-Id: I58833e503e93b8057f92710c5828bba6cecd4e09 Reviewed-on: https://gerrit.libreoffice.org/33488 Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp> Tested-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-01-24add psd fuzzerCaolán McNamara
Change-Id: I8969e9f5020a6c1957b7f326e5dcca52915ddd4f
2017-01-24can use memcmp here, for hopefully a little import boostCaolán McNamara
Change-Id: I5084eff570a66cc2596b400cbb83d1eb24889f0b
2017-01-24return earlyCaolán McNamara
Change-Id: Ic95f968bcd7acdde170a1128a512f03f77e334cf
2017-01-24loplugin:useuniqueptrStephan Bergmann
Change-Id: I502ebf4024cd9b0ee61d58d6b6a8e342c7ceac08
2017-01-24coverity#1399552 Unintended sign extensionCaolán McNamara
and coverity#1399551 Unintended sign extension Change-Id: Iedf7edf35f8b7985860fc254597776fbc1f561f5
2017-01-23drop one of the Image ctorsCaolán McNamara
Change-Id: I51178fa30418136d4e5d266715d450f1c967167c Reviewed-on: https://gerrit.libreoffice.org/33475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-23Change all Idle* LINKs to be Timer*Jan-Marek Glogowski
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles Link in the Timer class. Now there are two possible solution: 1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or 2. split the inheritance of Idle from Timer again to maintain different Link<>s and move all common code into a TimerBase. While the 1st is more correct, the 2nd has a better indicator for Idles. This implements the first solution. And while at it, this also converts all call sites of SetTimeoutHdl and SetIdleHdl to SetInvokeHandler and gets rid of some local Link objects, which are just passed to the SetInvokeHandler call. It also introduces ClearInvokeHandler() and replaces the respective call sites of SetInvokeHandler( Link<Timer *, void>() ). Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-22coverity#1399045 Untrusted value as argumentCaolán McNamara
Change-Id: Icac88c7b439036434cbf2352ac50e954139db4ce
2017-01-22wrong streamCaolán McNamara
Change-Id: I4e890ab80ed4ddb24b0fd41dae12264c99fb1477
2017-01-22return early on not goodCaolán McNamara
Change-Id: I4aca6cb1c3dae652595b93ff7507db713a668d5f
2017-01-22move loop variables to loopsCaolán McNamara
Change-Id: I914206bad88fb3c405a335c2926fb51e39b7857e
2017-01-21coverity#1399156 split ImplCreateSwapInfo and ImplClearGraphicsCaolán McNamara
Change-Id: Iab449967c70a55c03c3e6b95de8e7d973cb68089
2017-01-21coverity#1399017 Unchecked return valueCaolán McNamara
Change-Id: I67a8b8b5f63d3a44dc1df5c848da5797a6c20646
2017-01-21move GetXGraphic to its only userCaolán McNamara
Change-Id: I72ec4a7e72ca3355a97f987fab70b3e3a8e45168
2017-01-21This does not seem to be neededKhaled Hosny
Change-Id: I3f9a447478062ad4cfbf7bfadfd3fe73523de847
2017-01-21Move these defines to the only file using themKhaled Hosny
Change-Id: Ic3a32f6b420c3822ba96f57292f67f0327b16581
2017-01-20warn about unused ImagesCaolán McNamara
Change-Id: I5502b28411282354019af51a09c860099c652006 Reviewed-on: https://gerrit.libreoffice.org/33348 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-20drop pointless pointer for referenceCaolán McNamara
Change-Id: Ia2c32bab6825687d4964e7a6abaa137bb48b3a3c
2017-01-20split GetImageForCommand into GetBitmapForCommand and coCaolán McNamara
Change-Id: I89431532ef26fc33146252e218096e690825b896
2017-01-20every ImplImage has a BitmapExCaolán McNamara
Change-Id: I02561cfdff57eab7684d68c98ba2b3d83847c9c5
2017-01-20svmtest: don't output GDIMetaFiles to disk in normal test runsTomaž Vajngerl
Change-Id: I15deee62dc4b715ecdb69d2dd0370cfc8650d8e8 Reviewed-on: https://gerrit.libreoffice.org/33345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-01-20loplugin:dynexcspec (macOS), vclStephan Bergmann
Change-Id: I83dfd406eefe9d50fa382eede45882abe669bc96
2017-01-20Apply stricter member access control for TasksJan-Marek Glogowski
This disallows changing mbAuto and changing values of ImplSchedulerData outside of Scheduler / Task functions. Change-Id: Ia624999bd63190c072eb66427aec38e7ac8cfa1b Reviewed-on: https://gerrit.libreoffice.org/33317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-01-20Images no longer loaded from resource filesCaolán McNamara
Change-Id: I7155a2c8280b9f511402b908f06470dec419b336
2017-01-20loplugin:dynexcspecNoel Grandin
Change-Id: Ibd8cb023d6b782cabaf8b1b4604205a691ca23b1
2017-01-19New loplugin:dynexcspec: Add @throws documentation, vclStephan Bergmann
Change-Id: Icc398ec6cbb9152ee86b4ac0003619ae04206cd6
2017-01-19silence warning spew, these aren't seriousCaolán McNamara
Change-Id: I8c027a5ec0ed61722eb299d247d79032fd1dcd84
2017-01-19Expand and improve the output log in Session-ManagementJuergen Funk
in dependency of tdf#104101 Change-Id: I799f81adf4e4751fb505c84aa075363acf70f5a7 Reviewed-on: https://gerrit.libreoffice.org/33034 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-01-19vcl: Fix a small chance of memleaksTakeshi Abe
Change-Id: I4fe286486f9cad57c4220d10367442a51f077f00 Reviewed-on: https://gerrit.libreoffice.org/33294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-19Resolves: tdf#105416 blank windows under HiDPI RTLCaolán McNamara
Change-Id: I819f06babd448c37ce2d58297562b640aba1c8c6
2017-01-18Resolves: tdf#98593 buttons in writer show different text at different zoomsCaolán McNamara
The DrawControlText always renders with a reference device positions but we pass in a rectangle which is derived a different way. So, add a GetControlTextRect which operates on the same reference device as DrawControlText so the rectangles match The rectangle is mapped from pixels to logic and back from logic to pixel, so add an argument to store the logic size from GetControlTextRect and re-use it without conversion on the cases where we pass back the original rectangle zooming in/out on the button in writer is now stable wrt text shown at all zoom levels Change-Id: Ic581eca67d0ff265e2753ab8b6c40e8fca7e6ae4 Reviewed-on: https://gerrit.libreoffice.org/33277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-18change DrawControlText to return new rect rather than change old oneCaolán McNamara
Change-Id: Id5c80ff263e429d4239a844db216e87a656edb2e
2017-01-18Ref...DeviceTextLayout::GetTextArray is only called by Ref...DeviceTextLayoutCaolán McNamara
so set it as private to de-confuse this a little Change-Id: Idde7f78a767227cc2d52e417b6c39d12e1339745
2017-01-18fix up stubCaolán McNamara
Change-Id: I17cb60fa1dd55667a15a7dbc50532993c3145244
2017-01-18tdf#102139 : avoid switching to the empty tab after exiting the OLE ObjectSzymon Kłos
Change-Id: I67c395106d2a24c679cddaddd9aba138388463a5 Reviewed-on: https://gerrit.libreoffice.org/33237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2017-01-18don't need so many bracketsCaolán McNamara
Change-Id: I6488bf57af2e7ae9aadd340dc0ef2467f0ea5111
2017-01-18ofz: reduce scope, check stream, validate nActionsCaolán McNamara
Change-Id: Ie420ad40b0d852708828620cd26c2f746398f5a8
2017-01-18TODO: fix reindentation below if you can accept being blamed by the SCMCaolán McNamara
Change-Id: I853c2a12c7f49b9562d348409726c10d977a6619
2017-01-18bodge the ms_MY currency for fuzzing stubCaolán McNamara
Change-Id: I6f2c6c1873a771188d4d2e06b8fb4a6376cf2cc4
2017-01-18pdf export: make FontIdentifier comparison strict weak ordering.Mark Hung
VS Runtime Library debug assertion failed "Expression: invalid operator<" when exporting attachment of tdf#98879 to pdf. The document uses both vertical and vertical fonts. Change-Id: I4a2c519c539c28515cac876298be820cad8b9014 Reviewed-on: https://gerrit.libreoffice.org/33082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-17GTK3 getTransferDataFlavorsAsVector: Filter out non-MIME-typesStephan Bergmann
...that would cause needless (though caught, so not causing real harm) exceptions downstream, as in > #0 0x00007ffff6a2d4dd in __cxxabiv1::__cxa_throw(void*, std::type_info*, void (*)(void*)) (obj=0x7c60480, tinfo=0x7ffff7b0c940 <typeinfo for com::sun::star::lang::IllegalArgumentException>, dest=0x7fff81733b80 <com::sun::star::lang::IllegalArgumentException::~IllegalArgumentException()>) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:63 > #1 0x00007fff817318c5 in CMimeContentType::acceptSym(rtl::OUString const&) (this=0x7fff4617b608, pSymTlb="/") at dtrans/source/cnttype/mcnttype.cxx:113 > #2 0x00007fff817317de in CMimeContentType::type() (this=0x7fff4617b608) at dtrans/source/cnttype/mcnttype.cxx:148 > #3 0x00007fff81730bf6 in CMimeContentType::init(rtl::OUString const&) (this=0x7fff4617b608, aCntType="INTEGER") at dtrans/source/cnttype/mcnttype.cxx:95 > #4 0x00007fff81730a5d in CMimeContentType::CMimeContentType(rtl::OUString const&) (this=0x7fff4617b608, aCntType="INTEGER") at dtrans/source/cnttype/mcnttype.cxx:35 > #5 0x00007fff8172daee in CMimeContentTypeFactory::createMimeContentType(rtl::OUString const&) (this=0x7fff46165e48, aContentType="INTEGER") at dtrans/source/cnttype/mcnttfactory.cxx:50 > #6 0x00007fff8172dbe3 in non-virtual thunk to CMimeContentTypeFactory::createMimeContentType(rtl::OUString const&) () at instdir/program/../program/libmcnttype.so > #7 0x00007fffeecc97e1 in TransferableDataHelper::FillDataFlavorExVector(com::sun::star::uno::Sequence<com::sun::star::datatransfer::DataFlavor> const&, std::__debug::vector<DataFlavorEx, std::allocator<DataFlavorEx> >&) (rDataFlavorSeq=uno::Sequence of length 23 = {...}, rDataFlavorExVector=std::__debug::vector of length 1, capacity 1 = {...}) at svtools/source/misc/transfer.cxx:1221 > #8 0x00007fffeecc894e in TransferableDataHelper::InitFormats() (this=0x7fffffffa698) at svtools/source/misc/transfer.cxx:1308 > #9 0x00007fffeecc8722 in TransferableDataHelper::TransferableDataHelper(com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> const&) (this=0x7fffffffa698, rxTransferable=uno::Reference to (GtkClipboardTransferable *) 0x7fff46181718) at svtools/source/misc/transfer.cxx:1128 > #10 0x00007fffeecd00bd in TransferableDataHelper::CreateFromSystemClipboard(vcl::Window*) (pWindow=0x1675000) at svtools/source/misc/transfer.cxx:2118 > #11 0x00007fff9f267777 in SwBaseShell::StateClpbrd(SfxItemSet&) (this=0x37df2d0, rSet=SfxItemSet of pool 0x23bed90 with parent 0x0 and Which ranges: [(5311, 5312), (5712, 5712)] = {...}) at sw/source/uibase/shells/basesh.cxx:462 > #12 0x00007fff9f2673c8 in SfxStubSwBaseShellStateClpbrd(SfxShell*, SfxItemSet&) (pShell=0x37df2d0, rSet=SfxItemSet of pool 0x23bed90 with parent 0x0 and Which ranges: [(5311, 5312), (5712, 5712)] = {...}) at workdir/SdiTarget/sw/sdi/swslots.hxx:2104 > #13 0x00007ffff1b9c632 in SfxShell::CallState(void (*)(SfxShell*, SfxItemSet&), SfxItemSet&) (this=0x37df2d0, pFunc=0x7fff9f2673a0 <SfxStubSwBaseShellStateClpbrd(SfxShell*, SfxItemSet&)>, rSet=SfxItemSet of pool 0x23bed90 with parent 0x0 and Which ranges: [(5311, 5312), (5712, 5712)] = {...}) at include/sfx2/shell.hxx:216 > #14 0x00007ffff1bb41c8 in SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*) (this=0x257eea0, rSvr=..., rState=SfxItemSet of pool 0x23bed90 with parent 0x0 and Which ranges: [(5311, 5312), (5712, 5712)] = {...}, pRealSlot=0x7fff9ffad240 <aSwBaseShellSlots_Impl>) at sfx2/source/control/dispatch.cxx:1894 > #15 0x00007ffff1b91d58 in SfxBindings::Update_Impl(SfxStateCache*) (this=0x257ee30, pCache=0x37e0570) at sfx2/source/control/bindings.cxx:327 > #16 0x00007ffff1b9421c in SfxBindings::NextJob_Impl(Timer*) (this=0x257ee30, pTimer=0x1a1e398) at sfx2/source/control/bindings.cxx:1498 > #17 0x00007ffff1b983ed in SfxBindings::NextJob(Timer*) (this=0x257ee30, pTimer=0x1a1e398) at sfx2/source/control/bindings.cxx:1441 > #18 0x00007ffff1b90478 in SfxBindings::LinkStubNextJob(void*, Timer*) (instance=0x257ee30, data=0x1a1e398) at sfx2/source/control/bindings.cxx:1439 > #19 0x00007fffec93f228 in Link<Timer*, void>::Call(Timer*) const (this=0x1a1e3b8, data=0x1a1e398) at include/tools/link.hxx:84 > #20 0x00007fffec93f007 in Timer::Invoke() (this=0x1a1e398) at vcl/source/app/timer.cxx:88 ... Change-Id: I5bac21f400cea04957554483aab2d44cca5b4bfc
2017-01-17I very much doubt we need this single special LinuxPPC ifdefCaolán McNamara
Change-Id: I1661981fabcefde9ef7819fa554a31c68972e619