Commit Graph

5490 Commits

Author SHA1 Message Date
5c3f673c1f Robustify WW8FormulaControl::FormulaRead reading SvStream.
The >>operator of SvStream doesn't initialize a variable if the stream
is faulty. So initialize the variables before usage to prevent reading
wrong/random bits.

Change-Id: Ia66dd6d8574c36e7229a58347f2e2c1e0fe2e248
Reviewed-on: https://gerrit.libreoffice.org/4636
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-07-01 12:24:33 +00: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
11eb95f740 Resolves: #i120938# consider left indentation when converting...
tab stop positions of styles

(cherry picked from commit 7b20978d84db1f7f545ff608bdb09275813e2219)

Change-Id: I068a8dced069c4676623723f16ae4d85997f086d
2013-06-27 10:16:35 +01:00
7a22c4c519 Resolves: #i120582# consider the case that a right indent is set...
at the paragraph

- some minor reformatting and cleanup of older comments

(cherry picked from commit e4578fcc2408a530d373653b01c0a88ef46ea26f)

Conflicts:
	sw/source/core/text/txttab.cxx
	sw/source/filter/ww8/ww8par.cxx

Change-Id: I345a20c78f26be60de3eb01ac6f5303de46c2fc1
2013-06-26 20:35:57 +01:00
b8298f8e19 DocxAttributeOutput: -Werror=unused-macros, -Werror=sign-compare
Change-Id: I9d75b0a625009d483467042584d2d2f89501cb96
2013-06-25 12:49:17 +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
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
b7f2129c11 Resolves: #i120023# RTF export certain special copy-and-paste scenarios
(cherry picked from commit d70e1e8ea81a942875f91fdef75d3e39fba42eff)

Conflicts:
	sw/source/filter/ww8/rtfexport.cxx

Change-Id: I845f3f2bebe411969483a53c45ef9413f7f1b903
2013-06-19 20:15:22 +01:00
f86ec4cdbd Start translating German comments, fix some WS
Change-Id: Ia53a9283fcb8f75386ec23ab3a3df5195a9995df
Reviewed-on: https://gerrit.libreoffice.org/4365
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-19 16:38:37 +00:00
5883e1926b fdo#43460 sw: use isEmpty()
Change-Id: Ia23f01ee28f1dfd8079abedda50bbef0a5a1beec
Reviewed-on: https://gerrit.libreoffice.org/4334
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-18 17:27:52 +00:00
b9155a663b fdo#65882 - fix intermittent writer unit test failure on exit.
Change-Id: Iffa4ea724f2192f85df66eaf4e9e4f30e6ba3d4b
2013-06-18 10:00:44 +01:00
8956854d8e String to OUString (SfxStringItem and related)
Change-Id: I390413e9ff3efee720a6423fb8695b4c655d7efa
Reviewed-on: https://gerrit.libreoffice.org/4280
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-18 08:11:58 +00:00
2f4012a977 cppcheck: fix some uninitMemberVar in sw part
Change-Id: I6492f87b9ca04a67c738da1ea173df98e382951a
2013-06-16 22:35:02 +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
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
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
43de0b2443 Related: #i119548# document that ms changed the meaning of fWidowControl
Change-Id: I884c3c57dfd1d2e7bfa0675fd0c0184113cdda9c
2013-06-14 09:56:49 +01:00
0e619cb550 Resolves: #i119548# Window/Orphan control setting lost when save .doc file
Reported by: luo qing le
Patch by: Lei De Bin
Review by: Chen Zuo Jun

(cherry picked from commit 9b161d18404d8fac5663bc3b3a854bdd4fad3bf0)

Change-Id: I7e51d2fd6b72d08b793b857cf2a3de5989145695
2013-06-14 09:55:39 +01:00
7edabc8639 Resolves: #i119470# fix page number in header lost when save in web layout
Reported by: luo qing le
Patch by: Lei De Bin
Review by: Chen Zuo Jun

(cherry picked from commit 3654740a6f770631d34897aad345f006313c46b9)

Conflicts:
	sw/source/filter/ww8/wrtw8esh.cxx
	sw/source/filter/ww8/wrtww8.hxx

