summaryrefslogtreecommitdiff
path: root/svgio
AgeCommit message (Collapse)Author
2016-02-25tdf#97936: SVGIO: Add unittestXisco Fauli
Change-Id: I7adb55dc408811f03365578f815bf1b7fbe7f2fd Reviewed-on: https://gerrit.libreoffice.org/22679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-25Partially revert b6a62f07557fe4ae0931e0f3e0f306d2f69b116bXisco Fauli
it has been fixed by 423b79e7366203db3f57dea75b8cb9eb852b5614 in a better way Change-Id: Ia3192071f00522ac111d3e95e4dc05dc57a6267e Reviewed-on: https://gerrit.libreoffice.org/22677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-21tdf#97538 no cropping if width, height and viewBox missingRegina Henschel
Now the whole image is inserted, so that it can be cropped in the application. The patch repairs in addition a wrong ratio in the case height is missing but viewBox is given, and fixes some comments. Change in SvgImportTest.cxx by Xisco Fauli. Change-Id: I8c0fbf8b78cf7ab5bc97d04783b49892da3d2849 Reviewed-on: https://gerrit.libreoffice.org/22363 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-19new loplugin: find write-only fieldsNoel Grandin
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-19SVGIO: Fix problem when relative font-size depends on its...Xisco Fauli
... parent's font-size Change-Id: I13943923c401a5a06b3aa51181fd75292534e888 Reviewed-on: https://gerrit.libreoffice.org/22452 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-18tdf#97752 SVGIO ignore not matching parent paintsJochen Nitschke
fill attributes can have ONE of 3 kinds of paints: * pain colour fills * gradient fills * pattern fills if element has a fill we should not get fills of an other kind from parent Change-Id: I376a8fea4a7185b037a069a28191b7f37f6788bd Signed-off-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-on: https://gerrit.libreoffice.org/22273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-18SVGIO: tdf#97941: Don't double tspan fontsizeXisco Fauli
Same as in 701324a1e1f7e0c181ff1a50956ced686785ea53 Change-Id: I531bef4821008ef71951506c133f999b9ab4f4ff Reviewed-on: https://gerrit.libreoffice.org/22450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-17SVGIO: tdf#97539: clip-path elements might contain...Xisco Fauli
reference to other clip-paths Change-Id: I0c426c892da2478293b78ea93db087d781275896 Reviewed-on: https://gerrit.libreoffice.org/22411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-13SVGIO: tdf#97659: Add support for RGBAXisco Fauli
Change-Id: Icbf3796cdc95f91d298a5ca52d44931b3985eac6 Reviewed-on: https://gerrit.libreoffice.org/22303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-11SVGIO: tdf#97543: Add import testXisco Fauli
Change-Id: Ia89f43ed1da9ead254f191bcbcc4ac338a9dda7a Reviewed-on: https://gerrit.libreoffice.org/22302 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-11tdf#97542: SVGIO: First check the current fill attributeXisco Fauli
Differenciate when gradient is defined in the text element or in its parents Add unit tests Change-Id: I85b09f72fbb1a3c8d2fa7350b4396b5bf924277f Reviewed-on: https://gerrit.libreoffice.org/22131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-09SVGIO: tdf#79163: Add import testXisco Fauli
Change-Id: I891425f331e9be21c160eb0b11f05dba280bef23 Reviewed-on: https://gerrit.libreoffice.org/22196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09SVGIO: tdf#85770: Add import testXisco Fauli
Change-Id: Ifffe1d461ae6fa30a9cc61df2ece5716078031ab Reviewed-on: https://gerrit.libreoffice.org/22190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09SVGIO: tdf#45771: Add import testXisco Fauli
Change-Id: Ib1b66a3d91374bcf458bb368483f33cd4b8e0f0d Reviewed-on: https://gerrit.libreoffice.org/22189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09SVGIO: Add import test for 7c151f39144b7401a99c7b736a41e5dce4ac4db1Xisco Fauli
Change-Id: I4ab4463dfa2422fd0d8fa1fd65d7765f716c9bc3 Reviewed-on: https://gerrit.libreoffice.org/22188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09SVGIO: Add import test for Fontsize keywordsXisco Fauli
Change-Id: I042a1deeec1c07f73f09ddd2fb71b9d2eba6b8c6 Reviewed-on: https://gerrit.libreoffice.org/22187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-08SVGIO: Return default font size if size value is negativeXisco Fauli
Change-Id: Iec18c6511b57c4e61047055b53589f71dda3d601 Reviewed-on: https://gerrit.libreoffice.org/21972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-07tdf#97543 SVGIO: Rework getVisibility()Xisco Fauli
Change-Id: Idb3eaa27e3e8ec177ebd2bad81f53c4d3da9d241 Reviewed-on: https://gerrit.libreoffice.org/22169 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-05SVGIO: tdf#97383: Keep ratio in embedded images...Armin Le Grand
... when height and width are different SVG specifies embedded graphics to keep their aspect ratio (thanks to Regina for pointing out). To implement this for Office SVG import, I had to correctly set the graphic data unit dimensions to make the existing SvgAspectRatio mapping work. All together this now simplifies this method and packs all in clean linear transformations in the created stack of drwainglayer primitives. Change-Id: Id80c2f74ffb148085085b2c9627bc31bc15bdee5 Reviewed-on: https://gerrit.libreoffice.org/21830 Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-02-01tdf#79163: SVGIO: Fix problem with opacity attributeXisco Fauli
Opacity attribute didn't work because it was always set to 1.0 Change-Id: I3a2029ef23acf9d8c0f346e04341db33c6802b8e Reviewed-on: https://gerrit.libreoffice.org/21911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-01-28SVGIO: tdf#45771: Fix issue when text size is twice its size...Xisco Fauli
... when using relative units (em, ex) This is because for nodes of type textnode, getFontSizeNumber is called from SvgCharacterNode::createSimpleTextPrimitive and from SvgNode::getCurrentFontSize(), so avoid the second call. Change-Id: Ibd418708a572e3c1643164a900fac7e7481afe81 Reviewed-on: https://gerrit.libreoffice.org/21801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-26SVGIO: Fix issue when font size is in percentage and ...Xisco Fauli
... there's no parent style set Sample: <?xml version="1.0" encoding="UTF-8"?> <svg height="600" width="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" font-size="100%"> <text x="5" y="15">Sample 1</text> </svg> Change-Id: Iec88c148475bf8a610286414083e9801faaf8d78 Reviewed-on: https://gerrit.libreoffice.org/21553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-01-22tdf#97275 SVGIO: Change default PPI to 96 in svg import...Xisco Fauli
... thus default font size is 16px from now on. More information: https://gerrit.libreoffice.org/#/c/21542/ Change-Id: If19b5be08d57a9d630647b9ad51a4bb6956c70ed Reviewed-on: https://gerrit.libreoffice.org/21617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-01-21tdf#85770 reuse variable instead of getting it againXisco Fauli
Change-Id: I268fd695e4cfd91dc8aba2b098911dbd9cf02ad7 Reviewed-on: https://gerrit.libreoffice.org/21639 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-01-20SVGIO: Add support to font-size keywordsXisco Fauli
Similar to 0cae9c32ce9884a9809e220ba80b7c4cb4059565 Change-Id: Iac7a6bb30b36e51ea67a6c4f7b3421f480eeea57 Reviewed-on: https://gerrit.libreoffice.org/21542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-01-18tdf#85770 SVG: Don't display text elements if parent's...Xisco Fauli
... visibility is set to hidden Change-Id: I7633b895a3f0a7906c41d19c70e7201b1e420f9d Reviewed-on: https://gerrit.libreoffice.org/21500 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-11tdf#69977: uno::Sequence is expensiveNoel Grandin
when used as a mutable data-structure. Plain std::vector halves the time taken to display the chart dialog Create a class to represent the std::vector we are going to be passing around, and move some of the utility methods into it to make the code prettier. Also create an optimised append(&&) method for the common case of appending small temporaries. Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I0164a67073395b865fa3e3ce342665f6497dc5b8
2015-11-09new loplugin: oncevarNoel Grandin
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann
Change-Id: I987fa3f29cb578e44e4022b6c33ae21a0094bfd8
2015-11-02SVG: add import test for tdf#87309Xisco Fauli
Change-Id: I0f899fbab73ae43e09ca2afc18d956f42ec8b0a7 Reviewed-on: https://gerrit.libreoffice.org/19537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-10-29com::sun::star->css in starmath,stoc,svgio,svlNoel Grandin
Change-Id: If4308b358a55351f6e951ebf055df076ce4ad4ce Reviewed-on: https://gerrit.libreoffice.org/19667 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-20loplugin:defaultparamsStephan Bergmann
Change-Id: Idad9ea385a9b83ad88792cc489413eeb6e6fcd9b
2015-10-14make test more readable - use Primitive2DSequenceTomaž Vajngerl
Change-Id: I8e49fce5a4d8f5b46b9bd1dd3f71a8c7dc90c20d
2015-10-13cppcheck:variableScopeNoel Grandin
Change-Id: I7cbd5a9e9bb5417f754d4e2445df309140fd40af Reviewed-on: https://gerrit.libreoffice.org/19329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-30Fix typosAndrea Gelmini
Change-Id: Ic3d2171521e308261c354d8f699b44b26c95f1ea Reviewed-on: https://gerrit.libreoffice.org/18978 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30Fix typosAndrea Gelmini
Change-Id: Icd2055ee1f941383d0338ea3515a9fbb6db1712a Reviewed-on: https://gerrit.libreoffice.org/18979 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-15Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants. Change-Id: I7154f9472f02fdf47d27ba715db55bb1ec669a8a Reviewed-on: https://gerrit.libreoffice.org/18580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-29o3tl/cow_wrapper: remove boost dependencyDaniel Robertson
Remove boost dependencies from ::o3tl::cow_wrapper, and add the necessary includes to files including checked_delete and noncopyable that do not already include the necessary files. Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686 Reviewed-on: https://gerrit.libreoffice.org/18125 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-20loplugin: defaultparamsNoel Grandin
Change-Id: Ibf0ea539d2a95073a12f84964759d9c7a94baa7b
2015-07-16loplugin:unusedmethods svgioNoel Grandin
Change-Id: I0dd601429b70dc09780e31079a6f7c0570652fe9 Reviewed-on: https://gerrit.libreoffice.org/17114 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-15cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Id438b987f72ae57bd4fa882e01fba17d3fa5b95b
2015-07-10do not include boost/utility.hppMichael Stahl
It just includes a bunch of other boost headers; mostly we need boost/noncopyable.hpp so include that directly. This eliminates 831 MB(!) of boost/preprocessor/seq/fold_left.hpp completely, which is the 2nd biggest header after ustring.hxx. Change-Id: I3df55770adcb46e56f389af828e8ba80da2dc1f2
2015-07-06remove some unnecessary typedefs around uno::ReferenceNoel Grandin
Not very useful these days, since we have the css:: prefix to reduce verbosity. Found with a search like: git grep -nP 'typedef .*uno::Reference.*<.*>\s+\w+;' | grep -v 'std::' Change-Id: I16f41c53837ec5c613545ae45df38b0daddcbadd Reviewed-on: https://gerrit.libreoffice.org/16730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-04Fix typosAndrea Gelmini
Change-Id: Ic6415423f46aaee7ba90239a617c318cf92ae222 Reviewed-on: https://gerrit.libreoffice.org/16711 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>