Commit Graph

809 Commits

Author SHA1 Message Date
36f58d4dd1 sw doc model xml dump: handle SwDoc::mpFrmFmtTbl
Change-Id: Ie15ff20524e7065323e681945bb5eaf199a2bf3a
2014-05-19 19:46:28 +02:00
87ad02d5ad coverity#708847 Unused pointer value
Change-Id: Id16ebc576834e418a3bf2d3d6eb3e2545e0aac2b
2014-05-16 16:42:54 +01:00
942156b1ed sw doc model dump: show SdrObject::nOrdNum
Change-Id: I4ac2c3d883dd9bb111a2d600f5a17ea96a1e219e
2014-05-16 14:53:42 +02:00
82335d982a coverity#736844 Dereference before null check
Change-Id: I37e02d92590d7ac480b831a347bb9902febb8805
2014-05-11 21:06:00 +01:00
0c5c0cd534 SwFrmFmts::dumpAsXml: dump which id
Change-Id: I66d7c8444c1a89c21ea2ce5e42fb3cd97fd39b7c
2014-05-07 12:08:29 +02:00
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
6aa35db393 sw: sal_Bool->bool
Change-Id: I324a0ffde2ddcca105451c19e7aadcfad15211d8
2014-04-30 08:44:42 +02:00
b3fe403976 sw doc model dump: improve section format dump
Instead of looking up the relevant entry from mpSectionFmtTbl in each
section using the layout, dump mpSectionFmtTbl directly. This makes the
dump of the section format table consistent with the other format table
dumps.

Change-Id: I988c8f4fdfd52b64359eb4acf9c61383f33fb8ad
2014-04-29 21:59:28 +02:00
bd44dcf800 sw doc model xml dump: include section properties
Change-Id: I555c773b0dcc90c8efba5fd7d48b22278f2ef5a5
2014-04-29 14:36:10 +02:00
927617d69a Renamed ImplGetDPI(X|Y) to GetDPI(X|Y)
Change-Id: If76b99589ddd83431593404c1034b8b726bc3f9b
2014-04-25 12:22:29 +10:00
185c270e66 Split out the IDocumentDeviceAccess interface of SwDoc.
The interface implementation is now in the class DocumentDeviceManager and
SwDoc has a member variable of that class to which the Interface's
method calls get forwarded.
The following methods were also moved because they are only used by this
interface:
CreateVirtualDevice_, CreatePrinter_ and PrtDataChanged.

Change-Id: I0b0de6540f0c8635ce560381fb924a3d9cd50c0e
2014-04-22 14:36:25 +02:00
97a5ba4a71 remove comments why a file gets included
also remove some commented out code

Change-Id: Ia80c5c57d8d2a74418032de50eee95642cc0969d
2014-04-21 18:08:28 +02:00
b061dbd76b coverity#704523 Division or modulo by zero
and coverity#704522

Change-Id: Ieccd4c4e16a14ea68f8b4879232924a1d05e29ea
2014-04-18 12:21:43 +01:00
0995da6020 coverity#736153 Dereference null return value
Change-Id: I226626858fa517af589db7288391daa775de38a5
2014-04-17 09:43:16 +01:00
2df39f400d sw: clean up inter-module includes
Change-Id: I812842e76ae0b7bc252530d2b4aaa2b452c2babf
2014-04-15 21:22:04 +02:00
2afe4c170d Clean up function declarations and some unused functions
Change-Id: I58c425ab9d2c01f8844226aff820dd56d88ec09c
2014-04-15 13:56:21 +02:00
8f6c55a839 Replace SV_DECL/IMPL_REF macros with SvRef template
Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058
2014-04-07 12:38:27 +02:00
8d0299673f coverity#704877 Unchecked dynamic_cast
Change-Id: Icbe926c133fd79c0a420578332ae2b6abdbdea9b
2014-04-04 12:14:20 +01:00
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
0523304875 svl: sal_Bool->bool
Change-Id: I6938314a08d061d2b07d9129742d74a989bd1385
2014-04-03 09:17:52 +02:00
0635918c51 SwFrmFmts: add a dumpAsXml() method
With this, it's possible to see properties of e.g. fly frames in a
document.

