summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2018-08-20tdf#116420: Windows: Test if a filepath redirects to a WebDAV resourceMike Kaganski2-0/+78
In Windows, filesystem redirectors can map WebDAV resources to UNC paths, or to drive-based "local" paths; so a WebDAV URI of the form "http://WebDADServer/root/directory/File.ext" may be accessed using "\\WebDADServer\root\directory\File.ext" or "Z:\directory\File.ext". When using these paths, failure to create a lockfile aside the opened document should not be considered an error; so this patch checks for this. Regression from commit 6ca3b3648e25ae9d4d2d29a0df83349198ec3f5e. Change-Id: I1de55b66447dc91d22b6d2b5b121de96bf32e4ee Reviewed-on: https://gerrit.libreoffice.org/53070 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 642a49e8d3006d000bc6c58def34d4e96764c6cc) Reviewed-on: https://gerrit.libreoffice.org/53080 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit ebabd7133031199633b19b8764350f333c7cfc7d)
2018-05-22tdf#108748 generate PDF preview on SwapInJan-Marek Glogowski1-0/+21
When including a PDF as an image, it's represented internally as a Bitmap with additional PDF data. On SwapIn, LibreOffice just imported the PDF data missing the PDF preview. The Graphic also gad the wrong image type, which results in a busy loop on master, with a strange / unhelpful STR_COMCORE_READERROR generated by SwNoTextFrame::PaintPicture. This is a workaround to generate the Bitmap on SwapIn, which will really slow down LibreOffice when importing many PDFs. I guess the job of generating the PDF previews should probably be deferred to a thread or a low priority Scheduler task, just like the general image loading is handled. Change-Id: I8084e4533995ecddc5b03ef19cb0c6a2dbf60ebd Reviewed-on: https://gerrit.libreoffice.org/43906 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-12-18convert DecodeMechanism to scoped enumNoel Grandin2-49/+49
(cherry picked from commit bfde4866e07746eafa2f0d6173c29d805cc35ad0) (cherry picked from commit 3de922d4a695e253d4ca2d42b70e0b35b52e9b7c) Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2017-12-18convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin1-35/+35
(cherry picked from commit 803215142efa6437515348f63bd70ffdcf5d45f1) (cherry picked from commit 736cd289d4cdb0db61d92134bcc9d48aa7e79613) Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2017-12-18Acknowledge that WinSalGraphicsImpl::drawPolyLine modifies pPtAryStephan Bergmann1-0/+5
Change-Id: Idde44857f8ace883cc759321c71e2ca7a4359334 Reviewed-on: https://gerrit.libreoffice.org/42406 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 80363950fda5eeef9830f61e57899d1805c91751) (cherry picked from commit 65217b7c388eadf0de253ee51a7d2c0621faf68c)
2017-12-18convert PolyFlags to scoped enumNoel Grandin2-39/+39
and remove the XPolyFlags enum, which has the same values and was being converted to PolyFlags anyhow Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41 Reviewed-on: https://gerrit.libreoffice.org/31627 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78) (cherry picked from commit e13bb8d5290b27281d7742a9b7034929561d51aa)
2017-12-15Handle resmgr lifecycle with vcl's de-init more cleanly.Michael Meeks1-4/+0
Change-Id: Iee5f54edc09d0df7062ffdcb301876fcec791373 Reviewed-on: https://gerrit.libreoffice.org/46562 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-12-15Protect resmgr destructor to allow static unique_ptr use.Michael Meeks1-0/+4
Otherwise DestroyAllResMgr's from VCL's deinit frees things under us. Change-Id: I5926af073609c4cc8fc744b55d184a4e17b49096 Reviewed-on: https://gerrit.libreoffice.org/46542 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-14lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky1-0/+5
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-12-05remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin5-22/+22
Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d) Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/45452 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781)
2017-12-05loplugin:useuniqueptr extend to check local varsNoel Grandin2-6/+4
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2489000d3fd66319a8355fd4e37cfdfda47296d0) Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 (cherry picked from commit e540ccfb5eb43bd4a3d6920074dce8436720ba8e)
2017-11-28lokdialog: Changed dialog painting to allow for modal dialogsPranav Kant1-0/+10
Split IDialogNotifier from IDialogRenderable and make SfxViewShell implement it. We now just send the dialog UNO command to the backend and wait for core to emit a 'created' dialog callback which signals dialog creation in the backend. The client is then supposed to send the paint commands for rendering the dialog. Change-Id: I1bfbce83c17955fa0212408376d6bcd1b2d2d1dd
2017-03-06ofz: Z_NEED_DICT is unsupportedCaolán McNamara1-1/+1
Change-Id: Ib0945d5a4606915aff9ee3019203caaf2a3cc7c5 (cherry picked from commit aacaacc16938b030a1341d8dbaf56c6a2efeb1dc) Reviewed-on: https://gerrit.libreoffice.org/34743 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 6f3cc872c58d8b34ca9f0a06f2d65b3b6cc1c7ee)
2017-01-02ofz#372 check if ImplSplit succeededCaolán McNamara2-5/+10
Change-Id: I1e34295fe3ee5f77e787f583616d52fa92a0eca4 (cherry picked from commit 62a97e6a561ce65e88d4c537a1b82c336f012722)
2016-10-26loplugin:expandablemethods in toolkit..toolsNoel Grandin2-8/+3
Change-Id: I7221bf131d28804ee93474b11973bbc066cc2764 Reviewed-on: https://gerrit.libreoffice.org/30268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21loplugin:expandablemethodds in include/tools..unotoolsNoel Grandin3-10/+4
Change-Id: I5607d4a2a81de1a3ae329acd1e90280a21522f06 Reviewed-on: https://gerrit.libreoffice.org/30097 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-15clang-cl loplugin: toolsStephan Bergmann4-28/+27
Change-Id: I6f02d9607405e144727f925c8f8a1de6041688b9 Reviewed-on: https://gerrit.libreoffice.org/29844 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-12GetAutoHelpId logically can only return an empty string nowCaolán McNamara1-51/+0
Change-Id: Ie7368f083a5aa6bcfb249375fbae1f4cd92e02ba
2016-10-12drop RSC_DOCKINGWINDOW*Caolán McNamara1-14/+0
Change-Id: Ibcddc2def40e15f4a2f92fec13c1c3fd2f824d68
2016-10-10no numericfield, spinfield or spinbutton loaded from .src nowCaolán McNamara1-2/+0
Change-Id: I90e4390d1fadcbb18036861dc9b9d39fa8a73551
2016-10-10rename SetResMgr to ClearResMgrNoel Grandin1-3/+3
since that is it's only use. Also clean up the comment block nearby. Change-Id: Iff67aeec176963132bb8a1e64e0c81853f0912d7 Reviewed-on: https://gerrit.libreoffice.org/29654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-09no ComboBoxes loaded from .src anymoreCaolán McNamara1-1/+0
Change-Id: Ic497dddfe326e9cc06e71c39284b2848d17ae0c8
2016-10-09tools: use rtl/character.hxx in tools/source/inet/inetmsg.cxxArnaud Versini1-15/+5
Change-Id: I5e4b2abd5487a383af6a8e37a4c33a90d91ec2e4 Reviewed-on: https://gerrit.libreoffice.org/29610 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-08no radiobuttons or checkboxes loaded from src files anymoreCaolán McNamara1-1/+0
Change-Id: Ie10ebcf56a6145c8edeb903bed1beb0cf5cf8a7a
2016-10-08TOOLS: Remove SvStream::ImpInit()Arnaud Versini1-32/+28
Change-Id: I7a089e77586041bce662c33a5610df122d5a74be Reviewed-on: https://gerrit.libreoffice.org/27940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-07no CheckBox loaded from src files anymoreCaolán McNamara1-1/+0
Change-Id: I3211707d38c15a6fd3edcbe70fc3cee9b65dd6f6
2016-10-07don't call inflateEnd if inflateInit failedDavid Tardon1-1/+2
This fixes the following valgrind message: ==12572== Conditional jump or move depends on uninitialised value(s) ==12572== at 0x1505C89C: inflateEnd (inflate.c:1258) ==12572== by 0xD17644D: ZCodec::EndCompression() (zcodec.cxx:106) ==12572== by 0xD17724E: ZCodec::AttemptDecompression(SvStream&, SvStream&) (zcodec.cxx:405) ==12572== by 0x5F17020A: PlainTextFilterDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:157) ==12572== by 0x3C3F098C: filter::config::TypeDetection::impl_askDetectService(rtl::OUString const&, utl::MediaDescriptor&) (typedetection.cxx:1040) ==12572== by 0x3C3F0449: filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor&, std::__debug::list<filter::config::FlatDetectionInfo, std::allocator<filter::config::FlatDetectionInfo> > const&, bool, std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >&, rtl::OUString&) (typedetection.cxx:946) ==12572== by 0x3C3ED6A1: filter::config::TypeDetection::queryTypeByDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, unsigned char) (typedetection.cxx:427) ==12572== by 0x49B232CF: OwnView_Impl::GetFilterNameFromExtentionAndInStream(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&) (ownview.cxx:219) ==12572== by 0x49B011EB: OleEmbeddedObject::TryToConvertToOOo() (oleembed.cxx:268) ==12572== by 0x49B03AD1: OleEmbeddedObject::doVerb(int) (oleembed.cxx:837) ==12572== by 0x9F5C353: SfxInPlaceClient::DoVerb(long) (ipclient.cxx:946) ==12572== by 0x402D395A: SwWrtShell::LaunchOLEObj(long) (wrtsh1.cxx:588) ==12572== Change-Id: I51c0fbdc185897c60f6c0099b96c6ca9c25a35ba
2016-10-06drop loading Colors from src filesCaolán McNamara1-29/+0
Change-Id: I43f2fda133371a1284a53beeeb774552210c7e3f
2016-10-06no MetricFields are loaded from .src files nowCaolán McNamara1-1/+0
Change-Id: I4b30cbc7bc6a3a3a635c3889d43b7fa6513209f5
2016-10-03loplugin:countusersofdefaultparams in sw..vclNoel Grandin1-1/+1
Change-Id: I152df55f5a30e073c66cfd3a64d5090a20cb232d Reviewed-on: https://gerrit.libreoffice.org/29471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-27Add note that Rectangle::toString() format now has a stability requirementTor Lillqvist1-0/+3
De facto, at least. Change-Id: Ie83f275d376841a7e4e9f7e80895165fe70a69b9
2016-09-16loplogin:singlevalfields in include/Noel Grandin3-22/+5
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc Reviewed-on: https://gerrit.libreoffice.org/28931 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15tools: SvFileStream::LockRange/UnlockRange take 64 bit positionsMichael Stahl2-11/+11
Change-Id: I85d9cc00daaaa127817aaaa6f54d3e6f86907fb6
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl6-97/+97
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-02coverity#1371213 Missing move assignment operatorCaolán McNamara2-0/+12
Change-Id: I2454a230cd9a524086beba1a2ca32ea0b70bf17e
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (tools)Stephan Bergmann1-3/+3
Change-Id: I624505ceee232a531826915755717f2e09dc0a72
2016-08-29cid#1371171 Missing move assignment operatorNoel Grandin1-0/+6
Change-Id: I3150428f130823cdb1584e30c54f5591896214cf
2016-08-29cid#1371160 Missing move assignment operatorNoel Grandin1-0/+10
Change-Id: Ifcddd08cd1ec6bfb7679ee0433524c4bd68803dd
2016-07-27loplugin:countusersofdefaultparams in tools..xmlsecurityNoel Grandin1-2/+1
find methods with default params with only zero or one call site Change-Id: Ie5b30f60e9fe00ba1acf0dfc79b005ded46f05a0 Reviewed-on: https://gerrit.libreoffice.org/27512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-16nBufSiz can be a non-class local constantMatteo Casalin1-3/+9
Change-Id: I2a7d32eabd01622261a1163781ac2a8b64bdee3f
2016-07-16Reduce #include dependenciesMatteo Casalin1-1/+0
Change-Id: I5c6c379717869028102ab2a1ae7929dfbc447904
2016-07-13loplugin:constparams in toolsNoel Grandin11-32/+32
Change-Id: Iea05efbb90a0a95fefd18ae9673095a31422f06c Reviewed-on: https://gerrit.libreoffice.org/27137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-13Moved SfxModule owner to SfxApplicationMark Page2-34/+0
::GetAppData replaced with SfxApplication::GetModule that now returns SfxModule* SfxModule no longer registers self for ownership instead it is now registered using SfxApplication::SetModule Change-Id: Ifbbe1b2b4c5122da8e643b7926d47878d116c6c8 Reviewed-on: https://gerrit.libreoffice.org/26914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-11loplugin:nullptr: Better heuristic to determine code shared between C and C++Stephan Bergmann1-3/+3
Change-Id: I51e1c5fa4639e51fac90f92adf3d87d12960d589
2016-07-08Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke4-65/+280
... implementing signed years with year 0 gap. Date(31,12,-1) last day BCE Date(1,1,1) first day CE New class Date member functions: * AddYears(sal_Int16) to be used instead of aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap. * convenience GetNextYear() to be used insted of GetYear()+1 * convenience GetPrevYear() to be used insted of GetYear()-1 * AddMonths(sal_Int32) * operator=(const css::util::Date&) New class DateTime member functions: * operator=(const css::util::DateTime&) Made some conversion ctors explicit, specifically Date(sal_Int32) Adapted hopefully all places that used a sal_uInt16 year to use sal_Int16 where appropriate. Eliminated some quirks in date handling found on the fly. Added era handling to i18npool icu calendar setting interface, which missing was responsible for 0001-01-01 entered in Calc being set as -0001-01-01, hence subtracting one day resulted in -0002-12-31. Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f Reviewed-on: https://gerrit.libreoffice.org/27049 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-05Clarify calculation precedence tdf#39440Muhammet Kara1-8/+8
Use parentheses to clarify the code. Change-Id: I864dc6dacadb5b9ba9dca8e0abd9fa4e6db1eddc Reviewed-on: https://gerrit.libreoffice.org/25677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-28loplugin:singlevalfields in variousNoel Grandin2-80/+21
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e Reviewed-on: https://gerrit.libreoffice.org/26738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28Drop overflow warning that was produced repeatedly on WindowsTor Lillqvist1-1/+0
I see hundreds of the "'operator *=' detected overflow" warnings on Windows doing perfectly normal things. The call site for those explicitly checks anyway for an invalid (overflowed) result. (Sure, there might be other call sites where the warning possibly had some degree of usefulness because an overflowed result is not checked for. I am willing to take the risk.) Change-Id: Ie88ad11d159ee7aa505c22633a7e2cda1246ff31
2016-06-27tdf#75280 Cleaning up of sal_uIntPtr usage #1atymyjan1-10/+10
Change-Id: Ief2cc6ab03316c2530d386d662db21ca1c9ddb30 Reviewed-on: https://gerrit.libreoffice.org/25898 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu1-4/+5
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683 Reviewed-on: https://gerrit.libreoffice.org/26537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>