Commit Graph

1095 Commits

Author SHA1 Message Date
9f01ba1b78 i#107771: sw: burn, UnoCallBack, burn!
Change-Id: Ifdb6d4b2e404bd160e6fcec3229691e750bdf698
2014-08-20 16:40:18 +02:00
2c057a59e8 i#107771: sw: implement thread-safe instance caching for SwXFootnote
Change-Id: I3fffb321877168dfa9844b4ad75a9a9efc9602a6
2014-08-20 16:40:18 +02:00
e54015d06f i#107771: sw: make SwXFootnote a client of its format poolitem
In other words, stop registering at SwDoc's "UnoCallBack".

Change-Id: Ie73c707b0f43559cc78717c0879d5e9a9335a7ac
2014-08-20 16:40:17 +02:00
eee8b6eed6 SwWrtShell::StartInputFldDlg() can be called with RES_SETEXPFLD too
... and there's no way to get the SwFmtFld from a SwSetExpField, so add
a member for it like SwInputField has.  That's still better than the
UnoCallBack nonsense.

Change-Id: I59c82e95414dbae284432b8a318a6ce1a34256c7
2014-08-20 16:40:17 +02:00
bbd97fe57d i#107771: sw: make SwXTextField a client of its format poolitem
In other words, stop registering at SwDoc's "UnoCallBack"

Change-Id: Ieb2639497fe5e8d71aa1c47952c007da76fcee84
2014-08-20 16:40:17 +02:00
14eb485c5c i#107771: sw: implement thread-safe instance caching for SwXReferenceMark
Change-Id: I4f3b6789dde053ca913e12233b20d45dfe50c7ec
2014-08-20 16:40:16 +02:00
e7c96f3e8f i#107771: sw: make SwXReferenceMark a client of its format poolitem
In other words, stop registering at SwDoc's "UnoCallBack"

Change-Id: I9e08966cf8e2d2a373867d81549c8887f73993c8
2014-08-20 16:40:15 +02:00
f05273aa47 fdo#72695: avoid double-free race condition for SwXParagraph
Change-Id: Ie207d9400bc3a55e17497b309dfbc263e7b12e30
2014-08-20 16:40:14 +02:00
794d5ac4ac vcl: use enum for complex text layout constants
Since these constants are bitfield flags, we define some methods to make
working with them reasonably type safe.

Move the definitions to outdevstate.hxx, since we need the values there,
and that appears to be the "root most" header file.

Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing
as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write
weird code thinking that it's a real flag.

Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343
Reviewed-on: https://gerrit.libreoffice.org/10676
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-20 09:01:26 -05:00
15295ab6db Refactored SwDoc::GetEditShell .
Removed its output paramater as GetCurrentViewShell should be
used instead and added a const version.

Change-Id: Iad8b57553b6e93e3472ce8c6905d08e8d49af770
2014-08-19 21:57:06 +02:00
d21d5a7261 drop unnecessary shl.hxx includes
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-08-18 12:59:49 +01:00
1bc196059f coverity#1158079 Unchecked dynamic_cast
Change-Id: Iab2c78af7dcf967ccdf5016266324c805856af0b
2014-08-17 16:39:23 +01:00
535971f3a1 Refactored IDocumentStylePoolAccess out of SwDoc.
Added non const SwDoc::GetDfltTxtFmtColl and SwDoc::GetTxtFmtColls
and SwDoc::GetCharFmts.
Had to make the manager friend of SwTxtFmtColl and SwConditionTxtFmtColl
Had to make SwDoc::_MakeCharFmt and SwDoc::_MakeFrmFmt public.

Change-Id: I19a36d91f92b3781a6c4313ec12eb8f7d4dfacc3
2014-08-12 23:26:38 +02:00
5494954b26 Refactored IDocumentLayoutAccess out of SwDoc.
Into the new class DocumentLayoutManager.

Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12 23:26:38 +02:00
64e13a1456 Refactored IDocumentState out of SwDoc.
Into the new class DocumentStateManager.

