Commit Graph

1615 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
cc8625f008 use string literal directly
Change-Id: I882bd9082ef3ed230b34c029b069057793f87197
2013-06-29 17:37:51 +02:00
318f2b64cc remove some createFromAscii usage
there are a lot more of them:

git grep 'createFromAscii[^)]*"'

Change-Id: Ibc2e9cae208d8b9c91667bb3b177c6bd6d3a9424
2013-06-29 16:23:23 +02:00
e67c21ee06 Search for char instead of 1 char long string, when possible.
follow-up of a7674482254ee996b1c4fee60f3064778be369aa

Change-Id: I25f40c601454c092078307d931333af1bc1447ac
2013-06-29 09:53:41 +02:00
ecbd3104c1 MSVC build fixes
Change-Id: I189fe3635f94fdd6b91bd7930c7abf02e70368aa
Reviewed-on: https://gerrit.libreoffice.org/4581
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:03:04 +00:00
8810d26c92 Convert all ContextHandler-derived clases over to ContextHandler2
Change-Id: I81f54e3b7d29a0807ec4c2f082ae00fd6e1d6138
Reviewed-on: https://gerrit.libreoffice.org/4580
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:02:50 +00:00
bc8f89931a Also LockedCanvasContext needs to be a ContextHandler2 now then
Change-Id: Idcc55370efbcd85f9f7142803e4cb61f3742e7fc
Reviewed-on: https://gerrit.libreoffice.org/4579
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:02:28 +00:00
c7e1845985 Further MCE work
As it is wrong (says Thorsten) to override the methods from
XFastContextHandler in ContextHandler2 in its derived classes, mark them with
SAL_FINAL to catch that (when compiling with a compiler thaty supports
"final").

Do corresponding changes then; change createFastChildContext() methods to
onCreateContext() ones instead.

Now the unit tests work, and a sample PPTX that uses embedded OLE thingies
loads without crash, but unfortunately it looks like crap...

Change-Id: Ie30022f37418ba9caf8ce59fe4003b808fa900f3
Reviewed-on: https://gerrit.libreoffice.org/4578
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:02:12 +00:00
32ce3c6b0a More OOXML Markup Compatibility and Extensibility (MCE) support
Change many classes in oox to be based on ContextHandler2 instead of
ContextHandler. That supposedly adds MCE support.

This is a minimal initial effort. It compiles and links but doesn't work
(CppunitTest_chart2_export fails). Follow-up coming...

Change-Id: If89117abd48cfead468633fd7fce1ea785f6f420
Reviewed-on: https://gerrit.libreoffice.org/4577
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:01:52 +00:00
949f97ba48 Resolves: #i121162# ImageScaleMode constants should be in UPPERCASE
(cherry picked from commit 734b532fb77d2d5be7eb7becb6720dbd7b3d8978)

Conflicts:
	offapi/com/sun/star/awt/ImageScaleMode.idl
	oox/source/ole/axcontrol.cxx
	reportdesign/source/filter/xml/xmlHelper.cxx
	wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java

Change-Id: Ib5fa7b82edddb809129a4e5619a20ca7a7b2e38a
2013-06-27 16:58:09 +01:00
8054a7dc0a n#820504: start a new subpath with m and t in VML path decoding
Change-Id: I7bac4b111ede5e815d2ed121c18f4cfe1ad0950e
(cherry picked from commit 8d6eb11d6965ee93e72513f5e01b67f598edf6c3)
2013-06-27 15:19:41 +02:00
a3f2d5c140 Forgot to remove one case where nParamCount is set to twice the value
Change-Id: I3649364a889b7ef6ce7ac4316a1621b6328170eb
(cherry picked from commit 7f7a1294e2d0da30a58d897558a18a13dbc5e690)
2013-06-27 15:19:25 +02:00
b25eb9f78b n#820504: VML path import fixes: get back missing points
nParamsCount was set to the double of the expected value, but the code
handling the command only took the first set of parameters. Removing
this 2* in nParamsCount.

(cherry picked from commit 442ad6eef9d6e1588e4985e97ec3eafd6289f9ae)

Conflicts:
	oox/source/vml/vmlformatting.cxx

Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c
2013-06-27 15:19:14 +02:00
781904af36 n#820504: Some imported VML paths are closed, try to detect the
(cherry picked from commit 08db0b22bdce0f779e4af01a209aef1be29e9907)

Conflicts:
	oox/source/vml/vmlshape.cxx

