Commit graph

2262 commits

Author SHA1 Message Date
Luboš Luňák
e28c8f3b75 OSL_ENSURE -> SAL_WARN_IF
Change-Id: Ib8e9976e618e676465f0baf1f38be7e3297ac853
2012-06-19 11:52:39 +02:00
Miklos Vajna
2123ede032 n#758883 dmapper: paragraph-level run props should affect numberings as well
Change-Id: I707105f6da53a6cb790d743738875acde561e20f
2012-06-19 09:30:11 +02:00
Miklos Vajna
14d6cf1f8f n#758883 dmapper: always set list id during stylesheet import
This way the sprm handlers can be aware that a numbering is provided by
that style.

Change-Id: I5b5f1570a9e50fd8b3372f5ac7a6cd48e9751254
2012-06-19 09:30:11 +02:00
Miklos Vajna
94037e30f9 dmapper: fix crash in ListLevel::SetParaStyle
This can be triggered by using a style in the docx document, then
manually removing that style from styles.xml.

Change-Id: I4aad54d088d9fa56371ff49220316fb14fce6c37
2012-06-18 11:55:09 +02:00
Miklos Vajna
42e41ea6d6 move DTTM2DateTime and DateTimeToOString to msfilter to avoid copy&paste 2012-06-15 18:03:20 +02:00
Miklos Vajna
629001d479 fdo#50087 fix RTF import of Title, Subject, Comments document properties
Change-Id: I3358fad4949c2c21ecf63983a36b7c8428df9f06
2012-06-15 17:04:13 +02:00
Miklos Vajna
7193d4ef0d n#750935 fix docx import of w:evenAndOddHeaders
Change-Id: I172073bac10e8d0449c0f5c0a226dd7ace013376
2012-06-15 15:28:49 +02:00
Matúš Kukan
c65225a71b writerfilter: remove unused / unneeded .mk files
Change-Id: Ic64e3e527ced7fcf81f90075bae7d8a646789d4e
2012-06-14 10:13:18 +02:00
Caolán McNamara
523bf7fcdf callcatcher: unused duplicate WW8TableManager class
Change-Id: I6c4395712cb4bb6b28e2997b4af24ab423573f4a
2012-06-13 11:20:24 +01:00
Takeshi Abe
6c7da3e22a removed code commented-out in the first place
Change-Id: Idb109cf767342042f1a2941c30fcf137f468e7df
2012-06-13 16:43:39 +09:00
Julien Nabet
104badf31c Resolves: fdo#49178 CRASH when FILEOPEN particular RTF
Change-Id: Idd938980b91ec8b822a92dfd7013a20fe5b6f498
2012-06-12 19:51:44 +02:00
Miklos Vajna
9b0be41e96 n#766477 dmapper: import NS_ooxml::LN_CT_FFCheckBox_default
Change-Id: If7edb301fa90a49d79fc5322a7c19ee2591f5494
2012-06-12 16:54:48 +02:00
Miklos Vajna
61ba6e49f5 fdo#49659 dmapper: handle tables in substreams
Change-Id: I4c81eb1ec57bda2b5ce65b19de998bab2dfb6c3c
2012-06-11 17:04:48 +02:00
Miklos Vajna
00c23c39f5 writerfilter/resourcemodel: don't use a global variable here
Change-Id: I064070a51cb87c10c72917b19969672d2121be7a
2012-06-11 16:29:03 +02:00
Miklos Vajna
ea8347d079 writerfilter/doctok: unused global variable
Change-Id: I93c9c6e267270a07bd98ea408f0d6f78759265bb
2012-06-11 16:29:03 +02:00
Miklos Vajna
e08ab74b91 fdo#49659 handle RTF import of tables at the very end of the document
If the documents ends with a table, both Word/Writer produces a
non-table empty paragraph after that table. However, it's valid not to
emit that empty paragraph, so handle the situation in the importer.

Change-Id: I8ea163f2de62954f3891f8f48e81d89f6e29ce6f
2012-06-11 12:25:38 +02:00
Miklos Vajna
c5c3ce5e62 fdo#49659 fix RTF import of pictures with inner groups
One would think that with {\pict{\foo1}}, the inner group has no effect
in the outer group, but this turns out to be valid, so we should handle
it as well.

Change-Id: I64b933ad1cd5946f22d27669e9240d9e1875bde3
2012-06-11 12:25:30 +02:00
Miklos Vajna
993eb829f3 RTFDocumentImpl::resolvePict: handle failure from importGraphicObject()
This fixes an assert from the fdo#49659 bugdoc.

