Commit Graph

126 Commits

Author SHA1 Message Date
Stephan Bergmann
cbe944e323 Catch inadvertent uses of OUString(sal_Unicode) ctor
...with numeric values that are not meant to be characters.  Inspired by
<https://gerrit.libreoffice.org/#/c/16339/> "OUString: add constructor from
single Unicode code point" and ecaf1cb386 "seems
to be what was meant."  Found e46e8d1945 "Shall
this produce a string representation of a number?" and
f2a0e40327 "Don't truncate a UTF-32 code point to
a UTF-16 code unit."

(LIBO_INTERNAL_ONLY mostly because it uses a C++11 delegating ctor for
simplicity, but also because it requires mild modifications to client code, see
additional changes in this commit and some other recent commits.)

Change-Id: I8a156f01d1b772c6052d7afaa088ae13ed234e2b
2015-06-19 13:26:09 +02:00
Andrea Gelmini
f378e723d2 Fix typos
Change-Id: I528752dfabeb31d14c350f79819b521537ab9b56
Reviewed-on: https://gerrit.libreoffice.org/16300
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:14:55 +00:00
Noel Grandin
943f4b4ff1 convert POSTITS_ to scoped enum
Change-Id: Ib6fdfc22ce6cdf757066b422624b631b3f26e170
2015-06-15 13:16:30 +02:00
Stephan Bergmann
b2c8ea3a02 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8d27ae80d209159690182ab91e272cf00e9f863d
2015-06-08 16:28:47 +02:00
Christian Lohmaier
ab465b90f6 bin/rename-sw-abbreviations.sh
renames the most annoying abbreviations in Writer (and partially
in the shared code too).

Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20 13:05:49 +02:00
Stephan Bergmann
80c2dfa225 loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I0e42e757a6f7b0c28758193aad8b3cb01607b8b1
2015-05-11 12:51:13 +02:00
Noel Grandin
a7b7c64afc convert SCRIPTTYPE_ constants to scoped enum
Change-Id: I5be3980ac865162d8d7626556ca47eca4b0ee433
Reviewed-on: https://gerrit.libreoffice.org/15344
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-17 07:21:08 +00:00
Matteo Casalin
bafc6196c5 Use size() on array filled by SwEditShell::GetINetAttrs to get number of items
Change-Id: I10d05c6b635c220f2ec833e4207afbd46651aec8
2015-04-12 22:36:29 +02:00
Stephan Bergmann
5ba54aacd5 Remove dead INetProtocol::Vim
...which removes the need to abstract over the standard URI '%' escape prefix
vs. the silly vim '=' special case invention.

Change-Id: I54a52dd912c3aafc38275a0ac2466a6daeec328f
2015-04-07 20:21:21 +02:00
Stephan Bergmann
6f3c52bb37 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
2015-03-26 15:33:38 +01:00
Bjoern Michaelsen
d26725ad0f move SwIterator into calbck.hxx
Change-Id: Icdcd46d392bbf1dbe45448328c310d9a327ba60d
2015-03-19 23:41:06 +01:00
Noel Grandin
2f928b2d09 remove NUMBERFORMAT_ constants
.. in favour of just using the underlying constants from
css::util::NumberFormat

Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99
2015-02-25 10:34:27 +02:00
Michael Weghorn
08f9bd504d fdo#39440 sw: reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I2368fc0a1c6dd73125d4770d06063ea3e3d8c713
Reviewed-on: https://gerrit.libreoffice.org/13961
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19 08:37:57 +00:00
Stephan Bergmann
b1fab4ab32 sw: Use appropriate OUString functions on string constants
Change-Id: I9c3e03324c69beb5af4c43da208086600876f875
2014-12-18 14:12:34 +01:00
Stephan Bergmann
fe99ee368f sw: Use appropriate OUString functions on string constants
Change-Id: I559d1e44d9096a2583af8e05468b3743ac210c6c
2014-12-15 10:18:44 +01:00
Noel Grandin
0df9e5e46b loplugin: cstylecast
Change-Id: Ia3dc8efc8c8803597cbf226780bdb7e1c9681ee0
2014-11-24 14:20:37 +02:00
Miklos Vajna
3c95503cef Use SwNode::GetTxtNode()
Change-Id: Icf3e1013d5eba5702badf19aa6c1f5e6708ed154
2014-11-19 09:03:51 +01:00
Noel Grandin
af5ebbf783 create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution.  (Unfortunately MSVC 2012
does not support explicit conversion operators.  Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)

Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13 17:45:57 +02:00
Julien Nabet
86af599c81 Resolves fdo#84283: Export to PDF with footnotes in tables crash
Don't crash when there's no rectangles

