Commit Graph

43 Commits

Author SHA1 Message Date
2b243ba51e Support regression curve name in ODF.
Change-Id: Ic065d63eee507906febfa15eb6d5ae1e7de58280
2013-11-24 19:43:17 +01:00
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
5ce50b8d17 Respect svg:font-face-format element.
Call libeot to parse font if value "embedded-opentype" is found.

Change-Id: I03a072fd4db47d151a3934e959ad17c1e24fcf09
Reviewed-on: https://gerrit.libreoffice.org/6144
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-11-13 14:37:53 +00:00
d6fec4ba5d fdo#65108 inter-module includes <> include/xmloff
Change-Id: I1d2da1dd3c82e95b8ad4883ce83b42f6dcb6200f
2013-11-09 18:48:45 -06:00
8b8ef8d633 Remove the xmloff::token::ResetTokens race condition
...where multiple parallel calls to xmloff::token::ResetTokens or
xmloff::token::GetXMLToken can see dangling pOUString pointers.  There is no
point in releasing this (bounded) amount of memory referenced from global
aTokenList, anyway.

There is still a race when parallel calls to xmloff::token::GetXMLToken write to
a pOUString pointer in parallel, but that's more harmless, and maybe calls to
GetXMLToken are synchronized by Solar Mutex?  Calls to ResetTokens (e.g., via
URP remote release request -> ~ScXMLExport -> ~SvXMLExport) were definitely
/not/ synchronized via any mutex.

The xmloff::token::Inc/DecRescheduleCount functions are now pointless and have
been removed, too.

Change-Id: I85905d4de1f042ed5c9a37589f942910d8ef80fd
2013-10-31 12:45:04 +01:00
b95ee1be9b fixincludeguards.sh: include/xml*
Change-Id: Iffab819621615c59709c087202cc578af00dd799
2013-10-23 23:22:28 +02:00
db9d9c1277 Bin some pointless comments
Change-Id: Ia7c5b1654f3decc549b363c4443863f40c3f26e6
2013-10-22 22:56:43 +03:00
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
94755bd8f2 Combine a pointlessly split class implementation and bin unused private field
Change-Id: I44cee32e256e0767bb3b40bdba93e15b717c9ba6
2013-10-13 14:36:21 +03:00
d87cb77b42 Resolves: fdo#68431 style:font-name unknown in non autostyles in impress/draw
Change-Id: Ib904af4fac5659821ba3b5dbbf62370df8243001
Reviewed-on: https://gerrit.libreoffice.org/5810
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-17 19:17:34 +00:00
0825d0cb76 sal_Bool to bool
Change-Id: Id32780e5cb565e85f0366a91282ce085ed7d2f3c
2013-09-16 15:08:18 +02:00
b69d152cfa fdo#68839: ODF import: fix name of multi-image frame
When multiple image child elements are inside a frame, each one is
imported and gets unique name via SwDoc::SetFlyName().  But the
retained one is not necessarily the first one, which is the only one
that may have the original name.

Also the solveMultipleImages needs to return a smart pointer, as nothing
else keeps the image contexts alive.

(regression from 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70)

Change-Id: I28a8a752f3eed176cc2ebb4c9af11a0dd4d18ea6
2013-09-03 00:54:14 +02:00
fa94ca9a84 ODF export/import of fine dashed border style
Change-Id: Ia81385dd9952e90cd5ebb3d1bba38aff6f84d079
2013-08-23 21:01:38 +02:00
21661ebfbe fdo#60740: Populate auto styles from edit cells without using UNO API.
Not using UNO API here alone made this code fly.

Change-Id: Ib3eff168bbe49e49fb413909b7a14057f808cdf9
2013-08-21 19:24:04 -04:00
dfee01afdf this Find is not actually implemented
Change-Id: I0d8e8903bdc5943079c6ed9f123e2fca2f72467f
2013-08-20 11:37:58 +01:00
47e24bfed8 CharBrd 8.1: ODF filters
Change-Id: Ib1a79678ffce7764638378b4002f5e87ae749d00
2013-08-18 09:49:49 +02:00
7c02faf535 Properly hide implementation details.
If we are to hide, let's hide all.

Change-Id: Ic68926ee099ac80d2d477d68e3769a7203dfea6c
2013-08-16 21:31:44 -04:00
643db96e93 add character shading value to ODT filters
The attribute is only exported for ODF versions > 1.2; use the new
loext (LO_EXT) namespace.

