summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)AuthorFilesLines
2013-11-15Resolves: fdo#62461 put preferred image firstCaolán McNamara2-43/+52
with fallback after. "Each child element of a frame is a different representation of the same content. The order of content elements reflects the document author's preference for rendering, with the first child element being preferred. That means that consumers should render the first child element that they support. A frame may contain multiple content elements, but shall contain at least one content element." Change-Id: If50062cad58f5b8561ad6bd8dc1a06956d2f444b
2013-11-14SAL_WARN_UNUSED com::sun::star::uno::AnyStephan Bergmann4-7/+0
Change-Id: I9058044d13f696e07667dce706f6c311af6dbea0
2013-11-14rhbz#887420 Implement "block untrusted referer links" featureStephan Bergmann2-1/+10
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-14Move MediaDescriptor from comphelper to unotoolsStephan Bergmann2-4/+4
...so it will be able to use SvtSecurityOptions internally. Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann1-10/+1
Change-Id: Ibfc721a819c044b5e6ec06e5bbad694662fe9e3f
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann1-6/+0
Change-Id: Ied485bebaee36107178acee33eea1eecef70315e
2013-11-14remove unnecessary sal_Unicode casts in XMLOFF moduleNoel Grandin45-247/+247
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-13clear c++11ishCaolán McNamara2-6/+7
Change-Id: I4eea774206a5bd1de1c10a69aceb6476c5feecbf
2013-11-13Respect svg:font-face-format element.Brennan Vincent3-4/+97
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-11xmloff: include <> for external includesNorbert Thiebaud216-309/+309
Change-Id: Ic92d0121e928041bcff00b12706f794a4d8e25c8
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin6-16/+16
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11convert OUString !compareToAscii to equalsAsciiNoel Grandin1-1/+1
Convert code like if( ! aStr.compareToAscii("XXX") ) to if( aStr.equalsAscii("XXX") ) which is both clearer and faster. Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
2013-11-11convert OUString 0==compareToAscii to equalsAsciiNoel Grandin6-27/+27
Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11remove unnecessary use of OUString constructorNoel Grandin3-6/+6
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-10cppcheck: reduce scopeJulien Nabet1-1/+1
Change-Id: I7a20f89e5a113c6c8760d51475d8198e28ad6aac
2013-11-07remove misleading commentAndras Timar1-1/+1
Change-Id: I8c4187f3f50c4675ab4fe392ef0f0736109788da
2013-11-07fdo#63020: Replace ::comphelper::stl_begin()...Marcos Paulo de Souza4-10/+5
And use some templates inside include/com/sun/star/uno/Sequence.hxx Change-Id: I48875fa1517751fc4cb0cf2b6c08b88975a29b47 Reviewed-on: https://gerrit.libreoffice.org/6599 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-11-07remove unnecessary use of OUString constructor in XMLOFF moduleNoel Grandin7-28/+24
Change-Id: I3bb704d2b1063cd8c2c903cbfa237a7723c321d2
2013-11-06Remove #ifdef TIMELOG'ed SAL_INFOsStephan Bergmann2-23/+0
...the code doesn't make much sense that way. Change-Id: I506e37b44924701255431f6d20d4610f7f52287d
2013-11-06check for empty stringCaolán McNamara1-1/+2
as demonstrated by kde246118-4.odp Change-Id: Idf1224555e0d7be9a679862da9ff256cf7a4d128
2013-11-05Resolves: #i123542# corrected ODF XML export of 3D cube and sphereArmin Le Grand1-9/+13
(cherry picked from commit a8cc15c001ac76c0d320837cc4cdf65ecb7fc923) Conflicts: xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport3.cxx Change-Id: I35f7817f3ea95177dd3aa633b9cbb1b5703f08a0
2013-11-05corrected export of polygons with textArmin Le Grand1-38/+30
(cherry picked from commit c0f65b29f8028ab750c8caac033645c3da3cf2f5) Conflicts: xmloff/source/draw/shapeexport2.cxx Change-Id: Ic8da384d094ce735ecba51b282de7a697558e51f
2013-11-05update pchThomas Arnhold1-0/+5
Change-Id: I10f3dbd9513052b3bbe30ddc6523cd231f26ded3
2013-11-04remove redundant calls to OUString constructor in if expressionNoel Grandin1-6/+6
Convert code like: if( aStr == OUString("xxxx") ) to this: if( aStr == "xxxx" ) Change-Id: I8d201f048477731eff590fb988259ef0935c080c
2013-11-04remove redundant calls to OUString constructorNoel Grandin3-5/+5
Change code like this: aStr = OUString("xxxx"); into this: aStr = "xxxx"; Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-11-04Convert code that calls OUString::getStr()[] to use the [] operatorNoel Grandin4-7/+5
This also means that this code now gets bounds checked in debug builds. Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
2013-11-02Revert "transpose "data in rows" ranges for internal data provider, fdo#62057"Markus Mohrhard3-36/+6
This reverts commit 14fa5488a829936275f79a7693b13da55114220e. Conflicts: xmloff/source/chart/SchXMLTableContext.cxx
2013-11-01Directly use OUStringStephan Bergmann2-45/+46
Change-Id: I9029bab2b0ab98a2d78166145a35792e298c9115
2013-10-31I assume this is missingStephan Bergmann1-0/+3
...from the changes to xmloff/source/draw/shapeexport2.cxx of f15874d8f976f3874bdbcb53429eeefa65c28841 "i123433 Detect pseudo-vertices at svg import, unify svg:d handling, correct svg:d import for relative sub-polygons in svg import [...]," given how other changes in that file that introduce aPolygonString use it. Found by -Werror,-Wunused-variable. Change-Id: I915b53ed74e03f84f240f1fa1f17768148f030d6
2013-10-31Related #i123433# PolyPolygonBezier must be drawing::PolyPolygonBezierCoordsCaolán McNamara1-21/+11
Change-Id: Idc7e0a2651f2e0b499bbf8b8443ffb84b54a45b6
2013-10-31Resolves: #i123433# Detect pseudo-vertices at svg import...Armin Le Grand10-1547/+492
unify svg:d handling, correct svg:d import for relative sub-polygons in svg import; changed default for moveto writes for svg:d in ODF to absolute (cherry picked from commit f15874d8f976f3874bdbcb53429eeefa65c28841) Conflicts: basegfx/inc/basegfx/polygon/b2dpolygontools.hxx basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx basegfx/source/polygon/b2dpolypolygontools.cxx basegfx/source/polygon/b2dsvgpolypolygon.cxx basegfx/source/polygon/b3dpolypolygontools.cxx basegfx/source/tools/makefile.mk basegfx/test/boxclipper.cxx basegfx/test/clipstate.cxx basegfx/test/genericclipper.cxx canvas/source/tools/surfaceproxy.cxx sdext/source/pdfimport/tree/drawtreevisiting.cxx sdext/source/pdfimport/tree/writertreevisiting.cxx xmloff/inc/xexptran.hxx xmloff/source/draw/XMLImageMapContext.cxx xmloff/source/draw/XMLImageMapExport.cxx xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport3.cxx xmloff/source/draw/xexptran.cxx xmloff/source/draw/ximp3dobject.cxx xmloff/source/draw/ximpshap.cxx xmloff/source/style/MarkerStyle.cxx xmloff/source/text/XMLTextFrameContext.cxx xmloff/source/text/txtparae.cxx Change-Id: I5171b4a3559ea116bea45152e1f2685666463635
2013-10-31Remove the xmloff::token::ResetTokens race conditionStephan Bergmann5-42/+0
...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-31Convert indexOf->startsWith and lastIndexOf->endsWithNoel Grandin1-5/+5
This is both an optimisation and a cleanup. This converts code like aStr.indexOf("XX") == 0 to aStr.startsWith("XX") and converts code like aStr.lastIndexOf("XXX") == aStr.getLength() - 3 to aStr.endsWith("XXX") Note that in general aStr.lastIndexOf("X") == aStr.getLength() - 1 converts to aStr.isEmpty() || aStr.endsWith("X") so I used the surrounding context to determine if aStr could be empty when modifying the code. Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-30 Fix for Chart Series NamesVinaya Mandke1-2/+9
For Docx files, the chart series names (labels) were rendered incorrectly and hence exported incorrectly. In place of the correct label, the series name for next series was displayed. Change-Id: I988571d76d9c706ac2f7693881198bb604ec3fa8 Change-Id: I52631bc62fce46a43298c284cb11c2e8916fabe3 Reviewed-on: https://gerrit.libreoffice.org/6350 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2013-10-28gbuild: set Package default target to INSTDIRMichael Stahl1-2/+0
Change-Id: I2bc45e4ba63f5faaee7389bcd9d7b3f563503186
2013-10-23fixincludeguards.sh: xmloffThomas Arnhold286-739/+738
Change-Id: I0e7d9daac1ad88fad8d240373e91ef323966bb47
2013-10-23clean up places accessing the NULL at the of an OUStringNoel Grandin2-11/+25
There were only a couple of real bugs fixed, but we're a little bit safer now. This also fixes the assert and the comment in OUString::operator[] about this. Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
2013-10-23clean up some include guardsThomas Arnhold1-3/+3
Conflicts: sw/source/ui/inc/content.hxx Change-Id: I58d81881271fc6e3320bf3b5f1321594b28614a6 Reviewed-on: https://gerrit.libreoffice.org/6388 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-23convert code to use OUString::endsWithNoel Grandin1-2/+2
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist10-12/+12
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-18fdo#60698: Move fileaccess module to ucbMarcos Paulo de Souza1-1/+0
Change-Id: I4c688a4aeedcae56ed6404574bd1bb392d4190cb Reviewed-on: https://gerrit.libreoffice.org/6311 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-16cleanupThomas Arnhold1-6/+0
Change-Id: I7bfd221f89718ba8634417c93a26b3a199178694
2013-10-15update pchThomas Arnhold1-0/+2
Change-Id: I475bee35ca5d24903d85e7f2427fab0e47d8db4d
2013-10-13Combine a pointlessly split class implementation and bin unused private fieldTor Lillqvist5-3913/+3785
Change-Id: I44cee32e256e0767bb3b40bdba93e15b717c9ba6
2013-10-13Test _WIN32 instead of UNX as it's Windows that is the more specific caseTor Lillqvist1-3/+3
Change-Id: Ifa5b522603a0ea592d873ae79b266091163e993f
2013-10-13sal_Bool to boolTakeshi Abe14-143/+143
Change-Id: I3db66690f9eaa809bcbf2257804d319aaec0f975
2013-10-11loplugin if-body warningsStephan Bergmann1-0/+4
Change-Id: Iea42dc54c6d3b81142939b920d932d4cf83dc6e1
2013-10-09Improve error reportingStephan Bergmann1-2/+4
Change-Id: I43df9a5458cb87145a3492e1a0c97ceb8c8a3b90
2013-10-08CID#1079188 uninitialized memberCaolán McNamara1-0/+1
Change-Id: I55c9f2d0d7a7c03dd9960a32a415398a194f8265
2013-10-07fdo#54938: Adapt supportsService implementations to cppu::supportsServiceMarcos Paulo de Souza1-10/+2
Change-Id: I683c0d30c3286ed5d725d4eefe8b3977b82ee316 Reviewed-on: https://gerrit.libreoffice.org/6035 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>