Commit Graph

964 Commits

Author SHA1 Message Date
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
955ebe83a8 String to OUString and cleanup
Change-Id: Idc18c1a6a64edea3399c8747ec0f096a2f964b68
2013-06-29 16:23:24 +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
ad09b2f7ef fdo#43460 xmloff: use isEmpty()
Change-Id: I298767cc0ec03c22d3ae687939f0f9d5ce1963c1
Reviewed-on: https://gerrit.libreoffice.org/4348
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-19 10:10:39 +00:00
2dec489ebb WaE: function will cause runtime stack overflow
Revert misguided changes from 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37
that obviously would cause endless recursion if these functions were
ever entered.

Thanks to MSVC2012 for the nice warning.

Change-Id: I8504aa8ac141164ec6e026cc4fa873f8273f92bd
2013-05-22 14:48:36 +03:00
6a043e9c0a Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.

Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-05-22 10:44:29 +00: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
5134816d20 Remove redundant doxygen doc strings.
This is already (identically) documented in the header file.

Change-Id: I4a10cb0c1d1b1eee80fd828ab95829fb8128433f
2013-05-15 11:14:48 +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
ac937d8be6 fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- replaced osl_trace with sal_info
 - replaced dbg_* with sal_*

Change-Id: I80aca85562e4a43fded5c37f9895e51f79e42c14
Reviewed-on: https://gerrit.libreoffice.org/3771
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-05-14 13:59:53 +00:00
2f2e4d88db add a warning
Change-Id: I0baf90cfe8d3caa96f826695c1be4bc563864c00
2013-05-03 15:19:33 +02:00
4f4f450eaf fdo#60075 need to return context when available
Change-Id: I53a83a3f2234dc061c23344116b0e294594f1c90
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
aa64fd12d6 xmloff::token::GetXMLToken: only execute the check once
Tor says this check eats many CPU cycles, and the checked array is
static, so checking it just once is sufficient.

Change-Id: Ic8f85ebe940e4cf2c258cc778a8fd14512bdef94
2013-04-22 15:21:57 +02:00
784554dece xmloff::token::GetXMLToken: deploy assert in consistency check
There will be serious problems if that is inconsistent.

Change-Id: I41b8de66132224fb5cd2a6dcb7ff3128eb704016
2013-04-22 15:20:59 +02:00
8546c324ff Remove pass-through header file sot/inc/sot/clsids.hxx
Change-Id: I122669d4ffaf72fb1d5f6fccc98e8a648f31aa23
Reviewed-on: https://gerrit.libreoffice.org/3490
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-20 14:55:56 +00:00
9830fd36db date/time IDL datatypes incompatible change
- nanosecond precision
 - signed (allowed negative) year

Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.

Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-04-18 21:34:46 +02:00
6a0f56b09d Fix typos: HEIGTH -> HEIGHT and WEIGTH -> WEIGHT
Change-Id: Ie5dc62bf535360cde8a5ccd6f8be3965ff48739c
Reviewed-on: https://gerrit.libreoffice.org/3435
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-04-18 09:07:07 +00:00
3f3980ff24 Some cppcheck cleaning
Change-Id: I425ed98a721ded162c2ae08d145aaa9dbf548632
2013-04-07 22:18:57 +02:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
bf033461c5 fdo#61135 stepped lines graph: handle ods files
The boilerplate code for drawing the 4 types of stepped is in place (as
described in ODF1.3,
https://tools.oasis-open.org/issues/browse/OFFICE-3662).
We can also read the current attribute values used in Gnumeric. These values
are converted to ODF1.3 during save.

Change-Id: I0f04a779de4b65326ed7ce6de56191f11b51c596
2013-03-19 02:36:46 +01:00
4178806bb0 reportbuilder: make "Group on" not-"Each Value" actually work
Change-Id: Id5d73f9aac48ebfb6987e5bf0df37e62f1817bdc
2013-03-12 18:16:45 +01:00
4bf95c4c31 make use of startsWith()
Change-Id: Ie70097de550ddd1cddc6714f8f86f9723cb36679
Reviewed-on: https://gerrit.libreoffice.org/2599
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-08 13:16:49 +00:00
6583305dd7 simplify compareTo (now correct)
Change-Id: Ia4fd2f54d0bda71d472f46949500c0b23ff8e1b7
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-03-08 13:04:13 +01:00
3d4723f80a Revert "simplify some compareTo"
This reverts commit 19020191cbf3e3c7a7bf98d0958d86d931ae687b,

  s1.compareTo(s2, length-of-s2)

is *not* equivalent to

  s1 == s2
2013-03-08 09:03:10 +01:00
19020191cb simplify some compareTo
Change-Id: Ib63cfac8b5f129f31534020fd634750e846e3b98
2013-03-08 05:42:05 +01:00
3fbc15ce45 remove the need to explicitly specify font style for font embedding
The information can be read from the font data itself now, so
this is a bit pointless. It wasn't entirely reliable anyway,
as it is also necessary to ensure two font different font files
don't overwrite each other.

Change-Id: Ie17ab8118e1c08228beb7c749c5c8d6cf3426362
2013-03-06 12:00:11 +01:00
ce33f85ffd sal_Bool to bool
Change-Id: I8c554fb3faead41c974af9c2a89728bd0bdf5eb6
2013-03-04 23:14:41 +09:00
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
532421d208 fdo#52948 fix print-repeated-values=no with formatted values
Factorise the "should this element be printed" decision into an
utility function, which is used by
1) AbstractReportElementLayoutController
   (in charge of non-formatted values: string, image, OLE object, ...)
   which already obeyed PrintRepeatedValues.
