summaryrefslogtreecommitdiff
path: root/unotools
AgeCommit message (Collapse)AuthorFilesLines
2015-08-19Consolidate isFileUrl checksStephan Bergmann1-5/+0
Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a
2015-08-19Clean up remaining utl::LocalFileHelper::Convert...Stephan Bergmann4-31/+12
together with 58d68a1bc9146334376206ae7ba8b1a6594a1040 "ConvertURLToSystemPath->getSystemPathFromFileURL" and 28f3464a571a23a2c16bd0980e9021b95d011511 "ConvertSystemPathToURL->getFileURLFromSystemPath," this replaces all those Convert... functionality with direct calls to the corresponding osl::FileBase functions. Change-Id: I2876171cd337a5eb939d25d8cf1e0c1253ff73a7
2015-08-19Replace utl::LocalFileHelper::IsLocalFile -> ...::IsFileUrlStephan Bergmann1-3/+2
...given that vnd.sun.star.wfs is long gone. Note that the old code could have behaved differently in that for one it could have worked for relative URL input (as osl_getSystemPathFromFileURL is allowed to accept relative URLs) and for another could have failed for some file URLs (for which osl_getSystemPathFromFileURL would return something other than osl_File_E_None for whatever reason), but it looks plausible to assume that what the call sites are really interested in is whether a given URL is a file URL. Simplifies those call sites that already have a INetURLObject instance even further. Change-Id: Iaee4595d933a760b8321e42414a9ef0865311833
2015-08-19for testing allow disabling configmgr for time critical pathsCaolán McNamara5-7/+44
Change-Id: I08021f18d53e1748927f8847649994f95252bbc2 Reviewed-on: https://gerrit.libreoffice.org/17844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18ConvertSystemPathToURL->getFileURLFromSystemPathCaolán McNamara1-10/+0
Change-Id: I1c60c60f9b5318626f42e33091920a4404fb6d1c
2015-08-18ConvertURLToSystemPath->getSystemPathFromFileURLCaolán McNamara1-10/+0
Change-Id: I7dc0e1b596f80b8f0870aed1722f711bb287ec0a
2015-08-18rBaseURL argument now unusedCaolán McNamara1-1/+1
Change-Id: I02cacfeaf26788ed024fa9753af132f0d5822e6f
2015-08-18Get rid of obsolete LocalFileHelper::IsFileContentStephan Bergmann1-6/+0
vnd.sun.star.wfs is long gone---or what else could this have been used for? Change-Id: If39c9bdcb983f94206e0f58b7e1e8410fdcef089
2015-08-18Remove newly unused ucbhelper/fileidentifierconverter.hxxStephan Bergmann1-1/+0
Change-Id: I7c272383ecb115e19699ed96bf5622d979403a01
2015-08-18Simplify from ucbhelper::getSystemPathFromFileURL & v. v. to osl::FileBaseStephan Bergmann1-55/+21
(vnd.sun.star.wfs is long gone); pending further clean up Change-Id: Ie532c1d945c20a31f7758fbc0438e6b1f5d5c843
2015-08-18Simplify from ucbhelper::getSystemPathFromFileURL to osl::FileBaseStephan Bergmann1-8/+4
(vnd.sun.star.wfs is long gone) Change-Id: Ica7d972c04cc065ffbd5debf72e1ec3eeb5c6c64
2015-08-18Remove obsolete getLocalFileURLStephan Bergmann1-4/+2
...vnd.sun.star.wfs is long gone Change-Id: I64da15a6c16e429aeda57c435e353891fb28f04d
2015-08-11loplugin: defaultparamsNoel Grandin2-2/+2
Change-Id: I50ba6a836473961d952ed88e56532501469c5368
2015-07-23loplugin:stringconstantNoel Grandin1-1/+1
Change-Id: I02aa11489a993b9788dc1038d9772672f1d2ecef
2015-07-22tdf#82744: fix WebDAV lock/unlock behaviour - part 2Giuseppe Castagno1-3/+22
Changes done to the code in framework, comphelper and unotools, in no particular order - add an interaction handler dedicated to WebDAV The stock interaction handler can be missing depending on the need of the framework performing its tasks, so a dedicated handler is provided, this one is always present. - force opening of a WebDAV file. A WebDAV file sould be open r/o even if explicitly requested to open as r/w. This is a limitation of current WebDAV implementation, not of the standard. This change is needed in order to reopen correctly a file as requested by a 'Edit Mode' GUI command. Change-Id: I5368fa2c0511f1630e6d6139c6a986d33aa19082 Reviewed-on: https://gerrit.libreoffice.org/17182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-21Miscellaneous typosAdolfo Jayme Barrientos1-1/+1
Change-Id: I5187364d420ab78c36a91632efab9c32951d867a
2015-07-16why bring ucb into the tempfile story when its always a file://Caolán McNamara1-13/+7
Change-Id: I48d51cd24831072af647dd0172a2fd2e4a9ed2a5
2015-07-16WaE: -Wmaybe-uninitializedCaolán McNamara1-1/+1
Change-Id: Ie49c6a8067c5223bbe3c86505aa909c2bd5d3c93
2015-07-13Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann2-18/+3
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-06loplugin:unusedmethods unotoolsNoel Grandin3-93/+0
Change-Id: Ieb73b50471263212285b9c3883c082477c1ad656 Reviewed-on: https://gerrit.libreoffice.org/16729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-01tdf#92431 Keep thumbnail for modified but unsaved docMaxim Monastirsky1-7/+10
A regression of 1166966eb4112fdf332c656eae5082d82a3ec2f2. We need to consider 2 use-cases: 1. Protecting an existing document with a password (by overwriting the original file). In this case we don't want to generate a thumbnail from the now encrypted file, but we do want to erase the stored thumbnail and show a generic icon instead. 2. Closing a modified document without saving the changes. Here we don't want to generate a thumbnail either, because it may contain the unsaved changes, but either we don't want to replace the stored thumbnail, because most likely it correctly represents the last saved state of the document. Change-Id: Ia7b1f3dbc9fbbc2ef1d87442c1dee25306f65826 Reviewed-on: https://gerrit.libreoffice.org/16659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-06-26loplugin:stringconstant: handle OUString+=OUString(literal)Stephan Bergmann3-35/+13
Change-Id: Ia9386f30413950b42fdbc9849e41e958f9282693
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann3-5/+5
Change-Id: I45fcbcdf15134585443e528e8af2c9486d0b3bbe
2015-06-23LinkUpdateMode is a global settingStephan Bergmann1-0/+8
Change-Id: Ida1257337c6e0916f2228fe053d9c9f085183af6
2015-06-18Fix typosAndrea Gelmini1-2/+2
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8 Reviewed-on: https://gerrit.libreoffice.org/16314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-16Fix typosAndrea Gelmini1-1/+1
Change-Id: Id8c7cf460cba5af89891c470e1aaa61b227d356e Reviewed-on: https://gerrit.libreoffice.org/16310 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-15remove unnecessary check for null when calling deleteNoel Grandin2-4/+2
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-08add (and call before dtor) Commit to SvtSearchOptionsCaolán McNamara1-0/+5
i.e. follow up to commit 465359c35fcd8c30a2bedd3d0beb07c0c1c36cba Author: Michael Stahl <mstahl@redhat.com> Date: Wed Mar 11 16:39:24 2015 +0100 do not call virtual Commit() from dtors of utl::ConfigItem subclasses ~SvtAppFilterOptions_Impl() demonstrates that this is a bad idea, by not invoking its subclasses' ImplCommit() but its own. to avoid assert in SvtSearchOptions dtor Change-Id: I0eaf93450e1daddb81a9463f2c1df48a334dfb22
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann5-8/+8
Change-Id: Ic05bc081ec190cc80d8821630e94f51c8db225b6
2015-05-28new clang plugin: loopvartoosmallNoel Grandin1-2/+2
Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
2015-05-26cppcheck: noExplicitConstructorCaolán McNamara11-30/+32
Change-Id: If947733a205e8ece1845079be95cbc2d6cbd5029
2015-05-22loplugin:constantfunctionNoel Grandin2-150/+8
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
2015-05-15tdf#91064: Revert "tdf#89790 DOCX: saving LO version number in app.xml"Joren De Cuyper1-33/+17
This reverts commit 480ca7434a330b2678f9ef287cffd6d9cf27bed5. Change-Id: I69a16425fc36979d49f409bbd7921495a22a35dc Reviewed-on: https://gerrit.libreoffice.org/15737 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-10NOINSTANCE is implied now in IMPL_STATIC_LINK...Stephan Bergmann1-1/+1
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-08lopluign:staticmethods: Handle DECL_LINKStephan Bergmann2-2/+2
Change-Id: Ib27854a8470f3ff5b208cb949a7bd02f2a86c969
2015-05-07fix for CONFIG_MODE constant -> enum conversionNoel Grandin1-4/+3
in my commit b35828ba7dc33af81d17c8c870ec981d18a57b08 "convert CONFIG_MODE constants to scoped enum" Change-Id: Iafb6b1643920eb066a2d50150f408161331f9d04
2015-05-06fix windows buildNoel Grandin1-1/+1
warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) after my commit 60e659ae355d073b05b3b9c8d2ac3bdc5f76020d "convert IMPL_FONT_ATTR constants to scoped enum" Change-Id: I83f1ea5869fa60c89dbc706020f68cc2c4277f48
2015-05-06Add comments about ImplFontAttrsTor Lillqvist1-0/+2
Change-Id: I32d8b8f4301188245721d31fd234bb1784a1ae8d
2015-05-06convert USER_OPT constants to scoped enumNoel Grandin1-93/+70
Change-Id: I85a1c9f89ac79e0e54fcd8dfd1908325fae9a8ac
2015-05-06convert DEFAULTFONT_ constants to scoped enumNoel Grandin1-26/+26
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
2015-05-06convert SUBSFONT_ to scoped enumNoel Grandin1-6/+6
Change-Id: Ic66191ac4cdfa753dc784e7bd1a6dd20f50def6b
2015-05-06convert FONTTOSUBSFONT constants to scoped enumNoel Grandin1-7/+12
Change-Id: I994bfc76d709d01406404991dbfbd49b15bd03f4
2015-05-06convert IMPL_FONT_ATTR constants to scoped enumNoel Grandin1-66/+66
Change-Id: I2b5986ea69dc09e6ba18b23a80029f6551b48152
2015-05-06convert CVC_ flags to scoped enumNoel Grandin1-4/+4
Change-Id: Iadc9b6240121e9fee91de299b94a9f8629656507
2015-05-06convert CONFIG_MODE constants to scoped enumNoel Grandin3-9/+9
Change-Id: I1b0fb976e7bf8d7de06da0c30012e8bba1320498
2015-05-05loplugin:staticmethodsNoel Grandin1-2/+2
Change-Id: I97160fc51dc16ff92b06d44570298eeec637e132
2015-05-01tdf#89790 - DOCX: saving LO version number in correct tag in app.xmlRadu Ioan1-17/+33
Converted existing method that provides application name and version in two functions Change-Id: I93b70da7c78ee5db3d6eb710a2a2a9f4b7b4fb86 Reviewed-on: https://gerrit.libreoffice.org/15151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-04-30Gradually typed LinkStephan Bergmann2-6/+6
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-29rhbz#1213173: connectivity: Calc driver: prevent document being disposedMichael Stahl1-6/+8
... by adding a XCloseListener that vetoes any attempt to close it. The Calc document can be opened by the user in the UI and closed again. Change-Id: Ied427b67274d925c911e516c0a50a4c0b2b18db9
2015-04-29convert STR_EVENT constants to scoped enumNoel Grandin1-38/+42
- also add needed infrastructure to o3tl::enumarray so we can use std::find on it - move the Impl inside the .cxx file, no need to expose it in the header Change-Id: I7758a6175849f46723d97b1e657f846524c3b7cd