Commit Graph

2049 Commits

Author SHA1 Message Date
296c2af27a fdo#66101: lowriter crashed when trying to open .docx file
Change-Id: I516bcb4bc18806d5a83f94c0776bd0f918a1e927
Reviewed-on: https://gerrit.libreoffice.org/4550
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:22:31 +00:00
a653bda02b fix highest debugging level build
Change-Id: I1f40bba348a3c0be7a892b56a9bf1b7da0b4435f
2013-06-27 10:16:35 +01:00
25d84e2826 Resolves: #i121751# restore cursor/selection on Undo/Redo language...
change for all text

- group intrinsic actions of language change for all text into one Undo action
- secure <SwRootFrm::CalcRects(..)> - catch NULL pointer
- correct <CursorGuard> - really restore the cursor

(cherry picked from commit 4207db473430e02a65a5f4d57db6e46a8db29a19)

Conflicts:
	svl/inc/svl/undo.hxx
	svl/source/undo/undo.cxx
	sw/inc/IDocumentUndoRedo.hxx
	sw/source/core/edit/edundo.cxx
	sw/source/core/inc/UndoManager.hxx
	sw/source/core/layout/trvlfrm.cxx
	sw/source/core/undo/docundo.cxx

Change-Id: I972988bbc21a519e0956ff196aa93a46287b9a2e
2013-06-26 16:22:38 +01:00
6db39dbd73 fdo#52028: sw: let text formatting ignore RSID in automatic styles
A suprising regression from 062eaeffe7cb986255063bb9b0a5f3fb3fc8e34c:
The RSID text attributes that are inserted for every user-inserted text
cause the text formatting (SwAttrIter) to create a lot more text portions,
and the portion breaks make font kerning impossible.

This is the only way i can think of to fix this problem; alternatives that
don't work are splitting the RSID out of the AUTOFMT hint into a separate
one and combining them in the sw UNO wrappers (fails because
SwXAutoStylesEnumerator actually does need to enumerate every AUTOFMT
including RSID), trying to detect and ignore them just in the text
formatting (the SwAttrIter cannot easily/cheaply detect when it's allowed
to skip), and having an internal subdivision inside the AUTOFMT hint (one
subsection for every RSID change) (which does not work because it cannot
ignore RSID-only AUTOFMTs completely).

Solve the problem with 2 additional flags on AUTOFMT and CHARFMT
attributes: FormatIgnoreStart and FormatIgnoreEnd, which indicate to
SwAttrIter::GetNextAttr() that the start or end of the hint should be
ignored, so that effectively it is merged with the preceding/subsequent
hint.  Of course the UNO API does not respect the flags so we can store
the RSIDs in automatic styles.

The flags are maintained in SwpHints::MergePortions, which detects both
RSID-only AUTOFMT hints (which can be ignored completely), and the
situation of N CHARFMT hints + AUTOFMT hint vs. N CHARFMT hints +
AUTOFMT hint where the AUTOFMT hints differ only in their RSID attribute.

This means that MergePortions needs to be called more often now, in cases
where the ignore flags may have been invalidated, such as:
- insertion of text with possible DontExpand flag set on hints
- deletion of hints
- SETATTR_NOHINTADJUST mode

Change-Id: I1fb95a87c654c67d114f6f7f2c43b847c50b0ffa
2013-06-20 00:34:38 +02:00
721baad94e bnc#802888 SwPageFrm: one more clickable field fix
This is similar to a996678ed30804e16103e1cfdc439c8546e5d3b0. If we have
both a background object and some clickable field to select, we should
always prefer the clickable field.

This time, the problem was to click on a clickable field, when the
cursor was in normal text and we had a full-page background object.

Change-Id: Id25036d8cb2ddf62011c22bfc50844b793b942bd
2013-06-10 15:08:48 +02:00
7cb8b8c8e9 work on existing comments in sw/source/core/edit
Change-Id: I32b249971ac6ac540d816c38e00321befb181901
2013-06-09 00:56:40 +02:00
97035c95c2 Revert "bnc#382137 SwFrm::CheckPageDescs: notify clients about deleted SwPageFrm"
I can't reprodue this in a product build and I'm not sure this was the
right fix for the problem.

