Commit Graph

254 Commits

Author SHA1 Message Date
Michael Stahl
fdd391f54e xmloff: document that AOO 4.1 has fixed the svg:d 'z' relative bug
Change-Id: I0f62101b7bc9de2281ade3eaaa0a38b16f4ccede
2015-07-15 16:34:29 +02:00
Andrea Gelmini
e544f449ed Fix typos
Change-Id: I020c7ce4d9aa93cb0292378a410cdb9f7788e920
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-07-08 12:21:19 +02:00
Andrea Gelmini
1c5f07e60c Fix typos
Change-Id: I98b4dfb0f72f315065693335e2f882bb2eed3afe
Reviewed-on: https://gerrit.libreoffice.org/16713
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03 09:14:23 +00:00
Andrea Gelmini
ae150c6a54 Fix typos
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8
Reviewed-on: https://gerrit.libreoffice.org/16314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-18 11:44:56 +00:00
Noel Grandin
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
Noel Grandin
dc28e90d20 fdo#84938: convert IMPORT_ constants to 'enum class'
Change-Id: Idaa8f07c62b3ba93c27ca5fe286720254baac10d
2015-01-06 10:59:41 +02:00
Stephan Bergmann
05575c31e1 xmloff: Use appropriate OUString functions on string constants
Change-Id: I349e0c2575d9a5154ac7002d129a1851a3df7687
2014-12-18 14:12:39 +01:00
Stephan Bergmann
513108bd57 xmloff: Use appropriate OUString functions on string constants
Change-Id: Idbe6ac27a4125bd9d9acb01ac42b60396abf0c81
2014-12-12 12:25:35 +01:00
Caolán McNamara
751e5b32c5 Resolves: fdo#84043 don't create duplicate Mirrored[X|Y] properties
regression from 13ef16423e

commit 13ef16423e
Author: Armin Le Grand <alg@apache.org>
Date:   Wed Nov 21 13:23:01 2012 +0000

    For backward compatibility take mirrorings in setTransformation into account

    Also found an error in SdrObjCustomShape::TRGetBaseGeometry when MirrorY was used

    (cherry picked from commit 4116c33b12d3787c406f0348f89efcb1cf409507)

Change-Id: I7bfb5dea32b8ab8498e3d92975c49b830c81e6fb
2014-11-27 11:33:09 +00:00
Michael Stahl
15b4ab8d19 cppuhelper: clean up public headers with include-what-you-use
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18 18:51:49 +01:00
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Caolán McNamara
c10548eaa9 coverity#704113 Unchecked return value
Change-Id: If6537d84953c67801bc1959e17dd3662cd1face7
2014-10-11 17:33:47 +01:00
Miklos Vajna
9835a5823e sw textboxes: reimplement ODF import/export
Turns out that for normal TextFrames and rectangular drawinglayer
shapes, the engine is written in ODF implicitly. Use the same trick to
describe if the shape content should be rendered by SW or editeng.

This reverts 9d310ecfce (sw textboxes:
implement ODF import/export, 2014-06-02).

Change-Id: Id8afa6368bedcd293e578244abb58e18949bec8d
2014-10-04 20:18:01 +02:00
Noel Grandin
23e1fc277d loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery
to maintain constness.
There is now a FIXME in sd/../docshell.cxx because I needed
to use a dynamic_cast there to work around the games it appears
to be playing with OLE in-place activation.

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx

Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
2014-09-23 17:27:47 +02:00
Joren De Cuyper
ccdd9a2c54 Further OUString cleanup in xmloff/
Change-Id: Ic749119931db569bf26c8d8a58da7d468811f927
Reviewed-on: https://gerrit.libreoffice.org/10598
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-07-29 12:44:23 +00:00
Caolán McNamara
19100e5e9a coverity#704112 Unchecked return value
Change-Id: Ic1147662012426126c1cfcf7cb496a3d03cab794
2014-07-03 14:52:29 +01:00
Noel Grandin
4ff115b3e7 drop UniReference in favour of rtl::Reference
since they're doing the same thing.

