Commit Graph

550 Commits

Author SHA1 Message Date
cef5c5dcb1 cleanup of existing code in sw/source/core/fields
- code formatting
- fixed alignment/spacing
- removal of commented out pieces

Change-Id: I3fc2be67edcad8e394966f1678fbbeca4537ff47
2013-06-10 22:00:58 +02:00
39f4f7d953 fdo#62475 - remove visual noise in sw/source/core/fields
Change-Id: I4b14dbb652375f4c6f52ba2fb127e98d6798e07f
2013-06-10 22:00:58 +02:00
9d055aed9f fdo#39468: Translate German comments in sw/source/core/fields
Change-Id: I8a0f4749c01010a9d0e9baf23db09e1fa63c1d55
2013-06-10 22:00:57 +02:00
9eb4e4dc51 Some more modules at least building with mingw64
Change-Id: I3ea039655aecb7885bb310b1f2c29d66f9f7bb4f
2013-06-06 19:49:56 +02:00
6319803762 Resolves: #i120759# Bookmark value changed when opening the doc file
* sw/source/core/fields/chpfld.cxx
MS Word Binary compatibility

Patch by: Fan Zheng,<zheng.easyfan@gmail.com>
Found by: dongjun zong,<zongdj001@gmail.com>
Review by: Jian Hong Cheng,<chengjh@apache.org>

(cherry picked from commit 6b6ccbcac76eb416b4ece896714d20280761598b)

Change-Id: I42461863f7e880f7b9387ca08ce66fb3dad938a0
2013-06-05 11:12:15 +01:00
31d898853e Resolves: #i120735# free the para object or editengine object...
attached to textfield object explicitly

Found by: zhangjf
Patch by: zhangjf
(cherry picked from commit e2005137e019864578196d06be8ef63aa32a4e96)

Change-Id: I5b7f240d0131017dc9fc35e6e1d14c553de8eacf
2013-05-16 16:23:50 +01:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
2af1f5691e resolved fdo#35756 import more than 64k HTML table cells
Enhanced EditEngine to be able to hold more than 64k paragraphs. Used
also in RTF import Calc and Writer, so that could benefit as well.

* changed all EditEngine,Outliner,... related paragraph index/count
  variables from sal_uInt16 to sal_Int32
  * sal_Int32 instead of sal_uInt32 to match accessibility API
  * matched some Outliner methods' paragraph parameters from sal_uLong
    to sal_Int32
  * containers capable to hold size_t nevertheless are limited to a
    maximum of sal_Int32
* changed definition of EE_PARA_NOT_FOUND and EE_PARA_ALL to
  SAL_MAX_INT32
+ added EE_PARA_MAX_COUNT and EE_TEXTPOS_MAX_COUNT to initialize
  ESelection with what previously were hard coded 0xFFFF all over the
  place
+ for similar reason added EE_TEXTPOS_ALL corresponding to EE_PARA_ALL
  to initialize an ESelection spanning all available text like
  aSel(0,0,EE_PARA_ALL,EE_TEXTPOS_ALL)

Change-Id: I62d1b9c399cd709a4f93dbac31b219a61c46ec00
Reviewed-on: https://gerrit.libreoffice.org/3838
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-05-10 14:01:38 +00:00
0f200cc30e fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO.

Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6
Reviewed-on: https://gerrit.libreoffice.org/3326
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-20 11:09:54 +00:00
0fdd758051 sw: missing prefix for global pBreakIt
Change-Id: I7fa8e697537ce8eb915da00920bf6882603b115a
2013-04-19 10:38:24 +02:00
9830fd36db date/time IDL datatypes incompatible change
- nanosecond precision
 - signed (allowed negative) year

Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.

Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-04-18 21:34:46 +02:00
74d942fb23 Resolves: fdo#48039 use same algorithm for assigning get/set replacement ids
i.e. use the same algorithm for assigning replacement ids for both get and set
exp fields.

