Commit Graph

1484 Commits

Author SHA1 Message Date
2ffaaf6b59 Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happy
Change-Id: I343335b56fcbac570c0000e1216dc4d16b9a05b9
2014-08-28 17:24:24 +02:00
75028bd82a fdo#75757: remove inheritance to std::vector
Change-Id: I1874b5b4a059ef5fc8818b3b49ff10f2917b20ca
Reviewed-on: https://gerrit.libreoffice.org/11135
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-08-27 05:29:42 -05:00
39380c04a5 Avoid unnecessary dereferencing of potential null pointers
That pDoc can be null here and in previous
2406562733f62b96dd8e6537e1bf4bef147ef50c is somewhat fishy, but probably related
to "NOTE: the sw.SwXAutoTextEntry unoapi test depends on pDoc = 0" from
"fdo#72695: avoid double-free race condition for SwXTextField."  As mstahl puts
it: "hmm... theres some stupid unoapi test that inserts a field into an
SwXAutoTextEntry which is a horribly odd class that doesn't have any way of
creating SwXanything of its own SwDoc... so probably your commit is required
after all."

Change-Id: I2da77e1180e205eca274ce0330ee2a4d5aab29ac
2014-08-25 15:26:59 +02:00
2406562733 Avoid unnecessary dereferencing of potential null pointers
Change-Id: Iba21dd394010a162a52bb576400cbbb9a9aad537
2014-08-25 14:30:12 +02:00
30ae83c268 fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.

Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-23 22:33:30 +03:00
4970d562b6 Prevent downcast to SwTxtFrm when already in ~SwFrm superclass dtor
...as done in SwAnchoredObject::FindAnchorCharFrm
(sw/source/core/layout/anchoredobject.cxx) during CppunitTest_sw_ooxmlexport5:

SwAnchoredObject::FindAnchorCharFrm
SwAnchoredObject::GetAnchorFrmContainingAnchPos
SwAnchoredObject::FindPageFrmOfAnchor
lcl_NotifyBackgroundOfObj
SwDrawContact::DisconnectFromLayout
SwDrawContact::DisconnectObjFromLayout
SwFrm::Destroy
SwFrm::~SwFrm
SwCntntFrm::~SwCntntFrm
SwTxtFrm::~SwTxtFrm
SwTxtFrm::~SwTxtFrm
SwLayoutFrm::Destroy
SwLayoutFrm::~SwLayoutFrm
SwCellFrm::~SwCellFrm
SwCellFrm::~SwCellFrm
SwLayoutFrm::Destroy
SwLayoutFrm::~SwLayoutFrm
SwRowFrm::~SwRowFrm
SwRowFrm::~SwRowFrm
SwLayoutFrm::Destroy
SwLayoutFrm::~SwLayoutFrm
SwTabFrm::~SwTabFrm
SwTabFrm::~SwTabFrm
SwFlyFrm::DeleteCnt
SwFlyFrm::~SwFlyFrm
SwFlyFreeFrm::~SwFlyFreeFrm
SwFlyAtCntFrm::~SwFlyAtCntFrm
SwFlyAtCntFrm::~SwFlyAtCntFrm
SwLayoutFrm::Destroy
SwLayoutFrm::~SwLayoutFrm
SwBodyFrm::~SwBodyFrm
SwBodyFrm::~SwBodyFrm
SwLayoutFrm::Destroy
SwLayoutFrm::~SwLayoutFrm
SwFtnBossFrm::~SwFtnBossFrm
SwPageFrm::~SwPageFrm
SwPageFrm::~SwPageFrm
SwLayoutFrm::Destroy
SwRootFrm::~SwRootFrm
SwRootFrm::~SwRootFrm
boost::checked_delete<SwRootFrm>
boost::detail::sp_counted_impl_p<SwRootFrm>::dispose
boost::detail::sp_counted_base::release
boost::detail::shared_count::~shared_count
boost::shared_ptr<SwRootFrm>::~shared_ptr
SwViewShell::~SwViewShell
SwCrsrShell::~SwCrsrShell
SwEditShell::~SwEditShell
SwFEShell::~SwFEShell
SwWrtShell::~SwWrtShell
SwWrtShell::~SwWrtShell
SwView::~SwView
SwView::~SwView
SfxViewFrame::ReleaseObjectShell_Impl
SfxViewFrame::~SfxViewFrame
SfxViewFrame::~SfxViewFrame
SfxViewFrame::Close
SfxFrame::DoClose_Impl
SfxBaseController::dispose
(anonymous namespace)::Frame::setComponent
(anonymous namespace)::Frame::close
SfxFrame::DoClose
SfxViewFrame::Notify
SfxBroadcaster::Broadcast
SfxModelListener_Impl::notifyClosing
SfxBaseModel::close
SwXTextDocument::close
SfxBaseModel::dispose
SwXTextDocument::dispose
SwModelTestBase::tearDown
...

