Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I09f132a9c79f0aa4c3f4d3ca5f2fed233d0dcb06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175641
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Ia834d19a5af999440f7d5847aeeae863daacd952
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175784
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
|
|
Change-Id: Ia2e3dad4e62fb084c3a88564deb137cbcc7728b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175573
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I742309d99c4d9839dcd4f8b747fc9aef549998ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175555
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
In the ODF import, when importing a table, initially a placeholder 1x1
table is created. When this is done from SwView::InsertMedium, frames
are created for the table and its single cell at that stage. Then the
actual table nodes are created, but frames are not created in parallel,
until the table import is finished.
Importing a text box, it used to be created anchored at the end of the
document, and then the anchor was moved to the correct place.
When a text box was anchored to a cell, the process was like this: the
text content was inserted in the last paragraph outside of the current
table; and then it was moved to the current cell. When this was done
from SwView::InsertMedium, creation of the text content also created
the frame; then the movement fired client notifications, including the
SwFlyAtContentFrame::SwClientNotify, which needs the new anchor frame.
With cell other than A1, there was no frames for the new anchor in the
table, and that crashed.
This change inserts the text content into the correct place from start,
which avoids the need to move the anchor later.
Co-authored-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I9dd3a2c5527f3c2dd860244456c617558943453a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171898
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Test to see if font style is retained when performing find/replace on
strings containing mixed font style/sizes.
1) For example, with a doc containing the string: "test
- Normal font: "
- Italic font: test
2) Search for: "t (this contains both normal and italic font)
3) Replace with: "gu
4) Resulting string should be: "guest
- Normal font: "
- Italic font: guest
An additional test has been added to test for changes in font sizes (per
comment 24).
Change-Id: I957077efbcced0b981c31d0e547299e12a61609b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168486
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
|
|
Change-Id: Ifae040774dff2e75d4ddcfd38e8e67192f70d69a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169160
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ia11b13ec7ed2402e717a4e64e7c7e4aa0b41d70f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168598
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The enumeration may be called for a partial paragraph selection, and
then the bookmarks prior to the selection are not processed.
Change-Id: Ib725ffb320ec5a81b39ce77f06392a82bd6d8ee0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167720
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
|
|
Unit test checks that the "Line with Arrow/Circle" shape is inserted with "Arrow" at the start of the line and "Circle" at the end of the line.
Without the fix from tdf#141525, the "Circle" is missing at the end of the line.
Change-Id: I2c952deffea908b3daf855dabd9d19f1f6133268
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166576
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
The passed string length is not a correct measure of how many steps
should the selection expand in the resulting text: the cursor goes
over glyphs, not over UTF-16 code units. Thus, it's easier to store
the position prior to insertion, and restore it from the indexes.
Change-Id: I1d592ff30199007ba3a99d7e1a6d2db2da35f1cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165056
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
https://gerrit.libreoffice.org/c/core/+/160655/5/sw/qa/extras/rtfexport/rtfexport8.cxx
Miklos "nitted" me that I didn't wrap this test
in an anonymous namespace. Obviously anything I do
is simply copy/paste, so lets make sure that at
least the latest and greatest versions of each
series of unit tests are done "correctly".
Change-Id: I699c8d70e4f587373918e27f08304a0fe815bff4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160991
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
|
|
Change-Id: I85fff7ed6932c5fc196e18f24fa01074ba4837e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158241
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I6c7d8d92fe6860cd213a3cbded2451e8788ae2f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157196
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.
This seems to make a different at least on Visual Studio
Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Only tests called it, migrate those to
DocumentContentOperationsManager::InsertGraphic() instead, which is what
SwFEShell::Insert() and SwXFrame::attachToRange() use.
Change-Id: Ie05b501507f8722bc0a312c2e729ecd76154ce98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143836
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
In order to unify the code
Also call getSwDoc only when it's needed so move it outside
createSwDoc
Change-Id: I082d46108581e8f2e2e430e854980035f471ceac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142586
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I343fe2711e232ffbdec13f0072ee31a7549f7da8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142546
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
in preparation for future inheritance from UnoApiTest
Change-Id: Ie5dee5af3609d8490d7d7bad0d6dbc4c8fc17bb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142280
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Using a parameter to select point/mark makes the code much harder to
read
Change-Id: I4ac8b904ac423e2b99253b7e4b6adc72c8afe1a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138083
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia5cb9915fc7ad3238f4386f5ed3e43efc4b74a32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137478
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2c9023ba8d07314d23ae7a65e670e8748c5e9322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133766
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ie9530262e4addec01091cc1147e68be5b5a782f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124398
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed
to explicitly use 'value' in WhichRangesContainer's ctor, or create an
instance for use in SfxItemSet ctor (svl::Items is already defined as
a template value of corresponding type).
Instead of
WhichRangesContainer Foo(svl::Items<1, 2>::value);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>{});
now use:
WhichRangesContainer Foo(svl::Items<1, 2>);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>);
Change-Id: I4681d952b6442732025e5a26768098878907a238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
It always returned null.
This was missing in 6471d88cb8b61741c51499ac579dd16cb5b67ebf
Change-Id: Ibf34c24fdbbbc2f65c6948f58d12f257ccf120ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118286
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
During ODF import, due to removal of the pDocShell parameter, this hits
else
rCharStyleName = sCharFormatName;
while setting the "CharStyleName" property and later
GetNumberingRuleByIndex() prefers m_sNewCharStyleNames over the
format set in the SwCharFormat??
Also, "BulletFontName" has a similar problem; otoh "HeadingStyleName"
only makes sense on chapter numbering.
The m_pDoc and m_pDocShell members are such a WTF.
(regression from ae0e4a6ba9be2fa99ac2be8e20157806e36209b2)
Change-Id: I9d4d4cd7aeb7e6e29221d53facaff213fd4e35a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115495
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Mostly automated rewrite
Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ie923fc8baaa26938378407f6e5f3c50b2cea7cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110815
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This is a follow-up to 7ab349296dac79dad3fec09f60348efcbb9ea17e.
The first problem was that tables that contain protected cells refused
to be deleted, which caused an infinite loop in
SwXTextRange::DeleteAndInsert().
This also affected SwXTextTable::dispose(), and DDE tables.
Fix this by forcibly deleting even protected cells from UNO APIs;
protection is an UI feature.
The second problem was that pasting the table SwFEShell::Paste() would
set up aCpyPam so that it selects from the start node of the table to
the last text node in the table, excluding the table cell and table end
nodes, which caused:
DocumentContentOperationsManager.cxx:3548: An insufficient number of nodes were copied!
Fix this by setting up aCpyPam over the entire body section of the
clipboard document.
Change-Id: I8c6caee5e75260dff79f106efc11f9669feddc0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110411
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: I4884bfb67a061b865e8cf38b2fea6de0cb1bc3d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109057
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This would set CursorType::SelectionInTable but leave m_pOwnTable
and m_pOwnStartNode uninitialised, causing
sw/source/core/unocore/unoobj2.cxx:399: SwXParagraphEnumeration: table type but no start node or table
and then the enumeration would return the table it's in as the first
element, which is quite annoying.
Refactor the creation of SwXParagraphEnumeration to prevent this.
Change-Id: I4e9e3456bdf66b9822d19ad985a20b094e6bbba4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106532
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
The problem happens if a section starts or ends with a table:
SwXTextSection::getAnchor() may return a SwXTextRange with one position
in a table cell and another position in a different table cell, or
outside the table, neither of which is valid to set the cursor via
SwXTextViewCurosor::gotoRange().
Introduce a new special mode for SwXTextRange, RANGE_IS_SECTION,
analogous to RANGE_IS_TABLE but actually working.
Only SwXTextView can be used to create XTransferables, and it requires
selecting first via either the SwXTextViewCursor or select().
It's currently not possible to select the content of a section in the
ViewShell in these problematic cases, and would be some effort to add.
So add a new interface XTransferableTextSupplier that can be used to
create XTransferable from the SwXTextRange with RANGE_IS_SECTION.
The core CopyRange() and DeleteRange() functions can deal with SwPaMs
that start or end in non-text-nodes, so pass the whole section content to
these in SwXTextRange::setString() and in
SwXTextView::getTransferableFromTextRange().
Change-Id: If7e3210e8a26f5618317c294f2b2f3ed5c217f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106293
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... SwSizeEnterLeave and SwTextAPIObject
See tdf#94879 for motivation.
Change-Id: Iea12ac975b68700488f7b39bbb3596a011159c61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103528
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I305ec375c0aed8832290fe872edd050e53262a90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101217
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: If2a5e5533a8587c83279d61d764c201e8572f075
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100730
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Recheck after 7-0 branchoff
Also drop the now unused file include/vcl/field.hxx
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
So it is no longer necessary to define all SwModelTestBase functions
inline.
Change-Id: Ia1055ff967b3614102275ec92607c85ec063fce7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99820
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I3805d7a0f8f0e93463a2285a1ce52f6a5daba27d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95578
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I494349b99a122f67ed1f2881faf1a37e4358c55b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
28b77c89dfcafae82cf2a6d85731b643ff9290e5 changed at-char anchored fly
selection.
WollMux calls setString("") to remove one character in the first
paragraph and a fly anchored at the start of the body text is deleted
due to the new IsAtStartOfSection() check.
It would be possible to treat deletion via API differently than via UI,
as there is already a flag ExcludeFlyAtStartEnd but it would require
passing the flag through 10 functions and also to store it in
SwUndoDelete...
The main intent of the IsAtStartOfSection() check was that Ctrl+A should
delete every fly; this can be achieved by checking that everything was
selected, so that selections only inside the first/last paragraph don't
delete the flys at the edges.
Change-Id: Id62e7d99a10b42eaecea5564372d29b6c43e3f7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91993
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: Ic6198edef14817f91d889359878636320a64c09c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89253
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
... which were accidentally broken in 2003 in commit
eba784710e92597282a2284b56dce3a45ac38776.
Change-Id: I3dc96dff0a8935f927933bb3946528fb8ac9aed0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86315
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Regression after commit 1e2682235cded9a7cd90e55f0bfc60a1285e9a46
Change-Id: I40acc9e0ffdd292283381366a31eb6647b80324f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86291
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Reimplement commit d8a188d8d59ae51621a0540fe931e1c70db285fe
Seems that I was overly optimistic. The behaviour of CreateCursor
affects many places; first of them is CreateNewShellCursor, which
would start returning cursors with selection after the fix from
commit d8a188d8d59ae51621a0540fe931e1c70db285fe. Or if we change
which cursor is returned from that method, then the order of the
chain would reverse. And there are many such places. So just make
it like before, and do the conservative fix.
Change-Id: Ib6bf414f0e91d6fb59f73fbfc0fbd799457d49c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86151
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This makes the ODF filter work out of the box, since the same property
was provided by Draw/Impress in the past already.
Change-Id: Ie6a053864c9fa41fad6ca4571d7d04a3756b7591
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86147
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
The deletion was there since initial import in commit
84a3db80b4fd66c6854b3135b5f69b61fd828e62. It's unclear why would it
be necessary and what depend on it. All tests pass => let's drop it.
Another (less intrusive, and IMO more of a workaround) way would be
to move setting mark of pCursor after the loop over GetNext() in
SwCursorShell::SetSelection.
Change-Id: I5402db58d8f829799bc16b8f4f6014bcea133995
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86142
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
The SwXText implementation for inserting text works like this:
* XTextPortionAppend methods appendTextPortion()/insertTextPortion() get
the text properties passed as a parameter, and they should apply only
those properties to the inserted text, not expand any existing
formatting hints at the insert position.
* XSimpleText method insertString() does expand existing formatting
at the insert position, just like editing in the UI does
For inserting XTextContent:
* XTextContentAppend methods
appendTextContent()/insertTextContentWithProperties()
with properties parameter, similar to XTextPortionAppend
* XTextContent::insertTextContent(), without properties
So arguably, by analogy to inserting text, the methods that take
properties should not expand hints, and the insertTextContent() should
follow the insertString and expand hints.
Commit 18cbb8fe699131a234355e1d00fa917fede6ac46 is an important bugfix
for writerfilter import, but the problem is, it added the
DontExpandFormat() call to insertTextContent(), whereas the regression
it was fixing (from commit 232ad2f2588beff50cb5c1f3b689c581ba317583) was
that the call was removed from insertTextContentWithProperties().
So restore the state before 232ad2f2588beff50cb5c1f3b689c581ba317583.
Turns out that SwUiWriterTest2::testTdf126206 was checking how a
bookmark-start is formatted instead of how the text is formatted.
Change-Id: If524409f88a1a36aa062b6e132996d3f9c1bb571
Reviewed-on: https://gerrit.libreoffice.org/83223
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|