Change-Id: Ie44e4b851c4adf52d8cc4fc2cbe37d6c3a9941d8
Reviewed-on: https://gerrit.libreoffice.org/4830
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
Tested-by: Thorsten Behrens <tbehrens@suse.com>
2013-08-14 16:03:07 +00:00
de9b067bd1 xmloff: add a generic LibreOffice ODF extension namespace
XML_NAMESPACE_LO_EXT can be used for elements and attributes that are
not yet specified by OpenDocument.

Change-Id: Id29392533d46f6592d964ce79c05ffefa4d69ebc
Reviewed-on: https://gerrit.libreoffice.org/5419
Tested-by: Thorsten Behrens <tbehrens@suse.com>
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
2013-08-14 16:02:07 +00:00
a1190c9d2e fix reading fonts from .odp using style::font-name (fdo#65338)
b40bcde076f9fabf24810d2520e878d604d99637 made writing .odp use style:font-name
and office:font-face-decls, instead of using fo:font-family . But the reading
back was broken, as xFontDecls is not set
in XMLTextImportPropertyMapper::handleSpecialItem(), so the font data was
ignored. And xFontDecls was not set because it's set while reading
office:font-face-decls, which is at the top of the xml document, but even
before the xml is parsed, the call to SdXMLImport::setTargetDocument() calls
GetShapeImport(), which creates XMLShapeImportHelper instance, which calls
XMLTextImportHelper::CreateParaExtPropMapper(), and XMLTextImportPropertyMapper
is created with rImport.GetFontDecls() still being NULL at that point.

And it actually doesn't seem to make any sense to just pass around all
the pointers to XMLFontStylesContext, as eventually it's always just the one
from SvXMLImport. So simply dump all that and make the one single place
that actually uses it (i.e. XMLTextImportPropertyMapper::handleSpecialItem())
refer directly to SvXMLImport::GetFontDecls().

Change-Id: Ib1b3e4b1bcaf87ca3e4703d1cc1563ad6b3f9ce7
2013-07-10 17:35:27 +02:00
4935422b41 read/write ODF *:script* and *:rfc-language-tag*
This prepares to be able to read/write the attributes, it does not
enable proper handling of unknown language tags yet. An unknown tag
usually falls back to SYSTEM locale.

Change-Id: I4a78e8fd37deae188c69570157bc4589a712bc7a
2013-07-09 15:52:21 +02:00
9f1c9edb7a added rfc-language-tag* tokens
Change-Id: Ifef5ebf638863f4b0fa6f985ad2e84359b75b708
2013-07-05 12:46:47 +02:00
dd5c0b2db4 Added new regression curve properties as ODT 1.2 extended.
Added:
- regression-extrapolate-forward
- regression-extrapolate-backward
- regression-max-degree
- regression-min-degree
- regression-moving-type
- regression-period
- regression-force-intercept
- regression-intercept-value

Not all of these are yet filled as they are not yet implemented.

Change-Id: I7ac39c0df5b8b7fb7be6b32d301e33a7f49f2960
2013-07-03 21:46:42 +02:00
d070003bc4 Refactor regression curve handling in xmloff import to use chart2.
Additionally support more regression curves per one series and
add polynomial an moving average tokens.

Conflicts:
	xmloff/source/chart/SchXMLPlotAreaContext.cxx

Change-Id: I9dfebb1f47942c88ab0ccff48ec7632136fb1bc9
2013-07-03 21:46:41 +02:00
c61f35275c fdo#66282 - MathML export: improve ExportBrace
Change-Id: If15038f8942c649703659e05868162c31785c762
Reviewed-on: https://gerrit.libreoffice.org/4632
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2013-07-03 06:58:12 +00:00
bc51be7e7f #fdo66277 - Add support for alignment in MathML export.
Change-Id: I78352ff93da5b4e912040c4019fcea924f7b0c20
Reviewed-on: https://gerrit.libreoffice.org/4625
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-07-01 15:14:12 +00:00
af41cbde65 no need for XMLStringVector
Change-Id: I9e83c797da7e8a30d08db0ca0279a73d3f335477
2013-06-28 16:40:29 +02:00
3b3ec32358 fdo#66086 - MathML export: wideslash, widebslash and overstrike
Change-Id: I1e8da340ffdacab133b0cff6d6344fe56da34bf8
Reviewed-on: https://gerrit.libreoffice.org/4465
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:47:07 +00:00
cdbbbdce99 include: convert <type> here too
sed -i "s,<type>\([^<]\+\)</type>,\1,"

Change-Id: Ibdaeb2c396ad29ced05716142b38c6a1c3e49847
2013-06-04 12:00:59 +02:00
bf080115ba include: convert type scope="foo"> here too
sed -i 's,<type scope="\([^"]*\)">\([^<]\+\)</type>,\1::\2,g'

Change-Id: I7eb32acd44132de79cc7ac1e7f78b43bb4814d14
2013-06-04 12:00:58 +02:00
be9034ec5c prevent invalid files if file contains currency formats
A regression from writing error cell information into the file.

Change-Id: Idb55646094fcd76912bdcd2102370681bcc8703d
2013-05-23 16:15:53 +02:00
3905bd92b0 factor out SvXMLImport::IsOOoXML()
Change-Id: I9ccfe565bde1112f9f3cb8c666e901bf121862dc
2013-05-15 18:41:58 +02:00
12dea20c28 Fix build.
Change-Id: I5b2de61407924cdde5d74a7ea639365a876de74e
2013-05-15 11:31:35 +02:00
450cd772aa Fix fdo#64512 Handle xml:id correctly on multi-image draw:frames
Fixes a regression from the pick-best-image from draw:frame in ODF,
where before sometimes the XShape got deleted that the
UnoInterfaceToUniqueIdentifierMapper::registerReference stored.

For that, added a
UnoInterfaceToUniqueIdentifierMapper::registerReferenceAlways
function, which overwrites potentially existing earlier entries
with the same identifier string.

This fix was originally much more messy, but then dtardon committed
30b248dfe5bfb8a0649e36f22c943b3feb2f1385 which also fixes this here
bug. Now only sneaking in slightly less involved interface map
handling and a safeguard in ximpshap.cxx.

Change-Id: I87501e43518a5fc2fee166c45a4e2f01718f5228
2013-05-15 11:14:49 +02:00
c6747ee3a9 Use upper camel case for class names in xmloff.
Align multiimagehelper with module standard.

Change-Id: I70a4dbc66a0d127b9bf04d1e8db694d3526b21d7
2013-05-15 11:14:48 +02:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
2ce25faffd fix typos (wich instead of which) 2013-05-06 20:07:23 +02:00
2f2e4d88db add a warning
Change-Id: I0baf90cfe8d3caa96f826695c1be4bc563864c00
2013-05-03 15:19:33 +02:00
30b248dfe5 fdo#60075 open drawings with connector attached to SVG
This problem arises when there is a connector attached to draw:frame
element with multiple draw:image elements in it. The import code expects
that they are different representations of the same image (I have not
found if this is specified in ODF), so it only selects the most
"suitable" for import. To do that, it imports them all and then removes
all but the selected one. The image import context,
SdXMLGraphicObjectShapeContext, shares the parent frame's attributes,
which means that all the images in a frame have got the same ID. in
SdXMLGraphicObjectShapeContext::AddShape, the created css::draw::XShape
is registered with its ID... That means that anything that refers to the
frame's ID, like a draw:connector, will always get the _first_ image in
the frame.

Solution is to extend comphelper::UnoInterfaceToUniqueIdentifierMapper
to allow reserving an identifier and setting an interface for it later.
That way, SdXMLFrameShapeContext can reserve its own ID before it starts
importing the first draw:image, and then set the selected XShape at the
end.

Change-Id: I2e11cfd38e1e3534df2b3c01d85da0d755a266c3
2013-05-03 10:29:47 +02:00
72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
a8b7c72425 add error to office:value-type for calc cells and fdo#51810
For cached value import we need the information which cells are error
cells. For ODF 1.2 extended we therefore export now calcext:office-value
with the additional value "error".

Change-Id: I9bc988ea4924bea767ba5e504b77f6a16e51a82e
2013-04-25 17:02:31 +02:00
f215e634de comments and code reformat
Change-Id: Ib4e45cb85c9e5e5ffa6476c939300c6795412b1a
Reviewed-on: https://gerrit.libreoffice.org/3582
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-04-25 08:55:10 +00:00
b9337e22ce execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details

Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-23 22:20:31 +02:00