summaryrefslogtreecommitdiff
path: root/sw/inc/doc.hxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-09 09:49:44 +0100
committerMathias Bauer <mba@openoffice.org>2011-02-09 09:49:44 +0100
commit53b8f0865ff2e59cb71eaf4c1bdbc829238fde6f (patch)
tree31528d76013d09428fad98a3dbc6265345dbbeb9 /sw/inc/doc.hxx
parente22a1e2f5c5ed74c22849c9b5bb59dd8f47bffbc (diff)
parent9730661364792059168a06bfbaacf47fc8daf53c (diff)
CWS swlayoutrefactoring: resync to m100
Diffstat (limited to 'sw/inc/doc.hxx')
-rw-r--r--sw/inc/doc.hxx305
1 files changed, 128 insertions, 177 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 257566fab4f6..a72f4f46ec32 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DOC_HXX
-#define _DOC_HXX
+#ifndef SW_DOC_HXX
+#define SW_DOC_HXX
/** SwDoc interfaces */
@@ -34,7 +34,6 @@
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
-#include <IDocumentUndoRedo.hxx>
#include <IDocumentLinksAdministration.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentContentOperations.hxx>
@@ -63,7 +62,6 @@ class SwList;
#include <vcl/timer.hxx>
#include "swdllapi.h"
#include <swtypes.hxx>
-#include <ndarr.hxx>
#include <swatrset.hxx>
#include <toxe.hxx> // enums
#include <flyenum.hxx>
@@ -74,6 +72,7 @@ class SwList;
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <vos/ref.hxx>
#include <svx/svdtypes.hxx>
+#include <sfx2/objsh.hxx>
#include <svl/style.hxx>
#include <editeng/numitem.hxx>
#include "comphelper/implementationreference.hxx"
@@ -94,8 +93,6 @@ class SwList;
#include <boost/scoped_ptr.hpp>
-class SfxObjectShell;
-class SfxObjectShellRef;
class SvxForbiddenCharactersTable;
class SwExtTextInput;
class DateTime;
@@ -155,6 +152,7 @@ class SwNewDBMgr;
class SwNoTxtNode;
class SwNodeIndex;
class SwNodeRange;
+class SwNodes;
class SwNumRule;
class SwNumRuleTbl;
class SwPageDesc;
@@ -188,10 +186,6 @@ class SwTextBlocks;
class SwTxtFmtColl;
class SwTxtFmtColls;
class SwURLStateChanged;
-class SwUndo;
-class SwUndoIds;
-class SwUndoIter;
-class SwUndos;
class SwUnoCrsr;
class SwUnoCrsrTbl;
class ViewShell;
@@ -221,12 +215,15 @@ class SwPrintData;
class SwRenderData;
class SwPageFrm;
class SwViewOption;
+class IDocumentUndoRedo;
namespace sw { namespace mark {
class MarkManager;
}}
namespace sw {
class MetaFieldManager;
+ class UndoManager;
+ class IShellCursorSupplier;
}
namespace com { namespace sun { namespace star {
@@ -262,7 +259,6 @@ class SW_DLLPUBLIC SwDoc :
public IDocumentSettingAccess,
public IDocumentDeviceAccess,
public IDocumentRedlineAccess,
- public IDocumentUndoRedo,
public IDocumentLinksAdministration,
public IDocumentFieldsAccess,
public IDocumentContentOperations,
@@ -290,9 +286,7 @@ class SW_DLLPUBLIC SwDoc :
//---------------- private Member --------------------------------
// -------------------------------------------------------------------
- // die Objecte
- SwNodes aNodes; // Inhalt des Dokumentes
- SwNodes aUndoNodes; // Inhalt fuer das Undo
+ ::boost::scoped_ptr<SwNodes> m_pNodes; /// document content (Nodes Array)
SwAttrPool* mpAttrPool; // der Attribut Pool
SwPageDescs aPageDescs; // PageDescriptoren
Link aOle2Link; // OLE 2.0-Benachrichtigung
@@ -311,6 +305,7 @@ class SW_DLLPUBLIC SwDoc :
const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager;
const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
+ const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager;
// -------------------------------------------------------------------
// die Pointer
@@ -336,8 +331,6 @@ class SW_DLLPUBLIC SwDoc :
ViewShell *pCurrentView; // SwDoc should get a new member pCurrentView//swmod 071225
SdrModel *pDrawModel; // StarView Drawing
- SwUndos *pUndos; // Undo/Redo History
-
SwDocUpdtFld *pUpdtFlds; // Struktur zum Field-Update
SwFldTypes *pFldTypes; // Feldtypen
SwNewDBMgr *pNewDBMgr; // Pointer auf den neuen DBMgr fuer
@@ -358,9 +351,8 @@ class SW_DLLPUBLIC SwDoc :
SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros
SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc
- SfxObjectShellRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine
- // DocShell gesetzt ist, muss dieser
- // Ref-Pointer gesetzt sein!!!!)
+ SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes
+
sfx2::LinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE)
SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von
@@ -428,11 +420,6 @@ private:
// -------------------------------------------------------------------
// sonstige
- sal_uInt16 nUndoPos; // akt. Undo-InsertPosition (fuers Redo!)
- sal_uInt16 nUndoSavePos; // Position im Undo-Array, ab der das Doc
- // nicht als modifiziert gilt
- sal_uInt16 nUndoCnt; // Anzahl von Undo Aktionen
- sal_uInt16 nUndoSttEnd; // != 0 -> innerhalb einer Klammerung
sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo fuers UI-seitige zusammenfassen
// von AutoFmt-Redlines. Wird vom SwAutoFmt
@@ -458,21 +445,18 @@ private:
SdrLayerID nInvisibleHell;
SdrLayerID nInvisibleControls;
- bool mbGlossDoc : 1; //TRUE: ist ein Textbaustein Dokument
- bool mbModified : 1; //TRUE: Dokument ist veraendert
- bool mbDtor : 1; //TRUE: ist im SwDoc DTOR
+ bool mbGlossDoc : 1; //sal_True: ist ein Textbaustein Dokument
+ bool mbModified : 1; //sal_True: Dokument ist veraendert
+ bool mbDtor : 1; //sal_True: ist im SwDoc DTOR
// leider auch temporaer von
// SwSwgReader::InLayout(), wenn fehlerhafte
// Frames geloescht werden muessen
- bool mbUndo : 1; // TRUE: Undo eingeschaltet
- bool mbGroupUndo : 1; // TRUE: Undos werden gruppiert
bool mbPageNums : 1; // TRUE: es gibt virtuelle Seitennummern
bool mbLoaded : 1; // TRUE: ein geladenes Doc
bool mbUpdateExpFld : 1; // TRUE: Expression-Felder updaten
bool mbNewDoc : 1; // TRUE: neues Doc
bool mbNewFldLst : 1; // TRUE: Felder-Liste neu aufbauen
bool mbCopyIsMove : 1; // TRUE: Copy ist ein verstecktes Move
- bool mbNoDrawUndoObj : 1; // TRUE: keine DrawUndoObjecte speichern
bool mbVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt
bool mbInReading : 1; // TRUE: Dokument wird gerade gelesen
bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary
@@ -491,9 +475,9 @@ private:
bool mbIsRedlineMove : 1; // True: die Redlines werden in/aus der Section verschoben
bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc
bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage
- bool mbPurgeOLE : 1; // TRUE: Purge OLE-Objects
- bool mbKernAsianPunctuation : 1; // TRUE: kerning also for ASIAN punctuation
- bool mbReadlineChecked : 1; // TRUE: if the query was already shown
+ bool mbPurgeOLE : 1; // sal_True: Purge OLE-Objects
+ bool mbKernAsianPunctuation : 1; // sal_True: kerning also for ASIAN punctuation
+ bool mbReadlineChecked : 1; // sal_True: if the query was already shown
bool mbLinksUpdated : 1; // OD 2005-02-11 #i38810#
// flag indicating, that the links have been updated.
bool mbClipBoard : 1; // true: this document represents the clipboard
@@ -501,7 +485,7 @@ private:
// (clipboard docs only)
#ifdef DBG_UTIL
- bool mbXMLExport : 1; // TRUE: during XML export
+ bool mbXMLExport : 1; // sal_True: during XML export
#endif
// --> OD 2006-03-21 #b6375613#
@@ -520,59 +504,59 @@ private:
// HISTORY OF THE COMPATIBILITY FLAGS:
//
// SO5:
- // mbParaSpaceMax def = FALSE, TRUE since SO8
- // mbParaSpaceMaxAtPages def = FALSE, TRUE since SO8
+ // mbParaSpaceMax def = sal_False, sal_True since SO8
+ // mbParaSpaceMaxAtPages def = sal_False, sal_True since SO8
//
// SO6:
- // mbTabCompat def = FALSE, TRUE since SO8
+ // mbTabCompat def = sal_False, sal_True since SO8
//
// SO7:
- // mbUseVirtualDevice def = TRUE
- // mbAddFlyOffsets def = FALSE, hidden
+ // mbUseVirtualDevice def = sal_True
+ // mbAddFlyOffsets def = sal_False, hidden
//
// SO7pp1:
- // bOldNumbering def = FALSE, hidden
+ // bOldNumbering def = sal_False, hidden
//
// SO8:
- // mbAddExternalLeading def = TRUE
- // mbUseHiResolutionVirtualDevice def = TRUE, hidden
- // mbOldLineSpacing def = FALSE
- // mbAddParaSpacingToTableCells def = TRUE
- // mbUseFormerObjectPos def = FALSE
- // mbUseFormerTextWrapping def = FALSE
- // mbConsiderWrapOnObjPos def = FALSE
+ // mbAddExternalLeading def = sal_True
+ // mbUseHiResolutionVirtualDevice def = sal_True, hidden
+ // mbOldLineSpacing def = sal_False
+ // mbAddParaSpacingToTableCells def = sal_True
+ // mbUseFormerObjectPos def = sal_False
+ // mbUseFormerTextWrapping def = sal_False
+ // mbConsiderWrapOnObjPos def = sal_False
//
// SO8pp1:
- // mbIgnoreFirstLineIndentInNumbering def = FALSE, hidden
- // mbDoNotJustifyLinesWithManualBreak def = FALSE, hidden
- // mbDoNotResetParaAttrsForNumFont def = FALSE, hidden
+ // mbIgnoreFirstLineIndentInNumbering def = sal_False, hidden
+ // mbDoNotJustifyLinesWithManualBreak def = sal_False, hidden
+ // mbDoNotResetParaAttrsForNumFont def = sal_False, hidden
//
// SO8pp3
- // mbDoNotCaptureDrawObjsOnPage def = FALSE, hidden
+ // mbDoNotCaptureDrawObjsOnPage def = sal_False, hidden
// - Relevant for drawing objects, which don't follow the text flow, but
// whose position is outside the page area:
- // FALSE: Such drawing objects are captured on the page area of its anchor.
- // TRUE: Such drawing objects can leave the page area, they aren't captured.
- // mbTableRowKeep def = FALSE, hidden
- // mbIgnoreTabsAndBlanksForLineCalculation def = FALSE, hidden
- // mbClipAsCharacterAnchoredWriterFlyFrame def = FALSE, hidden
+ // sal_False: Such drawing objects are captured on the page area of its anchor.
+ // sal_True: Such drawing objects can leave the page area, they aren't captured.
+ // mbTableRowKeep def = sal_False, hidden
+ // mbIgnoreTabsAndBlanksForLineCalculation def = sal_False, hidden
+ // mbClipAsCharacterAnchoredWriterFlyFrame def = sal_False, hidden
// - Introduced in order to re-activate clipping of as-character anchored
// Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents,
// which are created with version prior SO8/OOo 2.0
//
// SO8pp4
- // mbUnixForceZeroExtLeading def = FALSE, hidden
+ // mbUnixForceZeroExtLeading def = sal_False, hidden
//
// SO8pu8
- // mbOldPrinterMetrics def = FALSE, hidden
+ // mbOldPrinterMetrics def = sal_False, hidden
//
// SO9
// #i24363# tab stops relative to indent
- // mbTabRelativeToIndent def = TRUE, hidden
+ // mbTabRelativeToIndent def = sal_True, hidden
// #i89181# suppress tab stop at left indent for paragraphs in lists, whose
// list level position and space mode equals LABEL_ALIGNMENT and whose list
// label is followed by a tab character.
- // mbTabAtLeftIndentForParagraphsInList def = FALSE, hidden
+ // mbTabAtLeftIndentForParagraphsInList def = sal_False, hidden
bool mbParaSpaceMax : 1;
bool mbParaSpaceMaxAtPages : 1;
@@ -586,7 +570,7 @@ private:
bool mbUseFormerObjectPos : 1; // OD 2004-03-12 #i11860#
bool mbUseFormerTextWrapping : 1; // FME 2005-05-11 #108724#
bool mbConsiderWrapOnObjPos : 1; // OD 2004-05-05 #i28701#
- // TRUE: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
+ // sal_True: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972#
// non-ui-compatibility flags:
@@ -617,13 +601,10 @@ private:
sal_Bool mbStartIdleTimer ; // idle timer mode start/stop
static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete
- static sal_uInt16 nUndoActions; // anzahl von Undo ::com::sun::star::chaos::Action
//---------------- private Methoden ------------------------------
void checkRedlining(RedlineMode_t& _rReadlineMode);
- sal_Bool DelUndoObj( sal_uInt16 nEnde ); // loescht alle UndoObjecte vom Anfang
- // bis zum angegebenen Ende
DECL_LINK( AddDrawUndo, SdrUndoAction * );
// DrawModel
void DrawNotifyUndoHdl(); // wegen CLOOKs
@@ -651,7 +632,7 @@ private:
sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
// --> OD 2005-01-13 #i40550#
- typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, BOOL, BOOL );
+ typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, sal_Bool, sal_Bool );
// <--
SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
@@ -705,8 +686,8 @@ private:
// Charts der angegebenen Tabelle updaten
void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
- BOOL _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
- USHORT nMode );
+ sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
+ sal_uInt16 nMode );
// unser eigener 'IdlTimer' ruft folgende Methode
DECL_LINK( DoIdleJobs, Timer * );
@@ -714,9 +695,9 @@ private:
DECL_LINK( DoUpdateAllCharts, Timer * );
DECL_LINK( DoUpdateModifiedOLE, Timer * );
- SwFmt *_MakeCharFmt(const String &, SwFmt *, BOOL, BOOL );
- SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL );
- SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeCharFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool );
void InitTOXTypes();
void Paste( const SwDoc& );
@@ -738,8 +719,8 @@ public:
/* @@@MAINTAINABILITY-HORROR@@@
Implementation details made public.
*/
- SwNodes& GetNodes() { return aNodes; }
- const SwNodes& GetNodes() const { return aNodes; }
+ SwNodes & GetNodes() { return *m_pNodes; }
+ SwNodes const& GetNodes() const { return *m_pNodes; }
/** IInterface
*/
@@ -751,8 +732,8 @@ public:
*/
virtual bool get(/*[in]*/ DocumentSettingId id) const;
virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
- virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const;
- virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
+ virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const;
+ virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
@@ -772,7 +753,7 @@ public:
virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes );
virtual const JobSetup* getJobsetup() const;
virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup );
- virtual SwPrintData* getPrintData() const;
+ virtual const SwPrintData & getPrintData() const;
virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData);
/** IDocumentMarkAccess
@@ -813,37 +794,8 @@ public:
/** IDocumentUndoRedo
*/
- virtual void SetUndoNoResetModified();
- virtual bool IsUndoNoResetModified() const;
- virtual void DoUndo(bool bUn);
- virtual bool DoesUndo() const;
- virtual void DoGroupUndo(bool bUn);
- virtual bool DoesGroupUndo() const;
- virtual bool Undo(SwUndoIter& );
- virtual SwUndoId StartUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
- virtual SwUndoId EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
- virtual void DelAllUndoObj();
- virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const;
- virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const;
- virtual bool HasUndoId(SwUndoId eId) const;
- virtual const SwNodes* GetUndoNds() const;
- virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId);
- virtual bool HasTooManyUndos() const;
- virtual bool Redo(SwUndoIter&);
- virtual SwUndoId GetRedoIds(String* pStr, SwUndoIds *pRedoIds) const;
- virtual String GetRedoIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
- virtual bool Repeat(SwUndoIter&, sal_uInt16 nRepeatCnt);
- virtual SwUndoId GetRepeatIds(String* pStr, SwUndoIds *pRedoIds) const;
- virtual String GetRepeatIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
- virtual void AppendUndo(SwUndo*);
- virtual void ClearRedo();
- virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition );
- virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const;
-
-
- /** abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions */
- static sal_uInt16 GetUndoActionCount();
- static void SetUndoActionCount(sal_uInt16 nNew);
+ IDocumentUndoRedo & GetIDocumentUndoRedo();
+ IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
/** IDocumentLinksAdministration
*/
@@ -851,7 +803,7 @@ public:
virtual void SetVisibleLinks(bool bFlag);
virtual sfx2::LinkManager& GetLinkManager();
virtual const sfx2::LinkManager& GetLinkManager() const;
- virtual void UpdateLinks(BOOL bUI);
+ virtual void UpdateLinks(sal_Bool bUI);
virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const;
virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue);
virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem);
@@ -868,7 +820,7 @@ public:
virtual void RemoveFldType(sal_uInt16 nFld);
virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB);
virtual void InsDeletedFldType(SwFieldType &);
- virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich);
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich);
virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds);
virtual void UpdateRefFlds(SfxPoolItem* pHt);
virtual void UpdateTblFlds(SfxPoolItem* pHt);
@@ -879,9 +831,9 @@ public:
virtual void UnlockExpFlds();
virtual bool IsExpFldsLocked() const;
virtual SwDocUpdtFld& GetUpdtFlds() const;
- virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen);
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen);
virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
- virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt);
+ virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt);
virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld);
virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld);
virtual bool IsNewFldLst() const;
@@ -1104,18 +1056,18 @@ public:
// im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist
/* #109161# new parameter bCalledFromShell
- TRUE: An existing adjust item at pAnchorPos is propagated to
+ sal_True: An existing adjust item at pAnchorPos is propagated to
the content node of the new fly section. That propagation only
takes place if there is no adjust item in the paragraph style
for the new fly section.
- FALSE: no propagation
+ sal_False: no propagation
*/
SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
const SwPosition* pAnchorPos,
const SfxItemSet* pSet = 0,
SwFrmFmt *pParent = 0,
- BOOL bCalledFromShell = FALSE );
+ sal_Bool bCalledFromShell = sal_False );
SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
const SwSelBoxes* pSelBoxes = 0,
SwFrmFmt *pParent = 0 );
@@ -1232,7 +1184,7 @@ public:
const SvUShortsSort* = 0,
const bool bSendDataChangedEvents = true );
// <--
- void RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark = FALSE );
+ void RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark = sal_False );
// Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird
// das alte in die Undo-History aufgenommen
@@ -1241,7 +1193,7 @@ public:
// --> OD 2008-02-12 #newlistlevelattrs#
// method to reset a certain attribute at the given format
- void ResetAttrAtFormat( const USHORT nWhichId,
+ void ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat );
// <--
@@ -1280,18 +1232,18 @@ public:
void RemoveAllFmtLanguageDependencies();
SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom,
- BOOL bBroadcast = FALSE, BOOL bAuto = TRUE);
- void DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast = FALSE );
+ sal_Bool bBroadcast = sal_False, sal_Bool bAuto = sal_True);
+ void DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast = sal_False );
SwFrmFmt* FindFrmFmtByName( const String& rName ) const
{ return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
// --> OD 2005-01-13 #i40550#
SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
- BOOL bBroadcast = FALSE,
- BOOL bAuto = TRUE );
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
// <--
- void DelCharFmt(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
- void DelCharFmt(SwCharFmt* pFmt, BOOL bBroadcast = FALSE);
+ void DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_False);
SwCharFmt* FindCharFmtByName( const String& rName ) const
{ return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
@@ -1302,14 +1254,14 @@ public:
// --> OD 2005-01-13 #i40550#
SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast = FALSE,
- BOOL bAuto = TRUE );
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
// <--
SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast = FALSE);
- void DelTxtFmtColl(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
- void DelTxtFmtColl( SwTxtFmtColl* pColl, BOOL bBroadcast = FALSE );
+ sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_False );
// --> OD 2007-11-06 #i62675#
// Add 4th optional parameter <bResetListAttrs>.
// 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
@@ -1413,18 +1365,18 @@ public:
SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
void ChgPageDesc( const String & rName, const SwPageDesc& );
void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
- BOOL FindPageDesc( const String & rName, sal_uInt16 * pFound );
+ sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound );
// -> #116530#
- void DelPageDesc( const String & rName, BOOL bBroadcast = FALSE);
- void DelPageDesc( sal_uInt16 i, BOOL bBroadcast = FALSE );
+ void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False);
+ void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False );
// <- #116530#
void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
// -> #116530#
sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
- BOOL bRegardLanguage = TRUE,
- BOOL bBroadcast = FALSE);
+ sal_Bool bRegardLanguage = sal_True,
+ sal_Bool bBroadcast = sal_False);
void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
- USHORT nOp);
+ sal_uInt16 nOp);
// <- #116530#
@@ -1446,7 +1398,7 @@ public:
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0,
sal_Bool bExpand = sal_False );
- const SwTOXBaseSection* InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+ const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0 );
const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
@@ -1536,7 +1488,7 @@ public:
// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
// --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
// --> OD 2008-02-08 #newlistlevelattrs#
- // Add optional parameter <bResetIndentAttrs> - default value FALSE.
+ // Add optional parameter <bResetIndentAttrs> - default value sal_False.
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the provided PaM, if
// the list style makes use of the new list level attributes.
@@ -1585,7 +1537,7 @@ public:
// add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
sal_uInt16 MakeNumRule( const String &rName,
const SwNumRule* pCpy = 0,
- BOOL bBroadcast = FALSE,
+ sal_Bool bBroadcast = sal_False,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
// <--
@@ -1595,8 +1547,8 @@ public:
// loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt!
// #106897#
sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
- BOOL bBroadcast = FALSE);
- sal_Bool DelNumRule( const String& rName, BOOL bBroadCast = FALSE );
+ sal_Bool bBroadcast = sal_False);
+ sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_False );
String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
void UpdateNumRule(); // alle invaliden Updaten
@@ -1618,12 +1570,12 @@ public:
OD 2008-03-18 #refactorlists# - add output parameter <sListId>
\param rPos position to start search
- \param bForward - TRUE: search forward
- - FALSE: search backward
- \param bNum - TRUE: search for enumeration
- - FALSE: search for itemize
- \param bOutline - TRUE: search for outline numbering rule
- - FALSE: search for non-outline numbering rule
+ \param bForward - sal_True: search forward
+ - sal_False: search backward
+ \param bNum - sal_True: search for enumeration
+ - sal_False: search for itemize
+ \param bOutline - sal_True: search for outline numbering rule
+ - sal_False: search for non-outline numbering rule
\param nNonEmptyAllowed number of non-empty paragraphs allowed between
rPos and found paragraph
@@ -1669,20 +1621,20 @@ public:
// Positionen der Spalten!! (nicht deren Breite!)
/* #109161# new parameter bCalledFromShell:
- TRUE: called from shell -> propagate existing adjust item at
+ sal_True: called from shell -> propagate existing adjust item at
rPos to every new cell. A existing adjust item in the table
heading or table contents paragraph style prevent that
propagation.
- FALSE: do not propagate
+ sal_False: do not propagate
*/
const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
const SwPosition& rPos, sal_uInt16 nRows,
sal_uInt16 nCols, short eAdjust,
const SwTableAutoFmt* pTAFmt = 0,
const SvUShorts* pColArr = 0,
- BOOL bCalledFromShell = FALSE,
- BOOL bNewModel = TRUE );
+ sal_Bool bCalledFromShell = sal_False,
+ sal_Bool bNewModel = sal_True );
// steht der Index in einer Tabelle, dann returne den TableNode sonst 0
SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
@@ -1727,7 +1679,7 @@ public:
const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 ) const;
- void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor* pCrsr,
+ void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 );
@@ -1735,14 +1687,14 @@ public:
void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
const SwTableBox *pStart, sal_Bool bCurRowOnly);
- void SetRowsToRepeat( SwTable &rTable, USHORT nSet );
+ void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet );
// AutoFormat fuer die Tabelle/TabellenSelection
sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
// Erfrage wie attributiert ist
sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
// setze das InsertDB als Tabelle Undo auf:
- void AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable );
+ void AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable );
// setze die Spalten/Zeilen/ZTellen Breite/Hoehe
sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff );
@@ -1795,7 +1747,7 @@ public:
// returne dieses.
SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberingSeparator,
- const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nIdx,
+ const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx,
const String& rCharacterStyle,
const sal_Bool bCpyBrd = sal_True );
SwFlyFrmFmt* InsertDrawLabel(
@@ -1808,6 +1760,7 @@ public:
// suche ueber das Layout eine EditShell und ggfs. eine ViewShell
SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const;
+ ::sw::IShellCursorSupplier * GetIShellCursorSupplier();
// OLE 2.0-Benachrichtung
inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
@@ -1837,10 +1790,10 @@ public:
const SwDocShell* GetDocShell() const { return pDocShell; }
void SetDocShell( SwDocShell* pDSh );
- // falls beim Kopieren von OLE-Nodes eine DocShell angelegt werden muss,
- // dann MUSS der Ref-Pointer besetzt sein!!!!
- SfxObjectShellRef* GetRefForDocShell() { return pDocShRef; }
- void SetRefForDocShell( SfxObjectShellRef* p ) { pDocShRef = p; }
+ // in case during copying of embedded object a new shell is created,
+ // it should be set here and cleaned later
+ void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; }
+ SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; }
// fuer die TextBausteine - diese habe nur ein SvPersist zur
// Verfuegung
@@ -1861,9 +1814,6 @@ public:
bool IsCopyIsMove() const { return mbCopyIsMove; }
void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; }
- // fuers Draw-Undo: Aktionen auf Flys wollen wir selbst behandeln
- bool IsNoDrawUndoObj() const { return mbNoDrawUndoObj; }
- void SetNoDrawUndoObj( bool bFlag ) { mbNoDrawUndoObj = bFlag; }
SwDrawContact* GroupSelection( SdrView& );
void UnGroupSelection( SdrView& );
sal_Bool DeleteSelection( SwDrawView& );
@@ -1903,14 +1853,13 @@ public:
inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True );
inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const;
- // loesche den nicht sichtbaren ::com::sun::star::ucb::Content aus dem Document, wie z.B.:
- // versteckte Bereiche, versteckte Absaetze
- sal_Bool RemoveInvisibleContent();
- sal_Bool HasInvisibleContent() const;
- //restore the invisible content if it's available on the undo stack
- sal_Bool RestoreInvisibleContent();
+ bool HasInvisibleContent() const;
+ /// delete invisible content, like hidden sections and paragraphs
+ bool RemoveInvisibleContent();
+ /// restore the invisible content if it's available on the undo stack
+ bool RestoreInvisibleContent();
// replace fields by text - mailmerge support
- BOOL ConvertFieldsToText();
+ sal_Bool ConvertFieldsToText();
// erzeuge Anhand der vorgebenen Collection Teildokumente
// falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
@@ -2011,10 +1960,10 @@ public:
void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; }
// Interface for the list of Ruby - texts/attributes
- USHORT FillRubyList( const SwPaM& rPam, SwRubyList& rList,
- USHORT nMode );
- USHORT SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
- USHORT nMode );
+ sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ sal_uInt16 nMode );
+ sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ sal_uInt16 nMode );
void ReadLayoutCache( SvStream& rStream );
void WriteLayoutCache( SvStream& rStream );
@@ -2039,12 +1988,12 @@ public:
@param sListId list Id of the list whose level has to be marked/unmarked
@param nListLevel level to mark
- @param bValue - TRUE mark the level
- - FALSE unmark the level
+ @param bValue - sal_True mark the level
+ - sal_False unmark the level
*/
void MarkListLevel( const String& sListId,
const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
/** Marks/Unmarks a list level of a certain list
@@ -2053,19 +2002,19 @@ public:
@param rList list whose level has to be marked/unmarked
@param nListLevel level to mark
- @param bValue - TRUE mark the level
- - FALSE unmark the level
+ @param bValue - sal_True mark the level
+ - sal_False unmark the level
*/
void MarkListLevel( SwList& rList,
const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
// <- #i27615#
// Change a format undoable.
void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
void RenameFmt(SwFmt & rFmt, const String & sNewName,
- BOOL bBroadcast = FALSE);
+ sal_Bool bBroadcast = sal_False);
// Change a TOX undoable.
void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
@@ -2091,7 +2040,7 @@ public:
String GetPaMDescr(const SwPaM & rPaM) const;
// -> #i23726#
- BOOL IsFirstOfNumRule(SwPosition & rPos);
+ sal_Bool IsFirstOfNumRule(SwPosition & rPos);
// <- #i23726#
// --> #i31958# access methods for XForms model(s)
@@ -2143,6 +2092,8 @@ public:
#endif
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
+ ::sw::UndoManager & GetUndoManager();
+ ::sw::UndoManager const& GetUndoManager() const;
SfxObjectShell* CreateCopy(bool bCallInitNew) const;
};