Age | Commit message (Collapse) | Author | Files | Lines |
|
Updating a SwTxtInputFld requires expanding the contents of the node.
Expanding the contents of the node requires all the positions of fields in the
node to be correct in order to expand them to the right place.
So on updating a SwTxtNode wait until all the attributes positions are adjusted
to be correct before expanding the SwTxtInputFlds in that node
Change-Id: I76500239a103e56be412707a708a303a58236070
(cherry picked from commit 95f4b2f4a6dfe47842336116d94edd175a6da960)
Reviewed-on: https://gerrit.libreoffice.org/14253
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
The assert for case 3 is wrong and fires when importing ooo44732-2.doc
but there is also a bug here where a hint could be skipped.
Change-Id: I028d2d5df9e80cf0001d9bc11aa7fabcd01e83bb
(cherry picked from commit 01d25c96db366de003e4570ddf8559da3dd9ea5b)
Reviewed-on: https://gerrit.libreoffice.org/14072
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Resort immediately after modifying the data to prevent invalid lookups.
Change-Id: If132af401d8164fd5973d81a8327c1fa726c908c
Reviewed-on: https://gerrit.libreoffice.org/13984
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 5c363cf3f1d75e37835a6663a96b4e22c754c4cb)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
|
|
The SwInputFld is copied because it doesn't have HasDummyChar() set
although it has 2 dummy characters; TODO why is that...
Change-Id: Iee91c1d0cf7a7a928e7383c1839f8192e8d4d5b0
(cherry picked from commit a1718045bd6218e07caebda7c4cacdcb853eabd3)
|
|
... should fix field dupes"
This reverts commit f384598d8eec91c3c0f84a07ff3e59b8e3e13b3f.
The attributes have to be copied in case splitting a paragraph creates
an empty paragraph.
Change-Id: Icd5730dd9ab8a68f737492645988a4d2f07af7a0
(cherry picked from commit 0f78ae1ca33f83737553ad204c869a63498b7d2d)
|
|
Change-Id: I602913a1cfb8dda072945770a585e6cd9fd3e134
|
|
And also in SwTxtFormatter::NewNumberPortion(), use
SwTxtNode::IsIgnoredCharFmtForNumbering(), via
checkApplyParagraphMarkFormatToNumbering(). Otherwise the color of the
paragraph mark is inherited by the numbering portion, which is not what
IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
(mirroring Word's behavior) is supposed to do.
Change-Id: I5d8df9b404916cc4a4405bf796d971ede59e6111
|
|
I need this in SwTxtFormatter.
Change-Id: Ib1586299f468a88e92fdb367fbab69a683791dc9
|
|
Change-Id: I6116b4c2b8e03e819a430cbdcb7874af6508fb62
|
|
Change-Id: I4b7829a1abe1459f2e4915159588fd3e16a14eea
|
|
Change-Id: Idd6c9f9752659fc5da575e5a3f0ffc15ce5dbe1c
|
|
Change-Id: Ifb29bd3e9c5dc7671c189fd9daa010305f7a85a4
|
|
Added clear() method to OString and OUString class, Updated appropriate call-sites.
Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
The SwFrmFmtAnchorMap class provides reverse mapping
to SwFrmFmt::GetAnchor().GetCntntAnchor(), so that when code somewhere needs
to update SwFrmFmt's anchored at a position, it's not necessary to iterate
over all of them (which can be a large number e.g. with mail merge).
One special catch with the multimap of SwNodeIndex keys is that
the values of those keys change (whenever the node structure of the document
changes, indexes of nodes change as a result). This makes it impossible to use
any hashing container, as the hashes would change without the container
noticing, but multimap should work fine, as it just requires that the keys
remain sorted, and that is the case. Nevertheless, the old code in the two
converted places is intentionally left there in debug mode to verify the reverse
mapping is updated correctly.
I intentionally went with SwNodeIndex rather than SwPosition, as SwIndex
(the other component of SwPosition) was causing some trouble (see e.g. the
SwPosition comparison operator< , where two same positions are different if one
is registered and the other not) and it doesn't appear to be actually necessary.
Change-Id: I7f1768558f60155d4ba83c84aa7f9e34dc65ebf9
|
|
Change-Id: I0a320eb990f9a3b6800447a97a84c118239bae96
|
|
3f9872185e introduced new API for fast finding of marks to a specific text node,
so use that (code itself based on cb46aaf2d7).
This makes mailmerge faster (since it can create a huge document, and especially
with the change to use UNO bookmarks to mark starts of MM documents inside
the larger single document there can be a large number of marks).
Change-Id: I30ec69acf423e9a62fae5f5492ed8744cb727a56
|
|
also see fdo#46757
a) We need to ignore redline-deleted text, but count redline-added text
b) each block of text is denoted by its end position in the model
and where that maps to in the view so a hidden portion
should record its end point not its starting point, and a non-hidden
deleted portion should always record its end point
c) when mapping a model position to the view we take the offset of
the model pos arg from the block end and use that to offset the
mapped block-end view pos to get the final view pos. But for
hidden portions that won't make a whole lot of sense, and
end up offsetting into prior portions, so map all positions within a
hidden portion to the same block-end view pos
add regression tests for these cases
Change-Id: I45c76bba47fd430bc3bccb5f919502660d415d9e
|
|
... when either the start or the end position of the new hint is equal
to an existing hint. There is not just 1 case here but 3 different
ones; don't attempt to insert hints with start > end.
Change-Id: I39cf8a352f67d77b56b0d01de5872f4d341f6bdd
|
|
Change-Id: I584edadf13b34edf054e3405865c43bae74a7830
|
|
Change-Id: I9b48fc25abcbdeceefd5a86d8305209f312c9976
|
|
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba.
Conflicts:
cui/source/tabpages/transfrm.cxx
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdibrow.cxx
sw/source/filter/ww1/w1filter.cxx
tools/source/generic/rational.cxx
Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
|
|
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.
Conflicts:
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdibrow.cxx
sw/source/filter/ww1/w1filter.cxx
Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
|
|
... as reported by sberg via UBSan in CppunitTest_sw_mailmerge:
> sw/source/core/txtnode/thints.cxx:3207:38: runtime error: downcast of address 0x000003cadcb0 which does not point to an object of type 'SwTxtAttrNesting'
> 0x000003cadcb0: note: object is of type 'SwTxtInputFld'
> #0 in SwpHints::TryInsertHint(SwTxtAttr*, SwTxtNode&, unsigned short) sw/source/core/txtnode/thints.cxx:3207:13
> #1 in SwTxtNode::InsertHint(SwTxtAttr*, unsigned short) sw/source/core/txtnode/thints.cxx:1583:25
> #2 in SwTxtNode::SetAttr(SfxItemSet const&, int, int, unsigned short) sw/source/core/txtnode/thints.cxx:1943:39
> #3 in SwRegHistory::InsertItems(SfxItemSet const&, int, int, unsigned short) sw/source/core/undo/rolbck.cxx:1390:28
> #4 in (anonymous namespace)::lcl_InsAttr(SwDoc*, SwPaM const&, SfxItemSet const&, unsigned short, SwUndoAttr*, bool) sw/source/core/doc/DocumentContentOperationsManager.cxx:1169:28
> #5 in sw::DocumentContentOperationsManager::InsertPoolItem(SwPaM const&, SfxPoolItem const&, unsigned short, bool) sw/source/core/doc/DocumentContentOperationsManager.cxx:3041:23
> #6 in SwXTextField::attach(com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) sw/source/core/unocore/unofield.cxx:1966:13 > #7 in non-virtual thunk to SwXTextField::attach(com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) sw/source/core/unocore/unofield.cxx:2061:1
The SwTxtInputFld is unusual because it's both a field and has a range;
let's try to use virtual inheritance to inherit both from
SwTxtFld and SwTxtAttrNesting. Sadly requires dynamic_cast everywhere.
Change-Id: I69f834d2b78ef7cdaac1f554bd80711084efcd02
|
|
Fraction used BigInt internally for computations, rational does nothing
like that.
Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
|
|
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution. (Unfortunately MSVC 2012
does not support explicit conversion operators. Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)
Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
|
|
Change-Id: I5daf6436fd049410c4863a4b065c9abd95b5d361
Reviewed-on: https://gerrit.libreoffice.org/11928
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
* Added rational util functions used by Fraction class not
available in the boost::rational class.
* Replaced usage of Fraction by boost::rational<long>
* Removed code that relies on:
1. fraction.IsValid() -- rational only allow valid values, ie
denominator() != 0
2. rational.denominator() == 0 -- always false
3. rational.denominator() < 0 -- always false but implementation
detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
* Simplified code that relies on:
1. rational.denominator() != 0 -- always true
* BUGS EXIST because Fraction allows the creation of invalid values but
boost::rational throws the exception boost::bad_rational
Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9
Reviewed-on: https://gerrit.libreoffice.org/11551
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
|
|
Use cases:
1) User of the XTextAppend API's uses appendTextPortion(), then
appendTextContent(), then appendTextPortion() again. It's expected that
the text content will be in the middle of the paragraph, but before, it
was at the end of it.
It's possible to work this around by inserting the text contents only at
the end of the paragraph (like it's done for ODF import in
XMLParaContext::~XMLParaContext()), but probably it's not a good idea to
copy&paste this workaround in all the import filters.
2) User types some characters in a new document, then inserts a picture,
and sets anchor type to at-char. Now the anchor point is set to the end
of the paragraph, but it's impossible to type anything after that
character.
To be fair, now it's not possible to type something *before* the anchor
point, if it's at the first character, but hopefully that's less of an
issue, since setting the anchor type to at-char sets it to the end of
the paragraph, not at the start of it.
Change-Id: Ia8b33e8880aae86f62fae09cd5ac1cf82c83320f
|
|
for counting words in a range of text which has redline deleted
text at the start
Change-Id: I34149822d43f8ee3fbde58a166dad408fb588fce
|
|
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.
Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
|
|
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.
Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
|
|
Change-Id: I04eea6825c02ea0c076b525e58a1dc86dd290b64
|
|
Change-Id: I9ba47e8a53a37cbeb2e8d0e197094531edbaeb4c
|
|
Change-Id: I64bc6daa0585686c4d337a5c32ed7009b96fae0c
|
|
Change-Id: Ib76af3f664dc259e8596d33492bd078c9e4536bd
|
|
Change-Id: Ib2f23f098377a07237cdba973edd8e854db05625
|
|
Change-Id: I91dad2b1f806a1b7fab823e590ff97121ad5db31
|
|
Change-Id: Iefd16f2b1d03a0fcd4745d3dd5622f189f1d4492
|
|
Change-Id: Ia9bf83054d08d73711bb3f6e83d316ff55e4798c
|
|
Change-Id: Idc81a30787d09fb8008355251aad282df981cbbe
|
|
Change-Id: I4eaf9910eec073fad5dac6722661383253912c10
|
|
Change-Id: I1208f1e98a0ee09263babeffa7554e94ed455434
|
|
Change-Id: I8033385b5edd6baa7b64ef77ca242d76f6bf30f3
|
|
Change-Id: Ifdb6d4b2e404bd160e6fcec3229691e750bdf698
|
|
Change-Id: I3fffb321877168dfa9844b4ad75a9a9efc9602a6
|
|
In other words, stop registering at SwDoc's "UnoCallBack".
Change-Id: Ie73c707b0f43559cc78717c0879d5e9a9335a7ac
|
|
... and there's no way to get the SwFmtFld from a SwSetExpField, so add
a member for it like SwInputField has. That's still better than the
UnoCallBack nonsense.
Change-Id: I59c82e95414dbae284432b8a318a6ce1a34256c7
|
|
In other words, stop registering at SwDoc's "UnoCallBack"
Change-Id: Ieb2639497fe5e8d71aa1c47952c007da76fcee84
|