Change-Id: Iba68156ba7f0149dfea3e0a6367b71b8642a2a80
2014-04-02 16:18:57 +02:00
82332ee1fc sw doc model dump: handle SdrObject text
Change-Id: I0b11aaa3efd5176a3a7c124bd15d50962ee7e90e
2014-04-02 12:04:52 +02:00
b0606fa6f8 sw doc model dump: include contents of draw page
Change-Id: I8f1687ba7aacfff47695fd43062c92d2eb034a29
2014-04-02 11:30:15 +02:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
6f8ffc4eed sw doc model xml dump: handle SvxFontHeightItem
Change-Id: I27a9681fdf86a8814be48ba9875202705aa2b014
2014-04-01 16:29:32 +02:00
b3b8c56de8 coverity#1194888 Unchecked return value
Change-Id: Id9478984bdfd11a3cb656e5c8441e1b205282c2b
2014-03-31 09:51:30 +01:00
55033ba606 coverity#704353 Logically dead code
Change-Id: I6d8ae15ca5ec647b1429fb47a3e976501165e780
2014-03-29 18:12:07 +00:00
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
145d278b22 coverity#704947 Dereference after null check
Change-Id: Iff2a146e217bb6953525ee86ddc84d8c134ab8aa
2014-03-25 12:33:20 +00:00
4c2393eae6 sal_uInt16 to size_t and optimizations
Removed unneeded casts, adapted cycles, reduced scope...

Change-Id: I1781a9d4c42bd6b85f16e9573d0bc2b201084646
2014-03-24 23:22:06 +01:00
7f4f5cd71c Remove table-related redlines when table,row,cell removed
A table, a row or a cell might have redlines objects attached to it.
This patch makes sure than when a table\row\cell are removed -
any redlines that are attached to them are removed from the
'SwExtraRedlineTbl' object. This is to prevent any 'orphaned'
redline objects.

Conflicts:
	sw/source/core/doc/docredln.cxx
Reviewed on:
	https://gerrit.libreoffice.org/8726

Change-Id: I992e3fb4aadeb891ffd472b5d638d337a8609c01
2014-03-23 15:40:57 +01:00
04187aaf09 Resolves: #i124371# When changing the numbering or bullet styling...
of a set of paragraph which have more than one different List Style applied
create a new List Style and put the paragraphs into a new list.

(cherry picked from commit 0087ca89e3905009ed947c651f3dc70f3d61ea93)

Conflicts:
	sw/inc/doc.hxx
	sw/inc/docsh.hxx
	sw/inc/editsh.hxx
	sw/source/core/doc/docnum.cxx
	sw/source/core/docnode/ndcopy.cxx
	sw/source/core/edit/autofmt.cxx
	sw/source/core/edit/ednumber.cxx
	sw/source/core/uibase/app/docst.cxx
	sw/source/core/uibase/docvw/edtwin.cxx
	sw/source/core/uibase/inc/textsh.hxx
	sw/source/core/uibase/shells/listsh.cxx
	sw/source/core/uibase/shells/textsh1.cxx
	sw/source/core/uibase/shells/txtnum.cxx
	sw/source/core/uibase/uiview/formatclipboard.cxx
	sw/source/core/uibase/uiview/view2.cxx
	sw/source/core/uibase/wrtsh/wrtsh1.cxx
	sw/source/core/undo/unnum.cxx
	sw/source/core/unocore/unocrsrhelper.cxx
	sw/source/filter/ww1/fltshell.cxx
	sw/source/ui/misc/num.cxx