Change-Id: I91c9097b091ff6118d58fd15fff2a4cefe0171fd
2014-08-12 23:26:38 +02:00
69e5f335ab Refactored IDocumentFieldsAccess out of SwDoc.
Into the new class DocumentFieldsManager.
Removed SwDoc::_MakeFldList because it is not defined anywhere.
Also moved a few non interface methods that belong to the manager.

Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
2014-08-12 23:26:36 +02:00
274f1811b9 Refactored IDocumentRedlineAccess out of SwDoc.
Into the new class DocumentRedlineManager.
Added an non const version of GetRedlineTbl to the interface.
Also Moved SetAutoFmtRedlineComment which is not part of interface.

Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
2014-08-12 23:26:36 +02:00
e9d056ff4a Remove invalid and unnecessary downcast
Change-Id: I2c4daa7057a4faf020b96b587c7a8348adeaeb58
2014-08-12 14:20:28 +02:00
3dafed2ede -Werror,-Wundefined-bool-conversion
Change-Id: Iff8db4c82abeeed0789d7012223a846f1058c353
2014-08-12 12:19:43 +02:00
b75e052d31 Call SwTxtNode-specific part of DelFrms while SwTxtNode is still SwTxtNode
...when SwCntntNode::DelFrms is called from ~SwTxtNode -> ~SwCntntNode.

* SwCntntNode::DelFrms now needs a flag to distinguish calls from inside
  ~SwCntntNode from other calls.  bIsDisposeAccTable happens to already serve
  that purpose, so I reused it, but that may be a bad idea from a semantic point
  of view?

* ~SwTxtNode is careful to mimic old behavior and only calls DelFrms_TxtNodePart
  if GetDepends() is true; no idea whether that's really necessary, though.

* Shifting the work done by DelFrms_TxtNodePart from within ~SwCntntNode to
  before ~SwTxtNode calls ~SwCntntNode hopefully has no negative consequences.

Change-Id: I1532b4cfef7fbf9ba82e64b919a08cbefa335421
2014-08-06 18:14:00 +02:00
823447222c SAVEFLY is a noop, just use a bool
Change-Id: I32255ca073d52616d3e5c9e80f32471e0a7df3fa
2014-07-25 09:47:55 +02:00
5f0967a634 Do not include txttypes.hxx unnecessarily
Change-Id: I557019995975b24062fd346a7cc0cae872cab308
2014-07-22 23:50:44 +02:00
824d78b570 Use a dedicated constant, with a descriptive name
Change-Id: I7f3ff51ee004450ba059ba5b6995bcdb30c3235d
2014-07-22 23:50:42 +02:00
3621e2d9e1 SwpHints::GetPos just used to check presence => renamed to Contains
Change-Id: I46a61422dc4299fb4b747dd838d25e63424dd3be
2014-07-22 23:50:42 +02:00
05dda9a913 SwpHintsArray/SwpHints and related: sal_uInt16 to size_t
Change-Id: I9a7674109b05683287e12cbce6bc417b40ca5084
2014-07-22 23:50:42 +02:00
c5fc11de96 Simplify by early bail-out
Change-Id: Ie44e321692ddf306bf85c327420e28b31e1c055f
2014-07-22 23:50:42 +02:00
6865a0075f sal_uInt16 to size_t
Change-Id: Id048517a7da92e40a4037d2a379bf2418609efae
2014-07-22 23:50:41 +02:00
813e24b933 sal_uInt16 to more proper types
Change-Id: I82826df7797197e5356e8620e6fbdda7558421ef
2014-07-22 23:50:41 +02:00
941babb7d3 sal_uInt16 to sal_Int32/size_t
Change-Id: I70e4f757696c370eb2243617e9bfb14d219b4782
2014-07-22 23:50:41 +02:00
1c8784e336 sal_uInt16 to more proper integer types
Change-Id: Ifc20d84d05ae270a586576da634929eb1ce088b7
2014-07-22 23:50:40 +02:00
115919a9c2 Directly return the desired information
Change-Id: I099009585c0ad3de7e3e98e48c5a05fbded0b1bb
2014-07-22 23:50:40 +02:00
bb9a13db63 return bool instead of sal_uInt16 (0 or 1)
Change-Id: I3e8d014a2772b55793cd7ea4666aeb022e5b28e4
2014-07-22 23:50:39 +02:00
a9c17adf9a Resolves: #i125296# correction of fix for issue #i125044#
(cherry picked from commit 2f2e914703ad45598ae51dcaed82c6c6ec49fb83)

