Commit Graph
274 Commits
Author SHA1 Message Date
Johnny_M cc39342305 Translate German function names
Akt -> Current in ppt filter

Change-Id: Id32efb885e5e1b04c7fd8f3ce0f21537b2e7576c
Reviewed-on: https://gerrit.libreoffice.org/51800
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-03-28 18:11:10 +02:00
Miklos Vajna 6d05579c7f msfilter: extract duplicated WriteHex() from HTML/RTF filter
The RtfAttributeOutput one is a superset of the HTML one, so use that.

Change-Id: I3e342113a7ba26946320f43a164e457d6cbb6946
Reviewed-on: https://gerrit.libreoffice.org/51937
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-27 15:00:07 +02:00
Miklos Vajna 679a3b9314 msfilter: extract copy&pasted RTF code from sw and writerfilter
Both the hexdump and the OLE1 reader can be shared.

Change-Id: I97d72a8deeb9c79fc8e8c4a73c613213badfa744
Reviewed-on: https://gerrit.libreoffice.org/51783
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-23 15:46:25 +01:00
Noel Grandin 59e68b30d6 loplugin:useuniqueptr in PPTStyleTextPropReader
Change-Id: I5110ef58302323a59b52cc5451ddba4caa00b6d9
Reviewed-on: https://gerrit.libreoffice.org/51553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-20 07:49:40 +01:00
Armin Le Grand 86c4672f46 OperationSmiley: Secured quite some places using CustomShape
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
2018-03-17 23:15:49 +01:00
Tomaž Vajngerl 531036fa29 change EscherBlipCache to cache Graphic and not GObject uniqueID
In addition change from map to unordered_map.

Change-Id: Ief33d6ebd7e42606ab20fcf9fc91020b1ef9aab6
Reviewed-on: https://gerrit.libreoffice.org/51306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-15 03:02:57 +01:00
Luke Deller fe6da2feb5 tdf#116179 Support reading "auto" colour from docx
In docx a colour value is represented as a 6-digit hex RGB value, or
alternatively the word "auto" to represent automatic colour.

 - Add support for reading the value "auto" as COL_AUTO.  Previously
   this would be read as if it were a hex value, stopping at the
   letter 'u' which is not a valid hex digit, resulting in the colour
   0x00000A - a very dark blue, which looks close enough to black that
   it went unnoticed for a long time :-)

 - Remove code which tried to handle this wrong 0x00000A value,
   including the constant OOXML_COLOR_AUTO, as it is no longer needed
   and will cause surprises for anyone who really wanted this exact
   shade of dark blue

 - Fix unit tests that were checking for 0x00000A

Change-Id: I6000070341931147ff9341ad6281cd3b53c02b46
Reviewed-on: https://gerrit.libreoffice.org/50995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-13 14:06:13 +01:00
Tomaž Vajngerl 7fbb96c2fb Move (and rename) graphic stuff from svtools to vcl
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>
2018-03-11 13:37:21 +01:00
Tomaž Vajngerl 347630dde3 escherex: export graphic without GraphicObject uniqueID
Change-Id: Ibf8858ca890b82d5a3ddb8b026a0a4dd03bc9072
Reviewed-on: https://gerrit.libreoffice.org/51021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-10 14:31:47 +01:00
Johnny_M c92af727f7 Translate German variable names
Akt -> Current in ppt filter

