Commit Graph

339 Commits

Author SHA1 Message Date
Thomas Arnhold
2e2d97fb2b typo: fileds -> fields 2014-04-14 12:33:09 +02:00
Thomas Arnhold
661f53f785 typo: calcualting -> calculating 2014-04-14 12:33:08 +02:00
Thomas Arnhold
5cb8ad75d0 typo: implememted -> implemented 2014-04-14 12:33:08 +02:00
Thomas Arnhold
f6d5a32ab5 typo: avaiable -> available 2014-04-14 12:33:07 +02:00
Caolán McNamara
36c84fa3fb restore original lock status of SwViewShell in correct order
in e12184393f "Resolves: rhbz#1081176: don't jump
to cursor pos" for some reason I collect the old state of the various
SwViewShells and then restore them in the opposite order.

Change-Id: Ibb7bcfb07cf5038dd2e9acbac26b3246ff483a92
2014-04-11 20:27:35 +01:00
Caolán McNamara
e12184393f Resolves: rhbz#1081176: don't jump to cursor pos when...
launching a new window view of a document. This was happening because of
(temporary) activation of the modified flag (from updating the document stats
in the bottom bar) triggering a scrolll to the current cursor position of the
old document

Change-Id: I6e1a3c07b66ff6373345850d1449f17c1f0baa17
2014-04-11 14:47:50 +01:00
Matteo Casalin
df8d9fc9a9 sal_Bool to bool
Change-Id: I5c134bce37e1be05618b14e7dbb22911cd6656c1
2014-03-16 09:51:12 +01:00
Matteo Casalin
f46d23e242 sal_Bool to bool
Change-Id: Ie04d9314f66bcda8e1c7939248af79a15fbdaaeb
2014-03-02 20:17:57 +01:00
Noel Grandin
db0222881b editeng: sal_Bool->bool
Change-Id: Ie2c8bf805461d61de2dfa2658160fd612959932c
2014-02-21 12:19:25 +02:00
Adam Co
198733f7ef Added some 'To-Do' notes regarding the new 'SwExtraRedlineTbl'
These notes are to make sure if logic needs to be added for the
'SwExtraRedlineTbl' in these functions, in addition to the
'SwRedlineTbl' that is already there.

Change-Id: I7778b4e20f5323a925d05a7df0c727f443566662
Reviewed-on: https://gerrit.libreoffice.org/7823
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-12 08:47:13 +00:00
Michael Stahl
85a8c1361d SwDoc::ConvertFieldsToText(): don't insert empty strings
Prevents an assert on accessing sText[0] in InsertString().

Change-Id: I1828694a4c1e46f8b48cf3571ec2bf4dd615bf2c
2014-02-06 14:44:08 +01:00
Stephan Bergmann
8bc3751ea3 bool improvements
Change-Id: Ibeb658e73b588f90242c95d23149f2ef45a7a815
2014-01-28 20:26:21 +01:00
Caolán McNamara
ba27366f3d Resolves: #i17171# Writer paragraph cannot be longer than 65534 characters
Change-Id: I2052ae96571cba8fe2191dff53b1c61c95c94c60
2014-01-15 13:26:08 +00:00
Adam Co
4a68f12691 Renamed 'SwRedline' to 'SwRangeRedline'
This is in preparation to adding more types of 'SwRedlines'.

Change-Id: Id61217ed3c4622f7689427ea9f30e364f6bb65d1
Reviewed-on: https://gerrit.libreoffice.org/7410
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-01-13 16:40:46 +00:00
Matteo Casalin
c936dace9a Bail out early
Change-Id: Ib137aeb14405e99adbfcadaf8b3b0408c217093d
2013-11-23 14:20:36 +01:00
Oliver-Rainer Wittmann
c2b5521921 Resolves: #i33737# enable in-place editing of Input Fields
(cherry picked from commit c2afeb1c3f11e8f420b59f3786eb8626c99ff595)

