Age | Commit message (Collapse) | Author | Files | Lines |
|
Apparently the default is "t", which causes a fly that is anchored
at-page with the first content on the page being a table to be wrongly
positioned.
Change-Id: Iba1b961c6e884b2a55928952937187732ef73a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111336
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: Iff904a7ac887fa9b77bea87dbb1012281848a540
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111278
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifcf41582cd305293a701707618ff0f4b7d6322ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111162
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
|
|
This also allows to easily add more units, both of length and for other
unit categories.
The conversion for "Line" unit (312 twip) is questionable. Corresponding
entries in aImplFactor in vcl/source/control/field.cxx were inconsistent
(45/11 in; 10/13 pc; 156/10 pt). They were added without explanation in
commit c85db626029fd8a5e0dfcb312937279df32339a0. I haven't found a spec
of the unit (https://en.wikipedia.org/wiki/Line_(unit) is not specific).
I used the definition based on "by pt", "by mm/100", "by char" (they all
were consistent); "by pc" seems inverted; "by twip" was half as much.
This accepted conversion makes unit test for tdf#79236 pass.
Change-Id: Iae5a21d915fa8e934a1f47f8ba9f6df03b79a9fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110839
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I958a22f60975c74dfaeb8469b4c0cd3759d40130
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
O[U]StringBuffer methods
Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Otherwise removing narrations don't work in powerpoint, it would say
there are no narrations, just plain media shapes.
Change-Id: Ibd0478540ac018bc23f81223846518b3bf7c7c2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110016
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
The OOXML markup is <p:cMediaNode ... showWhenStopped="0">, but the UI
uses "Hide During Show", which is easier to understand, so use the
second naming in the code.
With this, the PPTX no longer makes the speaker bitmaps on slides
visible while projecting.
API change, because the animation node is only available via UNO, though
it's likely that no actual external code would ever interact with it
directly. (And also add a stub Narration attribute, so that can be
implemented in a follow-up commit without an API change.)
Change-Id: Ia90a2fb30c2bfdb4cff2901fe11bdf1d4ab38261
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109969
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to look through template instantiations involving std::forward
motivated by
commit b1617acde182d1683bdfb529794d7456f8b4bf6d
drop RadioButton arg defaults
the nBits arg in builder.cxx was in the wrong place
Change-Id: I222ea2aeea6f44ae54839e824a247a8105392c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
update the script to use python3, and run it
Change-Id: I9c2a86e1f7a2eb889dcf214f2a2f6a31ceb1f59e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to reduce the churn, we leave the existing constructor in place,
and add a clang plugin to detect when the value passed to the
existing constructor may contain transparency/alpha data.
i.e. we leave expressions like Color(0xffffff) alone, but
warn about any non-constant expression, and any expression
like Color(0xff000000)
Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Now with my GraphicFilter::MakeGraphicsAvailableThreaded() patches
for Impress images will be loaded in parallel as they are needed,
which should usually be more efficient than loading all of them
immediately.
This basically reverts commits:
b1319842a49cdf6512bbd9e81081e2a9edbd6089
04e27df3c162f1df02f061b94434a38d1eaa3a46
9eb8e2737d3a4d52ce1b0cc44091a3b7ecf59e3b
Change-Id: I46bb0d6d93fb69f03f464308f6fce1603aafdfd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107945
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Use ShapeExport to export additional shapes (userShapes)
in Chart.
Change-Id: Ic70a7f84c4ac028b6f09a69bec2cf4949944b16c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107605
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
...for LIBO_INTERNAL_ONLY. These had been missed by
1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).
This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).
The improvement to loplugin:stringadd became necessary to fix
> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.
Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
VML v:shape/v:textbox element was imported only as
a text frame, losing (otherwise recognized) preset
shape geometry, i.e. replacing a callout bubble
(wedgeRectCallout) and other special shapes with a
plain rectangle.
Thanks to Attila Bakos for the initial help.
Change-Id: I03a608822ed54a20ed07406a08c3539e72958f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105299
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
|
|
not just functions
Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I76e34e8020d98292e8ffde387542b7029f85a42d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105754
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...to "Find functions that take rtl::O[U]String parameters that can be
generalized to take std::[u16]string_view instead." (Which in turn can avoid
costly O[U]String constructions, see e.g. loplugin:stringview and subView.)
Some of those functions' call sites, passing plain char string literals, needed
to be adapted when converting them.
Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
The MirroredX property is set (in the CustomShapeGeometry property), but
it is not supported for the LineShape by UNO, so we have to make the
mirroring during importing.
Change-Id: I65a1f9a115a003c056ae31f4bc217206a0e6dcd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104656
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
of (simplified export) of not filled custom shapes by
adding missing fill="none" to a:path.
Note: in OpenDocument, unfilled shape path is defined
by draw:enhanced-path command "F", see section 19.145
in ODF v1.2.
Co-authored-by: Szabolcs Tóth
Change-Id: I0be2aada3deb06828216e0441c91c389a673f87c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104205
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
When importing writerfilter, we change to oox when
importing images. This transition doesn't store any
previous contexts and all instances are reset. The
problem occurs when we have identical images because
the transition erases all caches we have to determine
if an image has already been imported or not, which
causes that we import the same image multiple times
which create unnecessary copies.
This introduces the XGraphicMapper, which can be used
to store the XGraphic for a key and can be transferred
between writerfilter to oox. With this we can remember
which images were already imported and don't create
unnecessary internal copies which decreases memory.
This also includes a test which checks that the import
and export doesn't produce unnecessary copies of
identical images. The test checks that for OOXML, ODF
and MS Binary formats.
Change-Id: I33dc19218c565937fab77e132b3a996c51358b6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103283
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
by converting scheme color identifiers to colors temporarily.
Because we haven't exported theme XML yet, we could not import
shapes of these exported documents correctly, resulting missing
lines.
Co-authored-by: Szabolcs Toth
Change-Id: I4f3d19cb8a9a851fb07a97f798195011e420d441
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102722
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
...hoping that this will avoid
> In file included from /home/tdf/lode/jenkins/workspace/lo_ubsan/sw/source/filter/ww8/wrtw8nds.cxx:25:
> In file included from /home/tdf/lode/jenkins/workspace/lo_ubsan/sw/source/filter/ww8/docxexport.hxx:23:
> In file included from /home/tdf/lode/jenkins/workspace/lo_ubsan/sw/source/filter/ww8/wrtww8.hxx:23:
> In file included from /home/tdf/lode/jenkins/workspace/lo_ubsan/include/sot/storage.hxx:24:
> In file included from /home/tdf/lode/jenkins/workspace/lo_ubsan/include/tools/stream.hxx:28:
> In file included from /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/memory:80:
> /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:76:16: error: invalid application of 'sizeof' to an incomplete type 'sax_fastparser::FastAttributeList'
> static_assert(sizeof(_Tp)>0,
> ^~~~~~~~~~~
> /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:268:4: note: in instantiation of member function 'std::default_delete<sax_fastparser::FastAttributeList>::operator()' requested here
> get_deleter()(__ptr);
> ^
> /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:233:45: note: in instantiation of member function 'std::unique_ptr<sax_fastparser::FastAttributeList, std::default_delete<sax_fastparser::FastAttributeList> >::~unique_ptr' requested here
> constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
> ^
> /home/tdf/lode/jenkins/workspace/lo_ubsan/include/sax/fshelper.hxx:33:34: note: forward declaration of 'sax_fastparser::FastAttributeList'
> namespace sax_fastparser { class FastAttributeList; }
> ^
(<https://ci.libreoffice.org/job/lo_ubsan/1767/>) with libstdc++ prior to
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;
h=c3ba63c314d61362f7c48c4feeefa13ea3978344> "PR libstdc++/87704 fix
unique_ptr(nullptr_t) constructors".
Change-Id: Ie3b86b83d0b0e70fe44e2b2022d410643e265fbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103139
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This reverts commit 2cb90a5c87fe46737c8d840967d8836284f92ffd.
Revert the change to EscherPropertyContainer, which was completely
bogus, based on pre-existing bogus code in VMLExport::Commit().
The problem is that ESCHER_Wrap values are for wrapping text *inside* a
text box, which is "mso-wrap-style" in VML, whereas VML's w10:wrap
element defines how text wraps *around* a shape, doesn't exist as an
ESCHER property and is specific to Word formats.
Instead, export the w10:wrap element in VMLExport::EndShape().
This has 2 callers, WriteActiveXControl() and writeVMLDrawing().
Furthermore the value "none" wasn't written for WrapTextMode_THROUGH,
which caused the wrap element to be omitted in that case.
Change-Id: Id4a01fcb2ea73fa9bef4ee8769b5e0680e059f15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103009
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Reference OOXML (Appendix B.5.1, line 248)
Change-Id: Idf5c2546b4ad65c8e78ca03e18ecfa575ef17fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103005
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
|
|
Change-Id: I3d95d566db76e14532945b881b1847ea8c7e3153
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102946
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
When 2 or more shapes have their text set to autofit and they have a
constraint like:
<dgm:constr type="primFontSz" for="des" forName="node" op="equ"/>
Then make sure that the automatic font size is the same for all shapes
and all content fits, by using the smallest scaling factor from all
relevant shapes.
Some rework is needed, because normally oox::drawingml::Shapes don't
have access to their parents, at the same time there can be multiple
SmartArts on a single slide, so storing the grouping info in the filter
is problematic, too. Solve this by storing the grouping in the toplevel
oox::drawingml::Shape and exposing them in XmlFilterBase just during the
time the children of the toplevel shape of the SmartArt are added.
This works, because we know SmartArts can't be nested.
Change-Id: I6c591eadc7166c7c42752650afdb7ee1e416cff6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102490
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
which wasn't exported.
Note: the enlarged monolithic export function was
split in the following new functions:
- WriteOLEShape() exports the replacement shape of
the OLE object.
- GetOLEStyle() returns the string value of the
style attribute.
- ExportOLESurround() handles the surround settings.
Also add GetVMLShapeTypeDefinition() to reuse picture
frame VML formula string used by VMLExport.
Co-authored-by: Arató Dániel (NISZ)
Change-Id: I29800a50c60a824a14849ac286a18e5e2f97c689
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102034
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
for example to avoid converting OLE icons of an ODF document
to an icon-size embedded spreadsheet.
When creating a new OLE object in Writer the user has an option called
"Display as icon" which causes the actual contents of the OLE to be
hidden when rendered in the document. This setting, referred to
internally as the DrawAspect of the object, was imported fine, but when
exported to a .docx it always had the value "Content" (corresponding to
"Display as icon" being unchecked). Now OLE objects with "Display as
icon" checked are saved with DrawAspect="Icon".
A grab bag entry was previously used to let the DrawAspect setting flow
through Writer from OOXML import to export. Now this workaround is no
longer needed and is removed by the present commit.
Change-Id: I46ea4fc95a26bcd1f85e19a506c0965f73d4257a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101711
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Export cases:
Add transparence gradient on solid color fill by treating the
color fill as gradient with identical start and end color.
Add solid transparence on color gradient, by treating transparence
as gradient.
Import: Add missing property PROP_FillTransparenceGradientName to
spnCommonPropIds so that it is available in spObjTypeFormatEntries.
Otherwise transparence gradients will be skipped on import.
Change-Id: I56218ec1afcc5bd1ce0324ca50c03e0b44f76c58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99464
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
Replace code added in 090c61eb93db4302d4565d5f11f7673190835fdb
with something that uses the already generated ESCHER property; this
lets a warning about the unhandled property disappear too.
Change-Id: Ieed83dd8e17e92eea9901124fce5e6da2a17196a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100332
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
LibreOffice imports multicolumn texboxes as tables. When
document has numCols=2 (or more) attribute at slidelayout and slide,
the table rows and columns duplicates.
maPPTShapes vector holds our PPTShape objects, hasSameSubTypeIndex
function finds the status that I mention above. So that we can prevent
that duplication.
Change-Id: Iee03d130452a16e9b46d471a9b6ed5910e6351ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99279
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
|
|
Change-Id: I9ea016adcec334437da45296ee325453347836ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99002
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Recheck after 7-0 branchoff
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I7f5c35474b671facbda85a9538462dd4291add91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97655
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This patch adds fill to the characters in a Fontwork shape in export
to pptx. It does not contain export to docx and not import.
Change-Id: Ie7c8a35380a845f513516636c4f60ee307eacd50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98187
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I224831ad18e754fd67d9b16510cd286a5397f1f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98236
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Originally the name was always an object type plus
an index. That not only ignores the existing
object name, but also makes an unnamed object named
in the roundtrip. So here the object name is used
no matter it is empty or not, to keep unamed object
unamed.
Change-Id: Ib29a8fbc1fd67fa9a4a4efbfd0b2e9c4fb50de0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96908
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
|
|
Change-Id: I1c6a2852e4794529ec7d55ceae485196a8170e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97617
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Both the chart and the containing document has one, but the intention is
to insert this into the chart one.
This is needed, but not enough to render the right hatch for data
labels.
Change-Id: I485d84e2ae33728963b648c05e730d418567fc0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97569
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
to look for the
x.get() != null
pattern, which can be simplified to
x
I'll do the
x.get() == nullptr
pattern in a separate patch, to reduce the chances of a mistake
Change-Id: I45e0d178e75359857cdf50d712039cb526016555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I335e0c5cf7944efa487e4535a9e6a5baab2f36dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95140
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...where the get member function is defined on a std::__shared_ptr base class,
so loplugin:simplifypointertobool used to miss those until now. (While e.g.
using libc++ on macOS found those cases.)
366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool"
was mistaken in breaking isSmartPointerType(const clang::Type* t) out of
isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix
detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had
introduced that indivisible two-step algorithm on purpose.
The amount of additional hits (on Linux) apparently asked for turning
loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed
that the naive adivce to just "drop the get()" is not sufficient in places that
are not contextually converted to bool, as those places need to be wrapped in a
bool(...) functional cast now. If the expression was already wrapped in
parentheses, those could be reused as part of the functional cast, but
implementing that showed that such cases are not yet found at all by the
existing loplugin:simplifypointertobool. Lets leave that TODO for another
commit.
Besides the changes to compilerplugins/ itself, this change has been generated
fully automatically with the rewriting plugin on Linux.
Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|