Commit Graph

911 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
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
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
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
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
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
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
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
b5d93a58a7 valgrind: uninit variable
Change-Id: I5640291d9e221c9cffd7daec9d46a313fddfaf4e
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
5f0c969f43 Related: #i119607#, text font spacing in comments doesn't expand/condense...
by the expected value

Found by: xiao ting xiao, tingxiaox@gmail.com
Patch by: bjcheny, companycy@gmail.com
Review by: zhangjf

(cherry picked from commit 11fda1bd134b07c5bcaca6186d63107ec9f47b98)

Conflicts:
	writerfilter/source/dmapper/DomainMapper.cxx
	writerfilter/source/dmapper/DomainMapper_Impl.cxx
	writerfilter/source/dmapper/DomainMapper_Impl.hxx

Change-Id: Iecdaee97e49395df59719d724e1544e1802d947d
2013-06-03 00:49:41 +02:00
0181f258e5 Resolves: #i119558# set default page mode value to false for docx
To avoid default page mode affect the calculation of table row height

Found by: xiao ting xiao, tingxiaox@gmail.com
Patch by: zhaoshzh, aoo.zhaoshzh@gmail.com
Review by: zhangjf

(cherry picked from commit 28e1cb1240e7c7a274a04756c7cab2f5797de400)

Conflicts:
	sw/inc/unomap.hxx
	sw/inc/unoprnms.hxx
	sw/source/core/unocore/unomap.cxx
	sw/source/core/unocore/unoprnms.cxx
	sw/source/ui/uno/unotxdoc.cxx
	writerfilter/source/dmapper/PropertyIds.cxx

Change-Id: I41745eb9d727a5ae87d34872f9dc3f4442c7bc8d
2013-05-31 13:58:08 +01:00
173d24a731 n#816593: docx consecutive tables with different tblpPr needs to be split
When importing docx with 2 <w:tbl> following each other, we have 2
possible behaviors: either merge them as one table as we did before or
split them into two tables. The tables need to be split if they have
different floating position properties.

This required the ooxml tokenizer to repeat the table properties for
each row of the table: or how would we know we don't need to split the
table?

The basic idea behind this hack is to temporarily store the table
position and table properties before saving them. Thus we can compare
them at the end of the row and decide to split the table or not.

Change-Id: I2e3e70dfe7386090fe356575ee9d0e81aa031dc4
2013-05-31 14:12:46 +02:00
59db0cb675 bnc#817956 DOCX import of page border shadow
See the comment in SectionPropertyMap::ApplyBorderToPageStyles() on what and
how is mapped. The control flow is like this: BorderHandler::lcl_attribute()
notices w:shadow, then PageBordersHandler::lcl_sprm() gets it, passes it to
SectionPropertyMap::SetBorder(), finally
SectionPropertyMap::ApplyBorderToPageStyles() uses the UNO API.

Change-Id: Ib0aef3245f58c62655769357f1f4dd07eef77f62
2013-05-30 12:34:28 +02:00
4eaabc45f7 bnc#817956 DOCX import: missing last character of shape text
Make sure writerfilter only removes the last character of the text if
it's a newline.

Change-Id: I96980e2d148ced93363b3147545afdd0dd070e5d
2013-05-29 15:56:50 +02:00
9f4c8a8bca n#816593: Floating table width import fix: adjust the frame width
Change-Id: I8212bc5981418f6cbd514bf5002e6a5dbdf53152
2013-05-28 15:00:39 +02:00
992da0d5cf bnc#817956 DOCX import of document background color
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to
every page style.

Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237
2013-05-27 17:49:12 +02:00
6cf3094075 WaE: implicit conversion of NULL constant to nullptr_t
Change-Id: I2eefbca1ef986219f04504cba4ca09a22972e8cb
2013-05-24 12:40:46 +03:00
007f2dcf16 map docx line alignment properly to writer's line-of-text align (bnc#820792)
Apparently the top/bottom line of text alignment in writer is backwards
compared to all others, while alignment to the top of a page puts
an object's top edge at the top of the page, top of line of text
puts the object on top of the line (i.e. bottom edge of the object
at the line). The handling of NS_rtf::LN_YAlign suggests that swapping
bottom and top in the input filter is the right way of handling this.