Otherwise, consider for ex.
1. fields exists with ids of 1 and 2 in master document
2. a field exists with id of 1 in subdocument and must be reassigned a new
id to not collide with the pre existing master ids

In get orig algorithm assigned first unused slot of master to subdocument field
i.e. 0 unused in master, so subdocument:1 converted to master:0

In set orig algorithm sorted all used master slots and assigned largest used id
plus 1 (therefore unused) to subdocument field i.e. largest id used in master is
2, so subdocument:1 converted to master:3

so get can't find set and error's out with:
Error: Reference source not found

Change-Id: Ie8758dc22cf8deeeeff079532284e57eeaf4a9bd
2013-04-11 21:10:11 +01:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
5ddcaa8600 SwPostItField::GetByName: make this available for the layout as well
Change-Id: Ic2a2d759d855cecadb8429541d0a7665a6deaa4b
2013-03-27 16:35:45 +01:00
e76e2c4ce7 add SwField::IsClickable and use it from SwWrtShell and SwPageFrm
Change-Id: I3d856dc11297b2ad73859ff9c2d529e8cd4727b2
2013-03-19 14:28:44 +01:00
7d1f4cdec3 fdo#38838: Converting String/UniString to OUString
Change-Id: If64db96005fcd8a42e4fa24041867b99183965f9
Reviewed-on: https://gerrit.libreoffice.org/2586
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-11 15:50:44 +00:00
3bc29af446 fdo#38838 Replaced some use of (Uni)String with OUString.
Change-Id: Iad623c9300919fbae34279268a5a720f978c6434
Reviewed-on: https://gerrit.libreoffice.org/2514
Reviewed-by: Joren De Cuyper <joren.libreoffice@telenet.be>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-07 19:50:37 +00:00
e8e068770e delete previous uncommented comments in positionhelper.cxx
Change-Id: I0f177a078b915c1220423ea583e749de4d02e384
Reviewed-on: https://gerrit.libreoffice.org/2571
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2013-03-06 17:16:26 +00:00
e4f492ac01 It is safer to uncomment these checks in the postithelper
Change-Id: I84d96224dbe51ff25fcb6d96e0be9a8dff89b0a1
Reviewed-on: https://gerrit.libreoffice.org/2567
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-03-06 15:23:29 +00:00
ddf1b13a52 sal_Bool to bool
Change-Id: I4040baa1a0202426df80a0ea94abde55e2b6ca65
2013-03-03 10:31:48 +09:00
08603e66f9 fdo#38838 search replace for String::CreateFromInt32().
I ran the following code replace:
    s/(Uni|Xub)?String\s*::\s*CreateFromInt32/OUString::number/

Change-Id: Ic500593e3a0b593522c9469b18da0145285007da
Reviewed-on: https://gerrit.libreoffice.org/2280
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-02-22 17:32:12 +00:00
0295c8a34e sw: let SwTxtNode::GetTxt() return OUString
Change-Id: I36e777b2f623429773277e092284f7d2ba61e6ef
2013-02-18 20:16:07 +01:00
63bcb139b9 Replaced O[U]String::valueOf( static_cast<> ) with O[U]String::number()
Change-Id: I2f11f2f15a652a9edc3c7e5b67c854debeed20de
Reviewed-on: https://gerrit.libreoffice.org/1784
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-21 15:04:17 +00:00
741e8b7b9d fdo#58074: store page number in SwPageNumberField
Should hopefully fix the problem, which is essentially that all
SwPageNumberFields share a single SwPageNumberFieldType, which is only
updated properly in SwTxtFormatter::NewFldPortion, hence all expansions
of a SwPageNumberField other than that return wrong values.
Does not fix the problem for fields in headers though, which appears
much harder...