Change-Id: Idefd0277a85bd7b2b727f59cc4e568869b4932a1
2013-06-27 15:18:59 +02:00
30414067f8 forgotten tweak for spinbutton
see origin f1ecd5ff46a217ee9f4323a08f03e59a53ef551e, f9d08dd5c9af8f8128371540e
& follow up 0a686a9bb54b5c1b3a45810e2601a098c0272c33

Change-Id: I1a10de6984f7ed78efdf6f32bfca14b433b24405
2013-06-26 18:54:15 +01:00
a59b055d29 handle v:shape having coordsize with 0 (part of bnc#780044)
There's a document which has coordsize="6094,0" path="m444,424r6094,e" ,
where the 0 is somewhat questionable (and the spec doesn't seem to say
anything about it), but given it's a horizontal line, vertical coordinate
space size shouldn't matter, so treat it as 1, making the space visible
and avoiding division by 0 in our code.

Change-Id: I53725cd73a699b8e6d3c96e8fc39c276d082bc0c
2013-06-26 18:54:33 +02:00
0a686a9bb5 tweak ppt ole import for libreoffice codebase
a) make sure backcolor is skipped when libreoffice backcolor
is default. Libreoffice default is 0 ( but if we write that out mso
reads it as black )
b) don't take the label default backcolor in exchange for the
libreoffice default. Libreoffice default backcolor for label is white,
mso's default is rather different ( and never seems to be used )
c) re-enable compObj export ( seemed this was disabled unintentionally
except for buttons )

Change-Id: Ie68267809cee2e92bd06e88e698f17a10eeeb6ad
2013-06-26 16:45:29 +01:00
7552edf940 Fix typo in Emacs mode line
Change-Id: I882a24a665a721420c8ec99288f399abf4fdbca1
2013-06-24 17:43:07 +03:00
76a90e69d1 fdo#43641 oox: fix position/size of LineShapes inside lockedCanvas
Change-Id: Idf14d40f174ca87543a829ccfe22ed5cbb8e3cbc
2013-06-21 10:43:51 +02:00
9fac61d21c bnc#593612: font size: override para prop with run prop
Change-Id: I4d0899c8f722150176cb3479bdb3b4a81c1b3eb8
2013-06-21 10:06:54 +02:00
a9966b2721 fdo#43641 oox: initial import of lc:lockedCanvas
If that canvas contains a single shape, the result looks OK. If it
contains a groupshape, we also import something, but then the position /
size is still to be improved.

Change-Id: Ic4e4c08016a05a5e3acb005c3a642981ba4fb16d
2013-06-20 10:46:56 +02:00
32b93c5c4f fdo#43641 oox: add support for the lockedCanvas namespace
The plan is that once these are here, the writerfilter ooxml tokenizer
can refer to them. And then the writerfilter will call back to oox to do
the real drawingml import.

Change-Id: Ibc0d9838f3db717004a3bc8b80a408a39c8f0886
2013-06-20 10:46:55 +02:00
5ba4939254 fix ppc build
char is a type distinct from both unsigned char and signed char.

Change-Id: Ia9de35ef42101ce818880b810c44547f1c1a417a
2013-06-18 16:12:27 +02:00
50e6713e40 fdo#43460 oox: use isEmpty()
Change-Id: If291a72d87001932c605755d628cecc088d50275
Reviewed-on: https://gerrit.libreoffice.org/4324
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 19:55:17 +00:00
36de708ce4 fix fdo#63053 ampersand in document title causes corrupt docx
FILESAVE, FILEOPEN: ampersand in document title causes corrupt docx when saving; truncates title when loading
2013-06-15 12:53:07 +02:00
0c0a9c3abb Remove redundant toplevel const
...that might be the reason the Raspbian-ARM tb broke.

Change-Id: I1c238f0bd70dd2237c66b479aa5eb79010f477ce
2013-06-15 12:44:21 +02:00
e2e45e25a7 Related: fdo#58819 VML import: shape types not starting with a hashmark are OK
Change-Id: I2a04aeedd6899eb2717b070fa61a21991bc7be8a
2013-06-15 11:11:39 +02:00
43b0577604 fdo#58819 VML export of ESCHER_Prop_fillOpacity
Change-Id: Ic50be88b484e5bfba60c5bd8dafb7e6da0b33c9e
2013-06-15 10:45:13 +02:00
98f90fdecc fdo#58819 VML export of ESCHER_Prop_gtextFont
Change-Id: Id0404405b41d5137e726670a959d5e314eb8f2ec
2013-06-15 10:45:12 +02:00
12322f5fd2 fdo#58819 VML export of ESCHER_Prop_fNoLineDrawDash
With this, the bugdoc is (correctly) no longer stroked.

