summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-05-02SwFieldTypes can just be a std::vector typedefNoel Grandin
Change-Id: I10b43a71c8cedc6efbb30056d3da7fd431f04791 Reviewed-on: https://gerrit.libreoffice.org/37121 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-01AutoText: Reading multiple entriesSzymon Kłos
+ each entry is placed in a separate section + extended model and dmapper to react on docPart mark Change-Id: I7e5213a09ae7352d1d09369bd0a209b6d4e18e82 Reviewed-on: https://gerrit.libreoffice.org/37107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-05-01SwTOXTypes can just be a std::vector typedefNoel Grandin
Change-Id: I0b20f4dfdbc692e9122f64a11b65bd4234e00ee7 Reviewed-on: https://gerrit.libreoffice.org/37120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-01AutoText: handle Delete key in the dialogSzymon Kłos
Change-Id: Ifbd0026b097ff9fbf077dda57f874cfc59da3e45 Reviewed-on: https://gerrit.libreoffice.org/37119 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-05-01tdf#107362 don't insert kern if snap to char is not checked.Mark Hung
SwKernPortion is inserted between different scripts to snap the later text portion to the charcter grid if type of text grid is lines and chars, even if snap-to-char isn't checked, and create unexpected space there. It is not necessary because when snap-to-char is not checked, there would be pitch between characters. Format all three scripts in the same way and do not insert kern portion anymore if snap-to-char isn't checked. Change-Id: I6078b425aa735beb50cc6a6b4eafbba9f91f7132 Reviewed-on: https://gerrit.libreoffice.org/37037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-05-01Remove SlotType sdi propertyMaxim Monastirsky
sdi files have two ways to specify the type of a slot: (a) Put it at the beginning of the first line (b) Using the SlotType property Where (b) have higher priority, and (a) is actually ignored for "method slots" (i.e. the ones that have parameter parentheses, even empty, and therefore get the SfxSlotMode::METHOD flag), which is very confusing. The goal here is to make exclusive use of (a) for all kinds of slots, and eventually remove the SlotType support code from svidl (in a follow-up commit). Change-Id: Ib6654d34e2f8aa8ebd0bd3c41aa2a86e30e9a634
2017-05-01Return values of sdi "method slots" were unusedMaxim Monastirsky
Also expand nested methods. Only diff in workdir/SdiTarget is for SID_STYLE_WATERCAN from sw/sdi/_basesh.sdi which changed the .uno name from WatercanStyleModeOnOff to StyleWatercanMode, to match the name in sfx2/sdi/sfx.sdi (it was forced by svidl to have the same name). Change-Id: Iaeac9f4f10a36cb0b3afe3de2b6def8cd90edc6d
2017-05-01FN_TOOL_ANCHOR cleanupMaxim Monastirsky
Drop unused execute method, and fix state method to match actual use. Change-Id: I93b86bbe10b48bf7fca7d9068446a698d7dd9036
2017-04-30test for horizontal merged/split texttablesBjoern Michaelsen
Change-Id: I92ac00654b78f7b0d568a825dc879d06e475827c Reviewed-on: https://gerrit.libreoffice.org/37105 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-29tdf#107350 - prevent crash in unotbl.cxxLeMoyne Castle
check pointer and throw exception instead of SIGABRT when reading data from text tables that have varying row &/or col lengths from - merged cells after first row, - split cells in first row, etc. add backstop safety check -> exception because - complexity check fails (wrong/not called) - OOo uno api doc calls for exception when text table is 'too complex' v2: better error message for crash point and its parallel (getData[Array]) Change-Id: Ifb844c3e29042dab6b6cdb2448f7728e6ccb631d Reviewed-on: https://gerrit.libreoffice.org/37002 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-28tdf#39648: Translate German comments and terms in swJens Carl
Translate German comments and terms in sw/source/filter/html/htmlcss1.cxx Change-Id: I8549f253e72b8c798c7744954dbc862e3724085d Reviewed-on: https://gerrit.libreoffice.org/36971 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-04-28tdf#107494 sw: fix crash in SwCallMouseEvent when deleting headerMichael Stahl
The problem is that SwCallMouseEvent::PTR.pFormat is not cleared when the format is destroyed; instead SwDoc::CallEvent() checks via SwFrameFormats::Contains() that the format is still alive, which uses dynamic_cast on the deleted format. (presumably regression from 0f98299f7aa44bbb55c1bfeddca7799f727d14b0) Change-Id: I0d155c162d75b5687b58329a2a862ad57a4eb72e
2017-04-28loplugin:salunicodeliteral: swStephan Bergmann
Change-Id: I3ec5a60fff8577677eaa4977cddf69bec4078cec
2017-04-28static_cast after dynamic_castCaolán McNamara
Change-Id: I60a4bdc36c96c7b70db63e61e247f46439b68ac9
2017-04-28move builder attributes from OString to OUStringCaolán McNamara
Change-Id: I235188c9a086337b104e600f31a1c81deeca6c17 Reviewed-on: https://gerrit.libreoffice.org/37076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-28loplugin:cppunitassertequals: swStephan Bergmann
Change-Id: I9e2dcf0e2f5ed9c542b9807683878c654edc21fb
2017-04-28tdf#107474 sw: fix crash when deleting header with active SdrObjectMichael Stahl
The problem is that the SdrView's text edit mode remains active when the header is deleted, which deletes the active SdrObject that is anchored in the header. Then the next call to SdrBeginTextEdit() will call SdrEndTextEdit() but the mxTextEditObj WeakReference is null then and so the cleanup code that resets the SdrOutliner's UndoManager is not called, but then the SdrOutliner is deleted. What's really horrible about this is that while text editing is active, both SdrObjEditView and ImpEditEngine consider themselves the exclusive owner of SwDoc's UndoManager. (regression from 12a4200e8ff7f045efcc7e9d15a24b15b248c437 and d7b7c9fdfe63deec26c420efc3ff1fd73c21bb27) Change-Id: I17c5165a03d2de1eaba8a335dfbfded56573f8a2
2017-04-28sw: remove useless commentMichael Stahl
Change-Id: I019aa3a9381af0cb26970b69ab41258e05410617
2017-04-28loplugin:checkunusedparams in accessibility and avmediaNoel Grandin
Change-Id: I94df9a65578792fb06f3b3259603f70ca1e0b3db Reviewed-on: https://gerrit.libreoffice.org/37059 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27tdf#107020: Reintroduce uses of I32S, I64SStephan Bergmann
...that had been removed with 4b788a12380518e31a9064d5839f4880d3f36874 "There should be no need to distinguish between I32S and I64S" (which this commit effectively reverts). I had erroneously assumed that the arguments to I32S and I64S would only be of (signed) integer types, and that it would be irrelevant that they are truncated to sal_Int32 resp. sal_Int64. However, at least oox/source/export/drawingml.cxx called I32S with double values (for which there is an OUString::number overload too), so the resulting strings could be rather different. Change-Id: Ib3887269fad0764740bc9ed3be91f67696a23b55 Reviewed-on: https://gerrit.libreoffice.org/37040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-27tdf#88555: band-aid fix, using GetPos/find instead of ContainsThorsten Behrens
to find out whether given format still exists. GetPos was replaced by Contains on multiple places in commit 98436c4b53639d86f261ac630c46d32e3c7b8e28 but sometimes after series of undos/redos, vtable of some items in those format arrays becomes corrupt and it makes dynamic_cast (as used by Contains) fail and Writer falls flat on its face. This is just a workaround, no idea about the root cause. Change-Id: I1e02fd932dbac741687c15900841b9b7c778e2d4 Reviewed-on: https://gerrit.libreoffice.org/37038 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-04-27tdf#39468 cleanup source code commentsdennisroczek
* translate German source code comments * remove ascii art * remove bogus source Code comments * remove old StarOffice/Sun internal bug tracker references Change-Id: I443bf2fdba3780c411d69809111daf3aa3a48451 Reviewed-on: https://gerrit.libreoffice.org/36005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27tdf#39468 Translate German comments in swJens Carl
Translate German comments and terms in sw/ Change-Id: Ie33ad4496f9aeb5c06612241779fba627a5d2876 Reviewed-on: https://gerrit.libreoffice.org/36926 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-04-27tdf#107204: Make sure we always do Unicode BidiKhaled Hosny
Writer seems to have an “optimization” that only applies bidi algorithm if the text direction is nor LTR and there is some characters that we classify as complex script. This is a very simplistic optimization as evidenced by the bug above. We certainly don't want to skip bidi the text differently based on the default direction (whatever that means), and not all RTL scripts are complex ones, even if they are we might be behind Unicode in our script classification. Just trust that bidi algorithm does the right thing and don’t do premature optimization. If this turns out to be a real performance issue, we will need to find a better optimization. Change-Id: Ic0423b61d54de937bded95b369dab50e8fdca0df Reviewed-on: https://gerrit.libreoffice.org/36704 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-27sw: add test that SwXTextCursor is disposed if header is deletedMichael Stahl
This test failed for 2 reasons: 1) since somewhere between LO 5.0 and 5.1, the PaMCorrAbs sent a SwMsgPoolItem but SwUnoCursorPointer checked for a LegacyModifyHint (fixed in commit a029a479429d334875b73e2fc4e34b314a1ad369) 2) the SwXHeadFootText being registered at the header format prevented its deletion (fixed in preceding commit) Change-Id: I1d36bc2b9ca222b1b68fda94ded65451a677214a
2017-04-27sw: fix always-true condition in lcl_DelHFFormat ...Michael Stahl
... that prevents headers from being deleted if they have a client. (regression from d4267231754c1e6b03c7723a6fecc46750e7c780) Change-Id: I71f52f8806e59c97b81aa14144c700c14c5527b0
2017-04-27remove sw bitmaps from .src filesCaolán McNamara
Change-Id: I9ccd69662f9d3a77d1921b3433b0e2f541960a90 Reviewed-on: https://gerrit.libreoffice.org/37020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27tools: move errcode.hxx to the vcl moduleChris Sherlock
Change-Id: I17e5a033de5f0aeb0a726744f7b464cdab6e2ee3 Reviewed-on: https://gerrit.libreoffice.org/36854 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-26tdf#107392 ODF import: fix z-order sorting of SVG imagesMiklos Vajna
The problem was that in case the document has shapes where the order does not match the z-index order, so sorting is needed, then sorting failed to take the multi-image feature into account. E.g. SVG images have a PNG fallback, but at the end of the shape import the PNG fallback is removed, which means the "actual" (not the "wished") z-index of the shapes after the SVG image has to be adjusted. Without this happening SvxDrawPage::getByIndex() (or in case of Writer, SwTextBoxHelper::getByIndex()) will throw when the importer calls getByIndex(3) but we only have 3 shapes. This results in not honoring the z-index request of the remaining shapes. Regression from commit 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70 (re-base on ALv2 code. Includes (at least) relevant parts of:, 2012-10-09), from the Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement http://svn.apache.org/viewvc?view=revision&revision=1220836 part. Change-Id: Ibe880e5c6c74b728b4a760498720ee31f052b726 Reviewed-on: https://gerrit.libreoffice.org/36998 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-26Hack-around an unclear Windows problem in the test.Jan Holesovsky
Change-Id: I5194c6a20953eb66745539493a8782f089e25e2a Reviewed-on: https://gerrit.libreoffice.org/36985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-04-26sw: convert some OSL_ENSURE to assert in ftnfrm.cxxMichael Stahl
Change-Id: I1e37606a767a6399965ede05beb14abffd07be89
2017-04-26tdf#107398 sw: do not leave empty footnote container in layoutMichael Stahl
... when applying loop control in SwFlowFrame::MoveBwd(). The SwFootnoteContFrame is newly created in MoveBwd(), line 2062: pNewUpper = m_rThis.GetLeaf( MAKEPAGE_FTN, false ); If it stays empty, that is not a valid layout so delete it again. Since the idle/timer refactoring in VCL the invalid layout stays until the document is closed; presumably before LO 5.0 the timer based layout would reformat things again. (regression from af41b7f91f22052d49654d41ae9916d6981db3f6) Change-Id: I841f42b465f8123f9246f1fa70d1417ffdd57700
2017-04-26tdf#107427 sw: fix crash when deleting header with selected tableMichael Stahl
Restore resetting of the table cursor point position in SwCursorShell::ParkCursor(), which somehow prevents the crash. (regression from efc5995170f2ffe98374acb16a4f851bede6842d) Change-Id: Ia7ec2967c84cfcffe1718e9604d6b8506c3839a4
2017-04-26sw: fix loplugin:override warningMiklos Vajna
Change-Id: I3c8847400adbfb9a843b1a47ec86c28c54c41b95
2017-04-26tdf#107427 sw: fix crash with stale entries in SwNavigationMgrMichael Stahl
When deleting a header, the sw::UnoCursorPointer of SwNavigationMgr spontaneously self-destructs, but SwNavigationMgr expects its cursors to always be alive, so add another SfxListener to remove dying cursors. (probably regression from a2c467a58ade9f55e0154b2935c747bb283ebd45) Change-Id: I1055ea3cfc47114dc36002198f1ddffea87d2d85
2017-04-26remove this whole "kill SwFlyDrawContact with last frame" nonsenseBjoern Michaelsen
- first of all, SwFlyDrawContact is part of the document state/model, not the layout. - SwWW8ImplReader::CreateContactObject() and SwXFrame::GetOrCreateSdrObject() seem to agree as they create SwFlyDrawContacts without caring for frames using them being around. This was inherently fragile as FinitDrawObj would mercilessly kill the SwFlyDrawContact in that case (and thus also modify document state). - SwFlyDrawContact is now entirely owned by SwFlyFrameFormat. Change-Id: I70b716fef63279552b39a18ac143024a460ba785 Reviewed-on: https://gerrit.libreoffice.org/36899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-26use strong_int for LanguageTypeNoel Grandin
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26RTF export: restore build-time test for self-containing headersMiklos Vajna
If the "own" header is not the first one, the compiler no longer ensures that these headers are self-contained. Change-Id: I436428213e02482e6b6f21cd4e3c2ed04a7b4020
2017-04-25vcl: change ErrorHandlerFlags to DialogMaskChris Sherlock
Change-Id: I1959ac97f679d8d719f851f9869962b39a20ded9 Reviewed-on: https://gerrit.libreoffice.org/36841 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25tdf#101055 Translate default name of bookmarksGabor Kelemen
Change-Id: I9dd5ab006c7b7e7da7c4c2705925bbf264b58b60 Reviewed-on: https://gerrit.libreoffice.org/36813 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-04-25Optimize plain-text import.Michael Meeks
Cost of managing rsids is very significant >50% of import time, new Rsids will be generated for changes anyway. Also avoid un-necessary splitting of paragraphs on new-line. Change-Id: Ib959306f187f93bd3a85ead11fd2342b99d4ece3 Reviewed-on: https://gerrit.libreoffice.org/36938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-04-25tdf#39468 Translate German commentsAlexey Vlasov
Change-Id: I94e53a5a375422c1865e881a29d5b080f844524b Reviewed-on: https://gerrit.libreoffice.org/36493 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-04-25tdf#39468 Translate German comments sw/source/core/text/txthyph.cxxAlexey Vlasov
Change-Id: I2c818def66dcb04fabbffeb4c2ef1bdd1d2aa055 Reviewed-on: https://gerrit.libreoffice.org/36488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-25FOOTERL and FOOTERR are write-onlyNoel Grandin
Change-Id: I65ed01d0bf10409282d9fe5087f5ea84cb084ddc Reviewed-on: https://gerrit.libreoffice.org/36932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tdf#106035 update the contextual groupedbar full layout updateandreas kainz
Change-Id: Ic7956e11ebe2edd8e1046c4695f92b3398036c2f Reviewed-on: https://gerrit.libreoffice.org/36865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
2017-04-25tdf#107104 DOCX drawingML import: fix invisible arrow shapeMiklos Vajna
This is the drawingML equivalent of commit 3d9ebded1358395ed81db7a63629b046aec2aeac (Misc improvements for docx VML import, 2010-10-06), which made sure that shapes are never invisible just because they have zero height or width. For this particular bugdoc the Word-produced WW8 equivalent width is 20 twips, but let's be consistent with the VML import and just round up to 1 mm100. Also fix two existing tests that wanted to test something else, but implicitly asserted that some shapes indeed have zero width/height. Change-Id: I9600424520d0a3deecc711b44622eccc041a59da Reviewed-on: https://gerrit.libreoffice.org/36927 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-25errinf.hxx moved out of tools and into vcl moduleChris Sherlock
ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more appropriate to have it reside in the VCL module. Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650 Reviewed-on: https://gerrit.libreoffice.org/36839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25make __RSC a builtin define for the RSC compilerNoel Grandin
instead of randomly defining it in only some of .src files Change-Id: Ifec3920740723d248400f451d717b5288c421b8d Reviewed-on: https://gerrit.libreoffice.org/36832 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25loplugin:checkunusedparams in vclNoel Grandin
Change-Id: I26661684e634aa15a18f78442de15c9db832f319 Reviewed-on: https://gerrit.libreoffice.org/36886 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>