Change-Id: Iecf363c8acbc2aaa418cc0c980e0b62c8e0e7d14
2013-01-09 01:21:13 +01:00
a4c7ded1fd Cleanup: #include <tools/gen.hxx>
Change-Id: Ic547b4a59102afc8bdbc85ec95ac312e32ef2530
Reviewed-on: https://gerrit.libreoffice.org/1484
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-01-07 13:14:57 +00:00
caaeb0a046 re-base on ALv2 code. Includes:
Patches contributed by Oliver-Rainer Wittmann
    sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
    apply print settings to new printing routines
    http://svn.apache.org/viewvc?view=revision&revision=1172115
    sw34bf06: #o12311627# use <rtl_random> methods to
    create unique ids for list styles and list ids
    http://svn.apache.org/viewvc?view=revision&revision=1172112
    sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> -
    clear list structures completely
    http://svn.apache.org/viewvc?view=revision&revision=1172122
    i#118572 - remove ui string and help content regarding usage of
    Java Mail in Writer's Mail Merge as Java Mail is not used.
    http://svn.apache.org/viewvc?view=revision&revision=1197035

    Patches contributed by Mathias Bauer
    cws mba34issues01: #i117718#: provide filter name in
    case storage of medium does not allow to detect one
    http://svn.apache.org/viewvc?view=revision&revision=1172350
    cws mba34issues01: #i117721#: directly provide
    parameters retrieved from SfxMedium
    http://svn.apache.org/viewvc?view=revision&revision=1172353
    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=1396797
    http://svn.apache.org/viewvc?view=revision&revision=1397315
    cws mba34issues01: #i117723#: convert assertion into trace
    http://svn.apache.org/viewvc?view=revision&revision=1172355
    cws mba34issues01: #i117699#: keep layout alive until swdoc dies
    http://svn.apache.org/viewvc?view=revision&revision=1172362
    cws mba34issues01: #i117943#: missing color attributes in RTF clipboard
    http://svn.apache.org/viewvc?view=revision&revision=1172363

    Patch contributed by Henning Brinkmann
    imported patch i#103878
    http://svn.apache.org/viewvc?view=revision&revision=1172109

    Patches contributed by Michael Stahl
    sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes
    http://svn.apache.org/viewvc?view=revision&revision=1172119

    Patch contributed by imacat
    Fixed the Asian language work count.
    http://svn.apache.org/viewvc?view=revision&revision=1241345

    Patch contributed by Pedro Giffuni
    i#20878 - Add comment with BZ issue for reference.
    http://svn.apache.org/viewvc?view=revision&revision=1244517

    Patch contributed by Andre Fischer
    Do not add targets for junit tests when junit is disabled.
    http://svn.apache.org/viewvc?view=revision&revision=1241508

add writerperfect dependency.
2012-11-30 10:10:38 +00:00
c617be8307 remove legacy String svl's Put*Entry family of function and convert users
Change-Id: Iebf4017ce4c2c48389716eac1bbf7f386ac7a296
2012-11-27 23:00:06 -06:00
d5b7bcbd26 avoid unnecessary LanguageTag conversions
Change-Id: Ic85bfad73814e9d2a28efc368526f3c1b5a84ad1
2012-11-27 14:41:39 +01:00
41956321ce get rid of Svx...Locale...() double conversion nonsense
Change-Id: I21d14ff6087d1adb0ce769f2e8f8060a005250cc
2012-11-24 18:56:43 +01:00
233369b1e7 sal_Bool to bool
Change-Id: I1bd921c55223671d3474c882b059b46fb87fd694
2012-11-24 16:55:45 +09:00
af60316514 some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
2012-11-23 23:09:16 +01:00
271b11a3d5 migrate one GetOutputString variatn to OUString
that create some clutter on some of the caller, this will
be resolved as things progress to ward OUString only
This is done that way to be incremental and avoid creating too big patches

Change-Id: I4a881d85cc2ee1eb53bc0c0d0902838b1d3720a2
2012-11-18 19:57:23 -06:00
30bd9fbd93 sal_Bool to bool
Change-Id: I4700455a1f2057ac2cc32da0260c810311c84a4f
2012-11-17 19:06:39 +09:00
d2f6a87ac7 fdo#46808, use service constructor for i18n::NumberFormatMapper
Also create a utility constructor for LocaleDataWrapper, which
simplifies many of the calling sites.

