Commit Graph

252 Commits

Author SHA1 Message Date
Michael Stahl
c6f3d909f8 sw: valgrind complains about uninitialized mbIsPrepareSelAll
Change-Id: I5405a6818fc63c3e29bb189858fd0abc73f67e43
2013-12-03 13:29:34 +01:00
Stephan Bergmann
bfcf3608e2 Uninitialized value
Change-Id: Id5ca398296658da61a9880beca7ee03a2db752e6
2013-12-02 15:20:42 +01:00
Miklos Vajna
ee3189489c sw: ViewShell -> SwViewShell rename
It's a public class, so it should have the 'Sw' prefix.

Change-Id: I0040c1cc37ffcba7fc5f58b71c86f4a7cb0bfce4
2013-10-26 20:03:50 +02:00
Tor Lillqvist
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
Tor Lillqvist
a537db8762 Bin useless swmod comments
Change-Id: I65df74242453a907b1a1a50f391e7b017bec5fcb
2013-10-22 15:19:17 +03:00
Jan Holesovsky
66013a154b [API CHANGE]: PreView -> Preview, including .uno:PrintPagePreView.
Will be .uno:PrintPagePreview going forward.

Change-Id: Ie5a35467917a54a60dab9eaacf0690c9df27e6f6
2013-10-16 16:57:22 +02:00
Tor Lillqvist
e036d4b706 Spell "indices" correctly
Change-Id: I63b1de195bf2f3f8bfd185181f48b1520cdd849f
2013-10-02 21:57:42 +03:00
Caolán McNamara
d66af0955d murder an auto_ptr
Change-Id: I46b07d117e5e452dbd2e50e0d4a04e6713e25945
Reviewed-on: https://gerrit.libreoffice.org/6112
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-02 15:49:16 +00:00
Caolán McNamara
c1198cf209 remove yet another StringHash impl
Change-Id: I1f7894a4a08b193b48dceb40bf0a451d4a3b3d6d
2013-10-02 16:03:54 +01:00
Stephan Bergmann
d3ca36915e More SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP around std::auto_ptr
...as needed by Clang trunk towards 3.4.

Change-Id: Ibbfe9cb0ec03e0aed939d769feee9e046af4741f
2013-10-02 16:49:49 +02:00
Philipp Riemer
a323a7df85 whitespace work in sw/source/core/doc/
Change-Id: I79561a63db523b8da8de72a1096e908d184a8a0b
Reviewed-on: https://gerrit.libreoffice.org/6076
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-02 08:17:35 +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
Matteo Casalin
64b315df9b GetOutlineRuleName: return OUString instead of char*
Change-Id: I79cd722aa2d3bb0292f9b0f7fb6989e2e17d0ff0
Reviewed-on: https://gerrit.libreoffice.org/5563
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-08-21 11:43:35 +00: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
Jelle van der Waa
a1e10f8b46 fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
Change-Id: I26ca00f345b4f8b47dc35cd22652ef55f6d99536
Reviewed-on: https://gerrit.libreoffice.org/5218
Reviewed-by: Ioan Radu <ioan.radu.g@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-08-01 17:00:21 +00:00
Michael Stahl
f8dfa3a81a sw: remove SwDoc::ShareLayout
It is a crude hack that is no longer necessary because the underlying
problems that caused crashes when deleting the layout have been fixed.

Change-Id: I601bdb0dc0aff5f4ddb8b8f4ba4c8d1f72c76666
2013-07-03 16:38:35 +02:00
Armin Le Grand
c0eb5e7772 Resolves: #i121448# Aligned default fill color/line style for all apps
(cherry picked from commit 81664c037c8d6094b66c1660b6eee9693eadf401)

Conflicts:
	sc/inc/document.hxx
	sc/source/core/data/documen2.cxx
	sc/source/core/data/documen3.cxx
	sc/source/core/data/documen9.cxx
	svx/inc/svx/svdmodel.hxx
	svx/source/svdraw/svdmodel.cxx
	sw/inc/doc.hxx
	sw/source/core/doc/docdraw.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/ui/app/docshini.cxx

Change-Id: Id0f62f0cd5b83794e2dbaee4e8b6afa704a0c23a
2013-06-06 21:04:07 +01:00
Jian Fang Zhang
6e426582ec Resolves: #i113606# in SwDoc dtor release the cyclic reference...
between XFormModel and bindings/submissions

Patch by: zhangjf
Review by: zhangjf

(cherry picked from commit adc0946638e8817d5e57b0003b414249ac481df0)

Conflicts:
	sw/inc/doc.hxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/doc/docxforms.cxx

Change-Id: I3124daea8925b1efd8e151f3064582786d461718
2013-06-05 11:35:52 +01:00
Tor Lillqvist
c72bb2da7b Bin CLOOK comments and un-split one large switch statement
CLOOK = "Compiler Limit: Out Of Keys", an error reported by Microsoft's
compiler a long time ago. No such problem in those versions we support. No
need to mention CLOOK in comments any more.

While at it, re-combine one large switch statement that was split to avoid
CLOOK.

Change-Id: Id93d973a5fb3c81b6c754eef0ba3b0bd55a649d2
Reviewed-on: https://gerrit.libreoffice.org/3640
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-28 14:28:29 +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
adea2a859d fdo#62475 - remove pointless comments and ASCII art in sw/source/core/doc
Change-Id: I15f0af451a2259ddfeaa5e7964317e6c0537e4db
Reviewed-on: https://gerrit.libreoffice.org/3262
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-04-08 08:38:14 +00: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
Oliver-Rainer Wittmann
f0d001a378 Resolves: #i119292# remove misusage of <SwDoc::Set|IsLoaded()>
...for the adjustments of certain AT_PAGE anchored objects