Change-Id: I76134b6b848db8628f315fe5bd9eb972a6bf0cb6
2014-07-02 15:23:52 +02:00
Zolnai Tamás
b7f2cad987 Revert "Make glTF support an experimental feature"
Actually make it experimental mode was unecessary on master.

This reverts commit 653bac184f.

Conflicts:
	sd/qa/unit/import-tests.cxx
	xmloff/source/draw/ximpshap.cxx

Change-Id: Ie8747745a9a89ce4d6500a35d15a98e28bda840a
2014-06-16 18:59:25 +02:00
Zolnai Tamás
4d8c4e7fe3 glTF import/export: fallback must be the second one inside the frame
The previous solution was good because older LO versions
import the fallback image without changing their code, but
it came out it does not fit to ODF standard so export
fallback image as the second object after the glTF model.

Change-Id: Ib9b2044b1f36b32d980cb79f6dac8dcf94d6209b
2014-06-16 12:59:19 +02:00
Zolnai Tamás
e8fcf1153f Change glTF mime type: {application -> model}/vnd.gltf+json
There is no an accepted mime type for glTF models yet, so
follow collada's mime type: model/vnd.collada+xml.

Change-Id: I1e23a95dbb0caea781dade819f8e08235cb5c1dc
2014-06-12 21:43:36 +02:00
Zolnai Tamás
653bac184f Make glTF support an experimental feature
Change-Id: I75e69ba1acafbab8362536f02f4d39a8fc2deed1
2014-06-12 21:43:36 +02:00
Zolnai Tamás
fe70101856 Introduce HAVE_FEATURE_GLTF to enable/disable gltf related code
When it is a release build then enable it only on Windows and
Linux.

Change-Id: I7c462aeb75e6ab60eeaa0fa42ca7853a6369b742
2014-06-12 21:43:35 +02:00
Miklos Vajna
c7c14abfd8 xmloff: fix import of tables inside textboxes inside shapes
We already had the concept of having a XML_TEXT_TYPE_SHAPE type (for
editeng-based text) and a XML_TEXT_TYPE_TEXTBOX (for Writer-based text),
but in case of draw:custom-shape, the previous was always assumed,
implicitly.

Check if the shape is marked as having a textbox, and if so, use the
XML_TEXT_TYPE_TEXTBOX handler, which makes e.g. the table import work.

Change-Id: I45f28b36df1836eeba89e9eef44c7abd87fcbd56
2014-06-02 18:21:32 +02:00
Peter Senna Tschudin
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05:00
Julien Nabet
227af32d8c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part18
Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225
2014-05-20 23:29:53 +02:00
Zolnai Tamás
b862a216f7 ODF filters: fallback glTF model to bitmap for older versions
Change-Id: I33161401a29f511e61429355dd2905d4643fe8ff
2014-05-16 16:24:10 +02:00
Laurent Balland-Poirier
3d2a17fd2e fdo#77451 Detect AOO 4.x for SvXMLImport::needFixPositionAfterZ
Old versions of OOo and AOO need a fix for Z paths. But AOO 4.0 did not
fix it neither.

Change-Id: I29af75035c7c059b69fcdc3a1ce27b617a30dbd1
Reviewed-on: https://gerrit.libreoffice.org/9012
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-05-08 19:54:02 +00:00
Michael Stahl
25a2eab227 fdo#77027: ODF import: fix wrong version in check for embedded objects
SvXMLImport::LO_4x does not mean 4.0+ any more.

(regression from 92cb21ebed)

Change-Id: Ib444762c2d6e4d051e99962eaff1b1ed34af983a
2014-04-16 00:33:22 +02:00
Noel Grandin
8a81f542a6 xmloff: sal_Bool->bool
Change-Id: I873c80baec8e70e3e8f642644563b92137571a30
2014-04-15 09:02:31 +02:00
Zolnai Tamás
f470f3c72e Introduce a new media shape property to handle mime type
Default mime-type for all media objects:
"application/vnd.sun.star.media"
The problem of missing mime-type detection
still exists. For now only glTF model has
a concrete type.