Change-Id: Iaf00e17f2535ece2be09dc8ec0d383f2218a6050
2013-06-15 10:45:11 +02:00
559d194d80 fdo#58819 DOCX VML export: fix shape size for rotated shapes
The problem is that we wrote the size of the shape itself, while VML wants the
bounding box here. The WW8 export ignores the rectangle given in
EscherEx::Commit(), uses SdrObject::GetSnapRect() instead and later refines the
position by using the point got in WW8AttributeOutput::OutputFlyFrame_Impl(),
see PlcDrawObj::WritePlc().

Do the same in the VML export, i.e. ignore the Rectangle we get in
VMLExport::Commit() and use SdrObject::GetSnapRect() + the point given
in DocxAttributeOutput::OutputFlyFrame_Impl() instead.

Change-Id: I5adbdf205792c87f92c1ddf1cf674f87e11eb54e
2013-06-15 10:45:11 +02:00
1ff3ab9235 Resolves: #i119579# position & direction of bracket incorrect in Arabic locale
* subversion/main/oox/source/drawingml/textparagraphpropertiescontext.cxx
[]WritingMode2 is used to numerous explicit writing directions, so use WritingMode2 to instead WritingMode.

Patch by: Ma Bingbing <jiazema@gmail.com>
Suggested by: Wang Zhe <kingwisemmx@gmai.com>
Found by: Wang Lifeng <phoenix.wanglf@gmail.com>
Review by: Wang Zhe <kingwisemmx@gmai.com>(cherry picked from commit 4545d293b1cf5009b075cdc82d43916909b77347)

Change-Id: Ic621ce6107bdc0b83c511f055175ae7b629f1503
2013-06-13 21:00:34 +01:00
a1dda85b46 fdo#58819 VML export of ESCHER_Prop_Rotation
Change-Id: I3deb8f914cabd58a284bef825092a6980b1f6310
2013-06-13 17:29:32 +02:00
175d28d564 fdo#58819 VML export of mso-position-*
mso-position-horizontal, mso-position-horizontal-relative,
mso-position-vertical and mso-position-vertical-relative

With this, the watermark in the bugdoc is almost in place, if you ignore
the missing rotation.

Change-Id: I8d3d834089e734654fcbbb0fb6166b4d7e01f80f
2013-06-13 17:14:06 +02:00
1f2e2563a6 fdo#58819 initial VML export of ESCHER_Prop_gtextUNICODE
Change-Id: I67b5dc102fc264d0a643620bbdc5796bdaa46d82
2013-06-13 17:14:06 +02:00
3af0114a29 Introduce O[U]String::toUInt32
...which has become necessary since bd60d41176da540b01d7583cfe00637431967f39
"Handle oveflow in O(U)String::toInt() functions" reduces values in the range
(SAL_MAX_INT32 .. SAL_MAX_UINT32] to zero, but some calls of toInt32(16) relied
on getting a correct (unsigned) value for the whole input range ["0" ..
"FFFFFFFF"] (see libreoffice-4-1 commit 9bf6c83367cedb7be81bf67f30d2147d26c7a8c3
"Revert overflow checks in O[U]String::toInt{32,64} again").

Audited all uses of toInt32/64 with non-decimal radix.  (There is still a TODO
comment in oox/source/helper/attributelist.cxx, and
stoc/source/typeconv/convert.cxx will still need some love and test code.)

Change-Id: Iadaca1c0e41dab553687d0ce41c20c10cd657a95
2013-06-13 17:08:36 +02:00
b0f10dd326 Revert "bnc#819614: Fix runaway lines."
This reverts commit 5fe65c0c5e5a8d815d9d15ef192e7652726662e6.

Unfortunately this causes a regression elsewhere.

This also disables the unit test for this bug - will re-enable when I find
a fix that both fixes this, and does not regress other stuff :-)

Change-Id: Iad334e3c59c928edb78f25c0f36a33a26a7e6125
2013-06-13 16:22:51 +02:00
c7e237045d fdo#58819 VML export: handle objects anchored in the header / footer
Previously such shapes landed in the middle of section properties.

Change-Id: I7993eaa721e2b53d8adb1cbdee40992bbeb11416
2013-06-13 12:16:11 +02:00
fecd316a96 typo correction AX_SELCTION_xxx -> AX_SELECTION_xxx
petty correct of AX_SELCTION_xxx -> AX_SELECTION_xxx but it
was irritating me

