Commit Graph

3037 Commits

Author SHA1 Message Date
818d80eb0c RTF import: support shapes inside tables
This is a better fix for fdo#47802, now that shape import is no longer
buffered.

Change-Id: Idce6d11e6774d1fe7fc04b6a52d5b77a3879381e
2013-07-01 11:43:57 +02:00
7a8f720cc0 RTFValue: support storing RTFShape
Change-Id: Ia24fe7556598ad88f3b72a62bef2361a3fd0a712
2013-07-01 11:43:57 +02:00
7857d772f7 SmOoxmlImport: update doc on how to extract handled token list
Change-Id: I7cea50e99a4ffd9eac357251ffe630921ec64795
2013-07-01 11:16:25 +02:00
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
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
a09c27ec3e RTFDesitnationState -> RTFDestinationState
Change-Id: I74e371b531d1a0d5cc9393dd10b9ee2c65ac2e4e
2013-06-28 15:57:40 +02:00
74c5ed19f4 DOCX import fix for table with auto size
Change-Id: Ic86f4f142e579bdef3e954492e1c1e382a545739
Reviewed-on: https://gerrit.libreoffice.org/4496
2013-06-28 11:43:48 +02:00
ee80670695 n#820800: docx import of wrap polyon was based on dest size of picture
... instead of the original size of it.

Change-Id: Ib251206dd092a7c47343caf50bd05a3dfec1af09
(cherry picked from commit ae6981601b0e9175efaf9849b1279290ea3380f6)
2013-06-27 15:18:49 +02:00
55162d7422 bnc#823675 RTF import: fix import of numbering bullet associated font
There were multiple problems here:

- \f had a special handler for the listlevel destination, \af had not
- in case of multiple \f or \af, the first one is used for the bullet
  font
- in case only \af is used for the bullet font, its value should be used
  for \f as well

Change-Id: I6631504c1aa9f2e0792a3469a5fdce5b7bd49518
2013-06-26 17:30:02 +02:00
351e8d77f9 Kill RTFDocumentImpl::getState()
RTFParserState is private to RTFDocumentImpl, exposing it is not a good
idea. One more step towards RTFTokenizer not speaking directly to
RTFDocumentImpl, but through an interface.

Change-Id: I3f626d4f2c560a20d9e24105459e95a66d0a87ca
2013-06-26 09:14:46 +02:00
a8ee2ee752 fdo#66040 RTF import: initial groupshape support
There are two cases here: if the shapes contain tables (or other
Writer-specific features), we should use text frames and we should not
create the actual group shape, as Writer textframes can't be part of
such group shapes.  The other case is when the shapes contain simple
text, OTOH there are groupshape-level transformations defined, in that
case we should choose drawinglayer rectangles and actually create a
group shape.

This commit implements support for the first case only.

Change-Id: I9dc99b0711ce5c7a29ea0b14539df0121f9de3d0
2013-06-25 15:35:02 +02:00
3a06d98fdf remove unused variable
Change-Id: I5dd8dc9a3a256e51706d32249260f6561202bbc9
2013-06-25 14:00:05 +02:00
26d4068612 fdo65400: fix for Character Shading being lost
This bug fixes the DOCX import and export filters, adds a new property
to the document model and updates the UNO API.
There is no need to add layout \ UI updates, because in Word
the only way to turn this on\off is using a simple button,
and there is no way to control the shading color itself.
However, ODF import \ export filters should be updated in a future
commit.

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I1d34cec79289e38c08e42a4c6265d998e1edfdef
Reviewed-on: https://gerrit.libreoffice.org/4452
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-25 10:04:01 +02:00
ddddfe8d6f bnc#823655 fix RTF import of freeform shape coordinates
E.g. 0,1 was imported as 1,0, as we did not differentiate between not
having the coordinate yet and having it as zero.

Change-Id: Ia5fbbcc791dc9c6866ffd4c146793690661d81b4
2013-06-24 15:11:15 +02:00
6edcfde748 fdo#56679, fdo#65710 : fix for import and export of underline color
Change-Id: Ifc45900d73802ef99c55d7af4ee04314dd04f1c5
Reviewed-on: https://gerrit.libreoffice.org/4459
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-24 09:34:18 +00:00
3dac2c4b5d cppcheck: fix inefficient checking
Change-Id: If015900345304a9545ab0b66c6998a9d6bad9d1f
2013-06-23 10:31:30 +02:00
c6a941b51b bnc#823655 RTF import: ignore styles without a type
Regression from 29dcdf6b56f8dbc1b7de0478afb04122f8dbf0f9.

Change-Id: I970c0e7b3652d7e6f093815b90e04e0c45904b28
2013-06-21 16:11:01 +02:00
363dafefad fdo#43641 writerfilter: tokenize lc:lockedCanvas
These are just the minimal changes, so that writerfilter calls into
oox::shape::ShapeContextHandler, which does the real work.