Change-Id: I4c4d56aa119dcdb965a0b30ca137d7e7d719259c
2012-06-11 11:05:25 +02:00
Miklos Vajna
9e8957de20 n#757905 fix VML import of mso-wrap-style:none
There were two problems here:
1) SimpleShape::implConvertAndInsert() did not set the anchor type
2) DomainMapper_Impl::PushShapeContext() tried to overwrite it

Change-Id: I2c32016c4bb15c891cf287d8208e10817c6291e6
2012-06-07 10:59:51 +02:00
Miklos Vajna
b9508dd55f fdo#50665 rtftok: don't ignore character properties of text fields
The dmapper part was already fixed in commit
9486851bae for DOCX, this fixes the RTF
tokenizer.

Change-Id: Iaca706e50367bb744f5a03e15134bda1646df8fc
2012-06-06 13:07:50 +02:00
Noel Grandin
b3c76dee6d fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new ::create methods

Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
2012-06-04 16:57:55 +02:00
Norbert Thiebaud
c2966ec959 targeted string re-work
Change-Id: I17bec612eb6d50acc4bf8ac8ea4299fd2380afb5
2012-06-02 16:48:36 -05:00
Norbert Thiebaud
d5d29accb7 targeted string re-work
Change-Id: I910a508722a309d7916377a7e2df2093070809ad
2012-06-02 14:55:58 -05:00
Julien Nabet
80d5a21acb Fix some Prefer prefix ++/--
Change-Id: Ief7279a06ffbdd0e23fac28f8948daea4023823c
2012-06-02 01:41:38 +02:00
Miklos Vajna
9bbb849dd8 fdo#50539 fix RTF import of automatic character background color
Change-Id: I7efb3bce9a3a6f6c029d99de2264e00bb1bc7c93
2012-06-01 16:40:11 +02:00
Miklos Vajna
6e770b1619 n#764005 VML import of absolutely positioned pictures should not be opaque
Change-Id: I17a1a94ee92ce04ff6928a20c552b3a3408a0626
2012-05-31 14:45:55 +02:00
Miklos Vajna
0a412cc13e n#764005 dmapper: don't insert "at page" anchored graphics as "as character"
Change-Id: Ibdde32014d2fc2fe43d59a5cc6ee7f722adcbfb6
2012-05-31 14:45:48 +02:00
Michael Meeks
d4fac516c2 targetted revert of small prefix operator changes
Change-Id: I02e9af0034f4e9ed626615083c7c1506597f2a7e
2012-05-31 13:09:04 +01:00
Caolán McNamara
8201c8a5f6 don't overload operator-> and just forward specific methods, take two
Change-Id: If66b0a5f1b0444d8f0a6dfed1b518a0033d61d2e
2012-05-30 15:40:50 +02:00
Miklos Vajna
b5f6698e15 Use RTFSprms::set() in RTFDocumentImpl everywhere
Change-Id: Iaf52206aad2f1053d54025b0e71eff1b229e1372
2012-05-30 15:27:32 +02:00
Miklos Vajna
a5328cf560 fdo#49968 speed up RTF import of repeated character/paragraph properties
Most RTF documents (produced by Word/Writer) reset character and
paragraph properties at the start of each paragraph. Because of this,
appending properties of the same type didn't cause any noticable
performance problems. However, it's valid to not reset these properties,
and in this case a longer document takes forever to import.

Filter these duplicates at the tokenizer level for trivial properties to
get acceptable import speed.

Also fixes rhbz#825548 in an easier-to-backport way.

Change-Id: Id0b7289323d45ff0d747c74bb78d8eb7def0cfc2
2012-05-30 15:27:26 +02:00
Miklos Vajna
f29892d974 rtftok: undo tryToSafelyUpdateAnExistingProp, will be back soon
Change-Id: I171dac32f8a938dc4ecfbab13835823f65ee2611
2012-05-30 15:27:19 +02:00
Caolán McNamara
651d045cdd Resolves: rhbz#825548 some rtf documents take vast amounts of time to load
rtf documents with vast sequences of replicated properties without any pard
resets to defaults create huge vectors of properties that eat time and memory

So if we are adding a property which already exists and there are no
intermediate properties which would cause side effects to the property then
update the existing one instead

Only implemented this optimization for some selected character properties

This takes my load time down to 7 seconds from effectively some "infinite"
hour+ load time.