Conflicts:
	sw/source/core/txtnode/atrfld.cxx

Change-Id: I7519a2b985da603618a345d5549f73c9abd17101
2014-07-22 14:32:02 +01:00
cd3d26b7ed vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long'
but array of X position tend to be in sal_Int32.
As a prep work to be able to support 'double'
as the base type of Device Coordinate, harmonize
the use of 'long' for non-float coordinate.

Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
2014-07-20 22:10:59 +02:00
7a8fcfca98 fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass
the current implementation of CoreText simply dropped the proper
implementation of DrawTextArray, by ignoring DXArray
this very visibly borked the show-non-displayable character
feature of writer.. the bullet representing the 'spaces'
was quite misplaced.
This solve specifically this problem.
More work is needed to bring proper support of DXArray back to CoreText


Conflicts:
	vcl/inc/sallayout.hxx
	vcl/source/outdev/text.cxx

Change-Id: Idb2cc90d5ffaa8b83f79241cee2d512112d1c3be
2014-07-15 21:45:11 +02:00
6c8de2b107 Revert "fdo#79673 revert to old NPC for MacOSX only"
This reverts commit 3a2010c711b0ca4d762681dd0967ad08bc1e23fc.
Prep to apply a full fix.

Change-Id: I3b71ad79f65e48456d9fd9d257bf471faa0f3482
2014-07-15 21:42:37 +02:00
f634ec520f Refactored IDocumentContentOperations out of SwDoc.
Into the new class DocumentContentOperationsManager.

Made SwNodes in sw/inc/ndarr.hxx friend class to
DocumentContentOperationsManager so it can call DelNodes at end of
DocumentContentOperationsManager::DeleteSection .

Added DeleteAutoCorrExceptWord to SwDoc, its needed in the Manager.

Added a non const version of SwDoc::GetDfltGrfFmtColl() to SwDoc
because its needed in the Manager.

Made SwDoc a friend class to DocumentContentOperationsManager so it
can call SwDoc::checkRedlining and SwDocL::_MakeFlySection.

Moved SwDoc::CopyImpl_ , SwDoc::CopyWithFlyInFly and
SwDoc::CopyFlyInFlyImpl into the Manager.

Moved "struct ParaRstFmt" and "lcl_RstTxtAttr" from docfmt.cxx
in DocumentContentOperationsManager.hxx .

Change-Id: Icaab57f4a8c158a85e549ecb4aacc752bc95bbc9
2014-07-15 15:44:04 +02:00
87cb919c7c Refactored IDocumentListsAccess out of SwDoc.
In the new class DocumentListsManager.
The method listfunc::CreateUniqueListId was also moved there.
Added a new method deleteListsByDefaultListStyle to the Interface,
which is needed for SwDoc::DelNumRule.

Change-Id: I75ea554a57d9402d2fcfeaedf9fbe50fbae2b020
2014-07-15 15:44:03 +02:00
51add78184 [loplugin:literaltoboolconversion]
Change-Id: I9303249880ea0eb2f354fd3ae20c9eb3607a836b
2014-07-15 11:23:56 +02:00
3a2010c711 fdo#79673 revert to old NPC for MacOSX only
Change-Id: I83cfa2f11e76e03b919216e8dd04d1121ea6afd8
2014-07-15 00:08:23 +02:00
e465f0f474 Resolves: #i125228# correct consideration of InputFields...
in table cells are part of table formulas

