summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8graf.cxx
AgeCommit message (Collapse)Author
2017-04-25tdf#39468 Translate German commentsAlexey Vlasov
Change-Id: I94e53a5a375422c1865e881a29d5b080f844524b Reviewed-on: https://gerrit.libreoffice.org/36493 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-04-24move SwFlyDrawContact ownership to SwFlyFrameFormatBjoern Michaelsen
Change-Id: I19a65638c7489f74cc7ae5fc08364a103551cd1a Reviewed-on: https://gerrit.libreoffice.org/36878 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-21remove some old MSVC workaroundsNoel Grandin
Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222 Reviewed-on: https://gerrit.libreoffice.org/36660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-13ofz: header has to be at least 1 pair longCaolán McNamara
Change-Id: I5725048519a2b68265e90d12b1e4bcb506c56fc2
2017-04-12enum spelling: throught -> throughJustin Luth
git grep -l "[ _\.]THROUGHT" | xargs sed -i 's/THROUGHT/THROUGH/g' git grep -l -i "[ _\.]THROUGHT" | xargs sed -i 's/throught/through/g' In ENUMs: THROUGHT = THROUGH (preserved as valid alternate spelling) In ooxmlexport8 - unit test confirms THROUGH = THROUGHT Change-Id: Iae0fef9a8adcb96761989f38903a24ffb1b91e77 Reviewed-on: https://gerrit.libreoffice.org/35998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-05ofz: infinite loop and oomCaolán McNamara
Change-Id: Ibb23b5808ae465294adf2342d5535784476f5395
2017-04-05ofz: stay within available dataCaolán McNamara
Change-Id: Ic959cf5b2cd92ba5bc297e686beb1fd50427a994 Reviewed-on: https://gerrit.libreoffice.org/36102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-25Fix typosAndrea Gelmini
Change-Id: I52604902247e7d8565476fafe98211fff32c5543 Reviewed-on: https://gerrit.libreoffice.org/35658 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-20convert RndStdIds to scoped enumNoel Grandin
Change-Id: I029ad67dfcbc40f3953adf485957efcbd97f23d0 Reviewed-on: https://gerrit.libreoffice.org/35328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-15convert SvxFrameDirection to scoped enumNoel Grandin
Based on the casts in chart2/source/view/main/ChartView.cxx and the similarity of naming of values, I conclude that this enum was intended to abstract over css::text::WritingMode2. Added a comment to that effect. Change-Id: I3af8bbe8b6ac8c4a9375f6ccde145b98b9c69a57 Reviewed-on: https://gerrit.libreoffice.org/35164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-15convert MirrorGraph to scoped enumNoel Grandin
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 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-03-08Some more long -> WW8_CP (to avoid loplugin:loopvartoosmall)Stephan Bergmann
Change-Id: Icdf00da8e627d5e3a671acd17af58734873f4bdb
2017-03-08convert SvxShadowLocation to scoped enumNoel Grandin
Change-Id: Ie51995579312328538263172cd3173641df89bca Reviewed-on: https://gerrit.libreoffice.org/34965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02elide the SwSurround enumNoel Grandin
no point in redeclaring an existing enum exactly Change-Id: I4fb367e4b27e36601f1f36b629097a87b5f00096 Reviewed-on: https://gerrit.libreoffice.org/34773 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-24Rename sprm ids to match [MS-DOC] documentationMike Kaganski
Change-Id: Iab5b7c10c635dfdf832df3d0864939a7984282d1 Reviewed-on: https://gerrit.libreoffice.org/34599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-02-14Revert commits that caused instability on the Linux debug tinderboxBjoern Michaelsen
Revert "DYING_FLYFRAMEFORMAT not needed anymore" This reverts commit 837545feb63f31095d69d006aeda520637c3bc8c. Revert "give SwFlyDrawContact a clear owner: SwFlyFrameFormat" This reverts commit 4ae93f7d3b063d13ff757884444a468212227ef9.
2017-02-14give SwFlyDrawContact a clear owner: SwFlyFrameFormatBjoern Michaelsen
Change-Id: Ida24ef9ae65ae8658645496369673d886e0935cc Reviewed-on: https://gerrit.libreoffice.org/34141 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-18new loplugin: useuniqueptr: sw part 2Noel Grandin
Change-Id: Ifa901f75072d8474d8a97ca57c2b5b48d8c6b79d Reviewed-on: https://gerrit.libreoffice.org/33250 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-29sw ui: de-obfuscate assignments in conditions to help GCCMichael Stahl
GCC 6.2.1 with -Og produces spurious -Werror=maybe-uninitialized on variables that are assigned in conditions; perhaps it's better to de-obfuscate the code if even GCC is confused about it. Change-Id: I5276f35be773f8e7a6d27f970085f0cd00cea0aa Reviewed-on: https://gerrit.libreoffice.org/31331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-21convert inventorId to scoped enumNoel Grandin
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-05make a useful function - SvxBoxItem::CalcLineWidthJustin Luth
It saves lots of extra code: no separately checking if a line exists, and then getting the width. Closely matches the existing CalcLineSpace. sc/source/ui/view/printfun.cxx is another place that could use this heavily to replace their lcl_LineTotal function. Perhaps something good for an easyHack. (Wait until LO5.4, since much of the logic should use CalcLineSpace(,true) instead, and that function probably will have the default bEvenIfNoLine changed to true. Compiler doesn't like providing "true" when the default value is also "true".) Change-Id: I298d057b2bf04959434736f6ab2666d2de4222f9 Reviewed-on: https://gerrit.libreoffice.org/30589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-10-03sw: prefix members of WW8FibMiklos Vajna
Change-Id: I69f8b6dda03b9a8cc19fc1dbe5e8031cfb7329d2 Reviewed-on: https://gerrit.libreoffice.org/29470 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-30loplugin:constantparamNoel Grandin
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16loplogin:singlevalfields in include/Noel Grandin
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc Reviewed-on: https://gerrit.libreoffice.org/28931 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-30Translate some German comments and messagesMaarten Bosmans
Change-Id: Id15e1afd991f3476e260ba40a8c45c7261113577 Reviewed-on: https://gerrit.libreoffice.org/28493 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-24convert SdrFitToSizeType to scoped enumNoel Grandin
Change-Id: Id732c74b590db7006058d1919be2438b649a795e
2016-08-18convert SdrCaptionType to scoped enumNoel Grandin
Change-Id: I5c1a2300ec6b3d9dc3085affa08cc544f46b27d6
2016-08-03partially translate German comments in ww8graf.cxxJohannes Berg
Change-Id: Iad9ce00869ac2dc989ee95e97ac3ef53de77c007 Reviewed-on: https://gerrit.libreoffice.org/27832 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-15tdf#42949: clean up includes in include/filter with iwyuJorenz Paragas
Change-Id: Id08a999764bfeeff3bb3409b46f48b278009ccbe Reviewed-on: https://gerrit.libreoffice.org/26238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-27Convert GRAPHIC to scoped enumNoel Grandin
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea Reviewed-on: https://gerrit.libreoffice.org/25534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)Noel Grandin
and put an assert in SfxPoolItem::SetWhich() so nothing new creeps in. Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df Reviewed-on: https://gerrit.libreoffice.org/24324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12clang-tidy modernize-loop-convert in swNoel Grandin
Change-Id: I1f4a0ad6658bd3154c48940296aa8edc1ea1612c Reviewed-on: https://gerrit.libreoffice.org/24876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09convert OUTLINER_MODE to scoped enumNoel Grandin
Change-Id: I7ac45d7fbd5e77a105cbe942c6d4fd6cfc8ff909 Reviewed-on: https://gerrit.libreoffice.org/24789 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-31use SAL_N_ELEMENTS more widelyNoel Grandin
found using git grep -n 'sizeof.*/.*sizeof.*[0]' Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
2016-02-15tdf#56321 - .doc import image flipped statusJustin Luth
Although LO was exporting whether an image was flipped horizontally or vertically, it wasn't reading it in during an import. Change-Id: Ia85e3459d00f40d852bbcd3fcfe15e7b53d518ba Reviewed-on: https://gerrit.libreoffice.org/22344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-13loplugin:unusedmethods unused return value in sw/Noel Grandin
Change-Id: Iaec71124b04ed678686d646df3ff0892585d3d50
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-11sw: prefix members of SwWW8StyInfMiklos Vajna
Change-Id: I2749607eb2271a838acb8220c80d9363d8e8d867
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-10-20loplugin:defaultparamsStephan Bergmann
Change-Id: I11ff551955c1ac291ab576f2f18c2dd410427eda
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht
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-09-09no point in reminding me now, we shipped a while backCaolán McNamara
Change-Id: I728d4c0c6e271e3a97a95996f96ed43c00a3abc8
2015-09-01-fsanitize=nullStephan Bergmann
...as happens in CppunitTest_sw_filters_test with sw/qa/core/data/ww8/pass/CVE-2015-2431-1.doc: > sw/source/filter/ww8/ww8par4.cxx:294:76: runtime error: reference binding to null pointer of type 'const SfxItemSet' > SwWW8ImplReader::ImportOle(Graphic const*, SfxItemSet const*, SfxItemSet const*, Rectangle const&) sw/source/filter/ww8/ww8par4.cxx:294:23 > SwWW8ImplReader::ReadChar(long, long) sw/source/filter/ww8/ww8par.cxx:3611:35 > SwWW8ImplReader::ReadChars(int&, int, long, long) sw/source/filter/ww8/ww8par.cxx:3436:27 > SwWW8ImplReader::ReadText(int, int, ManTypes) sw/source/filter/ww8/ww8par.cxx:3974:22 > SwWW8ImplReader::CoreLoad(WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5175:9 > SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5773:19 > SwWW8ImplReader::LoadDoc(WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6045:19 > WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6167:20 > SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18 > SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22 > SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23 > SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20 Change-Id: I4482bc5d8e0c2646e7c8667a231a78311b557e89
2015-08-25ensure editeng str len is in sync with attributesCaolán McNamara
for the duration of inserting attributes, and excess dos newline chars can be removed safely afterwards Change-Id: If70e34fec1c0819f827f483d3d7ac4f19b3caef8
2015-08-25misplaced braceCaolán McNamara
Change-Id: I6e43fd4a4b45f0217de8b6d93ef2403e46e39489
2015-08-24consider validity of m_nDrawCpOCaolán McNamara
Change-Id: Ifbd131440bad6d840d369c99628cb8904697ad96
2015-08-24Handle GetBaseCp overflowStephan Bergmann
...as found by UBSan in CppunitTest_sw_filters_test (see below); note the TODOs how best to report the errors up the call stack. > Testing file:///.../sw/qa/core/data/ww6/pass/crash-3.doc: > sw/source/filter/ww8/ww8scan.cxx:5240:63: runtime error: signed integer overflow: 1766665948 + 1768712052 cannot be represented in type 'int' > WW8Fib::GetBaseCp(ManTypes) const sw/source/filter/ww8/ww8scan.cxx:5240:63 > SwWW8ImplReader::Read_GrafLayer(long) sw/source/filter/ww8/ww8graf.cxx:2393:18 > SwWW8ImplReader::ReadChar(long, long) sw/source/filter/ww8/ww8par.cxx:3630:17 > SwWW8ImplReader::ReadChars(int&, int, long, long) sw/source/filter/ww8/ww8par.cxx:3432:27 > SwWW8ImplReader::ReadText(int, int, ManTypes) sw/source/filter/ww8/ww8par.cxx:3970:22 > SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5169:9 > SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19 > SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19 > WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20 > SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18 > SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22 > SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23 > SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20 > SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12 > test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20 > test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5 > SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5 Change-Id: I0b14f5c1e025565eb131e64590b7d5ff0135e767 Reviewed-on: https://gerrit.libreoffice.org/17965 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>