Change-Id: Ic8510b51c4201fa17fc0620e18d3e258e43636ba
2012-11-15 08:28:44 +01:00
eb020150e1 sal_Bool to bool
Change-Id: Ia1001ff0f4778bdf5e22bf2800f533dfba80c048
2012-11-07 10:57:55 +09:00
4a11a47103 trivial empty-init String::Fill -> comphelper::padToLength
Change-Id: I6c41b8f4d3ad739eff545063bd1f8fe8f4fba65e
2012-10-30 00:05:59 +00:00
5aa2cd1d3f fdo#46808, use service constructor for uri::UriReferenceFactory
Change-Id: I4e72bf5880fa28cb96d93ede7730a63220af7fa6
2012-10-23 11:45:47 +02:00
bb80f99092 sal_Bool to bool
Change-Id: Ideb46a876ef74f505b71e2a788d5f8da50e251af
2012-10-20 23:12:12 +09:00
21d10c6f32 mark lcl_ functions static or rename them if they are not local at all
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html

Change-Id: I21e12d6a4dfb9697d2346a4e564e96af0ad03f96
2012-10-12 16:56:54 +02:00
b844f06b36 fdo#48692: fix problems with large number of table cells:
SwSelBoxes containers are filled from SwTableSortBoxes in various
places, so adapt that to use size_t integers as well.

Change-Id: Ia55f020bb9ada94bb22802d9adabb055a22edd2f
2012-09-21 18:05:02 +02:00
5f91f8a368 fdo#48692: fix problems with large number of table cells:
The SwTableSortBoxes is now a STL container which can have more than
2^16 elements but unfortunately there are a lot of 16 bit integers used
to index it all over the place, causing infinite loops and possibly
worse problems; fix that to use size_t.

Change-Id: I868ec9dd0629be4fbe4d6b8f294fb765e3d662ec
2012-09-21 18:05:02 +02:00
8638f1e72a fdo#46808, Adapt script::Converter service code to new style
Change-Id: I19b3ba7c978e02ce865360f0411007525012149c
2012-08-27 15:40:07 +02:00
9b85b65fb5 Prefer prefix ++/-- operators for non-primitive types
Change-Id: Ic8d149a78b2bc2bf352b7893202d0d0b6730746c
2012-08-10 22:36:26 +02:00
a236f8318a Convert SV_DECL_PTRARR_SORT(_SwFtnIdxs) to o3tl::sorted_vector
Change-Id: I84c4cd5686ea0649ad9ca6c879d51bffe6d693c2
2012-07-26 14:30:09 +02:00
deaa69b155 Convert SV_DECL_PTRARR_SORT(SwSelBoxes) to o3tl::sorted_vector
Change-Id: I4af9e86257a9e40b91351fd34ac70fe053d02367
2012-07-26 14:30:09 +02:00
f317119be3 sorted_vector: MSVC doesn't know which erase to call
Change-Id: Ib81388db2f93db662bb5439565f311835b08073e
2012-07-25 16:28:17 +02:00
75acbd4b47 delete svl/svstdarr.hxx
Change-Id: Ia3d1d8dbe100443410b80c3881f10ab51b2d0419
2012-07-25 14:13:47 +02:00
31dafba4d7 Convert SV_DECL_PTRARR_DEL(_SwSeqFldList) to std::vector
Change-Id: I40802ba1e7b2e2f6f57c59c4d66b544604d01ce5
2012-07-25 14:13:46 +02:00
b09b1ed264 Convert SV_DECL_PTRARR_SORT(SwTableSortBoxes) to o3tl::sorted_vector
Change-Id: Id5ff378b25619a9bf126824b4abadd19615b7a31
2012-07-25 14:13:45 +02:00
29ee386e41 Convert SvStringsISortDtor from an SV_DECL_PTRARR to a o3tl::sorted_vector
Change-Id: Ie1fa9b3cc2aef83ae9a82fbc110a08b2f298daef
2012-07-25 14:13:45 +02:00