(cherry picked from commit b384441c10475c9784eae3ea501afb22e0317468)

Conflicts:
	sw/source/core/fields/cellfml.cxx

Change-Id: I4780ce0c1ac9ac911b654f61aa12938d7b225139
2014-07-14 15:57:18 +01:00
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
7d9bb549d4 Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including
Header and Footer) for direct attributes and style attributes

(cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)

Conflicts:
	cui/source/factory/dlgfact.cxx
	cui/source/factory/dlgfact.hxx
	cui/source/inc/bbdlg.hxx
	cui/source/inc/cuires.hrc
	cui/source/tabpages/bbdlg.cxx
	cui/source/tabpages/bbdlg.src
	cui/source/tabpages/page.cxx
	cui/source/tabpages/tparea.cxx
	include/svx/pagectrl.hxx
	include/svx/svxdlg.hxx
	include/svx/svxids.hrc
	include/xmloff/PageMasterStyleMap.hxx
	include/xmloff/prstylei.hxx
	include/xmloff/txtprmap.hxx
	svx/Package_inc.mk
	svx/inc/svx/hdft.hxx
	svx/source/dialog/hdft.cxx
	svx/source/dialog/pagectrl.cxx
	svx/source/tbxctrls/tbxcolorupdate.cxx
	svx/source/unodraw/unobrushitemhelper.cxx
	sw/Library_sw.mk
	sw/inc/fillattributes.hxx
	sw/inc/format.hxx
	sw/inc/frmatr.hxx
	sw/inc/frmfmt.hxx
	sw/inc/hintids.hxx
	sw/inc/hints.hxx
	sw/inc/ndtxt.hxx
	sw/inc/node.hxx
	sw/inc/swunohelper.hxx
	sw/inc/unobrushitemhelper.hxx
	sw/inc/unoprnms.hxx
	sw/source/core/attr/format.cxx
	sw/source/core/attr/hints.cxx
	sw/source/core/doc/docdesc.cxx
	sw/source/core/doc/docdraw.cxx
	sw/source/core/doc/docfmt.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/doc/docredln.cxx
	sw/source/core/doc/poolfmt.cxx
	sw/source/core/doc/visiturl.cxx
	sw/source/core/docnode/node.cxx
	sw/source/core/inc/frame.hxx
	sw/source/core/inc/frmtool.hxx
	sw/source/core/inc/rolbck.hxx
	sw/source/core/layout/atrfrm.cxx
	sw/source/core/layout/fillattributes.cxx
	sw/source/core/layout/findfrm.cxx
	sw/source/core/layout/paintfrm.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/txtnode/txtedt.cxx
	sw/source/core/undo/rolbck.cxx
	sw/source/core/unocore/swunohelper.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unomap.cxx
	sw/source/core/unocore/unoparagraph.cxx
	sw/source/core/unocore/unoprnms.cxx
	sw/source/core/unocore/unostyle.cxx
	sw/source/ui/chrdlg/paradlg.src
	sw/source/ui/chrdlg/pardlg.cxx
	sw/source/ui/fmtui/tmpdlg.cxx
	sw/source/ui/fmtui/tmpdlg.src
	sw/source/uibase/app/docst.cxx
	sw/source/uibase/app/docstyle.cxx
	sw/source/uibase/frmdlg/colex.cxx
	sw/source/uibase/shells/basesh.cxx
	sw/source/uibase/shells/textsh1.cxx
	sw/source/uibase/uiview/viewstat.cxx
	sw/source/uibase/utlui/uitool.cxx
	xmloff/inc/PageMasterImportContext.hxx
	xmloff/inc/xmloff/XMLShapeStyleContext.hxx
	xmloff/source/draw/XMLShapeStyleContext.cxx
	xmloff/source/draw/sdpropls.hxx
	xmloff/source/style/PageMasterExportPropMapper.cxx
	xmloff/source/style/PageMasterImportContext.cxx
	xmloff/source/style/PageMasterPropHdlFactory.cxx
	xmloff/source/style/PageMasterStyleMap.cxx
	xmloff/source/style/prstylei.cxx
	xmloff/source/text/txtexppr.cxx
	xmloff/source/text/txtprhdl.cxx
	xmloff/source/text/txtprmap.cxx
	xmloff/source/text/txtstyli.cxx