Change-Id: Iae7a0151a63502aa89f04ae54fe7348548ffd32c
2013-06-12 18:53:19 +01:00
d70f6df911 Fix Excel still complains about exported MorphData controls
seems that writing property values that same as file defaults can cause
problems ( this behaviour doesn't seem to be consistent but... ) Fix
up some instances of properties that I've seen make Excel complain

Change-Id: Iacf6789906f07dc35aa5dbe3e7b62f4d2090e20a
2013-06-12 18:52:19 +01:00
3d5fb88cc0 n#779642: 0 width or height in //v:shape[@style] produces weird results
Change-Id: I37ba59dd54ac692f234f3228e442799c5a5f450b
2013-06-12 16:45:19 +02:00
7943522291 squash some excel fileformat warnings ( and protected mode opening )
some attributes should not be exported for some controls, their
very presence triggers the dreaded nag dialog ( promising doom
& death if you open the file )

Change-Id: I974ac94f75ee95ab54ca19bd5cd31952a66b20e5
2013-06-11 17:44:02 +01:00
a8bb1fd10a honour mbAutoClose in BinaryXOutputStream
presumably this mbAutoClose usages got clobbered mistakenly in some merging operation

Change-Id: I7116827269cdbb555753f6678528c83ab804de46
2013-06-11 14:10:01 +01:00
8668453566 fix build error, reinstate WriteOCXExcelKludgeStream to export ole control
new ole export used WriteOCXExcelKludgeStream but that function dissapeared when
msocximex was stripped of ocx control import ( now we use the new filters in oox )
When that stuff was moved WriteOCXExcelKludgeStream was #ifdef'ed out

Change-Id: I370983efa5e8c4ba2b210dfb7535ea211d13a8c1
2013-06-11 14:10:01 +01:00
a22ef599bd bnc#820788 VML import of v:textbox's mso-fit-shape-to-text style property
Change-Id: I74a0ecd50ca61a4f5bf7ebdbf12743dc1fd9368a
2013-06-07 12:26:09 +02:00
56ab9c1289 Resolves: #i119547# support the chart legend positon of top&&left...
just set the Anchor to Alignment_TOP_RIGHT

Found by: Shan Zhu
Patch by: zhaoshzh
Review by: zhangjf

(cherry picked from commit 8de6941efffd22214da577ff637b2522e46c7fa5)

Conflicts:
	oox/inc/oox/drawingml/chart/converterbase.hxx
	oox/source/drawingml/chart/titleconverter.cxx

Change-Id: Iad1fe1af8f93e6904759c10a9c9206fd1f1aebbb
2013-06-06 12:00:45 +01:00
25bb9d13b2 fix for fdo#53042 fix ole object macro bindings ( for xlsm )
A number of fixes needed here
a) make sure convert properties of control model is done before inserting
control model into formcontainer, need to do that to ensure that
GenerateVBAEvents is set ( so the fake VBA event generation can be
triggered )
b) remove the IsAlieanExcel check in servuno.cxx ( it's too strict and
additionally seems there is confusion over the media type to check )
c) split the vba import so that we can ensure the VBA mode is set (if
we have modules to import ) before sheets are imported and defer further
processing ( actual assigning of the modules and associated objects )
until later

Change-Id: I8fdbe788b400d7e41d4cc4b51b15f692bd7b0ecc
2013-06-04 15:29:45 +01:00
547217ecf2 Document seemingly dead QuickDiagrammingImport, QuickDiagrammingLayout
Change-Id: I9662671d8dbce87993ba67cf8e4fd993ad1eb27a
2013-06-04 08:31:33 +02:00
3505f0e46c Revert "fdo#46808, Convert oox::PowerPointExport service to new style"
This reverts commit 02021163dbbcc8904da0b2138c8b53684dcc8ab4.  The filter
appears to be split in two (com.sun.star.comp.oox.ppt.PowerPointImport
implementation oox::ppt::PowerPointImport from include/oox/ppt/pptimport.hxx for
im-/export, for export calling com.sun.star.comp.Impress.oox.PowerPointExport
implementation PowerPointExport from sd/source/filter/eppt/epptooxml.hxx) for no
good reason, so the com.sun.star.oox.PowerPointExport new-style service is
supporting a hack that should rather be cleaned up.

Conflicts:
	offapi/UnoApi_offapi.mk

Change-Id: I875192a68a8e3458dbfd74b4981a6a2e86ce44d7
2013-06-03 15:33:39 +02:00
f5d6e7af69 Fixing crash with dereferencing front() and back() of an empty vector
Change-Id: If7204614aa7a650f4a2804fc63dd3301ece2281e
2013-06-03 10:17:05 +02:00