summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-15Fix fdo#64512 Handle xml:id correctly on multi-image draw:framesThorsten Behrens3-80/+44
Fixes a regression from the pick-best-image from draw:frame in ODF, where before sometimes the XShape got deleted that the UnoInterfaceToUniqueIdentifierMapper::registerReference stored. For that, added a UnoInterfaceToUniqueIdentifierMapper::registerReferenceAlways function, which overwrites potentially existing earlier entries with the same identifier string. This fix was originally much more messy, but then dtardon committed 30b248dfe5bfb8a0649e36f22c943b3feb2f1385 which also fixes this here bug. Now only sneaking in slightly less involved interface map handling and a safeguard in ximpshap.cxx. Change-Id: I87501e43518a5fc2fee166c45a4e2f01718f5228
2013-05-15Remove redundant doxygen doc strings.Thorsten Behrens1-16/+0
This is already (identically) documented in the header file. Change-Id: I4a10cb0c1d1b1eee80fd828ab95829fb8128433f
2013-05-15Use upper camel case for class names in xmloff.Thorsten Behrens6-11/+11
Align multiimagehelper with module standard. Change-Id: I70a4dbc66a0d127b9bf04d1e8db694d3526b21d7
2013-05-15fdo#60075 open drawings with connector attached to SVGDavid Tardon5-10/+99
This problem arises when there is a connector attached to draw:frame element with multiple draw:image elements in it. The import code expects that they are different representations of the same image (I have not found if this is specified in ODF), so it only selects the most "suitable" for import. To do that, it imports them all and then removes all but the selected one. The image import context, SdXMLGraphicObjectShapeContext, shares the parent frame's attributes, which means that all the images in a frame have got the same ID. in SdXMLGraphicObjectShapeContext::AddShape, the created css::draw::XShape is registered with its ID... That means that anything that refers to the frame's ID, like a draw:connector, will always get the _first_ image in the frame. Solution is to extend comphelper::UnoInterfaceToUniqueIdentifierMapper to allow reserving an identifier and setting an interface for it later. That way, SdXMLFrameShapeContext can reserve its own ID before it starts importing the first draw:image, and then set the selected XShape at the end. Change-Id: I2e11cfd38e1e3534df2b3c01d85da0d755a266c3
2013-05-07fdo#48056 treat report chart as draw chartLionel Elie Mamane1-1/+2
Change-Id: I0a716b4339747f1994e5c8710e15474807aea4a2 Reviewed-on: https://gerrit.libreoffice.org/3767 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-05-01Merge tag 'libreoffice-4.0.3.2' into suse-4.0Petr Mladek7-1/+117
Tag libreoffice-4.0.3.2 Conflicts: basic/qa/cppunit/test_vba.cxx basic/source/runtime/step2.cxx dictionaries helpcontent2 instsetoo_native/util/openoffice.lst libvisio/UnpackedTarball_visio.mk sc/source/ui/vba/vbaapplication.cxx sc/source/ui/vba/vbavalidation.cxx solenv/inc/minor.mk sw/qa/extras/ooxmlimport/ooxmlimport.cxx translations Change-Id: Ic1f06489175f3db92d6bbcebb9732fadc1c61fed
2013-04-30Fix fdo#64062 - can't assume para styles to be there.Thorsten Behrens1-1/+1
Change-Id: I5da53ff44fdf00ec6c0fdf1a722f806971b6683a
2013-04-25xmloff::token::GetXMLToken: only execute the check onceMichael Stahl1-10/+16
Tor says this check eats many CPU cycles, and the checked array is static, so checking it just once is sufficient. Change-Id: Ic8f85ebe940e4cf2c258cc778a8fd14512bdef94
2013-04-25xmloff::token::GetXMLToken: deploy assert in consistency checkMichael Stahl1-2/+2
There will be serious problems if that is inconsistent. Change-Id: I41b8de66132224fb5cd2a6dcb7ff3128eb704016
2013-04-10fdo#39066: using UNO_QUERY instead of UNO_QUERY_THROW displays hyperlinksChr. Rossmanith1-1/+1
Change-Id: Iafa9e273c009fe0772a9401b47b51738dc235a13 Reviewed-on: https://gerrit.libreoffice.org/3296 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7bcba4c910fa7eecf256a05a1f274f7b253e5fc5) Reviewed-on: https://gerrit.libreoffice.org/3303 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2013-04-05export darken/darkeless/lighten/lightenless commandsRadek Doulik2-0/+52
Change-Id: I4531ab82a52e3da41f12409185f7c0730381aa23
2013-04-05export subpath sizes (these are for example in pptx custom shape presets)Radek Doulik6-0/+64
Change-Id: Iab21d0845d0cb6e4dadeffb5f7b9ebab1e4b955a
2013-03-29Revert "hacky fix for export of cell anchored flipped custom shapes (fdo#62448)"Luboš Luňák1-1/+1
This fails on at least two tinderboxes. This reverts commit 2058479575e4a3e003eb1917c4f0947db9145623.
2013-03-28hacky fix for export of cell anchored flipped custom shapes (fdo#62448)Noel Power1-1/+1
On export it is assumed the translate co-ords are the same as the topleft of the logical rectangle. What rectangle to use at any given time, the transformations and the fact that different object types seems to handle rotation etc. in their own way leaves me confused as to what the correct fix might be. This fix though won't make things worse ( afaict ) Change-Id: I6c704f9aebd650d530ebc32fbe73c251719494fe Reviewed-on: https://gerrit.libreoffice.org/3064 Tested-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.cz>
2013-03-25we need to register data sequences during import, fdo#52159Markus Mohrhard3-9/+17
Change-Id: I203be719a6ee19c87ed232218f7700d875c2871f (cherry picked from commit 094bab7f9097fba62800d3dd578bd42640d8c6e2) Reviewed-on: https://gerrit.libreoffice.org/2821 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit bdfaf33419a9720d2afb48238a110a3cf8238aec) Reviewed-on: https://gerrit.libreoffice.org/2985 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
2013-03-25use the right range representation, fdo#52159Markus Mohrhard1-2/+2
Change-Id: I36ede89ccb8836708a4f87c4815bbe2fb6d6f3cf (cherry picked from commit a6d12acda9bb24f2acca45e0bd1aea577e49fbbf) Reviewed-on: https://gerrit.libreoffice.org/2818 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit 4bdfeabe6e65f865d5cec16b31cda524eb8b9b90) Reviewed-on: https://gerrit.libreoffice.org/2982 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
2013-03-22fdo#60769 implement odf export of multi-paragraph comment rangesMiklos Vajna1-8/+12
(cherry picked from commits 287c254d5ebf9b58ca63a8c271e523adf0d34b82 and 1fba17854b2be4fdbe436f44da3ae57a1f75a27c) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Reviewed-on: https://gerrit.libreoffice.org/2873 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com> (cherry picked from commit 473cd59a71706ada01f8be68c7dfd008ca9bb716) Change-Id: Ic4a5a1bc685917f2b26be4ab645203f706719c80 Reviewed-on: https://gerrit.libreoffice.org/2908 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
2013-03-20fdo#60769 implement odf export of multi-paragraph comment rangesMiklos Vajna1-8/+12
(cherry picked from commits 287c254d5ebf9b58ca63a8c271e523adf0d34b82 and 1fba17854b2be4fdbe436f44da3ae57a1f75a27c) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: Ifb850438586eb6589fde79d10ed9eef727368f42 Reviewed-on: https://gerrit.libreoffice.org/2873 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2013-03-19we need to register data sequences during import, fdo#52159Markus Mohrhard3-9/+17
Change-Id: I203be719a6ee19c87ed232218f7700d875c2871f (cherry picked from commit 094bab7f9097fba62800d3dd578bd42640d8c6e2) Reviewed-on: https://gerrit.libreoffice.org/2821 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-19use the right range representation, fdo#52159Markus Mohrhard1-2/+2
Change-Id: I36ede89ccb8836708a4f87c4815bbe2fb6d6f3cf (cherry picked from commit a6d12acda9bb24f2acca45e0bd1aea577e49fbbf) Reviewed-on: https://gerrit.libreoffice.org/2818 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-18fdo#61256 - the Get.*Export methods also create and register stylesMichael Meeks2-0/+4
unwind problem introduced by cleanup in: fd226710fef768543a3ad0fe5081f79dc875dcf3 Change-Id: Id5f7b20087cbbdeffe1a2e64e039ee0a11995faa Reviewed-on: https://gerrit.libreoffice.org/2815 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
2013-03-18fdo#61256 - the Get.*Export methods also create and register stylesMichael Meeks2-0/+4
unwind problem introduced by cleanup in: fd226710fef768543a3ad0fe5081f79dc875dcf3 Change-Id: Id5f7b20087cbbdeffe1a2e64e039ee0a11995faa Reviewed-on: https://gerrit.libreoffice.org/2814 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-03-06another fix for error bar import, related fdo#60083Markus Mohrhard1-0/+7
Change-Id: I843a597702cb0cb66d8696c277666e1605091c09 Reviewed-on: https://gerrit.libreoffice.org/2560 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-03-06and one more fix for error bar import, related fdo#60083Markus Mohrhard1-0/+8
Change-Id: I76ff4849137aaad175b3c95dce6644d612871201 Reviewed-on: https://gerrit.libreoffice.org/2559 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-02-27one more fix for error bar import, fdo#60083Markus Mohrhard1-5/+17
This makes it finally possible to import the original test document. Change-Id: I5941f2ce303a28674dcf04aeabbbbc2d178c0913 Reviewed-on: https://gerrit.libreoffice.org/2434 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
2013-02-26get error bar import working again, fdo#60083Markus Mohrhard1-53/+88
Change-Id: I8022fbfc8d372c9863d236253a2a63364198bfc8 Reviewed-on: https://gerrit.libreoffice.org/2415 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-02-26fdo#52948 fix print-repeated-values=no with formatted valuesLionel Elie Mamane2-2/+2
Factorise the "should this element be printed" decision into an utility function, which is used by 1) AbstractReportElementLayoutController (in charge of non-formatted values: string, image, OLE object, ...) which already obeyed PrintRepeatedValues. 2) TableCellLayoutController (in charge of formatted values: dates, numbers, ...) which blissfully ignored PrintRepeatedValues, but obeyed the display condition. Rename the inconsistently named PrintWhenGroupChange PrintWhenGroupChanges print-only-when-group-change print-when-group-change to PrintWhenGroupChange / print-when-group-change Change the meaning of "PrintWhenGroupChange" to "override PrintRepeatedValues in first occurrence in group". Since this feature never worked under the old semantics, no loss of feature. Since we change the XML attribute name, no ascending compatibility problem: it will be reset to its default value. Pursuant to the new meaning of PrintWhenGroupChange, change its default to *true*, which is the sane default. Change-Id: Idbe8e90565a354f70db222d047b3d51eeddbbb9f Reviewed-on: https://gerrit.libreoffice.org/2255 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-02-08Resolves: fdo#60132 Error reading file after inserting commentCaolán McNamara1-0/+5
Change-Id: Ib2b388c78c8f44a626267c2f8d3975b46ead3bd5 (cherry picked from commit 165a53f3a7f08e65055e08ecd4cfc068c5d353b8) Reviewed-on: https://gerrit.libreoffice.org/2041 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2013-01-24fdo#58562: Ensure internal data is always used when pasting to another doc.Kohei Yoshida1-5/+25
Without this, pasting a chart object from one Calc doc to another may occasionally incorrectly switch to range references *if* the destination document contains the "right" set of sheet names. With this fix, pasted chart objects always switch to internal cached data source when pasting to another document, while retaining range references when pasting within the same document. Change-Id: If1dbc854c5faae62f06ece155fad470b229ca0c7 Reviewed-on: https://gerrit.libreoffice.org/1835 Tested-by: Noel Power <noel.power@suse.com> Reviewed-by: Noel Power <noel.power@suse.com>
2013-01-21xmloff: refactor Generator version handling:Michael Stahl4-30/+97
Since there are now 2 forks of OpenOffice.org, we cannot rely on a simple total ordering of versions any more; add a new function SvXMLImport::isGeneratorVersionOlderThan(), taking 2 reference versions. Also extract the LibreOffice version number from the generator string, and extend the BuildId property to store this as a third number. This also allows removal of the "fake LibreOffice3 as OpenOffice.org 3.3 release" hack, which is not future-proof. (cherry picked from commit bea63709d05514555d5283279cd66439f4ceed73) Conflicts: xmloff/source/core/xmlimp.cxx Change-Id: I44d8105eb537ac43fb9529a8b1b661ae0f2bba30 Reviewed-on: https://gerrit.libreoffice.org/1761 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
2013-01-21fdo#59517: fix detection of ancient OOo ODF generator strings:Michael Stahl1-4/+5
SvXMLMetaDocumentContext::setBuildId: check only the prefix of the generator string, not all of it. (regression from 17ff7b41d15ab9928e2e2706faa26234a09802cd) Change-Id: I0cdd958d67cd13fd2368cc6958893ce3528a9e94 (cherry picked from commit 0669d78ea76ab9bfeff27ea02d785973f3720d6b) Reviewed-on: https://gerrit.libreoffice.org/1760 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-18Resolves: fdo#58730 workaround [UL|LR]Space 100% problemCaolán McNamara2-1/+30
If all paragraph margins are 100% on import, ignore that as being the implicit default. That avoids explicit 100% being set onto the awesome [UL|LR]Space which takes a relative propsize of 100% as a flag that its value field is absolute and so rejected by SwTxtFmtColl::Modify as a candidate for getting its true value initialized relative to its parent, so it ends up as an absolute 0 Always elide the property on export because writing individual margin-foos provides better backward compatibility with older versions anyway. Trigged by 3c5facfce42a0dbe362d6b9fa5ac374fd76f51a1 Change-Id: I55f6ceeae287b7d8e99befa4bd3cc06738a21299 (cherry picked from commit 23c099a0236062724430efb986251637095c8d4f) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2013-01-03limit the number of imported digits, fdo#58539Markus Mohrhard1-1/+3
This should fix the crash with gnome#627420. Change-Id: Ibfff498282dc1c6fe9124ced645392107ef8829f
2012-12-26text:p is not allowed for chart objects, fdo#58571Markus Mohrhard1-2/+6
Change-Id: I24c485d31ea3f0540164ff65074b392be1e557e6
2012-12-13added some FIXME-BCP47 markersEike Rathke1-0/+6
Change-Id: I085ca72b6c2dc1e73f4af7233017895bf92b2ef8 (cherry picked from commit 34b7826f9814b09dcd6aba15552bef1c330f3db2)
2012-12-06OUStringBuffer::remove( int ) -> truncate( int )Luboš Luňák1-1/+1
Although this may seem consistent with remove( int, int ), it is in fact rather misleading API. The biggest offender is most probably buffer.remove( 'a' ) , which definitely does not do what it suggests to do. Change-Id: I287619cd4b953228b93fa68fb381d66c344c3865 Reviewed-on: https://gerrit.libreoffice.org/1256 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-12-03API CHANGE: roll back the XStyle changes to add a new Hidden property on StyleCédric Bosdonnat7-9/+38
Change-Id: If6d23925567fb184cd8fc4e00fc72fe4d216e756
2012-11-30Hidden styles: ODF import/exportCédric Bosdonnat10-6/+28
Change-Id: I1138314eba33dc8cf8d1f60e77ac419b4550bbcc
2012-11-28OUString::trim() does not modify in-placeTor Lillqvist1-2/+2
Change-Id: I68227dcf77b9082708503d2c0d9bf829d78a442e
2012-11-28OUString::trim() does not modify in-placeTor Lillqvist1-1/+1
Change-Id: I9efc0ef7e8fa433352dcbc3d3173b95fdf838e20
2012-11-28We only support MSVC 2008 (_MSC_VER 1500) or laterTor Lillqvist1-4/+0
We can drop or simplify many conditionals. Change-Id: I37e820e515cc09845c30b62c89ddb3b6ff370f97
2012-11-27String and OUString cleaning in xmloffNorbert Thiebaud10-385/+370
Change-Id: I85d7fd7733814c60a048a7f87d43fbcbb83b0eb0
2012-11-27migrate user of InsertBlanks to OUStringNorbert Thiebaud1-3/+6
Change-Id: Idc7379daf25a226622e5599124df2ab68b98902a
2012-11-23some i18n wrappers with LanguageTagEike Rathke2-16/+16
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
2012-11-18svl: OUString conversion of most of zforscanNorbert Thiebaud2-4/+4
Change-Id: I02ca7f7770e2d53371e7c597c087c4a370ce8d3f
2012-11-18xmloff: simplify the use of AddToCodeNorbert Thiebaud2-13/+24
most use of that API is to add a single sal_Unicode, it is silly to manufacture a full OUString just to pass that via AddToCode to then append it to a OUStringBuffer adding AddToCode(sal_Unicode c) to simplify these case also remove a silly iteration over a OUString's character to re-add each character one by one via AddToCode() Change-Id: Ia8a58551a1c24312baaa250b8d36fe21c46127e7
2012-11-18xmloff: convert lcl_FindSymbol to OUStringNorbert Thiebaud1-12/+21
Change-Id: I6d93cb64126d60c35fda58039989d57b18a44773
2012-11-18svl: convert GetQuoteEnd to OUStringNorbert Thiebaud1-2/+2
Change-Id: I79bd0aecb98b7b47ee892ed4ce1b53abcd09ff44
2012-11-16use LanguageTagEike Rathke2-13/+14
Change-Id: I568af42912ce1ec7701dc0043dfbd9d69243d533
2012-11-15WaE: 'const' type qualifier on return type has no effectTor Lillqvist1-2/+2
Change-Id: I06cc8b77e49ec2a22534e1f45d93dfa0d0a0689f