summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2017-06-10sw: DisableCallbackAction in a bunch more placesMichael Stahl6-10/+24
... to prevent recursive layout. Change-Id: I4a7cdcebe77bd7d8d16c721765ad5eb171e84619
2017-06-10sw: use DisableCallbackAction here alsoMichael Stahl1-6/+7
This should also fix tdf#91602 and appears more consistent. Change-Id: Ic0a227d01f45b01b5cfb511d12b71b3b3aa84a05
2017-06-10tdf#108118 sw: fix recursive layouting during SwCursorShell::Paint()Michael Stahl4-24/+28
The problem, in a nutshell, is that SwDrawContact::Changed() is called during layout, and recursively starts another layout that removes a drawing object that is being iterated over in frame #28 SwObjectFormatter::FormatObjsAtFrame_() from the layout. Apparently SwDrawContact::Changed() is by far the most dangerous function to call during layout; set the quite targeted flag SetCallbackActionEnabled() to prevent the recursion. 0 SwSortedObjs::Remove(SwAnchoredObject&) (this=0x73e4a00, _rAnchoredObj=...) at sw/source/core/layout/sortedobjs.cxx:228 1 SwFrame::RemoveDrawObj(SwAnchoredObject&) (this=0x9430e20, _rToRemoveObj=...) at sw/source/core/layout/fly.cxx:2076 2 SwDrawVirtObj::RemoveFromWriterLayout() (this=0x95ce130) at sw/source/core/draw/dcontact.cxx:2199 3 SwDrawContact::DisconnectObjFromLayout(SdrObject*) (this=0x70fef00, _pDrawObj=0x95ce130) at sw/source/core/draw/dcontact.cxx:1663 4 SwLayoutFrame::DestroyImpl() (this=0x91c6c60) at sw/source/core/layout/ssfrm.cxx:489 5 SwFrame::DestroyFrame(SwFrame*) (pFrame=0x91c6c60) at sw/source/core/layout/ssfrm.cxx:389 6 SwLayoutFrame::DestroyImpl() (this=0x9435cd0) at sw/source/core/layout/ssfrm.cxx:500 7 SwPageFrame::DestroyImpl() (this=0x9435cd0) at sw/source/core/layout/pagechg.cxx:270 8 SwFrame::DestroyFrame(SwFrame*) (pFrame=0x9435cd0) at sw/source/core/layout/ssfrm.cxx:389 9 SwRootFrame::RemovePage(SwPageFrame**, SwRemoveResult) (this=0x36b26f0, pDelRef=0x7ffeafbf2e38, eResult=SwRemoveResult::Prev) at sw/source/core/layout/pagechg.cxx:1351 10 SwRootFrame::RemoveSuperfluous() (this=0x36b26f0) at sw/source/core/layout/pagechg.cxx:1426 11 SwLayAction::InternalAction(OutputDevice*) (this=0x7ffeafbf3250, pRenderContext=0x3595030) at sw/source/core/layout/layact.cxx:502 12 SwLayAction::Action(OutputDevice*) (this=0x7ffeafbf3250, pRenderContext=0x3595030) at sw/source/core/layout/layact.cxx:351 13 SwViewShell::ImplEndAction(bool) (this=0x364cc00, bIdleEnd=false) at sw/source/core/view/viewsh.cxx:279 14 SwViewShell::EndAction(bool) (this=0x364cc00, bIdleEnd=false) at sw/inc/viewsh.hxx:605 15 SwCursorShell::EndAction(bool, bool) (this=0x364cc00, bIdleEnd=false, DoSetPosX=false) at sw/source/core/crsr/crsrsh.cxx:259 16 SwRootFrame::EndAllAction(bool) (this=0x36b26f0, bVirDev=false) at sw/source/core/layout/pagechg.cxx:1728 17 SwDrawContact::Changed(SdrObject const&, SdrUserCallType, tools::Rectangle const&) (this=0x70fef00, rObj=..., eType=SdrUserCallType::MoveOnly, rOldBoundRect=...) at sw/source/core/draw/dcontact.cxx:985 18 SdrObject::SendUserCall(SdrUserCallType, tools::Rectangle const&) const (this=0x95ce130, eUserCall=SdrUserCallType::MoveOnly, rBoundRect=...) at svx/source/svdraw/svdobj.cxx:2736 19 SdrObject::Move(Size const&) (this=0x95ce130, rSiz=Size = {...}) at svx/source/svdraw/svdobj.cxx:1482 20 SwDrawVirtObj::Move(Size const&) (this=0x95ce130, rSiz=Size = {...}) at sw/source/core/draw/dcontact.cxx:2366 21 SwAnchoredDrawObject::SetObjTop_(long) (this=0x95ce250, _nTop=777490) at sw/source/core/layout/anchoreddrawobject.cxx:677 22 SwAnchoredObject::SetObjTop(long) (this=0x95ce250, _nTop=777490) at sw/source/core/layout/anchoredobject.cxx:593 23 objectpositioning::SwToContentAnchoredObjectPosition::CalcPosition() (this=0x7ffeafbf3980) at sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx:739 24 SwAnchoredDrawObject::MakeObjPosAnchoredAtPara() (this=0x95ce250) at sw/source/core/layout/anchoreddrawobject.cxx:421 25 SwAnchoredDrawObject::MakeObjPos() (this=0x95ce250) at sw/source/core/layout/anchoreddrawobject.cxx:318 26 SwObjectFormatter::FormatObj_(SwAnchoredObject&) (this=0x90623d0, _rAnchoredObj=...) at sw/source/core/layout/objectformatter.cxx:374 27 SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) (this=0x90623d0, _rAnchoredObj=..., _bCheckForMovedFwd=false) at sw/source/core/layout/objectformattertxtfrm.cxx:126 28 SwObjectFormatter::FormatObjsAtFrame_(SwTextFrame*) (this=0x90623d0, _pMasterTextFrame=0x0) at sw/source/core/layout/objectformatter.cxx:443 29 SwObjectFormatterTextFrame::DoFormatObjs() (this=0x90623d0) at sw/source/core/layout/objectformattertxtfrm.cxx:328 30 SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (_rAnchorFrame=..., _rPageFrame=..., _pLayAction=0x0) at sw/source/core/layout/objectformatter.cxx:191 31 SwHeadFootFrame::FormatSize(long, SwBorderAttrs const*) (this=0x91c6c60, nUL=663, pAttrs=0x8fbc530) at sw/source/core/layout/hffrm.cxx:263 32 SwHeadFootFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x91c6c60, pRenderContext=0x3595030, pAttrs=0x8fbc530) at sw/source/core/layout/hffrm.cxx:416 33 SwLayoutFrame::MakeAll(OutputDevice*) (this=0x91c6c60) at sw/source/core/layout/calcmove.cxx:913 34 SwFrame::PrepareMake(OutputDevice*) (this=0x91c6c60, pRenderContext=0x3595030) at sw/source/core/layout/calcmove.cxx:346 35 SwFrame::Calc(OutputDevice*) const (this=0x91c6c60, pRenderContext=0x3595030) at sw/source/core/layout/trvlfrm.cxx:1783 36 lcl_FormatLay(SwLayoutFrame*) (pLay=0x91c6c60) at sw/source/core/layout/pagechg.cxx:360 37 lcl_FormatLay(SwLayoutFrame*) (pLay=0x9435cd0) at sw/source/core/layout/pagechg.cxx:357 38 SwPageFrame::PreparePage(bool) (this=0x9435cd0, bFootnote=false) at sw/source/core/layout/pagechg.cxx:456 39 (anonymous namespace)::doInsertPage(SwRootFrame*, SwPageFrame**, SwFrameFormat*, SwPageDesc*, bool, SwPageFrame**) (pRoot=0x36b26f0, pRefSibling=0x7ffeafbf43c8, pFormat=0x3076050, pDesc=0x3076010, bFootnote=false, pRefPage=0x7ffeafbf43d8) at sw/source/core/layout/pagechg.cxx:1210 40 SwFrame::InsertPage(SwPageFrame*, bool) (this=0x3620d70, pPrevPage=0x9227900, bFootnote=false) at sw/source/core/layout/pagechg.cxx:1269 41 SwFrame::GetNextLeaf(MakePageType) (this=0x3620d70, eMakePage=MAKEPAGE_INSERT) at sw/source/core/layout/flowfrm.cxx:994 42 SwFrame::GetLeaf(MakePageType, bool) (this=0x3620d70, eMakePage=MAKEPAGE_INSERT, bFwd=true) at sw/source/core/layout/flowfrm.cxx:797 43 SwFlowFrame::MoveFwd(bool, bool, bool) (this=0x3620e18, bMakePage=true, bPageBreak=false, bMoveAlways=false) at sw/source/core/layout/flowfrm.cxx:1851 44 SwContentFrame::MakeAll(OutputDevice*) (this=0x3620d70) at sw/source/core/layout/calcmove.cxx:1681 45 SwFrame::PrepareMake(OutputDevice*) (this=0x707a340, pRenderContext=0x3595030) at sw/source/core/layout/calcmove.cxx:312 46 SwFrame::Calc(OutputDevice*) const (this=0x707a340, pRenderContext=0x3595030) at sw/source/core/layout/trvlfrm.cxx:1783 47 GetFrameOfModify(SwRootFrame const*, SwModify const&, SwFrameType, Point const*, SwPosition const*, bool) (pLayout=0x36b26f0, rMod=..., nFrameType=(SwFrameType::Txt | SwFrameType::NoTxt), pPoint=0x707c6f0, pPos=0x707c720, bCalcFrame=true) at sw/source/core/layout/frmtool.cxx:3247 48 SwContentNode::getLayoutFrame(SwRootFrame const*, Point const*, SwPosition const*, bool) const (this=0x71328c0, _pRoot=0x36b26f0, pPoint=0x707c6f0, pPos=0x707c720, bCalcFrame=true) at sw/source/core/docnode/node.cxx:1118 49 SwRootFrame::CalcFrameRects(SwShellCursor&) (this=0x36b26f0, rCursor=...) at sw/source/core/layout/trvlfrm.cxx:2028 50 SwShellCursor::FillRects() (this=0x707c680) at sw/source/core/crsr/viscrs.cxx:609 51 SwSelPaintRects::Show(std::__debug::vector<rtl::OString, std::allocator<rtl::OString> >*) (this=0x707c680, pSelectionRectangles=0x7ffeafbf5570) at sw/source/core/crsr/viscrs.cxx:332 52 SwShellCursor::Show(SfxViewShell*) (this=0x707c680, pViewShell=0x0) at sw/source/core/crsr/viscrs.cxx:619 53 SwCursorShell::Paint(OutputDevice&, tools::Rectangle const&) (this=0x364cc00, rRenderContext=..., rRect=...) at sw/source/core/crsr/crsrsh.cxx:1283 54 SwEditWin::Paint(OutputDevice&, tools::Rectangle const&) (this=0x3595030, rRenderContext=..., rRect=...) at sw/source/uibase/docvw/edtwin2.cxx:476 Change-Id: I1b237f0f425e58bb95bae9f19019f26fe5da21fd
2017-06-09GSoC: import VML shape adjustmentsGrzegorz Araminowicz2-0/+11
Change-Id: Ifcd49f34b889b34eba2464de6e083f9021633bc6 Reviewed-on: https://gerrit.libreoffice.org/38427 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin12-17/+17
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09use comphelper::InitPropertySequence in more placesNoel Grandin13-104/+82
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09missing STR_SAVEACOPY_SRC resourceCaolán McNamara1-0/+4
since initial commit 7061e8403a3afddae253ad0a016e5613616030bb Date: Wed Apr 3 21:05:12 2013 +0200 fdo#60780, refactor Save a Copy and fix Change-Id: Iff4f1008b8f8682e6f9751141ed65720362563ad Reviewed-on: https://gerrit.libreoffice.org/38601 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-09tdf#39468 translate german comments in sw/* (except source/filter)Bernhard Widl2-2/+2
Change-Id: I51126f690b5b66d171e19b82fa4ff24ff5930203 Reviewed-on: https://gerrit.libreoffice.org/38598 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-09missing STR_TBL_FORMULA resourceCaolán McNamara1-0/+5
since commit c3a98155ed28bd77eff4de3d80ccbcde1e68c828 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Oct 11 16:33:17 2016 +0100 de-src writer formula toolbar Change-Id: I7ab31f19d36102978ac2535da03ed15c14ce5f47 Reviewed-on: https://gerrit.libreoffice.org/38573 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-09tdf#108408: support unit specifications for ST_HpsMeasureMike Kaganski2-0/+9
w:ST_HpsMeasure is defined in ECMA-376 5th ed. Part 1, 17.18.42 as This simple type specifies that its contents contain either: * A positive whole number, whose contents consist of a measurement in half-points (equivalent to 1/144th of an inch), or * A positive decimal number immediately followed by a unit identifier. ... This simple type is a union of the following types: * The ST_PositiveUniversalMeasure simple type (§22.9.2.12). * The ST_UnsignedDecimalNumber simple type (§22.9.2.16). This patch generalizes OOXMLUniversalMeasureValue to handle standard- defined units, and introduces two typedefed specifications: OOXMLTwipsMeasureValue (which is used where UniversalMeasure was previously used), and new OOXMLHpsMeasureValue. Unit test included. Change-Id: Iccc6d46f717cb618381baf89dfd3e4bbb844b4af Reviewed-on: https://gerrit.libreoffice.org/38562 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-06-09tdf#82173 writerfilter: apply char properties to footnoteJustin Luth2-1/+13
The char property values as defined in w:rPr were not connected to the in-text footnote or endnote. Change-Id: I7729c534879e59ff5c9500dd1b16f9f1476abd76 Reviewed-on: https://gerrit.libreoffice.org/38372 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2017-06-08tdf#39468 Translate German comments/terms in sw/source/filter/html/swhtml.cxxJens Carl1-49/+49
Eighth set of translation. Change-Id: I3073ba38fac7d05d4cff4ddc43c08463ed8f76da Reviewed-on: https://gerrit.libreoffice.org/38560 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-08tdf#81475 Add separator before clone formatting buttonYousuf Philips2-0/+3
Also add some useful hidden commands for easy access for users to enable Change-Id: I28806047f2fac51995d88b7c204d54479471aa29 Reviewed-on: https://gerrit.libreoffice.org/38552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2017-06-08nPoolId already points to STR_POOLCOLL_TOX_AUTHORITIES1 at this pointCaolán McNamara1-2/+0
#define STR_POOLCOLL_TOX_AUTHORITIESH (RC_POOLCOLL_REGISTER_BEGIN+ 29) #define STR_POOLCOLL_TOX_AUTHORITIES1 (RC_POOLCOLL_REGISTER_BEGIN+ 30) in the context of switch( m_eType ) ... case TOX_AUTHORITIES : nPoolId = STR_POOLCOLL_TOX_AUTHORITIESH; break; SetTemplate( 0, SwResId( nPoolId++ )); already results in a nPoolId of STR_POOLCOLL_TOX_AUTHORITIES1 when we enter this loop, so don't need to special case TOX_AUTHORITIES Change-Id: Ic41596a85c48d080cd38003663b729583f08ff98 Reviewed-on: https://gerrit.libreoffice.org/38561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-08tdf#99074: export Web view to DOCXAron Budea4-12/+18
...so document saved in Web view shows in Web Layout in Word. Change-Id: If39d566be02966fe5d22f74aee46e6d5452a9451 Reviewed-on: https://gerrit.libreoffice.org/38469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-08Watermark: VML export/import font sizeSzymon Kłos2-0/+5
Change-Id: I11409dfc621018a761c70a640938e18ae679d3f5 Reviewed-on: https://gerrit.libreoffice.org/38254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-08remove some unnecessary use of OUStringBufferNoel Grandin3-9/+7
Change-Id: Ia4e02589d2fe79a27b83200a0e7a528a2c806519 Reviewed-on: https://gerrit.libreoffice.org/38508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08html import: kill ancient hack screwing up vertical table bordersVasily Melenchuk3-8/+55
HTML tables with border="1" were parsed and displayed incorrectly: no vertical borders; invalid border width. Also fixing problem with strange condition allowing setting right border. Change-Id: Ibe87e630ef9ef0a4352bbe659340f69c8ebc0d0d Reviewed-on: https://gerrit.libreoffice.org/38454 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-07Translate and fix the from-German translation of "UNO binding"Johnny_M1-1/+1
This is a follow-up on commit 905c0892a584a81e6e5d4b7a6f97ec9e66cfac22 ( https://gerrit.libreoffice.org/37917 ), for the same reason. Change-Id: I0bdaeb1cf6d87f730558d15adb820cfbcaeed172 Reviewed-on: https://gerrit.libreoffice.org/38542 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-07Related: tdf#108269 DOCM filter: reuse oox code for VBA data preservationMiklos Vajna1-41/+20
Which means the DOCM-specific code to roundtrip VBA things (project, data) can be removed. The oox part has to be extended a bit, as at least for this DOCM bugdoc there is an XML relation of the binary data, while existing shared code assumed the full VBA project is just a single OLE blob. Change-Id: I4085e4dba24475e6fd555e5f34fe7ad0f305c57d Reviewed-on: https://gerrit.libreoffice.org/38504 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-07tdf#108305 sw: fix crash on fly "Position and Size"Michael Stahl1-2/+4
Everything else in SwFrameShell::Execute() checks pArgs isn't null so do the same here. (regression from d02f75a8c36705924ddd6a5921fe3012fafce812) Change-Id: I73d85b111a5d2c088b9d888b8595ceb3979e8d2b
2017-06-07tdf#39468 Translate German comments/termsJens Carl1-82/+75
Translate German comments and terms in file sw/source/filter/html/htmlforw.cxx Change-Id: I5355b83c6068a7171fdac9d248c5fcf74b17e662 Reviewed-on: https://gerrit.libreoffice.org/38394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-06-07Related: tdf#108269 DOCM filter: reuse oox code for VBA preservationMiklos Vajna1-23/+32
With this, the project stream import is shared between DOCM and XLSM. Change-Id: I8fbffefc5acf28adea4875fa6bc4148a99b5ebef Reviewed-on: https://gerrit.libreoffice.org/38495 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-07tdf#39468 Translate German comments/terms sw/source/filter/html/htmltabw.cxxJens Carl1-114/+106
Change-Id: Ib2610e701f8c401aff06fb300d8bc13c434958cf Reviewed-on: https://gerrit.libreoffice.org/38486 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-07tdf#39468 Translate German comments/terms in sw/source/filter/html/swhtml.cxxJens Carl1-35/+30
Seventh set of translations. Change-Id: I3bfba60d8915f450f16ac2cecf4dd608a8434e2c Reviewed-on: https://gerrit.libreoffice.org/38487 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-07tdf#39468 translate German commentsThomas Beck1-108/+95
translated comments in htmlform.cxx and removed unneccessary comments and overused punctuation marks. Change-Id: Ie3327ccc0bb3963d0942676b011ab9dcdf078b91 Reviewed-on: https://gerrit.libreoffice.org/38493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-07tdf#108349: fix LanguageType conversions from UNO "short"Michael Stahl1-4/+4
The bugdoc uses LANGUAGE_USER_LATIN_VATICAN LanguageType(0x8076). The UNO API uses signed "short" for these in various interfaces, and so the LanguageType constructor complains about out-of-(short)-range values. Avoid this by deleting the problematic constructor, so that the places that currently call it with API parameters can be changed to first cast the parameter to unsigned. (Yes, we need to write "template<>" twice in a row. Don't ask me why, i just work here. sberg says we also need to omit the explict <short>.) Change-Id: I2443a89bc8d579504fc707ded3d145f9a625597a Reviewed-on: https://gerrit.libreoffice.org/38473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-07Watermark: RTF import / exportSzymon Kłos3-3/+675
* "wzName" should contain shape name * MS Word watermark has text inside the "gtextUNICODE" (do not create additional shptxt) Change-Id: I7929ec83a9219d6087d36ccbf6d7e735acf63722 Reviewed-on: https://gerrit.libreoffice.org/38219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-07tdf#108123 RTF paste: fix asymmetric shape <-> table manager stackMiklos Vajna2-0/+58
Make sure that even if the text append stack is empty (and we return early) the table manager push/pop operations are in sync with the shape start/end, otherwise we'll have an empty table manager stack. That is a problem as writerfilter::dmapper::DomainMapper_Impl::getTableManager() assumes that it always has at least one element. Change-Id: I92b3381e820bc8eaeb351532a6ce8909490c0f30 Reviewed-on: https://gerrit.libreoffice.org/38490 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-07tdf#74177 writer: ignoring comment allows number recognitionJustin Luth9-19/+31
The presence of an annotation anchor was causing number recognition to fail in Writer's table cells. Formulas accessing the cell read a value of zero. Annotation anchors are only used in SW right now, so SVL didn't want the overhead in their code. So this wrapper function should be called first to cleanup SW specific things that interfere with number recognition. Specifically known to be needed in cellfml.cxx, but converted everywhere for consistency. The formula in older documents is not "fixed" during document loading since the table/formulas are not refreshed at load time. Only documents saved with incorrect results will notice this, and any cursor access inside the table will cause a refresh. Printing also causes a refresh (but not print preview or PDF export). So this patch only fixes document creation or modification, which should be adequate for this bug. Change-Id: Ib46f2b7899ae9a0fdc3aae5887bb2d61535d29f3 Reviewed-on: https://gerrit.libreoffice.org/32909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-06-06Eliminate dynamic_cast<const SfxVoidItem*>, use SfxPoolItem::IsVoidItem()Eike Rathke3-3/+3
Change-Id: I09dafffd64dd107e802d016494d884f32363521a
2017-06-06tdf#104450: Use Calibri; let LO to fallback to CarlitoMike Kaganski1-3/+2
Using Calibri will allow to keep originally intended font on round-trip. If Calibri is absent on a system, LO will fallback to Carlito for rendering, but keep original font intact. Change-Id: I8f29bed29bc7f48912b2637053ff128ea904c7a1 Reviewed-on: https://gerrit.libreoffice.org/38456 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-06-06tdf#108350: Use Carlito for DOCX import by defaultMike Kaganski3-2/+12
In OOXML (i.e. Word since 2007), the default document font is Calibri 11 pt. If a document doesn't contain font information, we should assume our metric-compatible equivalent Carlito to provide best layout match. A unit test included. An existing unit test (testN766487) was corrected to match the font size that Word uses (11; was 12 which doesn't match Word's size). Change-Id: I3040f235696282dc7a124cd83fb34a6d95a29a17 Reviewed-on: https://gerrit.libreoffice.org/38421 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-06tdf#107231 Sort list of databasesStephan Bergmann1-0/+8
Change-Id: I3271c205676de83ce3cad924b81e3b97ddb65f45
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara17-19/+25
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06tdf#82173 writerfilter: charStyle XnoteReference->Xnote CharactersJustin Luth1-1/+1
In MSWord, there is a single character style (Footnote Reference) that affects both the in-text anchor number and the in-footnote number. In Writer, that is split out into "Footnote anchor" for in-text and "Footnote Characters" for in-footnote. The biggest difference in LO is that Footnote Characters does NOT default to superscript, while Footnote anchor does. In order to handle the default situation, it is best to map "Footnote Reference" to "Footnote Characters" so that the style differences between the two will be removed. It seems that WW8 also does the same thing. The "regression" will come if someone has done custom formatting that they prefer to show up in-text rather than in-footnote. Now it will be reversed, where the custom formatting will show up in-footer and not in-text. However, it is preferable to handle the default case and "fix" the missing superscript problem. (In WW8, the stiXnoteRef's are RES_POOLCHR_FOOTNOTE/ENDNOTE, as mapped in sw/source/filter/ww8/writerwordglue.cxx, which turns out to be "Xnote Characters" styles.) Change-Id: I9152b4a85f6facf3f8192c943e66312988718b0d Reviewed-on: https://gerrit.libreoffice.org/38306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-06tdf#39468 Translate German comments/terms in sw/source/filter/html/swhtml.cxxJens Carl1-50/+44
Sixth set of translations. Change-Id: I6ceaa1bd760028bebe26eb51a8bedf97238ed35c Reviewed-on: https://gerrit.libreoffice.org/38397 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-06sw: prefix members of SwFootnoteBossFrameMiklos Vajna2-14/+14
Change-Id: I9e9b1eee71ced50a76cff8d641628e451e045030 Reviewed-on: https://gerrit.libreoffice.org/38428 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-06cppcheck: knownConditionTrueFalseJochen Nitschke2-4/+2
Change-Id: I231113eaf3117e13ed18de906e3787643abe9335 Reviewed-on: https://gerrit.libreoffice.org/38423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06replace SVSTREAM_OK with ERRCODE_NONENoel Grandin7-13/+13
since the first is #define'd to the second, and offers no extra value Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450 Reviewed-on: https://gerrit.libreoffice.org/38406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05Improved loplugin:cstylecast to reference types: swStephan Bergmann62-198/+198
Change-Id: I7206d3325b4bfedb852d559b68dc1678da524b41
2017-06-05Improved loplugin:redundantcast, const/static_cast combinations: swStephan Bergmann4-6/+6
Change-Id: I642f6658f26f852019697c69cd7378c1cf2feefe
2017-06-05tdf#58604 keep line break follows hanging punctuation.Mark Hung3-0/+17
Do not treat the line as full if the chacracter following the hanging punctuation is a line break, so that the line break is placed after the hanging punctuation instead of at the beginning of the next line. Change-Id: Ia6e07cf457b3e1ba39700eb6d6dc74e4b57b64de Reviewed-on: https://gerrit.libreoffice.org/38216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin14-16/+19
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-04Remove usage of OString("")Arnaud Versini1-1/+1
Change-Id: I0874f81c35573048d05b3842806daa0db67f7887 Reviewed-on: https://gerrit.libreoffice.org/38386 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02Related: tdf#108269 DOCM filter: preserve VBA streamMiklos Vajna4-0/+90
This means 2 new streams when roundtripping DOCM files that actually have macros: word/vbaProject.bin and word/vbaData.xml (+ the relation pointing to the second from the first). Change-Id: Iba24eea4c5bca8f743a53027c71ed2aae48f1934 Reviewed-on: https://gerrit.libreoffice.org/38360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-02Related: tdf#108269 oox: allow recovering broken DOCM filesMiklos Vajna2-0/+11
The content type inside an OOXML file differs for DOCX and DOCM. These must be in sync with the file extension, otherwise MSO refuses to open the file. We used to always write the DOCX content-type even for files which had the DOCM extension. Allow users to recover those broken files by detecting a "has docm extension but docx content-type" file as docm, so re-saving it will produce output that's accepted by MSO as well. Change-Id: I7d60c6f6c1d0421e95b3dc9e8fff617f101919f5 Reviewed-on: https://gerrit.libreoffice.org/38342 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-02Improved loplugin:redundantcast const_cast handling: swStephan Bergmann10-11/+11
Change-Id: I7a420427f7be1b42907272b314cf3b864e1fe7ba
2017-06-02fix spelling Countour->ContourNoel Grandin3-8/+8
Change-Id: I2dd8c0dcca439d1d435bdd339f7e76d139faa98b Reviewed-on: https://gerrit.libreoffice.org/38345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02tdf#107915 Add paragraph and character style aliasesYousuf Philips1-9/+9
Change-Id: I4fc94b92ec0573147c5f2737107b52e85e55cb4f Reviewed-on: https://gerrit.libreoffice.org/38009 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com>