Change-Id: I1c25d17b1780adeddee46d500f2f0753944e9ffc
2013-06-14 09:41:27 +01:00
5614804a66 cppcheck: fix a bunch of reassignments
Change-Id: I4dfea342905d38a47dfac91bc4a4875c9338f5d5
2013-06-13 21:04:23 +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
e0cce521f1 Resolves: #i121504# Support for alpha channel in clipboard for all systems
(cherry picked from commit ef3931ff410117e1237b3bef7bc090e8b83b9519)

Conflicts:
	automation/source/server/statemnt.cxx
	basic/source/runtime/methods.cxx
	canvas/source/vcl/devicehelper.cxx
	canvas/source/vcl/spritedevicehelper.cxx
	drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
	drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
	drawinglayer/source/tools/converters.cxx
	dtrans/source/win32/dtobj/FmtFilter.cxx
	editeng/source/items/bulitem.cxx
	extensions/source/scanner/sanedlg.cxx
	external/gcc3_specific/makefile.mk
	filter/source/graphicfilter/eos2met/eos2met.cxx
	filter/source/graphicfilter/ios2met/ios2met.cxx
	filter/source/msfilter/msdffimp.cxx
	fpicker/source/office/iodlg.cxx
	framework/source/fwe/classes/addonsoptions.cxx
	framework/source/fwe/helper/actiontriggerhelper.cxx
	sc/source/filter/excel/xiescher.cxx
	sc/source/ui/docshell/docsh.cxx
	sc/source/ui/inc/viewfunc.hxx
	sd/source/ui/app/sdxfer.cxx
	sd/source/ui/unoidl/unopage.cxx
	sd/source/ui/view/sdview3.cxx
	sfx2/source/appl/fileobj.cxx
	sfx2/source/appl/linkmgr2.cxx
	sfx2/source/dialog/filedlghelper.cxx
	sfx2/source/dialog/intro.cxx
	sfx2/source/doc/docinf.cxx
	sot/inc/sot/formats.hxx
	sot/source/base/formats.cxx
	svtools/bmpmaker/bmpcore.cxx
	svtools/bmpmaker/bmpsum.cxx
	svtools/inc/svtools/transfer.hxx
	svtools/source/filter/filter.cxx
	svtools/source/filter/wmf/emfwr.cxx
	svtools/source/filter/wmf/enhwmf.cxx
	svtools/source/filter/wmf/winwmf.cxx
	svtools/source/filter/wmf/wmfwr.cxx
	svtools/source/graphic/graphic.cxx
	svtools/source/graphic/provider.cxx
	svtools/source/misc/transfer.cxx
	svx/inc/svx/xoutbmp.hxx
	svx/source/sdr/overlay/overlaymanagerbuffered.cxx
	svx/source/xoutdev/_xoutbmp.cxx
	sw/source/core/view/viewsh.cxx
	sw/source/filter/ww1/w1filter.cxx
	sw/source/filter/ww8/ww8par.hxx
	sw/source/ui/dochdl/swdtflvr.cxx
	toolkit/source/awt/vclxbitmap.cxx
	toolkit/source/helper/vclunohelper.cxx
	vcl/Library_vcl.mk
	vcl/Package_inc.mk
	vcl/aqua/source/dtrans/DataFlavorMapping.cxx
	vcl/aqua/source/dtrans/OSXTransferable.cxx
	vcl/aqua/source/dtrans/PictToBmpFlt.cxx
	vcl/aqua/source/dtrans/PictToBmpFlt.hxx
	vcl/inc/vcl/alpha.hxx
	vcl/inc/vcl/bitmap.hxx
	vcl/inc/vcl/bitmapex.hxx
	vcl/inc/vcl/pngwrite.hxx
	vcl/inc/vcl/salbtype.hxx
	vcl/inc/vcl/wall.hxx
	vcl/source/gdi/animate.cxx
	vcl/source/gdi/bitmap2.cxx
	vcl/source/gdi/bitmapex.cxx
	vcl/source/gdi/bmpconv.cxx
	vcl/source/gdi/cvtsvm.cxx
	vcl/source/gdi/impgraph.cxx
	vcl/source/gdi/impimagetree.cxx
	vcl/source/gdi/metaact.cxx
	vcl/source/gdi/wall.cxx