Change-Id: I520779233180f4d9faf9fb0989d546e08fc6cabd
2012-05-30 13:16:27 +01:00
Caolán McNamara
48e74fb6d3 don't overload operator-> and just forward specific methods
Change-Id: I22f5f4a17f2eef0d04756ff4c8e614da073248ca
2012-05-30 13:16:27 +01:00
Miklos Vajna
9486851bae n#760764 dmapper: don't ignore character properties of text fields
Change-Id: If1497d78b8c31a4b2e5677bb57f40a0343a819a9
2012-05-29 19:30:24 +02:00
Miklos Vajna
028d56943c writerfilter: read dgm:relIds element and its attributes 2012-05-29 09:11:51 +02:00
David Tardon
824270f182 implement operator= too
Change-Id: I5d5b5562a130ac5ba46afa3273cf65e7bbed2c13
2012-05-29 07:37:25 +02:00
Takeshi Abe
3ac9b7af76 removed dead code
Change-Id: Ic70d66befc90450aeb276d53f6da7e81aef85478
2012-05-29 00:11:30 +09:00
Luboš Luňák
d4798414f2 handle column break in .docx properly too
related to d8cac25ed29dbeca16161f62173a7e341793b8b6

Change-Id: I56b02a450e96acec0346d6a36c29ad8e0326b0c8
2012-05-24 17:59:44 +02:00
David Tardon
f6fff52b7b add missing initializations
Change-Id: I872987e02c1685810f6c2c71956c60e5f13b2706
2012-05-24 07:22:03 +02:00
Luboš Luňák
476316bfc9 do reuse shape context
This is pretty much a revert of 60cb70b945.
Turns out e.g. <v:shapetype> is not local only to its <w:pict>.
Added a testcase.

Change-Id: Ibbb9fe01bc2fc77dd67151bf4ca0905443eebf63
2012-05-22 17:27:43 +02:00
Luboš Luňák
e1ff97ab62 remove number of -I directives in writerfilter
Windows length path limitations strike again, and this should reduce the total
argument length.

Change-Id: I76fefabc8201e51494a7003d7ca4f9fd92ffa3b9
2012-05-22 08:53:36 +02:00
Julien Nabet
c53812a1b7 Some cppcheck cleaning
Change-Id: Ic30cdeffabec1eb1a6c153ac450a3d28064ef534
2012-05-20 15:25:37 +02:00
Michael Stahl
76cec6c3fd work around spurious signed overflow warnings
g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5:
/com/sun/star/uno/Sequence.hxx:178:10: error: assuming signed overflow
does not occur when assuming that (X - c) > X is always false
[-Werror=strict-overflow]
2012-05-18 16:33:19 +02:00
Luboš Luňák
f73e75e91c handle recursive <w:p> because of shapes (bnc#751077)
<w:p><w:pict>...<w:txbxContent><w:p><w:p/> - in this case, the inner
paragraphs should not interfere with the outer one, but e.g.
detecting whether it was the last paragraph in section could get
broken.

Change-Id: I8634ee6a0d6274f5770423ff798adfa260a33326
2012-05-18 14:31:31 +02:00
Tor Lillqvist
1230e36180 Merge the libraries in writerfilter
Change-Id: If77543855fe34f70d248fe8a4644d293f693f190
2012-05-18 14:32:59 +03:00
Takeshi Abe
b2022330c0 removed unused constant rtl::OUString
Change-Id: I173275e0f8faa852500d108f65636080f79636c6
2012-05-16 23:28:22 +09:00
Luboš Luňák
60cb70b945 do not reuse shape context (part of bnc#705956)
As far as I can say, this reusing is just an optimization, but
it breaks e.g. with <w:pict><v:group><w:pict>... , where
using the same context for two shapes breaks things, e.g.
oox::vml::ShapeContainer::getFirstShape() does not work right.

Change-Id: I90bb85b4d320e1bb0727401879b0551abbac5f12
2012-05-15 15:13:28 +02:00
Miklos Vajna
50cb166702 fdo#49940 dmapper: handle m_bTitlePage when m_nBreakType is zero
We used to ignore m_bTitlePage in this case, resulting in wrong
'Default' page style for the first page, instead of 'First Page'.

Change-Id: I1899354fb39db4f0eb663fd5233395f2d4a5e72a
2012-05-15 09:02:15 +02:00
David Tardon
a360d59015 hide progress bar even if loading failed
Change-Id: Ia330e70e393309dbbad025fc2ede8f4ab41a674c
2012-05-14 15:02:03 +02:00