Change-Id: I4dca26c1c47a564579bbed926bffa3aa5eda6c04
2014-04-04 19:06:11 +02:00
Zolnai Tamás
e341ea3863 ODF import of glTF 3D models
Change-Id: I42f7bc63c1f75592ab628407b40d40536e58f18c
2014-04-02 12:15:51 +02:00
Noel Grandin
0e8ab0fa29 xmloff: sal_Bool->bool
Change-Id: Ib4a73215187923dccd72fc7793ffd4bcbef24ab9
2014-03-31 12:39:02 +02:00
Noel Grandin
ba6cfaaa6b xmloff: sal_Bool->bool
Change-Id: Idc7b0ef2591e65e82903d55af68434acbeca0e55
2014-03-31 12:37:25 +02:00
Miklos Vajna
4da81e4a0b xmloff: import style:rel-width/height for drawinglayer shapes
In case the underlying UNO object supports that, which is the case for
Writer. Export was already working before.

Change-Id: I4676c8349ebe1959da004d6e1a024a342da45049
2014-02-25 12:11:41 +01:00
Stephan Bergmann
b7259532d8 Remove unnecessary bool2any
Change-Id: Ie2caee1d5a7912011d76172539c2f8f37eaee5cf
2014-02-24 08:08:00 +01:00
Caolán McNamara
04a8c9eef4 coverity#708707 Uninitialized scalar field
Change-Id: I36432d090334440b596dfcc56339f10cb0b96426
2014-02-21 12:40:34 +00:00
Stephan Bergmann
05f742d28b comphelper: sal_Bool -> bool
Change-Id: I6fc331ae0706f4bb193543011c8d4ae0a385fcc0
2014-02-17 17:55:19 +01:00
Noel Grandin
746028f5c5 cid#705343 missing break in switch
Change-Id: I0fe11a71223c15937917a1a06a9078e856f0f67f
2014-02-12 08:59:08 +02:00
Armin Le Grand
258e6f93e8 Resolves: #i124143# for draw:frame containing multiple draw:image...
and draw:glue-point it is necessary to move the GluePoints from the last
draw:image where they were automatically imported to the surviving one if these
are different

(cherry picked from commit c011af1087411a9bacd29cd479c807e698b2e92c)

Conflicts:
	xmloff/inc/xmloff/xmlictxt.hxx
	xmloff/source/core/xmlmultiimagehelper.cxx
	xmloff/source/draw/ximpshap.cxx
	xmloff/source/draw/ximpshap.hxx

Change-Id: I8f6c875767e9cbfee74838742401356df002b051
2014-02-05 11:36:35 +00:00
Stephan Bergmann
fa189d7447 bool improvements
Change-Id: I238ab0ebe54cc804c85356a3de9fbdcc396057d3
2014-01-28 20:26:18 +01:00
Caolán McNamara
df2ad69d5d Resolves: fdo#73814 wrong name for drawing::PointSequenceSequence property
examining svx/source/unodraw/unoprov.cxx "Geometry" is a
indeed a drawing::PolyPolygonBezierCoords for the BezierShapes
and a drawing::PointSequenceSequence for the PolyShapes

regression since e44335abe0 because after
223f6b631c we started getting
drawing::PointSequenceSequences in maPath which is the wrong type for the
argument to property "PolyPolygonBezier" for those shapes.  Which led me to
incorrectly assume that the all PolyPolygonBezier properties were named
"PolyPolygonBezier" which isn't the case.

so reverting the non maPath hunks of e44335abe0

Change-Id: I013a66778d11a472fc4567e53a9e17e73e2b91ce
2014-01-27 11:14:36 +00:00
Caolán McNamara
b663316e83 Resolves: fdo#73355 reconcile legacy path bug detection
reconcile
 "223f6b631c1b087754c0f9051fb55f029f2503ce
    Resolves: #i123433# Detect pseudo-vertices at svg import..."