Change-Id: I4c00fa8eebf0346a2bad81a9e362cd901555bbf0
2014-08-22 17:37:15 +02:00
bd6f0559af fdo#72695: avoid double-free race condition for SwXFootnote
Change-Id: Id7832d8e65723ae30ad2b5ce95d145def53998f0
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
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
c5390b3ee9 SwXDocumentIndexMark::CreateXDocumentIndexMark does not need SwTOXType
... passed in as parameter since it's always the one from pMark.

Change-Id: Ia5981b0f281c8cac70cbb305c82bb6785918168a
2014-08-20 16:40:15 +02:00
7fa2a36333 fdo#72695: avoid double-free race condition for SwXDocumentIndex
Change-Id: I9264ea023ee12b24561e86d893b1f7abb2765621
2014-08-20 16:40:13 +02:00
939edde802 fdo#72695: avoid double-free race condition for SwXDocumentIndexMark
Change-Id: I08fef7f1de4cce468a4936e33d3684f847e1aa5b
2014-08-20 16:40:13 +02:00
c71c1b2bb3 fdo#72695: avoid double-free race condition for SwXFieldMaster
Change-Id: Id3dfe1c68f00964200ad53922a0f41ebdbc4c3f8
2014-08-20 16:40:12 +02:00
8deeb0d538 fdo#72695: avoid double-free race condition for SwXTextField
Change-Id: I6adfcb1bdd5e8e1525568a4bcd93a8e0e97359be
2014-08-20 16:40:12 +02:00
0a1256a9d7 fdo#72695: avoid double-free race condition for SwXBookmark/SwXFieldmark
Change-Id: I92838d75f5573e4b626b94ef446f464be1b39b67
2014-08-20 16:40:11 +02:00
398616151f fdo#72695: avoid double-free race condition for SwXMeta/SwXMetaField
Change-Id: Ic5754dc479d7d55ce4e0f2713c5545db75a300c2
2014-08-20 16:40:11 +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
bd660b3d31 oups
wrongly deleted in
0842a2707cfca15c0af5eee6ed9d76547a01a7f9

Change-Id: Iafccce9a503c48e483d492a2d4bdee9a648f32c7
2014-08-17 05:23:12 +02:00
b839be53a7 warning C4800: 'int' : forcing value to bool 'true' or 'false'
Change-Id: I810e2b963f02c67d10765444cae2b5ec846af746
2014-08-17 05:15:23 +02:00
0842a2707c use bool directly
Change-Id: I314e290b453c55e345559d8abef9b00622493ed3
2014-08-17 05:15:19 +02:00
1f4d9846ae Refactored IDocumentExternalData out of SwDoc.
Into the new class DocumentExternalDataManager.

Change-Id: Ib863daec170044c46143b47a91739d4c0940d963
2014-08-12 23:26:39 +02: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
9cc617afcd Refactored IDocumentStatistics our of SwDoc.
Into the new class DocumentStatisticsManager.