Change-Id: I06f140d5f9a60b53d815e73ee0b7a2b283a52d79
Reviewed-on: https://gerrit.libreoffice.org/50684
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-05 19:54:43 +01:00
Noel Grandin 4245454d0c loplugin:useuniqueptr in SdrPowerPointImport
Change-Id: I9a8d1669cbd94f73dc75e4b7339910f8201e06aa
Reviewed-on: https://gerrit.libreoffice.org/50695
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 12:44:32 +01:00
Noel Grandin 3f1b05d32a loplugin:useuniqueptr in PPTTextSpecInfoAtomInterpreter
Change-Id: I42e0fdb53b5a7504f2ac7fcf5d227a9c7378a6ca
Reviewed-on: https://gerrit.libreoffice.org/50696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 10:16:34 +01:00
Noel Grandin 9110118117 loplugin:useuniqueptr in PPTExtParaProv
Change-Id: I8013b0b6c75eca6426389a3d5ac8e4d7bf31ef4d
Reviewed-on: https://gerrit.libreoffice.org/50697
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 07:29:06 +01:00
Noel Grandin f72b5d4b9a loplugin:useuniqueptr in SdrEscherImport
Change-Id: Id37c4cb7a8eb88b2f83ed0bfb4b72fe38a128096
Reviewed-on: https://gerrit.libreoffice.org/50694
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 07:28:56 +01:00
Noel Grandin cab19696ce loplugin:useuniqueptr in SvxMSDffManager
Change-Id: I2e3ef185d370ccacc0d1e99b5f9e732a829fdc55
Reviewed-on: https://gerrit.libreoffice.org/50693
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 07:28:43 +01:00
Caolán McNamara 135d7fe4bb ofz#6723 Bad-cast
Change-Id: I5806e1bbc1a03984d411f222e8c01405bc767fc5
Reviewed-on: https://gerrit.libreoffice.org/50744
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-04 21:48:17 +01:00
Noel Grandin 477d2ba662 delete colordata.hxx
move what we still need into color.hxx

Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350
Reviewed-on: https://gerrit.libreoffice.org/50561
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02 09:18:19 +01:00
Noel Grandin 97448039e1 use less RGB_COLORDATA
part of removing ColorData

Change-Id: If31b5b88545529863377e9a178f45f4516bf6cbb
Reviewed-on: https://gerrit.libreoffice.org/50345
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 16:11:58 +01:00
Noel Grandin 91db89b73c loplugin:useuniqueptr in SvxMSDffSolverContainer
Change-Id: Ied7b60ac59cf1c869232a96e1b2ccb4e1b5cbf53
Reviewed-on: https://gerrit.libreoffice.org/49945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 10:15:18 +01:00
Noel Grandin bcb1e01c32 ColorData->Color in filter
Change-Id: I19675b635d8428a78c9e64b775cc7a2b82c5f84e
Reviewed-on: https://gerrit.libreoffice.org/50039
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21 06:05:28 +01:00
Tomaž Vajngerl 7de3ea6a00 Pass GraphicObject instead of UniqueId for GetBlibID
Change-Id: I49d0c84a5beb4f8bf33c3ebac6ddc8ae302c6a4c
Reviewed-on: https://gerrit.libreoffice.org/49645
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-13 20:29:02 +01:00
Manuj Vashist 68d9583db4 tdf#108523 Removed @author annotations.
Change-Id: I6a60128c413beab6cabb857c073607e15ddbc98f
Reviewed-on: https://gerrit.libreoffice.org/49215
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-05 11:19:23 +01:00
Caolán McNamara 2372003d94 Resolves: tdf#114221 generate both std97 and cryptoapi keys from password..
when we open a cryptoapi encrypted binary msoffice document. That way when we
save as the same format, and try to reuse the generated keys for encryption, we
have matching std97 encryption keys available because we always export using
that scheme.

Change-Id: I25f24a01d102242615768255ce888acb08ef6447
Reviewed-on: https://gerrit.libreoffice.org/48680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26 16:44:43 +01:00
Caolán McNamara 6d5e2ca07f drop GetPageSize no-op function
which used to have some commented out stuff which considered changing
the size, but was all removed ages ago

Change-Id: Iff62a71e9b7d31acb16016b5e72d168327111ce7
Reviewed-on: https://gerrit.libreoffice.org/48583
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-25 16:59:18 +01:00
Miklos Vajna 2cd6c4fb99 filter: fix dbglevel=2 build of msfilter
Change-Id: Ifb6747f170d7c9928d07cebb0918fdb329e96dbf
Reviewed-on: https://gerrit.libreoffice.org/47778
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-12 13:07:59 +01:00
Noel Grandin c26bdf54e0 remove dead eeitemid.hxx
and inline the couple of constants still in use from it