with
 "7a19798c73fd39d8d69ff6364f0696e68cdd1381"
    Compatibility option for incorrect relative moves after closePath (fdo#47406)
and
 "a2ee8055e9c136923f0244fe289cac6377933c31"
    Fix fdo#47406 incorrect relative moves after closePath

Change-Id: I1221099a40500aeb4165a3350d8ae2df1fd3111b
2014-01-24 12:56:09 +00:00
Noel Grandin
909b27df48 remove unnecessary double calls to OUString constructor
Change-Id: Ib2690e3ec9987b97363687b61fe8ddae4ace9058
2013-12-17 11:49:04 +02:00
Stephan Bergmann
5668e73beb avmedia: Implement "block untrusted referer links" feature
See f0a9ca24fd "rhbz#887420 Implement 'block
untrusted referer links' feature" for details.  This adds some further /*TODO?*/
comments, and one known problem (marked /*TODO!*/) is that movies/sounds are not
blocked during a slideshow presentation.

Change-Id: Ib2d0c7e4f7b02c4bdec0d8a90cee5e7e1bee8325
2013-11-20 14:44:27 +01:00
Stephan Bergmann
f0a9ca24fd rhbz#887420 Implement "block untrusted referer links" feature
For now, this checks for a trusted referer (if the BlockUntrustedRefererLinks
configuration prop is set) in utl::MediaDescriptor::impl_openStreamWithURL and
SvxBrushItem::GetGraphicObject.  Checking in additional places will probably be
necessary to block /all/ unwanted communication.  Also, some places marked
/*TODO?*/ currently pass in an empty referer (which is always considered
trusted) and will probably need to be adapted.

Ideally, Referer URIs would never be empty (and consistently use something like
<private:user> for cases where access is explicitly initiated by the user and
should never be blocked), but that's a very daunting task, so start small by
identifying the places that potentially need blocking and adding appropriate
Referer URIs there.  Also, Referer information should always be computed as
freshly as possible from the context in which an access attempt is made, but,
again, always carrying the information from the context all the way to the
relevant functions is a very daunting task, so for now store the information
upon object instantiation in some cases (SvxBrushItem, SdrGrafObj, ...).

The Referer URI (css.document.MediaDescriptor property; SID_REFERER) was already
used to track macro execution, and there is one place in
SfxApplication::OpenDocExec_Impl where opening of hyperlinks (explicitly clicked
by the user) is done that needs the current document's URI as Referer to check
execution of macro URIs but needs an empty (or <private:user>, see above)
Referer to not block non-macro URIs.  Special code has been added there to
handle that.

Change-Id: Iafbdc07a9fe925d9ee580d4f5778448f18f2ebd9
2013-11-14 11:13:25 +01:00
Noel Grandin
39c8da8c86 remove unnecessary sal_Unicode casts in XMLOFF module
Change-Id: I836c7a28d5ec9039c0b185e8db2aa6d01ac62566
Reviewed-on: https://gerrit.libreoffice.org/6665
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-11-14 06:16:12 +00:00
Norbert Thiebaud
21123da759 xmloff: include <> for external includes
Change-Id: Ic92d0121e928041bcff00b12706f794a4d8e25c8
2013-11-11 22:37:28 -06:00
Noel Grandin
0a9ef5a18e convert OUString 0==compareToAscii to equalsAscii
Convert code like:
   0 == aStr.compareToAscii("XXX")
to
   aStr.equalsAscii("XXX")
which is both clearer and faster.

Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11 12:58:12 +02:00
Stephan Bergmann
dc704d724f Directly use OUString
Change-Id: I9029bab2b0ab98a2d78166145a35792e298c9115
2013-11-01 14:56:48 +01:00
Caolán McNamara
e44335abe0 Related #i123433# PolyPolygonBezier must be drawing::PolyPolygonBezierCoords
Change-Id: Idc7e0a2651f2e0b499bbf8b8443ffb84b54a45b6
2013-10-31 15:56:14 +00:00