Change-Id: I916c8ea0f2fd00de3e17b16b31433c9b6ba92e64
2013-05-23 16:36:46 +02:00
8943478b8d Related #i120832#, the style and color set on table text by user...
should have higher priority than that from table style

Found by: Jinlong Wu,wujinlong@gmail.com
Patch by: bjcheny,companycy@gmail.com
Review by: zhangjf

(cherry picked from commit fe7e723a727f6def90ee80ef2964a40546b37a90)

Conflicts:
	writerfilter/source/dmapper/DomainMapper.cxx

Change-Id: I3f4c96d49de40b21cc3da9bcb5e588a270434cd8
2013-05-23 01:36:50 +02:00
b40fe8e5a5 bnc#818997 RTF import: don't ignore page breaks between shapes
Change-Id: Ief71ba9a3c60356714e73d08e88d0a3105b17b1a
2013-05-21 15:18:45 +02:00
0063e19b33 #i121134#, more fix for i119657, fallback to old logic to use current AbstractNum when the desired one can not find
Found by: Li Lin Yi
Patch by: Jinlong Wu,wujinlong@gmail.com
Review by: zhangjf
(cherry picked from commit aa53b457faaf0fc50a8b38d17bf219de427a1044)
2013-05-20 23:04:45 +02:00
40a5d22fd4 Related: #i119657#, importing docx, add code to handle the problem...
that an AbstracNum references to a style, which references to another Num

Found by: xiao ting xiao
Patch by: Jinlong Wu,wujinlong@gmail.com
Review by: zhangjf

(cherry picked from commit d6870e145cc7373a422b414c31380cc1399e64cc)

Conflicts:
	writerfilter/source/dmapper/DomainMapper.cxx
	writerfilter/source/dmapper/NumberingManager.cxx