Change-Id: I79938bc412c048c3d4e64f430f216e73bec16167
2013-06-13 14:50:46 +01: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
837ccd73e2 DOCX: don't export auto color as page background
That auto here would mean black, potentially rendering the whole
document unreadable.

Change-Id: Ie17a6a9b00c9ab24204291d09175a3fba69cd4ea
2013-06-13 11:03:41 +02:00
c4ebd00813 include cleanup
Change-Id: I7818fe1f6acedc40b1bdd59cfa7e8fe23a6c685e
Reviewed-on: https://gerrit.libreoffice.org/4209
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-12 08:54:50 +00:00
f7595decdf fdo#65265 : fix for DOCX export of formatting data
Change-Id: Iab3c56e5c3e3cf359e42cf7080883d1408cc3304
Reviewed-on: https://gerrit.libreoffice.org/4215
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-11 10:21:21 +00:00
8a3f61c42b Revert "Check pointer before deferenging"
these are all exception enabled .o's new doesn't return NULL on failure, it
throws bad_alloc

This reverts commit 6b379300ad3fdbc5c58901c6e06fe600367f83c0.
2013-06-08 21:33:13 +01:00
6b379300ad Check pointer before deferenging
Change-Id: I9bf9ad249afc88379d66337059a73297880acd83
2013-06-08 21:59:19 +02:00
43941d9a53 sal_Bool to bool and some cleanup
Change-Id: I4b20be1a3558e6b48a224e37e7f50944bb6bd237
2013-06-08 21:59:18 +02:00
d56497365f Resolves: #i119831# check again the node if the bookmark belongs to it
(start and end position)

Patch By: jsc
Review By: orw

(cherry picked from commit 016331f9cc330abca8ea3bedd1be9f50cd68dc18)

Change-Id: I7ad4a10be855806aeb9fc6fef5fbfba377671fc8
2013-06-08 16:20:21 +01:00
a11bf86ba8 Typos
Change-Id: Ie256ce5c1c7b82e0dbe5877524a5e5aa2c9c3ab1
2013-06-08 14:03:58 +02:00
9eb4e4dc51 Some more modules at least building with mingw64
Change-Id: I3ea039655aecb7885bb310b1f2c29d66f9f7bb4f
2013-06-06 19:49:56 +02:00
248a63f5d0 bnc#382137 DocxAttributeOutput: don't store address of local variable
AttributeOutputBase::TextField() passes the address of its local
variable to WriteExpand(), and DocxAttributeOutput::WriteField_Impl()
stored this. When it was to be used, the variable already went out of
scope, resulting in a crash. Given that SwField is an abstract base
class, the easiest way is to just copy the field and manually delete it
when it's no longer needed.

Change-Id: I9d1fe2485277f1ac21a576d7ff0d05003f0ac8a1
2013-06-06 16:42:13 +02:00
408d060dff fdo#64350: fix for DOCX export of border space
Change-Id: Ibd333aa4f85ed04c531187eb89b879196dca2bd8
Reviewed-on: https://gerrit.libreoffice.org/4167
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-06 07:54:25 +00:00
f06cc552a0 wwSectionManager: fix import of page borders
Regression from 1e113cb7604e1509e7d598a9be329f1f7b6e9322. According to
the spec (see 2.9.181), the first bit disables border of "all but first"
pages, the second bit disables the border of first pages.

Change-Id: Ie49c9b7b76d34c2a93350481965790976f49d7df
2013-06-06 09:45:55 +02:00
dcbaf7c253 remove unused componentcontext.hxx includes
Change-Id: I598926b72c5540b472f9607e2f3df134a8c50048
2013-06-05 08:13:21 +02:00
bb6ecd8b40 sw: fix ~SwIndexReg assert
Not really a problem, since local aRegion's point is not used after its
node is deleted.

Change-Id: Ibeb885fb31f19b02e4c3c63e3b99d00ced756810
2013-06-03 16:16:41 +02:00
89935d1882 Introduce DocxExport::getBackground()
Does the same as part of DocxExport::WriteMainText() and
DocxExport::WriteSettings().

Change-Id: I5597edc2c3a84bd2058ee8c4cfdc21241e471bd3
2013-06-03 10:25:59 +02:00
515701a1ff fdo#65257 : DOCX not exporting background color
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>

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

