Commit Graph

7251 Commits

Author SHA1 Message Date
Stephan Bergmann
b388b9fc48 Some more loplugin:cstylecast: xmloff
Change-Id: I45cb9467c618eed929c84656a26293c8d6087378
2015-01-20 09:06:54 +01:00
Michael Weghorn
bfe79b50bc fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: If7ad3584b3124ed0b337836071af1a5bd0451d85
Reviewed-on: https://gerrit.libreoffice.org/13972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19 08:39:32 +00:00
Caolán McNamara
5e6a4591d3 LeakSanitizer: leak detected in ooo56669-1.odt
Change-Id: Ifdd98068762762316dbfd50fb465ed3c970f53d9
2015-01-11 20:35:03 +00:00
Michael Stahl
2f69e16c72 override the overloading of "overload" to decrease cognitive (over-)load
Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796
2015-01-09 00:00:47 +01:00
David Tardon
5672dab6b5 Revert "Don't assume that the ZOrder property of shapes is an enumeration"
This reverts commit 66c7dbbf7d.

See https://gerrit.libreoffice.org/#/c/13554/ .

Conflicts:
	include/xmloff/shapeexport.hxx
	reportdesign/source/filter/xml/xmlExport.cxx
	sc/source/filter/xml/xmlexprt.cxx
	xmloff/source/draw/shapeexport.cxx

Change-Id: I14fed9ad043a756a9e2d390c76fa907c349c3a2e
2015-01-08 16:08:11 +01:00
David Tardon
f86a1dbf2a fdo#78921 save embedded fonts in Flat ODF
Change-Id: I9d8614a5c20bab8e3b3d7c40e2504348c4386b64
2015-01-06 16:12:29 +01:00
Noel Grandin
64cccf36f2 fdo#84938: convert SEF_EXPORT_ #defines to 'enum class'
Change-Id: I7165d0f1b6b4af4de5e5b39a21f36d726a1b0e30
2015-01-06 10:59:42 +02:00
Noel Grandin
8447eeb192 fdo#84938: convert ERROR_ #defines to 'enum class'
Change-Id: Ie76bac6b91a9faa4f9ff7dbdf2b455ea9016cf72
2015-01-06 10:59:42 +02:00
Noel Grandin
c29657e0d6 fdo#84938: convert EXPORT_ #defines to 'enum class'
Change-Id: I2ed239fa073b5fa8fb56c1af9d4b0bac89acfacf
2015-01-06 10:59:42 +02:00
Noel Grandin
ec5bf66d36 fdo#84938: convert XML_EXPORT_FLAG_ to 'enum class'
Change-Id: I43d778e0eee19a56ea37898ec1c4309d3407775e
2015-01-06 10:59:41 +02:00
Noel Grandin
dc28e90d20 fdo#84938: convert IMPORT_ constants to 'enum class'
Change-Id: Idaa8f07c62b3ba93c27ca5fe286720254baac10d
2015-01-06 10:59:41 +02:00
Noel Grandin
d1ce6effb6 fdo#84938: convert TEXT_PROP_MAP #defines to 'enum class'
Change-Id: Ia8c5913c60e3d509a906965d813c8d1380396dc6
2015-01-06 10:59:40 +02:00
David Tardon
2862ef7e65 export format of embedded font too
Change-Id: Ife7dbb298861a71987501f3847d3b931c7e83715
2015-01-05 18:59:08 +01:00
David Tardon
0a04968589 read embedded fonts from Flat ODF
Change-Id: Ic94608f4afac9d8ac05ec3140d195b0526e9420a
2015-01-05 18:59:08 +01:00
Andrea Gelmini
3a2b1af87d Fix simple typos.
Change-Id: I1fdbe47ed7a6e05d2cf20f4c296bffad4bbc6599
Reviewed-on: https://gerrit.libreoffice.org/13719
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-01-02 20:23:51 +00:00
Caolán McNamara
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
Andras Timar
4cd048d98f Revert "Resolves: #i124452# correct svg:viewBox for EnhancedCustomShape..."
This reverts commit c6e316f520.
The bug #i124452# was in AOO only, no need to fix it in LibreOffice.
Especially when the "fix" causes regression. The related fdo#76334
should be fixed one day, but that is a different issue.

Conflicts:
	xmloff/source/draw/ximpcustomshape.cxx

Change-Id: Ice0bf378f97e2caf0ee8386d0b5c0b8abcbcd1c2
2014-12-28 17:04:47 +01:00
Miklos Vajna
62391c28fa fdo#84714 ODT import: read <loext:table> inside <draw:custom-shape>
A later version of ODF will hopefully allow <table:table> here as well,
but read <loext:table> in the meantime.