This reverts commit bb4d5d96f4daf1dc1b92f823171ac567f6cf95a8.
2013-06-06 21:32:15 +02:00
9eb4e4dc51 Some more modules at least building with mingw64
Change-Id: I3ea039655aecb7885bb310b1f2c29d66f9f7bb4f
2013-06-06 19:49:56 +02:00
eee3253618 bnc#382137 SwFrm::CheckPageDescs: notify clients about deleted SwPageFrm
The problem is the following: SwLayAction::InternalAction() saves
pPage->GetPrev() as pTmp, then SwFrm::CheckPageDescs(pPage) is called,
which deletes pPage->GetPrev(). SwLayAction has no idea that pTmp got
deleted, and later passes it to unlockPositionOfObjects(), which
obviously assumes a valid pointer.

To be on the safe side, just provide a possibility to let the caller
know its pointer has been deleted.

Change-Id: Ibb4d83266b1f4b6146a12dce0d4701f1056deecd
2013-06-06 14:13:22 +02:00
61dfc6fa94 Resolves: #i120030# optimize thumbnail creation/painting
(cherry picked from commit 255beb8f56a074ce85eaf1db3cdf168f9c09466e)

Conflicts:
	sfx2/inc/sfx2/objsh.hxx
	sw/source/core/layout/paintfrm.cxx

Change-Id: I23157f7a6983ba81b1c8ddcc409a4989915be2ed
2013-05-31 16:13:17 +01:00
7d581c5ffe sw: unused includes in dbg_lay
Change-Id: I6707a5911fa8b97946c72c1846e1235032680ead
2013-05-30 07:29:54 +02:00
e23a20db4c sw: unused includes in colfrm
Change-Id: I8ddd17b7192005bbb46f9ed531cbb549ec58963d
2013-05-30 07:29:54 +02:00
a5c5e3410d sw: unused includes in calcmove
Change-Id: Id84e4df270e302399c4696e11da2d09f2ef44899
2013-05-30 07:29:54 +02:00
e978e83950 sw: unused includes in atrfrm
Change-Id: Ia57b28ed60ca8c9a4b00009c2abf1e2ba2f8ed92
2013-05-27 09:40:35 +02:00
a689d8cf7a sw: unused includes in anchoredobject
Change-Id: Ic7034ed384448a273517f3bf9795adfbbcaeba7b
2013-05-27 09:40:35 +02:00
7621888c0a sw: unused includes in anchoreddrawobject
Change-Id: I57fdc7413c5caf09dbe279b502d94e36a46d5f64
2013-05-27 09:40:23 +02:00
dc54d78398 SwFlowFrm: rename member variables missing their prefix
Change-Id: Id7d1271408232e37aa23373dcd1ae6872ac8574b
2013-05-25 19:55:39 +02:00
76fbba8259 sw: convert some usage of Point::X/Y to Point::set/getX/Y, take two
69c52bc5b7973a2e414209470f5bf9b66dcc4f30 had some typos, and got
reverted in 78123a504b5215d061935d7b2771ba51e68cae0e, this does the
same, except those typos corrected, so vertical layout is still OK.

Change-Id: I79fe610e4cc8bbbddbd8415198d6309a93f4ba18
Reviewed-on: https://gerrit.libreoffice.org/3929
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-05-20 18:59:38 +00:00
78123a504b Resolves: fdo#64584 revert convert Point::X/Y to Point::set/getX/Y
This reverts commit 69c52bc5b7973a2e414209470f5bf9b66dcc4f30

I found one place where Y should have been X, but didn't clear
the problem, so threw my hat at it and reverted the lot, its
cosmetic anyway so no functionality lost be reverting.
2013-05-15 20:37:13 +01:00
72e54b6960 Resolves: #i120106# implement a SwPosFlyFrms which avoids memory leaks
Use boost::shared_ptr and stl tools to implement a SwPosFlyFrms which can be
used and handed over by value and cleans up it's content to avoid memory leaks.

Found by: Chao Huang
Patch by: Chao Huang, alg
Review by: Chao Huang, alg

(cherry picked from commit c26f80aa1ba65b63e313dce9c6d7e40ab8efede6)

Conflicts:
	sw/inc/doc.hxx
	sw/inc/flypos.hxx
	sw/source/core/doc/doclay.cxx
	sw/source/core/layout/flypos.cxx
	sw/source/core/unocore/unoobj2.cxx
	sw/source/filter/html/htmlfly.cxx
	sw/source/filter/ww8/writerhelper.cxx