Addresses the underlying problem of fdo#37024 fixed by
9d32497c01

(cherry picked from commit b41eec25c2c6bc44eef55ae1c4ef57b9012fc8e6)

Conflicts:
	sw/inc/doc.hxx
	sw/source/core/doc/doclay.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/layout/frmtool.cxx

Change-Id: I786eabdf84677e14c6f4b67d79e1e210e0532a21
2013-04-02 10:39:13 +01:00
Tor Lillqvist
92b973fadc Use an 8bpp virtual device (instead of a 1bpp one) in sw and sc for iOS
The reason why a 1bpp virtual device is used in these two places in sc
and sw is unclear to me. It causes complications on iOS as such a
bitmap gets passed to CGBitmapContextCreate() which does not accept
1bpp bitmaps. But let's keep the 1bpp for other platforms.

Change-Id: Ia34927cf728d4be05a31e88b7da78200d0b799ba
2013-03-26 19:06:44 +02:00
Noel Grandin
524cedbd30 fdo#46808, Convert linguistic2::ProofreadingIterator to new style
Change-Id: I1551f67ce503d58ea9b0e701219b26baadb25b78
2013-03-20 07:32:48 +02: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
Miklos Vajna
2c9f9832fc SwDoc: rename member variables missing their prefix
Change-Id: Id4683649aa9115f9075717768aa6cef4110c2ad2
2013-02-18 07:59:13 +01:00
Michael Meeks
c138a8aec8 asynchronous word-count. 2013-02-13 12:13:56 +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
pkoroau pkoroau
7a5272dc29 fdo#38837: Timers must end eventually [Writer idle timer]
Change-Id: I36c6c56d7277b9b3853b846c86c1f4dd47ebdb08
Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
2012-12-20 12:18:57 +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
Michael Stahl
9c5d6ea5ef sw: remove WorkaroundForB6375613
... which is incidentally the last user of XDocumentInfo.

Change-Id: I47dc31c8739aa1d50c2a3b26ac51a239417fa5b0
2012-11-22 12:10:31 +01:00
Takeshi Abe
3034266024 sal_Bool to bool
Change-Id: I10f8d534d664c5f27a32214c00aeee890d993d18
2012-11-01 09:48:51 +09:00
Takeshi Abe
136ae4bc2f sal_Bool to bool
Change-Id: I87d6e518aebcd0074f673b84b66df27ae9a0a15a
2012-10-30 11:50:20 +09:00
Takeshi Abe
b56eb71544 bInsWithFmt was always true
Change-Id: I72d764cd88dcd6516edfd11dd39d54f166340de2
2012-10-30 11:50:20 +09:00
Arnaud Versini
de6c8db94a More efficient way to initialize SwDoc
Change-Id: Icde740ea12e8839b0a4c8e0317143dbe2157a964
Reviewed-on: https://gerrit.libreoffice.org/894
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2012-10-25 12:01:39 +00:00
Luboš Luňák
f2655f92c1 postfix operator++ -> prefix operator++
Change-Id: I51506a83009db838d8e12d5559c46b404e59f9b5
2012-10-15 23:33:09 +02:00
Michael Stahl
b61991ba2c sw: tweak comment translations
0413cc28 5513e24e d93196c8
2012-10-13 22:27:57 +02:00
Arnaud Versini
18bad3e45c Remove unused member SwDoc::pMacroTable
Change-Id: Ic09b960b675d674a16f7f252ed2a974c4e25505b
Reviewed-on: https://gerrit.libreoffice.org/680
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2012-09-24 09:15:49 +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
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
Luboš Luňák
f35aacfc76 initialize member
Introduced by b95d203bc1 .

Change-Id: I2497ee7cd55776fbd801d07470968e5aa47e971a
2012-08-23 18:16:50 +02:00
Miklos Vajna
50a1df360c n#775899 sw: add FloattableNomargins compat flag
The DOCX filter imports floating tables as frames containing a table.
Word ignores the margins of paragraphs next to such a table, Writer does
not. Add a compatibility flag the import filter can set that triggers
this weird behaviour.

Change-Id: Iaaa1d2a2e2f9d0eaea17832b2e418f9a845efffd
2012-08-23 12:56:41 +02:00
Bjoern Michaelsen
1af0e36fb6 kill va_args abuse for SfxItemSet
Change-Id: I200addfdf551f1b8437b704c481d397c53440dcd
2012-08-04 15:57:04 +02:00
Noel Grandin
ddd84d08c9 Convert SV_DECL_PTRARR_SORT_DEL(_SwRedlineTbl) to o3tl::sorted_vector
Change-Id: Ie7edc6b32b373619d4c0ac154da93650743049cf
2012-07-26 23:35:27 +02:00
Noel Grandin
a236f8318a Convert SV_DECL_PTRARR_SORT(_SwFtnIdxs) to o3tl::sorted_vector
Change-Id: I84c4cd5686ea0649ad9ca6c879d51bffe6d693c2
2012-07-26 14:30:09 +02:00
Noel Grandin
63f792d9b1 Convert SV_DECL_PTRARR_SORT(SwOutlineNodes) to o3tl::sorted_vector
Change-Id: I17c40bda4ab401bde42b64d090fd7e3259e79026
2012-07-25 14:13:45 +02:00
Noel Grandin
5a4796f78f Convert SV_DECL_PTRARR_DEL(SwUnoCrsrTbl) to std::set
Change-Id: I0d79505e2d97b1f8608e6d6e72b317bfaa344b1d
2012-07-17 15:33:39 +02:00