It's still only enabled in debug builds, but it now requires an
environment variable, not rebuilding with dbglevel=2.
Change-Id: I970c7bfe0b3f547429ef37f37406a095a60c34ff
Previously code only built if DEBUG_DOMAINMAPPER was exactly defined
with OSL_DEBUG_LEVEL was > 1, as they these conditions were used for the
same purpose. Change all this dmapper XML dumping code to consistently
use DEBUG_DOMAINMAPPER, so later it'll be possible to change when it's
defined without breaking the build.
Change-Id: I32442cf098162c7d7c9eb7c454094685ab654b74
So guards like '#if OSL_DEBUG_LEVEL > 0' around it can be dropped in
most cases. Also, dumping the hex value of token IDs no longer makes
sense, now that doctok is gone.
Change-Id: I2c0d466e4bdde63d271a83aa4e7eebb52294e363
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
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
The real news here is that "comma" and "dot" was swapped on export, the
rest is just a fixup of recent breakage.
Change-Id: I54045f5837652dc38a30361e21ced25aeaf58257
In other words, from now it's a must to map ST_Foo simple types to
NS_ooxml::LN_something constants, and raw integers (which are hard to
grep and hard to track down where are they used) are no longer an
option.
Change-Id: I968b27bca3f64f6f4a382b87e2dbc499a3132ea2
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
* 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>
Again no need to adapt dmapper/rtftok for these, see commit
020f46d17065b8b00365eab7a809ce980ebfb59a (Use constants for ST_Em
values, 2014-10-07).
Change-Id: Ie67f7a4d251525b5f8799cf613bea56ad82f7a57
This is similar to f7ef84640258e4ee6ddc4cc5cbf58a2d89860afa (abi#2128
RTF import: fix memory leak, 2013-11-28).
Change-Id: Id57320466e6fb302ec8616ccc9f4f9429b8eff21
The symptom was that during the handling of the XE field, we tried to
access the top of the text append stack, but the stack was empty.
The situation is the following:
1) There is a multi-page TOC field.
2) The page break inside the field is described using a section break,
featuring headers, and the header contains a field that we map to a
fieldmark.
3) There is an XE field after all this.
The root cause was that during parsing of the header, some of the state
should be stashed away and restored when we're done. The new
HeaderFooterContext does exactly this, and now the number of push/pop
calls on the text append context match again.
Change-Id: I10f259fd9edb8bd719ae5bc8a43ed5ef8c708071
The symptom was that some cell borders were missing. It's because in
Word, cell borders are additions to table borders, so if a table border
is single, but the cell border is none, then the outcome should be
single, not none. In Writer, this is a single UNO property, so if it's
set to SOLID then to NONE, the latter wins.
There are two situations where we now do the right thing:
1) style-cell-border is set, direct-cell-border is none -> outcome is
now inheriting (style-table-border, direct-table-border, etc.)
2) style-cell-border is none, direct-cell-border is none, but
direct-table-border is set -> outcome is now direct-table-border.
Change-Id: I320ae908c61221c8020e3b5323c31dec11c15b2f
Redlines changing formatting of runs and paragraphs are valid for the entire
run/paragraph, not just their existence in the XML. So store them
in the matching contexts, which will care of it, instead of the endtrackchange
stuff.
Change-Id: Ie583e4be14e8df95829852bfbbbe25aa0684f02e
propagateCharacterPropertiesAsSet sends the properties only when ending
a text run (or maybe starting another one, I'm not quite sure), so it breaks
ordering by sending them later then expected (although it worked in many cases).
It's a question if propagateCharacterPropertiesAsSet is to be used by anything
actually, since it seems rather broken to use it in the ooxml frontend.
Using sendPropertiesWithId sends the properties properly at the right time,
as one would expect. I don't know why dmapper can't simply handle this on its
own, as I think it does handle entering and leaving other elements, but
spending more time on it with this overdesigned abomination, oh well.
Change-Id: Ie36c5f933ea3e6d789ea8f9e4ee3b60a5d1c920c