summaryrefslogtreecommitdiff
path: root/include/xmloff
AgeCommit message (Collapse)Author
2013-11-24Support regression curve name in ODF.Tomaž Vajngerl
Change-Id: Ic065d63eee507906febfa15eb6d5ae1e7de58280
2013-11-14rhbz#887420 Implement "block untrusted referer links" featureStephan Bergmann
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-13Respect svg:font-face-format element.Brennan Vincent
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-09fdo#65108 inter-module includes <> include/xmloffNorbert Thiebaud
Change-Id: I1d2da1dd3c82e95b8ad4883ce83b42f6dcb6200f
2013-10-31Remove the xmloff::token::ResetTokens race conditionStephan Bergmann
...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-23fixincludeguards.sh: include/xml*Thomas Arnhold
Change-Id: Iffab819621615c59709c087202cc578af00dd799
2013-10-22Bin some pointless commentsTor Lillqvist
Change-Id: Ia7c5b1654f3decc549b363c4443863f40c3f26e6
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-13Combine a pointlessly split class implementation and bin unused private fieldTor Lillqvist
Change-Id: I44cee32e256e0767bb3b40bdba93e15b717c9ba6
2013-09-17Resolves: fdo#68431 style:font-name unknown in non autostyles in impress/drawCaolán McNamara
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-16sal_Bool to boolEike Rathke
Change-Id: Id32780e5cb565e85f0366a91282ce085ed7d2f3c
2013-09-03fdo#68839: ODF import: fix name of multi-image frameMichael Stahl
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-08-23ODF export/import of fine dashed border styleZolnai Tamás
Change-Id: Ia81385dd9952e90cd5ebb3d1bba38aff6f84d079
2013-08-21fdo#60740: Populate auto styles from edit cells without using UNO API.Kohei Yoshida
Not using UNO API here alone made this code fly. Change-Id: Ib3eff168bbe49e49fb413909b7a14057f808cdf9
2013-08-20this Find is not actually implementedCaolán McNamara
Change-Id: I0d8e8903bdc5943079c6ed9f123e2fca2f72467f
2013-08-18CharBrd 8.1: ODF filtersZolnai Tamás
Change-Id: Ib1a79678ffce7764638378b4002f5e87ae749d00
2013-08-16Properly hide implementation details.Kohei Yoshida
If we are to hide, let's hide all. Change-Id: Ic68926ee099ac80d2d477d68e3769a7203dfea6c
2013-08-14add character shading value to ODT filtersAdam Co
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-14xmloff: add a generic LibreOffice ODF extension namespaceMichael Stahl
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-07-10fix reading fonts from .odp using style::font-name (fdo#65338)Luboš Luňák
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-09read/write ODF *:script* and *:rfc-language-tag*Eike Rathke
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-05added rfc-language-tag* tokensEike Rathke
Change-Id: Ifef5ebf638863f4b0fa6f985ad2e84359b75b708
2013-07-03Added new regression curve properties as ODT 1.2 extended.Tomaž Vajngerl
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-03Refactor regression curve handling in xmloff import to use chart2.Tomaž Vajngerl
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 fdo#66282 - MathML export: improve ExportBraceFrédéric Wang
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-01 #fdo66277 - Add support for alignment in MathML export.Frédéric Wang
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-06-28no need for XMLStringVectorThomas Arnhold
Change-Id: I9e83c797da7e8a30d08db0ca0279a73d3f335477
2013-06-28fdo#66086 - MathML export: wideslash, widebslash and overstrikeFrédéric Wang
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-04include: convert <type> here tooMichael Stahl
sed -i "s,<type>\([^<]\+\)</type>,\1," Change-Id: Ibdaeb2c396ad29ced05716142b38c6a1c3e49847
2013-06-04include: convert type scope="foo"> here tooMichael Stahl
sed -i 's,<type scope="\([^"]*\)">\([^<]\+\)</type>,\1::\2,g' Change-Id: I7eb32acd44132de79cc7ac1e7f78b43bb4814d14
2013-05-23prevent invalid files if file contains currency formatsMarkus Mohrhard
A regression from writing error cell information into the file. Change-Id: Idb55646094fcd76912bdcd2102370681bcc8703d
2013-05-15factor out SvXMLImport::IsOOoXML()Michael Stahl
Change-Id: I9ccfe565bde1112f9f3cb8c666e901bf121862dc
2013-05-15Fix build.Thorsten Behrens
Change-Id: I5b2de61407924cdde5d74a7ea639365a876de74e
2013-05-15Fix fdo#64512 Handle xml:id correctly on multi-image draw:framesThorsten Behrens
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-15Use upper camel case for class names in xmloff.Thorsten Behrens
Align multiimagehelper with module standard. Change-Id: I70a4dbc66a0d127b9bf04d1e8db694d3526b21d7
2013-05-15Spelling "separate" (etc) correctly is hardTor Lillqvist
2013-05-06fix typos (wich instead of which)Philipp Riemer
2013-05-03add a warningDavid Tardon
Change-Id: I0baf90cfe8d3caa96f826695c1be4bc563864c00
2013-05-03fdo#60075 open drawings with connector attached to SVGDavid Tardon
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-04-30Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks
2013-04-25add error to office:value-type for calc cells and fdo#51810Markus Mohrhard
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-25comments and code reformatMaxime de Roucy
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-23execute move of global headersBjoern Michaelsen
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a