Change-Id: I281232dc09dbd79c2faf3c2a78ae49625bbe88ee
2014-08-12 23:26:37 +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
9cb5358d2f kill SAVEFLY_SPLIT too
Change-Id: Iaeecdb35c0eaebea8e879f36a21237c98a2c7ed0
2014-07-25 09:47:55 +02:00
823447222c SAVEFLY is a noop, just use a bool
Change-Id: I32255ca073d52616d3e5c9e80f32471e0a7df3fa
2014-07-25 09:47:55 +02:00
183bde5bf5 Related: fdo#81641 implement undo of Conditional Text style creation
and deletion

Change-Id: I694ae8f917c74305cd30037c3c3833a980354948
2014-07-24 12:46:55 +01:00
5f0967a634 Do not include txttypes.hxx unnecessarily
Change-Id: I557019995975b24062fd346a7cc0cae872cab308
2014-07-22 23:50:44 +02:00
2a6b9c93af Massive KSHORT/MSHORT to sal_uInt16
Change-Id: I82a899ef0cad19d62c41753ffdce07d8e33d6c9d
2014-07-22 23:50:43 +02: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
8416a65af1 fix spelling structur -> structure
Change-Id: I7aa4a9bf72732db95a67cee368f3a83a0d71bb9c
2014-07-17 14:49:41 +02:00
6a873638fa Renamed brdcst.[hc]xx to SfxBroadcaster.[hc]xx
- Remove includes from files where they are not needed.
- Update pch files

Change-Id: I0188e3934ef429008c1ef495ab1d5b27f38664d5
Reviewed-on: https://gerrit.libreoffice.org/10342
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-07-17 08:47:58 +00:00
9b2110de48 Fixed another build failure caused by 2 refactorings.
Change-Id: I71f678e60586706ba427485055c26059bb68caa6
2014-07-15 21:59:40 +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
6b00bfeefd overriding destructor not explicitly marked 'virtual' [loplugin:saloverride]
Change-Id: I5d2ee4952443b70ffacfb916423dbb600109c813
2014-07-15 21:06:48 +02:00
7321a65971 -Werror,-Wheader-guard
Change-Id: I6b13c77975d8aeef63b424e418a4a4a98ced159f
2014-07-15 19:55:37 +02:00
8930030323 Resolves: #i125171# support lossless embedding of linked jpegs...
in writer for PDF export

(cherry picked from commit 131669af7168020750b726e4e6d1568975f73886)

Conflicts:
	sw/source/core/doc/notxtfrm.cxx

Add missing includes to fix build break

(cherry picked from commit 662b23eb1f1b7c178a7a5507864c647a390fae34)

Conflicts:
	sw/source/core/doc/notxtfrm.cxx

1e2c208ac91c8e666e4f3f6f89cd917736cdc44d

Change-Id: Ie560fa05964b79240fbd97825be74b0543c97aba
2014-07-15 16:15:18 +01: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
3fed83524d Refactored IDocumentOutlineNodes out of SwDoc.
Into the new class DocumentOutlineNodesManager.

Change-Id: I05581391a1474872113ae91d6429709d181cabfe
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
c8a8695d4d Refactored IDocumentListItems out of SwDoc.
Into the new class DocumentListItemsManager.

Change-Id: Ic86200280caa1b6e2c940bb12149235223ed0cd2
2014-07-15 15:44:03 +02:00
54ca3a6efa Refactored IDocumentLinksAdministration out of SwDoc.
To the new class DocumentLinksAdministrationManager.
Additional to the Interface methods SwDoc::SelectServerObj was also moved
and sw/source/core/doc/docdde.cxx was deleted as it became empty.
Also fixed OUString usage in IDocumentLinksAdministration.hxx .

Change-Id: I1f2bf0881a7d4add9c657b6441851ae14ad8d161
2014-07-15 15:44:03 +02:00
a27e8f6c8d Refactored IDocumentTimerAccess in SwDoc into DocumentTimerManager.
Change-Id: Idb39ef2cdc34e0c0e7853de0a656f579ca3528da
2014-07-15 15:44:02 +02:00