Conflicts:
	sw/inc/IDocumentContentOperations.hxx
	sw/inc/crsrsh.hxx
	sw/inc/doc.hxx
	sw/inc/editsh.hxx
	sw/inc/expfld.hxx
	sw/inc/fldbas.hxx
	sw/inc/fmtfld.hxx
	sw/inc/hintids.hxx
	sw/inc/ndtxt.hxx
	sw/inc/txatbase.hxx
	sw/inc/txtfld.hxx
	sw/inc/txtrfmrk.hxx
	sw/inc/txttxmrk.hxx
	sw/inc/viscrs.hxx
	sw/source/core/bastyp/init.cxx
	sw/source/core/crsr/crsrsh.cxx
	sw/source/core/crsr/crstrvl.cxx
	sw/source/core/crsr/findattr.cxx
	sw/source/core/crsr/findtxt.cxx
	sw/source/core/crsr/swcrsr.cxx
	sw/source/core/crsr/viscrs.cxx
	sw/source/core/doc/dbgoutsw.cxx
	sw/source/core/doc/doc.cxx
	sw/source/core/doc/docfld.cxx
	sw/source/core/doc/docfmt.cxx
	sw/source/core/doc/docnum.cxx
	sw/source/core/doc/docredln.cxx
	sw/source/core/doc/docruby.cxx
	sw/source/core/doc/doctxm.cxx
	sw/source/core/doc/visiturl.cxx
	sw/source/core/docnode/nodes.cxx
	sw/source/core/edit/edatmisc.cxx
	sw/source/core/edit/edattr.cxx
	sw/source/core/edit/edfld.cxx
	sw/source/core/edit/edfldexp.cxx
	sw/source/core/edit/editsh.cxx
	sw/source/core/edit/edlingu.cxx
	sw/source/core/edit/ednumber.cxx
	sw/source/core/fields/expfld.cxx
	sw/source/core/fields/fldbas.cxx
	sw/source/core/fields/reffld.cxx
	sw/source/core/frmedt/fefly1.cxx
	sw/source/core/inc/docfld.hxx
	sw/source/core/inc/rolbck.hxx
	sw/source/core/inc/swfont.hxx
	sw/source/core/layout/flycnt.cxx
	sw/source/core/layout/laycache.cxx
	sw/source/core/layout/trvlfrm.cxx
	sw/source/core/text/atrhndl.hxx
	sw/source/core/text/atrstck.cxx
	sw/source/core/text/inftxt.cxx
	sw/source/core/text/porfld.cxx
	sw/source/core/text/porfld.hxx
	sw/source/core/text/txtfld.cxx
	sw/source/core/tox/tox.cxx
	sw/source/core/tox/txmsrt.cxx
	sw/source/core/txtnode/atrfld.cxx
	sw/source/core/txtnode/ndhints.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/txtnode/txatbase.cxx
	sw/source/core/txtnode/txatritr.cxx
	sw/source/core/txtnode/txtedt.cxx
	sw/source/core/undo/SwUndoField.cxx
	sw/source/core/undo/rolbck.cxx
	sw/source/core/undo/unsect.cxx
	sw/source/core/undo/untbl.cxx
	sw/source/core/unocore/unocrsrhelper.cxx
	sw/source/core/unocore/unofield.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unorefmk.cxx
	sw/source/core/view/vprint.cxx
	sw/source/filter/ascii/ascatr.cxx
	sw/source/filter/html/htmlatr.cxx
	sw/source/filter/rtf/rtffly.cxx
	sw/source/filter/ww1/fltshell.cxx
	sw/source/filter/ww1/w1filter.cxx
	sw/source/filter/ww8/wrtw8esh.cxx
	sw/source/filter/ww8/wrtw8nds.cxx
	sw/source/filter/ww8/ww8atr.cxx
	sw/source/filter/ww8/ww8par.cxx
	sw/source/filter/ww8/ww8par3.cxx
	sw/source/filter/ww8/ww8par5.cxx
	sw/source/ui/app/applab.cxx
	sw/source/ui/docvw/edtwin.cxx
	sw/source/ui/docvw/edtwin2.cxx
	sw/source/ui/envelp/envfmt.cxx
	sw/source/ui/fldui/fldedt.cxx
	sw/source/ui/fldui/fldmgr.cxx
	sw/source/ui/inc/wrtsh.hxx
	sw/source/ui/lingu/hhcwrp.cxx
	sw/source/ui/shells/basesh.cxx
	sw/source/ui/shells/drwtxtex.cxx
	sw/source/ui/shells/grfsh.cxx
	sw/source/ui/shells/tabsh.cxx
	sw/source/ui/shells/textfld.cxx
	sw/source/ui/shells/textidx.cxx
	sw/source/ui/shells/textsh.cxx
	sw/source/ui/shells/textsh1.cxx
	sw/source/ui/shells/txtattr.cxx
	sw/source/ui/uiview/formatclipboard.cxx
	sw/source/ui/uiview/view.cxx
	sw/source/ui/uiview/view2.cxx
	sw/source/ui/uiview/viewsrch.cxx
	sw/source/ui/uiview/viewstat.cxx
	sw/source/ui/uiview/viewtab.cxx
	sw/source/ui/wrtsh/wrtsh1.cxx
	sw/source/ui/wrtsh/wrtsh2.cxx

Change-Id: I6758d6719e1fd523797cc6ee2648ffcb47d52595
2013-11-19 15:51:27 +00:00
Matteo Casalin
ebeff3f074 xub_StrLen to sal_Int32 in SwIndex and some related
Change-Id: I66735635a88844c30a7fa1c886d2c1df34008f4f
2013-11-14 09:23:19 +01:00
Noel Grandin
a5536d9a0e remove unnecessary use of OUString constructor in SW module
Change-Id: I015959dce567e5579ebb5c775fb57ae14e1cd3b1
2013-11-08 08:44:33 +02: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
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
Noel Grandin
d6e321f826 convert sw/source/core/doc/*.cxx from String to OUString
Change-Id: I08caf2c9b7b2368f715fd582c93d40d69de2c875
2013-10-18 09:59:22 +02:00
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