summaryrefslogtreecommitdiff
path: root/drawinglayer
AgeCommit message (Collapse)Author
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-20loplugin:constparams in drawinglayerNoel Grandin
Change-Id: I3111210ae77f67301bb319d5364f77c52e2c4d6d Reviewed-on: https://gerrit.libreoffice.org/40220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18coverity#1415515 Division or modulo by float zeroCaolán McNamara
and coverity#1415513 Division or modulo by float zero Change-Id: I91ffc794e70f9204a39a5ae1b2a6c59ecbe31adf
2017-07-18Clean up android specific template functions defined in std namespacebrainbreaker
Change-Id: I2094ee8eec00587f166d96723a02eb5957dbf79b Reviewed-on: https://gerrit.libreoffice.org/39890 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17Fix typosAndrea Gelmini
Change-Id: I0fec2abc1bed9c0cfcd78d1b0f6daebc335831be Reviewed-on: https://gerrit.libreoffice.org/39982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-15loplugin:useuniqueptr in basic..cppcanvasNoel Grandin
Porting over b0e05f9ade9e93c569c6a62c59ac1819e615f27b to copies of emfpp*.[ch]xx Change-Id: I059d2cc371f24ce3d43fc2e255b1dc1c227cf555
2017-07-15emfplus: more corrections due to linux buildArmin Le Grand
Change-Id: Ib2c3bff23043638d315405b5a91b2596e92f7ffa
2017-07-15emfplus: UnitTests and gerrit build correctionsArmin Le Grand
Needed to migrate UnitTest for Emf/Wmf import from vcl to emfio. Corrected stuff based on gerrit build feedback Change-Id: I7fd2456f814ea19583072ba09730a07e9b9d4061
2017-07-15emfplus: finetuning, UnitTest, not active by defaultArmin Le Grand
Change-Id: Ie085ad2610a306c7f9c44551114041d0950d1af5
2017-07-15emfplus: unified transformations, added test codeArmin Le Grand
More unifications, changed all Map*() methods to use a single B2DHomMatrix which is created based on former stuff, XForm now completely replaced. To check, added debug-only code and switches to the VclPixelProcessor so that visual checks get easy when using these modes (overlay of both methods with modded colors). Also resynched to master. Change-Id: I7b749f90bfde2ec1c2e49ee90ca2ef368da0547e
2017-07-15emfplus: more corrections and rough geometryArmin Le Grand
Corrected/streamlined more, added 1st rough geometry creation to have a proof of concept. Checked the helper classes based on EMFPObject and their derivates. First versions of EMFPPlusDrawPolygon and EMFPPlusFillPolygon, but the complex info in the data objects needs more complex primitive creation. Not sure if primitive creators like createHairlineAndFillPrimitive will be usable, these are based on PropertyHolder info. Also added usage of HandleNewClipRegion, that should be usable Change-Id: I96119be290140bee252ee21a3e1187fad60e9c7d
2017-07-15emfplus: some cleanup/streamliningArmin Le Grand
Change-Id: Ia931ca356fb079b9cb2395ba2311b91d2481e2d4
2017-07-15emfplus: migrate gdiplus reader to drawinglayerArmin Le Grand
In the current state interpretation of the GDI+ data is needed in the MetafilePrimitive in the drawinglayer project. Migrate helper stuff and reader from cppcanvas to drawinglayer as tooling, prepare tooling, prepare changing from direct canvas rendering, isolate and migrate existing tooling from MetafilePrimitive from reading emf/wmf to places where it can be commonly used by both, prepare cange of different graphic statue usages, start changing XForm to B2DHomMatrix conversions, ... Change-Id: I2d6954f69464653d111abb316fd9654ad3499c3f
2017-07-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand
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-12borderline: correct problems with border displayArmin Le Grand
Borderline display with direct paint and with primitive direct paint has quite some errors in the current state. Started to unify usages, check deeper with creation/usage. borderline: deep changes to BorderLine Found basic error in determining the offset values for BorderLinePrimitive creation, these were not centered on the lines. Corrected that. This makes it possible to remove the formally used clipping which seems to have been used to correct that. Also allows to go back to a 'normal' decomposition that creates line primitives as expected. That again can then be painted quite normally. Also added view-dependent case to the decomposition to guarantee a gap of one discrete unit (pixel). Removed the direct painter, too. Checked and corrected stroking. borderline: Adapted previews to primitives Added code to use the primitive representation in all dialogs and apps using tables. The edit views use these mostly, so the preview should do that, too. Currently missing is a good visualization of diagonals, but this is also true for edit views. Checked all apps and table usages to not get worse borderline: correct line dash visualization When a dashed line is used, a factor of 10.0 was applied in the original coded, added that. Also the orientation of vertical borders was inverted since it was simpler to exchange Start/End, but this also mirrors the line dash visualisation, corrected that Change-Id: I4c1b380a76cb37389fab1259a53fb7cc9da982d1 e95e246d5563360617a2a2213e4d5ec7d0e736b9 62369b4de58fb0264aeb710ec6983ceddca5701d 77418cc6c84ebb0632f8c3448976e82ce612d6b6 b4eb28dc86ce05eb89b26517167305b994158ef8 borderline: adapt cppunittest and clang
2017-06-28remove default-able copy ctors and copy operatorsJochen Nitschke
The implicit defined ctors and operators will copy all members (and bases). Since C++11 implicit copy is depreciated if there is a non-default dtor, keep such copies. This commit includes only types that had either copy ctor or copy operator and were found by cppcheck. Change-Id: I93ee687fb3b3c5884f475a2c6054955cdde57ed7 Reviewed-on: https://gerrit.libreoffice.org/39351 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in desktop..editengNoel Grandin
Change-Id: Ieea12d0790a1034eba8975fe74fa205f02003b7d Reviewed-on: https://gerrit.libreoffice.org/39134 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:oncevar in cppcanvas..drawinglayerNoel Grandin
Change-Id: I5456aad61fb0dfe6830eae62b91d1a6399d6343f Reviewed-on: https://gerrit.libreoffice.org/39128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02Improved loplugin:redundantcast static_cast handling: drawinglayerStephan Bergmann
Change-Id: I286b51f11410aad13bd4544998f0d6b56c854851
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09Fix typosAndrea Gelmini
Change-Id: Ie0f67456e5c7d9b7b26b27b4d633881236ceeadb Reviewed-on: https://gerrit.libreoffice.org/37361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-02loplugin:checkunusedparams in drawinglayerNoel Grandin
Change-Id: Ib497b284a80fae69930f226d2e70368cb9e962ef Reviewed-on: https://gerrit.libreoffice.org/37072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30convert GradientType to scoped enumNoel Grandin
Change-Id: Ie71ead122965e967796ed01270cc2824d35905ac Reviewed-on: https://gerrit.libreoffice.org/35900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29Propagate proper integer type out of AnimationEntryList::impGetIndexAtTimeStephan Bergmann
...after 49f8917cd4c10685645128768a2dc63043a7b398 "fix loplugin:loopvartoosmall" Change-Id: I8ec284711afa2f8323462a87d30fdf4c27941b6c Reviewed-on: https://gerrit.libreoffice.org/35830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-27ofz#947 line dashing is very problematic memory and size wiseCaolán McNamara
Change-Id: I29ed7cd774d3ede077edfe2893c7a9e72b83abad Reviewed-on: https://gerrit.libreoffice.org/35748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-26fix loplugin:loopvartoosmallMarkus Mohrhard
Change-Id: I4fa577920565840edd5b37c673e5c8eb42da7ed7
2017-03-25Fix typosAndrea Gelmini
Change-Id: I85214642167d9c7876fd0fdc2cb7cf8e85765614 Reviewed-on: https://gerrit.libreoffice.org/35627 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-19TyposJulien Nabet
Change-Id: Id1b96b56b16ebf2d8a99dd6fb64c73906dfd598f Reviewed-on: https://gerrit.libreoffice.org/35435 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19TyposJulien Nabet
Change-Id: I13020539fe121151e884a90d72d47788fb3ae65c Reviewed-on: https://gerrit.libreoffice.org/35436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-17convert SvxBorderStyle to scoped enumNoel Grandin
and rename to SvxBorderLineStyle Change-Id: I19e530f162e4ca6290a0ad076e7fe3d5775ae6bc Reviewed-on: https://gerrit.libreoffice.org/35265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-14drawinglayer: work around Android buildMiklos Vajna
Change-Id: I9ec4622314bb92cd8c99451c18146dec774a954b
2017-03-14remove noise UUUU tags in commentsNoel Grandin
Change-Id: Id8a2940ae7348bf75ca967f31adf8489dc678d00 Reviewed-on: https://gerrit.libreoffice.org/35161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13Resolves: tdf#105998 distort hairline borders to fall inside the canvasCaolán McNamara
if we are a hairline along the very right/bottom edge of the canvas then distory the polygon inwards one pixel right/bottom so that the hairline falls inside the paintable area and becomes visible Change-Id: Ie5713f6916cf5b47fdf14f86f034e38cda9900fd Reviewed-on: https://gerrit.libreoffice.org/34243 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-13convert GraphicDrawMode to scoped enumNoel Grandin
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-02-26loplugin:loopvartoosmallStephan Bergmann
Change-Id: I06d7d5d7cae13b9b1f62955f53407df8c9001f26
2017-02-17Drop :: prefix from std in [de]*/Tor Lillqvist
Change-Id: I3247894fe022dce7f0aa351bd85fefcd7c545dd4 Reviewed-on: https://gerrit.libreoffice.org/34377 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-02-16remove unused Sentence from BreakupUnitNoel Grandin
Change-Id: I324d344a9e9154345b8bd7c8653415cfcbfc26cc
2017-02-09convert BmpConversion to scoped enumNoel Grandin
and drop unused 4BIT_TRANS and 1BIT_MATRIX enumerators Also fix a bug in x11::convertBitmapDepth where we were incorrectly passing BmpConversion enumeratirs to ReduceColors Change-Id: I903c6866750e46ee752e10a17c05fcaaf6b11242 Reviewed-on: https://gerrit.libreoffice.org/34062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31more SAL_WARN_UNUSEDNoel Grandin
Change-Id: Idf44fe0302b4504c443f083e527b63b2461ada85
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 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-24loplugin: unnecessary destructor cppcanvas..filterNoel Grandin
Change-Id: I009cdd60869a67d210edf879ddb451663a7b8676 Reviewed-on: https://gerrit.libreoffice.org/33491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>