Change-Id: If610457654b1056d799d4336cd249815f7878a96

Fix build breaker from i120106

Patch by: Chao Huang
Suggested by: alg

(cherry picked from commit 880aadbeba4e31049d5b7f0a34323553fb6249fb)

Conflicts:
	sw/source/filter/ww8/writerhelper.cxx

Change-Id: I516fcb6ee69944c54cc9eb76c069eb8b28749050
2013-05-13 20:38:19 +01:00
84203fab20 Resolves: #i120016# refine condition for allowing split of a table row
Found by: Yan Ji, Jian Hong Cheng
Patch by: Oliver-Rainer Wittmann
Review by: Jian Hong Cheng
(cherry picked from commit 472d5610c71b7a74e6d279d8f625cec8b41b8e81)

Conflicts:
	sw/source/core/layout/tabfrm.cxx

Change-Id: I718a0c70c12ed34c4ca3a2826f388b17a84c63e7
2013-05-11 20:52:52 +01:00
d2b11ab8cb Resolves: #119945# improve setting of OrdNums for "nesting" of objects
- instead of adjusting the OrdNum of the "nested" object the OrdNum of the "parent" is adjusted.

Found by: Yan Ji <yanji.yj at gmail dot com>
Patch by: yuanlin <yuanlin.ibm at gmail dot com>
Review by: Oliver <orw at apache dot org>
(cherry picked from commit 73f462e2162847262093c3984dc6c98919e1b3cd)

Conflicts:
	sw/source/core/layout/flylay.cxx

Change-Id: I0541dc3775f81efd60a6f4baa172c5297ee9d829
2013-05-08 17:04:40 +01:00
69c52bc5b7 sw: convert some usage of Point::X/Y to Point::set/getX/Y
As I understand it, Point::X/Y() basically provide direct access to the
position, so they come without the usual benefits of getter/setter
methods.

Change-Id: I6d5bfd4f20ab8c7377419dcf5aac2c4ea0e9db05
2013-05-08 14:32:11 +02:00
2ce25faffd fix typos (wich instead of which) 2013-05-06 20:07:23 +02:00
81870e5333 coverity#1000604: Dereference after null check
Change-Id: Id9c3b7eb29c58c55c100db6da644b232ada550ee
Reviewed-on: https://gerrit.libreoffice.org/3791
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-05-05 20:34:46 +00:00
9023c8e604 remove demented code
The things are not even enums, so there's no error checking either.

Change-Id: Ib33cd96b49a840cbe486dbed9a7c370827b54c2d
2013-04-29 17:00:26 +02:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01: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
09f50c017f Reintroduce unlockPositionOfObjects().
This unlocking code was accidentally removed in commit
120922361a5928ea4437ffe253ce209abd7060b0.  Not sure if it is still necessary,
but I am at the moment unable to prove it is not, so better to be safe :-)

Change-Id: I20a7cf3299de75182f890efb0d192e54c1b2543d
2013-04-17 10:32:42 +02:00
70e4329d04 fdo#60724 successfull -> successful
Change-Id: I287bef5b7f2baf5aaaab47141267ae2cadfe2451
2013-04-15 05:34:02 +02:00
120922361a i#23187: Fix crash of the document.
The mbLayoutInProgress bool was effectively unused - only set and reset, but
the only place that was checking for that was in lcl_RecalcRow(), again, only
to set and reset it.

Worse - with the document from i#23187, the mbLayoutInProgress was set / reset
on a page already disposed in SwFrm::InsertPage() which was causing the crash
here.

So let's get rid of all this mbLayoutInProgress, its getter and setter, and
NotifyLayoutOfPageInProgress class.

Valgrind, thank you that you exist, would have never found it without you! :-)

Change-Id: I9a9b604f8a21bb50e21af1b20b8db76d2c0504bd
2013-04-12 17:10:53 +02:00
38a3e82938 Related: #i119624# GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid
- consider upper space amount only for page grids in squared page mode

Found by: louqle <louqingle at gmail dot com>
Patch by: Oliver-Rainer Wittmann <orw at apache dot org>
Review by: zjchen <zjchencdl at gmail dot com>
(cherry picked from commit 53ba60618af3977f5e5488225dcf050a517fb5b8)

