summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/IDocumentContentOperations.hxx11
-rw-r--r--sw/inc/authfld.hxx2
-rw-r--r--sw/inc/authratr.hxx2
-rw-r--r--sw/inc/cmdid.h5
-rw-r--r--sw/inc/crsrsh.hxx9
-rw-r--r--sw/inc/dcontact.hxx1
-rw-r--r--sw/inc/doc.hxx68
-rw-r--r--sw/inc/docsh.hxx4
-rw-r--r--sw/inc/edimp.hxx9
-rw-r--r--sw/inc/editsh.hxx12
-rw-r--r--sw/inc/fesh.hxx7
-rw-r--r--sw/inc/fmtftn.hxx8
-rw-r--r--sw/inc/frmfmt.hxx9
-rw-r--r--sw/inc/ftninfo.hxx2
-rw-r--r--sw/inc/hintids.hxx50
-rw-r--r--sw/inc/ndhints.hxx147
-rw-r--r--sw/inc/ndnotxt.hxx23
-rw-r--r--sw/inc/ndtxt.hxx136
-rw-r--r--sw/inc/pam.hxx96
-rw-r--r--sw/inc/postit.hxx34
-rw-r--r--sw/inc/rolbck.hxx370
-rw-r--r--sw/inc/section.hxx2
-rw-r--r--sw/inc/segdefs_.hxx29
-rw-r--r--sw/inc/shellio.hxx4
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx (renamed from sw/inc/segdefs.hxx)26
-rw-r--r--sw/inc/swcrsr.hxx68
-rw-r--r--sw/inc/swundo.hxx6
-rw-r--r--sw/inc/txatbase.hxx284
-rw-r--r--sw/inc/txtatr.hxx35
-rw-r--r--sw/inc/txtflcnt.hxx4
-rw-r--r--sw/inc/txtfld.hxx23
-rw-r--r--sw/inc/txtftn.hxx28
-rw-r--r--sw/inc/txtinet.hxx32
-rw-r--r--sw/inc/txtrfmrk.hxx22
-rw-r--r--sw/inc/txttxmrk.hxx22
-rw-r--r--sw/inc/undobj.hxx148
-rw-r--r--sw/inc/unocoll.hxx3
-rw-r--r--sw/inc/unocrsr.hxx23
-rw-r--r--sw/inc/unofield.hxx7
-rw-r--r--sw/inc/unoobj.hxx40
-rw-r--r--sw/inc/unoport.hxx6
-rw-r--r--sw/inc/unoprnms.hxx5
-rw-r--r--sw/inc/unotxdoc.hxx34
-rw-r--r--sw/inc/viscrs.hxx12
44 files changed, 1004 insertions, 864 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index 40f96985d6aa..9228e12d992c 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -71,7 +71,7 @@
/** Kopieren eines Bereiches im oder in ein anderes Dokument !
Die Position kann auch im Bereich liegen !!
*/
- virtual bool Copy(SwPaM&, SwPosition&) const = 0;
+ virtual bool Copy(SwPaM&, SwPosition&, bool bCopyAll ) const = 0;
/** Loesche die Section, in der der Node steht.
*/
@@ -85,9 +85,14 @@
*/
virtual bool DelFullPara(SwPaM&) = 0;
- /** komplett loeschen eines Bereiches
+ /** complete delete of a given PaM
+
+ OD 2009-08-20 #i100466#
+ Add optional parameter <bForceJoinNext>, default value <false>
+ Needed for hiding of deletion redlines
*/
- virtual bool DeleteAndJoin(SwPaM&) = 0;
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false ) = 0;
/** verschieben eines Bereiches
*/
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 516958cefa23..1b209ac0b47c 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -118,7 +118,7 @@ public:
void GetAllEntryIdentifiers( SvStringsDtor& rToFill )const;
const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const;
- void ChangeEntryContent(const SwAuthEntry* pNewEntry);
+ bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
// import interface
USHORT AppendField(const SwAuthEntry& rInsert);
long GetHandle(USHORT nPos);
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
index ab9abbb4756f..84fb0d6fbb5b 100644
--- a/sw/inc/authratr.hxx
+++ b/sw/inc/authratr.hxx
@@ -42,7 +42,7 @@ class SW_DLLPUBLIC AuthorCharAttr
public:
USHORT nItemId;
USHORT nAttr;
- ULONG nColor;
+ ColorData nColor;
AuthorCharAttr();
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index ac64dcb85510..6ae8e73cfb8d 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -155,7 +155,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_PASTE (FN_EDIT + 13) /* Einfuegen */
#define FN_PASTESPECIAL (FN_EDIT + 14) /* Verknuepfung einfuegen */
#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Verknuepfung einfuegen */
-
#define FN_NUMBER_BULLETS (FN_EDIT + 21) /* Bullets */
#define FN_REPEAT (FN_EDIT + 22) /* Letzten Befehl wiederholen */
#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Index-Entry bearbeiten */
@@ -1259,6 +1258,10 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_IID_COLRIGHT (FN_FRAME + 17)
#define FN_SET_FRM_ALT_NAME (FN_FRAME + 18)
+// --> OD 2009-07-13 #i73249#
+#define FN_UNO_TITLE (FN_FRAME + 19)
+#define FN_UNO_DESCRIPTION (FN_FRAME + 20)
+// <--
//Member-Ids fuer Fill/SetVariable an Items
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 6e5102cb8fca..b0c8a54125f0 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -150,9 +150,6 @@ const int CRSR_POSOLD = 0x01, // Cursor bleibt an alter Doc-Position
String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam );
-// #i75172#
-enum SwOverlayType { SW_OVERLAY_INVERT, SW_OVERLAY_TRANSPARENT };
-
// die Cursor - Shell
class SW_DLLPUBLIC SwCrsrShell : public ViewShell, public SwModify
{
@@ -252,9 +249,6 @@ private:
// OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
bool mbMacroExecAllowed : 1;
- // #i88893# the overlay type to use for cursor
- SwOverlayType maSwOverlayType;
-
SW_DLLPRIVATE void UpdateCrsr( USHORT eFlags
=SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
BOOL bIdleEnd = FALSE );
@@ -352,9 +346,6 @@ public:
// only for usage in special cases allowed!
void ExtendedSelectAll();
- // #i88893# the overlay type to use for cursor
- SwOverlayType getSwOverlayType() const { return maSwOverlayType; }
-
SwPaM* GetCrsr( BOOL bMakeTblCrsr = TRUE ) const;
inline SwCursor* GetSwCrsr( BOOL bMakeTblCrsr = TRUE ) const;
// nur den akt. Cursor returnen
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index be39d837e97b..e1f20183deca 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -346,7 +346,6 @@ class SwDrawVirtObj : public SdrVirtObj
// #108784#
// All overloaded methods which need to use the offset
virtual void RecalcBoundRect();
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
virtual ::basegfx::B2DPolyPolygon TakeContour() const;
virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 46af5977369d..b2a6b917f946 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -32,45 +32,23 @@
/** SwDoc interfaces */
-#ifndef IINTERFACE_HXX_INCLUDED
#include <IInterface.hxx>
-#endif
#include <IDocumentSettingAccess.hxx>
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
#include <IDocumentMarkAccess.hxx>
-#ifndef IREDLINEACCESS_HXX_INCLUDED
#include <IDocumentRedlineAccess.hxx>
-#endif
#include <IDocumentUndoRedo.hxx>
#include <IDocumentLinksAdministration.hxx>
#include <IDocumentFieldsAccess.hxx>
-#ifndef IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
#include <IDocumentContentOperations.hxx>
-#endif
-#ifndef IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
#include <IDocumentStylePoolAccess.hxx>
-#endif
-#ifndef IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
#include <IDocumentLineNumberAccess.hxx>
-#endif
-#ifndef IDOCUMENTSTATISTICS_HXX_INCLUDED
#include <IDocumentStatistics.hxx>
-#endif
-#ifndef IDOCUMENTSTATE_HXX_INCLUDED
#include <IDocumentState.hxx>
-#endif
-#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
#include <IDocumentDrawModelAccess.hxx>
-#endif
#include <IDocumentLayoutAccess.hxx>
-#ifndef IDOCUMENTTIMERACCESS_HXX_INCLUDED
#include <IDocumentTimerAccess.hxx>
-#endif
-#ifndef IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
#include <IDocumentChartDataProviderAccess.hxx>
-#endif
// --> OD 2007-10-26 #i83479#
#include <IDocumentOutlineNodes.hxx>
#include <IDocumentListItems.hxx>
@@ -92,15 +70,11 @@ class SwList;
#include <toxe.hxx> // enums
#include <flyenum.hxx>
#include <itabenum.hxx>
-#ifndef _SWDBDATA_HXXnLinkCt
#include <swdbdata.hxx>
-#endif
#include <chcmprse.hxx>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
-#ifndef _VOS_REF_HXX
#include <vos/ref.hxx>
-#endif
#include <svx/svdtypes.hxx>
#include <svtools/style.hxx>
#include <svx/numitem.hxx>
@@ -113,6 +87,7 @@ class SwList;
#include <svtools/embedhlp.hxx>
#include <vector>
+#include <memory>
#include <boost/scoped_ptr.hpp>
@@ -258,6 +233,7 @@ namespace container {
namespace sfx2 {
class SvLinkSource;
+ class IXmlIdRegistry;
}
//PageDescriptor-Schnittstelle, Array hier wegen inlines.
@@ -433,6 +409,8 @@ private:
tImplSortedNodeNumList* mpListItemsList;
// <--
+ ::std::auto_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry;
+
// -------------------------------------------------------------------
// sonstige
sal_uInt16 nUndoPos; // akt. Undo-InsertPosition (fuers Redo!)
@@ -502,7 +480,6 @@ private:
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 mbWinEncryption : 1; // imported document password encrypted?
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
@@ -638,7 +615,7 @@ private:
// Kopieren eines Bereiches im oder in ein anderes Dokument !
// Die Position darf nicht im Bereich liegen !!
sal_Bool _Copy( SwPaM&, SwPosition&,
- sal_Bool MakeNewFrms = sal_True, SwPaM* pCpyRng = 0 ) const; // in ndcopy.cxx
+ sal_Bool MakeNewFrms /*= sal_True*/, bool bCopyAll, SwPaM* pCpyRng /*= 0*/ ) const; // in ndcopy.cxx
SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos,
const SwCntntNode& rNode, RndStdIds eRequestId,
@@ -650,7 +627,8 @@ private:
const SfxItemSet* pGrfAttrSet,
SwFrmFmt* = 0 );
- void _CopyFlyInFly( const SwNodeRange& rRg, const SwNodeIndex& rSttIdx,
+ void _CopyFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndContentIndex,
+ const SwNodeIndex& rSttIdx,
sal_Bool bCopyFlyAtFly = sal_False ) const; // steht im ndcopy.cxx
sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
@@ -722,6 +700,8 @@ private:
SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL );
SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL );
+ void InitTOXTypes();
+ void Paste( const SwDoc& );
public:
/** Life cycle
@@ -898,11 +878,16 @@ public:
/** IDocumentContentOperations
*/
- virtual bool Copy(SwPaM&, SwPosition&) const;
+ virtual bool Copy(SwPaM&, SwPosition&, bool bCopyAll) const;
virtual void DeleteSection(SwNode* pNode);
virtual bool Delete(SwPaM&);
virtual bool DelFullPara(SwPaM&);
- virtual bool DeleteAndJoin(SwPaM&);
+ // --> OD 2009-08-20 #i100466#
+ // Add optional parameter <bForceJoinNext>, default value <false>
+ // Needed for hiding of deletion redlines
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false );
+ // <--
virtual bool Move(SwPaM&, SwPosition&, SwMoveFlags);
virtual bool Move(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
@@ -1101,6 +1086,7 @@ public:
SwFrmFmt *pParent = 0 );
void CopyWithFlyInFly( const SwNodeRange& rRg,
+ const xub_StrLen nEndContentIndex,
const SwNodeIndex& rInsPos,
sal_Bool bMakeNewFrms = sal_True,
sal_Bool bDelRedlines = sal_True,
@@ -1110,7 +1096,12 @@ public:
sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False );
-
+ // --> OD 2009-07-20 #i73249#
+ void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
+ const String& sNewTitle );
+ void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
+ const String& sNewDescription );
+ // <--
/** Footnotes
*/
@@ -1121,9 +1112,9 @@ public:
void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
SwFtnIdxs& GetFtnIdxs() { return *pFtnIdxs; }
const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; }
- // Fussnoten im Bereich aendern
- sal_Bool SetCurFtn( const SwPaM& rPam, const String& rNumStr,
- sal_uInt16 nNumber, sal_Bool bIsEndNote );
+ // change footnotes in area
+ bool SetCurFtn( const SwPaM& rPam, const String& rNumStr,
+ sal_uInt16 nNumber, bool bIsEndNote );
/** Operations on the content of the document e.g.
spell-checking/hyphenating/word-counting
@@ -1437,6 +1428,7 @@ public:
void SetInReading( bool bNew ) { mbInReading = bNew; }
bool IsClipBoard() const { return mbClipBoard; }
+ // N.B.: must be called right after constructor! (@see GetXmlIdRegistry)
void SetClipBoard( bool bNew ) { mbClipBoard = bNew; }
bool IsColumnSelection() const { return mbColumnSelection; }
@@ -1975,9 +1967,6 @@ public:
USHORT SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
USHORT nMode );
- inline void SetWinEncryption(const bool bImportWinEncryption) {mbWinEncryption = bImportWinEncryption; }
- inline bool IsWinEncrypted() const { return mbWinEncryption; }
-
void ReadLayoutCache( SvStream& rStream );
void WriteLayoutCache( SvStream& rStream );
SwLayoutCache* GetLayoutCache() const { return pLayoutCache; }
@@ -2100,6 +2089,9 @@ public:
{
return n32DummyCompatabilityOptions2;
}
+
+ ::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
+ SwDoc* CreateCopy() const;
};
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 8f5a04658e6c..6bfd5437a20e 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -299,10 +299,12 @@ public:
GetController();
SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef );
+
+ virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const;
};
class Graphic;
//implemented in source/ui/docvw/romenu.cxx
-String ExportGraphic( const Graphic &rGraphic, const String &rGrfName, const String &rName );
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName );
#endif
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
index 16d841d5774a..8cfa04648cf7 100644
--- a/sw/inc/edimp.hxx
+++ b/sw/inc/edimp.hxx
@@ -52,15 +52,6 @@ class SwNodeIndex;
}
-#define FOREACHCURSOR_START(pCURSH) \
- {\
- SwShellCrsr *_pStartCrsr = *(pCURSH)->GetSwCrsr(), *__pStartCrsr = _pStartCrsr; \
- do {
-
-#define FOREACHCURSOR_END() \
- } while( (_pStartCrsr=*(SwCursor*)_pStartCrsr->GetNext()) != __pStartCrsr ); \
- }
-
struct SwPamRange
{
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 4e1eba53115b..a3c7b7489dd1 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -622,9 +622,9 @@ public:
const Graphic* pGraphic = 0,
const GraphicObject* pGrafObj = 0 );
- // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
- const String& GetAlternateText() const;
- void SetAlternateText( const String& rTxt );
+// // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
+// const String& GetAlternateText() const;
+// void SetAlternateText( const String& rTxt );
//eindeutige Identifikation des Objektes (fuer ImageMapDlg)
void *GetIMapInventor() const;
@@ -801,11 +801,11 @@ public:
// erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
BOOL GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
- BOOL SetCurFtn( const SwFmtFtn& rFillFtn );
- BOOL HasFtns( BOOL bEndNotes = FALSE ) const;
+ bool SetCurFtn( const SwFmtFtn& rFillFtn );
+ bool HasFtns( bool bEndNotes = false ) const;
//z.Zt nicht benoetigt USHORT GetFtnCnt( BOOL bEndNotes = FALSE ) const;
// gebe Liste aller Fussnoten und deren Anfangstexte
- USHORT GetSeqFtnList( SwSeqFldList& rList, BOOL bEndNotes = FALSE );
+ USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
// SS fuer Bereiche
const SwSection* InsertSection( const SwSection& rNew,
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 8697ee2833d1..e75d4baec8d0 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -353,6 +353,13 @@ public:
const Graphic *GetGrfAtPos( const Point &rDocPos,
String &rName, BOOL &rbLink ) const;
+ // --> OD 2009-07-13 #i73249#
+ const String GetObjTitle() const;
+ void SetObjTitle( const String& rTitle );
+ const String GetObjDescription() const;
+ void SetObjDescription( const String& rDescription );
+ // <--
+
//SS fuer Rahmen --------------------------------------------
BOOL IsFrmSelected() const;
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 5afdfadc8b46..e31001ced75f 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -45,14 +45,14 @@ class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
SwTxtFtn* pTxtAttr; //mein TextAttribut
String aNumber; //Benutzerdefinierte 'Nummer'
USHORT nNumber; //Automatische Nummerierung
- BOOL bEndNote; //Ist es eine Endnote?
+ bool m_bEndNote; // is it an End note?
// geschuetzter CopyCtor
SwFmtFtn& operator=(const SwFmtFtn& rFtn);
SwFmtFtn( const SwFmtFtn& );
public:
- SwFmtFtn( BOOL bEndNote = FALSE );
+ SwFmtFtn( bool bEndNote = false );
virtual ~SwFmtFtn();
// "pure virtual Methoden" vom SfxPoolItem
@@ -61,11 +61,11 @@ public:
const String &GetNumStr() const { return aNumber; }
const USHORT &GetNumber() const { return nNumber; }
- BOOL IsEndNote() const { return bEndNote;}
+ bool IsEndNote() const { return m_bEndNote;}
void SetNumStr( const String& rStr ) { aNumber = rStr; }
void SetNumber( USHORT nNo ) { nNumber = nNo; }
- void SetEndNote( BOOL b );
+ void SetEndNote( bool b );
void SetNumber( const SwFmtFtn& rFtn )
{ nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 608ac7ac7174..a86b1c6689a0 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -176,6 +176,15 @@ public:
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ // --> OD 2009-07-14 #i73249#
+ const String GetObjTitle() const;
+ void SetObjTitle( const String& rTitle,
+ bool bBroadcast = false );
+ const String GetObjDescription() const;
+ void SetObjDescription( const String& rDescription,
+ bool bBroadcast = false );
+ // <--
+
/** SwFlyFrmFmt::IsBackgroundTransparent - for #99657#
OD 22.08.2002 - overloading virtual method and its default implementation,
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index 4ab9e53c6b27..6e84f3ead81b 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -50,7 +50,7 @@ class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
String sPrefix;
String sSuffix;
protected:
- BOOL bEndNote;
+ bool m_bEndNote;
public:
SvxNumberType aFmt;
USHORT nFtnOffset;
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 53fcb75910f5..325638b5df00 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -337,7 +337,8 @@ RES_MSG_BEGIN = RES_FMT_END,
RES_GRAPHIC_SWAPIN,
RES_FIELD_DELETED,
RES_NAME_CHANGED,
- RES_ALT_TEXT_CHANGED,
+ RES_TITLE_CHANGED,
+ RES_DESCRIPTION_CHANGED,
RES_UNOCURSOR_LEAVES_SECTION,
RES_LINKED_GRAPHIC_STREAM_ARRIVED,
RES_MSG_END
@@ -375,6 +376,53 @@ RES_FLTRATTR_END
#define RES_WHICHHINT_END HINT_END
+inline bool isATR(const USHORT nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+inline bool isCHRATR(const USHORT nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
+}
+inline bool isTXTATR_WITHEND(const USHORT nWhich)
+{
+ return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
+ && (RES_TXTATR_WITHEND_END > nWhich);
+}
+inline bool isTXTATR_NOEND(const USHORT nWhich)
+{
+ return (RES_TXTATR_NOEND_BEGIN <= nWhich)
+ && (RES_TXTATR_NOEND_END > nWhich);
+}
+inline bool isTXTATR(const USHORT nWhich)
+{
+ return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
+}
+inline bool isPARATR(const USHORT nWhich)
+{
+ return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
+}
+inline bool isPARATR_LIST(const USHORT nWhich)
+{
+ return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); }
+inline bool isFRMATR(const USHORT nWhich)
+{
+ return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
+}
+inline bool isGRFATR(const USHORT nWhich)
+{
+ return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
+}
+inline bool isBOXATR(const USHORT nWhich)
+{
+ return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
+}
+inline bool isUNKNOWNATR(const USHORT nWhich)
+{
+ return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+
+
/*
* hole aus der statischen Default-Attribut Tabelle ueber den Which-Wert
* das entsprechende default Attribut.
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 9a7d37c026fa..b6ca936868fb 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -61,41 +61,45 @@ SV_DECL_PTRARR_SORT(SwpHtEnd,SwTxtAttr*,1,1)
* class SwpHintsArr
*************************************************************************/
-// Das neue Hintsarray:
-class SwpHintsArr : private SwpHtStart
+/// the Hints array
+class SwpHintsArray
{
protected:
- SwpHtEnd aHtEnd;
+ SwpHtStart m_HintStarts;
+ SwpHtEnd m_HintEnds;
+ //FIXME: why are the non-const methods public?
public:
void Insert( const SwTxtAttr *pHt );
void DeleteAtPos( const USHORT nPosInStart );
- BOOL Resort();
- SwTxtAttr *Cut( const USHORT nPosInStart );
-
- inline const SwTxtAttr *GetStart( const USHORT nPos ) const { return (*this)[nPos]; }
- inline const SwTxtAttr *GetEnd( const USHORT nPos ) const { return aHtEnd[nPos]; }
- inline SwTxtAttr *GetStart( const USHORT nPos ) { return GetHt(nPos); }
- inline SwTxtAttr *GetEnd( const USHORT nPos ) { return aHtEnd[nPos]; }
- inline USHORT GetEndCount() const { return aHtEnd.Count(); }
- inline USHORT GetStartCount() const { return Count(); }
+ bool Resort();
+ SwTxtAttr * Cut( const USHORT nPosInStart );
+
+ inline const SwTxtAttr * GetStart( const USHORT nPos ) const
+ { return m_HintStarts[nPos]; }
+ inline const SwTxtAttr * GetEnd ( const USHORT nPos ) const
+ { return m_HintEnds [nPos]; }
+ inline SwTxtAttr * GetStart( const USHORT nPos )
+ { return m_HintStarts[nPos]; }
+ inline SwTxtAttr * GetEnd ( const USHORT nPos )
+ { return m_HintEnds [nPos]; }
+
+ inline USHORT GetEndCount() const { return m_HintEnds .Count(); }
+ inline USHORT GetStartCount() const { return m_HintStarts.Count(); }
+
inline USHORT GetStartOf( const SwTxtAttr *pHt ) const;
inline USHORT GetPos( const SwTxtAttr *pHt ) const
-// OS: in svmem.hxx wird fuer TCPP GetPos ohne const gerufen
-#ifdef TCPP
- { return SwpHtStart::GetPos( (SwTxtAttr *)pHt ); }
-#else
- { return SwpHtStart::GetPos( pHt ); }
-#endif
+ { return m_HintStarts.GetPos( pHt ); }
- inline SwTxtAttr *GetHt( const USHORT nIdx ) { return SwpHtStart::operator[](nIdx); }
- inline const SwTxtAttr *operator[]( const USHORT nIdx )const
- { return SwpHtStart::operator[](nIdx); }
- inline USHORT Count() const { return SwpHtStart::Count(); }
+ inline SwTxtAttr * GetTextHint( const USHORT nIdx )
+ { return GetStart(nIdx); }
+ inline const SwTxtAttr * operator[]( const USHORT nIdx ) const
+ { return m_HintStarts[nIdx]; }
+ inline USHORT Count() const { return m_HintStarts.Count(); }
#ifdef DBG_UTIL
- BOOL Check() const;
+ bool Check() const;
#endif
};
@@ -103,67 +107,68 @@ public:
* class SwpHints
*************************************************************************/
-// Die public-Schnittstelle zum Node hin
-class SwpHints: public SwpHintsArr
+// public interface
+class SwpHints : public SwpHintsArray
{
private:
- SwRegHistory* pHistory;
- // Numerierung
- BOOL bHasHiddenParaField :1; // HiddenParaFld
- BOOL bFntChg :1; // Fontwechsel
- BOOL bFtn :1; // Fussnoten
- BOOL bInSplitNode: 1; // TRUE: der Node ist im Split und die Frames
- // werden verschoben!
- BOOL bDDEFlds : 1; // es sind DDE-Felder am TextNode vorhanden
- BOOL bCalcHiddenParaField : 1; // bHasHiddenParaField ist invalid, CalcHiddenParaField() rufen
-
- // Haelt ein neues Attribut in pHistory fest.
- void NoteInHistory( SwTxtAttr *pAttr, const BOOL bNew = FALSE );
+ SwRegHistory* m_pHistory; // for Undo
+
+ bool m_bFontChange : 1; // font change
+ // true: the Node is in Split and Frames are moved
+ bool m_bInSplitNode : 1;
+ // m_bHasHiddenParaField is invalid, call CalcHiddenParaField()
+ bool m_bCalcHiddenParaField : 1;
+ bool m_bHasHiddenParaField : 1; // HiddenParaFld
+ bool m_bFootnote : 1; // footnotes
+ bool m_bDDEFields : 1; // the TextNode has DDE fields
+
+ // records a new attibute in m_pHistory.
+ void NoteInHistory( SwTxtAttr *pAttr, const bool bNew = false );
void CalcFlags( );
- // die Delete Methoden duerfen nur vom TextNode gerufen werden !!
- // Dieser sorgt dafuer, das bei Attributen ohne Ende auch das
- // entsp. Zeichen entfernt wird !!
+ // Delete methods may only be called by the TextNode!
+ // Because the TextNode also guarantees removal of the Character for
+ // attributes without an end.
friend class SwTxtNode;
void DeleteAtPos( const USHORT nPos );
- // Ist der Hint schon bekannt, dann suche die Position und loesche ihn.
- // Ist er nicht im Array, so gibt es ein ASSERT !!
+ // Delete the given Hint. The Hint must actually be in the array!
void Delete( SwTxtAttr* pTxtHt );
- inline void SetCalcHiddenParaField(){ bCalcHiddenParaField = TRUE; }
- inline void SetHiddenParaField( const BOOL bNew ) { bHasHiddenParaField = bNew; }
- inline BOOL HasHiddenParaField() const
- { if( bCalcHiddenParaField ) ((SwpHints*)this)->CalcHiddenParaField(); return bHasHiddenParaField; }
+ inline void SetInSplitNode(bool bInSplit) { m_bInSplitNode = bInSplit; }
+ inline void SetCalcHiddenParaField() { m_bCalcHiddenParaField = true; }
+ inline void SetHiddenParaField( const bool bNew )
+ { m_bHasHiddenParaField = bNew; }
+ inline bool HasHiddenParaField() const
+ {
+ if ( m_bCalcHiddenParaField )
+ {
+ (const_cast<SwpHints*>(this))->CalcHiddenParaField();
+ }
+ return m_bHasHiddenParaField;
+ }
void BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, USHORT nMode );
bool MergePortions( SwTxtNode& rNode );
public:
- inline BOOL CanBeDeleted() const { return !Count(); }
+ SwpHints();
+
+ inline bool CanBeDeleted() const { return !Count(); }
- // damit das SwDoc::Undo ueber alle Attributaenderungen informiert
- // wird, gibt es hier einen Pointer auf die History. Nur wenn dieser
- // != 0 ist, muessen alle Attributaenderungen "gemeldet" werden.
- void Register( SwRegHistory* pHist ) { pHistory = pHist; }
+ // register a History, which receives all attribute changes (for Undo)
+ void Register( SwRegHistory* pHist ) { m_pHistory = pHist; }
+ // deregister the currently registered History
void DeRegister() { Register(0); }
- SwRegHistory* getHistory() const { return pHistory; }
+ SwRegHistory* GetHistory() const { return m_pHistory; }
- void Insert( SwTxtAttr* pHt, SwTxtNode &rNode, USHORT nMode = 0 );
+ void Insert( SwTxtAttr* pHt, SwTxtNode &rNode, USHORT nMode = 0 );
- inline BOOL HasFtn() const { return bFtn; }
- inline BOOL IsInSplitNode() const { return bInSplitNode; }
+ inline bool HasFtn() const { return m_bFootnote; }
+ inline bool IsInSplitNode() const { return m_bInSplitNode; }
- // Konstruktor (wird im nur einmal benutzt!)
- SwpHints()
- {
- pHistory = 0;
- bFntChg = TRUE;
- bDDEFlds = bFtn = bInSplitNode = bCalcHiddenParaField = bHasHiddenParaField = FALSE;
- }
-
- // Berechnung von bHasHiddenParaField, return-Wert TRUE bei Aenderung
- BOOL CalcHiddenParaField();
+ // calc current value of m_bHasHiddenParaField, returns true iff changed
+ bool CalcHiddenParaField();
DECL_FIXEDMEMPOOL_NEWDEL(SwpHints)
};
@@ -172,20 +177,22 @@ public:
SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
/*************************************************************************
- * Inline-Implementationen
+ * Inline Implementations
*************************************************************************/
-inline USHORT SwpHintsArr::GetStartOf( const SwTxtAttr *pHt ) const
+inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
{
USHORT nPos;
- if( !Seek_Entry( pHt, &nPos ) )
+ if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) )
+ {
nPos = USHRT_MAX;
+ }
return nPos;
}
-inline SwTxtAttr *SwpHintsArr::Cut( const USHORT nPosInStart )
+inline SwTxtAttr *SwpHintsArray::Cut( const USHORT nPosInStart )
{
- SwTxtAttr *pHt = GetHt(nPosInStart);
+ SwTxtAttr *pHt = GetTextHint(nPosInStart);
DeleteAtPos( nPosInStart );
return pHt;
}
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index b123bfd70cb3..7150e1319c30 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -43,7 +43,7 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
friend class SwNodes;
friend class SwNoTxtFrm;
- String aAlternateText; // alternativer Text (HTML)
+// String aAlternateText; // alternativer Text (HTML)
PolyPolygon *pContour; // Polygon fuer Konturumlauf
BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
@@ -75,19 +75,26 @@ public:
virtual BOOL SavePersistentData();
virtual BOOL RestorePersistentData();
- // alternativen Text abfragen/setzen
- const String& GetAlternateText() const { return aAlternateText; }
- void SetAlternateText( const String& rTxt, sal_Bool bBroadcast=sal_False );
+ const String GetTitle() const;
+ void SetTitle( const String& rTitle,
+ bool bBroadcast = false );
+ const String GetDescription() const;
+ void SetDescription( const String& rDescription,
+ bool bBroadcast = false );
+
+// const String GetAlternateText() const;
+// void SetAlternateText( const String& rTxt,
+// sal_Bool bBroadcast=sal_False );
void SetContour( const PolyPolygon *pPoly,
BOOL bAutomatic = FALSE );
const PolyPolygon *HasContour() const;
- BOOL _HasContour() const { return pContour!=0; };
+ BOOL _HasContour() const { return pContour!=0; };
void GetContour( PolyPolygon &rPoly ) const;
void CreateContour();
void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
- BOOL HasAutomaticContour() const { return bAutomaticContour; }
+ BOOL HasAutomaticContour() const { return bAutomaticContour; }
// set either a MM100 or pixel contour
void SetContourAPI( const PolyPolygon *pPoly );
@@ -96,9 +103,9 @@ public:
BOOL GetContourAPI( PolyPolygon &rPoly ) const;
void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
- BOOL IsPixelContour() const;
+ BOOL IsPixelContour() const;
- BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
+ BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
//Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
Graphic GetGraphic() const;
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 33fd760ab108..dffa47f898f3 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -38,6 +38,13 @@
#include <errhdl.hxx>
#include <modeltoviewhelper.hxx>
#include <SwNumberTreeTypes.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <vector>
+#include <set>
+
+
class SwNumRule;
class SwNodeNum;
// --> OD 2008-05-06 #refactorlists#
@@ -47,9 +54,6 @@ class SwList;
class SvxLRSpaceItem;
// <--
-#include <vector>
-#include <set>
-
namespace utl {
class TransliterationWrapper;
}
@@ -85,7 +89,7 @@ typedef std::set< xub_StrLen > SwSoftPageBreakList;
// --------------------
// SwTxtNode
// --------------------
-class SW_DLLPUBLIC SwTxtNode: public SwCntntNode
+class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
{
// fuer das Erzeugen des ersten TextNode
@@ -98,25 +102,25 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode
//Kann 0 sein, nur dann nicht 0 wenn harte Attribute drin stehen.
//Also niemals direkt zugreifen!
- SwpHints *pSwpHints;
+ SwpHints *m_pSwpHints;
// --> OD 2005-11-02 #i51089 - TUNING#
mutable SwNodeNum* mpNodeNum; // Numerierung fuer diesen Absatz
// <--
- XubString aText;
+ XubString m_Text;
- SwParaIdleData_Impl* pParaIdleData_Impl;
+ SwParaIdleData_Impl* m_pParaIdleData_Impl;
// Some of the chars this para are hidden. Paragraph has to be reformatted
// on changing the view to print preview.
- mutable BOOL bContainsHiddenChars : 1;
+ mutable bool m_bContainsHiddenChars : 1;
// The whole paragraph is hidden because of the hidden text attribute
- mutable BOOL bHiddenCharsHidePara : 1;
+ mutable bool m_bHiddenCharsHidePara : 1;
// The last two flags have to be recalculated if this flag is set:
- mutable BOOL bRecalcHiddenCharFlags : 1;
+ mutable bool m_bRecalcHiddenCharFlags : 1;
- bool bNotifiable;
- mutable BOOL bLastOutlineState : 1;
+ mutable bool m_bLastOutlineState : 1;
+ bool m_bNotifiable;
// BYTE nOutlineLevel; //#outline level, removed by zhaojianwei.
// --> OD 2008-11-19 #i70748#
@@ -134,6 +138,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode
SwList* mpList;
// <--
+
SW_DLLPRIVATE SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl,
const SfxItemSet* pAutoAttr = 0 );
@@ -160,12 +165,13 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode
// Optimization: Asking for information about hidden characters at SwScriptInfo
// updates these flags.
- inline bool IsCalcHiddenCharFlags() const { return bRecalcHiddenCharFlags; }
+ inline bool IsCalcHiddenCharFlags() const
+ { return m_bRecalcHiddenCharFlags; }
inline void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
{
- bHiddenCharsHidePara = bNewHiddenCharsHidePara;
- bContainsHiddenChars = bNewContainsHiddenChars;
- bRecalcHiddenCharFlags = false;
+ m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
+ m_bContainsHiddenChars = bNewContainsHiddenChars;
+ m_bRecalcHiddenCharFlags = false;
}
SW_DLLPRIVATE void CalcHiddenCharFlags() const;
@@ -194,6 +200,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode
*/
SwNodeNum* CreateNum() const;
+ inline void TryDeleteSwpHints();
+
public:
bool IsWordCountDirty() const;
bool IsWrongDirty() const;
@@ -223,14 +231,14 @@ public:
public:
using SwCntntNode::GetAttr;
- const String& GetTxt() const { return aText; }
+ const String& GetTxt() const { return m_Text; }
- // Zugriff auf SwpHints
+ // getters for SwpHints
inline SwpHints &GetSwpHints();
inline const SwpHints &GetSwpHints() const;
- inline SwpHints *GetpSwpHints() { return pSwpHints; }
- inline const SwpHints *GetpSwpHints() const { return pSwpHints; }
- inline BOOL HasHints() const { return pSwpHints ? TRUE : FALSE; }
+ inline SwpHints *GetpSwpHints() { return m_pSwpHints; }
+ inline const SwpHints *GetpSwpHints() const { return m_pSwpHints; }
+ inline bool HasHints() const { return m_pSwpHints ? true : false; }
inline SwpHints &GetOrCreateSwpHints();
virtual ~SwTxtNode();
@@ -341,7 +349,7 @@ public:
SwCntntNode *AppendNode( const SwPosition & );
// setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
- BOOL DontExpandFmt( const SwIndex& rIdx, BOOL bFlag = TRUE,
+ BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
BOOL bFmtToTxtAttributes = TRUE );
// gebe das vorgegebene Attribut, welches an der TextPosition (rIdx)
@@ -400,12 +408,12 @@ public:
/**
Returns if this text node is an outline.
- @retval TRUE this text node is an outline
- @retval FALSE else
+ @retval true this text node is an outline
+ @retval false else
*/
- BOOL IsOutline() const;
+ bool IsOutline() const;
- BOOL IsOutlineStateChanged() const;
+ bool IsOutlineStateChanged() const;
void UpdateOutlineState();
@@ -712,29 +720,29 @@ public:
// Passes back info needed on the dropcap dimensions
bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
-
- //
// Hidden Paragraph Field:
- //
- inline BOOL CalcHiddenParaField()
- { if(pSwpHints) return pSwpHints->CalcHiddenParaField(); return FALSE; }
- // Setzen des CalcVisible-Flags
- inline void SetCalcHiddenParaField(){ if(pSwpHints) pSwpHints->SetCalcHiddenParaField(); }
+ inline bool CalcHiddenParaField()
+ { return m_pSwpHints ? m_pSwpHints->CalcHiddenParaField() : false; }
+ // set CalcVisible flags
+ inline void SetCalcHiddenParaField()
+ { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
- // Ist der Absatz sichtbar
- inline BOOL HasHiddenParaField() const
- { return pSwpHints ? pSwpHints->HasHiddenParaField() : FALSE; }
+ // is the paragraph visible?
+ inline bool HasHiddenParaField() const
+ { return m_pSwpHints ? m_pSwpHints->HasHiddenParaField() : false; }
//
// Hidden Paragraph Field:
//
inline bool HasHiddenCharAttribute( bool bWholePara ) const
{
- if ( bRecalcHiddenCharFlags )
+ if ( m_bRecalcHiddenCharFlags )
CalcHiddenCharFlags();
- return bWholePara ? bHiddenCharsHidePara : bContainsHiddenChars;
+ return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
}
- inline void SetCalcHiddenCharFlags() const { bRecalcHiddenCharFlags = TRUE; }
+
+ inline void SetCalcHiddenCharFlags() const
+ { m_bRecalcHiddenCharFlags = true; }
// --> FME 2004-06-08 #i12836# enhanced pdf
//
@@ -766,16 +774,6 @@ public:
// count words in given range
void CountWords( SwDocStat& rStat, xub_StrLen nStart, xub_StrLen nEnd ) const;
- // #111840#
- /**
- Returns position of certain text attribute.
-
- @param pAttr text attribute to search
-
- @return position of given attribute or NULL in case of failure
- */
- SwPosition * GetPosition(const SwTxtAttr * pAttr);
-
// Checks some global conditions like loading or destruction of document
// to economize notifications
bool IsNotificationEnabled() const;
@@ -808,32 +806,50 @@ public:
USHORT GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
+ // sfx2::Metadatable
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry();
+ virtual bool IsInClipboard() const;
+ virtual bool IsInUndo() const;
+ virtual bool IsInContent() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
};
//-----------------------------------------------------------------------------
-inline SwpHints &SwTxtNode::GetSwpHints()
+inline SwpHints & SwTxtNode::GetSwpHints()
{
- ASSERT_ID( pSwpHints, ERR_NOHINTS);
- return *pSwpHints;
+ ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ return *m_pSwpHints;
}
inline const SwpHints &SwTxtNode::GetSwpHints() const
{
- ASSERT_ID( pSwpHints, ERR_NOHINTS);
- return *pSwpHints;
+ ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ return *m_pSwpHints;
}
inline SwpHints& SwTxtNode::GetOrCreateSwpHints()
{
- if( !pSwpHints )
- pSwpHints = new SwpHints;
- return *pSwpHints;
+ if ( !m_pSwpHints )
+ {
+ m_pSwpHints = new SwpHints;
+ }
+ return *m_pSwpHints;
+}
+
+inline void SwTxtNode::TryDeleteSwpHints()
+{
+ if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
+ {
+ DELETEZ( m_pSwpHints );
+ }
}
inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const
{
- return (SwTxtFmtColl*)GetRegisteredIn();
+ return static_cast<SwTxtFmtColl*>(const_cast<SwModify*>(GetRegisteredIn()));
}
// fuer den IBM-Compiler nicht inlinen wg. 42876
@@ -841,11 +857,11 @@ inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const
// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
inline SwTxtNode *SwNode::GetTxtNode()
{
- return ND_TEXTNODE == nNodeType ? (SwTxtNode*)this : 0;
+ return ND_TEXTNODE == nNodeType ? static_cast<SwTxtNode*>(this) : 0;
}
inline const SwTxtNode *SwNode::GetTxtNode() const
{
- return ND_TEXTNODE == nNodeType ? (const SwTxtNode*)this : 0;
+ return ND_TEXTNODE == nNodeType ? static_cast<const SwTxtNode*>(this) : 0;
}
#endif
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index df0502ba0cce..2850639db559 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -60,13 +60,10 @@ struct SW_DLLPUBLIC SwPosition
SwNodeIndex nNode;
SwIndex nContent;
- SwPosition( const SwNode& rNode );
- SwPosition( const SwNodeIndex &rNode );
SwPosition( const SwNodeIndex &rNode, const SwIndex &rCntnt );
- /* @@@MAINTAINABILITY-HORROR@@@
- SwPosition desperately needs a constructor
- SwPosition( const SwNode& rNode, xub_StrLen nOffset );
- */
+ explicit SwPosition( const SwNodeIndex &rNode );
+ explicit SwPosition( const SwNode& rNode );
+ explicit SwPosition( SwCntntNode& rNode, const xub_StrLen nOffset = 0 );
SwPosition( const SwPosition & );
SwPosition &operator=(const SwPosition &);
@@ -128,11 +125,11 @@ void _InitPam();
class SW_DLLPUBLIC SwPaM : public Ring
{
- SwPosition aBound1;
- SwPosition aBound2;
- SwPosition *pPoint;
- SwPosition *pMark;
- BOOL bIsInFrontOfLabel;
+ SwPosition m_Bound1;
+ SwPosition m_Bound2;
+ SwPosition * m_pPoint; // points at either m_Bound1 or m_Bound2
+ SwPosition * m_pMark; // points at either m_Bound1 or m_Bound2
+ bool m_bIsInFrontOfLabel;
SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = 0 );
@@ -180,54 +177,66 @@ public:
SwMoveFn fnMove, BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam);
- inline BOOL IsInFrontOfLabel() const { return bIsInFrontOfLabel; }
- inline void _SetInFrontOfLabel( BOOL bNew ) { bIsInFrontOfLabel = bNew; }
+ inline bool IsInFrontOfLabel() const { return m_bIsInFrontOfLabel; }
+ inline void _SetInFrontOfLabel( bool bNew ) { m_bIsInFrontOfLabel = bNew; }
virtual void SetMark();
- void DeleteMark() { pMark = pPoint; }
+
+ void DeleteMark()
+ {
+ if (m_pMark != m_pPoint)
+ {
+ // clear the mark position; this helps if mark's SwIndex is
+ // registered at some node, and that node is then deleted
+ *m_pMark = SwPosition( SwNodeIndex( GetNode()->GetNodes() ) );
+ m_pMark = m_pPoint;
+ }
+ }
+
#ifndef DBG_UTIL
void Exchange()
{
- if(pPoint != pMark)
+ if (m_pPoint != m_pMark)
{
- SwPosition *pTmp = pPoint;
- pPoint = pMark;
- pMark = pTmp;
+ SwPosition *pTmp = m_pPoint;
+ m_pPoint = m_pMark;
+ m_pMark = pTmp;
}
}
#else
void Exchange();
#endif
- /*
- * Undocumented Feature: Liefert zurueck, ob das Pam ueber
- * eine Selektion verfuegt oder nicht. Definition einer
- * Selektion: Point und Mark zeigen auf unterschiedliche
- * Puffer.
+
+ /** A PaM marks a selection if Point and Mark are distinct positions.
+ @return true iff the PaM spans a selection
*/
- BOOL HasMark() const { return pPoint == pMark? FALSE : TRUE; }
+ bool HasMark() const { return m_pPoint == m_pMark ? false : true; }
- const SwPosition *GetPoint() const { return pPoint; }
- SwPosition *GetPoint() { return pPoint; }
- const SwPosition *GetMark() const { return pMark; }
- SwPosition *GetMark() { return pMark; }
+ const SwPosition *GetPoint() const { return m_pPoint; }
+ SwPosition *GetPoint() { return m_pPoint; }
+ const SwPosition *GetMark() const { return m_pMark; }
+ SwPosition *GetMark() { return m_pMark; }
const SwPosition *Start() const
- { return (*pPoint) <= (*pMark)? pPoint: pMark; }
+ { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
SwPosition *Start()
- { return (*pPoint) <= (*pMark)? pPoint: pMark; }
+ { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
+
const SwPosition *End() const
- { return (*pPoint) > (*pMark)? pPoint: pMark; }
+ { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
SwPosition *End()
- { return (*pPoint) > (*pMark)? pPoint: pMark; }
+ { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
- // erfrage vom SwPaM den aktuellen Node/ContentNode am SPoint / Mark
- SwNode* GetNode( BOOL bPoint = TRUE ) const
+ /// @return current Node at Point/Mark
+ SwNode * GetNode ( bool bPoint = true ) const
{
- return &( bPoint ? pPoint->nNode : pMark->nNode ).GetNode();
+ return &( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode();
}
- SwCntntNode* GetCntntNode( BOOL bPoint = TRUE ) const
+
+ /// @return current ContentNode at Point/Mark
+ SwCntntNode* GetCntntNode( bool bPoint = true ) const
{
- return ( bPoint ? pPoint->nNode : pMark->nNode ).GetNode().GetCntntNode();
+ return GetNode(bPoint)->GetCntntNode();
}
/**
@@ -238,12 +247,13 @@ public:
*/
SwPaM & Normalize(BOOL bPointFirst = TRUE);
- // erfrage vom SwPaM das Dokument, in dem er angemeldet ist
- SwDoc* GetDoc() const { return pPoint->nNode.GetNode().GetDoc(); }
- SwPosition& GetBound( BOOL bOne = TRUE )
- { return bOne ? aBound1 : aBound2; }
- const SwPosition& GetBound( BOOL bOne = TRUE ) const
- { return bOne ? aBound1 : aBound2; }
+ /// @return the document (SwDoc) at which the PaM is registered
+ SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); }
+
+ SwPosition& GetBound( bool bOne = true )
+ { return bOne ? m_Bound1 : m_Bound2; }
+ const SwPosition& GetBound( bool bOne = true ) const
+ { return bOne ? m_Bound1 : m_Bound2; }
// erfrage die Seitennummer auf der der Cursor steht
USHORT GetPageNum( BOOL bAtPoint = TRUE, const Point* pLayPos = 0 );
diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx
index f5f511ec18ba..4930ac67c9bf 100644
--- a/sw/inc/postit.hxx
+++ b/sw/inc/postit.hxx
@@ -85,23 +85,21 @@ class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
void implEnsureGeometry();
void implResetGeometry();
- // helpers to paint geometry
- void implDrawGeometry(OutputDevice& rOutputDevice, Color aColor, double fOffX, double fOffY);
- Color implBlendColor(const Color aOriginal, sal_Int16 nChange);
-
- virtual void drawGeometry(OutputDevice& rOutputDevice);
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
// object's geometry
basegfx::B2DPolygon maTriangle;
basegfx::B2DPolygon maLine;
basegfx::B2DPolygon maLineTop;
- LineInfo mLineInfo;
unsigned long mHeight;
- bool mbShadowedEffect;
AnkorState mAnkorState;
+ // bitfield
+ unsigned mbShadowedEffect : 1;
+ unsigned mbLineSolid : 1;
+
public:
SwPostItAnkor(const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rSecondPos,
@@ -111,8 +109,8 @@ class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
const basegfx::B2DPoint& rSixthPos,
const basegfx::B2DPoint& rSeventhPos,
Color aBaseColor,
- const LineInfo &aLineInfo,
- bool bShadowedEffect);
+ bool bShadowedEffect,
+ bool bLineSolid);
virtual ~SwPostItAnkor();
const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
@@ -129,7 +127,8 @@ class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
void SetSixthPosition(const basegfx::B2DPoint& rNew);
void SetSeventhPosition(const basegfx::B2DPoint& rNew);
- void SetLineInfo(const LineInfo &aLineInfo);
+ bool getLineSolid() const { return mbLineSolid; }
+ void setLineSolid(bool bNew);
void SetHeight(const unsigned long aHeight) {mHeight = aHeight;};
@@ -137,12 +136,6 @@ class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
void SetAnkorState(AnkorState aState);
AnkorState GetAnkorState() const {return mAnkorState;}
- virtual void Trigger(sal_uInt32 nTime);
-
- //sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol) const;
- // transform object coordinates. Transforms maBasePosition
- // and invalidates on change
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
};
enum ShadowState {SS_NORMAL, SS_VIEW, SS_EDIT};
@@ -150,8 +143,8 @@ enum ShadowState {SS_NORMAL, SS_VIEW, SS_EDIT};
class SwPostItShadow: public sdr::overlay::OverlayObjectWithBasePosition
{
protected:
- virtual void drawGeometry(OutputDevice& rOutputDevice);
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
basegfx::B2DPoint maSecondPosition;
@@ -167,9 +160,6 @@ class SwPostItShadow: public sdr::overlay::OverlayObjectWithBasePosition
const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
void SetSecondPosition(const basegfx::B2DPoint& rNew);
void SetPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2);
-
- virtual void Trigger(sal_uInt32 nTime);
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
};
class PostItTxt : public Window
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
index 8ba22f410262..253fdbf6640c 100644
--- a/sw/inc/rolbck.hxx
+++ b/sw/inc/rolbck.hxx
@@ -43,7 +43,7 @@
class SwDoc;
class SwFmt;
class SwFmtColl;
-class SwHstryHint;
+class SwHistoryHint;
class SwTxtAttr;
class SfxPoolItem;
class SwTxtNode;
@@ -72,10 +72,12 @@ class SwCharFmt;
#include <IDocumentMarkAccess.hxx>
// <--
+#include <memory>
+
#ifdef DBG_UTIL
class Writer;
-#define OUT_HSTR_HINT( name ) \
- friend Writer& OutUndo_Hstr_ ## name( Writer&, const SwHstryHint& );
+#define OUT_HSTR_HINT( name ) \
+ friend Writer& OutUndo_Hstr_ ## name( Writer&, const SwHistoryHint& );
#else
#define OUT_HSTR_HINT( name )
#endif
@@ -99,169 +101,187 @@ enum HISTORY_HINT {
HSTRY_CHGCHARFMT, // #i27615#
HSTRY_END
};
-class SwHstryHint
+
+class SwHistoryHint
{
- HISTORY_HINT eWhichId;
+ const HISTORY_HINT m_eWhichId;
+
public:
- SwHstryHint( HISTORY_HINT eWh ) : eWhichId( eWh ) {}
- virtual ~SwHstryHint() {} // jetzt inline
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ) = 0;
- HISTORY_HINT Which() const { return eWhichId; }
+ SwHistoryHint( HISTORY_HINT eWhich ) : m_eWhichId( eWhich ) {}
+ virtual ~SwHistoryHint() {}
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) = 0;
+ HISTORY_HINT Which() const { return m_eWhichId; }
virtual String GetDescription() const;
};
-class SwSetFmtHint : public SwHstryHint
+class SwHistorySetFmt : public SwHistoryHint
{
- SfxPoolItem* pAttr;
- ULONG nNode;
+ ::std::auto_ptr<SfxPoolItem> m_pAttr;
+ const ULONG m_nNodeIndex;
+
public:
- SwSetFmtHint( const SfxPoolItem* pFmtHt, ULONG nNode );
- virtual ~SwSetFmtHint();
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNode );
+ virtual ~SwHistorySetFmt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
virtual String GetDescription() const;
OUT_HSTR_HINT(SetFmtHnt)
};
-class SwResetFmtHint : public SwHstryHint
+class SwHistoryResetFmt : public SwHistoryHint
{
- ULONG nNode;
- USHORT nWhich;
+ const ULONG m_nNodeIndex;
+ const USHORT m_nWhich;
+
public:
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
- SwResetFmtHint( const SfxPoolItem* pFmtHt, ULONG nNodeIdx );
+ SwHistoryResetFmt( const SfxPoolItem* pFmtHt, ULONG nNodeIdx );
// <--
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
OUT_HSTR_HINT(ResetFmtHnt)
};
-class SwSetTxtHint : public SwHstryHint
+class SwHistorySetTxt : public SwHistoryHint
{
- SfxPoolItem *pAttr;
- ULONG nNode;
- xub_StrLen nStart, nEnd;
+ ::std::auto_ptr<SfxPoolItem> m_pAttr;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
public:
- SwSetTxtHint( /*const*/ SwTxtAttr* pTxtHt, ULONG nNode );
- virtual ~SwSetTxtHint();
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNode );
+ virtual ~SwHistorySetTxt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
OUT_HSTR_HINT(SetTxtHnt)
};
-class SwSetTxtFldHint : public SwHstryHint
+class SwHistorySetTxtFld : public SwHistoryHint
{
- SwFmtFld* pFld;
- SwFieldType* pFldType;
- ULONG nNode;
- xub_StrLen nPos;
- USHORT nFldWhich;
+ ::std::auto_ptr<SwFieldType> m_pFldType;
+ const ::std::auto_ptr<SwFmtFld> m_pFld;
+ ULONG m_nNodeIndex;
+ xub_StrLen m_nPos;
+ USHORT m_nFldWhich;
+
public:
- SwSetTxtFldHint( SwTxtFld* pTxtFld, ULONG nNode );
- virtual ~SwSetTxtFldHint();
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNode );
+ virtual ~SwHistorySetTxtFld();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
virtual String GetDescription() const;
OUT_HSTR_HINT(SetTxtFldHnt)
};
-class SwSetRefMarkHint : public SwHstryHint
+class SwHistorySetRefMark : public SwHistoryHint
{
- String aRefName;
- ULONG nNode;
- xub_StrLen nStart, nEnd;
+ const String m_RefName;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
public:
- SwSetRefMarkHint( SwTxtRefMark* pTxtHt, ULONG nNode );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
OUT_HSTR_HINT(SetRefMarkHnt)
};
-class SwSetTOXMarkHint : public SwHstryHint
+class SwHistorySetTOXMark : public SwHistoryHint
{
- String aTOXName;
- TOXTypes eTOXTypes;
- SwTOXMark aTOXMark;
- ULONG nNode;
- xub_StrLen nStart, nEnd;
+ SwTOXMark m_TOXMark;
+ const String m_TOXName;
+ const TOXTypes m_eTOXTypes;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
public:
- SwSetTOXMarkHint( SwTxtTOXMark* pTxtHt, ULONG nNode );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
int IsEqual( const SwTOXMark& rCmp ) const;
+
OUT_HSTR_HINT(SetToxMarkHnt)
};
-class SwResetTxtHint : public SwHstryHint
+class SwHistoryResetTxt : public SwHistoryHint
{
- ULONG nNode;
- xub_StrLen nStart, nEnd;
- USHORT nAttr;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+ const USHORT m_nAttr;
+
public:
- SwResetTxtHint( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd, ULONG nNode );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistoryResetTxt( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd,
+ ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ USHORT GetWhich() const { return m_nAttr; }
+ ULONG GetNode() const { return m_nNodeIndex; }
+ xub_StrLen GetCntnt() const { return m_nStart; }
- USHORT GetWhich() const { return nAttr; }
- ULONG GetNode() const { return nNode; }
- xub_StrLen GetCntnt() const { return nStart; }
OUT_HSTR_HINT(ResetTxtHnt)
};
-class SwSetFtnHint : public SwHstryHint
+class SwHistorySetFootnote : public SwHistoryHint
{
- String aFtnStr;
- SwUndoSaveSection* pUndo;
- ULONG nNode;
- xub_StrLen nStart;
- BOOL bEndNote;
+ const ::std::auto_ptr<SwUndoSaveSection> m_pUndo;
+ const String m_FootnoteNumber;
+ ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const bool m_bEndNote;
+
public:
- SwSetFtnHint( SwTxtFtn* pTxtFtn, ULONG nNode );
- SwSetFtnHint( const SwTxtFtn& );
- ~SwSetFtnHint();
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNode );
+ SwHistorySetFootnote( const SwTxtFtn& );
+ virtual ~SwHistorySetFootnote();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
virtual String GetDescription() const;
OUT_HSTR_HINT(SetFtnHnt)
};
-class SwChgFmtColl : public SwHstryHint
+class SwHistoryChangeFmtColl : public SwHistoryHint
{
- const SwFmtColl* pColl;
- ULONG nNode;
- BYTE nNdWhich;
- // --> OD 2007-07-09 #i77372#
- // adjust (naming and type) and extend (add <mbIsCounted>) numbering attributes
- int mnNumLvl;
- bool mbIsRestart;
- SwNumberTree::tSwNumTreeNumber mnRestartVal;
- bool mbIsCounted;
- // <--
+ SwFmtColl * const m_pColl;
+ const ULONG m_nNodeIndex;
+ const BYTE m_nNodeType;
+
public:
- SwChgFmtColl( const SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
- OUT_HSTR_HINT(ChgFmtColl)
+ SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(ChangeFmtColl)
};
-class SwHstryTxtFlyCnt : public SwHstryHint
+class SwHistoryTxtFlyCnt : public SwHistoryHint
{
- SwUndoDelLayFmt* pUndo;
+ ::std::auto_ptr<SwUndoDelLayFmt> m_pUndo;
+
public:
- SwHstryTxtFlyCnt( SwTxtFlyCnt* pTxtFly ); // fuer Zeichengebundene
- SwHstryTxtFlyCnt( SwFlyFrmFmt* pFlyFmt ); // fuer Absatzgebundene
- ~SwHstryTxtFlyCnt();
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
- SwUndoDelLayFmt* GetUDelLFmt() { return pUndo; }
+ SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt );
+ virtual ~SwHistoryTxtFlyCnt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ SwUndoDelLayFmt* GetUDelLFmt() { return m_pUndo.get(); }
+
OUT_HSTR_HINT(FlyCnt)
};
-class SwHstryBookmark : public SwHstryHint
+class SwHistoryBookmark : public SwHistoryHint
{
public:
- SwHstryBookmark(const ::sw::mark::IMark& rBkmk, bool bSavePos, bool bSaveOtherPos);
- virtual void SetInDoc(SwDoc * pDoc, BOOL);
- OUT_HSTR_HINT(Bookmark)
+ SwHistoryBookmark(const ::sw::mark::IMark& rBkmk,
+ bool bSavePos, bool bSaveOtherPos);
+ virtual void SetInDoc(SwDoc * pDoc, bool);
- BOOL IsEqualBookmark(const ::sw::mark::IMark& rBkmk);
+ bool IsEqualBookmark(const ::sw::mark::IMark& rBkmk);
const ::rtl::OUString& GetName() const;
+
+ OUT_HSTR_HINT(Bookmark)
+
private:
const ::rtl::OUString m_aName;
::rtl::OUString m_aShortName;
@@ -276,129 +296,135 @@ class SwHstryBookmark : public SwHstryHint
const IDocumentMarkAccess::MarkType m_eBkmkType;
};
-class SwHstrySetAttrSet : public SwHstryHint
+class SwHistorySetAttrSet : public SwHistoryHint
{
- SfxItemSet aOldSet;
- SvUShorts aResetArr;
- ULONG nNode;
- // --> OD 2007-07-09 #i77372#
- // adjust (naming and type) and extend (add <mbIsCounted>) numbering attributes
- int mnNumLvl;
- bool mbIsRestart;
- SwNumberTree::tSwNumTreeNumber mnRestartVal;
- bool mbIsCounted;
- // <--
+ SfxItemSet m_OldSet;
+ SvUShorts m_ResetArray;
+ const ULONG m_nNodeIndex;
+
public:
- SwHstrySetAttrSet( const SfxItemSet& rSet, ULONG nNode,
- const SvUShortsSort& rSetArr );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistorySetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ const SvUShortsSort& rSetArr );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
OUT_HSTR_HINT(SetAttrSet)
};
-class SwHstryResetAttrSet : public SwHstryHint
+class SwHistoryResetAttrSet : public SwHistoryHint
{
- ULONG nNode;
- xub_StrLen nStart, nEnd;
- SvUShorts aArr;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+ SvUShorts m_Array;
+
public:
- SwHstryResetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ SwHistoryResetAttrSet( const SfxItemSet& rSet, ULONG nNode,
xub_StrLen nStt = STRING_MAXLEN,
xub_StrLen nEnd = STRING_MAXLEN );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ const SvUShorts& GetArr() const { return m_Array; }
+ ULONG GetNode() const { return m_nNodeIndex; }
+ xub_StrLen GetCntnt() const { return m_nStart; }
- const SvUShorts& GetArr() const { return aArr; }
- ULONG GetNode() const { return nNode; }
- xub_StrLen GetCntnt() const { return nStart; }
OUT_HSTR_HINT(ResetAttrSet)
};
-class SwHstryChgFlyAnchor : public SwHstryHint
+class SwHistoryChangeFlyAnchor : public SwHistoryHint
{
- SwFrmFmt* pFmt;
- ULONG nOldPos;
- xub_StrLen nOldCnt;
+ SwFrmFmt & m_rFmt;
+ const ULONG m_nOldNodeIndex;
+ const xub_StrLen m_nOldContentIndex;
+
public:
- SwHstryChgFlyAnchor( const SwFrmFmt& rFmt );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
-class SwHstryChgFlyChain : public SwHstryHint
+class SwHistoryChangeFlyChain : public SwHistoryHint
{
- SwFlyFrmFmt *pPrevFmt, *pNextFmt, *pFlyFmt;
+ SwFlyFrmFmt * const m_pPrevFmt;
+ SwFlyFrmFmt * const m_pNextFmt;
+ SwFlyFrmFmt * const m_pFlyFmt;
+
public:
- SwHstryChgFlyChain( const SwFlyFrmFmt& rFmt, const SwFmtChain& rAttr );
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistoryChangeFlyChain( SwFlyFrmFmt& rFmt, const SwFmtChain& rAttr );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
// #i27615#
-class SwHstryChgCharFmt : public SwHstryHint
+class SwHistoryChangeCharFmt : public SwHistoryHint
{
- SfxItemSet aOldSet;
- String sFmt;
+ const SfxItemSet m_OldSet;
+ const String m_Fmt;
+
public:
- SwHstryChgCharFmt( const SfxItemSet& rSet, const String & sFmt);
- virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet );
+ SwHistoryChangeCharFmt( const SfxItemSet& rSet, const String & sFmt);
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
OUT_HSTR_HINT(SetAttrSet)
};
#endif
-typedef SwHstryHint* SwHstryHintPtr;
-SV_DECL_PTRARR_DEL( SwpHstry, SwHstryHintPtr, 0, 2 )
+typedef SwHistoryHint* SwHistoryHintPtr;
+SV_DECL_PTRARR_DEL( SwpHstry, SwHistoryHintPtr, 0, 2 )
-class SwHistory : private SwpHstry
+class SwHistory
{
- friend class SwDoc; // eig. darf nur SwDoc::DelUndoObj zugreifen
- friend class SwUndoWriter; // fuer den Undo/Redo-Writer
- friend class SwRegHistory; // fuer Insert, von Histoy-Attributen
+ friend class SwDoc; // actually only SwDoc::DelUndoObj may access
+ friend class SwUndoWriter; // for Undo/Redo Writer
+ friend class SwRegHistory; // for inserting History attributes
+
+ SwpHstry m_SwpHstry;
+ USHORT m_nEndDiff;
- USHORT nEndDiff;
public:
SwHistory( USHORT nInitSz = 0, USHORT nGrowSz = 2 );
~SwHistory();
- // loesche die History ab Start bis zum Ende
+
+ // delete History from nStart to array end
void Delete( USHORT nStart = 0 );
- // alle Objecte zwischen nStart und Array-Ende aufrufen und loeschen
- BOOL Rollback( SwDoc* pDoc, USHORT nStart = 0 );
- // alle Objecte zwischen nStart und temporaeren Ende aufrufen und
- // den Start als temporaeres Ende speichern
- BOOL TmpRollback( SwDoc* pDoc, USHORT nStart, BOOL ToFirst = TRUE );
+ // call and delete all objects between nStart and array end
+ bool Rollback( SwDoc* pDoc, USHORT nStart = 0 );
+ // call all objects between nStart and TmpEnd; store nStart as TmpEnd
+ bool TmpRollback( SwDoc* pDoc, USHORT nStart, bool ToFirst = true );
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
ULONG nNodeIdx );
// <--
- void Add( const SwTxtAttr* pTxtHt, ULONG nNodeIdx,
- BOOL bNewAttr = TRUE );
- void Add( const SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd );
+ void Add( SwTxtAttr* pTxtHt, ULONG nNodeIdx, bool bNewAttr = true );
+ void Add( SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd );
void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos );
- void Add( const SwFrmFmt& rFmt );
- void Add( const SwFlyFrmFmt&, USHORT& rSetPos );
+ void Add( SwFrmFmt& rFmt );
+ void Add( SwFlyFrmFmt&, USHORT& rSetPos );
void Add( const SwTxtFtn& );
void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt); // #i27615#
- USHORT Count() const { return SwpHstry::Count(); }
- USHORT GetTmpEnd() const { return SwpHstry::Count() - nEndDiff; }
- USHORT SetTmpEnd( USHORT nTmpEnd ); // returne alten Wert
- SwHstryHint* operator[]( USHORT nPos ) const { return SwpHstry::operator[](nPos); }
+ USHORT Count() const { return m_SwpHstry.Count(); }
+ USHORT GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
+ USHORT SetTmpEnd( USHORT nTmpEnd ); // return previous value
+ SwHistoryHint * operator[]( USHORT nPos ) { return m_SwpHstry[nPos]; }
+ SwHistoryHint const* operator[]( USHORT nPos ) const
+ { return m_SwpHstry[nPos]; }
- // fuer SwUndoDelete::Undo/Redo
+ // for SwUndoDelete::Undo/Redo
void Move( USHORT nPos, SwHistory *pIns,
- USHORT nStart = 0, USHORT nEnd = USHRT_MAX )
+ USHORT nStart = 0, USHORT nEnd = USHRT_MAX )
{
- SwpHstry::Insert( pIns, nPos, nStart, nEnd );
- SwpHstry* pDel = pIns;
- pDel->Remove( nStart, nEnd == USHRT_MAX
- ? pDel->Count() - nStart
- : nEnd );
+ m_SwpHstry.Insert( &pIns->m_SwpHstry, nPos, nStart, nEnd );
+ pIns->m_SwpHstry.Remove( nStart, (nEnd == USHRT_MAX)
+ ? pIns->Count() - nStart
+ : nEnd );
}
- // Hilfs-Methoden zum Sichern von Attributen in der History.
- // Wird von UndoKlasse benutzt (Delete/Overwrite/Inserts)
- void CopyAttr( const SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStt,
- xub_StrLen nEnd, BOOL bFields );
+ // helper methods for recording attribute in History
+ // used by Undo classes (Delete/Overwrite/Inserts)
+ void CopyAttr( SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStart,
+ xub_StrLen nEnd, bool bFields );
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx );
// <--
@@ -408,11 +434,13 @@ public:
class SwRegHistory : public SwClient
{
- SvUShortsSort aSetWhichIds;
- SwHistory* pHstry;
- ULONG nNodeIdx;
+private:
+ SvUShortsSort m_WhichIdSet;
+ SwHistory * const m_pHistory;
+ ULONG m_nNodeIndex;
void _MakeSetWhichIds();
+
public:
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
SwRegHistory( SwHistory* pHst );
@@ -424,10 +452,10 @@ public:
SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst );
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
- void Add( SwTxtAttr* pHt, const BOOL bNew = FALSE );
+ void AddHint( SwTxtAttr* pHt, const bool bNew = false );
void RegisterInModify( SwModify* pRegIn, const SwNode& rNd );
- void ChangeNodeIndex( ULONG nNew ) { nNodeIdx = nNew; }
+ void ChangeNodeIndex( ULONG nNew ) { m_nNodeIndex = nNew; }
};
#endif
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index eb6c0361cced..c530c8280870 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -128,7 +128,7 @@ public:
const String& GetName() const { return sSectionNm; }
void SetName( const String& rName ) { sSectionNm = rName; }
- SectionType GetType() const { return eType; }
+ SectionType GetType() const { return eType; }
void SetType( SectionType eNew ) { eType = eNew; }
SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; }
diff --git a/sw/inc/segdefs_.hxx b/sw/inc/segdefs_.hxx
deleted file mode 100644
index 7e4b36c657f4..000000000000
--- a/sw/inc/segdefs_.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: segdefs_.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 866bb36b79e3..6233156eb9a9 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -514,8 +514,8 @@ public:
SvPtrarr& rArr );
// lege einen neuen PaM an der Position an
- SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
- BOOL bNodesArray = TRUE ) const;
+ static SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
+ BOOL bNodesArray = TRUE );
// kopiere ggfs. eine lokale Datei ins Internet
BOOL CopyLocalFileToINet( String& rFileNm );
diff --git a/sw/inc/segdefs.hxx b/sw/inc/sw_primitivetypes2d.hxx
index 3ef806270595..1a2a9dadbe70 100644
--- a/sw/inc/segdefs.hxx
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -6,8 +6,9 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: segdefs.hxx,v $
- * $Revision: 1.3 $
+ * $RCSfile: sd_primitivetypes2d.hxx,v $
+ *
+ * $Revision: 1.2 $
*
* This file is part of OpenOffice.org.
*
@@ -27,4 +28,23 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "segdefs_.hxx"
+
+#ifndef INCLUDED_SW_PRIMITIVETYPES2D_HXX
+#define INCLUDED_SW_PRIMITIVETYPES2D_HXX
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVETYPES2D_HXX
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0)
+#define PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
+#define PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2)
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // INCLUDED_SW_PRIMITIVETYPES2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 8dd654c4034a..42597cb62559 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -35,11 +35,6 @@
#include <cshtyp.hxx>
-class SwShellCrsr;
-class SwShellTableCrsr;
-class SwTableCursor;
-class SwUnoCrsr;
-class SwUnoTableCrsr;
struct _SwCursor_SavePos;
namespace com { namespace sun { namespace star { namespace util {
@@ -89,6 +84,11 @@ protected:
const _SwCursor_SavePos* GetSavePos() const { return pSavePos; }
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ virtual void DoSetBidiLevelUpDown();
+ virtual bool IsSelOvrCheck(int eFlags);
+
public:
// single argument ctors shall be explicit.
SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel );
@@ -105,18 +105,6 @@ public:
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
- virtual operator SwShellCrsr* ();
- virtual operator SwShellTableCrsr* ();
- virtual operator SwTableCursor* ();
- virtual operator SwUnoCrsr* ();
- virtual operator SwUnoTableCrsr* ();
-
- inline operator const SwShellCrsr* () const;
- inline operator const SwShellTableCrsr* () const;
- inline operator const SwTableCursor* () const;
- inline operator const SwUnoCrsr* () const;
- inline operator const SwUnoTableCrsr* () const;
-
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
@@ -178,8 +166,8 @@ public:
BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
BOOL GoStartSentence(){return GoSentence(START_SENT);}
- BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden,
- BOOL bInsertCrsr );
+ virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
+ BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
BOOL UpDown( BOOL bUp, USHORT nCnt, Point* pPt, long nUpDownX );
BOOL LeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE );
BOOL IsAtLeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ) const;
@@ -192,7 +180,7 @@ public:
{ return LeftRight( FALSE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
BOOL GoNextCell( USHORT nCnt = 1 ) { return GoPrevNextCell( TRUE, nCnt ); }
BOOL GoPrevCell( USHORT nCnt = 1 ) { return GoPrevNextCell( FALSE, nCnt ); }
- BOOL GotoTable( const String& rName );
+ virtual BOOL GotoTable( const String& rName );
BOOL GotoTblBox( const String& rName );
BOOL GotoRegion( const String& rName );
BOOL GotoFtnAnchor();
@@ -224,7 +212,10 @@ public:
virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
// darf der Cursor in ReadOnlyBereiche?
- BOOL IsReadOnlyAvailable() const;
+ virtual bool IsReadOnlyAvailable() const;
+
+ virtual BOOL IsSkipOverProtectSections() const;
+ virtual BOOL IsSkipOverHiddenSections() const;
BYTE GetCrsrBidiLevel() const { return nCursorBidiLevel; }
void SetCrsrBidiLevel( BYTE nNewLevel ) { nCursorBidiLevel = nNewLevel; }
@@ -275,12 +266,16 @@ protected:
BOOL bChg : 1;
BOOL bParked : 1; // Tabellen-Cursor wurde geparkt
+ virtual bool IsSelOvrCheck(int eFlags);
+
public:
SwTableCursor( const SwPosition &rPos, SwPaM* pRing = 0 );
SwTableCursor( SwTableCursor& );
virtual ~SwTableCursor();
- virtual operator SwTableCursor* ();
+ virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
+ BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
+ virtual BOOL GotoTable( const String& rName );
void InsertBox( const SwTableBox& rTblBox );
void DeleteBox( USHORT nPos ) { aSelBoxes.Remove( nPos ); bChg = TRUE; }
@@ -313,34 +308,5 @@ public:
void ActualizeSelection( const SwSelBoxes &rBoxes );
};
-
-// --------------------------- inline Methoden ----------------------
-
-inline SwCursor::operator const SwShellCrsr* () const
-{
- return (SwShellCrsr*)*((SwCursor*)this);
-}
-
-inline SwCursor::operator const SwShellTableCrsr* () const
-{
- return (SwShellTableCrsr*)*((SwCursor*)this);
-}
-
-inline SwCursor::operator const SwTableCursor* () const
-{
- return (SwTableCursor*)*((SwCursor*)this);
-}
-
-inline SwCursor::operator const SwUnoCrsr* () const
-{
- return (SwUnoCrsr*)*((SwCursor*)this);
-}
-
-inline SwCursor::operator const SwUnoTableCrsr* () const
-{
- return (SwUnoTableCrsr*)*((SwCursor*)this);
-}
-
-
#endif
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index 3c5fdec1e739..ce997cc3f43d 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -156,7 +156,11 @@ enum SwUndoId
UNDO_ROW_DELETE, // 109
UNDO_RENAME_PAGEDESC, // 110
UNDO_NUMDOWN, // 111
- UNDO_STD_END= UNDO_NUMDOWN,
+ // --> OD 2009-07-16 #i73249#
+ UNDO_FLYFRMFMT_TITLE, // 112
+ UNDO_FLYFRMFMT_DESCRIPTION, // 113
+ // <--
+ UNDO_STD_END= UNDO_FLYFRMFMT_DESCRIPTION,
// UI undo ID's...
UNDO_UI_REPLACE = UNDO_STD_END + 1,
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 45bacf92eb5c..90602a7b941c 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -29,11 +29,15 @@
************************************************************************/
#ifndef _TXATBASE_HXX
#define _TXATBASE_HXX
+
#include <tools/solar.h>
#include <svtools/poolitem.hxx>
#include <hintids.hxx>
#include <errhdl.hxx>
+#include <boost/utility.hpp>
+
+
class SfxItemPool;
class SvxBrushItem;
class SvxFontItem;
@@ -76,28 +80,29 @@ class SwFmtFlyCnt;
class SwTOXMark;
class SwFmtRefMark;
-class SwTxtAttr
+class SwTxtAttr : private boost::noncopyable
{
- const SfxPoolItem* pAttr;
- xub_StrLen nStart;
- BOOL bDontExpand : 1;
- BOOL bLockExpandFlag : 1;
+ const SfxPoolItem* m_pAttr;
+ xub_StrLen m_nStart;
+ bool m_bDontExpand : 1;
+ bool m_bLockExpandFlag : 1;
+
+ bool m_bDontMergeAttr : 1; // refmarks, toxmarks, ruby
+ bool m_bDontMoveAttr : 1; // refmarks, toxmarks
+ bool m_bCharFmtAttr : 1; // charfmt, inet
+ bool m_bOverlapAllowedAttr : 1; // refmarks, toxmarks
+ bool m_bPriorityAttr : 1; // attribute has priority (redlining)
+ bool m_bDontExpandStart : 1; // don't expand start at paragraph start (ruby)
- BOOL bDontMergeAttr : 1; // refmarks, toxmarks, ruby
- BOOL bDontMoveAttr : 1; // refmarks, toxmarks
- BOOL bCharFmtAttr : 1; // charfmt, inet
- BOOL bOverlapAllowedAttr : 1; // refmarks, toxmarks
- BOOL bPriorityAttr : 1; // attribute has priority (redlining)
- BOOL bDontExpandStart : 1; // don't expand start at paragraph start (ruby)
protected:
SwTxtAttr( const SfxPoolItem& rAttr, xub_StrLen nStart );
- void SetLockExpandFlag( BOOL bFlag ) { bLockExpandFlag = bFlag; }
- void SetDontMergeAttr( BOOL bFlag ) { bDontMergeAttr = bFlag; }
- void SetDontMoveAttr( BOOL bFlag ) { bDontMoveAttr = bFlag; }
- void SetCharFmtAttr( BOOL bFlag ) { bCharFmtAttr = bFlag; }
- void SetOverlapAllowedAttr( BOOL bFlag ){ bOverlapAllowedAttr = bFlag; }
- void SetDontExpandStartAttr(BOOL bFlag) { bDontExpandStart = bFlag; }
+ void SetLockExpandFlag( bool bFlag ) { m_bLockExpandFlag = bFlag; }
+ void SetDontMergeAttr( bool bFlag ) { m_bDontMergeAttr = bFlag; }
+ void SetDontMoveAttr( bool bFlag ) { m_bDontMoveAttr = bFlag; }
+ void SetCharFmtAttr( bool bFlag ) { m_bCharFmtAttr = bFlag; }
+ void SetOverlapAllowedAttr( bool bFlag ){ m_bOverlapAllowedAttr = bFlag; }
+ void SetDontExpandStartAttr(bool bFlag) { m_bDontExpandStart = bFlag; }
public:
virtual ~SwTxtAttr();
@@ -105,25 +110,26 @@ public:
// RemoveFromPool muss immer vorm DTOR Aufruf erfolgen!!
void RemoveFromPool( SfxItemPool& rPool );
- // Start Position erfragen
- xub_StrLen* GetStart() { return &nStart; }
- const xub_StrLen* GetStart() const { return &nStart; }
+ /// start position
+ xub_StrLen* GetStart() { return & m_nStart; }
+ const xub_StrLen* GetStart() const { return & m_nStart; }
- // End Position erfragen
+ /// end position
virtual xub_StrLen* GetEnd();
inline const xub_StrLen* GetEnd() const;
+ /// end (if available), else start
inline const xub_StrLen* GetAnyEnd() const;
- inline void SetDontExpand( BOOL bNew );
- BOOL DontExpand() const { return bDontExpand; }
- BOOL IsLockExpandFlag() const { return bLockExpandFlag; }
- BOOL IsDontMergeAttr() const { return bDontMergeAttr; }
- BOOL IsDontMoveAttr() const { return bDontMoveAttr; }
- BOOL IsCharFmtAttr() const { return bCharFmtAttr; }
- BOOL IsOverlapAllowedAttr() const { return bOverlapAllowedAttr; }
- BOOL IsPriorityAttr() const { return bPriorityAttr; }
- void SetPriorityAttr( BOOL bFlag ) { bPriorityAttr = bFlag; }
- BOOL IsDontExpandStartAttr() const { return bDontExpandStart; }
+ inline void SetDontExpand( bool bDontExpand );
+ bool DontExpand() const { return m_bDontExpand; }
+ bool IsLockExpandFlag() const { return m_bLockExpandFlag; }
+ bool IsDontMergeAttr() const { return m_bDontMergeAttr; }
+ bool IsDontMoveAttr() const { return m_bDontMoveAttr; }
+ bool IsCharFmtAttr() const { return m_bCharFmtAttr; }
+ bool IsOverlapAllowedAttr() const { return m_bOverlapAllowedAttr; }
+ bool IsPriorityAttr() const { return m_bPriorityAttr; }
+ void SetPriorityAttr( bool bFlag ) { m_bPriorityAttr = bFlag; }
+ bool IsDontExpandStartAttr() const { return m_bDontExpandStart; }
inline const SfxPoolItem& GetAttr() const;
inline USHORT Which() const { return GetAttr().Which(); }
@@ -170,9 +176,6 @@ public:
inline const SvxCharReliefItem &GetCharRelief() const;
inline const SvxCharHiddenItem &GetCharHidden() const;
-private:
- SwTxtAttr( const SwTxtAttr& );
- SwTxtAttr& operator=( const SwTxtAttr& );
};
class SwTxtAttrEnd : public SwTxtAttr
@@ -180,7 +183,7 @@ class SwTxtAttrEnd : public SwTxtAttr
using SwTxtAttr::GetEnd;
protected:
- xub_StrLen nEnd;
+ xub_StrLen m_nEnd;
public:
SwTxtAttrEnd( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
@@ -193,258 +196,297 @@ public:
inline const xub_StrLen* SwTxtAttr::GetEnd() const
{
- return ((SwTxtAttr*)this)->GetEnd();
+ return const_cast<SwTxtAttr * >(this)->GetEnd();
}
inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const
{
const xub_StrLen* pEnd = GetEnd();
- return pEnd ? pEnd : &nStart;
+ return pEnd ? pEnd : GetStart();
}
inline const SfxPoolItem& SwTxtAttr::GetAttr() const
{
- ASSERT( pAttr, "wo ist mein Attribut?" );
- return *pAttr;
+ ASSERT( m_pAttr, "SwTxtAttr: where is my attribute?" );
+ return *m_pAttr;
}
-inline void SwTxtAttr::SetDontExpand( BOOL bNew )
+inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
{
- if( !bLockExpandFlag )
- bDontExpand = bNew;
+ if ( !m_bLockExpandFlag )
+ {
+ m_bDontExpand = bDontExpand;
+ }
}
inline const SvxFontItem& SwTxtAttr::GetFont() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_FONT, "Falsche Abfrage" );
- return (const SvxFontItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_FONT, "Wrong attribute" );
+ return (const SvxFontItem&)(*m_pAttr);
}
inline const SvxPostureItem& SwTxtAttr::GetPosture() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_POSTURE, "Falsche Abfrage" );
- return (const SvxPostureItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_POSTURE,
+ "Wrong attribute" );
+ return (const SvxPostureItem&)(*m_pAttr);
}
inline const SvxWeightItem& SwTxtAttr::GetWeight() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_WEIGHT, "Falsche Abfrage" );
- return (const SvxWeightItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_WEIGHT,
+ "Wrong attribute" );
+ return (const SvxWeightItem&)(*m_pAttr);
}
inline const SvxUnderlineItem& SwTxtAttr::GetUnderline() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_UNDERLINE, "Falsche Abfrage" );
- return (const SvxUnderlineItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_UNDERLINE,
+ "Wrong attribute" );
+ return (const SvxUnderlineItem&)(*m_pAttr);
}
inline const SvxOverlineItem& SwTxtAttr::GetOverline() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_OVERLINE, "Falsche Abfrage" );
- return (const SvxOverlineItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_OVERLINE,
+ "Wrong attribute" );
+ return (const SvxOverlineItem&)(*m_pAttr);
}
inline const SvxFontHeightItem& SwTxtAttr::GetFontSize() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_FONTSIZE, "Falsche Abfrage" );
- return (const SvxFontHeightItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_FONTSIZE,
+ "Wrong attribute" );
+ return (const SvxFontHeightItem&)(*m_pAttr);
}
inline const SvxPropSizeItem& SwTxtAttr::GetPropSize() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_PROPORTIONALFONTSIZE, "Falsche Abfrage" );
- return (const SvxPropSizeItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_PROPORTIONALFONTSIZE,
+ "Wrong attribute" );
+ return (const SvxPropSizeItem&)(*m_pAttr);
}
inline const SvxShadowedItem& SwTxtAttr::GetShadowed() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_SHADOWED, "Falsche Abfrage" );
- return (const SvxShadowedItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_SHADOWED,
+ "Wrong attribute" );
+ return (const SvxShadowedItem&)(*m_pAttr);
}
inline const SvxAutoKernItem& SwTxtAttr::GetAutoKern() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_AUTOKERN, "Falsche Abfrage" );
- return (const SvxAutoKernItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_AUTOKERN,
+ "Wrong attribute" );
+ return (const SvxAutoKernItem&)(*m_pAttr);
}
inline const SvxWordLineModeItem& SwTxtAttr::GetWordLineMode() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_WORDLINEMODE, "Falsche Abfrage" );
- return (const SvxWordLineModeItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_WORDLINEMODE,
+ "Wrong attribute" );
+ return (const SvxWordLineModeItem&)(*m_pAttr);
}
inline const SvxContourItem& SwTxtAttr::GetContour() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CONTOUR, "Falsche Abfrage" );
- return (const SvxContourItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CONTOUR,
+ "Wrong attribute" );
+ return (const SvxContourItem&)(*m_pAttr);
}
inline const SvxCrossedOutItem& SwTxtAttr::GetCrossedOut() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CROSSEDOUT, "Falsche Abfrage" );
- return (const SvxCrossedOutItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CROSSEDOUT,
+ "Wrong attribute" );
+ return (const SvxCrossedOutItem&)(*m_pAttr);
}
inline const SvxColorItem& SwTxtAttr::GetColor() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_COLOR, "Falsche Abfrage" );
- return (const SvxColorItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_COLOR,
+ "Wrong attribute" );
+ return (const SvxColorItem&)(*m_pAttr);
}
inline const SvxCharSetColorItem& SwTxtAttr::GetCharSetColor() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CHARSETCOLOR, "Falsche Abfrage" );
- return (const SvxCharSetColorItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CHARSETCOLOR,
+ "Wrong attribute" );
+ return (const SvxCharSetColorItem&)(*m_pAttr);
}
inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_CHARFMT, "Falsche Abfrage" );
- return (const SwFmtCharFmt&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT,
+ "Wrong attribute" );
+ return (const SwFmtCharFmt&)(*m_pAttr);
}
inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_AUTOFMT, "Wrong request" );
- return (const SwFmtAutoFmt&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT,
+ "Wrong attribute" );
+ return (const SwFmtAutoFmt&)(*m_pAttr);
}
inline const SvxKerningItem& SwTxtAttr::GetKerning() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_KERNING, "Falsche Abfrage" );
- return (const SvxKerningItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_KERNING,
+ "Wrong attribute" );
+ return (const SvxKerningItem&)(*m_pAttr);
}
inline const SvxCaseMapItem& SwTxtAttr::GetCaseMap() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CASEMAP, "Falsche Abfrage" );
- return (const SvxCaseMapItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CASEMAP,
+ "Wrong attribute" );
+ return (const SvxCaseMapItem&)(*m_pAttr);
}
inline const SvxLanguageItem& SwTxtAttr::GetLanguage() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_LANGUAGE, "Falsche Abfrage" );
- return (const SvxLanguageItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_LANGUAGE,
+ "Wrong attribute" );
+ return (const SvxLanguageItem&)(*m_pAttr);
}
inline const SvxEscapementItem& SwTxtAttr::GetEscapement() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_ESCAPEMENT, "Falsche Abfrage" );
- return (const SvxEscapementItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_ESCAPEMENT,
+ "Wrong attribute" );
+ return (const SvxEscapementItem&)(*m_pAttr);
}
inline const SvxBlinkItem& SwTxtAttr::GetBlink() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_BLINK, "Falsche Abfrage" );
- return (const SvxBlinkItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_BLINK,
+ "Wrong attribute" );
+ return (const SvxBlinkItem&)(*m_pAttr);
}
inline const SvxBrushItem& SwTxtAttr::GetChrBackground() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_BACKGROUND, "Falsche Abfrage" );
- return (const SvxBrushItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_BACKGROUND,
+ "Wrong attribute" );
+ return (const SvxBrushItem&)(*m_pAttr);
}
inline const SvxNoHyphenItem& SwTxtAttr::GetNoHyphenHere() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_NOHYPHEN, "Falsche Abfrage" );
- return (const SvxNoHyphenItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_NOHYPHEN,
+ "Wrong attribute" );
+ return (const SvxNoHyphenItem&)(*m_pAttr);
}
inline const SwFmtSoftHyph& SwTxtAttr::GetSoftHyph() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_SOFTHYPH, "Falsche Abfrage" );
- return (const SwFmtSoftHyph&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_SOFTHYPH,
+ "Wrong attribute" );
+ return (const SwFmtSoftHyph&)(*m_pAttr);
}
inline const SwFmtHardBlank& SwTxtAttr::GetHardBlank() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_HARDBLANK, "Falsche Abfrage" );
- return (const SwFmtHardBlank&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_HARDBLANK,
+ "Wrong attribute" );
+ return (const SwFmtHardBlank&)(*m_pAttr);
}
inline const SwFmtFld& SwTxtAttr::GetFld() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_FIELD, "Falsche Abfrage" );
- return (const SwFmtFld&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
+ "Wrong attribute" );
+ return (const SwFmtFld&)(*m_pAttr);
}
inline const SwFmtFtn& SwTxtAttr::GetFtn() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_FTN, "Falsche Abfrage" );
- return (const SwFmtFtn&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" );
+ return (const SwFmtFtn&)(*m_pAttr);
}
inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_FLYCNT, "Falsche Abfrage" );
- return (const SwFmtFlyCnt&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT,
+ "Wrong attribute" );
+ return (const SwFmtFlyCnt&)(*m_pAttr);
}
inline const SwTOXMark& SwTxtAttr::GetTOXMark() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_TOXMARK, "Falsche Abfrage" );
- return (const SwTOXMark&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK,
+ "Wrong attribute" );
+ return (const SwTOXMark&)(*m_pAttr);
}
inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_REFMARK, "Falsche Abfrage" );
- return (const SwFmtRefMark&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK,
+ "Wrong attribute" );
+ return (const SwFmtRefMark&)(*m_pAttr);
}
inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_INETFMT, "Falsche Abfrage" );
- return (const SwFmtINetFmt&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT,
+ "Wrong attribute" );
+ return (const SwFmtINetFmt&)(*m_pAttr);
}
inline const SvXMLAttrContainerItem& SwTxtAttr::GetXMLAttrContainer() const
{
- ASSERT( pAttr && pAttr->Which() == RES_UNKNOWNATR_CONTAINER, "Falsche Abfrage" );
- return (const SvXMLAttrContainerItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_UNKNOWNATR_CONTAINER,
+ "Wrong attribute" );
+ return (const SvXMLAttrContainerItem&)(*m_pAttr);
}
inline const SwFmtRuby& SwTxtAttr::GetRuby() const
{
- ASSERT( pAttr && pAttr->Which() == RES_TXTATR_CJK_RUBY, "Falsche Abfrage" );
- return (const SwFmtRuby&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY,
+ "Wrong attribute" );
+ return (const SwFmtRuby&)(*m_pAttr);
}
inline const SvxTwoLinesItem& SwTxtAttr::Get2Lines() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_TWO_LINES, "Falsche Abfrage" );
- return (const SvxTwoLinesItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_TWO_LINES,
+ "Wrong attribute" );
+ return (const SvxTwoLinesItem&)(*m_pAttr);
}
inline const SvxEmphasisMarkItem& SwTxtAttr::GetEmphasisMark() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_EMPHASIS_MARK, "Falsche Abfrage" );
- return (const SvxEmphasisMarkItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_EMPHASIS_MARK,
+ "Wrong attribute" );
+ return (const SvxEmphasisMarkItem&)(*m_pAttr);
}
inline const SvxCharScaleWidthItem& SwTxtAttr::GetCharScaleW() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_SCALEW, "Falsche Abfrage" );
- return (const SvxCharScaleWidthItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_SCALEW,
+ "Wrong attribute" );
+ return (const SvxCharScaleWidthItem&)(*m_pAttr);
}
-inline const SvxCharRotateItem& SwTxtAttr::GetCharRotate() const
+inline const SvxCharRotateItem& SwTxtAttr::GetCharRotate() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_ROTATE, "Falsche Abfrage" );
- return (const SvxCharRotateItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_ROTATE,
+ "Wrong attribute" );
+ return (const SvxCharRotateItem&)(*m_pAttr);
}
inline const SvxCharReliefItem& SwTxtAttr::GetCharRelief() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_RELIEF, "Falsche Abfrage" );
- return (const SvxCharReliefItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_RELIEF,
+ "Wrong attribute" );
+ return (const SvxCharReliefItem&)(*m_pAttr);
}
inline const SvxCharHiddenItem& SwTxtAttr::GetCharHidden() const
{
- ASSERT( pAttr && pAttr->Which() == RES_CHRATR_HIDDEN, "Falsche Abfrage" );
- return (const SvxCharHiddenItem&)*pAttr;
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_HIDDEN,
+ "Wrong attribute" );
+ return (const SvxCharHiddenItem&)(*m_pAttr);
}
#endif
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index 50914169d6fc..3b03173e17ed 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -42,32 +42,33 @@ class SvxTwoLinesItem;
class SwTxtCharFmt : public SwTxtAttrEnd
{
- SwTxtNode* pMyTxtNd;
- USHORT mnSortNumber;
+ SwTxtNode * m_pTxtNode;
+ USHORT m_nSortNumber;
public:
- SwTxtCharFmt( const SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
- ~SwTxtCharFmt( );
+ SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtCharFmt( );
// werden vom SwFmtCharFmt hierher weitergeleitet
virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
- // erfrage und setze den TxtNode Pointer
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ // get and set TxtNode pointer
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
- void SetSortNumber( USHORT nSortNumber ) { mnSortNumber = nSortNumber; }
- USHORT GetSortNumber() const { return mnSortNumber; }
+ void SetSortNumber( USHORT nSortNumber ) { m_nSortNumber = nSortNumber; }
+ USHORT GetSortNumber() const { return m_nSortNumber; }
};
// ATT_HARDBLANK ******************************
class SwTxtHardBlank : public SwTxtAttr
{
- sal_Unicode cChar;
+ sal_Unicode m_Char;
+
public:
SwTxtHardBlank( const SwFmtHardBlank& rAttr, xub_StrLen nStart );
- inline sal_Unicode GetChar() const { return cChar; }
+ inline sal_Unicode GetChar() const { return m_Char; }
};
// ATT_XNLCONTAINERITEM ******************************
@@ -83,20 +84,20 @@ public:
class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrEnd, public SwClient
{
- SwTxtNode* pMyTxtNd;
+ SwTxtNode* m_pTxtNode;
public:
- SwTxtRuby( const SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtRuby();
TYPEINFO();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
- // erfrage und setze den TxtNode Pointer
- const SwTxtNode* GetpTxtNode() const { return pMyTxtNd; }
+ /// get and set TxtNode pointer
+ const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
SwCharFmt* GetCharFmt();
const SwCharFmt* GetCharFmt() const
@@ -116,8 +117,8 @@ public:
inline const SwTxtNode& SwTxtRuby::GetTxtNode() const
{
- ASSERT( pMyTxtNd, "SwTxtRuby:: wo ist mein TextNode?" );
- return *pMyTxtNd;
+ ASSERT( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" );
+ return *m_pTxtNode;
}
#endif
diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx
index ca8fbbf4f2ea..e88fbb55bee5 100644
--- a/sw/inc/txtflcnt.hxx
+++ b/sw/inc/txtflcnt.hxx
@@ -45,7 +45,7 @@ class SwTxtFlyCnt : public SwTxtAttr
SwFlyInCntFrm *_GetFlyFrm( const SwFrm *pCurrFrm );
public:
- SwTxtFlyCnt( const SwFmtFlyCnt& rAttr, xub_StrLen nStart );
+ SwTxtFlyCnt( SwFmtFlyCnt& rAttr, xub_StrLen nStart );
// Setzt den Anker im pFmt und
void SetAnchor( const SwTxtNode *pNode );
@@ -64,7 +64,7 @@ inline SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm )
inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const
{
- return ((SwTxtFlyCnt*)this)->_GetFlyFrm( pCurrFrm );
+ return (const_cast<SwTxtFlyCnt*>(this))->_GetFlyFrm( pCurrFrm );
}
#endif
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 85af7e3f1046..84b1dc639f1b 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -40,20 +40,21 @@ class SwTxtNode;
class SwTxtFld : public SwTxtAttr
{
- mutable String aExpand;
- SwTxtNode *pMyTxtNd;
+ mutable String m_aExpand;
+ SwTxtNode * m_pTxtNode;
+
public:
- SwTxtFld( const SwFmtFld& rAttr, xub_StrLen nStart );
- ~SwTxtFld();
+ SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtFld();
void CopyFld( SwTxtFld *pDest ) const;
void Expand() const;
inline void ExpandAlways();
- // erfrage und setze den TxtNode Pointer
- SwTxtNode* GetpTxtNode() const { return pMyTxtNd; }
+ // get and set TxtNode pointer
+ SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
// enable notification that field content has changed and needs reformatting
void NotifyContentChange(SwFmtFld& rFmtFld);
@@ -63,18 +64,18 @@ public:
@return position of this field. Has to be deleted explicitly.
*/
- SwPosition * GetPosition() const;
+// SwPosition * GetPosition() const;
};
inline SwTxtNode& SwTxtFld::GetTxtNode() const
{
- ASSERT( pMyTxtNd, "SwTxtFld:: wo ist mein TextNode?" );
- return *pMyTxtNd;
+ ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
+ return *m_pTxtNode;
}
inline void SwTxtFld::ExpandAlways()
{
- aExpand += ' ';
+ m_aExpand += ' ';
Expand();
}
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index c2011babf8a9..6ed95e05ba06 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -41,26 +41,22 @@ class SwDoc;
class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
{
- SwNodeIndex *pStartNode;
- SwTxtNode* pMyTxtNd;
- USHORT nSeqNo;
-
- // Zuweisung und Copy-Ctor sind nicht erlaubt.
- SwTxtFtn& operator=( const SwTxtFtn &rTxtFtn );
- SwTxtFtn( const SwTxtFtn &rTxtFtn );
+ SwNodeIndex * m_pStartNode;
+ SwTxtNode * m_pTxtNode;
+ USHORT m_nSeqNo;
public:
- SwTxtFtn( const SwFmtFtn& rAttr, xub_StrLen nStart );
- ~SwTxtFtn();
+ SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtFtn();
- inline SwNodeIndex *GetStartNode() const { return pStartNode; }
+ inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE );
void SetNumber( const USHORT nNumber, const String* = 0 );
void CopyFtn( SwTxtFtn *pDest );
- // erfrage und setze den TxtNode Pointer
+ // get and set TxtNode pointer
inline const SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
// lege eine neue leere TextSection fuer diese Fussnote an
void MakeNewTextSection( SwNodes& rNodes );
@@ -72,16 +68,16 @@ public:
// fuer die Querverweise auf Fussnoten
USHORT SetSeqRefNo();
- void SetSeqNo( USHORT n ) { nSeqNo = n; } // fuer die Reader
- USHORT GetSeqRefNo() const { return nSeqNo; }
+ void SetSeqNo( USHORT n ) { m_nSeqNo = n; } // for Readers
+ USHORT GetSeqRefNo() const { return m_nSeqNo; }
static void SetUniqueSeqRefNo( SwDoc& rDoc );
};
inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
{
- ASSERT( pMyTxtNd, "SwTxtFtn:: wo ist mein TextNode?" );
- return *pMyTxtNd;
+ ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
+ return *m_pTxtNode;
}
#endif
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index ef55bf69d5c9..e37a18a3f823 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -29,54 +29,54 @@
************************************************************************/
#ifndef _TXTINET_HXX
#define _TXTINET_HXX
+
#include <txatbase.hxx>
#include <calbck.hxx>
class SwTxtNode;
class SwCharFmt;
-class Color;
// ATT_INETFMT *********************************************
class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrEnd, public SwClient
{
- SwTxtNode* pMyTxtNd;
- BOOL bVisited : 1; // Besuchter Link?
- BOOL bValidVis : 1; // Ist das bVisited-Flag gueltig?
- BOOL bColor : 1;
+ SwTxtNode * m_pTxtNode;
+ bool m_bVisited : 1; // visited link?
+ bool m_bVisitedValid : 1; // is m_bVisited valid?
// forbidden and not implemented.
SwTxtINetFmt();
public:
- SwTxtINetFmt( const SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtINetFmt();
TYPEINFO();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
- // erfrage und setze den TxtNode Pointer
- const SwTxtNode* GetpTxtNode() const { return pMyTxtNd; }
+ // get and set TxtNode pointer
+ const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
SwCharFmt* GetCharFmt();
const SwCharFmt* GetCharFmt() const
- { return ((SwTxtINetFmt*)this)->GetCharFmt(); }
+ { return const_cast<SwTxtINetFmt*>(this)->GetCharFmt(); }
- BOOL IsVisited() const { return bVisited; }
- void SetVisited( BOOL bNew ) { bVisited = bNew; }
+ bool IsVisited() const { return m_bVisited; }
+ void SetVisited( bool bNew ) { m_bVisited = bNew; }
- BOOL IsValidVis() const { return bValidVis; }
- void SetValidVis( BOOL bNew ) { bValidVis = bNew; }
+ bool IsVisitedValid() const { return m_bVisitedValid; }
+ void SetVisitedValid( bool bNew ) { m_bVisitedValid = bNew; }
BOOL IsProtect() const;
};
+
inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
{
- ASSERT( pMyTxtNd, "SwTxtINetFmt:: wo ist mein TextNode?" );
- return *pMyTxtNd;
+ ASSERT( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" );
+ return *m_pTxtNode;
}
#endif
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
index 0496e9706e21..73319fd6a209 100644
--- a/sw/inc/txtrfmrk.hxx
+++ b/sw/inc/txtrfmrk.hxx
@@ -39,23 +39,25 @@ class SwTxtNode;
class SwTxtRefMark : public SwTxtAttrEnd
{
- SwTxtNode* pMyTxtNd;
- USHORT* pEnd; // fuer InhaltsReferenz / PositionRef. ohne Ende
+ SwTxtNode * m_pTxtNode;
+ xub_StrLen * m_pEnd; // end is optional (point reference)
+
public:
- SwTxtRefMark( const SwFmtRefMark& rAttr,
- xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+ SwTxtRefMark( SwFmtRefMark& rAttr,
+ xub_StrLen nStart, xub_StrLen * pEnd = 0 );
- virtual xub_StrLen *GetEnd(); // SwTxtAttr
- inline const xub_StrLen* GetEnd() const { return pEnd; }
+ virtual xub_StrLen * GetEnd(); // SwTxtAttr
+ inline const xub_StrLen * GetEnd() const { return m_pEnd; }
- // erfrage und setze den TxtNode Pointer
+ // get and set TxtNode pointer
inline const SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
};
+
inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
{
- ASSERT( pMyTxtNd, "SwTxtRefMark:: wo ist mein TextNode?" );
- return *pMyTxtNd;
+ ASSERT( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" );
+ return *m_pTxtNode;
}
#endif
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index 98096d620c2d..fe9e37775b17 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -40,28 +40,28 @@ class SwDoc;
class SwTxtTOXMark : public SwTxtAttrEnd
{
- xub_StrLen* pEnd; // wenn AlternativText vom SwTOXMark dann 0 !!
- SwTxtNode* pMyTxtNd;
+ SwTxtNode * m_pTxtNode;
+ xub_StrLen * m_pEnd; // 0 if SwTOXMark without AlternativeText
+
public:
- SwTxtTOXMark( const SwTOXMark& rAttr,
- xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+ SwTxtTOXMark( SwTOXMark& rAttr, xub_StrLen nStart, xub_StrLen * pEnd = 0 );
virtual ~SwTxtTOXMark();
- virtual xub_StrLen *GetEnd(); // SwTxtAttr
- inline const xub_StrLen* GetEnd() const { return pEnd; }
+ virtual xub_StrLen *GetEnd(); // SwTxtAttr
+ inline const xub_StrLen* GetEnd() const { return m_pEnd; }
void CopyTOXMark( SwDoc* pDestDoc );
- // erfrage und setze den TxtNode Pointer
- inline const SwTxtNode* GetpTxtNd() const { return pMyTxtNd; }
+ // get and set TxtNode pointer
+ inline const SwTxtNode* GetpTxtNd() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; }
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
};
inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const
{
- ASSERT( pMyTxtNd, "SwTxtTOXMark:: wo ist mein TextNode?" );
- return *pMyTxtNd;
+ ASSERT( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" );
+ return *m_pTxtNode;
}
#endif
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index a7859234b773..5b70ebcb46f2 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -53,6 +53,10 @@
#include <vector>
// <--
+#include <boost/shared_ptr.hpp>
+#include <memory>
+
+
class SwUndoIter;
class SwHistory;
class SwIndex;
@@ -68,7 +72,7 @@ class SwTable;
class SwTableBox;
struct SwSortOptions;
class SwFrmFmt;
-class SwHstryBookmark;
+class SwHistoryBookmark;
class SwSection;
class SwSectionFmt;
class SvxTabStopItem;
@@ -102,6 +106,10 @@ class SwRedlineSaveData;
class SwRedline;
struct SwSaveRowSpan;
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
namespace utl {
class TransliterationWrapper;
}
@@ -400,6 +408,8 @@ class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt
String *pSttStr, *pEndStr;
SwRedlineData* pRedlData;
SwRedlineSaveDatas* pRedlSaveData;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
String sTableName;
@@ -557,14 +567,15 @@ public:
class SwUndoAttr : public SwUndo, private SwUndRng
{
- SfxItemSet aSet; // Attribute fuers Redo
- SwHistory* pHistory; // History fuers Undo
- SwRedlineData* pRedlData; // Redlining
- SwRedlineSaveDatas* pRedlSaveData;
- ULONG nNdIdx; // fuers Redlining - Offset
- USHORT nInsFlags; // Einfuege Flags
+ SfxItemSet m_AttrSet; // attributes for Redo
+ const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
+ ::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
+ ::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
+ ULONG m_nNodeIndex; // Offset: for Redlining
+ const USHORT m_nInsertFlags; // insert flags
void RemoveIdx( SwDoc& rDoc );
+
public:
SwUndoAttr( const SwPaM&, const SfxItemSet&, USHORT nFlags = 0 );
SwUndoAttr( const SwPaM&, const SfxPoolItem&, USHORT nFlags = 0 );
@@ -572,40 +583,44 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- SwHistory* GetHistory() { return pHistory; }
void SaveRedlineData( const SwPaM& rPam, BOOL bInsCntnt );
+ SwHistory& GetHistory() { return *m_pHistory; }
+
OUT_UNDOBJ( InsAttr )
};
-class SwUndoRstAttr : public SwUndo, private SwUndRng
+class SwUndoResetAttr : public SwUndo, private SwUndRng
{
- SwHistory* pHistory;
- SvUShortsSort aIds;
- USHORT nFmtId; // Format-Id fuer das Redo
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ SvUShortsSort m_Ids;
+ const USHORT m_nFormatId; // Format-Id for Redo
+
public:
- SwUndoRstAttr( const SwPaM&, USHORT nFmtId );
- SwUndoRstAttr( const SwDoc&, const SwPosition&, USHORT nWhichId );
- virtual ~SwUndoRstAttr();
+ SwUndoResetAttr( const SwPaM&, USHORT nFmtId );
+ SwUndoResetAttr( const SwPosition&, USHORT nFmtId );
+ virtual ~SwUndoResetAttr();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
void SetAttrs( const SvUShortsSort& rArr );
- SwHistory* GetHistory() { return pHistory; }
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
OUT_UNDOBJ( ResetAttr )
};
class SwUndoFmtAttr : public SwUndo
{
friend class SwUndoDefaultAttr;
- SwFmt* pFmt;
- SfxItemSet* pOldSet; // die alten Attribute
- ULONG nNode;
- const USHORT nFmtWhich;
- const BOOL bSaveDrawPt;
-
- int IsFmtInDoc( SwDoc* ); // ist das Attribut-Format noch im Doc ?
- void SaveFlyAnchor( BOOL bSaveDrawPt = FALSE );
+ SwFmt * m_pFmt;
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
+ ULONG m_nNodeIndex;
+ const USHORT m_nFmtWhich;
+ const bool m_bSaveDrawPt;
+
+ bool IsFmtInDoc( SwDoc* ); //is the attribute format still in the Doc?
+ void SaveFlyAnchor( bool bSaveDrawPt = false );
// --> OD 2004-10-26 #i35443# - Add return value, type <bool>.
// Return value indicates, if anchor attribute is restored.
// Notes: - If anchor attribute is restored, all other existing attributes
@@ -621,15 +636,15 @@ class SwUndoFmtAttr : public SwUndo
// <--
public:
- // meldet sich im Format an und sichert sich die alten Attribute
+ // register at the Format and save old attributes
// --> OD 2008-02-27 #refactorlists# - removed <rNewSet>
SwUndoFmtAttr( const SfxItemSet& rOldSet,
SwFmt& rFmt,
- BOOL bSaveDrawPt = TRUE );
+ bool bSaveDrawPt = true );
// <--
SwUndoFmtAttr( const SfxPoolItem& rItem,
SwFmt& rFmt,
- BOOL bSaveDrawPt = TRUE );
+ bool bSaveDrawPt = true );
virtual ~SwUndoFmtAttr();
virtual void Undo( SwUndoIter& );
// --> OD 2004-10-26 #i35443# - <Redo(..)> calls <Undo(..)> - nothing else
@@ -641,7 +656,7 @@ public:
OUT_UNDOBJ( InsFmtAttr )
void PutAttr( const SfxPoolItem& rItem );
- SwFmt* GetFmt( SwDoc& rDoc ); // prueft, ob es noch im Doc ist!
+ SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc!
};
// --> OD 2008-02-12 #newlistlevelattrs#
@@ -657,18 +672,19 @@ class SwUndoFmtResetAttr : public SwUndo
private:
// format at which a certain attribute is reset.
- SwFmt* mpChangedFormat;
+ SwFmt * const m_pChangedFormat;
// which ID of the reset attribute
- USHORT mnWhichId;
+ const USHORT m_nWhichId;
// old attribute which has been reset - needed for undo.
- SfxPoolItem* mpOldItem;
+ ::std::auto_ptr<SfxPoolItem> m_pOldItem;
};
// <--
class SwUndoDontExpandFmt : public SwUndo
{
- ULONG nNode;
- xub_StrLen nCntnt;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nContentIndex;
+
public:
SwUndoDontExpandFmt( const SwPosition& rPos );
virtual void Undo( SwUndoIter& );
@@ -676,14 +692,20 @@ public:
virtual void Repeat( SwUndoIter& );
};
-// Hilfs-Klasse, um die geaenderten Sets zu "empfangen"
-struct _UndoFmtAttr : public SwClient
+// helper class to receive changed attribute sets
+class SwUndoFmtAttrHelper : public SwClient
{
- SwUndoFmtAttr* pUndo;
- BOOL bSaveDrawPt;
+ ::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
+ const bool m_bSaveDrawPt;
+
+public:
+ SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSaveDrawPt = true );
- _UndoFmtAttr( SwFmt& rFmt, BOOL bSaveDrawPt = TRUE );
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ SwUndoFmtAttr* GetUndo() const { return m_pUndo.get(); }
+ // release the undo object (so it is not deleted here), and return it
+ SwUndoFmtAttr* ReleaseUndo() { return m_pUndo.release(); }
};
@@ -735,15 +757,18 @@ public:
class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
{
- SwHistory* pHistory;
- BOOL bModulus;
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const bool m_bModulus;
+
public:
SwUndoMoveLeftMargin( const SwPaM&, BOOL bRight, BOOL bModulus );
virtual ~SwUndoMoveLeftMargin();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- SwHistory* GetHistory() { return pHistory; }
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
OUT_UNDOBJ( MoveLeftMargin )
};
@@ -1081,7 +1106,8 @@ public:
class SwUndoBookmark : public SwUndo
{
- SwHstryBookmark* pHBookmark;
+ const ::std::auto_ptr<SwHistoryBookmark> m_pHistoryBookmark;
+
protected:
SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& );
@@ -1417,10 +1443,11 @@ public:
class SwUndoDefaultAttr : public SwUndo
{
- SfxItemSet* pOldSet; // die alten Attribute
- SvxTabStopItem* pTabStop;
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // the old attributes
+ ::std::auto_ptr<SvxTabStopItem> m_pTabStop;
+
public:
- // meldet sich im Format an und sichert sich die alten Attribute
+ // registers at the format and saves old attributes
SwUndoDefaultAttr( const SfxItemSet& rOldSet );
virtual ~SwUndoDefaultAttr();
virtual void Undo( SwUndoIter& );
@@ -1716,31 +1743,32 @@ public:
//--------------------------------------------------------------------
-class SwUndoChgFtn : public SwUndo, private SwUndRng
+class SwUndoChangeFootNote : public SwUndo, private SwUndRng
{
- SwHistory* pHistory;
- String sTxt;
- USHORT nNo;
- BOOL bEndNote;
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const String m_Text;
+ const USHORT m_nNumber;
+ const bool m_bEndNote;
+
public:
- SwUndoChgFtn( const SwPaM& rRange, const String& rTxt,
- USHORT nNum, BOOL bIsEndNote );
- virtual ~SwUndoChgFtn();
+ SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt,
+ USHORT nNum, bool bIsEndNote );
+ virtual ~SwUndoChangeFootNote();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- SwHistory* GetHistory() { return pHistory; }
+ SwHistory& GetHistory() { return *m_pHistory; }
};
-class SwUndoFtnInfo : public SwUndo
+class SwUndoFootNoteInfo : public SwUndo
{
- SwFtnInfo *pFtnInfo;
+ ::std::auto_ptr<SwFtnInfo> m_pFootNoteInfo;
public:
- SwUndoFtnInfo( const SwFtnInfo &rInfo );
- virtual ~SwUndoFtnInfo();
+ SwUndoFootNoteInfo( const SwFtnInfo &rInfo );
+ virtual ~SwUndoFootNoteInfo();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
@@ -1748,7 +1776,7 @@ public:
class SwUndoEndNoteInfo : public SwUndo
{
- SwEndNoteInfo *pEndNoteInfo;
+ ::std::auto_ptr<SwEndNoteInfo> m_pEndNoteInfo;
public:
SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo );
@@ -1776,7 +1804,7 @@ public:
virtual void Redo( SwUndoIter& rUndoIter );
virtual void Repeat( SwUndoIter& rUndoIter );
- void AddChanges( const SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
+ void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
BOOL HasData() const {return 0 != pData; }
};
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 99a089f1194e..f728c51293e9 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -518,7 +518,8 @@ SwSimpleIndexAccessBaseClass;
class SwXFootnotes : public SwSimpleIndexAccessBaseClass,
public SwUnoCollection
{
- sal_Bool bEndnote;
+ const bool m_bEndnote;
+
protected:
virtual ~SwXFootnotes();
public:
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index f3c1bb8ebef9..f58bc92fa3a3 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -49,9 +49,14 @@ private:
// forbidden and not implemented.
//SwUnoCrsr( const SwUnoCrsr& );
SwUnoCrsr & operator= ( const SwUnoCrsr& );
-public:
- virtual operator SwUnoCrsr* ();
+protected:
+
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ virtual void DoSetBidiLevelUpDown();
+
+public:
// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
@@ -62,21 +67,23 @@ public:
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+ virtual bool IsReadOnlyAvailable() const;
+
BOOL IsRemainInSection() const { return bRemainInSection; }
void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
- BOOL IsSkipOverProtectSections() const
+ virtual BOOL IsSkipOverProtectSections() const
{ return bSkipOverProtectSections; }
void SetSkipOverProtectSections( BOOL bFlag )
{ bSkipOverProtectSections = bFlag; }
- BOOL IsSkipOverHiddenSections() const
+ virtual BOOL IsSkipOverHiddenSections() const
{ return bSkipOverHiddenSections; }
void SetSkipOverHiddenSections( BOOL bFlag )
{ bSkipOverHiddenSections = bFlag; }
// make copy of cursor
- SwUnoCrsr * Clone() const;
+ virtual SwUnoCrsr * Clone() const;
DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
};
@@ -98,10 +105,6 @@ public:
// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
- virtual operator SwUnoCrsr* ();
- virtual operator SwUnoTableCrsr* ();
- virtual operator SwTableCursor* ();
-
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
virtual BOOL IsSelOvr( int eFlags =
@@ -109,6 +112,8 @@ public:
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+ virtual SwUnoTableCrsr * Clone() const;
+
void MakeBoxSels();
SwCursor& GetSelRing() { return aTblSel; }
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index 8c8e1ae82c11..92e8f469d62d 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -206,13 +206,6 @@ public:
const SwField* GetField() const;
const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; };
- // #111840#
- /**
- Returns position of this field.
-
- @return position of this field
- */
- SwPosition * GetPosition();
void Invalidate();
};
/* -----------------21.12.98 10:26-------------------
diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx
index 74a67295d23e..dc0bd7dfafc3 100644
--- a/sw/inc/unoobj.hxx
+++ b/sw/inc/unoobj.hxx
@@ -90,22 +90,14 @@
#include <tools/link.hxx>
#include <IDocumentMarkAccess.hxx>
+#include <sfx2/Metadatable.hxx>
+
class SwUnoCrsr;
class SwCursor;
class SwFmtFtn;
class SwFmtRefMark;
class GetCurTxtFmtColl;
-/* -----------------------------01.12.00 18:09--------------------------------
-
- ---------------------------------------------------------------------------*/
-class SwParaSelection
-{
- SwUnoCrsr* pUnoCrsr;
-public:
- SwParaSelection(SwUnoCrsr* pCrsr);
- ~SwParaSelection();
-};
/* -----------------29.04.98 07:35-------------------
*
@@ -751,14 +743,12 @@ class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8
void DeleteAndInsert(const String& rText) throw( ::com::sun::star::uno::RuntimeException );
protected:
virtual ~SwXTextRange();
+
public:
- SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rxParent);
- SwXTextRange(SwFrmFmt& rFmt, SwPaM& rPam);
- SwXTextRange(SwFrmFmt& rTblFmt, SwTableBox& rTblBox, SwPaM& rPam);
- SwXTextRange(SwFrmFmt& rTblFmt, const SwStartNode& rStartNode, SwPaM& rPam);
+ SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rxParent, enum RangePosition eRange = RANGE_IN_TEXT);
+ // only for RANGE_IS_TABLE
SwXTextRange(SwFrmFmt& rTblFmt);
-
TYPEINFO();
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
@@ -822,6 +812,8 @@ public:
static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition(
SwDoc* pDoc,
const SwPosition& rPos, const SwPosition* pMark);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > CreateParentXText(SwDoc* pDoc,
+ const SwPosition& rPos);
};
/* -----------------15.05.98 08:29-------------------
@@ -1146,8 +1138,9 @@ public:
/*-----------------07.04.98 08:15-------------------
--------------------------------------------------*/
-class SwXParagraph : public cppu::WeakImplHelper10
+class SwXParagraph : public cppu::ImplInheritanceHelper10
<
+ ::sfx2::MetadatableMixin,
::com::sun::star::beans::XTolerantMultiPropertySet,
::com::sun::star::beans::XMultiPropertySet,
::com::sun::star::text::XTextRange,
@@ -1181,8 +1174,9 @@ protected:
virtual ~SwXParagraph();
public:
SwXParagraph();
- SwXParagraph(SwXText* pParent, SwUnoCrsr* pCrsr, sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1);
+ SwXParagraph(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const & i_xParent, SwTxtNode * i_pTxtNode, sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1);
+ TYPEINFO();
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
@@ -1249,12 +1243,18 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ //MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
//SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
BOOL IsDescriptor() const {return m_bIsDescriptor;}
- SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
+ const SwTxtNode * GetTxtNode() const;
+ SwTxtNode * GetTxtNode();
static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
const rtl::OUString& rPropertyName, USHORT nWID = 0);
@@ -1283,8 +1283,10 @@ class SwXParaFrameEnumeration : public cppu::WeakImplHelper2
SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
BOOL CreateNextObject();
void FillFrame(SwUnoCrsr& rUnoCrsr);
+
public:
- SwXParaFrameEnumeration(const SwUnoCrsr& rUnoCrsr, sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0);
+ SwXParaFrameEnumeration(const SwPaM& rPaM,
+ sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0);
~SwXParaFrameEnumeration();
//XEnumeration
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
index ed29a995dfe3..889442d47a21 100644
--- a/sw/inc/unoport.hxx
+++ b/sw/inc/unoport.hxx
@@ -141,8 +141,8 @@ protected:
virtual ~SwXTextPortion();
public:
- SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rParent, SwTextPortionType eType );
- SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rParent, SwFrmFmt& rFmt );
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwTextPortionType eType );
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwFrmFmt& rFmt );
//XTextRange
@@ -237,7 +237,7 @@ class SwXRubyPortion : public SwXTextPortion
public:
SwXRubyPortion(const SwUnoCrsr* pPortionCrsr,
SwTxtRuby& rAttr,
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rParent,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent,
sal_Bool bEnd );
~SwXRubyPortion();
};
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 16cb57764515..c9f4d1d01265 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -804,7 +804,10 @@ enum SwPropNameIds
/* 0734 */ UNO_NAME_CHAR_OVERLINE_COLOR,
/* 0735 */ UNO_NAME_CHAR_OVERLINE_HAS_COLOR,
/* 0736 */ UNO_NAME_OUTLINE_LEVEL, //#outline level,add<-zhaojianwei outlinelevel
-/* 0737 */ SW_PROPNAME_END
+// --> OD 2009-07-13 #i73249#
+/* 0737 */ UNO_NAME_DESCRIPTION,
+// <--
+/* 0738 */ SW_PROPNAME_END
};
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index d2f251bcf295..5ebe07e7f633 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -68,9 +68,8 @@
#include <com/sun/star/xforms/XFormsSupplier.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
-#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTLANGUAGES_HPP
#include <com/sun/star/document/XDocumentLanguages.hpp>
-#endif
+#include <com/sun/star/util/XCloneable.hpp>
#include <svtools/itemprop.hxx>
#include <svx/fmdmod.hxx>
#include <svx/UnoForbiddenCharsTable.hxx>
@@ -79,22 +78,22 @@
#include <cppuhelper/implbase4.hxx> // helper for implementations
#include <RefreshListenerContainer.hxx>
-#define __IFC31 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
-Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31
+#define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
+Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32
-#define __CLASS_IFC31 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
+#define __CLASS_IFC32 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \
class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\
-class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31
+class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31 , class Ifc32
-#define __PUBLIC_IFC31 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \
+#define __PUBLIC_IFC32 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \
public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \
public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \
public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \
-public Ifc31
+public Ifc31, public Ifc32
#include <cppuhelper/implbase_ex.hxx>
#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT31( class_cast ) \
+#define __IFC_EX_TYPE_INIT32( class_cast ) \
__IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
__IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
__IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
@@ -110,10 +109,10 @@ public Ifc31
__IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \
__IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \
__IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \
- __IFC_EX_TYPE_INIT( class_cast, 31)
+ __IFC_EX_TYPE_INIT( class_cast, 31 ), __IFC_EX_TYPE_INIT( class_cast, 32)
#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 31 )
+__DEF_IMPLHELPER_EX( 32 )
class SwDoc;
class SwDocShell;
@@ -132,7 +131,7 @@ SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
******************************************************************************/
-typedef cppu::WeakImplHelper31
+typedef cppu::WeakImplHelper32
<
::com::sun::star::text::XTextDocument,
::com::sun::star::text::XLineNumberingProperties,
@@ -164,11 +163,12 @@ typedef cppu::WeakImplHelper31
::com::sun::star::view::XRenderable,
::com::sun::star::xforms::XFormsSupplier,
::com::sun::star::text::XFlatParagraphIteratorProvider,
- ::com::sun::star::document::XDocumentLanguages
+ ::com::sun::star::document::XDocumentLanguages,
+ ::com::sun::star::util::XCloneable
>
SwXTextDocumentBaseClass;
-class SwXTextDocument : public SwXTextDocumentBaseClass,
+class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
public SvxFmMSFactory,
public SfxBaseModel
{
@@ -243,7 +243,7 @@ public:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
- SW_DLLPUBLIC static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
@@ -402,6 +402,10 @@ public:
// ::com::sun::star::text::XFlatParagraphIteratorProvider:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::util::XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+
//
void Invalidate();
void Reactivate(SwDocShell* pNewDocShell);
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 01cdc5d4949a..f1fd0abb4ae4 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -29,9 +29,8 @@
************************************************************************/
#ifndef _VISCRS_HXX
#define _VISCRS_HXX
-#ifndef _CURSOR_HXX //autogen
+
#include <vcl/cursor.hxx>
-#endif
#include "swcrsr.hxx"
#include "swrect.hxx"
#include "swregion.hxx"
@@ -145,8 +144,6 @@ public:
SwShellCrsr( SwShellCrsr& );
virtual ~SwShellCrsr();
- virtual operator SwShellCrsr* ();
-
void Show(); // Update und zeige alle Selektionen an
void Hide(); // verstecke alle Selektionen
void Invalidate( const SwRect& rRect );
@@ -181,6 +178,8 @@ public:
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
#endif
+ virtual bool IsReadOnlyAvailable() const;
+
DECL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr )
};
@@ -200,8 +199,6 @@ public:
const SwPosition &rPtPos, const Point& rPtPt );
virtual ~SwShellTableCrsr();
- virtual operator SwShellTableCrsr* ();
-
virtual void FillRects(); // fuer Table- und normalen Crsr
// Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
@@ -209,8 +206,7 @@ public:
virtual void SetMark();
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
- virtual operator SwShellCrsr* ();
- virtual operator SwTableCursor* ();
+
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );