Changed quite some places of SdrObjCustomShape usage to use
references instead of pointers, thus forcing to more secure
handling. Changed some test and change methods, even found a
memory leak by doing so.
Change-Id: Iba76037a3c54af50bb05e6bd63d7ad04624665a7
This is preparing to change how GraphicManager works where it
won't base itself around GraphicObject anymore but Graphic. No
functional or cosmetic change was made to the classes, only
changes that were needed because of the move and rename.
The only thing that wasn't moved is the GraphicRenderer as it
is not needed in vcl for now (but makes sense to move it in the
future to keep graphic stuff together).
grfmgr was renamed to GraphicObject as the GraphicManager will be
changed a lot and most likely moved out, so the name grfmgr won't
make any sense anymore.
All the UNO implementations were renamed with a prefix Uno and
used the same name as the class name. This is made to be more
specific which are the Uno objects (for example graphic.cxx
contained the implementation of XGraphic, which is similar to
graph.cxx contains Graphic).
Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137
Reviewed-on: https://gerrit.libreoffice.org/51068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This moves BackGraphicURL, HeaderGraphicURL, FooterGraphicURL and
ParaBackGraphicURL properties to BackGraphic, HeaderBackGraphic,
FooterBackGraphic and ParaBackGraphic. With this the property type
changes from String to XGraphic.
This change also fixes a bunch of test failures, changes the tests
to use the new properties and the correct type, changes the import
and export filters like xmloff and oox, to make the tests happy.
Change-Id: Ie66097514203c6dc36ab27420faf265322e9279e
Reviewed-on: https://gerrit.libreoffice.org/50760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
We still used "GraphicURL" when exporting a shape, but as it is
being replaced, change that to use "Graphic" property instead.
Change-Id: Ia2b6bdacf0e28de6cfe2eaa36e5b558250ebee8e
Reviewed-on: https://gerrit.libreoffice.org/50142
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
LibreOffice doens't distinguish between sideWall and backWall.
It is controlled by the same Wall property.
Change-Id: If1919cf0a9bad3e80544cc5b2ae0f40f606febeb
Reviewed-on: https://gerrit.libreoffice.org/49429
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
For 2D charts Plot Area equivalent is Chart Wall.
Unfortunately LibreOffice doesn't have Plot Area equivalent for 3D chart.
It means that Plot Area couldn't be displayed and changed for 3D chars in LibreOffice.
We cannot write Wall attributes into Plot Area for 3D charts, because Wall us used as background wall.
Change-Id: I16d3b326571c1e411a094ec799e20c7aeeb2c1d4
Reviewed-on: https://gerrit.libreoffice.org/49428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
MSO requires to save fontScale attribute to have
all the text shown properly (with FitToSize property)
Values are approximated, after any modification in MSO
scale is recalculated.
Change-Id: I73657fdd663b540b436747cfeeef3c76e8fe388c
Reviewed-on: https://gerrit.libreoffice.org/49742
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
the plugin because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better
This reverts commit 457220bc2c.
Change-Id: I2c6b1092c8bfa4fa14acbc7445f546d43cb2a86e
Reviewed-on: https://gerrit.libreoffice.org/49833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
With GraphicURL property on shapes (XShape) we transported the
external or internal URL to the model, which also included the
GraphicObject uniqueID style URLs. This changes that - now we
always use "Graphic" property and transfer XGraphic to and from
graphic filters. "Graphic" property is already present for XShape
so it wasn't needed to add it.
Filters changed are: OOXML (oox), ODF (xmloff), RTF and
binary MS (esherex).
Also start using originURL on Graphic which now transports the
URL of the external (linked) graphic/image if it was created that
way.
Change-Id: Ic338c60b7cfaaae354cf1e1ca3ae7a6373220230
Reviewed-on: https://gerrit.libreoffice.org/49648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Based on OOXML implementation in MS Excel,
if Minor axis Unit is set to automatic,
then during chart import, LibreOffice should set
Interval Count to 5, to mimic behaviour of MS Excel.
Becaues default Interval Count for LibreOffice is 2,
we need to override it to 5.
With that solution, the Minor axis unit is preserved
also after saving to .ods file format.
During .xlsx export, if Interval Count is set to 5,
then treat is as automatic axis unit.
Change-Id: Iab9209fb3950ef73e79229329606363b528d35fe
Reviewed-on: https://gerrit.libreoffice.org/49327
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
When we have shape definition for commend, eg.:
<v:shape id="_x0000_s1026" type="#_x0000_t202"
the "type" must be specified previously, eg:
<v:shapetype id="shapetype_202" coordsize="21600,21600" o:spt="202" path="m,l,21600l21600,21600l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype
Unfortunately here is the problem, "id" of "v:shapetype" is "shapetype_202".
It means that type used by shape type="#_x0000_t202" is not exisiting.
To fix that issue I have changed "v:shapetype" id to be exactly the same as it is used:
<v:shapetype id="_x005F_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600l21600,21600l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype>
After that fix, comments are displayed correctly.
I also added unit test, to make sure that shape is using already defined "shapetype".
Change-Id: I8faf1befe7573aa33ee8a294eb192e5e255f37a1
Reviewed-on: https://gerrit.libreoffice.org/47821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
As we want to get rid of GraphicObject URLs for the more robust
image life-cycle handling, it was necessary to change the way
bitmap table stores and handles images, so that they always
store a Graphic object (wrapped in UNO object that provides the
XGraphic and XBitmap interface).
In addition this changes loading and saving from ODF (xmloff) and
OOXML (oox) filters so they don't depend on GraphicObject URL
anymore, but load or save directly to / from XGraphic or XBitmap.
Change-Id: I2b88e10056e7d6c920249d59188f86b1a5a32d21
Reviewed-on: https://gerrit.libreoffice.org/49074
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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: I8fd61e3220a4b9e08d4f97acde28600f31d448ca
During export chart into .xlsx file,
the information about size of legend was not saved.
Example of proper size:
<c:w val="0.41459448854442293"/>
<c:h val="0.23161616722845749"/>
another issue was hardcoded "layoutTarget" which
was always "inner":
<c:layoutTarget val="inner"/>
also properties regarding default text style was not preserved:
<c:txPr>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:pPr>
<a:defRPr sz="900" b="0" i="0" u="none" strike="noStrike" kern="1200" baseline="0">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="65000"/>
<a:lumOff val="35000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:pPr>
<a:endParaRPr lang="pl-PL"/>
</a:p>
</c:txPr>
With this patch all these issues was resolved, and in case
of layoutTarget "outer", the field is not availble at all,
according to specification.
Change-Id: I2c9b7a112bdd911542b5273e660222d7fefa2d88
Reviewed-on: https://gerrit.libreoffice.org/47358
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
This solution comes with a few limitations. The bullet isn't centered in
Powerpoint and has to be between 25% and 400% of the size of the first
character in the paragraph. This isn't optimal, but should produce
acceptable results under most circumstances.
Change-Id: I6c37169282aa351b81d78e06678424203b78f6d7
Reviewed-on: https://gerrit.libreoffice.org/44911
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
When exporting to pptx from LO, the background color of
the hatching is preserved. The default background, when no
hatch background is set is transparent.
Change-Id: Ie44c89a9ce54eef49100b3e7b376c27c1a952fcf
Reviewed-on: https://gerrit.libreoffice.org/46098
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>