Age | Commit message (Collapse) | Author |
|
The final set of these, nailing the 'handles'.
Again, most of the changes are mechanical
Change-Id: Ic65cec21db2366bcfa6ac40bcf9041b081c2ed71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153889
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
as for previous set, this time for TextRectangles
Again the data is mechanically search/replaced.
Change-Id: I836a0c8384d08da6d8c05cfc6ef9f55c1c90fc12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153885
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
as for previous set, this time for Calculations.
Again the size is mostly mechanical:
In vim load into a:
:+4,+4s/const_cast<SvxMSDffCalculationData\*>[(]\([^)]*\)[)],.*/o3tl::span<const SvxMSDffCalculatinoData>(\1),/
:+4,+4s/nullptr, 0/o3tl::span<const SvxMSDffCalculationData>()
and run
:%g/^const mso_C.*=/@a
(But has had some fixups after conversion from o3tl to std)
Change-Id: I11cdfffdfb61678c173d3136a8e948fd0c224af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153884
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
as for previous set, this time the GluePoints.
Again the size is mostly mechanical:
In vim into the A register:
:+9,+9s/const_cast<SvxMSDffVertPair\*>[(]\([^)]*\)[)],.*/o3tl::span<const SvxMSDffVertPair>(\1),/
:+9,+9s/nullptr, 0/o3tl::span<const SvxMSDffVertPair>()
and then:
:%g/^const mso_C.*=/@a
for the tables.
(But has had some fixups since switching from o3tl to std)
Change-Id: I966275caf38a6af469d334a0161053159e726f22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153883
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
EnhancedCustomShapeGeometry has a set of predefined shapes
defined with classic arrays and each is used in a structure
initialisation like:
const mso_CustomShape msoArc =
{
- const_cast<SvxMSDffVertPair*>(mso_sptArcVert), SAL_N_ELEMENTS( mso_sptArcVert ),
by using a span we can turn that into:
+ std::span<const SvxMSDffVertPair>(mso_sptArcVert),
There's potential to get rid of some numbered loops later as well.
The patch is large mostly because of mechanical replacement
Loading EnhancedCustomShapeGeometry.cxx into vim then:
into register A put:
:+2,+2s/const_cast<SvxMSDffVertPair\*>[(]\([^)]*\)[)],.*/o3tl::span<const SvxMSDffVertPair>(\1),/
and do:
:%g/^const mso_C.*=/@a
(since fixed up to std:: )
Change-Id: Ia670b6aa7cc9f662650de2af76ee271a4469f1f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153882
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
Change-Id: I8947a7b11a67397fdca36fb5087c2c1306b76b1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91315
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This reverts commit 1a6397030381a45f27ab7a2a02e6e6d0f9987c84.
Change-Id: Iaa706bb4ea3144ef57ab359b982400abc589b97e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90454
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Using SVX_DLLPUBLIC for both Library_svxcore and Library_svx had started to
cause failures with clang-cl on Windows now, presumably due to devirtualization:
> linectrl.o : error LNK2001: unresolved external symbol "protected: virtual void __cdecl SvxMetricField::DataChanged(class DataChangedEvent const &)" (?DataChanged@SvxMetricField@@MEAAXAEBVDataChangedEvent@@@Z)
> linectrl.o : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl SvxMetricField::PreNotify(class NotifyEvent &)" (?PreNotify@SvxMetricField@@MEAA_NAEAVNotifyEvent@@@Z)
> linectrl.o : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl SvxMetricField::EventNotify(class NotifyEvent &)" (?EventNotify@SvxMetricField@@MEAA_NAEAVNotifyEvent@@@Z)
> linectrl.o : error LNK2001: unresolved external symbol "protected: virtual void __cdecl SvxMetricField::Modify(void)" (?Modify@SvxMetricField@@MEAAXXZ)
> linectrl.o : error LNK2001: unresolved external symbol "private: virtual bool __cdecl SvxFillAttrBox::PreNotify(class NotifyEvent &)" (?PreNotify@SvxFillAttrBox@@EEAA_NAEAVNotifyEvent@@@Z)
> linectrl.o : error LNK2001: unresolved external symbol "private: virtual bool __cdecl SvxFillAttrBox::EventNotify(class NotifyEvent &)" (?EventNotify@SvxFillAttrBox@@EEAA_NAEAVNotifyEvent@@@Z)
> C:\lo-clang\core\instdir\program\svxcorelo.dll : fatal error LNK1120: 6 unresolved externals
Replacing certain uses of SVX_DLLPUBLIC with the newly introduced
SVXCORE_DLLPUBLIC (include/svx/svxdllapi.h) has been done on Linux as follows:
> git grep -w --line-number -e SVX_DLLPUBLIC --and --not -e '#define SVX_DLLPUBLIC' >LINES
to produce a file LINES containing all 640 uses. (Conveniently, all uses
happen to be on different lines.) Manually create a file TOKENS
with 640 corresponding lines, each containing the (class or function) name that
is made SVX_DLLPUBLIC by in the corresponding line in LINES. Then
> nm -D --def instdir/program/libsvxcorelo.so | grep -ivw '[vw]' | c++filt >SVXCORESYMS
> nm -D --def instdir/program/libsvxlo.so | grep -ivw '[vw]' | c++filt >SVXSYMS
> n=$(cat TOKENS | wc -l)
> for ((i=1;i<="$n";++i)); do
> tok=$(head -n "$i" TOKENS | tail -1)
> printf @
> grep -Fw "$tok" SVXCORESYMS >/dev/null && printf svxcore
> printf @
> grep -Fw "$tok" SVXSYMS >/dev/null && printf svx
> printf '@ '
> head -n "$i" LINES | tail -1
> done
to generate 640 output lines detailing for each SVX_DLLPUBLIC name occurrene
whether it is mentioned in exports from neither (@@@), only from svx (@@svx@),
only from svxcore (@svxcore@@), or from both libraries (@svxcore@svx@). The
numbers that gives is
10 @@@
180 @@svx@
424 @svxcore@@
26 @svxcore@svx@
The 10 @@@ ask for follow-up clean up, but most of them are just left as
SVX_DLLPUBLIC for now. The exceptions are sxv::ITextProvider
(include/svx/itextprovider.hxx) and SdrCustomShapeGeometryItem::PropertyPairHash
(include/svx/sdasitm.hxx, where PropertyPairHash is a member struct of
SVXCORE_DLLPUBLIC SdrCustomShapeGeometryItem). Keeping them as SVX_DLLPUBLIC
would cause "unresolved externals" errors when linking Library_svxcore on
Windows.
The 180 @@svx@ are fine to keep as-is, and the 424 @svxcore@@ need rewriting.
The 26 @svxcore@svx@ needed manual inspection to decide (in some cases, the
chosen name in TOKENS was a too generic function name like Fill, in other cases
it was the name of a class exported from one library but also mentioned in the
arguments of a function exported from the other).
And for sdr::table::SdrTableObj the class itself is defined in svxcore while the
static member functions ExportAsRTF and ImportAsRTF are defined in svx. But
MSVC does not allow to mark the class as SVXCORE_DLLPUBLIC and the two static
member functions as SVX_DLLPLUBIC, so move the two functions out of the class.
(There appears to be no real necessity that they were static member functions in
the first place; they don't even need to be friends of the class. Nevertheless,
this mixture of functionality from svxcore and svx in include/svx/svdotable.hxx
may ask for follow-up clean up, one way or another.)
All the output lines that need rewriting (all the @svxcore@@ ones, and the
manually picked subset of @@@ and @svxcore@svx@ ones) are copied into a new file
CHANGE (containing 451 lines). Then
> sed -E -e 's|^@.*@.*@ ([^:]+):([0-9]+):.*$|sed -i -e "\2 s/SVX_DLLPUBLIC/SVXCORE_DLLPUBLIC/" \1|' <CHANGE >COMMANDS
> . COMMANDS
to do the changes.
Change-Id: If9b6dd1c9e9ba2eb883dbdac4385d28c6fc8a203
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87794
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ib7e1d0f7483aa8b5cab320278714f2d5f36fdbd9
Reviewed-on: https://gerrit.libreoffice.org/72534
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I643e8686e015ca85dd96221f1c93038f4fddf27b
Reviewed-on: https://gerrit.libreoffice.org/61182
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
|
|
Change-Id: Ica0fe759db5ac9afca524f46ecfdb85368066403
|
|
and optimise some methods in bmpmask.hxx - they were unconditionally
returning true, so convert them to void return type.
Change-Id: If8b092a857ab80ead93112b0d627e41d5ccb3cf9
|
|
Change-Id: I2c280be12f36c1538e922286745aabc62482423d
|
|
Patch by: Jianyuan Li
Review by: alg
(cherry picked from commit 462656d2f30fade52e38094dcc2392f75b28ef79)
Conflicts:
svx/inc/svx/EnhancedCustomShape2d.hxx
svx/inc/svx/EnhancedCustomShapeGeometry.hxx
svx/source/customshapes/EnhancedCustomShape2d.cxx
Change-Id: Ifd1fdf1b79db8229b52db43b3c30f109a9930988
|
|
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details
Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
|