Change-Id: I42a461e0a6e9eff9387379acbab9660a155ecefe
2014-12-27 12:13:50 +01:00
Lionel Elie Mamane
aeeff83595 fix build
Change-Id: Ia528bd301e2f2ee1f7f3b009e3b9c3f395a4dcdb
2014-12-20 00:20:58 +01:00
Lionel Elie Mamane
c2cca8439d correct function name in debug message
Change-Id: I9c02fdd99504bdee6654d1072559a4afac6532a3
2014-12-19 23:35:18 +01:00
Lionel Elie Mamane
be2aa71a2c survive "TextBox" having no value
Change-Id: Iebed41cfcc5899387e3defb8d8a0792276349098
2014-12-19 23:35:17 +01:00
Lionel Elie Mamane
66c7dbbf7d Don't assume that the ZOrder property of shapes is an enumeration
...at least when we can easily not assume it.

shapes = shapes of the same XShapes
an enumeration = it is the sequence 0, 1, 2, 3, ..., XShapes->getCount()-1

We replace the ZOrder property by the index of the XShape in the
XShapes (the same XShapes that is passed to seekShapes()... when that
is easy to find. Else, use ZOrder and hope for the best.

ZOrders are not always an enumeration. For example, in documents
(forms) created by the Base forms wizard, it is not the case.

The wrong assumptions was leading to the following bugs in the Base
form wizard:

 - Only the first two controls in the form were successfully saved. The
   others were just dropped.

 - Whereas the labels had the proper style (background and text
   colour) applied while creating the document, these were not saved
   successfully

Change-Id: I15b9a3ef3b16eafa9698332e35d82d51d51627f8
2014-12-19 23:33:33 +01:00
Lionel Elie Mamane
1cdb723b27 teach XML import/export about unsigned integer types
resolves a shitload of warnings like

warn:legacy.osl:941:1:xmloff/source/forms/elementimport.cxx:426: OElementImport::implImportGenericProperties: unsupported value type!
warn:legacy.osl:941:1:xmloff/source/forms/elementimport.cxx:443: OElementImport::EndElement: could not set the property "ObjIDinMSO"!
warn:legacy.osl:941:1:xmloff/source/forms/elementimport.cxx:444: caught an exception!
in function:void xmloff::OElementImport::implApplyGenericProperties()
type: com.sun.star.lang.IllegalArgumentException

Change-Id: Ia598d12e7d9429fe4ad3b1e7173e11e75060a613
2014-12-19 23:33:32 +01:00
Lionel Elie Mamane
3d4e1beacb two references having same content
Change-Id: I2db8842411e39d7d100d0627f8c930bb3f633d77
2014-12-19 23:33:31 +01:00
Lionel Elie Mamane
f0471ea755 this is purely informative, SAL_WARN is overkill
Change-Id: Iccb98e50a678e5c53b69fb1052e3dac83cdcf5f5
2014-12-19 23:33:30 +01:00
Stephan Bergmann
05575c31e1 xmloff: Use appropriate OUString functions on string constants
Change-Id: I349e0c2575d9a5154ac7002d129a1851a3df7687
2014-12-18 14:12:39 +01:00
Stephan Bergmann
0f5e917024 Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API
(instead of having to go via an intermediary OUString ctor call).  Especially
useful for character literals that are defined as const variables or via macros
("direct" uses of character literals in the OUString API can often simply be
replaced with single-character string literals, for improved readability).

(The functions overloaded for OUStringLiteral1 are those that are actually used
by the existing LO code; more could potentially be added.  The asymmetry in the
operator ==/!= parameter types is by design, though---writing code like

  'x' == s

is an abomination that shall not be abetted.)

Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
2014-12-17 16:39:33 +01:00
Stephan Bergmann
513108bd57 xmloff: Use appropriate OUString functions on string constants
Change-Id: Idbe6ac27a4125bd9d9acb01ac42b60396abf0c81
2014-12-12 12:25:35 +01:00
Michael Stahl
06f85d41d0 xmloff: make the export of the horrible field marks aware of auto-styles
When exporting the .DOC bugdoc of fdo#87110 to ODF, the auto-styles
export will iterate over the fieldmarks in the page header and add the
attributes for them but not export the elements, so the first auto-style
gets a bunch of duplicate attributes.

Change-Id: I3fcf39f03e3d9ae5fca661efa7eb4bbb3eab9f5c
2014-12-10 16:22:32 +01:00
Michael Stahl
b86f553016 fdo#87110: xmloff: don't catch IllegalArgumentException here
There are at least 2 callers of InsertTextContent() that have
non-trivial catch handlers for this exception, which aren't called now.

(regression from bebf8ccfba)

Change-Id: I085b710dfd5877e9b7e71610951543eddf6a6e46
2014-12-10 16:21:09 +01:00
Caolán McNamara
bfd63516c9 Resolves: fdo#87108 crash on saving fodg
Change-Id: Ib88f0e9b0a3ba229c9e9f6cf20831c16051e3e29
2014-12-09 09:51:32 +00:00
Noel Grandin
2979ff295c fdo#38835 strip out OUString globals
Change-Id: I1a435214af102461e02217f7d95248dac14e5f1a
2014-12-08 14:13:17 +02:00
Markus Mohrhard
a4e4cdcdd7 export to extension namespace instead of odf namespace
Change-Id: Ica66112199d6f81d1e8ddf8d78ddde49a3ea6037
2014-12-07 03:06:45 +01:00
Markus Mohrhard
06344c91db remove invalid attribute that is not read anyway
Change-Id: Id7770ffda49ba7bc0ebc780c67c56b81152213f7
2014-12-07 01:13:52 +01:00
Markus Mohrhard
8e417a8fed use correct xml element name, related fdo#45266
Below data-pilot-groups the correct element name is
data-pilot-group-member and not data-pilot-member.

Change-Id: I41aecb7f85a881d13b3eaaa7be8de737b47ea312
2014-12-07 01:13:52 +01:00
Markus Mohrhard
88d3931d92 don't write extension elements into ODF namespaces, related fdo#45266
We will still import the old elements but only write them into the
lo-ext namespace. Also it will only be exported for ODF 1.2 extended.

Change-Id: I1c41716b8b16e186ec84767b4b3a636d083162b8
2014-12-07 01:13:52 +01:00
Markus Mohrhard
a2df86642d last inconsitently named data table value
Change-Id: I1a558616156f5217e309c5957967a69d81c20b8e
2014-12-07 01:13:51 +01:00
Markus Mohrhard
6c238230d4 more fixes for inconsistent naming
Change-Id: Iedb1b30d4e3905f884bc3bb39d4703a883e95c46
2014-12-07 01:13:51 +01:00
Markus Mohrhard
f04802e04c use a consistent naming scheme
Change-Id: Ia420779fd875cb2a81b90871b26940f8a0258b4d
2014-12-07 01:13:51 +01:00
Markus Mohrhard
95d27f465f the xlink:type attribute is mandatory, related fdo#79449
Change-Id: I03c4217f786bc10aa915780dc10ea52d94019b6e
2014-12-06 08:21:50 +01:00
Michael Stahl
5831405c8c xmloff: remove pointless branch that does the same as the next one
Change-Id: Ib39ec9c045461590767a29ccdd28f39b2a623e88
2014-12-05 18:17:42 +01:00
Michael Stahl
25fd11e782 fdo#86795: xmloff: ODF import: do not import checkbox fieldmark ...
... if it has start/end, because Writer will become grumpy and crash.

Change-Id: I6024051249eeac6ed9e43856fa77db969287f888
2014-12-05 18:17:42 +01:00
Michael Stahl
7a242b4631 fdo#85496: add some asserts to detect this sort of problem
Change-Id: Iff787c8d2a71bc3082192cc98e3d916badee65dd
2014-12-01 23:12:56 +01:00
Michael Stahl
4368e05040 xmloff: avoid assertion because AutoCorrect document doesn't ...
... have a proper outline numbering rule.

Change-Id: I7f73176fae6d181ec398c81daf492f4de08e0ae8
2014-11-28 15:48:18 +01:00
Caolán McNamara
751e5b32c5 Resolves: fdo#84043 don't create duplicate Mirrored[X|Y] properties
regression from 13ef16423e

commit 13ef16423e
Author: Armin Le Grand <alg@apache.org>
Date:   Wed Nov 21 13:23:01 2012 +0000

    For backward compatibility take mirrorings in setTransformation into account

    Also found an error in SdrObjCustomShape::TRGetBaseGeometry when MirrorY was used

    (cherry picked from commit 4116c33b12d3787c406f0348f89efcb1cf409507)

Change-Id: I7bfb5dea32b8ab8498e3d92975c49b830c81e6fb
2014-11-27 11:33:09 +00:00
Stephan Bergmann
e97edb6e85 simplify
Change-Id: I6cb7c66a8dbac1a887d4f218f5de9d73310c809b
2014-11-26 22:21:22 +01:00
Kohei Yoshida
5c3f47e44c Remove ptr_vector header include in favor of forward declaration.
Change-Id: I0aed7ec1bd8ac30ef18147b385c8649a413e4e3a
2014-11-25 18:55:15 -05:00
Michael Stahl
501ae485c7 xmloff: clean up some debug printfs
Change-Id: I208bbe47d1134b6a362e50d54093e6d35e85f51b
2014-11-25 18:09:38 +01:00
Michael Stahl
1eb6e22989 xmloff: replace DBG_ASSERTs in txtlists.cxx
Change-Id: I0b7ab0ed27ba23f9ad924819193dd30c70e48fed
2014-11-25 18:09:37 +01:00
Michael Stahl
c0ab2172fc xmloff: replace DBG_ASSERTs in txtimppr.cxx
Also tweak some of the assertions so they don't fire for character
borders.

Change-Id: Id63631864ab3e5f0366a514adc1ff73f01f57a84
2014-11-25 18:09:37 +01:00