Change-Id: Ida3f66d5adb063400494e1da589a463b4d7c2a86
2013-06-03 09:59:33 +02:00
8079f40743 Make use of IsStarSymbol()
Change-Id: I7a2e3a6f11bbaaaff50e8163e4ce3e2583b1d03c
Reviewed-on: https://gerrit.libreoffice.org/4077
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-05-30 15:54:47 +00:00
713cfaf984 WaE: C4146 unary operator applied to unsigned type
Change-Id: Ic23667dc5fb455a7b11f49f4a13df2c49496f702
2013-05-29 23:52:13 +02:00
b45876bf0f provide complete type of CellInfo before it is used
(cherry picked from commit 687d6ed3e4ecb836634bfda71bb5596e18bbc2e1)

Conflicts:
	sw/source/filter/ww8/WW8TableInfo.hxx

Change-Id: If21c5d7c6db2803f7da59e28c00d47790abffe86
2013-05-29 12:58:46 +01:00
fc08fc9865 Resolves: #i113600# Add call to subtable SwXMLTableRow_Impl.dispose()...
to break cycle reference to SwXMLTableContext object

Found by: zhangjf
Patch by: zhangjf

(cherry picked from commit ba47a717e009b2b497cbccfca2872e66f9ecb130)

Change-Id: Iba0b581920417b3866b07542621d56ccdc272261
2013-05-28 11:48:03 +01:00
e94c852104 fix fdo#64872 infinite loop saving as doc
When loading from odt, table cells which are covered (due to merging of
cells) are replaced with an empty cell by
SwXMLTableContext::ReplaceWithEmptyCell.  However if there is a sequence
of cells covered from above then their replacements are accidentally
inserted in reverse order, which produces this infinite loop problem when
saving as doc.

The reverse ordering in SwXMLTableContext::ReplaceWithEmptyCell was because
the insert position came from SwXMLTableContext::GetPrevStartNode which was
very careful to skip previous covered cells.  However those cells have
already been replaced with an empty cell so they should not be skipped.

Change-Id: I6a022cd1490afa181dbc3e4b2d6ed4af3077b363
Reviewed-on: https://gerrit.libreoffice.org/4008
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-05-27 12:46:25 +00:00
f9a3a8a41d Fix issue #i120654: Number range variable filed shows in AOO
* sw/source/filter/ww8/ww8par5.cxx
MS Word Binary compatibility

Patch by: Jane Kang,<kangjane2012@gmail.com>
Found by: Yan Ji,<yanji.yj@gmail.com>
Review by: Jian Hong Cheng,<chengjh@apache.org>

(cherry picked from commit 720fc77527377968a45631d1c6a711b4cae02d39)

Change-Id: I428fadd46bbd5b57081e35dcbfd6bb0c10c08282
2013-05-27 12:54:15 +01:00
ee0ecef811 Resolves: #i120158# fix picture shadow lost after saved as doc in some case
Reported by: Yan Ji
Patch by: Chen Zuo Jun
Review by: Lei De Bin (cherry picked from commit fe549458ef04384ba777e4a36f34b68efc5b8b6d)

Conflicts:
	filter/source/msfilter/msdffimp.cxx
	sw/source/filter/ww8/wrtw8esh.cxx

Change-Id: I863ea7193f3dee563a892a6d857ee2385f58a862
2013-05-27 12:11:40 +01:00
6cf3094075 WaE: implicit conversion of NULL constant to nullptr_t
Change-Id: I2eefbca1ef986219f04504cba4ca09a22972e8cb
2013-05-24 12:40:46 +03:00
9413f2124d improve exporting of picture alignment to docx
Basing this on anchoring is wrong, as SwFmt{Hori/Vert}Orient seems to provide
everything. Also try avoid hardcoding position if possible.

Change-Id: I880bc5c3eeabdde9e52c0c16d1033e44e203a8a3
2013-05-23 16:36:46 +02:00
286bfde8c3 fdo#64826 : fix for track-changes export in DOCX
Change-Id: I44b505f977edcf9e0af2108487870352277ee9f0
Reviewed-on: https://gerrit.libreoffice.org/4011
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-05-23 12:28:27 +00:00
6e2ff4edb2 oups, I shouldn't have commited it
Change-Id: I0b7433431c2da50c17f46549cde30b2b0131c61f
2013-05-23 01:38:54 +02:00