summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2016-07-20vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock22-42/+42
Reviewed-on: https://gerrit.libreoffice.org/21529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> (cherry picked from commit 28c96fc2553a5c3dee108f1e2060d7bc081a7e7e) Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f
2016-07-20sw, sd, sc: clean up no longer necessary isTiledRendering() member functionsMiklos Vajna2-7/+0
Change-Id: I508a29fd261865771d780b1c241841d9abfeb6ed (cherry picked from commit 5b44a9733a79decc2eebfc2360fdd837349b5759)
2016-07-20loplugin:unusedmethods unused return value in include/editengNoel Grandin4-7/+4
Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970 Reviewed-on: https://gerrit.libreoffice.org/21361 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 1f9a610de1e1e540386972c010ebfc99e5f55df7)
2016-07-20Fix typosAndrea Gelmini110-126/+126
Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067) Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
2016-07-20new loplugin rangedforcopy - use reference in range based forAndrzej Hunt4-4/+4
Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2 Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01 Reviewed-on: https://gerrit.libreoffice.org/20190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 9d0b06e9f728d01a2d2908e1e56cb4220cd414d5)
2016-07-20sal_uLong/sal_uIntPtr/sal_uInt16 to sal_uInt32Matteo Casalin1-2/+1
also avoid some explicit temporaries and group some checks. Change-Id: I7795b208dde53fd383b8c75f72dd9f56429aea2b (cherry picked from commit cb98c423bbdada017a687186a5c06def6cb6f7a2)
2016-07-20sw: clean up no longer needed SwViewShell::isTiledRendering()Miklos Vajna3-15/+7
Change-Id: Icd719c461613f8c59cad81b256678307f69974e1 (cherry picked from commit fd205e40c58aa749fbe458d74ca0c2373a1017dc)
2016-07-20loplugin:nullptr: More NULL -> nullptr automatic rewriteStephan Bergmann1-1/+1
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d (cherry picked from commit fb8a3fac5d448451794804a7470be45fa14da453)
2016-07-13tdf#99090 docx export page-break only inside a paragraphJustin Luth2-1/+19
If a paragraph hadn't been started yet, a w:r was being written directly in the /document/body which caused MSWord to complain about a corrupt document. Reviewed-on: https://gerrit.libreoffice.org/26771 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 07fb94655f4745eb4e80bf6e8d4cdd95371f23bb) Change-Id: Ie7f629869aab0f3d2405660a033c3f23bbd6baca Reviewed-on: https://gerrit.libreoffice.org/27121 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 28ded9c98837d6b6eefff73f396353b61b6b4017)
2016-07-13Resolves: tdf#100813 crash during pagination of particular docxCaolán McNamara1-0/+3
Change-Id: Id2c99cc6c5fe4c3a5bcf3c0b3f16b603cdd46239 (cherry picked from commit f374e01af32c7752b31455642e7d76f2056a2aeb) Reviewed-on: https://gerrit.libreoffice.org/27051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit f2dcce9155ddd9444f65b26c59c3b873ac603091)
2016-07-12silence vcl release mouse warningCaolán McNamara1-1/+2
Change-Id: I12eb894d88c7b96f92e3d080ac3cf24ff2e025ec (cherry picked from commit cfc119c4322e36283ffc4bebfb0757e8e0039a5a)
2016-07-12sfx2: clean up no longer needed SfxObjectShell::isTiledRendering()Miklos Vajna1-1/+1
Change-Id: Ia4fb0b489509364c641f8e1e695353bbdb036b59 (cherry picked from commit d0cf72f253a3cb8335601ebf2c5b1b99ab63e6b1)
2016-07-12Bin silly 'STATIC DATA' commentsTor Lillqvist3-4/+0
(cherry picked from commit 0585d81a76a99de5fb3ed2e8c34a3fc44cd83b46) Change-Id: I50e3772b7b479d2cf1eb644c7334d0f987874ccb
2016-07-12sw lok: move filtering of callbacks during paint to desktopMiklos Vajna1-3/+0
This will be important when in the per-view case SwViewShell::libreOfficeKitCallback() won't be called anymore; as pointed out by online.git's TileCacheTests::testSimpleCombine() test. Reviewed-on: https://gerrit.libreoffice.org/26372 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit a93217908d12ab9e34052a52dfd59d87fca75e52) Change-Id: Ie68f8c51facdba127763df660e9220f820805ecc
2016-07-12sfx2: bring the view shell's LOK callback up to date with SdrModelMiklos Vajna1-2/+6
This fixes CppunitTest_sw_tiledrendering in the LOK_VIEW_CALLBACK=1 case. Reviewed-on: https://gerrit.libreoffice.org/26313 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c97422fa103618ba19bde0d815674a0173058bb4) Change-Id: Ib79e57908c3edda0154341baba8279ede4281a42
2016-07-12sw comments: implement per-view LOK_CALLBACK_INVALIDATE_TILESMiklos Vajna3-4/+16
After registration and invalidation is handled per-view, the scrollbar and the text control of the comments is rendered correctly. Change-Id: I5cfa8b43fdc3a2ce7a008269b0283ee25d141440 Reviewed-on: https://gerrit.libreoffice.org/26218 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e08e5615c96e4f709871e061b5a4f21333b8f139)
2016-07-12new loplugin fpcomparisonNoel Grandin1-2/+2
Find code that compares floating point values with == or != It should rather use rtl::math::approxEqual Change-Id: I9026e08823340fa1d6a042c430515344c93215bd Reviewed-on: https://gerrit.libreoffice.org/21997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 4e9b528dccdfc438394b1ffe029f1fc8178a6086)
2016-07-12nConfigId is always 0Maxim Monastirsky1-1/+1
Change-Id: Ic314bc04a22ebf23fa7b06dca06e4d2afae096f9 (cherry picked from commit 0ac22118721b426b2fc441a1c37572cda972be08)
2016-07-12loplugin:constantparam in editengNoel Grandin1-1/+1
Change-Id: I078061c502c09bccf515151d3a5bdcd1176e64fb (cherry picked from commit 70fca3e901e41fa52589eb3f06e6839c4a8582de)
2016-07-12loplugin:unusedfieldsNoel Grandin4-22/+1
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864 (cherry picked from commit ec3f72415850bd865eb030cf2b7edb55b99d4756)
2016-07-12editeng: remove never read mpLibreOfficeKitCallbackMiklos Vajna4-8/+5
As all callback invocations happen with SdrModel's callback pointer. (cherry picked from commit 7073d20627ccfcdd705b53f9d8bc4b58fab9e82a) Change-Id: I0111040c501b7927332f88cc4797b8ebab2bc57a
2016-07-12Remove excess newlinesChris Sherlock20-43/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> (cherry picked from commit a238b1f8d304bf1e2ffb357937f3ec888ee8ac89) Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
2016-07-12editeng: ImpEditView::mbTiledRendering is never readMiklos Vajna2-2/+0
(cherry picked from commit fb7edcd806aad98ad61e60b4165771ca3ae13ef3) Change-Id: Ie8e33d075f0cedbb9f7148717c4318f4494ed419
2016-07-12sw: implement per-view LOK_CALLBACK_SEARCH_RESULT_SELECTIONMiklos Vajna1-9/+20
This way searching in one view does not affect the search state of an other view. Change-Id: I6d873b1609a8f6cb3cfe07e1f2fa92024c3545d9 Reviewed-on: https://gerrit.libreoffice.org/26161 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 52696e31e740d4076092f89531e58d11538f478f)
2016-07-12sw: implement per-view LOK_CALLBACK_HYPERLINK_CLICKEDMiklos Vajna1-1/+4
So that the view that initiated the mouse click gets the hyperlink value. Change-Id: Ibef1c5df3f27f782ce6e24c9650f92c96b8b79e3 Reviewed-on: https://gerrit.libreoffice.org/26156 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 27a8c0d921a5a6cb7e2f430cdb62ab934b57233f)
2016-07-12sw: implement per-view LOK_CALLBACK_DOCUMENT_SIZE_CHANGEDMiklos Vajna1-1/+5
This is interesting for all views, but given we invoke the callback in SwViewShell, it's only necessary to notify the matching LOK view callback and still all views are updated. Change-Id: Idc59b2bba1a944a9ad1dd0acd934a85130b32993 Reviewed-on: https://gerrit.libreoffice.org/26154 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5cf68b0eac1a81ebcb2fa8f0e90fc4f7e350bd3a)
2016-07-12update unusedmethods plugin to deal with constructorsNoel Grandin1-9/+7
and fix the operator< implementations in some of the other plugins too. Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae) Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
2016-07-12update loplugin stylepolice to check local pointers varsNoel Grandin24-256/+185
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit e8fd5a07eca70912ddee45aaa34d434809b59fb7) Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
2016-07-12sw: implement per-view LOK_CALLBACK_SET_PARTMiklos Vajna1-1/+4
Used when e.g. jumping from page 1 to page 2 in a document, and the page number widget should be updated in gtktiledviewer. Change-Id: If5359ffbfd215c71785ab51f8dcd18cc8bf017ee Reviewed-on: https://gerrit.libreoffice.org/26115 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 22367b58dbca65149ec9bc64d851be4d57759f6e)
2016-07-12sfx2 classification: use auto where it improves code readabilityMiklos Vajna1-21/+17
std::map<OUString, basegfx::BColor>::iterator itColor = aColors.find(aLevel); vs auto itColor = aColors.find(aLevel); and so on. (And do the same at two other places as well.) Reviewed-on: https://gerrit.libreoffice.org/26046 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 42dae96f97bfcc44d5e6ccf727e1cdb178123d56) Change-Id: I538998c8b8afdf18a7eb139fa4d469205c561370
2016-07-12sw: prefix members of SwLayoutModeModifierMiklos Vajna2-7/+7
Change-Id: I280a79f5060623c8a30ecfde99cf650ebde4e5fd Reviewed-on: https://gerrit.libreoffice.org/25653 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit aab59c3c17ce16882864fe41056ad6c1c850c953)
2016-07-12CppunitTest_sw_uwriter: fix loplugin:cppunitassertequals warningsMiklos Vajna2-70/+68
Change-Id: I535f28ff9307702e6070bfeaeb6e811d079e373e Reviewed-on: https://gerrit.libreoffice.org/24914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 532506b1f88388735cafd6544a140e3069cc6a73)
2016-07-12CppunitTest_sw_macros_test: fix loplugin:cppunitassertequals errorsMiklos Vajna1-4/+4
Change-Id: I1cb5f51a4dda9b2a38f4de84e4e69b0f1a7e623b Reviewed-on: https://gerrit.libreoffice.org/24873 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 307ab87fecb702b3aa72525ce4556b9c49fa5515)
2016-07-12sw: translate last Anz occurrences in headersMiklos Vajna5-10/+10
Change-Id: I36e11fe9b5a8979478029162e0f51015fc1360fb Reviewed-on: https://gerrit.libreoffice.org/24583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 104e2278fcfd82423d6341bd214a1df0b319aa1c)
2016-07-12drawinglayer, sw: indentation fixesMiklos Vajna4-5/+5
Change-Id: Ia84182629f33220a0d85bde00c16f9c26f45e3c5 (cherry picked from commit d5e07bd49ac6bcc8dc8573228e952da693241997)
2016-07-08tdf#95367 inherit page style if no new one importedJustin Luth2-0/+5
CopyLastHeaderFooter doesn't do much good if the previous section has blank stylenames. (usually because of continuous section breaks). Change-Id: Ida1e42ab0b650c7c43f06539b3cc058fe5c27919 Reviewed-on: https://gerrit.libreoffice.org/26911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 1127bed4d943036473dbbda6bcfae1ec0a23ed2e)
2016-07-08tdf#96750 docx - ensure all styles are initializedJustin Luth2-0/+6
Change-Id: I50467cb2798ef81dd89006768c66aa7e93cb411c Reviewed-on: https://gerrit.libreoffice.org/26892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit f76b8d1cfe07e84744bc57a22e815d347f3f8f23)
2016-07-08sw: fix crash on pasting from an already closed documentMiklos Vajna1-1/+2
As pointed out by <http://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::lcl_checkClassification%28SwDoc%20*,SwDoc%20*%29+0x0>. Thanks to Michael Stahl for figuring out the list of steps to reproduce this bug: 1) Create a new Writer document 2) Type some text 3) Select all 4) Copy it 5) Close the document 6) Create a second Writer document 7) Paste -> crash Change-Id: I8cfcad465803e37ec9d01d035428c5ca953adf14 Reviewed-on: https://gerrit.libreoffice.org/26380 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1bc3c88bc9ed085bf7e173cb12f313934d92f309)
2016-07-08sfx2 classification: add Type parameter to the UNO commandMiklos Vajna3-4/+12
So that sc/sd/sw doesn't have to hardcode SfxClassificationPolicyType::IntellectualProperty. Change-Id: Ib7c2376622ecaa8c7fc8401cec2ba16d12b8b8d2 Reviewed-on: https://gerrit.libreoffice.org/25078 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit ff42ad90bae398285eb630c34be230a4f0619d68)
2016-07-08sfx2 classification: specify policy type when setting a categoryMiklos Vajna1-1/+1
This will allow specifying multiple categories for multiple policy types. Separate storage and .uno: command support is still missing, though. Change-Id: I47f6ac2e2b0ba2632b32349e4e004ffade05784a Reviewed-on: https://gerrit.libreoffice.org/25064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 11f27739ffb0f069a145e411b2ae6b6fb5e16f7a)
2016-07-08sfx2 classification: do not hardcode policy type in SfxClassificationParserMiklos Vajna1-6/+8
TSCP_BAILSv1 says: "{type} designates the type of a policy. In BAILS 1.0, the recognized string values are: ExportControl, NationalSecurity and IntellectualProperty" Previously {type} was always assumed to be IntellectualProperty. Change the parser to not hardcode the policy type anymore; also change the getter for the string constants to not contain this prefix. SfxClassificationHelper::Impl still doesn't support multiple policy types, though. Change-Id: If52b40577f1c5751dacb83617fb28862d9d5bdb3 Reviewed-on: https://gerrit.libreoffice.org/25055 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f935bf47d1928f3b4df9cde600ce365cd63e485d)
2016-07-07sfx2 classification: merge common code from sw and writerfilterMiklos Vajna1-22/+2
The two versions were almost a duplicate. Change-Id: I3148150d62484a55fc8d59ca354998f211435c0b (cherry picked from commit 275443f052887f67a6d459d443293690daa3ae24)
2016-07-07RTF import: handle classification during copy&pasteMiklos Vajna4-0/+52
With this, it can't happen that "paste" returns an error, but "paste as rtf" succeeds (from a classification point of view). (cherry picked from commit b1f9369b8181b4f135bfc8a0f1fdf1be7609fd0f) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ia6807e5a6c065557cdd735a574ea858d29a97160
2016-07-07sfx2: make SfxClassificationHelper not require a full doc shellMiklos Vajna3-5/+15
So that input filters can build their own doc properties and can also use CheckPaste() without having the full original document around. (cherry picked from commit e75f6e549eb825c310d16d11babf0fba5ee7fd7a) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I0b8a63702f73ce04e8728a360b56ab9d1ca67af1
2016-07-07sw: make metadata available in copy resultMiklos Vajna4-1/+37
The "copy" part of copy&paste works in sw by creating a separate SwDoc, then copying the selection of the original SwDoc into it, so filters can easily just export the whole clipboard document. A side effect of this is that the clipboard document has no documnent shell, that would contain the metadata. Add a new member to MetaFieldManager that can store metadata in the clipboard case, let SwTransferable::GetData() write metadata there, and finally adapt the RTF export to look for metadata there as well. Change-Id: Icfe32abca4290af8bf5b24a34160c43d4c87c04a (cherry picked from commit 6a114b8ffaac52322c318d2dba543a2ad52cc892)
2016-07-07Move classified copy/paste strings from sw to sfx2Miklos Vajna3-15/+4
So that other modules can use them as well. The RTF import in writerfilter is one potential user. Change-Id: Ib009e1be2aff14d0fcac643c0c6000d2895515b0 (cherry picked from commit 1f7af133d9bade2cf226b65fab501d68113f8cc6)
2016-07-07RTF export: write user-defined document propertiesMiklos Vajna5-10/+65
(cherry picked from commit 2e1a6ba26fd0cb251f831dd2a0f60103ca1342e2) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I07dfd626f7d248e264fd1724f6f2bd1241be39d0
2016-07-07RTF import: handle \staticvalMiklos Vajna2-0/+20
With this, user-defined document properties are imported from RTF. (cherry picked from commit 8ff32dc66e3adb00209c82bddebfbeb47a275066) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I8dfb8e802bd26906827620550d6f5d88f047d364
2016-07-07CppunitTest_sw_uiwriter: add classification copy/paste testcaseMiklos Vajna1-0/+27
(cherry picked from commit 38dd218425b3e4a56d71af7082eea1dda24b48da) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic3ac02fe28bee0ea3189fb2c9d3548f5ca13fe5c
2016-07-07Move copy/paste classification check from sw to sfx2Miklos Vajna1-18/+11
So that it's easy to unit test it and other apps can use it as well in the future. Change-Id: I38d601924b7fbb17615ff6e9c031a71b40777c4c (cherry picked from commit 76e2cede5a415df8d3e7a874f56be7a0b5953e12)