summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-12-16 14:13:32 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-12-16 14:13:32 +0000
commit2af8496d45df74889dfacdffe276203aa61da0f2 (patch)
tree7c0611ba2747e9ba5661f19696e5379012da83fb /sw/inc
parentaa69c6390c8dd2ed1ec9791a45fd6235ad613ed2 (diff)
parent73e7460787c1ca58febfc90729c34232d87c5083 (diff)
tl74: merge with DEV300 m60
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/IDocumentContentOperations.hxx52
-rw-r--r--sw/inc/PostItMgr.hxx15
-rw-r--r--sw/inc/bookmrk.hxx218
-rw-r--r--sw/inc/breakit.hxx19
-rw-r--r--sw/inc/calc.hxx2
-rw-r--r--sw/inc/cmdid.h6
-rw-r--r--sw/inc/crsrsh.hxx9
-rw-r--r--sw/inc/dbgoutsw.hxx6
-rw-r--r--sw/inc/doc.hxx100
-rw-r--r--sw/inc/docsh.hxx4
-rw-r--r--sw/inc/editsh.hxx22
-rw-r--r--sw/inc/fesh.hxx9
-rw-r--r--sw/inc/fmtfld.hxx6
-rw-r--r--sw/inc/fmthbsh.hxx74
-rwxr-xr-xsw/inc/fmtmeta.hxx218
-rw-r--r--sw/inc/frmfmt.hxx11
-rw-r--r--sw/inc/hintids.hxx11
-rw-r--r--sw/inc/index.hxx4
-rw-r--r--sw/inc/ndarr.hxx2
-rw-r--r--sw/inc/ndhints.hxx29
-rw-r--r--sw/inc/ndnotxt.hxx25
-rw-r--r--sw/inc/ndtxt.hxx151
-rw-r--r--sw/inc/pch/precompiled_sw.hxx3
-rw-r--r--sw/inc/postit.hxx10
-rw-r--r--sw/inc/printdata.hxx2
-rw-r--r--sw/inc/redline.hxx8
-rw-r--r--sw/inc/rolbck.hxx16
-rw-r--r--sw/inc/section.hxx2
-rw-r--r--sw/inc/shellio.hxx4
-rw-r--r--sw/inc/swcalwrp.hxx5
-rw-r--r--sw/inc/swevent.hxx16
-rw-r--r--sw/inc/swtypes.hxx3
-rw-r--r--sw/inc/swundo.hxx8
-rw-r--r--sw/inc/txatbase.hxx295
-rw-r--r--sw/inc/txtatr.hxx56
-rw-r--r--sw/inc/txtfld.hxx2
-rw-r--r--sw/inc/txtftn.hxx2
-rw-r--r--sw/inc/txtinet.hxx3
-rw-r--r--sw/inc/undobj.hxx10
-rw-r--r--sw/inc/unocoll.hxx13
-rw-r--r--sw/inc/unocrsrhelper.hxx3
-rw-r--r--sw/inc/unofield.hxx13
-rw-r--r--sw/inc/unomap.hxx3
-rw-r--r--sw/inc/unoobj.hxx170
-rw-r--r--sw/inc/unoport.hxx208
-rw-r--r--sw/inc/unoprnms.hxx8
-rw-r--r--sw/inc/unotxdoc.hxx4
47 files changed, 883 insertions, 977 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index 67250574a7..b5830d72b2 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -67,11 +67,19 @@
DOC_NO_DELFRMS = 0x08
};
+ // constants for inserting text
+ enum InsertFlags
+ { INS_DEFAULT = 0x00 // no extras
+ , INS_EMPTYEXPAND = 0x01 // expand empty hints at insert position
+ , INS_NOHINTEXPAND = 0x02 // do not expand any hints at insert pos
+ , INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position
+ };
+
public:
/** Kopieren eines Bereiches im oder in ein anderes Dokument !
Die Position kann auch im Bereich liegen !!
*/
- virtual bool Copy(SwPaM&, SwPosition&, bool bCopyAll ) const = 0;
+ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0;
/** Loesche die Section, in der der Node steht.
*/
@@ -79,46 +87,41 @@
/** loeschen eines BereichesSwFlyFrmFmt
*/
- virtual bool Delete(SwPaM&) = 0;
+ virtual bool DeleteRange(SwPaM&) = 0;
/** loeschen gesamter Absaetze
*/
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
*/
- virtual bool Move(SwPaM&, SwPosition&, SwMoveFlags) = 0;
+ virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) = 0;
/** verschieben ganzer Nodes
*/
- virtual bool Move(SwNodeRange&, SwNodeIndex&, SwMoveFlags) = 0;
+ virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) = 0;
/** verschieben eines Bereiches
*/
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0;
- /** Ueberschreiben eines einzelnen Zeichens. rRg.Start() bezeichnet
- den Node und die Position in dem Node, an der eingefuegt wird,
- */
- virtual bool Overwrite(const SwPaM &rRg, sal_Unicode c) = 0;
-
/** Ueberschreiben eines Strings in einem bestehenden Textnode.
*/
virtual bool Overwrite(const SwPaM &rRg, const String& rStr) = 0;
- /** Einfuegen eines einzelnen Zeichens. rRg.Start() bezeichnet
- den Node und die Position in dem Node, an der eingefuegt wird.
- */
- virtual bool Insert(const SwPaM &rRg, sal_Unicode c) = 0;
-
- /** Einfuegen eines Strings in einen bestehenden
- Textnode. Der Text wird kopiert.
+ /** Insert string into existing text node at position rRg.Point().
*/
- virtual bool Insert(const SwPaM &rRg, const String&, bool bHintExpand) = 0;
+ virtual bool InsertString(const SwPaM &rRg, const String&,
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
/** change text to Upper/Lower/Hiragana/Katagana/...
*/
@@ -166,7 +169,8 @@
z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
--> "xx\t<Tab>..zzz..&"
*/
- virtual bool Replace(SwPaM& rPam, const String& rNewStr, bool bRegExpRplc) = 0;
+ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
+ const bool bRegExReplace) = 0;
/** Einfuegen eines Attributs. Erstreckt sich rRg ueber
mehrere Nodes, wird das Attribut aufgespaltet, sofern
@@ -182,11 +186,13 @@
hinzugefuegt. Wenn das Attribut nicht eingefuegt werden
konnte, liefert die Methode sal_False.
*/
- virtual bool Insert(const SwPaM &rRg, const SfxPoolItem&, sal_uInt16 nFlags) = 0;
+ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
+ const sal_uInt16 nFlags) = 0;
/**
*/
- virtual bool Insert(const SwPaM &rRg, const SfxItemSet&, sal_uInt16 nFlags) = 0;
+ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
+ const sal_uInt16 nFlags) = 0;
/** Removes any leading white space from the paragraph
*/
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index c6b1f50e38..f71c0f3e23 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -177,12 +177,11 @@ class SwPostItMgr: public SfxListener
bool HasScrollbars() const;
void Focus(SfxBroadcaster& rBC);
- sal_Int32 GetInitialAnchorDistance() const;
- sal_Int32 GetScrollSize() const;
- sal_Int32 GetSpaceBetween() const;
+ sal_Int32 GetInitialAnchorDistance() const;
+ sal_Int32 GetScrollSize() const;
+ sal_Int32 GetSpaceBetween() const;
void SetReadOnlyState();
- DECL_LINK( CalcHdl, void*);
-
+ DECL_LINK( CalcHdl, void*);
protected:
public:
@@ -263,6 +262,12 @@ class SwPostItMgr: public SfxListener
sal_uInt16 Replace(SvxSearchItem* pItem);
sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
+
+ void AssureStdModeAtShell();
};
#endif
+
+
+
+
diff --git a/sw/inc/bookmrk.hxx b/sw/inc/bookmrk.hxx
deleted file mode 100644
index 991b401768..0000000000
--- a/sw/inc/bookmrk.hxx
+++ /dev/null
@@ -1,218 +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: bookmrk.hxx,v $
- * $Revision: 1.11 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _BOOKMRK_HXX
-#define _BOOKMRK_HXX
-
-#include "hintids.hxx" //die Ids der Attribute, vor macitem damit die
- //die Attribut richtig angezogen werden.
-#include <svtools/macitem.hxx>
-
-#ifndef _KEYCOD_HXX //autogen
-#include <vcl/keycod.hxx>
-#endif
-#ifndef _TOOLS_REF_HXX
-#include <tools/ref.hxx>
-#endif
-#include <IDocumentBookmarkAccess.hxx>
-#include <calbck.hxx>
-#include <pam.hxx>
-
-#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
-#define SW_DECL_SWSERVEROBJECT_DEFINED
-SV_DECL_REF( SwServerObject )
-#endif
-
-
-struct SwPosition; // fwd Decl. wg. UI
-
-class SwBookmark : public SwModify
-{
- SwPosition *pPos1, *pPos2; // wird im CTOR gesetzt, im DTOR geloescht
- // pPos1 is always != 0, pPos2 may be 0
- SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
-
-protected:
- String aName;
- String aShortName;
- KeyCode aCode;
- IDocumentBookmarkAccess::BookmarkType eMarkType;
-
- SwBookmark( const SwPosition& aPos,
- const KeyCode& rCode,
- const String& rName, const String& rShortName);
-
-public:
- TYPEINFO();
-
- SwBookmark( const SwPosition& aPos );
- // --> OD 2007-09-26 #i81002#
- SwBookmark( const SwPaM& aPaM,
- const KeyCode& rCode,
- const String& rName, const String& rShortName);
- // <--
-
- // Beim Loeschen von Text werden Bookmarks mitgeloescht!
- virtual ~SwBookmark();
-
- // --> OD 2007-10-10 #i81002#
- // made virtual and thus no longer inline
- virtual const SwPosition& GetBookmarkPos() const;
- virtual const SwPosition* GetOtherBookmarkPos() const;
- // <--
-
- // nicht undofaehig
- const String& GetName() const { return aName; }
- // nicht undofaehig
- const String& GetShortName() const { return aShortName; }
- // nicht undofaehig
- const KeyCode& GetKeyCode() const { return aCode; }
-
- // Vergleiche auf Basis der Dokumentposition
- BOOL operator < (const SwBookmark &) const;
- BOOL operator ==(const SwBookmark &) const;
- // falls man wirklich auf gleiche Position abfragen will.
- BOOL IsEqualPos( const SwBookmark &rBM ) const;
-
- BOOL IsFormFieldMark() const { return IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; }
- BOOL IsBookMark() const { return IDocumentBookmarkAccess::BOOKMARK == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; }
-// // --> OD 2007-10-17 #TESTING#
-// BOOL IsBookMark() const
-// {
-// return IDocumentBookmarkAccess::BOOKMARK == eMarkType ||
-// IsCrossRefMark();
-// }
-// // <--
- BOOL IsMark() const { return IDocumentBookmarkAccess::MARK == eMarkType; }
- BOOL IsUNOMark() const { return IDocumentBookmarkAccess::UNO_BOOKMARK == eMarkType; }
- // --> OD 2007-10-11 #i81002# - bookmark type for cross-references
- BOOL IsCrossRefMark() const { return IDocumentBookmarkAccess::CROSSREF_BOOKMARK == eMarkType; }
- // <--
- void SetType( IDocumentBookmarkAccess::BookmarkType eNewType ) { eMarkType = eNewType; }
- IDocumentBookmarkAccess::BookmarkType GetType() const { return eMarkType; }
-
- // Daten Server-Methoden
- void SetRefObject( SwServerObject* pObj );
- const SwServerObject* GetObject() const { return &refObj; }
- SwServerObject* GetObject() { return &refObj; }
- BOOL IsServer() const { return refObj.Is(); }
-
- // --> OD 2007-10-10 #i81002#
- // made virtual and thus no longer inline
- // to access start and end of a bookmark.
- // start and end may be the same
- virtual const SwPosition* BookmarkStart() const;
- virtual const SwPosition* BookmarkEnd() const;
- // <--
-
- // --> OD 2007-09-26 #i81002#
- virtual void SetBookmarkPos( const SwPosition* pNewPos1 );
- virtual void SetOtherBookmarkPos( const SwPosition* pNewPos2 );
- // <--
-
-private:
- // fuer METWARE:
- // es wird (vorerst) nicht kopiert und nicht zugewiesen
- SwBookmark(const SwBookmark &);
- SwBookmark &operator=(const SwBookmark &);
-};
-
-class SwMark: public SwBookmark
-{
-public:
- SwMark( const SwPosition& aPos,
- const KeyCode& rCode,
- const String& rName, const String& rShortName);
-};
-
-class SW_DLLPUBLIC SwFieldBookmark : public SwBookmark
-{
-private:
- int fftype; // Type: 0 = Text, 1 = Check Box, 2 = List
- int ffres;
- bool ffprot;
- bool ffsize; // 0 = Auto, 1=Exact (see ffhps)
- int fftypetxt; // Type of text field: 0 = Regular text, 1 = Number, 2 = Date, 3 = Current date, 4 = Current time, 5 = Calculation
- bool ffrecalc;
- int ffmaxlen; // Number of characters for text field. Zero means unlimited.
- int ffhps; // Check box size (half-point sizes).
-
- String ffname;
- String ffhelptext;
-
-public:
- SwFieldBookmark(const SwPosition& aPos,
- const KeyCode& rCode,
- const String& rName, const String& rShortName,
- IDocumentBookmarkAccess::BookmarkType eMark);
-
- void SetFieldType(int fftype);
- int GetFieldType();
-
- void SetChecked(bool checked);
- bool IsChecked();
-
- void SetFFName(String aNewName) {
- this->ffname=aNewName;
- }
-
- String GetFFName()
- {
- return ffname;
- }
-
- int GetFFRes() {
- return ffres;
- }
-
- void SetFFRes(int nNew) {
- this->ffres=nNew;
- }
-
- void SetFFHelpText(String newffhelptext) {
- this->ffhelptext=newffhelptext;
- }
-
- String GetFFHelpText() {
- return ffhelptext;
- }
-};
-
-class SwUNOMark: public SwBookmark
-{
-public:
- // --> OD 2007-09-26 #i81002#
- SwUNOMark( const SwPaM& aPaM,
- const KeyCode& rCode,
- const String& rName, const String& rShortName);
- // <--
-};
-
-
-#endif
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index bbc2db88ae..5901718c7e 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -50,6 +50,9 @@ class String;
class SW_DLLPUBLIC SwBreakIt
{
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak;
+ com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > xCTLDetect;
+
com::sun::star::lang::Locale * m_pLocale;
com::sun::star::i18n::ForbiddenCharacters * m_pForbidden;
@@ -60,6 +63,9 @@ class SW_DLLPUBLIC SwBreakIt
void _GetLocale( const LanguageType aLang );
void _GetForbidden( const LanguageType aLang );
+ void createBreakIterator() const;
+ void createScriptTypeDetector();
+
// forbidden and not implemented.
SwBreakIt();
SwBreakIt( const SwBreakIt &);
@@ -79,15 +85,18 @@ public:
public:
static SwBreakIt * Get();
- // @@@ backward compatibility @@@
- com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak;
- com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > xCTLDetect;
-
- const com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > & GetBreakIter()
+ com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > GetBreakIter()
{
+ createBreakIterator();
return xBreak;
}
+ com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > GetScriptTypeDetector()
+ {
+ createScriptTypeDetector();
+ return xCTLDetect;
+ }
+
const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang )
{
if( !m_pLocale || aLast != aLang )
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 8c58d4e59b..5a97eba019 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -188,7 +188,7 @@ class SwCalc
xub_StrLen nCommandPos;
SwDoc& rDoc;
- LocaleDataWrapper* pLclData;
+ const LocaleDataWrapper* pLclData;
CharClass* pCharClass;
USHORT nListPor;
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 64c3c67bdc..0ea79539fc 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -153,7 +153,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_GOTO (FN_EDIT + 11) /* Gehe zu */
#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 */
@@ -911,6 +910,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_UNO_PARA_CONT_PREV_SUBTREE (FN_EXTRA2 + 109)
#define FN_UNO_PARA_NUM_STRING (FN_EXTRA2 + 110)
#define FN_UNO_TABLE_NAME (FN_EXTRA2 + 111)
+#define FN_UNO_META (FN_EXTRA2 + 112)
/*--------------------------------------------------------------------
Bereich: Hilfe
@@ -1258,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 8e1e0cd37a..692184be2d 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/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 7e4fa39a4d..cf794340ea 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -54,6 +54,7 @@ class SwNumRuleTbl;
class SwNumRule;
class SwOutlineNodes;
class SwTxtFmtColl;
+class SwNodeRange;
#define DBG_OUT_HERE printf("%s(%d):", __FILE__, __LINE__)
#define DBG_OUT_HERE_FN printf("%s(%d) %s:", __FILE__, __LINE__, __FUNCTION__)
@@ -88,6 +89,7 @@ SW_DLLPUBLIC const char * dbg_out(const SwNumRule & rRule);
SW_DLLPUBLIC const char * dbg_out(const SwTxtFmtColl & rFmt);
SW_DLLPUBLIC const char * dbg_out(const SwFrmFmts & rFrmFmts);
SW_DLLPUBLIC const char * dbg_out(const SwNumRuleTbl & rTbl);
+SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange);
template<typename tKey, typename tMember, typename fHashFunction>
String lcl_dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
@@ -118,7 +120,7 @@ const char * dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
{
return dbg_out(lcl_dbg_out(rMap));
}
-const char * dbg_out(const SwFormToken & rToken);
-const char * dbg_out(const SwFormTokens & rTokens);
+SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken);
+SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens);
#endif // DEBUG
#endif // __DBGOUTSW_HXX
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 4acb292213..55ab9a57b8 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -218,6 +218,9 @@ class IGrammarContact;
namespace sw { namespace mark {
class MarkManager;
}}
+namespace sw {
+ class MetaFieldManager;
+}
namespace com { namespace sun { namespace star {
namespace i18n {
@@ -298,6 +301,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
@@ -614,8 +618,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,
@@ -627,9 +631,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#
@@ -639,7 +644,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;
@@ -702,6 +707,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
@@ -878,18 +888,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,
@@ -897,8 +911,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,
@@ -906,7 +922,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
@@ -1091,7 +1108,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
*/
@@ -1348,11 +1370,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
@@ -1384,7 +1406,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 );
@@ -1500,13 +1522,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);
@@ -1566,8 +1591,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
@@ -1579,13 +1604,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& );
@@ -1757,9 +1782,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;
@@ -2081,6 +2106,7 @@ public:
}
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
+ ::sw::MetaFieldManager & GetMetaFieldManager();
SwDoc* CreateCopy() const;
};
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index e46bc84240..62b484809e 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -151,6 +151,8 @@ public:
static SfxInterface *_GetInterface() { return GetStaticInterface(); }
+ static rtl::OUString GetEventName( sal_Int32 nId );
+
//Das Doc wird fuer SO-Datenaustausch benoetigt!
SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, sal_Bool _bScriptingSupport = sal_True );
SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD );
@@ -305,6 +307,6 @@ public:
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/editsh.hxx b/sw/inc/editsh.hxx
index c76dd10a0a..7f98edd296 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -181,7 +181,7 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
public:
// Editieren (immer auf allen selektierten Bereichen)
void Insert( sal_Unicode, BOOL bOnlyCurrCrsr = FALSE );
- void Insert( const String &);
+ void Insert2( const String &, const bool bForceExpandHints = false );
void Overwrite( const String & );
// Ersetz einen selektierten Bereich in einem TextNode mit dem
@@ -333,7 +333,7 @@ public:
{ return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
// Felder
- void Insert(SwField&);
+ void Insert2(SwField&, const bool bForceExpandHints = false);
SwField* GetCurFld() const;
void UpdateFlds( SwField & ); // ein einzelnes Feld
@@ -488,8 +488,8 @@ public:
// <--
// detect highest and lowest level to check moving of outline levels
void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
-
-
+
+
// get Outline level of current paragraph
int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
@@ -513,9 +513,9 @@ public:
// --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
// in case a list style is found, <sListId> holds the list id, to which the
// text node belongs, which applies the found list style.
- const SwNumRule * SearchNumRule(BOOL bForward,
- BOOL bNum,
- BOOL bOutline,
+ const SwNumRule * SearchNumRule(const bool bForward,
+ const bool bNum,
+ const bool bOutline,
int nNonEmptyAllowed,
String& sListId );
// <--
@@ -623,9 +623,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;
@@ -754,7 +754,7 @@ public:
::com::sun::star::linguistic2::XSpellAlternatives >
GetCorrection( const Point* pPt, SwRect& rSelectRect );
-
+
bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult,
sal_Int32 /*out*/ &rErrorPosInText,
sal_Int32 /*out*/ &rErrorIndexInResult,
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 5c9014a62e..9673b41855 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -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/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 67dfb2df44..7edbb77a0f 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -39,6 +39,7 @@
class SwField;
class SwTxtFld;
+class SwView;
// ATT_FLD ***********************************
class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
@@ -103,16 +104,19 @@ class SW_DLLPUBLIC SwFmtFldHint : public SfxHint
const SwFmtFld* pFld;
sal_Int16 nWhich;
+ const SwView* pView;
public:
- SwFmtFldHint( const SwFmtFld* p, sal_Int16 n )
+ SwFmtFldHint( const SwFmtFld* p, sal_Int16 n, const SwView* pV = 0)
: pFld(p)
, nWhich(n)
+ , pView(pV)
{}
TYPEINFO();
const SwFmtFld* GetField() const { return pFld; }
sal_Int16 Which() const { return nWhich; }
+ const SwView* GetView() const { return pView; }
};
#endif
diff --git a/sw/inc/fmthbsh.hxx b/sw/inc/fmthbsh.hxx
deleted file mode 100644
index d06c24cd71..0000000000
--- a/sw/inc/fmthbsh.hxx
+++ /dev/null
@@ -1,74 +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: fmthbsh.hxx,v $
- * $Revision: 1.5 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _FMTHBSH_HXX
-#define _FMTHBSH_HXX
-
-
-#include <svtools/poolitem.hxx>
-
-// ATT_SOFTHYPH ******************************
-// Attribut fuer benutzerdefinierte Trennstellen.
-
-class SwFmtSoftHyph : public SfxPoolItem
-{
-public:
- SwFmtSoftHyph();
-
- // "pure virtual Methoden" vom SfxPoolItem
- virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
-
- inline SwFmtSoftHyph& operator=(const SwFmtSoftHyph&) {
- return *this;
- }
-};
-
-// ATT_HARDBLANK ******************************
-// Attribut fuer geschuetzte Leerzeichen.
-
-class SW_DLLPUBLIC SwFmtHardBlank : public SfxPoolItem
-{
- sal_Unicode cChar;
-public:
- SwFmtHardBlank( sal_Unicode cCh, BOOL bCheck = TRUE );
-
- // "pure virtual Methoden" vom SfxPoolItem
- virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
-
-
- inline sal_Unicode GetChar() const { return cChar; }
- inline SwFmtHardBlank& operator=(const SwFmtHardBlank& rHB)
- { cChar = rHB.GetChar(); return *this; }
-};
-
-
-#endif
-
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
new file mode 100755
index 0000000000..952181d049
--- /dev/null
+++ b/sw/inc/fmtmeta.hxx
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * 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: fmtmeta.hxx,v $
+ * $Revision: 1.1 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef SW_FMTMETA_HXX
+#define SW_FMTMETA_HXX
+
+#include <svtools/poolitem.hxx>
+#include <sfx2/Metadatable.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+#include <vector>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextField;
+ }
+}}}
+
+
+/**
+ * The classes that make up a meta entity are:
+ * <dl>
+ * <dt>SwTxtMeta</dt><dd>the text hint</dd>
+ * <dt>SwFmtMeta</dt><dd>the pool item</dd>
+ * <dt>sw::Meta</dt><dd>the metadatable entity itself</dd>
+ * <dt>SwXMeta</dt><dd>the UNO wrapper object</dd>
+ * </dl>
+ *
+ * The text hint contains the pool item (as usual) and has a pointer to the
+ * text node at which it is attached.
+ * The pool item has a shared pointer to the metadatable entity, and a reverse
+ * pointer to the text attribute at which it is attached.
+ * The pool item is non-poolable; it may only be attached to one text
+ * attribute.
+ * Of all the pool items that refer to a metadatable entity, only one may be
+ * in the document content at any time. Others may be in the undo array, or in
+ * undo objects.
+ * The metadatable entity has a reverse pointer to the pool item that is
+ * currently in the document. It also registers as a client at the text node
+ * at which it is attached via this pool item and its text attribute.
+ * The UNO wrapper object registers as a client at the metadatable entity.
+ *
+ * Copying the metadatable entity proceeds in the following way:
+ * <ol>
+ * <li>The pool item is cloned (because it is non-poolable); the clone
+ * points to the same metadatable entity, but the metadatable entity's
+ * reverse pointer is unchanged.</li>
+ * <li>A new text hint is created, taking over the new pool item.
+ * Unfortunately, this also makes the metadatable entity point at the
+ * cloned pool item.</li>
+ * <li>The text hint is inserted into the hints array of some text node.</li>
+ * <li>The DoCopy() method must be called at the new pool item:
+ * it will clone the metadatable entity (using RegisterAsCopyOf),
+ * and fix the reverse pointer of the original to point at the
+ * original pool item.
+ * This is necessary, because first, a metadatable entity may
+ * only be inserted once into a document, and second, the copy may be
+ * inserted into a different document than the source document!</li>
+ * </ol>
+ */
+
+class SwTxtMeta;
+class SwXMeta;
+class SwXMetaField;
+namespace sw {
+ class Meta;
+}
+
+class SwFmtMeta
+ : public SfxPoolItem
+{
+private:
+ friend class SwTxtMeta; // needs SetTxtAttr
+ friend class ::sw::Meta; // needs m_pTxtAttr
+
+ ::boost::shared_ptr< ::sw::Meta > m_pMeta;
+ SwTxtMeta * m_pTxtAttr;
+
+ SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; }
+ void SetTxtAttr(SwTxtMeta * const i_pTxtAttr);
+
+ explicit SwFmtMeta( const USHORT i_nWhich );
+
+public:
+ // takes ownership
+ explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
+ const USHORT i_nWhich );
+ virtual ~SwFmtMeta();
+
+ // SfxPoolItem
+ virtual int operator==( const SfxPoolItem & ) const;
+ virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const;
+// TYPEINFO();
+
+ // notify clients registered at m_pMeta that this meta is being removed
+ void NotifyRemoval();
+ static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich );
+ ::sw::Meta * GetMeta() { return m_pMeta.get(); }
+ /// this method <em>must</em> be called when the hint is actually copied
+ void DoCopy( SwFmtMeta & rOriginalMeta );
+};
+
+
+namespace sw {
+
+class MetaFieldManager;
+
+class Meta
+ : public ::sfx2::Metadatable
+ , public SwModify
+{
+protected:
+ friend class ::SwFmtMeta; // SetFmtMeta
+ friend class ::SwXMeta; // GetTxtNode, GetTxtAttr
+
+ SwFmtMeta * m_pFmt;
+
+ SwTxtMeta * GetTxtAttr() const;
+ SwTxtNode * GetTxtNode() const; // returns 0 if not in document (undo)
+
+ SwFmtMeta * GetFmtMeta() const { return m_pFmt; }
+ void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; };
+
+public:
+ explicit Meta(SwFmtMeta * const i_pFmt = 0);
+ virtual ~Meta();
+
+ // SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // 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();
+};
+
+class MetaField
+ : public Meta
+{
+private:
+ friend class ::SwFmtMeta;
+ friend class ::SwXMetaField;
+ friend class ::sw::MetaFieldManager;
+
+ sal_uInt32 m_nNumberFormat;
+ bool m_bIsFixedLanguage;
+
+ sal_uInt32 GetNumberFormat(::rtl::OUString const & rContent) const;
+ void SetNumberFormat(sal_uInt32 nNumberFormat);
+ bool IsFixedLanguage() const { return m_bIsFixedLanguage; }
+ void SetIsFixedLanguage(bool b) { m_bIsFixedLanguage = b; }
+
+ explicit MetaField(SwFmtMeta * const i_pFmt = 0,
+ const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
+ const bool bIsFixedLanguage = false );
+
+public:
+ /// get prefix/suffix from the RDF repository. @throws RuntimeException
+ void GetPrefixAndSuffix(
+ ::rtl::OUString *const o_pPrefix, ::rtl::OUString *const o_pSuffix);
+};
+
+/** knows all meta-fields in the document. */
+class MetaFieldManager
+ : private ::boost::noncopyable
+{
+private:
+ typedef ::std::vector< ::boost::weak_ptr<MetaField> > MetaFieldList_t;
+ MetaFieldList_t m_MetaFields;
+
+public:
+ MetaFieldManager();
+ ::boost::shared_ptr<MetaField> makeMetaField(
+ SwFmtMeta * const i_pFmt = 0,
+ const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
+ const bool bIsFixedLanguage = false );
+ /// get all meta fields
+ ::std::vector< ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> > getMetaFields();
+};
+
+} // namespace sw
+
+#endif // SW_FMTMETA_HXX
+
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index c416d691d7..12ef87e948 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -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/hintids.hxx b/sw/inc/hintids.hxx
index c317539e2a..676698b54f 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -127,8 +127,8 @@ RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
RES_TXTATR_DUMMY5, // 46
RES_TXTATR_CJK_RUBY, // 47
RES_TXTATR_UNKNOWN_CONTAINER, // 48
- RES_TXTATR_DUMMY6, // 49
- RES_TXTATR_DUMMY7, // 50
+ RES_TXTATR_META, // 49
+ RES_TXTATR_METAFIELD, // 50
RES_TXTATR_WITHEND_END,
// alle TextAttribute ohne ein Ende
@@ -136,8 +136,8 @@ RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 51
RES_TXTATR_FLYCNT, // 52
RES_TXTATR_FTN, // 53
- RES_TXTATR_SOFTHYPH, // 54
- RES_TXTATR_HARDBLANK, // 55
+ RES_TXTATR_DUMMY4, // 54
+ RES_TXTATR_DUMMY3, // 55
RES_TXTATR_DUMMY1, // 56
RES_TXTATR_DUMMY2, // 57
RES_TXTATR_NOEND_END,
@@ -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
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index a0274c1cb7..755f3694f1 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -132,8 +132,8 @@ class SwIndexReg
static SwIndexReg* pEmptyIndexArray;
protected:
- virtual void Update( const SwIndex & aPos, xub_StrLen nLen,
- BOOL bNegativ = FALSE, BOOL bDelete = FALSE );
+ virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
+ const bool bNegative = false, const bool bDelete = false );
void ChkArr();
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index dec387d29d..d479fc9e78 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -180,7 +180,7 @@ public:
BOOL _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
BOOL bNewFrms = TRUE );
- void Move( SwPaM&, SwPosition&, SwNodes& rNodes, BOOL bSplitNd=TRUE );
+ void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes );
void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
BOOL bNewFrms = TRUE ) const
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 851cff58c5..620d8a0c2f 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -34,11 +34,30 @@
#include <svtools/svarray.hxx>
#include <tools/mempool.hxx>
+#include "swtypes.hxx"
+
//#include "numrule.hxx"
class SwTxtNode;
class SwRegHistory; // steht im RolBck.hxx
class SwTxtAttr;
+class SwTxtAttrNesting;
+
+class SfxPoolItem;
+class SfxItemSet;
+class SwDoc;
+
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew,
+ xub_StrLen nStt, xub_StrLen nEnd );
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, const SfxItemSet & rSet,
+ xub_StrLen nStt, xub_StrLen nEnd );
+
+// create redline dummy text hint that must not be inserted into hints array
+SW_DLLPRIVATE SwTxtAttr*
+MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr );
+
/*
* Ableitung der Klasse SwpHints ueber den Umweg ueber SwpHts, da
@@ -148,7 +167,10 @@ private:
return m_bHasHiddenParaField;
}
- void BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, USHORT nMode );
+ void InsertNesting(SwTxtAttrNesting & rNewHint);
+ bool TryInsertNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNewHint);
+ void BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
+ const SetAttrMode nMode );
bool MergePortions( SwTxtNode& rNode );
public:
@@ -162,7 +184,10 @@ public:
void DeRegister() { Register(0); }
SwRegHistory* GetHistory() const { return m_pHistory; }
- void Insert( SwTxtAttr* pHt, SwTxtNode &rNode, USHORT nMode = 0 );
+ /// try to insert the hint
+ /// @return true iff hint successfully inserted
+ bool TryInsertHint( SwTxtAttr * const pHint, SwTxtNode & rNode,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
inline bool HasFtn() const { return m_bFootnote; }
inline bool IsInSplitNode() const { return m_bInSplitNode; }
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index bdb8b8d6a4..4097627f91 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -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 490062c02f..37aa87b202 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -38,6 +38,7 @@
#include <errhdl.hxx>
#include <modeltoviewhelper.hxx>
#include <SwNumberTreeTypes.hxx>
+#include <IDocumentContentOperations.hxx>
#include <sfx2/Metadatable.hxx>
@@ -75,11 +76,6 @@ class SwScriptInfo;
struct SwDocStat;
struct SwParaIdleData_Impl;
-// Konstanten fuer das Text-Insert:
-#define INS_DEFAULT 0x0000 // keine Extras
-#define INS_EMPTYEXPAND 0x0001 // leere Hints beim Einfuegen aufspannen
-#define INS_NOHINTEXPAND 0x0002 // Hints an der InsPos nicht aufspannen
-
namespace com { namespace sun { namespace star { namespace uno {
template < class > class Sequence;
}}}}
@@ -97,8 +93,6 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
friend class SwNodes;
friend class SwTxtFrm;
friend class SwScriptInfo;
- friend void SwpHints::Insert( SwTxtAttr*, SwTxtNode&, USHORT );
- friend void SwpHints::BuildPortions( SwTxtNode&, SwTxtAttr&, USHORT );
//Kann 0 sein, nur dann nicht 0 wenn harte Attribute drin stehen.
//Also niemals direkt zugreifen!
@@ -148,11 +142,10 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, BOOL bNext = TRUE,
BOOL bChgFollow = TRUE );
- SW_DLLPRIVATE void _Cut( SwTxtNode *pDest, const SwIndex &rDestStart,
- const SwIndex &rStart, xub_StrLen nLen, BOOL bUpdate = TRUE );
-
- SW_DLLPRIVATE SwTxtAttr* MakeTxtAttr( const SfxPoolItem& rNew, xub_StrLen nStt, xub_StrLen nEnd, bool bRedlineAttr = false );
- SW_DLLPRIVATE SwTxtAttr* MakeTxtAttr( const SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd );
+ SW_DLLPRIVATE void CutImpl(
+ SwTxtNode * const pDest, const SwIndex & rDestStart,
+ const SwIndex & rStart, /*const*/ xub_StrLen nLen,
+ const bool bUpdate = true );
// Verlagere alles umfassende harte Attribute in den AttrSet des Absatzes
SW_DLLPRIVATE void MoveTxtAttr_To_AttrSet(); // wird von SplitNode gerufen.
@@ -258,21 +251,30 @@ public:
virtual USHORT ResetAllAttr();
// <--
- /*
- * Einfuegen anderer Datentypen durch Erzeugen eines
- * temporaeren Strings.
- */
- SwTxtNode& Insert( xub_Unicode c, const SwIndex &rIdx );
- SwTxtNode& Insert( const XubString &rStr, const SwIndex &rIdx,
- const USHORT nMode = INS_DEFAULT );
-
- SwTxtNode& Erase( const SwIndex &rIdx, xub_StrLen nCount = STRING_LEN,
- const USHORT nMode = INS_DEFAULT );
+ /// insert text content
+ void InsertText( const XubString & rStr, const SwIndex & rIdx,
+ const enum IDocumentContentOperations::InsertFlags nMode
+ = IDocumentContentOperations::INS_DEFAULT );
- // Aktionen auf Attributen
- // loesche alle TextAttribute die als Attribut im Set vorhanden sind
- // (Set-Pointer != 0 ) oder alle deren Which-Wert mit nWhich mappen
- // oder wenn Which = 0, alle.
+ /** delete text content
+ ATTENTION: must not be called with a range that overlaps the start of
+ an attribute with both extent and dummy char
+ */
+ void EraseText ( const SwIndex &rIdx, const xub_StrLen nCount = STRING_LEN,
+ const enum IDocumentContentOperations::InsertFlags nMode
+ = IDocumentContentOperations::INS_DEFAULT );
+
+ /** delete all attributes.
+ If neither pSet nor nWhich is given, delete all attributes (except
+ refmarks, toxmarks, meta) in range.
+ @param rIdx start position
+ @param nLen range in which attributes will be deleted
+ @param pSet if not 0, delete only attributes contained in pSet
+ @param nWhich if not 0, delete only attributes with matching which
+ @param bInclRefToxMark
+ refmarks, toxmarks, and metas will be ignored unless this is true
+ ATTENTION: setting bInclRefToxMark is only allowed from UNDO!
+ */
void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich = 0,
const SfxItemSet* pSet = 0, BOOL bInclRefToxMark = FALSE );
void GCAttr();
@@ -283,17 +285,20 @@ public:
// loesche alle Attribute aus dem SwpHintsArray.
void ClearSwpHintsArr( bool bDelFields );
- // Insert pAttr into hints array.
- BOOL Insert( SwTxtAttr *pAttr, USHORT nMode = 0 );
- // lege ein neues TextAttribut an und fuege es ins SwpHints-Array ein
- // returne den neuen Pointer (oder 0 bei Fehlern)!
- SwTxtAttr* InsertItem( const SfxPoolItem& rAttr,
- xub_StrLen nStt, xub_StrLen nEnd, USHORT nMode = 0 );
+ /// Insert pAttr into hints array. @return true iff inserted successfully
+ bool InsertHint( SwTxtAttr * const pAttr,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+ /// create new text attribute from rAttr and insert it
+ /// @return inserted hint; 0 if not sure the hint is inserted
+ SwTxtAttr* InsertItem( SfxPoolItem& rAttr,
+ const xub_StrLen nStart, const xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
BOOL SetAttr( const SfxItemSet& rSet,
- xub_StrLen nStt, xub_StrLen nEnd, USHORT nMode = 0 );
+ xub_StrLen nStt, xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
// erfrage die Attribute vom TextNode ueber den Bereich
// --> OD 2008-01-16 #newlistlevelattrs#
// Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
@@ -311,32 +316,34 @@ public:
// uebertrage Attribute eines AttrSets ( AutoFmt ) in das SwpHintsArray
void FmtToTxtAttr( SwTxtNode* pNd );
- // loeschen eines einzelnen Attributes (fuer SwUndoAttr)
- // ( nur das Attribut loeschen, dass mit Which,Start und End oder
- // mit pTxtHint identisch ist (es gibt nur ein gueltiges))
- // AUSNAHME: ToxMarks !!!
- void Delete( USHORT nTxtWhich, xub_StrLen nStart, xub_StrLen nEnd = 0 );
- void Delete( SwTxtAttr * pTxtAttr, BOOL bThisOnly = FALSE );
+ /// delete all attributes of type nWhich at nStart (opt. end nEnd)
+ void DeleteAttributes( const USHORT nWhich,
+ const xub_StrLen nStart, const xub_StrLen nEnd = 0 );
+ /// delete the attribute pTxtAttr
+ void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
// Aktionen auf Text und Attributen
// --> OD 2008-11-18 #i96213#
// introduce optional parameter to control, if all attributes have to be copied.
- void Copy( SwTxtNode *pDest,
+ void CopyText( SwTxtNode * const pDest,
const SwIndex &rStart,
- USHORT nLen,
+ const xub_StrLen nLen,
const bool bForceCopyOfAllAttrs = false );
- void Copy( SwTxtNode *pDest,
+ void CopyText( SwTxtNode * const pDest,
const SwIndex &rDestStart,
const SwIndex &rStart,
xub_StrLen nLen,
const bool bForceCopyOfAllAttrs = false );
// <--
- void Cut(SwTxtNode *pDest, const SwIndex &rStart, xub_StrLen nLen);
- inline void Cut(SwTxtNode *pDest, const SwIndex &rDestStart,
- const SwIndex &rStart, xub_StrLen nLen);
- // ersetze im String an Position nIdx das Zeichen
- void Replace( const SwIndex& rStart, xub_Unicode cCh );
- void Replace( const SwIndex& rStart, xub_StrLen nLen, const XubString& rText );
+
+ void CutText(SwTxtNode * const pDest,
+ const SwIndex & rStart, const xub_StrLen nLen);
+ inline void CutText(SwTxtNode * const pDest, const SwIndex &rDestStart,
+ const SwIndex & rStart, const xub_StrLen nLen);
+
+ /// replace nDelLen characters at rStart with rText
+ void ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
+ const XubString& rText );
void ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen, const XubString& rText,
const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
@@ -355,18 +362,21 @@ public:
// gebe das vorgegebene Attribut, welches an der TextPosition (rIdx)
// gesetzt ist zurueck. Gibt es keines, returne 0-Pointer
// gesetzt heisst: Start <= rIdx < End
+ // FIXME: this function does not seem to be well-defined for those
+ // hints of which several may cover a single position, like TOXMark,
+ // or CharFmt
SwTxtAttr *GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt,
BOOL bExpand = FALSE ) const;
- // Diese Methode liefert nur Textattribute auf der Position nIdx
- // zurueck, die kein EndIdx besitzen und denselben Which besitzen.
- // Ueblicherweise steht an dieser Position ein CH_TXTATR.
- // Bei RES_TXTATR_END entfaellt die Pruefung auf den Which-Wert.
- SwTxtAttr *GetTxtAttr( const xub_StrLen nIdx,
- const USHORT nWhichHt = RES_TXTATR_END ) const;
-
- SwTxtFld *GetTxtFld( const SwIndex& rIdx )
- { return (SwTxtFld *)GetTxtAttr( rIdx, RES_TXTATR_FIELD ); }
+ /** get the text attribute at position nIndex which owns
+ the dummy character CH_TXTATR_* at that position, if one exists.
+ @param nIndex the position in the text
+ @param nWhich if different from RES_TXTATR_END, return only
+ attribute with given which id
+ @return the text attribute at nIndex of type nWhich, if it exists
+ */
+ SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex,
+ const RES_TXTATR nWhich = RES_TXTATR_END ) const;
// Aktuelles Wort zurueckliefern
XubString GetCurWord(xub_StrLen) const;
@@ -754,17 +764,14 @@ public:
bool IsHidden() const;
// <--
- inline SwTxtAttr* MakeRedlineTxtAttr( const SfxPoolItem& rNew )
- { return MakeTxtAttr( rNew, 0, 0, true ); }
-
TYPEINFO(); // fuer rtti
// fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- // aus SwIndexReg
- virtual void Update( const SwIndex & aPos, USHORT xub_StrLen,
- BOOL bNegativ = FALSE, BOOL bDelete = FALSE );
+ // override SwIndexReg
+ virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
+ const bool bNegative = false, const bool bDelete = false );
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( utl::TransliterationWrapper& rTrans,
@@ -774,16 +781,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;
@@ -875,11 +872,11 @@ inline const SwTxtNode *SwNode::GetTxtNode() const
}
#endif
-inline void SwTxtNode::Cut(SwTxtNode *pDest, const SwIndex &rDestStart,
- const SwIndex &rStart, xub_StrLen nLen)
+inline void
+SwTxtNode::CutText(SwTxtNode * const pDest, const SwIndex & rDestStart,
+ const SwIndex & rStart, const xub_StrLen nLen)
{
- _Cut( pDest, rDestStart, rStart, nLen, TRUE );
+ CutImpl( pDest, rDestStart, rStart, nLen, true );
}
-
#endif
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 68e324e02a..0a43d2c73d 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -626,7 +626,6 @@
#include "svtools/ctloptions.hxx"
#include "svtools/ctrlbox.hxx"
#include "svtools/ctrltool.hxx"
-#include "svtools/docpasswdrequest.hxx"
#include "svtools/editbrowsebox.hxx"
#include "svtools/ehdl.hxx"
#include "svtools/eitem.hxx"
diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx
index 37584791c7..ddc75cc6e6 100644
--- a/sw/inc/postit.hxx
+++ b/sw/inc/postit.hxx
@@ -181,8 +181,6 @@ class PostItTxt : public Window
virtual void DataChanged( const DataChangedEvent& aData);
virtual void LoseFocus();
virtual void RequestHelp(const HelpEvent &rEvt);
-
- // reconversion /*i94374*/
virtual XubString GetSurroundingText() const;
virtual Selection GetSurroundingTextSelection() const;
@@ -229,6 +227,7 @@ class SwMarginWin : public Window
long mPageBorder;
SwPostItBits nFlags;
bool mbMouseOverButton;
+
protected:
bool mbReadonly;
PopupMenu* mpButtonPopup;
@@ -241,7 +240,8 @@ class SwMarginWin : public Window
virtual void Paint( const Rectangle& rRect);
virtual void GetFocus();
- void SetSizePixel( const Size& rNewSize );
+ void SetSizePixel( const Size& rNewSize );
+ SfxItemSet DefaultItem();
DECL_LINK(ModifyHdl, void*);
DECL_LINK(ScrollHdl, ScrollBar*);
@@ -289,8 +289,8 @@ class SwMarginWin : public Window
void ExecuteCommand(USHORT nSlot);
void InitControls();
- void HidePostIt();
- void DoResize();
+ void HidePostIt();
+ void DoResize();
void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
void SetScrollbar();
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 9f37f7505e..7ecfe08ec5 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -133,6 +133,7 @@ struct SwPrintData
void SetPrintEmptyPages(sal_Bool b ) { doSetModified(); bPrintEmptyPages = b;}
void SetPrintPostIts ( sal_Int16 n){ doSetModified(); nPrintPostIts = n; }
void SetPrintProspect ( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
+ void SetPrintProspect_RTL ( sal_Bool b ) { doSetModified(); bPrintProspect_RTL = b; }
void SetPrintPageBackground(sal_Bool b){ doSetModified(); bPrintPageBackground = b;}
void SetPrintBlackFont(sal_Bool b){ doSetModified(); bPrintBlackFont = b;}
void SetPrintSingleJobs(sal_Bool b){ doSetModified(); bPrintSingleJobs = b;}
@@ -143,4 +144,3 @@ struct SwPrintData
};
#endif //_SW_PRINTDATA_HXX
-
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index f3d714e94f..0e3c4670c4 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -42,6 +42,7 @@
#include <svtools/smplhint.hxx>
class SfxItemSet;
+class SwView;
class SwRedlineExtraData
{
@@ -297,16 +298,19 @@ class SW_DLLPUBLIC SwRedlineHint : public SfxHint
const SwRedline* pRedline;
sal_Int16 nWhich;
+ const SwView* pView;
public:
- SwRedlineHint( const SwRedline* p, sal_Int16 n )
+ SwRedlineHint( const SwRedline* p, sal_Int16 n, const SwView* pV = 0)
: pRedline(p)
, nWhich(n)
- {}
+ , pView(pV)
+ {}
TYPEINFO();
const SwRedline* GetRedline() const { return pRedline; }
sal_Int16 Which() const { return nWhich; }
+ const SwView* GetView() const { return pView; }
};
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
index 6dd6a90ad6..f910a44ca8 100644
--- a/sw/inc/rolbck.hxx
+++ b/sw/inc/rolbck.hxx
@@ -40,6 +40,10 @@
//Nur die History anziehen, um das docnew.cxx gegen die CLOOK's zu behaupten.
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
class SwDoc;
class SwFmt;
class SwFmtColl;
@@ -160,8 +164,8 @@ public:
class SwHistorySetTxtFld : public SwHistoryHint
{
- const ::std::auto_ptr<SwFmtFld> m_pFld;
::std::auto_ptr<SwFieldType> m_pFldType;
+ const ::std::auto_ptr<SwFmtFld> m_pFld;
ULONG m_nNodeIndex;
xub_StrLen m_nPos;
USHORT m_nFldWhich;
@@ -295,6 +299,7 @@ class SwHistoryBookmark : public SwHistoryHint
const bool m_bSaveOtherPos;
const bool m_bHadOtherPos;
const IDocumentMarkAccess::MarkType m_eBkmkType;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo;
};
class SwHistorySetAttrSet : public SwHistoryHint
@@ -446,13 +451,16 @@ public:
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
SwRegHistory( SwHistory* pHst );
// <--
- SwRegHistory( SwTxtNode* pTxtNode, const SfxItemSet& rSet,
- xub_StrLen nStart, xub_StrLen nEnd, USHORT nFlags,
- SwHistory* pHst );
SwRegHistory( const SwNode& rNd, SwHistory* pHst );
SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst );
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ /// @return true iff at least 1 item was inserted
+ bool InsertItems( const SfxItemSet& rSet,
+ xub_StrLen const nStart, xub_StrLen const nEnd,
+ SetAttrMode const nFlags );
+
void AddHint( SwTxtAttr* pHt, const bool bNew = false );
void RegisterInModify( SwModify* pRegIn, const SwNode& rNd );
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index f7ea343ca0..4d883e8464 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/shellio.hxx b/sw/inc/shellio.hxx
index 22c22a3285..d1ffa05e95 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/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
index b3449970ca..8935008998 100644
--- a/sw/inc/swcalwrp.hxx
+++ b/sw/inc/swcalwrp.hxx
@@ -34,6 +34,7 @@
#include <i18npool/lang.h>
#include <tools/string.hxx>
#include <unotools/calendarwrapper.hxx>
+#include <salhelper/singletonref.hxx>
class SwCalendarWrapper : public CalendarWrapper
{
@@ -42,7 +43,7 @@ class SwCalendarWrapper : public CalendarWrapper
public:
SwCalendarWrapper( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory > & xMSF )
+ ::com::sun::star::lang::XMultiServiceFactory > & xMSF = ::comphelper::getProcessServiceFactory() )
: CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM )
{}
@@ -50,7 +51,7 @@ public:
};
-extern SwCalendarWrapper* pCalendarWrapper;
+salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper();
#endif
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index 6020633ea0..ad6bee69dd 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -50,6 +50,20 @@
#define SW_EVENT_FIELD_MERGE_FINISHED ( EVENT_APP_START + 11 )
#define SW_EVENT_LAYOUT_FINISHED ( EVENT_APP_START + 12 )
+#define STR_SW_EVENT_PAGE_COUNT 0
+#define STR_SW_EVENT_MAIL_MERGE 1
+#define STR_SW_EVENT_MAIL_MERGE_END 2
+#define STR_SW_EVENT_FIELD_MERGE 3
+#define STR_SW_EVENT_FIELD_MERGE_FINISHED 4
+#define STR_SW_EVENT_LAYOUT_FINISHED 5
+#define STR_SW_EVENT_OBJECT_SELECT 6
+#define STR_SW_EVENT_START_INS_GLOSSARY 7
+#define STR_SW_EVENT_END_INS_GLOSSARY 8
+#define STR_SW_EVENT_FRM_KEYINPUT_ALPHA 9
+#define STR_SW_EVENT_FRM_KEYINPUT_NOALPHA 10
+#define STR_SW_EVENT_FRM_RESIZE 11
+#define STR_SW_EVENT_FRM_MOVE 12
+
class SwFrmFmt;
class SwFmtINetFmt;
class IMapObject;
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 63a3f5c2a7..7bc90a4e76 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -229,6 +229,8 @@ namespace nsSetAttrMode
const SetAttrMode SETATTR_DONTCHGNUMRULE = 0x0020; // nicht die NumRule veraendern
const SetAttrMode SETATTR_APICALL = 0x0040; // called from API (all UI related
// functionality will be disabled)
+ /// force hint expand (only matters for hints with CH_TXTATR)
+ const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080;
}
//Umrechnung Twip<-> 1/100 mm fuer UNO
@@ -259,7 +261,6 @@ namespace nsSetAttrMode
// returns the APP - CharClass instance - used for all ToUpper/ToLower/...
SW_DLLPUBLIC CharClass& GetAppCharClass();
-SW_DLLPUBLIC LocaleDataWrapper& GetAppLocaleData();
SW_DLLPUBLIC LanguageType GetAppLanguage();
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index b32c9dd0fb..51eea3343d 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -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 503812085c..da08842e02 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -39,76 +39,51 @@
class SfxItemPool;
-class SvxBrushItem;
-class SvxFontItem;
-class SvxPostureItem;
-class SvxWeightItem;
-class SvxUnderlineItem;
-class SvxOverlineItem;
-class SvxFontHeightItem;
-class SvxPropSizeItem;
-class SvxShadowedItem;
-class SvxAutoKernItem;
-class SvxWordLineModeItem;
-class SvxContourItem;
-class SvxCrossedOutItem;
-class SvxColorItem;
-class SvxCharSetColorItem;
class SvXMLAttrContainerItem;
class SwFmtRuby;
-class SvxTwoLinesItem;
-class SvxEmphasisMarkItem;
-class SvxCharScaleWidthItem;
-class SvxCharRotateItem;
-class SvxCharReliefItem;
-class SvxCharHiddenItem;
-
class SwFmtCharFmt;
class SwFmtAutoFmt;
class SwFmtINetFmt;
-class SvxKerningItem;
-class SvxCaseMapItem;
-class SvxLanguageItem;
-class SvxEscapementItem;
-class SvxBlinkItem;
-class SvxNoHyphenItem;
-class SwFmtSoftHyph;
-class SwFmtHardBlank;
class SwFmtFld;
class SwFmtFtn;
class SwFmtFlyCnt;
class SwTOXMark;
class SwFmtRefMark;
+class SwFmtMeta;
+
class SwTxtAttr : private boost::noncopyable
{
- const SfxPoolItem* m_pAttr;
+private:
+ SfxPoolItem * const 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 m_bNesting : 1; // SwTxtAttrNesting
+ bool m_bHasDummyChar : 1; // without end + meta
protected:
- SwTxtAttr( const SfxPoolItem& rAttr, xub_StrLen nStart );
+ SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtAttr();
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; }
+ void SetNesting(const bool bFlag) { m_bNesting = bFlag; }
+ void SetHasDummyChar(const bool bFlag) { m_bHasDummyChar = bFlag; }
public:
- virtual ~SwTxtAttr();
- // RemoveFromPool muss immer vorm DTOR Aufruf erfolgen!!
- void RemoveFromPool( SfxItemPool& rPool );
+ /// destroy instance
+ static void Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool );
/// start position
xub_StrLen* GetStart() { return & m_nStart; }
@@ -123,44 +98,23 @@ public:
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; }
+ bool IsNesting() const { return m_bNesting; }
+ bool HasDummyChar() const { return m_bHasDummyChar; }
inline const SfxPoolItem& GetAttr() const;
+ inline SfxPoolItem& GetAttr();
inline USHORT Which() const { return GetAttr().Which(); }
virtual int operator==( const SwTxtAttr& ) const;
- inline const SvxFontItem &GetFont() const;
- inline const SvxPostureItem &GetPosture() const;
- inline const SvxWeightItem &GetWeight() const;
- inline const SvxUnderlineItem &GetUnderline() const;
- inline const SvxOverlineItem &GetOverline() const;
- inline const SvxFontHeightItem &GetFontSize() const;
- inline const SvxPropSizeItem &GetPropSize() const;
- inline const SvxShadowedItem &GetShadowed() const;
- inline const SvxAutoKernItem &GetAutoKern() const;
- inline const SvxWordLineModeItem &GetWordLineMode() const;
- inline const SvxContourItem &GetContour() const;
- inline const SvxCrossedOutItem &GetCrossedOut() const;
- inline const SvxColorItem &GetColor() const;
- inline const SvxCharSetColorItem &GetCharSetColor() const;
inline const SwFmtCharFmt &GetCharFmt() const;
inline const SwFmtAutoFmt &GetAutoFmt() const;
- inline const SvxKerningItem &GetKerning() const;
- inline const SvxCaseMapItem &GetCaseMap() const;
- inline const SvxLanguageItem &GetLanguage() const;
- inline const SvxEscapementItem &GetEscapement() const;
- inline const SvxBlinkItem &GetBlink() const;
- inline const SvxBrushItem &GetChrBackground() const;
- inline const SvxNoHyphenItem &GetNoHyphenHere() const;
- inline const SwFmtSoftHyph &GetSoftHyph() const;
- inline const SwFmtHardBlank &GetHardBlank() const;
inline const SwFmtFld &GetFld() const;
inline const SwFmtFtn &GetFtn() const;
inline const SwFmtFlyCnt &GetFlyCnt() const;
@@ -169,25 +123,19 @@ public:
inline const SwFmtINetFmt &GetINetFmt() const;
inline const SvXMLAttrContainerItem &GetXMLAttrContainer() const;
inline const SwFmtRuby &GetRuby() const;
- inline const SvxTwoLinesItem &Get2Lines() const;
- inline const SvxEmphasisMarkItem &GetEmphasisMark() const;
- inline const SvxCharScaleWidthItem &GetCharScaleW() const;
- inline const SvxCharRotateItem &GetCharRotate() const;
- inline const SvxCharReliefItem &GetCharRelief() const;
- inline const SvxCharHiddenItem &GetCharHidden() const;
+ inline const SwFmtMeta &GetMeta() const;
};
class SwTxtAttrEnd : public SwTxtAttr
{
- using SwTxtAttr::GetEnd;
-
protected:
xub_StrLen m_nEnd;
public:
- SwTxtAttrEnd( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+ SwTxtAttrEnd( SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+ using SwTxtAttr::GetEnd;
virtual xub_StrLen* GetEnd();
};
@@ -211,6 +159,12 @@ inline const SfxPoolItem& SwTxtAttr::GetAttr() const
return *m_pAttr;
}
+inline SfxPoolItem& SwTxtAttr::GetAttr()
+{
+ return const_cast<SfxPoolItem&>(
+ const_cast<const SwTxtAttr*>(this)->GetAttr());
+}
+
inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
{
if ( !m_bLockExpandFlag )
@@ -219,102 +173,7 @@ inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
}
}
-inline const SvxFontItem& SwTxtAttr::GetFont() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_FONT, "Wrong attribute" );
- return (const SvxFontItem&)(*m_pAttr);
-}
-
-inline const SvxPostureItem& SwTxtAttr::GetPosture() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_POSTURE,
- "Wrong attribute" );
- return (const SvxPostureItem&)(*m_pAttr);
-}
-
-inline const SvxWeightItem& SwTxtAttr::GetWeight() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_WEIGHT,
- "Wrong attribute" );
- return (const SvxWeightItem&)(*m_pAttr);
-}
-
-inline const SvxUnderlineItem& SwTxtAttr::GetUnderline() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_UNDERLINE,
- "Wrong attribute" );
- return (const SvxUnderlineItem&)(*m_pAttr);
-}
-
-inline const SvxOverlineItem& SwTxtAttr::GetOverline() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_OVERLINE,
- "Wrong attribute" );
- return (const SvxOverlineItem&)(*m_pAttr);
-}
-
-inline const SvxFontHeightItem& SwTxtAttr::GetFontSize() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_FONTSIZE,
- "Wrong attribute" );
- return (const SvxFontHeightItem&)(*m_pAttr);
-}
-
-inline const SvxPropSizeItem& SwTxtAttr::GetPropSize() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_PROPORTIONALFONTSIZE,
- "Wrong attribute" );
- return (const SvxPropSizeItem&)(*m_pAttr);
-}
-
-inline const SvxShadowedItem& SwTxtAttr::GetShadowed() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_SHADOWED,
- "Wrong attribute" );
- return (const SvxShadowedItem&)(*m_pAttr);
-}
-
-inline const SvxAutoKernItem& SwTxtAttr::GetAutoKern() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_AUTOKERN,
- "Wrong attribute" );
- return (const SvxAutoKernItem&)(*m_pAttr);
-}
-
-inline const SvxWordLineModeItem& SwTxtAttr::GetWordLineMode() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_WORDLINEMODE,
- "Wrong attribute" );
- return (const SvxWordLineModeItem&)(*m_pAttr);
-}
-
-inline const SvxContourItem& SwTxtAttr::GetContour() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CONTOUR,
- "Wrong attribute" );
- return (const SvxContourItem&)(*m_pAttr);
-}
-
-inline const SvxCrossedOutItem& SwTxtAttr::GetCrossedOut() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CROSSEDOUT,
- "Wrong attribute" );
- return (const SvxCrossedOutItem&)(*m_pAttr);
-}
-
-inline const SvxColorItem& SwTxtAttr::GetColor() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_COLOR,
- "Wrong attribute" );
- return (const SvxColorItem&)(*m_pAttr);
-}
-
-inline const SvxCharSetColorItem& SwTxtAttr::GetCharSetColor() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CHARSETCOLOR,
- "Wrong attribute" );
- return (const SvxCharSetColorItem&)(*m_pAttr);
-}
+//------------------------------------------------------------------------
inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
{
@@ -330,69 +189,6 @@ inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
return (const SwFmtAutoFmt&)(*m_pAttr);
}
-inline const SvxKerningItem& SwTxtAttr::GetKerning() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_KERNING,
- "Wrong attribute" );
- return (const SvxKerningItem&)(*m_pAttr);
-}
-
-inline const SvxCaseMapItem& SwTxtAttr::GetCaseMap() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_CASEMAP,
- "Wrong attribute" );
- return (const SvxCaseMapItem&)(*m_pAttr);
-}
-
-inline const SvxLanguageItem& SwTxtAttr::GetLanguage() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_LANGUAGE,
- "Wrong attribute" );
- return (const SvxLanguageItem&)(*m_pAttr);
-}
-
-inline const SvxEscapementItem& SwTxtAttr::GetEscapement() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_ESCAPEMENT,
- "Wrong attribute" );
- return (const SvxEscapementItem&)(*m_pAttr);
-}
-
-inline const SvxBlinkItem& SwTxtAttr::GetBlink() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_BLINK,
- "Wrong attribute" );
- return (const SvxBlinkItem&)(*m_pAttr);
-}
-
-inline const SvxBrushItem& SwTxtAttr::GetChrBackground() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_BACKGROUND,
- "Wrong attribute" );
- return (const SvxBrushItem&)(*m_pAttr);
-}
-
-inline const SvxNoHyphenItem& SwTxtAttr::GetNoHyphenHere() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_NOHYPHEN,
- "Wrong attribute" );
- return (const SvxNoHyphenItem&)(*m_pAttr);
-}
-
-inline const SwFmtSoftHyph& SwTxtAttr::GetSoftHyph() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_SOFTHYPH,
- "Wrong attribute" );
- return (const SwFmtSoftHyph&)(*m_pAttr);
-}
-
-inline const SwFmtHardBlank& SwTxtAttr::GetHardBlank() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_HARDBLANK,
- "Wrong attribute" );
- return (const SwFmtHardBlank&)(*m_pAttr);
-}
-
inline const SwFmtFld& SwTxtAttr::GetFld() const
{
ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
@@ -447,46 +243,13 @@ inline const SwFmtRuby& SwTxtAttr::GetRuby() const
"Wrong attribute" );
return (const SwFmtRuby&)(*m_pAttr);
}
-inline const SvxTwoLinesItem& SwTxtAttr::Get2Lines() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_TWO_LINES,
- "Wrong attribute" );
- return (const SvxTwoLinesItem&)(*m_pAttr);
-}
-
-inline const SvxEmphasisMarkItem& SwTxtAttr::GetEmphasisMark() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_EMPHASIS_MARK,
- "Wrong attribute" );
- return (const SvxEmphasisMarkItem&)(*m_pAttr);
-}
-
-inline const SvxCharScaleWidthItem& SwTxtAttr::GetCharScaleW() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_SCALEW,
- "Wrong attribute" );
- return (const SvxCharScaleWidthItem&)(*m_pAttr);
-}
-
-inline const SvxCharRotateItem& SwTxtAttr::GetCharRotate() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_ROTATE,
- "Wrong attribute" );
- return (const SvxCharRotateItem&)(*m_pAttr);
-}
-
-inline const SvxCharReliefItem& SwTxtAttr::GetCharRelief() const
-{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_RELIEF,
- "Wrong attribute" );
- return (const SvxCharReliefItem&)(*m_pAttr);
-}
-inline const SvxCharHiddenItem& SwTxtAttr::GetCharHidden() const
+inline const SwFmtMeta& SwTxtAttr::GetMeta() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_CHRATR_HIDDEN,
+ ASSERT( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
+ m_pAttr->Which() == RES_TXTATR_METAFIELD),
"Wrong attribute" );
- return (const SvxCharHiddenItem&)(*m_pAttr);
+ return (const SwFmtMeta&)(*m_pAttr);
}
#endif
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index c6c8f1da9b..5a36625d52 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -29,14 +29,13 @@
************************************************************************/
#ifndef _TXTATR_HXX
#define _TXTATR_HXX
-#include <tools/gen.hxx>
-#include <tools/color.hxx>
+
#include <txatbase.hxx> // SwTxtAttr/SwTxtAttrEnd
#include <calbck.hxx>
+
class SwTxtNode; // fuer SwTxtFld
class SwCharFmt;
-class SvxTwoLinesItem;
// ATT_CHARFMT *********************************************
@@ -60,29 +59,45 @@ public:
USHORT GetSortNumber() const { return m_nSortNumber; }
};
-// ATT_HARDBLANK ******************************
-class SwTxtHardBlank : public SwTxtAttr
-{
- sal_Unicode m_Char;
+// ATT_XMLCONTAINERITEM ******************************
+class SwTxtXMLAttrContainer : public SwTxtAttrEnd
+{
public:
- SwTxtHardBlank( const SwFmtHardBlank& rAttr, xub_StrLen nStart );
- inline sal_Unicode GetChar() const { return m_Char; }
+ SwTxtXMLAttrContainer( SvXMLAttrContainerItem& rAttr,
+ xub_StrLen nStart, xub_StrLen nEnd );
};
-// ATT_XNLCONTAINERITEM ******************************
+// ******************************
-class SwTxtXMLAttrContainer : public SwTxtAttrEnd
+class SwTxtAttrNesting : public SwTxtAttrEnd
{
public:
- SwTxtXMLAttrContainer( const SvXMLAttrContainerItem& rAttr,
- xub_StrLen nStart, xub_StrLen nEnd );
+ SwTxtAttrNesting( SfxPoolItem & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtAttrNesting();
};
+class SwTxtMeta : public SwTxtAttrNesting
+{
+private:
+ SwTxtNode * m_pTxtNode;
+
+public:
+ SwTxtMeta( SwFmtMeta & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtMeta();
+
+ void ChgTxtNode( SwTxtNode * const pNode ) { m_pTxtNode = pNode; }
+ SwTxtNode * GetTxtNode() const { return m_pTxtNode; }
+
+};
+
+
// ******************************
-class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrEnd, public SwClient
+class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient
{
SwTxtNode* m_pTxtNode;
@@ -101,16 +116,7 @@ public:
SwCharFmt* GetCharFmt();
const SwCharFmt* GetCharFmt() const
- { return ((SwTxtRuby*)this)->GetCharFmt(); }
-};
-
-// ******************************
-
-class SwTxt2Lines : public SwTxtAttrEnd
-{
-public:
- SwTxt2Lines( const SvxTwoLinesItem& rAttr,
- xub_StrLen nStart, xub_StrLen nEnd );
+ { return (const_cast<SwTxtRuby*>(this))->GetCharFmt(); }
};
// --------------- Inline Implementierungen ------------------------
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 130f4eff7c..ec4d399b02 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -64,7 +64,7 @@ public:
@return position of this field. Has to be deleted explicitly.
*/
- SwPosition * GetPosition() const;
+// SwPosition * GetPosition() const;
};
inline SwTxtNode& SwTxtFld::GetTxtNode() const
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 5d9c71b21b..4b247b561a 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -52,7 +52,7 @@ public:
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 );
+ void CopyFtn( SwTxtFtn *pDest ) const;
// get and set TxtNode pointer
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index 173b41164d..c3597d5b2b 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -31,6 +31,7 @@
#define _TXTINET_HXX
#include <txatbase.hxx>
+#include <txtatr.hxx>
#include <calbck.hxx>
class SwTxtNode;
@@ -38,7 +39,7 @@ class SwCharFmt;
// ATT_INETFMT *********************************************
-class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrEnd, public SwClient
+class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
{
SwTxtNode * m_pTxtNode;
bool m_bVisited : 1; // visited link?
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index e5acda9b83..f45806e558 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -49,6 +49,7 @@
#include <swundo.hxx>
#include <IMark.hxx>
+#include <IDocumentContentOperations.hxx>
// --> OD 2006-11-01 #130889#
#include <vector>
// <--
@@ -362,6 +363,8 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
BOOL bIsWordDelim : 1;
BOOL bIsAppend : 1;
+ const IDocumentContentOperations::InsertFlags m_nInsertFlags;
+
friend class SwDoc; // eigentlich nur SwDoc::Insert( String )
BOOL CanGrouping( sal_Unicode cIns );
BOOL CanGrouping( const SwPosition& rPos );
@@ -373,6 +376,7 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
public:
SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen,
+ const IDocumentContentOperations::InsertFlags nInsertFlags,
BOOL bWDelim = TRUE );
SwUndoInsert( const SwNodeIndex& rNode );
virtual ~SwUndoInsert();
@@ -572,13 +576,13 @@ class SwUndoAttr : public SwUndo, private SwUndRng
::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
+ const SetAttrMode 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 );
+ SwUndoAttr( const SwPaM&, const SfxItemSet &, const SetAttrMode nFlags );
+ SwUndoAttr( const SwPaM&, const SfxPoolItem&, const SetAttrMode nFlags );
virtual ~SwUndoAttr();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 0c67b1bd58..eeb3a81af1 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -163,11 +163,11 @@ class SwUnoCollection
#define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 73
#define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS 74
#define SW_SERVICE_FIELDTYPE_DROPDOWN 75
-#define SW_SERVICE_FIELDTYPE_DUMMY_4 76
-#define SW_SERVICE_FIELDTYPE_DUMMY_5 77
-#define SW_SERVICE_FIELDTYPE_DUMMY_6 78
-#define SW_SERVICE_FIELDTYPE_DUMMY_7 79
-#define SW_SERVICE_FIELDTYPE_DUMMY_8 80
+#define SW_SERVICE_FIELDTYPE_METAFIELD 76
+#define SW_SERVICE_FIELDTYPE_DUMMY_4 77
+#define SW_SERVICE_FIELDTYPE_DUMMY_5 78
+#define SW_SERVICE_FIELDTYPE_DUMMY_6 79
+#define SW_SERVICE_FIELDTYPE_DUMMY_7 80
#define SW_SERVICE_FIELDMASTER_USER 81
#define SW_SERVICE_FIELDMASTER_DDE 82
#define SW_SERVICE_FIELDMASTER_SET_EXP 83
@@ -196,8 +196,9 @@ class SwUnoCollection
#define SW_SERVICE_CHART2_DATA_PROVIDER 106
#define SW_SERVICE_TYPE_FIELDMARK 107
#define SW_SERVICE_TYPE_FORMFIELDMARK 108
+#define SW_SERVICE_TYPE_META 109
-#define SW_SERVICE_LAST SW_SERVICE_TYPE_FORMFIELDMARK
+#define SW_SERVICE_LAST SW_SERVICE_TYPE_META
#define SW_SERVICE_INVALID USHRT_MAX
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 490934a0a3..27a511d969 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -96,7 +96,8 @@ namespace SwUnoCursorHelper
com::sun::star::beans::PropertyState& eState);
sal_Bool DocInsertStringSplitCR( SwDoc &rDoc,
- const SwPaM &rNewCursor, const String &rText );
+ const SwPaM &rNewCursor, const String &rText,
+ const bool bForceExpandHints );
void makeRedline( SwPaM& rPaM, const ::rtl::OUString& RedlineType,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index 1a1a489f26..abbd3f9e8f 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -43,7 +43,6 @@ class SwDoc;
class SwFmtFld;
class SwField;
class SwSetExpField;
-class String;
class SwTextAPIObject;
/* -----------------04.12.98 12:49-------------------
@@ -206,15 +205,13 @@ 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();
};
+
+/// @return a SwXTextField, either an already existing one or a new one
+SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+
+
/* -----------------21.12.98 10:26-------------------
*
* --------------------------------------------------*/
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index 11244fe940..0a19f4fbd4 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -131,8 +131,9 @@
#define PROPERTY_MAP_RUBY_AUTO_STYLE 95
#define PROPERTY_MAP_PARA_AUTO_STYLE 96
#define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97
+#define PROPERTY_MAP_METAFIELD 98
-#define PROPERTY_MAP_END 98
+#define PROPERTY_MAP_END 99
//S&E
#define WID_WORDS 0
diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx
index 43dbfffca2..e2e8b02dde 100644
--- a/sw/inc/unoobj.hxx
+++ b/sw/inc/unoobj.hxx
@@ -30,8 +30,10 @@
************************************************************************/
#ifndef _UNOOBJ_HXX
#define _UNOOBJ_HXX
+
#include <unoevtlstnr.hxx>
#include <unobaseclass.hxx>
+#include <unocrsr.hxx>
#include <svtools/itemprop.hxx>
#include <svtools/svarray.hxx>
#include <frmfmt.hxx>
@@ -92,13 +94,29 @@
#include <IDocumentMarkAccess.hxx>
#include <sfx2/Metadatable.hxx>
+#include <deque>
+#include <boost/shared_ptr.hpp>
+
-class SwUnoCrsr;
-class SwCursor;
class SwFmtFtn;
class SwFmtRefMark;
class GetCurTxtFmtColl;
+
+struct FrameDependSortListEntry {
+ xub_StrLen nIndex;
+ sal_uInt32 nOrder;
+ ::boost::shared_ptr<SwDepend> pFrameDepend;
+ FrameDependSortListEntry (xub_StrLen const i_nIndex,
+ sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
+ : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
+};
+typedef ::std::deque< FrameDependSortListEntry >
+ FrameDependSortList_t;
+
+typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
+ FrameDependList_t;
+
/* -----------------29.04.98 07:35-------------------
*
* --------------------------------------------------*/
@@ -114,36 +132,21 @@ enum CursorType
CURSOR_REDLINE,
CURSOR_ALL, // fuer Search&Replace
CURSOR_SELECTION, // create a paragraph enumeration from a text range or cursor
- CURSOR_SELECTION_IN_TABLE
+ CURSOR_SELECTION_IN_TABLE,
+ CURSOR_META, // meta/meta-field
};
-/* -----------------29.04.98 07:35-------------------
- *
- * --------------------------------------------------*/
-#define PUNOPAM (_pStartCrsr)
-
-#define FOREACHUNOPAM_START(pCrsr) \
- {\
- SwPaM *_pStartCrsr = pCrsr, *__pStartCrsr = _pStartCrsr; \
- do {
-
-#define FOREACHUNOPAM_END() \
- } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr ); \
- }
-
/* -----------------26.06.98 16:18-------------------
*
* --------------------------------------------------*/
-SV_DECL_PTRARR(SwDependArr, SwDepend*, 2, 2)
-
SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
// OD 2004-05-07 #i28701# - adjust 4th parameter
void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
- SwDependArr& rFrameArr,
+ FrameDependSortList_t & rFrames,
const bool _bAtCharAnchoredObjs );
/* -----------------29.04.98 07:35-------------------
@@ -212,8 +215,13 @@ class SwXText : public ::com::sun::star::lang::XTypeProvider,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-protected:
+ virtual void PrepareForAttach( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ const SwXTextRange* const pRange, const SwPaM * const pPam);
+
+public: /*not protected because C++ is retarded*/
virtual const SwStartNode *GetStartNode() const;
+
public:
SwXText(SwDoc* pDc, CursorType eType);
virtual ~SwXText();
@@ -293,6 +301,10 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
INT16 ComparePositions(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos2) throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
BOOL CheckForOwnMember(const SwXTextRange* pRange1, const OTextCursorHelper* pCursor1)throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual bool CheckForOwnMemberMeta(const SwXTextRange* const pRange,
+ const SwPaM* const pPam, bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
//
void Invalidate() {bObjectValid = sal_False;}
BOOL IsValid()const {return bObjectValid;}
@@ -345,8 +357,6 @@ class SwXTextCursor : public SwXTextCursor_Base,
bool mbRemoveUserEvent;
// <--
- void DeleteAndInsert(const String& rText);
-
DECL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl,
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface>* );
@@ -354,6 +364,7 @@ class SwXTextCursor : public SwXTextCursor_Base,
protected:
virtual ~SwXTextCursor();
public:
+ void DeleteAndInsert(const String& rText, const bool bForceExpandHints);
SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, const SwPosition& rPos,
CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0);
SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL);
@@ -506,6 +517,8 @@ public:
// --> FME 2006-03-07 #126177#
void DoNotRemoveUserEvent() { mbRemoveUserEvent = false; }
// <--
+
+ bool IsAtEndOfMeta() const;
};
/*-----------------20.03.98 07:47-------------------
@@ -557,18 +570,19 @@ public:
};
*/
-typedef cppu::WeakImplHelper5
+typedef ::cppu::ImplInheritanceHelper5
<
+ ::sfx2::MetadatableMixin,
::com::sun::star::text::XTextContent,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::container::XNamed,
::com::sun::star::lang::XUnoTunnel
>
-SwRefMarkBaseClass;
+SwBookmarkBaseClass;
class SwXBookmark
- : public SwRefMarkBaseClass
+ : public SwBookmarkBaseClass
, private SwClient
{
private:
@@ -634,8 +648,15 @@ class SwXBookmark
//SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > GetModel();
+
const ::sw::mark::IMark* GetBookmark() const
{ return m_pRegisteredBookmark; }
+ ::sw::mark::IMark* GetBookmark()
+ { return m_pRegisteredBookmark; }
SwDoc* GetDoc()
{ return m_pDoc; }
};
@@ -740,7 +761,8 @@ class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8
void _CreateNewBookmark(SwPaM& rPam);
//TODO: new exception type for protected content
- void DeleteAndInsert(const String& rText) throw( ::com::sun::star::uno::RuntimeException );
+ void DeleteAndInsert(const String& rText, const bool bForceExpandHints)
+ throw( ::com::sun::star::uno::RuntimeException );
protected:
virtual ~SwXTextRange();
@@ -1277,79 +1299,39 @@ class SwXParaFrameEnumeration : public cppu::WeakImplHelper2
>,
public SwClient
{
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xNextObject; //hasMoreElements legt das Objekt schon an
- SwDependArr aFrameArr; //wird im Ctor gefuellt
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xNextObject; // created by hasMoreElements
+ FrameDependList_t m_Frames;
- SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
- BOOL CreateNextObject();
- void FillFrame(SwUnoCrsr& rUnoCrsr);
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
public:
SwXParaFrameEnumeration(const SwPaM& rPaM,
sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0);
~SwXParaFrameEnumeration();
- //XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
-
- //XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ // XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw( ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw( ::com::sun::star::uno::RuntimeException );
//SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
-/* -----------------29.05.98 14:42-------------------
- *
- * --------------------------------------------------*/
-class SwXTextPortionEnumeration : public cppu::WeakImplHelper3
-<
- ::com::sun::star::container::XEnumeration,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::lang::XUnoTunnel
->,
- public SwClient
-{
- XTextRangeArr aPortionArr; //all portions are created in the ctor
- SwDependArr aFrameArr; //wird im Ctor gefuellt - mit am Zeichen gebundenen Rahmen
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent;
- BOOL bAtEnd;
- BOOL bFirstPortion;
-
- const sal_Int32 nStartPos;
- const sal_Int32 nEndPos;
-
- SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); }
- SwXTextPortionEnumeration();
- void CreatePortions();
-protected:
- virtual ~SwXTextPortionEnumeration();
-public:
- SwXTextPortionEnumeration(SwPaM& rParaCrsr,
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent,
- sal_Int32 nStart, sal_Int32 nEnd );
-
-
- 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);
-
- //XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
-
- //XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
-
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-};
/* -----------------29.09.98 09:01-------------------
*
@@ -1437,6 +1419,16 @@ public:
/* -----------------27.08.98 15:11-------------------
*
* --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper5
+<
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>
+SwRefMarkBaseClass;
+
class SwXReferenceMark : public SwRefMarkBaseClass,
public SwClient
{
@@ -1447,7 +1439,7 @@ class SwXReferenceMark : public SwRefMarkBaseClass,
BOOL m_bIsDescriptor;
BOOL IsValid() const {return 0 != GetRegisteredIn();}
- void InsertRefMark( SwPaM& rPam );
+ void InsertRefMark( SwPaM& rPam, SwXTextCursor * pCursor );
public:
SwXReferenceMark(SwDoc* pDoc, const SwFmtRefMark* pMark);
~SwXReferenceMark();
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
index a94f312eba..b395d1c107 100644
--- a/sw/inc/unoport.hxx
+++ b/sw/inc/unoport.hxx
@@ -29,27 +29,41 @@
************************************************************************/
#ifndef _UNOPORT_HXX
#define _UNOPORT_HXX
+
+#include <unocrsr.hxx>
#include <unoevtlstnr.hxx>
#include <calbck.hxx>
-#include <cppuhelper/implbase6.hxx>
+
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/implbase8.hxx>
-#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <svtools/itemprop.hxx>
+#include <memory>
+#include <deque>
+
+
class SwFmtFld;
class SwFrmFmt;
-class SwUnoCrsr;
class SwTxtRuby;
+
+
+typedef ::std::deque<
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > >
+ TextRangeList_t;
+
+
/* -----------------29.05.98 14:42-------------------
*
* --------------------------------------------------*/
@@ -59,7 +73,7 @@ enum SwTextPortionType
PORTION_FIELD,
PORTION_FRAME,
PORTION_FOOTNOTE,
- PORTION_CONTROL_CHAR,
+// obsolete! PORTION_CONTROL_CHAR,
PORTION_REFMARK_START,
PORTION_REFMARK_END,
PORTION_TOXMARK_START,
@@ -71,20 +85,19 @@ enum SwTextPortionType
PORTION_RUBY_START,
PORTION_RUBY_END,
PORTION_SOFT_PAGEBREAK,
+ PORTION_META,
PORTION_FIELD_START,
PORTION_FIELD_END,
PORTION_FIELD_START_END
};
-class SwXRubyPortion;
-class SwXTextPortion : public cppu::WeakImplHelper9
+class SwXTextPortion : public cppu::WeakImplHelper8
<
::com::sun::star::beans::XTolerantMultiPropertySet,
::com::sun::star::beans::XMultiPropertySet,
::com::sun::star::beans::XPropertySet,
::com::sun::star::text::XTextRange,
- ::com::sun::star::text::XTextField,
::com::sun::star::beans::XPropertyState,
::com::sun::star::container::XContentEnumerationAccess,
::com::sun::star::lang::XUnoTunnel,
@@ -92,29 +105,39 @@ class SwXTextPortion : public cppu::WeakImplHelper9
>,
public SwClient
{
- friend class SwXRubyPortion;
- SwEventListenerContainer aLstnrCntnr;
- const SfxItemPropertySet* m_pPropSet;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xRefMark;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xTOXMark;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xBookmark;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xFootnote;
- ::com::sun::star::uno::Any* pRubyText;
- ::com::sun::star::uno::Any* pRubyStyle;
- ::com::sun::star::uno::Any* pRubyAdjust;
- ::com::sun::star::uno::Any* pRubyIsAbove;
-
- const SwFmtFld* pFmtFld;
- SwDepend aFrameDepend;
- SwFrmFmt* pFrameFmt;
- SwTextPortionType ePortionType;
- sal_Int16 nControlChar;
-
- BOOL bIsCollapsed;
-
- SwFmtFld* GetFldFmt(BOOL bInit = sal_False);
+private:
+
+ SwEventListenerContainer m_ListenerContainer;
+ const SfxItemPropertySet * m_pPropSet;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ m_xParentText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xRefMark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xTOXMark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xBookmark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote >
+ m_xFootnote;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField >
+ m_xTextField;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xMeta;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyText;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyStyle;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyAdjust;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyIsAbove;
+
+ const SwDepend m_FrameDepend;
+ SwFrmFmt * m_pFrameFmt;
+ const SwTextPortionType m_ePortionType;
+
+ bool m_bIsCollapsed;
+
+ SwFmtFld * GetFldFmt(bool bInit = false);
+
protected:
+
//SfxItemPropertySet& GetPropSet() { return aPropSet; }
void SAL_CALL SetPropertyValues_Impl(
@@ -140,16 +163,23 @@ protected:
sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException);
virtual ~SwXTextPortion();
+
public:
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 );
+ // for Ruby
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
+ SwTxtRuby const& rAttr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const& xParent,
+ sal_Bool bIsEnd );
//XTextRange
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString() throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
//XTolerantMultiPropertySet
@@ -180,15 +210,12 @@ public:
virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- //XTextField
- virtual rtl::OUString SAL_CALL getPresentation(BOOL bShowCommand) throw( ::com::sun::star::uno::RuntimeException );
-
//XTextContent
virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
//XComponent
- virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
@@ -197,48 +224,105 @@ public:
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
//XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
//XContentEnumerationAccess
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 );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException );
//SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
- void SetRefMark( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark)
- {xRefMark = xMark;}
+ void SetRefMark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xRefMark = xMark; }
- void SetTOXMark( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark)
- {xTOXMark = xMark;}
+ void SetTOXMark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xTOXMark = xMark; }
- void SetBookmark( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark)
- {xBookmark = xMark;}
+ void SetBookmark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xBookmark = xMark; }
- void SetFootnote( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark)
- {xFootnote = xMark;}
+ void SetFootnote( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XFootnote > xNote)
+ { m_xFootnote = xNote; }
- void SetControlChar(sal_Int16 nSet) {nControlChar = nSet;}
+ void SetTextField( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> xField)
+ { m_xTextField = xField; }
- BOOL IsCollapsed() const { return bIsCollapsed;}
- void SetCollapsed(BOOL bSet) { bIsCollapsed = bSet;}
+ void SetMeta( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMeta)
+ { m_xMeta = xMeta; }
- SwTextPortionType GetTextPortionType() const {return ePortionType;}
+ bool IsCollapsed() const { return m_bIsCollapsed; }
+ void SetCollapsed(bool bSet) { m_bIsCollapsed = bSet;}
- SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); }
+ SwTextPortionType GetTextPortionType() const { return m_ePortionType; }
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
};
-/* -----------------------------19.02.01 10:46--------------------------------
- ---------------------------------------------------------------------------*/
-class SwXRubyPortion : public SwXTextPortion
+/* -----------------29.05.98 14:42-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextPortionEnumeration
+ : public ::cppu::WeakImplHelper3
+ < ::com::sun::star::container::XEnumeration
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ >
+ , public SwClient
{
+ TextRangeList_t m_Portions; // contains all portions, filled by ctor
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
+
+protected:
+ virtual ~SwXTextPortionEnumeration();
+
public:
- SwXRubyPortion(const SwUnoCrsr* pPortionCrsr,
- SwTxtRuby& rAttr,
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent,
- sal_Bool bEnd );
- ~SwXRubyPortion();
+ SwXTextPortionEnumeration(SwPaM& rParaCrsr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const & xParent,
+ const sal_Int32 nStart, const sal_Int32 nEnd );
+
+ SwXTextPortionEnumeration(SwPaM& rParaCrsr,
+ TextRangeList_t const & rPortions );
+
+
+ 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);
+
+ //XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw( ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
+
#endif
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 526f288095..0b59929824 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -203,7 +203,7 @@ enum SwPropNameIds
/* 0161 */ UNO_NAME_PARA_BACK_TRANSPARENT,
/* 0162 */ UNO_NAME_POSITION_END_OF_DOC,
/* 0163 */ UNO_NAME_POSITION_PROTECTED,
-/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT,
+/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT,
/* 0165 */ UNO_NAME_PRIMARY_KEY,
/* 0166 */ UNO_NAME_PRINT_TABLES,
/* 0167 */ UNO_NAME_PRINT_GRAPHICS,
@@ -804,7 +804,11 @@ 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 */ UNO_NAME_META, // #i91565#
+/* 0739 */ SW_PROPNAME_END
};
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index a7865fd759..1af8e747c0 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -168,7 +168,7 @@ typedef cppu::WeakImplHelper32
>
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);