Change-Id: Ia53731ac8592964b70e8a438ed09262463c05360
2013-06-20 10:46:56 +02:00
782adba4d4 fdo#64238: fix for missing footer bug
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I328547c41bfc1a23f7e6233db57fbfa415e22cb3
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-19 14:31:38 +02:00
fa2363344c fix rtf import on big endian
Change-Id: Ia9f589752176849f7f6700483e933767e509edf3
2013-06-19 12:44:29 +02:00
b5f3f55ce5 fdo#43460 unoxml,writerfilter,xmlsecurity: use isEmpty()
Change-Id: Iba3b39086212803bc41384f5c8f51e42712a5249
Reviewed-on: https://gerrit.libreoffice.org/4349
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-19 10:11:34 +00:00
2af60e2eff bnc#825305 RTF import of fFilled shape property
Change-Id: Iaa2ff9d5d1a28aec046f885acecbd1a44c734ec0
2013-06-18 17:13:39 +02:00
0e1c9b0a47 -Werror=maybe-uninitialized
Change-Id: Ic2011b6c3db44d12c0dc883019d2d532bbda467b
2013-06-18 16:09:40 +02:00
33231f418f n#820836: dmapper, fixed typos in first page style creation
Change-Id: I80031cab7c0304311bd5acbb3a2ead48e15594bb
(cherry picked from commit ab653ae64d782e5bd54bd169ab11755dab310553)
2013-06-18 11:48:25 +02:00
122db845e0 n#820504: default color hidden by Default style in writerfilter
Setting the font color of the default paragraph style to Auto makes the
color set in the Writer defaults (from rPrDefault) ignored.

Change-Id: I1dcd92bcd0774f5229785373242899a492ab7b7c
(cherry picked from commit d7acb5ba0924f848f1ae96eceab50a0169d18445)
2013-06-18 09:57:11 +02:00
ae85b56a9a Import/export RTF_REVISIONS
File -> Properties -> Security -> Record Changes on the UI.

Change-Id: I96d321f407abd33e15a4a133e6723d48efa5bc53
2013-06-16 14:47:07 +02:00
be53bec4fa RTFDocumentImpl::getShapetextBuffer can go as well
Hopefully this was the last trace of buffered shape import in the RTF
filter.

Change-Id: I42a531954ef5832473c43c121d569635f144a4d1
2013-06-16 12:49:33 +02:00
769266a9b9 RTFDocumentImpl::replayShapetext is no longer needed
Change-Id: I3dce867e01049d815b61b5292ec7afacffa5b2e8
2013-06-16 12:49:33 +02:00
e9911f12d1 docx: fdo#43093 fdo#44029 fix the alignment when the paragraph are RTL
this will fix the alignment for RTL paragraph when import/export MS docx file.
the alignment should be exchange when the paragraph are RTL.
it will also fix text direction export for RTL paragraph.

Change-Id: I5fe55205677d6e12142e398570cba78094705692
2013-06-16 12:26:20 +02:00
aa0f3ca1cd RTF import of fFitShapeToText shape property
Change-Id: I1d0cd0d34284e6ecabd0b4dc9bf25bc31b7ff4c1
2013-06-16 12:11:03 +02:00
4ab658b56f RTF import: implement support for tables inside text frames
Change-Id: I6088adad20212cdbcc03b193cc079c51a305602a
2013-06-16 00:37:18 +02:00
2fc088afdf Factor out RTFSdrImport::applyProperty() from RTFSdrImport::resolve()
Change-Id: Idd352e712e20e6e64c80490daf4b2a5e74d47a97
2013-06-16 00:37:18 +02:00
9d640dc6ad RTF filter: import posh/posv property of shapes
Change-Id: I55eccccf7f9ed06bba1ada18574890b5bee296f4
2013-06-15 19:32:14 +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
db23f89b76 fdo#65655 : fix for Different_Odd_And_Even_Pages flag ignored
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: Icf9949bb00aa905d22aedfd8f2b297dfa89dfedb
2013-06-13 09:40:06 +02:00
4696292b9a Fix typo
(cherry picked from commit 497e0d2ce2169a70aa2d2182fa1cf3096b8b2fbc)

Change-Id: I9cf246c94236382bc9d58e3a76c855951dd5166a
2013-06-12 20:31:52 +01:00
9e50e5f829 rtl_string2UString_status() - Wrong TextEncoding
Change-Id: I5d0efc9006cac379a5c03a61817cf989227a06ff
2013-06-12 15:07:08 +02:00
a4fee33b23 abi#4817 attempt to access an element in an empty container
Change-Id: Ic51ef8b3db182dd34195c9bb808170d20953d406
2013-06-11 16:25:21 +02:00
e75a8b8eff writerfilter: move the RTF tests to slowcheck
These now take around 5sec here, which is slow enough to be annoying --
if you have to wait for it after every partial build.

Change-Id: I795fefcd79889aca7b00a5b3d408ee3488b13b03
2013-06-11 16:25:21 +02:00
47f218fcf4 hack for reading properly textencoding for opensymbol from old LO
Which did it because of bullet font not having it correctly
(fixed in 44c133ef996e32ebdfc9560bcf14b0cd77196a9e).

