...similar to 6cca91f7ad "CppunitTest_sw_uiwriter:
enable on Windows," whatever the original problem was in
601ba26cb5 "Fix the Windows and OS X build
temporarily."
Change-Id: Ia1befff90d773637e01e6d88e398ae21a1d47108
I hope that the underlying problem is fixed now by commit
670100fcfb (Remove FastLoader
optimization, 2015-06-10).
Change-Id: I1cb577ec1f50a45b40683031e79c0999338a2926
...to make typeid comparison in sw::UnoCursorPointer::SwClientNotify work also
under the Itanium C++ ABI/libc++ semantics (as used on Mac OS X), not only the
less strict GCC/libstc++ semantics (as typically used on Linux). This caused
CppunitTest_sw_uiwriter's testUnoCursorPointer to fail on Mac OS X.
(DocDisposingHint and LegacyModifyHint need to be SW_DLLPUBLIC even though they
are nominally only used inside the sw library, because they are also used from
the CppunitTest_sw_uiwriter test code.)
Change-Id: Ideceade22ca3049ae287aea468de93c72bee5fdc
If "EmbeddedDatabase" in test.odt refers test.ods in the same directory,
that will be "../../test.ods". Now if we save test.odt in a different
directory, we need to re-save the embedded data source definition,
otherwise the relative reference will resolve to a non-existing path.
Relative references are normally not supported for embedded objects, so
this is not a problem, but for data sources they are, that's why they
are a special case here.
Change-Id: Id138b9cdc38f2de589d9b80c66f1a61174699770
Fails with the last hunk of commit
4101949b2a (dbaccess: set correct BaseURI
for vnd.sun.star.pkg:// URLs on load, 2015-06-08) reverted.
Change-Id: Ieeaec3b0f925de0d5cf54e08b998038434686b3d
The old internal RTF filter used to call SwTxtNode::SetAttr() without
setting SetAttrMode::NOFORMATATTR, so character attributes which cover
the whole node got converted to paragraph attributes. The new UNO
filter goes through SwXText::insertTextPortion(), which sets
SetAttrMode::NOFORMATATTR, so this doesn't happen. The result of this is
that when the UI sets a new paragraph style on the text node, then such
character attributes are no longer removed.
Given that in RTF you can't really have character properties on a
paragraph, going back to the document model produced by the old internal
filter doesn't sound like the good direction -- not to mention that
changing SwXText::insertTextPortion() this way would be an implicit API
change.
Fix the problem by tweaking SwEditShell::SetTxtFmtColl() instead, so
that it removes these full-text-node character attributes, too. The
logic in SwTxtNode::RstTxtAttr() can be extended later if necessary to
delete more attributes, but to be on the safe side, just handle the bare
minimum necessary to fix the problem for now.
Change-Id: I5faa3226fc0f9c18e005da185fe0830d8c393256
RTF insert is made into an empty paragraph. To do that, two splits
are made before the insert, but only one is reverted afterwards.
This patch removes the second.
Also fixes a memory leak from unreleased heap object
The corresponding unit test is corrected. It was incorrect
because \par doesn't begin new paragraph; it only ends paragraph.
If a RTF is ended with \par } then no newline is added to its end.
The old unit test only worked because of the bug fixed by this
patch. Correct way of inserting new paragraph in the end of a RTF
is \par \par}
Change-Id: I63d50a940d7960beb35f7d774c833ed8499acbef
This test function checks the search-and-replace operation with some Transliteration Flags enabled.
Change-Id: I86e0068e9d91e4fe426f9d6c120baf66e59e2b7e
Signed-off-by: Michael Stahl <mstahl@redhat.com>
This reverts commit 25c50ff9fb. The
original commit fixed a corner-case, but also broke a much more frequent
use case. Revert till we have a better solution for the corner-case.
Conflicts:
sw/qa/extras/inc/swmodeltestbase.hxx
sw/qa/extras/uiwriter/uiwriter.cxx
Change-Id: I0f90459e9bc372eeba18bf81c5d1dfcccbe21753
These are pretty silly anyway, but apparently it complains even about
integer variables which make this rather a waste of time.
Change-Id: I15e847d33d5decd2adcab04e4f1567d3997d28a2
The problem was that the bugdoc had a table, and inside the table there
was a long paragraph that flows to the next page, but only the paragraph
mark of it does so. We first split the frame to have space for the
paragraph mark, but later decided that all the content would fit the
first frame, and this way the last hard line break and the paragraph
mark was painted on each other.
This is normally not a problem without tables, because
SwTxtFrm::FormatAdjust() just calls SplitFrm(), sets its nNew flag to
non-zero make sure that later SwTxtFrm::_AdjustFollow() doesn't try to
join it, and we're ready. However, when the paragraph is inside a table,
then the paragraph was formatted multiple times, and next time when we
already had a follow nNew was not set, so even if there was a correct
split first, the new frame was joined later.
Fix the problem by explicitly setting nNew for the "in a table and
paragraph ends with a hard line break" case, that way we don't blindly
join the frame, only in case there is enough space for the follow in the
master.
Change-Id: Iede654740dcb0d8aa768d742ee330208291a383a
It was a problem since the initial commit
062eaeffe7 (sw: Improved document
comparison based on RSIDs., 2011-12-22) that this new feature -- which
is annoying for some use-cases -- could not be disabled, let's allow
that.
Change-Id: I33fa77382919586fb00198246f737caa68dcbd85
Reviewed-on: https://gerrit.libreoffice.org/14277
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
rather uglyish unittest, but still worth it as cutting nothing needing
to have sideeffects is really kind of non-obvious and prone to return
Change-Id: I02bbfb05f019874d873670cdae060ac3183f5ca6
In case there are two flys anchored to the paragraph and it's empty,
then the situation is that SwTxtFormatter::BuildPortions() calls
NewPortion() two times, second time the SwTxtFormatInfo has no fly set
initially, only after NewPortion() calls CalcFlyWidth(). When that
happens, we used to return pPor, even in case it was 0, and we the
SwTxtFormatInfo had a fly portion.
Fix the problem by checking if SwTxtFormatInfo has a fly portion after
CalcFlyWidth(), and in case otherwise we would return 0, return the fly
portion of SwTxtFormatInfo instead. As a result, the paragraph delimiter
in the bugdoc will be positioned at the correct position, as the
SwTxtFrm will properly have two layout portions, just like non-empty
SwTxtFrms.
Change-Id: I51e5ba61e79b4353c7b11c6d76b8c370ac3d4d37
At first we test normal replacement of wrong words.
Second part of the test is about style changes during autocorrection.
And at the end we replace a word with a table.
The rules for the autocorrection are in
test/user-template/user/autocorr/acor_fr.dat
I needed to make SwAutoCorrect public for my test.
Conflicts:
sw/qa/extras/uiwriter/uiwriter.cxx
Change-Id: Ie753c2187c1f4eddaefe0cc428a605107112c24f
Reviewed-on: https://gerrit.libreoffice.org/13131
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>