Change-Id: If6592a41f0ef67cc20fa8b3ddaefa36571561f85
2013-04-12 13:05:42 +01:00
e1695087a3 i#29679: Return early not to crash on ooo29679-57.odt in dbgutil build.
Change-Id: I467f6383ec469f5719fd49914d81605b2a5679a1
2013-04-11 10:52:28 +02: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
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
9d32497c01475f2b5e5bec756e4dd0ca9f9d4928

(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
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
e76e2c4ce7 add SwField::IsClickable and use it from SwWrtShell and SwPageFrm
Change-Id: I3d856dc11297b2ad73859ff9c2d529e8cd4727b2
2013-03-19 14:28:44 +01:00
a996678ed3 bnc#802888 SwPageFrm: let macro fields have priority over background objects
The intention is to get similar behavior as
61f467c8974d6b6face41e7027d75ae4ddb6fdb2, except this applies to single
clicks, while that one affected only double-click.

Change-Id: Idddc26aa8cd064f89fb4f99b3ad7a5430ac455bc
2013-03-19 13:44:25 +01:00
293006f921 Remove RTL_CONSTASCII_(U)STRINGPARAM in sw (2)
Change-Id: I5f84d997855321145179a9d6198a0d093dc62a95
Reviewed-on: https://gerrit.libreoffice.org/2837
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-03-19 12:37:41 +00:00
098877d6f9 Remove RTL_CONSTASCII_(U)STRINGPARAM in sw
Change-Id: I704628eabdddb70530b6a8a1160c20724332c7e5
2013-03-19 08:36:25 +01:00
2c17beb796 Wundef, fix various more or less broken debug code
Change-Id: I347495f7960da099afdfbf3db608e0347b832f99
2013-03-18 17:15:57 +01:00
4dc78aee9b fdo#61952: sw: fix left/right-only page styles and first-page
- remove PD_FIRST and GetFirstFmt:
  This flag makes no sense at all, since there are no "first-only"
  page styles (while there are left-only/right-only).
- instead add a parameter to GetLeftFmt/GetRightFmt to request a
  first page format, if such exists and is not shared
(regression from 02a934d03b101ce463a232f9cbb7b43e684de37e
 and fa0f42bafbf24e9141ddee728b160b5ab47077f2)

Change-Id: I4d50c2c0cc4f3cf231eacba891df22d0bcf6c4df
2013-03-15 22:54:06 +01:00
38d3e115c1 vcl: make Region ctors explicit to prevent overloading desasters
Change-Id: Id36d125b4940418833bec31a4710d6cd545629e0
2013-03-13 22:29:46 +01:00
c083e0f22e #119952# - method <lcl_CalcAutoWidth(..)> - do not provide width of text frame inclusive margins, if text frame is in its formatting.
Found by: Yan Ji
Patch by: qiuhuaidong at gmail dot com
Review by: Oliver-Rainer Wittmann
2013-03-13 01:25:44 +01:00
a0296296fb fdo#60691 add modelines to *.src and *.hrc files
use solenv/bin/add-modulelines script for the task
and remove all UTF bom from *.src and *.hrc files

svx/source/dialog/hdft.src

Change-Id: I745d4f0fe9b05436a142a03f8512970f91c41bd4
2013-03-08 21:02:26 +00:00
4ae71885ec fdo#56272 SwAnchoredDrawObject::_SetPositioningAttr: fix position
This reverts a part of 51cfbf0cfaec395a99a00f2c20fcba96de9a4427, that is
no longer needed, but causes incorrect drawing objects position.

The problem was that a non-zero position doesn't mean the layout in a
later iteration doesn't change the position, but the referred commit
didn't allow later iterations to fine-tune the position.

Change-Id: Id91a4c6952d1b58e0c5bc0b1a60991a284c29ddc
2013-03-04 18:08:44 +01:00
21fbbee541 Bin pointless PAGES01 comments
Change-Id: I08b9bafa91c5bc7b7b6ca601ab91607b3143d590
2013-03-04 12:46:23 +02:00
474c8b8b63 SwFmtAnchor::SetAnchor: fix assert to still allow table -> frame conversion
Change-Id: I2dda82b675ebdd434656332d328b02ee3fc04528
2013-03-04 09:53:56 +01:00
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
ddf1b13a52 sal_Bool to bool
Change-Id: I4040baa1a0202426df80a0ea94abde55e2b6ca65
2013-03-03 10:31:48 +09:00