summaryrefslogtreecommitdiff
path: root/filter/source/graphic
AgeCommit message (Collapse)Author
2020-07-13filter/graphic: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I28b6c5a532f55c88bad46573c123f92766b5af91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-21use for-range on Sequence in f*Noel Grandin
Change-Id: I820255001c1b96d1f4b76a203f3c0f76fa09fe66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in filter..frameworkNoel Grandin
Change-Id: Id3c2d9b1fdf9d617adea0fa1ab2fa9a2de12ef50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93727 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-14loplugin:flatten in filterNoel Grandin
Change-Id: I24861f7401c0046962d536950fe8b2b6bdbad969 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-19sal_Char->char in filterNoel Grandin
Change-Id: I0cec9d1f552e3350e2a2748861447a8f0afa64e8 Reviewed-on: https://gerrit.libreoffice.org/85474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-05tdf#42949 Fix IWYU warnings in include/svtools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57 Reviewed-on: https://gerrit.libreoffice.org/67102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-01-23EPUB export, fixed layout: add chapter names to the navigation documentMiklos Vajna
Extend vcl::PDFExtOutDevData so that it's possible to use it outside the PDF export; this way the EPUB export can know which chapters start on which page. This means fixed and reflowable layout has the same table of contents, instead of just Page <N> in the fixed layout case. Change-Id: I935fb23c66ec747431b91e83b0e677d4e5f704b9 Reviewed-on: https://gerrit.libreoffice.org/48332 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Use const reference instead of copyEike Rathke
Change-Id: Idf5239e2037dcfa808e016a726f5a980d862ede6 Reviewed-on: https://gerrit.libreoffice.org/42669 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22GraphicExportFilter: adding FilterData defaults is unnecessaryEike Rathke
... now that we use the proper dialog that sets the proper filter properties. Change-Id: Iabc3e4b2c13b60bccc0b596a851109df32fe535c Reviewed-on: https://gerrit.libreoffice.org/42668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-22Apply replaceFirst() only onceEike Rathke
It's unnecessary to call if a replacement was already done and might even harm, though unlikely. (e.g. file extension "web") Change-Id: I6615c9a31178770429b523e0ee878661f1b2b6e8 Reviewed-on: https://gerrit.libreoffice.org/42667 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22Group member variables and functions and fix naming nitpicksEike Rathke
Change-Id: Ie0b13c0ed4657200b6c92ae66ea25093e35a6c8f Reviewed-on: https://gerrit.libreoffice.org/42666 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22No using namespace in header fileEike Rathke
And using namespace css is sufficient, it's actually good to see some namespace.. Change-Id: I8cd3418e04769bb2fd1c632d6d671b368aae06b3 Reviewed-on: https://gerrit.libreoffice.org/42665 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22Export to PNG: selected shapes via drawing::GraphicExportFilter, tdf#108317Eike Rathke
Change-Id: Id09d9b21b2e6c018dd199a1911a9125c118abec2 Reviewed-on: https://gerrit.libreoffice.org/42658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-22Move implementation to filterRenderDocument()Eike Rathke
Change-Id: I632a26c5f149fabbe3a4a1186bfbe822fff0ea24 Reviewed-on: https://gerrit.libreoffice.org/42656 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22Remember XComponentContextEike Rathke
Change-Id: I52847249b3e17a31f6c6bf76af7bfe91a414d072 Reviewed-on: https://gerrit.libreoffice.org/42657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-22Ditch now unused GraphicExportDialog, GraphicExportOptionsDialogEike Rathke
That was a dead end anyway, trying to partly reimplement SvFilterOptionsDialog ExportDialog, instead of implementing the necessary bits to use that one which has everything. Change-Id: Icde7422f2c2d7e26c07dfe921a4abda41e222b09 Reviewed-on: https://gerrit.libreoffice.org/42503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-20Get the comments rightEike Rathke
Change-Id: I936b22af55b4dae3c9352f4e1238a6351a03cb3d Reviewed-on: https://gerrit.libreoffice.org/42553 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19Rename getCurrentPageWriter() to getCurrentPage()Eike Rathke
... and let getCurrentPageWriter() be a private implementation detail. Change-Id: Iaa14d8eab81e5750fbaf45adc6aab66eee9018eb Reviewed-on: https://gerrit.libreoffice.org/42488 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19'a'CurrentPage gets on my nervesEike Rathke
Change-Id: Ifb6137048d7206c1f3a718331ed8b42f746052bb Reviewed-on: https://gerrit.libreoffice.org/42487 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-18Export to PNG: use proper dialog and filter options, tdf#108317Eike Rathke
... and not the crude JPG ones. The com.sun.star.svtools.SvFilterOptionsDialog service has all we need, so teach it to cope with non-Graphics source documents and let ExportDialog handle that as well, just the actual rendering needs to go via GraphicExportFilter (and effectively DocumentToGraphicRenderer), so don't let that overwrite the properties set by the filter dialog. Switching to the dialog then is just a matter of changing the UIComponent in filter/source/config/fragments/filters/calc_png_Export The same mechanism probably could be used by Writer as well by adjusting filter/source/config/fragments/filters/writer_png_Export.xcu and maybe filter/source/config/fragments/filters/writer_jpg_Export.xcu in which case the GraphicExportOptionsDialog likely would be moot then. Also, it looks like a filter/source/config/fragments/filters/calc_jpg_Export.xcu (which doesn't exist yet) could be possible using the same mechanism. Change-Id: I1fb9b33a6490dc39d7591b2b5913be182bb820e5 Reviewed-on: https://gerrit.libreoffice.org/42421 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-28Export to PNG: also Calc has MeasureUnitEike Rathke
Though meFieldUnit appears to not be used anywhere, but ... Change-Id: I99e8392e4a773ba00868904e0f2ff5fdbc4bc47d Reviewed-on: https://gerrit.libreoffice.org/40521 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-24Export to PNG: use selection if Selection is selectedEike Rathke
The SelectionOnly property from the export file dialog was not passed down from GraphicExportFilter::filter() to DocumentToGraphicRenderer so that always passed a component model instead of a selection object to the implementation of XRenderable (getRendererCount(), getRenderer(), render()) Also have GraphicExportDialog consider the selection so the DocumentToGraphicRenderer at its GraphicExportOptionsDialog calls XRenderable the same. Change-Id: I976bf16cf87cf5ca2678bdba7adfaf61c2063168 Reviewed-on: https://gerrit.libreoffice.org/40380 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin
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-19includes cleanup after loplugin runs in filter/Jochen Nitschke
put some unused includes from svgfilter.hxx to .cxx files to reduce 'using namespace' in the header Change-Id: I92231e1a6d35e18d64080ea01995d601747d68e7 Reviewed-on: https://gerrit.libreoffice.org/37748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16loplugin:unusedfields improve write-only analysisNoel Grandin
by whitelisting a couple of methods we know only write to their parameters Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c Reviewed-on: https://gerrit.libreoffice.org/37647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19convert MeasurementSystem to scoped enumNoel Grandin
Change-Id: I5d26c50aa0e2c68edab6ee217ae6bdb0ee45dc09 Reviewed-on: https://gerrit.libreoffice.org/36525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-09New loplugin:externvar: filterStephan Bergmann
Change-Id: I2f800da9b61f33c801e1bc2809378ac19f22171b
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-04Allow HTML (WebDocument) to be exported as PNG or JPEGTomaž Vajngerl
Change-Id: Id6b70a88ea479b402e680c7c216a20be3d6e116e
2015-12-23loplugin:unusedfields in filterNoel Grandin
Change-Id: Ic35cff139f5f180ff93fe7b1ecbd15de6c474821
2015-11-20Seems more natural to pass a homogenous list by initializer_listStephan Bergmann
...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I61e494952df8cc40fff3ccad0936adf06035dbeb
2015-10-19Writer image export: cmd. line, default to white backgroundTomaž Vajngerl
This commit fixes the writer image export (jpeg, png) that didn't work because the export pixel size was set to 0 by default. Now the default is set to document size (which depends on system DPI). When exporting to a PNG the background was transparent, which may not be desired. The background color is now by default white and can be changed for DocumentToGraphicRenderer, but the dialog or command line don't support such an option - for now. Change-Id: I16ffd3cd60c47b52768f43ae4c4c170fc821033b
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-08-11tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants, for filter. Change-Id: I30dcd7cfb3e484034f6cceceb1ff7cd9d3f4b7a6 Reviewed-on: https://gerrit.libreoffice.org/17585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann
Change-Id: I7d8b0ab33980726ffb4887b1f19797702d224191
2015-04-10Automated conversion of VclPtr construction to use Instance template.Michael Meeks
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
2015-04-10vclwidget: fixup locally allocated vcl::Window objectsNoel Grandin
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
2015-04-09vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtrNoel Grandin
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx
2015-01-20Drop unused comphelper::service_decl::component_getFactoryHelper paramsStephan Bergmann
Change-Id: Ia47c0bc3539ddf8f925cd053a2431c742c46d337
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-21vcl: sal_Bool -> boolStephan Bergmann
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e