Conflicts:
	svx/source/dialog/hdft.cxx
	sw/source/core/doc/visiturl.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/txtnode/txtatr2.cxx
	sw/source/core/unocore/unostyle.cxx

Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a
2014-07-01 13:30:09 +02:00
b733d208b0 Related: #i78498# Do not keep OutlineLevel attribute at paragraph...
when a Paragraph Style is assigned.

(cherry picked from commit 6a1564284d90c7e175f7848520924f7f6a5884b7)
(cherry picked from commit 4a381b1124f60b76cabb558fa24827448a1caab0)

Conflicts:
	sw/inc/doc.hxx
	sw/inc/editsh.hxx
	sw/inc/fmtcol.hxx
	sw/inc/ndtxt.hxx
	sw/source/core/attr/format.cxx
	sw/source/core/doc/docfmt.cxx
	sw/source/core/doc/docglbl.cxx
	sw/source/core/doc/doctxm.cxx
	sw/source/core/doc/fmtcol.cxx
	sw/source/core/edit/edfcol.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/undo/unfmco.cxx
	sw/source/core/unocore/unosett.cxx
	sw/source/core/unocore/unostyle.cxx

Change-Id: Ifa1214876df296f2e1210cc4a35f2df67f9f6bc4
2014-06-27 17:22:09 +01:00
db960181fe Resolves: #i125154# numbering too small on sample .doc import
(cherry picked from commit fba2d04a09a2e040f36991f42062a1c5110fea13)

Conflicts:
	sw/source/core/txtnode/thints.cxx

Change-Id: Idd086e20161fd5f3fd4c23f009c1a0f2061af07e
2014-06-25 11:13:43 +01:00
5b67c4a84a remove empty DumpHints() [loplugin:unreffun]
Change-Id: Ic61ef6dc6e6882cebe98a290ec599cde52471431
2014-06-25 10:10:59 +02:00
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
b846847121 fdo#71558: Notify mispelled word to accessibility
This patch modifies the spell checking code to trigger an invalidation
of the accessible paragraph attributes when a mistake is detected, so
the 'text-attributes-changed' event is released.

Notice that 'text-spelling' is not an actual attribute of the text for
LibreOffice, that's why this didn't work in first place.

Finally, notice too that when the user disables the automatic spell
checking, no 'text-attributes-changed' event is released, and when it
is enabled again it will only release 'text-attributes-changed' events
in case some of the newly typed text is misspelled.

Change-Id: Ie792f040d84010cadcd41486d948a5e29421228f
2014-06-19 18:45:22 +02:00
ba9e5da2e7 coverity#736901 Unintended sign extension
Change-Id: I655578db78ee8db6f4aa83aec944c074eab92ff3
2014-06-18 11:12:09 +01:00
41d43bc95b Resolves: #i125086# correct implementation of css::text::XTextField...
in Writer to reflect changes made for the in-place editing of Input Fields

(cherry picked from commit 90b633455a6e54300330e68e71e22e729b445f31)

Conflicts:
	sw/source/core/txtnode/atrfld.cxx
	sw/source/core/unocore/unofield.cxx

Change-Id: I39de2b5074c2e7d8671ad2c0a3c01a29ccfc7882
2014-06-17 10:57:55 +01:00