summaryrefslogtreecommitdiff
path: root/sw/inc/doc.hxx
diff options
context:
space:
mode:
authorPhilipp Lohmann <Philipp.Lohmann@Sun.COM>2009-10-09 15:11:54 +0200
committerPhilipp Lohmann <Philipp.Lohmann@Sun.COM>2009-10-09 15:11:54 +0200
commit2231280aac5054a14f95716659905e9d0af81ee5 (patch)
treeee9a394f13757d84fa99922df363e1c436b31a58 /sw/inc/doc.hxx
parent6c5d7c1a2c9932974f17fb36ed12f467590d220e (diff)
parent44da611a4f5d31406043f94675a950be3170e5a8 (diff)
merge with m61
Diffstat (limited to 'sw/inc/doc.hxx')
-rw-r--r--sw/inc/doc.hxx100
1 files changed, 63 insertions, 37 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 52898ad0d1ad..5ea499a8ff82 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -225,6 +225,9 @@ class SwViewOption;
namespace sw { namespace mark {
class MarkManager;
}}
+namespace sw {
+ class MetaFieldManager;
+}
namespace com { namespace sun { namespace star {
namespace i18n {
@@ -305,6 +308,7 @@ class SW_DLLPUBLIC SwDoc :
mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator;
const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager;
+ const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
// -------------------------------------------------------------------
// die Pointer
@@ -621,8 +625,8 @@ private:
// nur fuer den internen Gebrauch deshalb privat.
// 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*/, bool bCopyAll, SwPaM* pCpyRng /*= 0*/ ) const; // in ndcopy.cxx
+ bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */,
+ const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const;
SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos,
const SwCntntNode& rNode, RndStdIds eRequestId,
@@ -634,9 +638,10 @@ private:
const SfxItemSet* pGrfAttrSet,
SwFrmFmt* = 0 );
- void _CopyFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndContentIndex,
- const SwNodeIndex& rSttIdx,
- sal_Bool bCopyFlyAtFly = sal_False ) const; // steht im ndcopy.cxx
+ void CopyFlyInFlyImpl( const SwNodeRange& rRg,
+ const xub_StrLen nEndContentIndex,
+ const SwNodeIndex& rStartIdx,
+ const bool bCopyFlyAtFly = false ) const;
sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
// --> OD 2005-01-13 #i40550#
@@ -646,7 +651,7 @@ private:
FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr,
FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt );
- void _CopyPageDescHeaderFooter( sal_Bool bCpyHeader,
+ void CopyPageDescHeaderFooterImpl( bool bCpyHeader,
const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt );
SwFmt* FindFmtByName( const SvPtrarr& rFmtArr,
const String& rName ) const;
@@ -709,6 +714,11 @@ private:
void InitTOXTypes();
void Paste( const SwDoc& );
+ bool DeleteAndJoinImpl(SwPaM&, const bool);
+ bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false);
+ bool DeleteRangeImpl(SwPaM&, const bool unused = false);
+ bool ReplaceRangeImpl(SwPaM&, String const&, const bool);
+
public:
/** Life cycle
@@ -885,18 +895,22 @@ public:
/** IDocumentContentOperations
*/
- virtual bool Copy(SwPaM&, SwPosition&, bool bCopyAll) const;
+ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll) const;
virtual void DeleteSection(SwNode* pNode);
- virtual bool Delete(SwPaM&);
+ virtual bool DeleteRange(SwPaM&);
virtual bool DelFullPara(SwPaM&);
- virtual bool DeleteAndJoin(SwPaM&);
- virtual bool Move(SwPaM&, SwPosition&, SwMoveFlags);
- virtual bool Move(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
+ // --> 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 MoveRange(SwPaM&, SwPosition&, SwMoveFlags);
+ virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
- virtual bool Overwrite(const SwPaM &rRg, sal_Unicode c);
virtual bool Overwrite(const SwPaM &rRg, const String& rStr);
- virtual bool Insert(const SwPaM &rRg, sal_Unicode c);
- virtual bool Insert(const SwPaM &rRg, const String&, bool bHintExpand);
+ virtual bool InsertString(const SwPaM &rRg, const String&,
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND );
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
@@ -904,8 +918,10 @@ public:
virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
- virtual bool Insert(const SwPaM &rRg, const SfxPoolItem&, sal_uInt16 nFlags);
- virtual bool Insert(const SwPaM &rRg, const SfxItemSet&, sal_uInt16 nFlags);
+ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
+ const SetAttrMode nFlags);
+ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
+ const SetAttrMode nFlags);
virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj);
virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&);
virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
@@ -913,7 +929,8 @@ public:
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart);
virtual bool AppendTxtNode(SwPosition& rPos);
virtual void SetModified(SwPaM &rPaM);
- virtual bool Replace(SwPaM& rPam, const String& rNewStr, bool bRegExpRplc);
+ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
+ const bool bRegExReplace);
virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos );
/** IDocumentStylePoolAccess
@@ -1098,7 +1115,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
*/
@@ -1364,11 +1386,11 @@ public:
// kopiere die Kopzeile (mit dem Inhalt!) aus dem SrcFmt
// ins DestFmt ( auch ueber Doc grenzen hinaus!)
void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
- { _CopyPageDescHeaderFooter( sal_True, rSrcFmt, rDestFmt ); }
+ { CopyPageDescHeaderFooterImpl( true, rSrcFmt, rDestFmt ); }
// kopiere die Fusszeile (mit dem Inhalt!) aus dem SrcFmt
// ins DestFmt ( auch ueber Doc grenzen hinaus!)
void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
- { _CopyPageDescHeaderFooter( sal_False, rSrcFmt, rDestFmt ); }
+ { CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); }
//fuer Reader
@@ -1400,7 +1422,7 @@ public:
// Methoden fuer die Verzeichnisse:
// - Verzeichnismarke einfuegen loeschen travel
sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const;
- void Delete( const SwTOXMark* pTOXMark );
+ void DeleteTOXMark( const SwTOXMark* pTOXMark );
const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark,
SwTOXSearch eDir, sal_Bool bInReadOnly );
@@ -1516,13 +1538,16 @@ public:
// <--
void SetCounted( const SwPaM&, bool bCounted);
- /**
- Replace numbering rules in a PaM by another numbering rule.
+ // --> OD 2009-08-25 #i86492#
+ // no longer needed.
+ // SwDoc::SetNumRule( rPaM, rNumRule, false, <ListId>, sal_True, true ) have to be used instead.
+// /**
+// Replace numbering rules in a PaM by another numbering rule.
- \param rPaM PaM to replace the numbering rules in
- \param rNumRule numbering rule to replace the present numbering rules
- */
- void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
+// \param rPaM PaM to replace the numbering rules in
+// \param rNumRule numbering rule to replace the present numbering rules
+// */
+// void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
void MakeUniqueNumRules(const SwPaM & rPaM);
@@ -1582,8 +1607,8 @@ public:
- FALSE: search backward
\param bNum - TRUE: search for enumeration
- FALSE: search for itemize
- \param bOutline - TRUE: search for non-outline numbering rule
- - FALSE: search for outline numbering rule
+ \param bOutline - TRUE: search for outline numbering rule
+ - FALSE: search for non-outline numbering rule
\param nNonEmptyAllowed number of non-empty paragraphs allowed between
rPos and found paragraph
@@ -1595,13 +1620,13 @@ public:
input parameter - boolean, indicating, if start node, determined by given
start position has to be investigated or not.
*/
- const SwNumRule * SearchNumRule(SwPosition & rPos,
- BOOL bForward,
- BOOL bNum,
- BOOL bOutline,
+ const SwNumRule * SearchNumRule(const SwPosition & rPos,
+ const bool bForward,
+ const bool bNum,
+ const bool bOutline,
int nNonEmptyAllowed,
String& sListId,
- bool bInvestigateStartNode = false );
+ const bool bInvestigateStartNode = false );
// Absaetze ohne Numerierung, aber mit Einzuegen
sal_Bool NoNum( const SwPaM& );
@@ -1773,9 +1798,9 @@ public:
inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
inline const Link& GetOle2Link() const {return aOle2Link;}
- // SS fuer Bereiche
- SwSection* Insert( const SwPaM& rRange, const SwSection& rNew,
- const SfxItemSet* pAttr = 0, sal_Bool bUpdate = sal_True );
+ // insert section (the ODF kind of section, not the nodesarray kind)
+ SwSection* InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
+ const SfxItemSet* pAttr = 0, bool bUpdate = true);
sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange,
const SwNode** ppSttNd = 0 ) const;
SwSection* GetCurrSection( const SwPosition& rPos ) const;
@@ -2097,6 +2122,7 @@ public:
}
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
+ ::sw::MetaFieldManager & GetMetaFieldManager();
SwDoc* CreateCopy() const;
};