summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2015-09-07sw: fix newly created document being modifiedMichael Stahl
After the document is created, an event is dispatched on the main loop that calls SfxPickList::Notify(), which modifies document properties. It tries to prevent setting the document to modified by calling SfxObjectShell::EnableSetModified(false), but Writer cunningly outwits it by simply having its own independent(?) modified flag that is set unconditionally in DocumentStatisticsManager::DocInfoChgd(). Let's assume that if the modified flag shouldn't be modified in SfxObjectShell, it shouldn't be modified in DocumentStatisticsManager. Somehow in 4.4 and 4.3 the same thing was going on, but it didn't result in a visibly enabled Save icon in the UI, but with 5.0 it does - cannot easily bisect why that changed due to tdf#91383. Change-Id: Id30fd831eb29910c9fb44ed3031bf8da23586bea
2015-09-07tdf#91383: sw: actually reset the modified status tooMichael Stahl
... when deleting the temporarily inserted styles in SwDocStyleSheet::FillStyleSheet(). Change-Id: Id4abc067ce10b41486f659350267c7e3933db472
2015-09-07Related: tdf#93676 msword wraps slightly differently than usCaolán McNamara
Change-Id: I91ba41cb052c38aa3b047cf079090b01bbe93b39
2015-09-07-Werror,-Wreturn-typeStephan Bergmann
Change-Id: I843b2cb12783549033fc81f82751704859139960
2015-09-07tdf#90991: sw: fix style preview creating undo objectsMichael Stahl
SwDocStyleSheet::FillStyleSheet() already takes care to remove all temporarily created styles, so assume that works and suppress the creation of user-visible Undo objects. Change-Id: I748f0e8304c42e767b331ebd22be0290b9c0d89d
2015-09-07tdf#91383: sw: prevent style preview from actually creating stylesMichael Stahl
The dialog/sidebar should not actually create styles that don't exist yet, because it messes up Undo and the (unused) styles are then unnecessarily exported to documents. Due to Writer's ... unusual SwDocStyleSheet class this is a bit tricky. Add a new function GetItemSetForPreview() and use it from the style preview code. The implementation does not use FillPhysical so will temporarily create and then delete any non-existing styles. Skip page and numbering styles for now since they don't have a useful preview. (regression from ca95307638207db5d662059aa61594151a13e927) Change-Id: Id6ee30ea467fc24c991547a4c23a9ce14fdd86c7
2015-09-07sw: fix not-quite-copypaste code in SwDocStyleSheet::FillStyleSheet()Michael Stahl
This causes the temporary creation of frame styles to fail. Change-Id: I5d148ae008660d9c0f457a4c0e9dc256e0dfc49a
2015-09-07sw: convert boost::ptr_vector to std::vector<std::unique_ptr>Michael Stahl
Change-Id: I341fb7c0712dff77ebfed41560a487f85c27c25a
2015-09-07sw: convert boost::ptr_vector to std::vector<std::unique_ptr>Michael Stahl
Change-Id: If8d9770717c21875b4472b0d94a1fa5a9d136085
2015-09-07sw: erroneous vector assignment in SwTable::OldMerge()Michael Stahl
+ rLineBoxes = pFndBox->GetLines()[nEnd]->GetBoxes(); This actually assigns the boxes vector of the last line to the first line, which the previous code didn't do. Notably after converting the types from boost::ptr_vector to std::vector<std::unique_ptr>, the assignment produces a several page error message from both GCC and clang, and infuriatingly neither compiler was able to tell on which line in tblrwcl.cxx the template was instantiated, so i had to bisect that. (regression from be5e4247e2a164bd1f2eacf9a33d6d73df16d0e3) Change-Id: I646e3ca678895480d38ec48f38d720458860a985
2015-09-07Related: tdf#93675 'new' ms-alike numbering has same problem as old numberingCaolán McNamara
when it comes to nodes which were numbered, but have their number deleted, where the indent from the numbering is still in effect in writer, but not in msoffice. Change-Id: I700f34171d8c9e9f6fb725d115ff1fe704ceb4bb
2015-09-07cppcheck: redundantConditionCaolán McNamara
Change-Id: If4ef5f054412b75a18d4afd28509ca02d5d2573f
2015-09-07convert Link<> to typedNoel Grandin
Change-Id: I38f2c15b4f8bb1d7187b019d26a2644b087898c1 Reviewed-on: https://gerrit.libreoffice.org/18357 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-07tdf#83227 oox: reuse RelId in DML/VML export for the same graphicMiklos Vajna
So that large images are written only once to the ZIP container when they are exported using both markups. This affects drawinglayer images, the Writer ones are handled directly in sw and were already deduplicated. Change-Id: Iff7c769329b42939833056b727b070f6a60da5e3
2015-09-05cppcheck: fix some redundantCondition warningsJulien Nabet
Change-Id: If53d33fb4d9ca9dc1babb9043bd07c5d29fe74c2 Reviewed-on: https://gerrit.libreoffice.org/18353 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-09-04tdf#86671: Cancel printing if query is cancelledOliver Specht
cancelling query for mail merge vs. normal printing should cancel the request Change-Id: I157778efc9e5db42646fb3ff238a5b6f4c8dccca Reviewed-on: https://gerrit.libreoffice.org/18339 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-09-04natural sort contents of writer navigatorCaolán McNamara
i.e. graphic1, graphic2, graphic10 not i.e. graphic1, graphic10, graphic2 Change-Id: Ic8596144b594a933cb1366e29d3c45a4c90d7d07
2015-09-04convert Link<> to typedNoel Grandin
Change-Id: I42eba6c9b6295d94dddc49942d47d59f474bfd28
2015-09-04drop pams before removing extraneous parasCaolán McNamara
and remove extra paras in order of largest index first Change-Id: Iafbe612a8a8bd51cb157b4a4c07031c6603d92ee
2015-09-04sw: replace boost::ptr_map with std::mapMichael Stahl
Change-Id: I8cf906b7f3f9647a60b20a977ea11c8698438ec2
2015-09-04sw: avoid asserts from RsidOnlyAutoFormats checkMichael Stahl
This happens with a document that has a header or footer that is not displayed after loading, for example 1-page document with separate left/right or first page header. The SwTextNode::FileLoadedInitHints() is not called for these headers because they are not visible so MakeFrm() is not called. If they are not visible the RSID related flags don't matter. Change-Id: Ie3bd1ce3bc0ac2ff1c429386149294e0c8fd3cb6
2015-09-04tdf#92732: fix vclptr lifecycle for index entry editing dialogOliver Specht
Call SwViewShell::SetCareWin() in closeHdl instead of d'tor since with care window set the d'tor is never called Change-Id: Ieb8280ab57c3bccf95ce2ce96937aab261133ce0 Reviewed-on: https://gerrit.libreoffice.org/18330 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-09-04convert Link<> to typedNoel Grandin
Change-Id: I2136c3db2742afcb4722f69297276bea1e0119f4 Reviewed-on: https://gerrit.libreoffice.org/18306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-03tdf#93246: pass on cancel state in mail merge dialogJuergen Funk
The return result was not used for the CUPS case before, leading to un-cancelled printing / document generation in the file->print mail merge case. Change-Id: I470293755c6696fca6d1b97fa1dac7854b4f7107 Reviewed-on: https://gerrit.libreoffice.org/18302 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-09-03sw: replace boost::ptr_vector with std::vectorMichael Stahl
Change-Id: I477e7a809b572fd62b276afd44c8b140efb9d653
2015-09-03sw: replace boost::ptr_deque with std::deque<std::unique_ptr>Michael Stahl
Change-Id: Ibb51b67d4d9568577b73a43411322fb5d09bb399
2015-09-03Related: tdf#93676 special 255 Percent Flag should not be exported to docxCaolán McNamara
as a true percentage value. 255 is a special flag that the value is synced to the other dimension. Without this word gives the frame in the attached example a huge height. Change-Id: Ida0c15779d4583ca075428d77b8dc03c32f22edb
2015-09-03tdf#79018: Prevent line break as footnote labelOliver Specht
footnote labels must not contain line breaks Change-Id: I00d334197b960c4ed17fdee3ea8a1c734cbfa4c1 Reviewed-on: https://gerrit.libreoffice.org/18292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-09-030xFF is reserved in [Height|Width]Percent as a special flagCaolán McNamara
no logic change here, just collect all the uses of 0xff, 0xFF, 255, 0xfe that are for this hackery together under SwFormatFrmSize::SYNCED Change-Id: I061da70962e410903aed94b62868dec1d61e54b9
2015-09-03duplicate HANDLE_VIEWSET_HIDE_WHITESPACE handlingCaolán McNamara
Change-Id: Id34ae93ccbb020f09c608f34e5f41a8622cf1607
2015-09-03tdf#39080 Hide white space between pages in 'print layout'Ashod Nakashian
Merged Hide Whitespace with Browser Mode and hooked the former with the UI. In Hide Whitespace mode the headers and footers are removed and page margins as well as between-page gaps are reduced to minimum. In single-page view the side margins are left as-is. In multi-page and book-view the sides are removed, however, they have twice the width of the top and bottom. Printing and PDF export disable this mode. The usable screen real-estate is greatly improved in this mode, which is controlled from the View menu. Change-Id: I2d0075ae9a76162c26c78e9eb23a71920cdfc522 Reviewed-on: https://gerrit.libreoffice.org/17281 Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-03tdf#93719: handle 'HideWhitespace' in SwXViewSettingsOliver Specht
Added missing part from tdf#39080 to SwXViewSettings to handle 'HideWhitespace' property Change-Id: I8d8098810ba36b6ade6e4476464a72348ef4db8d Reviewed-on: https://gerrit.libreoffice.org/18291 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-03the ww8 dumper is long deadCaolán McNamara
Change-Id: I8f19daac5ad6bc9e90e9eab5da206a392777473e
2015-09-03loplugin:stringconstant also for cases using char const v[] = "..."Stephan Bergmann
Change-Id: Iba38686620624178a7be39d703389402bbcea4cb
2015-09-03sw: indentation fixesMiklos Vajna
Change-Id: Ic4cb73340b7c91198e982c2f7be030a4d6299d4e
2015-09-02doc para property ranges cannot be 0 lengthCaolán McNamara
Change-Id: If946204873343d8bbc0c1d391ca2c65d8b2f8561
2015-09-02-Wundefined-bool-conversionCaolán McNamara
'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] Change-Id: Iafffb9ea81387ea19fb9c0a4c6ba929215ace3fa
2015-09-02hinter: 'after' better than 'behind'Caolán McNamara
"'Behind' is typically used when the context has meanings of depth, and as such becomes ambiguous when used in a flat list ... 'After'/'before' contain meanings of ordering which are unambiguous" Change-Id: I1b59c7e3fe5773b88e8e7b9a01cefb28e4851090
2015-09-02detect if new offsets are the same as the previous ones and avoid loopCaolán McNamara
Change-Id: I4c53d4bce9a69d79e34bdd634c296d9b495e1904
2015-09-02SetXXX(bool) with a default value of false are just wrongNoel Grandin
Change-Id: I4888d0474199bb10ca81d1ad03118a150f574671 Reviewed-on: https://gerrit.libreoffice.org/18235 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-02sw: use std::unique_ptr<> in swnewtableMiklos Vajna
Change-Id: Iddc51cd927fa4e2e44c094909892102158f07389
2015-09-01sw: remove a silly 16bit castMichael Stahl
Change-Id: I20eb3379838c5255ff47882b6693908b5971653f
2015-09-01sw: convert boost::ptr_vector to std::vector<std::unique_ptr>Michael Stahl
Change-Id: I846180641279b19f6bd4ac14c3e840e0bec4ded5
2015-09-01sw: sort includes in editsh.hxxMichael Stahl
Change-Id: I74181ccf42e86bc6b65056199e6102bc05518a34
2015-09-01sw: replace boost::ptr_vector with std::vectorMichael Stahl
Change-Id: Iad91811a0e674b3541d51f3e94a9a5770bfda0a1
2015-09-01switch to 64-bit checksum: now BitmapChecksum is a sal_uInt64Marco Cecchetti
Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: Ied43bf626be82c0e7f6c62e965d0704fc645ac19
2015-09-01Added support for computing 64-bit checksum of bitmap in OpenGLMarco Cecchetti
Added a C++ and a GLSL implementation of a 64-bit CRC algorithm. Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: I16bb985a14866775efda49e21fe033ff64645896
2015-09-01Make saving the default fonts work againMaxim Monastirsky
This reverts part of 745c7bce5fe8b218f7d300667a5409bc7ef58c34. The current behavior of affecting only the current document is useless, given that the same can be done by editing the corresponding styles. Actually I'm pretty sure that's why the wiki flagged the "Current document only" option as unnecessary. So let's go back to saving for all documents. Change-Id: I7ed9609bc93ae519ac89a6e6080a3b37b09633d8
2015-09-01WaE: loplugin:staticmethods in the non-Java caseTor Lillqvist
Change-Id: Ibebe470d0d0c00bfcaf7b3cb90aa102e8101b7bc
2015-09-01SwViewShell::ImplEndAction: still paint directly when non-double-bufferingMiklos Vajna
It turns out that in this case it hurts performance if we go via invaliation-then-paint instead of direct painting when double-buffering is not enabled. Related commits: - beb4aa21d61f0d66392d596be86fb57b4b167239 (SwViewShell::ImplEndAction: avoid direct paint, 2015-06-29) and c9175a1bd3249ad573ae6827bf19963a3ebe2fbc (SwViewShell::ImplEndAction: avoid direct PaintDesktop(), 2015-07-03) globally avoided direct paints - 222f10e773ba51a19880be1b798990260c198147 (tdf#93096 sw: fix selection with keyboard outside current view, 2015-08-18) restored direct paint when non-double-buffering for the second commit, this one does the same for the first Change-Id: Ida0c6917a8cdec74209bd64813c7876d4fa61b8a