Change-Id: I6992de03816661cf6970140eb35816e26cf0e612
2013-06-11 16:22:03 +02:00
d94bda0c1f Correct the XML document handler...
which is used to parse Microsoft Word OOXML documents in case of unknown XML
elements

(cherry picked from commit 22e334845346f4e3189c72e706d744385953af19)

Conflicts:
	writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
	writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
	writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx

Change-Id: Ibcd3e808abfb35291bb04aa10190a7800f0837fa
2013-06-10 19:05:06 +01:00
dcfefd6676 Related fdo#33895 add some checks against NULL derefs
Change-Id: I9c62a063788a494125ce8dc27748ed66022f5c48
Reviewed-on: https://gerrit.libreoffice.org/4199
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-10 08:27:19 +00:00
2c64af5295 fdo#64656 RTF import: handle levelnumbers without leveltext
Change-Id: I34ce7b172dc94489f7f506796e66b14598aab19c
2013-06-10 09:47:31 +02:00
288a606ae7 RTFDocumentImpl::checkUnicode: make this a bit more readable
by not using default parameter values.

Change-Id: I82c84e3563cba60682d297eb1b1d8a139160d579
2013-06-07 17:12:49 +02:00
b5d93a58a7 valgrind: uninit variable
Change-Id: I5640291d9e221c9cffd7daec9d46a313fddfaf4e
2013-06-06 12:00:46 +01:00
fa671cecd4 add some checks against NULL derefs
Change-Id: I85fbf279991ee361ea081d92d9acc84d36677af1
2013-06-06 12:00:46 +01:00
58197c3692 bnc#820509 DOCX import: handle M.d.yyyy date format in w:sdt
Change-Id: Iae233c24a9580ffc8ea4680276161a543171f63c
2013-06-05 12:00:08 +02:00
3d6a7cf3eb bnc#820509 DOCX import: try harder to disable form design mode
Previously this only worked if we had indexes in the document as well,
but actually these are independent.

Change-Id: I28afa60d2606230c901948d4c1da8f5a7c50a9f7
2013-06-05 12:00:08 +02:00
2ade071269 fdo#62044 RTF import: don't overwrite existing styles when pasting
Change-Id: I80a83caebc8fa3f038cf2ff080c6c6ec8e93fb70
2013-06-04 12:42:20 +02:00
1e4422a4b4 re-base on ALv2 code. Includes:
Patches contributed by Mathias Bauer
        gnumake4 work variously
        http://svn.apache.org/viewvc?view=revision&revision=1394707
        http://svn.apache.org/viewvc?view=revision&revision=1394326
        http://svn.apache.org/viewvc?view=revision&revision=1397337
        http://svn.apache.org/viewvc?view=revision&revision=1397315
        http://svn.apache.org/viewvc?view=revision&revision=1396797

	Patches contributed by Andre Fischer
	Fixed getcsym.awk to handle #-comments that contain special regexp chars.
        http://svn.apache.org/viewvc?view=revision&revision=1230971
	118778: Added ADDITIONAL_REPOSITORIES environment variable and its
	automatic setup in configure.
        http://svn.apache.org/viewvc?view=revision&revision=1232004
	118160: Added external CoinMP library.
        http://svn.apache.org/viewvc?view=revision&revision=1233909

	Patches contributed by Herbert Duerr
	#i119168# use generic LICENSE file for langpacks and sdks
        http://svn.apache.org/viewvc?view=revision&revision=1310178
	macosxotoolhelper: need to quote perl regexp if it may contain regexp metachars
        http://svn.apache.org/viewvc?view=revision&revision=1183367
	allow gbuild with empty sysroot on linux
        http://svn.apache.org/viewvc?view=revision&revision=1179186

	Patches contributed by Ingo Schmidt
	native373: #164472# improvements for msi database
        http://svn.apache.org/viewvc?view=revision&revision=1167540
        http://svn.apache.org/viewvc?view=revision&revision=1167539

	Patches contributed by Jurgen Schmidt
	adapt setup package scripts to handle special DS_Store file for
	developer snapshot builds
        http://svn.apache.org/viewvc?view=revision&revision=1232430
	imported patch extensions_i117681.patch
	http://svn.apache.org/viewvc?view=revision&revision=1172102

	Patches contributed by Michael Stahl
	gbuild: RepositoryFixes.mk should be optional
        http://svn.apache.org/viewvc?view=revision&revision=1166123
	xslt filter: remove the FLA horror
	wordml import filter: replace FLA usage with plain XSLT
	http://svn.apache.org/viewvc?view=revision&revision=1363727

	Patch contributed by Oliver-Rainer Wittmann
	i#88652: applied patch, remove unicows deps
	http://svn.apache.org/viewvc?view=revision&revision=1177585

    Remove lots of OS2 conditionals, re-extract Rhino Java, unwind
    cppunit pieces, cleanup Mac image bits, remove coin-mp and
    re-package lpsolve, Oxygen & Crystal, fixup qstart bits, expand
    MPLv2 subset checking.

Change-Id: Iad5c8a76399620b892671633c0d8c29996db3564
2013-06-03 11:41:36 +01:00