Change-Id: I7e713025cacd449f708176254e05d40c0929577f
Reviewed-on: https://gerrit.libreoffice.org/11634
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-25 12:23:42 +00:00
Stephan Bergmann
ea733ab5b6 Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b1 "more fixes for SfxItemState")

Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-12 06:08:32 +00:00
Matteo Casalin
0a26e27d78 sal_uInt16: use more proper types, avoid unneeded casts, constify
Change-Id: Ic30441307eaa391868ffbb85a67d1c0327258084
2014-09-06 12:12:32 +02:00
Valentin Kettner
3fed83524d Refactored IDocumentOutlineNodes out of SwDoc.
Into the new class DocumentOutlineNodesManager.

Change-Id: I05581391a1474872113ae91d6429709d181cabfe
2014-07-15 15:44:04 +02:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Caolán McNamara
c1cad9bbc3 Resolves: fdo#78204 adjust note icons on comments-in-margins case
the page has been scaled by 75% and vertically centered so the page positions
need to be also adjusted.

Change-Id: I7ab6b4956933ba444441c857e78aee8e5c1cf97a
2014-05-15 12:40:04 +01:00
Chris Laplante
d8f8c8aa45 Begin removing ASCII art and useless comments from sw
Change-Id: Ic367b2ebca1a766c830ccd44a84274d86be4f080
Reviewed-on: https://gerrit.libreoffice.org/9090
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-04-18 09:22:37 +00:00
Thomas Arnhold
2df39f400d sw: clean up inter-module includes
Change-Id: I812842e76ae0b7bc252530d2b4aaa2b452c2babf
2014-04-15 21:22:04 +02:00
Tor Lillqvist
fe41e4ba11 Bin pointless INET_HEX_ESCAPE
Change-Id: I72238e511c2fca4a4aba0be60b0f2d3b1f46e5c2
2014-04-01 12:14:45 +03:00
Alexander Wilms
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
Matteo Casalin
83aa6d8180 Remove some temporaries around calls to SvNumberFormatter methods
Change-Id: Ib03c97a52df120bac1ac9b2b9d2e52431ead1027
2014-02-24 09:08:35 +01:00
Matteo Casalin
d892f37178 sal_Bool to bool
Change-Id: I1a752ffcf023411bdbb8c983623cb93757fe9824
2014-02-16 22:52:26 +01:00
Caolán McNamara
b0c72cb92c starting chopping out aEmptyOUStr
Change-Id: I4d944018bb471d78d6ebb3604d445b90899ea893
2014-01-15 13:26:10 +00:00
Caolán McNamara
2e5ec4f5b6 Related: #i17171# big xub_Strlen -> sal_Int32 changes
Change-Id: I31bce794c95062abfa1171c13cf565498688b5f3
2014-01-15 13:26:08 +00:00
Khaled Hosny
4dba6f5837 fdo#67370: Hyphens are not visible in tagged PDF
One requirement of tagged PDF is to represent automatically inserted
hyphens using the soft hyphen (U+00AD) character, so we were doing this
by simply passing that character to text layout code when exporting a
tagged PDF (which is the literal suggestion of old PDF specification).

This is wrong, though, since the soft hyphen is a control character and
should not have a visible output by itself (and fonts might not even
have a visible glyph there), but this happened to work because non of
the layout engines we are using treated soft hyphen specially and was
just showing whatever glyph the font had there. This broke with the
switch to HarfBuzz since it will not show any visible glyph for Unicode
control characters (by default), which is the right thing to do.

Latest versions of PDF spec suggest using either ToUnicode mapping or an
ActualText text entry to encode the soft hyphen instead, I found it
easier to use ActualText since we already have code that handles
non-standard hyphenation using it already.

Change-Id: I88deadf3a806f69775b2e0ccff2f9b2f61a0f2e2
2013-12-22 01:16:24 +02:00
László Németh
d665e05824 fdo#71645 remove footnote numbers in cross-references
Change-Id: Ic3780e4389e450d8c7a69d2f0f2a6a7f81b8906e
2013-11-20 07:57:57 +01:00
Oliver-Rainer Wittmann
0921642e7f Related: #i33737# some minor refactoring in advance
(cherry picked from commit b27ff0a078b7c1b32e88041f25314eaad267618b)