2) TableCellLayoutController
   (in charge of formatted values: dates, numbers, ...)
   which blissfully ignored PrintRepeatedValues,
   but obeyed the display condition.

Rename the inconsistently named
 PrintWhenGroupChange
 PrintWhenGroupChanges
 print-only-when-group-change
 print-when-group-change
to
 PrintWhenGroupChange / print-when-group-change

Change the meaning of "PrintWhenGroupChange" to "override
PrintRepeatedValues in first occurrence in group". Since this feature
never worked under the old semantics, no loss of feature. Since we
change the XML attribute name, no ascending compatibility problem: it
will be reset to its default value.

Pursuant to the new meaning of PrintWhenGroupChange, change its
default to *true*, which is the sane default.

Change-Id: Idbe8e90565a354f70db222d047b3d51eeddbbb9f
2013-02-19 12:35:02 +01:00
a6a8a8707b fdo#46808, convert xmloff module code to use XComponentContext
with lots of repurcussions in other modules

Change-Id: I6982671eecc701b06cf85d93533e1fe618044fea
2013-02-12 10:14:43 +02:00
e5fdaec54a fdo#46808, Adapt document::XML*BasicExporter UNO services to new style
The services are
   document::XMLBasicExporter
   document::XMLOasisBasicExporter

Change-Id: Ifd93e5735cae94d34904d79769cdb3edf587fe43
2013-02-11 08:02:11 +02:00
1a3c90a292 sw: let drawinglayer manage gradient styles of our textframes
With this, the hacks from commits
81a46fc86a530f028a5bd2f5e52fe0372d50ee38 and
d7efffebd9651dd866349915360ade64b97d7301 are no longer necessary.
2013-02-06 12:44:37 +01:00
989d0953a4 basic support for embedded fonts in odt (fdo#42195)
There are still places that should be improved a bit, but this works.

Change-Id: Ieb7947a294ec95b6fd8cec2e8c4bc731e2594c42
2013-02-01 14:26:36 +01:00
dc173b7f2a export subpath sizes (these are for example in pptx custom shape presets)
Change-Id: Iab21d0845d0cb6e4dadeffb5f7b9ebab1e4b955a
2013-01-31 12:08:54 +01:00
81a46fc86a SvXMLExport::_ExportStyles: also try to export text gradients
They are not exported automatically, as SvxUnoNameItemTable needs a
Which ID, and it's different for drawinglayer and Writer gradients.

Change-Id: I5dd7d828b1f0e577e26510e3c5ca74386d000f16
2013-01-29 15:20:59 +01:00
77856e81ce fdo#46808, Adapt document::*PropertyValues UNO service to new style
The services are:
   document::NamedPropertyValues
   document::IndexedPropertyValues
The services already existed, they just did not have IDL files

Change-Id: Ibafe9b5afb9b30785df4f66aa923f4b96ceabeed
2013-01-28 08:25:24 +02:00
ce1b932bba fdo#46808, don't cache the result of comphelper::getProcessComponentContext
Change-Id: I7eb3ce6794b5896ebc56d6f28f7e37b6929a6217
2013-01-28 08:25:24 +02:00
f95a7c2c6d fdo#46808, Convert SvNumberFormatter to use XComponentContext
Change-Id: If4e8312dae6bc5eb8bb7655cf250f06ab37b7e5c
2013-01-28 08:25:24 +02:00
e820c249a4 implement conditional date format import/export for ODF
Change-Id: I11d5583c994d84fe1163c6158c0794ea1d879f2e
2013-01-27 20:45:04 +01:00
bea63709d0 xmloff: refactor Generator version handling:
Since there are now 2 forks of OpenOffice.org, we cannot rely on a
simple total ordering of versions any more; add a new function
SvXMLImport::isGeneratorVersionOlderThan(), taking 2 reference versions.

Also extract the LibreOffice version number from the generator string,
and extend the BuildId property to store this as a third number.

This also allows removal of the "fake LibreOffice3 as OpenOffice.org
3.3 release" hack, which is not future-proof.

Change-Id: I44d8105eb537ac43fb9529a8b1b661ae0f2bba30
2013-01-18 23:46:33 +01:00
066bdb31f7 support saving/loading hyperlink cell attribute in extended odf
style:table-cell-properties has new child element style:hyperlink which
will store the hyperlink info in attributes xlink:href & xlink:type

Change-Id: I184310d124c4242cd62fdabb45f9773094cfc229
2013-01-11 10:31:56 +00:00
f1043aaed0 added token for handling of svg:linearGradient and svg:radialGradient
Change-Id: I38014a8d9e21359cb943f813484478293360a2e6
2013-01-07 19:39:46 +01:00
5198c4a41f Replace chained O(U)StringBuffer::append() with operator+
Change-Id: I0fcd70cff092c7d90b57b9af9dcec99f23750f1c
Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
2012-12-18 17:26:54 +01:00
649c6b3891 RTL_CONSTASCII_USTRINGPARAM clean up
Change-Id: I4d57a449c2bd61be0cb7b7ed9016b3ee71825b57
2012-12-08 15:16:06 +01:00