summaryrefslogtreecommitdiff
path: root/sw/qa/extras
AgeCommit message (Collapse)AuthorFilesLines
2016-09-02sw lok: avoid hiding / showing sdr mark handles on focus changeMiklos Vajna2-0/+41
For one, this is unwanted: in the LOK case we want to switch between the windows without any side effect to be able to e.g. paint tiles. For another, this caused an invalidation loop when two views selected the text frames or images in Writer. The loop looked like: 1) Press a key in view #1, so a setView(0) + paintTile() is necessary in view #0. 2) SfxLokHelper::setView(0) to switch from view #1 to view #0. 3) SwFEShell::ShellLoseFocus() on view #1, which hides sdr marks -> invalidate. 4) SwFEShell::ShellGetFocus() on view #0, which shows sdr marks -> invalidate. 5) paintTile() in view #0. 6) SfxLokHelper::setView(1) to paint tiles due to 3). (Generates invalidations in both views.) 7) SfxLokHelper::setView(0) to paint tiles due to 4). And so on, this way a call to SfxLokHelper::setView(0) resulted in an another (async) call to SfxLokHelper::setView(0) all the time. Change-Id: Ice855b9128f61bb7b823b499cad366998f297b5d Reviewed-on: https://gerrit.libreoffice.org/28611 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 91733eff7fba157daf88b092189d842f9d6f1b68)
2016-08-30sw: use SwModule::GetRedlineAuthor() in SwTextShell::ExecField()Miklos Vajna1-0/+9
This avoids some code duplication, and also means that the redline author set by SwDocShell::SetView() affects the inserted Writer comments as well, while those were 'Unknown Author' in the LOK case. Change-Id: Ib51183302ee6904fdf69fb16f27ecfe6df39e6cb (cherry picked from commit e2c240627c8a1a9cea1f9eedfb064214c8e93a39)
2016-08-30sw lok: emit REDLINE_TABLE_ENTRY_MODIFIED when deleting self-added charactersMiklos Vajna1-1/+32
This doesn't work out of the box via SwRangeRedline::SetStart/End, because the range of the redline is adjusted when redlining is disabled by sw::DocumentRedlineManager::AppendRedline() when it compresses the insert and delete redlines into a single reduced insert redline, and then the redline is updated implicitly via SwIndex. Change-Id: I4b652348b256df75e4c774ea5f3fdd78f59deb01 Reviewed-on: https://gerrit.libreoffice.org/28454 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d017362bc68fe40c4bd79db76614d84aa9be913d)
2016-08-19sw lok: add callbacks for redline table insertion / removalMiklos Vajna1-1/+31
An alternative would be to follow the Manage Changes dialog approach and subscribe to the SFX_HINT_DOCCHANGED notification in SwDocShell, cache the old redline table and find out the differences to the current one, but that way sound much more complex without benefits. (cherry picked from commit 0bc553f3ef3c188a96ea4875f4722ad4d40da4a3) Conflicts: sw/source/core/doc/docredln.cxx Change-Id: I20a45285b88255ccea9d6646c0b5288ac1c91879
2016-08-19sw: fix accepting/rejecting a change by index when cursor is not at a redlineMiklos Vajna1-0/+32
When there is no index, then the cursor position is used to find out which redline to accept/reject. LOK uses the index parameter instead, so there never disable the command. Change-Id: Icbe0905e4ebd170c6f33fe383cd3042d812a2eb0 (cherry picked from commit b6011f07254f8003929320ad842d8d09daca0e09)
2016-08-19sw redlining: support per-view authorsMiklos Vajna1-0/+30
In case there are multiple SwView instances and SetRedlineAuthor() is called with a non-empty string on them, switching views will keep the SwModule redline author string up to date as expected. (cherry picked from commit cb9362faad9fe702031c5e657a31b1963ad4d374) Conflicts: sw/source/uibase/uno/unotxdoc.cxx Change-Id: I363221049dbacd67d7c8f4ff3e778f8032a3bc43
2016-08-18sw: allow accept/reject of redline by indexMiklos Vajna1-0/+33
Previously .uno:AcceptTrackedChange / .uno:RejectTrackedChange always worked by cursor position, but redlines are stored in the redline table, so they have a unique index. Allow specifying that index when invoking the command, and in that case ignore the cursor position. The index is not stable after an insertion / deletion. Reviewed-on: https://gerrit.libreoffice.org/28192 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 087b71f423cf6c047137fb1316527132bb47fc05) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I493a22e84800ded224fb6b9c61261744dc0fb64f
2016-08-17LOK unit tests: document what is a view callbackMiklos Vajna1-0/+1
Reviewed-on: https://gerrit.libreoffice.org/28168 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c3c5635b9bbd3de65760409c7f4e72b295b749be) Conflicts: sc/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: Ic605ca12cebfb6fd8239829942bbc6a70f45ac06
2016-08-17editeng: introduce OutlinerViewShell::NotifyOtherViews()Miklos Vajna1-0/+43
This allows notifying other views about e.g. cursor position changes even if SfxLokHelper::notifyOtherViews() is not accessible from editeng. Change-Id: I921e97344ffe562109a221f241e70b3f68ee9aaf Reviewed-on: https://gerrit.libreoffice.org/28162 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 77235ac64be61afd707931675fec100c7c50d01c)
2016-08-16sw lok: limit undo/redo in SwDrawTextShellMiklos Vajna1-0/+34
So that one view can only undo/redo its own changes. This is used when editing shape text, as that doesn't use sw::UndoManager::GetLastUndoInfo(). Change-Id: Ibc3d6fcbd18398569190f06ed9b7399c54bb7d41 (cherry picked from commit 40231526b6a0d6d8713932b3ae60d665f615833c)
2016-08-15sw undo: add a Repair argument to the .uno:Undo/Redo commandsMiklos Vajna1-0/+41
Undo/redo is limited to undo actions created by the same view in the LOK case, this argument removes this limit. This can be used by a client for "document repair" purposes, where undo/redo of others' changes is intentional. The sfx command dispatch has support for FASTCALL slots (a state function is not called, the command is always enabled) and also has support for state functions, but those functions only get the ID of the slots, not its parameters. What is needed here is a command that's disabled by default, but in case a Repair argument is used, then it's unconditionally enabled. So handle that case in the sfx dispatcher directly for now. Change-Id: I96c1130bf51abcdd722684b1fa4a8277f92fd555 (cherry picked from commit e9bcd3475131b24b0b8818cfdfa256854ca5a59d)
2016-08-15sfx2: make SfxLokHelper::setView() set also the active frameMiklos Vajna1-0/+37
Without this, comphelper::dispatchCommand() doesn't work on the current frame. This causes e.g. undo not working when only a given view is allowed to do undo. In the desktop case vcl::Window::ImplGrabFocus() calls both SfxViewFrame::MakeActive_Impl() and framework::Desktop::setActiveFrame(), but in the LOK case the first was called directly, that's how the active frame was outdated. Change-Id: If97a9de316b4c8dd49e55cd273bdb2dfe9866f38 Reviewed-on: https://gerrit.libreoffice.org/28032 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d6e8d4f773d970b69baedd8523a426f18a8d8eef)
2016-08-10sw lok: limit undo/redo access to undo actions created by the same viewMiklos Vajna1-0/+28
So one view can't undo the changes of an other view by accident. If this is found to be useful in the desktop case, perhaps a dedicated config option can be added for it; for now the behavior is LOK-only. Change-Id: I7ff505d021bd6f6be36953ecc8f8bb971ce8927e Reviewed-on: https://gerrit.libreoffice.org/28007 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5d8639aaf2f60157c99c3ee3a8bfa78e4efd010a)
2016-08-03editeng: track view shells in SfxListUndoActionsMiklos Vajna1-0/+32
This is needed for e.g. tracking deletions by backspace in Writer shape text. Reviewed-on: https://gerrit.libreoffice.org/27807 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c86e89c5bb040786193f7b8bba8516ffa706a14a) Change-Id: I6f873872566313096c2c57f4a13ac2f1db67e77d
2016-08-03editeng: implement SfxUndoAction::GetViewShellId() interface in EditUndoMiklos Vajna1-0/+31
With this, e.g. inserting a character in a Writer shape text remembers its view shell. Reviewed-on: https://gerrit.libreoffice.org/27796 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit b567278c4aa6e3dee331b60c71eb996babcc9d08) Change-Id: Ic82a3f45a66cf622496e3131390d365440dffb3b
2016-07-29tdf#101168 sw: fix missing repaint on undo with multiple windowsMiklos Vajna1-0/+36
Need to lock / unlock all view shells, not just the current one. Change-Id: I754214a202c6bbb74daac6f933481cb3fe7b9dbb Reviewed-on: https://gerrit.libreoffice.org/27620 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1e21c32a2f81b4ae5302fc8d537e4f200a1a3e76)
2016-07-27svx lok: draw text edits in all viewsMiklos Vajna1-0/+35
Use case: a document has a shape with text, and two views. If one view starts to edit the shape text, the model text is hidden (via TextHierarchyEditPrimitive2D), and the in-progress text was painted directly only in the view that edits it. The remaining views presented the shape as if it had no text. This commit addresses the subset of this use case when the views are already created and they already show the same draw page. Fix the problem by looking for other views showing the same draw page, create a view of the text edit for them, and paint them in all views after the own text edit is painted. There is not much LOK-specific in this code, except that some extra code would be needed to not paint the blinking cursor of the text edit in other views, and then it could be enabled in the non-LOK case as well. Change-Id: Ib3096a3369fa56663ee209794e102090d362de66 Reviewed-on: https://gerrit.libreoffice.org/27535 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 9d91d371e92548c7f75a7d0155eecaf3769fdee6)
2016-07-22sw: add new LOK_CALLBACK_VIEW_LOCK callbackMiklos Vajna1-1/+48
When we're after SdrBeginTextEdit(), but before SdrEndTextEdit(), and have multiple views, then only the active view paints the edited text, the other views look like the shape has no text at all. Add a new callback that exposes the position and size of the rectangle where the shape text will be painted after text edit ended, so clients can draw some kind of locking indicator there. This way the rendered result can differ in the "shape has no text" and the "shape text is edited in an other view" cases. Reviewed-on: https://gerrit.libreoffice.org/27441 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 897189cfc6b3f6f3a9a0148b060ea25e5f8d9eaa) Conflicts: libreofficekit/source/gtk/lokdocview.cxx Change-Id: I6096479a8a05c2547d15222e6d997b848af02945
2016-07-21CppunitTest_sw_tiledrendering: blind stack-use-after-return fixMiklos Vajna1-0/+4
Change-Id: I23c0324979939955f94408a452020e9776358967 (cherry picked from commit 58b592a59122144d6c5446f200dd2f48108c8909)
2016-07-21lok::Document::destroyView: clean up view cursors/selectionsMiklos Vajna1-1/+50
(cherry picked from commit bc9b4fd4c83af3532204237157821d4884c42d8e) Conflicts: sd/source/ui/view/ViewShellBase.cxx sw/source/uibase/uiview/view.cxx Change-Id: Icd3f96a922e7d1aec0d52e90df87ec45790c9807
2016-07-21sw lok: add LOK_CALLBACK_VIEW_CURSOR_VISIBLEMiklos Vajna1-2/+41
With this, in case a text cursor is turned into a graphic selection in view#0, then view#1 can also hide the text cursor of view#0. Change-Id: I7de89b8537ef8b0985336793b719d93733604bff Reviewed-on: https://gerrit.libreoffice.org/27044 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit af8419fa1d3cea57481e0e53518237eea2d9cdad)
2016-07-20sw lok: mix missing invalidation due to page calc in visible cursor changeMiklos Vajna1-1/+48
Steps to reproduce in gtktiledviewer: - two windows, then enable edit in both - view #0: go inside a word - view #1: select the same word - press Del in view #1 -> no invalidation Fix the problem by changing the LOK-specific GetPageNum() call in SwVisibleCursor::SetPosAndShow(), so that it doesn't re-calculate the frame, that way later when SwLayAction::TurboAction_() attempts to re-calculate the layout, then the frame will be still invalid, and that re-calculation then triggers the necessary invalidations. Change-Id: I8c4472b9809537fcbd4a20c73f39be7ebca16b1f Reviewed-on: https://gerrit.libreoffice.org/26802 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 6168f10b6280b2d60de44a333f3f1dc23cbb9bcf)
2016-07-20sw: add LOK_CALLBACK_TEXT_VIEW_SELECTION testcaseMiklos Vajna1-3/+38
Fails with 9f66db9c474f71f43d7a3667230241fd4fa4183f (sw lok: add LOK_CALLBACK_TEXT_VIEW_SELECTION, 2016-06-21) reverted. Change-Id: Ide21167ce2dc4287b1860b5f03a6975dc9edd4c6 Reviewed-on: https://gerrit.libreoffice.org/26550 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 45182f36ef263d6fd94cc79bb242fbfb5a471c22)
2016-07-20sw lok: add LOK_CALLBACK_TEXT_VIEW_SELECTIONMiklos Vajna1-1/+1
So a view can be aware where selections of other views are. Change-Id: I5026b1ff2b99a4eedfd0bde32a05ceb8e2f424bc Reviewed-on: https://gerrit.libreoffice.org/26542 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 9f66db9c474f71f43d7a3667230241fd4fa4183f)
2016-07-20sfx2 lok: fix missing view cursors in a new viewMiklos Vajna1-0/+60
When a new view was created, the old views got the position of the new view, but not the other way around. Make sure that the old views notify the new one right after registering the callback. Reviewed-on: https://gerrit.libreoffice.org/26523 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4d211384f048b689f20e46d4d586f342b110cb5c) Conflicts: sfx2/source/view/viewsh.cxx Change-Id: If26edbd57aa939e453d95f4907a0e5722329dd65
2016-07-20comphelper: enable LibreOfficeKit::isViewCallback() by defaultMiklos Vajna1-11/+17
This requires porting the sw/sd/sc_tiledrendering test code to the new internal API, as only the public LOK API is unchanged. Reviewed-on: https://gerrit.libreoffice.org/26379 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5bf3ae663a2189e37959235cda8c6a4051e10a1a) Change-Id: Ic6a2f96421da4a16bdee7d0cbb3f6e35bc6ddff9
2016-07-20Fix typosAndrea Gelmini1-1/+1
Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit fc2590cfa112222500a6c847917d7545f60024c6) Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73
2016-07-20vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock1-1/+1
(cherry picked from commit 88730cdae3520b18fc073dc59bd0ed660e15d6b4) Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-07-20Fix typosAndrea Gelmini1-1/+1
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 534b2a4b58ba765dbc256d6297e33453524915e2)
2016-07-20Fix typosAndrea Gelmini5-6/+6
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-12Remove excess newlinesChris Sherlock2-4/+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-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-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 Vajna1-3/+13
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-07RTF export: write user-defined document propertiesMiklos Vajna3-10/+10
(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-07DOC(X) filter: BAF -> BAILS in the smart tag mappingMiklos Vajna4-12/+14
The filters map between a common subset of Word smart tags and Writer RDF annotations, and when doing so, they need to know what path to use for a smart tag namespace and also the other way around: what RDF types are interesting for smart tag purposes. It turns out there is BAILS specification at <http://www.tscp.org/wp-content/uploads/2013/08/TSCP_BAILSv1.pdf> that describes how to refer to BAF objects, so use that instead of our custom RDF statement / document metadata key names. Change-Id: Iac569608b05aa61547f664f2a5df7d46fe46da76 (cherry picked from commit ce814d1a28bb1ff2e6df23e6ed8c256c948787af)
2016-07-07DOC filter: mark SmartTag support non-experimentalMiklos Vajna3-41/+40
And also relax two import conditions, as it turns out Word accept those. So instead of checking for each offset/length one by one, only check once. It's now as good as the DOCX one, I believe. Change-Id: I1890ef61fdbbd2ab6facaf3e787f75b791adcfdc (cherry picked from commit d737f8220f97f3060b87c05cca3ecaf3e80f9878)
2016-07-07DOC import: initialize RDF metadata before importing document propertiesMiklos Vajna2-0/+41
With this, it is possible to import part of the document as RDF statements later when SwFltControlStack::SetAttrInDoc() gets an SwFltRDFMark. Previously SfxBaseModel member functions like getMetadataGraphsWithType() and addMetadataFile() failed, as they tried to find the already imported document in UCB, which failed, as the import was still in progress. To prevent that, do the same as the ODT import in XMLReader::Read(), part "RDF metadata". One trick here is the call to comphelper::OStorageHelper::GetTemporaryStorage(), which gives an empty storage. Ideally a wrapper class would be needed that works on a SotStorage, but implements embed::XStorage, but that would be only used to find that the real storage doesn't provide a manifest.rdf stream, which is always the case. So instead of writing such a wrapper, just give loadMetadataFromStorage() an empty storage, which will have the same result without writing lots of dead code. Change-Id: Id1897838b1477eee0489b706d51cb6f59898877b (cherry picked from commit b7c2e9ae95ff41570f752ca43c361b249a65da77)
2016-07-07DOCX export: handle <w:smartTag>Miklos Vajna3-40/+40
A Writer document can have multiple arbitrary RDF graphs, handle the following subset: - instead of handling all graphs, have a whitelist, look at the TSCP graph the DOCX importer creates - look for (paragraph, key, value) statements and export those (cherry picked from commit 08e5fc257fa8c106be34bb034ebe5e00b6fcf711) Change-Id: I142c24fb4c8140bde5fc1efad2932886de167b90
2016-07-07DOCX import: handle <w:smartTag>Miklos Vajna2-0/+40
These can be sort of arbitrary key-value pairs around one or multiple runs, handle the following subset: - when they appear at a paragraph context -> we assume they are annotations on the paragraph - when the smart tag's URI/element is RDF -> we map these to RDF metadata statements on paragraphs - when the attribute name's namespace is known, because in ODF we need to specify both a path and a type (namespace) for the RDF graph, and OOXML only provides a namespace As a start, recognize the TSCP BAF namespace from <https://www.tscp.org/wp-content/uploads/2013/08/TSCP_BAFv1.pdf>. Change-Id: Ib188b1395e7ec7e0441b4f12f86cfef99fb9f096 (cherry picked from commit 831492f3d50f3d131f458f4ec0e5e802b612923f)
2016-07-04tdf#76322 writer: allow column breaks in headers/footersJustin Luth2-0/+6
The code blocking this came in the original OpenOffice flowfrm. Either IsInSct() or FindFooterOrHeader() works to resolve this bug. I chose FindFooterOrHeader because it seemed to match the existing targets (docbody, flyframe) better. Change-Id: I51fc3bdc51c76e290b47ec7b9044780e5b67136c Reviewed-on: https://gerrit.libreoffice.org/26208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 121109610f9af0b294cf042c6ae5abc6fcc4f326)
2016-07-04tdf#90697 docx - don't change continuous break into page breakJustin Luth2-0/+17
As soon as you set PROP_PAGE_DESC_NAME, you are inserting that style as a page break. Setting a pagebreak via a continous break was first introduced in commit 50cb1667020494906afaacb68d4163d1eda527cf but the unittest for that commit no longer uses this code. I'm suggesting it be reverted. It really messes up round-tripping when continuous breaks are removed/replaced with hard page breaks. There are a few odd cases where the very first section needs to set the page break via the continuous break, so it hasn't been eliminated completely. Change-Id: I5b0e4bb7612ee9df47e5c49b8c2316dc001b5238 Reviewed-on: https://gerrit.libreoffice.org/26662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 50bf96d31ab2eb546f6c71cc93c1fa5dd4bf3044)
2016-07-04tdf#76349 writer: treat single-column break as page breakJustin Luth1-3/+9
Writerfilter imports docx-defined column breaks that exist without being in a column. Word treats these as if they were a page break. Writer basically just preserved and ignored them. I limited the fix to only consider SVX_BREAK_COLUMN_BEFORE since writerfilter is only given “column break” and treats it as column_before. Change-Id: I0d974441d53243c4426048dd7cb60b3897b803f6 Reviewed-on: https://gerrit.libreoffice.org/26181 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 2721111437706372eaac9bf1d748723196c573ac)
2016-07-04tdf#100105 sw: RTF export: fix empty hyperlinksMichael Stahl2-0/+19
For empty hyperlinks the EndURL() is called immediately after StartURL() Due to the way the various buffers are written, the group closing braces are written before the groups are opened, which is rather invalid. Using the m_aRun buffer instead of m_aStyles appears to fix the problem. (regression from b8907bf3d3b37c686a414ffbbd2d732348aab5b9) (cherry picked from commit b4855bd63c05096df1a2da339133f243bb30d902) Reviewed-on: https://gerrit.libreoffice.org/26336 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 744bd590fd2c39638e8df41a569cb2cc376e7450) Change-Id: I6910e1afa0ee262ae0496cf1d3aa83ae3e537ad0 Reviewed-on: https://gerrit.libreoffice.org/26699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit f687c57465292e940f9e0d69aa2e4ee3376bd569)
2016-06-22tdf#92157: allow both dimensions of a graphic to be 0Mike Kaganski2-0/+5
Commit ca80f73 made it possible for one of dimensions to be zero. This commit goes further, allowing opening real-life documents with graphics having both width and height equal to 0. Thanks to libreoffice@arbruijn.dds.nl for debugging and initial patch! Change-Id: I96a13b776adfd9fe46fc2c7691eb7904400c20a1 Reviewed-on: https://gerrit.libreoffice.org/21287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> (cherry picked from commit 654f6ff28d7a148950b48ed8905d8f13a015a5b5)
2016-06-19bccu#1811 - Writer comment focusing / selection / cursor issueAshod Nakashian1-0/+6
Partially based on fd205e40c58aa749fbe458d74ca0c2373a1017dc which caused make desktop.check to fail when viewsh.?xx changes were included, so left them out. Reviewed-on: https://gerrit.libreoffice.org/25421 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 0d7920952a8748e3e2f02f7b27d624598d974006) Change-Id: I5b4576d2385c1812f358a2434b87c8ca62024430
2016-06-16lokit: add getPartHashHenry Castro1-0/+16
In the tiled rendering case, the slides, no matter if it is inserted or deleted, the part names always return sequential names i.e. Slide 1, Slide 2, ..., Slide N. However the client side needs to know what slides had been deleted or inserted, so it is necessary to send the hash codes. Reviewed-on: https://gerrit.libreoffice.org/24267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 1a74c6333a79ccf0579b33ebc42ce2ccc23ccadb) Change-Id: I0e9caeec660c3e42dd9f751bdce7690f9ad365a1