Change-Id: Icb9f5690b5649140bc0503a8917e6a0f764e3d9c
Reviewed-on: https://gerrit.libreoffice.org/47404
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05 07:38:01 +01:00
Caolán McNamara 85cbefac5b migrate to std::unique_ptr
Change-Id: I4986d3e2893554bc875e64a1f27f9203814f4d55
Reviewed-on: https://gerrit.libreoffice.org/47374
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-04 22:05:31 +01:00
Caolán McNamara e26f2f3367 ofz#4943 Direct-leak
Change-Id: I45b7c6befadda58d7919732597647b9e2cbd46d8
Reviewed-on: https://gerrit.libreoffice.org/47373
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-04 22:03:46 +01:00
Noel Grandin 4b030651a0 loplugin:passstuffbyref improved return in various
Change-Id: I0a8282d8e0d9575b055243073fc89a7d6b67b560
Reviewed-on: https://gerrit.libreoffice.org/47173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29 18:19:37 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Noel Grandin eaf89e477a loplugin:countusersofdefaultparams in editeng..package
Change-Id: I4c20235a04d9ab5ea5edbb6b1b2413677b18a305
Reviewed-on: https://gerrit.libreoffice.org/45795
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:33 +01:00
Noel Grandin 2e5508a176 loplugin:unnecessaryparen check for (f1()).f2
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3
Reviewed-on: https://gerrit.libreoffice.org/45218
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27 10:44:25 +01:00
Miklos Vajna fd61509152 RTF filter: drop now redundant astyle.options
I (tried to) keep the RTF filter style consistent locally with astyle in
the past, but now that's redundant when we have an enforcing
clang-format mechanism in place. So drop the astyle config and switch to
clang-format in the RTF filter case.

To minimize backport pain, do this shortly before the libreoffice-6-0
branch-off.

Change-Id: I708dbeb0b5ad2afacc90029ee5abba9495f4601f
2017-11-22 11:24:24 +01:00
Noel Grandin e2655495d5 convert nDrawingContainerId to sal_uInt16
which is all that can be stored anyhow

Change-Id: Iaec28a97ed25004715accafc0cbd4bd620bfbba9
Reviewed-on: https://gerrit.libreoffice.org/44360
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-07 07:33:05 +01:00
Noel Grandin da90193c8c loplugin:constparams in filter
Change-Id: I9fc76693da88d74b6fe7bbb920b8e731b82be298
Reviewed-on: https://gerrit.libreoffice.org/44260
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04 07:46:58 +01:00
Noel Grandin 7383ab5170 loplugin:constantparam in f*
Change-Id: I87145db3af6c3eb180cea6b4244f98b00205a306
Reviewed-on: https://gerrit.libreoffice.org/44095
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31 13:29:03 +01:00
Noel Grandin 8f8a1e301c use std::unique_ptr in EscherSolverContainer
Change-Id: I46d10aec5b69d120dfca8fea076013664cbb3278
Reviewed-on: https://gerrit.libreoffice.org/43527
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-20 08:50:25 +02:00
Chris Sherlock 4d94541a7b Make Color a forward declaration
Change-Id: Ib28833555661b119de8e967b05e3c8691fca826a
Reviewed-on: https://gerrit.libreoffice.org/43227
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-10-08 04:48:46 +02:00
Stephan Bergmann 7f0bf6220b Revert "check for unnecessary DLLPUBLIC annotations"
This reverts commit a599eeab78, plus follow-up
fa4431449d "Avoid bogus loplugin:dllmacro
'unnecessary *DLLPUBLIC declaration ...'".  See (abandoned)
<https://gerrit.libreoffice.org/#/c/42983/> "loplugin:dllmacro: Handle implicit
member functions" how this would have needed to be extended to give consistent
results across Linux and macOS, but then would have started to remove DLLPUBLIC
from entities that apparently need to at least have default type visibility on
macOS and started to make tests fail.
2017-10-04 13:45:39 +02:00
Noel Grandin a599eeab78 check for unnecessary DLLPUBLIC annotations
on classes which are fully defined in a header file

Rename the dllprivate plugin to dllmacro and add the functionality
there.