Conflicts:
	sw/source/core/bastyp/init.cxx
	sw/source/core/crsr/findtxt.cxx
	sw/source/core/doc/doc.cxx
	sw/source/core/doc/docfld.cxx
	sw/source/core/edit/edfld.cxx
	sw/source/core/fields/authfld.cxx
	sw/source/core/fields/dbfld.cxx
	sw/source/core/fields/docufld.cxx
	sw/source/core/fields/expfld.cxx
	sw/source/core/fields/fldlst.cxx
	sw/source/core/fields/reffld.cxx
	sw/source/core/frmedt/tblsel.cxx
	sw/source/core/inc/wrong.hxx
	sw/source/core/layout/atrfrm.cxx
	sw/source/core/text/EnhancedPDFExportHelper.cxx
	sw/source/core/text/atrstck.cxx
	sw/source/core/text/itratr.cxx
	sw/source/core/tox/txmsrt.cxx
	sw/source/core/txtnode/atrfld.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/undo/SwUndoField.cxx
	sw/source/core/undo/rolbck.cxx
	sw/source/core/unocore/unocrsrhelper.cxx
	sw/source/core/unocore/unofield.cxx
	sw/source/core/unocore/unoportenum.cxx
	sw/source/core/unocore/unotext.cxx
	sw/source/filter/rtf/rtffld.cxx
	sw/source/filter/ww8/ww8atr.cxx
	sw/source/filter/ww8/ww8par.cxx
	sw/source/ui/docvw/AnnotationWin.cxx
	sw/source/ui/utlui/content.cxx

Change-Id: I372cfaed881188266c359867879ae92c8d45fee1
2013-11-01 14:43:15 +00:00
Noel Grandin
8051bb7e18 converting remaining usage of String in SW to OUString
Change-Id: Iaaa3812412dc880eb9d08144219ebe428007884e
2013-10-18 09:59:25 +02:00
Noel Grandin
5c3382d57a convert sw/source/core/text/*.cxx from String to OUString
Change-Id: Ifda1e87fb14d075bb0b1708efc12404c9ebc255a
2013-10-18 09:59:20 +02:00
Caolán McNamara
7e7a487e90 Related: fdo#38838 remove UniString::AppendAscii
Change-Id: I0f929843d73eb445c8b1aa56d59cbbce844b9008
2013-10-14 11:54:59 +01:00
Philipp Riemer
faad24aa33 remove/add blank lines
Conflicts:
	sw/source/core/unocore/unoprnms.cxx

Change-Id: Icc044955b7b9f28d9f237e97865198cd2ded89a1
Reviewed-on: https://gerrit.libreoffice.org/6079
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-02 15:18:59 +00:00
Philipp Riemer
1cd2575ac9 remove zhaojianwei code markers
Conflicts:
	sw/source/core/doc/docfmt.cxx

Change-Id: Iddda0d57ae547680634d45aaf8c6deb40855b860
Reviewed-on: https://gerrit.libreoffice.org/6078
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-02 15:17:07 +00:00
Noel Grandin
4eade0266f convert sw/inc/EnhancedPDFExportHelper.hxx from String to OUString
Change-Id: Ie786dda9dd0285037294067d0a9fad1abaebd530
2013-09-19 10:14:17 +02:00
Matteo Casalin
8ae46066e6 Cleanup #include and minor optimization
Change-Id: I9b893906df5707f84c45cf5a8dc017873452aeab
Reviewed-on: https://gerrit.libreoffice.org/5403
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2013-08-14 07:56:57 +00:00
Michael Stahl
df7ffcdb02 sw: convert some SwStyleNameMapper methods to OUString
Change-Id: I151678b2bf155a7561b4c4e4b2d9fd1f05930477
2013-08-08 23:25:27 +02:00
Norbert Thiebaud
009851223b module svl: all String and some bool and related clean-up
Change-Id: I36eb559fa58dbe75384b7119c788af0048813aed
Reviewed-on: https://gerrit.libreoffice.org/4733
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-07-07 20:00:16 +00:00
Luboš Luňák
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
Eike Rathke
876c619b94 new module i18nlangtag
Moved portions from module i18npool, all of former i18nisolang1 library
that now is i18nlangtag. Included are languagetag, isolang and mslangid.

This i18nlangtag code is now even used by module comphelper, so
disentangling i18npool and making this an own module was needed to not
create circular module dependencies.

Change-Id: Ib887c3d6dde667403fd22d382310ba5f1a9b0015
2013-04-05 19:10:48 +02:00
Michael Stahl
0295c8a34e sw: let SwTxtNode::GetTxt() return OUString
Change-Id: I36e777b2f623429773277e092284f7d2ba61e6ef
2013-02-18 20:16:07 +01:00
Kohei Yoshida
1aaf9a9b36 Renamed hard-to-remember 8-char headers in editeng.
Change-Id: If255802082890e1b1b4c5197a791fa79a011773e
2013-02-12 15:15:06 -05:00
Michael Meeks
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
Eike Rathke
8ac150eb16 use LanguageTag
Change-Id: I4ffa1aa2dce0bf1d0c87d56f72589112ec1222a1
2012-11-19 15:52:52 +01:00