Commit Graph

316 Commits

Author SHA1 Message Date
Noel Grandin
86989abe6e convert sw/inc/doc.hxx from String to OUString
Change-Id: I8ddf0f59de506df4e3fea77824b5bb5679bcf7b1
2013-10-15 12:25:42 +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
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
Tor Lillqvist
c1015fdd51 Add hack to optionally get stable ODF output from the same input
To be used in regression testing and similar scenarios, where the output ODF
is *not* intended to be further manipulated in LibreOffice. An environment
variable LIBO_ONEWAY_STABLE_ODF_EXPORT is used to toggle this behaviour. I am
not 100% sure whether the generated ODF with the hack toggled on is even fully
correct, but correctness is not the purpose of the hack anyway.

Two classes of issues handled: 1) Automatic style names and 2) use of
randomness.

For class 1), when the hack toggle is in effect, we generate the names at
first as strings based on all the properties of the style, and sort them based
on those, and then rename them (for brevity in the output) to the "normal"
form of a short prefix plus a number (like "P12").

Sure, it would have been better to just figure out *why* the automatic style
naming currently is not stable in the first place, but outputs the styles in
different order (with some styles being assigned different numbers) in
separate invokations of LibreOffice), but I was unable to understand that.

Possibly this code could be used in all cases, except that it does break some
unit test (can't recall which right now). I don't know whether that is simply
because the unit test assumes too much knowledge of the internal workings of
the automatic style name generation, or whether the generated ODF is actually
invalid.

For 2), I found a handful of places where randomness was used to generated
various kinds of identifiers in ODF output. I changed those to just use large
(64-bit) non-overlapping integers instead. I assume there *is* a point in the
original code in each case that explains why randomness is needed, so the hack
definitely needs to be optional and used only for the above mentioned
scenarios.

Change-Id: I17b657197e38bcf24abdfe61ad4a277f4339eeae
2013-09-30 17:40:53 +03:00
Noel Grandin
39ba0533e1 convert sw/inc/IDocumentContentOperations.hxx from String to OUString
Change-Id: I0ee1415b0ae8a0707faafd05f3b2f95200062614
2013-09-19 10:14:17 +02:00
Noel Grandin
bf1db6daca convert include/sfx2/linkmgr.hxx from String to OUString
along the way, de-virtual ScDocFunc::InsertAreaLink, since
it only has one implementation.

Change-Id: I3fc836f9954628f154e01b1c7ae8f90eb7600a76
2013-08-29 09:30:06 +02:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Matteo Casalin
9a39102cee String to OUString
Change-Id: Id34e02af55a5e8a6e25ad30fb112d82d1b8166c5
Reviewed-on: https://gerrit.libreoffice.org/5440
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-08-17 12:51:33 +00:00
Michael Stahl
3f66fadc2d sw: do non-incremental word count in one step
Not sure if it solves a real problem, but seems sensible.

Change-Id: I3a75da924aaffb452da158a6e5c0b3465fe5687b
2013-08-14 12:29:08 +02:00
Michael Stahl
91c8008051 fdo#58040: sw: fine tune async word count
- count characters instead of paragraphs to better account for large or
  small paragraphs
- start out with a relatively small value (5k chars) on the first run to
  quickly show something to the user