Change-Id: I4581d551c46a8f61213d95973f323359d08278d8
2017-09-29 10:37:47 +02:00
Caolán McNamara 7e8c38b697 ofz#2538 avoid oom
Change-Id: Ief86805a1d8c010826351d7b701678ee2945770d
Reviewed-on: https://gerrit.libreoffice.org/42466
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-19 14:50:17 +02:00
Julien Nabet 758f021601 bBObjIsTemporary is never read
since 2010-02-11
author	Armin Le Grand <Armin.Le.Grand@Sun.COM>	2010-02-11 16:35:16 (GMT)
committer	Armin Le Grand <Armin.Le.Grand@Sun.COM>	2010-02-11 16:35:16 (GMT)
commit	a9626fc825 (patch)
tree	989109ecba
parent	a4d83adbf0 (diff)
aw079 #i99386# cleanup of define and last change from CL

see https://cgit.freedesktop.org/libreoffice/core/commit/?id=a9626fc825840c49fd3135fbf4818e276cd347cb

Change-Id: Ib430ddb01b40e1c2d0ef3b888ebb94ebf073b88c
Reviewed-on: https://gerrit.libreoffice.org/42024
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-06 23:42:38 +02:00
Jochen Nitschke 31ee13b5a4 convert SHAPEFLAG defines to scoped enum ShapeFlag
they were defined in escherex.hxx as SHAPEFLAG_*
and in msdffimp.hxx as SP_*.

Added include for escherex.hxx to msdffimp.hxx.
Filled the missing flag bits.
ShapeFlag::Deleted is not used at the moment.
Convert ADD_SHAPE macro to lambda.
Fix horizontal/vertical mixup in RtfSdrExport::AddLineDimensions.

Comments for flag Connector were wrong. The flag applies to shapes
which ARE connectors.
MSO definition: "connector: A line that is used to connect two
or more shapes and that remains connected to those shapes."
So Rectangles and such with Connector flag don't make sense.

Change-Id: I735de00110411b280a302840dc0fcdfac5156399
Reviewed-on: https://gerrit.libreoffice.org/41754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02 14:10:40 +02:00
Jochen Nitschke b2d7a11835 replace magic numbers for ppt view types
Change-Id: I0cd234cd039a2117fe49e6de3461becdbfa07e30
Reviewed-on: https://gerrit.libreoffice.org/40475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-27 09:32:13 +02:00
Tamás Zolnai 2d1fe7fb67 Fix two issues in ActiveX DOCX import / export code
* Inline anchored VML shape had wrong vertical position
** In MSO inline shapes are positioned to the top of the baseline
* During export all shape ids were the same (shape_0)
** VML shapes used to be exported only as fallback,
   I guess that's why it did not cause any issue before.
** Override the shapeid generator with a new one, which
   actually generates unique shapeids.

Change-Id: I752f39d092d0b61d91824141655dae662dbeafbc
Reviewed-on: https://gerrit.libreoffice.org/41319
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-22 07:53:36 +02:00
Noel Grandin a209172669 loplugin:constantparam
Change-Id: Ib92aba17c46a4ada75c2a0630f281759d995f32e
Reviewed-on: https://gerrit.libreoffice.org/40843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08 08:08:35 +02:00
Noel Grandin fdd2f46307 rename Anz->Cnt in filter
Change-Id: Ic6a8b8a5504052469b232767f5671d532c2fe5f3
Reviewed-on: https://gerrit.libreoffice.org/40741
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04 08:48:17 +02:00
Noel Grandin 9fd9d25d04 loplugin:constparams in filter
Change-Id: I938375bd3072dbc00e4b8c2e6d53c5c4c6ef0e7c
Reviewed-on: https://gerrit.libreoffice.org/40580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 10:25:42 +02:00
Noel Grandin 00c9cb7318 loplugin:constparams in filter
Change-Id: I0ba463fcaff4c449f762a7969e0feab659b37adf
Reviewed-on: https://gerrit.libreoffice.org/40471
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 10:49:12 +02:00
Noel Grandin 61e8788d1b convert pXRelTo/pYRelTo to boost::optional
seems wasteful to be allocating a single int for this

Change-Id: I8e1122fec8c8dc90805a38b677a1e08cd89a66ff
Reviewed-on: https://gerrit.libreoffice.org/39917
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13 20:36:46 +02:00