Change-Id: I9be0b82d601bf43da31842edb02c4b0d4e50e84f
2013-05-20 23:04:45 +02:00
d0edc4e4c3 bnc#779630 DOCX import: improve w:sdt size guessing
The problem was that when border was enabled (and the importer leaves it
unchanged, and it's on by default), there was not enough space for the
text.

Change-Id: I3ce770eb523389bcf7c5e83d4e76155e2c45de6d
2013-05-16 17:38:07 +02:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
9ceda3013a fdo#64249: make sure we have matching start/end level for table in shapes
Change-Id: I4928f6a54e6cca9b26c0d2391fc1545688be2375
2013-05-14 15:01:50 +02:00
d29cdd990d cppcheck: fix redundantAssignInSwitch
Change-Id: I0cda1957488ed1f0b279d8c783fe28c90579b466
2013-05-12 12:03:48 +02:00
16e6841fcd Resolves: #i119161# copy sStyleIdentifierI and sStyleIdentifierD...
from StyleSheetEntry when constructing a new TableStyleSheetEntry object

Patch by: Jinlong Wu

(cherry picked from commit 11eb354532cfb354f9f7c3a72b170c9c8289b75c)

Change-Id: I80054bc6c36bc7c5ed1034e0aadd88cd1a2f3091
2013-05-11 14:20:28 +01:00
254c5c694b fdo#64256 writerfilter: handle void GraphicURL in ListsManager::lcl_sprm
Change-Id: I4d8b1b527d5099781a36cc1265318c167205340e
2013-05-07 12:15:11 +02:00
7dfc4da808 handle graphic bullets in .docx also when saved as <w:pict>
Change-Id: I7225b4b024c6b7c549d0c9fbf5204df653577bec
2013-05-02 17:00:36 +02:00
4314e65483 Fix out-of-bonds Sequence access in NumberingManager with page numbering
Change-Id: Ib35fcee1605215fb22ae9838b29fe1d8be5eaf58
2013-05-02 12:58:06 +02:00
3ec2d26dc2 bnc#779630 initial DOCX import of w:sdt's w:date
Also factor out the w:sdt-related methods to a helper class to avoid
DomainMapper_Impl become a God object.

Change-Id: Ic1a388940bce89688e8558818f92ce9ac997609c
2013-05-02 12:14:47 +02:00
9cc1e7b165 bnc#779630 initial DOCX import of w:sdt's w:dropDownList
Change-Id: I57d4768a26476d1a0535087c60535393b7004b24
2013-04-30 11:57:08 +02:00
b399c1a38c n#592908: docx import, fixed handling of w10:wrap
commit f837c4288cdae4921b3fb6747ba2e2cd5ce2dcd2 moved the handling of
w10:wrap tag in oox, but thus no wrapping was imported any more.

The fix consists in letting the w10:wrap element be handled by writerfilter's
dmapper if the shape has already been retrieved from oox (which is the
case for textboxes). In other cases, make sure that we don't set the
Surround property once again in writerfilter as that would override what
has been done in oox.

(cherry picked from commit 51d5e90b7c09cb980bc72a2c6b1a65303ef15ea2)

Conflicts:
	oox/inc/oox/vml/vmlshape.hxx
	sw/qa/extras/ooxmlimport/ooxmlimport.cxx

Change-Id: I8ab158641afcf6b9945c52238e7f5adb9e8b3adf
2013-04-30 09:34:28 +02:00
29dcdf6b56 check for NS_ooxml::LN_CT_Style_type being processed first
The code relies on NS_ooxml::LN_CT_Style_type being handled first
(because of m_pImpl->m_pCurrentEntry being reset there), so
at least check for it. Still no idea how to actually ensure
the correct ordering in this overdesigned $#%@! writerfilter thing.

Change-Id: Ib6a2129a078728e162257275ac2a1243dbaf4017
2013-04-24 20:51:15 +02:00
c8da8f4841 avoid crash when no table grid is given
The document may contain just <w:tblGrid/> and <w:tblW w:w="0" w:type="auto"/> .
It appears we do not handle the auto width properly at all, but at least don't crash.

Change-Id: Ibdc9d1ad69c13456acd347a151ec8739bcb98855
2013-04-22 18:07:41 +02:00
6d7dc74b38 n#382137: Do run out of bounds (& consequently crash) when we have 0 spans.
Maybe just works around the root issue (I did not debug deeper if this is
correct to have 0 here), but improves the code overall, so why not to do this.

Change-Id: I7c2b7f7e410faea5c1d6f3c15f1bc0f155dfb1f4
2013-04-22 11:51:52 +02:00
a88ac70840 fdo#63685 wp:inline's distT/B/L/R is in EMU's, not twips
Regression from 3d7e168a2a43c2414b0633379102ddb29437e75b.

Change-Id: I9ab3f9f41316a01d5a74f3e500bad7a83c8d2dca
2013-04-19 17:32:21 +02:00
e7664052d6 fdo#61193 fix crash on RTF paste of footnote
Regression from 232ad2f2588beff50cb5c1f3b689c581ba317583.

Change-Id: Ia0873851979df5bba0a4693f044aab2aeff2b8e4
2013-04-16 10:36:49 +02:00
acc671ec74 Resolves: #i119464# Update default alignment value for docx [Sub]Title
Patch by: Ying Zhang
Review by: mayongl

(cherry picked from commit 22602686933abaa1512ebd3bca77dbb9987b6ad5)

Change-Id: I04cf1bbbeadf23147fa2cbc1c08c850288ef943a
2013-04-11 12:10:05 +01:00
836dd78edf coverity#1000707: out of bounds access
Change-Id: I889ccb08f8f44bd558d95505342af0336dca0b0f
2013-04-10 18:03:51 +02:00
717553f9cd Fix variables not initialized
Change-Id: Ib741c7144bfa48f8071c2b86478c111dbf09b14e
2013-04-07 21:49:31 +02:00