summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2016-12-09tdf#103925 RTF import: fix handling of \animtext0Miklos Vajna
Since commit ac6bfd85df271b650dbd24b45391dac346ecd72c (tdf#92045 DOCX import: <w:effect w:val="none"/> doesn't mean blinking, 2016-01-06) the "no blink" blink type is not 0, but NS_ooxml::LN_Value_ST_TextEffect_none. Change-Id: If854e57d125a365f829797f027ca5e131705e137 Reviewed-on: https://gerrit.libreoffice.org/31797 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-09Resolves: rhbz#1401082 gnome hangs opening a certain .docxCaolán McNamara
this seems to be a problem since.... commit 199eb08be994ef968eb38f4966bc27ef1756d382 Author: Miklos Vajna <vmiklos@collabora.co.uk> Date: Thu Jun 5 16:25:01 2014 +0200 SwAnchoredDrawObject::GetObjBoundRect: avoid SwDoc::SetModified() This is a const method, but it does a const_cast to still resize an object... if that's so, then we should ensure that the "is modified" flag of SwDoc is untouched. CppunitTest_sw_ooxmlimport's testChartSize is a reproducer for this, when shape text is imported as textbox. (note under gtk3 and wayland this isn't as noticable, there use export GDK_BACKEND=x11 to reproduce the freeze effect where even the mouse cursor doesn't move during part of the load) Change-Id: Ic0bd98b032dfe1255d79d8070d50f65fcfa676dd Reviewed-on: https://gerrit.libreoffice.org/31687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-09loplugin:unnecessaryoverrideTor Lillqvist
Change-Id: I6c02b1731bb62d30156b37e897b9c6b9a2dcced3
2016-12-09RTF filter: handle user-defined document properties of type doubleMiklos Vajna
This was the last unhandled type. Change-Id: Ife9b93ac81ddab9409c6790228eec03e92920e01
2016-12-09RTF filter: handle user-defined document properties of type dateMiklos Vajna
The date format is undefined by the RTF spec, but Word seems to work with 'YYYY. MM. DD.'. Change-Id: I79a10984963851c86cba92892eab13cec1e37072
2016-12-09RTF filter: handle user-defined document properties of type boolMiklos Vajna
Next to number and string. Change-Id: I76f78197412606f00559c1c2790b7c70117ef1c1 Reviewed-on: https://gerrit.libreoffice.org/31767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-08OSL_TRACE -> SAL in sw..ucbNoel Grandin
Change-Id: I18f5511f70232d91095ac8527a6c5883c36294f5 Reviewed-on: https://gerrit.libreoffice.org/31762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08convert OSL_ENSURE to assert in AccessibleEventNotifierNoel Grandin
and fix the places that trigger it Change-Id: I97a04cff25ab5aa1d42c79a971d15ba742bf384e Reviewed-on: https://gerrit.libreoffice.org/31760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08sw: remove some inline version control in uibaseMiklos Vajna
Change-Id: I7125b6f8593cac2c33916341f5649f57044ad045 Reviewed-on: https://gerrit.libreoffice.org/31761 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-08RTF filter: handle user-defined document properties of type numberMiklos Vajna
Previously only strings were handled. Change-Id: I2452cbabf48bfaa9f1a3044be4b8cbe4aa9dd0d9
2016-12-08convert SFX_HINT to scoped enumNoel Grandin
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08SwRectFnSet: hide pointer-to-(member)function syntaxMike Kaganski
Change-Id: I700e51dbfe0768642d482556299407f8f198e998 Reviewed-on: https://gerrit.libreoffice.org/31709 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-08Indentation fixesMiklos Vajna
Change-Id: I35de0c30a3f4f82bc923e467d5f0acf0ed90684f
2016-12-08nit: s/plan/plain/Edmund Wong
Change-Id: I5797c46f9fc614d12166b7e1c27b94ed6e86010a Reviewed-on: https://gerrit.libreoffice.org/31744 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-12-07sw: convert OSL_ENSURE to assert in anchoreddrawobject.cxxMichael Stahl
Change-Id: I9cce5acd2baca419bb430603b9fff34d6b6b3655
2016-12-07sw: convert some OSL_ENSURE to assert in anchoredobject.cxxMichael Stahl
Change-Id: Ie55fca8526f6a7e1f9bbbc05587812466bc17d67
2016-12-07sw: simplify SwContact::MoveObjToVisibleLayer()Michael Stahl
Change-Id: I8ebaf42ce9af6a4d28fceab2a1f68b4c8ab00b96
2016-12-07sw: remove some copypasta in SwFlyDrawContact with const_castsMichael Stahl
Change-Id: I95dbb8406c022fe05e4499bf865d4be7862b782f
2016-12-07sw: convert some obvious OSL_ENSURE to assert in dcontact.cxxMichael Stahl
Change-Id: Ib2c53c790d4ba6b4c969d2012c87464c3ee02512
2016-12-07sw: fix keyboard-based iteration on draw shapes wrt. textboxesMiklos Vajna
Pressing <tab> resulted in no action, as we jumped to the textbox of the shape, which was correct to jump to the shape, so we never arrived to the next draw shape. Change-Id: I8c6458994ce985fc420999042a1d8e69b6e6712b Reviewed-on: https://gerrit.libreoffice.org/31733 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-07tdf#103651 check isForwardEvents() for symbols in commentsMark Hung
Every time a comment is referred, the whole comment stream is parsed but only the referred comment is extracted. But the symbol is always processed so it is added to all the comments. Change-Id: I3264de2d011ff188ef64f6500ae426cde0106c16 Reviewed-on: https://gerrit.libreoffice.org/31584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-12-07use proper message passingBjoern Michaelsen
Change-Id: I8be59568bd98fde7e306e44538ca7d466137e9fd Reviewed-on: https://gerrit.libreoffice.org/31685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-07use proper message passingBjoern Michaelsen
Change-Id: I0e8b9cecec0799512b8c5b391de3bc2fcf7655e6 Reviewed-on: https://gerrit.libreoffice.org/31655 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-07use proper message passingBjoern Michaelsen
Change-Id: If41e50c43f0a4e02faad91f7de18121938f16d0e Reviewed-on: https://gerrit.libreoffice.org/31654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-07tdf#101464 tdf#91260 sw: a11y for partially off-page drawing objectMichael Stahl
The problem is that the drawing object in the bugdoc is not disposed when the document view is closed at a scroll position that does not show the page with the anchor frame of the drawing object, but does show the top of the following page, because it will only be disposed via its anchor page. SwAccessibleChild::GetBox() must take into account that the model-determined bounding box of the SdrObject can be partially outside the page where the object is anchored since commit a4dee94afed9ade6ac50237c8d99a6e49d3bebc1. Change-Id: I4276ee636d054320977e2a0ed0f69e53bbc778a3
2016-12-07sw: remove some copypasta in SwDrawContact with const_castsMichael Stahl
Change-Id: Ib9b1b578cb111ba47e04d844d5afa9984bac89f3
2016-12-07tdf#91260 svx, sw: don't paint off-page part of drawing objectMichael Stahl
Since commit a4dee94afed9ade6ac50237c8d99a6e49d3bebc1 Writer no longer forces drawing objects to be entirely on one page. However since there is only one SdrPage for the entire document, a drawing object dangleing off the bottom of one page will be painted again on the next page, which is clearly undesirable since Word doesn't do that (and it also destroys the nice invariant that a fly on page N never overlaps a fly on page N+1). So force the SdrPageView code to ignore the drawing object on the next page, by passing in the area of the page frame so that ViewObjectContactOfSdrObj::isPrimitiveVisible() can verify that the anchor position of the SdrObject is actually on the painted page. This requires passing in another parameter; in the usual case the DisplayInfo::maRedrawArea already contains the page frame since commit 8af09bf33291df2fb2bfbbd6e42f9bf074fcc4fc, but there are special cases in SwFrame::Retouch() and SwFlyFrameFormat::MakeGraphic() where some sub-area is passed in, which cannot be used to check the anchor. Change-Id: Ia0476216ca41dbdaa3de1063fa18cb94fe2e5ae8
2016-12-07tdf#101464 sw: if a drawing object is moved, notify SwAccessibleMapMichael Stahl
When a drawing object is moved from one SwPageFrame to another, of course its position is going to change, but unfortunately nobody tells the a11y code about it, so it may happen that the document view is closed but there is still an entry in SwAccessibleMap::mpShapeMap referencing the possibly dead SdrObject. So we need to add a notification somewhere here: 0 in SwSortedObjs::Remove(SwAnchoredObject&) (this=0x398fd60, _rAnchoredObj=...) at sw/source/core/layout/sortedobjs.cxx:234 1 in SwPageFrame::RemoveDrawObjFromPage(SwAnchoredObject&) (this=0x3fc1130, _rToRemoveObj=...) at sw/source/core/layout/flylay.cxx:849 2 in SwAnchoredDrawObject::RegisterAtCorrectPage() (this=0x4251040) at sw/source/core/layout/anchoreddrawobject.cxx:841 3 in SwAnchoredObject::SetVertPosOrientFrame(SwLayoutFrame const&) (this=this@entry=0x4251040, _rVertPosOrientFrame=...) at sw/source/core/layout/anchoredobject.cxx:194 4 in SwAnchoredDrawObject::MakeObjPosAnchoredAtPara() (this=this@entry=0x4251040) at sw/source/core/layout/anchoreddrawobject.cxx:419 5 in SwAnchoredDrawObject::MakeObjPos() (this=0x4251040) at sw/source/core/layout/anchoreddrawobject.cxx:313 6 in SwObjectFormatter::FormatObj_(SwAnchoredObject&) (this=this@entry=0x35da590, _rAnchoredObj=...) at sw/source/core/layout/objectformatter.cxx:375 For comparison, for text frames the stack looks a bit different and the a11y notification happens here: 0 in SwAccessibleMap::InvalidatePosOrSize(SwFrame const*, SdrObject const*, vcl::Window*, SwRect const&) (this=0x36a92e0, pFrame=pFrame@entry=0x4845b30, pObj=pObj@entry=0x0, pWindow=pWindow@entry=0x0, rOldBox=SwRect = {...}) at sw/source/core/access/accmap.cxx:2352 1 in SwViewShellImp::MoveAccessible(SwFrame const*, SdrObject const*, SwRect const&) (this=this@entry=0x45a5ea0, pFrame=pFrame@entry=0x4845b30, pObj=pObj@entry=0x0, rOldFrame=SwRect = {...}) at sw/source/core/view/viewimp.cxx:324 2 in SwViewShellImp::AddAccessibleFrame(SwFrame const*) (this=0x45a5ea0, pFrame=pFrame@entry=0x4845b30) at sw/source/core/inc/viewimp.hxx:298 3 in SwPageFrame::MoveFly(SwFlyFrame*, SwPageFrame*) (this=0x4597d10, pToMove=pToMove@entry=0x4845b30, pDest=pDest@entry=0x480cb40) at sw/source/core/layout/flylay.cxx:759 4 in SwFlyAtContentFrame::RegisterAtCorrectPage() (this=0x4845b30) at sw/source/core/layout/flycnt.cxx:1399 5 in SwAnchoredObject::SetVertPosOrientFrame(SwLayoutFrame const&) (this=this@entry=0x4845c18, _rVertPosOrientFrame=...) at sw/source/core/layout/anchoredobject.cxx:194 6 in SwFlyAtContentFrame::MakeObjPos() (this=0x4845b30) at sw/source/core/layout/flycnt.cxx:1433 7 in SwFlyFreeFrame::MakeAll(OutputDevice*) (this=this@entry=0x4845b30) at sw/source/core/layout/flylay.cxx:186 8 in SwFlyAtContentFrame::MakeAll(OutputDevice*) (this=0x4845b30, pRenderContext=0x459ea80) at sw/source/core/layout/flycnt.cxx:389 9 in SwFrame::PrepareMake(OutputDevice*) (this=0x4845b30, pRenderContext=0x459ea80) at sw/source/core/layout/calcmove.cxx:345 10 in SwFlyFrame::Calc(OutputDevice*) const (this=<optimized out>, pRenderContext=<optimized out>) at sw/source/core/layout/fly.cxx:2641 Change-Id: Iac33a7527dd514f150b2f2f4b0daa0a8a1fc23b6
2016-12-07sw: fix indentationMichael Stahl
Change-Id: Id08434483e0d3f71d9770be7627250c74c142f90
2016-12-07SwContentTree: another wrong assertMichael Stahl
Change-Id: Ie00f89275662d46cf8434b71f0a3c4b5425a18e2
2016-12-07simplify SwAccessibleMap::GetContext()Michael Stahl
Change-Id: I78e7e25c12181fb854134d92059ddd083261be1e
2016-12-07simplify SwAccessibleMap::GetPreviewPageSize()Michael Stahl
Change-Id: I92a6281623e536a37ded559bcbe5e833adc881bb
2016-12-07SwAccessibleMap convert some obvious OSL_ENSURE to assertMichael Stahl
Change-Id: Ie28b4d9febab28ded47d1532f38584513d78246a
2016-12-07Revert "sw: partially revert commit d0b09f41efe938e94a84e783c9ff5742edcbfba8"Michael Stahl
This reverts commit 2934f6bcc75c781cdf9e614b9d7d8533eb680b3f. What i forgot is that if the mpFrameMap assertion fails in JunitTest_toolkit_unoapi_1, then a segfault is likely to follow, probably due to some use-after-free, so this really should be an assert(). Change-Id: I696e18be44632089304dfed2b88ec4b9a580ba16
2016-12-07sw: document our second favorite rectangle class a littleMichael Stahl
Change-Id: I0d7dbfd0bc2d563a39c560dbebfd400cb7c35faa
2016-12-07tdf#104440 sw: fix layout inconsistency with dynamic wrapping and undoMiklos Vajna
The problem was that the second fly frame was placed on the first page initially, but after typing a character (which moved it to the second page) and then undoing, it wasn't moved back. Fix the inconsistency by handling the "fly frame takes all horizontal space" case as parallel wrapping (which will result in no wrapping at the end), this way the second fly frame appears on the second page both initially and after editing. As an additional data point, the DOC export of the bugdoc is now rendered in Word the same way as in Writer. Change-Id: Ifc9f17458ad0501b8ab6077e5a4998d48fd6f1d8
2016-12-07sw: use auto when initializing with a cast in rtfattributeoutputMiklos Vajna
Change-Id: Id51fe7614b8e0045eddb66ed4bbffa7f60052f7d
2016-12-07Fix typo in comments: et -> edTakeshi Abe
Change-Id: I447c46cc3d66c7f482314626826dd708bf1c01c4
2016-12-07convert VCLEVENT constants to scoped enumNoel Grandin
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07tdf#104420 writerfilter: no dummy para in headersJustin Luth
Change-Id: I22bf2d85e01ce5a084babdc07a11ada0790f4933 Reviewed-on: https://gerrit.libreoffice.org/31710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-12-07sw: Kill unused SwRewriterTakeshi Abe
Change-Id: Ic4b208773df1cce4e6d682c0d7b119409daf467e Reviewed-on: https://gerrit.libreoffice.org/31650 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-12-06Change Read/Write access to Scoped Read/Write accessMark Page
Change-Id: Idbe8e393b64f2a151e20c1851d7c14fa161acf97 Reviewed-on: https://gerrit.libreoffice.org/31635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06sw: outline longer SwLineLayout member functionsMiklos Vajna
Change-Id: I8ad38c64eea399e3b682a82f7b1a10ca8c669021
2016-12-06loplugin:unnecessaryoverrideStephan Bergmann
Change-Id: Iac074bd6f59d2fc890459b45801d0a6143c3eb9e
2016-12-06tdf#104317 RTF import: avoid setting CustomShapeGeometry on a line shapeMiklos Vajna
Even Santa Claus knows it has no such property. Change-Id: I46e27868c62fabd10c6447956e40e55962ee284b Reviewed-on: https://gerrit.libreoffice.org/31668 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-06Do not enable radio buttons of image flip on createMuhammet Kara
On the Image tab of the Image Properties dialog, The radio buttons under the horizontal flip option should come disabled when that option is not checked. Wrong order of "Enable" calls was causing them to be enabled on create, all the time. Change-Id: Ie361a8280e2a303d38025c5c684f5c07ba2e1ef9 Reviewed-on: https://gerrit.libreoffice.org/31619 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2016-12-05use proper message passingBjoern Michaelsen
Change-Id: Ibf02e22d7dcca2338da34376a70e9383e366920d Reviewed-on: https://gerrit.libreoffice.org/31614 Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-05use proper message passingBjoern Michaelsen
Change-Id: Ie516712b3474a0eb800e2d9e3e41921b10059fe8 Reviewed-on: https://gerrit.libreoffice.org/31613 Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-05(re)use proper message passingBjoern Michaelsen
Change-Id: Ie80dad279af4e3d1b72f89d266f10d2309ed2e96 Reviewed-on: https://gerrit.libreoffice.org/31612 Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-05drop unused BMP_STYLES_FAMILY_NUM resourceCaolán McNamara
since... commit 197010643e7e1b8c973013efa9034ffc9bdb56c0 Author: Michael Stahl <mstahl@redhat.com> Date: Fri Jul 26 22:38:28 2013 +0200 remove some more SfxObjectShell methods that only call each other Change-Id: Ife3e9add675a8163082cd0ba9b009ea0535d449d