Change-Id: Iadb5b386cada296d90d96aa75574024baac7ae3e
2014-03-19 15:34:18 +00:00
e67d675d1e sfx2: sal_Bool->bool
Change-Id: I01a33e255b0dd2a0045f6eed52e6b31305750599
2014-03-18 11:26:05 +02:00
769a6c20c4 sw: prefer passing OUString by reference
Change-Id: Iaa846ec8f19567f0a9f30154d74cc53df93eff16
2014-03-17 13:30:51 +02:00
55a5e890ef sal_Bool to bool + make a local function static
Change-Id: I8285f69e175dd10f6128a1d9b39bdc646c51df43
2014-03-16 09:51:13 +01:00
78a4b4247b SwapIn/SwapOut can return bool + sal_Bool to bool
Change-Id: Ia5477d6bb83af38435b9ac44359fe2f46b00807c
2014-03-16 09:51:13 +01:00
c57535fe2a sal_Bool to bool
Change-Id: I01986d22cfc6544cbad39c3276d272d0520e3f53
2014-03-16 09:51:12 +01:00
df8d9fc9a9 sal_Bool to bool
Change-Id: I5c134bce37e1be05618b14e7dbb22911cd6656c1
2014-03-16 09:51:12 +01:00
2e26e6fd91 sal_Bool to bool
Change-Id: I3548bdc15cf779495a966b4b36bb6d209fd3ee8f
2014-03-16 09:39:14 +01:00
c503ba54ed coverity#708846 Unused pointer value
Change-Id: I3bef9d8fc00fdd0be6ed29a6fbc7af836e5088cb
2014-03-13 16:52:09 +00:00
4ae157db4b Bin noise "SMARTTAG" comments from 2006
Change-Id: I43e948fc7895e4dbd5ea4e3e5aeefd298ee40007
2014-03-11 17:17:39 +02:00
25d6c8d2fd coverity#708845 help coverity out here
Change-Id: I1e8ec236c44e258124eaeb818fcd39e7bf15c4b9
2014-03-07 10:22:17 +00:00
c09fc2c695 sw: include contents of char styles in doc model xml dump
Change-Id: Ie62d808e9b498ef7125d603f20594ab1bb665a50
2014-03-04 15:33:13 +01:00
b2371492df Use cstdlib std::abs instead of stdlib.h abs
...because the latter lacks the abs(long) overload in some popular environments,
cf. <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60401> "stdlib.h does not
provide abs(long) overload."

Similarly, stdlib.h lacks the abs(float), abs(double), abs(long double)
overloads compared to cmath there, whose use was apparently intended in
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx.  Rewrote that to use
CPPUNIT_ASSERT_DOUBLES_EQUAL instead, which revealed that the comparisons need
rather large deltas of .1 resp. .2 (which the original code hid with an
implicit conversion to integral type, thus using an effective delta of 1).

Discovered with -Wabsolute-value ("absolute value function 'abs' given an
argument of type 'long' but has parameter of type 'int' which may cause
truncation of value") recently introduced on Clang trunk towards 3.5.

Change-Id: I4c41575ffdccb2944498b662bd3a53fd510cb0c0
2014-03-03 18:36:55 +01:00
f46d23e242 sal_Bool to bool
Change-Id: Ie04d9314f66bcda8e1c7939248af79a15fbdaaeb
2014-03-02 20:17:57 +01:00
a27462189d Remove visual noise from sw
Conflicts:
	sw/inc/unodraw.hxx
	sw/inc/unoframe.hxx
	sw/sdi/swriter.sdi
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unoparagraph.cxx
	sw/source/filter/ww8/rtfexportfilter.cxx
	sw/source/ui/inc/unotxvw.hxx
	sw/source/ui/lingu/hyp.cxx
	sw/source/ui/lingu/sdrhhcwrap.cxx
	sw/source/ui/uno/swdetect.hxx

Change-Id: Ic0a3fb2392187c277c9b36915ffb10dcf0317908
Reviewed-on: https://gerrit.libreoffice.org/8322
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 09:41:00 -06:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
4a9347fa32 Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I8e11ffe888aac8887c4c0875c41de51f343debae
2014-02-25 16:33:15 +09:00
130aa510a3 sal_Bool to bool
Change-Id: I7142b4384179f1c2ffbe8645bb3025f9bbcbdfde
2014-02-22 12:31:40 +01:00
327dde336e editeng: sal_Bool->bool
Change-Id: Ib1113ebcfc523c8c97731debb2bf456a8c99d802
2014-02-21 12:19:21 +02:00