Commit Graph

14 Commits

Author SHA1 Message Date
Jan-Marek Glogowski
9099e21b89 Fix single node CopyRange
Previously there was a restriction for the range to contain at
least two nodes.

Change-Id: Iadf21d3928303c2ab8df0d93dabd969ed1ff7e09
Reviewed-on: https://gerrit.libreoffice.org/10972
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-09-10 19:54:58 +00:00
Noel Grandin
d92602c5b1 more fixes for SfxItemState
In commit 88a874fc "convert SfxItemState constants to a proper enum"
I made some mistakes in converting bitwise logic to boolean logic.

I fixed one of those places in commit 7ad83656 "fix bitwise->logic
conversion in SfxItemState commit"

This commit fixes the other places where I converted bitwise to normal
boolean logic. I also validated that none of the existing code tries to
uses combinations of these enum values.

This commit also introduces an exception-throwing check in the one place
where the enum is explicitly cast to make sure that no combinations
sneak in.

Change-Id: I545f7d17b76c4fd999078867caec314e83ffe165
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-10 17:54:35 +02:00
Jan-Marek Glogowski
c808802e94 MM: introduce SwDoc::Append helper function
This drops all the specialized, workaround code from MM, introduced
to use the SwFEShell::Paste function and additionally merges
and renames SwDoc::Paste into SwDoc::Append.

There is still a little common codepath, therefore this adds
comments to always update both functions.

Change-Id: I704b3ef3257dd977dac95e16e25049ff8ade97ed
Reviewed-on: https://gerrit.libreoffice.org/10967
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-09-10 11:06:01 +00:00
Matteo Casalin
da44e4cce8 Use size_t consistently, constify, reduce scope
Change-Id: Ie5de70645becc5ac584f1b3ffe6048969d2a19a9
2014-09-06 12:08:13 +02:00
Jan-Marek Glogowski
2f5e266e97 Refactor NumRule handling in CopyImpl
The bug fix for i#86492 added a lot of duplicated code. This moves
the code into their own functions and uses macros to make the
resulting code even more readable.

Change-Id: Ifa0ece26f3152f1f8d8c65173b459e8c14c5b43a
Reviewed-on: https://gerrit.libreoffice.org/10968
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-26 07:43:36 -05:00
Valentin Kettner
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
Valentin Kettner
5494954b26 Refactored IDocumentLayoutAccess out of SwDoc.
Into the new class DocumentLayoutManager.

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

Change-Id: I91c9097b091ff6118d58fd15fff2a4cefe0171fd
2014-08-12 23:26:38 +02:00
Valentin Kettner
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
Bjoern Michaelsen
9cb5358d2f kill SAVEFLY_SPLIT too
Change-Id: Iaeecdb35c0eaebea8e879f36a21237c98a2c7ed0
2014-07-25 09:47:55 +02:00
Noel Grandin
88a874fcb3 convert SfxItemState constants to a proper enum
and while we're at it
- use the enum type all over the place instead of passing around
sal_uInt16
- don't use bitwise logic on enum values
- use enum values instead of numeric constants

Change-Id: I7f24cb4d242e1c00703e7bbcf1a00c18ef1e9fd4
2014-07-23 13:26:19 +02:00
Matteo Casalin
1a6bc665eb SwpHintsArray/SwpHints to size_t: fixes after failed local merge
Change-Id: I6617770fbca7316396639b6d5778bbdcbb208337
2014-07-22 23:50:43 +02:00
Valentin Kettner
6bd087bf86 Added #include <docedt.hxx> to DocumentContentOperationsManager.
For use of sw_JoinText and sw_GetJoinFlags.

Change-Id: I6bda9a41fcb42663517b505098f74ec596ac6551
2014-07-16 00:54:36 +02:00
Valentin Kettner
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