Change-Id: Ic4013545692f267aab39e084415d5d794bb5a4ca
2013-08-13 18:46:47 +02:00
Philipp Riemer
cbcec9930c cleanup blank lines in sw/source/core/doc
Change-Id: Idd4704f3056663f56fab6e56112e5c9eff55aef7
2013-08-09 22:53:07 +02:00
Philipp Riemer
c99476fcfc deleted needless blank lines in sw/source/core/doc/
Change-Id: I5349ab03f7d2a4e66bf8ac5ef67382f47eb5b5d5
2013-08-09 22:44:41 +02:00
Luboš Luňák
8f8b31abd0 compatibility setting for MS Word wrapping text in less space (bnc#822908)
The document itself is stupid and uses a SURROUND_THROUGH object with a number
of empty lines that make it act is if it in fact was SURROUND_NONE, rather
than actually disabling wrapping for the object and be done with it.
But the difference was that Word still managed to fit those empty lines
next to the object into the little space that was there, while LO already
considered the space too small. So keep a compatibility setting for Word
documents in order to avoid problems with such lame documents and hopefully
that's enough.

Change-Id: I7d17b90de381fd86914ce5efd9c5a29fe4850edc
2013-08-06 17:17:53 +02:00
Matteo Casalin
31ab7f0c7d String to OUString
Change-Id: I8d4f62b473ad43807621a9dbb826ed33857b737e
Reviewed-on: https://gerrit.libreoffice.org/5189
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-07-30 14:40:30 +00:00
Miklos Vajna
e2484e3998 fdo#63273 sw: let word count not update stat. fields
Updating fields would generate loads of selection change events and it's
not what we asked for.

Regression from ce14342c42.

Change-Id: If237df1f31436357022ca8d77b924681e403abd8
2013-07-16 18:46:20 +02:00
Michael Stahl
e012f326c1 sw: implement proper Undo for SwDoc::UpdateRsid
This is annoying because it's not possible to use StartUndo/EndUndo
because that would break grouping via SwUndoInsert::CanGrouping();
also SwUndoAttr is somehow incapable of removing the inserted hints of a
grouped insert (it seems to leave no-length hints behind); so add an
explicit call to DeleteAttributes which should avoid the no-length
hints.

Change-Id: I1533daed9b2cf59886f380141b4eace4b22c15e0
2013-06-20 00:34:38 +02:00
Fridrich Štrba
9eb4e4dc51 Some more modules at least building with mingw64
Change-Id: I3ea039655aecb7885bb310b1f2c29d66f9f7bb4f
2013-06-06 19:49:56 +02:00
Noel Grandin
0fd4d12c62 Remove code associated with psprint::CompatMetricOverride service
We don't actually have any implementations of this service.

This service was introduced by
   commit 01cf481111
   Author: Kurt Zenker <kz@openoffice.org>
   Date:   Wed Jun 20 09:07:44 2007 +0000
       INTEGRATION: CWS compmetric (1.77.2); FILE MERGED
       2007/05/09 16:27:46 pl 1.77.2.2: #146890# algorithm is needed
       2007/05/09 12:13:59 pl 1.77.2.1: #146890# backwards compatibility service for metrics

Michael Stahl seems to think it was a Sun-internal hack introduced
for a specific customer.

Change-Id: I1b27778f827504c2adb0e27e8d7c0f0dedcaf940
Reviewed-on: https://gerrit.libreoffice.org/3824
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-05-16 13:42:57 +00:00
Miklos Vajna
0fdd758051 sw: missing prefix for global pBreakIt
Change-Id: I7fa8e697537ce8eb915da00920bf6882603b115a
2013-04-19 10:38:24 +02:00
Philipp Riemer
0a3fc01301 remove code that was commented out many years ago
Change-Id: I45292b157b5ea278ec9e0d9a18bf185276ba78c1
Reviewed-on: https://gerrit.libreoffice.org/3264
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-04-08 08:44:49 +00:00
Philipp Riemer
af5526cf86 more work on comments in sw/source/core/doc
Change-Id: I4fbf683da081ad04dfd1b9ea830aa94c38f33d43
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-04-08 10:42:33 +02:00
Philipp Riemer
9f50512a71 doxygen-ize comments in sw/source/core/doc
Change-Id: I6956b834936db57bdb29a704ee75351ef84b46f4
Reviewed-on: https://gerrit.libreoffice.org/3261
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-04-08 08:35:35 +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
Julien Nabet
e885b4abae coverity#704348 Logically dead code
Change-Id: I8c97042c07e3eb66468591fa9c486998ffb1e37f
Reviewed-on: https://gerrit.libreoffice.org/3048
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Christoph Brill <egore911@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
2013-03-28 13:05:51 +00:00
Armin Le Grand
bd55f05b33 Resolves: #i118780# Moved ObjectInfoPrimitive2D extractor to drawinglayer...
changed name to be the filename only, added code to SW to set Title and Desc

Conflicts:
	drawinglayer/Library_drawinglayer.mk
	drawinglayer/Package_inc.mk
	svx/source/svdraw/svdograf.cxx
	sw/inc/ndgrf.hxx
	sw/source/core/doc/doc.cxx
	sw/source/core/doc/notxtfrm.cxx
	sw/source/core/docnode/swbaslnk.cxx
	sw/source/core/graphic/ndgrf.cxx
	sw/source/filter/rtf/rtffly.cxx

Change-Id: Id433031958529498441574dafe2fbd5261371efc
2013-03-16 10:18:02 +00:00
Thomas Arnhold
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
Krisztian Pinter
6f6443f2cb RTL_CONSTASCII_USTRINGPARAM and ::rtl:: removals
Change-Id: I3ef372b07f2bacc2b9bbbb034e3d61b9cc8a3677
Reviewed-on: https://gerrit.libreoffice.org/2486
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-03-01 15:15:17 +00:00
Jean-Noël Rouvignac
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
Tor Lillqvist
616c6924f1 s/the the/the/
Change-Id: Iadacffaad832c6ff06757e8567e24f929f24a4c3
2013-02-22 09:58:19 +02:00
Michael Stahl
0295c8a34e sw: let SwTxtNode::GetTxt() return OUString
Change-Id: I36e777b2f623429773277e092284f7d2ba61e6ef
2013-02-18 20:16:07 +01:00
Miklos Vajna
2c9f9832fc SwDoc: rename member variables missing their prefix
Change-Id: Id4683649aa9115f9075717768aa6cef4110c2ad2
2013-02-18 07:59:13 +01:00
Michael Stahl
d47218d79a fdo#60732: make callers of SwTxtNode::InsertText more robust:
Return the actually inserted string from InsertText(), so callers can
check if the insertion was actually successful.
Especially InsertHint() will likely cause problems if it cannot insert
its CH_TXTATR; also Undo objects should not Undo more than was actually
inserted.

Change-Id: I87c9ea8b226ae4a2a6c20c112da76db07051a1bf
2013-02-15 22:43:47 +01:00
Michael Meeks
a128bea5dd cancel asynchronous word-count on sync. word-count. 2013-02-13 16:05:27 +00:00
Michael Meeks
c138a8aec8 asynchronous word-count. 2013-02-13 12:13:56 +00:00
Kohei Yoshida
1aaf9a9b36 Renamed hard-to-remember 8-char headers in editeng.
Change-Id: If255802082890e1b1b4c5197a791fa79a011773e
2013-02-12 15:15:06 -05:00
Matthias Freund
0b081027fe Comment translation german - english
Change-Id: I76c5124ff13abe4610b8cc9a07ba75e038c02e8b
Reviewed-on: https://gerrit.libreoffice.org/2092
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-02-11 02:43:32 +00:00
Miklos Vajna
bdfc6363d6 n#793998 sw: add TabOverMargin compat mode
In case the right margin is larger then the tab position (e.g. the right
margin of 7cm, there is a tab position at 16cm and right margin begins
at 9cm), we have a conflicting case.  In Word, the tab has priority, so
in this conflicting case, the text can be outside the specified margin.
In Writer, the right margin has priority. Add a compat flag to let
the tab have priority in Writer as well for Word formats.

This is similar to TabOverflow, but that was only applied to left tabs
and only in case there were no characters after the tabs in the
paragraph.
2013-01-08 14:17:27 +01: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
Noel Grandin
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
David Ostrovsky
9e716494a8 fix some VS 2010 specific issues
Change-Id: Iae27a96c1e2ed72d2744fcbe100d6ada7dc41c82
Reviewed-on: https://gerrit.libreoffice.org/914
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-28 18:09:02 +00:00
Takeshi Abe
329d328727 sal_Bool to bool
Change-Id: Id3be1fbf289f04e175bb2fdd71754cad0c9672ce
2012-10-19 04:15:34 +09:00
Takeshi Abe
b1167e1250 sal_Bool to bool
Change-Id: I89050a1aa899b1a6cd49800f805af9611fd0a9a7
2012-10-16 18:33:24 +09:00
Luboš Luňák
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
Takeshi Abe
701db391b3 sal_Bool to bool
Change-Id: Ieeebcd89ae2728c6314f28413759bbb353c327bf
2012-10-07 09:54:01 +09:00
Norbert Thiebaud
750fc20611 replace remaining InterlockedCount() with inlined version
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c
Reviewed-on: https://gerrit.libreoffice.org/671
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-25 01:55:38 +00:00
Miklos Vajna
18b3feb8be n#778133 sw: add BackgroundParaOverDrawings compat flag
In Word, the layer that contains a background image is behind the layer
that contains the paragraph background. In Writer, the paragraph
background is painted before the hell layer. Add a compat flag to change
the order, so the DOCX importer can trigger that.

To reproduce, create an XShape, send it to the background, set some
color for a paragraph background, and notice that the background color
is missing where the shape is behind the text.

Change-Id: I9b1fffd9ac9a6e5a1c3d1f65371440047d125b38
2012-09-12 10:03:18 +02:00
Stephan Bergmann
84db94e97b -Werror,-Wunused-private-field (various sw)
Change-Id: Ib2becb2af810da0fa3d24bd0aa21887d41e2f34c
2012-09-11 17:11:12 +02:00
Caolán McNamara
2195e0c699 Resolves: fdo#53590 you can trust no one to tell you the truth
Change-Id: I6850d2060c1c7490c15c8eff7e0338433e8dab32
2012-09-07 16:48:02 +01:00
Luboš Luňák
7a045f48ba read support for docx w:embedTrueTypeFonts/w:embedSystemFonts
No write support yet.

Change-Id: Ia10239acc77cf9ebc4f511e30c007da36abf43cb
2012-09-06 17:35:48 +02:00
Cédric Bosdonnat
e598ab0447 n#775270: clip pictures instead of scaling they don't fit
Word clips pictures that are bigger than a page instead of scaling them
down. This patch introduces a new compatibility option to allow clipping
a picture in Writer instead of scaling it down.

Change-Id: I4defbee05be81e23ec28a2ed272eaf4e4cc6faf5
2012-09-04 12:59:52 +02:00