summaryrefslogtreecommitdiff
path: root/sw/source/core/graphic
AgeCommit message (Collapse)AuthorFilesLines
2017-12-04Related tdf#72966 Provide replacement graphic also for metafilesSamuel Mehrbrodt1-2/+3
In 6b3cc69fd2b2de5ace68f2739eb383267d66f76f this was done for draw images, this patch also implements this for Writer images. Change-Id: I54f8142c3d22e1a356aedbcf2daf9d7a9b049423 Reviewed-on: https://gerrit.libreoffice.org/45673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-11-30coverity#1401344 Uncaught exceptionCaolán McNamara1-1/+2
Change-Id: Ia102856797e08ff805958f56d2c468eb39aa937d Reviewed-on: https://gerrit.libreoffice.org/45582 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-12use copy constructor to clone PoolItemsJochen Nitschke1-1/+1
Change-Id: I2a45a62fd56cc5a768406c7a6e4c72456f962367 Reviewed-on: https://gerrit.libreoffice.org/44648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31Drop bDelayed from SwNodes::MakeGrfNodeJan-Marek Glogowski1-8/+10
There is no caller, which sets bDelayed. The comment "// create object delayed, only from a SW/G-reader" doesn't help me much either. But in case of a linked image, it seems appropriate to just drop the empty image and use the delayed SwGrfNode constructor. At least a linked PDF and PNG still work. Change-Id: Idff5599ac0ff04c3efcb141c731c0ee1cfa747de Reviewed-on: https://gerrit.libreoffice.org/43908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-14improve redundantcast lopluginNoel Grandin1-1/+1
to find c-style casts where the expression is a templated method Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b Reviewed-on: https://gerrit.libreoffice.org/42275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04loplugin:constparams in sw part3Noel Grandin1-6/+6
Change-Id: I05ad3204af4e6ec3c832b185a1b35fdb75a229b2 Reviewed-on: https://gerrit.libreoffice.org/40760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand1-6/+6
First steps to organize an importer that can read/interpret wmf/emf/emf+ and deliver a primitive representation for the content by parsing it. Use the same mechanisms as already applied for Svg, so to reuse abilities to keep original binary data to allow save again and embedding in files and have an implemented replacement bitmap based representation. For this, unify the used helper classes to handle more than just Svg. For 1st try, add test code and static bool switches Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-14loplugin:staticmethodsJan-Marek Glogowski1-1/+1
Change-Id: I40d08932115e07470de73b0f0dc9b9b03e608fbe
2017-07-14sw: make SwGrfNode::mpReplacementGraphic swappableMichael Stahl1-0/+26
Same as previous commit, but for sw. Change-Id: Id678de3f512204437e37aaedf24e24aff7a9e592
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin1-2/+2
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04tdf#39468: Translate German terms in sw/source/core/graphic/ndgrf.cxxJens Carl1-3/+3
Change-Id: I7507a4389d1dc9a5361dadbaa3efa63b2153b7dc Reviewed-on: https://gerrit.libreoffice.org/37221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-15convert MirrorGraph to scoped enumNoel Grandin2-27/+27
Change-Id: I2eae815a10e23a7904e1aa54577a959cb8579172 Reviewed-on: https://gerrit.libreoffice.org/35179 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13convert GraphicDrawMode to scoped enumNoel Grandin1-2/+2
Change-Id: I18eec89c4e1ebb86d64297e7cef4b36bf12df59f Reviewed-on: https://gerrit.libreoffice.org/35004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03convert SfxEnumItem to type-safe template classNoel Grandin2-2/+3
and drop the SvxChartTextOrientItem class, unused. Change-Id: I99100837d1beb953450f57b2cda47d165df1620c Reviewed-on: https://gerrit.libreoffice.org/34747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-13vcl pdf import: use pdfium instead of draw_pdf_importMiklos Vajna1-2/+2
Replace creating a full Draw component with direct pdfium library calls. This also means that the result is now a bitmap, not a metafile for now. Also decouple HAVE_FEATURE_PDFIMPORT and HAVE_FEATURE_PDFIUM, the first is the "import PDF into Draw" feature, the second is the "insert PDF as image" feature. Change-Id: I72c25642ec84cc831df362e02b1520c6e6d9adcf Reviewed-on: https://gerrit.libreoffice.org/34217 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin1-11/+11
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin1-1/+1
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-11-29convert ND constants to o3tl::typed_flagsNoel Grandin1-3/+3
Change-Id: I5fe3df5515017ec24db1184e8aca823714fcfdb3 Reviewed-on: https://gerrit.libreoffice.org/31343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23tdf#42949 Remove unused uno headers from /sw/source/coreBartosz Kosiorek2-14/+0
Change-Id: I0029144d049ad1c5ee3ff4d188ff969b6881712f Reviewed-on: https://gerrit.libreoffice.org/31095 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18tdf#89307: Removed T* SvRef::opeartor &()Jacek Fraczek1-6/+6
Usage has been replaced with SvRef::get() or removed where applicable. Change-Id: I49f108910b668466134c40940b53fc3ab2acd816 Reviewed-on: https://gerrit.libreoffice.org/29780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek1-14/+14
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann1-1/+1
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann1-2/+2
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-29Adapt loplugin:stringconstant to improved OUStringLiteral1Stephan Bergmann1-2/+2
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0 Reviewed-on: https://gerrit.libreoffice.org/28447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-27formally->formerlyCaolán McNamara1-1/+1
Change-Id: I1d631f8dd09193c57b7b65e3202ed080ce15861b
2016-06-27ODT export: add embedded pdf supportMiklos Vajna1-0/+3
Once a .pdf file is inserted in Writer using Insert -> Image, Writer now advertises a replacement metafile for it (to make LO <= 5.2 and other ODF readers still be able to read the graphic, where the replacement is the same as the original metafile, but without .pdf data), and the ODF export writes the .pdf data with the correct extension / mime type. Also extend the checksum logic to take care of the pdf data, so on export xmloff won't think that the full and the replacement graphic are the same. The import side is still missing, so no testcase yet. Change-Id: I5c5b7c80ca4024ecbcb5b2d4442d21ca33755546 Reviewed-on: https://gerrit.libreoffice.org/26695 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-10Clean up uses of Any::getValue() in swStephan Bergmann1-1/+2
Change-Id: Ifaa239ab3e285e8cf998339456ece5ce99008af9
2016-05-27Convert GRAPHIC to scoped enumNoel Grandin1-7/+7
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea Reviewed-on: https://gerrit.libreoffice.org/25534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-22Avoid reserved identifiersStephan Bergmann1-5/+5
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-12clang-tidy performance-unnecessary-value-param in swNoel Grandin1-1/+1
Change-Id: I3e030743b640d5a5f6b3bf4a4e9ba50ccd001287
2016-02-29loplugin:unuseddefaultparam in sw (part3)Noel Grandin1-3/+2
Change-Id: Ibff7ac9718929349ee7daa3febb0f8fe4a9fa4db
2015-12-11tdf#69977: uno::Sequence is expensiveNoel Grandin1-2/+2
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-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon1-12/+12
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-115th step to remove tools/rtti.hxxOliver Specht1-2/+0
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-19/+19
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-06com::sun::star->css in sw/source/coreNoel Grandin1-1/+1
Change-Id: I30016977f1be8fb53dd239367d043de92a9467d9
2015-10-20loplugin:defaultparamsStephan Bergmann1-2/+2
Change-Id: I11ff551955c1ac291ab576f2f18c2dd410427eda
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht2-3/+3
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-08-26convert Link to TypedNoel Grandin1-2/+2
and make it statically allocated, no point in dynamically allocating such a small object Change-Id: If476bf5dc1e0d535383d16bc49c8d567776f16cd
2015-08-20loplugin: defaultparamsNoel Grandin1-1/+1
Change-Id: I6019dea21b58ac8ba0dba5c7f6ca837716e19869
2015-07-06improve the returnbyref lopluginNoel Grandin1-9/+9
Change-Id: I1b510a6194282dfa4a9001d473127c5ebc8b44eb Reviewed-on: https://gerrit.libreoffice.org/16731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-04Fix typosAndrea Gelmini1-1/+1
Change-Id: Id9296115f30858e7fd470a199e59343a96d7deec Reviewed-on: https://gerrit.libreoffice.org/16712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann1-2/+2
Change-Id: I8d27ae80d209159690182ab91e272cf00e9f863d
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-20/+20
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-06convert BMP_MIRROR constants to scoped enumNoel Grandin1-8/+8
and fix bug in svx/source/xoutdev/_xoutbmp.cxx,XOutBitmap::MirrorGraphic where it was not correctly translating between different flags types. Change-Id: I78b4965544da2aa54b67ec18307fa54c8ffc3aee
2015-05-05loplugin:staticmethodsNoel Grandin1-1/+1
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
2015-04-23loplugin:staticmethodsNoel Grandin1-7/+6
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
2015-04-02Change INetProtocol enumerators to CamelCaseStephan Bergmann1-1/+1
...to avoid clashes with macros and poor warnings about hiding global FILE Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
2015-04-02Change INetProtocol to scoped enumerationStephan Bergmann1-1/+1
...and fix o3tl::enumarray::operator [] const overload Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-01convert BOX_LINE and BOXINFO_LINE to enum classNoel Grandin1-4/+4
since their usage is intertwined. Also introduce new o3tl utilities enumrange and enumarray to make working with scoped enums a little simpler. Change-Id: I2e1cc65dd7c638e59f17d96dfae504747cad6533