summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-21loplugin:constparams in sfx2Noel Grandin
Change-Id: Id982c8fb5654433e9db10e2da6a86a6c8d90b9b4 Reviewed-on: https://gerrit.libreoffice.org/40261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21temporarily survive missing translationsCaolán McNamara
Change-Id: I19c27e524d2ad1e57fa3ca41b1bfaed17215bd76
2017-07-21make sure the strings for each undo matchCaolán McNamara
Change-Id: I6d380dde0214b41535e99798c24b19fe21e30772
2017-07-21can use the "real" type for RES_SRCTYPES nowCaolán McNamara
Change-Id: Ied1f7a8c4135d3fd6a4581ea5e92f89b2e6b3067
2017-07-21oox: fix inconsistent param naming in interface/implementationMiklos Vajna
Make sure they match. Change-Id: Ib3ce948a29472281705e361792c924893ad97b32 Reviewed-on: https://gerrit.libreoffice.org/40259 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-21don't build localestr when cross-compilingCaolán McNamara
Change-Id: Ia776d159aecc3082f46efe5bdd46477b45576b31
2017-07-21loplugin:unusedfields in sdNoel Grandin
Change-Id: I7f89e038f3d9bd0da658c7d3b8faec23d8a593db Reviewed-on: https://gerrit.libreoffice.org/40257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:unusedfields in sfx2Noel Grandin
Change-Id: Id6666065bf3b27388d87aa2605229e83f1aed79a Reviewed-on: https://gerrit.libreoffice.org/40255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21de-hrc various thingsCaolán McNamara
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21osl: Unix pipe converted from OSL_ASSERT to assert/SAL_WARNsChris Sherlock
Explanation for each conversion: - osl_acceptPipe() - don't worry about an invalid oslPipe sent as function parameter an error gets flagged in Unix normally, so it might not be a programming error - definitely assert on an empty name, that's a definite programming error and should never, ever occur - createPipeImpl() allocates and initializes memory for the oslPipeImpl structure, if it can't do this then something has been done wrongly - osl_receivePipe() - invalid oslPipe sent as function parameter might not be a programming error, give a warning but don't assert - osl_sendPipe() - invalid oslPipe sent as function parameter might not be a programming error, give a warning but don't assert - osl_writePipe() - really just a thin wrapper around osl_sendPipe(), which detects and handles invalid pipes - osl_readPipe() - really just a thin wrapper around osl_receivePipe(), which detects and handles invalid pipes Change-Id: I4923265b4c648852743c406b682d43ffb9ac6537 Reviewed-on: https://gerrit.libreoffice.org/40003 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-21osl: fix Pipe noacquire/acquire testsChris Sherlock
There is an incomplete test of ::osl::Pipe::Pipe(oslPipe, __sal_NoAcquire), but the comments show that the tester wasn't able to figure out a way to test the noacquire variant of this constructor. However, they seem to have not just given up but copied and pasted the acquire and no acquire tests - the error codes for the acquire test talk about non-acquisition and don't actually see if the handle is the same or not. I have fixed this test. To test if the noacquire is working or not then you merely have to: 1. create a new Pipe instance 2. create a new Pipe non-acquired instance copy of the first instance 3. delete the non-acquired instance copy 4. try to send a single character to the original Pipe instance, which should return an error (negative return result) because at this point there is no valid pipe to operate on as the pipe should have been destroyed when you deleted the copy. If the send() succeeds, then this is a test failure. For the acquire test, it didn't actually test if the handles are the same - I have corrected this now. Change-Id: If868746233d3a222cc6f9e7cd0d453e70ef6c7cc Reviewed-on: https://gerrit.libreoffice.org/40102 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-21loplugin:unusedfields in svtoolsNoel Grandin
Change-Id: I5484fe5ee449e72919591bd374366aa60f792e28 Reviewed-on: https://gerrit.libreoffice.org/40254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:unusedfields in svxNoel Grandin
Change-Id: I7fc5bf55b01d464815771220914f21d8e85b5a36 Reviewed-on: https://gerrit.libreoffice.org/40253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:constparams in svgioNoel Grandin
Change-Id: I35dd8b1373ce3c46a10b1da1ddc6dc3722ffa760 Reviewed-on: https://gerrit.libreoffice.org/40245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21Remove unused function code special charactersAkshay Deep
Change-Id: I6610a986795c3169077b9c1a8e65a86f5488243d Reviewed-on: https://gerrit.libreoffice.org/40230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com>
2017-07-21tdf#43157 - Clean up OSL_ENSURE and OSL_FAIL in sc/filter/lotusAlbert Thuswaldner
Change-Id: I88e794752dff1bd46faac71234322d603c10bed9 Reviewed-on: https://gerrit.libreoffice.org/40075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-07-21Moving legacy contexts to FastContexts:Mohammed Abdul Azeem
ScXMLTableShapesContext ScXMLTableSourceContext ScXMLTableColContext ScXMLTableColsContext ScXMLConditionalFormatsContext ScXMLTableProtectionContext Change-Id: I36704c7f51cd5d13b3c0ebf9bc07b172c1576f3e Reviewed-on: https://gerrit.libreoffice.org/40246 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-20Added Test to check TableAutoFormat Style after Save/LoadVarun Dhall
Change-Id: I466d5c5536d4c4310356f38569f7a91e0f36ba1d Reviewed-on: https://gerrit.libreoffice.org/40104 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-20tdf#46852 fix spellcheck continue at beginningLuke Deller
When a spellcheck reaches the end of the document, it is supposed to be able to continue from the beginning of the document to the point at which the spellcheck was started. This was not working in the case where the word at the starting position was replaced due to a spelling correction, which causes the starting position to be lost. Fix this situation by recording the position immediately *before* the spellcheck starting position, so that it will not be affected by a spelling correction *at* the starting position. Change-Id: I9483fd5937dc1e235f6f9639d4856fe15e3d47a6 Reviewed-on: https://gerrit.libreoffice.org/40123 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-20change some Date += long to Date += sal_Int32Jochen Nitschke
found by adding Date& operator+=(long) = delete; to Date class Change-Id: I0e6b59a2e789f2bdf2f271b99d10c6acbae8bf55 Reviewed-on: https://gerrit.libreoffice.org/40241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20tdf#109197 crash when deleting user field variables in swNoel Grandin
regression from: commit a706bb06d5326e7a997dd1d71f3f947bd0ad28e6 "new loplugin: useuniqueptr: sw part 1" Change-Id: I57f9c9e6d7eeccc033b71d7182c960f3d79df73c Reviewed-on: https://gerrit.libreoffice.org/40240 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-20tdf#107166 improve AA mode selection, retry, more checksTomaž Vajngerl
Major problem when setting the render mode and the text antialias mode is that when you set the render mode to something that isn't compatible with the text antialias mode, then every next call will cause an error (invalid parameters). So we need to be sure that we never set incompatible modes. Additionally we just need to set it one time when we create the surface and not every time we draw. If we get the D2DERR_RECREATE_TARGET we can create a new render target and retry the whole call. Somethimes this is not possible so we try 3 times and the give up. We need to add more checks where we exit early or not continue with some calls as any additional calls could taint the draw state and some things wouldn't be drawn. For example if we calculate the sizes of 0 glyphs we shouldn't continue with binding the hDC with an "empty" rectangle. This will fail and cause some text that is called afterwards to not draw. Change-Id: Iabbdbd7956e90ea84aea96824c0d985ca9020c59 Reviewed-on: https://gerrit.libreoffice.org/40211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-20tdf#109123 WIN Run instant timerout with low priorityJan-Marek Glogowski
This busy-lock happens, because user messages have a higher priority then some system messages. What happens: 1. The main system loop picks up the LO scheduler 2. The idle worker (IW) is started 3. IW checks using AnyInput( VCL_INPUT_ANY ) for system events 4. A system event is found 5. The LO scheduler gets posted again 6. The main system loop picks up the LO scheduler instead of the system message => goto 2 Normally it's suggested to use WM_TIMER in this case, as these messages are supposed to have the lowest priority. But this doesn't work, if you use PostMessage to generate them and SetTimer doesn't accept a 0ms timeout. At least PeakMessage also picks up the WM_TIMER message before the system message, probably because PostMessage is somehow related to the threads queue - who knows. In the end this implements a manual, low priority event, which is checked at the end of the ImplSalYield function. It just runs, if there is nothing else to do. We still have to emit the timer callback event, as ImplSalYield may wait in GetMessage, but wParam now indicates, if it's a wakeup and can be ignored. We use the same event, so it's easier to filter. Thanks to Mike Kaganski for the missing information and ideas for the final implementation. Change-Id: Ib8e4f214ab8d3731d5594d68f38f46982c2eb36d Reviewed-on: https://gerrit.libreoffice.org/40190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-07-20Change url for Help onlineOlivier Hallot
When the localhelp is not installed, the help is currently served by wikihelp http://help.libreoffice.org This patch makes the help pages to be served by http://helponline.libreoffice.org/index.html? + params index.html parses the params and opens the right help page. Params passed are - module (swriter,scalc,...) detected just after /text/ - HelpID is converted to valid url by bookmark2file.js - valid url is rebuild then and new contents opens on _self. Notes: * once in the website, navigation does not come back to index.html * index.html also redirect if visitor comes from elswhere Change-Id: Iab0797f64024900f906c8127d275de706ba35942 Reviewed-on: https://gerrit.libreoffice.org/39264 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-07-20tdf#87914 Add small caps command to Format menuYousuf Philips
Change-Id: I6c1faa610d41918501e7111cd447050329b9d8e7 Reviewed-on: https://gerrit.libreoffice.org/39421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-20Move namespace declaration to header fileSamuel Mehrbrodt
Change-Id: I5388d649ff3c8da0ff055f4aed6036647a123939 Reviewed-on: https://gerrit.libreoffice.org/40130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-20tdf#109228: FILESAVE: ODT: Anchor changed to 'to character' after RTTamás Zolnai
Ignore frames without names, becuase the code does not handle them well. It does not affect those use case for which the deduplication code was added. Change-Id: I08ad062b8b11cc06323467329d8c4e97bc4932dd Reviewed-on: https://gerrit.libreoffice.org/40222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-07-20sax: Check if it starts with 5 bytes of "<?xml"Takeshi Abe
Change-Id: Iec5b748b188c7b1bf61e8137faf4b3f2d480d7f1 Reviewed-on: https://gerrit.libreoffice.org/40139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20sw: std::copy_if is now availableTakeshi Abe
Change-Id: I78c4832ba966609fd9e2fa70b1addf4b640692fb Reviewed-on: https://gerrit.libreoffice.org/40185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:unusedfields in writerfilterNoel Grandin
Change-Id: I7831da8cccfa730c8615ef770d0add95cbde396b Reviewed-on: https://gerrit.libreoffice.org/40215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20Updated coreOlivier Hallot
Project: help e3187aa9dd2a80972b8aded1fb8f2270caa70438 Mute some l10n strings Change-Id: I3e263434d9881d3a7a6a20bbe0a5a85878fd1081 Reviewed-on: https://gerrit.libreoffice.org/40103 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-07-20support for filter dialog when an image is exported from context menuMarco Cecchetti
When user save the selected image in a non-vector format the filter dialog used in Draw pops up for filter setting. Change-Id: Ic98b48a47322e807627b7a2ccd8044ec0db30efc Reviewed-on: https://gerrit.libreoffice.org/40223 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-20sfx2: Fix a memory leak in SfxMedium::GetStorage()Takeshi Abe
Change-Id: I7e5590abc7fbac33140029a8b7222a8bd08278f4 Reviewed-on: https://gerrit.libreoffice.org/39473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-20loplugin:unusedfields in toolsNoel Grandin
Change-Id: I4e26c4750f6ff6c246a25507cfed1a0b4e3c6b81 Reviewed-on: https://gerrit.libreoffice.org/40225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20remove some "optimisation" insanity in ScriptEventContainerNoel Grandin
I can only imagine the weird bugs that must have periodically resulted when we had a hash value collision. In the process, fix hasElements() to return a useful value Change-Id: I1d9a052e73332b4b2bbc9c1fd8142c13eb22f1be Reviewed-on: https://gerrit.libreoffice.org/40226 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20SmartArt: support hideGeom shape attrbuteGrzegorz Araminowicz
Change-Id: I970024ec2b28fd6f004acdc67acbc39067b5efe2 Reviewed-on: https://gerrit.libreoffice.org/40224 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-07-20comphelper: Allow initializer lists for Sequences of NamedValues.Jan Holesovsky
This is particularly useful for creation of sequences that are later unwrapped using comphelper::SequenceAsHashMap. Eg. uno::Sequence<uno::Any> aArguments(comphelper::InitAnySequence( { {"SomethingNamed", uno::makeAny(true)}, })); Reference<XExporter> xExporter(aFactory->createInstanceWithArguments(..., aArguments), UNO_QUERY); and in the implementation where the arguments are consumed: comphelper::SequenceAsHashMap aArgumentsMap(rArguments); mbSomething = aArgumentsMap.getUnpackedValueOrDefault("SomethingNamed", false); Change-Id: Ib1135078a99ca08f50bf51184f2ec7d13f5e6b4d Reviewed-on: https://gerrit.libreoffice.org/40201 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-07-20loplugin:constparams in linguisticNoel Grandin
Change-Id: I7495c476b52a804971eaa97db011530842025fa9 Reviewed-on: https://gerrit.libreoffice.org/40221 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:constparams in drawinglayerNoel Grandin
Change-Id: I3111210ae77f67301bb319d5364f77c52e2c4d6d Reviewed-on: https://gerrit.libreoffice.org/40220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20Don't run testIdleMainloop on WindowsJan-Marek Glogowski
Was just wondering, why the test finished so fast on Windows, and realized it's actually empty due to "#ifndef WIN32". Change-Id: I050b7cb7bd66bdd2a215ef6e7eaf26355e8d962f
2017-07-20loplugin:constparams in xmloffNoel Grandin
Change-Id: Iec9535b106c85e47ddb14eec4ef3db5b1c8d8fd7 Reviewed-on: https://gerrit.libreoffice.org/40219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:unusedfields in vclNoel Grandin
Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6 Reviewed-on: https://gerrit.libreoffice.org/40217 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20Obtain days using GetInt32()Eike Rathke
Change-Id: I1f23c1e7f0fee6ffe90b3f5b094a7a672fc7ff0d
2017-07-20Obtain days using GetInt32() instead of casting floorEike Rathke
... so out of range arguments result in error. Change-Id: Iaea943719681019b7d5f4393540655243bcb2ca4
2017-07-20loplugin:constparams in basicNoel Grandin
Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60 Reviewed-on: https://gerrit.libreoffice.org/40214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20tdf#109080 First page header/footer ODF (2/2)Luke Deller
The proposal to add <style:header-first> / <style:footer-first> to the ODF standard has not yet been accepted, so meanwhile we should be using an extension namespace for these elements. This second commit changes LibreOffice to emit <loext:header-first> / <loext:footer-first> Change-Id: Iffec14696a09c3378a6e65b78b5c63b9a43d9b46 Reviewed-on: https://gerrit.libreoffice.org/39865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-20xmlsecurity mscrypt: turn akmngr patch into plain codeMiklos Vajna
This is just a set of C functions accessing public libxmlsec API, it's perfectly OK to have this in xmlsecurity/ instead of patching the bundled libxmlsec for this. Change-Id: Ib3e746883a47b80626fdcd64149ce50aa0588395 Reviewed-on: https://gerrit.libreoffice.org/40209 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-20tdf#108849: allow out-of-order sectPrMike Kaganski
According to ISO/IEC 29500-1:2016(E) 17.6.17), the final <w:sectPr> must be the last child element of the body element. Also, this is enforced in schema for CT_Body complex type (Annex A. (normative) Schemas – W3C XML Schema, A.1 WordprocessingML, page 3866), where sectPr is a part of <xsd:sequence>, and thus *must* stay at specific place in sequence, namely being the last element, and be at most one instance. However, real-life documents (generated by some third-party software) have sectPr before other body contents. Unfortunately, MS Word seems to allow this standards-violating content, and thus encourages creation of non-standard documents by third-party generators. This patch doesn't assume that current final (body-level) sectPr is the last body element, and does not mark current paragraph as last section's paragraph. Thus, current section (possibly started after previous paragraph-level sectPr) is continued after final sectPr is closed. Change-Id: I8e88288bc6659d77d17986514b3b4fe16a5b45d9 Reviewed-on: https://gerrit.libreoffice.org/40161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-07-20upload libstaroffice 0.0.4David Tardon
Change-Id: Id350c51cff29d27c02cfe5e4fdb1c66be58001ad Reviewed-on: https://gerrit.libreoffice.org/40037 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>