Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I696489a60729426b9b14df6c9e79a2d8247d21fb
|
|
Currently rtftok doesn't handle multibyte string as destination
text very well. For example, RTF files created by MSO 2010 Traditional
Chinese version use CP950 (aka BIG5) for unicode to ansi conversion.
When a Chinsese numbered list was picked, the Chinese dot ( unicode
0x3001, big5 0xa142 ), was used by default as a list number suffix.
However when it is imported , only a single B (0x42) were left.
The theory of the patch is to collect both hex string and normal
character with m_aHexBuffer, and convert it into OUString as late
as possible. It allows prefixes and suffixes to be imported from
RTF files created by MSO 2010 TC correctly.
Reviewed on:
https://gerrit.libreoffice.org/12435
Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx
Change-Id: I63062da39bf36ea27ec11e5d0eb1d1abf5018d96
|
|
Change-Id: I4f5f0f653f2ce7782ec1d1fc5ef550a21a9c1d35
|
|
... if it has multiple columns. See commit
d185204737031955c56a24356ed003d342548434 (DOCX import: set
DontBalanceTextColumns=true for the last section, 2014-07-17) for the
DOCX equivalent of this problem; this just adapts the RTF tokenizer to
dmapper.
Change-Id: Ib30f9b386e204b8b2987832ab17ee0cc53b3f0bc
|
|
Reviewed on:
https://gerrit.libreoffice.org/12252
Change-Id: I2d8760c7ecb3677464e167528b2424aaca19a0d7
|
|
Change-Id: Ia548dd0382a6991a2d9914bf0d1fc1286319c5e9
|
|
Apparently Word treats \ltrch \rtlch differently from
\loch \hich \dbch when groups are opened.
Change-Id: I257712521e8e77fa66e76857489797ecc675506e
|
|
Apparently the run type resets to LTR in a new group.
(regression from fc49c052dbdbb5ab3b0a02a13143705f769b9662)
Change-Id: I61c0fcbe4e44b488a14cc78823063a1a1ad4f4b1
|
|
Change-Id: Ib0f39c4af7cc32d0f4491f13ea207d90a449a47d
|
|
Change-Id: I69def7936c320e93db5d4504922d52346caaf9cf
|
|
Otherwise ARGB 0xFFFFFFFF would turn into black.
Change-Id: I690f34d888ca9a013e8ce1af2c7ef8ed88ee28b0
|
|
Also adjust CppunitTest_sw_htmlexport that implicitly tested that there
is no color around the image.
Change-Id: I8e14dfa7e7be80c4f8c492999071decae6a492e8
|
|
Regression from 36246aa9fb57c9fe4e546c91a8274d8828b1424e (RTF import:
fix handling of \loch \hich \dbch \ltrch \rtlch, 2014-06-03), now that
\f no longer means the ascii font name, \plain should reset a few more
parser state members.
Change-Id: Ia6b0bdf25563dd5300e108b46731751f0886f67d
|
|
Regression from commit 9679e9c23216decb5f9f25f85b04cb3f25211111
(fdo#69649 Fix for pre-rendered Table Of Contents, 2013-12-30), now that
we handle hand-edited TOC, it's necessary to properly track correctly if
a property came from a style or as a direct formatting.
Fix RTFDocumentImpl::getProperties() to detect direct formatting that
cames from a char style and would result in attribute tokens.
Change-Id: Iab5a14770de43249961c280a5dc698200abc8f49
|
|
Regression from commit 1be0a3fa9ebb22b607c54b47739d4467acfed259
(n#825305: writerfilter RTF import: override style properties like Word,
2014-06-17), we failed to do the proper deduplication in buffered
content, like tables. Fix this by adapting
RTFDocumentImpl::replayBuffer() to RTFDocumentImpl::checkNeedPap(),
which already did the proper deduplication.
To be fair, the inconsistency was there earlier since
9f5263c477b82fef5aa9c3e79fb6af92aa049e24 (fdo#44736 RTF import: ignore
direct formatting which equals to style, 2012-11-25), but it caused no
real harm earlier.
Change-Id: I0673408088d9d83768f0780ea92ece87913d03f3
|
|
Change-Id: Iba0e43c198c3380426d0572427c591f4d77ba09b
|
|
... which is highly suspect in any case, but whatever.
Change-Id: Ibeff36a7d30750fc33e9729b067f86b3901d1c76
|
|
Change-Id: I84b3d5186e99b8313cfb32398869de028a267b49
|
|
Change-Id: If06c6bcdda97447e6014223d997c7ff8abd64b48
|
|
Change-Id: I8561aa1532a863bf7f8dd44fbd40e8e0187e4967
|
|
Regression from commit 41890bf714803969515578b47e63fa9730ea7090
(fdo#54473 fdo#57133 fix RTF import of character styles, 2012-12-04),
the problem was that the style undoing magic introduced in
1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF
import: override style properties like Word, 2014-06-17) was not used
for character styles.
Change-Id: Id31cfd5574a83bcf2895f0c2fd496fa60791cbb3
|
|
Change-Id: I712d8f73466c662659a7b76ff363a44a71bba324
|
|
Change-Id: Id23cbd62b057442c577fef124a5705e4d551076f
|
|
Regression from commit c4b91ae3178011c66c76c711c1a6469ba658872e
(fdo#55525 import RTF_TRLEFT, 2012-11-13).
Change-Id: I90f2c6399cfaf8399de0cf3488a23af6cc84710d
|
|
Change-Id: Iec785ae538de81325812b1e6fe33115789b39770
|
|
Change-Id: I512713e9b9aa1ceb3d98af7a1a6abd144e370689
|
|
Commit 6cac123a8de8357cf11d9b5f818233889d729939 (fdo#45183 import
RTF_SHPFBLWTXT, 2012-12-27) fixed this already once in the past -- fix
it again, this time with a testcase.
Change-Id: I0cbbfb1ba4eef42b2ee32f6f77065afaad3ddc1b
|
|
Change-Id: I5ea45dbed652231acdcc3632ced728ed8bcb621a
|
|
Change-Id: I49d94bd72af610e88128cd405e4786d2e9ba65ed
|
|
The font definitions in the style sheet meet an untimely death in
StyleSheetTable::lcl_sprm(), which special-cases LN_EG_RPrBase_rFonts,
routing it into TblStylePrHandler.
Avoid this by sending style entries to the domain mapper in the same way
as the OOXML tokenizer, i.e., with paragraph and run properties nested
below CT_Style_pPr/rPr.
This reveals that the CT_Style_basedOn was wrongly handled as paragraph
property.
Change-Id: Ic724ba48fe36bf782b1b430bdafdb1df480d5ad3
|
|
Regression from 2a35f5c7945d00b6f6e21fc7cf5b05b184eba88f (DOCX OLE
import: inherit anchor type from replacement graphic, 2014-02-18), then
problem was that dmapper expected that the anchor type of the
replacement graphic is set, but the RTF tokenizer wasn't adapted to
fulfill this requirement.
Change-Id: I0f7e1a71052f337793d6f844fe5476c3868c03f4
|
|
Change-Id: If9a9a0a75a35ce4808228f554d7d186a3a3daa4a
|
|
The paragraph properties need to be applied to the paragraph following
the \page too, which did not happen in this case.
Also the minimized test doc shows that checkNeedPap() must be preceded
by checkFirstRun(), since there is no run preceding the \page.
(regression from 94765a1b3f543b3b60f8c1de05048d12f2576be4)
Change-Id: Id286c4fbdeee688fa4f6b24063b634bac637eab6
|
|
These keywords were simply not implemented.
Change-Id: Ib4d07a4b2dfb07cfd56a4ee07d7c14d1c59323f9
|
|
This avoids an ugly "Character" box in the dialog with a null byte in it.
Change-Id: Iee35a8e1bd6b57fb4eb8ae06722bd79ee1d5d8de
|
|
For RTF, the tab stops that are set directly on the paragraph are the
tab stops the paragraph has effectively; there is no equivalent of OOXML
<w:tab w:val="clear" w:pos="4536"/> that would override a tab stop of
the applied style; that is done by simply omitting the tab stop.
It would perhaps be possible to implement something to synthesize a
NS_ooxml::LN_Value_ST_TabJc_clear in the RTF tokenizer for this case,
but it's simpler to just generally disable domain mapper's
InitTabStopFromStyle() for RTF.
Change-Id: I7b0581be8db19ffda81c8d1da290abf0a0f69529
|
|
Change-Id: I0a0f04d0f0e008e8947a5a7e3ed6083c1589e61b
|
|
Word can apparently have complex footnote separators, but the
domain-mapper only sets a single flag that there is a separator
(m_bHasFtnSep), so the only thing that makes sense for \par here
is to completely ignore it.
(regression from e1afe4318787425dc40f2d0b1f02fa17e925c8da)
Change-Id: I32d9b01a0a9248ba646654295a74953a6cb74fb3
|
|
The problem in the bugdoc is that the ';' style terminator is encoded as
{\uc1 \u59 ?}, i.e. inside a group, so when reading the ';' the
aDestinationText of the top group is empty and the style name is lost.
Or since the style name characters are encoded in the same way, every
character is lost once the group closes.
The same problem affects some of the document properties.
Introduce an abstraction of RTFParserState::aDestinationText so that for
every destination only one of these buffers is used, regardless of
nested group structures; the aDestinationText buffer is only switched
when entering a new destination.
Also, the \revtbl and \stylesheet destinations do not contain entries
directly, i.e., every entry must be in a sub-group, so remove some
special-casing for these; however, for \fonttbl the entries may be in
groups or not.
Change-Id: Ica276a8b730e4a707530471ba27bfdd1582b8890
|
|
Change-Id: I2c1f99128698778233b0bd46256b571d3f794713
|
|
Change-Id: Ia0423eaa6454480979795f9443296919c44a0051
|
|
The ";" terminates an entry and shall not be inserted as text,
even if some over-engineered producer encodes it as {\uc1 \u59 ?}.
Also, remove the special-casing of the \leveltext destination, since the
bugdoc does contain \uc inside it and it's not obvious why that should
be ignored.
Change-Id: I1e19c9df39597cb1b22bbda97853c829d7812e29
|
|
With a horizontal rule, it's possible that there is no \par following it
in a header, so RemoveLastParagraph() will delete the paragraph where
the shape is anchored (and so the shape as well). Avoid that by adding
an extra \par if there is no \par following a shape.
Change-Id: I4840417880c98203866c9dcde51627516618f2d0
|
|
Change-Id: If2efab82c0adc2f3dc52733c335693565c350bfa
|
|
Normally a mail merge field has a name like
"css.text.fieldmaster.DataBase.<datasource name>.<table name>.<column
name>", however this isn't enforced: just
"css.text.fieldmaster.DataBase.TEST" is also accepted (even if its
semantics are ~undefined).
If SwXFieldMaster::setPropertyValue() allows setting such a field master
name, then SwXTextFieldMasters::hasByName() should not ignore such field
masters that have no dot in their name ("TEST") or use "Database", not
"DataBase", otherwise (sane) client code in writerfilter ends up with
hasByName() returning false, but setPropertyValue() throwing an
exception, because the field master does have such a name.
This fixes DOCX/RTF import of multiple mail merge fields with the same
field command.
Change-Id: I498eabace25f8e466b3504ba13fa3060d4ba22da
|
|
Change-Id: Ibee9fec0f421b4c2ff3d45c861bc3fcfc97cbf15
|
|
Change-Id: I5166027b8bff0e1c293a3d0d6dab4c3758c27954
|
|
Change-Id: Ic17d66bd2b9f4cc4124b13ef7c962649d83ee60c
|
|
Change-Id: I78a368ef2899b2462251b45a327fc7b1f31fe764
|
|
Change-Id: Ib7d166bf1b1e5d5216d822b2b0396aa4dc535c6f
|